@ws-ui/roles-editor 1.10.4-rc1 → 1.10.4-rc3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -3,19 +3,19 @@
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
5
5
  */var GS;function pW(){return GS||(GS=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var i="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(i=o(i,n(s)))}return i}function n(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return r.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var a="";for(var s in i)t.call(i,s)&&i[s]&&(a=o(a,s));return a}function o(i,a){return a?i?i+" "+a:i+a:i}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(gp)),gp.exports}var hW=pW();const ht=wo(hW);(function(){try{const e=document.createElement("style");e.setAttribute("data-vite-dev-id","ui-components.css"),e.textContent=`/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial}}:root:not(#\\#),:host:not(#\\#){--color-green-500:oklch(72.3% .219 149.579);--color-blue-500:oklch(62.3% .214 259.815);--color-pink-500:oklch(65.6% .241 354.308);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-400:oklch(70.7% .022 261.325);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--text-xs:.65rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--text-8xl:6rem;--text-8xl--line-height:1;--text-9xl:8rem;--text-9xl--line-height:1;--font-weight-thin:100;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-xs:.125rem;--radius-md:.375rem;--radius-lg:.5rem;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-bounce:bounce 1s infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--color-grey-50:var(--ws-grey-50);--color-grey-100:var(--ws-grey-100);--color-grey-200:var(--ws-grey-200);--color-grey-300:var(--ws-grey-300);--color-grey-400:var(--ws-grey-400);--color-grey-500:var(--ws-grey-500);--color-grey-600:var(--ws-grey-600);--color-grey-700:var(--ws-grey-700);--color-grey-800:var(--ws-grey-800);--color-primary-500:var(--ws-primary-500);--color-primary-600:var(--ws-primary-600);--color-primary-700:var(--ws-primary-700);--color-positive-200:var(--ws-positive-200);--color-positive-400:var(--ws-positive-400);--color-positive-500:var(--ws-positive-500);--color-positive-600:var(--ws-positive-600);--color-warning-500:var(--ws-warning-500);--color-warning-600:var(--ws-warning-600);--color-negative-400:var(--ws-negative-400);--color-negative-500:var(--ws-negative-500);--color-negative-600:var(--ws-negative-600);--text-xxs:.55rem;--text-s:.75rem;--min-height-6:1.5rem;--color-canvas-default:var(--ws-bg-default);--color-canvas-subtle:var(--ws-grey-100);--color-panel:var(--ws-grey-300);--color-panel-subtle:var(--ws-grey-200);--color-card:var(--ws-card-bg);--color-card-border:var(--ws-card-border);--color-body:var(--ws-bg-foreground);--color-body-bg:var(--ws-bg-default);--color-body-light:var(--ws-grey-100);--color-muted:var(--ws-grey-200);--color-neutral:var(--ws-grey-200);--color-button-text:var(--ws-button-fg);--color-primary:var(--ws-primary-default);--color-primary-hover:var(--ws-primary-hover);--color-primary-light:var(--ws-primary-light);--color-primary-dark:var(--ws-primary-dark);--color-positive:var(--ws-positive-500);--color-positive-hover:var(--ws-positive-hover);--color-positive-text:var(--ws-positive-text);--color-positive-bg:var(--ws-positive-bg);--color-positive-light:var(--ws-positive-light);--color-positive-dark:var(--ws-positive-dark);--color-negative:var(--ws-negative-500);--color-negative-hover:var(--ws-negative-hover);--color-negative-text:var(--ws-negative-text);--color-negative-bg:var(--ws-negative-bg);--color-negative-light:var(--ws-negative-light);--color-negative-dark:var(--ws-negative-dark);--color-warning:var(--ws-warning-500);--color-warning-hover:var(--ws-warning-hover);--color-warning-text:var(--ws-warning-text);--color-warning-bg:var(--ws-warning-bg);--color-warning-light:var(--ws-warning-light);--color-warning-dark:var(--ws-warning-dark);--color-input-bg:var(--ws-input-bg);--color-input-border:var(--ws-input-border);--color-input-text:var(--ws-input-text);--color-input-placeholder:var(--ws-input-placeholder);--color-input-focus-border:var(--ws-input-focus-border);--color-select-bg:var(--ws-select-bg);--color-select-border:var(--ws-select-border);--color-select-text:var(--ws-select-text);--color-select-list-bg:var(--ws-select-list-bg);--color-input-option-hover-bg:var(--ws-input-option-hover-bg);--color-input-option-active-bg:var(--ws-input-option-active-bg);--color-input-option-active-text:var(--ws-input-option-active-text);--color-input-error-border:var(--ws-input-error-border);--color-input-error-bg:var(--ws-input-error-bg);--color-input-warning-border:var(--ws-input-warning-border);--color-input-warning-bg:var(--ws-input-warning-bg);--color-input-message-bg:var(--ws-input-message-bg);--color-input-message-text:var(--ws-input-message-text);--color-inactive-text:var(--ws-inactive-text);--color-panel-0:var(--ws-panel-0);--color-panel-1:var(--ws-panel-1);--color-panel-2:var(--ws-panel-2);--color-panel-3:var(--ws-panel-3);--color-panel-4:var(--ws-panel-4);--color-tab-bg-default:var(--ws-tab-bg-default);--color-tab-border:var(--ws-tab-border);--color-tab-active-bg:var(--ws-tab-active-bg);--color-tab-active-fg:var(--ws-tab-active-fg);--color-tab-inactive-bg:var(--ws-tab-inactive-bg);--color-tab-inactive-fg:var(--ws-tab-inactive-fg);--color-panel-border:var(--ws-panel-border)}.pointer-events-auto:not(#\\#){pointer-events:auto}.pointer-events-none:not(#\\#){pointer-events:none}.visible:not(#\\#){visibility:visible}.sr-only:not(#\\#){clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute:not(#\\#){position:absolute}.fixed:not(#\\#){position:fixed}.relative:not(#\\#){position:relative}.static:not(#\\#){position:static}.inset-0:not(#\\#){inset:calc(var(--spacing)*0)}.-top-1\\/5:not(#\\#){top:-20%}.top-0:not(#\\#){top:calc(var(--spacing)*0)}.top-1:not(#\\#){top:calc(var(--spacing)*1)}.top-full:not(#\\#){top:100%}.-right-12:not(#\\#){right:calc(var(--spacing)*-12)}.right-0:not(#\\#){right:calc(var(--spacing)*0)}.right-1:not(#\\#){right:calc(var(--spacing)*1)}.bottom-0:not(#\\#){bottom:calc(var(--spacing)*0)}.bottom-full:not(#\\#){bottom:100%}.left-0:not(#\\#){left:calc(var(--spacing)*0)}.left-0\\.5:not(#\\#){left:calc(var(--spacing)*.5)}.left-1\\/2:not(#\\#){left:50%}.left-3\\.5:not(#\\#){left:calc(var(--spacing)*3.5)}.left-4:not(#\\#){left:calc(var(--spacing)*4)}.left-4\\.5:not(#\\#){left:calc(var(--spacing)*4.5)}.left-5\\.5:not(#\\#){left:calc(var(--spacing)*5.5)}.left-full:not(#\\#){left:100%}.z-1:not(#\\#){z-index:1}.z-2:not(#\\#){z-index:2}.z-10:not(#\\#){z-index:10}.z-40:not(#\\#){z-index:40}.z-50:not(#\\#){z-index:50}.z-60:not(#\\#){z-index:60}.z-9999:not(#\\#){z-index:9999}.container:not(#\\#){width:100%}@media(min-width:40rem){.container:not(#\\#){max-width:40rem}}@media(min-width:48rem){.container:not(#\\#){max-width:48rem}}@media(min-width:64rem){.container:not(#\\#){max-width:64rem}}@media(min-width:80rem){.container:not(#\\#){max-width:80rem}}@media(min-width:96rem){.container:not(#\\#){max-width:96rem}}.m-0:not(#\\#){margin:calc(var(--spacing)*0)}.m-0\\.5:not(#\\#){margin:calc(var(--spacing)*.5)}.m-px:not(#\\#){margin:1px}.mx-1:not(#\\#){margin-inline:calc(var(--spacing)*1)}.-my-1:not(#\\#){margin-block:calc(var(--spacing)*-1)}.my-1:not(#\\#){margin-block:calc(var(--spacing)*1)}.mt-1:not(#\\#){margin-top:calc(var(--spacing)*1)}.mt-2:not(#\\#){margin-top:calc(var(--spacing)*2)}.mt-4:not(#\\#){margin-top:calc(var(--spacing)*4)}.mt-8:not(#\\#){margin-top:calc(var(--spacing)*8)}.mr-1:not(#\\#){margin-right:calc(var(--spacing)*1)}.mr-2:not(#\\#){margin-right:calc(var(--spacing)*2)}.mb-1:not(#\\#){margin-bottom:calc(var(--spacing)*1)}.mb-2:not(#\\#){margin-bottom:calc(var(--spacing)*2)}.mb-4:not(#\\#){margin-bottom:calc(var(--spacing)*4)}.ml-1:not(#\\#){margin-left:calc(var(--spacing)*1)}.ml-1\\.5:not(#\\#){margin-left:calc(var(--spacing)*1.5)}.ml-2:not(#\\#){margin-left:calc(var(--spacing)*2)}.box-border:not(#\\#){box-sizing:border-box}.flex:not(#\\#){display:flex}.grid:not(#\\#){display:grid}.hidden:not(#\\#){display:none}.inline:not(#\\#){display:inline}.inline-block:not(#\\#){display:inline-block}.inline-flex:not(#\\#){display:inline-flex}.table:not(#\\#){display:table}.size-1\\.5:not(#\\#){width:calc(var(--spacing)*1.5);height:calc(var(--spacing)*1.5)}.size-1\\.75:not(#\\#){width:calc(var(--spacing)*1.75);height:calc(var(--spacing)*1.75)}.size-2:not(#\\#){width:calc(var(--spacing)*2);height:calc(var(--spacing)*2)}.size-2\\.5:not(#\\#){width:calc(var(--spacing)*2.5);height:calc(var(--spacing)*2.5)}.size-3:not(#\\#){width:calc(var(--spacing)*3);height:calc(var(--spacing)*3)}.size-3\\.5:not(#\\#){width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.size-3\\.25:not(#\\#){width:calc(var(--spacing)*3.25);height:calc(var(--spacing)*3.25)}.size-4:not(#\\#){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-5:not(#\\#){width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6:not(#\\#){width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.size-fit:not(#\\#){width:fit-content;height:fit-content}.h-2:not(#\\#){height:calc(var(--spacing)*2)}.h-3:not(#\\#){height:calc(var(--spacing)*3)}.h-3\\.5:not(#\\#){height:calc(var(--spacing)*3.5)}.h-4:not(#\\#){height:calc(var(--spacing)*4)}.h-4\\.5:not(#\\#){height:calc(var(--spacing)*4.5)}.h-5:not(#\\#){height:calc(var(--spacing)*5)}.h-5\\.5:not(#\\#){height:calc(var(--spacing)*5.5)}.h-6:not(#\\#){height:calc(var(--spacing)*6)}.h-7:not(#\\#){height:calc(var(--spacing)*7)}.h-7\\.5:not(#\\#){height:calc(var(--spacing)*7.5)}.h-8:not(#\\#){height:calc(var(--spacing)*8)}.h-10:not(#\\#){height:calc(var(--spacing)*10)}.h-14:not(#\\#){height:calc(var(--spacing)*14)}.h-20:not(#\\#){height:calc(var(--spacing)*20)}.h-100:not(#\\#){height:calc(var(--spacing)*100)}.h-fit:not(#\\#){height:fit-content}.h-full:not(#\\#){height:100%}.max-h-\\[400px\\]:not(#\\#){max-height:400px}.max-h-full:not(#\\#){max-height:100%}.min-h-5:not(#\\#){min-height:calc(var(--spacing)*5)}.min-h-6:not(#\\#){min-height:var(--min-height-6)}.min-h-7:not(#\\#){min-height:calc(var(--spacing)*7)}.min-h-\\[100px\\]:not(#\\#){min-height:100px}.min-h-fit:not(#\\#){min-height:fit-content}.min-h-screen:not(#\\#){min-height:100vh}.w-0\\.5:not(#\\#){width:calc(var(--spacing)*.5)}.w-1\\/2:not(#\\#){width:50%}.w-3:not(#\\#){width:calc(var(--spacing)*3)}.w-3\\.5:not(#\\#){width:calc(var(--spacing)*3.5)}.w-4:not(#\\#){width:calc(var(--spacing)*4)}.w-5:not(#\\#){width:calc(var(--spacing)*5)}.w-6:not(#\\#){width:calc(var(--spacing)*6)}.w-7:not(#\\#){width:calc(var(--spacing)*7)}.w-8:not(#\\#){width:calc(var(--spacing)*8)}.w-9:not(#\\#){width:calc(var(--spacing)*9)}.w-11:not(#\\#){width:calc(var(--spacing)*11)}.w-16:not(#\\#){width:calc(var(--spacing)*16)}.w-20:not(#\\#){width:calc(var(--spacing)*20)}.w-32:not(#\\#){width:calc(var(--spacing)*32)}.w-48:not(#\\#){width:calc(var(--spacing)*48)}.w-52:not(#\\#){width:calc(var(--spacing)*52)}.w-60:not(#\\#){width:calc(var(--spacing)*60)}.w-64:not(#\\#){width:calc(var(--spacing)*64)}.w-80:not(#\\#){width:calc(var(--spacing)*80)}.w-96:not(#\\#){width:calc(var(--spacing)*96)}.w-auto:not(#\\#){width:auto}.w-fit:not(#\\#){width:fit-content}.w-full:not(#\\#){width:100%}.w-px:not(#\\#){width:1px}.max-w-100:not(#\\#){max-width:calc(var(--spacing)*100)}.max-w-\\[300px\\]:not(#\\#){max-width:300px}.max-w-md:not(#\\#){max-width:var(--container-md)}.min-w-0:not(#\\#){min-width:calc(var(--spacing)*0)}.min-w-3\\.5:not(#\\#){min-width:calc(var(--spacing)*3.5)}.min-w-4\\.5:not(#\\#){min-width:calc(var(--spacing)*4.5)}.min-w-5:not(#\\#){min-width:calc(var(--spacing)*5)}.min-w-7\\.5:not(#\\#){min-width:calc(var(--spacing)*7.5)}.min-w-50:not(#\\#){min-width:calc(var(--spacing)*50)}.min-w-\\[150px\\]:not(#\\#){min-width:150px}.min-w-fit:not(#\\#){min-width:fit-content}.min-w-full:not(#\\#){min-width:100%}.flex-1:not(#\\#){flex:1}.flex-3:not(#\\#){flex:3}.flex-none:not(#\\#){flex:none}.shrink-0:not(#\\#){flex-shrink:0}.origin-top-right:not(#\\#){transform-origin:100% 0}.-translate-x-1\\/2:not(#\\#){--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-full:not(#\\#){--tw-translate-x:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0:not(#\\#){--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-full:not(#\\#){--tw-translate-x:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-full:not(#\\#){--tw-translate-y:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0:not(#\\#){--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-1\\/2:not(#\\#){--tw-translate-y: 50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-full:not(#\\#){--tw-translate-y:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-0:not(#\\#){--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-95:not(#\\#){--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100:not(#\\#){--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-110:not(#\\#){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.-rotate-45:not(#\\#){rotate:-45deg}.rotate-45:not(#\\#){rotate:45deg}.rotate-90:not(#\\#){rotate:90deg}.rotate-180:not(#\\#){rotate:180deg}.transform:not(#\\#){transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-bounce:not(#\\#){animation:var(--animate-bounce)}.cursor-auto:not(#\\#){cursor:auto}.cursor-not-allowed:not(#\\#){cursor:not-allowed}.cursor-pointer:not(#\\#){cursor:pointer}.cursor-se-resize:not(#\\#){cursor:se-resize}.resize:not(#\\#){resize:both}.resize-none:not(#\\#){resize:none}.list-disc:not(#\\#){list-style-type:disc}.appearance-none:not(#\\#){-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-2:not(#\\#){grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3:not(#\\#){grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col:not(#\\#){flex-direction:column}.flex-row:not(#\\#){flex-direction:row}.flex-wrap:not(#\\#){flex-wrap:wrap}.place-content-center:not(#\\#){place-content:center}.place-items-center:not(#\\#){place-items:center}.content-center:not(#\\#){align-content:center}.items-center:not(#\\#){align-items:center}.items-end:not(#\\#){align-items:flex-end}.items-start:not(#\\#){align-items:flex-start}.justify-around:not(#\\#){justify-content:space-around}.justify-between:not(#\\#){justify-content:space-between}.justify-center:not(#\\#){justify-content:center}.gap-0\\.5:not(#\\#){gap:calc(var(--spacing)*.5)}.gap-1:not(#\\#){gap:calc(var(--spacing)*1)}.gap-1\\.5:not(#\\#){gap:calc(var(--spacing)*1.5)}.gap-2:not(#\\#){gap:calc(var(--spacing)*2)}.gap-2\\.5:not(#\\#){gap:calc(var(--spacing)*2.5)}.gap-3:not(#\\#){gap:calc(var(--spacing)*3)}.gap-4:not(#\\#){gap:calc(var(--spacing)*4)}.gap-6:not(#\\#){gap:calc(var(--spacing)*6)}.gap-8:not(#\\#){gap:calc(var(--spacing)*8)}.gap-10:not(#\\#){gap:calc(var(--spacing)*10)}.gap-14:not(#\\#){gap:calc(var(--spacing)*14)}:where(.space-y-1>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-1:not(#\\#){column-gap:calc(var(--spacing)*1)}.gap-x-2:not(#\\#){column-gap:calc(var(--spacing)*2)}.gap-x-3:not(#\\#){column-gap:calc(var(--spacing)*3)}.gap-x-4:not(#\\#){column-gap:calc(var(--spacing)*4)}.gap-x-20:not(#\\#){column-gap:calc(var(--spacing)*20)}:where(.space-x-4>:not(:last-child)):not(#\\#){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}.truncate:not(#\\#){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden:not(#\\#){overflow:hidden}.overflow-y-auto:not(#\\#){overflow-y:auto}.rounded:not(#\\#){border-radius:.25rem}.rounded-full:not(#\\#){border-radius:3.40282e38px}.rounded-lg:not(#\\#){border-radius:var(--radius-lg)}.rounded-md:not(#\\#){border-radius:var(--radius-md)}.rounded-xs:not(#\\#){border-radius:var(--radius-xs)}.rounded-t:not(#\\#){border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-none:not(#\\#){border-top-left-radius:0;border-top-right-radius:0}.rounded-b-none:not(#\\#){border-bottom-right-radius:0;border-bottom-left-radius:0}.border:not(#\\#){border-style:var(--tw-border-style);border-width:1px}.border-0:not(#\\#){border-style:var(--tw-border-style);border-width:0}.border-2:not(#\\#){border-style:var(--tw-border-style);border-width:2px}.border-t:not(#\\#){border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-0:not(#\\#){border-top-style:var(--tw-border-style);border-top-width:0}.border-r:not(#\\#){border-right-style:var(--tw-border-style);border-right-width:1px}.border-b:not(#\\#){border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0:not(#\\#){border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-dashed:not(#\\#){--tw-border-style:dashed;border-style:dashed}.border-body:not(#\\#){border-color:var(--color-body)}.border-body-light:not(#\\#){border-color:var(--color-body-light)}.border-canvas-default:not(#\\#){border-color:var(--color-canvas-default)}.border-card-border:not(#\\#){border-color:var(--color-card-border)}.border-grey-100:not(#\\#){border-color:var(--color-grey-100)}.border-grey-200:not(#\\#){border-color:var(--color-grey-200)}.border-input-border:not(#\\#){border-color:var(--color-input-border)}.border-input-error-border:not(#\\#){border-color:var(--color-input-error-border)}.border-input-focus-border:not(#\\#){border-color:var(--color-input-focus-border)}.border-input-warning-border:not(#\\#){border-color:var(--color-input-warning-border)}.border-negative:not(#\\#){border-color:var(--color-negative)}.border-negative-400:not(#\\#){border-color:var(--color-negative-400)}.border-negative-500:not(#\\#){border-color:var(--color-negative-500)}.border-neutral:not(#\\#){border-color:var(--color-neutral)}.border-panel:not(#\\#){border-color:var(--color-panel)}.border-panel-border:not(#\\#){border-color:var(--color-panel-border)}.border-panel-subtle:not(#\\#){border-color:var(--color-panel-subtle)}.border-positive:not(#\\#){border-color:var(--color-positive)}.border-positive-500:not(#\\#){border-color:var(--color-positive-500)}.border-positive-text:not(#\\#){border-color:var(--color-positive-text)}.border-primary:not(#\\#){border-color:var(--color-primary)}.border-primary-700:not(#\\#){border-color:var(--color-primary-700)}.border-primary-hover:not(#\\#){border-color:var(--color-primary-hover)}.border-select-border:not(#\\#){border-color:var(--color-select-border)}.border-tab-border:not(#\\#){border-color:var(--color-tab-border)}.border-transparent:not(#\\#){border-color:#0000}.border-warning:not(#\\#){border-color:var(--color-warning)}.border-warning-500:not(#\\#){border-color:var(--color-warning-500)}.border-warning-bg:not(#\\#){border-color:var(--color-warning-bg)}.border-white:not(#\\#){border-color:var(--color-white)}.bg-blue-500:not(#\\#){background-color:var(--color-blue-500)}.bg-body:not(#\\#){background-color:var(--color-body)}.bg-body-bg:not(#\\#){background-color:var(--color-body-bg)}.bg-canvas-default:not(#\\#){background-color:var(--color-canvas-default)}.bg-canvas-subtle:not(#\\#){background-color:var(--color-canvas-subtle)}.bg-card:not(#\\#){background-color:var(--color-card)}.bg-grey-50:not(#\\#){background-color:var(--color-grey-50)}.bg-grey-200:not(#\\#){background-color:var(--color-grey-200)}.bg-grey-300:not(#\\#){background-color:var(--color-grey-300)}.bg-grey-400:not(#\\#){background-color:var(--color-grey-400)}.bg-grey-500:not(#\\#){background-color:var(--color-grey-500)}.bg-grey-600:not(#\\#){background-color:var(--color-grey-600)}.bg-grey-700:not(#\\#){background-color:var(--color-grey-700)}.bg-grey-800:not(#\\#){background-color:var(--color-grey-800)}.bg-input-bg:not(#\\#){background-color:var(--color-input-bg)}.bg-input-border:not(#\\#){background-color:var(--color-input-border)}.bg-input-error-bg:not(#\\#){background-color:var(--color-input-error-bg)}.bg-input-message-bg:not(#\\#){background-color:var(--color-input-message-bg)}.bg-input-option-active-bg:not(#\\#){background-color:var(--color-input-option-active-bg)}.bg-input-option-hover-bg:not(#\\#){background-color:var(--color-input-option-hover-bg)}.bg-input-warning-bg:not(#\\#){background-color:var(--color-input-warning-bg)}.bg-negative:not(#\\#){background-color:var(--color-negative)}.bg-negative-400:not(#\\#){background-color:var(--color-negative-400)}.bg-negative-500:not(#\\#){background-color:var(--color-negative-500)}.bg-negative-bg:not(#\\#){background-color:var(--color-negative-bg)}.bg-negative-hover:not(#\\#){background-color:var(--color-negative-hover)}.bg-negative-light:not(#\\#){background-color:var(--color-negative-light)}.bg-panel:not(#\\#){background-color:var(--color-panel)}.bg-panel-0:not(#\\#){background-color:var(--color-panel-0)}.bg-panel-1:not(#\\#){background-color:var(--color-panel-1)}.bg-panel-2:not(#\\#){background-color:var(--color-panel-2)}.bg-panel-3:not(#\\#){background-color:var(--color-panel-3)}.bg-panel-4:not(#\\#){background-color:var(--color-panel-4)}.bg-panel-subtle:not(#\\#){background-color:var(--color-panel-subtle)}.bg-positive:not(#\\#){background-color:var(--color-positive)}.bg-positive-200:not(#\\#){background-color:var(--color-positive-200)}.bg-positive-500:not(#\\#){background-color:var(--color-positive-500)}.bg-positive-bg:not(#\\#){background-color:var(--color-positive-bg)}.bg-positive-hover:not(#\\#){background-color:var(--color-positive-hover)}.bg-positive-light:not(#\\#){background-color:var(--color-positive-light)}.bg-primary:not(#\\#){background-color:var(--color-primary)}.bg-primary-500:not(#\\#){background-color:var(--color-primary-500)}.bg-primary-600:not(#\\#){background-color:var(--color-primary-600)}.bg-primary-hover:not(#\\#){background-color:var(--color-primary-hover)}.bg-primary-light:not(#\\#){background-color:var(--color-primary-light)}.bg-primary\\/30:not(#\\#){background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/30:not(#\\#){background-color:color-mix(in oklab,var(--color-primary)30%,transparent)}}.bg-select-bg:not(#\\#){background-color:var(--color-select-bg)}.bg-select-list-bg:not(#\\#){background-color:var(--color-select-list-bg)}.bg-tab-active-bg:not(#\\#){background-color:var(--color-tab-active-bg)}.bg-tab-bg-default:not(#\\#){background-color:var(--color-tab-bg-default)}.bg-tab-inactive-bg:not(#\\#){background-color:var(--color-tab-inactive-bg)}.bg-transparent:not(#\\#){background-color:#0000}.bg-warning:not(#\\#){background-color:var(--color-warning)}.bg-warning-500:not(#\\#){background-color:var(--color-warning-500)}.bg-warning-bg:not(#\\#){background-color:var(--color-warning-bg)}.bg-warning-hover:not(#\\#){background-color:var(--color-warning-hover)}.bg-warning-light:not(#\\#){background-color:var(--color-warning-light)}.bg-white:not(#\\#){background-color:var(--color-white)}.bg-linear-to-r:not(#\\#){--tw-gradient-position:to right}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-r:not(#\\#){--tw-gradient-position:to right in oklab}}.bg-linear-to-r:not(#\\#){background-image:linear-gradient(var(--tw-gradient-stops))}.from-green-500:not(#\\#){--tw-gradient-from:var(--color-green-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-primary:not(#\\#){--tw-gradient-from:var(--color-primary);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-blue-500:not(#\\#){--tw-gradient-to:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-pink-500:not(#\\#){--tw-gradient-to:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.stroke-current:not(#\\#){stroke:currentColor}.p-0:not(#\\#){padding:calc(var(--spacing)*0)}.p-0\\.5:not(#\\#){padding:calc(var(--spacing)*.5)}.p-1:not(#\\#){padding:calc(var(--spacing)*1)}.p-1\\!{padding:calc(var(--spacing)*1)!important}.p-1\\.5:not(#\\#){padding:calc(var(--spacing)*1.5)}.p-2:not(#\\#){padding:calc(var(--spacing)*2)}.p-2\\.5:not(#\\#){padding:calc(var(--spacing)*2.5)}.p-3:not(#\\#){padding:calc(var(--spacing)*3)}.p-4:not(#\\#){padding:calc(var(--spacing)*4)}.p-6:not(#\\#){padding:calc(var(--spacing)*6)}.p-8:not(#\\#){padding:calc(var(--spacing)*8)}.p-10:not(#\\#){padding:calc(var(--spacing)*10)}.p-50:not(#\\#){padding:calc(var(--spacing)*50)}.p-px:not(#\\#){padding:1px}.px-0\\.5:not(#\\#){padding-inline:calc(var(--spacing)*.5)}.px-1:not(#\\#){padding-inline:calc(var(--spacing)*1)}.px-1\\.5:not(#\\#){padding-inline:calc(var(--spacing)*1.5)}.px-2:not(#\\#){padding-inline:calc(var(--spacing)*2)}.px-3:not(#\\#){padding-inline:calc(var(--spacing)*3)}.px-4:not(#\\#){padding-inline:calc(var(--spacing)*4)}.px-6:not(#\\#){padding-inline:calc(var(--spacing)*6)}.px-7:not(#\\#){padding-inline:calc(var(--spacing)*7)}.px-8:not(#\\#){padding-inline:calc(var(--spacing)*8)}.py-0\\.5:not(#\\#){padding-block:calc(var(--spacing)*.5)}.py-1:not(#\\#){padding-block:calc(var(--spacing)*1)}.py-1\\.5:not(#\\#){padding-block:calc(var(--spacing)*1.5)}.py-2:not(#\\#){padding-block:calc(var(--spacing)*2)}.py-3:not(#\\#){padding-block:calc(var(--spacing)*3)}.pt-0\\.5:not(#\\#){padding-top:calc(var(--spacing)*.5)}.pt-1:not(#\\#){padding-top:calc(var(--spacing)*1)}.pt-1\\.5:not(#\\#){padding-top:calc(var(--spacing)*1.5)}.pt-2:not(#\\#){padding-top:calc(var(--spacing)*2)}.pl-1:not(#\\#){padding-left:calc(var(--spacing)*1)}.pl-4:not(#\\#){padding-left:calc(var(--spacing)*4)}.text-center:not(#\\#){text-align:center}.text-left:not(#\\#){text-align:left}.text-2xl:not(#\\#){font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl:not(#\\#){font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl:not(#\\#){font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-5xl:not(#\\#){font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-6xl:not(#\\#){font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-7xl:not(#\\#){font-size:var(--text-7xl);line-height:var(--tw-leading,var(--text-7xl--line-height))}.text-8xl:not(#\\#){font-size:var(--text-8xl);line-height:var(--tw-leading,var(--text-8xl--line-height))}.text-9xl:not(#\\#){font-size:var(--text-9xl);line-height:var(--tw-leading,var(--text-9xl--line-height))}.text-base:not(#\\#){font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg:not(#\\#){font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm:not(#\\#){font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl:not(#\\#){font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs:not(#\\#){font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-s:not(#\\#){font-size:var(--text-s)}.text-xxs:not(#\\#){font-size:var(--text-xxs)}.leading-3:not(#\\#){--tw-leading:calc(var(--spacing)*3);line-height:calc(var(--spacing)*3)}.leading-4:not(#\\#){--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.leading-5:not(#\\#){--tw-leading:calc(var(--spacing)*5);line-height:calc(var(--spacing)*5)}.leading-none:not(#\\#){--tw-leading:1;line-height:1}.font-bold:not(#\\#){--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium:not(#\\#){--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold:not(#\\#){--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.font-thin:not(#\\#){--tw-font-weight:var(--font-weight-thin);font-weight:var(--font-weight-thin)}.whitespace-nowrap:not(#\\#){white-space:nowrap}.text-body:not(#\\#){color:var(--color-body)}.text-button-text:not(#\\#){color:var(--color-button-text)}.text-gray-50:not(#\\#){color:var(--color-gray-50)}.text-gray-400:not(#\\#){color:var(--color-gray-400)}.text-grey-100:not(#\\#){color:var(--color-grey-100)}.text-grey-200:not(#\\#){color:var(--color-grey-200)}.text-grey-300:not(#\\#){color:var(--color-grey-300)}.text-grey-700:not(#\\#){color:var(--color-grey-700)}.text-inactive-text:not(#\\#){color:var(--color-inactive-text)}.text-inherit:not(#\\#){color:inherit}.text-input-message-text:not(#\\#){color:var(--color-input-message-text)}.text-input-option-active-text:not(#\\#){color:var(--color-input-option-active-text)}.text-input-placeholder:not(#\\#){color:var(--color-input-placeholder)}.text-input-text:not(#\\#){color:var(--color-input-text)}.text-muted:not(#\\#){color:var(--color-muted)}.text-negative:not(#\\#){color:var(--color-negative)}.text-negative-500:not(#\\#){color:var(--color-negative-500)}.text-negative-dark:not(#\\#){color:var(--color-negative-dark)}.text-negative-text:not(#\\#){color:var(--color-negative-text)}.text-panel-subtle:not(#\\#){color:var(--color-panel-subtle)}.text-positive:not(#\\#){color:var(--color-positive)}.text-positive-500:not(#\\#){color:var(--color-positive-500)}.text-positive-600:not(#\\#){color:var(--color-positive-600)}.text-positive-dark:not(#\\#){color:var(--color-positive-dark)}.text-positive-text:not(#\\#),.text-positive-text\\/70:not(#\\#){color:var(--color-positive-text)}@supports (color:color-mix(in lab,red,red)){.text-positive-text\\/70:not(#\\#){color:color-mix(in oklab,var(--color-positive-text)70%,transparent)}}.text-primary:not(#\\#){color:var(--color-primary)}.text-primary-dark:not(#\\#){color:var(--color-primary-dark)}.text-primary-hover:not(#\\#){color:var(--color-primary-hover)}.text-select-text:not(#\\#){color:var(--color-select-text)}.text-tab-active-fg:not(#\\#){color:var(--color-tab-active-fg)}.text-tab-inactive-fg:not(#\\#){color:var(--color-tab-inactive-fg)}.text-warning:not(#\\#){color:var(--color-warning)}.text-warning-dark:not(#\\#){color:var(--color-warning-dark)}.text-warning-text:not(#\\#){color:var(--color-warning-text)}.capitalize:not(#\\#){text-transform:capitalize}.italic:not(#\\#){font-style:italic}.decoration-transparent:not(#\\#){text-decoration-color:#0000}.opacity-0:not(#\\#){opacity:0}.opacity-50:not(#\\#){opacity:.5}.opacity-60:not(#\\#){opacity:.6}.opacity-80:not(#\\#){opacity:.8}.opacity-100:not(#\\#){opacity:1}.shadow:not(#\\#){--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner:not(#\\#){--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg:not(#\\#){--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md:not(#\\#){--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs:not(#\\#){--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0:not(#\\#){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1:not(#\\#){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-input-error-border:not(#\\#){--tw-ring-color:var(--color-input-error-border)}.ring-input-focus-border:not(#\\#){--tw-ring-color:var(--color-input-focus-border)}.ring-input-warning-border:not(#\\#){--tw-ring-color:var(--color-input-warning-border)}.ring-positive:not(#\\#){--tw-ring-color:var(--color-positive)}.outline-hidden:not(#\\#){--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.outline-hidden:not(#\\#){outline-offset:2px;outline:2px solid #0000}}.outline:not(#\\#),.outline-1:not(#\\#){outline-style:var(--tw-outline-style);outline-width:1px}.outline-canvas-default:not(#\\#){outline-color:var(--color-canvas-default)}.outline-primary:not(#\\#){outline-color:var(--color-primary)}.blur:not(#\\#){--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,)}.filter:not(#\\#){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:not(#\\#){transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all:not(#\\#){transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors:not(#\\#){transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform:not(#\\#){transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150:not(#\\#){--tw-duration:.15s;transition-duration:.15s}.duration-200:not(#\\#){--tw-duration:.2s;transition-duration:.2s}.duration-300:not(#\\#){--tw-duration:.3s;transition-duration:.3s}.ease-in-out:not(#\\#){--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out:not(#\\#){--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-solid:not(#\\#){--tw-outline-style:solid;outline-style:solid}.select-none:not(#\\#){-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:flex:is(:where(.group):hover *):not(#\\#){display:flex}.group-hover\\:grid:is(:where(.group):hover *):not(#\\#){display:grid}.group-hover\\:border-body:is(:where(.group):hover *):not(#\\#){border-color:var(--color-body)}.group-hover\\:border-negative-text:is(:where(.group):hover *):not(#\\#){border-color:var(--color-negative-text)}.group-hover\\:border-positive-text:is(:where(.group):hover *):not(#\\#){border-color:var(--color-positive-text)}.group-hover\\:border-warning-text:is(:where(.group):hover *):not(#\\#){border-color:var(--color-warning-text)}.group-hover\\:bg-grey-400:is(:where(.group):hover *):not(#\\#){background-color:var(--color-grey-400)}.group-hover\\:bg-negative-hover:is(:where(.group):hover *):not(#\\#){background-color:var(--color-negative-hover)}.group-hover\\:bg-negative-light:is(:where(.group):hover *):not(#\\#){background-color:var(--color-negative-light)}.group-hover\\:bg-positive-hover:is(:where(.group):hover *):not(#\\#){background-color:var(--color-positive-hover)}.group-hover\\:bg-positive-light:is(:where(.group):hover *):not(#\\#){background-color:var(--color-positive-light)}.group-hover\\:bg-primary-hover:is(:where(.group):hover *):not(#\\#){background-color:var(--color-primary-hover)}.group-hover\\:bg-primary-light:is(:where(.group):hover *):not(#\\#){background-color:var(--color-primary-light)}.group-hover\\:bg-warning-hover:is(:where(.group):hover *):not(#\\#){background-color:var(--color-warning-hover)}.group-hover\\:bg-warning-light:is(:where(.group):hover *):not(#\\#){background-color:var(--color-warning-light)}.group-hover\\:opacity-100:is(:where(.group):hover *):not(#\\#){opacity:1}}.placeholder\\:text-input-placeholder:not(#\\#)::placeholder{color:var(--color-input-placeholder)}.placeholder\\:opacity-60:not(#\\#)::placeholder{opacity:.6}.first\\:-ml-1\\.5:first-child:not(#\\#){margin-left:calc(var(--spacing)*-1.5)}.first\\:rounded-t:first-child:not(#\\#){border-top-left-radius:.25rem;border-top-right-radius:.25rem}.first\\:rounded-l:first-child:not(#\\#){border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.last\\:-mr-1\\.5:last-child:not(#\\#){margin-right:calc(var(--spacing)*-1.5)}.last\\:rounded-r:last-child:not(#\\#){border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.last\\:rounded-b:last-child:not(#\\#){border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.only\\:-mx-0\\.5:only-child:not(#\\#){margin-inline:calc(var(--spacing)*-.5)}.only\\:rounded:only-child:not(#\\#){border-radius:.25rem}.focus-within\\:border-input-error-border:focus-within:not(#\\#){border-color:var(--color-input-error-border)}.focus-within\\:border-input-focus-border:focus-within:not(#\\#){border-color:var(--color-input-focus-border)}.focus-within\\:border-input-warning-border:focus-within:not(#\\#){border-color:var(--color-input-warning-border)}.focus-within\\:border-positive:focus-within:not(#\\#){border-color:var(--color-positive)}@media(hover:hover){.hover\\:border-black:hover:not(#\\#){border-color:var(--color-black)}.hover\\:border-canvas-subtle:hover:not(#\\#){border-color:var(--color-canvas-subtle)}.hover\\:border-negative-hover:hover:not(#\\#){border-color:var(--color-negative-hover)}.hover\\:border-positive-hover:hover:not(#\\#){border-color:var(--color-positive-hover)}.hover\\:border-primary-hover:hover:not(#\\#){border-color:var(--color-primary-hover)}.hover\\:border-warning-hover:hover:not(#\\#){border-color:var(--color-warning-hover)}.hover\\:bg-canvas-subtle:hover:not(#\\#){background-color:var(--color-canvas-subtle)}.hover\\:bg-grey-500:hover:not(#\\#){background-color:var(--color-grey-500)}.hover\\:bg-grey-700:hover:not(#\\#){background-color:var(--color-grey-700)}.hover\\:bg-input-option-hover-bg:hover:not(#\\#){background-color:var(--color-input-option-hover-bg)}.hover\\:bg-negative:hover:not(#\\#){background-color:var(--color-negative)}.hover\\:bg-negative-600:hover:not(#\\#){background-color:var(--color-negative-600)}.hover\\:bg-negative-hover:hover:not(#\\#){background-color:var(--color-negative-hover)}.hover\\:bg-positive:hover:not(#\\#){background-color:var(--color-positive)}.hover\\:bg-positive-600:hover:not(#\\#){background-color:var(--color-positive-600)}.hover\\:bg-positive-hover:hover:not(#\\#){background-color:var(--color-positive-hover)}.hover\\:bg-primary-600:hover:not(#\\#){background-color:var(--color-primary-600)}.hover\\:bg-primary-hover:hover:not(#\\#){background-color:var(--color-primary-hover)}.hover\\:bg-primary\\/20:hover:not(#\\#){background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/20:hover:not(#\\#){background-color:color-mix(in oklab,var(--color-primary)20%,transparent)}}.hover\\:bg-transparent:hover:not(#\\#){background-color:#0000}.hover\\:bg-warning:hover:not(#\\#){background-color:var(--color-warning)}.hover\\:bg-warning-600:hover:not(#\\#){background-color:var(--color-warning-600)}.hover\\:bg-warning-hover:hover:not(#\\#){background-color:var(--color-warning-hover)}.hover\\:text-body:hover:not(#\\#){color:var(--color-body)}.hover\\:text-button-text:hover:not(#\\#){color:var(--color-button-text)}.hover\\:text-gray-50:hover:not(#\\#){color:var(--color-gray-50)}.hover\\:text-grey-200:hover:not(#\\#){color:var(--color-grey-200)}.hover\\:text-negative-400:hover:not(#\\#){color:var(--color-negative-400)}.hover\\:text-negative-hover:hover:not(#\\#){color:var(--color-negative-hover)}.hover\\:text-positive-400:hover:not(#\\#){color:var(--color-positive-400)}.hover\\:text-positive-hover:hover:not(#\\#){color:var(--color-positive-hover)}.hover\\:text-positive-text:hover:not(#\\#){color:var(--color-positive-text)}.hover\\:text-primary-hover:hover:not(#\\#){color:var(--color-primary-hover)}.hover\\:text-tab-active-fg:hover:not(#\\#){color:var(--color-tab-active-fg)}.hover\\:text-warning-hover:hover:not(#\\#){color:var(--color-warning-hover)}.hover\\:decoration-current:hover:not(#\\#){text-decoration-color:currentColor}}.focus\\:bg-transparent:focus:not(#\\#){background-color:#0000}.focus\\:ring-2:focus:not(#\\#){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-negative:focus:not(#\\#){--tw-ring-color:var(--color-negative)}.focus\\:ring-positive:focus:not(#\\#){--tw-ring-color:var(--color-positive)}.focus\\:ring-primary:focus:not(#\\#){--tw-ring-color:var(--color-primary)}.focus\\:ring-warning:focus:not(#\\#){--tw-ring-color:var(--color-warning)}.focus\\:ring-offset-0:focus:not(#\\#){--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:ring-offset-2:focus:not(#\\#){--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:outline-hidden:focus:not(#\\#){--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\\:outline-hidden:focus:not(#\\#){outline-offset:2px;outline:2px solid #0000}}.focus-visible\\:ring-2:focus-visible:not(#\\#){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-primary:focus-visible:not(#\\#){--tw-ring-color:var(--color-primary)}.focus-visible\\:ring-offset-2:focus-visible:not(#\\#){--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}:root:not(#\\#){--ws-primary-50:#f2ddff;--ws-primary-100:#edd0ff;--ws-primary-300:#d0acef;--ws-primary-400:#c190ea;--ws-primary-600:#935ebf;--ws-primary-800:#563374;--ws-primary-900:#381e4f;--ws-primary-950:#29133c;--ws-positive-50:#ecf9f2;--ws-positive-100:#d9f2e6;--ws-positive-300:#8ed9b3;--ws-positive-400:#68cd99;--ws-positive-700:#28734d;--ws-positive-800:#28734d;--ws-positive-900:#0d261a;--ws-positive-950:#07130d;--ws-warning-50:#fff7e6;--ws-warning-100:#ffefcc;--ws-warning-300:#fed066;--ws-warning-400:#fdc133;--ws-warning-700:#986a00;--ws-warning-800:#654700;--ws-warning-900:#332300;--ws-warning-950:#191200;--ws-negative-50:#feeeee;--ws-negative-100:#fcdcdc;--ws-negative-300:#f69797;--ws-negative-400:#f37575;--ws-negative-700:#9a3232;--ws-negative-800:#6e2222;--ws-negative-900:#431212;--ws-negative-950:#2e0a0a;--ws-grey-300:#535353;--ws-grey-400:#484848;--ws-grey-600:#3f3f3f;--ws-palette-primary-200:#e0c7f5;--ws-palette-primary-500:#b174e5;--ws-palette-primary-700:#75499a;--ws-button-bg:var(--vscode-button-background,var(--theia-button-background,var(--ws-palette-primary-500)));--ws-button-fg:var(--vscode-button-foreground,var(--theia-button-foreground,var(--ws-palette-white)));--ws-primary-default:var(--ws-button-bg);--ws-button-text:var(--ws-button-fg);--ws-primary-hover:var(--vscode-button-hoverBackground,var(--theia-button-hoverBackground,var(--ws-palette-primary-700)));--ws-primary-light:var(--vscode-editorInfo-foreground,var(--theia-button-hoverBackground,var(--ws-palette-primary-200)));--ws-primary-dark:var(--vscode-editor-lineHighlightBackground,var(--theia-button-hoverBackground,var(--ws-palette-primary-700)));--ws-primary-200:var(--ws-primary-light);--ws-primary-500:var(--ws-primary-default);--ws-primary-700:var(--ws-primary-hover);--ws-palette-positive-200:#b3e6cc;--ws-palette-positive-500:#42c080;--ws-palette-positive-600:#359a66;--ws-positive-dark:var(--vscode-gitDecoration-addedResourceForeground,var(--ws-palette-positive-600));--ws-positive-hover:var(--ws-positive-dark);--ws-positive-bg:var(--ws-palette-positive-100);--ws-positive-light:var(--ws-palette-positive-200);--ws-positive-border:var(--ws-positive-500);--ws-positive-text:var(--ws-positive-500);--ws-positive-500:var(--vscode-testing-iconPassed,var(--ws-palette-positive-500));--ws-positive-200:var(--ws-positive-light);--ws-positive-600:var(--ws-positive-dark);--ws-palette-warning-200:#fee099;--ws-palette-warning-500:#fdb100;--ws-palette-warning-600:#ca8e00;--ws-warning-hover:var(--ws-warning-600);--ws-warning-text:var(--ws-warning-500);--ws-warning-border:var(--ws-warning-500);--ws-warning-500:var(--vscode-list-warningForeground,var(--ws-palette-warning-500));--ws-warning-bg:var(--vscode-inputValidation-warningBackground,var(--ws-palette-warning-500));--ws-warning-light:var(--vscode-inputValidation-warningBackground,var(--ws-palette-warning-200));--ws-warning-dark:var(--vscode-inputValidation-warningBackground,var(--ws-palette-warning-600));--ws-warning-200:var(--ws-warning-light);--ws-warning-600:var(--ws-warning-dark);--ws-palette-negative-200:#f9baba;--ws-palette-negative-500:#f05252;--ws-palette-negative-600:#c54242;--ws-negative-hover:var(--ws-negative-600);--ws-negative-text:var(--ws-negative-500);--ws-negative-500:var(--vscode-errorForeground,var(--ws-palette-negative-500));--ws-negative-light:var(--vscode-inputValidation-errorBackground,var(--ws-palette-negative-200));--ws-negative-dark:var(--vscode-inputValidation-errorBackground,var(--ws-palette-negative-600));--ws-negative-200:var(--ws-negative-light);--ws-negative-600:var(--ws-negative-dark);--ws-palette-white:#fff;--ws-palette-grey-50:#f1f5f9;--ws-palette-grey-100:#ccc;--ws-palette-grey-200:#888;--ws-palette-grey-300:#535353;--ws-palette-grey-400:#484848;--ws-palette-grey-500:#444;--ws-palette-grey-600:#3f3f3f;--ws-palette-grey-700:#393939;--ws-palette-grey-800:#383838;--ws-palette-grey-900:#262626;--ws-palette-grey-950:#151515;--ws-bg-default:var(--vscode-editor-background,var(--theia-editor-background,var(--ws-palette-white)));--ws-bg-foreground:var(--vscode-editor-foreground,var(--theia-panel-foreground,var(--ws-palette-grey-50)));--ws-grey-50:var(--ws-bg-foreground);--ws-grey-100:var(--vscode-panel-background,var(--theia-panel-background,var(--ws-palette-grey-100)));--ws-grey-950:var(--vscode-panel-border,var(--theia-border-color,var(--ws-palette-grey-950)));--ws-grey-500:var(--vscode-descriptionForeground,var(--ws-palette-grey-500));--ws-grey-800:var(--vscode-descriptionForeground,var(--ws-palette-grey-800));--ws-card-bg:var(--vscode-editorGroupHeader-tabsBackground,var(--theia-editor-group-header-background,var(--ws-palette-grey-900)));--ws-card-border:var(--vscode-editorGroupHeader-tabsBorder,var(--theia-editor-group-header-background,var(--ws-palette-grey-50)));--ws-palette-input-bg:#1e1e1e;--ws-palette-input-border:#3c3c3c;--ws-palette-input-text:#ccc;--ws-palette-input-placeholder:#8c8c8c;--ws-palette-input-focus-border:#007acc;--ws-input-bg:var(--vscode-input-background,var(--theia-input-background,var(--ws-palette-input-bg)));--ws-input-border:var(--vscode-input-border,var(--theia-input-border,var(--ws-palette-input-border)));--ws-input-text:var(--vscode-input-foreground,var(--theia-input-foreground,var(--ws-palette-input-text)));--ws-input-placeholder:var(--vscode-input-placeholderForeground,var(--theia-input-placeholderForeground,var(--ws-palette-input-placeholder)));--ws-input-focus-border:var(--vscode-focusBorder,var(--theia-focusBorder,var(--ws-palette-primary-500)));--ws-select-bg:var(--vscode-dropdown-background,var(--theia-dropdown-background,var(--ws-input-bg)));--ws-select-border:var(--vscode-dropdown-border,var(--theia-dropdown-border,var(--ws-input-border)));--ws-select-text:var(--vscode-dropdown-foreground,var(--theia-dropdown-foreground,var(--ws-input-text)));--ws-select-list-bg:var(--vscode-dropdown-listBackground,var(--theia-dropdown-listBackground,var(--ws-palette-input-bg)));--ws-input-option-hover-bg:var(--vscode-list-hoverBackground,var(--theia-list-hoverBackground,var(--ws-palette-primary-700)));--ws-input-option-active-bg:var(--vscode-list-activeSelectionBackground,var(--theia-list-activeSelectionBackground,var(--ws-palette-primary-500)));--ws-input-option-active-text:var(--vscode-list-activeSelectionForeground,var(--theia-list-activeSelectionForeground,var(--ws-palette-white)));--ws-input-error-border:var(--vscode-inputValidation-errorBorder,var(--theia-inputValidation-errorBorder,var(--ws-palette-negative-500)));--ws-input-error-bg:var(--vscode-inputValidation-errorBackground,var(--theia-inputValidation-errorBackground,var(--ws-palette-negative-200)));--ws-input-warning-border:var(--vscode-inputValidation-warningBorder,var(--theia-inputValidation-warningBorder,var(--ws-palette-warning-500)));--ws-input-warning-bg:var(--vscode-inputValidation-warningBackground,var(--theia-inputValidation-warningBackground,var(--ws-palette-warning-200)));--ws-input-info-bg:var(--vscode-panel-background,var(--theia-inputValidation-infoBackground,var(--ws-palette-primary-200)));--ws-input-message-bg:var(--vscode-editor-lineHighlightBackground,var(--theia-inputValidation-infoBackground,var(--ws-palette-primary-200)));--ws-input-message-text:var(--vscode-editorInfo-foreground,var(--theia-inputValidation-infoForeground,var(--ws-palette-primary-500)));--ws-inactive-text:var(--vscode-disabledForeground,var(--theia-disabled-foreground,var(--ws-palette-grey-200)));--ws-disable-bg:var(--vscode-editorInfo-foreground,var(--theia-button-disabledBackground,var(--ws-palette-grey-300)));--ws-panel-0:var(--vscode-editor-background,var(--theia-editor-background,var(--ws-palette-grey-950)));--ws-panel-1:var(--vscode-sideBar-background,var(--theia-sideBar-background,var(--ws-palette-grey-700)));--ws-panel-2:var(--vscode-panel-background,var(--theia-panel-background,var(--ws-palette-grey-900)));--ws-panel-3:var(--vscode-editorGroupHeader-tabsBackground,var(--theia-editor-group-header-background,var(--ws-palette-grey-900)));--ws-panel-4:var(--vscode-editorWidget-background,var(--theia-editorWidget-background,var(--ws-palette-grey-300)));--ws-panel-border-subtle:var(--vscode-panel-border,var(--theia-border-color,var(--ws-palette-grey-200)));--ws-panel-border-strong:var(--vscode-contrastBorder,var(--theia-contrastBorder,var(--ws-palette-grey-300)));--ws-tab-bg-default:var(--vscode-editorGroupHeader-tabsBackground,var(--ws-palette-grey-900));--ws-tab-border:var(--vscode-tab-border,var(--ws-palette-grey-950));--ws-tab-active-bg:var(--vscode-tab-activeBackground,var(--ws-palette-grey-800));--ws-tab-active-fg:var(--vscode-tab-activeForeground,var(--ws-bg-foreground));--ws-tab-inactive-bg:var(--vscode-tab-inactiveBackground,var(--ws-palette-grey-900));--ws-tab-inactive-fg:var(--vscode-tab-inactiveForeground,var(--ws-palette-grey-200));--ws-tab-hover-bg:var(--vscode-tab-hoverBackground,var(--ws-palette-grey-700));--ws-panel-header-bg:var(--vscode-sideBarSectionHeader-background,var(--ws-palette-grey-800));--ws-panel-header-fg:var(--vscode-sideBarSectionHeader-foreground,var(--ws-bg-foreground));--ws-panel-bg:var(--vscode-panel-background,var(--ws-bg-default));--ws-panel-border:var(--vscode-panel-border,var(--ws-palette-grey-950));--ws-panel-title-active-border:var(--vscode-panelTitle-activeBorder,var(--ws-palette-primary-500));--ws-panel-title-active-fg:var(--vscode-panelTitle-activeForeground,var(--ws-bg-foreground));--ws-panel-title-inactive-fg:var(--vscode-panelTitle-inactiveForeground,var(--ws-palette-grey-100))}.center-absolute:not(#\\#){--tw-translate-x: -50% ;--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y);transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,);position:absolute;top:50%;left:50%}.ws-group:hover .ws-checkbox-hover-target{opacity:1!important}.simplebar-scrollbar:not(#\\#):before{background-color:#ccc}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}[data-simplebar]{position:relative;flex-direction:column;flex-wrap:wrap;justify-content:flex-start;align-content:flex-start;align-items:flex-start}.simplebar-wrapper{overflow:hidden;width:inherit;height:inherit;max-width:inherit;max-height:inherit}.simplebar-mask{direction:inherit;position:absolute;overflow:hidden;padding:0;margin:0;left:0;top:0;bottom:0;right:0;width:auto!important;height:auto!important;z-index:0}.simplebar-offset{direction:inherit!important;box-sizing:inherit!important;resize:none!important;position:absolute;top:0;left:0;bottom:0;right:0;padding:0;margin:0;-webkit-overflow-scrolling:touch}.simplebar-content-wrapper{direction:inherit;box-sizing:border-box!important;position:relative;display:block;height:100%;width:auto;max-width:100%;max-height:100%;overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.simplebar-content-wrapper::-webkit-scrollbar,.simplebar-hide-scrollbar::-webkit-scrollbar{display:none;width:0;height:0}.simplebar-content:after,.simplebar-content:before{content:" ";display:table}.simplebar-placeholder{max-height:100%;max-width:100%;width:100%;pointer-events:none}.simplebar-height-auto-observer-wrapper{box-sizing:inherit!important;height:100%;width:100%;max-width:1px;position:relative;float:left;max-height:1px;overflow:hidden;z-index:-1;padding:0;margin:0;pointer-events:none;flex-grow:inherit;flex-shrink:0;flex-basis:0}.simplebar-height-auto-observer{box-sizing:inherit;display:block;opacity:0;position:absolute;top:0;left:0;height:1000%;width:1000%;min-height:1px;min-width:1px;overflow:hidden;pointer-events:none;z-index:-1}.simplebar-track{z-index:1;position:absolute;right:0;bottom:0;pointer-events:none;overflow:hidden}[data-simplebar].simplebar-dragging,[data-simplebar].simplebar-dragging .simplebar-content{pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[data-simplebar].simplebar-dragging .simplebar-track{pointer-events:all}.simplebar-scrollbar{position:absolute;left:0;right:0;min-height:10px}.simplebar-scrollbar:before{position:absolute;content:"";background:#000;border-radius:7px;left:2px;right:2px;opacity:0;transition:opacity .2s .5s linear}.simplebar-scrollbar.simplebar-visible:before{opacity:.5;transition-delay:0s;transition-duration:0s}.simplebar-track.simplebar-vertical{top:0;width:11px}.simplebar-scrollbar:before{top:2px;bottom:2px;left:2px;right:2px}.simplebar-track.simplebar-horizontal{left:0;height:11px}.simplebar-track.simplebar-horizontal .simplebar-scrollbar{right:auto;left:0;top:0;bottom:0;min-height:0;min-width:10px;width:auto}[data-simplebar-direction=rtl] .simplebar-track.simplebar-vertical{right:auto;left:0}.simplebar-dummy-scrollbar-size{direction:rtl;position:fixed;opacity:0;visibility:hidden;height:500px;width:500px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:scrollbar!important}.simplebar-dummy-scrollbar-size>div{width:200%;height:200%;margin:10px 0}.simplebar-hide-scrollbar{position:fixed;left:0;visibility:hidden;overflow-y:scroll;scrollbar-width:none;-ms-overflow-style:none}
6
- `,document.head.appendChild(e)}catch(e){console.error("vite-plugin-inject-css: failed to inject css",e)}})();const vW=e=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:C.jsx("path",{d:"M21.66 6.28a.5.5 0 0 0 0-.697l-.967-.993a.5.5 0 0 0-.716 0L8.499 16.373 4.023 11.78a.5.5 0 0 0-.716 0l-.967.993a.5.5 0 0 0 0 .697l5.889 6.046.014-.014a.377.377 0 0 0 .54 0L21.66 6.28Z",fill:"currentColor"})}),b2=e=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:C.jsx("path",{d:"M4.497 5.361a.5.5 0 0 0 0 .707L10.429 12l-5.932 5.932a.5.5 0 0 0 0 .707l.864.864a.5.5 0 0 0 .707 0L12 13.571l5.932 5.932a.5.5 0 0 0 .707 0l.864-.864a.5.5 0 0 0 0-.707L13.571 12l5.932-5.932a.5.5 0 0 0 0-.707l-.864-.864a.5.5 0 0 0-.707 0L12 10.429 6.068 4.497a.5.5 0 0 0-.707 0l-.864.864Z",fill:"currentColor"})}),gW=e=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:C.jsx("path",{d:"M20.673 5.133c.136.24.053.55-.185.69l-16.25 9.623a.487.487 0 0 1-.676-.18l-.497-.884a.513.513 0 0 1 .185-.69L19.5 4.069c.238-.141.54-.06.676.18l.497.884ZM20.938 9.657c.136.24.053.55-.185.69L7.925 17.944a.487.487 0 0 1-.676-.181l-.497-.884a.513.513 0 0 1 .185-.69l12.829-7.597c.237-.14.54-.06.675.181l.497.884ZM20.16 15.376c.237-.14.32-.45.184-.69l-.497-.884a.487.487 0 0 0-.676-.18l-7.695 4.556a.513.513 0 0 0-.185.69l.498.884c.135.24.437.322.675.181l7.695-4.557Z",fill:"currentColor"})}),mW=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},bW=(e,t)=>({classGroupId:e,validator:t}),y2=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),iu="-",KS=[],yW="arbitrary..",wW=e=>{const t=_W(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return xW(o);const i=o.split(iu),a=i[0]===""&&i.length>1?1:0;return w2(i,a,t)},getConflictingClassGroupIds:(o,i)=>{if(i){const a=n[o],s=r[o];return a?s?mW(s,a):a:s||KS}return r[o]||KS}}},w2=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],o=r.nextPart.get(n);if(o){const c=w2(e,t+1,o);if(c)return c}const i=r.validators;if(i===null)return;const a=t===0?e.join(iu):e.slice(t).join(iu),s=i.length;for(let c=0;c<s;c++){const u=i[c];if(u.validator(a))return u.classGroupId}},xW=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?yW+n:void 0})(),_W=e=>{const{theme:t,classGroups:r}=e;return EW(r,t)},EW=(e,t)=>{const r=y2();for(const n in e){const o=e[n];Gx(o,r,n,t)}return r},Gx=(e,t,r,n)=>{const o=e.length;for(let i=0;i<o;i++){const a=e[i];SW(a,t,r,n)}},SW=(e,t,r,n)=>{if(typeof e=="string"){OW(e,t,r);return}if(typeof e=="function"){CW(e,t,r,n);return}IW(e,t,r,n)},OW=(e,t,r)=>{const n=e===""?t:x2(t,e);n.classGroupId=r},CW=(e,t,r,n)=>{if(RW(e)){Gx(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(bW(r,e))},IW=(e,t,r,n)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[s,c]=o[a];Gx(c,x2(t,s),r,n)}},x2=(e,t)=>{let r=e;const n=t.split(iu),o=n.length;for(let i=0;i<o;i++){const a=n[i];let s=r.nextPart.get(a);s||(s=y2(),r.nextPart.set(a,s)),r=s}return r},RW=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,NW=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(i,a)=>{r[i]=a,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(i){let a=r[i];if(a!==void 0)return a;if((a=n[i])!==void 0)return o(i,a),a},set(i,a){i in r?r[i]=a:o(i,a)}}},sx="!",YS=":",PW=[],XS=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),TW=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const i=[];let a=0,s=0,c=0,u;const d=o.length;for(let g=0;g<d;g++){const b=o[g];if(a===0&&s===0){if(b===YS){i.push(o.slice(c,g)),c=g+1;continue}if(b==="/"){u=g;continue}}b==="["?a++:b==="]"?a--:b==="("?s++:b===")"&&s--}const p=i.length===0?o:o.slice(c);let h=p,v=!1;p.endsWith(sx)?(h=p.slice(0,-1),v=!0):p.startsWith(sx)&&(h=p.slice(1),v=!0);const y=u&&u>c?u-c:void 0;return XS(i,v,h,y)};if(t){const o=t+YS,i=n;n=a=>a.startsWith(o)?i(a.slice(o.length)):XS(PW,!1,a,void 0,!0)}if(r){const o=n;n=i=>r({className:i,parseClassName:o})}return n},AW=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let i=0;i<r.length;i++){const a=r[i],s=a[0]==="[",c=t.has(a);s||c?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(a)):o.push(a)}return o.length>0&&(o.sort(),n.push(...o)),n}},kW=e=>({cache:NW(e.cacheSize),parseClassName:TW(e),sortModifiers:AW(e),...wW(e)}),MW=/\s+/,DW=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(MW);let c="";for(let u=s.length-1;u>=0;u-=1){const d=s[u],{isExternal:p,modifiers:h,hasImportantModifier:v,baseClassName:y,maybePostfixModifierPosition:g}=r(d);if(p){c=d+(c.length>0?" "+c:c);continue}let b=!!g,x=n(b?y.substring(0,g):y);if(!x){if(!b){c=d+(c.length>0?" "+c:c);continue}if(x=n(y),!x){c=d+(c.length>0?" "+c:c);continue}b=!1}const w=h.length===0?"":h.length===1?h[0]:i(h).join(":"),E=v?w+sx:w,S=E+x;if(a.indexOf(S)>-1)continue;a.push(S);const _=o(x,b);for(let O=0;O<_.length;++O){const N=_[O];a.push(E+N)}c=d+(c.length>0?" "+c:c)}return c},jW=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=_2(r))&&(o&&(o+=" "),o+=n);return o},_2=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=_2(e[n]))&&(r&&(r+=" "),r+=t);return r},ZS=(e,...t)=>{let r,n,o,i;const a=c=>{const u=t.reduce((d,p)=>p(d),e());return r=kW(u),n=r.cache.get,o=r.cache.set,i=s,s(c)},s=c=>{const u=n(c);if(u)return u;const d=DW(c,r);return o(c,d),d};return i=a,(...c)=>i(jW(...c))},qW=[],Mt=e=>{const t=r=>r[e]||qW;return t.isThemeGetter=!0,t},E2=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,S2=/^\((?:(\w[\w-]*):)?(.+)\)$/i,LW=/^\d+\/\d+$/,zW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,BW=/\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$/,FW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$W=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,HW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Si=e=>LW.test(e),Fe=e=>!!e&&!Number.isNaN(Number(e)),ao=e=>!!e&&Number.isInteger(Number(e)),mp=e=>e.endsWith("%")&&Fe(e.slice(0,-1)),Ln=e=>zW.test(e),VW=()=>!0,WW=e=>BW.test(e)&&!FW.test(e),O2=()=>!1,UW=e=>$W.test(e),GW=e=>HW.test(e),KW=e=>!Ie(e)&&!Re(e),YW=e=>ta(e,R2,O2),Ie=e=>E2.test(e),jo=e=>ta(e,N2,WW),bp=e=>ta(e,eU,Fe),JS=e=>ta(e,C2,O2),XW=e=>ta(e,I2,GW),ic=e=>ta(e,P2,UW),Re=e=>S2.test(e),ja=e=>ra(e,N2),ZW=e=>ra(e,tU),QS=e=>ra(e,C2),JW=e=>ra(e,R2),QW=e=>ra(e,I2),ac=e=>ra(e,P2,!0),ta=(e,t,r)=>{const n=E2.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ra=(e,t,r=!1)=>{const n=S2.exec(e);return n?n[1]?t(n[1]):r:!1},C2=e=>e==="position"||e==="percentage",I2=e=>e==="image"||e==="url",R2=e=>e==="length"||e==="size"||e==="bg-size",N2=e=>e==="length",eU=e=>e==="number",tU=e=>e==="family-name",P2=e=>e==="shadow",eO=()=>{const e=Mt("color"),t=Mt("font"),r=Mt("text"),n=Mt("font-weight"),o=Mt("tracking"),i=Mt("leading"),a=Mt("breakpoint"),s=Mt("container"),c=Mt("spacing"),u=Mt("radius"),d=Mt("shadow"),p=Mt("inset-shadow"),h=Mt("text-shadow"),v=Mt("drop-shadow"),y=Mt("blur"),g=Mt("perspective"),b=Mt("aspect"),x=Mt("ease"),w=Mt("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...S(),Re,Ie],O=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],R=()=>[Re,Ie,c],A=()=>[Si,"full","auto",...R()],D=()=>[ao,"none","subgrid",Re,Ie],B=()=>["auto",{span:["full",ao,Re,Ie]},ao,Re,Ie],j=()=>[ao,"auto",Re,Ie],M=()=>["auto","min","max","fr",Re,Ie],P=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...R()],G=()=>[Si,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],W=()=>[e,Re,Ie],Q=()=>[...S(),QS,JS,{position:[Re,Ie]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",JW,YW,{size:[Re,Ie]}],ie=()=>[mp,ja,jo],te=()=>["","none","full",u,Re,Ie],$=()=>["",Fe,ja,jo],K=()=>["solid","dashed","dotted","double"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>[Fe,mp,QS,JS],Y=()=>["","none",y,Re,Ie],oe=()=>["none",Fe,Re,Ie],re=()=>["none",Fe,Re,Ie],se=()=>[Fe,Re,Ie],ee=()=>[Si,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ln],breakpoint:[Ln],color:[VW],container:[Ln],"drop-shadow":[Ln],ease:["in","out","in-out"],font:[KW],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ln],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ln],shadow:[Ln],spacing:["px",Fe],text:[Ln],"text-shadow":[Ln],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Si,Ie,Re,b]}],container:["container"],columns:[{columns:[Fe,Ie,Re,s]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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:_()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[ao,"auto",Re,Ie]}],basis:[{basis:[Si,"full","auto",s,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fe,Si,"auto","initial","none",Ie]}],grow:[{grow:["",Fe,Re,Ie]}],shrink:[{shrink:["",Fe,Re,Ie]}],order:[{order:[ao,"first","last","none",Re,Ie]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:B()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:B()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...P(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...P()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":P()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[s,"screen",...G()]}],"min-w":[{"min-w":[s,"screen","none",...G()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",r,ja,jo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Re,bp]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",mp,Ie]}],"font-family":[{font:[ZW,Ie,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:[o,Re,Ie]}],"line-clamp":[{"line-clamp":[Fe,"none",Re,bp]}],leading:[{leading:[i,...R()]}],"list-image":[{"list-image":["none",Re,Ie]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Re,Ie]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fe,"from-font","auto",Re,jo]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[Fe,"auto",Re,Ie]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Re,Ie]}],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",Re,Ie]}],"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:z()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ao,Re,Ie],radial:["",Re,Ie],conic:[ao,Re,Ie]},QW,XW]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:$()}],"border-w-x":[{"border-x":$()}],"border-w-y":[{"border-y":$()}],"border-w-s":[{"border-s":$()}],"border-w-e":[{"border-e":$()}],"border-w-t":[{"border-t":$()}],"border-w-r":[{"border-r":$()}],"border-w-b":[{"border-b":$()}],"border-w-l":[{"border-l":$()}],"divide-x":[{"divide-x":$()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":$()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...K(),"hidden","none"]}],"divide-style":[{divide:[...K(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fe,Re,Ie]}],"outline-w":[{outline:["",Fe,ja,jo]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",d,ac,ic]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",p,ac,ic]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[Fe,jo]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":$()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",h,ac,ic]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[Fe,Re,Ie]}],"mix-blend":[{"mix-blend":[...Z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Z()}],"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":[Fe]}],"mask-image-linear-from-pos":[{"mask-linear-from":H()}],"mask-image-linear-to-pos":[{"mask-linear-to":H()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":H()}],"mask-image-t-to-pos":[{"mask-t-to":H()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":H()}],"mask-image-r-to-pos":[{"mask-r-to":H()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":H()}],"mask-image-b-to-pos":[{"mask-b-to":H()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":H()}],"mask-image-l-to-pos":[{"mask-l-to":H()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":H()}],"mask-image-x-to-pos":[{"mask-x-to":H()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":H()}],"mask-image-y-to-pos":[{"mask-y-to":H()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[Re,Ie]}],"mask-image-radial-from-pos":[{"mask-radial-from":H()}],"mask-image-radial-to-pos":[{"mask-radial-to":H()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[Fe]}],"mask-image-conic-from-pos":[{"mask-conic-from":H()}],"mask-image-conic-to-pos":[{"mask-conic-to":H()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Q()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Re,Ie]}],filter:[{filter:["","none",Re,Ie]}],blur:[{blur:Y()}],brightness:[{brightness:[Fe,Re,Ie]}],contrast:[{contrast:[Fe,Re,Ie]}],"drop-shadow":[{"drop-shadow":["","none",v,ac,ic]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",Fe,Re,Ie]}],"hue-rotate":[{"hue-rotate":[Fe,Re,Ie]}],invert:[{invert:["",Fe,Re,Ie]}],saturate:[{saturate:[Fe,Re,Ie]}],sepia:[{sepia:["",Fe,Re,Ie]}],"backdrop-filter":[{"backdrop-filter":["","none",Re,Ie]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[Fe,Re,Ie]}],"backdrop-contrast":[{"backdrop-contrast":[Fe,Re,Ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fe,Re,Ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fe,Re,Ie]}],"backdrop-invert":[{"backdrop-invert":["",Fe,Re,Ie]}],"backdrop-opacity":[{"backdrop-opacity":[Fe,Re,Ie]}],"backdrop-saturate":[{"backdrop-saturate":[Fe,Re,Ie]}],"backdrop-sepia":[{"backdrop-sepia":["",Fe,Re,Ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Re,Ie]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Fe,"initial",Re,Ie]}],ease:[{ease:["linear","initial",x,Re,Ie]}],delay:[{delay:[Fe,Re,Ie]}],animate:[{animate:["none",w,Re,Ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,Re,Ie]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:re()}],"scale-x":[{"scale-x":re()}],"scale-y":[{"scale-y":re()}],"scale-z":[{"scale-z":re()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[Re,Ie,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ee()}],"translate-x":[{"translate-x":ee()}],"translate-y":[{"translate-y":ee()}],"translate-z":[{"translate-z":ee()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"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",Re,Ie]}],"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":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",Re,Ie]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[Fe,ja,jo,bp]}],stroke:[{stroke:["none",...W()]}],"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"]}},rU=(e,{cacheSize:t,prefix:r,experimentalParseClassName:n,extend:o={},override:i={}})=>(ss(e,"cacheSize",t),ss(e,"prefix",r),ss(e,"experimentalParseClassName",n),sc(e.theme,i.theme),sc(e.classGroups,i.classGroups),sc(e.conflictingClassGroups,i.conflictingClassGroups),sc(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),ss(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),lc(e.theme,o.theme),lc(e.classGroups,o.classGroups),lc(e.conflictingClassGroups,o.conflictingClassGroups),lc(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),T2(e,o,"orderSensitiveModifiers"),e),ss=(e,t,r)=>{r!==void 0&&(e[t]=r)},sc=(e,t)=>{if(t)for(const r in t)ss(e,r,t[r])},lc=(e,t)=>{if(t)for(const r in t)T2(e,t,r)},T2=(e,t,r)=>{const n=t[r];n!==void 0&&(e[r]=e[r]?e[r].concat(n):n)},nU=(e,...t)=>typeof e=="function"?ZS(eO,e,...t):ZS(()=>rU(eO(),e),...t);function A2(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tO={exports:{}};/*!
6
+ `,document.head.appendChild(e)}catch(e){console.error("vite-plugin-inject-css: failed to inject css",e)}})();const vW=e=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:C.jsx("path",{d:"M21.66 6.28a.5.5 0 0 0 0-.697l-.967-.993a.5.5 0 0 0-.716 0L8.499 16.373 4.023 11.78a.5.5 0 0 0-.716 0l-.967.993a.5.5 0 0 0 0 .697l5.889 6.046.014-.014a.377.377 0 0 0 .54 0L21.66 6.28Z",fill:"currentColor"})}),b2=e=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:C.jsx("path",{d:"M4.497 5.361a.5.5 0 0 0 0 .707L10.429 12l-5.932 5.932a.5.5 0 0 0 0 .707l.864.864a.5.5 0 0 0 .707 0L12 13.571l5.932 5.932a.5.5 0 0 0 .707 0l.864-.864a.5.5 0 0 0 0-.707L13.571 12l5.932-5.932a.5.5 0 0 0 0-.707l-.864-.864a.5.5 0 0 0-.707 0L12 10.429 6.068 4.497a.5.5 0 0 0-.707 0l-.864.864Z",fill:"currentColor"})}),gW=e=>C.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:C.jsx("path",{d:"M20.673 5.133c.136.24.053.55-.185.69l-16.25 9.623a.487.487 0 0 1-.676-.18l-.497-.884a.513.513 0 0 1 .185-.69L19.5 4.069c.238-.141.54-.06.676.18l.497.884ZM20.938 9.657c.136.24.053.55-.185.69L7.925 17.944a.487.487 0 0 1-.676-.181l-.497-.884a.513.513 0 0 1 .185-.69l12.829-7.597c.237-.14.54-.06.675.181l.497.884ZM20.16 15.376c.237-.14.32-.45.184-.69l-.497-.884a.487.487 0 0 0-.676-.18l-7.695 4.556a.513.513 0 0 0-.185.69l.498.884c.135.24.437.322.675.181l7.695-4.557Z",fill:"currentColor"})}),mW=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},bW=(e,t)=>({classGroupId:e,validator:t}),y2=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),iu="-",KS=[],yW="arbitrary..",wW=e=>{const t=_W(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return xW(o);const i=o.split(iu),a=i[0]===""&&i.length>1?1:0;return w2(i,a,t)},getConflictingClassGroupIds:(o,i)=>{if(i){const a=n[o],s=r[o];return a?s?mW(s,a):a:s||KS}return r[o]||KS}}},w2=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],o=r.nextPart.get(n);if(o){const c=w2(e,t+1,o);if(c)return c}const i=r.validators;if(i===null)return;const a=t===0?e.join(iu):e.slice(t).join(iu),s=i.length;for(let c=0;c<s;c++){const u=i[c];if(u.validator(a))return u.classGroupId}},xW=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?yW+n:void 0})(),_W=e=>{const{theme:t,classGroups:r}=e;return EW(r,t)},EW=(e,t)=>{const r=y2();for(const n in e){const o=e[n];Gx(o,r,n,t)}return r},Gx=(e,t,r,n)=>{const o=e.length;for(let i=0;i<o;i++){const a=e[i];SW(a,t,r,n)}},SW=(e,t,r,n)=>{if(typeof e=="string"){OW(e,t,r);return}if(typeof e=="function"){CW(e,t,r,n);return}IW(e,t,r,n)},OW=(e,t,r)=>{const n=e===""?t:x2(t,e);n.classGroupId=r},CW=(e,t,r,n)=>{if(RW(e)){Gx(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(bW(r,e))},IW=(e,t,r,n)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[s,c]=o[a];Gx(c,x2(t,s),r,n)}},x2=(e,t)=>{let r=e;const n=t.split(iu),o=n.length;for(let i=0;i<o;i++){const a=n[i];let s=r.nextPart.get(a);s||(s=y2(),r.nextPart.set(a,s)),r=s}return r},RW=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,NW=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(i,a)=>{r[i]=a,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(i){let a=r[i];if(a!==void 0)return a;if((a=n[i])!==void 0)return o(i,a),a},set(i,a){i in r?r[i]=a:o(i,a)}}},sx="!",YS=":",PW=[],XS=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),TW=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const i=[];let a=0,s=0,c=0,u;const d=o.length;for(let g=0;g<d;g++){const b=o[g];if(a===0&&s===0){if(b===YS){i.push(o.slice(c,g)),c=g+1;continue}if(b==="/"){u=g;continue}}b==="["?a++:b==="]"?a--:b==="("?s++:b===")"&&s--}const p=i.length===0?o:o.slice(c);let h=p,v=!1;p.endsWith(sx)?(h=p.slice(0,-1),v=!0):p.startsWith(sx)&&(h=p.slice(1),v=!0);const y=u&&u>c?u-c:void 0;return XS(i,v,h,y)};if(t){const o=t+YS,i=n;n=a=>a.startsWith(o)?i(a.slice(o.length)):XS(PW,!1,a,void 0,!0)}if(r){const o=n;n=i=>r({className:i,parseClassName:o})}return n},AW=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let i=0;i<r.length;i++){const a=r[i],s=a[0]==="[",c=t.has(a);s||c?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(a)):o.push(a)}return o.length>0&&(o.sort(),n.push(...o)),n}},kW=e=>({cache:NW(e.cacheSize),parseClassName:TW(e),sortModifiers:AW(e),...wW(e)}),MW=/\s+/,DW=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(MW);let c="";for(let u=s.length-1;u>=0;u-=1){const d=s[u],{isExternal:p,modifiers:h,hasImportantModifier:v,baseClassName:y,maybePostfixModifierPosition:g}=r(d);if(p){c=d+(c.length>0?" "+c:c);continue}let b=!!g,x=n(b?y.substring(0,g):y);if(!x){if(!b){c=d+(c.length>0?" "+c:c);continue}if(x=n(y),!x){c=d+(c.length>0?" "+c:c);continue}b=!1}const w=h.length===0?"":h.length===1?h[0]:i(h).join(":"),E=v?w+sx:w,S=E+x;if(a.indexOf(S)>-1)continue;a.push(S);const _=o(x,b);for(let O=0;O<_.length;++O){const N=_[O];a.push(E+N)}c=d+(c.length>0?" "+c:c)}return c},jW=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=_2(r))&&(o&&(o+=" "),o+=n);return o},_2=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=_2(e[n]))&&(r&&(r+=" "),r+=t);return r},ZS=(e,...t)=>{let r,n,o,i;const a=c=>{const u=t.reduce((d,p)=>p(d),e());return r=kW(u),n=r.cache.get,o=r.cache.set,i=s,s(c)},s=c=>{const u=n(c);if(u)return u;const d=DW(c,r);return o(c,d),d};return i=a,(...c)=>i(jW(...c))},qW=[],Mt=e=>{const t=r=>r[e]||qW;return t.isThemeGetter=!0,t},E2=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,S2=/^\((?:(\w[\w-]*):)?(.+)\)$/i,LW=/^\d+\/\d+$/,zW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,BW=/\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$/,FW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$W=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,HW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Si=e=>LW.test(e),Fe=e=>!!e&&!Number.isNaN(Number(e)),ao=e=>!!e&&Number.isInteger(Number(e)),mp=e=>e.endsWith("%")&&Fe(e.slice(0,-1)),Ln=e=>zW.test(e),VW=()=>!0,WW=e=>BW.test(e)&&!FW.test(e),O2=()=>!1,UW=e=>$W.test(e),GW=e=>HW.test(e),KW=e=>!Ie(e)&&!Re(e),YW=e=>ta(e,R2,O2),Ie=e=>E2.test(e),jo=e=>ta(e,N2,WW),bp=e=>ta(e,eU,Fe),JS=e=>ta(e,C2,O2),XW=e=>ta(e,I2,GW),ic=e=>ta(e,P2,UW),Re=e=>S2.test(e),qa=e=>ra(e,N2),ZW=e=>ra(e,tU),QS=e=>ra(e,C2),JW=e=>ra(e,R2),QW=e=>ra(e,I2),ac=e=>ra(e,P2,!0),ta=(e,t,r)=>{const n=E2.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ra=(e,t,r=!1)=>{const n=S2.exec(e);return n?n[1]?t(n[1]):r:!1},C2=e=>e==="position"||e==="percentage",I2=e=>e==="image"||e==="url",R2=e=>e==="length"||e==="size"||e==="bg-size",N2=e=>e==="length",eU=e=>e==="number",tU=e=>e==="family-name",P2=e=>e==="shadow",eO=()=>{const e=Mt("color"),t=Mt("font"),r=Mt("text"),n=Mt("font-weight"),o=Mt("tracking"),i=Mt("leading"),a=Mt("breakpoint"),s=Mt("container"),c=Mt("spacing"),u=Mt("radius"),d=Mt("shadow"),p=Mt("inset-shadow"),h=Mt("text-shadow"),v=Mt("drop-shadow"),y=Mt("blur"),g=Mt("perspective"),b=Mt("aspect"),x=Mt("ease"),w=Mt("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...S(),Re,Ie],O=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],R=()=>[Re,Ie,c],A=()=>[Si,"full","auto",...R()],D=()=>[ao,"none","subgrid",Re,Ie],B=()=>["auto",{span:["full",ao,Re,Ie]},ao,Re,Ie],j=()=>[ao,"auto",Re,Ie],M=()=>["auto","min","max","fr",Re,Ie],P=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...R()],G=()=>[Si,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],W=()=>[e,Re,Ie],Q=()=>[...S(),QS,JS,{position:[Re,Ie]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",JW,YW,{size:[Re,Ie]}],ie=()=>[mp,qa,jo],te=()=>["","none","full",u,Re,Ie],$=()=>["",Fe,qa,jo],K=()=>["solid","dashed","dotted","double"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>[Fe,mp,QS,JS],Y=()=>["","none",y,Re,Ie],oe=()=>["none",Fe,Re,Ie],re=()=>["none",Fe,Re,Ie],se=()=>[Fe,Re,Ie],ee=()=>[Si,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ln],breakpoint:[Ln],color:[VW],container:[Ln],"drop-shadow":[Ln],ease:["in","out","in-out"],font:[KW],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ln],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ln],shadow:[Ln],spacing:["px",Fe],text:[Ln],"text-shadow":[Ln],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Si,Ie,Re,b]}],container:["container"],columns:[{columns:[Fe,Ie,Re,s]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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:_()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[ao,"auto",Re,Ie]}],basis:[{basis:[Si,"full","auto",s,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fe,Si,"auto","initial","none",Ie]}],grow:[{grow:["",Fe,Re,Ie]}],shrink:[{shrink:["",Fe,Re,Ie]}],order:[{order:[ao,"first","last","none",Re,Ie]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:B()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:B()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...P(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...P()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":P()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[s,"screen",...G()]}],"min-w":[{"min-w":[s,"screen","none",...G()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",r,qa,jo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Re,bp]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",mp,Ie]}],"font-family":[{font:[ZW,Ie,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:[o,Re,Ie]}],"line-clamp":[{"line-clamp":[Fe,"none",Re,bp]}],leading:[{leading:[i,...R()]}],"list-image":[{"list-image":["none",Re,Ie]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Re,Ie]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fe,"from-font","auto",Re,jo]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[Fe,"auto",Re,Ie]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Re,Ie]}],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",Re,Ie]}],"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:z()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ao,Re,Ie],radial:["",Re,Ie],conic:[ao,Re,Ie]},QW,XW]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:$()}],"border-w-x":[{"border-x":$()}],"border-w-y":[{"border-y":$()}],"border-w-s":[{"border-s":$()}],"border-w-e":[{"border-e":$()}],"border-w-t":[{"border-t":$()}],"border-w-r":[{"border-r":$()}],"border-w-b":[{"border-b":$()}],"border-w-l":[{"border-l":$()}],"divide-x":[{"divide-x":$()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":$()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...K(),"hidden","none"]}],"divide-style":[{divide:[...K(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fe,Re,Ie]}],"outline-w":[{outline:["",Fe,qa,jo]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",d,ac,ic]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",p,ac,ic]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[Fe,jo]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":$()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",h,ac,ic]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[Fe,Re,Ie]}],"mix-blend":[{"mix-blend":[...Z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Z()}],"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":[Fe]}],"mask-image-linear-from-pos":[{"mask-linear-from":H()}],"mask-image-linear-to-pos":[{"mask-linear-to":H()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":H()}],"mask-image-t-to-pos":[{"mask-t-to":H()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":H()}],"mask-image-r-to-pos":[{"mask-r-to":H()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":H()}],"mask-image-b-to-pos":[{"mask-b-to":H()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":H()}],"mask-image-l-to-pos":[{"mask-l-to":H()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":H()}],"mask-image-x-to-pos":[{"mask-x-to":H()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":H()}],"mask-image-y-to-pos":[{"mask-y-to":H()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[Re,Ie]}],"mask-image-radial-from-pos":[{"mask-radial-from":H()}],"mask-image-radial-to-pos":[{"mask-radial-to":H()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[Fe]}],"mask-image-conic-from-pos":[{"mask-conic-from":H()}],"mask-image-conic-to-pos":[{"mask-conic-to":H()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Q()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Re,Ie]}],filter:[{filter:["","none",Re,Ie]}],blur:[{blur:Y()}],brightness:[{brightness:[Fe,Re,Ie]}],contrast:[{contrast:[Fe,Re,Ie]}],"drop-shadow":[{"drop-shadow":["","none",v,ac,ic]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",Fe,Re,Ie]}],"hue-rotate":[{"hue-rotate":[Fe,Re,Ie]}],invert:[{invert:["",Fe,Re,Ie]}],saturate:[{saturate:[Fe,Re,Ie]}],sepia:[{sepia:["",Fe,Re,Ie]}],"backdrop-filter":[{"backdrop-filter":["","none",Re,Ie]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[Fe,Re,Ie]}],"backdrop-contrast":[{"backdrop-contrast":[Fe,Re,Ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fe,Re,Ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fe,Re,Ie]}],"backdrop-invert":[{"backdrop-invert":["",Fe,Re,Ie]}],"backdrop-opacity":[{"backdrop-opacity":[Fe,Re,Ie]}],"backdrop-saturate":[{"backdrop-saturate":[Fe,Re,Ie]}],"backdrop-sepia":[{"backdrop-sepia":["",Fe,Re,Ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Re,Ie]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Fe,"initial",Re,Ie]}],ease:[{ease:["linear","initial",x,Re,Ie]}],delay:[{delay:[Fe,Re,Ie]}],animate:[{animate:["none",w,Re,Ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,Re,Ie]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:re()}],"scale-x":[{"scale-x":re()}],"scale-y":[{"scale-y":re()}],"scale-z":[{"scale-z":re()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[Re,Ie,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ee()}],"translate-x":[{"translate-x":ee()}],"translate-y":[{"translate-y":ee()}],"translate-z":[{"translate-z":ee()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"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",Re,Ie]}],"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":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",Re,Ie]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[Fe,qa,jo,bp]}],stroke:[{stroke:["none",...W()]}],"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"]}},rU=(e,{cacheSize:t,prefix:r,experimentalParseClassName:n,extend:o={},override:i={}})=>(ls(e,"cacheSize",t),ls(e,"prefix",r),ls(e,"experimentalParseClassName",n),sc(e.theme,i.theme),sc(e.classGroups,i.classGroups),sc(e.conflictingClassGroups,i.conflictingClassGroups),sc(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),ls(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),lc(e.theme,o.theme),lc(e.classGroups,o.classGroups),lc(e.conflictingClassGroups,o.conflictingClassGroups),lc(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),T2(e,o,"orderSensitiveModifiers"),e),ls=(e,t,r)=>{r!==void 0&&(e[t]=r)},sc=(e,t)=>{if(t)for(const r in t)ls(e,r,t[r])},lc=(e,t)=>{if(t)for(const r in t)T2(e,t,r)},T2=(e,t,r)=>{const n=t[r];n!==void 0&&(e[r]=e[r]?e[r].concat(n):n)},nU=(e,...t)=>typeof e=="function"?ZS(eO,e,...t):ZS(()=>rU(eO(),e),...t);function A2(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tO={exports:{}};/*!
7
7
  Copyright (c) 2018 Jed Watson.
8
8
  Licensed under the MIT License (MIT), see
9
9
  http://jedwatson.github.io/classnames
10
- */var rO;function oU(){return rO||(rO=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var i="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(i=o(i,n(s)))}return i}function n(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return r.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var a="";for(var s in i)t.call(i,s)&&i[s]&&(a=o(a,s));return a}function o(i,a){return a?i?i+" "+a:i+a:i}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(tO)),tO.exports}var iU=oU();const na=A2(iU),aU=nU({extend:{classGroups:{"font-size":["text-xxs","text-xs","text-s","text-sm","text-base","text-lg","text-xl","text-2xl","text-3xl","text-4xl","text-5xl","text-6xl","text-7xl","text-8xl","text-9xl"],"text-color":["text-body","text-muted","text-inactive-text","text-button-text","text-positive-text","text-negative-text","text-negative","text-warning-text","text-input-text","text-select-text","text-input-message-text","text-placeholder"]}}});function qe(...e){return aU(na(e))}const ks={sm:{checkbox:"size-4",hoverSquare:"size-2.5",text:"text-xs",spacing:"gap-1",icon:"size-3.25"},md:{checkbox:"size-5",hoverSquare:"size-3.5",text:"text-sm",spacing:"gap-1.5",icon:"size-4"},lg:{checkbox:"size-6",hoverSquare:"size-4",text:"text-base",spacing:"gap-2",icon:"size-5"}},Dr={primary:{checked:"bg-primary border-primary",unchecked:"border border-body bg-transparent",checkedHover:"hover:bg-primary-hover hover:border-primary-hover",hoverSquare:"bg-primary-hover",focus:"focus:ring-primary",label:"text-body"},positive:{checked:"bg-positive border-positive",unchecked:"border border-positive bg-transparent",checkedHover:"hover:bg-positive-hover hover:border-positive-hover",hoverSquare:"bg-positive-hover",focus:"focus:ring-positive",label:"text-positive"},warning:{checked:"bg-warning border-warning",unchecked:"border border-warning bg-transparent",checkedHover:"hover:bg-warning-hover hover:border-warning-hover",hoverSquare:"bg-warning-hover",focus:"focus:ring-warning",label:"text-warning"},negative:{checked:"bg-negative border-negative",unchecked:"border border-negative bg-transparent",checkedHover:"hover:bg-negative-hover hover:border-negative-hover",hoverSquare:"bg-negative-hover",focus:"focus:ring-negative",label:"text-negative"}},sU=`
10
+ */var rO;function oU(){return rO||(rO=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var i="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(i=o(i,n(s)))}return i}function n(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return r.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var a="";for(var s in i)t.call(i,s)&&i[s]&&(a=o(a,s));return a}function o(i,a){return a?i?i+" "+a:i+a:i}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(tO)),tO.exports}var iU=oU();const na=A2(iU),aU=nU({extend:{classGroups:{"font-size":["text-xxs","text-xs","text-s","text-sm","text-base","text-lg","text-xl","text-2xl","text-3xl","text-4xl","text-5xl","text-6xl","text-7xl","text-8xl","text-9xl"],"text-color":["text-body","text-muted","text-inactive-text","text-button-text","text-positive-text","text-negative-text","text-negative","text-warning-text","text-input-text","text-select-text","text-input-message-text","text-placeholder"]}}});function qe(...e){return aU(na(e))}const Ms={sm:{checkbox:"size-4",hoverSquare:"size-2.5",text:"text-xs",spacing:"gap-1",icon:"size-3.25"},md:{checkbox:"size-5",hoverSquare:"size-3.5",text:"text-sm",spacing:"gap-1.5",icon:"size-4"},lg:{checkbox:"size-6",hoverSquare:"size-4",text:"text-base",spacing:"gap-2",icon:"size-5"}},Dr={primary:{checked:"bg-primary border-primary",unchecked:"border border-body bg-transparent",checkedHover:"hover:bg-primary-hover hover:border-primary-hover",hoverSquare:"bg-primary-hover",focus:"focus:ring-primary",label:"text-body"},positive:{checked:"bg-positive border-positive",unchecked:"border border-positive bg-transparent",checkedHover:"hover:bg-positive-hover hover:border-positive-hover",hoverSquare:"bg-positive-hover",focus:"focus:ring-positive",label:"text-positive"},warning:{checked:"bg-warning border-warning",unchecked:"border border-warning bg-transparent",checkedHover:"hover:bg-warning-hover hover:border-warning-hover",hoverSquare:"bg-warning-hover",focus:"focus:ring-warning",label:"text-warning"},negative:{checked:"bg-negative border-negative",unchecked:"border border-negative bg-transparent",checkedHover:"hover:bg-negative-hover hover:border-negative-hover",hoverSquare:"bg-negative-hover",focus:"focus:ring-negative",label:"text-negative"}},sU=`
11
11
  appearance-none border rounded transition-all duration-200
12
12
  focus:ring-2 focus:ring-offset-2 focus:outline-hidden
13
13
  relative
14
- `,lU=(e,t,r)=>{const{isChecked:n,isIndeterminate:o,isDisabled:i,isInvalid:a}=r,s=n||o;return qe(sU,ks[e].checkbox,{"cursor-pointer":!i},a?{[Dr.negative.checked]:s,[Dr.negative.unchecked]:!s,[Dr.negative.checkedHover]:!i&&s,[Dr.negative.focus]:!i,"border-panel-subtle":i}:{[Dr[t].checked]:s&&!i,[Dr[t].unchecked]:!s&&!i,[Dr[t].checkedHover]:!i&&s,[Dr[t].focus]:!i,"border-panel-subtle":i,"bg-panel-subtle":i&&s})},cU=(e,t,r)=>{const{isDisabled:n,isInvalid:o}=r;return qe(ks[e].text,o?{[Dr.negative.label]:o}:{"text-muted":n,[Dr[t].label]:!n,"cursor-pointer":!n})},uU=e=>qe("inline-flex items-center ws-group",ks[e].spacing),dU=(e,t,r)=>qe("center-absolute rounded-xs transition-all duration-200 opacity-0 ws-checkbox-hover-target",ks[e].hoverSquare,{[Dr.negative.hoverSquare]:r,[Dr[t].hoverSquare]:!r}),fU=e=>`${ks[e].icon} text-body`,pU=e=>C.jsx("svg",{className:`absolute inset-0 ${e.className}`,fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg",...e,children:C.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",fill:"none"})}),Ft=T.forwardRef(({label:e,isDisabled:t=!1,isInvalid:r=!1,isRequired:n=!1,size:o="md",color:i="primary",onChange:a,onFocus:s,onBlur:c,value:u,defaultValue:d,name:p,id:h,...v},y)=>{const[g,b]=T.useState(d),x=u===!0||g===!0,w=u===null,E=x||w,S={isChecked:x,isIndeterminate:w,isDisabled:t,isInvalid:r},_=lU(o,i,S),O=cU(o,i,S),N=uU(o),R=dU(o,i,r),A=fU(o);return C.jsxs("label",{"data-qui":"Checkbox",className:N,children:[C.jsxs("div",{className:_,children:[C.jsx("input",{ref:y,type:"checkbox",className:"sr-only",checked:x,disabled:t,required:n,onChange:D=>{u===void 0&&b(D.target.checked),a==null||a(D)},onFocus:s,onBlur:c,name:p,id:h,...v}),E&&C.jsx("div",{className:"center-absolute",children:w?C.jsx(pU,{className:A}):C.jsx(vW,{className:A})}),!E&&!t&&C.jsx("div",{className:R})]}),e&&C.jsxs("span",{className:O,children:[e,n&&C.jsx("span",{className:"text-negative ml-1",children:"*"})]})]})});Ft.displayName="Checkbox";const Ms={sm:{container:"gap-2",radio:"size-3",label:"text-xs",dot:"size-2",hoverDot:"size-1.5"},md:{container:"gap-2.5",radio:"size-4",label:"text-sm",dot:"size-2.5",hoverDot:"size-2"},lg:{container:"gap-3",radio:"size-6",label:"text-base",dot:"size-4",hoverDot:"size-3"}},xs={primary:{radio:"border-body-light group-hover:border-body",radioInvalid:"border-negative",dot:"bg-primary group-hover:bg-primary-hover",hoverDot:"bg-primary-hover",label:"text-body"},positive:{radio:"border-positive group-hover:border-positive-text",radioInvalid:"border-negative",dot:"bg-positive group-hover:bg-positive-hover",hoverDot:"bg-positive-bg",label:"text-positive-text"},warning:{radio:"border-warning group-hover:border-warning-text",radioInvalid:"border-negative",dot:"bg-warning group-hover:bg-warning-hover",hoverDot:"bg-warning-bg",label:"text-warning-text"},negative:{radio:"border-negative group-hover:border-negative-text",radioInvalid:"border-negative",dot:"bg-negative group-hover:bg-negative-hover",hoverDot:"bg-negative-bg",label:"text-negative"}},hU=`
14
+ `,lU=(e,t,r)=>{const{isChecked:n,isIndeterminate:o,isDisabled:i,isInvalid:a}=r,s=n||o;return qe(sU,Ms[e].checkbox,{"cursor-pointer":!i},a?{[Dr.negative.checked]:s,[Dr.negative.unchecked]:!s,[Dr.negative.checkedHover]:!i&&s,[Dr.negative.focus]:!i,"border-panel-subtle":i}:{[Dr[t].checked]:s&&!i,[Dr[t].unchecked]:!s&&!i,[Dr[t].checkedHover]:!i&&s,[Dr[t].focus]:!i,"border-panel-subtle":i,"bg-panel-subtle":i&&s})},cU=(e,t,r)=>{const{isDisabled:n,isInvalid:o}=r;return qe(Ms[e].text,o?{[Dr.negative.label]:o}:{"text-muted":n,[Dr[t].label]:!n,"cursor-pointer":!n})},uU=e=>qe("inline-flex items-center ws-group",Ms[e].spacing),dU=(e,t,r)=>qe("center-absolute rounded-xs transition-all duration-200 opacity-0 ws-checkbox-hover-target",Ms[e].hoverSquare,{[Dr.negative.hoverSquare]:r,[Dr[t].hoverSquare]:!r}),fU=e=>`${Ms[e].icon} text-body`,pU=e=>C.jsx("svg",{className:`absolute inset-0 ${e.className}`,fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg",...e,children:C.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",fill:"none"})}),Ft=T.forwardRef(({label:e,isDisabled:t=!1,isInvalid:r=!1,isRequired:n=!1,size:o="md",color:i="primary",onChange:a,onFocus:s,onBlur:c,value:u,defaultValue:d,name:p,id:h,...v},y)=>{const[g,b]=T.useState(d),x=u===!0||g===!0,w=u===null,E=x||w,S={isChecked:x,isIndeterminate:w,isDisabled:t,isInvalid:r},_=lU(o,i,S),O=cU(o,i,S),N=uU(o),R=dU(o,i,r),A=fU(o);return C.jsxs("label",{"data-qui":"Checkbox",className:N,children:[C.jsxs("div",{className:_,children:[C.jsx("input",{ref:y,type:"checkbox",className:"sr-only",checked:x,disabled:t,required:n,onChange:D=>{u===void 0&&b(D.target.checked),a==null||a(D)},onFocus:s,onBlur:c,name:p,id:h,...v}),E&&C.jsx("div",{className:"center-absolute",children:w?C.jsx(pU,{className:A}):C.jsx(vW,{className:A})}),!E&&!t&&C.jsx("div",{className:R})]}),e&&C.jsxs("span",{className:O,children:[e,n&&C.jsx("span",{className:"text-negative ml-1",children:"*"})]})]})});Ft.displayName="Checkbox";const Ds={sm:{container:"gap-2",radio:"size-3",label:"text-xs",dot:"size-2",hoverDot:"size-1.5"},md:{container:"gap-2.5",radio:"size-4",label:"text-sm",dot:"size-2.5",hoverDot:"size-2"},lg:{container:"gap-3",radio:"size-6",label:"text-base",dot:"size-4",hoverDot:"size-3"}},_s={primary:{radio:"border-body-light group-hover:border-body",radioInvalid:"border-negative",dot:"bg-primary group-hover:bg-primary-hover",hoverDot:"bg-primary-hover",label:"text-body"},positive:{radio:"border-positive group-hover:border-positive-text",radioInvalid:"border-negative",dot:"bg-positive group-hover:bg-positive-hover",hoverDot:"bg-positive-bg",label:"text-positive-text"},warning:{radio:"border-warning group-hover:border-warning-text",radioInvalid:"border-negative",dot:"bg-warning group-hover:bg-warning-hover",hoverDot:"bg-warning-bg",label:"text-warning-text"},negative:{radio:"border-negative group-hover:border-negative-text",radioInvalid:"border-negative",dot:"bg-negative group-hover:bg-negative-hover",hoverDot:"bg-negative-bg",label:"text-negative"}},hU=`
15
15
  relative rounded-full border transition-all duration-200 ease-in-out bg-transparent
16
16
  focus:outline-hidden focus:ring-2 focus:ring-offset-0
17
17
  cursor-pointer peer
18
- `,vU=(e,t,r)=>{const{isDisabled:n,isInvalid:o}=r;return na(hU,Ms[e].radio,o?xs[t].radioInvalid:{[xs[t].radio]:!n,"cursor-not-allowed opacity-60":n})},gU=(e,t,r)=>{const{checked:n,isDisabled:o,isInvalid:i}=r;return na("center-absolute rounded-full transition-all duration-200 ease-in-out",Ms[e].dot,i?"bg-negative":{[xs[t].dot]:!o,"border-neutral":o,"opacity-0 scale-0":!n,"opacity-100 scale-100":n&&!o})},mU=(e,t,r)=>na("center-absolute rounded-full transition-all duration-200 opacity-0 group-hover:opacity-100",Ms[e].hoverDot,{[xs[t].hoverDot]:!r,"bg-negative-bg":r}),bU=(e,t,r)=>{const{isDisabled:n,isInvalid:o}=r;return na("cursor-pointer select-none transition-colors duration-200",Ms[e].label,o?{"text-negative":o}:{[xs[t].label]:!n,"text-muted":n})},yU=(e,t)=>na("inline-flex items-center group",Ms[e].container,t),wU=T.createContext(null),xU=()=>{const e=T.useContext(wU);if(!e)throw new Error("Radio.Item must be used within Radio.Group");return e},_U=T.forwardRef(({value:e,label:t,size:r,color:n,isDisabled:o,isInvalid:i,isRequired:a,className:s,...c},u)=>{const d=xU(),p=r??d.size,h=n??d.color,v=o??d.isDisabled,y=i??d.isInvalid,g=a??d.isRequired,b=d.value===e,x={checked:b,isDisabled:v,isInvalid:y},w=vU(p,h,x),E=gU(p,h,x),S=mU(p,h,y),_=bU(p,h,x),O=yU(p,s),N=()=>{v||d.onChange(e)};return C.jsxs("label",{"data-qui":"RadioItem",className:O,children:[C.jsxs("div",{className:"relative",children:[C.jsx("input",{ref:u,type:"radio",value:e,checked:b,disabled:v,required:g,"aria-invalid":y,"aria-label":t?void 0:c["aria-label"],name:d.name,onChange:N,className:"sr-only",...c}),C.jsxs("div",{className:w,children:[C.jsx("div",{className:E}),!b&&!v&&C.jsx("div",{className:S})]})]}),t&&C.jsxs("span",{className:_,children:[t,g&&C.jsx("span",{className:"text-negative ml-1",children:"*"})]})]})});_U.displayName="RadioItem";const k2={sm:{container:"h-4.5 p-1 rounded",text:"text-xxs"},md:{container:"h-6 p-1 rounded",text:"text-s"},lg:{container:"h-7 p-1 rounded",text:"text-sm"},xl:{container:"h-7.5 p-1 rounded",text:"text-lg"}},EU={primary:{bg:{solid:"bg-primary",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-button-text",outline:"text-primary",ghost:"text-primary"},border:{solid:"border-primary",outline:"border-primary",ghost:"border-transparent"},hover:{solid:"hover:bg-primary-hover hover:border-primary-hover",outline:"hover:border-black hover:text-primary-hover",ghost:"hover:bg-primary-hover hover:text-body"}},white:{bg:{solid:"bg-white",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-primary",outline:"text-body",ghost:"text-body"},border:{solid:"border-white",outline:"border-white",ghost:"border-transparent"},hover:{solid:"hover:bg-canvas-subtle hover:border-canvas-subtle",outline:"hover:border-canvas hover:text-canvas",ghost:"hover:bg-primary-hover hover:text-body"}},positive:{bg:{solid:"bg-positive",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-button-text",outline:"text-positive-text",ghost:"text-positive-text"},border:{solid:"border-positive",outline:"border-positive",ghost:"border-transparent"},hover:{solid:"hover:bg-positive-hover hover:border-positive-hover",outline:"hover:border-positive-hover hover:text-positive-hover",ghost:"hover:bg-positive-hover hover:text-body"}},warning:{bg:{solid:"bg-warning",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-button-text",outline:"text-warning-text",ghost:"text-warning-text"},border:{solid:"border-warning",outline:"border-warning",ghost:"border-transparent"},hover:{solid:"hover:bg-warning-hover hover:border-warning-hover",outline:"hover:border-warning-hover hover:text-warning-hover",ghost:"hover:bg-warning-hover hover:text-body"}},negative:{bg:{solid:"bg-negative",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-button-text",outline:"text-negative",ghost:"text-negative"},border:{solid:"border-negative",outline:"border-negative",ghost:"border-transparent"},hover:{solid:"hover:bg-negative-hover hover:border-negative-hover",outline:"hover:border-negative-hover hover:text-negative-hover",ghost:"hover:bg-negative-hover hover:text-body"}}},SU=(e,t,r,n)=>{const o=k2[e],i=EU[r],a=qe("inline-flex items-center justify-center font-medium transition-colors duration-200 focus:outline-hidden border",{"cursor-pointer":!n},o.container);return n?qe(a,"text-inactive-text",{"border-panel":t!=="ghost"&&t==="solid","border-panel-subtle":t==="outline","bg-panel":t==="solid","bg-transparent ":t==="outline"||t==="ghost","border-transparent":t==="ghost"}):qe(a,i.bg[t],i.text[t],i.hover[t],i.border[t])},OU=e=>qe("flex items-center justify-center gap-1",k2[e].text),CU=T.forwardRef(({size:e="md",variant:t="solid",color:r="primary",className:n,children:o,disabled:i,...a},s)=>C.jsx("button",{"data-qui":"Button",ref:s,type:"button",className:qe(SU(e,t,r,i),OU(e),n),disabled:i,...a,children:o}));CU.displayName="Button";const IU=T.createContext(null),M2=()=>{const e=T.useContext(IU);if(!e)throw new Error("Input components must be used within Input.Root");return e},D2={sm:{group:"h-5 min-h-fit",input:"text-2.25",message:"text-2.25 p-1.5",icon:"text-sm"},md:{group:"h-6 min-h-fit",input:"text-xs",message:"text-xs p-2",icon:"text-base"},lg:{group:"h-7 min-h-fit",input:"text-s",message:"text-s p-2.5",icon:"text-lg"}},j2={primary:{border:"border border-input-border focus-within:border-input-focus-border",borderInvalid:"ring-input-error-border",borderMessage:"ring-input-focus-border",text:"text-input-text",placeholder:"placeholder:text-input-placeholder",messageText:"text-input-message-text",messageBackground:"bg-input-message-bg",icon:"text-input-text",action:"text-input-text",actionHover:"hover:text-body hover:bg-primary-hover"},positive:{border:"border border-input-border focus-within:border-positive",borderInvalid:"ring-input-error-border",borderMessage:"ring-positive",text:"text-input-text",placeholder:"placeholder:text-input-placeholder",messageText:"text-positive-dark",messageBackground:"bg-positive-light",icon:"text-positive-text",action:"text-input-text",actionHover:"hover:text-body hover:bg-primary-hover"},warning:{border:"border border-input-border focus-within:border-input-warning-border",borderInvalid:"ring-input-error-border",borderMessage:"ring-input-warning-border",text:"text-input-text",placeholder:"placeholder:text-input-placeholder",messageText:"text-warning-dark",messageBackground:"bg-input-warning-bg",icon:"text-warning-text",action:"text-input-text",actionHover:"hover:text-body hover:bg-primary-hover"},negative:{border:"border border-input-border focus-within:border-input-error-border",borderInvalid:"ring-input-error-border",borderMessage:"ring-input-error-border",text:"text-input-text",placeholder:"placeholder:text-input-placeholder",messageText:"text-negative-dark",messageBackground:"bg-input-error-bg",icon:"text-negative",action:"text-input-text",actionHover:"hover:text-body hover:bg-primary-hover"}},RU=({size:e,color:t})=>qe("bg-transparent ring-0 w-full","focus:outline-hidden",[D2[e].input],j2[t].placeholder),nO=({size:e,color:t})=>qe("bg-transparent ring-0 w-full h-fit resize-none py-0.5","focus:outline-hidden",D2[e].input,j2[t].placeholder);function au(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var NU=typeof global=="object"&&global&&global.Object===Object&&global,PU=typeof self=="object"&&self&&self.Object===Object&&self,q2=NU||PU||Function("return this")(),yp=function(){return q2.Date.now()},TU=/\s/;function AU(e){for(var t=e.length;t--&&TU.test(e.charAt(t)););return t}var kU=/^\s+/;function MU(e){return e&&e.slice(0,AU(e)+1).replace(kU,"")}var su=q2.Symbol,L2=Object.prototype,DU=L2.hasOwnProperty,jU=L2.toString,qa=su?su.toStringTag:void 0;function qU(e){var t=DU.call(e,qa),r=e[qa];try{e[qa]=void 0;var n=!0}catch{}var o=jU.call(e);return n&&(t?e[qa]=r:delete e[qa]),o}var LU=Object.prototype,zU=LU.toString;function BU(e){return zU.call(e)}var FU="[object Null]",$U="[object Undefined]",oO=su?su.toStringTag:void 0;function HU(e){return e==null?e===void 0?$U:FU:oO&&oO in Object(e)?qU(e):BU(e)}function VU(e){return e!=null&&typeof e=="object"}var WU="[object Symbol]";function UU(e){return typeof e=="symbol"||VU(e)&&HU(e)==WU}var iO=NaN,GU=/^[-+]0x[0-9a-f]+$/i,KU=/^0b[01]+$/i,YU=/^0o[0-7]+$/i,XU=parseInt;function aO(e){if(typeof e=="number")return e;if(UU(e))return iO;if(au(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=au(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=MU(e);var r=KU.test(e);return r||YU.test(e)?XU(e.slice(2),r?2:8):GU.test(e)?iO:+e}var ZU="Expected a function",JU=Math.max,QU=Math.min;function Hc(e,t,r){var n,o,i,a,s,c,u=0,d=!1,p=!1,h=!0;if(typeof e!="function")throw new TypeError(ZU);t=aO(t)||0,au(r)&&(d=!!r.leading,p="maxWait"in r,i=p?JU(aO(r.maxWait)||0,t):i,h="trailing"in r?!!r.trailing:h);function v(O){var N=n,R=o;return n=o=void 0,u=O,a=e.apply(R,N),a}function y(O){return u=O,s=setTimeout(x,t),d?v(O):a}function g(O){var N=O-c,R=O-u,A=t-N;return p?QU(A,i-R):A}function b(O){var N=O-c,R=O-u;return c===void 0||N>=t||N<0||p&&R>=i}function x(){var O=yp();if(b(O))return w(O);s=setTimeout(x,g(O))}function w(O){return s=void 0,h&&n?v(O):(n=o=void 0,a)}function E(){s!==void 0&&clearTimeout(s),u=0,n=c=o=s=void 0}function S(){return s===void 0?a:w(yp())}function _(){var O=yp(),N=b(O);if(n=arguments,o=this,c=O,N){if(s===void 0)return y(c);if(p)return clearTimeout(s),s=setTimeout(x,t),v(c)}return s===void 0&&(s=setTimeout(x,t)),a}return _.cancel=E,_.flush=S,_}var e8="Expected a function";function t8(e,t,r){var n=!0,o=!0;if(typeof e!="function")throw new TypeError(e8);return au(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Hc(e,t,{leading:n,maxWait:t,trailing:o})}var ki=function(){return ki=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},ki.apply(this,arguments)};function z2(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function B2(e){return!e||!e.ownerDocument?document:e.ownerDocument}var F2=function(e){var t={},r=Array.prototype.reduce.call(e,function(n,o){var i=o.name.match(/data-simplebar-(.+)/);if(i){var a=i[1].replace(/\W+(.)/g,function(s,c){return c.toUpperCase()});switch(o.value){case"true":n[a]=!0;break;case"false":n[a]=!1;break;case void 0:n[a]=!0;break;default:n[a]=o.value}}return n},t);return r};function $2(e,t){var r;e&&(r=e.classList).add.apply(r,t.split(" "))}function H2(e,t){e&&t.split(" ").forEach(function(r){e.classList.remove(r)})}function V2(e){return".".concat(e.split(" ").join("."))}var Kx=!!(typeof window<"u"&&window.document&&window.document.createElement),r8=Object.freeze({__proto__:null,addClasses:$2,canUseDOM:Kx,classNamesToQuery:V2,getElementDocument:B2,getElementWindow:z2,getOptions:F2,removeClasses:H2}),Ti=null,sO=null;Kx&&window.addEventListener("resize",function(){sO!==window.devicePixelRatio&&(sO=window.devicePixelRatio,Ti=null)});function lO(){if(Ti===null){if(typeof document>"u")return Ti=0,Ti;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var r=t.getBoundingClientRect().right;e.removeChild(t),Ti=r}return Ti}var so=z2,wp=B2,n8=F2,lo=$2,co=H2,ar=V2,La=(function(){function e(t,r){r===void 0&&(r={});var n=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var o=so(n.el);n.scrollXTicking||(o.requestAnimationFrame(n.scrollX),n.scrollXTicking=!0),n.scrollYTicking||(o.requestAnimationFrame(n.scrollY),n.scrollYTicking=!0),n.isScrolling||(n.isScrolling=!0,lo(n.el,n.classNames.scrolling)),n.showScrollbar("x"),n.showScrollbar("y"),n.onStopScrolling()},this.scrollX=function(){n.axis.x.isOverflowing&&n.positionScrollbar("x"),n.scrollXTicking=!1},this.scrollY=function(){n.axis.y.isOverflowing&&n.positionScrollbar("y"),n.scrollYTicking=!1},this._onStopScrolling=function(){co(n.el,n.classNames.scrolling),n.options.autoHide&&(n.hideScrollbar("x"),n.hideScrollbar("y")),n.isScrolling=!1},this.onMouseEnter=function(){n.isMouseEntering||(lo(n.el,n.classNames.mouseEntered),n.showScrollbar("x"),n.showScrollbar("y"),n.isMouseEntering=!0),n.onMouseEntered()},this._onMouseEntered=function(){co(n.el,n.classNames.mouseEntered),n.options.autoHide&&(n.hideScrollbar("x"),n.hideScrollbar("y")),n.isMouseEntering=!1},this._onMouseMove=function(o){n.mouseX=o.clientX,n.mouseY=o.clientY,(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseMoveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseMoveForAxis("y")},this.onMouseLeave=function(){n.onMouseMove.cancel(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseLeaveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseLeaveForAxis("y"),n.mouseX=-1,n.mouseY=-1},this._onWindowResize=function(){n.scrollbarWidth=n.getScrollbarWidth(),n.hideNativeScrollbar()},this.onPointerEvent=function(o){if(!(!n.axis.x.track.el||!n.axis.y.track.el||!n.axis.x.scrollbar.el||!n.axis.y.scrollbar.el)){var i,a;n.axis.x.track.rect=n.axis.x.track.el.getBoundingClientRect(),n.axis.y.track.rect=n.axis.y.track.el.getBoundingClientRect(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&(i=n.isWithinBounds(n.axis.x.track.rect)),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&(a=n.isWithinBounds(n.axis.y.track.rect)),(i||a)&&(o.stopPropagation(),o.type==="pointerdown"&&o.pointerType!=="touch"&&(i&&(n.axis.x.scrollbar.rect=n.axis.x.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.x.scrollbar.rect)?n.onDragStart(o,"x"):n.onTrackClick(o,"x")),a&&(n.axis.y.scrollbar.rect=n.axis.y.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.y.scrollbar.rect)?n.onDragStart(o,"y"):n.onTrackClick(o,"y"))))}},this.drag=function(o){var i,a,s,c,u,d,p,h,v,y,g;if(!(!n.draggedAxis||!n.contentWrapperEl)){var b,x=n.axis[n.draggedAxis].track,w=(a=(i=x.rect)===null||i===void 0?void 0:i[n.axis[n.draggedAxis].sizeAttr])!==null&&a!==void 0?a:0,E=n.axis[n.draggedAxis].scrollbar,S=(c=(s=n.contentWrapperEl)===null||s===void 0?void 0:s[n.axis[n.draggedAxis].scrollSizeAttr])!==null&&c!==void 0?c:0,_=parseInt((d=(u=n.elStyles)===null||u===void 0?void 0:u[n.axis[n.draggedAxis].sizeAttr])!==null&&d!==void 0?d:"0px",10);o.preventDefault(),o.stopPropagation(),n.draggedAxis==="y"?b=o.pageY:b=o.pageX;var O=b-((h=(p=x.rect)===null||p===void 0?void 0:p[n.axis[n.draggedAxis].offsetAttr])!==null&&h!==void 0?h:0)-n.axis[n.draggedAxis].dragOffset;O=n.draggedAxis==="x"&&n.isRtl?((y=(v=x.rect)===null||v===void 0?void 0:v[n.axis[n.draggedAxis].sizeAttr])!==null&&y!==void 0?y:0)-E.size-O:O;var N=O/(w-E.size),R=N*(S-_);n.draggedAxis==="x"&&n.isRtl&&(R=!((g=e.getRtlHelpers())===null||g===void 0)&&g.isScrollingToNegative?-R:R),n.contentWrapperEl[n.axis[n.draggedAxis].scrollOffsetAttr]=R}},this.onEndDrag=function(o){n.isDragging=!1;var i=wp(n.el),a=so(n.el);o.preventDefault(),o.stopPropagation(),co(n.el,n.classNames.dragging),n.onStopScrolling(),i.removeEventListener("mousemove",n.drag,!0),i.removeEventListener("mouseup",n.onEndDrag,!0),n.removePreventClickId=a.setTimeout(function(){i.removeEventListener("click",n.preventClick,!0),i.removeEventListener("dblclick",n.preventClick,!0),n.removePreventClickId=null})},this.preventClick=function(o){o.preventDefault(),o.stopPropagation()},this.el=t,this.options=ki(ki({},e.defaultOptions),r),this.classNames=ki(ki({},e.defaultOptions.classNames),r.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=t8(this._onMouseMove,64),this.onWindowResize=Hc(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=Hc(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=Hc(this._onMouseEntered,this.stopScrollDelay),this.init()}return e.getRtlHelpers=function(){if(e.rtlHelpers)return e.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var r=t.firstElementChild,n=r==null?void 0:r.firstElementChild;if(!n)return null;document.body.appendChild(r),r.scrollLeft=0;var o=e.getOffset(r),i=e.getOffset(n);r.scrollLeft=-999;var a=e.getOffset(n);return document.body.removeChild(r),e.rtlHelpers={isScrollOriginAtZero:o.left!==i.left,isScrollingToNegative:i.left!==a.left},e.rtlHelpers},e.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:lO()}catch{return lO()}},e.getOffset=function(t){var r=t.getBoundingClientRect(),n=wp(t),o=so(t);return{top:r.top+(o.pageYOffset||n.documentElement.scrollTop),left:r.left+(o.pageXOffset||n.documentElement.scrollLeft)}},e.prototype.init=function(){Kx&&(this.initDOM(),this.rtlHelpers=e.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.prototype.initDOM=function(){var t,r;this.wrapperEl=this.el.querySelector(ar(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(ar(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(ar(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(ar(this.classNames.offset)),this.maskEl=this.el.querySelector(ar(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,ar(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(ar(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(ar(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(ar(this.classNames.track)).concat(ar(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(ar(this.classNames.track)).concat(ar(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(ar(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((r=this.axis.y.track.el)===null||r===void 0?void 0:r.querySelector(ar(this.classNames.scrollbar)))||null,this.options.autoHide||(lo(this.axis.x.scrollbar.el,this.classNames.visible),lo(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t=this,r,n=so(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(r=this.contentWrapperEl)===null||r===void 0||r.addEventListener("scroll",this.onScroll),n.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var o=!1,i=n.ResizeObserver||ResizeObserver;this.resizeObserver=new i(function(){o&&n.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),n.requestAnimationFrame(function(){o=!0})}this.mutationObserver=new n.MutationObserver(function(){n.requestAnimationFrame(function(){t.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},e.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var t=so(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var r=this.contentEl.offsetWidth,n=this.heightAutoObserverEl.offsetHeight<=1,o=this.heightAutoObserverEl.offsetWidth<=1||r>0,i=this.contentWrapperEl.offsetWidth,a=this.elStyles.overflowX,s=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var c=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=n?"auto":"100%",this.placeholderEl.style.width=o?"".concat(r||u,"px"):"auto",this.placeholderEl.style.height="".concat(c,"px");var d=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=r!==0&&u>r,this.axis.y.isOverflowing=c>d,this.axis.x.isOverflowing=a==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=s==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var p=this.axis.x.isOverflowing?this.scrollbarWidth:0,h=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>i-h,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&c>d-p,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},e.prototype.getScrollbarSize=function(t){var r,n;if(t===void 0&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var o=this.contentEl[this.axis[t].scrollSizeAttr],i=(n=(r=this.axis[t].track.el)===null||r===void 0?void 0:r[this.axis[t].offsetSizeAttr])!==null&&n!==void 0?n:0,a=i/o,s;return s=Math.max(~~(a*i),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(s=Math.min(s,this.options.scrollbarMaxSize)),s},e.prototype.positionScrollbar=function(t){var r,n,o;t===void 0&&(t="y");var i=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!i.el||!this.elStyles)){var a=this.contentWrapperEl[this.axis[t].scrollSizeAttr],s=((r=this.axis[t].track.el)===null||r===void 0?void 0:r[this.axis[t].offsetSizeAttr])||0,c=parseInt(this.elStyles[this.axis[t].sizeAttr],10),u=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];u=t==="x"&&this.isRtl&&!((n=e.getRtlHelpers())===null||n===void 0)&&n.isScrollOriginAtZero?-u:u,t==="x"&&this.isRtl&&(u=!((o=e.getRtlHelpers())===null||o===void 0)&&o.isScrollingToNegative?u:-u);var d=u/(a-c),p=~~((s-i.size)*d);p=t==="x"&&this.isRtl?-p+(s-i.size):p,i.el.style.transform=t==="x"?"translate3d(".concat(p,"px, 0, 0)"):"translate3d(0, ".concat(p,"px, 0)")}},e.prototype.toggleTrackVisibility=function(t){t===void 0&&(t="y");var r=this.axis[t].track.el,n=this.axis[t].scrollbar.el;!r||!n||!this.contentWrapperEl||(this.axis[t].isOverflowing||this.axis[t].forceVisible?(r.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(r.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?n.style.display="block":n.style.display="none")},e.prototype.showScrollbar=function(t){t===void 0&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(lo(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},e.prototype.hideScrollbar=function(t){t===void 0&&(t="y"),!this.isDragging&&this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(co(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},e.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},e.prototype.onMouseMoveForAxis=function(t){t===void 0&&(t="y");var r=this.axis[t];!r.track.el||!r.scrollbar.el||(r.track.rect=r.track.el.getBoundingClientRect(),r.scrollbar.rect=r.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(r.track.rect)?(this.showScrollbar(t),lo(r.track.el,this.classNames.hover),this.isWithinBounds(r.scrollbar.rect)?lo(r.scrollbar.el,this.classNames.hover):co(r.scrollbar.el,this.classNames.hover)):(co(r.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),co(this.axis[t].track.el,this.classNames.hover),co(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},e.prototype.onDragStart=function(t,r){var n;r===void 0&&(r="y"),this.isDragging=!0;var o=wp(this.el),i=so(this.el),a=this.axis[r].scrollbar,s=r==="y"?t.pageY:t.pageX;this.axis[r].dragOffset=s-(((n=a.rect)===null||n===void 0?void 0:n[this.axis[r].offsetAttr])||0),this.draggedAxis=r,lo(this.el,this.classNames.dragging),o.addEventListener("mousemove",this.drag,!0),o.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(o.addEventListener("click",this.preventClick,!0),o.addEventListener("dblclick",this.preventClick,!0)):(i.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.prototype.onTrackClick=function(t,r){var n=this,o,i,a,s;r===void 0&&(r="y");var c=this.axis[r];if(!(!this.options.clickOnTrack||!c.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var u=so(this.el);this.axis[r].scrollbar.rect=c.scrollbar.el.getBoundingClientRect();var d=this.axis[r].scrollbar,p=(i=(o=d.rect)===null||o===void 0?void 0:o[this.axis[r].offsetAttr])!==null&&i!==void 0?i:0,h=parseInt((s=(a=this.elStyles)===null||a===void 0?void 0:a[this.axis[r].sizeAttr])!==null&&s!==void 0?s:"0px",10),v=this.contentWrapperEl[this.axis[r].scrollOffsetAttr],y=r==="y"?this.mouseY-p:this.mouseX-p,g=y<0?-1:1,b=g===-1?v-h:v+h,x=40,w=function(){n.contentWrapperEl&&(g===-1?v>b&&(v-=x,n.contentWrapperEl[n.axis[r].scrollOffsetAttr]=v,u.requestAnimationFrame(w)):v<b&&(v+=x,n.contentWrapperEl[n.axis[r].scrollOffsetAttr]=v,u.requestAnimationFrame(w)))};w()}},e.prototype.getContentElement=function(){return this.contentEl},e.prototype.getScrollElement=function(){return this.contentWrapperEl},e.prototype.removeListeners=function(){var t=so(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},e.prototype.unMount=function(){this.removeListeners()},e.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.prototype.findChild=function(t,r){var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,function(o){return n.call(o,r)})[0]},e.rtlHelpers=null,e.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},e.getOptions=n8,e.helpers=r8,e})(),wr=function(){return wr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},wr.apply(this,arguments)};function o8(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}var Yx=ue.forwardRef(function(e,t){var r=e.children,n=e.scrollableNodeProps,o=n===void 0?{}:n,i=o8(e,["children","scrollableNodeProps"]),a=ue.useRef(),s=ue.useRef(),c=ue.useRef(),u={},d={};Object.keys(i).forEach(function(v){Object.prototype.hasOwnProperty.call(La.defaultOptions,v)?u[v]=i[v]:d[v]=i[v]});var p=wr(wr({},La.defaultOptions.classNames),u.classNames),h=wr(wr({},o),{className:"".concat(p.contentWrapper).concat(o.className?" ".concat(o.className):""),tabIndex:u.tabIndex||La.defaultOptions.tabIndex,role:"region","aria-label":u.ariaLabel||La.defaultOptions.ariaLabel});return ue.useEffect(function(){var v;return s.current=h.ref?h.ref.current:s.current,a.current&&(v=new La(a.current,wr(wr(wr({},u),s.current&&{scrollableNode:s.current}),c.current&&{contentNode:c.current})),typeof t=="function"?t(v):t&&(t.current=v)),function(){v==null||v.unMount(),v=null,typeof t=="function"&&t(null)}},[]),ue.createElement("div",wr({"data-simplebar":"init",ref:a},d),ue.createElement("div",{className:p.wrapper},ue.createElement("div",{className:p.heightAutoObserverWrapperEl},ue.createElement("div",{className:p.heightAutoObserverEl})),ue.createElement("div",{className:p.mask},ue.createElement("div",{className:p.offset},typeof r=="function"?r({scrollableNodeRef:s,scrollableNodeProps:wr(wr({},h),{ref:s}),contentNodeRef:c,contentNodeProps:{className:p.contentEl,ref:c}}):ue.createElement("div",wr({},h),ue.createElement("div",{className:p.contentEl},r)))),ue.createElement("div",{className:p.placeholder})),ue.createElement("div",{className:"".concat(p.track," ").concat(p.horizontal)},ue.createElement("div",{className:p.scrollbar})),ue.createElement("div",{className:"".concat(p.track," ").concat(p.vertical)},ue.createElement("div",{className:p.scrollbar})))});Yx.displayName="SimpleBar";const i8=T.forwardRef(({className:e,...t},r)=>{const{size:n,color:o,isInvalid:i,isDisabled:a}=M2(),{isDisabled:s,isReadOnly:c,...u}=t;return C.jsx("input",{ref:r,disabled:a||s,readOnly:c||!1,"aria-invalid":i,className:qe(RU({size:n,color:o}),e),...u})});T.forwardRef(({className:e,autoHeight:t,...r},n)=>{const{size:o,color:i,isInvalid:a,isDisabled:s,setHasArea:c}=M2(),u=T.useRef(null),d=n||u,p=T.useRef(null);T.useEffect(()=>(c(!0),()=>{c(!1)}),[c]);const h=T.useCallback(()=>{if(u.current){const w=u.current;w.style.height="auto",w.style.height=`${w.scrollHeight}px`}},[]),v=w=>{var E;h(),(E=r.onInput)==null||E.call(r,w)};T.useEffect(()=>{h()},[h,r.value]);const y=w=>{w.preventDefault();const E=p.current;if(!E)return;const S=w.clientY,_=E.offsetHeight,O=R=>{const A=_+(R.clientY-S);A>30&&(E.style.height=A+"px")},N=()=>{document.removeEventListener("mousemove",O),document.removeEventListener("mouseup",N)};document.addEventListener("mousemove",O),document.addEventListener("mouseup",N)},{isDisabled:g,isReadOnly:b,...x}=r;return C.jsxs("div",{ref:p,className:"w-full relative",style:t?void 0:{height:"120px"},children:[t?C.jsx("textarea",{ref:d,rows:1,className:qe(nO({size:o,color:i}),e),disabled:s||g,onInput:v,readOnly:b||!1,"aria-invalid":a,style:{overflow:"hidden"},...x}):C.jsx(Yx,{style:{height:"100%"},children:C.jsx("textarea",{ref:d,rows:1,className:qe(nO({size:o,color:i}),e),disabled:s||g,onInput:v,readOnly:b||!1,"aria-invalid":a,style:{height:"auto",overflow:"hidden",width:"100%"},...x})}),!t&&C.jsx("div",{className:"absolute right-0 bottom-0 -translate-x-full -translate-y-full size-1.75 text-sm cursor-se-resize z-10",onMouseDown:y,children:C.jsx(gW,{})})]})});i8.displayName="InputField";const _s={primary:{container:"bg-primary-light",text:"text-primary-dark",icon:"text-primary-dark",button:"hover:bg-primary-hover hover:text-body"},positive:{container:"bg-positive-light",text:"text-positive-dark",icon:"text-positive-dark",button:"hover:bg-positive hover:text-body"},negative:{container:"bg-negative-light",text:"text-negative-dark",icon:"text-negative-dark",button:"hover:bg-negative hover:text-body"},warning:{container:"bg-warning-light",text:"text-warning-dark",icon:"text-warning-dark",button:"hover:bg-warning hover:text-body"}},a8=({color:e})=>qe("h-6 absolute py-0.5 px-1 rounded whitespace-nowrap flex items-center gap-1",_s[e].container,_s[e].icon),s8=({color:e})=>qe("text-xs font-medium leading-3",_s[e].text),l8=({color:e})=>qe("p-0.5 rounded cursor-pointer",_s[e].button,_s[e].icon),c8=({label:e,color:t="primary",position:r="up",showCloseButton:n=!1,icon:o,children:i,delay:a=2e3,trigger:s="hover"})=>{const[c,u]=T.useState(!1),[d,p]=T.useState(!1),[h,v]=T.useState({position:r,transform:""}),y=T.useRef(null),g=T.useRef(null),b=T.useRef(null),x=T.useCallback(()=>{if(!y.current||!g.current)return;const R=y.current.getBoundingClientRect(),A=g.current.getBoundingClientRect(),D=window.innerWidth,B=window.innerHeight,j=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth,D),M=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight,B),P=4;let V=r,q={position:V,transform:""};const G={up:{fits:R.top-A.height-P>=0,styles:{bottom:`calc(100% + ${P}px)`,left:"50%",transform:"translateX(-50%)"}},"up-start":{fits:R.top-A.height-P>=0&&R.left+A.width<=D,styles:{bottom:`calc(100% + ${P}px)`,left:"0",transform:"translateX(0)"}},"up-end":{fits:R.top-A.height-P>=0&&R.right-A.width>=0,styles:{bottom:`calc(100% + ${P}px)`,right:"0",transform:"translateX(0)"}},down:{fits:R.bottom+A.height+P<=B&&R.bottom+A.height+P<=M,styles:{top:`calc(100% + ${P}px)`,left:"50%",transform:"translateX(-50%)"}},"down-start":{fits:R.bottom+A.height+P<=B&&R.bottom+A.height+P<=M&&R.left+A.width<=D,styles:{top:`calc(100% + ${P}px)`,left:"0",transform:"translateX(0)"}},"down-end":{fits:R.bottom+A.height+P<=B&&R.bottom+A.height+P<=M&&R.right-A.width>=0,styles:{top:`calc(100% + ${P}px)`,right:"0",transform:"translateX(0)"}},left:{fits:R.left-A.width-P>=0,styles:{right:`calc(100% + ${P}px)`,top:"50%",transform:"translateY(-50%)"}},"left-start":{fits:R.left-A.width-P>=0&&R.top+A.height<=B,styles:{right:`calc(100% + ${P}px)`,top:"0",transform:"translateY(0)"}},"left-end":{fits:R.left-A.width-P>=0&&R.bottom-A.height>=0,styles:{right:`calc(100% + ${P}px)`,bottom:"0",transform:"translateY(0)"}},right:{fits:R.right+A.width+P<=D&&R.right+A.width+P<=j,styles:{left:`calc(100% + ${P}px)`,top:"50%",transform:"translateY(-50%)"}},"right-start":{fits:R.right+A.width+P<=D&&R.right+A.width+P<=j&&R.top+A.height<=B,styles:{left:`calc(100% + ${P}px)`,top:"0",transform:"translateY(0)"}},"right-end":{fits:R.right+A.width+P<=D&&R.right+A.width+P<=j&&R.bottom-A.height>=0,styles:{left:`calc(100% + ${P}px)`,bottom:"0",transform:"translateY(0)"}}},W=R.left+R.width/2-A.width/2,Q=R.left+R.width/2+A.width/2;if((r==="up"||r==="down")&&(W<0||Q>D)&&(G[r].fits=!1),G[r].fits)q={position:r,...G[r].styles};else{const z=["up","up-start","up-end","down","down-start","down-end","right","right-start","right-end","left","left-start","left-end"].find(U=>G[U].fits);if(z)V=z,q={position:V,...G[z].styles};else{const U={up:R.top,"up-start":R.top,"up-end":R.top,down:Math.min(B-R.bottom,M-R.bottom),"down-start":Math.min(B-R.bottom,M-R.bottom),"down-end":Math.min(B-R.bottom,M-R.bottom),left:R.left,"left-start":R.left,"left-end":R.left,right:Math.min(D-R.right,j-R.right),"right-start":Math.min(D-R.right,j-R.right),"right-end":Math.min(D-R.right,j-R.right)},ie=Object.entries(U).reduce((te,[$,K])=>K>te.space?{position:$,space:K}:te,{position:"up",space:0}).position;V=ie,q={position:V,...G[ie].styles}}}v(q)},[r]),w=()=>{s==="click"&&(u(!0),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{d||u(!1)},a))},E=R=>{R.stopPropagation(),u(!1),b.current&&clearTimeout(b.current)},S=()=>{p(!0),b.current&&clearTimeout(b.current)},_=()=>{p(!1),c&&(b.current=setTimeout(()=>{u(!1)},a))},O=()=>{s==="hover"&&u(!0)},N=()=>{s==="hover"&&u(!1)};return T.useEffect(()=>{if(c&&g.current){const R=requestAnimationFrame(()=>{x()});return()=>cancelAnimationFrame(R)}},[c,e,x]),T.useEffect(()=>{const R=()=>{c&&x()},A=()=>{c&&x()};return window.addEventListener("resize",R),window.addEventListener("scroll",A,!0),()=>{window.removeEventListener("resize",R),window.removeEventListener("scroll",A,!0),b.current&&clearTimeout(b.current)}},[c,x]),C.jsxs("div",{"data-qui":"Tooltip",ref:y,onClick:w,onMouseEnter:O,onMouseLeave:N,className:"relative h-full flex items-center",children:[i,c&&C.jsxs("div",{ref:g,role:"tooltip",className:a8({color:t}),style:{position:"absolute",left:h.left,right:h.right,top:h.top,bottom:h.bottom,transform:h.transform,zIndex:1e3},onMouseEnter:S,onMouseLeave:_,children:[o&&C.jsx("span",{children:o}),C.jsx("p",{className:s8({color:t}),children:e}),n&&C.jsx("div",{onClick:E,className:l8({color:t}),role:"button",children:C.jsx(b2,{})})]})]})};var cO;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(cO||(cO={}));const u8=Object.freeze({x:0,y:0});var Mi;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Mi||(Mi={}));var uO;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(uO||(uO={}));var qr;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(qr||(qr={}));qr.Space,qr.Enter,qr.Esc,qr.Space,qr.Enter,qr.Tab;var dO;(function(e){e[e.RightClick=2]="RightClick"})(dO||(dO={}));var fO;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(fO||(fO={}));var pO;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(pO||(pO={}));Mi.Backward+"",Mi.Forward+"",Mi.Backward+"",Mi.Forward+"";var lx;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(lx||(lx={}));var cx;(function(e){e.Optimized="optimized"})(cx||(cx={}));lx.WhileDragging,cx.Optimized;({...u8});var hO;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(hO||(hO={}));qr.Down,qr.Right,qr.Up,qr.Left;const d8=(e,t)=>{const r=qe("group flex items-center justify-between space-x-4","rounded-t px-2 text-xs","focus:outline-hidden");return e&&!t?qe(r,"z-2 border border-b-0 border-tab-border","bg-tab-active-bg font-semibold text-tab-active-fg"):t&&!e?qe(r,"border border-transparent bg-tab-inactive-bg text-inactive-text"):qe(r,"border border-transparent bg-tab-inactive-bg text-tab-inactive-fg","hover:text-tab-active-fg")},f8=T.forwardRef(({isActive:e=!1,isDesactive:t=!1,children:r,...n},o)=>C.jsx("div",{"data-qui":"TabNavContainer",className:d8(e,t),ref:o,...n,children:r}));f8.displayName="TabNavContainer";var Rt=function(){return Rt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Rt.apply(this,arguments)},vO={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},gO={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},cc={width:"20px",height:"20px",position:"absolute",zIndex:1},p8={top:Rt(Rt({},vO),{top:"-5px"}),right:Rt(Rt({},gO),{left:void 0,right:"-5px"}),bottom:Rt(Rt({},vO),{top:void 0,bottom:"-5px"}),left:Rt(Rt({},gO),{left:"-5px"}),topRight:Rt(Rt({},cc),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Rt(Rt({},cc),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Rt(Rt({},cc),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Rt(Rt({},cc),{left:"-10px",top:"-10px",cursor:"nw-resize"})},h8=T.memo(function(e){var t=e.onResizeStart,r=e.direction,n=e.children,o=e.replaceStyles,i=e.className,a=T.useCallback(function(u){t(u,r)},[t,r]),s=T.useCallback(function(u){t(u,r)},[t,r]),c=T.useMemo(function(){return Rt(Rt({position:"absolute",userSelect:"none"},p8[r]),o??{})},[o,r]);return C.jsx("div",{className:i||void 0,style:c,onMouseDown:a,onTouchStart:s,children:n})}),v8=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),gn=function(){return gn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},gn.apply(this,arguments)},g8={width:"auto",height:"auto"},uc=function(e,t,r){return Math.max(Math.min(e,r),t)},mO=function(e,t,r){var n=Math.round(e/t);return n*t+r*(n-1)},Oi=function(e,t){return new RegExp(e,"i").test(t)},dc=function(e){return!!(e.touches&&e.touches.length)},m8=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},bO=function(e,t,r){r===void 0&&(r=0);var n=t.reduce(function(i,a,s){return Math.abs(a-e)<Math.abs(t[i]-e)?s:i},0),o=Math.abs(t[n]-e);return r===0||o<r?t[n]:e},xp=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},fc=function(e,t,r,n){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var o=Number(e.replace("%",""))/100;return t*o}if(e.endsWith("vw")){var o=Number(e.replace("vw",""))/100;return r*o}if(e.endsWith("vh")){var o=Number(e.replace("vh",""))/100;return n*o}}return e},b8=function(e,t,r,n,o,i,a){return n=fc(n,e.width,t,r),o=fc(o,e.height,t,r),i=fc(i,e.width,t,r),a=fc(a,e.height,t,r),{maxWidth:typeof n>"u"?void 0:Number(n),maxHeight:typeof o>"u"?void 0:Number(o),minWidth:typeof i>"u"?void 0:Number(i),minHeight:typeof a>"u"?void 0:Number(a)}},y8=function(e){return Array.isArray(e)?e:[e,e]},w8=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],yO="__resizable_base__",x8=(function(e){v8(t,e);function t(r){var n,o,i,a,s=e.call(this,r)||this;return s.ratio=1,s.resizable=null,s.parentLeft=0,s.parentTop=0,s.resizableLeft=0,s.resizableRight=0,s.resizableTop=0,s.resizableBottom=0,s.targetLeft=0,s.targetTop=0,s.delta={width:0,height:0},s.appendBase=function(){if(!s.resizable||!s.window)return null;var c=s.parentNode;if(!c)return null;var u=s.window.document.createElement("div");return u.style.width="100%",u.style.height="100%",u.style.position="absolute",u.style.transform="scale(0, 0)",u.style.left="0",u.style.flex="0 0 100%",u.classList?u.classList.add(yO):u.className+=yO,c.appendChild(u),u},s.removeBase=function(c){var u=s.parentNode;u&&u.removeChild(c)},s.state={isResizing:!1,width:(o=(n=s.propsSize)===null||n===void 0?void 0:n.width)!==null&&o!==void 0?o:"auto",height:(a=(i=s.propsSize)===null||i===void 0?void 0:i.height)!==null&&a!==void 0?a:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},s.onResizeStart=s.onResizeStart.bind(s),s.onMouseMove=s.onMouseMove.bind(s),s.onMouseUp=s.onMouseUp.bind(s),s}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||g8},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var r=0,n=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,i=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),r=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:o,n=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:i,this.resizable.style.position=a}return{width:r,height:n}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var r=this,n=this.props.size,o=function(s){var c;if(typeof r.state[s]>"u"||r.state[s]==="auto")return"auto";if(r.propsSize&&r.propsSize[s]&&!((c=r.propsSize[s])===null||c===void 0)&&c.toString().endsWith("%")){if(r.state[s].toString().endsWith("%"))return r.state[s].toString();var u=r.getParentSize(),d=Number(r.state[s].toString().replace("px","")),p=d/u[s]*100;return"".concat(p,"%")}return xp(r.state[s])},i=n&&typeof n.width<"u"&&!this.state.isResizing?xp(n.width):o("width"),a=n&&typeof n.height<"u"&&!this.state.isResizing?xp(n.height):o("height");return{width:i,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var r=this.appendBase();if(!r)return{width:0,height:0};var n=!1,o=this.parentNode.style.flexWrap;o!=="wrap"&&(n=!0,this.parentNode.style.flexWrap="wrap"),r.style.position="relative",r.style.minWidth="100%",r.style.minHeight="100%";var i={width:r.offsetWidth,height:r.offsetHeight};return n&&(this.parentNode.style.flexWrap=o),this.removeBase(r),i},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var r=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:r.flexBasis!=="auto"?r.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(r,n){var o=this.propsSize&&this.propsSize[n];return this.state[n]==="auto"&&this.state.original[n]===r&&(typeof o>"u"||o==="auto")?"auto":r},t.prototype.calculateNewMaxFromBoundary=function(r,n){var o=this.props.boundsByDirection,i=this.state.direction,a=o&&Oi("left",i),s=o&&Oi("top",i),c,u;if(this.props.bounds==="parent"){var d=this.parentNode;d&&(c=a?this.resizableRight-this.parentLeft:d.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:d.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(c=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(c=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return c&&Number.isFinite(c)&&(r=r&&r<c?r:c),u&&Number.isFinite(u)&&(n=n&&n<u?n:u),{maxWidth:r,maxHeight:n}},t.prototype.calculateNewSizeFromDirection=function(r,n){var o=this.props.scale||1,i=y8(this.props.resizeRatio||1),a=i[0],s=i[1],c=this.state,u=c.direction,d=c.original,p=this.props,h=p.lockAspectRatio,v=p.lockAspectRatioExtraHeight,y=p.lockAspectRatioExtraWidth,g=d.width,b=d.height,x=v||0,w=y||0;return Oi("right",u)&&(g=d.width+(r-d.x)*a/o,h&&(b=(g-w)/this.ratio+x)),Oi("left",u)&&(g=d.width-(r-d.x)*a/o,h&&(b=(g-w)/this.ratio+x)),Oi("bottom",u)&&(b=d.height+(n-d.y)*s/o,h&&(g=(b-x)*this.ratio+w)),Oi("top",u)&&(b=d.height-(n-d.y)*s/o,h&&(g=(b-x)*this.ratio+w)),{newWidth:g,newHeight:b}},t.prototype.calculateNewSizeFromAspectRatio=function(r,n,o,i){var a=this.props,s=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,d=typeof i.width>"u"?10:i.width,p=typeof o.width>"u"||o.width<0?r:o.width,h=typeof i.height>"u"?10:i.height,v=typeof o.height>"u"||o.height<0?n:o.height,y=c||0,g=u||0;if(s){var b=(h-y)*this.ratio+g,x=(v-y)*this.ratio+g,w=(d-g)/this.ratio+y,E=(p-g)/this.ratio+y,S=Math.max(d,b),_=Math.min(p,x),O=Math.max(h,w),N=Math.min(v,E);r=uc(r,S,_),n=uc(n,O,N)}else r=uc(r,d,p),n=uc(n,h,v);return{newWidth:r,newHeight:n}},t.prototype.setBoundingClientRect=function(){var r=1/(this.props.scale||1);if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var o=n.getBoundingClientRect();this.parentLeft=o.left*r,this.parentTop=o.top*r}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left*r,this.targetTop=i.top*r}if(this.resizable){var a=this.resizable.getBoundingClientRect(),s=a.left,c=a.top,u=a.right,d=a.bottom;this.resizableLeft=s*r,this.resizableRight=u*r,this.resizableTop=c*r,this.resizableBottom=d*r}},t.prototype.onResizeStart=function(r,n){if(!(!this.resizable||!this.window)){var o=0,i=0;if(r.nativeEvent&&m8(r.nativeEvent)?(o=r.nativeEvent.clientX,i=r.nativeEvent.clientY):r.nativeEvent&&dc(r.nativeEvent)&&(o=r.nativeEvent.touches[0].clientX,i=r.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(r,n,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,c=this.window.getComputedStyle(this.resizable);if(c.flexBasis!=="auto"){var u=this.parentNode;if(u){var d=this.window.getComputedStyle(u).flexDirection;this.flexDir=d.startsWith("row")?"row":"column",s=c.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var p={original:{x:o,y:i,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:gn(gn({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(r.target).cursor||"auto"}),direction:n,flexBasis:s};this.setState(p)}},t.prototype.onMouseMove=function(r){var n=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&dc(r))try{r.preventDefault(),r.stopPropagation()}catch{}var o=this.props,i=o.maxWidth,a=o.maxHeight,s=o.minWidth,c=o.minHeight,u=dc(r)?r.touches[0].clientX:r.clientX,d=dc(r)?r.touches[0].clientY:r.clientY,p=this.state,h=p.direction,v=p.original,y=p.width,g=p.height,b=this.getParentSize(),x=b8(b,this.window.innerWidth,this.window.innerHeight,i,a,s,c);i=x.maxWidth,a=x.maxHeight,s=x.minWidth,c=x.minHeight;var w=this.calculateNewSizeFromDirection(u,d),E=w.newHeight,S=w.newWidth,_=this.calculateNewMaxFromBoundary(i,a);this.props.snap&&this.props.snap.x&&(S=bO(S,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(E=bO(E,this.props.snap.y,this.props.snapGap));var O=this.calculateNewSizeFromAspectRatio(S,E,{width:_.maxWidth,height:_.maxHeight},{width:s,height:c});if(S=O.newWidth,E=O.newHeight,this.props.grid){var N=mO(S,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),R=mO(E,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),A=this.props.snapGap||0,D=A===0||Math.abs(N-S)<=A?N:S,B=A===0||Math.abs(R-E)<=A?R:E;S=D,E=B}var j={width:S-v.width,height:E-v.height};if(this.delta=j,y&&typeof y=="string"){if(y.endsWith("%")){var M=S/b.width*100;S="".concat(M,"%")}else if(y.endsWith("vw")){var P=S/this.window.innerWidth*100;S="".concat(P,"vw")}else if(y.endsWith("vh")){var V=S/this.window.innerHeight*100;S="".concat(V,"vh")}}if(g&&typeof g=="string"){if(g.endsWith("%")){var M=E/b.height*100;E="".concat(M,"%")}else if(g.endsWith("vw")){var P=E/this.window.innerWidth*100;E="".concat(P,"vw")}else if(g.endsWith("vh")){var V=E/this.window.innerHeight*100;E="".concat(V,"vh")}}var q={width:this.createSizeForCssProperty(S,"width"),height:this.createSizeForCssProperty(E,"height")};this.flexDir==="row"?q.flexBasis=q.width:this.flexDir==="column"&&(q.flexBasis=q.height);var G=this.state.width!==q.width,W=this.state.height!==q.height,Q=this.state.flexBasis!==q.flexBasis,z=G||W||Q;z&&Wx.flushSync(function(){n.setState(q)}),this.props.onResize&&z&&this.props.onResize(r,h,this.resizable,j)}},t.prototype.onMouseUp=function(r){var n,o,i=this.state,a=i.isResizing,s=i.direction;i.original,!(!a||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(r,s,this.resizable,this.delta),this.props.size&&this.setState({width:(n=this.props.size.width)!==null&&n!==void 0?n:"auto",height:(o=this.props.size.height)!==null&&o!==void 0?o:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:gn(gn({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(r){var n,o;this.setState({width:(n=r.width)!==null&&n!==void 0?n:"auto",height:(o=r.height)!==null&&o!==void 0?o:"auto"})},t.prototype.renderResizer=function(){var r=this,n=this.props,o=n.enable,i=n.handleStyles,a=n.handleClasses,s=n.handleWrapperStyle,c=n.handleWrapperClass,u=n.handleComponent;if(!o)return null;var d=Object.keys(o).map(function(p){return o[p]!==!1?C.jsx(h8,{direction:p,onResizeStart:r.onResizeStart,replaceStyles:i&&i[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return C.jsx("div",{className:c,style:s,children:d})},t.prototype.render=function(){var r=this,n=Object.keys(this.props).reduce(function(a,s){return w8.indexOf(s)!==-1||(a[s]=r.props[s]),a},{}),o=gn(gn(gn({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return C.jsxs(i,gn({style:o,className:this.props.className},n,{ref:function(a){a&&(r.resizable=a)},children:[this.state.isResizing&&C.jsx("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t})(T.PureComponent);const _8={0:"bg-panel-0",1:"bg-panel-1",2:"bg-panel-2",3:"bg-panel-3",4:"bg-panel-4"},E8={tabs:"border-tab-border",primary:"border-primary",normal:"border-panel-border"},W2=({depth:e=0,className:t,contentType:r,disabled:n})=>qe("transition-colors duration-200",{"text-body":!n,"text-inactive-text":n},r?E8[r]:"border-panel-border",_8[e],t),S8=e=>{if(!e)return{};const t={},r=e.match(/min-w-\[(\d+)px\]/);r&&(t.minWidth=parseInt(r[1],10));const n=e.match(/max-w-\[(\d+)px\]/);n&&(t.maxWidth=parseInt(n[1],10));const o=e.match(/min-h-\[(\d+)px\]/);o&&(t.minHeight=parseInt(o[1],10));const i=e.match(/max-h-\[(\d+)px\]/);return i&&(t.maxHeight=parseInt(i[1],10)),t},O8=T.forwardRef(({children:e,width:t,height:r,minWidth:n=10,minHeight:o=10,maxWidth:i,maxHeight:a,defaultWidth:s,defaultHeight:c,defaultSize:u,size:d,grid:p,snap:h,lockAspectRatio:v=!1,enable:y,handleStyles:g={},handleClasses:b={},handleComponent:x={},style:w={},className:E,onResizeStart:S,onResize:_,onResizeStop:O,scale:N=1,bounds:R,snapGap:A,as:D="div",depth:B,disabled:j},M)=>{const P=W2({depth:B,className:E,disabled:j}),V=S8(E),q=d?{size:d}:t!==void 0||r!==void 0?{size:{width:t??"auto",height:r??"auto"}}:{},G=u?{defaultSize:u}:s!==void 0||c!==void 0?{defaultSize:{width:s??"auto",height:c??"auto"}}:{},W=T.useRef(null);return T.useImperativeHandle(M,()=>{var Q;return(Q=W.current)==null?void 0:Q.resizable}),C.jsx(x8,{"data-qui":"Resizable",ref:W,...q,...G,minWidth:n??V.minWidth,minHeight:o??V.minHeight,maxWidth:i??V.maxWidth,maxHeight:a??V.maxHeight,grid:p,snap:h,lockAspectRatio:v,enable:y,handleStyles:g,handleClasses:b,handleComponent:x,style:w,className:qe("relative box-border",P),onResizeStart:S,onResize:_,onResizeStop:O,scale:N,bounds:R,snapGap:A,as:D,children:e})});O8.displayName="Resizable";T.createContext(null);const mo=T.forwardRef(({depth:e=0,className:t,children:r,contentType:n,disabled:o,...i},a)=>{const s=W2({depth:e,className:t,contentType:n,disabled:o});return C.jsx("div",{"data-qui":"Panel",ref:a,className:s,"aria-disabled":o,...i,children:r})});mo.displayName="Panel";const zu={sm:{container:"h-5 px-0.5 gap-1 rounded",text:"text-xxs leading-3",icon:"text-s",iconButton:"text-s p-0.5 cursor-pointer"},md:{container:"h-5.5 px-1 gap-1 rounded",text:"text-xs leading-4",icon:"text-sm",iconButton:" text-sm p-0.5 cursor-pointer"},lg:{container:"h-6 px-1.5 gap-1.5 rounded",text:"text-s leading-none",icon:"text-base",iconButton:"text-base p-0.5 cursor-pointer"}},Vc={primary:{bg:"bg-primary",text:"text-body",border:"border-primary",buttonHover:"hover:bg-primary-hover"},white:{bg:"bg-canvas-default",text:"text-primary",border:"border-canvas-default",buttonHover:"hover:bg-primary-hover hover:text-body"},positive:{bg:"bg-positive",text:"text-body",border:"border-positive",buttonHover:"hover:bg-positive-hover"},warning:{bg:"bg-warning",text:"text-body",border:"border-warning",buttonHover:"hover:bg-warning-hover"},negative:{bg:"bg-negative",text:"text-body",border:"border-negative",buttonHover:"hover:bg-negative-hover"}},C8=(e,t)=>qe("inline-flex items-center justify-center font-medium border",zu[e].container,Vc[t].bg,Vc[t].text,Vc[t].border),I8=(e,t,r)=>qe({[zu[e].icon]:!r,"bg-canvas-default outline-canvas-default text-primary":r&&t!=="white"||r,"bg-primary outline-primary text-body":r&&t==="white"&&!r,"outline-solid outline-1 h-full py-0.5 grid place-items-center -my-1 only:-mx-0.5 first:-ml-1.5 last:-mr-1.5 only:rounded first:rounded-l last:rounded-r":r||r}),R8=e=>qe(zu[e].text),U2=(e,t)=>qe("inline-flex items-center justify-center rounded transition-colors duration-200 focus:outline-hidden ",zu[e].iconButton,Vc[t].buttonHover),G2=T.createContext(null),Bu=()=>{const e=T.useContext(G2);if(!e)throw new Error("Pill components must be used within a Pill.Root");return e},Xx=T.forwardRef(({size:e="md",color:t="primary",className:r,children:n,...o},i)=>{const a={size:e,color:t};return C.jsx(G2.Provider,{value:a,children:C.jsx("div",{"data-qui":"Pill",ref:i,className:qe(C8(e,t),r),...o,children:n})})});Xx.displayName="Pill.Root";const Zx=T.forwardRef(({className:e,children:t,...r},n)=>{const{size:o}=Bu();return C.jsx("span",{ref:n,className:qe(R8(o),e),...r,children:t})});Zx.displayName="Pill.Text";const Jx=T.forwardRef(({className:e,children:t,label:r,position:n,...o},i)=>{const{size:a,color:s}=Bu(),c=!!r,u=C.jsx("span",{ref:i,className:qe(I8(a,s,c),e),...o,children:t});return c?C.jsx(c8,{label:r||"",position:n||"up",children:u}):u});Jx.displayName="Pill.Icon";const K2=T.forwardRef(({className:e,children:t,...r},n)=>{const{size:o,color:i}=Bu();return C.jsx("button",{ref:n,type:"button",className:qe(U2(o,i),e),...r,children:t})});K2.displayName="Pill.Button";const Qx=T.forwardRef(({className:e,onClose:t,"aria-label":r="Remove pill",children:n,...o},i)=>{const{size:a,color:s}=Bu();return C.jsx("button",{ref:i,type:"button",className:qe(U2(a,s),e),onClick:t,"aria-label":r,...o,children:n||C.jsx(b2,{})})});Qx.displayName="Pill.Close";const Y2=T.forwardRef(({size:e="md",color:t="primary",label:r,icon:n,onClose:o,closable:i=!1,className:a,...s},c)=>C.jsxs(Xx,{ref:c,size:e,color:t,className:a,...s,children:[n&&C.jsx(Jx,{children:n}),C.jsx(Zx,{children:r}),i&&C.jsx(Qx,{onClose:o})]}));Y2.displayName="Pill";Object.assign(Y2,{Root:Xx,Text:Zx,Icon:Jx,Button:K2,Close:Qx});const N8=T.createContext(null),Fu=()=>{const e=T.useContext(N8);if(!e)throw new Error("Select compound components must be used within Select.Root");return e},$u={sm:{trigger:"h-5 min-h-fit",control:"min-h-5 p-0.5 gap-1",input:"text-2.25 h-3.5",placeholder:"text-2.25",singleValue:"text-2.25",multiValue:"h-3.5 px-0.5 gap-1 text-2",multiValueLabel:"text-2",multiValueRemove:"w-3 h-3",indicatorsContainer:"gap-1",clearIndicator:"p-0.5 size-3",dropdownIndicator:"p-0.5 size-3",indicatorSeparator:"h-3",loadingIndicator:"w-3 h-3",menu:"m-0",menuList:"py-1",option:"px-1 py-0.5 text-xs",group:"pt-1",groupHeading:"px-2 py-0.5 text-2",noOptionsMessage:"px-2 py-1 text-2.25",loadingMessage:"px-2 py-1 text-2.25",message:"text-2.25 p-1.5",icon:"text-sm"},md:{trigger:"h-6 min-h-fit",control:"min-h-6 p-1 gap-1.5",input:"text-xs h-4",placeholder:"text-xs",singleValue:"text-xs",multiValue:"h-4 p-1 gap-1 text-2.5",multiValueLabel:"text-2.5",multiValueRemove:"w-3.5 h-3.5",indicatorsContainer:"gap-1",clearIndicator:"p-0.5 size-4",dropdownIndicator:"p-0.5 size-4",indicatorSeparator:"h-4",loadingIndicator:"w-4 h-4",menu:"m-0",menuList:"my-1",option:"px-2 py-1 text-s",group:"pt-1.5",groupHeading:"px-3 py-1 text-2.5",noOptionsMessage:"px-2 py-1.5 text-xs",loadingMessage:"px-3 py-1.5 text-xs",message:"text-xs p-2",icon:"text-base"},lg:{trigger:"h-7 min-h-fit",control:"min-h-7 p-1.5 gap-2",input:"text-s h-5",placeholder:"text-s",singleValue:"text-s",multiValue:"h-5 px-1.5 gap-1.5 text-xs",multiValueLabel:"text-xs",multiValueRemove:"w-4 h-4",indicatorsContainer:"gap-1.5",clearIndicator:"p-0.5 size-5",dropdownIndicator:"p-1 size-5",indicatorSeparator:"h-5",loadingIndicator:"w-5 h-5",menu:"m-0",menuList:"py-1.5",option:"px-3 py-2 text-sm",group:"pt-2",groupHeading:"px-4 py-1.5 text-xs",noOptionsMessage:"px-4 py-2 text-s",loadingMessage:"px-4 py-2 text-s",message:"text-s p-2.5",icon:"text-lg"}},Fn={primary:{control:"cursor-pointer bg-select-bg text-select-text",controlFocused:"border-input-focus-border",controlDisabled:"opacity-60",controlInvalid:"bg-select-bg border-input-error-border text-select-text",placeholder:"text-input-placeholder placeholder:opacity-60",singleValue:"text-select-text",singleValueDisabled:"text-input-placeholder",multiValue:"bg-input-option-active-bg text-input-option-active-text",multiValueLabel:"text-input-option-active-text",multiValueRemove:"text-input-option-active-text hover:bg-input-option-hover-bg hover:text-body rounded-xs p-px",multiValueRemoveHover:"hover:bg-input-option-hover-bg",multiValueDisabled:"bg-canvas-subtle text-muted",clearIndicator:"text-input-text hover:text-body cursor-pointer",clearIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",dropdownIndicator:"text-input-text",dropdownIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",indicatorSeparator:"bg-input-border",loadingIndicator:"text-primary",menu:"bg-select-list-bg border-select-border shadow-lg",menuList:"scrollbar-thin scrollbar-thumb-input-border scrollbar-track-transparent",option:"text-select-text cursor-pointer",optionFocused:"bg-input-option-hover-bg text-body",optionSelected:"bg-input-option-active-bg text-input-option-active-text",optionDisabled:"text-input-placeholder cursor-not-allowed",group:"",groupHeading:"text-input-placeholder font-semibold",noOptionsMessage:"text-input-placeholder",loadingMessage:"text-input-placeholder",message:"text-primary-dark",messageBackground:"bg-input-message-bg",messageBorder:"border-input-info-border",icon:"text-input-text",iconAction:"text-input-text hover:text-body",iconActionHover:"hover:text-body hover:bg-input-option-hover-bg"},positive:{control:"cursor-pointer bg-select-bg text-select-text",controlFocused:"border-positive",controlDisabled:"opacity-60",controlInvalid:"bg-select-bg border-input-error-border text-select-text",placeholder:"text-input-placeholder placeholder:opacity-60",singleValue:"text-select-text",singleValueDisabled:"text-input-placeholder",multiValue:"bg-input-option-active-bg text-input-option-active-text",multiValueLabel:"text-input-option-active-text",multiValueRemove:"text-input-option-active-text hover:bg-input-option-hover-bg hover:text-body rounded-xs p-px",multiValueRemoveHover:"hover:bg-input-option-hover-bg",multiValueDisabled:"bg-canvas-subtle text-muted",clearIndicator:"text-input-text hover:text-body cursor-pointer",clearIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",dropdownIndicator:"text-input-text",dropdownIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",indicatorSeparator:"bg-input-border",loadingIndicator:"text-positive",menu:"bg-select-list-bg border-select-border shadow-lg",menuList:"",option:"text-select-text cursor-pointer",optionFocused:"bg-input-option-hover-bg text-body",optionSelected:"bg-input-option-active-bg text-input-option-active-text",optionDisabled:"text-input-placeholder cursor-not-allowed",group:"",groupHeading:"text-input-placeholder font-semibold",noOptionsMessage:"text-input-placeholder",loadingMessage:"text-input-placeholder",message:"text-positive-dark",messageBackground:"bg-positive-light",messageBorder:"border-positive",icon:"text-input-text",iconAction:"text-input-text hover:text-body",iconActionHover:"hover:text-body hover:bg-input-option-hover-bg"},warning:{control:"cursor-pointer bg-select-bg text-select-text",controlFocused:"border-input-warning-border",controlDisabled:"opacity-60",controlInvalid:"bg-select-bg border-input-error-border text-select-text",placeholder:"text-input-placeholder placeholder:opacity-60",singleValue:"text-select-text",singleValueDisabled:"text-input-placeholder",multiValue:"bg-input-option-active-bg text-input-option-active-text",multiValueLabel:"text-input-option-active-text",multiValueRemove:"text-input-option-active-text hover:bg-input-option-hover-bg hover:text-body rounded-xs p-px",multiValueRemoveHover:"hover:bg-input-option-hover-bg",multiValueDisabled:"bg-canvas-subtle text-muted",clearIndicator:"text-input-text hover:text-body cursor-pointer",clearIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",dropdownIndicator:"text-input-text",dropdownIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",indicatorSeparator:"bg-input-border",loadingIndicator:"text-warning",menu:"bg-select-list-bg border-select-border shadow-lg",menuList:"bg-select-list-bg border-select-border shadow-lg",option:"text-select-text cursor-pointer",optionFocused:"bg-input-option-hover-bg text-body",optionSelected:"bg-input-option-active-bg text-input-option-active-text",optionDisabled:"text-input-placeholder cursor-not-allowed",group:"",groupHeading:"text-input-placeholder font-semibold",noOptionsMessage:"text-input-placeholder",loadingMessage:"text-input-placeholder",message:"text-warning-dark",messageBackground:"bg-input-warning-bg",messageBorder:"border-input-warning-border",icon:"text-input-text",iconAction:"text-input-text hover:text-body",iconActionHover:"hover:text-body hover:bg-input-option-hover-bg"},negative:{control:"cursor-pointer bg-select-bg text-select-text",controlFocused:"border-input-error-border",controlDisabled:"opacity-60",controlInvalid:"bg-select-bg border-input-error-border text-select-text",placeholder:"text-input-placeholder placeholder:opacity-60",singleValue:"text-select-text",singleValueDisabled:"text-input-placeholder",multiValue:"bg-input-option-active-bg text-input-option-active-text",multiValueLabel:"text-input-option-active-text",multiValueRemove:"text-input-option-active-text hover:bg-input-option-hover-bg hover:text-body rounded-xs p-px",multiValueRemoveHover:"hover:bg-input-option-hover-bg",multiValueDisabled:"bg-canvas-subtle text-muted",clearIndicator:"text-input-text hover:text-body cursor-pointer",clearIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",dropdownIndicator:"text-input-text",dropdownIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",indicatorSeparator:"bg-input-border",loadingIndicator:"text-negative",menu:"bg-select-list-bg border-select-border shadow-lg",menuList:"scrollbar-thin scrollbar-thumb-input-border scrollbar-track-transparent",option:"text-select-text cursor-pointer",optionFocused:"bg-input-option-hover-bg text-body",optionSelected:"bg-input-option-active-bg text-input-option-active-text",optionDisabled:"text-input-placeholder cursor-not-allowed",group:"",groupHeading:"text-input-placeholder font-semibold",noOptionsMessage:"text-input-placeholder",loadingMessage:"text-input-placeholder",message:"text-negative-dark",messageBackground:"bg-input-error-bg",messageBorder:"border-input-error-border",icon:"text-input-text",iconAction:"text-input-text hover:text-body",iconActionHover:"hover:text-body hover:bg-input-option-hover-bg"}},P8=({size:e,color:t,isDisabled:r,isFocused:n,isInvalid:o,hasMessage:i})=>qe("flex items-center justify-between border border-select-border only:rounded first:rounded-t last:rounded-b",$u[e].control,o&&!n?Fn[t].controlInvalid:Fn[t].control,{[Fn[t].controlFocused]:n&&!i,[Fn[t].controlDisabled]:r,"border-0 ring-1":i,[Fn[t].messageBorder]:i}),T8=({size:e,color:t})=>qe("bg-transparent border-0 outline-hidden flex-1 min-w-7.5 px-1",$u[e].input,Fn[t].placeholder),A8=({size:e,placement:t,hasMessage:r,color:n})=>{const o={auto:"top-full rounded-t-none",bottom:"top-full rounded-t-none",top:"bottom-full rounded-b-none"};return qe("absolute w-full z-50 rounded overflow-hidden border border-t-0",Fn.primary.menu,{[Fn[n].messageBorder]:r},o[t||"auto"],$u[e].menu)},k8=({size:e})=>qe("overflow-y-auto",$u[e].menuList,Fn.primary.menuList);function za(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Ot(){return Ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ot.apply(null,arguments)}function ux(e,t){return ux=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},ux(e,t)}function M8(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ux(e,t)}var pc={exports:{}},_p={exports:{}},Je={};/** @license React v16.13.1
18
+ `,vU=(e,t,r)=>{const{isDisabled:n,isInvalid:o}=r;return na(hU,Ds[e].radio,o?_s[t].radioInvalid:{[_s[t].radio]:!n,"cursor-not-allowed opacity-60":n})},gU=(e,t,r)=>{const{checked:n,isDisabled:o,isInvalid:i}=r;return na("center-absolute rounded-full transition-all duration-200 ease-in-out",Ds[e].dot,i?"bg-negative":{[_s[t].dot]:!o,"border-neutral":o,"opacity-0 scale-0":!n,"opacity-100 scale-100":n&&!o})},mU=(e,t,r)=>na("center-absolute rounded-full transition-all duration-200 opacity-0 group-hover:opacity-100",Ds[e].hoverDot,{[_s[t].hoverDot]:!r,"bg-negative-bg":r}),bU=(e,t,r)=>{const{isDisabled:n,isInvalid:o}=r;return na("cursor-pointer select-none transition-colors duration-200",Ds[e].label,o?{"text-negative":o}:{[_s[t].label]:!n,"text-muted":n})},yU=(e,t)=>na("inline-flex items-center group",Ds[e].container,t),wU=T.createContext(null),xU=()=>{const e=T.useContext(wU);if(!e)throw new Error("Radio.Item must be used within Radio.Group");return e},_U=T.forwardRef(({value:e,label:t,size:r,color:n,isDisabled:o,isInvalid:i,isRequired:a,className:s,...c},u)=>{const d=xU(),p=r??d.size,h=n??d.color,v=o??d.isDisabled,y=i??d.isInvalid,g=a??d.isRequired,b=d.value===e,x={checked:b,isDisabled:v,isInvalid:y},w=vU(p,h,x),E=gU(p,h,x),S=mU(p,h,y),_=bU(p,h,x),O=yU(p,s),N=()=>{v||d.onChange(e)};return C.jsxs("label",{"data-qui":"RadioItem",className:O,children:[C.jsxs("div",{className:"relative",children:[C.jsx("input",{ref:u,type:"radio",value:e,checked:b,disabled:v,required:g,"aria-invalid":y,"aria-label":t?void 0:c["aria-label"],name:d.name,onChange:N,className:"sr-only",...c}),C.jsxs("div",{className:w,children:[C.jsx("div",{className:E}),!b&&!v&&C.jsx("div",{className:S})]})]}),t&&C.jsxs("span",{className:_,children:[t,g&&C.jsx("span",{className:"text-negative ml-1",children:"*"})]})]})});_U.displayName="RadioItem";const k2={sm:{container:"h-4.5 p-1 rounded",text:"text-xxs"},md:{container:"h-6 p-1 rounded",text:"text-s"},lg:{container:"h-7 p-1 rounded",text:"text-sm"},xl:{container:"h-7.5 p-1 rounded",text:"text-lg"}},EU={primary:{bg:{solid:"bg-primary",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-button-text",outline:"text-primary",ghost:"text-primary"},border:{solid:"border-primary",outline:"border-primary",ghost:"border-transparent"},hover:{solid:"hover:bg-primary-hover hover:border-primary-hover",outline:"hover:border-black hover:text-primary-hover",ghost:"hover:bg-primary-hover hover:text-body"}},white:{bg:{solid:"bg-white",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-primary",outline:"text-body",ghost:"text-body"},border:{solid:"border-white",outline:"border-white",ghost:"border-transparent"},hover:{solid:"hover:bg-canvas-subtle hover:border-canvas-subtle",outline:"hover:border-canvas hover:text-canvas",ghost:"hover:bg-primary-hover hover:text-body"}},positive:{bg:{solid:"bg-positive",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-button-text",outline:"text-positive-text",ghost:"text-positive-text"},border:{solid:"border-positive",outline:"border-positive",ghost:"border-transparent"},hover:{solid:"hover:bg-positive-hover hover:border-positive-hover",outline:"hover:border-positive-hover hover:text-positive-hover",ghost:"hover:bg-positive-hover hover:text-body"}},warning:{bg:{solid:"bg-warning",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-button-text",outline:"text-warning-text",ghost:"text-warning-text"},border:{solid:"border-warning",outline:"border-warning",ghost:"border-transparent"},hover:{solid:"hover:bg-warning-hover hover:border-warning-hover",outline:"hover:border-warning-hover hover:text-warning-hover",ghost:"hover:bg-warning-hover hover:text-body"}},negative:{bg:{solid:"bg-negative",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-button-text",outline:"text-negative",ghost:"text-negative"},border:{solid:"border-negative",outline:"border-negative",ghost:"border-transparent"},hover:{solid:"hover:bg-negative-hover hover:border-negative-hover",outline:"hover:border-negative-hover hover:text-negative-hover",ghost:"hover:bg-negative-hover hover:text-body"}}},SU=(e,t,r,n)=>{const o=k2[e],i=EU[r],a=qe("inline-flex items-center justify-center font-medium transition-colors duration-200 focus:outline-hidden border",{"cursor-pointer":!n},o.container);return n?qe(a,"text-inactive-text",{"border-panel":t!=="ghost"&&t==="solid","border-panel-subtle":t==="outline","bg-panel":t==="solid","bg-transparent ":t==="outline"||t==="ghost","border-transparent":t==="ghost"}):qe(a,i.bg[t],i.text[t],i.hover[t],i.border[t])},OU=e=>qe("flex items-center justify-center gap-1",k2[e].text),CU=T.forwardRef(({size:e="md",variant:t="solid",color:r="primary",className:n,children:o,disabled:i,...a},s)=>C.jsx("button",{"data-qui":"Button",ref:s,type:"button",className:qe(SU(e,t,r,i),OU(e),n),disabled:i,...a,children:o}));CU.displayName="Button";const IU=T.createContext(null),M2=()=>{const e=T.useContext(IU);if(!e)throw new Error("Input components must be used within Input.Root");return e},D2={sm:{group:"h-5 min-h-fit",input:"text-2.25",message:"text-2.25 p-1.5",icon:"text-sm"},md:{group:"h-6 min-h-fit",input:"text-xs",message:"text-xs p-2",icon:"text-base"},lg:{group:"h-7 min-h-fit",input:"text-s",message:"text-s p-2.5",icon:"text-lg"}},j2={primary:{border:"border border-input-border focus-within:border-input-focus-border",borderInvalid:"ring-input-error-border",borderMessage:"ring-input-focus-border",text:"text-input-text",placeholder:"placeholder:text-input-placeholder",messageText:"text-input-message-text",messageBackground:"bg-input-message-bg",icon:"text-input-text",action:"text-input-text",actionHover:"hover:text-body hover:bg-primary-hover"},positive:{border:"border border-input-border focus-within:border-positive",borderInvalid:"ring-input-error-border",borderMessage:"ring-positive",text:"text-input-text",placeholder:"placeholder:text-input-placeholder",messageText:"text-positive-dark",messageBackground:"bg-positive-light",icon:"text-positive-text",action:"text-input-text",actionHover:"hover:text-body hover:bg-primary-hover"},warning:{border:"border border-input-border focus-within:border-input-warning-border",borderInvalid:"ring-input-error-border",borderMessage:"ring-input-warning-border",text:"text-input-text",placeholder:"placeholder:text-input-placeholder",messageText:"text-warning-dark",messageBackground:"bg-input-warning-bg",icon:"text-warning-text",action:"text-input-text",actionHover:"hover:text-body hover:bg-primary-hover"},negative:{border:"border border-input-border focus-within:border-input-error-border",borderInvalid:"ring-input-error-border",borderMessage:"ring-input-error-border",text:"text-input-text",placeholder:"placeholder:text-input-placeholder",messageText:"text-negative-dark",messageBackground:"bg-input-error-bg",icon:"text-negative",action:"text-input-text",actionHover:"hover:text-body hover:bg-primary-hover"}},RU=({size:e,color:t})=>qe("bg-transparent ring-0 w-full","focus:outline-hidden",[D2[e].input],j2[t].placeholder),nO=({size:e,color:t})=>qe("bg-transparent ring-0 w-full h-fit resize-none py-0.5","focus:outline-hidden",D2[e].input,j2[t].placeholder);function au(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var NU=typeof global=="object"&&global&&global.Object===Object&&global,PU=typeof self=="object"&&self&&self.Object===Object&&self,q2=NU||PU||Function("return this")(),yp=function(){return q2.Date.now()},TU=/\s/;function AU(e){for(var t=e.length;t--&&TU.test(e.charAt(t)););return t}var kU=/^\s+/;function MU(e){return e&&e.slice(0,AU(e)+1).replace(kU,"")}var su=q2.Symbol,L2=Object.prototype,DU=L2.hasOwnProperty,jU=L2.toString,La=su?su.toStringTag:void 0;function qU(e){var t=DU.call(e,La),r=e[La];try{e[La]=void 0;var n=!0}catch{}var o=jU.call(e);return n&&(t?e[La]=r:delete e[La]),o}var LU=Object.prototype,zU=LU.toString;function BU(e){return zU.call(e)}var FU="[object Null]",$U="[object Undefined]",oO=su?su.toStringTag:void 0;function HU(e){return e==null?e===void 0?$U:FU:oO&&oO in Object(e)?qU(e):BU(e)}function VU(e){return e!=null&&typeof e=="object"}var WU="[object Symbol]";function UU(e){return typeof e=="symbol"||VU(e)&&HU(e)==WU}var iO=NaN,GU=/^[-+]0x[0-9a-f]+$/i,KU=/^0b[01]+$/i,YU=/^0o[0-7]+$/i,XU=parseInt;function aO(e){if(typeof e=="number")return e;if(UU(e))return iO;if(au(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=au(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=MU(e);var r=KU.test(e);return r||YU.test(e)?XU(e.slice(2),r?2:8):GU.test(e)?iO:+e}var ZU="Expected a function",JU=Math.max,QU=Math.min;function Hc(e,t,r){var n,o,i,a,s,c,u=0,d=!1,p=!1,h=!0;if(typeof e!="function")throw new TypeError(ZU);t=aO(t)||0,au(r)&&(d=!!r.leading,p="maxWait"in r,i=p?JU(aO(r.maxWait)||0,t):i,h="trailing"in r?!!r.trailing:h);function v(O){var N=n,R=o;return n=o=void 0,u=O,a=e.apply(R,N),a}function y(O){return u=O,s=setTimeout(x,t),d?v(O):a}function g(O){var N=O-c,R=O-u,A=t-N;return p?QU(A,i-R):A}function b(O){var N=O-c,R=O-u;return c===void 0||N>=t||N<0||p&&R>=i}function x(){var O=yp();if(b(O))return w(O);s=setTimeout(x,g(O))}function w(O){return s=void 0,h&&n?v(O):(n=o=void 0,a)}function E(){s!==void 0&&clearTimeout(s),u=0,n=c=o=s=void 0}function S(){return s===void 0?a:w(yp())}function _(){var O=yp(),N=b(O);if(n=arguments,o=this,c=O,N){if(s===void 0)return y(c);if(p)return clearTimeout(s),s=setTimeout(x,t),v(c)}return s===void 0&&(s=setTimeout(x,t)),a}return _.cancel=E,_.flush=S,_}var e8="Expected a function";function t8(e,t,r){var n=!0,o=!0;if(typeof e!="function")throw new TypeError(e8);return au(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Hc(e,t,{leading:n,maxWait:t,trailing:o})}var ki=function(){return ki=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},ki.apply(this,arguments)};function z2(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function B2(e){return!e||!e.ownerDocument?document:e.ownerDocument}var F2=function(e){var t={},r=Array.prototype.reduce.call(e,function(n,o){var i=o.name.match(/data-simplebar-(.+)/);if(i){var a=i[1].replace(/\W+(.)/g,function(s,c){return c.toUpperCase()});switch(o.value){case"true":n[a]=!0;break;case"false":n[a]=!1;break;case void 0:n[a]=!0;break;default:n[a]=o.value}}return n},t);return r};function $2(e,t){var r;e&&(r=e.classList).add.apply(r,t.split(" "))}function H2(e,t){e&&t.split(" ").forEach(function(r){e.classList.remove(r)})}function V2(e){return".".concat(e.split(" ").join("."))}var Kx=!!(typeof window<"u"&&window.document&&window.document.createElement),r8=Object.freeze({__proto__:null,addClasses:$2,canUseDOM:Kx,classNamesToQuery:V2,getElementDocument:B2,getElementWindow:z2,getOptions:F2,removeClasses:H2}),Ti=null,sO=null;Kx&&window.addEventListener("resize",function(){sO!==window.devicePixelRatio&&(sO=window.devicePixelRatio,Ti=null)});function lO(){if(Ti===null){if(typeof document>"u")return Ti=0,Ti;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var r=t.getBoundingClientRect().right;e.removeChild(t),Ti=r}return Ti}var so=z2,wp=B2,n8=F2,lo=$2,co=H2,ar=V2,za=(function(){function e(t,r){r===void 0&&(r={});var n=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var o=so(n.el);n.scrollXTicking||(o.requestAnimationFrame(n.scrollX),n.scrollXTicking=!0),n.scrollYTicking||(o.requestAnimationFrame(n.scrollY),n.scrollYTicking=!0),n.isScrolling||(n.isScrolling=!0,lo(n.el,n.classNames.scrolling)),n.showScrollbar("x"),n.showScrollbar("y"),n.onStopScrolling()},this.scrollX=function(){n.axis.x.isOverflowing&&n.positionScrollbar("x"),n.scrollXTicking=!1},this.scrollY=function(){n.axis.y.isOverflowing&&n.positionScrollbar("y"),n.scrollYTicking=!1},this._onStopScrolling=function(){co(n.el,n.classNames.scrolling),n.options.autoHide&&(n.hideScrollbar("x"),n.hideScrollbar("y")),n.isScrolling=!1},this.onMouseEnter=function(){n.isMouseEntering||(lo(n.el,n.classNames.mouseEntered),n.showScrollbar("x"),n.showScrollbar("y"),n.isMouseEntering=!0),n.onMouseEntered()},this._onMouseEntered=function(){co(n.el,n.classNames.mouseEntered),n.options.autoHide&&(n.hideScrollbar("x"),n.hideScrollbar("y")),n.isMouseEntering=!1},this._onMouseMove=function(o){n.mouseX=o.clientX,n.mouseY=o.clientY,(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseMoveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseMoveForAxis("y")},this.onMouseLeave=function(){n.onMouseMove.cancel(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseLeaveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseLeaveForAxis("y"),n.mouseX=-1,n.mouseY=-1},this._onWindowResize=function(){n.scrollbarWidth=n.getScrollbarWidth(),n.hideNativeScrollbar()},this.onPointerEvent=function(o){if(!(!n.axis.x.track.el||!n.axis.y.track.el||!n.axis.x.scrollbar.el||!n.axis.y.scrollbar.el)){var i,a;n.axis.x.track.rect=n.axis.x.track.el.getBoundingClientRect(),n.axis.y.track.rect=n.axis.y.track.el.getBoundingClientRect(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&(i=n.isWithinBounds(n.axis.x.track.rect)),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&(a=n.isWithinBounds(n.axis.y.track.rect)),(i||a)&&(o.stopPropagation(),o.type==="pointerdown"&&o.pointerType!=="touch"&&(i&&(n.axis.x.scrollbar.rect=n.axis.x.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.x.scrollbar.rect)?n.onDragStart(o,"x"):n.onTrackClick(o,"x")),a&&(n.axis.y.scrollbar.rect=n.axis.y.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.y.scrollbar.rect)?n.onDragStart(o,"y"):n.onTrackClick(o,"y"))))}},this.drag=function(o){var i,a,s,c,u,d,p,h,v,y,g;if(!(!n.draggedAxis||!n.contentWrapperEl)){var b,x=n.axis[n.draggedAxis].track,w=(a=(i=x.rect)===null||i===void 0?void 0:i[n.axis[n.draggedAxis].sizeAttr])!==null&&a!==void 0?a:0,E=n.axis[n.draggedAxis].scrollbar,S=(c=(s=n.contentWrapperEl)===null||s===void 0?void 0:s[n.axis[n.draggedAxis].scrollSizeAttr])!==null&&c!==void 0?c:0,_=parseInt((d=(u=n.elStyles)===null||u===void 0?void 0:u[n.axis[n.draggedAxis].sizeAttr])!==null&&d!==void 0?d:"0px",10);o.preventDefault(),o.stopPropagation(),n.draggedAxis==="y"?b=o.pageY:b=o.pageX;var O=b-((h=(p=x.rect)===null||p===void 0?void 0:p[n.axis[n.draggedAxis].offsetAttr])!==null&&h!==void 0?h:0)-n.axis[n.draggedAxis].dragOffset;O=n.draggedAxis==="x"&&n.isRtl?((y=(v=x.rect)===null||v===void 0?void 0:v[n.axis[n.draggedAxis].sizeAttr])!==null&&y!==void 0?y:0)-E.size-O:O;var N=O/(w-E.size),R=N*(S-_);n.draggedAxis==="x"&&n.isRtl&&(R=!((g=e.getRtlHelpers())===null||g===void 0)&&g.isScrollingToNegative?-R:R),n.contentWrapperEl[n.axis[n.draggedAxis].scrollOffsetAttr]=R}},this.onEndDrag=function(o){n.isDragging=!1;var i=wp(n.el),a=so(n.el);o.preventDefault(),o.stopPropagation(),co(n.el,n.classNames.dragging),n.onStopScrolling(),i.removeEventListener("mousemove",n.drag,!0),i.removeEventListener("mouseup",n.onEndDrag,!0),n.removePreventClickId=a.setTimeout(function(){i.removeEventListener("click",n.preventClick,!0),i.removeEventListener("dblclick",n.preventClick,!0),n.removePreventClickId=null})},this.preventClick=function(o){o.preventDefault(),o.stopPropagation()},this.el=t,this.options=ki(ki({},e.defaultOptions),r),this.classNames=ki(ki({},e.defaultOptions.classNames),r.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=t8(this._onMouseMove,64),this.onWindowResize=Hc(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=Hc(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=Hc(this._onMouseEntered,this.stopScrollDelay),this.init()}return e.getRtlHelpers=function(){if(e.rtlHelpers)return e.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var r=t.firstElementChild,n=r==null?void 0:r.firstElementChild;if(!n)return null;document.body.appendChild(r),r.scrollLeft=0;var o=e.getOffset(r),i=e.getOffset(n);r.scrollLeft=-999;var a=e.getOffset(n);return document.body.removeChild(r),e.rtlHelpers={isScrollOriginAtZero:o.left!==i.left,isScrollingToNegative:i.left!==a.left},e.rtlHelpers},e.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:lO()}catch{return lO()}},e.getOffset=function(t){var r=t.getBoundingClientRect(),n=wp(t),o=so(t);return{top:r.top+(o.pageYOffset||n.documentElement.scrollTop),left:r.left+(o.pageXOffset||n.documentElement.scrollLeft)}},e.prototype.init=function(){Kx&&(this.initDOM(),this.rtlHelpers=e.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.prototype.initDOM=function(){var t,r;this.wrapperEl=this.el.querySelector(ar(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(ar(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(ar(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(ar(this.classNames.offset)),this.maskEl=this.el.querySelector(ar(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,ar(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(ar(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(ar(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(ar(this.classNames.track)).concat(ar(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(ar(this.classNames.track)).concat(ar(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(ar(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((r=this.axis.y.track.el)===null||r===void 0?void 0:r.querySelector(ar(this.classNames.scrollbar)))||null,this.options.autoHide||(lo(this.axis.x.scrollbar.el,this.classNames.visible),lo(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t=this,r,n=so(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(r=this.contentWrapperEl)===null||r===void 0||r.addEventListener("scroll",this.onScroll),n.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var o=!1,i=n.ResizeObserver||ResizeObserver;this.resizeObserver=new i(function(){o&&n.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),n.requestAnimationFrame(function(){o=!0})}this.mutationObserver=new n.MutationObserver(function(){n.requestAnimationFrame(function(){t.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},e.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var t=so(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var r=this.contentEl.offsetWidth,n=this.heightAutoObserverEl.offsetHeight<=1,o=this.heightAutoObserverEl.offsetWidth<=1||r>0,i=this.contentWrapperEl.offsetWidth,a=this.elStyles.overflowX,s=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var c=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=n?"auto":"100%",this.placeholderEl.style.width=o?"".concat(r||u,"px"):"auto",this.placeholderEl.style.height="".concat(c,"px");var d=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=r!==0&&u>r,this.axis.y.isOverflowing=c>d,this.axis.x.isOverflowing=a==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=s==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var p=this.axis.x.isOverflowing?this.scrollbarWidth:0,h=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>i-h,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&c>d-p,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},e.prototype.getScrollbarSize=function(t){var r,n;if(t===void 0&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var o=this.contentEl[this.axis[t].scrollSizeAttr],i=(n=(r=this.axis[t].track.el)===null||r===void 0?void 0:r[this.axis[t].offsetSizeAttr])!==null&&n!==void 0?n:0,a=i/o,s;return s=Math.max(~~(a*i),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(s=Math.min(s,this.options.scrollbarMaxSize)),s},e.prototype.positionScrollbar=function(t){var r,n,o;t===void 0&&(t="y");var i=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!i.el||!this.elStyles)){var a=this.contentWrapperEl[this.axis[t].scrollSizeAttr],s=((r=this.axis[t].track.el)===null||r===void 0?void 0:r[this.axis[t].offsetSizeAttr])||0,c=parseInt(this.elStyles[this.axis[t].sizeAttr],10),u=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];u=t==="x"&&this.isRtl&&!((n=e.getRtlHelpers())===null||n===void 0)&&n.isScrollOriginAtZero?-u:u,t==="x"&&this.isRtl&&(u=!((o=e.getRtlHelpers())===null||o===void 0)&&o.isScrollingToNegative?u:-u);var d=u/(a-c),p=~~((s-i.size)*d);p=t==="x"&&this.isRtl?-p+(s-i.size):p,i.el.style.transform=t==="x"?"translate3d(".concat(p,"px, 0, 0)"):"translate3d(0, ".concat(p,"px, 0)")}},e.prototype.toggleTrackVisibility=function(t){t===void 0&&(t="y");var r=this.axis[t].track.el,n=this.axis[t].scrollbar.el;!r||!n||!this.contentWrapperEl||(this.axis[t].isOverflowing||this.axis[t].forceVisible?(r.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(r.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?n.style.display="block":n.style.display="none")},e.prototype.showScrollbar=function(t){t===void 0&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(lo(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},e.prototype.hideScrollbar=function(t){t===void 0&&(t="y"),!this.isDragging&&this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(co(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},e.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},e.prototype.onMouseMoveForAxis=function(t){t===void 0&&(t="y");var r=this.axis[t];!r.track.el||!r.scrollbar.el||(r.track.rect=r.track.el.getBoundingClientRect(),r.scrollbar.rect=r.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(r.track.rect)?(this.showScrollbar(t),lo(r.track.el,this.classNames.hover),this.isWithinBounds(r.scrollbar.rect)?lo(r.scrollbar.el,this.classNames.hover):co(r.scrollbar.el,this.classNames.hover)):(co(r.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),co(this.axis[t].track.el,this.classNames.hover),co(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},e.prototype.onDragStart=function(t,r){var n;r===void 0&&(r="y"),this.isDragging=!0;var o=wp(this.el),i=so(this.el),a=this.axis[r].scrollbar,s=r==="y"?t.pageY:t.pageX;this.axis[r].dragOffset=s-(((n=a.rect)===null||n===void 0?void 0:n[this.axis[r].offsetAttr])||0),this.draggedAxis=r,lo(this.el,this.classNames.dragging),o.addEventListener("mousemove",this.drag,!0),o.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(o.addEventListener("click",this.preventClick,!0),o.addEventListener("dblclick",this.preventClick,!0)):(i.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.prototype.onTrackClick=function(t,r){var n=this,o,i,a,s;r===void 0&&(r="y");var c=this.axis[r];if(!(!this.options.clickOnTrack||!c.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var u=so(this.el);this.axis[r].scrollbar.rect=c.scrollbar.el.getBoundingClientRect();var d=this.axis[r].scrollbar,p=(i=(o=d.rect)===null||o===void 0?void 0:o[this.axis[r].offsetAttr])!==null&&i!==void 0?i:0,h=parseInt((s=(a=this.elStyles)===null||a===void 0?void 0:a[this.axis[r].sizeAttr])!==null&&s!==void 0?s:"0px",10),v=this.contentWrapperEl[this.axis[r].scrollOffsetAttr],y=r==="y"?this.mouseY-p:this.mouseX-p,g=y<0?-1:1,b=g===-1?v-h:v+h,x=40,w=function(){n.contentWrapperEl&&(g===-1?v>b&&(v-=x,n.contentWrapperEl[n.axis[r].scrollOffsetAttr]=v,u.requestAnimationFrame(w)):v<b&&(v+=x,n.contentWrapperEl[n.axis[r].scrollOffsetAttr]=v,u.requestAnimationFrame(w)))};w()}},e.prototype.getContentElement=function(){return this.contentEl},e.prototype.getScrollElement=function(){return this.contentWrapperEl},e.prototype.removeListeners=function(){var t=so(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},e.prototype.unMount=function(){this.removeListeners()},e.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.prototype.findChild=function(t,r){var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,function(o){return n.call(o,r)})[0]},e.rtlHelpers=null,e.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},e.getOptions=n8,e.helpers=r8,e})(),wr=function(){return wr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},wr.apply(this,arguments)};function o8(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}var Yx=ue.forwardRef(function(e,t){var r=e.children,n=e.scrollableNodeProps,o=n===void 0?{}:n,i=o8(e,["children","scrollableNodeProps"]),a=ue.useRef(),s=ue.useRef(),c=ue.useRef(),u={},d={};Object.keys(i).forEach(function(v){Object.prototype.hasOwnProperty.call(za.defaultOptions,v)?u[v]=i[v]:d[v]=i[v]});var p=wr(wr({},za.defaultOptions.classNames),u.classNames),h=wr(wr({},o),{className:"".concat(p.contentWrapper).concat(o.className?" ".concat(o.className):""),tabIndex:u.tabIndex||za.defaultOptions.tabIndex,role:"region","aria-label":u.ariaLabel||za.defaultOptions.ariaLabel});return ue.useEffect(function(){var v;return s.current=h.ref?h.ref.current:s.current,a.current&&(v=new za(a.current,wr(wr(wr({},u),s.current&&{scrollableNode:s.current}),c.current&&{contentNode:c.current})),typeof t=="function"?t(v):t&&(t.current=v)),function(){v==null||v.unMount(),v=null,typeof t=="function"&&t(null)}},[]),ue.createElement("div",wr({"data-simplebar":"init",ref:a},d),ue.createElement("div",{className:p.wrapper},ue.createElement("div",{className:p.heightAutoObserverWrapperEl},ue.createElement("div",{className:p.heightAutoObserverEl})),ue.createElement("div",{className:p.mask},ue.createElement("div",{className:p.offset},typeof r=="function"?r({scrollableNodeRef:s,scrollableNodeProps:wr(wr({},h),{ref:s}),contentNodeRef:c,contentNodeProps:{className:p.contentEl,ref:c}}):ue.createElement("div",wr({},h),ue.createElement("div",{className:p.contentEl},r)))),ue.createElement("div",{className:p.placeholder})),ue.createElement("div",{className:"".concat(p.track," ").concat(p.horizontal)},ue.createElement("div",{className:p.scrollbar})),ue.createElement("div",{className:"".concat(p.track," ").concat(p.vertical)},ue.createElement("div",{className:p.scrollbar})))});Yx.displayName="SimpleBar";const i8=T.forwardRef(({className:e,...t},r)=>{const{size:n,color:o,isInvalid:i,isDisabled:a}=M2(),{isDisabled:s,isReadOnly:c,...u}=t;return C.jsx("input",{ref:r,disabled:a||s,readOnly:c||!1,"aria-invalid":i,className:qe(RU({size:n,color:o}),e),...u})});T.forwardRef(({className:e,autoHeight:t,...r},n)=>{const{size:o,color:i,isInvalid:a,isDisabled:s,setHasArea:c}=M2(),u=T.useRef(null),d=n||u,p=T.useRef(null);T.useEffect(()=>(c(!0),()=>{c(!1)}),[c]);const h=T.useCallback(()=>{if(u.current){const w=u.current;w.style.height="auto",w.style.height=`${w.scrollHeight}px`}},[]),v=w=>{var E;h(),(E=r.onInput)==null||E.call(r,w)};T.useEffect(()=>{h()},[h,r.value]);const y=w=>{w.preventDefault();const E=p.current;if(!E)return;const S=w.clientY,_=E.offsetHeight,O=R=>{const A=_+(R.clientY-S);A>30&&(E.style.height=A+"px")},N=()=>{document.removeEventListener("mousemove",O),document.removeEventListener("mouseup",N)};document.addEventListener("mousemove",O),document.addEventListener("mouseup",N)},{isDisabled:g,isReadOnly:b,...x}=r;return C.jsxs("div",{ref:p,className:"w-full relative",style:t?void 0:{height:"120px"},children:[t?C.jsx("textarea",{ref:d,rows:1,className:qe(nO({size:o,color:i}),e),disabled:s||g,onInput:v,readOnly:b||!1,"aria-invalid":a,style:{overflow:"hidden"},...x}):C.jsx(Yx,{style:{height:"100%"},children:C.jsx("textarea",{ref:d,rows:1,className:qe(nO({size:o,color:i}),e),disabled:s||g,onInput:v,readOnly:b||!1,"aria-invalid":a,style:{height:"auto",overflow:"hidden",width:"100%"},...x})}),!t&&C.jsx("div",{className:"absolute right-0 bottom-0 -translate-x-full -translate-y-full size-1.75 text-sm cursor-se-resize z-10",onMouseDown:y,children:C.jsx(gW,{})})]})});i8.displayName="InputField";const Es={primary:{container:"bg-primary-light",text:"text-primary-dark",icon:"text-primary-dark",button:"hover:bg-primary-hover hover:text-body"},positive:{container:"bg-positive-light",text:"text-positive-dark",icon:"text-positive-dark",button:"hover:bg-positive hover:text-body"},negative:{container:"bg-negative-light",text:"text-negative-dark",icon:"text-negative-dark",button:"hover:bg-negative hover:text-body"},warning:{container:"bg-warning-light",text:"text-warning-dark",icon:"text-warning-dark",button:"hover:bg-warning hover:text-body"}},a8=({color:e})=>qe("h-6 absolute py-0.5 px-1 rounded whitespace-nowrap flex items-center gap-1",Es[e].container,Es[e].icon),s8=({color:e})=>qe("text-xs font-medium leading-3",Es[e].text),l8=({color:e})=>qe("p-0.5 rounded cursor-pointer",Es[e].button,Es[e].icon),c8=({label:e,color:t="primary",position:r="up",showCloseButton:n=!1,icon:o,children:i,delay:a=2e3,trigger:s="hover"})=>{const[c,u]=T.useState(!1),[d,p]=T.useState(!1),[h,v]=T.useState({position:r,transform:""}),y=T.useRef(null),g=T.useRef(null),b=T.useRef(null),x=T.useCallback(()=>{if(!y.current||!g.current)return;const R=y.current.getBoundingClientRect(),A=g.current.getBoundingClientRect(),D=window.innerWidth,B=window.innerHeight,j=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth,D),M=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight,B),P=4;let V=r,q={position:V,transform:""};const G={up:{fits:R.top-A.height-P>=0,styles:{bottom:`calc(100% + ${P}px)`,left:"50%",transform:"translateX(-50%)"}},"up-start":{fits:R.top-A.height-P>=0&&R.left+A.width<=D,styles:{bottom:`calc(100% + ${P}px)`,left:"0",transform:"translateX(0)"}},"up-end":{fits:R.top-A.height-P>=0&&R.right-A.width>=0,styles:{bottom:`calc(100% + ${P}px)`,right:"0",transform:"translateX(0)"}},down:{fits:R.bottom+A.height+P<=B&&R.bottom+A.height+P<=M,styles:{top:`calc(100% + ${P}px)`,left:"50%",transform:"translateX(-50%)"}},"down-start":{fits:R.bottom+A.height+P<=B&&R.bottom+A.height+P<=M&&R.left+A.width<=D,styles:{top:`calc(100% + ${P}px)`,left:"0",transform:"translateX(0)"}},"down-end":{fits:R.bottom+A.height+P<=B&&R.bottom+A.height+P<=M&&R.right-A.width>=0,styles:{top:`calc(100% + ${P}px)`,right:"0",transform:"translateX(0)"}},left:{fits:R.left-A.width-P>=0,styles:{right:`calc(100% + ${P}px)`,top:"50%",transform:"translateY(-50%)"}},"left-start":{fits:R.left-A.width-P>=0&&R.top+A.height<=B,styles:{right:`calc(100% + ${P}px)`,top:"0",transform:"translateY(0)"}},"left-end":{fits:R.left-A.width-P>=0&&R.bottom-A.height>=0,styles:{right:`calc(100% + ${P}px)`,bottom:"0",transform:"translateY(0)"}},right:{fits:R.right+A.width+P<=D&&R.right+A.width+P<=j,styles:{left:`calc(100% + ${P}px)`,top:"50%",transform:"translateY(-50%)"}},"right-start":{fits:R.right+A.width+P<=D&&R.right+A.width+P<=j&&R.top+A.height<=B,styles:{left:`calc(100% + ${P}px)`,top:"0",transform:"translateY(0)"}},"right-end":{fits:R.right+A.width+P<=D&&R.right+A.width+P<=j&&R.bottom-A.height>=0,styles:{left:`calc(100% + ${P}px)`,bottom:"0",transform:"translateY(0)"}}},W=R.left+R.width/2-A.width/2,Q=R.left+R.width/2+A.width/2;if((r==="up"||r==="down")&&(W<0||Q>D)&&(G[r].fits=!1),G[r].fits)q={position:r,...G[r].styles};else{const z=["up","up-start","up-end","down","down-start","down-end","right","right-start","right-end","left","left-start","left-end"].find(U=>G[U].fits);if(z)V=z,q={position:V,...G[z].styles};else{const U={up:R.top,"up-start":R.top,"up-end":R.top,down:Math.min(B-R.bottom,M-R.bottom),"down-start":Math.min(B-R.bottom,M-R.bottom),"down-end":Math.min(B-R.bottom,M-R.bottom),left:R.left,"left-start":R.left,"left-end":R.left,right:Math.min(D-R.right,j-R.right),"right-start":Math.min(D-R.right,j-R.right),"right-end":Math.min(D-R.right,j-R.right)},ie=Object.entries(U).reduce((te,[$,K])=>K>te.space?{position:$,space:K}:te,{position:"up",space:0}).position;V=ie,q={position:V,...G[ie].styles}}}v(q)},[r]),w=()=>{s==="click"&&(u(!0),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{d||u(!1)},a))},E=R=>{R.stopPropagation(),u(!1),b.current&&clearTimeout(b.current)},S=()=>{p(!0),b.current&&clearTimeout(b.current)},_=()=>{p(!1),c&&(b.current=setTimeout(()=>{u(!1)},a))},O=()=>{s==="hover"&&u(!0)},N=()=>{s==="hover"&&u(!1)};return T.useEffect(()=>{if(c&&g.current){const R=requestAnimationFrame(()=>{x()});return()=>cancelAnimationFrame(R)}},[c,e,x]),T.useEffect(()=>{const R=()=>{c&&x()},A=()=>{c&&x()};return window.addEventListener("resize",R),window.addEventListener("scroll",A,!0),()=>{window.removeEventListener("resize",R),window.removeEventListener("scroll",A,!0),b.current&&clearTimeout(b.current)}},[c,x]),C.jsxs("div",{"data-qui":"Tooltip",ref:y,onClick:w,onMouseEnter:O,onMouseLeave:N,className:"relative h-full flex items-center",children:[i,c&&C.jsxs("div",{ref:g,role:"tooltip",className:a8({color:t}),style:{position:"absolute",left:h.left,right:h.right,top:h.top,bottom:h.bottom,transform:h.transform,zIndex:1e3},onMouseEnter:S,onMouseLeave:_,children:[o&&C.jsx("span",{children:o}),C.jsx("p",{className:s8({color:t}),children:e}),n&&C.jsx("div",{onClick:E,className:l8({color:t}),role:"button",children:C.jsx(b2,{})})]})]})};var cO;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(cO||(cO={}));const u8=Object.freeze({x:0,y:0});var Mi;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Mi||(Mi={}));var uO;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(uO||(uO={}));var qr;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(qr||(qr={}));qr.Space,qr.Enter,qr.Esc,qr.Space,qr.Enter,qr.Tab;var dO;(function(e){e[e.RightClick=2]="RightClick"})(dO||(dO={}));var fO;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(fO||(fO={}));var pO;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(pO||(pO={}));Mi.Backward+"",Mi.Forward+"",Mi.Backward+"",Mi.Forward+"";var lx;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(lx||(lx={}));var cx;(function(e){e.Optimized="optimized"})(cx||(cx={}));lx.WhileDragging,cx.Optimized;({...u8});var hO;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(hO||(hO={}));qr.Down,qr.Right,qr.Up,qr.Left;const d8=(e,t)=>{const r=qe("group flex items-center justify-between space-x-4","rounded-t px-2 text-xs","focus:outline-hidden");return e&&!t?qe(r,"z-2 border border-b-0 border-tab-border","bg-tab-active-bg font-semibold text-tab-active-fg"):t&&!e?qe(r,"border border-transparent bg-tab-inactive-bg text-inactive-text"):qe(r,"border border-transparent bg-tab-inactive-bg text-tab-inactive-fg","hover:text-tab-active-fg")},f8=T.forwardRef(({isActive:e=!1,isDesactive:t=!1,children:r,...n},o)=>C.jsx("div",{"data-qui":"TabNavContainer",className:d8(e,t),ref:o,...n,children:r}));f8.displayName="TabNavContainer";var Rt=function(){return Rt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Rt.apply(this,arguments)},vO={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},gO={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},cc={width:"20px",height:"20px",position:"absolute",zIndex:1},p8={top:Rt(Rt({},vO),{top:"-5px"}),right:Rt(Rt({},gO),{left:void 0,right:"-5px"}),bottom:Rt(Rt({},vO),{top:void 0,bottom:"-5px"}),left:Rt(Rt({},gO),{left:"-5px"}),topRight:Rt(Rt({},cc),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Rt(Rt({},cc),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Rt(Rt({},cc),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Rt(Rt({},cc),{left:"-10px",top:"-10px",cursor:"nw-resize"})},h8=T.memo(function(e){var t=e.onResizeStart,r=e.direction,n=e.children,o=e.replaceStyles,i=e.className,a=T.useCallback(function(u){t(u,r)},[t,r]),s=T.useCallback(function(u){t(u,r)},[t,r]),c=T.useMemo(function(){return Rt(Rt({position:"absolute",userSelect:"none"},p8[r]),o??{})},[o,r]);return C.jsx("div",{className:i||void 0,style:c,onMouseDown:a,onTouchStart:s,children:n})}),v8=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),gn=function(){return gn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},gn.apply(this,arguments)},g8={width:"auto",height:"auto"},uc=function(e,t,r){return Math.max(Math.min(e,r),t)},mO=function(e,t,r){var n=Math.round(e/t);return n*t+r*(n-1)},Oi=function(e,t){return new RegExp(e,"i").test(t)},dc=function(e){return!!(e.touches&&e.touches.length)},m8=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},bO=function(e,t,r){r===void 0&&(r=0);var n=t.reduce(function(i,a,s){return Math.abs(a-e)<Math.abs(t[i]-e)?s:i},0),o=Math.abs(t[n]-e);return r===0||o<r?t[n]:e},xp=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},fc=function(e,t,r,n){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var o=Number(e.replace("%",""))/100;return t*o}if(e.endsWith("vw")){var o=Number(e.replace("vw",""))/100;return r*o}if(e.endsWith("vh")){var o=Number(e.replace("vh",""))/100;return n*o}}return e},b8=function(e,t,r,n,o,i,a){return n=fc(n,e.width,t,r),o=fc(o,e.height,t,r),i=fc(i,e.width,t,r),a=fc(a,e.height,t,r),{maxWidth:typeof n>"u"?void 0:Number(n),maxHeight:typeof o>"u"?void 0:Number(o),minWidth:typeof i>"u"?void 0:Number(i),minHeight:typeof a>"u"?void 0:Number(a)}},y8=function(e){return Array.isArray(e)?e:[e,e]},w8=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],yO="__resizable_base__",x8=(function(e){v8(t,e);function t(r){var n,o,i,a,s=e.call(this,r)||this;return s.ratio=1,s.resizable=null,s.parentLeft=0,s.parentTop=0,s.resizableLeft=0,s.resizableRight=0,s.resizableTop=0,s.resizableBottom=0,s.targetLeft=0,s.targetTop=0,s.delta={width:0,height:0},s.appendBase=function(){if(!s.resizable||!s.window)return null;var c=s.parentNode;if(!c)return null;var u=s.window.document.createElement("div");return u.style.width="100%",u.style.height="100%",u.style.position="absolute",u.style.transform="scale(0, 0)",u.style.left="0",u.style.flex="0 0 100%",u.classList?u.classList.add(yO):u.className+=yO,c.appendChild(u),u},s.removeBase=function(c){var u=s.parentNode;u&&u.removeChild(c)},s.state={isResizing:!1,width:(o=(n=s.propsSize)===null||n===void 0?void 0:n.width)!==null&&o!==void 0?o:"auto",height:(a=(i=s.propsSize)===null||i===void 0?void 0:i.height)!==null&&a!==void 0?a:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},s.onResizeStart=s.onResizeStart.bind(s),s.onMouseMove=s.onMouseMove.bind(s),s.onMouseUp=s.onMouseUp.bind(s),s}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||g8},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var r=0,n=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,i=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),r=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:o,n=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:i,this.resizable.style.position=a}return{width:r,height:n}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var r=this,n=this.props.size,o=function(s){var c;if(typeof r.state[s]>"u"||r.state[s]==="auto")return"auto";if(r.propsSize&&r.propsSize[s]&&!((c=r.propsSize[s])===null||c===void 0)&&c.toString().endsWith("%")){if(r.state[s].toString().endsWith("%"))return r.state[s].toString();var u=r.getParentSize(),d=Number(r.state[s].toString().replace("px","")),p=d/u[s]*100;return"".concat(p,"%")}return xp(r.state[s])},i=n&&typeof n.width<"u"&&!this.state.isResizing?xp(n.width):o("width"),a=n&&typeof n.height<"u"&&!this.state.isResizing?xp(n.height):o("height");return{width:i,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var r=this.appendBase();if(!r)return{width:0,height:0};var n=!1,o=this.parentNode.style.flexWrap;o!=="wrap"&&(n=!0,this.parentNode.style.flexWrap="wrap"),r.style.position="relative",r.style.minWidth="100%",r.style.minHeight="100%";var i={width:r.offsetWidth,height:r.offsetHeight};return n&&(this.parentNode.style.flexWrap=o),this.removeBase(r),i},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var r=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:r.flexBasis!=="auto"?r.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(r,n){var o=this.propsSize&&this.propsSize[n];return this.state[n]==="auto"&&this.state.original[n]===r&&(typeof o>"u"||o==="auto")?"auto":r},t.prototype.calculateNewMaxFromBoundary=function(r,n){var o=this.props.boundsByDirection,i=this.state.direction,a=o&&Oi("left",i),s=o&&Oi("top",i),c,u;if(this.props.bounds==="parent"){var d=this.parentNode;d&&(c=a?this.resizableRight-this.parentLeft:d.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:d.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(c=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(c=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return c&&Number.isFinite(c)&&(r=r&&r<c?r:c),u&&Number.isFinite(u)&&(n=n&&n<u?n:u),{maxWidth:r,maxHeight:n}},t.prototype.calculateNewSizeFromDirection=function(r,n){var o=this.props.scale||1,i=y8(this.props.resizeRatio||1),a=i[0],s=i[1],c=this.state,u=c.direction,d=c.original,p=this.props,h=p.lockAspectRatio,v=p.lockAspectRatioExtraHeight,y=p.lockAspectRatioExtraWidth,g=d.width,b=d.height,x=v||0,w=y||0;return Oi("right",u)&&(g=d.width+(r-d.x)*a/o,h&&(b=(g-w)/this.ratio+x)),Oi("left",u)&&(g=d.width-(r-d.x)*a/o,h&&(b=(g-w)/this.ratio+x)),Oi("bottom",u)&&(b=d.height+(n-d.y)*s/o,h&&(g=(b-x)*this.ratio+w)),Oi("top",u)&&(b=d.height-(n-d.y)*s/o,h&&(g=(b-x)*this.ratio+w)),{newWidth:g,newHeight:b}},t.prototype.calculateNewSizeFromAspectRatio=function(r,n,o,i){var a=this.props,s=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,d=typeof i.width>"u"?10:i.width,p=typeof o.width>"u"||o.width<0?r:o.width,h=typeof i.height>"u"?10:i.height,v=typeof o.height>"u"||o.height<0?n:o.height,y=c||0,g=u||0;if(s){var b=(h-y)*this.ratio+g,x=(v-y)*this.ratio+g,w=(d-g)/this.ratio+y,E=(p-g)/this.ratio+y,S=Math.max(d,b),_=Math.min(p,x),O=Math.max(h,w),N=Math.min(v,E);r=uc(r,S,_),n=uc(n,O,N)}else r=uc(r,d,p),n=uc(n,h,v);return{newWidth:r,newHeight:n}},t.prototype.setBoundingClientRect=function(){var r=1/(this.props.scale||1);if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var o=n.getBoundingClientRect();this.parentLeft=o.left*r,this.parentTop=o.top*r}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left*r,this.targetTop=i.top*r}if(this.resizable){var a=this.resizable.getBoundingClientRect(),s=a.left,c=a.top,u=a.right,d=a.bottom;this.resizableLeft=s*r,this.resizableRight=u*r,this.resizableTop=c*r,this.resizableBottom=d*r}},t.prototype.onResizeStart=function(r,n){if(!(!this.resizable||!this.window)){var o=0,i=0;if(r.nativeEvent&&m8(r.nativeEvent)?(o=r.nativeEvent.clientX,i=r.nativeEvent.clientY):r.nativeEvent&&dc(r.nativeEvent)&&(o=r.nativeEvent.touches[0].clientX,i=r.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(r,n,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,c=this.window.getComputedStyle(this.resizable);if(c.flexBasis!=="auto"){var u=this.parentNode;if(u){var d=this.window.getComputedStyle(u).flexDirection;this.flexDir=d.startsWith("row")?"row":"column",s=c.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var p={original:{x:o,y:i,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:gn(gn({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(r.target).cursor||"auto"}),direction:n,flexBasis:s};this.setState(p)}},t.prototype.onMouseMove=function(r){var n=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&dc(r))try{r.preventDefault(),r.stopPropagation()}catch{}var o=this.props,i=o.maxWidth,a=o.maxHeight,s=o.minWidth,c=o.minHeight,u=dc(r)?r.touches[0].clientX:r.clientX,d=dc(r)?r.touches[0].clientY:r.clientY,p=this.state,h=p.direction,v=p.original,y=p.width,g=p.height,b=this.getParentSize(),x=b8(b,this.window.innerWidth,this.window.innerHeight,i,a,s,c);i=x.maxWidth,a=x.maxHeight,s=x.minWidth,c=x.minHeight;var w=this.calculateNewSizeFromDirection(u,d),E=w.newHeight,S=w.newWidth,_=this.calculateNewMaxFromBoundary(i,a);this.props.snap&&this.props.snap.x&&(S=bO(S,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(E=bO(E,this.props.snap.y,this.props.snapGap));var O=this.calculateNewSizeFromAspectRatio(S,E,{width:_.maxWidth,height:_.maxHeight},{width:s,height:c});if(S=O.newWidth,E=O.newHeight,this.props.grid){var N=mO(S,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),R=mO(E,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),A=this.props.snapGap||0,D=A===0||Math.abs(N-S)<=A?N:S,B=A===0||Math.abs(R-E)<=A?R:E;S=D,E=B}var j={width:S-v.width,height:E-v.height};if(this.delta=j,y&&typeof y=="string"){if(y.endsWith("%")){var M=S/b.width*100;S="".concat(M,"%")}else if(y.endsWith("vw")){var P=S/this.window.innerWidth*100;S="".concat(P,"vw")}else if(y.endsWith("vh")){var V=S/this.window.innerHeight*100;S="".concat(V,"vh")}}if(g&&typeof g=="string"){if(g.endsWith("%")){var M=E/b.height*100;E="".concat(M,"%")}else if(g.endsWith("vw")){var P=E/this.window.innerWidth*100;E="".concat(P,"vw")}else if(g.endsWith("vh")){var V=E/this.window.innerHeight*100;E="".concat(V,"vh")}}var q={width:this.createSizeForCssProperty(S,"width"),height:this.createSizeForCssProperty(E,"height")};this.flexDir==="row"?q.flexBasis=q.width:this.flexDir==="column"&&(q.flexBasis=q.height);var G=this.state.width!==q.width,W=this.state.height!==q.height,Q=this.state.flexBasis!==q.flexBasis,z=G||W||Q;z&&Wx.flushSync(function(){n.setState(q)}),this.props.onResize&&z&&this.props.onResize(r,h,this.resizable,j)}},t.prototype.onMouseUp=function(r){var n,o,i=this.state,a=i.isResizing,s=i.direction;i.original,!(!a||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(r,s,this.resizable,this.delta),this.props.size&&this.setState({width:(n=this.props.size.width)!==null&&n!==void 0?n:"auto",height:(o=this.props.size.height)!==null&&o!==void 0?o:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:gn(gn({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(r){var n,o;this.setState({width:(n=r.width)!==null&&n!==void 0?n:"auto",height:(o=r.height)!==null&&o!==void 0?o:"auto"})},t.prototype.renderResizer=function(){var r=this,n=this.props,o=n.enable,i=n.handleStyles,a=n.handleClasses,s=n.handleWrapperStyle,c=n.handleWrapperClass,u=n.handleComponent;if(!o)return null;var d=Object.keys(o).map(function(p){return o[p]!==!1?C.jsx(h8,{direction:p,onResizeStart:r.onResizeStart,replaceStyles:i&&i[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return C.jsx("div",{className:c,style:s,children:d})},t.prototype.render=function(){var r=this,n=Object.keys(this.props).reduce(function(a,s){return w8.indexOf(s)!==-1||(a[s]=r.props[s]),a},{}),o=gn(gn(gn({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return C.jsxs(i,gn({style:o,className:this.props.className},n,{ref:function(a){a&&(r.resizable=a)},children:[this.state.isResizing&&C.jsx("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t})(T.PureComponent);const _8={0:"bg-panel-0",1:"bg-panel-1",2:"bg-panel-2",3:"bg-panel-3",4:"bg-panel-4"},E8={tabs:"border-tab-border",primary:"border-primary",normal:"border-panel-border"},W2=({depth:e=0,className:t,contentType:r,disabled:n})=>qe("transition-colors duration-200",{"text-body":!n,"text-inactive-text":n},r?E8[r]:"border-panel-border",_8[e],t),S8=e=>{if(!e)return{};const t={},r=e.match(/min-w-\[(\d+)px\]/);r&&(t.minWidth=parseInt(r[1],10));const n=e.match(/max-w-\[(\d+)px\]/);n&&(t.maxWidth=parseInt(n[1],10));const o=e.match(/min-h-\[(\d+)px\]/);o&&(t.minHeight=parseInt(o[1],10));const i=e.match(/max-h-\[(\d+)px\]/);return i&&(t.maxHeight=parseInt(i[1],10)),t},O8=T.forwardRef(({children:e,width:t,height:r,minWidth:n=10,minHeight:o=10,maxWidth:i,maxHeight:a,defaultWidth:s,defaultHeight:c,defaultSize:u,size:d,grid:p,snap:h,lockAspectRatio:v=!1,enable:y,handleStyles:g={},handleClasses:b={},handleComponent:x={},style:w={},className:E,onResizeStart:S,onResize:_,onResizeStop:O,scale:N=1,bounds:R,snapGap:A,as:D="div",depth:B,disabled:j},M)=>{const P=W2({depth:B,className:E,disabled:j}),V=S8(E),q=d?{size:d}:t!==void 0||r!==void 0?{size:{width:t??"auto",height:r??"auto"}}:{},G=u?{defaultSize:u}:s!==void 0||c!==void 0?{defaultSize:{width:s??"auto",height:c??"auto"}}:{},W=T.useRef(null);return T.useImperativeHandle(M,()=>{var Q;return(Q=W.current)==null?void 0:Q.resizable}),C.jsx(x8,{"data-qui":"Resizable",ref:W,...q,...G,minWidth:n??V.minWidth,minHeight:o??V.minHeight,maxWidth:i??V.maxWidth,maxHeight:a??V.maxHeight,grid:p,snap:h,lockAspectRatio:v,enable:y,handleStyles:g,handleClasses:b,handleComponent:x,style:w,className:qe("relative box-border",P),onResizeStart:S,onResize:_,onResizeStop:O,scale:N,bounds:R,snapGap:A,as:D,children:e})});O8.displayName="Resizable";T.createContext(null);const mo=T.forwardRef(({depth:e=0,className:t,children:r,contentType:n,disabled:o,...i},a)=>{const s=W2({depth:e,className:t,contentType:n,disabled:o});return C.jsx("div",{"data-qui":"Panel",ref:a,className:s,"aria-disabled":o,...i,children:r})});mo.displayName="Panel";const zu={sm:{container:"h-5 px-0.5 gap-1 rounded",text:"text-xxs leading-3",icon:"text-s",iconButton:"text-s p-0.5 cursor-pointer"},md:{container:"h-5.5 px-1 gap-1 rounded",text:"text-xs leading-4",icon:"text-sm",iconButton:" text-sm p-0.5 cursor-pointer"},lg:{container:"h-6 px-1.5 gap-1.5 rounded",text:"text-s leading-none",icon:"text-base",iconButton:"text-base p-0.5 cursor-pointer"}},Vc={primary:{bg:"bg-primary",text:"text-body",border:"border-primary",buttonHover:"hover:bg-primary-hover"},white:{bg:"bg-canvas-default",text:"text-primary",border:"border-canvas-default",buttonHover:"hover:bg-primary-hover hover:text-body"},positive:{bg:"bg-positive",text:"text-body",border:"border-positive",buttonHover:"hover:bg-positive-hover"},warning:{bg:"bg-warning",text:"text-body",border:"border-warning",buttonHover:"hover:bg-warning-hover"},negative:{bg:"bg-negative",text:"text-body",border:"border-negative",buttonHover:"hover:bg-negative-hover"}},C8=(e,t)=>qe("inline-flex items-center justify-center font-medium border",zu[e].container,Vc[t].bg,Vc[t].text,Vc[t].border),I8=(e,t,r)=>qe({[zu[e].icon]:!r,"bg-canvas-default outline-canvas-default text-primary":r&&t!=="white"||r,"bg-primary outline-primary text-body":r&&t==="white"&&!r,"outline-solid outline-1 h-full py-0.5 grid place-items-center -my-1 only:-mx-0.5 first:-ml-1.5 last:-mr-1.5 only:rounded first:rounded-l last:rounded-r":r||r}),R8=e=>qe(zu[e].text),U2=(e,t)=>qe("inline-flex items-center justify-center rounded transition-colors duration-200 focus:outline-hidden ",zu[e].iconButton,Vc[t].buttonHover),G2=T.createContext(null),Bu=()=>{const e=T.useContext(G2);if(!e)throw new Error("Pill components must be used within a Pill.Root");return e},Xx=T.forwardRef(({size:e="md",color:t="primary",className:r,children:n,...o},i)=>{const a={size:e,color:t};return C.jsx(G2.Provider,{value:a,children:C.jsx("div",{"data-qui":"Pill",ref:i,className:qe(C8(e,t),r),...o,children:n})})});Xx.displayName="Pill.Root";const Zx=T.forwardRef(({className:e,children:t,...r},n)=>{const{size:o}=Bu();return C.jsx("span",{ref:n,className:qe(R8(o),e),...r,children:t})});Zx.displayName="Pill.Text";const Jx=T.forwardRef(({className:e,children:t,label:r,position:n,...o},i)=>{const{size:a,color:s}=Bu(),c=!!r,u=C.jsx("span",{ref:i,className:qe(I8(a,s,c),e),...o,children:t});return c?C.jsx(c8,{label:r||"",position:n||"up",children:u}):u});Jx.displayName="Pill.Icon";const K2=T.forwardRef(({className:e,children:t,...r},n)=>{const{size:o,color:i}=Bu();return C.jsx("button",{ref:n,type:"button",className:qe(U2(o,i),e),...r,children:t})});K2.displayName="Pill.Button";const Qx=T.forwardRef(({className:e,onClose:t,"aria-label":r="Remove pill",children:n,...o},i)=>{const{size:a,color:s}=Bu();return C.jsx("button",{ref:i,type:"button",className:qe(U2(a,s),e),onClick:t,"aria-label":r,...o,children:n||C.jsx(b2,{})})});Qx.displayName="Pill.Close";const Y2=T.forwardRef(({size:e="md",color:t="primary",label:r,icon:n,onClose:o,closable:i=!1,className:a,...s},c)=>C.jsxs(Xx,{ref:c,size:e,color:t,className:a,...s,children:[n&&C.jsx(Jx,{children:n}),C.jsx(Zx,{children:r}),i&&C.jsx(Qx,{onClose:o})]}));Y2.displayName="Pill";Object.assign(Y2,{Root:Xx,Text:Zx,Icon:Jx,Button:K2,Close:Qx});const N8=T.createContext(null),Fu=()=>{const e=T.useContext(N8);if(!e)throw new Error("Select compound components must be used within Select.Root");return e},$u={sm:{trigger:"h-5 min-h-fit",control:"min-h-5 p-0.5 gap-1",input:"text-2.25 h-3.5",placeholder:"text-2.25",singleValue:"text-2.25",multiValue:"h-3.5 px-0.5 gap-1 text-2",multiValueLabel:"text-2",multiValueRemove:"w-3 h-3",indicatorsContainer:"gap-1",clearIndicator:"p-0.5 size-3",dropdownIndicator:"p-0.5 size-3",indicatorSeparator:"h-3",loadingIndicator:"w-3 h-3",menu:"m-0",menuList:"py-1",option:"px-1 py-0.5 text-xs",group:"pt-1",groupHeading:"px-2 py-0.5 text-2",noOptionsMessage:"px-2 py-1 text-2.25",loadingMessage:"px-2 py-1 text-2.25",message:"text-2.25 p-1.5",icon:"text-sm"},md:{trigger:"h-6 min-h-fit",control:"min-h-6 p-1 gap-1.5",input:"text-xs h-4",placeholder:"text-xs",singleValue:"text-xs",multiValue:"h-4 p-1 gap-1 text-2.5",multiValueLabel:"text-2.5",multiValueRemove:"w-3.5 h-3.5",indicatorsContainer:"gap-1",clearIndicator:"p-0.5 size-4",dropdownIndicator:"p-0.5 size-4",indicatorSeparator:"h-4",loadingIndicator:"w-4 h-4",menu:"m-0",menuList:"my-1",option:"px-2 py-1 text-s",group:"pt-1.5",groupHeading:"px-3 py-1 text-2.5",noOptionsMessage:"px-2 py-1.5 text-xs",loadingMessage:"px-3 py-1.5 text-xs",message:"text-xs p-2",icon:"text-base"},lg:{trigger:"h-7 min-h-fit",control:"min-h-7 p-1.5 gap-2",input:"text-s h-5",placeholder:"text-s",singleValue:"text-s",multiValue:"h-5 px-1.5 gap-1.5 text-xs",multiValueLabel:"text-xs",multiValueRemove:"w-4 h-4",indicatorsContainer:"gap-1.5",clearIndicator:"p-0.5 size-5",dropdownIndicator:"p-1 size-5",indicatorSeparator:"h-5",loadingIndicator:"w-5 h-5",menu:"m-0",menuList:"py-1.5",option:"px-3 py-2 text-sm",group:"pt-2",groupHeading:"px-4 py-1.5 text-xs",noOptionsMessage:"px-4 py-2 text-s",loadingMessage:"px-4 py-2 text-s",message:"text-s p-2.5",icon:"text-lg"}},Fn={primary:{control:"cursor-pointer bg-select-bg text-select-text",controlFocused:"border-input-focus-border",controlDisabled:"opacity-60",controlInvalid:"bg-select-bg border-input-error-border text-select-text",placeholder:"text-input-placeholder placeholder:opacity-60",singleValue:"text-select-text",singleValueDisabled:"text-input-placeholder",multiValue:"bg-input-option-active-bg text-input-option-active-text",multiValueLabel:"text-input-option-active-text",multiValueRemove:"text-input-option-active-text hover:bg-input-option-hover-bg hover:text-body rounded-xs p-px",multiValueRemoveHover:"hover:bg-input-option-hover-bg",multiValueDisabled:"bg-canvas-subtle text-muted",clearIndicator:"text-input-text hover:text-body cursor-pointer",clearIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",dropdownIndicator:"text-input-text",dropdownIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",indicatorSeparator:"bg-input-border",loadingIndicator:"text-primary",menu:"bg-select-list-bg border-select-border shadow-lg",menuList:"scrollbar-thin scrollbar-thumb-input-border scrollbar-track-transparent",option:"text-select-text cursor-pointer",optionFocused:"bg-input-option-hover-bg text-body",optionSelected:"bg-input-option-active-bg text-input-option-active-text",optionDisabled:"text-input-placeholder cursor-not-allowed",group:"",groupHeading:"text-input-placeholder font-semibold",noOptionsMessage:"text-input-placeholder",loadingMessage:"text-input-placeholder",message:"text-primary-dark",messageBackground:"bg-input-message-bg",messageBorder:"border-input-info-border",icon:"text-input-text",iconAction:"text-input-text hover:text-body",iconActionHover:"hover:text-body hover:bg-input-option-hover-bg"},positive:{control:"cursor-pointer bg-select-bg text-select-text",controlFocused:"border-positive",controlDisabled:"opacity-60",controlInvalid:"bg-select-bg border-input-error-border text-select-text",placeholder:"text-input-placeholder placeholder:opacity-60",singleValue:"text-select-text",singleValueDisabled:"text-input-placeholder",multiValue:"bg-input-option-active-bg text-input-option-active-text",multiValueLabel:"text-input-option-active-text",multiValueRemove:"text-input-option-active-text hover:bg-input-option-hover-bg hover:text-body rounded-xs p-px",multiValueRemoveHover:"hover:bg-input-option-hover-bg",multiValueDisabled:"bg-canvas-subtle text-muted",clearIndicator:"text-input-text hover:text-body cursor-pointer",clearIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",dropdownIndicator:"text-input-text",dropdownIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",indicatorSeparator:"bg-input-border",loadingIndicator:"text-positive",menu:"bg-select-list-bg border-select-border shadow-lg",menuList:"",option:"text-select-text cursor-pointer",optionFocused:"bg-input-option-hover-bg text-body",optionSelected:"bg-input-option-active-bg text-input-option-active-text",optionDisabled:"text-input-placeholder cursor-not-allowed",group:"",groupHeading:"text-input-placeholder font-semibold",noOptionsMessage:"text-input-placeholder",loadingMessage:"text-input-placeholder",message:"text-positive-dark",messageBackground:"bg-positive-light",messageBorder:"border-positive",icon:"text-input-text",iconAction:"text-input-text hover:text-body",iconActionHover:"hover:text-body hover:bg-input-option-hover-bg"},warning:{control:"cursor-pointer bg-select-bg text-select-text",controlFocused:"border-input-warning-border",controlDisabled:"opacity-60",controlInvalid:"bg-select-bg border-input-error-border text-select-text",placeholder:"text-input-placeholder placeholder:opacity-60",singleValue:"text-select-text",singleValueDisabled:"text-input-placeholder",multiValue:"bg-input-option-active-bg text-input-option-active-text",multiValueLabel:"text-input-option-active-text",multiValueRemove:"text-input-option-active-text hover:bg-input-option-hover-bg hover:text-body rounded-xs p-px",multiValueRemoveHover:"hover:bg-input-option-hover-bg",multiValueDisabled:"bg-canvas-subtle text-muted",clearIndicator:"text-input-text hover:text-body cursor-pointer",clearIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",dropdownIndicator:"text-input-text",dropdownIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",indicatorSeparator:"bg-input-border",loadingIndicator:"text-warning",menu:"bg-select-list-bg border-select-border shadow-lg",menuList:"bg-select-list-bg border-select-border shadow-lg",option:"text-select-text cursor-pointer",optionFocused:"bg-input-option-hover-bg text-body",optionSelected:"bg-input-option-active-bg text-input-option-active-text",optionDisabled:"text-input-placeholder cursor-not-allowed",group:"",groupHeading:"text-input-placeholder font-semibold",noOptionsMessage:"text-input-placeholder",loadingMessage:"text-input-placeholder",message:"text-warning-dark",messageBackground:"bg-input-warning-bg",messageBorder:"border-input-warning-border",icon:"text-input-text",iconAction:"text-input-text hover:text-body",iconActionHover:"hover:text-body hover:bg-input-option-hover-bg"},negative:{control:"cursor-pointer bg-select-bg text-select-text",controlFocused:"border-input-error-border",controlDisabled:"opacity-60",controlInvalid:"bg-select-bg border-input-error-border text-select-text",placeholder:"text-input-placeholder placeholder:opacity-60",singleValue:"text-select-text",singleValueDisabled:"text-input-placeholder",multiValue:"bg-input-option-active-bg text-input-option-active-text",multiValueLabel:"text-input-option-active-text",multiValueRemove:"text-input-option-active-text hover:bg-input-option-hover-bg hover:text-body rounded-xs p-px",multiValueRemoveHover:"hover:bg-input-option-hover-bg",multiValueDisabled:"bg-canvas-subtle text-muted",clearIndicator:"text-input-text hover:text-body cursor-pointer",clearIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",dropdownIndicator:"text-input-text",dropdownIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",indicatorSeparator:"bg-input-border",loadingIndicator:"text-negative",menu:"bg-select-list-bg border-select-border shadow-lg",menuList:"scrollbar-thin scrollbar-thumb-input-border scrollbar-track-transparent",option:"text-select-text cursor-pointer",optionFocused:"bg-input-option-hover-bg text-body",optionSelected:"bg-input-option-active-bg text-input-option-active-text",optionDisabled:"text-input-placeholder cursor-not-allowed",group:"",groupHeading:"text-input-placeholder font-semibold",noOptionsMessage:"text-input-placeholder",loadingMessage:"text-input-placeholder",message:"text-negative-dark",messageBackground:"bg-input-error-bg",messageBorder:"border-input-error-border",icon:"text-input-text",iconAction:"text-input-text hover:text-body",iconActionHover:"hover:text-body hover:bg-input-option-hover-bg"}},P8=({size:e,color:t,isDisabled:r,isFocused:n,isInvalid:o,hasMessage:i})=>qe("flex items-center justify-between border border-select-border only:rounded first:rounded-t last:rounded-b",$u[e].control,o&&!n?Fn[t].controlInvalid:Fn[t].control,{[Fn[t].controlFocused]:n&&!i,[Fn[t].controlDisabled]:r,"border-0 ring-1":i,[Fn[t].messageBorder]:i}),T8=({size:e,color:t})=>qe("bg-transparent border-0 outline-hidden flex-1 min-w-7.5 px-1",$u[e].input,Fn[t].placeholder),A8=({size:e,placement:t,hasMessage:r,color:n})=>{const o={auto:"top-full rounded-t-none",bottom:"top-full rounded-t-none",top:"bottom-full rounded-b-none"};return qe("absolute w-full z-50 rounded overflow-hidden border border-t-0",Fn.primary.menu,{[Fn[n].messageBorder]:r},o[t||"auto"],$u[e].menu)},k8=({size:e})=>qe("overflow-y-auto",$u[e].menuList,Fn.primary.menuList);function Ba(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Ot(){return Ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ot.apply(null,arguments)}function ux(e,t){return ux=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},ux(e,t)}function M8(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ux(e,t)}var pc={exports:{}},_p={exports:{}},Je={};/** @license React v16.13.1
19
19
  * react-is.production.min.js
20
20
  *
21
21
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -50,18 +50,18 @@ Valid keys: `+JSON.stringify(Object.keys(z),null," "));var ee=se(H,re,$,K,Z+"."
50
50
  *
51
51
  * This source code is licensed under the MIT license found in the
52
52
  * LICENSE file in the root directory of this source tree.
53
- */var AO;function V8(){return AO||(AO=1,process.env.NODE_ENV!=="production"&&(function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),y=!1,g=!1,b=!1,x=!1,w=!1,E;E=Symbol.for("react.module.reference");function S(ve){return!!(typeof ve=="string"||typeof ve=="function"||ve===r||ve===o||w||ve===n||ve===u||ve===d||x||ve===v||y||g||b||typeof ve=="object"&&ve!==null&&(ve.$$typeof===h||ve.$$typeof===p||ve.$$typeof===i||ve.$$typeof===a||ve.$$typeof===c||ve.$$typeof===E||ve.getModuleId!==void 0))}function _(ve){if(typeof ve=="object"&&ve!==null){var Ee=ve.$$typeof;switch(Ee){case e:var pe=ve.type;switch(pe){case r:case o:case n:case u:case d:return pe;default:var ce=pe&&pe.$$typeof;switch(ce){case s:case a:case c:case h:case p:case i:return ce;default:return Ee}}case t:return Ee}}}var O=a,N=i,R=e,A=c,D=r,B=h,j=p,M=t,P=o,V=n,q=u,G=d,W=!1,Q=!1;function z(ve){return W||(W=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function U(ve){return Q||(Q=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function ie(ve){return _(ve)===a}function te(ve){return _(ve)===i}function $(ve){return typeof ve=="object"&&ve!==null&&ve.$$typeof===e}function K(ve){return _(ve)===c}function Z(ve){return _(ve)===r}function H(ve){return _(ve)===h}function Y(ve){return _(ve)===p}function oe(ve){return _(ve)===t}function re(ve){return _(ve)===o}function se(ve){return _(ve)===n}function ee(ve){return _(ve)===u}function we(ve){return _(ve)===d}it.ContextConsumer=O,it.ContextProvider=N,it.Element=R,it.ForwardRef=A,it.Fragment=D,it.Lazy=B,it.Memo=j,it.Portal=M,it.Profiler=P,it.StrictMode=V,it.Suspense=q,it.SuspenseList=G,it.isAsyncMode=z,it.isConcurrentMode=U,it.isContextConsumer=ie,it.isContextProvider=te,it.isElement=$,it.isForwardRef=K,it.isFragment=Z,it.isLazy=H,it.isMemo=Y,it.isPortal=oe,it.isProfiler=re,it.isStrictMode=se,it.isSuspense=ee,it.isSuspenseList=we,it.isValidElementType=S,it.typeOf=_})()),it}var kO;function W8(){return kO||(kO=1,process.env.NODE_ENV==="production"?Rp.exports=H8():Rp.exports=V8()),Rp.exports}var MO=W8();const DO=e=>typeof e=="object"&&e!=null&&e.nodeType===1,jO=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",hc=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return jO(r.overflowY,t)||jO(r.overflowX,t)||(n=>{const o=(i=>{if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!o&&(o.clientHeight<n.scrollHeight||o.clientWidth<n.scrollWidth)})(e)}return!1},vc=(e,t,r,n,o,i,a,s)=>i<e&&a>t||i>e&&a<t?0:i<=e&&s<=r||a>=t&&s>=r?i-e-n:a>t&&s<r||i<e&&s>r?a-t+o:0,U8=e=>e.parentElement??(e.getRootNode().host||null),G8=(e,t)=>{var r,n,o,i;if(typeof document>"u")return[];const{inline:a,boundary:s,skipOverflowHiddenElements:c}=t,u=typeof s=="function"?s:M=>M!==s;if(!DO(e))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,p=[];let h=e;for(;DO(h)&&u(h);){if(h=U8(h),h===d){p.push(h);break}h!=null&&h===document.body&&hc(h)&&!hc(document.documentElement)||h!=null&&hc(h,c)&&p.push(h)}const v=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,y=(i=(o=window.visualViewport)==null?void 0:o.height)!=null?i:innerHeight,{scrollX:g,scrollY:b}=window,{height:x,width:w,top:E,right:S,bottom:_,left:O}=e.getBoundingClientRect(),{top:N,right:R,left:A}=(M=>{const P=window.getComputedStyle(M);return{top:parseFloat(P.scrollMarginTop)||0,right:parseFloat(P.scrollMarginRight)||0,bottom:parseFloat(P.scrollMarginBottom)||0,left:parseFloat(P.scrollMarginLeft)||0}})(e);let D=E-N,B=a==="center"?O+w/2-A+R:a==="end"?S+R:O-A;const j=[];for(let M=0;M<p.length;M++){const P=p[M],{height:V,width:q,top:G,right:W,bottom:Q,left:z}=P.getBoundingClientRect();if(E>=0&&O>=0&&_<=y&&S<=v&&(P===d&&!hc(P)||E>=G&&_<=Q&&O>=z&&S<=W))return j;const U=getComputedStyle(P),ie=parseInt(U.borderLeftWidth,10),te=parseInt(U.borderTopWidth,10),$=parseInt(U.borderRightWidth,10),K=parseInt(U.borderBottomWidth,10);let Z=0,H=0;const Y="offsetWidth"in P?P.offsetWidth-P.clientWidth-ie-$:0,oe="offsetHeight"in P?P.offsetHeight-P.clientHeight-te-K:0,re="offsetWidth"in P?P.offsetWidth===0?0:q/P.offsetWidth:0,se="offsetHeight"in P?P.offsetHeight===0?0:V/P.offsetHeight:0;if(d===P)Z=vc(b,b+y,y,te,K,b+D,b+D+x,x),H=a==="start"?B:a==="center"?B-v/2:a==="end"?B-v:vc(g,g+v,v,ie,$,g+B,g+B+w,w),Z=Math.max(0,Z+b),H=Math.max(0,H+g);else{Z=vc(G,Q,V,te,K+oe,D,D+x,x),H=a==="start"?B-z-ie:a==="center"?B-(z+q/2)+Y/2:a==="end"?B-W+$+Y:vc(z,W,q,ie,$+Y,B,B+w,w);const{scrollLeft:ee,scrollTop:we}=P;Z=se===0?0:Math.max(0,Math.min(we+Z/se,P.scrollHeight-V/se+oe)),H=re===0?0:Math.max(0,Math.min(ee+H/re,P.scrollWidth-q/re+Y)),D+=we-Z,B+=ee-H}j.push({el:P,top:Z,left:H})}return j};var Ui=function(){return Ui=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Ui.apply(this,arguments)},K8=0;function qO(e){return typeof e=="function"?e:Bn}function Bn(){}function J2(e,t){if(e){var r=G8(e,{boundary:t});r.forEach(function(n){var o=n.el,i=n.top,a=n.left;o.scrollTop=i,o.scrollLeft=a})}}function LO(e,t,r){var n=e===t||t instanceof r.Node&&e.contains&&e.contains(t);return n}function t_(e,t){var r;function n(){r&&clearTimeout(r)}function o(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];n(),r=setTimeout(function(){r=null,e.apply(void 0,a)},t)}return o.cancel=n,o}function pn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return s&&s.apply(void 0,[n].concat(i)),n.preventDownshiftDefault||n.hasOwnProperty("nativeEvent")&&n.nativeEvent.preventDownshiftDefault})}}function zO(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){t.forEach(function(o){typeof o=="function"?o(n):o&&(o.current=n)})}}function Y8(){return String(K8++)}function X8(e){var t=e.isOpen,r=e.resultCount,n=e.previousResultCount;return t?r?r!==n?r+" result"+(r===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function BO(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function Q2(e){return typeof e.type=="string"}function eq(e){return e.props}function Z8(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var J8=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function gc(e){e===void 0&&(e={});var t={};return J8.forEach(function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}function Q8(e,t){return!e||!t?e:Object.keys(e).reduce(function(r,n){return r[n]=dx(t,n)?t[n]:e[n],r},{})}function dx(e,t){return e[t]!==void 0}function FO(e){var t=e.key,r=e.keyCode;return r>=37&&r<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function eG(e){return Object.prototype.toString.call(e)==="[object Object]"}function Np(e,t,r,n,o){var i=r.length;if(i===0)return-1;var a=i-1;(typeof e!="number"||e<0||e>a)&&(e=t>0?-1:a+1);var s=e+t;s<0?s=a:s>a&&(s=0);var c=lu(s,t<0,r,n,o);return c===-1?e>=i?-1:e:c}function lu(e,t,r,n,o){o===void 0&&(o=!1);var i=r.length;if(t){for(var a=e;a>=0;a--)if(!n(r[a],a))return a}else for(var s=e;s<i;s++)if(!n(r[s],s))return s;return o?lu(t?i-1:0,t,r,n):-1}function $O(e,t,r,n){return n===void 0&&(n=!0),r&&t.some(function(o){return o&&(LO(o,e,r)||n&&LO(o,r.document.activeElement,r))})}var r_=Bn;process.env.NODE_ENV!=="production"&&(r_=function(e,t,r){var n="This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";Object.keys(e).forEach(function(o){t[o]!==void 0&&r[o]===void 0?console.error('downshift: A component has changed the controlled prop "'+o+'" to be uncontrolled. '+n):t[o]===void 0&&r[o]!==void 0&&console.error('downshift: A component has changed the uncontrolled prop "'+o+'" to be controlled. '+n)})});var tG=t_(function(e){tq(e).textContent=""},500);function tq(e){var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}function rq(e,t){if(!(!e||!t)){var r=tq(t);r.textContent=e,tG(t)}}var nq=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,oq=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,iq=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,Wc=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,Uc=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,aq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,sq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,lq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,cq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,uq=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,dq=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,fq=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,pq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,fx=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,hq=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,vq=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,gq=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,rG=Object.freeze({__proto__:null,blurButton:hq,blurInput:dq,changeInput:fq,clickButton:fx,clickItem:uq,controlledPropUpdatedSelectedItem:vq,itemMouseEnter:iq,keyDownArrowDown:Uc,keyDownArrowUp:Wc,keyDownEnd:cq,keyDownEnter:sq,keyDownEscape:aq,keyDownHome:lq,keyDownSpaceButton:pq,mouseUp:oq,touchEnd:gq,unknown:nq}),nG=["refKey","ref"],oG=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],iG=["onKeyDown","onBlur","onChange","onInput","onChangeText"],aG=["refKey","ref"],sG=["onMouseMove","onMouseDown","onClick","onPress","index","item"],lG=(function(){var e=(function(t){function r(o){var i;i=t.call(this,o)||this,i.id=i.props.id||"downshift-"+Y8(),i.menuId=i.props.menuId||i.id+"-menu",i.labelId=i.props.labelId||i.id+"-label",i.inputId=i.props.inputId||i.id+"-input",i.getItemId=i.props.getItemId||function(w){return i.id+"-item-"+w},i.items=[],i.itemCount=null,i.previousResultCount=0,i.timeoutIds=[],i.internalSetTimeout=function(w,E){var S=setTimeout(function(){i.timeoutIds=i.timeoutIds.filter(function(_){return _!==S}),w()},E);i.timeoutIds.push(S)},i.setItemCount=function(w){i.itemCount=w},i.unsetItemCount=function(){i.itemCount=null},i.isItemDisabled=function(w,E){var S=i.getItemNodeFromIndex(E);return S&&S.hasAttribute("disabled")},i.setHighlightedIndex=function(w,E){w===void 0&&(w=i.props.defaultHighlightedIndex),E===void 0&&(E={}),E=gc(E),i.internalSetState(Ot({highlightedIndex:w},E))},i.clearSelection=function(w){i.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:i.props.defaultHighlightedIndex,isOpen:i.props.defaultIsOpen},w)},i.selectItem=function(w,E,S){E=gc(E),i.internalSetState(Ot({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,selectedItem:w,inputValue:i.props.itemToString(w)},E),S)},i.selectItemAtIndex=function(w,E,S){var _=i.items[w];_!=null&&i.selectItem(_,E,S)},i.selectHighlightedItem=function(w,E){return i.selectItemAtIndex(i.getState().highlightedIndex,w,E)},i.internalSetState=function(w,E){var S,_,O={},N=typeof w=="function";return!N&&w.hasOwnProperty("inputValue")&&i.props.onInputValueChange(w.inputValue,Ot({},i.getStateAndHelpers(),w)),i.setState(function(R){var A;R=i.getState(R);var D=N?w(R):w;D=i.props.stateReducer(R,D),S=D.hasOwnProperty("selectedItem");var B={};return S&&D.selectedItem!==R.selectedItem&&(_=D.selectedItem),(A=D).type||(A.type=nq),Object.keys(D).forEach(function(j){R[j]!==D[j]&&(O[j]=D[j]),j!=="type"&&(D[j],dx(i.props,j)||(B[j]=D[j]))}),N&&D.hasOwnProperty("inputValue")&&i.props.onInputValueChange(D.inputValue,Ot({},i.getStateAndHelpers(),D)),B},function(){qO(E)();var R=Object.keys(O).length>1;R&&i.props.onStateChange(O,i.getStateAndHelpers()),S&&i.props.onSelect(w.selectedItem,i.getStateAndHelpers()),_!==void 0&&i.props.onChange(_,i.getStateAndHelpers()),i.props.onUserAction(O,i.getStateAndHelpers())})},i.rootRef=function(w){return i._rootNode=w},i.getRootProps=function(w,E){var S,_=w===void 0?{}:w,O=_.refKey,N=O===void 0?"ref":O,R=_.ref,A=za(_,nG),D=E===void 0?{}:E,B=D.suppressRefError,j=B===void 0?!1:B;i.getRootProps.called=!0,i.getRootProps.refKey=N,i.getRootProps.suppressRefError=j;var M=i.getState(),P=M.isOpen;return Ot((S={},S[N]=zO(R,i.rootRef),S.role="combobox",S["aria-expanded"]=P,S["aria-haspopup"]="listbox",S["aria-owns"]=P?i.menuId:void 0,S["aria-labelledby"]=i.labelId,S),A)},i.keyDownHandlers={ArrowDown:function(w){var E=this;if(w.preventDefault(),this.getState().isOpen){var S=w.shiftKey?5:1;this.moveHighlightedIndex(S,{type:Uc})}else this.internalSetState({isOpen:!0,type:Uc},function(){var _=E.getItemCount();if(_>0){var O=E.getState(),N=O.highlightedIndex,R=Np(N,1,{length:_},E.isItemDisabled,!0);E.setHighlightedIndex(R,{type:Uc})}})},ArrowUp:function(w){var E=this;if(w.preventDefault(),this.getState().isOpen){var S=w.shiftKey?-5:-1;this.moveHighlightedIndex(S,{type:Wc})}else this.internalSetState({isOpen:!0,type:Wc},function(){var _=E.getItemCount();if(_>0){var O=E.getState(),N=O.highlightedIndex,R=Np(N,-1,{length:_},E.isItemDisabled,!0);E.setHighlightedIndex(R,{type:Wc})}})},Enter:function(w){if(w.which!==229){var E=this.getState(),S=E.isOpen,_=E.highlightedIndex;if(S&&_!=null){w.preventDefault();var O=this.items[_],N=this.getItemNodeFromIndex(_);if(O==null||N&&N.hasAttribute("disabled"))return;this.selectHighlightedItem({type:sq})}}},Escape:function(w){w.preventDefault(),this.reset(Ot({type:aq},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},i.buttonKeyDownHandlers=Ot({},i.keyDownHandlers,{" ":function(w){w.preventDefault(),this.toggleMenu({type:pq})}}),i.inputKeyDownHandlers=Ot({},i.keyDownHandlers,{Home:function(w){var E=this.getState(),S=E.isOpen;if(S){w.preventDefault();var _=this.getItemCount();if(!(_<=0||!S)){var O=lu(0,!1,{length:_},this.isItemDisabled);this.setHighlightedIndex(O,{type:lq})}}},End:function(w){var E=this.getState(),S=E.isOpen;if(S){w.preventDefault();var _=this.getItemCount();if(!(_<=0||!S)){var O=lu(_-1,!0,{length:_},this.isItemDisabled);this.setHighlightedIndex(O,{type:cq})}}}}),i.getToggleButtonProps=function(w){var E=w===void 0?{}:w,S=E.onClick;E.onPress;var _=E.onKeyDown,O=E.onKeyUp,N=E.onBlur,R=za(E,oG),A=i.getState(),D=A.isOpen,B={onClick:pn(S,i.buttonHandleClick),onKeyDown:pn(_,i.buttonHandleKeyDown),onKeyUp:pn(O,i.buttonHandleKeyUp),onBlur:pn(N,i.buttonHandleBlur)},j=R.disabled?{}:B;return Ot({type:"button",role:"button","aria-label":D?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},j,R)},i.buttonHandleKeyUp=function(w){w.preventDefault()},i.buttonHandleKeyDown=function(w){var E=FO(w);i.buttonKeyDownHandlers[E]&&i.buttonKeyDownHandlers[E].call(i,w)},i.buttonHandleClick=function(w){if(w.preventDefault(),i.props.environment){var E=i.props.environment.document,S=E.body,_=E.activeElement;S&&S===_&&w.target.focus()}process.env.NODE_ENV==="test"?i.toggleMenu({type:fx}):i.internalSetTimeout(function(){return i.toggleMenu({type:fx})})},i.buttonHandleBlur=function(w){var E=w.target;i.internalSetTimeout(function(){if(!(i.isMouseDown||!i.props.environment)){var S=i.props.environment.document.activeElement;(S==null||S.id!==i.inputId)&&S!==E&&i.reset({type:hq})}})},i.getLabelProps=function(w){return Ot({htmlFor:i.inputId,id:i.labelId},w)},i.getInputProps=function(w){var E=w===void 0?{}:w,S=E.onKeyDown,_=E.onBlur,O=E.onChange,N=E.onInput;E.onChangeText;var R=za(E,iG),A,D={};A="onChange";var B=i.getState(),j=B.inputValue,M=B.isOpen,P=B.highlightedIndex;if(!R.disabled){var V;D=(V={},V[A]=pn(O,N,i.inputHandleChange),V.onKeyDown=pn(S,i.inputHandleKeyDown),V.onBlur=pn(_,i.inputHandleBlur),V)}return Ot({"aria-autocomplete":"list","aria-activedescendant":M&&typeof P=="number"&&P>=0?i.getItemId(P):void 0,"aria-controls":M?i.menuId:void 0,"aria-labelledby":R&&R["aria-label"]?void 0:i.labelId,autoComplete:"off",value:j,id:i.inputId},D,R)},i.inputHandleKeyDown=function(w){var E=FO(w);E&&i.inputKeyDownHandlers[E]&&i.inputKeyDownHandlers[E].call(i,w)},i.inputHandleChange=function(w){i.internalSetState({type:fq,isOpen:!0,inputValue:w.target.value,highlightedIndex:i.props.defaultHighlightedIndex})},i.inputHandleBlur=function(){i.internalSetTimeout(function(){var w;if(!(i.isMouseDown||!i.props.environment)){var E=i.props.environment.document.activeElement,S=(E==null||(w=E.dataset)==null?void 0:w.toggle)&&i._rootNode&&i._rootNode.contains(E);S||i.reset({type:dq})}})},i.menuRef=function(w){i._menuNode=w},i.getMenuProps=function(w,E){var S,_=w===void 0?{}:w,O=_.refKey,N=O===void 0?"ref":O,R=_.ref,A=za(_,aG),D=E===void 0?{}:E,B=D.suppressRefError,j=B===void 0?!1:B;return i.getMenuProps.called=!0,i.getMenuProps.refKey=N,i.getMenuProps.suppressRefError=j,Ot((S={},S[N]=zO(R,i.menuRef),S.role="listbox",S["aria-labelledby"]=A&&A["aria-label"]?void 0:i.labelId,S.id=i.menuId,S),A)},i.getItemProps=function(w){var E,S=w===void 0?{}:w,_=S.onMouseMove,O=S.onMouseDown,N=S.onClick;S.onPress;var R=S.index,A=S.item,D=A===void 0?process.env.NODE_ENV==="production"?void 0:Z8("getItemProps","item"):A,B=za(S,sG);R===void 0?(i.items.push(D),R=i.items.indexOf(D)):i.items[R]=D;var j="onClick",M=N,P=(E={onMouseMove:pn(_,function(){R!==i.getState().highlightedIndex&&(i.setHighlightedIndex(R,{type:iq}),i.avoidScrolling=!0,i.internalSetTimeout(function(){return i.avoidScrolling=!1},250))}),onMouseDown:pn(O,function(q){q.preventDefault()})},E[j]=pn(M,function(){i.selectItemAtIndex(R,{type:uq})}),E),V=B.disabled?{onMouseDown:P.onMouseDown}:P;return Ot({id:i.getItemId(R),role:"option","aria-selected":i.getState().highlightedIndex===R},V,B)},i.clearItems=function(){i.items=[]},i.reset=function(w,E){w===void 0&&(w={}),w=gc(w),i.internalSetState(function(S){var _=S.selectedItem;return Ot({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,inputValue:i.props.itemToString(_)},w)},E)},i.toggleMenu=function(w,E){w===void 0&&(w={}),w=gc(w),i.internalSetState(function(S){var _=S.isOpen;return Ot({isOpen:!_},_&&{highlightedIndex:i.props.defaultHighlightedIndex},w)},function(){var S=i.getState(),_=S.isOpen,O=S.highlightedIndex;_&&i.getItemCount()>0&&typeof O=="number"&&i.setHighlightedIndex(O,w),qO(E)()})},i.openMenu=function(w){i.internalSetState({isOpen:!0},w)},i.closeMenu=function(w){i.internalSetState({isOpen:!1},w)},i.updateStatus=t_(function(){var w;if((w=i.props)!=null&&(w=w.environment)!=null&&w.document){var E=i.getState(),S=i.items[E.highlightedIndex],_=i.getItemCount(),O=i.props.getA11yStatusMessage(Ot({itemToString:i.props.itemToString,previousResultCount:i.previousResultCount,resultCount:_,highlightedItem:S},E));i.previousResultCount=_,rq(O,i.props.environment.document)}},200);var a=i.props,s=a.defaultHighlightedIndex,c=a.initialHighlightedIndex,u=c===void 0?s:c,d=a.defaultIsOpen,p=a.initialIsOpen,h=p===void 0?d:p,v=a.initialInputValue,y=v===void 0?"":v,g=a.initialSelectedItem,b=g===void 0?null:g,x=i.getState({highlightedIndex:u,isOpen:h,inputValue:y,selectedItem:b});return x.selectedItem!=null&&i.props.initialInputValue===void 0&&(x.inputValue=i.props.itemToString(x.selectedItem)),i.state=x,i}M8(r,t);var n=r.prototype;return n.internalClearTimeouts=function(){this.timeoutIds.forEach(function(o){clearTimeout(o)}),this.timeoutIds=[]},n.getState=function(o){return o===void 0&&(o=this.state),Q8(o,this.props)},n.getItemCount=function(){var o=this.items.length;return this.itemCount!=null?o=this.itemCount:this.props.itemCount!==void 0&&(o=this.props.itemCount),o},n.getItemNodeFromIndex=function(o){return this.props.environment?this.props.environment.document.getElementById(this.getItemId(o)):null},n.scrollHighlightedItemIntoView=function(){{var o=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(o,this._menuNode)}},n.moveHighlightedIndex=function(o,i){var a=this.getItemCount(),s=this.getState(),c=s.highlightedIndex;if(a>0){var u=Np(c,o,{length:a},this.isItemDisabled,!0);this.setHighlightedIndex(u,i)}},n.getStateAndHelpers=function(){var o=this.getState(),i=o.highlightedIndex,a=o.inputValue,s=o.selectedItem,c=o.isOpen,u=this.props.itemToString,d=this.id,p=this.getRootProps,h=this.getToggleButtonProps,v=this.getLabelProps,y=this.getMenuProps,g=this.getInputProps,b=this.getItemProps,x=this.openMenu,w=this.closeMenu,E=this.toggleMenu,S=this.selectItem,_=this.selectItemAtIndex,O=this.selectHighlightedItem,N=this.setHighlightedIndex,R=this.clearSelection,A=this.clearItems,D=this.reset,B=this.setItemCount,j=this.unsetItemCount,M=this.internalSetState;return{getRootProps:p,getToggleButtonProps:h,getLabelProps:v,getMenuProps:y,getInputProps:g,getItemProps:b,reset:D,openMenu:x,closeMenu:w,toggleMenu:E,selectItem:S,selectItemAtIndex:_,selectHighlightedItem:O,setHighlightedIndex:N,clearSelection:R,clearItems:A,setItemCount:B,unsetItemCount:j,setState:M,itemToString:u,id:d,highlightedIndex:i,inputValue:a,isOpen:c,selectedItem:s}},n.componentDidMount=function(){var o=this;if(process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&HO(this._menuNode,this.getMenuProps),!this.props.environment)this.cleanup=function(){o.internalClearTimeouts()};else{var i=function(){o.isMouseDown=!0},a=function(p){o.isMouseDown=!1;var h=$O(p.target,[o._rootNode,o._menuNode],o.props.environment);!h&&o.getState().isOpen&&o.reset({type:oq},function(){return o.props.onOuterClick(o.getStateAndHelpers())})},s=function(){o.isTouchMove=!1},c=function(){o.isTouchMove=!0},u=function(p){var h=$O(p.target,[o._rootNode,o._menuNode],o.props.environment,!1);!o.isTouchMove&&!h&&o.getState().isOpen&&o.reset({type:gq},function(){return o.props.onOuterClick(o.getStateAndHelpers())})},d=this.props.environment;d.addEventListener("mousedown",i),d.addEventListener("mouseup",a),d.addEventListener("touchstart",s),d.addEventListener("touchmove",c),d.addEventListener("touchend",u),this.cleanup=function(){o.internalClearTimeouts(),o.updateStatus.cancel(),d.removeEventListener("mousedown",i),d.removeEventListener("mouseup",a),d.removeEventListener("touchstart",s),d.removeEventListener("touchmove",c),d.removeEventListener("touchend",u)}}},n.shouldScroll=function(o,i){var a=this.props.highlightedIndex===void 0?this.getState():this.props,s=a.highlightedIndex,c=i.highlightedIndex===void 0?o:i,u=c.highlightedIndex,d=s&&this.getState().isOpen&&!o.isOpen,p=s!==u;return d||p},n.componentDidUpdate=function(o,i){process.env.NODE_ENV!=="production"&&(r_(this.state,o,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&HO(this._menuNode,this.getMenuProps)),dx(this.props,"selectedItem")&&this.props.selectedItemChanged(o.selectedItem,this.props.selectedItem)&&this.internalSetState({type:vq,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(i,o)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},n.componentWillUnmount=function(){this.cleanup()},n.render=function(){var o=BO(this.props.children,Bn);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var i=BO(o(this.getStateAndHelpers()));if(!i)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&cG(i,this.getRootProps),i;if(Q2(i))return T.cloneElement(i,this.getRootProps(eq(i)));if(process.env.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")},r})(T.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:X8,itemToString:function(t){return t==null?"":(process.env.NODE_ENV!=="production"&&eG(t)&&!t.hasOwnProperty("toString")&&console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.","The object that was passed:",t),String(t))},onStateChange:Bn,onInputValueChange:Bn,onUserAction:Bn,onChange:Bn,onSelect:Bn,onOuterClick:Bn,selectedItemChanged:function(t,r){return t!==r},environment:typeof window>"u"?void 0:window,stateReducer:function(t,r){return r},suppressRefError:!1,scrollIntoView:J2},e.stateChangeTypes=rG,e})();process.env.NODE_ENV!=="production"&&(lG.propTypes={children:ye.func,defaultHighlightedIndex:ye.number,defaultIsOpen:ye.bool,initialHighlightedIndex:ye.number,initialSelectedItem:ye.any,initialInputValue:ye.string,initialIsOpen:ye.bool,getA11yStatusMessage:ye.func,itemToString:ye.func,onChange:ye.func,onSelect:ye.func,onStateChange:ye.func,onInputValueChange:ye.func,onUserAction:ye.func,onOuterClick:ye.func,selectedItemChanged:ye.func,stateReducer:ye.func,itemCount:ye.number,id:ye.string,environment:ye.shape({addEventListener:ye.func.isRequired,removeEventListener:ye.func.isRequired,document:ye.shape({createElement:ye.func.isRequired,getElementById:ye.func.isRequired,activeElement:ye.any.isRequired,body:ye.any.isRequired}).isRequired,Node:ye.func.isRequired}),suppressRefError:ye.bool,scrollIntoView:ye.func,selectedItem:ye.any,isOpen:ye.bool,inputValue:ye.string,highlightedIndex:ye.number,labelId:ye.string,inputId:ye.string,menuId:ye.string,getItemId:ye.func});function HO(e,t){var r=t.refKey;e||console.error('downshift: The ref prop "'+r+'" from getMenuProps was not applied correctly on your menu element.')}function cG(e,t){var r=t.refKey,n=r!=="ref",o=!Q2(e);o&&!n&&!MO.isForwardRef(e)?console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps"):!o&&n&&console.error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "'+r+'"'),!MO.isForwardRef(e)&&!eq(e)[r]&&console.error('downshift: You must apply the ref prop "'+r+'" from getRootProps onto your root element.')}function uG(e,t){return t.changes}t_(function(e,t){rq(e,t)},200);var vs={itemToString:function(e){return e?String(e):""},itemToKey:function(e){return e},stateReducer:uG,scrollIntoView:J2,environment:typeof window>"u"?void 0:window};process.env.NODE_ENV;process.env.NODE_ENV;function dG(){var e=T.useRef(!0);return T.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}var Gc={environment:ye.shape({addEventListener:ye.func.isRequired,removeEventListener:ye.func.isRequired,document:ye.shape({createElement:ye.func.isRequired,getElementById:ye.func.isRequired,activeElement:ye.any.isRequired,body:ye.any.isRequired}).isRequired,Node:ye.func.isRequired}),itemToString:ye.func,itemToKey:ye.func,stateReducer:ye.func},mq=Ot({},Gc,{getA11yStatusMessage:ye.func,highlightedIndex:ye.number,defaultHighlightedIndex:ye.number,initialHighlightedIndex:ye.number,isOpen:ye.bool,defaultIsOpen:ye.bool,initialIsOpen:ye.bool,selectedItem:ye.any,initialSelectedItem:ye.any,defaultSelectedItem:ye.any,id:ye.string,labelId:ye.string,menuId:ye.string,getItemId:ye.func,toggleButtonId:ye.string,onSelectedItemChange:ye.func,onHighlightedIndexChange:ye.func,onStateChange:ye.func,onIsOpenChange:ye.func,scrollIntoView:ye.func}),fG=Ui(Ui({},mq),{items:ye.array.isRequired,isItemDisabled:ye.func});Ui(Ui({},vs),{isItemDisabled:function(){return!1}});process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;var pG=Ot({},mq,{items:ye.array.isRequired,isItemDisabled:ye.func,inputValue:ye.string,defaultInputValue:ye.string,initialInputValue:ye.string,inputId:ye.string,onInputValueChange:ye.func});process.env.NODE_ENV;Ot({},vs,{isItemDisabled:function(){return!1}});var hG={stateReducer:Gc.stateReducer,itemToKey:Gc.itemToKey,environment:Gc.environment,selectedItems:ye.array,initialSelectedItems:ye.array,defaultSelectedItems:ye.array,getA11yStatusMessage:ye.func,activeIndex:ye.number,initialActiveIndex:ye.number,defaultActiveIndex:ye.number,onActiveIndexChange:ye.func,onSelectedItemsChange:ye.func,keyNavigationNext:ye.string,keyNavigationPrevious:ye.string};vs.itemToKey,vs.stateReducer,vs.environment;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;const vG=T.forwardRef(({className:e,children:t,isFocused:r,isDisabled:n,...o},i)=>{const{size:a,color:s,isDisabled:c,hasMessage:u,downshift:d,isInvalid:p}=Fu(),h=n??c,v=r??d.isOpen;return C.jsx("div",{ref:i,className:qe(P8({size:a,color:s,isDisabled:h,isFocused:!!v,isInvalid:p&&!d.isOpen,hasMessage:u}),e),"aria-disabled":h,"aria-invalid":p,role:"combobox",tabIndex:h?-1:0,...o,children:t})}),gG=T.forwardRef(({isHidden:e,inputClassName:t,...r},n)=>{const{size:o,color:i}=Fu();return e?C.jsx("input",{ref:n,type:"text",style:{position:"absolute",top:0,left:0,opacity:0,width:"100%",height:"100%",pointerEvents:"none"},tabIndex:-1,...r}):C.jsx("input",{ref:n,type:"text",className:qe(T8({size:o,color:i}),t),...r})}),mG=T.forwardRef(({className:e,children:t,placement:r,...n},o)=>{const{size:i,hasMessage:a,color:s}=Fu();return C.jsx("div",{"data-qui":"SelectMenu",ref:o,className:qe(A8({size:i,placement:r,hasMessage:a,color:s}),e),...n,children:t})}),bG=T.forwardRef(({className:e,children:t,maxHeight:r=300,...n},o)=>{const{size:i}=Fu();return C.jsx(Yx,{scrollableNodeProps:{ref:o},className:qe(k8({size:i}),e),style:{maxHeight:r},...n,children:t})});vG.displayName="Select.Control";gG.displayName="Select.Input";mG.displayName="Select.Menu";bG.displayName="Select.MenuList";T.createContext(void 0);const yG=({active:e,disabled:t,error:r,isOpen:n,className:o})=>qe("flex w-full items-center justify-between text-left leading-5 transition-colors duration-200",{"cursor-pointer":!t,"text-inactive-text":t,"bg-primary hover:bg-primary-hover text-tab-active-fg":e&&!t,"text-negative":r&&!e&&!t,"bg-primary":n&&!e&&!t,"text-tab-inactive-fg":!e&&!t&&!r,"hover:bg-primary-hover hover:text-tab-active-fg":!t&&!e},o),wG=T.forwardRef(({active:e,disabled:t,error:r,isOpen:n,className:o,children:i,as:a="div",...s},c)=>{const u=yG({active:e,disabled:t,error:r,isOpen:n,className:o});return C.jsx(a,{"data-qui":"ListItem",ref:c,className:u,"aria-disabled":t,"aria-selected":e,"aria-invalid":r,"aria-expanded":n,role:s.onClick?"button":"listitem",...s,children:i})});wG.displayName="ListItem";function xG({qodly:e,activeTab:t,forceLogin:r,onTabChange:n,restrictedByDefault:o,onRestrictedByDefaultChange:i,onForceLoginChange:a}){return C.jsx(C.Fragment,{children:C.jsx(mo,{depth:1,className:"relative mb-0 flex h-auto flex-wrap items-center justify-between border-b px-4 py-3",children:C.jsx("div",{className:"flex w-full flex-wrap items-center justify-between",children:C.jsxs("div",{className:"relative flex w-full justify-between",children:[C.jsx("span",{className:"inline-block whitespace-nowrap text-sm leading-relaxed text-white",children:C.jsxs("div",{className:"flex items-center justify-center",children:[C.jsx("button",{"data-cy":"roles_btn_navbar",className:ht(" min-w-[110px] rounded-l px-4 py-2 text-xs text-white outline-none transition-all duration-150 ease-linear focus:bg-primary-dark focus:text-white focus:outline-none",t==="roles"?"bg-primary-dark font-bold":"bg-grey-300 hover:bg-primary-hover hover:text-white"),type:"button",onClick:()=>n("roles"),children:"Roles"}),C.jsx("button",{"data-cy":"privileges_btn_navbar",className:ht(" min-w-[110px] rounded-r px-4 py-2 text-xs text-white outline-none transition-all duration-150 ease-linear focus:bg-primary-dark focus:text-white focus:outline-none",t==="privileges"?"bg-primary-dark font-bold":"bg-grey-300 hover:bg-primary-hover hover:text-white"),type:"button",onClick:()=>n("privileges"),children:"Privileges"})]})}),C.jsxs("div",{className:"flex gap-2 justify-between",children:[C.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[C.jsx(de.ControlledSwitch,{size:"sm",value:o||!1,onChange:s=>{i(s)}}),C.jsx("span",{className:"px-1 text-xs text-white",children:"Restrict Access By Default"}),C.jsx(de.Tip,{tipKey:"editors:roles:toolbar:restrictedByDefault",alwaysOn:!0,side:"left"})]}),e===!1&&C.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[C.jsx(de.ControlledSwitch,{size:"sm",value:r||!1,onChange:s=>{a(s)}}),C.jsx("span",{className:"px-1 text-xs text-white",children:"Force login"}),C.jsx(de.Tip,{tipKey:"editors:roles:toolbar:forceLogin",alwaysOn:!0,side:"left"})]})]})]})})})})}const bq=T.createContext(void 0),_G=({children:e})=>{const[t,r]=T.useState(null);function n(i){r(i)}const o={selectedRole:t,selectRole:n};return C.jsx(bq.Provider,{value:o,children:e})};function n_(){const e=T.useContext(bq);if(e===void 0)throw new Error("useSelectedRole must be used within a SelectedRoleProvider");return e}var VO=function(t){return t.reduce(function(r,n){var o=n[0],i=n[1];return r[o]=i,r},{})},WO=typeof window<"u"&&window.document&&window.document.createElement?ue.useLayoutEffect:ue.useEffect,lr="top",Fr="bottom",$r="right",cr="left",o_="auto",Ds=[lr,Fr,$r,cr],Gi="start",Es="end",EG="clippingParents",yq="viewport",Ba="popper",SG="reference",UO=Ds.reduce(function(e,t){return e.concat([t+"-"+Gi,t+"-"+Es])},[]),wq=[].concat(Ds,[o_]).reduce(function(e,t){return e.concat([t,t+"-"+Gi,t+"-"+Es])},[]),OG="beforeRead",CG="read",IG="afterRead",RG="beforeMain",NG="main",PG="afterMain",TG="beforeWrite",AG="write",kG="afterWrite",MG=[OG,CG,IG,RG,NG,PG,TG,AG,kG];function Sn(e){return e?(e.nodeName||"").toLowerCase():null}function Er(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Uo(e){var t=Er(e).Element;return e instanceof t||e instanceof Element}function Br(e){var t=Er(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function i_(e){if(typeof ShadowRoot>"u")return!1;var t=Er(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function DG(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},o=t.attributes[r]||{},i=t.elements[r];!Br(i)||!Sn(i)||(Object.assign(i.style,n),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function jG(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var o=t.elements[n],i=t.attributes[n]||{},a=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),s=a.reduce(function(c,u){return c[u]="",c},{});!Br(o)||!Sn(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(c){o.removeAttribute(c)}))})}}const qG={name:"applyStyles",enabled:!0,phase:"write",fn:DG,effect:jG,requires:["computeStyles"]};function wn(e){return e.split("-")[0]}var Bo=Math.max,cu=Math.min,Ki=Math.round;function px(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function xq(){return!/^((?!chrome|android).)*safari/i.test(px())}function Yi(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),o=1,i=1;t&&Br(e)&&(o=e.offsetWidth>0&&Ki(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Ki(n.height)/e.offsetHeight||1);var a=Uo(e)?Er(e):window,s=a.visualViewport,c=!xq()&&r,u=(n.left+(c&&s?s.offsetLeft:0))/o,d=(n.top+(c&&s?s.offsetTop:0))/i,p=n.width/o,h=n.height/i;return{width:p,height:h,top:d,right:u+p,bottom:d+h,left:u,x:u,y:d}}function a_(e){var t=Yi(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function _q(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&i_(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Hn(e){return Er(e).getComputedStyle(e)}function LG(e){return["table","td","th"].indexOf(Sn(e))>=0}function xo(e){return((Uo(e)?e.ownerDocument:e.document)||window.document).documentElement}function Hu(e){return Sn(e)==="html"?e:e.assignedSlot||e.parentNode||(i_(e)?e.host:null)||xo(e)}function GO(e){return!Br(e)||Hn(e).position==="fixed"?null:e.offsetParent}function zG(e){var t=/firefox/i.test(px()),r=/Trident/i.test(px());if(r&&Br(e)){var n=Hn(e);if(n.position==="fixed")return null}var o=Hu(e);for(i_(o)&&(o=o.host);Br(o)&&["html","body"].indexOf(Sn(o))<0;){var i=Hn(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function js(e){for(var t=Er(e),r=GO(e);r&&LG(r)&&Hn(r).position==="static";)r=GO(r);return r&&(Sn(r)==="html"||Sn(r)==="body"&&Hn(r).position==="static")?t:r||zG(e)||t}function s_(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function gs(e,t,r){return Bo(e,cu(t,r))}function BG(e,t,r){var n=gs(e,t,r);return n>r?r:n}function Eq(){return{top:0,right:0,bottom:0,left:0}}function Sq(e){return Object.assign({},Eq(),e)}function Oq(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var FG=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Sq(typeof t!="number"?t:Oq(t,Ds))};function $G(e){var t,r=e.state,n=e.name,o=e.options,i=r.elements.arrow,a=r.modifiersData.popperOffsets,s=wn(r.placement),c=s_(s),u=[cr,$r].indexOf(s)>=0,d=u?"height":"width";if(!(!i||!a)){var p=FG(o.padding,r),h=a_(i),v=c==="y"?lr:cr,y=c==="y"?Fr:$r,g=r.rects.reference[d]+r.rects.reference[c]-a[c]-r.rects.popper[d],b=a[c]-r.rects.reference[c],x=js(i),w=x?c==="y"?x.clientHeight||0:x.clientWidth||0:0,E=g/2-b/2,S=p[v],_=w-h[d]-p[y],O=w/2-h[d]/2+E,N=gs(S,O,_),R=c;r.modifiersData[n]=(t={},t[R]=N,t.centerOffset=N-O,t)}}function HG(e){var t=e.state,r=e.options,n=r.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||_q(t.elements.popper,o)&&(t.elements.arrow=o))}const VG={name:"arrow",enabled:!0,phase:"main",fn:$G,effect:HG,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Xi(e){return e.split("-")[1]}var WG={top:"auto",right:"auto",bottom:"auto",left:"auto"};function UG(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:Ki(r*o)/o||0,y:Ki(n*o)/o||0}}function KO(e){var t,r=e.popper,n=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,c=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,p=e.isFixed,h=a.x,v=h===void 0?0:h,y=a.y,g=y===void 0?0:y,b=typeof d=="function"?d({x:v,y:g}):{x:v,y:g};v=b.x,g=b.y;var x=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),E=cr,S=lr,_=window;if(u){var O=js(r),N="clientHeight",R="clientWidth";if(O===Er(r)&&(O=xo(r),Hn(O).position!=="static"&&s==="absolute"&&(N="scrollHeight",R="scrollWidth")),O=O,o===lr||(o===cr||o===$r)&&i===Es){S=Fr;var A=p&&O===_&&_.visualViewport?_.visualViewport.height:O[N];g-=A-n.height,g*=c?1:-1}if(o===cr||(o===lr||o===Fr)&&i===Es){E=$r;var D=p&&O===_&&_.visualViewport?_.visualViewport.width:O[R];v-=D-n.width,v*=c?1:-1}}var B=Object.assign({position:s},u&&WG),j=d===!0?UG({x:v,y:g},Er(r)):{x:v,y:g};if(v=j.x,g=j.y,c){var M;return Object.assign({},B,(M={},M[S]=w?"0":"",M[E]=x?"0":"",M.transform=(_.devicePixelRatio||1)<=1?"translate("+v+"px, "+g+"px)":"translate3d("+v+"px, "+g+"px, 0)",M))}return Object.assign({},B,(t={},t[S]=w?g+"px":"",t[E]=x?v+"px":"",t.transform="",t))}function GG(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=n===void 0?!0:n,i=r.adaptive,a=i===void 0?!0:i,s=r.roundOffsets,c=s===void 0?!0:s,u={placement:wn(t.placement),variation:Xi(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,KO(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,KO(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const KG={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:GG,data:{}};var mc={passive:!0};function YG(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,i=o===void 0?!0:o,a=n.resize,s=a===void 0?!0:a,c=Er(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(d){d.addEventListener("scroll",r.update,mc)}),s&&c.addEventListener("resize",r.update,mc),function(){i&&u.forEach(function(d){d.removeEventListener("scroll",r.update,mc)}),s&&c.removeEventListener("resize",r.update,mc)}}const XG={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:YG,data:{}};var ZG={left:"right",right:"left",bottom:"top",top:"bottom"};function Kc(e){return e.replace(/left|right|bottom|top/g,function(t){return ZG[t]})}var JG={start:"end",end:"start"};function YO(e){return e.replace(/start|end/g,function(t){return JG[t]})}function l_(e){var t=Er(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function c_(e){return Yi(xo(e)).left+l_(e).scrollLeft}function QG(e,t){var r=Er(e),n=xo(e),o=r.visualViewport,i=n.clientWidth,a=n.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;var u=xq();(u||!u&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s+c_(e),y:c}}function e7(e){var t,r=xo(e),n=l_(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=Bo(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Bo(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-n.scrollLeft+c_(e),c=-n.scrollTop;return Hn(o||r).direction==="rtl"&&(s+=Bo(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:c}}function u_(e){var t=Hn(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function Cq(e){return["html","body","#document"].indexOf(Sn(e))>=0?e.ownerDocument.body:Br(e)&&u_(e)?e:Cq(Hu(e))}function ms(e,t){var r;t===void 0&&(t=[]);var n=Cq(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),i=Er(n),a=o?[i].concat(i.visualViewport||[],u_(n)?n:[]):n,s=t.concat(a);return o?s:s.concat(ms(Hu(a)))}function hx(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function t7(e,t){var r=Yi(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function XO(e,t,r){return t===yq?hx(QG(e,r)):Uo(t)?t7(t,r):hx(e7(xo(e)))}function r7(e){var t=ms(Hu(e)),r=["absolute","fixed"].indexOf(Hn(e).position)>=0,n=r&&Br(e)?js(e):e;return Uo(n)?t.filter(function(o){return Uo(o)&&_q(o,n)&&Sn(o)!=="body"}):[]}function n7(e,t,r,n){var o=t==="clippingParents"?r7(e):[].concat(t),i=[].concat(o,[r]),a=i[0],s=i.reduce(function(c,u){var d=XO(e,u,n);return c.top=Bo(d.top,c.top),c.right=cu(d.right,c.right),c.bottom=cu(d.bottom,c.bottom),c.left=Bo(d.left,c.left),c},XO(e,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Iq(e){var t=e.reference,r=e.element,n=e.placement,o=n?wn(n):null,i=n?Xi(n):null,a=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,c;switch(o){case lr:c={x:a,y:t.y-r.height};break;case Fr:c={x:a,y:t.y+t.height};break;case $r:c={x:t.x+t.width,y:s};break;case cr:c={x:t.x-r.width,y:s};break;default:c={x:t.x,y:t.y}}var u=o?s_(o):null;if(u!=null){var d=u==="y"?"height":"width";switch(i){case Gi:c[u]=c[u]-(t[d]/2-r[d]/2);break;case Es:c[u]=c[u]+(t[d]/2-r[d]/2);break}}return c}function Ss(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=n===void 0?e.placement:n,i=r.strategy,a=i===void 0?e.strategy:i,s=r.boundary,c=s===void 0?EG:s,u=r.rootBoundary,d=u===void 0?yq:u,p=r.elementContext,h=p===void 0?Ba:p,v=r.altBoundary,y=v===void 0?!1:v,g=r.padding,b=g===void 0?0:g,x=Sq(typeof b!="number"?b:Oq(b,Ds)),w=h===Ba?SG:Ba,E=e.rects.popper,S=e.elements[y?w:h],_=n7(Uo(S)?S:S.contextElement||xo(e.elements.popper),c,d,a),O=Yi(e.elements.reference),N=Iq({reference:O,element:E,placement:o}),R=hx(Object.assign({},E,N)),A=h===Ba?R:O,D={top:_.top-A.top+x.top,bottom:A.bottom-_.bottom+x.bottom,left:_.left-A.left+x.left,right:A.right-_.right+x.right},B=e.modifiersData.offset;if(h===Ba&&B){var j=B[o];Object.keys(D).forEach(function(M){var P=[$r,Fr].indexOf(M)>=0?1:-1,V=[lr,Fr].indexOf(M)>=0?"y":"x";D[M]+=j[V]*P})}return D}function o7(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=r.boundary,i=r.rootBoundary,a=r.padding,s=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?wq:c,d=Xi(n),p=d?s?UO:UO.filter(function(y){return Xi(y)===d}):Ds,h=p.filter(function(y){return u.indexOf(y)>=0});h.length===0&&(h=p);var v=h.reduce(function(y,g){return y[g]=Ss(e,{placement:g,boundary:o,rootBoundary:i,padding:a})[wn(g)],y},{});return Object.keys(v).sort(function(y,g){return v[y]-v[g]})}function i7(e){if(wn(e)===o_)return[];var t=Kc(e);return[YO(e),t,YO(t)]}function a7(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,i=o===void 0?!0:o,a=r.altAxis,s=a===void 0?!0:a,c=r.fallbackPlacements,u=r.padding,d=r.boundary,p=r.rootBoundary,h=r.altBoundary,v=r.flipVariations,y=v===void 0?!0:v,g=r.allowedAutoPlacements,b=t.options.placement,x=wn(b),w=x===b,E=c||(w||!y?[Kc(b)]:i7(b)),S=[b].concat(E).reduce(function($,K){return $.concat(wn(K)===o_?o7(t,{placement:K,boundary:d,rootBoundary:p,padding:u,flipVariations:y,allowedAutoPlacements:g}):K)},[]),_=t.rects.reference,O=t.rects.popper,N=new Map,R=!0,A=S[0],D=0;D<S.length;D++){var B=S[D],j=wn(B),M=Xi(B)===Gi,P=[lr,Fr].indexOf(j)>=0,V=P?"width":"height",q=Ss(t,{placement:B,boundary:d,rootBoundary:p,altBoundary:h,padding:u}),G=P?M?$r:cr:M?Fr:lr;_[V]>O[V]&&(G=Kc(G));var W=Kc(G),Q=[];if(i&&Q.push(q[j]<=0),s&&Q.push(q[G]<=0,q[W]<=0),Q.every(function($){return $})){A=B,R=!1;break}N.set(B,Q)}if(R)for(var z=y?3:1,U=function(K){var Z=S.find(function(H){var Y=N.get(H);if(Y)return Y.slice(0,K).every(function(oe){return oe})});if(Z)return A=Z,"break"},ie=z;ie>0;ie--){var te=U(ie);if(te==="break")break}t.placement!==A&&(t.modifiersData[n]._skip=!0,t.placement=A,t.reset=!0)}}const s7={name:"flip",enabled:!0,phase:"main",fn:a7,requiresIfExists:["offset"],data:{_skip:!1}};function ZO(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function JO(e){return[lr,$r,Fr,cr].some(function(t){return e[t]>=0})}function l7(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Ss(t,{elementContext:"reference"}),s=Ss(t,{altBoundary:!0}),c=ZO(a,n),u=ZO(s,o,i),d=JO(c),p=JO(u);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}const c7={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:l7};function u7(e,t,r){var n=wn(e),o=[cr,lr].indexOf(n)>=0?-1:1,i=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[cr,$r].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}function d7(e){var t=e.state,r=e.options,n=e.name,o=r.offset,i=o===void 0?[0,0]:o,a=wq.reduce(function(d,p){return d[p]=u7(p,t.rects,i),d},{}),s=a[t.placement],c=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=a}const f7={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:d7};function p7(e){var t=e.state,r=e.name;t.modifiersData[r]=Iq({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const h7={name:"popperOffsets",enabled:!0,phase:"read",fn:p7,data:{}};function v7(e){return e==="x"?"y":"x"}function g7(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,i=o===void 0?!0:o,a=r.altAxis,s=a===void 0?!1:a,c=r.boundary,u=r.rootBoundary,d=r.altBoundary,p=r.padding,h=r.tether,v=h===void 0?!0:h,y=r.tetherOffset,g=y===void 0?0:y,b=Ss(t,{boundary:c,rootBoundary:u,padding:p,altBoundary:d}),x=wn(t.placement),w=Xi(t.placement),E=!w,S=s_(x),_=v7(S),O=t.modifiersData.popperOffsets,N=t.rects.reference,R=t.rects.popper,A=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,D=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(O){if(i){var M,P=S==="y"?lr:cr,V=S==="y"?Fr:$r,q=S==="y"?"height":"width",G=O[S],W=G+b[P],Q=G-b[V],z=v?-R[q]/2:0,U=w===Gi?N[q]:R[q],ie=w===Gi?-R[q]:-N[q],te=t.elements.arrow,$=v&&te?a_(te):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Eq(),Z=K[P],H=K[V],Y=gs(0,N[q],$[q]),oe=E?N[q]/2-z-Y-Z-D.mainAxis:U-Y-Z-D.mainAxis,re=E?-N[q]/2+z+Y+H+D.mainAxis:ie+Y+H+D.mainAxis,se=t.elements.arrow&&js(t.elements.arrow),ee=se?S==="y"?se.clientTop||0:se.clientLeft||0:0,we=(M=B==null?void 0:B[S])!=null?M:0,ve=G+oe-we-ee,Ee=G+re-we,pe=gs(v?cu(W,ve):W,G,v?Bo(Q,Ee):Q);O[S]=pe,j[S]=pe-G}if(s){var ce,Ce=S==="x"?lr:cr,ke=S==="x"?Fr:$r,Ke=O[_],ze=_==="y"?"height":"width",rt=Ke+b[Ce],Xe=Ke-b[ke],It=[lr,cr].indexOf(x)!==-1,lt=(ce=B==null?void 0:B[_])!=null?ce:0,Wt=It?rt:Ke-N[ze]-R[ze]-lt+D.altAxis,mt=It?Ke+N[ze]+R[ze]-lt-D.altAxis:Xe,ct=v&&It?BG(Wt,Ke,mt):gs(v?Wt:rt,Ke,v?mt:Xe);O[_]=ct,j[_]=ct-Ke}t.modifiersData[n]=j}}const m7={name:"preventOverflow",enabled:!0,phase:"main",fn:g7,requiresIfExists:["offset"]};function b7(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function y7(e){return e===Er(e)||!Br(e)?l_(e):b7(e)}function w7(e){var t=e.getBoundingClientRect(),r=Ki(t.width)/e.offsetWidth||1,n=Ki(t.height)/e.offsetHeight||1;return r!==1||n!==1}function x7(e,t,r){r===void 0&&(r=!1);var n=Br(t),o=Br(t)&&w7(t),i=xo(t),a=Yi(e,o,r),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((Sn(t)!=="body"||u_(i))&&(s=y7(t)),Br(t)?(c=Yi(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):i&&(c.x=c_(i))),{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function _7(e){var t=new Map,r=new Set,n=[];e.forEach(function(i){t.set(i.name,i)});function o(i){r.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!r.has(s)){var c=t.get(s);c&&o(c)}}),n.push(i)}return e.forEach(function(i){r.has(i.name)||o(i)}),n}function E7(e){var t=_7(e);return MG.reduce(function(r,n){return r.concat(t.filter(function(o){return o.phase===n}))},[])}function S7(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function O7(e){var t=e.reduce(function(r,n){var o=r[n.name];return r[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var QO={placement:"bottom",modifiers:[],strategy:"absolute"};function eC(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function C7(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,o=t.defaultOptions,i=o===void 0?QO:o;return function(s,c,u){u===void 0&&(u=i);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},QO,i),modifiersData:{},elements:{reference:s,popper:c},attributes:{},styles:{}},p=[],h=!1,v={state:d,setOptions:function(x){var w=typeof x=="function"?x(d.options):x;g(),d.options=Object.assign({},i,d.options,w),d.scrollParents={reference:Uo(s)?ms(s):s.contextElement?ms(s.contextElement):[],popper:ms(c)};var E=E7(O7([].concat(n,d.options.modifiers)));return d.orderedModifiers=E.filter(function(S){return S.enabled}),y(),v.update()},forceUpdate:function(){if(!h){var x=d.elements,w=x.reference,E=x.popper;if(eC(w,E)){d.rects={reference:x7(w,js(E),d.options.strategy==="fixed"),popper:a_(E)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(D){return d.modifiersData[D.name]=Object.assign({},D.data)});for(var S=0;S<d.orderedModifiers.length;S++){if(d.reset===!0){d.reset=!1,S=-1;continue}var _=d.orderedModifiers[S],O=_.fn,N=_.options,R=N===void 0?{}:N,A=_.name;typeof O=="function"&&(d=O({state:d,options:R,name:A,instance:v})||d)}}}},update:S7(function(){return new Promise(function(b){v.forceUpdate(),b(d)})}),destroy:function(){g(),h=!0}};if(!eC(s,c))return v;v.setOptions(u).then(function(b){!h&&u.onFirstUpdate&&u.onFirstUpdate(b)});function y(){d.orderedModifiers.forEach(function(b){var x=b.name,w=b.options,E=w===void 0?{}:w,S=b.effect;if(typeof S=="function"){var _=S({state:d,name:x,instance:v,options:E}),O=function(){};p.push(_||O)}})}function g(){p.forEach(function(b){return b()}),p=[]}return v}}var I7=[XG,h7,KG,qG,f7,s7,m7,VG,c7],R7=C7({defaultModifiers:I7}),Pp,tC;function N7(){if(tC)return Pp;tC=1;var e=typeof Element<"u",t=typeof Map=="function",r=typeof Set=="function",n=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function o(i,a){if(i===a)return!0;if(i&&a&&typeof i=="object"&&typeof a=="object"){if(i.constructor!==a.constructor)return!1;var s,c,u;if(Array.isArray(i)){if(s=i.length,s!=a.length)return!1;for(c=s;c--!==0;)if(!o(i[c],a[c]))return!1;return!0}var d;if(t&&i instanceof Map&&a instanceof Map){if(i.size!==a.size)return!1;for(d=i.entries();!(c=d.next()).done;)if(!a.has(c.value[0]))return!1;for(d=i.entries();!(c=d.next()).done;)if(!o(c.value[1],a.get(c.value[0])))return!1;return!0}if(r&&i instanceof Set&&a instanceof Set){if(i.size!==a.size)return!1;for(d=i.entries();!(c=d.next()).done;)if(!a.has(c.value[0]))return!1;return!0}if(n&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(a)){if(s=i.length,s!=a.length)return!1;for(c=s;c--!==0;)if(i[c]!==a[c])return!1;return!0}if(i.constructor===RegExp)return i.source===a.source&&i.flags===a.flags;if(i.valueOf!==Object.prototype.valueOf&&typeof i.valueOf=="function"&&typeof a.valueOf=="function")return i.valueOf()===a.valueOf();if(i.toString!==Object.prototype.toString&&typeof i.toString=="function"&&typeof a.toString=="function")return i.toString()===a.toString();if(u=Object.keys(i),s=u.length,s!==Object.keys(a).length)return!1;for(c=s;c--!==0;)if(!Object.prototype.hasOwnProperty.call(a,u[c]))return!1;if(e&&i instanceof Element)return!1;for(c=s;c--!==0;)if(!((u[c]==="_owner"||u[c]==="__v"||u[c]==="__o")&&i.$$typeof)&&!o(i[u[c]],a[u[c]]))return!1;return!0}return i!==i&&a!==a}return Pp=function(a,s){try{return o(a,s)}catch(c){if((c.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw c}},Pp}var P7=N7();const T7=wo(P7);var A7=[],Vu=function(t,r,n){n===void 0&&(n={});var o=ue.useRef(null),i={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||A7},a=ue.useState({styles:{popper:{position:i.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=a[0],c=a[1],u=ue.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(v){var y=v.state,g=Object.keys(y.elements);Ux.flushSync(function(){c({styles:VO(g.map(function(b){return[b,y.styles[b]||{}]})),attributes:VO(g.map(function(b){return[b,y.attributes[b]]}))})})},requires:["computeStyles"]}},[]),d=ue.useMemo(function(){var h={onFirstUpdate:i.onFirstUpdate,placement:i.placement,strategy:i.strategy,modifiers:[].concat(i.modifiers,[u,{name:"applyStyles",enabled:!1}])};return T7(o.current,h)?o.current||h:(o.current=h,h)},[i.onFirstUpdate,i.placement,i.strategy,i.modifiers,u]),p=ue.useRef();return WO(function(){p.current&&p.current.setOptions(d)},[d]),WO(function(){if(!(t==null||r==null)){var h=n.createPopper||R7,v=h(t,r,d);return p.current=v,function(){v.destroy(),p.current=null}}},[t,r,n.createPopper]),{state:p.current?p.current.state:null,styles:s.styles,attributes:s.attributes,update:p.current?p.current.update:null,forceUpdate:p.current?p.current.forceUpdate:null}};const Rq=({tab:e})=>C.jsx(mo,{depth:1,className:"flex flex-1 items-center justify-center border-l-[0.5px]",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-grey-200",children:[C.jsx(xe.FdInfoBold,{className:"h-10 w-10"}),C.jsxs("div",{className:"font-semibold",children:["No ",e," Selected"]}),C.jsxs("div",{className:"text-sm",children:["Click on a ",e," in the Sidebar to select it."]})]})});function d_(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Tp,rC;function k7(){if(rC)return Tp;rC=1;function e(){this.__data__=[],this.size=0}return Tp=e,Tp}var Ap,nC;function oa(){if(nC)return Ap;nC=1;function e(t,r){return t===r||t!==t&&r!==r}return Ap=e,Ap}var kp,oC;function Wu(){if(oC)return kp;oC=1;var e=oa();function t(r,n){for(var o=r.length;o--;)if(e(r[o][0],n))return o;return-1}return kp=t,kp}var Mp,iC;function M7(){if(iC)return Mp;iC=1;var e=Wu(),t=Array.prototype,r=t.splice;function n(o){var i=this.__data__,a=e(i,o);if(a<0)return!1;var s=i.length-1;return a==s?i.pop():r.call(i,a,1),--this.size,!0}return Mp=n,Mp}var Dp,aC;function D7(){if(aC)return Dp;aC=1;var e=Wu();function t(r){var n=this.__data__,o=e(n,r);return o<0?void 0:n[o][1]}return Dp=t,Dp}var jp,sC;function j7(){if(sC)return jp;sC=1;var e=Wu();function t(r){return e(this.__data__,r)>-1}return jp=t,jp}var qp,lC;function q7(){if(lC)return qp;lC=1;var e=Wu();function t(r,n){var o=this.__data__,i=e(o,r);return i<0?(++this.size,o.push([r,n])):o[i][1]=n,this}return qp=t,qp}var Lp,cC;function Uu(){if(cC)return Lp;cC=1;var e=k7(),t=M7(),r=D7(),n=j7(),o=q7();function i(a){var s=-1,c=a==null?0:a.length;for(this.clear();++s<c;){var u=a[s];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,Lp=i,Lp}var zp,uC;function L7(){if(uC)return zp;uC=1;var e=Uu();function t(){this.__data__=new e,this.size=0}return zp=t,zp}var Bp,dC;function z7(){if(dC)return Bp;dC=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return Bp=e,Bp}var Fp,fC;function B7(){if(fC)return Fp;fC=1;function e(t){return this.__data__.get(t)}return Fp=e,Fp}var $p,pC;function F7(){if(pC)return $p;pC=1;function e(t){return this.__data__.has(t)}return $p=e,$p}var Hp,hC;function Nq(){if(hC)return Hp;hC=1;var e=typeof _t=="object"&&_t&&_t.Object===Object&&_t;return Hp=e,Hp}var Vp,vC;function on(){if(vC)return Vp;vC=1;var e=Nq(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Vp=r,Vp}var Wp,gC;function ia(){if(gC)return Wp;gC=1;var e=on(),t=e.Symbol;return Wp=t,Wp}var Up,mC;function $7(){if(mC)return Up;mC=1;var e=ia(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,o=e?e.toStringTag:void 0;function i(a){var s=r.call(a,o),c=a[o];try{a[o]=void 0;var u=!0}catch{}var d=n.call(a);return u&&(s?a[o]=c:delete a[o]),d}return Up=i,Up}var Gp,bC;function H7(){if(bC)return Gp;bC=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return Gp=r,Gp}var Kp,yC;function Jo(){if(yC)return Kp;yC=1;var e=ia(),t=$7(),r=H7(),n="[object Null]",o="[object Undefined]",i=e?e.toStringTag:void 0;function a(s){return s==null?s===void 0?o:n:i&&i in Object(s)?t(s):r(s)}return Kp=a,Kp}var Yp,wC;function Hr(){if(wC)return Yp;wC=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Yp=e,Yp}var Xp,xC;function qs(){if(xC)return Xp;xC=1;var e=Jo(),t=Hr(),r="[object AsyncFunction]",n="[object Function]",o="[object GeneratorFunction]",i="[object Proxy]";function a(s){if(!t(s))return!1;var c=e(s);return c==n||c==o||c==r||c==i}return Xp=a,Xp}var Zp,_C;function V7(){if(_C)return Zp;_C=1;var e=on(),t=e["__core-js_shared__"];return Zp=t,Zp}var Jp,EC;function W7(){if(EC)return Jp;EC=1;var e=V7(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return Jp=r,Jp}var Qp,SC;function Pq(){if(SC)return Qp;SC=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return Qp=r,Qp}var eh,OC;function U7(){if(OC)return eh;OC=1;var e=qs(),t=W7(),r=Hr(),n=Pq(),o=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,c=a.toString,u=s.hasOwnProperty,d=RegExp("^"+c.call(u).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(h){if(!r(h)||t(h))return!1;var v=e(h)?d:i;return v.test(n(h))}return eh=p,eh}var th,CC;function G7(){if(CC)return th;CC=1;function e(t,r){return t==null?void 0:t[r]}return th=e,th}var rh,IC;function Qo(){if(IC)return rh;IC=1;var e=U7(),t=G7();function r(n,o){var i=t(n,o);return e(i)?i:void 0}return rh=r,rh}var nh,RC;function f_(){if(RC)return nh;RC=1;var e=Qo(),t=on(),r=e(t,"Map");return nh=r,nh}var oh,NC;function Gu(){if(NC)return oh;NC=1;var e=Qo(),t=e(Object,"create");return oh=t,oh}var ih,PC;function K7(){if(PC)return ih;PC=1;var e=Gu();function t(){this.__data__=e?e(null):{},this.size=0}return ih=t,ih}var ah,TC;function Y7(){if(TC)return ah;TC=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return ah=e,ah}var sh,AC;function X7(){if(AC)return sh;AC=1;var e=Gu(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function o(i){var a=this.__data__;if(e){var s=a[i];return s===t?void 0:s}return n.call(a,i)?a[i]:void 0}return sh=o,sh}var lh,kC;function Z7(){if(kC)return lh;kC=1;var e=Gu(),t=Object.prototype,r=t.hasOwnProperty;function n(o){var i=this.__data__;return e?i[o]!==void 0:r.call(i,o)}return lh=n,lh}var ch,MC;function J7(){if(MC)return ch;MC=1;var e=Gu(),t="__lodash_hash_undefined__";function r(n,o){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=e&&o===void 0?t:o,this}return ch=r,ch}var uh,DC;function Q7(){if(DC)return uh;DC=1;var e=K7(),t=Y7(),r=X7(),n=Z7(),o=J7();function i(a){var s=-1,c=a==null?0:a.length;for(this.clear();++s<c;){var u=a[s];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,uh=i,uh}var dh,jC;function e9(){if(jC)return dh;jC=1;var e=Q7(),t=Uu(),r=f_();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return dh=n,dh}var fh,qC;function t9(){if(qC)return fh;qC=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return fh=e,fh}var ph,LC;function Ku(){if(LC)return ph;LC=1;var e=t9();function t(r,n){var o=r.__data__;return e(n)?o[typeof n=="string"?"string":"hash"]:o.map}return ph=t,ph}var hh,zC;function r9(){if(zC)return hh;zC=1;var e=Ku();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return hh=t,hh}var vh,BC;function n9(){if(BC)return vh;BC=1;var e=Ku();function t(r){return e(this,r).get(r)}return vh=t,vh}var gh,FC;function o9(){if(FC)return gh;FC=1;var e=Ku();function t(r){return e(this,r).has(r)}return gh=t,gh}var mh,$C;function i9(){if($C)return mh;$C=1;var e=Ku();function t(r,n){var o=e(this,r),i=o.size;return o.set(r,n),this.size+=o.size==i?0:1,this}return mh=t,mh}var bh,HC;function p_(){if(HC)return bh;HC=1;var e=e9(),t=r9(),r=n9(),n=o9(),o=i9();function i(a){var s=-1,c=a==null?0:a.length;for(this.clear();++s<c;){var u=a[s];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,bh=i,bh}var yh,VC;function a9(){if(VC)return yh;VC=1;var e=Uu(),t=f_(),r=p_(),n=200;function o(i,a){var s=this.__data__;if(s instanceof e){var c=s.__data__;if(!t||c.length<n-1)return c.push([i,a]),this.size=++s.size,this;s=this.__data__=new r(c)}return s.set(i,a),this.size=s.size,this}return yh=o,yh}var wh,WC;function Yu(){if(WC)return wh;WC=1;var e=Uu(),t=L7(),r=z7(),n=B7(),o=F7(),i=a9();function a(s){var c=this.__data__=new e(s);this.size=c.size}return a.prototype.clear=t,a.prototype.delete=r,a.prototype.get=n,a.prototype.has=o,a.prototype.set=i,wh=a,wh}var xh,UC;function h_(){if(UC)return xh;UC=1;function e(t,r){for(var n=-1,o=t==null?0:t.length;++n<o&&r(t[n],n,t)!==!1;);return t}return xh=e,xh}var _h,GC;function Tq(){if(GC)return _h;GC=1;var e=Qo(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return _h=t,_h}var Eh,KC;function Xu(){if(KC)return Eh;KC=1;var e=Tq();function t(r,n,o){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:o,writable:!0}):r[n]=o}return Eh=t,Eh}var Sh,YC;function Zu(){if(YC)return Sh;YC=1;var e=Xu(),t=oa(),r=Object.prototype,n=r.hasOwnProperty;function o(i,a,s){var c=i[a];(!(n.call(i,a)&&t(c,s))||s===void 0&&!(a in i))&&e(i,a,s)}return Sh=o,Sh}var Oh,XC;function Ls(){if(XC)return Oh;XC=1;var e=Zu(),t=Xu();function r(n,o,i,a){var s=!i;i||(i={});for(var c=-1,u=o.length;++c<u;){var d=o[c],p=a?a(i[d],n[d],d,i,n):void 0;p===void 0&&(p=n[d]),s?t(i,d,p):e(i,d,p)}return i}return Oh=r,Oh}var Ch,ZC;function s9(){if(ZC)return Ch;ZC=1;function e(t,r){for(var n=-1,o=Array(t);++n<t;)o[n]=r(n);return o}return Ch=e,Ch}var Ih,JC;function Cn(){if(JC)return Ih;JC=1;function e(t){return t!=null&&typeof t=="object"}return Ih=e,Ih}var Rh,QC;function l9(){if(QC)return Rh;QC=1;var e=Jo(),t=Cn(),r="[object Arguments]";function n(o){return t(o)&&e(o)==r}return Rh=n,Rh}var Nh,eI;function zs(){if(eI)return Nh;eI=1;var e=l9(),t=Cn(),r=Object.prototype,n=r.hasOwnProperty,o=r.propertyIsEnumerable,i=e((function(){return arguments})())?e:function(a){return t(a)&&n.call(a,"callee")&&!o.call(a,"callee")};return Nh=i,Nh}var Ph,tI;function Nt(){if(tI)return Ph;tI=1;var e=Array.isArray;return Ph=e,Ph}var ls={exports:{}},Th,rI;function c9(){if(rI)return Th;rI=1;function e(){return!1}return Th=e,Th}ls.exports;var nI;function aa(){return nI||(nI=1,(function(e,t){var r=on(),n=c9(),o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a?r.Buffer:void 0,c=s?s.isBuffer:void 0,u=c||n;e.exports=u})(ls,ls.exports)),ls.exports}var Ah,oI;function Ju(){if(oI)return Ah;oI=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,o){var i=typeof n;return o=o??e,!!o&&(i=="number"||i!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<o}return Ah=r,Ah}var kh,iI;function v_(){if(iI)return kh;iI=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return kh=t,kh}var Mh,aI;function u9(){if(aI)return Mh;aI=1;var e=Jo(),t=v_(),r=Cn(),n="[object Arguments]",o="[object Array]",i="[object Boolean]",a="[object Date]",s="[object Error]",c="[object Function]",u="[object Map]",d="[object Number]",p="[object Object]",h="[object RegExp]",v="[object Set]",y="[object String]",g="[object WeakMap]",b="[object ArrayBuffer]",x="[object DataView]",w="[object Float32Array]",E="[object Float64Array]",S="[object Int8Array]",_="[object Int16Array]",O="[object Int32Array]",N="[object Uint8Array]",R="[object Uint8ClampedArray]",A="[object Uint16Array]",D="[object Uint32Array]",B={};B[w]=B[E]=B[S]=B[_]=B[O]=B[N]=B[R]=B[A]=B[D]=!0,B[n]=B[o]=B[b]=B[i]=B[x]=B[a]=B[s]=B[c]=B[u]=B[d]=B[p]=B[h]=B[v]=B[y]=B[g]=!1;function j(M){return r(M)&&t(M.length)&&!!B[e(M)]}return Mh=j,Mh}var Dh,sI;function Qu(){if(sI)return Dh;sI=1;function e(t){return function(r){return t(r)}}return Dh=e,Dh}var cs={exports:{}};cs.exports;var lI;function g_(){return lI||(lI=1,(function(e,t){var r=Nq(),n=t&&!t.nodeType&&t,o=n&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===n,a=i&&r.process,s=(function(){try{var c=o&&o.require&&o.require("util").types;return c||a&&a.binding&&a.binding("util")}catch{}})();e.exports=s})(cs,cs.exports)),cs.exports}var jh,cI;function Bs(){if(cI)return jh;cI=1;var e=u9(),t=Qu(),r=g_(),n=r&&r.isTypedArray,o=n?t(n):e;return jh=o,jh}var qh,uI;function Aq(){if(uI)return qh;uI=1;var e=s9(),t=zs(),r=Nt(),n=aa(),o=Ju(),i=Bs(),a=Object.prototype,s=a.hasOwnProperty;function c(u,d){var p=r(u),h=!p&&t(u),v=!p&&!h&&n(u),y=!p&&!h&&!v&&i(u),g=p||h||v||y,b=g?e(u.length,String):[],x=b.length;for(var w in u)(d||s.call(u,w))&&!(g&&(w=="length"||v&&(w=="offset"||w=="parent")||y&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||o(w,x)))&&b.push(w);return b}return qh=c,qh}var Lh,dI;function ed(){if(dI)return Lh;dI=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,o=typeof n=="function"&&n.prototype||e;return r===o}return Lh=t,Lh}var zh,fI;function kq(){if(fI)return zh;fI=1;function e(t,r){return function(n){return t(r(n))}}return zh=e,zh}var Bh,pI;function d9(){if(pI)return Bh;pI=1;var e=kq(),t=e(Object.keys,Object);return Bh=t,Bh}var Fh,hI;function m_(){if(hI)return Fh;hI=1;var e=ed(),t=d9(),r=Object.prototype,n=r.hasOwnProperty;function o(i){if(!e(i))return t(i);var a=[];for(var s in Object(i))n.call(i,s)&&s!="constructor"&&a.push(s);return a}return Fh=o,Fh}var $h,vI;function Gn(){if(vI)return $h;vI=1;var e=qs(),t=v_();function r(n){return n!=null&&t(n.length)&&!e(n)}return $h=r,$h}var Hh,gI;function _o(){if(gI)return Hh;gI=1;var e=Aq(),t=m_(),r=Gn();function n(o){return r(o)?e(o):t(o)}return Hh=n,Hh}var Vh,mI;function f9(){if(mI)return Vh;mI=1;var e=Ls(),t=_o();function r(n,o){return n&&e(o,t(o),n)}return Vh=r,Vh}var Wh,bI;function p9(){if(bI)return Wh;bI=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return Wh=e,Wh}var Uh,yI;function h9(){if(yI)return Uh;yI=1;var e=Hr(),t=ed(),r=p9(),n=Object.prototype,o=n.hasOwnProperty;function i(a){if(!e(a))return r(a);var s=t(a),c=[];for(var u in a)u=="constructor"&&(s||!o.call(a,u))||c.push(u);return c}return Uh=i,Uh}var Gh,wI;function ei(){if(wI)return Gh;wI=1;var e=Aq(),t=h9(),r=Gn();function n(o){return r(o)?e(o,!0):t(o)}return Gh=n,Gh}var Kh,xI;function v9(){if(xI)return Kh;xI=1;var e=Ls(),t=ei();function r(n,o){return n&&e(o,t(o),n)}return Kh=r,Kh}var us={exports:{}};us.exports;var _I;function Mq(){return _I||(_I=1,(function(e,t){var r=on(),n=t&&!t.nodeType&&t,o=n&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===n,a=i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;function c(u,d){if(d)return u.slice();var p=u.length,h=s?s(p):new u.constructor(p);return u.copy(h),h}e.exports=c})(us,us.exports)),us.exports}var Yh,EI;function Dq(){if(EI)return Yh;EI=1;function e(t,r){var n=-1,o=t.length;for(r||(r=Array(o));++n<o;)r[n]=t[n];return r}return Yh=e,Yh}var Xh,SI;function jq(){if(SI)return Xh;SI=1;function e(t,r){for(var n=-1,o=t==null?0:t.length,i=0,a=[];++n<o;){var s=t[n];r(s,n,t)&&(a[i++]=s)}return a}return Xh=e,Xh}var Zh,OI;function qq(){if(OI)return Zh;OI=1;function e(){return[]}return Zh=e,Zh}var Jh,CI;function b_(){if(CI)return Jh;CI=1;var e=jq(),t=qq(),r=Object.prototype,n=r.propertyIsEnumerable,o=Object.getOwnPropertySymbols,i=o?function(a){return a==null?[]:(a=Object(a),e(o(a),function(s){return n.call(a,s)}))}:t;return Jh=i,Jh}var Qh,II;function g9(){if(II)return Qh;II=1;var e=Ls(),t=b_();function r(n,o){return e(n,t(n),o)}return Qh=r,Qh}var ev,RI;function y_(){if(RI)return ev;RI=1;function e(t,r){for(var n=-1,o=r.length,i=t.length;++n<o;)t[i+n]=r[n];return t}return ev=e,ev}var tv,NI;function td(){if(NI)return tv;NI=1;var e=kq(),t=e(Object.getPrototypeOf,Object);return tv=t,tv}var rv,PI;function Lq(){if(PI)return rv;PI=1;var e=y_(),t=td(),r=b_(),n=qq(),o=Object.getOwnPropertySymbols,i=o?function(a){for(var s=[];a;)e(s,r(a)),a=t(a);return s}:n;return rv=i,rv}var nv,TI;function m9(){if(TI)return nv;TI=1;var e=Ls(),t=Lq();function r(n,o){return e(n,t(n),o)}return nv=r,nv}var ov,AI;function zq(){if(AI)return ov;AI=1;var e=y_(),t=Nt();function r(n,o,i){var a=o(n);return t(n)?a:e(a,i(n))}return ov=r,ov}var iv,kI;function Bq(){if(kI)return iv;kI=1;var e=zq(),t=b_(),r=_o();function n(o){return e(o,r,t)}return iv=n,iv}var av,MI;function b9(){if(MI)return av;MI=1;var e=zq(),t=Lq(),r=ei();function n(o){return e(o,r,t)}return av=n,av}var sv,DI;function y9(){if(DI)return sv;DI=1;var e=Qo(),t=on(),r=e(t,"DataView");return sv=r,sv}var lv,jI;function w9(){if(jI)return lv;jI=1;var e=Qo(),t=on(),r=e(t,"Promise");return lv=r,lv}var cv,qI;function Fq(){if(qI)return cv;qI=1;var e=Qo(),t=on(),r=e(t,"Set");return cv=r,cv}var uv,LI;function x9(){if(LI)return uv;LI=1;var e=Qo(),t=on(),r=e(t,"WeakMap");return uv=r,uv}var dv,zI;function sa(){if(zI)return dv;zI=1;var e=y9(),t=f_(),r=w9(),n=Fq(),o=x9(),i=Jo(),a=Pq(),s="[object Map]",c="[object Object]",u="[object Promise]",d="[object Set]",p="[object WeakMap]",h="[object DataView]",v=a(e),y=a(t),g=a(r),b=a(n),x=a(o),w=i;return(e&&w(new e(new ArrayBuffer(1)))!=h||t&&w(new t)!=s||r&&w(r.resolve())!=u||n&&w(new n)!=d||o&&w(new o)!=p)&&(w=function(E){var S=i(E),_=S==c?E.constructor:void 0,O=_?a(_):"";if(O)switch(O){case v:return h;case y:return s;case g:return u;case b:return d;case x:return p}return S}),dv=w,dv}var fv,BI;function _9(){if(BI)return fv;BI=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n){var o=n.length,i=new n.constructor(o);return o&&typeof n[0]=="string"&&t.call(n,"index")&&(i.index=n.index,i.input=n.input),i}return fv=r,fv}var pv,FI;function $q(){if(FI)return pv;FI=1;var e=on(),t=e.Uint8Array;return pv=t,pv}var hv,$I;function w_(){if($I)return hv;$I=1;var e=$q();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return hv=t,hv}var vv,HI;function E9(){if(HI)return vv;HI=1;var e=w_();function t(r,n){var o=n?e(r.buffer):r.buffer;return new r.constructor(o,r.byteOffset,r.byteLength)}return vv=t,vv}var gv,VI;function S9(){if(VI)return gv;VI=1;var e=/\w*$/;function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}return gv=t,gv}var mv,WI;function O9(){if(WI)return mv;WI=1;var e=ia(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function n(o){return r?Object(r.call(o)):{}}return mv=n,mv}var bv,UI;function Hq(){if(UI)return bv;UI=1;var e=w_();function t(r,n){var o=n?e(r.buffer):r.buffer;return new r.constructor(o,r.byteOffset,r.length)}return bv=t,bv}var yv,GI;function C9(){if(GI)return yv;GI=1;var e=w_(),t=E9(),r=S9(),n=O9(),o=Hq(),i="[object Boolean]",a="[object Date]",s="[object Map]",c="[object Number]",u="[object RegExp]",d="[object Set]",p="[object String]",h="[object Symbol]",v="[object ArrayBuffer]",y="[object DataView]",g="[object Float32Array]",b="[object Float64Array]",x="[object Int8Array]",w="[object Int16Array]",E="[object Int32Array]",S="[object Uint8Array]",_="[object Uint8ClampedArray]",O="[object Uint16Array]",N="[object Uint32Array]";function R(A,D,B){var j=A.constructor;switch(D){case v:return e(A);case i:case a:return new j(+A);case y:return t(A,B);case g:case b:case x:case w:case E:case S:case _:case O:case N:return o(A,B);case s:return new j;case c:case p:return new j(A);case u:return r(A);case d:return new j;case h:return n(A)}}return yv=R,yv}var wv,KI;function Vq(){if(KI)return wv;KI=1;var e=Hr(),t=Object.create,r=(function(){function n(){}return function(o){if(!e(o))return{};if(t)return t(o);n.prototype=o;var i=new n;return n.prototype=void 0,i}})();return wv=r,wv}var xv,YI;function Wq(){if(YI)return xv;YI=1;var e=Vq(),t=td(),r=ed();function n(o){return typeof o.constructor=="function"&&!r(o)?e(t(o)):{}}return xv=n,xv}var _v,XI;function I9(){if(XI)return _v;XI=1;var e=sa(),t=Cn(),r="[object Map]";function n(o){return t(o)&&e(o)==r}return _v=n,_v}var Ev,ZI;function R9(){if(ZI)return Ev;ZI=1;var e=I9(),t=Qu(),r=g_(),n=r&&r.isMap,o=n?t(n):e;return Ev=o,Ev}var Sv,JI;function N9(){if(JI)return Sv;JI=1;var e=sa(),t=Cn(),r="[object Set]";function n(o){return t(o)&&e(o)==r}return Sv=n,Sv}var Ov,QI;function P9(){if(QI)return Ov;QI=1;var e=N9(),t=Qu(),r=g_(),n=r&&r.isSet,o=n?t(n):e;return Ov=o,Ov}var Cv,eR;function Uq(){if(eR)return Cv;eR=1;var e=Yu(),t=h_(),r=Zu(),n=f9(),o=v9(),i=Mq(),a=Dq(),s=g9(),c=m9(),u=Bq(),d=b9(),p=sa(),h=_9(),v=C9(),y=Wq(),g=Nt(),b=aa(),x=R9(),w=Hr(),E=P9(),S=_o(),_=ei(),O=1,N=2,R=4,A="[object Arguments]",D="[object Array]",B="[object Boolean]",j="[object Date]",M="[object Error]",P="[object Function]",V="[object GeneratorFunction]",q="[object Map]",G="[object Number]",W="[object Object]",Q="[object RegExp]",z="[object Set]",U="[object String]",ie="[object Symbol]",te="[object WeakMap]",$="[object ArrayBuffer]",K="[object DataView]",Z="[object Float32Array]",H="[object Float64Array]",Y="[object Int8Array]",oe="[object Int16Array]",re="[object Int32Array]",se="[object Uint8Array]",ee="[object Uint8ClampedArray]",we="[object Uint16Array]",ve="[object Uint32Array]",Ee={};Ee[A]=Ee[D]=Ee[$]=Ee[K]=Ee[B]=Ee[j]=Ee[Z]=Ee[H]=Ee[Y]=Ee[oe]=Ee[re]=Ee[q]=Ee[G]=Ee[W]=Ee[Q]=Ee[z]=Ee[U]=Ee[ie]=Ee[se]=Ee[ee]=Ee[we]=Ee[ve]=!0,Ee[M]=Ee[P]=Ee[te]=!1;function pe(ce,Ce,ke,Ke,ze,rt){var Xe,It=Ce&O,lt=Ce&N,Wt=Ce&R;if(ke&&(Xe=ze?ke(ce,Ke,ze,rt):ke(ce)),Xe!==void 0)return Xe;if(!w(ce))return ce;var mt=g(ce);if(mt){if(Xe=h(ce),!It)return a(ce,Xe)}else{var ct=p(ce),Lt=ct==P||ct==V;if(b(ce))return i(ce,It);if(ct==W||ct==A||Lt&&!ze){if(Xe=lt||Lt?{}:y(ce),!It)return lt?c(ce,o(Xe,ce)):s(ce,n(Xe,ce))}else{if(!Ee[ct])return ze?ce:{};Xe=v(ce,ct,It)}}rt||(rt=new e);var pr=rt.get(ce);if(pr)return pr;rt.set(ce,Xe),E(ce)?ce.forEach(function(Tt){Xe.add(pe(Tt,Ce,ke,Tt,ce,rt))}):x(ce)&&ce.forEach(function(Tt,Yt){Xe.set(Yt,pe(Tt,Ce,ke,Yt,ce,rt))});var Cr=Wt?lt?d:u:lt?_:S,Kt=mt?void 0:Cr(ce);return t(Kt||ce,function(Tt,Yt){Kt&&(Yt=Tt,Tt=ce[Yt]),r(Xe,Yt,pe(Tt,Ce,ke,Yt,ce,rt))}),Xe}return Cv=pe,Cv}var Iv,tR;function T9(){if(tR)return Iv;tR=1;var e=Uq(),t=4;function r(n){return e(n,t)}return Iv=r,Iv}var Rv,rR;function x_(){if(rR)return Rv;rR=1;function e(t){return function(){return t}}return Rv=e,Rv}var Nv,nR;function A9(){if(nR)return Nv;nR=1;function e(t){return function(r,n,o){for(var i=-1,a=Object(r),s=o(r),c=s.length;c--;){var u=s[t?c:++i];if(n(a[u],u,a)===!1)break}return r}}return Nv=e,Nv}var Pv,oR;function __(){if(oR)return Pv;oR=1;var e=A9(),t=e();return Pv=t,Pv}var Tv,iR;function E_(){if(iR)return Tv;iR=1;var e=__(),t=_o();function r(n,o){return n&&e(n,o,t)}return Tv=r,Tv}var Av,aR;function k9(){if(aR)return Av;aR=1;var e=Gn();function t(r,n){return function(o,i){if(o==null)return o;if(!e(o))return r(o,i);for(var a=o.length,s=n?a:-1,c=Object(o);(n?s--:++s<a)&&i(c[s],s,c)!==!1;);return o}}return Av=t,Av}var kv,sR;function rd(){if(sR)return kv;sR=1;var e=E_(),t=k9(),r=t(e);return kv=r,kv}var Mv,lR;function ti(){if(lR)return Mv;lR=1;function e(t){return t}return Mv=e,Mv}var Dv,cR;function Gq(){if(cR)return Dv;cR=1;var e=ti();function t(r){return typeof r=="function"?r:e}return Dv=t,Dv}var jv,uR;function Kq(){if(uR)return jv;uR=1;var e=h_(),t=rd(),r=Gq(),n=Nt();function o(i,a){var s=n(i)?e:t;return s(i,r(a))}return jv=o,jv}var qv,dR;function Yq(){return dR||(dR=1,qv=Kq()),qv}var Lv,fR;function M9(){if(fR)return Lv;fR=1;var e=rd();function t(r,n){var o=[];return e(r,function(i,a,s){n(i,a,s)&&o.push(i)}),o}return Lv=t,Lv}var zv,pR;function D9(){if(pR)return zv;pR=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return zv=t,zv}var Bv,hR;function j9(){if(hR)return Bv;hR=1;function e(t){return this.__data__.has(t)}return Bv=e,Bv}var Fv,vR;function Xq(){if(vR)return Fv;vR=1;var e=p_(),t=D9(),r=j9();function n(o){var i=-1,a=o==null?0:o.length;for(this.__data__=new e;++i<a;)this.add(o[i])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,Fv=n,Fv}var $v,gR;function q9(){if(gR)return $v;gR=1;function e(t,r){for(var n=-1,o=t==null?0:t.length;++n<o;)if(r(t[n],n,t))return!0;return!1}return $v=e,$v}var Hv,mR;function Zq(){if(mR)return Hv;mR=1;function e(t,r){return t.has(r)}return Hv=e,Hv}var Vv,bR;function Jq(){if(bR)return Vv;bR=1;var e=Xq(),t=q9(),r=Zq(),n=1,o=2;function i(a,s,c,u,d,p){var h=c&n,v=a.length,y=s.length;if(v!=y&&!(h&&y>v))return!1;var g=p.get(a),b=p.get(s);if(g&&b)return g==s&&b==a;var x=-1,w=!0,E=c&o?new e:void 0;for(p.set(a,s),p.set(s,a);++x<v;){var S=a[x],_=s[x];if(u)var O=h?u(_,S,x,s,a,p):u(S,_,x,a,s,p);if(O!==void 0){if(O)continue;w=!1;break}if(E){if(!t(s,function(N,R){if(!r(E,R)&&(S===N||d(S,N,c,u,p)))return E.push(R)})){w=!1;break}}else if(!(S===_||d(S,_,c,u,p))){w=!1;break}}return p.delete(a),p.delete(s),w}return Vv=i,Vv}var Wv,yR;function L9(){if(yR)return Wv;yR=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(o,i){n[++r]=[i,o]}),n}return Wv=e,Wv}var Uv,wR;function S_(){if(wR)return Uv;wR=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(o){n[++r]=o}),n}return Uv=e,Uv}var Gv,xR;function z9(){if(xR)return Gv;xR=1;var e=ia(),t=$q(),r=oa(),n=Jq(),o=L9(),i=S_(),a=1,s=2,c="[object Boolean]",u="[object Date]",d="[object Error]",p="[object Map]",h="[object Number]",v="[object RegExp]",y="[object Set]",g="[object String]",b="[object Symbol]",x="[object ArrayBuffer]",w="[object DataView]",E=e?e.prototype:void 0,S=E?E.valueOf:void 0;function _(O,N,R,A,D,B,j){switch(R){case w:if(O.byteLength!=N.byteLength||O.byteOffset!=N.byteOffset)return!1;O=O.buffer,N=N.buffer;case x:return!(O.byteLength!=N.byteLength||!B(new t(O),new t(N)));case c:case u:case h:return r(+O,+N);case d:return O.name==N.name&&O.message==N.message;case v:case g:return O==N+"";case p:var M=o;case y:var P=A&a;if(M||(M=i),O.size!=N.size&&!P)return!1;var V=j.get(O);if(V)return V==N;A|=s,j.set(O,N);var q=n(M(O),M(N),A,D,B,j);return j.delete(O),q;case b:if(S)return S.call(O)==S.call(N)}return!1}return Gv=_,Gv}var Kv,_R;function B9(){if(_R)return Kv;_R=1;var e=Bq(),t=1,r=Object.prototype,n=r.hasOwnProperty;function o(i,a,s,c,u,d){var p=s&t,h=e(i),v=h.length,y=e(a),g=y.length;if(v!=g&&!p)return!1;for(var b=v;b--;){var x=h[b];if(!(p?x in a:n.call(a,x)))return!1}var w=d.get(i),E=d.get(a);if(w&&E)return w==a&&E==i;var S=!0;d.set(i,a),d.set(a,i);for(var _=p;++b<v;){x=h[b];var O=i[x],N=a[x];if(c)var R=p?c(N,O,x,a,i,d):c(O,N,x,i,a,d);if(!(R===void 0?O===N||u(O,N,s,c,d):R)){S=!1;break}_||(_=x=="constructor")}if(S&&!_){var A=i.constructor,D=a.constructor;A!=D&&"constructor"in i&&"constructor"in a&&!(typeof A=="function"&&A instanceof A&&typeof D=="function"&&D instanceof D)&&(S=!1)}return d.delete(i),d.delete(a),S}return Kv=o,Kv}var Yv,ER;function F9(){if(ER)return Yv;ER=1;var e=Yu(),t=Jq(),r=z9(),n=B9(),o=sa(),i=Nt(),a=aa(),s=Bs(),c=1,u="[object Arguments]",d="[object Array]",p="[object Object]",h=Object.prototype,v=h.hasOwnProperty;function y(g,b,x,w,E,S){var _=i(g),O=i(b),N=_?d:o(g),R=O?d:o(b);N=N==u?p:N,R=R==u?p:R;var A=N==p,D=R==p,B=N==R;if(B&&a(g)){if(!a(b))return!1;_=!0,A=!1}if(B&&!A)return S||(S=new e),_||s(g)?t(g,b,x,w,E,S):r(g,b,N,x,w,E,S);if(!(x&c)){var j=A&&v.call(g,"__wrapped__"),M=D&&v.call(b,"__wrapped__");if(j||M){var P=j?g.value():g,V=M?b.value():b;return S||(S=new e),E(P,V,x,w,S)}}return B?(S||(S=new e),n(g,b,x,w,E,S)):!1}return Yv=y,Yv}var Xv,SR;function Qq(){if(SR)return Xv;SR=1;var e=F9(),t=Cn();function r(n,o,i,a,s){return n===o?!0:n==null||o==null||!t(n)&&!t(o)?n!==n&&o!==o:e(n,o,i,a,r,s)}return Xv=r,Xv}var Zv,OR;function $9(){if(OR)return Zv;OR=1;var e=Yu(),t=Qq(),r=1,n=2;function o(i,a,s,c){var u=s.length,d=u,p=!c;if(i==null)return!d;for(i=Object(i);u--;){var h=s[u];if(p&&h[2]?h[1]!==i[h[0]]:!(h[0]in i))return!1}for(;++u<d;){h=s[u];var v=h[0],y=i[v],g=h[1];if(p&&h[2]){if(y===void 0&&!(v in i))return!1}else{var b=new e;if(c)var x=c(y,g,v,i,a,b);if(!(x===void 0?t(g,y,r|n,c,b):x))return!1}}return!0}return Zv=o,Zv}var Jv,CR;function eL(){if(CR)return Jv;CR=1;var e=Hr();function t(r){return r===r&&!e(r)}return Jv=t,Jv}var Qv,IR;function H9(){if(IR)return Qv;IR=1;var e=eL(),t=_o();function r(n){for(var o=t(n),i=o.length;i--;){var a=o[i],s=n[a];o[i]=[a,s,e(s)]}return o}return Qv=r,Qv}var eg,RR;function tL(){if(RR)return eg;RR=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return eg=e,eg}var tg,NR;function V9(){if(NR)return tg;NR=1;var e=$9(),t=H9(),r=tL();function n(o){var i=t(o);return i.length==1&&i[0][2]?r(i[0][0],i[0][1]):function(a){return a===o||e(a,o,i)}}return tg=n,tg}var rg,PR;function la(){if(PR)return rg;PR=1;var e=Jo(),t=Cn(),r="[object Symbol]";function n(o){return typeof o=="symbol"||t(o)&&e(o)==r}return rg=n,rg}var ng,TR;function O_(){if(TR)return ng;TR=1;var e=Nt(),t=la(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function o(i,a){if(e(i))return!1;var s=typeof i;return s=="number"||s=="symbol"||s=="boolean"||i==null||t(i)?!0:n.test(i)||!r.test(i)||a!=null&&i in Object(a)}return ng=o,ng}var og,AR;function W9(){if(AR)return og;AR=1;var e=p_(),t="Expected a function";function r(n,o){if(typeof n!="function"||o!=null&&typeof o!="function")throw new TypeError(t);var i=function(){var a=arguments,s=o?o.apply(this,a):a[0],c=i.cache;if(c.has(s))return c.get(s);var u=n.apply(this,a);return i.cache=c.set(s,u)||c,u};return i.cache=new(r.Cache||e),i}return r.Cache=e,og=r,og}var ig,kR;function U9(){if(kR)return ig;kR=1;var e=W9(),t=500;function r(n){var o=e(n,function(a){return i.size===t&&i.clear(),a}),i=o.cache;return o}return ig=r,ig}var ag,MR;function G9(){if(MR)return ag;MR=1;var e=U9(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(o){var i=[];return o.charCodeAt(0)===46&&i.push(""),o.replace(t,function(a,s,c,u){i.push(c?u.replace(r,"$1"):s||a)}),i});return ag=n,ag}var sg,DR;function nd(){if(DR)return sg;DR=1;function e(t,r){for(var n=-1,o=t==null?0:t.length,i=Array(o);++n<o;)i[n]=r(t[n],n,t);return i}return sg=e,sg}var lg,jR;function K9(){if(jR)return lg;jR=1;var e=ia(),t=nd(),r=Nt(),n=la(),o=e?e.prototype:void 0,i=o?o.toString:void 0;function a(s){if(typeof s=="string")return s;if(r(s))return t(s,a)+"";if(n(s))return i?i.call(s):"";var c=s+"";return c=="0"&&1/s==-1/0?"-0":c}return lg=a,lg}var cg,qR;function rL(){if(qR)return cg;qR=1;var e=K9();function t(r){return r==null?"":e(r)}return cg=t,cg}var ug,LR;function od(){if(LR)return ug;LR=1;var e=Nt(),t=O_(),r=G9(),n=rL();function o(i,a){return e(i)?i:t(i,a)?[i]:r(n(i))}return ug=o,ug}var dg,zR;function Fs(){if(zR)return dg;zR=1;var e=la();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return dg=t,dg}var fg,BR;function id(){if(BR)return fg;BR=1;var e=od(),t=Fs();function r(n,o){o=e(o,n);for(var i=0,a=o.length;n!=null&&i<a;)n=n[t(o[i++])];return i&&i==a?n:void 0}return fg=r,fg}var pg,FR;function Y9(){if(FR)return pg;FR=1;var e=id();function t(r,n,o){var i=r==null?void 0:e(r,n);return i===void 0?o:i}return pg=t,pg}var hg,$R;function X9(){if($R)return hg;$R=1;function e(t,r){return t!=null&&r in Object(t)}return hg=e,hg}var vg,HR;function nL(){if(HR)return vg;HR=1;var e=od(),t=zs(),r=Nt(),n=Ju(),o=v_(),i=Fs();function a(s,c,u){c=e(c,s);for(var d=-1,p=c.length,h=!1;++d<p;){var v=i(c[d]);if(!(h=s!=null&&u(s,v)))break;s=s[v]}return h||++d!=p?h:(p=s==null?0:s.length,!!p&&o(p)&&n(v,p)&&(r(s)||t(s)))}return vg=a,vg}var gg,VR;function oL(){if(VR)return gg;VR=1;var e=X9(),t=nL();function r(n,o){return n!=null&&t(n,o,e)}return gg=r,gg}var mg,WR;function Z9(){if(WR)return mg;WR=1;var e=Qq(),t=Y9(),r=oL(),n=O_(),o=eL(),i=tL(),a=Fs(),s=1,c=2;function u(d,p){return n(d)&&o(p)?i(a(d),p):function(h){var v=t(h,d);return v===void 0&&v===p?r(h,d):e(p,v,s|c)}}return mg=u,mg}var bg,UR;function iL(){if(UR)return bg;UR=1;function e(t){return function(r){return r==null?void 0:r[t]}}return bg=e,bg}var yg,GR;function J9(){if(GR)return yg;GR=1;var e=id();function t(r){return function(n){return e(n,r)}}return yg=t,yg}var wg,KR;function Q9(){if(KR)return wg;KR=1;var e=iL(),t=J9(),r=O_(),n=Fs();function o(i){return r(i)?e(n(i)):t(i)}return wg=o,wg}var xg,YR;function Kn(){if(YR)return xg;YR=1;var e=V9(),t=Z9(),r=ti(),n=Nt(),o=Q9();function i(a){return typeof a=="function"?a:a==null?r:typeof a=="object"?n(a)?t(a[0],a[1]):e(a):o(a)}return xg=i,xg}var _g,XR;function aL(){if(XR)return _g;XR=1;var e=jq(),t=M9(),r=Kn(),n=Nt();function o(i,a){var s=n(i)?e:t;return s(i,r(a,3))}return _g=o,_g}var Eg,ZR;function eK(){if(ZR)return Eg;ZR=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,o){return n!=null&&t.call(n,o)}return Eg=r,Eg}var Sg,JR;function sL(){if(JR)return Sg;JR=1;var e=eK(),t=nL();function r(n,o){return n!=null&&t(n,o,e)}return Sg=r,Sg}var Og,QR;function tK(){if(QR)return Og;QR=1;var e=m_(),t=sa(),r=zs(),n=Nt(),o=Gn(),i=aa(),a=ed(),s=Bs(),c="[object Map]",u="[object Set]",d=Object.prototype,p=d.hasOwnProperty;function h(v){if(v==null)return!0;if(o(v)&&(n(v)||typeof v=="string"||typeof v.splice=="function"||i(v)||s(v)||r(v)))return!v.length;var y=t(v);if(y==c||y==u)return!v.size;if(a(v))return!e(v).length;for(var g in v)if(p.call(v,g))return!1;return!0}return Og=h,Og}var Cg,eN;function lL(){if(eN)return Cg;eN=1;function e(t){return t===void 0}return Cg=e,Cg}var Ig,tN;function cL(){if(tN)return Ig;tN=1;var e=rd(),t=Gn();function r(n,o){var i=-1,a=t(n)?Array(n.length):[];return e(n,function(s,c,u){a[++i]=o(s,c,u)}),a}return Ig=r,Ig}var Rg,rN;function uL(){if(rN)return Rg;rN=1;var e=nd(),t=Kn(),r=cL(),n=Nt();function o(i,a){var s=n(i)?e:r;return s(i,t(a,3))}return Rg=o,Rg}var Ng,nN;function rK(){if(nN)return Ng;nN=1;function e(t,r,n,o){var i=-1,a=t==null?0:t.length;for(o&&a&&(n=t[++i]);++i<a;)n=r(n,t[i],i,t);return n}return Ng=e,Ng}var Pg,oN;function nK(){if(oN)return Pg;oN=1;function e(t,r,n,o,i){return i(t,function(a,s,c){n=o?(o=!1,a):r(n,a,s,c)}),n}return Pg=e,Pg}var Tg,iN;function dL(){if(iN)return Tg;iN=1;var e=rK(),t=rd(),r=Kn(),n=nK(),o=Nt();function i(a,s,c){var u=o(a)?e:n,d=arguments.length<3;return u(a,r(s,4),c,d,t)}return Tg=i,Tg}var Ag,aN;function oK(){if(aN)return Ag;aN=1;var e=Jo(),t=Nt(),r=Cn(),n="[object String]";function o(i){return typeof i=="string"||!t(i)&&r(i)&&e(i)==n}return Ag=o,Ag}var kg,sN;function iK(){if(sN)return kg;sN=1;var e=iL(),t=e("length");return kg=t,kg}var Mg,lN;function aK(){if(lN)return Mg;lN=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",o=t+r+n,i="\\ufe0e\\ufe0f",a="\\u200d",s=RegExp("["+a+e+o+i+"]");function c(u){return s.test(u)}return Mg=c,Mg}var Dg,cN;function sK(){if(cN)return Dg;cN=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",o=t+r+n,i="\\ufe0e\\ufe0f",a="["+e+"]",s="["+o+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+s+"|"+c+")",d="[^"+e+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",y=u+"?",g="["+i+"]?",b="(?:"+v+"(?:"+[d,p,h].join("|")+")"+g+y+")*",x=g+y+b,w="(?:"+[d+s+"?",s,p,h,a].join("|")+")",E=RegExp(c+"(?="+c+")|"+w+x,"g");function S(_){for(var O=E.lastIndex=0;E.test(_);)++O;return O}return Dg=S,Dg}var jg,uN;function lK(){if(uN)return jg;uN=1;var e=iK(),t=aK(),r=sK();function n(o){return t(o)?r(o):e(o)}return jg=n,jg}var qg,dN;function cK(){if(dN)return qg;dN=1;var e=m_(),t=sa(),r=Gn(),n=oK(),o=lK(),i="[object Map]",a="[object Set]";function s(c){if(c==null)return 0;if(r(c))return n(c)?o(c):c.length;var u=t(c);return u==i||u==a?c.size:e(c).length}return qg=s,qg}var Lg,fN;function uK(){if(fN)return Lg;fN=1;var e=h_(),t=Vq(),r=E_(),n=Kn(),o=td(),i=Nt(),a=aa(),s=qs(),c=Hr(),u=Bs();function d(p,h,v){var y=i(p),g=y||a(p)||u(p);if(h=n(h,4),v==null){var b=p&&p.constructor;g?v=y?new b:[]:c(p)?v=s(b)?t(o(p)):{}:v={}}return(g?e:r)(p,function(x,w,E){return h(v,x,w,E)}),v}return Lg=d,Lg}var zg,pN;function dK(){if(pN)return zg;pN=1;var e=ia(),t=zs(),r=Nt(),n=e?e.isConcatSpreadable:void 0;function o(i){return r(i)||t(i)||!!(n&&i&&i[n])}return zg=o,zg}var Bg,hN;function C_(){if(hN)return Bg;hN=1;var e=y_(),t=dK();function r(n,o,i,a,s){var c=-1,u=n.length;for(i||(i=t),s||(s=[]);++c<u;){var d=n[c];o>0&&i(d)?o>1?r(d,o-1,i,a,s):e(s,d):a||(s[s.length]=d)}return s}return Bg=r,Bg}var Fg,vN;function fK(){if(vN)return Fg;vN=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return Fg=e,Fg}var $g,gN;function fL(){if(gN)return $g;gN=1;var e=fK(),t=Math.max;function r(n,o,i){return o=t(o===void 0?n.length-1:o,0),function(){for(var a=arguments,s=-1,c=t(a.length-o,0),u=Array(c);++s<c;)u[s]=a[o+s];s=-1;for(var d=Array(o+1);++s<o;)d[s]=a[s];return d[o]=i(u),e(n,this,d)}}return $g=r,$g}var Hg,mN;function pK(){if(mN)return Hg;mN=1;var e=x_(),t=Tq(),r=ti(),n=t?function(o,i){return t(o,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:r;return Hg=n,Hg}var Vg,bN;function hK(){if(bN)return Vg;bN=1;var e=800,t=16,r=Date.now;function n(o){var i=0,a=0;return function(){var s=r(),c=t-(s-a);if(a=s,c>0){if(++i>=e)return arguments[0]}else i=0;return o.apply(void 0,arguments)}}return Vg=n,Vg}var Wg,yN;function pL(){if(yN)return Wg;yN=1;var e=pK(),t=hK(),r=t(e);return Wg=r,Wg}var Ug,wN;function ad(){if(wN)return Ug;wN=1;var e=ti(),t=fL(),r=pL();function n(o,i){return r(t(o,i,e),o+"")}return Ug=n,Ug}var Gg,xN;function hL(){if(xN)return Gg;xN=1;function e(t,r,n,o){for(var i=t.length,a=n+(o?1:-1);o?a--:++a<i;)if(r(t[a],a,t))return a;return-1}return Gg=e,Gg}var Kg,_N;function vK(){if(_N)return Kg;_N=1;function e(t){return t!==t}return Kg=e,Kg}var Yg,EN;function gK(){if(EN)return Yg;EN=1;function e(t,r,n){for(var o=n-1,i=t.length;++o<i;)if(t[o]===r)return o;return-1}return Yg=e,Yg}var Xg,SN;function mK(){if(SN)return Xg;SN=1;var e=hL(),t=vK(),r=gK();function n(o,i,a){return i===i?r(o,i,a):e(o,t,a)}return Xg=n,Xg}var Zg,ON;function bK(){if(ON)return Zg;ON=1;var e=mK();function t(r,n){var o=r==null?0:r.length;return!!o&&e(r,n,0)>-1}return Zg=t,Zg}var Jg,CN;function yK(){if(CN)return Jg;CN=1;function e(t,r,n){for(var o=-1,i=t==null?0:t.length;++o<i;)if(n(r,t[o]))return!0;return!1}return Jg=e,Jg}var Qg,IN;function wK(){if(IN)return Qg;IN=1;function e(){}return Qg=e,Qg}var em,RN;function xK(){if(RN)return em;RN=1;var e=Fq(),t=wK(),r=S_(),n=1/0,o=e&&1/r(new e([,-0]))[1]==n?function(i){return new e(i)}:t;return em=o,em}var tm,NN;function _K(){if(NN)return tm;NN=1;var e=Xq(),t=bK(),r=yK(),n=Zq(),o=xK(),i=S_(),a=200;function s(c,u,d){var p=-1,h=t,v=c.length,y=!0,g=[],b=g;if(d)y=!1,h=r;else if(v>=a){var x=u?null:o(c);if(x)return i(x);y=!1,h=n,b=new e}else b=u?[]:g;e:for(;++p<v;){var w=c[p],E=u?u(w):w;if(w=d||w!==0?w:0,y&&E===E){for(var S=b.length;S--;)if(b[S]===E)continue e;u&&b.push(E),g.push(w)}else h(b,E,d)||(b!==g&&b.push(E),g.push(w))}return g}return tm=s,tm}var rm,PN;function vL(){if(PN)return rm;PN=1;var e=Gn(),t=Cn();function r(n){return t(n)&&e(n)}return rm=r,rm}var nm,TN;function EK(){if(TN)return nm;TN=1;var e=C_(),t=ad(),r=_K(),n=vL(),o=t(function(i){return r(e(i,1,n,!0))});return nm=o,nm}var om,AN;function SK(){if(AN)return om;AN=1;var e=nd();function t(r,n){return e(n,function(o){return r[o]})}return om=t,om}var im,kN;function gL(){if(kN)return im;kN=1;var e=SK(),t=_o();function r(n){return n==null?[]:e(n,t(n))}return im=r,im}var am,MN;function Vr(){if(MN)return am;MN=1;var e;if(typeof d_=="function")try{e={clone:T9(),constant:x_(),each:Yq(),filter:aL(),has:sL(),isArray:Nt(),isEmpty:tK(),isFunction:qs(),isUndefined:lL(),keys:_o(),map:uL(),reduce:dL(),size:cK(),transform:uK(),union:EK(),values:gL()}}catch{}return e||(e=window._),am=e,am}var sm,DN;function I_(){if(DN)return sm;DN=1;var e=Vr();sm=o;var t="\0",r="\0",n="";function o(d){this._isDirected=e.has(d,"directed")?d.directed:!0,this._isMultigraph=e.has(d,"multigraph")?d.multigraph:!1,this._isCompound=e.has(d,"compound")?d.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[r]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}o.prototype._nodeCount=0,o.prototype._edgeCount=0,o.prototype.isDirected=function(){return this._isDirected},o.prototype.isMultigraph=function(){return this._isMultigraph},o.prototype.isCompound=function(){return this._isCompound},o.prototype.setGraph=function(d){return this._label=d,this},o.prototype.graph=function(){return this._label},o.prototype.setDefaultNodeLabel=function(d){return e.isFunction(d)||(d=e.constant(d)),this._defaultNodeLabelFn=d,this},o.prototype.nodeCount=function(){return this._nodeCount},o.prototype.nodes=function(){return e.keys(this._nodes)},o.prototype.sources=function(){var d=this;return e.filter(this.nodes(),function(p){return e.isEmpty(d._in[p])})},o.prototype.sinks=function(){var d=this;return e.filter(this.nodes(),function(p){return e.isEmpty(d._out[p])})},o.prototype.setNodes=function(d,p){var h=arguments,v=this;return e.each(d,function(y){h.length>1?v.setNode(y,p):v.setNode(y)}),this},o.prototype.setNode=function(d,p){return e.has(this._nodes,d)?(arguments.length>1&&(this._nodes[d]=p),this):(this._nodes[d]=arguments.length>1?p:this._defaultNodeLabelFn(d),this._isCompound&&(this._parent[d]=r,this._children[d]={},this._children[r][d]=!0),this._in[d]={},this._preds[d]={},this._out[d]={},this._sucs[d]={},++this._nodeCount,this)},o.prototype.node=function(d){return this._nodes[d]},o.prototype.hasNode=function(d){return e.has(this._nodes,d)},o.prototype.removeNode=function(d){var p=this;if(e.has(this._nodes,d)){var h=function(v){p.removeEdge(p._edgeObjs[v])};delete this._nodes[d],this._isCompound&&(this._removeFromParentsChildList(d),delete this._parent[d],e.each(this.children(d),function(v){p.setParent(v)}),delete this._children[d]),e.each(e.keys(this._in[d]),h),delete this._in[d],delete this._preds[d],e.each(e.keys(this._out[d]),h),delete this._out[d],delete this._sucs[d],--this._nodeCount}return this},o.prototype.setParent=function(d,p){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(p))p=r;else{p+="";for(var h=p;!e.isUndefined(h);h=this.parent(h))if(h===d)throw new Error("Setting "+p+" as parent of "+d+" would create a cycle");this.setNode(p)}return this.setNode(d),this._removeFromParentsChildList(d),this._parent[d]=p,this._children[p][d]=!0,this},o.prototype._removeFromParentsChildList=function(d){delete this._children[this._parent[d]][d]},o.prototype.parent=function(d){if(this._isCompound){var p=this._parent[d];if(p!==r)return p}},o.prototype.children=function(d){if(e.isUndefined(d)&&(d=r),this._isCompound){var p=this._children[d];if(p)return e.keys(p)}else{if(d===r)return this.nodes();if(this.hasNode(d))return[]}},o.prototype.predecessors=function(d){var p=this._preds[d];if(p)return e.keys(p)},o.prototype.successors=function(d){var p=this._sucs[d];if(p)return e.keys(p)},o.prototype.neighbors=function(d){var p=this.predecessors(d);if(p)return e.union(p,this.successors(d))},o.prototype.isLeaf=function(d){var p;return this.isDirected()?p=this.successors(d):p=this.neighbors(d),p.length===0},o.prototype.filterNodes=function(d){var p=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});p.setGraph(this.graph());var h=this;e.each(this._nodes,function(g,b){d(b)&&p.setNode(b,g)}),e.each(this._edgeObjs,function(g){p.hasNode(g.v)&&p.hasNode(g.w)&&p.setEdge(g,h.edge(g))});var v={};function y(g){var b=h.parent(g);return b===void 0||p.hasNode(b)?(v[g]=b,b):b in v?v[b]:y(b)}return this._isCompound&&e.each(p.nodes(),function(g){p.setParent(g,y(g))}),p},o.prototype.setDefaultEdgeLabel=function(d){return e.isFunction(d)||(d=e.constant(d)),this._defaultEdgeLabelFn=d,this},o.prototype.edgeCount=function(){return this._edgeCount},o.prototype.edges=function(){return e.values(this._edgeObjs)},o.prototype.setPath=function(d,p){var h=this,v=arguments;return e.reduce(d,function(y,g){return v.length>1?h.setEdge(y,g,p):h.setEdge(y,g),g}),this},o.prototype.setEdge=function(){var d,p,h,v,y=!1,g=arguments[0];typeof g=="object"&&g!==null&&"v"in g?(d=g.v,p=g.w,h=g.name,arguments.length===2&&(v=arguments[1],y=!0)):(d=g,p=arguments[1],h=arguments[3],arguments.length>2&&(v=arguments[2],y=!0)),d=""+d,p=""+p,e.isUndefined(h)||(h=""+h);var b=s(this._isDirected,d,p,h);if(e.has(this._edgeLabels,b))return y&&(this._edgeLabels[b]=v),this;if(!e.isUndefined(h)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(d),this.setNode(p),this._edgeLabels[b]=y?v:this._defaultEdgeLabelFn(d,p,h);var x=c(this._isDirected,d,p,h);return d=x.v,p=x.w,Object.freeze(x),this._edgeObjs[b]=x,i(this._preds[p],d),i(this._sucs[d],p),this._in[p][b]=x,this._out[d][b]=x,this._edgeCount++,this},o.prototype.edge=function(d,p,h){var v=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,d,p,h);return this._edgeLabels[v]},o.prototype.hasEdge=function(d,p,h){var v=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,d,p,h);return e.has(this._edgeLabels,v)},o.prototype.removeEdge=function(d,p,h){var v=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,d,p,h),y=this._edgeObjs[v];return y&&(d=y.v,p=y.w,delete this._edgeLabels[v],delete this._edgeObjs[v],a(this._preds[p],d),a(this._sucs[d],p),delete this._in[p][v],delete this._out[d][v],this._edgeCount--),this},o.prototype.inEdges=function(d,p){var h=this._in[d];if(h){var v=e.values(h);return p?e.filter(v,function(y){return y.v===p}):v}},o.prototype.outEdges=function(d,p){var h=this._out[d];if(h){var v=e.values(h);return p?e.filter(v,function(y){return y.w===p}):v}},o.prototype.nodeEdges=function(d,p){var h=this.inEdges(d,p);if(h)return h.concat(this.outEdges(d,p))};function i(d,p){d[p]?d[p]++:d[p]=1}function a(d,p){--d[p]||delete d[p]}function s(d,p,h,v){var y=""+p,g=""+h;if(!d&&y>g){var b=y;y=g,g=b}return y+n+g+n+(e.isUndefined(v)?t:v)}function c(d,p,h,v){var y=""+p,g=""+h;if(!d&&y>g){var b=y;y=g,g=b}var x={v:y,w:g};return v&&(x.name=v),x}function u(d,p){return s(d,p.v,p.w,p.name)}return sm}var lm,jN;function OK(){return jN||(jN=1,lm="2.1.8"),lm}var cm,qN;function CK(){return qN||(qN=1,cm={Graph:I_(),version:OK()}),cm}var um,LN;function IK(){if(LN)return um;LN=1;var e=Vr(),t=I_();um={write:r,read:i};function r(a){var s={options:{directed:a.isDirected(),multigraph:a.isMultigraph(),compound:a.isCompound()},nodes:n(a),edges:o(a)};return e.isUndefined(a.graph())||(s.value=e.clone(a.graph())),s}function n(a){return e.map(a.nodes(),function(s){var c=a.node(s),u=a.parent(s),d={v:s};return e.isUndefined(c)||(d.value=c),e.isUndefined(u)||(d.parent=u),d})}function o(a){return e.map(a.edges(),function(s){var c=a.edge(s),u={v:s.v,w:s.w};return e.isUndefined(s.name)||(u.name=s.name),e.isUndefined(c)||(u.value=c),u})}function i(a){var s=new t(a.options).setGraph(a.value);return e.each(a.nodes,function(c){s.setNode(c.v,c.value),c.parent&&s.setParent(c.v,c.parent)}),e.each(a.edges,function(c){s.setEdge({v:c.v,w:c.w,name:c.name},c.value)}),s}return um}var dm,zN;function RK(){if(zN)return dm;zN=1;var e=Vr();dm=t;function t(r){var n={},o=[],i;function a(s){e.has(n,s)||(n[s]=!0,i.push(s),e.each(r.successors(s),a),e.each(r.predecessors(s),a))}return e.each(r.nodes(),function(s){i=[],a(s),i.length&&o.push(i)}),o}return dm}var fm,BN;function mL(){if(BN)return fm;BN=1;var e=Vr();fm=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(r){return r.key})},t.prototype.has=function(r){return e.has(this._keyIndices,r)},t.prototype.priority=function(r){var n=this._keyIndices[r];if(n!==void 0)return this._arr[n].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(r,n){var o=this._keyIndices;if(r=String(r),!e.has(o,r)){var i=this._arr,a=i.length;return o[r]=a,i.push({key:r,priority:n}),this._decrease(a),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var r=this._arr.pop();return delete this._keyIndices[r.key],this._heapify(0),r.key},t.prototype.decrease=function(r,n){var o=this._keyIndices[r];if(n>this._arr[o].priority)throw new Error("New priority is greater than current priority. Key: "+r+" Old: "+this._arr[o].priority+" New: "+n);this._arr[o].priority=n,this._decrease(o)},t.prototype._heapify=function(r){var n=this._arr,o=2*r,i=o+1,a=r;o<n.length&&(a=n[o].priority<n[a].priority?o:a,i<n.length&&(a=n[i].priority<n[a].priority?i:a),a!==r&&(this._swap(r,a),this._heapify(a)))},t.prototype._decrease=function(r){for(var n=this._arr,o=n[r].priority,i;r!==0&&(i=r>>1,!(n[i].priority<o));)this._swap(r,i),r=i},t.prototype._swap=function(r,n){var o=this._arr,i=this._keyIndices,a=o[r],s=o[n];o[r]=s,o[n]=a,i[s.key]=r,i[a.key]=n},fm}var pm,FN;function bL(){if(FN)return pm;FN=1;var e=Vr(),t=mL();pm=n;var r=e.constant(1);function n(i,a,s,c){return o(i,String(a),s||r,c||function(u){return i.outEdges(u)})}function o(i,a,s,c){var u={},d=new t,p,h,v=function(y){var g=y.v!==p?y.v:y.w,b=u[g],x=s(y),w=h.distance+x;if(x<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+y+" Weight: "+x);w<b.distance&&(b.distance=w,b.predecessor=p,d.decrease(g,w))};for(i.nodes().forEach(function(y){var g=y===a?0:Number.POSITIVE_INFINITY;u[y]={distance:g},d.add(y,g)});d.size()>0&&(p=d.removeMin(),h=u[p],h.distance!==Number.POSITIVE_INFINITY);)c(p).forEach(v);return u}return pm}var hm,$N;function NK(){if($N)return hm;$N=1;var e=bL(),t=Vr();hm=r;function r(n,o,i){return t.transform(n.nodes(),function(a,s){a[s]=e(n,s,o,i)},{})}return hm}var vm,HN;function yL(){if(HN)return vm;HN=1;var e=Vr();vm=t;function t(r){var n=0,o=[],i={},a=[];function s(c){var u=i[c]={onStack:!0,lowlink:n,index:n++};if(o.push(c),r.successors(c).forEach(function(h){e.has(i,h)?i[h].onStack&&(u.lowlink=Math.min(u.lowlink,i[h].index)):(s(h),u.lowlink=Math.min(u.lowlink,i[h].lowlink))}),u.lowlink===u.index){var d=[],p;do p=o.pop(),i[p].onStack=!1,d.push(p);while(c!==p);a.push(d)}}return r.nodes().forEach(function(c){e.has(i,c)||s(c)}),a}return vm}var gm,VN;function PK(){if(VN)return gm;VN=1;var e=Vr(),t=yL();gm=r;function r(n){return e.filter(t(n),function(o){return o.length>1||o.length===1&&n.hasEdge(o[0],o[0])})}return gm}var mm,WN;function TK(){if(WN)return mm;WN=1;var e=Vr();mm=r;var t=e.constant(1);function r(o,i,a){return n(o,i||t,a||function(s){return o.outEdges(s)})}function n(o,i,a){var s={},c=o.nodes();return c.forEach(function(u){s[u]={},s[u][u]={distance:0},c.forEach(function(d){u!==d&&(s[u][d]={distance:Number.POSITIVE_INFINITY})}),a(u).forEach(function(d){var p=d.v===u?d.w:d.v,h=i(d);s[u][p]={distance:h,predecessor:u}})}),c.forEach(function(u){var d=s[u];c.forEach(function(p){var h=s[p];c.forEach(function(v){var y=h[u],g=d[v],b=h[v],x=y.distance+g.distance;x<b.distance&&(b.distance=x,b.predecessor=g.predecessor)})})}),s}return mm}var bm,UN;function wL(){if(UN)return bm;UN=1;var e=Vr();bm=t,t.CycleException=r;function t(n){var o={},i={},a=[];function s(c){if(e.has(i,c))throw new r;e.has(o,c)||(i[c]=!0,o[c]=!0,e.each(n.predecessors(c),s),delete i[c],a.push(c))}if(e.each(n.sinks(),s),e.size(o)!==n.nodeCount())throw new r;return a}function r(){}return r.prototype=new Error,bm}var ym,GN;function AK(){if(GN)return ym;GN=1;var e=wL();ym=t;function t(r){try{e(r)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return ym}var wm,KN;function xL(){if(KN)return wm;KN=1;var e=Vr();wm=t;function t(n,o,i){e.isArray(o)||(o=[o]);var a=(n.isDirected()?n.successors:n.neighbors).bind(n),s=[],c={};return e.each(o,function(u){if(!n.hasNode(u))throw new Error("Graph does not have node: "+u);r(n,u,i==="post",c,a,s)}),s}function r(n,o,i,a,s,c){e.has(a,o)||(a[o]=!0,i||c.push(o),e.each(s(o),function(u){r(n,u,i,a,s,c)}),i&&c.push(o))}return wm}var xm,YN;function kK(){if(YN)return xm;YN=1;var e=xL();xm=t;function t(r,n){return e(r,n,"post")}return xm}var _m,XN;function MK(){if(XN)return _m;XN=1;var e=xL();_m=t;function t(r,n){return e(r,n,"pre")}return _m}var Em,ZN;function DK(){if(ZN)return Em;ZN=1;var e=Vr(),t=I_(),r=mL();Em=n;function n(o,i){var a=new t,s={},c=new r,u;function d(h){var v=h.v===u?h.w:h.v,y=c.priority(v);if(y!==void 0){var g=i(h);g<y&&(s[v]=u,c.decrease(v,g))}}if(o.nodeCount()===0)return a;e.each(o.nodes(),function(h){c.add(h,Number.POSITIVE_INFINITY),a.setNode(h)}),c.decrease(o.nodes()[0],0);for(var p=!1;c.size()>0;){if(u=c.removeMin(),e.has(s,u))a.setEdge(u,s[u]);else{if(p)throw new Error("Input graph is not connected: "+o);p=!0}o.nodeEdges(u).forEach(d)}return a}return Em}var Sm,JN;function jK(){return JN||(JN=1,Sm={components:RK(),dijkstra:bL(),dijkstraAll:NK(),findCycles:PK(),floydWarshall:TK(),isAcyclic:AK(),postorder:kK(),preorder:MK(),prim:DK(),tarjan:yL(),topsort:wL()}),Sm}var Om,QN;function qK(){if(QN)return Om;QN=1;var e=CK();return Om={Graph:e.Graph,json:IK(),alg:jK(),version:e.version},Om}var Cm,eP;function tn(){if(eP)return Cm;eP=1;var e;if(typeof d_=="function")try{e=qK()}catch{}return e||(e=window.graphlib),Cm=e,Cm}var Im,tP;function LK(){if(tP)return Im;tP=1;var e=Uq(),t=1,r=4;function n(o){return e(o,t|r)}return Im=n,Im}var Rm,rP;function sd(){if(rP)return Rm;rP=1;var e=oa(),t=Gn(),r=Ju(),n=Hr();function o(i,a,s){if(!n(s))return!1;var c=typeof a;return(c=="number"?t(s)&&r(a,s.length):c=="string"&&a in s)?e(s[a],i):!1}return Rm=o,Rm}var Nm,nP;function zK(){if(nP)return Nm;nP=1;var e=ad(),t=oa(),r=sd(),n=ei(),o=Object.prototype,i=o.hasOwnProperty,a=e(function(s,c){s=Object(s);var u=-1,d=c.length,p=d>2?c[2]:void 0;for(p&&r(c[0],c[1],p)&&(d=1);++u<d;)for(var h=c[u],v=n(h),y=-1,g=v.length;++y<g;){var b=v[y],x=s[b];(x===void 0||t(x,o[b])&&!i.call(s,b))&&(s[b]=h[b])}return s});return Nm=a,Nm}var Pm,oP;function BK(){if(oP)return Pm;oP=1;var e=Kn(),t=Gn(),r=_o();function n(o){return function(i,a,s){var c=Object(i);if(!t(i)){var u=e(a,3);i=r(i),a=function(p){return u(c[p],p,c)}}var d=o(i,a,s);return d>-1?c[u?i[d]:d]:void 0}}return Pm=n,Pm}var Tm,iP;function FK(){if(iP)return Tm;iP=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Tm=t,Tm}var Am,aP;function $K(){if(aP)return Am;aP=1;var e=FK(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Am=r,Am}var km,sP;function HK(){if(sP)return km;sP=1;var e=$K(),t=Hr(),r=la(),n=NaN,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt;function c(u){if(typeof u=="number")return u;if(r(u))return n;if(t(u)){var d=typeof u.valueOf=="function"?u.valueOf():u;u=t(d)?d+"":d}if(typeof u!="string")return u===0?u:+u;u=e(u);var p=i.test(u);return p||a.test(u)?s(u.slice(2),p?2:8):o.test(u)?n:+u}return km=c,km}var Mm,lP;function _L(){if(lP)return Mm;lP=1;var e=HK(),t=1/0,r=17976931348623157e292;function n(o){if(!o)return o===0?o:0;if(o=e(o),o===t||o===-t){var i=o<0?-1:1;return i*r}return o===o?o:0}return Mm=n,Mm}var Dm,cP;function VK(){if(cP)return Dm;cP=1;var e=_L();function t(r){var n=e(r),o=n%1;return n===n?o?n-o:n:0}return Dm=t,Dm}var jm,uP;function WK(){if(uP)return jm;uP=1;var e=hL(),t=Kn(),r=VK(),n=Math.max;function o(i,a,s){var c=i==null?0:i.length;if(!c)return-1;var u=s==null?0:r(s);return u<0&&(u=n(c+u,0)),e(i,t(a,3),u)}return jm=o,jm}var qm,dP;function UK(){if(dP)return qm;dP=1;var e=BK(),t=WK(),r=e(t);return qm=r,qm}var Lm,fP;function EL(){if(fP)return Lm;fP=1;var e=C_();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return Lm=t,Lm}var zm,pP;function GK(){if(pP)return zm;pP=1;var e=__(),t=Gq(),r=ei();function n(o,i){return o==null?o:e(o,t(i),r)}return zm=n,zm}var Bm,hP;function KK(){if(hP)return Bm;hP=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return Bm=e,Bm}var Fm,vP;function YK(){if(vP)return Fm;vP=1;var e=Xu(),t=E_(),r=Kn();function n(o,i){var a={};return i=r(i,3),t(o,function(s,c,u){e(a,c,i(s,c,u))}),a}return Fm=n,Fm}var $m,gP;function R_(){if(gP)return $m;gP=1;var e=la();function t(r,n,o){for(var i=-1,a=r.length;++i<a;){var s=r[i],c=n(s);if(c!=null&&(u===void 0?c===c&&!e(c):o(c,u)))var u=c,d=s}return d}return $m=t,$m}var Hm,mP;function XK(){if(mP)return Hm;mP=1;function e(t,r){return t>r}return Hm=e,Hm}var Vm,bP;function ZK(){if(bP)return Vm;bP=1;var e=R_(),t=XK(),r=ti();function n(o){return o&&o.length?e(o,r,t):void 0}return Vm=n,Vm}var Wm,yP;function SL(){if(yP)return Wm;yP=1;var e=Xu(),t=oa();function r(n,o,i){(i!==void 0&&!t(n[o],i)||i===void 0&&!(o in n))&&e(n,o,i)}return Wm=r,Wm}var Um,wP;function JK(){if(wP)return Um;wP=1;var e=Jo(),t=td(),r=Cn(),n="[object Object]",o=Function.prototype,i=Object.prototype,a=o.toString,s=i.hasOwnProperty,c=a.call(Object);function u(d){if(!r(d)||e(d)!=n)return!1;var p=t(d);if(p===null)return!0;var h=s.call(p,"constructor")&&p.constructor;return typeof h=="function"&&h instanceof h&&a.call(h)==c}return Um=u,Um}var Gm,xP;function OL(){if(xP)return Gm;xP=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return Gm=e,Gm}var Km,_P;function QK(){if(_P)return Km;_P=1;var e=Ls(),t=ei();function r(n){return e(n,t(n))}return Km=r,Km}var Ym,EP;function eY(){if(EP)return Ym;EP=1;var e=SL(),t=Mq(),r=Hq(),n=Dq(),o=Wq(),i=zs(),a=Nt(),s=vL(),c=aa(),u=qs(),d=Hr(),p=JK(),h=Bs(),v=OL(),y=QK();function g(b,x,w,E,S,_,O){var N=v(b,w),R=v(x,w),A=O.get(R);if(A){e(b,w,A);return}var D=_?_(N,R,w+"",b,x,O):void 0,B=D===void 0;if(B){var j=a(R),M=!j&&c(R),P=!j&&!M&&h(R);D=R,j||M||P?a(N)?D=N:s(N)?D=n(N):M?(B=!1,D=t(R,!0)):P?(B=!1,D=r(R,!0)):D=[]:p(R)||i(R)?(D=N,i(N)?D=y(N):(!d(N)||u(N))&&(D=o(R))):B=!1}B&&(O.set(R,D),S(D,R,E,_,O),O.delete(R)),e(b,w,D)}return Ym=g,Ym}var Xm,SP;function tY(){if(SP)return Xm;SP=1;var e=Yu(),t=SL(),r=__(),n=eY(),o=Hr(),i=ei(),a=OL();function s(c,u,d,p,h){c!==u&&r(u,function(v,y){if(h||(h=new e),o(v))n(c,u,y,d,s,p,h);else{var g=p?p(a(c,y),v,y+"",c,u,h):void 0;g===void 0&&(g=v),t(c,y,g)}},i)}return Xm=s,Xm}var Zm,OP;function rY(){if(OP)return Zm;OP=1;var e=ad(),t=sd();function r(n){return e(function(o,i){var a=-1,s=i.length,c=s>1?i[s-1]:void 0,u=s>2?i[2]:void 0;for(c=n.length>3&&typeof c=="function"?(s--,c):void 0,u&&t(i[0],i[1],u)&&(c=s<3?void 0:c,s=1),o=Object(o);++a<s;){var d=i[a];d&&n(o,d,a,c)}return o})}return Zm=r,Zm}var Jm,CP;function nY(){if(CP)return Jm;CP=1;var e=tY(),t=rY(),r=t(function(n,o,i){e(n,o,i)});return Jm=r,Jm}var Qm,IP;function CL(){if(IP)return Qm;IP=1;function e(t,r){return t<r}return Qm=e,Qm}var eb,RP;function oY(){if(RP)return eb;RP=1;var e=R_(),t=CL(),r=ti();function n(o){return o&&o.length?e(o,r,t):void 0}return eb=n,eb}var tb,NP;function iY(){if(NP)return tb;NP=1;var e=R_(),t=Kn(),r=CL();function n(o,i){return o&&o.length?e(o,t(i,2),r):void 0}return tb=n,tb}var rb,PP;function aY(){if(PP)return rb;PP=1;var e=on(),t=function(){return e.Date.now()};return rb=t,rb}var nb,TP;function sY(){if(TP)return nb;TP=1;var e=Zu(),t=od(),r=Ju(),n=Hr(),o=Fs();function i(a,s,c,u){if(!n(a))return a;s=t(s,a);for(var d=-1,p=s.length,h=p-1,v=a;v!=null&&++d<p;){var y=o(s[d]),g=c;if(y==="__proto__"||y==="constructor"||y==="prototype")return a;if(d!=h){var b=v[y];g=u?u(b,y,v):void 0,g===void 0&&(g=n(b)?b:r(s[d+1])?[]:{})}e(v,y,g),v=v[y]}return a}return nb=i,nb}var ob,AP;function lY(){if(AP)return ob;AP=1;var e=id(),t=sY(),r=od();function n(o,i,a){for(var s=-1,c=i.length,u={};++s<c;){var d=i[s],p=e(o,d);a(p,d)&&t(u,r(d,o),p)}return u}return ob=n,ob}var ib,kP;function cY(){if(kP)return ib;kP=1;var e=lY(),t=oL();function r(n,o){return e(n,o,function(i,a){return t(n,a)})}return ib=r,ib}var ab,MP;function uY(){if(MP)return ab;MP=1;var e=EL(),t=fL(),r=pL();function n(o){return r(t(o,void 0,e),o+"")}return ab=n,ab}var sb,DP;function dY(){if(DP)return sb;DP=1;var e=cY(),t=uY(),r=t(function(n,o){return n==null?{}:e(n,o)});return sb=r,sb}var lb,jP;function fY(){if(jP)return lb;jP=1;var e=Math.ceil,t=Math.max;function r(n,o,i,a){for(var s=-1,c=t(e((o-n)/(i||1)),0),u=Array(c);c--;)u[a?c:++s]=n,n+=i;return u}return lb=r,lb}var cb,qP;function pY(){if(qP)return cb;qP=1;var e=fY(),t=sd(),r=_L();function n(o){return function(i,a,s){return s&&typeof s!="number"&&t(i,a,s)&&(a=s=void 0),i=r(i),a===void 0?(a=i,i=0):a=r(a),s=s===void 0?i<a?1:-1:r(s),e(i,a,s,o)}}return cb=n,cb}var ub,LP;function hY(){if(LP)return ub;LP=1;var e=pY(),t=e();return ub=t,ub}var db,zP;function vY(){if(zP)return db;zP=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return db=e,db}var fb,BP;function gY(){if(BP)return fb;BP=1;var e=la();function t(r,n){if(r!==n){var o=r!==void 0,i=r===null,a=r===r,s=e(r),c=n!==void 0,u=n===null,d=n===n,p=e(n);if(!u&&!p&&!s&&r>n||s&&c&&d&&!u&&!p||i&&c&&d||!o&&d||!a)return 1;if(!i&&!s&&!p&&r<n||p&&o&&a&&!i&&!s||u&&o&&a||!c&&a||!d)return-1}return 0}return fb=t,fb}var pb,FP;function mY(){if(FP)return pb;FP=1;var e=gY();function t(r,n,o){for(var i=-1,a=r.criteria,s=n.criteria,c=a.length,u=o.length;++i<c;){var d=e(a[i],s[i]);if(d){if(i>=u)return d;var p=o[i];return d*(p=="desc"?-1:1)}}return r.index-n.index}return pb=t,pb}var hb,$P;function bY(){if($P)return hb;$P=1;var e=nd(),t=id(),r=Kn(),n=cL(),o=vY(),i=Qu(),a=mY(),s=ti(),c=Nt();function u(d,p,h){p.length?p=e(p,function(g){return c(g)?function(b){return t(b,g.length===1?g[0]:g)}:g}):p=[s];var v=-1;p=e(p,i(r));var y=n(d,function(g,b,x){var w=e(p,function(E){return E(g)});return{criteria:w,index:++v,value:g}});return o(y,function(g,b){return a(g,b,h)})}return hb=u,hb}var vb,HP;function yY(){if(HP)return vb;HP=1;var e=C_(),t=bY(),r=ad(),n=sd(),o=r(function(i,a){if(i==null)return[];var s=a.length;return s>1&&n(i,a[0],a[1])?a=[]:s>2&&n(a[0],a[1],a[2])&&(a=[a[0]]),t(i,e(a,1),[])});return vb=o,vb}var gb,VP;function wY(){if(VP)return gb;VP=1;var e=rL(),t=0;function r(n){var o=++t;return e(n)+o}return gb=r,gb}var mb,WP;function xY(){if(WP)return mb;WP=1;function e(t,r,n){for(var o=-1,i=t.length,a=r.length,s={};++o<i;){var c=o<a?r[o]:void 0;n(s,t[o],c)}return s}return mb=e,mb}var bb,UP;function _Y(){if(UP)return bb;UP=1;var e=Zu(),t=xY();function r(n,o){return t(n||[],o||[],e)}return bb=r,bb}var yb,GP;function yt(){if(GP)return yb;GP=1;var e;if(typeof d_=="function")try{e={cloneDeep:LK(),constant:x_(),defaults:zK(),each:Yq(),filter:aL(),find:UK(),flatten:EL(),forEach:Kq(),forIn:GK(),has:sL(),isUndefined:lL(),last:KK(),map:uL(),mapValues:YK(),max:ZK(),merge:nY(),min:oY(),minBy:iY(),now:aY(),pick:dY(),range:hY(),reduce:dL(),sortBy:yY(),uniqueId:wY(),values:gL(),zipObject:_Y()}}catch{}return e||(e=window._),yb=e,yb}var wb,KP;function EY(){if(KP)return wb;KP=1,wb=e;function e(){var n={};n._next=n._prev=n,this._sentinel=n}e.prototype.dequeue=function(){var n=this._sentinel,o=n._prev;if(o!==n)return t(o),o},e.prototype.enqueue=function(n){var o=this._sentinel;n._prev&&n._next&&t(n),n._next=o._next,o._next._prev=n,o._next=n,n._prev=o},e.prototype.toString=function(){for(var n=[],o=this._sentinel,i=o._prev;i!==o;)n.push(JSON.stringify(i,r)),i=i._prev;return"["+n.join(", ")+"]"};function t(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function r(n,o){if(n!=="_next"&&n!=="_prev")return o}return wb}var xb,YP;function SY(){if(YP)return xb;YP=1;var e=yt(),t=tn().Graph,r=EY();xb=o;var n=e.constant(1);function o(u,d){if(u.nodeCount()<=1)return[];var p=s(u,d||n),h=i(p.graph,p.buckets,p.zeroIdx);return e.flatten(e.map(h,function(v){return u.outEdges(v.v,v.w)}),!0)}function i(u,d,p){for(var h=[],v=d[d.length-1],y=d[0],g;u.nodeCount();){for(;g=y.dequeue();)a(u,d,p,g);for(;g=v.dequeue();)a(u,d,p,g);if(u.nodeCount()){for(var b=d.length-2;b>0;--b)if(g=d[b].dequeue(),g){h=h.concat(a(u,d,p,g,!0));break}}}return h}function a(u,d,p,h,v){var y=v?[]:void 0;return e.forEach(u.inEdges(h.v),function(g){var b=u.edge(g),x=u.node(g.v);v&&y.push({v:g.v,w:g.w}),x.out-=b,c(d,p,x)}),e.forEach(u.outEdges(h.v),function(g){var b=u.edge(g),x=g.w,w=u.node(x);w.in-=b,c(d,p,w)}),u.removeNode(h.v),y}function s(u,d){var p=new t,h=0,v=0;e.forEach(u.nodes(),function(b){p.setNode(b,{v:b,in:0,out:0})}),e.forEach(u.edges(),function(b){var x=p.edge(b.v,b.w)||0,w=d(b),E=x+w;p.setEdge(b.v,b.w,E),v=Math.max(v,p.node(b.v).out+=w),h=Math.max(h,p.node(b.w).in+=w)});var y=e.range(v+h+3).map(function(){return new r}),g=h+1;return e.forEach(p.nodes(),function(b){c(y,g,p.node(b))}),{graph:p,buckets:y,zeroIdx:g}}function c(u,d,p){p.out?p.in?u[p.out-p.in+d].enqueue(p):u[u.length-1].enqueue(p):u[0].enqueue(p)}return xb}var _b,XP;function OY(){if(XP)return _b;XP=1;var e=yt(),t=SY();_b={run:r,undo:o};function r(i){var a=i.graph().acyclicer==="greedy"?t(i,s(i)):n(i);e.forEach(a,function(c){var u=i.edge(c);i.removeEdge(c),u.forwardName=c.name,u.reversed=!0,i.setEdge(c.w,c.v,u,e.uniqueId("rev"))});function s(c){return function(u){return c.edge(u).weight}}}function n(i){var a=[],s={},c={};function u(d){e.has(c,d)||(c[d]=!0,s[d]=!0,e.forEach(i.outEdges(d),function(p){e.has(s,p.w)?a.push(p):u(p.w)}),delete s[d])}return e.forEach(i.nodes(),u),a}function o(i){e.forEach(i.edges(),function(a){var s=i.edge(a);if(s.reversed){i.removeEdge(a);var c=s.forwardName;delete s.reversed,delete s.forwardName,i.setEdge(a.w,a.v,s,c)}})}return _b}var Eb,ZP;function ur(){if(ZP)return Eb;ZP=1;var e=yt(),t=tn().Graph;Eb={addDummyNode:r,simplify:n,asNonCompoundGraph:o,successorWeights:i,predecessorWeights:a,intersectRect:s,buildLayerMatrix:c,normalizeRanks:u,removeEmptyRanks:d,addBorderNode:p,maxRank:h,partition:v,time:y,notime:g};function r(b,x,w,E){var S;do S=e.uniqueId(E);while(b.hasNode(S));return w.dummy=x,b.setNode(S,w),S}function n(b){var x=new t().setGraph(b.graph());return e.forEach(b.nodes(),function(w){x.setNode(w,b.node(w))}),e.forEach(b.edges(),function(w){var E=x.edge(w.v,w.w)||{weight:0,minlen:1},S=b.edge(w);x.setEdge(w.v,w.w,{weight:E.weight+S.weight,minlen:Math.max(E.minlen,S.minlen)})}),x}function o(b){var x=new t({multigraph:b.isMultigraph()}).setGraph(b.graph());return e.forEach(b.nodes(),function(w){b.children(w).length||x.setNode(w,b.node(w))}),e.forEach(b.edges(),function(w){x.setEdge(w,b.edge(w))}),x}function i(b){var x=e.map(b.nodes(),function(w){var E={};return e.forEach(b.outEdges(w),function(S){E[S.w]=(E[S.w]||0)+b.edge(S).weight}),E});return e.zipObject(b.nodes(),x)}function a(b){var x=e.map(b.nodes(),function(w){var E={};return e.forEach(b.inEdges(w),function(S){E[S.v]=(E[S.v]||0)+b.edge(S).weight}),E});return e.zipObject(b.nodes(),x)}function s(b,x){var w=b.x,E=b.y,S=x.x-w,_=x.y-E,O=b.width/2,N=b.height/2;if(!S&&!_)throw new Error("Not possible to find intersection inside of the rectangle");var R,A;return Math.abs(_)*O>Math.abs(S)*N?(_<0&&(N=-N),R=N*S/_,A=N):(S<0&&(O=-O),R=O,A=O*_/S),{x:w+R,y:E+A}}function c(b){var x=e.map(e.range(h(b)+1),function(){return[]});return e.forEach(b.nodes(),function(w){var E=b.node(w),S=E.rank;e.isUndefined(S)||(x[S][E.order]=w)}),x}function u(b){var x=e.min(e.map(b.nodes(),function(w){return b.node(w).rank}));e.forEach(b.nodes(),function(w){var E=b.node(w);e.has(E,"rank")&&(E.rank-=x)})}function d(b){var x=e.min(e.map(b.nodes(),function(_){return b.node(_).rank})),w=[];e.forEach(b.nodes(),function(_){var O=b.node(_).rank-x;w[O]||(w[O]=[]),w[O].push(_)});var E=0,S=b.graph().nodeRankFactor;e.forEach(w,function(_,O){e.isUndefined(_)&&O%S!==0?--E:E&&e.forEach(_,function(N){b.node(N).rank+=E})})}function p(b,x,w,E){var S={width:0,height:0};return arguments.length>=4&&(S.rank=w,S.order=E),r(b,"border",S,x)}function h(b){return e.max(e.map(b.nodes(),function(x){var w=b.node(x).rank;if(!e.isUndefined(w))return w}))}function v(b,x){var w={lhs:[],rhs:[]};return e.forEach(b,function(E){x(E)?w.lhs.push(E):w.rhs.push(E)}),w}function y(b,x){var w=e.now();try{return x()}finally{console.log(b+" time: "+(e.now()-w)+"ms")}}function g(b,x){return x()}return Eb}var Sb,JP;function CY(){if(JP)return Sb;JP=1;var e=yt(),t=ur();Sb={run:r,undo:o};function r(i){i.graph().dummyChains=[],e.forEach(i.edges(),function(a){n(i,a)})}function n(i,a){var s=a.v,c=i.node(s).rank,u=a.w,d=i.node(u).rank,p=a.name,h=i.edge(a),v=h.labelRank;if(d!==c+1){i.removeEdge(a);var y,g,b;for(b=0,++c;c<d;++b,++c)h.points=[],g={width:0,height:0,edgeLabel:h,edgeObj:a,rank:c},y=t.addDummyNode(i,"edge",g,"_d"),c===v&&(g.width=h.width,g.height=h.height,g.dummy="edge-label",g.labelpos=h.labelpos),i.setEdge(s,y,{weight:h.weight},p),b===0&&i.graph().dummyChains.push(y),s=y;i.setEdge(s,u,{weight:h.weight},p)}}function o(i){e.forEach(i.graph().dummyChains,function(a){var s=i.node(a),c=s.edgeLabel,u;for(i.setEdge(s.edgeObj,c);s.dummy;)u=i.successors(a)[0],i.removeNode(a),c.points.push({x:s.x,y:s.y}),s.dummy==="edge-label"&&(c.x=s.x,c.y=s.y,c.width=s.width,c.height=s.height),a=u,s=i.node(a)})}return Sb}var Ob,QP;function uu(){if(QP)return Ob;QP=1;var e=yt();Ob={longestPath:t,slack:r};function t(n){var o={};function i(a){var s=n.node(a);if(e.has(o,a))return s.rank;o[a]=!0;var c=e.min(e.map(n.outEdges(a),function(u){return i(u.w)-n.edge(u).minlen}));return(c===Number.POSITIVE_INFINITY||c===void 0||c===null)&&(c=0),s.rank=c}e.forEach(n.sources(),i)}function r(n,o){return n.node(o.w).rank-n.node(o.v).rank-n.edge(o).minlen}return Ob}var Cb,eT;function IL(){if(eT)return Cb;eT=1;var e=yt(),t=tn().Graph,r=uu().slack;Cb=n;function n(s){var c=new t({directed:!1}),u=s.nodes()[0],d=s.nodeCount();c.setNode(u,{});for(var p,h;o(c,s)<d;)p=i(c,s),h=c.hasNode(p.v)?r(s,p):-r(s,p),a(c,s,h);return c}function o(s,c){function u(d){e.forEach(c.nodeEdges(d),function(p){var h=p.v,v=d===h?p.w:h;!s.hasNode(v)&&!r(c,p)&&(s.setNode(v,{}),s.setEdge(d,v,{}),u(v))})}return e.forEach(s.nodes(),u),s.nodeCount()}function i(s,c){return e.minBy(c.edges(),function(u){if(s.hasNode(u.v)!==s.hasNode(u.w))return r(c,u)})}function a(s,c,u){e.forEach(s.nodes(),function(d){c.node(d).rank+=u})}return Cb}var Ib,tT;function IY(){if(tT)return Ib;tT=1;var e=yt(),t=IL(),r=uu().slack,n=uu().longestPath,o=tn().alg.preorder,i=tn().alg.postorder,a=ur().simplify;Ib=s,s.initLowLimValues=p,s.initCutValues=c,s.calcCutValue=d,s.leaveEdge=v,s.enterEdge=y,s.exchangeEdges=g;function s(E){E=a(E),n(E);var S=t(E);p(S),c(S,E);for(var _,O;_=v(S);)O=y(S,E,_),g(S,E,_,O)}function c(E,S){var _=i(E,E.nodes());_=_.slice(0,_.length-1),e.forEach(_,function(O){u(E,S,O)})}function u(E,S,_){var O=E.node(_),N=O.parent;E.edge(_,N).cutvalue=d(E,S,_)}function d(E,S,_){var O=E.node(_),N=O.parent,R=!0,A=S.edge(_,N),D=0;return A||(R=!1,A=S.edge(N,_)),D=A.weight,e.forEach(S.nodeEdges(_),function(B){var j=B.v===_,M=j?B.w:B.v;if(M!==N){var P=j===R,V=S.edge(B).weight;if(D+=P?V:-V,x(E,_,M)){var q=E.edge(_,M).cutvalue;D+=P?-q:q}}}),D}function p(E,S){arguments.length<2&&(S=E.nodes()[0]),h(E,{},1,S)}function h(E,S,_,O,N){var R=_,A=E.node(O);return S[O]=!0,e.forEach(E.neighbors(O),function(D){e.has(S,D)||(_=h(E,S,_,D,O))}),A.low=R,A.lim=_++,N?A.parent=N:delete A.parent,_}function v(E){return e.find(E.edges(),function(S){return E.edge(S).cutvalue<0})}function y(E,S,_){var O=_.v,N=_.w;S.hasEdge(O,N)||(O=_.w,N=_.v);var R=E.node(O),A=E.node(N),D=R,B=!1;R.lim>A.lim&&(D=A,B=!0);var j=e.filter(S.edges(),function(M){return B===w(E,E.node(M.v),D)&&B!==w(E,E.node(M.w),D)});return e.minBy(j,function(M){return r(S,M)})}function g(E,S,_,O){var N=_.v,R=_.w;E.removeEdge(N,R),E.setEdge(O.v,O.w,{}),p(E),c(E,S),b(E,S)}function b(E,S){var _=e.find(E.nodes(),function(N){return!S.node(N).parent}),O=o(E,_);O=O.slice(1),e.forEach(O,function(N){var R=E.node(N).parent,A=S.edge(N,R),D=!1;A||(A=S.edge(R,N),D=!0),S.node(N).rank=S.node(R).rank+(D?A.minlen:-A.minlen)})}function x(E,S,_){return E.hasEdge(S,_)}function w(E,S,_){return _.low<=S.lim&&S.lim<=_.lim}return Ib}var Rb,rT;function RY(){if(rT)return Rb;rT=1;var e=uu(),t=e.longestPath,r=IL(),n=IY();Rb=o;function o(c){switch(c.graph().ranker){case"network-simplex":s(c);break;case"tight-tree":a(c);break;case"longest-path":i(c);break;default:s(c)}}var i=t;function a(c){t(c),r(c)}function s(c){n(c)}return Rb}var Nb,nT;function NY(){if(nT)return Nb;nT=1;var e=yt();Nb=t;function t(o){var i=n(o);e.forEach(o.graph().dummyChains,function(a){for(var s=o.node(a),c=s.edgeObj,u=r(o,i,c.v,c.w),d=u.path,p=u.lca,h=0,v=d[h],y=!0;a!==c.w;){if(s=o.node(a),y){for(;(v=d[h])!==p&&o.node(v).maxRank<s.rank;)h++;v===p&&(y=!1)}if(!y){for(;h<d.length-1&&o.node(v=d[h+1]).minRank<=s.rank;)h++;v=d[h]}o.setParent(a,v),a=o.successors(a)[0]}})}function r(o,i,a,s){var c=[],u=[],d=Math.min(i[a].low,i[s].low),p=Math.max(i[a].lim,i[s].lim),h,v;h=a;do h=o.parent(h),c.push(h);while(h&&(i[h].low>d||p>i[h].lim));for(v=h,h=s;(h=o.parent(h))!==v;)u.push(h);return{path:c.concat(u.reverse()),lca:v}}function n(o){var i={},a=0;function s(c){var u=a;e.forEach(o.children(c),s),i[c]={low:u,lim:a++}}return e.forEach(o.children(),s),i}return Nb}var Pb,oT;function PY(){if(oT)return Pb;oT=1;var e=yt(),t=ur();Pb={run:r,cleanup:a};function r(s){var c=t.addDummyNode(s,"root",{},"_root"),u=o(s),d=e.max(e.values(u))-1,p=2*d+1;s.graph().nestingRoot=c,e.forEach(s.edges(),function(v){s.edge(v).minlen*=p});var h=i(s)+1;e.forEach(s.children(),function(v){n(s,c,p,h,d,u,v)}),s.graph().nodeRankFactor=p}function n(s,c,u,d,p,h,v){var y=s.children(v);if(!y.length){v!==c&&s.setEdge(c,v,{weight:0,minlen:u});return}var g=t.addBorderNode(s,"_bt"),b=t.addBorderNode(s,"_bb"),x=s.node(v);s.setParent(g,v),x.borderTop=g,s.setParent(b,v),x.borderBottom=b,e.forEach(y,function(w){n(s,c,u,d,p,h,w);var E=s.node(w),S=E.borderTop?E.borderTop:w,_=E.borderBottom?E.borderBottom:w,O=E.borderTop?d:2*d,N=S!==_?1:p-h[v]+1;s.setEdge(g,S,{weight:O,minlen:N,nestingEdge:!0}),s.setEdge(_,b,{weight:O,minlen:N,nestingEdge:!0})}),s.parent(v)||s.setEdge(c,g,{weight:0,minlen:p+h[v]})}function o(s){var c={};function u(d,p){var h=s.children(d);h&&h.length&&e.forEach(h,function(v){u(v,p+1)}),c[d]=p}return e.forEach(s.children(),function(d){u(d,1)}),c}function i(s){return e.reduce(s.edges(),function(c,u){return c+s.edge(u).weight},0)}function a(s){var c=s.graph();s.removeNode(c.nestingRoot),delete c.nestingRoot,e.forEach(s.edges(),function(u){var d=s.edge(u);d.nestingEdge&&s.removeEdge(u)})}return Pb}var Tb,iT;function TY(){if(iT)return Tb;iT=1;var e=yt(),t=ur();Tb=r;function r(o){function i(a){var s=o.children(a),c=o.node(a);if(s.length&&e.forEach(s,i),e.has(c,"minRank")){c.borderLeft=[],c.borderRight=[];for(var u=c.minRank,d=c.maxRank+1;u<d;++u)n(o,"borderLeft","_bl",a,c,u),n(o,"borderRight","_br",a,c,u)}}e.forEach(o.children(),i)}function n(o,i,a,s,c,u){var d={width:0,height:0,rank:u,borderType:i},p=c[i][u-1],h=t.addDummyNode(o,"border",d,a);c[i][u]=h,o.setParent(h,s),p&&o.setEdge(p,h,{weight:1})}return Tb}var Ab,aT;function AY(){if(aT)return Ab;aT=1;var e=yt();Ab={adjust:t,undo:r};function t(u){var d=u.graph().rankdir.toLowerCase();(d==="lr"||d==="rl")&&n(u)}function r(u){var d=u.graph().rankdir.toLowerCase();(d==="bt"||d==="rl")&&i(u),(d==="lr"||d==="rl")&&(s(u),n(u))}function n(u){e.forEach(u.nodes(),function(d){o(u.node(d))}),e.forEach(u.edges(),function(d){o(u.edge(d))})}function o(u){var d=u.width;u.width=u.height,u.height=d}function i(u){e.forEach(u.nodes(),function(d){a(u.node(d))}),e.forEach(u.edges(),function(d){var p=u.edge(d);e.forEach(p.points,a),e.has(p,"y")&&a(p)})}function a(u){u.y=-u.y}function s(u){e.forEach(u.nodes(),function(d){c(u.node(d))}),e.forEach(u.edges(),function(d){var p=u.edge(d);e.forEach(p.points,c),e.has(p,"x")&&c(p)})}function c(u){var d=u.x;u.x=u.y,u.y=d}return Ab}var kb,sT;function kY(){if(sT)return kb;sT=1;var e=yt();kb=t;function t(r){var n={},o=e.filter(r.nodes(),function(u){return!r.children(u).length}),i=e.max(e.map(o,function(u){return r.node(u).rank})),a=e.map(e.range(i+1),function(){return[]});function s(u){if(!e.has(n,u)){n[u]=!0;var d=r.node(u);a[d.rank].push(u),e.forEach(r.successors(u),s)}}var c=e.sortBy(o,function(u){return r.node(u).rank});return e.forEach(c,s),a}return kb}var Mb,lT;function MY(){if(lT)return Mb;lT=1;var e=yt();Mb=t;function t(n,o){for(var i=0,a=1;a<o.length;++a)i+=r(n,o[a-1],o[a]);return i}function r(n,o,i){for(var a=e.zipObject(i,e.map(i,function(h,v){return v})),s=e.flatten(e.map(o,function(h){return e.sortBy(e.map(n.outEdges(h),function(v){return{pos:a[v.w],weight:n.edge(v).weight}}),"pos")}),!0),c=1;c<i.length;)c<<=1;var u=2*c-1;c-=1;var d=e.map(new Array(u),function(){return 0}),p=0;return e.forEach(s.forEach(function(h){var v=h.pos+c;d[v]+=h.weight;for(var y=0;v>0;)v%2&&(y+=d[v+1]),v=v-1>>1,d[v]+=h.weight;p+=h.weight*y})),p}return Mb}var Db,cT;function DY(){if(cT)return Db;cT=1;var e=yt();Db=t;function t(r,n){return e.map(n,function(o){var i=r.inEdges(o);if(i.length){var a=e.reduce(i,function(s,c){var u=r.edge(c),d=r.node(c.v);return{sum:s.sum+u.weight*d.order,weight:s.weight+u.weight}},{sum:0,weight:0});return{v:o,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:o}})}return Db}var jb,uT;function jY(){if(uT)return jb;uT=1;var e=yt();jb=t;function t(o,i){var a={};e.forEach(o,function(c,u){var d=a[c.v]={indegree:0,in:[],out:[],vs:[c.v],i:u};e.isUndefined(c.barycenter)||(d.barycenter=c.barycenter,d.weight=c.weight)}),e.forEach(i.edges(),function(c){var u=a[c.v],d=a[c.w];!e.isUndefined(u)&&!e.isUndefined(d)&&(d.indegree++,u.out.push(a[c.w]))});var s=e.filter(a,function(c){return!c.indegree});return r(s)}function r(o){var i=[];function a(u){return function(d){d.merged||(e.isUndefined(d.barycenter)||e.isUndefined(u.barycenter)||d.barycenter>=u.barycenter)&&n(u,d)}}function s(u){return function(d){d.in.push(u),--d.indegree===0&&o.push(d)}}for(;o.length;){var c=o.pop();i.push(c),e.forEach(c.in.reverse(),a(c)),e.forEach(c.out,s(c))}return e.map(e.filter(i,function(u){return!u.merged}),function(u){return e.pick(u,["vs","i","barycenter","weight"])})}function n(o,i){var a=0,s=0;o.weight&&(a+=o.barycenter*o.weight,s+=o.weight),i.weight&&(a+=i.barycenter*i.weight,s+=i.weight),o.vs=i.vs.concat(o.vs),o.barycenter=a/s,o.weight=s,o.i=Math.min(i.i,o.i),i.merged=!0}return jb}var qb,dT;function qY(){if(dT)return qb;dT=1;var e=yt(),t=ur();qb=r;function r(i,a){var s=t.partition(i,function(g){return e.has(g,"barycenter")}),c=s.lhs,u=e.sortBy(s.rhs,function(g){return-g.i}),d=[],p=0,h=0,v=0;c.sort(o(!!a)),v=n(d,u,v),e.forEach(c,function(g){v+=g.vs.length,d.push(g.vs),p+=g.barycenter*g.weight,h+=g.weight,v=n(d,u,v)});var y={vs:e.flatten(d,!0)};return h&&(y.barycenter=p/h,y.weight=h),y}function n(i,a,s){for(var c;a.length&&(c=e.last(a)).i<=s;)a.pop(),i.push(c.vs),s++;return s}function o(i){return function(a,s){return a.barycenter<s.barycenter?-1:a.barycenter>s.barycenter?1:i?s.i-a.i:a.i-s.i}}return qb}var Lb,fT;function LY(){if(fT)return Lb;fT=1;var e=yt(),t=DY(),r=jY(),n=qY();Lb=o;function o(s,c,u,d){var p=s.children(c),h=s.node(c),v=h?h.borderLeft:void 0,y=h?h.borderRight:void 0,g={};v&&(p=e.filter(p,function(_){return _!==v&&_!==y}));var b=t(s,p);e.forEach(b,function(_){if(s.children(_.v).length){var O=o(s,_.v,u,d);g[_.v]=O,e.has(O,"barycenter")&&a(_,O)}});var x=r(b,u);i(x,g);var w=n(x,d);if(v&&(w.vs=e.flatten([v,w.vs,y],!0),s.predecessors(v).length)){var E=s.node(s.predecessors(v)[0]),S=s.node(s.predecessors(y)[0]);e.has(w,"barycenter")||(w.barycenter=0,w.weight=0),w.barycenter=(w.barycenter*w.weight+E.order+S.order)/(w.weight+2),w.weight+=2}return w}function i(s,c){e.forEach(s,function(u){u.vs=e.flatten(u.vs.map(function(d){return c[d]?c[d].vs:d}),!0)})}function a(s,c){e.isUndefined(s.barycenter)?(s.barycenter=c.barycenter,s.weight=c.weight):(s.barycenter=(s.barycenter*s.weight+c.barycenter*c.weight)/(s.weight+c.weight),s.weight+=c.weight)}return Lb}var zb,pT;function zY(){if(pT)return zb;pT=1;var e=yt(),t=tn().Graph;zb=r;function r(o,i,a){var s=n(o),c=new t({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(u){return o.node(u)});return e.forEach(o.nodes(),function(u){var d=o.node(u),p=o.parent(u);(d.rank===i||d.minRank<=i&&i<=d.maxRank)&&(c.setNode(u),c.setParent(u,p||s),e.forEach(o[a](u),function(h){var v=h.v===u?h.w:h.v,y=c.edge(v,u),g=e.isUndefined(y)?0:y.weight;c.setEdge(v,u,{weight:o.edge(h).weight+g})}),e.has(d,"minRank")&&c.setNode(u,{borderLeft:d.borderLeft[i],borderRight:d.borderRight[i]}))}),c}function n(o){for(var i;o.hasNode(i=e.uniqueId("_root")););return i}return zb}var Bb,hT;function BY(){if(hT)return Bb;hT=1;var e=yt();Bb=t;function t(r,n,o){var i={},a;e.forEach(o,function(s){for(var c=r.parent(s),u,d;c;){if(u=r.parent(c),u?(d=i[u],i[u]=c):(d=a,a=c),d&&d!==c){n.setEdge(d,c);return}c=u}})}return Bb}var Fb,vT;function FY(){if(vT)return Fb;vT=1;var e=yt(),t=kY(),r=MY(),n=LY(),o=zY(),i=BY(),a=tn().Graph,s=ur();Fb=c;function c(h){var v=s.maxRank(h),y=u(h,e.range(1,v+1),"inEdges"),g=u(h,e.range(v-1,-1,-1),"outEdges"),b=t(h);p(h,b);for(var x=Number.POSITIVE_INFINITY,w,E=0,S=0;S<4;++E,++S){d(E%2?y:g,E%4>=2),b=s.buildLayerMatrix(h);var _=r(h,b);_<x&&(S=0,w=e.cloneDeep(b),x=_)}p(h,w)}function u(h,v,y){return e.map(v,function(g){return o(h,g,y)})}function d(h,v){var y=new a;e.forEach(h,function(g){var b=g.graph().root,x=n(g,b,y,v);e.forEach(x.vs,function(w,E){g.node(w).order=E}),i(g,y,x.vs)})}function p(h,v){e.forEach(v,function(y){e.forEach(y,function(g,b){h.node(g).order=b})})}return Fb}var $b,gT;function $Y(){if(gT)return $b;gT=1;var e=yt(),t=tn().Graph,r=ur();$b={positionX:y,findType1Conflicts:n,findType2Conflicts:o,addConflict:a,hasConflict:s,verticalAlignment:c,horizontalCompaction:u,alignCoordinates:h,findSmallestWidthAlignment:p,balance:v};function n(x,w){var E={};function S(_,O){var N=0,R=0,A=_.length,D=e.last(O);return e.forEach(O,function(B,j){var M=i(x,B),P=M?x.node(M).order:A;(M||B===D)&&(e.forEach(O.slice(R,j+1),function(V){e.forEach(x.predecessors(V),function(q){var G=x.node(q),W=G.order;(W<N||P<W)&&!(G.dummy&&x.node(V).dummy)&&a(E,q,V)})}),R=j+1,N=P)}),O}return e.reduce(w,S),E}function o(x,w){var E={};function S(O,N,R,A,D){var B;e.forEach(e.range(N,R),function(j){B=O[j],x.node(B).dummy&&e.forEach(x.predecessors(B),function(M){var P=x.node(M);P.dummy&&(P.order<A||P.order>D)&&a(E,M,B)})})}function _(O,N){var R=-1,A,D=0;return e.forEach(N,function(B,j){if(x.node(B).dummy==="border"){var M=x.predecessors(B);M.length&&(A=x.node(M[0]).order,S(N,D,j,R,A),D=j,R=A)}S(N,D,N.length,A,O.length)}),N}return e.reduce(w,_),E}function i(x,w){if(x.node(w).dummy)return e.find(x.predecessors(w),function(E){return x.node(E).dummy})}function a(x,w,E){if(w>E){var S=w;w=E,E=S}var _=x[w];_||(x[w]=_={}),_[E]=!0}function s(x,w,E){if(w>E){var S=w;w=E,E=S}return e.has(x[w],E)}function c(x,w,E,S){var _={},O={},N={};return e.forEach(w,function(R){e.forEach(R,function(A,D){_[A]=A,O[A]=A,N[A]=D})}),e.forEach(w,function(R){var A=-1;e.forEach(R,function(D){var B=S(D);if(B.length){B=e.sortBy(B,function(q){return N[q]});for(var j=(B.length-1)/2,M=Math.floor(j),P=Math.ceil(j);M<=P;++M){var V=B[M];O[D]===D&&A<N[V]&&!s(E,D,V)&&(O[V]=D,O[D]=_[D]=_[V],A=N[V])}}})}),{root:_,align:O}}function u(x,w,E,S,_){var O={},N=d(x,w,E,_),R=_?"borderLeft":"borderRight";function A(j,M){for(var P=N.nodes(),V=P.pop(),q={};V;)q[V]?j(V):(q[V]=!0,P.push(V),P=P.concat(M(V))),V=P.pop()}function D(j){O[j]=N.inEdges(j).reduce(function(M,P){return Math.max(M,O[P.v]+N.edge(P))},0)}function B(j){var M=N.outEdges(j).reduce(function(V,q){return Math.min(V,O[q.w]-N.edge(q))},Number.POSITIVE_INFINITY),P=x.node(j);M!==Number.POSITIVE_INFINITY&&P.borderType!==R&&(O[j]=Math.max(O[j],M))}return A(D,N.predecessors.bind(N)),A(B,N.successors.bind(N)),e.forEach(S,function(j){O[j]=O[E[j]]}),O}function d(x,w,E,S){var _=new t,O=x.graph(),N=g(O.nodesep,O.edgesep,S);return e.forEach(w,function(R){var A;e.forEach(R,function(D){var B=E[D];if(_.setNode(B),A){var j=E[A],M=_.edge(j,B);_.setEdge(j,B,Math.max(N(x,D,A),M||0))}A=D})}),_}function p(x,w){return e.minBy(e.values(w),function(E){var S=Number.NEGATIVE_INFINITY,_=Number.POSITIVE_INFINITY;return e.forIn(E,function(O,N){var R=b(x,N)/2;S=Math.max(O+R,S),_=Math.min(O-R,_)}),S-_})}function h(x,w){var E=e.values(w),S=e.min(E),_=e.max(E);e.forEach(["u","d"],function(O){e.forEach(["l","r"],function(N){var R=O+N,A=x[R],D;if(A!==w){var B=e.values(A);D=N==="l"?S-e.min(B):_-e.max(B),D&&(x[R]=e.mapValues(A,function(j){return j+D}))}})})}function v(x,w){return e.mapValues(x.ul,function(E,S){if(w)return x[w.toLowerCase()][S];var _=e.sortBy(e.map(x,S));return(_[1]+_[2])/2})}function y(x){var w=r.buildLayerMatrix(x),E=e.merge(n(x,w),o(x,w)),S={},_;e.forEach(["u","d"],function(N){_=N==="u"?w:e.values(w).reverse(),e.forEach(["l","r"],function(R){R==="r"&&(_=e.map(_,function(j){return e.values(j).reverse()}));var A=(N==="u"?x.predecessors:x.successors).bind(x),D=c(x,_,E,A),B=u(x,_,D.root,D.align,R==="r");R==="r"&&(B=e.mapValues(B,function(j){return-j})),S[N+R]=B})});var O=p(x,S);return h(S,O),v(S,x.graph().align)}function g(x,w,E){return function(S,_,O){var N=S.node(_),R=S.node(O),A=0,D;if(A+=N.width/2,e.has(N,"labelpos"))switch(N.labelpos.toLowerCase()){case"l":D=-N.width/2;break;case"r":D=N.width/2;break}if(D&&(A+=E?D:-D),D=0,A+=(N.dummy?w:x)/2,A+=(R.dummy?w:x)/2,A+=R.width/2,e.has(R,"labelpos"))switch(R.labelpos.toLowerCase()){case"l":D=R.width/2;break;case"r":D=-R.width/2;break}return D&&(A+=E?D:-D),D=0,A}}function b(x,w){return x.node(w).width}return $b}var Hb,mT;function HY(){if(mT)return Hb;mT=1;var e=yt(),t=ur(),r=$Y().positionX;Hb=n;function n(i){i=t.asNonCompoundGraph(i),o(i),e.forEach(r(i),function(a,s){i.node(s).x=a})}function o(i){var a=t.buildLayerMatrix(i),s=i.graph().ranksep,c=0;e.forEach(a,function(u){var d=e.max(e.map(u,function(p){return i.node(p).height}));e.forEach(u,function(p){i.node(p).y=c+d/2}),c+=d+s})}return Hb}var Vb,bT;function VY(){if(bT)return Vb;bT=1;var e=yt(),t=OY(),r=CY(),n=RY(),o=ur().normalizeRanks,i=NY(),a=ur().removeEmptyRanks,s=PY(),c=TY(),u=AY(),d=FY(),p=HY(),h=ur(),v=tn().Graph;Vb=y;function y($,K){var Z=K&&K.debugTiming?h.time:h.notime;Z("layout",function(){var H=Z(" buildLayoutGraph",function(){return A($)});Z(" runLayout",function(){g(H,Z)}),Z(" updateInputGraph",function(){b($,H)})})}function g($,K){K(" makeSpaceForEdgeLabels",function(){D($)}),K(" removeSelfEdges",function(){Q($)}),K(" acyclic",function(){t.run($)}),K(" nestingGraph.run",function(){s.run($)}),K(" rank",function(){n(h.asNonCompoundGraph($))}),K(" injectEdgeLabelProxies",function(){B($)}),K(" removeEmptyRanks",function(){a($)}),K(" nestingGraph.cleanup",function(){s.cleanup($)}),K(" normalizeRanks",function(){o($)}),K(" assignRankMinMax",function(){j($)}),K(" removeEdgeLabelProxies",function(){M($)}),K(" normalize.run",function(){r.run($)}),K(" parentDummyChains",function(){i($)}),K(" addBorderSegments",function(){c($)}),K(" order",function(){d($)}),K(" insertSelfEdges",function(){z($)}),K(" adjustCoordinateSystem",function(){u.adjust($)}),K(" position",function(){p($)}),K(" positionSelfEdges",function(){U($)}),K(" removeBorderNodes",function(){W($)}),K(" normalize.undo",function(){r.undo($)}),K(" fixupEdgeLabelCoords",function(){q($)}),K(" undoCoordinateSystem",function(){u.undo($)}),K(" translateGraph",function(){P($)}),K(" assignNodeIntersects",function(){V($)}),K(" reversePoints",function(){G($)}),K(" acyclic.undo",function(){t.undo($)})}function b($,K){e.forEach($.nodes(),function(Z){var H=$.node(Z),Y=K.node(Z);H&&(H.x=Y.x,H.y=Y.y,K.children(Z).length&&(H.width=Y.width,H.height=Y.height))}),e.forEach($.edges(),function(Z){var H=$.edge(Z),Y=K.edge(Z);H.points=Y.points,e.has(Y,"x")&&(H.x=Y.x,H.y=Y.y)}),$.graph().width=K.graph().width,$.graph().height=K.graph().height}var x=["nodesep","edgesep","ranksep","marginx","marginy"],w={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},E=["acyclicer","ranker","rankdir","align"],S=["width","height"],_={width:0,height:0},O=["minlen","weight","width","height","labeloffset"],N={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},R=["labelpos"];function A($){var K=new v({multigraph:!0,compound:!0}),Z=te($.graph());return K.setGraph(e.merge({},w,ie(Z,x),e.pick(Z,E))),e.forEach($.nodes(),function(H){var Y=te($.node(H));K.setNode(H,e.defaults(ie(Y,S),_)),K.setParent(H,$.parent(H))}),e.forEach($.edges(),function(H){var Y=te($.edge(H));K.setEdge(H,e.merge({},N,ie(Y,O),e.pick(Y,R)))}),K}function D($){var K=$.graph();K.ranksep/=2,e.forEach($.edges(),function(Z){var H=$.edge(Z);H.minlen*=2,H.labelpos.toLowerCase()!=="c"&&(K.rankdir==="TB"||K.rankdir==="BT"?H.width+=H.labeloffset:H.height+=H.labeloffset)})}function B($){e.forEach($.edges(),function(K){var Z=$.edge(K);if(Z.width&&Z.height){var H=$.node(K.v),Y=$.node(K.w),oe={rank:(Y.rank-H.rank)/2+H.rank,e:K};h.addDummyNode($,"edge-proxy",oe,"_ep")}})}function j($){var K=0;e.forEach($.nodes(),function(Z){var H=$.node(Z);H.borderTop&&(H.minRank=$.node(H.borderTop).rank,H.maxRank=$.node(H.borderBottom).rank,K=e.max(K,H.maxRank))}),$.graph().maxRank=K}function M($){e.forEach($.nodes(),function(K){var Z=$.node(K);Z.dummy==="edge-proxy"&&($.edge(Z.e).labelRank=Z.rank,$.removeNode(K))})}function P($){var K=Number.POSITIVE_INFINITY,Z=0,H=Number.POSITIVE_INFINITY,Y=0,oe=$.graph(),re=oe.marginx||0,se=oe.marginy||0;function ee(we){var ve=we.x,Ee=we.y,pe=we.width,ce=we.height;K=Math.min(K,ve-pe/2),Z=Math.max(Z,ve+pe/2),H=Math.min(H,Ee-ce/2),Y=Math.max(Y,Ee+ce/2)}e.forEach($.nodes(),function(we){ee($.node(we))}),e.forEach($.edges(),function(we){var ve=$.edge(we);e.has(ve,"x")&&ee(ve)}),K-=re,H-=se,e.forEach($.nodes(),function(we){var ve=$.node(we);ve.x-=K,ve.y-=H}),e.forEach($.edges(),function(we){var ve=$.edge(we);e.forEach(ve.points,function(Ee){Ee.x-=K,Ee.y-=H}),e.has(ve,"x")&&(ve.x-=K),e.has(ve,"y")&&(ve.y-=H)}),oe.width=Z-K+re,oe.height=Y-H+se}function V($){e.forEach($.edges(),function(K){var Z=$.edge(K),H=$.node(K.v),Y=$.node(K.w),oe,re;Z.points?(oe=Z.points[0],re=Z.points[Z.points.length-1]):(Z.points=[],oe=Y,re=H),Z.points.unshift(h.intersectRect(H,oe)),Z.points.push(h.intersectRect(Y,re))})}function q($){e.forEach($.edges(),function(K){var Z=$.edge(K);if(e.has(Z,"x"))switch((Z.labelpos==="l"||Z.labelpos==="r")&&(Z.width-=Z.labeloffset),Z.labelpos){case"l":Z.x-=Z.width/2+Z.labeloffset;break;case"r":Z.x+=Z.width/2+Z.labeloffset;break}})}function G($){e.forEach($.edges(),function(K){var Z=$.edge(K);Z.reversed&&Z.points.reverse()})}function W($){e.forEach($.nodes(),function(K){if($.children(K).length){var Z=$.node(K),H=$.node(Z.borderTop),Y=$.node(Z.borderBottom),oe=$.node(e.last(Z.borderLeft)),re=$.node(e.last(Z.borderRight));Z.width=Math.abs(re.x-oe.x),Z.height=Math.abs(Y.y-H.y),Z.x=oe.x+Z.width/2,Z.y=H.y+Z.height/2}}),e.forEach($.nodes(),function(K){$.node(K).dummy==="border"&&$.removeNode(K)})}function Q($){e.forEach($.edges(),function(K){if(K.v===K.w){var Z=$.node(K.v);Z.selfEdges||(Z.selfEdges=[]),Z.selfEdges.push({e:K,label:$.edge(K)}),$.removeEdge(K)}})}function z($){var K=h.buildLayerMatrix($);e.forEach(K,function(Z){var H=0;e.forEach(Z,function(Y,oe){var re=$.node(Y);re.order=oe+H,e.forEach(re.selfEdges,function(se){h.addDummyNode($,"selfedge",{width:se.label.width,height:se.label.height,rank:re.rank,order:oe+ ++H,e:se.e,label:se.label},"_se")}),delete re.selfEdges})})}function U($){e.forEach($.nodes(),function(K){var Z=$.node(K);if(Z.dummy==="selfedge"){var H=$.node(Z.e.v),Y=H.x+H.width/2,oe=H.y,re=Z.x-Y,se=H.height/2;$.setEdge(Z.e,Z.label),$.removeNode(K),Z.label.points=[{x:Y+2*re/3,y:oe-se},{x:Y+5*re/6,y:oe-se},{x:Y+re,y:oe},{x:Y+5*re/6,y:oe+se},{x:Y+2*re/3,y:oe+se}],Z.label.x=Z.x,Z.label.y=Z.y}})}function ie($,K){return e.mapValues(e.pick($,K),Number)}function te($){var K={};return e.forEach($,function(Z,H){K[H.toLowerCase()]=Z}),K}return Vb}var Wb,yT;function WY(){if(yT)return Wb;yT=1;var e=yt(),t=ur(),r=tn().Graph;Wb={debugOrdering:n};function n(o){var i=t.buildLayerMatrix(o),a=new r({compound:!0,multigraph:!0}).setGraph({});return e.forEach(o.nodes(),function(s){a.setNode(s,{label:s}),a.setParent(s,"layer"+o.node(s).rank)}),e.forEach(o.edges(),function(s){a.setEdge(s.v,s.w,{},s.name)}),e.forEach(i,function(s,c){var u="layer"+c;a.setNode(u,{rank:"same"}),e.reduce(s,function(d,p){return a.setEdge(d,p,{style:"invis"}),p})}),a}return Wb}var Ub,wT;function UY(){return wT||(wT=1,Ub="0.8.5"),Ub}var Gb,xT;function GY(){return xT||(xT=1,Gb={graphlib:tn(),layout:VY(),debug:WY(),util:{time:ur().time,notime:ur().notime},version:UY()}),Gb}var KY=GY();const _T=wo(KY);function YY(e){let t;const r=new Set,n=(u,d)=>{const p=typeof u=="function"?u(t):u;if(p!==t){const h=t;t=d?p:Object.assign({},t,p),r.forEach(v=>v(t,h))}},o=()=>t,i=(u,d=o,p=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let h=d(t);function v(){const y=d(t);if(!p(h,y)){const g=h;u(h=y,g)}}return r.add(v),()=>r.delete(v)},c={setState:n,getState:o,subscribe:(u,d,p)=>d||p?i(u,d,p):(r.add(u),()=>r.delete(u)),destroy:()=>r.clear()};return t=e(n,o,c),c}const XY=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),ET=XY?T.useEffect:T.useLayoutEffect;function ZY(e){const t=typeof e=="function"?YY(e):e,r=(n=t.getState,o=Object.is)=>{const[,i]=T.useReducer(b=>b+1,0),a=t.getState(),s=T.useRef(a),c=T.useRef(n),u=T.useRef(o),d=T.useRef(!1),p=T.useRef();p.current===void 0&&(p.current=n(a));let h,v=!1;(s.current!==a||c.current!==n||u.current!==o||d.current)&&(h=n(a),v=!o(p.current,h)),ET(()=>{v&&(p.current=h),s.current=a,c.current=n,u.current=o,d.current=!1});const y=T.useRef(a);ET(()=>{const b=()=>{try{const w=t.getState(),E=c.current(w);u.current(p.current,E)||(s.current=w,p.current=E,i())}catch{d.current=!0,i()}},x=t.subscribe(b);return t.getState()!==y.current&&b(),x},[]);const g=v?h:p.current;return T.useDebugValue(g),g};return Object.assign(r,t),r[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const n=[r,t];return{next(){const o=n.length<=0;return{value:n.shift(),done:o}}}},r}function JY(){const e=T.createContext(void 0);return{Provider:({initialStore:o,createStore:i,children:a})=>{const s=T.useRef();return s.current||(o&&(console.warn("Provider initialStore is deprecated and will be removed in the next version."),i||(i=()=>o)),s.current=i()),T.createElement(e.Provider,{value:s.current},a)},useStore:(o,i=Object.is)=>{const a=T.useContext(e);if(!a)throw new Error("Seems like you have not used zustand provider as an ancestor.");return a(o,i)},useStoreApi:()=>{const o=T.useContext(e);if(!o)throw new Error("Seems like you have not used zustand provider as an ancestor.");return T.useMemo(()=>({getState:o.getState,setState:o.setState,subscribe:o.subscribe,destroy:o.destroy}),[o])}}}var QY={value:()=>{}};function ld(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new Yc(r)}function Yc(e){this._=e}function eX(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",o=r.indexOf(".");if(o>=0&&(n=r.slice(o+1),r=r.slice(0,o)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Yc.prototype=ld.prototype={constructor:Yc,on:function(e,t){var r=this._,n=eX(e+"",r),o,i=-1,a=n.length;if(arguments.length<2){for(;++i<a;)if((o=(e=n[i]).type)&&(o=tX(r[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<a;)if(o=(e=n[i]).type)r[o]=ST(r[o],e.name,t);else if(t==null)for(o in r)r[o]=ST(r[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Yc(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var r=new Array(o),n=0,o,i;n<o;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],n=0,o=i.length;n<o;++n)i[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],o=0,i=n.length;o<i;++o)n[o].value.apply(t,r)}};function tX(e,t){for(var r=0,n=e.length,o;r<n;++r)if((o=e[r]).name===t)return o.value}function ST(e,t,r){for(var n=0,o=e.length;n<o;++n)if(e[n].name===t){e[n]=QY,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var vx="http://www.w3.org/1999/xhtml";const OT={svg:"http://www.w3.org/2000/svg",xhtml:vx,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function cd(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),OT.hasOwnProperty(t)?{space:OT[t],local:e}:e}function rX(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===vx&&t.documentElement.namespaceURI===vx?t.createElement(e):t.createElementNS(r,e)}}function nX(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function RL(e){var t=cd(e);return(t.local?nX:rX)(t)}function oX(){}function N_(e){return e==null?oX:function(){return this.querySelector(e)}}function iX(e){typeof e!="function"&&(e=N_(e));for(var t=this._groups,r=t.length,n=new Array(r),o=0;o<r;++o)for(var i=t[o],a=i.length,s=n[o]=new Array(a),c,u,d=0;d<a;++d)(c=i[d])&&(u=e.call(c,c.__data__,d,i))&&("__data__"in c&&(u.__data__=c.__data__),s[d]=u);return new Sr(n,this._parents)}function aX(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function sX(){return[]}function NL(e){return e==null?sX:function(){return this.querySelectorAll(e)}}function lX(e){return function(){return aX(e.apply(this,arguments))}}function cX(e){typeof e=="function"?e=lX(e):e=NL(e);for(var t=this._groups,r=t.length,n=[],o=[],i=0;i<r;++i)for(var a=t[i],s=a.length,c,u=0;u<s;++u)(c=a[u])&&(n.push(e.call(c,c.__data__,u,a)),o.push(c));return new Sr(n,o)}function PL(e){return function(){return this.matches(e)}}function TL(e){return function(t){return t.matches(e)}}var uX=Array.prototype.find;function dX(e){return function(){return uX.call(this.children,e)}}function fX(){return this.firstElementChild}function pX(e){return this.select(e==null?fX:dX(typeof e=="function"?e:TL(e)))}var hX=Array.prototype.filter;function vX(){return Array.from(this.children)}function gX(e){return function(){return hX.call(this.children,e)}}function mX(e){return this.selectAll(e==null?vX:gX(typeof e=="function"?e:TL(e)))}function bX(e){typeof e!="function"&&(e=PL(e));for(var t=this._groups,r=t.length,n=new Array(r),o=0;o<r;++o)for(var i=t[o],a=i.length,s=n[o]=[],c,u=0;u<a;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&s.push(c);return new Sr(n,this._parents)}function AL(e){return new Array(e.length)}function yX(){return new Sr(this._enter||this._groups.map(AL),this._parents)}function du(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}du.prototype={constructor:du,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function wX(e){return function(){return e}}function xX(e,t,r,n,o,i){for(var a=0,s,c=t.length,u=i.length;a<u;++a)(s=t[a])?(s.__data__=i[a],n[a]=s):r[a]=new du(e,i[a]);for(;a<c;++a)(s=t[a])&&(o[a]=s)}function _X(e,t,r,n,o,i,a){var s,c,u=new Map,d=t.length,p=i.length,h=new Array(d),v;for(s=0;s<d;++s)(c=t[s])&&(h[s]=v=a.call(c,c.__data__,s,t)+"",u.has(v)?o[s]=c:u.set(v,c));for(s=0;s<p;++s)v=a.call(e,i[s],s,i)+"",(c=u.get(v))?(n[s]=c,c.__data__=i[s],u.delete(v)):r[s]=new du(e,i[s]);for(s=0;s<d;++s)(c=t[s])&&u.get(h[s])===c&&(o[s]=c)}function EX(e){return e.__data__}function SX(e,t){if(!arguments.length)return Array.from(this,EX);var r=t?_X:xX,n=this._parents,o=this._groups;typeof e!="function"&&(e=wX(e));for(var i=o.length,a=new Array(i),s=new Array(i),c=new Array(i),u=0;u<i;++u){var d=n[u],p=o[u],h=p.length,v=OX(e.call(d,d&&d.__data__,u,n)),y=v.length,g=s[u]=new Array(y),b=a[u]=new Array(y),x=c[u]=new Array(h);r(d,p,g,b,x,v,t);for(var w=0,E=0,S,_;w<y;++w)if(S=g[w]){for(w>=E&&(E=w+1);!(_=b[E])&&++E<y;);S._next=_||null}}return a=new Sr(a,n),a._enter=s,a._exit=c,a}function OX(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function CX(){return new Sr(this._exit||this._groups.map(AL),this._parents)}function IX(e,t,r){var n=this.enter(),o=this,i=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),r==null?i.remove():r(i),n&&o?n.merge(o).order():o}function RX(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,o=r.length,i=n.length,a=Math.min(o,i),s=new Array(o),c=0;c<a;++c)for(var u=r[c],d=n[c],p=u.length,h=s[c]=new Array(p),v,y=0;y<p;++y)(v=u[y]||d[y])&&(h[y]=v);for(;c<o;++c)s[c]=r[c];return new Sr(s,this._parents)}function NX(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],o=n.length-1,i=n[o],a;--o>=0;)(a=n[o])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function PX(e){e||(e=TX);function t(p,h){return p&&h?e(p.__data__,h.__data__):!p-!h}for(var r=this._groups,n=r.length,o=new Array(n),i=0;i<n;++i){for(var a=r[i],s=a.length,c=o[i]=new Array(s),u,d=0;d<s;++d)(u=a[d])&&(c[d]=u);c.sort(t)}return new Sr(o,this._parents).order()}function TX(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function AX(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function kX(){return Array.from(this)}function MX(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],o=0,i=n.length;o<i;++o){var a=n[o];if(a)return a}return null}function DX(){let e=0;for(const t of this)++e;return e}function jX(){return!this.node()}function qX(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var o=t[r],i=0,a=o.length,s;i<a;++i)(s=o[i])&&e.call(s,s.__data__,i,o);return this}function LX(e){return function(){this.removeAttribute(e)}}function zX(e){return function(){this.removeAttributeNS(e.space,e.local)}}function BX(e,t){return function(){this.setAttribute(e,t)}}function FX(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function $X(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function HX(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function VX(e,t){var r=cd(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?zX:LX:typeof t=="function"?r.local?HX:$X:r.local?FX:BX)(r,t))}function kL(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function WX(e){return function(){this.style.removeProperty(e)}}function UX(e,t,r){return function(){this.style.setProperty(e,t,r)}}function GX(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function KX(e,t,r){return arguments.length>1?this.each((t==null?WX:typeof t=="function"?GX:UX)(e,t,r??"")):Zi(this.node(),e)}function Zi(e,t){return e.style.getPropertyValue(t)||kL(e).getComputedStyle(e,null).getPropertyValue(t)}function YX(e){return function(){delete this[e]}}function XX(e,t){return function(){this[e]=t}}function ZX(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function JX(e,t){return arguments.length>1?this.each((t==null?YX:typeof t=="function"?ZX:XX)(e,t)):this.node()[e]}function ML(e){return e.trim().split(/^|\s+/)}function P_(e){return e.classList||new DL(e)}function DL(e){this._node=e,this._names=ML(e.getAttribute("class")||"")}DL.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function jL(e,t){for(var r=P_(e),n=-1,o=t.length;++n<o;)r.add(t[n])}function qL(e,t){for(var r=P_(e),n=-1,o=t.length;++n<o;)r.remove(t[n])}function QX(e){return function(){jL(this,e)}}function eZ(e){return function(){qL(this,e)}}function tZ(e,t){return function(){(t.apply(this,arguments)?jL:qL)(this,e)}}function rZ(e,t){var r=ML(e+"");if(arguments.length<2){for(var n=P_(this.node()),o=-1,i=r.length;++o<i;)if(!n.contains(r[o]))return!1;return!0}return this.each((typeof t=="function"?tZ:t?QX:eZ)(r,t))}function nZ(){this.textContent=""}function oZ(e){return function(){this.textContent=e}}function iZ(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function aZ(e){return arguments.length?this.each(e==null?nZ:(typeof e=="function"?iZ:oZ)(e)):this.node().textContent}function sZ(){this.innerHTML=""}function lZ(e){return function(){this.innerHTML=e}}function cZ(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function uZ(e){return arguments.length?this.each(e==null?sZ:(typeof e=="function"?cZ:lZ)(e)):this.node().innerHTML}function dZ(){this.nextSibling&&this.parentNode.appendChild(this)}function fZ(){return this.each(dZ)}function pZ(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function hZ(){return this.each(pZ)}function vZ(e){var t=typeof e=="function"?e:RL(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function gZ(){return null}function mZ(e,t){var r=typeof e=="function"?e:RL(e),n=t==null?gZ:typeof t=="function"?t:N_(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function bZ(){var e=this.parentNode;e&&e.removeChild(this)}function yZ(){return this.each(bZ)}function wZ(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function xZ(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function _Z(e){return this.select(e?xZ:wZ)}function EZ(e){return arguments.length?this.property("__data__",e):this.node().__data__}function SZ(e){return function(t){e.call(this,t,this.__data__)}}function OZ(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function CZ(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,o=t.length,i;r<o;++r)i=t[r],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++n]=i;++n?t.length=n:delete this.__on}}}function IZ(e,t,r){return function(){var n=this.__on,o,i=SZ(t);if(n){for(var a=0,s=n.length;a<s;++a)if((o=n[a]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=r),o.value=t;return}}this.addEventListener(e.type,i,r),o={type:e.type,name:e.name,value:t,listener:i,options:r},n?n.push(o):this.__on=[o]}}function RZ(e,t,r){var n=OZ(e+""),o,i=n.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,u=s.length,d;c<u;++c)for(o=0,d=s[c];o<i;++o)if((a=n[o]).type===d.type&&a.name===d.name)return d.value}return}for(s=t?IZ:CZ,o=0;o<i;++o)this.each(s(n[o],t,r));return this}function LL(e,t,r){var n=kL(e),o=n.CustomEvent;typeof o=="function"?o=new o(t,r):(o=n.document.createEvent("Event"),r?(o.initEvent(t,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function NZ(e,t){return function(){return LL(this,e,t)}}function PZ(e,t){return function(){return LL(this,e,t.apply(this,arguments))}}function TZ(e,t){return this.each((typeof t=="function"?PZ:NZ)(e,t))}function*AZ(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],o=0,i=n.length,a;o<i;++o)(a=n[o])&&(yield a)}var zL=[null];function Sr(e,t){this._groups=e,this._parents=t}function $s(){return new Sr([[document.documentElement]],zL)}function kZ(){return this}Sr.prototype=$s.prototype={constructor:Sr,select:iX,selectAll:cX,selectChild:pX,selectChildren:mX,filter:bX,data:SX,enter:yX,exit:CX,join:IX,merge:RX,selection:kZ,order:NX,sort:PX,call:AX,nodes:kX,node:MX,size:DX,empty:jX,each:qX,attr:VX,style:KX,property:JX,classed:rZ,text:aZ,html:uZ,raise:fZ,lower:hZ,append:vZ,insert:mZ,remove:yZ,clone:_Z,datum:EZ,on:RZ,dispatch:TZ,[Symbol.iterator]:AZ};function Zr(e){return typeof e=="string"?new Sr([[document.querySelector(e)]],[document.documentElement]):new Sr([[e]],zL)}function MZ(e){let t;for(;t=e.sourceEvent;)e=t;return e}function mn(e,t){if(e=MZ(e),t===void 0&&(t=e.currentTarget),t){var r=t.ownerSVGElement||t;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,n=n.matrixTransform(t.getScreenCTM().inverse()),[n.x,n.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const DZ={passive:!1},Os={capture:!0,passive:!1};function Kb(e){e.stopImmediatePropagation()}function Li(e){e.preventDefault(),e.stopImmediatePropagation()}function BL(e){var t=e.document.documentElement,r=Zr(e).on("dragstart.drag",Li,Os);"onselectstart"in t?r.on("selectstart.drag",Li,Os):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function FL(e,t){var r=e.document.documentElement,n=Zr(e).on("dragstart.drag",null);t&&(n.on("click.drag",Li,Os),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const bc=e=>()=>e;function gx(e,{sourceEvent:t,subject:r,target:n,identifier:o,active:i,x:a,y:s,dx:c,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}gx.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function jZ(e){return!e.ctrlKey&&!e.button}function qZ(){return this.parentNode}function LZ(e,t){return t??{x:e.x,y:e.y}}function zZ(){return navigator.maxTouchPoints||"ontouchstart"in this}function BZ(){var e=jZ,t=qZ,r=LZ,n=zZ,o={},i=ld("start","drag","end"),a=0,s,c,u,d,p=0;function h(S){S.on("mousedown.drag",v).filter(n).on("touchstart.drag",b).on("touchmove.drag",x,DZ).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(S,_){if(!(d||!e.call(this,S,_))){var O=E(this,t.call(this,S,_),S,_,"mouse");O&&(Zr(S.view).on("mousemove.drag",y,Os).on("mouseup.drag",g,Os),BL(S.view),Kb(S),u=!1,s=S.clientX,c=S.clientY,O("start",S))}}function y(S){if(Li(S),!u){var _=S.clientX-s,O=S.clientY-c;u=_*_+O*O>p}o.mouse("drag",S)}function g(S){Zr(S.view).on("mousemove.drag mouseup.drag",null),FL(S.view,u),Li(S),o.mouse("end",S)}function b(S,_){if(e.call(this,S,_)){var O=S.changedTouches,N=t.call(this,S,_),R=O.length,A,D;for(A=0;A<R;++A)(D=E(this,N,S,_,O[A].identifier,O[A]))&&(Kb(S),D("start",S,O[A]))}}function x(S){var _=S.changedTouches,O=_.length,N,R;for(N=0;N<O;++N)(R=o[_[N].identifier])&&(Li(S),R("drag",S,_[N]))}function w(S){var _=S.changedTouches,O=_.length,N,R;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),N=0;N<O;++N)(R=o[_[N].identifier])&&(Kb(S),R("end",S,_[N]))}function E(S,_,O,N,R,A){var D=i.copy(),B=mn(A||O,_),j,M,P;if((P=r.call(S,new gx("beforestart",{sourceEvent:O,target:h,identifier:R,active:a,x:B[0],y:B[1],dx:0,dy:0,dispatch:D}),N))!=null)return j=P.x-B[0]||0,M=P.y-B[1]||0,function V(q,G,W){var Q=B,z;switch(q){case"start":o[R]=V,z=a++;break;case"end":delete o[R],--a;case"drag":B=mn(W||G,_),z=a;break}D.call(q,S,new gx(q,{sourceEvent:G,subject:P,target:h,identifier:R,active:z,x:B[0]+j,y:B[1]+M,dx:B[0]-Q[0],dy:B[1]-Q[1],dispatch:D}),N)}}return h.filter=function(S){return arguments.length?(e=typeof S=="function"?S:bc(!!S),h):e},h.container=function(S){return arguments.length?(t=typeof S=="function"?S:bc(S),h):t},h.subject=function(S){return arguments.length?(r=typeof S=="function"?S:bc(S),h):r},h.touchable=function(S){return arguments.length?(n=typeof S=="function"?S:bc(!!S),h):n},h.on=function(){var S=i.on.apply(i,arguments);return S===i?h:S},h.clickDistance=function(S){return arguments.length?(p=(S=+S)*S,h):Math.sqrt(p)},h}function T_(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function $L(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Hs(){}var Cs=.7,fu=1/Cs,zi="\\s*([+-]?\\d+)\\s*",Is="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",FZ=/^#([0-9a-f]{3,8})$/,$Z=new RegExp(`^rgb\\(${zi},${zi},${zi}\\)$`),HZ=new RegExp(`^rgb\\(${xn},${xn},${xn}\\)$`),VZ=new RegExp(`^rgba\\(${zi},${zi},${zi},${Is}\\)$`),WZ=new RegExp(`^rgba\\(${xn},${xn},${xn},${Is}\\)$`),UZ=new RegExp(`^hsl\\(${Is},${xn},${xn}\\)$`),GZ=new RegExp(`^hsla\\(${Is},${xn},${xn},${Is}\\)$`),CT={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};T_(Hs,Rs,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:IT,formatHex:IT,formatHex8:KZ,formatHsl:YZ,formatRgb:RT,toString:RT});function IT(){return this.rgb().formatHex()}function KZ(){return this.rgb().formatHex8()}function YZ(){return HL(this).formatHsl()}function RT(){return this.rgb().formatRgb()}function Rs(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=FZ.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?NT(t):r===3?new sr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?yc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?yc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=$Z.exec(e))?new sr(t[1],t[2],t[3],1):(t=HZ.exec(e))?new sr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=VZ.exec(e))?yc(t[1],t[2],t[3],t[4]):(t=WZ.exec(e))?yc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=UZ.exec(e))?AT(t[1],t[2]/100,t[3]/100,1):(t=GZ.exec(e))?AT(t[1],t[2]/100,t[3]/100,t[4]):CT.hasOwnProperty(e)?NT(CT[e]):e==="transparent"?new sr(NaN,NaN,NaN,0):null}function NT(e){return new sr(e>>16&255,e>>8&255,e&255,1)}function yc(e,t,r,n){return n<=0&&(e=t=r=NaN),new sr(e,t,r,n)}function XZ(e){return e instanceof Hs||(e=Rs(e)),e?(e=e.rgb(),new sr(e.r,e.g,e.b,e.opacity)):new sr}function mx(e,t,r,n){return arguments.length===1?XZ(e):new sr(e,t,r,n??1)}function sr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}T_(sr,mx,$L(Hs,{brighter(e){return e=e==null?fu:Math.pow(fu,e),new sr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Cs:Math.pow(Cs,e),new sr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new sr(Fo(this.r),Fo(this.g),Fo(this.b),pu(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:PT,formatHex:PT,formatHex8:ZZ,formatRgb:TT,toString:TT}));function PT(){return`#${zo(this.r)}${zo(this.g)}${zo(this.b)}`}function ZZ(){return`#${zo(this.r)}${zo(this.g)}${zo(this.b)}${zo((isNaN(this.opacity)?1:this.opacity)*255)}`}function TT(){const e=pu(this.opacity);return`${e===1?"rgb(":"rgba("}${Fo(this.r)}, ${Fo(this.g)}, ${Fo(this.b)}${e===1?")":`, ${e})`}`}function pu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Fo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function zo(e){return e=Fo(e),(e<16?"0":"")+e.toString(16)}function AT(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Jr(e,t,r,n)}function HL(e){if(e instanceof Jr)return new Jr(e.h,e.s,e.l,e.opacity);if(e instanceof Hs||(e=Rs(e)),!e)return new Jr;if(e instanceof Jr)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=NaN,s=i-o,c=(i+o)/2;return s?(t===i?a=(r-n)/s+(r<n)*6:r===i?a=(n-t)/s+2:a=(t-r)/s+4,s/=c<.5?i+o:2-i-o,a*=60):s=c>0&&c<1?0:a,new Jr(a,s,c,e.opacity)}function JZ(e,t,r,n){return arguments.length===1?HL(e):new Jr(e,t,r,n??1)}function Jr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}T_(Jr,JZ,$L(Hs,{brighter(e){return e=e==null?fu:Math.pow(fu,e),new Jr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Cs:Math.pow(Cs,e),new Jr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new sr(Yb(e>=240?e-240:e+120,o,n),Yb(e,o,n),Yb(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new Jr(kT(this.h),wc(this.s),wc(this.l),pu(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=pu(this.opacity);return`${e===1?"hsl(":"hsla("}${kT(this.h)}, ${wc(this.s)*100}%, ${wc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function kT(e){return e=(e||0)%360,e<0?e+360:e}function wc(e){return Math.max(0,Math.min(1,e||0))}function Yb(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const VL=e=>()=>e;function QZ(e,t){return function(r){return e+r*t}}function eJ(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function tJ(e){return(e=+e)==1?WL:function(t,r){return r-t?eJ(t,r,e):VL(isNaN(t)?r:t)}}function WL(e,t){var r=t-e;return r?QZ(e,r):VL(isNaN(e)?t:e)}const MT=(function e(t){var r=tJ(t);function n(o,i){var a=r((o=mx(o)).r,(i=mx(i)).r),s=r(o.g,i.g),c=r(o.b,i.b),u=WL(o.opacity,i.opacity);return function(d){return o.r=a(d),o.g=s(d),o.b=c(d),o.opacity=u(d),o+""}}return n.gamma=e,n})(1);function ho(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var bx=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xb=new RegExp(bx.source,"g");function rJ(e){return function(){return e}}function nJ(e){return function(t){return e(t)+""}}function oJ(e,t){var r=bx.lastIndex=Xb.lastIndex=0,n,o,i,a=-1,s=[],c=[];for(e=e+"",t=t+"";(n=bx.exec(e))&&(o=Xb.exec(t));)(i=o.index)>r&&(i=t.slice(r,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,c.push({i:a,x:ho(n,o)})),r=Xb.lastIndex;return r<t.length&&(i=t.slice(r),s[a]?s[a]+=i:s[++a]=i),s.length<2?c[0]?nJ(c[0].x):rJ(t):(t=c.length,function(u){for(var d=0,p;d<t;++d)s[(p=c[d]).i]=p.x(u);return s.join("")})}var DT=180/Math.PI,yx={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function UL(e,t,r,n,o,i){var a,s,c;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(c=e*r+t*n)&&(r-=e*c,n-=t*c),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,c/=s),e*n<t*r&&(e=-e,t=-t,c=-c,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*DT,skewX:Math.atan(c)*DT,scaleX:a,scaleY:s}}var xc;function iJ(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?yx:UL(t.a,t.b,t.c,t.d,t.e,t.f)}function aJ(e){return e==null||(xc||(xc=document.createElementNS("http://www.w3.org/2000/svg","g")),xc.setAttribute("transform",e),!(e=xc.transform.baseVal.consolidate()))?yx:(e=e.matrix,UL(e.a,e.b,e.c,e.d,e.e,e.f))}function GL(e,t,r,n){function o(u){return u.length?u.pop()+" ":""}function i(u,d,p,h,v,y){if(u!==p||d!==h){var g=v.push("translate(",null,t,null,r);y.push({i:g-4,x:ho(u,p)},{i:g-2,x:ho(d,h)})}else(p||h)&&v.push("translate("+p+t+h+r)}function a(u,d,p,h){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),h.push({i:p.push(o(p)+"rotate(",null,n)-2,x:ho(u,d)})):d&&p.push(o(p)+"rotate("+d+n)}function s(u,d,p,h){u!==d?h.push({i:p.push(o(p)+"skewX(",null,n)-2,x:ho(u,d)}):d&&p.push(o(p)+"skewX("+d+n)}function c(u,d,p,h,v,y){if(u!==p||d!==h){var g=v.push(o(v)+"scale(",null,",",null,")");y.push({i:g-4,x:ho(u,p)},{i:g-2,x:ho(d,h)})}else(p!==1||h!==1)&&v.push(o(v)+"scale("+p+","+h+")")}return function(u,d){var p=[],h=[];return u=e(u),d=e(d),i(u.translateX,u.translateY,d.translateX,d.translateY,p,h),a(u.rotate,d.rotate,p,h),s(u.skewX,d.skewX,p,h),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,p,h),u=d=null,function(v){for(var y=-1,g=h.length,b;++y<g;)p[(b=h[y]).i]=b.x(v);return p.join("")}}}var sJ=GL(iJ,"px, ","px)","deg)"),lJ=GL(aJ,", ",")",")"),cJ=1e-12;function jT(e){return((e=Math.exp(e))+1/e)/2}function uJ(e){return((e=Math.exp(e))-1/e)/2}function dJ(e){return((e=Math.exp(2*e))-1)/(e+1)}const fJ=(function e(t,r,n){function o(i,a){var s=i[0],c=i[1],u=i[2],d=a[0],p=a[1],h=a[2],v=d-s,y=p-c,g=v*v+y*y,b,x;if(g<cJ)x=Math.log(h/u)/t,b=function(N){return[s+N*v,c+N*y,u*Math.exp(t*N*x)]};else{var w=Math.sqrt(g),E=(h*h-u*u+n*g)/(2*u*r*w),S=(h*h-u*u-n*g)/(2*h*r*w),_=Math.log(Math.sqrt(E*E+1)-E),O=Math.log(Math.sqrt(S*S+1)-S);x=(O-_)/t,b=function(N){var R=N*x,A=jT(_),D=u/(r*w)*(A*dJ(t*R+_)-uJ(_));return[s+D*v,c+D*y,u*A/jT(t*R+_)]}}return b.duration=x*1e3*t/Math.SQRT2,b}return o.rho=function(i){var a=Math.max(.001,+i),s=a*a,c=s*s;return e(a,s,c)},o})(Math.SQRT2,2,4);var Ji=0,ds=0,Fa=0,KL=1e3,hu,fs,vu=0,Go=0,ud=0,Ns=typeof performance=="object"&&performance.now?performance:Date,YL=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function A_(){return Go||(YL(pJ),Go=Ns.now()+ud)}function pJ(){Go=0}function gu(){this._call=this._time=this._next=null}gu.prototype=XL.prototype={constructor:gu,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?A_():+r)+(t==null?0:+t),!this._next&&fs!==this&&(fs?fs._next=this:hu=this,fs=this),this._call=e,this._time=r,wx()},stop:function(){this._call&&(this._call=null,this._time=1/0,wx())}};function XL(e,t,r){var n=new gu;return n.restart(e,t,r),n}function hJ(){A_(),++Ji;for(var e=hu,t;e;)(t=Go-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ji}function qT(){Go=(vu=Ns.now())+ud,Ji=ds=0;try{hJ()}finally{Ji=0,gJ(),Go=0}}function vJ(){var e=Ns.now(),t=e-vu;t>KL&&(ud-=t,vu=e)}function gJ(){for(var e,t=hu,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:hu=r);fs=e,wx(n)}function wx(e){if(!Ji){ds&&(ds=clearTimeout(ds));var t=e-Go;t>24?(e<1/0&&(ds=setTimeout(qT,e-Ns.now()-ud)),Fa&&(Fa=clearInterval(Fa))):(Fa||(vu=Ns.now(),Fa=setInterval(vJ,KL)),Ji=1,YL(qT))}}function LT(e,t,r){var n=new gu;return t=t==null?0:+t,n.restart(o=>{n.stop(),e(o+t)},t,r),n}var mJ=ld("start","end","cancel","interrupt"),bJ=[],ZL=0,zT=1,xx=2,Xc=3,BT=4,_x=5,Zc=6;function dd(e,t,r,n,o,i){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;yJ(e,r,{name:t,index:n,group:o,on:mJ,tween:bJ,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:ZL})}function k_(e,t){var r=an(e,t);if(r.state>ZL)throw new Error("too late; already scheduled");return r}function In(e,t){var r=an(e,t);if(r.state>Xc)throw new Error("too late; already running");return r}function an(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function yJ(e,t,r){var n=e.__transition,o;n[t]=r,r.timer=XL(i,0,r.time);function i(u){r.state=zT,r.timer.restart(a,r.delay,r.time),r.delay<=u&&a(u-r.delay)}function a(u){var d,p,h,v;if(r.state!==zT)return c();for(d in n)if(v=n[d],v.name===r.name){if(v.state===Xc)return LT(a);v.state===BT?(v.state=Zc,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete n[d]):+d<t&&(v.state=Zc,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete n[d])}if(LT(function(){r.state===Xc&&(r.state=BT,r.timer.restart(s,r.delay,r.time),s(u))}),r.state=xx,r.on.call("start",e,e.__data__,r.index,r.group),r.state===xx){for(r.state=Xc,o=new Array(h=r.tween.length),d=0,p=-1;d<h;++d)(v=r.tween[d].value.call(e,e.__data__,r.index,r.group))&&(o[++p]=v);o.length=p+1}}function s(u){for(var d=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(c),r.state=_x,1),p=-1,h=o.length;++p<h;)o[p].call(e,d);r.state===_x&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=Zc,r.timer.stop(),delete n[t];for(var u in n)return;delete e.__transition}}function Jc(e,t){var r=e.__transition,n,o,i=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((n=r[a]).name!==t){i=!1;continue}o=n.state>xx&&n.state<_x,n.state=Zc,n.timer.stop(),n.on.call(o?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}i&&delete e.__transition}}function wJ(e){return this.each(function(){Jc(this,e)})}function xJ(e,t){var r,n;return function(){var o=In(this,e),i=o.tween;if(i!==r){n=r=i;for(var a=0,s=n.length;a<s;++a)if(n[a].name===t){n=n.slice(),n.splice(a,1);break}}o.tween=n}}function _J(e,t,r){var n,o;if(typeof r!="function")throw new Error;return function(){var i=In(this,e),a=i.tween;if(a!==n){o=(n=a).slice();for(var s={name:t,value:r},c=0,u=o.length;c<u;++c)if(o[c].name===t){o[c]=s;break}c===u&&o.push(s)}i.tween=o}}function EJ(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=an(this.node(),r).tween,o=0,i=n.length,a;o<i;++o)if((a=n[o]).name===e)return a.value;return null}return this.each((t==null?xJ:_J)(r,e,t))}function M_(e,t,r){var n=e._id;return e.each(function(){var o=In(this,n);(o.value||(o.value={}))[t]=r.apply(this,arguments)}),function(o){return an(o,n).value[t]}}function JL(e,t){var r;return(typeof t=="number"?ho:t instanceof Rs?MT:(r=Rs(t))?(t=r,MT):oJ)(e,t)}function SJ(e){return function(){this.removeAttribute(e)}}function OJ(e){return function(){this.removeAttributeNS(e.space,e.local)}}function CJ(e,t,r){var n,o=r+"",i;return function(){var a=this.getAttribute(e);return a===o?null:a===n?i:i=t(n=a,r)}}function IJ(e,t,r){var n,o=r+"",i;return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===n?i:i=t(n=a,r)}}function RJ(e,t,r){var n,o,i;return function(){var a,s=r(this),c;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),c=s+"",a===c?null:a===n&&c===o?i:(o=c,i=t(n=a,s)))}}function NJ(e,t,r){var n,o,i;return function(){var a,s=r(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),c=s+"",a===c?null:a===n&&c===o?i:(o=c,i=t(n=a,s)))}}function PJ(e,t){var r=cd(e),n=r==="transform"?lJ:JL;return this.attrTween(e,typeof t=="function"?(r.local?NJ:RJ)(r,n,M_(this,"attr."+e,t)):t==null?(r.local?OJ:SJ)(r):(r.local?IJ:CJ)(r,n,t))}function TJ(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function AJ(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function kJ(e,t){var r,n;function o(){var i=t.apply(this,arguments);return i!==n&&(r=(n=i)&&AJ(e,i)),r}return o._value=t,o}function MJ(e,t){var r,n;function o(){var i=t.apply(this,arguments);return i!==n&&(r=(n=i)&&TJ(e,i)),r}return o._value=t,o}function DJ(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=cd(e);return this.tween(r,(n.local?kJ:MJ)(n,t))}function jJ(e,t){return function(){k_(this,e).delay=+t.apply(this,arguments)}}function qJ(e,t){return t=+t,function(){k_(this,e).delay=t}}function LJ(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?jJ:qJ)(t,e)):an(this.node(),t).delay}function zJ(e,t){return function(){In(this,e).duration=+t.apply(this,arguments)}}function BJ(e,t){return t=+t,function(){In(this,e).duration=t}}function FJ(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?zJ:BJ)(t,e)):an(this.node(),t).duration}function $J(e,t){if(typeof t!="function")throw new Error;return function(){In(this,e).ease=t}}function HJ(e){var t=this._id;return arguments.length?this.each($J(t,e)):an(this.node(),t).ease}function VJ(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;In(this,e).ease=r}}function WJ(e){if(typeof e!="function")throw new Error;return this.each(VJ(this._id,e))}function UJ(e){typeof e!="function"&&(e=PL(e));for(var t=this._groups,r=t.length,n=new Array(r),o=0;o<r;++o)for(var i=t[o],a=i.length,s=n[o]=[],c,u=0;u<a;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&s.push(c);return new Vn(n,this._parents,this._name,this._id)}function GJ(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,o=r.length,i=Math.min(n,o),a=new Array(n),s=0;s<i;++s)for(var c=t[s],u=r[s],d=c.length,p=a[s]=new Array(d),h,v=0;v<d;++v)(h=c[v]||u[v])&&(p[v]=h);for(;s<n;++s)a[s]=t[s];return new Vn(a,this._parents,this._name,this._id)}function KJ(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function YJ(e,t,r){var n,o,i=KJ(t)?k_:In;return function(){var a=i(this,e),s=a.on;s!==n&&(o=(n=s).copy()).on(t,r),a.on=o}}function XJ(e,t){var r=this._id;return arguments.length<2?an(this.node(),r).on.on(e):this.each(YJ(r,e,t))}function ZJ(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function JJ(){return this.on("end.remove",ZJ(this._id))}function QJ(e){var t=this._name,r=this._id;typeof e!="function"&&(e=N_(e));for(var n=this._groups,o=n.length,i=new Array(o),a=0;a<o;++a)for(var s=n[a],c=s.length,u=i[a]=new Array(c),d,p,h=0;h<c;++h)(d=s[h])&&(p=e.call(d,d.__data__,h,s))&&("__data__"in d&&(p.__data__=d.__data__),u[h]=p,dd(u[h],t,r,h,u,an(d,r)));return new Vn(i,this._parents,t,r)}function eQ(e){var t=this._name,r=this._id;typeof e!="function"&&(e=NL(e));for(var n=this._groups,o=n.length,i=[],a=[],s=0;s<o;++s)for(var c=n[s],u=c.length,d,p=0;p<u;++p)if(d=c[p]){for(var h=e.call(d,d.__data__,p,c),v,y=an(d,r),g=0,b=h.length;g<b;++g)(v=h[g])&&dd(v,t,r,g,h,y);i.push(h),a.push(d)}return new Vn(i,a,t,r)}var tQ=$s.prototype.constructor;function rQ(){return new tQ(this._groups,this._parents)}function nQ(e,t){var r,n,o;return function(){var i=Zi(this,e),a=(this.style.removeProperty(e),Zi(this,e));return i===a?null:i===r&&a===n?o:o=t(r=i,n=a)}}function QL(e){return function(){this.style.removeProperty(e)}}function oQ(e,t,r){var n,o=r+"",i;return function(){var a=Zi(this,e);return a===o?null:a===n?i:i=t(n=a,r)}}function iQ(e,t,r){var n,o,i;return function(){var a=Zi(this,e),s=r(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),Zi(this,e))),a===c?null:a===n&&c===o?i:(o=c,i=t(n=a,s))}}function aQ(e,t){var r,n,o,i="style."+t,a="end."+i,s;return function(){var c=In(this,e),u=c.on,d=c.value[i]==null?s||(s=QL(t)):void 0;(u!==r||o!==d)&&(n=(r=u).copy()).on(a,o=d),c.on=n}}function sQ(e,t,r){var n=(e+="")=="transform"?sJ:JL;return t==null?this.styleTween(e,nQ(e,n)).on("end.style."+e,QL(e)):typeof t=="function"?this.styleTween(e,iQ(e,n,M_(this,"style."+e,t))).each(aQ(this._id,e)):this.styleTween(e,oQ(e,n,t),r).on("end.style."+e,null)}function lQ(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function cQ(e,t,r){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&lQ(e,a,r)),n}return i._value=t,i}function uQ(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,cQ(e,t,r??""))}function dQ(e){return function(){this.textContent=e}}function fQ(e){return function(){var t=e(this);this.textContent=t??""}}function pQ(e){return this.tween("text",typeof e=="function"?fQ(M_(this,"text",e)):dQ(e==null?"":e+""))}function hQ(e){return function(t){this.textContent=e.call(this,t)}}function vQ(e){var t,r;function n(){var o=e.apply(this,arguments);return o!==r&&(t=(r=o)&&hQ(o)),t}return n._value=e,n}function gQ(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,vQ(e))}function mQ(){for(var e=this._name,t=this._id,r=e5(),n=this._groups,o=n.length,i=0;i<o;++i)for(var a=n[i],s=a.length,c,u=0;u<s;++u)if(c=a[u]){var d=an(c,t);dd(c,e,r,u,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Vn(n,this._parents,e,r)}function bQ(){var e,t,r=this,n=r._id,o=r.size();return new Promise(function(i,a){var s={value:a},c={value:function(){--o===0&&i()}};r.each(function(){var u=In(this,n),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),u.on=t}),o===0&&i()})}var yQ=0;function Vn(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function e5(){return++yQ}var zn=$s.prototype;Vn.prototype={constructor:Vn,select:QJ,selectAll:eQ,selectChild:zn.selectChild,selectChildren:zn.selectChildren,filter:UJ,merge:GJ,selection:rQ,transition:mQ,call:zn.call,nodes:zn.nodes,node:zn.node,size:zn.size,empty:zn.empty,each:zn.each,on:XJ,attr:PJ,attrTween:DJ,style:sQ,styleTween:uQ,text:pQ,textTween:gQ,remove:JJ,tween:EJ,delay:LJ,duration:FJ,ease:HJ,easeVarying:WJ,end:bQ,[Symbol.iterator]:zn[Symbol.iterator]};function wQ(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var xQ={time:null,delay:0,duration:250,ease:wQ};function _Q(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function EQ(e){var t,r;e instanceof Vn?(t=e._id,e=e._name):(t=e5(),(r=xQ).time=A_(),e=e==null?null:e+"");for(var n=this._groups,o=n.length,i=0;i<o;++i)for(var a=n[i],s=a.length,c,u=0;u<s;++u)(c=a[u])&&dd(c,e,t,u,a,r||_Q(c,t));return new Vn(n,this._parents,e,t)}$s.prototype.interrupt=wJ;$s.prototype.transition=EQ;const _c=e=>()=>e;function SQ(e,{sourceEvent:t,target:r,transform:n,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:o}})}function $n(e,t,r){this.k=e,this.x=t,this.y=r}$n.prototype={constructor:$n,scale:function(e){return e===1?this:new $n(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new $n(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var $o=new $n(1,0,0);$n.prototype;function Zb(e){e.stopImmediatePropagation()}function $a(e){e.preventDefault(),e.stopImmediatePropagation()}function OQ(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function CQ(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function FT(){return this.__zoom||$o}function IQ(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function RQ(){return navigator.maxTouchPoints||"ontouchstart"in this}function NQ(e,t,r){var n=e.invertX(t[0][0])-r[0][0],o=e.invertX(t[1][0])-r[1][0],i=e.invertY(t[0][1])-r[0][1],a=e.invertY(t[1][1])-r[1][1];return e.translate(o>n?(n+o)/2:Math.min(0,n)||Math.max(0,o),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function PQ(){var e=OQ,t=CQ,r=NQ,n=IQ,o=RQ,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,c=fJ,u=ld("start","zoom","end"),d,p,h,v=500,y=150,g=0,b=10;function x(P){P.property("__zoom",FT).on("wheel.zoom",R,{passive:!1}).on("mousedown.zoom",A).on("dblclick.zoom",D).filter(o).on("touchstart.zoom",B).on("touchmove.zoom",j).on("touchend.zoom touchcancel.zoom",M).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}x.transform=function(P,V,q,G){var W=P.selection?P.selection():P;W.property("__zoom",FT),P!==W?_(P,V,q,G):W.interrupt().each(function(){O(this,arguments).event(G).start().zoom(null,typeof V=="function"?V.apply(this,arguments):V).end()})},x.scaleBy=function(P,V,q,G){x.scaleTo(P,function(){var W=this.__zoom.k,Q=typeof V=="function"?V.apply(this,arguments):V;return W*Q},q,G)},x.scaleTo=function(P,V,q,G){x.transform(P,function(){var W=t.apply(this,arguments),Q=this.__zoom,z=q==null?S(W):typeof q=="function"?q.apply(this,arguments):q,U=Q.invert(z),ie=typeof V=="function"?V.apply(this,arguments):V;return r(E(w(Q,ie),z,U),W,a)},q,G)},x.translateBy=function(P,V,q,G){x.transform(P,function(){return r(this.__zoom.translate(typeof V=="function"?V.apply(this,arguments):V,typeof q=="function"?q.apply(this,arguments):q),t.apply(this,arguments),a)},null,G)},x.translateTo=function(P,V,q,G,W){x.transform(P,function(){var Q=t.apply(this,arguments),z=this.__zoom,U=G==null?S(Q):typeof G=="function"?G.apply(this,arguments):G;return r($o.translate(U[0],U[1]).scale(z.k).translate(typeof V=="function"?-V.apply(this,arguments):-V,typeof q=="function"?-q.apply(this,arguments):-q),Q,a)},G,W)};function w(P,V){return V=Math.max(i[0],Math.min(i[1],V)),V===P.k?P:new $n(V,P.x,P.y)}function E(P,V,q){var G=V[0]-q[0]*P.k,W=V[1]-q[1]*P.k;return G===P.x&&W===P.y?P:new $n(P.k,G,W)}function S(P){return[(+P[0][0]+ +P[1][0])/2,(+P[0][1]+ +P[1][1])/2]}function _(P,V,q,G){P.on("start.zoom",function(){O(this,arguments).event(G).start()}).on("interrupt.zoom end.zoom",function(){O(this,arguments).event(G).end()}).tween("zoom",function(){var W=this,Q=arguments,z=O(W,Q).event(G),U=t.apply(W,Q),ie=q==null?S(U):typeof q=="function"?q.apply(W,Q):q,te=Math.max(U[1][0]-U[0][0],U[1][1]-U[0][1]),$=W.__zoom,K=typeof V=="function"?V.apply(W,Q):V,Z=c($.invert(ie).concat(te/$.k),K.invert(ie).concat(te/K.k));return function(H){if(H===1)H=K;else{var Y=Z(H),oe=te/Y[2];H=new $n(oe,ie[0]-Y[0]*oe,ie[1]-Y[1]*oe)}z.zoom(null,H)}})}function O(P,V,q){return!q&&P.__zooming||new N(P,V)}function N(P,V){this.that=P,this.args=V,this.active=0,this.sourceEvent=null,this.extent=t.apply(P,V),this.taps=0}N.prototype={event:function(P){return P&&(this.sourceEvent=P),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(P,V){return this.mouse&&P!=="mouse"&&(this.mouse[1]=V.invert(this.mouse[0])),this.touch0&&P!=="touch"&&(this.touch0[1]=V.invert(this.touch0[0])),this.touch1&&P!=="touch"&&(this.touch1[1]=V.invert(this.touch1[0])),this.that.__zoom=V,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(P){var V=Zr(this.that).datum();u.call(P,this.that,new SQ(P,{sourceEvent:this.sourceEvent,target:x,transform:this.that.__zoom,dispatch:u}),V)}};function R(P,...V){if(!e.apply(this,arguments))return;var q=O(this,V).event(P),G=this.__zoom,W=Math.max(i[0],Math.min(i[1],G.k*Math.pow(2,n.apply(this,arguments)))),Q=mn(P);if(q.wheel)(q.mouse[0][0]!==Q[0]||q.mouse[0][1]!==Q[1])&&(q.mouse[1]=G.invert(q.mouse[0]=Q)),clearTimeout(q.wheel);else{if(G.k===W)return;q.mouse=[Q,G.invert(Q)],Jc(this),q.start()}$a(P),q.wheel=setTimeout(z,y),q.zoom("mouse",r(E(w(G,W),q.mouse[0],q.mouse[1]),q.extent,a));function z(){q.wheel=null,q.end()}}function A(P,...V){if(h||!e.apply(this,arguments))return;var q=P.currentTarget,G=O(this,V,!0).event(P),W=Zr(P.view).on("mousemove.zoom",ie,!0).on("mouseup.zoom",te,!0),Q=mn(P,q),z=P.clientX,U=P.clientY;BL(P.view),Zb(P),G.mouse=[Q,this.__zoom.invert(Q)],Jc(this),G.start();function ie($){if($a($),!G.moved){var K=$.clientX-z,Z=$.clientY-U;G.moved=K*K+Z*Z>g}G.event($).zoom("mouse",r(E(G.that.__zoom,G.mouse[0]=mn($,q),G.mouse[1]),G.extent,a))}function te($){W.on("mousemove.zoom mouseup.zoom",null),FL($.view,G.moved),$a($),G.event($).end()}}function D(P,...V){if(e.apply(this,arguments)){var q=this.__zoom,G=mn(P.changedTouches?P.changedTouches[0]:P,this),W=q.invert(G),Q=q.k*(P.shiftKey?.5:2),z=r(E(w(q,Q),G,W),t.apply(this,V),a);$a(P),s>0?Zr(this).transition().duration(s).call(_,z,G,P):Zr(this).call(x.transform,z,G,P)}}function B(P,...V){if(e.apply(this,arguments)){var q=P.touches,G=q.length,W=O(this,V,P.changedTouches.length===G).event(P),Q,z,U,ie;for(Zb(P),z=0;z<G;++z)U=q[z],ie=mn(U,this),ie=[ie,this.__zoom.invert(ie),U.identifier],W.touch0?!W.touch1&&W.touch0[2]!==ie[2]&&(W.touch1=ie,W.taps=0):(W.touch0=ie,Q=!0,W.taps=1+!!d);d&&(d=clearTimeout(d)),Q&&(W.taps<2&&(p=ie[0],d=setTimeout(function(){d=null},v)),Jc(this),W.start())}}function j(P,...V){if(this.__zooming){var q=O(this,V).event(P),G=P.changedTouches,W=G.length,Q,z,U,ie;for($a(P),Q=0;Q<W;++Q)z=G[Q],U=mn(z,this),q.touch0&&q.touch0[2]===z.identifier?q.touch0[0]=U:q.touch1&&q.touch1[2]===z.identifier&&(q.touch1[0]=U);if(z=q.that.__zoom,q.touch1){var te=q.touch0[0],$=q.touch0[1],K=q.touch1[0],Z=q.touch1[1],H=(H=K[0]-te[0])*H+(H=K[1]-te[1])*H,Y=(Y=Z[0]-$[0])*Y+(Y=Z[1]-$[1])*Y;z=w(z,Math.sqrt(H/Y)),U=[(te[0]+K[0])/2,(te[1]+K[1])/2],ie=[($[0]+Z[0])/2,($[1]+Z[1])/2]}else if(q.touch0)U=q.touch0[0],ie=q.touch0[1];else return;q.zoom("touch",r(E(z,U,ie),q.extent,a))}}function M(P,...V){if(this.__zooming){var q=O(this,V).event(P),G=P.changedTouches,W=G.length,Q,z;for(Zb(P),h&&clearTimeout(h),h=setTimeout(function(){h=null},v),Q=0;Q<W;++Q)z=G[Q],q.touch0&&q.touch0[2]===z.identifier?delete q.touch0:q.touch1&&q.touch1[2]===z.identifier&&delete q.touch1;if(q.touch1&&!q.touch0&&(q.touch0=q.touch1,delete q.touch1),q.touch0)q.touch0[1]=this.__zoom.invert(q.touch0[0]);else if(q.end(),q.taps===2&&(z=mn(z,this),Math.hypot(p[0]-z[0],p[1]-z[1])<b)){var U=Zr(this).on("dblclick.zoom");U&&U.apply(this,arguments)}}}return x.wheelDelta=function(P){return arguments.length?(n=typeof P=="function"?P:_c(+P),x):n},x.filter=function(P){return arguments.length?(e=typeof P=="function"?P:_c(!!P),x):e},x.touchable=function(P){return arguments.length?(o=typeof P=="function"?P:_c(!!P),x):o},x.extent=function(P){return arguments.length?(t=typeof P=="function"?P:_c([[+P[0][0],+P[0][1]],[+P[1][0],+P[1][1]]]),x):t},x.scaleExtent=function(P){return arguments.length?(i[0]=+P[0],i[1]=+P[1],x):[i[0],i[1]]},x.translateExtent=function(P){return arguments.length?(a[0][0]=+P[0][0],a[1][0]=+P[1][0],a[0][1]=+P[0][1],a[1][1]=+P[1][1],x):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},x.constrain=function(P){return arguments.length?(r=P,x):r},x.duration=function(P){return arguments.length?(s=+P,x):s},x.interpolate=function(P){return arguments.length?(c=P,x):c},x.on=function(){var P=u.on.apply(u,arguments);return P===u?x:P},x.clickDistance=function(P){return arguments.length?(g=(P=+P)*P,x):Math.sqrt(g)},x.tapDistance=function(P){return arguments.length?(b=+P,x):b},x}function Ge(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ex(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t5(e,t){if(e){if(typeof e=="string")return Ex(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ex(e,t)}}function TQ(e){if(Array.isArray(e))return e}function AQ(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,s;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(c){i=!0,s=c}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw s}}return n}}function kQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
54
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function He(e,t){return TQ(e)||AQ(e,t)||t5(e,t)||kQ()}var Qi;(function(e){e.Strict="strict",e.Loose="loose"})(Qi||(Qi={}));var Ko;(function(e){e.Lines="lines",e.Dots="dots"})(Ko||(Ko={}));var Bi;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Bi||(Bi={}));var go;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(go||(go={}));var mu;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(mu||(mu={}));var Se;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Se||(Se={}));var D_=function(t){return{width:t.offsetWidth,height:t.offsetHeight}},Fi=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.min(Math.max(t,r),n)},r5=function(t,r){return{x:Fi(t.x,r[0][0],r[1][0]),y:Fi(t.y,r[0][1],r[1][1])}},n5=function(t){var r,n;return((r=t.getRootNode)===null||r===void 0?void 0:r.call(t))||((n=window)===null||n===void 0?void 0:n.document)},MQ=function(t,r){return{x:Math.min(t.x,r.x),y:Math.min(t.y,r.y),x2:Math.max(t.x2,r.x2),y2:Math.max(t.y2,r.y2)}},bu=function(t){var r=t.x,n=t.y,o=t.width,i=t.height;return{x:r,y:n,x2:r+o,y2:n+i}},DQ=function(t){var r=t.x,n=t.y,o=t.x2,i=t.y2;return{x:r,y:n,width:o-r,height:i-n}},o5=function(t){return!isNaN(t)&&isFinite(t)},$t=Symbol("internals");function $T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ps(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$T(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$T(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HT(e,t){var r=e.find(function(u){return u.id===t.parentNode});if(r){var n=t.position.x+t.width-r.width,o=t.position.y+t.height-r.height;if(n>0||o>0||t.position.x<0||t.position.y<0){var i,a;if(r.style=ps({},r.style)||{},r.style.width=(i=r.style.width)!==null&&i!==void 0?i:r.width,r.style.height=(a=r.style.height)!==null&&a!==void 0?a:r.height,n>0&&(r.style.width+=n),o>0&&(r.style.height+=o),t.position.x<0){var s=Math.abs(t.position.x);r.position.x=r.position.x-s,r.style.width+=s,t.position.x=0}if(t.position.y<0){var c=Math.abs(t.position.y);r.position.y=r.position.y-c,r.style.height+=c,t.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function i5(e,t){if(e.some(function(n){return n.type==="reset"}))return e.filter(function(n){return n.type==="reset"}).map(function(n){return n.item});var r=e.filter(function(n){return n.type==="add"}).map(function(n){return n.item});return t.reduce(function(n,o){var i=e.find(function(c){return c.id===o.id});if(i)switch(i.type){case"select":return n.push(ps(ps({},o),{},{selected:i.selected})),n;case"position":{var a=ps({},o);return typeof i.position<"u"&&(a.position=i.position),typeof i.positionAbsolute<"u"&&(a.positionAbsolute=i.positionAbsolute),typeof i.dragging<"u"&&(a.dragging=i.dragging),a.expandParent&&HT(n,a),n.push(a),n}case"dimensions":{var s=ps({},o);return typeof i.dimensions<"u"&&(s.width=i.dimensions.width,s.height=i.dimensions.height),s.expandParent&&HT(n,s),n.push(s),n}case"remove":return n}return n.push(o),n},r)}function a5(e,t){return i5(e,t)}function jQ(e,t){return i5(e,t)}var vo=function(t,r){return{id:t,type:"select",selected:r}};function Di(e,t){return e.reduce(function(r,n){var o=t.includes(n.id);return!n.selected&&o?(n.selected=!0,r.push(vo(n.id,!0))):n.selected&&!o&&(n.selected=!1,r.push(vo(n.id,!1))),r},[])}function VT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function s5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VT(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var WT=function(t,r,n){var o=r.querySelectorAll(t);if(!o||!o.length)return null;var i=Array.from(o),a=r.getBoundingClientRect();return i.map(function(s){var c=s.getBoundingClientRect();return s5({id:s.getAttribute("data-handleid"),position:s.getAttribute("data-handlepos"),x:(c.left-a.left)/n,y:(c.top-a.top)/n},D_(s))})};function Ha(e,t,r){return r===void 0?r:function(n){var o=t().nodeInternals.get(e);r(n,s5({},o))}}function l5(e){var t=e.id,r=e.store,n=r.getState(),o=n.addSelectedNodes,i=n.unselectNodesAndEdges,a=n.multiSelectionActive,s=n.nodeInternals,c=s.get(t);r.setState({nodesSelectionActive:!1}),c.selected?c.selected&&a&&i({nodes:[c]}):o([t])}function UT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function bs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UT(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var qQ=function(t){return"id"in t&&"source"in t&&"target"in t},LQ=function(t){var r=t.source,n=t.sourceHandle,o=t.target,i=t.targetHandle;return"reactflow__edge-".concat(r).concat(n||"","-").concat(o).concat(i||"")},Sx=function(t,r){if(typeof t>"u")return"";if(typeof t=="string")return t;var n=r?"".concat(r,"__"):"";return"".concat(n).concat(Object.keys(t).sort().map(function(o){return"".concat(o,"=").concat(t[o])}).join("&"))},zQ=function(t,r){return r.some(function(n){return n.source===t.source&&n.target===t.target&&(n.sourceHandle===t.sourceHandle||!n.sourceHandle&&!t.sourceHandle)&&(n.targetHandle===t.targetHandle||!n.targetHandle&&!t.targetHandle)})},BQ=function(t,r){if(!t.source||!t.target)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Can't create edge. An edge needs a source and a target. Help: https://reactflow.dev/error#600"),r;var n;return qQ(t)?n=bs({},t):n=bs(bs({},t),{},{id:LQ(t)}),zQ(n,r)?r:r.concat(n)},c5=function(t,r,n,o){var i=t.x,a=t.y,s=He(r,3),c=s[0],u=s[1],d=s[2],p=He(o,2),h=p[0],v=p[1],y={x:(i-c)/d,y:(a-u)/d};return n?{x:h*Math.round(y.x/h),y:v*Math.round(y.y/v)}:y},j_=function(t){if(t.length===0)return{x:0,y:0,width:0,height:0};var r=t.reduce(function(n,o){var i=o.positionAbsolute,a=o.position,s=o.width,c=o.height;return MQ(n,bu({x:i?i.x:a.x,y:i?i.y:a.y,width:s||0,height:c||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return DQ(r)},u5=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0,1],o=He(n,3),i=o[0],a=o[1],s=o[2],c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,d=bu({x:(r.x-i)/s,y:(r.y-a)/s,width:r.width/s,height:r.height/s}),p=[];return t.forEach(function(h){var v=h.positionAbsolute,y=h.width,g=h.height,b=h.selectable,x=b===void 0?!0:b;if(u&&!x)return!1;var w=bu(bs(bs({},v),{},{width:y||0,height:g||0})),E=Math.max(0,Math.min(d.x2,w.x2)-Math.max(d.x,w.x)),S=Math.max(0,Math.min(d.y2,w.y2)-Math.max(d.y,w.y)),_=Math.ceil(E*S),O=typeof y>"u"||typeof g>"u"||y===null||g===null,N=c&&_>0,R=(y||0)*(g||0),A=O||N||_>=R;A&&p.push(h)}),p},d5=function(t,r){var n=t.map(function(o){return o.id});return r.filter(function(o){return n.includes(o.source)||n.includes(o.target)})},f5=function(t,r,n,o,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:.1,s=r/(t.width*(1+a)),c=n/(t.height*(1+a)),u=Math.min(s,c),d=Fi(u,o,i),p=t.x+t.width/2,h=t.y+t.height/2,v=r/2-p*d,y=n/2-h*d;return[v,y,d]},qo=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.transition().duration(r)};function GT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ji(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GT(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function p5(e,t,r,n){var o,i,a,s,c,u,d,p,h,v,y,g;if(!e.parentNode)return n;var b=t.get(e.parentNode);return p5(b,t,r,{x:((o=n.x)!==null&&o!==void 0?o:0)+((i=(a=b.position)===null||a===void 0?void 0:a.x)!==null&&i!==void 0?i:0),y:((s=n.y)!==null&&s!==void 0?s:0)+((c=(u=b.position)===null||u===void 0?void 0:u.y)!==null&&c!==void 0?c:0),z:((d=(p=b[$t])===null||p===void 0?void 0:p.z)!==null&&d!==void 0?d:0)>((h=n.z)!==null&&h!==void 0?h:0)?(v=(y=b[$t])===null||y===void 0?void 0:y.z)!==null&&v!==void 0?v:0:(g=n.z)!==null&&g!==void 0?g:0})}function Jb(e,t){var r=new Map,n={};return e.forEach(function(o){var i,a=o5(o.zIndex)?o.zIndex:o.selected?1e3:0,s=t.get(o.id),c=ji(ji({width:s==null?void 0:s.width,height:s==null?void 0:s.height},o),{},{positionAbsolute:{x:o.position.x,y:o.position.y}});o.parentNode&&(c.parentNode=o.parentNode,n[o.parentNode]=!0),Object.defineProperty(c,$t,{enumerable:!1,value:{handleBounds:s==null||(i=s[$t])===null||i===void 0?void 0:i.handleBounds,z:a}}),r.set(o.id,c)}),r.forEach(function(o){if(o.parentNode&&!r.has(o.parentNode))throw new Error("Parent node ".concat(o.parentNode," not found"));if(o.parentNode||n[o.id]){var i,a,s=p5(o,r,n,ji(ji({},o.position),{},{z:(i=(a=o[$t])===null||a===void 0?void 0:a.z)!==null&&i!==void 0?i:0})),c=s.x,u=s.y,d=s.z;o.positionAbsolute={x:c,y:u},o[$t].z=d,n[o.id]&&(o[$t].isParent=!0)}}),r}function h5(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e(),n=r.nodeInternals,o=r.width,i=r.height,a=r.minZoom,s=r.maxZoom,c=r.d3Zoom,u=r.d3Selection,d=r.fitViewOnInitDone,p=r.fitViewOnInit;if((t.initial&&!d&&p||!t.initial)&&c&&u){var h=Array.from(n.values()).filter(function(R){return t.includeHiddenNodes?R.width&&R.height:!R.hidden}),v=h.every(function(R){return R.width&&R.height});if(h.length>0&&v){var y,g,b,x=j_(h),w=f5(x,o,i,(y=t.minZoom)!==null&&y!==void 0?y:a,(g=t.maxZoom)!==null&&g!==void 0?g:s,(b=t.padding)!==null&&b!==void 0?b:.1),E=He(w,3),S=E[0],_=E[1],O=E[2],N=$o.translate(S,_).scale(O);return typeof t.duration=="number"&&t.duration>0?c.transform(qo(u,t.duration),N):c.transform(u,N),!0}}return!1}function FQ(e,t){return e.forEach(function(r){var n=t.get(r.id);if(n){var o;t.set(n.id,ji(ji({},n),{},(o={},Ge(o,$t,n[$t]),Ge(o,"selected",r.selected),o)))}}),new Map(t)}function $Q(e,t){return t.map(function(r){var n=e.find(function(o){return o.id===r.id});return n&&(r.selected=n.selected),r})}function Ec(e){var t=e.changedNodes,r=e.changedEdges,n=e.get,o=e.set,i=n(),a=i.nodeInternals,s=i.edges,c=i.onNodesChange,u=i.onEdgesChange,d=i.hasDefaultNodes,p=i.hasDefaultEdges;t!=null&&t.length&&(d&&o({nodeInternals:FQ(t,a)}),c==null||c(t)),r!=null&&r.length&&(p&&o({edges:$Q(r,s)}),u==null||u(r))}var Ox=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],KT={width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:Ox,nodeExtent:Ox,nodesSelectionActive:!1,userSelectionActive:!1,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionMode:Qi.Strict,domNode:null,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,elementsSelectable:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,multiSelectionActive:!1,reactFlowVersion:"10.3.17",connectionStartHandle:null,connectOnClick:!0};function YT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function hn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YT(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var q_=JY(),HQ=q_.Provider,Ct=q_.useStore,er=q_.useStoreApi,VQ=function(){return ZY(function(t,r){return hn(hn({},KT),{},{setNodes:function(o){t({nodeInternals:Jb(o,r().nodeInternals)})},setEdges:function(o){var i=r(),a=i.defaultEdgeOptions,s=a===void 0?{}:a;t({edges:o.map(function(c){return hn(hn({},s),c)})})},setDefaultNodesAndEdges:function(o,i){var a=typeof o<"u",s=typeof i<"u",c=a?Jb(o,new Map):new Map,u=s?i:[];t({nodeInternals:c,edges:u,hasDefaultNodes:a,hasDefaultEdges:s})},updateNodeDimensions:function(o){var i=r(),a=i.onNodesChange,s=i.nodeInternals,c=i.fitViewOnInit,u=i.fitViewOnInitDone,d=i.fitViewOnInitOptions,p=i.domNode,h=p==null?void 0:p.querySelector(".react-flow__viewport");if(h){var v=window.getComputedStyle(h),y=new window.DOMMatrixReadOnly(v.transform),g=y.m22,b=o.reduce(function(w,E){var S=s.get(E.id);if(S){var _=D_(E.nodeElement),O=!!(_.width&&_.height&&(S.width!==_.width||S.height!==_.height||E.forceUpdate));O&&(s.set(S.id,hn(hn({},S),{},Ge({},$t,hn(hn({},S[$t]),{},{handleBounds:{source:WT(".source",E.nodeElement,g),target:WT(".target",E.nodeElement,g)}})),_)),w.push({id:S.id,type:"dimensions",dimensions:_}))}return w},[]),x=u||c&&!u&&h5(r,hn({initial:!0},d));t({nodeInternals:new Map(s),fitViewOnInitDone:x}),(b==null?void 0:b.length)>0&&(a==null||a(b))}},updateNodePositions:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=r(),c=s.onNodesChange,u=s.nodeInternals,d=s.hasDefaultNodes;if(d||c){var p=o.map(function(y){var g={id:y.id,type:"position",dragging:a};return i&&(g.positionAbsolute=y.positionAbsolute,g.position=y.position),g});if(p!=null&&p.length){if(d){var h=a5(p,Array.from(u.values())),v=Jb(h,u);t({nodeInternals:v})}c==null||c(p)}}},addSelectedNodes:function(o){var i=r(),a=i.multiSelectionActive,s=i.nodeInternals,c=i.edges,u,d=null;a?u=o.map(function(p){return vo(p,!0)}):(u=Di(Array.from(s.values()),o),d=Di(c,[])),Ec({changedNodes:u,changedEdges:d,get:r,set:t})},addSelectedEdges:function(o){var i=r(),a=i.multiSelectionActive,s=i.edges,c=i.nodeInternals,u,d=null;a?u=o.map(function(p){return vo(p,!0)}):(u=Di(s,o),d=Di(Array.from(c.values()),[])),Ec({changedNodes:d,changedEdges:u,get:r,set:t})},unselectNodesAndEdges:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=o.nodes,a=o.edges,s=r(),c=s.nodeInternals,u=s.edges,d=i||Array.from(c.values()),p=a||u,h=d.map(function(y){return y.selected=!1,vo(y.id,!1)}),v=p.map(function(y){return vo(y.id,!1)});Ec({changedNodes:h,changedEdges:v,get:r,set:t})},setMinZoom:function(o){var i=r(),a=i.d3Zoom,s=i.maxZoom;a==null||a.scaleExtent([o,s]),t({minZoom:o})},setMaxZoom:function(o){var i=r(),a=i.d3Zoom,s=i.minZoom;a==null||a.scaleExtent([s,o]),t({maxZoom:o})},setTranslateExtent:function(o){var i=r(),a=i.d3Zoom;a==null||a.translateExtent(o),t({translateExtent:o})},resetSelectedElements:function(){var o=r(),i=o.nodeInternals,a=o.edges,s=Array.from(i.values()),c=s.filter(function(d){return d.selected}).map(function(d){return vo(d.id,!1)}),u=a.filter(function(d){return d.selected}).map(function(d){return vo(d.id,!1)});Ec({changedNodes:c,changedEdges:u,get:r,set:t})},setNodeExtent:function(o){var i=r(),a=i.nodeInternals;a.forEach(function(s){s.positionAbsolute=r5(s.position,o)}),t({nodeExtent:o,nodeInternals:new Map(a)})},reset:function(){return t(hn({},KT))}})})};function Or(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let r=0,n;r<e.length;r++)(n=Or(e[r]))!==""&&(t+=(t&&" ")+n);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}function dr(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!Object.is(e[r[n]],t[r[n]]))return!1;return!0}function WQ(e){if(Array.isArray(e))return Ex(e)}function UQ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function GQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
55
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ho(e){return WQ(e)||UQ(e)||t5(e)||GQ()}var KQ={zoomIn:function(){},zoomOut:function(){},zoomTo:function(t){},getZoom:function(){return 1},setViewport:function(t){},getViewport:function(){return{x:0,y:0,zoom:1}},fitView:function(){},setCenter:function(t,r){},fitBounds:function(t){},project:function(t){return t},viewportInitialized:!1},YQ=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}},XQ=function(){var t=er(),r=Ct(YQ,dr),n=r.d3Zoom,o=r.d3Selection,i=T.useMemo(function(){return o&&n?{zoomIn:function(s){return n.scaleBy(qo(o,s==null?void 0:s.duration),1.2)},zoomOut:function(s){return n.scaleBy(qo(o,s==null?void 0:s.duration),1/1.2)},zoomTo:function(s,c){return n.scaleTo(qo(o,c==null?void 0:c.duration),s)},getZoom:function(){return t.getState().transform[2]},setViewport:function(s,c){var u,d,p,h=He(t.getState().transform,3),v=h[0],y=h[1],g=h[2],b=$o.translate((u=s.x)!==null&&u!==void 0?u:v,(d=s.y)!==null&&d!==void 0?d:y).scale((p=s.zoom)!==null&&p!==void 0?p:g);n.transform(qo(o,c==null?void 0:c.duration),b)},getViewport:function(){var s=He(t.getState().transform,3),c=s[0],u=s[1],d=s[2];return{x:c,y:u,zoom:d}},fitView:function(s){return h5(t.getState,s)},setCenter:function(s,c,u){var d=t.getState(),p=d.width,h=d.height,v=d.maxZoom,y=typeof(u==null?void 0:u.zoom)<"u"?u.zoom:v,g=p/2-s*y,b=h/2-c*y,x=$o.translate(g,b).scale(y);n.transform(qo(o,u==null?void 0:u.duration),x)},fitBounds:function(s,c){var u,d=t.getState(),p=d.width,h=d.height,v=d.minZoom,y=d.maxZoom,g=f5(s,p,h,v,y,(u=c==null?void 0:c.padding)!==null&&u!==void 0?u:.1),b=He(g,3),x=b[0],w=b[1],E=b[2],S=$o.translate(x,w).scale(E);n.transform(qo(o,c==null?void 0:c.duration),S)},project:function(s){var c=t.getState(),u=c.transform,d=c.snapToGrid,p=c.snapGrid;return c5(s,u,d,p)},viewportInitialized:!0}:KQ},[n,o]);return i};function XT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ci(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XT(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function v5(){var e=XQ(),t=er(),r=T.useCallback(function(){var p=t.getState(),h=p.nodeInternals,v=Array.from(h.values());return v.map(function(y){return Ci({},y)})},[]),n=T.useCallback(function(p){var h=t.getState(),v=h.nodeInternals;return v.get(p)},[]),o=T.useCallback(function(){var p=t.getState(),h=p.edges,v=h===void 0?[]:h;return v.map(function(y){return Ci({},y)})},[]),i=T.useCallback(function(p){var h=t.getState(),v=h.edges,y=v===void 0?[]:v;return y.find(function(g){return g.id===p})},[]),a=T.useCallback(function(p){var h=t.getState(),v=h.nodeInternals,y=h.setNodes,g=h.hasDefaultNodes,b=h.onNodesChange,x=Array.from(v.values()),w=typeof p=="function"?p(x):p;if(g)y(w);else if(b){var E=w.length===0?x.map(function(S){return{type:"remove",id:S.id}}):w.map(function(S){return{item:S,type:"reset"}});b(E)}},[]),s=T.useCallback(function(p){var h=t.getState(),v=h.edges,y=v===void 0?[]:v,g=h.setEdges,b=h.hasDefaultEdges,x=h.onEdgesChange,w=typeof p=="function"?p(y):p;if(b)g(w);else if(x){var E=w.length===0?y.map(function(S){return{type:"remove",id:S.id}}):w.map(function(S){return{item:S,type:"reset"}});x(E)}},[]),c=T.useCallback(function(p){var h=Array.isArray(p)?p:[p],v=t.getState(),y=v.nodeInternals,g=v.setNodes,b=v.hasDefaultNodes,x=v.onNodesChange;if(b){var w=Array.from(y.values()),E=[].concat(w,Ho(h));g(E)}else if(x){var S=h.map(function(_){return{item:_,type:"add"}});x(S)}},[]),u=T.useCallback(function(p){var h=Array.isArray(p)?p:[p],v=t.getState(),y=v.edges,g=y===void 0?[]:y,b=v.setEdges,x=v.hasDefaultEdges,w=v.onEdgesChange;if(x)b([].concat(Ho(g),Ho(h)));else if(w){var E=h.map(function(S){return{item:S,type:"add"}});w(E)}},[]),d=T.useCallback(function(){var p=t.getState(),h=p.nodeInternals,v=p.edges,y=v===void 0?[]:v,g=p.transform,b=Array.from(h.values()),x=He(g,3),w=x[0],E=x[1],S=x[2];return{nodes:b.map(function(_){return Ci({},_)}),edges:y.map(function(_){return Ci({},_)}),viewport:{x:w,y:E,zoom:S}}},[]);return T.useMemo(function(){return Ci(Ci({},e),{},{getNodes:r,getNode:n,getEdges:o,getEdge:i,setNodes:a,setEdges:s,addNodes:c,addEdges:u,toObject:d})},[e,r,n,o,i,a,s,c,u,d])}function ZQ(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function fd(e,t){if(e==null)return{};var r=ZQ(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function JQ(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},T.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function QQ(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},T.createElement("path",{d:"M0 0h32v4.2H0z"}))}function eee(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},T.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function tee(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},T.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function ree(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},T.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}var nee=["children","className"];function ZT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function oee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZT(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Sc=function(t){var r=t.children,n=t.className,o=fd(t,nee);return T.createElement("button",oee({type:"button",className:Or(["react-flow__controls-button",n])},o),r)},iee=function(t){return t.nodesDraggable&&t.nodesConnectable&&t.elementsSelectable},aee=function(t){var r=t.style,n=t.showZoom,o=n===void 0?!0:n,i=t.showFitView,a=i===void 0?!0:i,s=t.showInteractive,c=s===void 0?!0:s,u=t.fitViewOptions,d=t.onZoomIn,p=t.onZoomOut,h=t.onFitView,v=t.onInteractiveChange,y=t.className,g=t.children,b=er(),x=T.useState(!1),w=He(x,2),E=w[0],S=w[1],_=Ct(iee),O=v5(),N=O.zoomIn,R=O.zoomOut,A=O.fitView;if(T.useEffect(function(){S(!0)},[]),!E)return null;var D=function(){N==null||N(),d==null||d()},B=function(){R==null||R(),p==null||p()},j=function(){A==null||A(u),h==null||h()},M=function(){b.setState({nodesDraggable:!_,nodesConnectable:!_,elementsSelectable:!_}),v==null||v(!_)};return T.createElement("div",{className:Or(["react-flow__controls",y]),style:r},o&&T.createElement(T.Fragment,null,T.createElement(Sc,{onClick:D,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in"},T.createElement(JQ,null)),T.createElement(Sc,{onClick:B,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out"},T.createElement(QQ,null))),a&&T.createElement(Sc,{className:"react-flow__controls-fitview",onClick:j,title:"fit view","aria-label":"fit view"},T.createElement(eee,null)),c&&T.createElement(Sc,{className:"react-flow__controls-interactive",onClick:M,title:"toggle interactivity","aria-label":"toggle interactivity"},_?T.createElement(ree,null):T.createElement(tee,null)),g)};aee.displayName="Controls";var see=function(t,r,n){return T.createElement("path",{stroke:n,strokeWidth:r,d:"M".concat(t/2," 0 V").concat(t," M0 ").concat(t/2," H").concat(t)})},lee=function(t,r){return T.createElement("circle",{cx:t,cy:t,r:t,fill:r})},Oc;function JT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function QT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JT(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var cee=(Oc={},Ge(Oc,Ko.Dots,"#81818a"),Ge(Oc,Ko.Lines,"#eee"),Oc),uee=function(t){return t.transform},g5=function(t){var r=t.variant,n=r===void 0?Ko.Dots:r,o=t.gap,i=o===void 0?15:o,a=t.size,s=a===void 0?.4:a,c=t.color,u=t.style,d=t.className,p=T.useRef(null),h=T.useState(null),v=He(h,2),y=v[0],g=v[1],b=Ct(uee),x=He(b,3),w=x[0],E=x[1],S=x[2];T.useEffect(function(){var B=document.querySelectorAll(".react-flow__background"),j=Array.from(B).findIndex(function(M){return M===p.current});g("pattern-".concat(j))},[]);var _=i*S||1,O=w%_,N=E%_,R=n===Ko.Lines,A=c||cee[n],D=R?see(_,s,A):lee(s*S,A);return T.createElement("svg",{className:Or(["react-flow__background","react-flow__container",d]),style:QT(QT({},u),{},{width:"100%",height:"100%"}),ref:p},y&&T.createElement(T.Fragment,null,T.createElement("pattern",{id:y,x:O,y:N,width:_,height:_,patternUnits:"userSpaceOnUse"},D),T.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#".concat(y,")")})))};g5.displayName="Background";var dee=T.memo(g5),fee=["paid-pro","paid-sponsor","paid-enterprise","paid-custom"];function pee(e){var t=e.proOptions,r=e.position,n=r===void 0?"bottom-right":r;if(t!=null&&t.account&&fee.includes(t==null?void 0:t.account)&&t!==null&&t!==void 0&&t.hideAttribution)return null;var o="".concat(n).split("-");return T.createElement("div",{className:Or(["react-flow__attribution"].concat(Ho(o))),"data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev/pricing"},T.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer"},"React Flow"))}var hee=["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"];function eA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function vee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var gee=function(t){var r=t.x,n=t.y,o=t.label,i=t.labelStyle,a=i===void 0?{}:i,s=t.labelShowBg,c=s===void 0?!0:s,u=t.labelBgStyle,d=u===void 0?{}:u,p=t.labelBgPadding,h=p===void 0?[2,4]:p,v=t.labelBgBorderRadius,y=v===void 0?2:v,g=t.children,b=t.className,x=fd(t,hee),w=T.useRef(null),E=T.useState({x:0,y:0,width:0,height:0}),S=He(E,2),_=S[0],O=S[1],N=Or(["react-flow__edge-textwrapper",b]);return T.useEffect(function(){if(w.current){var R=w.current.getBBox();O({x:R.x,y:R.y,width:R.width,height:R.height})}},[o]),typeof o>"u"||!o?null:T.createElement("g",vee({transform:"translate(".concat(r-_.width/2," ").concat(n-_.height/2,")"),className:N},x),c&&T.createElement("rect",{width:_.width+2*h[0],x:-h[0],y:-h[1],height:_.height+2*h[1],className:"react-flow__edge-textbg",style:d,rx:y,ry:y}),T.createElement("text",{className:"react-flow__edge-text",y:_.height/2,dy:"0.3em",ref:w,style:a},o),g)},mee=T.memo(gee),pd=(function(e){var t=e.path,r=e.centerX,n=e.centerY,o=e.label,i=e.labelStyle,a=e.labelShowBg,s=e.labelBgStyle,c=e.labelBgPadding,u=e.labelBgBorderRadius,d=e.style,p=e.markerEnd,h=e.markerStart,v=o?T.createElement(mee,{x:r,y:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:u}):null;return T.createElement(T.Fragment,null,T.createElement("path",{style:d,d:t,className:"react-flow__edge-path",markerEnd:p,markerStart:h}),v)});function yu(e){var t=e.pos,r=e.x1,n=e.y1,o=e.x2,i=e.y2,a,s;switch(t){case Se.Left:case Se.Right:a=.5*(r+o),s=n;break;case Se.Top:case Se.Bottom:a=r,s=.5*(n+i);break}return[a,s]}function m5(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,o=n===void 0?Se.Bottom:n,i=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Se.Top:s,u=yu({pos:o,x1:t,y1:r,x2:i,y2:a}),d=He(u,2),p=d[0],h=d[1],v=yu({pos:c,x1:i,y1:a,x2:t,y2:r}),y=He(v,2),g=y[0],b=y[1];return"M".concat(t,",").concat(r," C").concat(p,",").concat(h," ").concat(g,",").concat(b," ").concat(i,",").concat(a)}function bee(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,o=n===void 0?Se.Bottom:n,i=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Se.Top:s,u=yu({pos:o,x1:t,y1:r,x2:i,y2:a}),d=He(u,2),p=d[0],h=d[1],v=yu({pos:c,x1:i,y1:a,x2:t,y2:r}),y=He(v,2),g=y[0],b=y[1],x=t*.125+p*.375+g*.375+i*.125,w=r*.125+h*.375+b*.375+a*.125,E=Math.abs(x-t),S=Math.abs(w-r);return[x,w,E,S]}var b5=T.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,o=e.targetY,i=e.sourcePosition,a=i===void 0?Se.Bottom:i,s=e.targetPosition,c=s===void 0?Se.Top:s,u=e.label,d=e.labelStyle,p=e.labelShowBg,h=e.labelBgStyle,v=e.labelBgPadding,y=e.labelBgBorderRadius,g=e.style,b=e.markerEnd,x=e.markerStart,w={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:o,targetPosition:c},E=m5(w),S=bee(w),_=He(S,2),O=_[0],N=_[1];return T.createElement(pd,{path:E,centerX:O,centerY:N,label:u,labelStyle:d,labelShowBg:p,labelBgStyle:h,labelBgPadding:v,labelBgBorderRadius:y,style:g,markerEnd:b,markerStart:x})});function tA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function yee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var rA=[Se.Left,Se.Right],y5=function(t){var r=t.sourceX,n=t.sourceY,o=t.targetX,i=t.targetY,a=t.sourcePosition,s=a===void 0?Se.Bottom:a,c=t.targetPosition,u=c===void 0?Se.Top:c,d=rA.includes(s),p=rA.includes(u),h=d&&!p||p&&!d;if(h){var v=d?Math.abs(o-r):0,y=r>o?r-v:r+v,g=d?0:Math.abs(i-n),b=n<i?n+g:n-g;return[y,b,v,g]}var x=Math.abs(o-r)/2,w=o<r?o+x:o-x,E=Math.abs(i-n)/2,S=i<n?i+E:i-E;return[w,S,x,E]};function Va(e,t,r){return r===void 0?r:function(n){var o=t().edges.find(function(i){return i.id===e});r(n,yee({},o))}}var Qb=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},ey=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},ty=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},ry=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},ny=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)},oy=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},iy=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},ay=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)};function Cx(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,o=n===void 0?Se.Bottom:n,i=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Se.Top:s,u=e.borderRadius,d=u===void 0?5:u,p=e.centerX,h=e.centerY,v=y5({sourceX:t,sourceY:r,targetX:i,targetY:a}),y=He(v,4),g=y[0],b=y[1],x=y[2],w=y[3],E=Math.min(d,Math.abs(i-t)),S=Math.min(d,Math.abs(a-r)),_=Math.min(E,S,x,w),O=[Se.Left,Se.Right],N=typeof p<"u"?p:g,R=typeof h<"u"?h:b,A=null,D=null;return t<=i?(A=r<=a?Qb(t,R,_):oy(t,R,_),D=r<=a?ay(i,R,_):ry(i,R,_)):(A=r<a?ty(t,R,_):iy(t,R,_),D=r<a?ny(i,R,_):ey(i,R,_)),O.includes(o)&&O.includes(c)?t<=i?(A=r<=a?ay(N,r,_):ry(N,r,_),D=r<=a?Qb(N,a,_):oy(N,a,_)):(o===Se.Right&&c===Se.Left||o===Se.Left&&c===Se.Right||o===Se.Left&&c===Se.Left)&&(A=r<=a?ny(N,r,_):ey(N,r,_),D=r<=a?ty(N,a,_):iy(N,a,_)):O.includes(o)&&!O.includes(c)?(t<=i?A=r<=a?ay(i,r,_):ry(i,r,_):A=r<=a?ny(i,r,_):ey(i,r,_),D=""):!O.includes(o)&&O.includes(c)&&(t<=i?A=r<=a?Qb(t,a,_):oy(t,a,_):A=r<=a?ty(t,a,_):iy(t,a,_),D=""),"M ".concat(t,",").concat(r).concat(A).concat(D,"L ").concat(i,",").concat(a)}var L_=T.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,o=e.targetY,i=e.label,a=e.labelStyle,s=e.labelShowBg,c=e.labelBgStyle,u=e.labelBgPadding,d=e.labelBgBorderRadius,p=e.style,h=e.sourcePosition,v=h===void 0?Se.Bottom:h,y=e.targetPosition,g=y===void 0?Se.Top:y,b=e.markerEnd,x=e.markerStart,w=e.borderRadius,E=w===void 0?5:w,S=y5({sourceX:t,sourceY:r,targetX:n,targetY:o,sourcePosition:v,targetPosition:g}),_=He(S,2),O=_[0],N=_[1],R=Cx({sourceX:t,sourceY:r,sourcePosition:v,targetX:n,targetY:o,targetPosition:g,borderRadius:E});return T.createElement(pd,{path:R,centerX:O,centerY:N,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:p,markerEnd:b,markerStart:x})});function nA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function oA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var w5=T.memo(function(e){return T.createElement(L_,oA(oA({},e),{},{borderRadius:0}))}),x5=T.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,o=e.targetY,i=e.label,a=e.labelStyle,s=e.labelShowBg,c=e.labelBgStyle,u=e.labelBgPadding,d=e.labelBgBorderRadius,p=e.style,h=e.markerEnd,v=e.markerStart,y=Math.abs(o-r)/2,g=o<r?o+y:o-y,b=Math.abs(n-t)/2,x=n<t?n+b:n-b,w="M ".concat(t,",").concat(r,"L ").concat(n,",").concat(o);return T.createElement(pd,{path:w,centerX:x,centerY:g,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:p,markerEnd:h,markerStart:v})});function Cc(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function wu(e){var t=e.pos,r=e.x1,n=e.y1,o=e.x2,i=e.y2,a=e.c,s,c;switch(t){case Se.Left:s=r-Cc(r-o,a),c=n;break;case Se.Right:s=r+Cc(o-r,a),c=n;break;case Se.Top:s=r,c=n-Cc(n-i,a);break;case Se.Bottom:s=r,c=n+Cc(i-n,a);break}return[s,c]}function hd(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,o=n===void 0?Se.Bottom:n,i=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Se.Top:s,u=e.curvature,d=u===void 0?.25:u,p=wu({pos:o,x1:t,y1:r,x2:i,y2:a,c:d}),h=He(p,2),v=h[0],y=h[1],g=wu({pos:c,x1:i,y1:a,x2:t,y2:r,c:d}),b=He(g,2),x=b[0],w=b[1];return"M".concat(t,",").concat(r," C").concat(v,",").concat(y," ").concat(x,",").concat(w," ").concat(i,",").concat(a)}function wee(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,o=n===void 0?Se.Bottom:n,i=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Se.Top:s,u=e.curvature,d=u===void 0?.25:u,p=wu({pos:o,x1:t,y1:r,x2:i,y2:a,c:d}),h=He(p,2),v=h[0],y=h[1],g=wu({pos:c,x1:i,y1:a,x2:t,y2:r,c:d}),b=He(g,2),x=b[0],w=b[1],E=t*.125+v*.375+x*.375+i*.125,S=r*.125+y*.375+w*.375+a*.125,_=Math.abs(E-t),O=Math.abs(S-r);return[E,S,_,O]}var Ix=T.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,o=e.targetY,i=e.sourcePosition,a=i===void 0?Se.Bottom:i,s=e.targetPosition,c=s===void 0?Se.Top:s,u=e.label,d=e.labelStyle,p=e.labelShowBg,h=e.labelBgStyle,v=e.labelBgPadding,y=e.labelBgBorderRadius,g=e.style,b=e.markerEnd,x=e.markerStart,w=e.curvature,E={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:o,targetPosition:c,curvature:w},S=hd(E),_=wee(E),O=He(_,2),N=O[0],R=O[1];return T.createElement(pd,{path:S,centerX:N,centerY:R,label:u,labelStyle:d,labelShowBg:p,labelBgStyle:h,labelBgPadding:v,labelBgBorderRadius:y,style:g,markerEnd:b,markerStart:x})}),z_=T.createContext(null),xee=z_.Provider;z_.Consumer;function Rx(e,t,r,n,o,i,a){var s=a.elementFromPoint(e.clientX,e.clientY),c=(s==null?void 0:s.classList.contains("target"))||!1,u=(s==null?void 0:s.classList.contains("source"))||!1,d={elementBelow:s,isValid:!1,connection:{source:null,target:null,sourceHandle:null,targetHandle:null},isHoveringHandle:!1};if(s&&(c||u)){d.isHoveringHandle=!0;var p=s.getAttribute("data-nodeid"),h=s.getAttribute("data-handleid"),v=r?{source:p,sourceHandle:h,target:n,targetHandle:o}:{source:n,sourceHandle:o,target:p,targetHandle:h};d.connection=v;var y=t===Qi.Strict?r&&u||!r&&c:!0;y&&(d.isValid=i(v))}return d}function sy(e){e==null||e.classList.remove("react-flow__handle-valid"),e==null||e.classList.remove("react-flow__handle-connecting")}function _5(e){var t=e.event,r=e.handleId,n=e.nodeId,o=e.onConnect,i=e.isTarget,a=e.getState,s=e.setState,c=e.isValidConnection,u=e.elementEdgeUpdaterType,d=e.onEdgeUpdateEnd,p=t.target.closest(".react-flow"),h=n5(t.target);if(!h)return;var v=h.elementFromPoint(t.clientX,t.clientY),y=v==null?void 0:v.classList.contains("target"),g=v==null?void 0:v.classList.contains("source");if(!p||!y&&!g&&!u)return;var b=a(),x=b.onConnectStart,w=b.connectionMode,E=u||(y?"target":"source"),S=p.getBoundingClientRect(),_;s({connectionPosition:{x:t.clientX-S.left,y:t.clientY-S.top},connectionNodeId:n,connectionHandleId:r,connectionHandleType:E}),x==null||x(t,{nodeId:n,handleId:r,handleType:E});function O(R){s({connectionPosition:{x:R.clientX-S.left,y:R.clientY-S.top}});var A=Rx(R,w,i,n,r,c,h),D=A.connection,B=A.elementBelow,j=A.isValid,M=A.isHoveringHandle;if(!M)return sy(_);D.source!==D.target&&B&&(sy(_),_=B,B.classList.add("react-flow__handle-connecting"),B.classList.toggle("react-flow__handle-valid",j))}function N(R){var A=a(),D=A.onConnectStop,B=A.onConnectEnd,j=Rx(R,w,i,n,r,c,h),M=j.connection,P=j.isValid;D==null||D(R),P&&(o==null||o(M)),B==null||B(R),u&&d&&d(R),sy(_),s({connectionNodeId:null,connectionHandleId:null,connectionHandleType:null}),h.removeEventListener("mousemove",O),h.removeEventListener("mouseup",N)}h.addEventListener("mousemove",O),h.addEventListener("mouseup",N)}var _ee=["type","position","isValidConnection","isConnectable","id","onConnect","children","className","onMouseDown"];function iA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ly(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Eee=function(){return!0},See=function(t){return{connectionStartHandle:t.connectionStartHandle,connectOnClick:t.connectOnClick}},E5=T.forwardRef(function(e,t){var r=e.type,n=r===void 0?"source":r,o=e.position,i=o===void 0?Se.Top:o,a=e.isValidConnection,s=a===void 0?Eee:a,c=e.isConnectable,u=c===void 0?!0:c,d=e.id,p=e.onConnect,h=e.children,v=e.className,y=e.onMouseDown,g=fd(e,_ee),b=er(),x=T.useContext(z_),w=Ct(See,dr),E=w.connectionStartHandle,S=w.connectOnClick,_=d||null,O=n==="target",N=function(B){var j=b.getState(),M=j.defaultEdgeOptions,P=j.onConnect,V=j.hasDefaultEdges,q=ly(ly({},M),B);if(V){var G=b.getState(),W=G.edges;b.setState({edges:BQ(q,W)})}P==null||P(q),p==null||p(q)},R=function(B){B.button===0&&_5({event:B,handleId:_,nodeId:x,onConnect:N,isTarget:O,getState:b.getState,setState:b.setState,isValidConnection:s}),y==null||y(B)},A=function(B){var j=b.getState(),M=j.onClickConnectStart,P=j.onClickConnectStop,V=j.onClickConnectEnd,q=j.connectionMode;if(!E){M==null||M(B,{nodeId:x,handleId:_,handleType:n}),b.setState({connectionStartHandle:{nodeId:x,type:n,handleId:_}});return}var G=n5(B.target),W=Rx(B,q,E.type==="target",E.nodeId,E.handleId||null,s,G),Q=W.connection,z=W.isValid;P==null||P(B),z&&N(Q),V==null||V(B),b.setState({connectionStartHandle:null})};return T.createElement("div",ly({"data-handleid":_,"data-nodeid":x,"data-handlepos":i,className:Or(["react-flow__handle","react-flow__handle-".concat(i),"nodrag",v,{source:!O,target:O,connectable:u,connecting:(E==null?void 0:E.nodeId)===x&&(E==null?void 0:E.handleId)===_&&(E==null?void 0:E.type)===n}]),onMouseDown:R,onClick:S?A:void 0,ref:t},g),h)});E5.displayName="Handle";var xu=T.memo(E5),S5=function(t){var r=t.data,n=t.isConnectable,o=t.targetPosition,i=o===void 0?Se.Top:o,a=t.sourcePosition,s=a===void 0?Se.Bottom:a;return T.createElement(T.Fragment,null,T.createElement(xu,{type:"target",position:i,isConnectable:n}),r==null?void 0:r.label,T.createElement(xu,{type:"source",position:s,isConnectable:n}))};S5.displayName="DefaultNode";var Nx=T.memo(S5),O5=function(t){var r=t.data,n=t.isConnectable,o=t.sourcePosition,i=o===void 0?Se.Bottom:o;return T.createElement(T.Fragment,null,r==null?void 0:r.label,T.createElement(xu,{type:"source",position:i,isConnectable:n}))};O5.displayName="InputNode";var C5=T.memo(O5),I5=function(t){var r=t.data,n=t.isConnectable,o=t.targetPosition,i=o===void 0?Se.Top:o;return T.createElement(T.Fragment,null,T.createElement(xu,{type:"target",position:i,isConnectable:n}),r==null?void 0:r.label)};I5.displayName="OutputNode";var R5=T.memo(I5),Oee=function(t){return{selectedNodes:Array.from(t.nodeInternals.values()).filter(function(r){return r.selected}),selectedEdges:t.edges.filter(function(r){return r.selected})}},Cee=function(t,r){var n=t.selectedNodes.map(function(s){return s.id}),o=r.selectedNodes.map(function(s){return s.id}),i=t.selectedEdges.map(function(s){return s.id}),a=r.selectedEdges.map(function(s){return s.id});return dr(n,o)&&dr(i,a)};function Iee(e){var t=e.onSelectionChange,r=Ct(Oee,Cee),n=r.selectedNodes,o=r.selectedEdges;return T.useEffect(function(){t({nodes:n,edges:o})},[n,o]),null}var Ree=T.memo(Iee),Nee=function(t){return{setNodes:t.setNodes,setEdges:t.setEdges,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset}};function uo(e,t){T.useEffect(function(){typeof e<"u"&&t(e)},[e])}function dt(e,t,r){T.useEffect(function(){typeof t<"u"&&r(Ge({},e,t))},[t])}var Pee=function(t){var r=t.nodes,n=t.edges,o=t.defaultNodes,i=t.defaultEdges,a=t.onConnect,s=t.onConnectStart,c=t.onConnectStop,u=t.onConnectEnd,d=t.onClickConnectStart,p=t.onClickConnectStop,h=t.onClickConnectEnd,v=t.nodesDraggable,y=t.nodesConnectable,g=t.minZoom,b=t.maxZoom,x=t.nodeExtent,w=t.onNodesChange,E=t.onEdgesChange,S=t.elementsSelectable,_=t.connectionMode,O=t.snapGrid,N=t.snapToGrid,R=t.translateExtent,A=t.connectOnClick,D=t.defaultEdgeOptions,B=t.fitView,j=t.fitViewOptions,M=t.onNodesDelete,P=t.onEdgesDelete,V=t.onNodeDrag,q=t.onNodeDragStart,G=t.onNodeDragStop,W=t.onSelectionDrag,Q=t.onSelectionDragStart,z=t.onSelectionDragStop,U=Ct(Nee,dr),ie=U.setNodes,te=U.setEdges,$=U.setDefaultNodesAndEdges,K=U.setMinZoom,Z=U.setMaxZoom,H=U.setTranslateExtent,Y=U.setNodeExtent,oe=U.reset,re=er();return T.useEffect(function(){return $(o,i),function(){oe()}},[]),dt("defaultEdgeOptions",D,re.setState),dt("connectionMode",_,re.setState),dt("onConnect",a,re.setState),dt("onConnectStart",s,re.setState),dt("onConnectStop",c,re.setState),dt("onConnectEnd",u,re.setState),dt("onClickConnectStart",d,re.setState),dt("onClickConnectStop",p,re.setState),dt("onClickConnectEnd",h,re.setState),dt("nodesDraggable",v,re.setState),dt("nodesConnectable",y,re.setState),dt("elementsSelectable",S,re.setState),dt("snapToGrid",N,re.setState),dt("snapGrid",O,re.setState),dt("onNodesChange",w,re.setState),dt("onEdgesChange",E,re.setState),dt("connectOnClick",A,re.setState),dt("fitViewOnInit",B,re.setState),dt("fitViewOnInitOptions",j,re.setState),dt("onNodesDelete",M,re.setState),dt("onEdgesDelete",P,re.setState),dt("onNodeDrag",V,re.setState),dt("onNodeDragStart",q,re.setState),dt("onNodeDragStop",G,re.setState),dt("onSelectionDrag",W,re.setState),dt("onSelectionDragStart",Q,re.setState),dt("onSelectionDragStop",z,re.setState),uo(r,ie),uo(n,te),uo(o,ie),uo(i,te),uo(g,K),uo(b,Z),uo(R,H),uo(x,Y),null},Tee=".react-flow{height:100%;overflow:hidden;position:relative;width:100%}.react-flow__container{height:100%;left:0;position:absolute;top:0;width:100%}.react-flow__pane{z-index:1}.react-flow__viewport{pointer-events:none;transform-origin:0 0;z-index:2}.react-flow__renderer{z-index:4}.react-flow__selectionpane{z-index:5}.react-flow .react-flow__edges{overflow:visible;pointer-events:none}.react-flow .react-flow__connectionline{z-index:1001}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.inactive{pointer-events:none}@-webkit-keyframes dashdraw{0%{stroke-dashoffset:10}}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edge-path{fill:none}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__connection-path{fill:none}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{box-sizing:border-box;pointer-events:all;position:absolute;transform-origin:0 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.react-flow__nodesselection{pointer-events:none;transform-origin:left top;z-index:3}.react-flow__nodesselection-rect{cursor:-webkit-grab;cursor:grab;pointer-events:all;position:absolute}.react-flow__handle{pointer-events:none;position:absolute}.react-flow__handle.connectable{pointer-events:all}.react-flow__handle-bottom{bottom:-4px;left:50%;top:auto;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{left:-4px;top:50%;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__controls{bottom:20px;left:15px;position:absolute;z-index:5}.react-flow__controls-button{border:none;height:24px;width:24px}.react-flow__controls-button svg{width:100%}.react-flow__minimap{bottom:20px;position:absolute;right:15px;z-index:5}.react-flow__attribution{background:hsla(0,0%,100%,.5);color:#999;font-size:10px;padding:2px 3px;position:absolute;z-index:1000}.react-flow__attribution a{color:#555;text-decoration:none}.react-flow__attribution.top{top:0}.react-flow__attribution.bottom{bottom:0}.react-flow__attribution.left{left:0}.react-flow__attribution.right{right:0}.react-flow__attribution.center{left:50%;transform:translateX(-50%)}",Aee=Tee,kee=".react-flow__edge.selected .react-flow__edge-path{stroke:#555}.react-flow__edge.animated path{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-path{stroke:#b1b1b7;stroke-width:1}.react-flow__edge-text{font-size:10px}.react-flow__edge-textbg{fill:#fff}.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1}.react-flow__node{cursor:-webkit-grab;cursor:grab}.react-flow__node-default,.react-flow__node-group,.react-flow__node-input,.react-flow__node-output{background:#fff;border:1px solid #1a192b;border-radius:3px;color:#222;font-size:12px;padding:10px;text-align:center;width:150px}.react-flow__node-default.selected,.react-flow__node-group.selected,.react-flow__node-input.selected,.react-flow__node-output.selected{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-default .react-flow__handle,.react-flow__node-group .react-flow__handle,.react-flow__node-input .react-flow__handle,.react-flow__node-output .react-flow__handle{background:#1a192b}.react-flow__node-default.selectable:hover,.react-flow__node-group.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover{box-shadow:0 1px 4px 1px rgba(0,0,0,.08)}.react-flow__node-default.selectable.selected,.react-flow__node-group.selectable.selected,.react-flow__node-input.selectable.selected,.react-flow__node-output.selectable.selected{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background:hsla(0,0%,94%,.25);border-color:#1a192b}.react-flow__nodesselection-rect,.react-flow__selection{background:rgba(0,89,220,.08);border:1px dotted rgba(0,89,220,.8)}.react-flow__handle{background:#555;border:1px solid #fff;border-radius:100%;height:6px;width:6px}.react-flow__handle.connectable{cursor:crosshair}.react-flow__minimap{background-color:#fff}.react-flow__controls{box-shadow:0 0 2px 1px rgba(0,0,0,.08)}.react-flow__controls-button{align-items:center;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;cursor:pointer;display:flex;height:16px;justify-content:center;padding:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:16px}.react-flow__controls-button svg{max-height:12px;max-width:12px}.react-flow__controls-button:hover{background:#f4f4f4}",Mee=kee,Dee=function(t,r,n){return n===Se.Left?t-r:n===Se.Right?t+r:t},jee=function(t,r,n){return n===Se.Top?t-r:n===Se.Bottom?t+r:t},aA=function(t){var r=t.className,n=t.position,o=t.centerX,i=t.centerY,a=t.radius,s=a===void 0?10:a;return T.createElement("circle",{className:Or(["react-flow__edgeupdater",r]),cx:Dee(o,s,n),cy:jee(i,s,n),r:s,stroke:"transparent",fill:"transparent"})},Ii=(function(e){var t=function(n){var o=n.id,i=n.className,a=n.type,s=n.data,c=n.onClick,u=n.onEdgeDoubleClick,d=n.selected,p=n.animated,h=n.label,v=n.labelStyle,y=n.labelShowBg,g=n.labelBgStyle,b=n.labelBgPadding,x=n.labelBgBorderRadius,w=n.style,E=n.source,S=n.target,_=n.sourceX,O=n.sourceY,N=n.targetX,R=n.targetY,A=n.sourcePosition,D=n.targetPosition,B=n.elementsSelectable,j=n.hidden,M=n.sourceHandleId,P=n.targetHandleId,V=n.onContextMenu,q=n.onMouseEnter,G=n.onMouseMove,W=n.onMouseLeave,Q=n.edgeUpdaterRadius,z=n.onEdgeUpdate,U=n.onEdgeUpdateStart,ie=n.onEdgeUpdateEnd,te=n.markerEnd,$=n.markerStart,K=n.rfId,Z=T.useState(!1),H=He(Z,2),Y=H[0],oe=H[1],re=er(),se=function(ct){var Lt=re.getState(),pr=Lt.edges,Cr=Lt.addSelectedEdges,Kt=pr.find(function(Tt){return Tt.id===o});B&&(re.setState({nodesSelectionActive:!1}),Cr([o])),c==null||c(ct,Kt)},ee=Va(o,re.getState,u),we=Va(o,re.getState,V),ve=Va(o,re.getState,q),Ee=Va(o,re.getState,G),pe=Va(o,re.getState,W),ce=function(ct,Lt){var pr=Lt?S:E,Cr=(Lt?P:M)||null,Kt=Lt?"target":"source",Tt=function(){return!0},Yt=Lt,ln=re.getState().edges.find(function(cn){return cn.id===o});U==null||U(ct,ln,Kt);var Oo=ie?function(cn){return ie(cn,ln,Kt)}:void 0,Xn=function(ai){return z==null?void 0:z(ln,ai)};_5({event:ct,handleId:Cr,nodeId:pr,onConnect:Xn,isTarget:Yt,getState:re.getState,setState:re.setState,isValidConnection:Tt,elementEdgeUpdaterType:Kt,onEdgeUpdateEnd:Oo})},Ce=function(ct){return ce(ct,!0)},ke=function(ct){return ce(ct,!1)},Ke=function(){return oe(!0)},ze=function(){return oe(!1)},rt=T.useMemo(function(){return"url(#".concat(Sx($,K),")")},[$,K]),Xe=T.useMemo(function(){return"url(#".concat(Sx(te,K),")")},[te,K]);if(j)return null;var It=!B&&!c,lt=typeof z<"u",Wt=Or(["react-flow__edge","react-flow__edge-".concat(a),i,{selected:d,animated:p,inactive:It,updating:Y}]);return T.createElement("g",{className:Wt,onClick:se,onDoubleClick:ee,onContextMenu:we,onMouseEnter:ve,onMouseMove:Ee,onMouseLeave:pe},T.createElement(e,{id:o,source:E,target:S,selected:d,animated:p,label:h,labelStyle:v,labelShowBg:y,labelBgStyle:g,labelBgPadding:b,labelBgBorderRadius:x,data:s,style:w,sourceX:_,sourceY:O,targetX:N,targetY:R,sourcePosition:A,targetPosition:D,sourceHandleId:M,targetHandleId:P,markerStart:rt,markerEnd:Xe,"data-testid":"rf__edge-".concat(o)}),lt&&T.createElement("g",{onMouseDown:Ce,onMouseEnter:Ke,onMouseOut:ze},T.createElement(aA,{position:A,centerX:_,centerY:O,radius:Q})),lt&&T.createElement("g",{onMouseDown:ke,onMouseEnter:Ke,onMouseOut:ze},T.createElement(aA,{position:D,centerX:N,centerY:R,radius:Q})))};return t.displayName="EdgeWrapper",T.memo(t)});function sA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function lA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qee(e){var t={default:Ii(e.default||Ix),straight:Ii(e.bezier||x5),step:Ii(e.step||w5),smoothstep:Ii(e.step||L_),simplebezier:Ii(e.simplebezier||b5)},r={},n=Object.keys(e).filter(function(o){return!["default","bezier"].includes(o)}).reduce(function(o,i){return o[i]=Ii(e[i]||Ix),o},r);return lA(lA({},t),n)}function cA(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=((r==null?void 0:r.x)||0)+t.x,o=((r==null?void 0:r.y)||0)+t.y,i=(r==null?void 0:r.width)||t.width,a=(r==null?void 0:r.height)||t.height;switch(e){case Se.Top:return{x:n+i/2,y:o};case Se.Right:return{x:n+i,y:o+a/2};case Se.Bottom:return{x:n+i/2,y:o+a};case Se.Left:return{x:n,y:o+a/2}}}function uA(e,t){if(!e)return null;var r=null;return e.length===1||!t?r=e[0]:t&&(r=e.find(function(n){return n.id===t})),typeof r>"u"?null:r}var Lee=function(t,r,n,o,i,a){var s=cA(n,t,r),c=cA(a,o,i);return{sourceX:s.x,sourceY:s.y,targetX:c.x,targetY:c.y}};function zee(e){var t=e.sourcePos,r=e.targetPos,n=e.sourceWidth,o=e.sourceHeight,i=e.targetWidth,a=e.targetHeight,s=e.width,c=e.height,u=e.transform,d={x:Math.min(t.x,r.x),y:Math.min(t.y,r.y),x2:Math.max(t.x+n,r.x+i),y2:Math.max(t.y+o,r.y+a)};d.x===d.x2&&(d.x2+=1),d.y===d.y2&&(d.y2+=1);var p=bu({x:(0-u[0])/u[2],y:(0-u[1])/u[2],width:s/u[2],height:c/u[2]}),h=Math.max(0,Math.min(p.x2,d.x2)-Math.max(p.x,d.x)),v=Math.max(0,Math.min(p.y2,d.y2)-Math.max(p.y,d.y)),y=Math.ceil(h*v);return y>0}function dA(e,t){var r,n,o,i,a,s=e.get(t),c=(s==null||(r=s[$t])===null||r===void 0?void 0:r.handleBounds)||null,u=!s||!c||!s.width||!s.height||typeof((n=s.positionAbsolute)===null||n===void 0?void 0:n.x)>"u"||typeof((o=s.positionAbsolute)===null||o===void 0?void 0:o.y)>"u";return[{x:(s==null||(i=s.positionAbsolute)===null||i===void 0?void 0:i.x)||0,y:(s==null||(a=s.positionAbsolute)===null||a===void 0?void 0:a.y)||0,width:(s==null?void 0:s.width)||0,height:(s==null?void 0:s.height)||0},c,!u]}var Bee=typeof document<"u"?document:null,_u=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{target:Bee},r=T.useState(!1),n=He(r,2),o=n[0],i=n[1],a=T.useRef(new Set([])),s=T.useMemo(function(){if(e!==null){var p=Array.isArray(e)?e:[e],h=p.filter(function(y){return typeof y=="string"}).map(function(y){return y.split("+")}),v=h.reduce(function(y,g){return y.concat.apply(y,Ho(g))},[]);return[h,v]}return[[],[]]},[e]),c=He(s,2),u=c[0],d=c[1];return T.useEffect(function(){if(e!==null){var p,h,v=function(x){if(hA(x))return!1;var w=pA(x.code,d);a.current.add(x[w]),fA(u,a.current,!1)&&(x.preventDefault(),i(!0))},y=function(x){if(hA(x))return!1;var w=pA(x.code,d);fA(u,a.current,!0)?(i(!1),a.current.clear()):a.current.delete(x[w])},g=function(){a.current.clear(),i(!1)};return t==null||(p=t.target)===null||p===void 0||p.addEventListener("keydown",v),t==null||(h=t.target)===null||h===void 0||h.addEventListener("keyup",y),window.addEventListener("blur",g),function(){var b,x;t==null||(b=t.target)===null||b===void 0||b.removeEventListener("keydown",v),t==null||(x=t.target)===null||x===void 0||x.removeEventListener("keyup",y),window.removeEventListener("blur",g)}}},[e,i]),o});function fA(e,t,r){return e.filter(function(n){return r||n.length===t.size}).some(function(n){return n.every(function(o){return t.has(o)})})}function pA(e,t){return t.includes(e)?"code":"key"}function hA(e){var t,r=((t=e.composedPath)===null||t===void 0?void 0:t.call(e)[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(r==null?void 0:r.nodeName)||(r==null?void 0:r.hasAttribute("contenteditable"))}var Fee=function(t){return{onNodesChange:t.onNodesChange,onEdgesChange:t.onEdgesChange}},$ee=(function(e){var t=e.deleteKeyCode,r=e.multiSelectionKeyCode,n=er(),o=Ct(Fee,dr),i=o.onNodesChange,a=o.onEdgesChange,s=_u(t),c=_u(r);T.useEffect(function(){var u=n.getState(),d=u.nodeInternals,p=u.edges,h=u.hasDefaultNodes,v=u.hasDefaultEdges,y=u.onNodesDelete,g=u.onEdgesDelete,b=Array.from(d.values()),x=b.reduce(function(R,A){return(!A.selected&&A.parentNode&&R.find(function(D){return D.id===A.parentNode})||A.selected)&&R.push(A),R},[]),w=p.filter(function(R){return R.selected});if(s&&(x||w)){var E=d5(x,p),S=[].concat(Ho(w),Ho(E)),_=S.reduce(function(R,A){return R.includes(A.id)||R.push(A.id),R},[]);if((v||h)&&(v&&n.setState({edges:p.filter(function(R){return!_.includes(R.id)})}),h&&(x.forEach(function(R){d.delete(R.id)}),n.setState({nodeInternals:new Map(d)}))),_.length>0&&(g==null||g(S),a)){var O=_.map(function(R){return{id:R,type:"remove"}});a(O)}if(x.length>0&&(y==null||y(x),i)){var N=x.map(function(R){return{id:R.id,type:"remove"}});i(N)}n.setState({nodesSelectionActive:!1})}},[s,i,a]),T.useEffect(function(){n.setState({multiSelectionActive:c})},[c])});function Hee(e){var t=er();T.useEffect(function(){var r,n=function(){if(e.current){var i=D_(e.current);process.env.NODE_ENV==="development"&&(i.height===0||i.width===0)&&console.warn("[React Flow]: The React Flow parent container needs a width and a height to render the graph. Help: https://reactflow.dev/error#400"),t.setState({width:i.width||500,height:i.height||500})}};return n(),window.onresize=n,e.current&&(r=new ResizeObserver(function(){return n()}),r.observe(e.current)),function(){window.onresize=null,r&&e.current&&r.unobserve(e.current)}},[])}var Vee=function(t,r){return t.x!==r.x||t.y!==r.y||t.zoom!==r.k},cy=function(t){return{x:t.x,y:t.y,zoom:t.k}},Ic=function(t,r){return t.target.closest(".".concat(r))},Wee=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler}},Uee=function(t){var r=t.onMove,n=t.onMoveStart,o=t.onMoveEnd,i=t.zoomOnScroll,a=i===void 0?!0:i,s=t.zoomOnPinch,c=s===void 0?!0:s,u=t.panOnScroll,d=u===void 0?!1:u,p=t.panOnScrollSpeed,h=p===void 0?.5:p,v=t.panOnScrollMode,y=v===void 0?Bi.Free:v,g=t.zoomOnDoubleClick,b=g===void 0?!0:g,x=t.selectionKeyPressed,w=t.elementsSelectable,E=t.panOnDrag,S=E===void 0?!0:E,_=t.translateExtent,O=t.minZoom,N=t.maxZoom,R=t.defaultZoom,A=R===void 0?1:R,D=t.defaultPosition,B=D===void 0?[0,0]:D,j=t.zoomActivationKeyCode,M=t.preventScrolling,P=M===void 0?!0:M,V=t.children,q=t.noWheelClassName,G=t.noPanClassName,W=er(),Q=T.useRef(!1),z=T.useRef(null),U=T.useRef({x:0,y:0,zoom:0}),ie=Ct(Wee,dr),te=ie.d3Zoom,$=ie.d3Selection,K=ie.d3ZoomHandler,Z=_u(j);return Hee(z),T.useEffect(function(){if(z.current){var H,Y=PQ().scaleExtent([O,N]).translateExtent(_),oe=Zr(z.current).call(Y),re=Fi(B[0],_[0][0],_[1][0]),se=Fi(B[1],_[0][1],_[1][1]),ee=Fi(A,O,N),we=$o.translate(re,se).scale(ee);Y.transform(oe,we),W.setState({d3Zoom:Y,d3Selection:oe,d3ZoomHandler:oe.on("wheel.zoom"),transform:[re,se,ee],domNode:(H=oe.node())===null||H===void 0?void 0:H.closest(".react-flow")})}},[]),T.useEffect(function(){$&&te&&(d&&!Z?$.on("wheel",function(H){if(Ic(H,q))return!1;H.preventDefault(),H.stopImmediatePropagation();var Y=$.property("__zoom").k||1;if(H.ctrlKey&&c){var oe=mn(H),re=-H.deltaY*(H.deltaMode===1?.05:H.deltaMode?1:.002)*10,se=Y*Math.pow(2,re);te.scaleTo($,se,oe);return}var ee=H.deltaMode===1?20:1,we=y===Bi.Vertical?0:H.deltaX*ee,ve=y===Bi.Horizontal?0:H.deltaY*ee;te.translateBy($,-(we/Y)*h,-(ve/Y)*h)}).on("wheel.zoom",null):typeof K<"u"&&$.on("wheel",function(H){if(!P||Ic(H,q))return null;H.preventDefault()}).on("wheel.zoom",K))},[d,y,$,te,K,Z,c,P,q]),T.useEffect(function(){te&&(x&&!Q.current?te.on("zoom",null):x||te.on("zoom",function(H){if(W.setState({transform:[H.transform.x,H.transform.y,H.transform.k]}),r){var Y=cy(H.transform);r(H.sourceEvent,Y)}}))},[x,te,r]),T.useEffect(function(){te&&te.on("start",function(H){if(Q.current=!0,n){var Y=cy(H.transform);U.current=Y,n(H.sourceEvent,Y)}})},[te,n]),T.useEffect(function(){te&&te.on("end",function(H){if(Q.current=!1,o&&Vee(U.current,H.transform)){var Y=cy(H.transform);U.current=Y,o(H.sourceEvent,Y)}})},[te,o]),T.useEffect(function(){te&&te.filter(function(H){var Y=Z||a,oe=c&&H.ctrlKey;return!S&&!Y&&!d&&!b&&!c||x||!b&&H.type==="dblclick"||Ic(H,q)&&H.type==="wheel"||Ic(H,G)&&H.type!=="wheel"||!c&&H.ctrlKey&&H.type==="wheel"||!Y&&!d&&!oe&&H.type==="wheel"||!S&&(H.type==="mousedown"||H.type==="touchstart")?!1:(!H.ctrlKey||H.type==="wheel")&&!H.button})},[te,a,c,d,b,S,x,w,Z]),T.createElement("div",{className:"react-flow__renderer react-flow__container",ref:z},V)};function vA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function gA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mA(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}var Gee=function(t){return{userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable}},bA={startX:0,startY:0,x:0,y:0,width:0,height:0,draw:!1},Kee=T.memo(function(e){var t=e.selectionKeyPressed,r=er(),n=T.useRef(0),o=T.useRef(0),i=T.useRef(),a=T.useState(bA),s=He(a,2),c=s[0],u=s[1],d=Ct(Gee,dr),p=d.userSelectionActive,h=d.elementsSelectable,v=p||t;if(!h||!v)return null;var y=function(){u(bA),r.setState({userSelectionActive:!1}),n.current=0,o.current=0},g=function(S){var _=S.target.closest(".react-flow");i.current=_.getBoundingClientRect();var O=mA(S,i.current);u({width:0,height:0,startX:O.x,startY:O.y,x:O.x,y:O.y,draw:!0}),r.setState({userSelectionActive:!0,nodesSelectionActive:!1})},b=function(S){var _,O;if(!(!t||!c.draw||!i.current)){var N=mA(S,i.current),R=(_=c.startX)!==null&&_!==void 0?_:0,A=(O=c.startY)!==null&&O!==void 0?O:0,D=gA(gA({},c),{},{x:N.x<R?N.x:R,y:N.y<A?N.y:A,width:Math.abs(N.x-R),height:Math.abs(N.y-A)}),B=r.getState(),j=B.nodeInternals,M=B.edges,P=B.transform,V=B.onNodesChange,q=B.onEdgesChange,G=Array.from(j.values()),W=u5(j,D,P,!1,!0),Q=d5(W,M).map(function(te){return te.id}),z=W.map(function(te){return te.id});if(n.current!==z.length){n.current=z.length;var U=Di(G,z);U.length&&(V==null||V(U))}if(o.current!==Q.length){o.current=Q.length;var ie=Di(M,Q);ie.length&&(q==null||q(ie))}u(D)}},x=function(){r.setState({nodesSelectionActive:n.current>0}),y()},w=function(){r.setState({nodesSelectionActive:!1}),y()};return T.createElement("div",{className:"react-flow__selectionpane react-flow__container",onMouseDown:g,onMouseMove:b,onMouseUp:x,onMouseLeave:w},c.draw&&T.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:c.width,height:c.height,transform:"translate(".concat(c.x,"px, ").concat(c.y,"px)")}}))});function yA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function wA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function N5(e,t){if(!e.parentNode)return!1;var r=t.get(e.parentNode);return r?r.selected?!0:N5(r,t):!1}function xA(e,t,r){var n=e;do{var o;if((o=n)!==null&&o!==void 0&&o.matches(t))return!0;if(n===r.current)return!1;n=n.parentElement}while(n);return!1}function Yee(e,t,r){return Array.from(e.values()).filter(function(n){return(n.selected||n.id===r)&&(!n.parentNode||!N5(n,e))}).map(function(n){var o,i,a,s;return{id:n.id,position:n.position||{x:0,y:0},positionAbsolute:n.positionAbsolute||{x:0,y:0},distance:{x:t.x-((o=(i=n.positionAbsolute)===null||i===void 0?void 0:i.x)!==null&&o!==void 0?o:0),y:t.y-((a=(s=n.positionAbsolute)===null||s===void 0?void 0:s.y)!==null&&a!==void 0?a:0)},delta:{x:0,y:0},extent:n.extent,parentNode:n.parentNode,width:n.width,height:n.height}})}function Xee(e,t,r,n,o,i){var a=He(n,2),s=a[0],c=a[1],u=e.extent||i,d={x:t.x-e.distance.x,y:t.y-e.distance.y};if(r&&(d.x=s*Math.round(d.x/s),d.y=c*Math.round(d.y/c)),e.extent==="parent")if(e.parentNode&&e.width&&e.height){var p=o.get(e.parentNode);u=p!=null&&p.positionAbsolute&&p!==null&&p!==void 0&&p.width&&p!==null&&p!==void 0&&p.height?[[p.positionAbsolute.x,p.positionAbsolute.y],[p.positionAbsolute.x+p.width-e.width,p.positionAbsolute.y+p.height-e.height]]:u}else process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Only child nodes can use a parent extent. Help: https://reactflow.dev/error#500"),u=i;else if(e.extent&&e.parentNode){var h,v,y,g,b=o.get(e.parentNode),x=(h=b==null||(v=b.positionAbsolute)===null||v===void 0?void 0:v.x)!==null&&h!==void 0?h:0,w=(y=b==null||(g=b.positionAbsolute)===null||g===void 0?void 0:g.y)!==null&&y!==void 0?y:0;u=[[e.extent[0][0]+x,e.extent[0][1]+w],[e.extent[1][0]+x,e.extent[1][1]+w]]}var E={x:0,y:0};if(e.parentNode){var S,_,O,N,R=o.get(e.parentNode);E={x:(S=R==null||(_=R.positionAbsolute)===null||_===void 0?void 0:_.x)!==null&&S!==void 0?S:0,y:(O=R==null||(N=R.positionAbsolute)===null||N===void 0?void 0:N.y)!==null&&O!==void 0?O:0}}return e.positionAbsolute=u?r5(d,u):d,e.position={x:e.positionAbsolute.x-E.x,y:e.positionAbsolute.y-E.y},e}function uy(e){var t=e.nodeId,r=e.dragItems,n=e.nodeInternals,o=r.map(function(i){var a=n.get(i.id);return wA(wA({},a),{},{position:i.position,positionAbsolute:i.positionAbsolute})});return[t?o.find(function(i){return i.id===t}):o[0],o]}function dy(e){return function(t,r,n){return e==null?void 0:e(t,n)}}function P5(e){var t=e.nodeRef,r=e.disabled,n=r===void 0?!1:r,o=e.noDragClassName,i=e.handleSelector,a=e.nodeId,s=e.isSelectable,c=e.selectNodesOnDrag,u=T.useState(!1),d=He(u,2),p=d[0],h=d[1],v=er(),y=T.useRef(),g=T.useRef({x:null,y:null}),b=T.useCallback(function(x){var w=x.sourceEvent,E=v.getState(),S=E.transform,_=E.snapGrid,O=E.snapToGrid,N=w.touches?w.touches[0].clientX:w.clientX,R=w.touches?w.touches[0].clientY:w.clientY,A=c5({x:N,y:R},S,O,_);return A},[]);return T.useEffect(function(){if(t!=null&&t.current){var x=Zr(t.current);if(n)x.on(".drag",null);else{var w=BZ().on("start",function(E){var S=v.getState(),_=S.nodeInternals,O=S.multiSelectionActive,N=S.unselectNodesAndEdges,R=S.onNodeDragStart,A=S.onSelectionDragStart,D=a?R:dy(A);if(!c&&!O&&a){var B;(B=_.get(a))!==null&&B!==void 0&&B.selected||N()}a&&s&&c&&l5({id:a,store:v});var j=b(E);if(g.current=j,y.current=Yee(_,j,a),D&&y.current){var M=uy({nodeId:a,dragItems:y.current,nodeInternals:_}),P=He(M,2),V=P[0],q=P[1];D(E.sourceEvent,V,q)}}).on("drag",function(E){var S=v.getState(),_=S.updateNodePositions,O=S.snapToGrid,N=S.snapGrid,R=S.nodeInternals,A=S.nodeExtent,D=S.onNodeDrag,B=S.onSelectionDrag,j=b(E);if((g.current.x!==j.x||g.current.y!==j.y)&&y.current){g.current=j,y.current=y.current.map(function(W){return Xee(W,j,O,N,R,A)});var M=a?D:dy(B);if(_(y.current,!0,!0),h(!0),M){var P=uy({nodeId:a,dragItems:y.current,nodeInternals:R}),V=He(P,2),q=V[0],G=V[1];M(E.sourceEvent,q,G)}}E.on("end",function(W){if(h(!1),y.current){var Q=v.getState(),z=Q.updateNodePositions,U=Q.nodeInternals,ie=Q.onNodeDragStop,te=Q.onSelectionDragStop,$=a?ie:dy(te);if(z(y.current,!1,!1),$){var K=uy({nodeId:a,dragItems:y.current,nodeInternals:U}),Z=He(K,2),H=Z[0],Y=Z[1];$(W.sourceEvent,H,Y)}}})}).filter(function(E){var S=E.target,_=!E.button&&(!o||!xA(S,".".concat(o),t))&&(!i||xA(S,i,t));return _});return x.call(w),function(){x.on(".drag",null)}}}},[t,n,o,i,s,v,a,c,b]),p}function _A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Zee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_A(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_A(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Jee=function(t){return Zee({transformString:"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")"),userSelectionActive:t.userSelectionActive},j_(Array.from(t.nodeInternals.values()).filter(function(r){return r.selected})))},Qee=function(t){var r=Array.from(t.nodeInternals.values()).filter(function(n){return n.selected});return j_(r)};function ete(e){var t=e.onSelectionContextMenu,r=e.noPanClassName,n=er(),o=Ct(Jee,dr),i=o.transformString,a=o.userSelectionActive,s=Ct(Qee,dr),c=s.width,u=s.height,d=s.x,p=s.y,h=T.useRef(null);if(P5({nodeRef:h}),a||!c||!u)return null;var v=t?function(y){var g=Array.from(n.getState().nodeInternals.values()).filter(function(b){return b.selected});t(y,g)}:void 0;return T.createElement("div",{className:Or(["react-flow__nodesselection","react-flow__container",r]),style:{transform:i}},T.createElement("div",{ref:h,className:"react-flow__nodesselection-rect",onContextMenu:v,style:{width:c,height:u,top:p,left:d}}))}var tte=T.memo(ete),rte=function(t){return t.nodesSelectionActive},T5=function(t){var r=t.children,n=t.onPaneClick,o=t.onPaneContextMenu,i=t.onPaneScroll,a=t.deleteKeyCode,s=t.onMove,c=t.onMoveStart,u=t.onMoveEnd,d=t.selectionKeyCode,p=t.multiSelectionKeyCode,h=t.zoomActivationKeyCode,v=t.elementsSelectable,y=t.zoomOnScroll,g=t.zoomOnPinch,b=t.panOnScroll,x=t.panOnScrollSpeed,w=t.panOnScrollMode,E=t.zoomOnDoubleClick,S=t.panOnDrag,_=t.translateExtent,O=t.minZoom,N=t.maxZoom,R=t.defaultZoom,A=t.defaultPosition,D=t.preventScrolling,B=t.onSelectionContextMenu,j=t.noWheelClassName,M=t.noPanClassName,P=er(),V=Ct(rte),q=_u(d);$ee({deleteKeyCode:a,multiSelectionKeyCode:p});var G=function(U){n==null||n(U),P.getState().resetSelectedElements(),P.setState({nodesSelectionActive:!1})},W=o?function(z){return o(z)}:void 0,Q=i?function(z){return i(z)}:void 0;return T.createElement(Uee,{onMove:s,onMoveStart:c,onMoveEnd:u,selectionKeyPressed:q,elementsSelectable:v,zoomOnScroll:y,zoomOnPinch:g,panOnScroll:b,panOnScrollSpeed:x,panOnScrollMode:w,zoomOnDoubleClick:E,panOnDrag:S,translateExtent:_,minZoom:O,maxZoom:N,defaultZoom:R,defaultPosition:A,zoomActivationKeyCode:h,preventScrolling:D,noWheelClassName:j,noPanClassName:M},r,T.createElement(Kee,{selectionKeyPressed:q}),V&&T.createElement(tte,{onSelectionContextMenu:B,noPanClassName:M}),T.createElement("div",{className:"react-flow__pane react-flow__container",onClick:G,onContextMenu:W,onWheel:Q}))};T5.displayName="FlowRenderer";var nte=T.memo(T5);function ote(e){var t=Ct(T.useCallback(function(r){return e?u5(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):Array.from(r.nodeInternals.values())},[e]));return t}var ite=function(t){return{nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,updateNodeDimensions:t.updateNodeDimensions}},A5=function(t){var r=Ct(ite,dr),n=r.nodesDraggable,o=r.nodesConnectable,i=r.elementsSelectable,a=r.updateNodeDimensions,s=ote(t.onlyRenderVisibleElements),c=T.useRef(),u=T.useMemo(function(){if(typeof ResizeObserver>"u")return null;var d=new ResizeObserver(function(p){var h=p.map(function(v){return{id:v.target.getAttribute("data-id"),nodeElement:v.target,forceUpdate:!0}});a(h)});return c.current=d,d},[]);return T.useEffect(function(){return function(){var d;c==null||(d=c.current)===null||d===void 0||d.disconnect()}},[]),T.createElement("div",{className:"react-flow__nodes react-flow__container"},s.map(function(d){var p,h,v,y,g,b,x,w=d.type||"default";t.nodeTypes[w]||(process.env.NODE_ENV==="development"&&console.warn('[React Flow]: Node type "'.concat(w,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),w="default");var E=t.nodeTypes[w]||t.nodeTypes.default,S=!!(d.draggable||n&&typeof d.draggable>"u"),_=!!(d.selectable||i&&typeof d.selectable>"u"),O=!!(d.connectable||o&&typeof d.connectable>"u");return T.createElement(E,{key:d.id,id:d.id,className:d.className,style:d.style,type:w,data:d.data,sourcePosition:d.sourcePosition||Se.Bottom,targetPosition:d.targetPosition||Se.Top,hidden:d.hidden,xPos:(p=(h=d.positionAbsolute)===null||h===void 0?void 0:h.x)!==null&&p!==void 0?p:0,yPos:(v=(y=d.positionAbsolute)===null||y===void 0?void 0:y.y)!==null&&v!==void 0?v:0,selectNodesOnDrag:t.selectNodesOnDrag,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,selected:!!d.selected,isDraggable:S,isSelectable:_,isConnectable:O,resizeObserver:u,dragHandle:d.dragHandle,zIndex:(g=(b=d[$t])===null||b===void 0?void 0:b.z)!==null&&g!==void 0?g:0,isParent:!!((x=d[$t])!==null&&x!==void 0&&x.isParent),noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,initialized:!!d.width&&!!d.height})}))};A5.displayName="NodeRenderer";var ate=T.memo(A5),Ri;function EA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function SA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ste=(Ri={},Ge(Ri,Se.Left,Se.Right),Ge(Ri,Se.Right,Se.Left),Ge(Ri,Se.Top,Se.Bottom),Ge(Ri,Se.Bottom,Se.Top),Ri),lte=(function(e){var t,r,n,o,i,a=e.connectionNodeId,s=e.connectionHandleType,c=e.connectionLineStyle,u=e.connectionLineType,d=u===void 0?go.Bezier:u,p=e.isConnectable,h=e.CustomConnectionLineComponent,v=Ct(T.useCallback(function(Q){return{fromNode:Q.nodeInternals.get(a),handleId:Q.connectionHandleId,toX:(Q.connectionPosition.x-Q.transform[0])/Q.transform[2],toY:(Q.connectionPosition.y-Q.transform[1])/Q.transform[2]}},[a]),dr),y=v.fromNode,g=v.handleId,b=v.toX,x=v.toY,w=y==null||(t=y[$t])===null||t===void 0?void 0:t.handleBounds;if(!y||!p||!(w!=null&&w[s]))return null;var E=w[s],S=g?E.find(function(Q){return Q.id===g}):E[0],_=S?S.x+S.width/2:((r=y==null?void 0:y.width)!==null&&r!==void 0?r:0)/2,O=S?S.y+S.height/2:(n=y==null?void 0:y.height)!==null&&n!==void 0?n:0,N=((y==null||(o=y.positionAbsolute)===null||o===void 0?void 0:o.x)||0)+_,R=((y==null||(i=y.positionAbsolute)===null||i===void 0?void 0:i.y)||0)+O,A=S==null?void 0:S.position;if(!A)return null;var D=ste[A],B,j,M,P,V,q;switch(s){case"source":B=N,j=R,M=A,P=b,V=x,q=D;break;case"target":B=b,j=x,M=D,P=N,V=R,q=A;break}if(h)return T.createElement("g",{className:"react-flow__connection"},T.createElement(h,{connectionLineType:d,connectionLineStyle:c,fromNode:y,fromHandle:S,fromX:N,fromY:R,toX:b,toY:x,fromPosition:A,toPosition:D,sourcePosition:M,targetPosition:q,sourceNode:y,sourceHandle:S,targetX:P,targetY:V,sourceX:B,sourceY:j}));var G="",W={sourceX:B,sourceY:j,sourcePosition:M,targetX:P,targetY:V,targetPosition:q};return d===go.Bezier?G=hd(W):d===go.Step?G=Cx(SA(SA({},W),{},{borderRadius:0})):d===go.SmoothStep?G=Cx(W):d===go.SimpleBezier?G=m5(W):G="M".concat(B,",").concat(j," ").concat(P,",").concat(V),T.createElement("g",{className:"react-flow__connection"},T.createElement("path",{d:G,className:"react-flow__connection-path",style:c}))});function Px(e){"@babel/helpers - typeof";return Px=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Px(e)}var Rc,cte=function(t){var r=t.color,n=r===void 0?"none":r,o=t.strokeWidth,i=o===void 0?1:o;return T.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:i,fill:"none",points:"-5,-4 0,0 -5,4"})},ute=function(t){var r=t.color,n=r===void 0?"none":r,o=t.strokeWidth,i=o===void 0?1:o;return T.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:i,fill:n,points:"-5,-4 0,0 -5,4 -5,-4"})},OA=(Rc={},Ge(Rc,mu.Arrow,cte),Ge(Rc,mu.ArrowClosed,ute),Rc);function dte(e){var t=T.useMemo(function(){var r=OA.hasOwnProperty(e);return r?OA[e]:(process.env.NODE_ENV==="development"&&console.warn('[React Flow]: Marker type "'.concat(e,`" doesn't exist. Help: https://reactflow.dev/error#900`)),function(){return null})},[e]);return t}function CA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function fte(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var pte=function(t){var r=t.id,n=t.type,o=t.color,i=t.width,a=i===void 0?12.5:i,s=t.height,c=s===void 0?12.5:s,u=t.markerUnits,d=u===void 0?"strokeWidth":u,p=t.strokeWidth,h=t.orient,v=h===void 0?"auto":h,y=dte(n);return T.createElement("marker",{className:"react-flow__arrowhead",id:r,markerWidth:"".concat(a),markerHeight:"".concat(c),viewBox:"-10 -10 20 20",markerUnits:d,orient:v,refX:"0",refY:"0"},T.createElement(y,{color:o,strokeWidth:p}))},hte=function(t){var r=t.defaultColor,n=t.rfId;return function(o){var i=[];return o.edges.reduce(function(a,s){return[s.markerStart,s.markerEnd].forEach(function(c){if(c&&Px(c)==="object"){var u=Sx(c,n);i.includes(u)||(a.push(fte({id:u,color:c.color||r},c)),i.push(u))}}),a},[]).sort(function(a,s){return a.id.localeCompare(s.id)})}},k5=function(t){var r=t.defaultColor,n=t.rfId,o=Ct(T.useCallback(hte({defaultColor:r,rfId:n}),[r,n]),function(i,a){return!(i.length!==a.length||i.some(function(s,c){return s.id!==a[c].id}))});return T.createElement("defs",null,o.map(function(i){return T.createElement(pte,{id:i.id,key:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient})}))};k5.displayName="MarkerDefinitions";var vte=T.memo(k5),gte=[{level:0,isMaxLevel:!0,edges:[]}];function mte(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=-1,o=e.reduce(function(a,s){var c=o5(s.zIndex),u=c?s.zIndex:0;if(r){var d,p,h,v;u=c?s.zIndex:Math.max(((d=t.get(s.source))===null||d===void 0||(p=d[$t])===null||p===void 0?void 0:p.z)||0,((h=t.get(s.target))===null||h===void 0||(v=h[$t])===null||v===void 0?void 0:v.z)||0)}return a[u]?a[u].push(s):a[u]=[s],n=u>n?u:n,a},{}),i=Object.entries(o).map(function(a){var s=He(a,2),c=s[0],u=s[1],d=+c;return{edges:u,level:d,isMaxLevel:d===n}});return i.length===0?gte:i}function bte(e,t,r){var n=Ct(T.useCallback(function(o){return e?o.edges.filter(function(i){var a=t.get(i.source),s=t.get(i.target);return(a==null?void 0:a.width)&&(a==null?void 0:a.height)&&(s==null?void 0:s.width)&&(s==null?void 0:s.height)&&zee({sourcePos:a.positionAbsolute||{x:0,y:0},targetPos:s.positionAbsolute||{x:0,y:0},sourceWidth:a.width,sourceHeight:a.height,targetWidth:s.width,targetHeight:s.height,width:o.width,height:o.height,transform:o.transform})}):o.edges},[e,t]));return mte(n,t,r)}var yte=function(t){return{connectionNodeId:t.connectionNodeId,connectionHandleType:t.connectionHandleType,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,width:t.width,height:t.height,connectionMode:t.connectionMode,nodeInternals:t.nodeInternals}},M5=function(t){var r=Ct(yte,dr),n=r.connectionNodeId,o=r.connectionHandleType,i=r.nodesConnectable,a=r.elementsSelectable,s=r.width,c=r.height,u=r.connectionMode,d=r.nodeInternals,p=bte(t.onlyRenderVisibleElements,d,t.elevateEdgesOnSelect);if(!s)return null;var h=t.connectionLineType,v=t.defaultMarkerColor,y=t.connectionLineStyle,g=t.connectionLineComponent,b=t.connectionLineContainerStyle,x=n&&o;return T.createElement(T.Fragment,null,p.map(function(w){var E=w.level,S=w.edges,_=w.isMaxLevel;return T.createElement("svg",{key:E,style:{zIndex:E},width:s,height:c,className:"react-flow__edges react-flow__container"},_&&T.createElement(vte,{defaultColor:v,rfId:t.rfId}),T.createElement("g",null,S.map(function(O){var N=dA(d,O.source),R=He(N,3),A=R[0],D=R[1],B=R[2],j=dA(d,O.target),M=He(j,3),P=M[0],V=M[1],q=M[2];if(!B||!q)return null;var G=O.type||"default";t.edgeTypes[G]||(console.warn('[React Flow]: Edge type "'.concat(G,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),G="default");var W=t.edgeTypes[G]||t.edgeTypes.default,Q=u===Qi.Strict?V.target:V.target||V.source,z=uA(D.source,O.sourceHandle||null),U=uA(Q,O.targetHandle||null),ie=(z==null?void 0:z.position)||Se.Bottom,te=(U==null?void 0:U.position)||Se.Top;if(!z)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Couldn't create edge for source handle id: ".concat(O.sourceHandle,"; edge id: ").concat(O.id,". Help: https://reactflow.dev/error#800")),null;if(!U)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Couldn't create edge for target handle id: ".concat(O.targetHandle,"; edge id: ").concat(O.id,". Help: https://reactflow.dev/error#800")),null;var $=Lee(A,z,ie,P,U,te),K=$.sourceX,Z=$.sourceY,H=$.targetX,Y=$.targetY;return T.createElement(W,{key:O.id,id:O.id,className:Or([O.className,t.noPanClassName]),type:G,data:O.data,selected:!!O.selected,animated:!!O.animated,hidden:!!O.hidden,label:O.label,labelStyle:O.labelStyle,labelShowBg:O.labelShowBg,labelBgStyle:O.labelBgStyle,labelBgPadding:O.labelBgPadding,labelBgBorderRadius:O.labelBgBorderRadius,style:O.style,source:O.source,target:O.target,sourceHandleId:O.sourceHandle,targetHandleId:O.targetHandle,markerEnd:O.markerEnd,markerStart:O.markerStart,sourceX:K,sourceY:Z,targetX:H,targetY:Y,sourcePosition:ie,targetPosition:te,elementsSelectable:a,onEdgeUpdate:t.onEdgeUpdate,onContextMenu:t.onEdgeContextMenu,onMouseEnter:t.onEdgeMouseEnter,onMouseMove:t.onEdgeMouseMove,onMouseLeave:t.onEdgeMouseLeave,onClick:t.onEdgeClick,edgeUpdaterRadius:t.edgeUpdaterRadius,onEdgeDoubleClick:t.onEdgeDoubleClick,onEdgeUpdateStart:t.onEdgeUpdateStart,onEdgeUpdateEnd:t.onEdgeUpdateEnd,rfId:t.rfId})})))}),x&&T.createElement("svg",{style:b,width:s,height:c,className:"react-flow__edges react-flow__connectionline react-flow__container"},T.createElement(lte,{connectionNodeId:n,connectionHandleType:o,connectionLineStyle:y,connectionLineType:h,isConnectable:i,CustomConnectionLineComponent:g})))};M5.displayName="EdgeRenderer";var wte=T.memo(M5),xte=function(t){return"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")")};function _te(e){var t=e.children,r=Ct(xte);return T.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:r}},t)}function Ete(e){var t=v5(),r=T.useRef(!1);T.useEffect(function(){!r.current&&t.viewportInitialized&&e&&(setTimeout(function(){return e(t)},1),r.current=!0)},[e,t.viewportInitialized])}var D5=function(t){var r=t.nodeTypes,n=t.edgeTypes,o=t.onMove,i=t.onMoveStart,a=t.onMoveEnd,s=t.onInit,c=t.onNodeClick,u=t.onEdgeClick,d=t.onNodeDoubleClick,p=t.onEdgeDoubleClick,h=t.onNodeMouseEnter,v=t.onNodeMouseMove,y=t.onNodeMouseLeave,g=t.onNodeContextMenu,b=t.onSelectionContextMenu,x=t.connectionLineType,w=t.connectionLineStyle,E=t.connectionLineComponent,S=t.connectionLineContainerStyle,_=t.selectionKeyCode,O=t.multiSelectionKeyCode,N=t.zoomActivationKeyCode,R=t.deleteKeyCode,A=t.onlyRenderVisibleElements,D=t.elementsSelectable,B=t.selectNodesOnDrag,j=t.translateExtent,M=t.minZoom,P=t.maxZoom,V=t.defaultZoom,q=t.defaultPosition,G=t.preventScrolling,W=t.defaultMarkerColor,Q=t.zoomOnScroll,z=t.zoomOnPinch,U=t.panOnScroll,ie=t.panOnScrollSpeed,te=t.panOnScrollMode,$=t.zoomOnDoubleClick,K=t.panOnDrag,Z=t.onPaneClick,H=t.onPaneScroll,Y=t.onPaneContextMenu,oe=t.onEdgeUpdate,re=t.onEdgeContextMenu,se=t.onEdgeMouseEnter,ee=t.onEdgeMouseMove,we=t.onEdgeMouseLeave,ve=t.edgeUpdaterRadius,Ee=t.onEdgeUpdateStart,pe=t.onEdgeUpdateEnd,ce=t.noDragClassName,Ce=t.noWheelClassName,ke=t.noPanClassName,Ke=t.elevateEdgesOnSelect,ze=t.id;return Ete(s),T.createElement(nte,{onPaneClick:Z,onPaneContextMenu:Y,onPaneScroll:H,deleteKeyCode:R,selectionKeyCode:_,multiSelectionKeyCode:O,zoomActivationKeyCode:N,elementsSelectable:D,onMove:o,onMoveStart:i,onMoveEnd:a,zoomOnScroll:Q,zoomOnPinch:z,zoomOnDoubleClick:$,panOnScroll:U,panOnScrollSpeed:ie,panOnScrollMode:te,panOnDrag:K,translateExtent:j,minZoom:M,maxZoom:P,defaultZoom:V,defaultPosition:q,onSelectionContextMenu:b,preventScrolling:G,noDragClassName:ce,noWheelClassName:Ce,noPanClassName:ke},T.createElement(_te,null,T.createElement(wte,{edgeTypes:n,onEdgeClick:u,onEdgeDoubleClick:p,connectionLineType:x,connectionLineStyle:w,connectionLineComponent:E,connectionLineContainerStyle:S,onEdgeUpdate:oe,onlyRenderVisibleElements:A,onEdgeContextMenu:re,onEdgeMouseEnter:se,onEdgeMouseMove:ee,onEdgeMouseLeave:we,onEdgeUpdateStart:Ee,onEdgeUpdateEnd:pe,edgeUpdaterRadius:ve,defaultMarkerColor:W,noPanClassName:ke,elevateEdgesOnSelect:!!Ke,rfId:ze}),T.createElement(ate,{nodeTypes:r,onNodeClick:c,onNodeDoubleClick:d,onNodeMouseEnter:h,onNodeMouseMove:v,onNodeMouseLeave:y,onNodeContextMenu:g,selectNodesOnDrag:B,onlyRenderVisibleElements:A,noPanClassName:ke,noDragClassName:ce})))};D5.displayName="GraphView";var Ste=T.memo(D5),j5=function(){return null};j5.displayName="GroupNode";function IA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function RA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?IA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Wa=(function(e){var t=function(n){var o=n.id,i=n.type,a=n.data,s=n.xPos,c=n.yPos,u=n.selected,d=n.onClick,p=n.onMouseEnter,h=n.onMouseMove,v=n.onMouseLeave,y=n.onContextMenu,g=n.onDoubleClick,b=n.style,x=n.className,w=n.isDraggable,E=n.isSelectable,S=n.isConnectable,_=n.selectNodesOnDrag,O=n.sourcePosition,N=n.targetPosition,R=n.hidden,A=n.resizeObserver,D=n.dragHandle,B=n.zIndex,j=n.isParent,M=n.noPanClassName,P=n.noDragClassName,V=n.initialized,q=er(),G=T.useRef(null),W=T.useRef(O),Q=T.useRef(N),z=T.useRef(i),U=E||w||d||p||h||v,ie=Ha(o,q.getState,p),te=Ha(o,q.getState,h),$=Ha(o,q.getState,v),K=Ha(o,q.getState,y),Z=Ha(o,q.getState,g),H=function(re){if(E&&(!_||!w)&&l5({id:o,store:q}),d){var se=q.getState().nodeInternals.get(o);d(re,RA({},se))}};T.useEffect(function(){if(G.current&&!R){var oe=G.current;return A==null||A.observe(oe),function(){return A==null?void 0:A.unobserve(oe)}}},[R]),T.useEffect(function(){var oe=z.current!==i,re=W.current!==O,se=Q.current!==N;G.current&&(oe||re||se)&&(oe&&(z.current=i),re&&(W.current=O),se&&(Q.current=N),q.getState().updateNodeDimensions([{id:o,nodeElement:G.current,forceUpdate:!0}]))},[o,i,O,N]);var Y=P5({nodeRef:G,disabled:R||!w,noDragClassName:P,handleSelector:D,nodeId:o,isSelectable:E,selectNodesOnDrag:_});return R?null:T.createElement("div",{className:Or(["react-flow__node","react-flow__node-".concat(i),M,x,{selected:u,selectable:E,parent:j}]),ref:G,style:RA({zIndex:B,transform:"translate(".concat(s,"px,").concat(c,"px)"),pointerEvents:U?"all":"none",visibility:V?"visible":"hidden"},b),onMouseEnter:ie,onMouseMove:te,onMouseLeave:$,onContextMenu:K,onClick:H,onDoubleClick:Z,"data-testid":"rf__node-".concat(o),"data-id":o},T.createElement(xee,{value:o},T.createElement(e,{id:o,data:a,type:i,xPos:s,yPos:c,selected:u,isConnectable:S,sourcePosition:O,targetPosition:N,dragging:Y,dragHandle:D,zIndex:B})))};return t.displayName="NodeWrapper",T.memo(t)});function NA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function PA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?NA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ote(e){var t={input:Wa(e.input||C5),default:Wa(e.default||Nx),output:Wa(e.output||R5),group:Wa(e.group||j5)},r={},n=Object.keys(e).filter(function(o){return!["input","default","output","group"].includes(o)}).reduce(function(o,i){return o[i]=Wa(e[i]||Nx),o},r);return PA(PA({},t),n)}function TA(e,t){var r=T.useRef(null),n=T.useMemo(function(){if(process.env.NODE_ENV==="development"){var o=Object.keys(e);dr(r.current,o)&&console.warn("[React Flow]: It looks like you have created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them. Help: https://reactflow.dev/error#200"),r.current=o}return t(e)},[e]);return n}function AA(e){if(!(!e||typeof document>"u")){var t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");t.appendChild(r),r.appendChild(document.createTextNode(e))}}var q5=function(t){var r=t.children,n=!0;try{er()}catch{n=!1}return n?T.createElement(T.Fragment,null,r):T.createElement(HQ,{createStore:VQ},r)};q5.displayName="ReactFlowWrapper";var Cte=["nodes","edges","defaultNodes","defaultEdges","className","nodeTypes","edgeTypes","onNodeClick","onEdgeClick","onInit","onMove","onMoveStart","onMoveEnd","onConnect","onConnectStart","onConnectStop","onConnectEnd","onClickConnectStart","onClickConnectStop","onClickConnectEnd","onNodeMouseEnter","onNodeMouseMove","onNodeMouseLeave","onNodeContextMenu","onNodeDoubleClick","onNodeDragStart","onNodeDrag","onNodeDragStop","onNodesDelete","onEdgesDelete","onSelectionChange","onSelectionDragStart","onSelectionDrag","onSelectionDragStop","onSelectionContextMenu","connectionMode","connectionLineType","connectionLineStyle","connectionLineComponent","connectionLineContainerStyle","deleteKeyCode","selectionKeyCode","multiSelectionKeyCode","zoomActivationKeyCode","snapToGrid","snapGrid","onlyRenderVisibleElements","selectNodesOnDrag","nodesDraggable","nodesConnectable","elementsSelectable","minZoom","maxZoom","defaultZoom","defaultPosition","translateExtent","preventScrolling","nodeExtent","defaultMarkerColor","zoomOnScroll","zoomOnPinch","panOnScroll","panOnScrollSpeed","panOnScrollMode","zoomOnDoubleClick","panOnDrag","onPaneClick","onPaneScroll","onPaneContextMenu","children","onEdgeUpdate","onEdgeContextMenu","onEdgeDoubleClick","onEdgeMouseEnter","onEdgeMouseMove","onEdgeMouseLeave","onEdgeUpdateStart","onEdgeUpdateEnd","edgeUpdaterRadius","onNodesChange","onEdgesChange","noDragClassName","noWheelClassName","noPanClassName","fitView","fitViewOptions","connectOnClick","attributionPosition","proOptions","defaultEdgeOptions","elevateEdgesOnSelect"];function kA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function MA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}AA(Aee),AA(Mee);var Ite={input:C5,default:Nx,output:R5},Rte={default:Ix,straight:x5,step:w5,smoothstep:L_,simplebezier:b5},Nte=[15,15],Pte=[0,0],L5=T.forwardRef(function(e,t){var r=e.nodes,n=e.edges,o=e.defaultNodes,i=e.defaultEdges,a=e.className,s=e.nodeTypes,c=s===void 0?Ite:s,u=e.edgeTypes,d=u===void 0?Rte:u,p=e.onNodeClick,h=e.onEdgeClick,v=e.onInit,y=e.onMove,g=e.onMoveStart,b=e.onMoveEnd,x=e.onConnect,w=e.onConnectStart,E=e.onConnectStop,S=e.onConnectEnd,_=e.onClickConnectStart,O=e.onClickConnectStop,N=e.onClickConnectEnd,R=e.onNodeMouseEnter,A=e.onNodeMouseMove,D=e.onNodeMouseLeave,B=e.onNodeContextMenu,j=e.onNodeDoubleClick,M=e.onNodeDragStart,P=e.onNodeDrag,V=e.onNodeDragStop,q=e.onNodesDelete,G=e.onEdgesDelete,W=e.onSelectionChange,Q=e.onSelectionDragStart,z=e.onSelectionDrag,U=e.onSelectionDragStop,ie=e.onSelectionContextMenu,te=e.connectionMode,$=te===void 0?Qi.Strict:te,K=e.connectionLineType,Z=K===void 0?go.Bezier:K,H=e.connectionLineStyle,Y=e.connectionLineComponent,oe=e.connectionLineContainerStyle,re=e.deleteKeyCode,se=re===void 0?"Backspace":re,ee=e.selectionKeyCode,we=ee===void 0?"Shift":ee,ve=e.multiSelectionKeyCode,Ee=ve===void 0?"Meta":ve,pe=e.zoomActivationKeyCode,ce=pe===void 0?"Meta":pe,Ce=e.snapToGrid,ke=Ce===void 0?!1:Ce,Ke=e.snapGrid,ze=Ke===void 0?Nte:Ke,rt=e.onlyRenderVisibleElements,Xe=rt===void 0?!1:rt,It=e.selectNodesOnDrag,lt=It===void 0?!0:It,Wt=e.nodesDraggable,mt=e.nodesConnectable,ct=e.elementsSelectable,Lt=e.minZoom,pr=Lt===void 0?.5:Lt,Cr=e.maxZoom,Kt=Cr===void 0?2:Cr,Tt=e.defaultZoom,Yt=Tt===void 0?1:Tt,ln=e.defaultPosition,Oo=ln===void 0?Pte:ln,Xn=e.translateExtent,cn=Xn===void 0?Ox:Xn,ai=e.preventScrolling,zd=ai===void 0?!0:ai,Js=e.nodeExtent,va=e.defaultMarkerColor,Bd=va===void 0?"#b1b1b7":va,Qs=e.zoomOnScroll,Fd=Qs===void 0?!0:Qs,el=e.zoomOnPinch,tl=el===void 0?!0:el,rl=e.panOnScroll,$d=rl===void 0?!1:rl,nl=e.panOnScrollSpeed,ga=nl===void 0?.5:nl,ol=e.panOnScrollMode,ma=ol===void 0?Bi.Free:ol,il=e.zoomOnDoubleClick,Hd=il===void 0?!0:il,al=e.panOnDrag,Vd=al===void 0?!0:al,Wd=e.onPaneClick,Ud=e.onPaneScroll,Gd=e.onPaneContextMenu,Kd=e.children,sl=e.onEdgeUpdate,Yd=e.onEdgeContextMenu,Xd=e.onEdgeDoubleClick,Zd=e.onEdgeMouseEnter,Jd=e.onEdgeMouseMove,Qd=e.onEdgeMouseLeave,ef=e.onEdgeUpdateStart,si=e.onEdgeUpdateEnd,ll=e.edgeUpdaterRadius,li=ll===void 0?10:ll,tf=e.onNodesChange,rf=e.onEdgesChange,cl=e.noDragClassName,ul=cl===void 0?"nodrag":cl,ba=e.noWheelClassName,dl=ba===void 0?"nowheel":ba,fl=e.noPanClassName,nf=fl===void 0?"nopan":fl,pl=e.fitView,of=pl===void 0?!1:pl,hl=e.fitViewOptions,ya=e.connectOnClick,vl=ya===void 0?!0:ya,wa=e.attributionPosition,af=e.proOptions,gl=e.defaultEdgeOptions,Co=e.elevateEdgesOnSelect,ml=Co===void 0?!1:Co,ci=fd(e,Cte),bl=TA(c,Ote),yl=TA(d,qee);return T.createElement("div",MA(MA({},ci),{},{ref:t,className:Or(["react-flow",a])}),T.createElement(q5,null,T.createElement(Ste,{onInit:v,onMove:y,onMoveStart:g,onMoveEnd:b,onNodeClick:p,onEdgeClick:h,onNodeMouseEnter:R,onNodeMouseMove:A,onNodeMouseLeave:D,onNodeContextMenu:B,onNodeDoubleClick:j,nodeTypes:bl,edgeTypes:yl,connectionLineType:Z,connectionLineStyle:H,connectionLineComponent:Y,connectionLineContainerStyle:oe,selectionKeyCode:we,deleteKeyCode:se,multiSelectionKeyCode:Ee,zoomActivationKeyCode:ce,onlyRenderVisibleElements:Xe,selectNodesOnDrag:lt,translateExtent:cn,minZoom:pr,maxZoom:Kt,defaultZoom:Yt,defaultPosition:Oo,preventScrolling:zd,zoomOnScroll:Fd,zoomOnPinch:tl,zoomOnDoubleClick:Hd,panOnScroll:$d,panOnScrollSpeed:ga,panOnScrollMode:ma,panOnDrag:Vd,onPaneClick:Wd,onPaneScroll:Ud,onPaneContextMenu:Gd,onSelectionContextMenu:ie,onEdgeUpdate:sl,onEdgeContextMenu:Yd,onEdgeDoubleClick:Xd,onEdgeMouseEnter:Zd,onEdgeMouseMove:Jd,onEdgeMouseLeave:Qd,onEdgeUpdateStart:ef,onEdgeUpdateEnd:si,edgeUpdaterRadius:li,defaultMarkerColor:Bd,noDragClassName:ul,noWheelClassName:dl,noPanClassName:nf,elevateEdgesOnSelect:ml,id:ci==null?void 0:ci.id}),T.createElement(Pee,{nodes:r,edges:n,defaultNodes:o,defaultEdges:i,onConnect:x,onConnectStart:w,onConnectStop:E,onConnectEnd:S,onClickConnectStart:_,onClickConnectStop:O,onClickConnectEnd:N,nodesDraggable:Wt,nodesConnectable:mt,elementsSelectable:ct,minZoom:pr,maxZoom:Kt,nodeExtent:Js,onNodesChange:tf,onEdgesChange:rf,snapToGrid:ke,snapGrid:ze,connectionMode:$,translateExtent:cn,connectOnClick:vl,defaultEdgeOptions:gl,fitView:of,fitViewOptions:hl,onNodesDelete:q,onEdgesDelete:G,onNodeDragStart:M,onNodeDrag:P,onNodeDragStop:V,onSelectionDrag:z,onSelectionDragStart:Q,onSelectionDragStop:U}),W&&T.createElement(Ree,{onSelectionChange:W}),Kd,T.createElement(pee,{proOptions:af,position:wa})))});L5.displayName="ReactFlow";function z5(e){return function(t){var r=T.useState(t),n=He(r,2),o=n[0],i=n[1],a=T.useCallback(function(s){return i(function(c){return e(s,c)})},[]);return[o,i,a]}}var Tte=z5(a5),Ate=z5(jQ);function DA(e,t){const{width:r,height:n,positionAbsolute:o}=e,i=t.positionAbsolute,a=r/2,s=n/2,c=o.x+a,u=o.y+s,d=i.x+a,p=i.y+s,h=(d-c)/(2*a)-(p-u)/(2*s),v=(d-c)/(2*a)+(p-u)/(2*s),y=1/(Math.abs(h)+Math.abs(v)),g=y*h,b=y*v,x=a*(g+b)+c,w=s*(-g+b)+u;return{x,y:w}}function jA(e,t){const r={...e.positionAbsolute,...e},n=Math.round(r.x),o=Math.round(r.y),i=Math.round(t.x),a=Math.round(t.y);return i<=n+1?Se.Left:i>=n+r.width-1?Se.Right:a<=o+1?Se.Top:a>=r.y+r.height-1?Se.Bottom:Se.Top}function B5(e,t){const r=DA(e,t),n=DA(t,e),o=jA(e,r),i=jA(t,n);return{sx:r.x,sy:r.y,tx:n.x,ty:n.y,sourcePos:o,targetPos:i}}const kte=({targetX:e,targetY:t,sourcePosition:r,targetPosition:n,sourceNode:o})=>{if(!o)return null;const i={id:"connection-target",width:1,height:1,position:{x:e,y:t}},{sx:a,sy:s}=B5(o,i),c=hd({sourceX:a,sourceY:s,sourcePosition:r,targetPosition:n,targetX:e,targetY:t});return C.jsxs("g",{children:[C.jsx("path",{fill:"none",stroke:"#222",strokeWidth:1.5,className:"animated",d:c}),C.jsx("circle",{cx:e,cy:t,fill:"#fff",r:3,stroke:"#222",strokeWidth:1.5})]})},Mte=({id:e,source:t,target:r,markerEnd:n,style:o})=>{const i=Ct(T.useCallback(y=>y.nodeInternals.get(t),[t])),a=Ct(T.useCallback(y=>y.nodeInternals.get(r),[r]));if(!i||!a)return null;const{sx:s,sy:c,tx:u,ty:d,sourcePos:p,targetPos:h}=B5(i,a),v=hd({sourceX:s,sourceY:c,sourcePosition:p,targetPosition:h,targetX:u,targetY:d});return C.jsx("path",{id:e,className:"react-flow__edge-path",d:v,markerEnd:n,style:o})},qA=172,LA=36,Dte={custom:Mte},jte=(e,t,r="LR")=>{const n=new _T.graphlib.Graph;n.setDefaultEdgeLabel(()=>({}));const o=r==="LR";return n.setGraph({rankdir:r}),e.forEach(i=>{n.setNode(i.id,{width:qA,height:LA})}),t.forEach(i=>{n.setEdge(i.source,i.target)}),_T.layout(n),e.forEach(i=>{const a=n.node(i.id);return i.targetPosition=o?Se.Left:Se.Top,i.sourcePosition=o?Se.Right:Se.Bottom,i.position={x:a.x-qA/2,y:a.y-LA/2},i}),{nodes:e,edges:t}},qte=()=>{},Lte=({data:e,dict:t,onSelect:r=qte})=>{const{nodes:n,edges:o}=jte(Object.values(t).filter(p=>p.id===e.selected||e.parents.flat().includes(p.id)||e.children.flat().includes(p.id)).map(p=>({id:p.id,type:p.parents.length===0?"input":p.includes.length===0?"output":"default",sourcePosition:Se.Right,targetPosition:Se.Left,data:{label:p.privilege},position:{x:0,y:0},className:p.id===e.selected?"highlighted":"",selected:p.id===e.selected})),e.links.map(({source:p,target:h})=>({id:`e${p}-${h}`,source:p,target:h}))),[i,a,s]=Tte(n),[c,u,d]=Ate(o);return T.useEffect(()=>{a([...n]),u([...o])},[e]),C.jsx(L5,{nodes:i,edges:c,fitView:!0,onNodesChange:s,onEdgesChange:d,onNodeClick:(p,h)=>{r(h.id)},defaultZoom:.5,edgeTypes:Dte,connectionLineComponent:kte,children:C.jsx(dee,{variant:Ko.Dots,color:"#81818140",gap:18,size:1})})};var F5=(e=>(e.method="methods",e.entityCollection="entityselMethod",e.dataClass="dataclassMethod",e.dataStore="dsMethod",e.entity="entityMethod",e.attribute="attributes",e.singletonMethod="singletonMethod",e))(F5||{});const $5=e=>{switch(e){case"entityCollection":return de.ESubPermissionType.ENTITY_SEL_METHOD;case"dataClass":return de.ESubPermissionType.DATACLASS_METHOD;case"dataStore":return de.ESubPermissionType.DS_METHOD;case"entity":return de.ESubPermissionType.ENTITY_METHOD;default:return de.EPermissionType.METHOD}},zA=(e=[],t,r)=>{var o;const n=[];for(const i of e)(o=i[F5[r]])==null||o.forEach(a=>{if(`${i.name.toLowerCase()}.${a.name.toLowerCase()}`.includes(t)||!t){const c={applyTo:`${i.name}.${a.name}`,type:r};r===de.EPermissionType.METHOD&&(c.subType=$5(a.applyTo)),n.push(c)}});return n},zte=(e=[],t)=>{var n;const r=[];for(const o of e)(n=o.methods)==null||n.forEach(i=>{(`${o.name.toLowerCase()}.${i.name.toLowerCase()}`.includes(t)||!t)&&r.push({applyTo:`${o.name}.${i.name}`,type:de.EPermissionType.SINGLETON_METHOD})});return r};function B_(e,t=[],r=[],n=[]){const o=zA(r,e,de.EPermissionType.ATTRIBUTE),i=zA(r,e,de.EPermissionType.METHOD),a=zte(n,e),s=t.filter(p=>!e||`ds.${p.name.toLowerCase()}`.includes(e)).map(p=>({applyTo:`ds.${p.name}`,type:de.ESubPermissionType.DS_METHOD})),c=[],u=[];return r.filter(p=>p.name.toLowerCase().includes(e)).forEach(p=>{c.push({applyTo:p.name,type:de.EPermissionType.DATACLASS})}),n.filter(p=>p.name.toLowerCase().includes(e)).forEach(p=>{u.push({applyTo:p.name,type:de.EPermissionType.SINGLETON})}),[...[{applyTo:"ds",type:de.EPermissionType.DATASTORE}].filter(p=>!e||`ds.${p.applyTo.toLowerCase()}`.includes(e)),...s,...c,...o,...i,...u,...a].reduce((p,h)=>{const v=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],[y,g]=h.applyTo.split("."),b=p.find(x=>x.prefix===y);return b?(b.resources=[...b.resources,h].sort((x,w)=>{const E=v.indexOf(x.type),S=v.indexOf(w.type);return E>S?1:-1}),b.type=g?b.type:h.type,[...p].sort((x,w)=>{const E=v.indexOf(x.type),S=v.indexOf(w.type);return E>S?1:-1})):[...p,{prefix:y,type:g?null:h.type,resources:[h]}]},[]).reduce((p,h)=>[...p,...h.resources],[])}const Bte=(e=[],t=[],r=[])=>{const n=B_("",e,t,r),o={ds:{applyTo:"ds",type:de.EPermissionType.DATASTORE,methods:[],dataClasses:[],singletons:[]}},i=(s,c)=>s.applyTo.localeCompare(c.applyTo);n.forEach(s=>{const[c,u]=s.applyTo.split(".");if(u||(s.type===de.EPermissionType.DATACLASS?o.ds.dataClasses.push({applyTo:c,type:de.EPermissionType.DATACLASS,methods:[],attributes:[]}):s.type===de.EPermissionType.SINGLETON&&o.ds.singletons.push({applyTo:c,type:de.EPermissionType.SINGLETON,methods:[],attributes:[]})),u){const d=(p,h,v)=>{p.forEach(y=>{y.applyTo===c&&y[h].push(v)})};[de.ESubPermissionType.DS_METHOD,de.ESubPermissionType.DATACLASS_METHOD,de.ESubPermissionType.ENTITY_METHOD,de.ESubPermissionType.ENTITY_SEL_METHOD].includes(s.type)?c==="ds"?o.ds.methods.push(s):d(o.ds.dataClasses,"methods",s):s.type===de.EPermissionType.ATTRIBUTE?(d(o.ds.dataClasses,"attributes",s),d(o.ds.singletons,"attributes",s)):s.type===de.EPermissionType.SINGLETON_METHOD&&d(o.ds.singletons,"methods",s)}});const a=s=>{s.forEach(c=>{c.methods&&c.methods.sort(i),c.attributes&&c.attributes.sort(i)})};return o.ds.methods.sort(i),o.ds.dataClasses.sort(i),o.ds.singletons.sort(i),a(o.ds.dataClasses),a(o.ds.singletons),o},H5=(e,t=[])=>{const r={};return Object.entries(e).forEach(([n,o])=>{r[n]={...o,resources:o.resources.map(i=>{var a,s,c;if(i.type===de.EPermissionType.METHOD&&t.length){const[u,d]=i.resource.split("."),p=u==="ds"?"dataStore":((c=(s=(a=t.find(h=>h.name===u))==null?void 0:a.methods)==null?void 0:s.find(h=>h.name===d))==null?void 0:c.applyTo)||"dataClass";return{...i,type:i.type,subType:$5(p)}}return i})}}),r},V5=(e,t)=>Object.entries(e).map(([r,n])=>{const o=n.resources.map(i=>{var u,d,p,h,v,y,g,b;const[a,s]=i.resource.split(".");let c=!0;switch(i.type){case de.EPermissionType.DATASTORE:c=!!t;break;case de.ESubPermissionType.DS_METHOD:c=!!t.methods.find(x=>x.name===s&&x.applyTo==="dataStore");break;case de.EPermissionType.DATACLASS:c=!!t.dataClasses[a];break;case de.EPermissionType.ATTRIBUTE:c=!!((d=(u=t.dataClasses[a])==null?void 0:u.attributes)!=null&&d.find(x=>x.name===s));break;case de.EPermissionType.METHOD:c=!!((h=(p=t.dataClasses[a])==null?void 0:p.methods)!=null&&h.find(x=>x.name===s));break;case de.ESubPermissionType.ENTITY_SEL_METHOD:c=!!((v=t.dataClasses[a])!=null&&v.methods.find(x=>x.name===s&&x.applyTo==="entityCollection"));break;case de.ESubPermissionType.DATACLASS_METHOD:c=!!((y=t.dataClasses[a])!=null&&y.methods.find(x=>x.name===s&&x.applyTo==="dataClass"));break;case de.ESubPermissionType.ENTITY_METHOD:c=!!((g=t.dataClasses[a])!=null&&g.methods.find(x=>x.name===s&&x.applyTo==="entity"));break;case de.EPermissionType.SINGLETON_METHOD:c=!!((b=t.singletons[a])!=null&&b.methods.find(x=>x.name===s));break;case de.EPermissionType.SINGLETON:c=!!t.singletons[a];break;default:c=!0}return{...i,exists:c}});return{[r]:{...n,resources:o}}}).reduce((r,n)=>({...r,...n}),{});var hs={exports:{}};/**
53
+ */var AO;function V8(){return AO||(AO=1,process.env.NODE_ENV!=="production"&&(function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),y=!1,g=!1,b=!1,x=!1,w=!1,E;E=Symbol.for("react.module.reference");function S(ve){return!!(typeof ve=="string"||typeof ve=="function"||ve===r||ve===o||w||ve===n||ve===u||ve===d||x||ve===v||y||g||b||typeof ve=="object"&&ve!==null&&(ve.$$typeof===h||ve.$$typeof===p||ve.$$typeof===i||ve.$$typeof===a||ve.$$typeof===c||ve.$$typeof===E||ve.getModuleId!==void 0))}function _(ve){if(typeof ve=="object"&&ve!==null){var Ee=ve.$$typeof;switch(Ee){case e:var pe=ve.type;switch(pe){case r:case o:case n:case u:case d:return pe;default:var ce=pe&&pe.$$typeof;switch(ce){case s:case a:case c:case h:case p:case i:return ce;default:return Ee}}case t:return Ee}}}var O=a,N=i,R=e,A=c,D=r,B=h,j=p,M=t,P=o,V=n,q=u,G=d,W=!1,Q=!1;function z(ve){return W||(W=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function U(ve){return Q||(Q=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function ie(ve){return _(ve)===a}function te(ve){return _(ve)===i}function $(ve){return typeof ve=="object"&&ve!==null&&ve.$$typeof===e}function K(ve){return _(ve)===c}function Z(ve){return _(ve)===r}function H(ve){return _(ve)===h}function Y(ve){return _(ve)===p}function oe(ve){return _(ve)===t}function re(ve){return _(ve)===o}function se(ve){return _(ve)===n}function ee(ve){return _(ve)===u}function we(ve){return _(ve)===d}it.ContextConsumer=O,it.ContextProvider=N,it.Element=R,it.ForwardRef=A,it.Fragment=D,it.Lazy=B,it.Memo=j,it.Portal=M,it.Profiler=P,it.StrictMode=V,it.Suspense=q,it.SuspenseList=G,it.isAsyncMode=z,it.isConcurrentMode=U,it.isContextConsumer=ie,it.isContextProvider=te,it.isElement=$,it.isForwardRef=K,it.isFragment=Z,it.isLazy=H,it.isMemo=Y,it.isPortal=oe,it.isProfiler=re,it.isStrictMode=se,it.isSuspense=ee,it.isSuspenseList=we,it.isValidElementType=S,it.typeOf=_})()),it}var kO;function W8(){return kO||(kO=1,process.env.NODE_ENV==="production"?Rp.exports=H8():Rp.exports=V8()),Rp.exports}var MO=W8();const DO=e=>typeof e=="object"&&e!=null&&e.nodeType===1,jO=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",hc=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return jO(r.overflowY,t)||jO(r.overflowX,t)||(n=>{const o=(i=>{if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!o&&(o.clientHeight<n.scrollHeight||o.clientWidth<n.scrollWidth)})(e)}return!1},vc=(e,t,r,n,o,i,a,s)=>i<e&&a>t||i>e&&a<t?0:i<=e&&s<=r||a>=t&&s>=r?i-e-n:a>t&&s<r||i<e&&s>r?a-t+o:0,U8=e=>e.parentElement??(e.getRootNode().host||null),G8=(e,t)=>{var r,n,o,i;if(typeof document>"u")return[];const{inline:a,boundary:s,skipOverflowHiddenElements:c}=t,u=typeof s=="function"?s:M=>M!==s;if(!DO(e))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,p=[];let h=e;for(;DO(h)&&u(h);){if(h=U8(h),h===d){p.push(h);break}h!=null&&h===document.body&&hc(h)&&!hc(document.documentElement)||h!=null&&hc(h,c)&&p.push(h)}const v=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,y=(i=(o=window.visualViewport)==null?void 0:o.height)!=null?i:innerHeight,{scrollX:g,scrollY:b}=window,{height:x,width:w,top:E,right:S,bottom:_,left:O}=e.getBoundingClientRect(),{top:N,right:R,left:A}=(M=>{const P=window.getComputedStyle(M);return{top:parseFloat(P.scrollMarginTop)||0,right:parseFloat(P.scrollMarginRight)||0,bottom:parseFloat(P.scrollMarginBottom)||0,left:parseFloat(P.scrollMarginLeft)||0}})(e);let D=E-N,B=a==="center"?O+w/2-A+R:a==="end"?S+R:O-A;const j=[];for(let M=0;M<p.length;M++){const P=p[M],{height:V,width:q,top:G,right:W,bottom:Q,left:z}=P.getBoundingClientRect();if(E>=0&&O>=0&&_<=y&&S<=v&&(P===d&&!hc(P)||E>=G&&_<=Q&&O>=z&&S<=W))return j;const U=getComputedStyle(P),ie=parseInt(U.borderLeftWidth,10),te=parseInt(U.borderTopWidth,10),$=parseInt(U.borderRightWidth,10),K=parseInt(U.borderBottomWidth,10);let Z=0,H=0;const Y="offsetWidth"in P?P.offsetWidth-P.clientWidth-ie-$:0,oe="offsetHeight"in P?P.offsetHeight-P.clientHeight-te-K:0,re="offsetWidth"in P?P.offsetWidth===0?0:q/P.offsetWidth:0,se="offsetHeight"in P?P.offsetHeight===0?0:V/P.offsetHeight:0;if(d===P)Z=vc(b,b+y,y,te,K,b+D,b+D+x,x),H=a==="start"?B:a==="center"?B-v/2:a==="end"?B-v:vc(g,g+v,v,ie,$,g+B,g+B+w,w),Z=Math.max(0,Z+b),H=Math.max(0,H+g);else{Z=vc(G,Q,V,te,K+oe,D,D+x,x),H=a==="start"?B-z-ie:a==="center"?B-(z+q/2)+Y/2:a==="end"?B-W+$+Y:vc(z,W,q,ie,$+Y,B,B+w,w);const{scrollLeft:ee,scrollTop:we}=P;Z=se===0?0:Math.max(0,Math.min(we+Z/se,P.scrollHeight-V/se+oe)),H=re===0?0:Math.max(0,Math.min(ee+H/re,P.scrollWidth-q/re+Y)),D+=we-Z,B+=ee-H}j.push({el:P,top:Z,left:H})}return j};var Ui=function(){return Ui=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Ui.apply(this,arguments)},K8=0;function qO(e){return typeof e=="function"?e:Bn}function Bn(){}function J2(e,t){if(e){var r=G8(e,{boundary:t});r.forEach(function(n){var o=n.el,i=n.top,a=n.left;o.scrollTop=i,o.scrollLeft=a})}}function LO(e,t,r){var n=e===t||t instanceof r.Node&&e.contains&&e.contains(t);return n}function t_(e,t){var r;function n(){r&&clearTimeout(r)}function o(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];n(),r=setTimeout(function(){r=null,e.apply(void 0,a)},t)}return o.cancel=n,o}function pn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return s&&s.apply(void 0,[n].concat(i)),n.preventDownshiftDefault||n.hasOwnProperty("nativeEvent")&&n.nativeEvent.preventDownshiftDefault})}}function zO(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){t.forEach(function(o){typeof o=="function"?o(n):o&&(o.current=n)})}}function Y8(){return String(K8++)}function X8(e){var t=e.isOpen,r=e.resultCount,n=e.previousResultCount;return t?r?r!==n?r+" result"+(r===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function BO(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function Q2(e){return typeof e.type=="string"}function eq(e){return e.props}function Z8(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var J8=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function gc(e){e===void 0&&(e={});var t={};return J8.forEach(function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}function Q8(e,t){return!e||!t?e:Object.keys(e).reduce(function(r,n){return r[n]=dx(t,n)?t[n]:e[n],r},{})}function dx(e,t){return e[t]!==void 0}function FO(e){var t=e.key,r=e.keyCode;return r>=37&&r<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function eG(e){return Object.prototype.toString.call(e)==="[object Object]"}function Np(e,t,r,n,o){var i=r.length;if(i===0)return-1;var a=i-1;(typeof e!="number"||e<0||e>a)&&(e=t>0?-1:a+1);var s=e+t;s<0?s=a:s>a&&(s=0);var c=lu(s,t<0,r,n,o);return c===-1?e>=i?-1:e:c}function lu(e,t,r,n,o){o===void 0&&(o=!1);var i=r.length;if(t){for(var a=e;a>=0;a--)if(!n(r[a],a))return a}else for(var s=e;s<i;s++)if(!n(r[s],s))return s;return o?lu(t?i-1:0,t,r,n):-1}function $O(e,t,r,n){return n===void 0&&(n=!0),r&&t.some(function(o){return o&&(LO(o,e,r)||n&&LO(o,r.document.activeElement,r))})}var r_=Bn;process.env.NODE_ENV!=="production"&&(r_=function(e,t,r){var n="This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";Object.keys(e).forEach(function(o){t[o]!==void 0&&r[o]===void 0?console.error('downshift: A component has changed the controlled prop "'+o+'" to be uncontrolled. '+n):t[o]===void 0&&r[o]!==void 0&&console.error('downshift: A component has changed the uncontrolled prop "'+o+'" to be controlled. '+n)})});var tG=t_(function(e){tq(e).textContent=""},500);function tq(e){var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}function rq(e,t){if(!(!e||!t)){var r=tq(t);r.textContent=e,tG(t)}}var nq=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,oq=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,iq=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,Wc=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,Uc=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,aq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,sq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,lq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,cq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,uq=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,dq=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,fq=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,pq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,fx=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,hq=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,vq=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,gq=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,rG=Object.freeze({__proto__:null,blurButton:hq,blurInput:dq,changeInput:fq,clickButton:fx,clickItem:uq,controlledPropUpdatedSelectedItem:vq,itemMouseEnter:iq,keyDownArrowDown:Uc,keyDownArrowUp:Wc,keyDownEnd:cq,keyDownEnter:sq,keyDownEscape:aq,keyDownHome:lq,keyDownSpaceButton:pq,mouseUp:oq,touchEnd:gq,unknown:nq}),nG=["refKey","ref"],oG=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],iG=["onKeyDown","onBlur","onChange","onInput","onChangeText"],aG=["refKey","ref"],sG=["onMouseMove","onMouseDown","onClick","onPress","index","item"],lG=(function(){var e=(function(t){function r(o){var i;i=t.call(this,o)||this,i.id=i.props.id||"downshift-"+Y8(),i.menuId=i.props.menuId||i.id+"-menu",i.labelId=i.props.labelId||i.id+"-label",i.inputId=i.props.inputId||i.id+"-input",i.getItemId=i.props.getItemId||function(w){return i.id+"-item-"+w},i.items=[],i.itemCount=null,i.previousResultCount=0,i.timeoutIds=[],i.internalSetTimeout=function(w,E){var S=setTimeout(function(){i.timeoutIds=i.timeoutIds.filter(function(_){return _!==S}),w()},E);i.timeoutIds.push(S)},i.setItemCount=function(w){i.itemCount=w},i.unsetItemCount=function(){i.itemCount=null},i.isItemDisabled=function(w,E){var S=i.getItemNodeFromIndex(E);return S&&S.hasAttribute("disabled")},i.setHighlightedIndex=function(w,E){w===void 0&&(w=i.props.defaultHighlightedIndex),E===void 0&&(E={}),E=gc(E),i.internalSetState(Ot({highlightedIndex:w},E))},i.clearSelection=function(w){i.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:i.props.defaultHighlightedIndex,isOpen:i.props.defaultIsOpen},w)},i.selectItem=function(w,E,S){E=gc(E),i.internalSetState(Ot({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,selectedItem:w,inputValue:i.props.itemToString(w)},E),S)},i.selectItemAtIndex=function(w,E,S){var _=i.items[w];_!=null&&i.selectItem(_,E,S)},i.selectHighlightedItem=function(w,E){return i.selectItemAtIndex(i.getState().highlightedIndex,w,E)},i.internalSetState=function(w,E){var S,_,O={},N=typeof w=="function";return!N&&w.hasOwnProperty("inputValue")&&i.props.onInputValueChange(w.inputValue,Ot({},i.getStateAndHelpers(),w)),i.setState(function(R){var A;R=i.getState(R);var D=N?w(R):w;D=i.props.stateReducer(R,D),S=D.hasOwnProperty("selectedItem");var B={};return S&&D.selectedItem!==R.selectedItem&&(_=D.selectedItem),(A=D).type||(A.type=nq),Object.keys(D).forEach(function(j){R[j]!==D[j]&&(O[j]=D[j]),j!=="type"&&(D[j],dx(i.props,j)||(B[j]=D[j]))}),N&&D.hasOwnProperty("inputValue")&&i.props.onInputValueChange(D.inputValue,Ot({},i.getStateAndHelpers(),D)),B},function(){qO(E)();var R=Object.keys(O).length>1;R&&i.props.onStateChange(O,i.getStateAndHelpers()),S&&i.props.onSelect(w.selectedItem,i.getStateAndHelpers()),_!==void 0&&i.props.onChange(_,i.getStateAndHelpers()),i.props.onUserAction(O,i.getStateAndHelpers())})},i.rootRef=function(w){return i._rootNode=w},i.getRootProps=function(w,E){var S,_=w===void 0?{}:w,O=_.refKey,N=O===void 0?"ref":O,R=_.ref,A=Ba(_,nG),D=E===void 0?{}:E,B=D.suppressRefError,j=B===void 0?!1:B;i.getRootProps.called=!0,i.getRootProps.refKey=N,i.getRootProps.suppressRefError=j;var M=i.getState(),P=M.isOpen;return Ot((S={},S[N]=zO(R,i.rootRef),S.role="combobox",S["aria-expanded"]=P,S["aria-haspopup"]="listbox",S["aria-owns"]=P?i.menuId:void 0,S["aria-labelledby"]=i.labelId,S),A)},i.keyDownHandlers={ArrowDown:function(w){var E=this;if(w.preventDefault(),this.getState().isOpen){var S=w.shiftKey?5:1;this.moveHighlightedIndex(S,{type:Uc})}else this.internalSetState({isOpen:!0,type:Uc},function(){var _=E.getItemCount();if(_>0){var O=E.getState(),N=O.highlightedIndex,R=Np(N,1,{length:_},E.isItemDisabled,!0);E.setHighlightedIndex(R,{type:Uc})}})},ArrowUp:function(w){var E=this;if(w.preventDefault(),this.getState().isOpen){var S=w.shiftKey?-5:-1;this.moveHighlightedIndex(S,{type:Wc})}else this.internalSetState({isOpen:!0,type:Wc},function(){var _=E.getItemCount();if(_>0){var O=E.getState(),N=O.highlightedIndex,R=Np(N,-1,{length:_},E.isItemDisabled,!0);E.setHighlightedIndex(R,{type:Wc})}})},Enter:function(w){if(w.which!==229){var E=this.getState(),S=E.isOpen,_=E.highlightedIndex;if(S&&_!=null){w.preventDefault();var O=this.items[_],N=this.getItemNodeFromIndex(_);if(O==null||N&&N.hasAttribute("disabled"))return;this.selectHighlightedItem({type:sq})}}},Escape:function(w){w.preventDefault(),this.reset(Ot({type:aq},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},i.buttonKeyDownHandlers=Ot({},i.keyDownHandlers,{" ":function(w){w.preventDefault(),this.toggleMenu({type:pq})}}),i.inputKeyDownHandlers=Ot({},i.keyDownHandlers,{Home:function(w){var E=this.getState(),S=E.isOpen;if(S){w.preventDefault();var _=this.getItemCount();if(!(_<=0||!S)){var O=lu(0,!1,{length:_},this.isItemDisabled);this.setHighlightedIndex(O,{type:lq})}}},End:function(w){var E=this.getState(),S=E.isOpen;if(S){w.preventDefault();var _=this.getItemCount();if(!(_<=0||!S)){var O=lu(_-1,!0,{length:_},this.isItemDisabled);this.setHighlightedIndex(O,{type:cq})}}}}),i.getToggleButtonProps=function(w){var E=w===void 0?{}:w,S=E.onClick;E.onPress;var _=E.onKeyDown,O=E.onKeyUp,N=E.onBlur,R=Ba(E,oG),A=i.getState(),D=A.isOpen,B={onClick:pn(S,i.buttonHandleClick),onKeyDown:pn(_,i.buttonHandleKeyDown),onKeyUp:pn(O,i.buttonHandleKeyUp),onBlur:pn(N,i.buttonHandleBlur)},j=R.disabled?{}:B;return Ot({type:"button",role:"button","aria-label":D?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},j,R)},i.buttonHandleKeyUp=function(w){w.preventDefault()},i.buttonHandleKeyDown=function(w){var E=FO(w);i.buttonKeyDownHandlers[E]&&i.buttonKeyDownHandlers[E].call(i,w)},i.buttonHandleClick=function(w){if(w.preventDefault(),i.props.environment){var E=i.props.environment.document,S=E.body,_=E.activeElement;S&&S===_&&w.target.focus()}process.env.NODE_ENV==="test"?i.toggleMenu({type:fx}):i.internalSetTimeout(function(){return i.toggleMenu({type:fx})})},i.buttonHandleBlur=function(w){var E=w.target;i.internalSetTimeout(function(){if(!(i.isMouseDown||!i.props.environment)){var S=i.props.environment.document.activeElement;(S==null||S.id!==i.inputId)&&S!==E&&i.reset({type:hq})}})},i.getLabelProps=function(w){return Ot({htmlFor:i.inputId,id:i.labelId},w)},i.getInputProps=function(w){var E=w===void 0?{}:w,S=E.onKeyDown,_=E.onBlur,O=E.onChange,N=E.onInput;E.onChangeText;var R=Ba(E,iG),A,D={};A="onChange";var B=i.getState(),j=B.inputValue,M=B.isOpen,P=B.highlightedIndex;if(!R.disabled){var V;D=(V={},V[A]=pn(O,N,i.inputHandleChange),V.onKeyDown=pn(S,i.inputHandleKeyDown),V.onBlur=pn(_,i.inputHandleBlur),V)}return Ot({"aria-autocomplete":"list","aria-activedescendant":M&&typeof P=="number"&&P>=0?i.getItemId(P):void 0,"aria-controls":M?i.menuId:void 0,"aria-labelledby":R&&R["aria-label"]?void 0:i.labelId,autoComplete:"off",value:j,id:i.inputId},D,R)},i.inputHandleKeyDown=function(w){var E=FO(w);E&&i.inputKeyDownHandlers[E]&&i.inputKeyDownHandlers[E].call(i,w)},i.inputHandleChange=function(w){i.internalSetState({type:fq,isOpen:!0,inputValue:w.target.value,highlightedIndex:i.props.defaultHighlightedIndex})},i.inputHandleBlur=function(){i.internalSetTimeout(function(){var w;if(!(i.isMouseDown||!i.props.environment)){var E=i.props.environment.document.activeElement,S=(E==null||(w=E.dataset)==null?void 0:w.toggle)&&i._rootNode&&i._rootNode.contains(E);S||i.reset({type:dq})}})},i.menuRef=function(w){i._menuNode=w},i.getMenuProps=function(w,E){var S,_=w===void 0?{}:w,O=_.refKey,N=O===void 0?"ref":O,R=_.ref,A=Ba(_,aG),D=E===void 0?{}:E,B=D.suppressRefError,j=B===void 0?!1:B;return i.getMenuProps.called=!0,i.getMenuProps.refKey=N,i.getMenuProps.suppressRefError=j,Ot((S={},S[N]=zO(R,i.menuRef),S.role="listbox",S["aria-labelledby"]=A&&A["aria-label"]?void 0:i.labelId,S.id=i.menuId,S),A)},i.getItemProps=function(w){var E,S=w===void 0?{}:w,_=S.onMouseMove,O=S.onMouseDown,N=S.onClick;S.onPress;var R=S.index,A=S.item,D=A===void 0?process.env.NODE_ENV==="production"?void 0:Z8("getItemProps","item"):A,B=Ba(S,sG);R===void 0?(i.items.push(D),R=i.items.indexOf(D)):i.items[R]=D;var j="onClick",M=N,P=(E={onMouseMove:pn(_,function(){R!==i.getState().highlightedIndex&&(i.setHighlightedIndex(R,{type:iq}),i.avoidScrolling=!0,i.internalSetTimeout(function(){return i.avoidScrolling=!1},250))}),onMouseDown:pn(O,function(q){q.preventDefault()})},E[j]=pn(M,function(){i.selectItemAtIndex(R,{type:uq})}),E),V=B.disabled?{onMouseDown:P.onMouseDown}:P;return Ot({id:i.getItemId(R),role:"option","aria-selected":i.getState().highlightedIndex===R},V,B)},i.clearItems=function(){i.items=[]},i.reset=function(w,E){w===void 0&&(w={}),w=gc(w),i.internalSetState(function(S){var _=S.selectedItem;return Ot({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,inputValue:i.props.itemToString(_)},w)},E)},i.toggleMenu=function(w,E){w===void 0&&(w={}),w=gc(w),i.internalSetState(function(S){var _=S.isOpen;return Ot({isOpen:!_},_&&{highlightedIndex:i.props.defaultHighlightedIndex},w)},function(){var S=i.getState(),_=S.isOpen,O=S.highlightedIndex;_&&i.getItemCount()>0&&typeof O=="number"&&i.setHighlightedIndex(O,w),qO(E)()})},i.openMenu=function(w){i.internalSetState({isOpen:!0},w)},i.closeMenu=function(w){i.internalSetState({isOpen:!1},w)},i.updateStatus=t_(function(){var w;if((w=i.props)!=null&&(w=w.environment)!=null&&w.document){var E=i.getState(),S=i.items[E.highlightedIndex],_=i.getItemCount(),O=i.props.getA11yStatusMessage(Ot({itemToString:i.props.itemToString,previousResultCount:i.previousResultCount,resultCount:_,highlightedItem:S},E));i.previousResultCount=_,rq(O,i.props.environment.document)}},200);var a=i.props,s=a.defaultHighlightedIndex,c=a.initialHighlightedIndex,u=c===void 0?s:c,d=a.defaultIsOpen,p=a.initialIsOpen,h=p===void 0?d:p,v=a.initialInputValue,y=v===void 0?"":v,g=a.initialSelectedItem,b=g===void 0?null:g,x=i.getState({highlightedIndex:u,isOpen:h,inputValue:y,selectedItem:b});return x.selectedItem!=null&&i.props.initialInputValue===void 0&&(x.inputValue=i.props.itemToString(x.selectedItem)),i.state=x,i}M8(r,t);var n=r.prototype;return n.internalClearTimeouts=function(){this.timeoutIds.forEach(function(o){clearTimeout(o)}),this.timeoutIds=[]},n.getState=function(o){return o===void 0&&(o=this.state),Q8(o,this.props)},n.getItemCount=function(){var o=this.items.length;return this.itemCount!=null?o=this.itemCount:this.props.itemCount!==void 0&&(o=this.props.itemCount),o},n.getItemNodeFromIndex=function(o){return this.props.environment?this.props.environment.document.getElementById(this.getItemId(o)):null},n.scrollHighlightedItemIntoView=function(){{var o=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(o,this._menuNode)}},n.moveHighlightedIndex=function(o,i){var a=this.getItemCount(),s=this.getState(),c=s.highlightedIndex;if(a>0){var u=Np(c,o,{length:a},this.isItemDisabled,!0);this.setHighlightedIndex(u,i)}},n.getStateAndHelpers=function(){var o=this.getState(),i=o.highlightedIndex,a=o.inputValue,s=o.selectedItem,c=o.isOpen,u=this.props.itemToString,d=this.id,p=this.getRootProps,h=this.getToggleButtonProps,v=this.getLabelProps,y=this.getMenuProps,g=this.getInputProps,b=this.getItemProps,x=this.openMenu,w=this.closeMenu,E=this.toggleMenu,S=this.selectItem,_=this.selectItemAtIndex,O=this.selectHighlightedItem,N=this.setHighlightedIndex,R=this.clearSelection,A=this.clearItems,D=this.reset,B=this.setItemCount,j=this.unsetItemCount,M=this.internalSetState;return{getRootProps:p,getToggleButtonProps:h,getLabelProps:v,getMenuProps:y,getInputProps:g,getItemProps:b,reset:D,openMenu:x,closeMenu:w,toggleMenu:E,selectItem:S,selectItemAtIndex:_,selectHighlightedItem:O,setHighlightedIndex:N,clearSelection:R,clearItems:A,setItemCount:B,unsetItemCount:j,setState:M,itemToString:u,id:d,highlightedIndex:i,inputValue:a,isOpen:c,selectedItem:s}},n.componentDidMount=function(){var o=this;if(process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&HO(this._menuNode,this.getMenuProps),!this.props.environment)this.cleanup=function(){o.internalClearTimeouts()};else{var i=function(){o.isMouseDown=!0},a=function(p){o.isMouseDown=!1;var h=$O(p.target,[o._rootNode,o._menuNode],o.props.environment);!h&&o.getState().isOpen&&o.reset({type:oq},function(){return o.props.onOuterClick(o.getStateAndHelpers())})},s=function(){o.isTouchMove=!1},c=function(){o.isTouchMove=!0},u=function(p){var h=$O(p.target,[o._rootNode,o._menuNode],o.props.environment,!1);!o.isTouchMove&&!h&&o.getState().isOpen&&o.reset({type:gq},function(){return o.props.onOuterClick(o.getStateAndHelpers())})},d=this.props.environment;d.addEventListener("mousedown",i),d.addEventListener("mouseup",a),d.addEventListener("touchstart",s),d.addEventListener("touchmove",c),d.addEventListener("touchend",u),this.cleanup=function(){o.internalClearTimeouts(),o.updateStatus.cancel(),d.removeEventListener("mousedown",i),d.removeEventListener("mouseup",a),d.removeEventListener("touchstart",s),d.removeEventListener("touchmove",c),d.removeEventListener("touchend",u)}}},n.shouldScroll=function(o,i){var a=this.props.highlightedIndex===void 0?this.getState():this.props,s=a.highlightedIndex,c=i.highlightedIndex===void 0?o:i,u=c.highlightedIndex,d=s&&this.getState().isOpen&&!o.isOpen,p=s!==u;return d||p},n.componentDidUpdate=function(o,i){process.env.NODE_ENV!=="production"&&(r_(this.state,o,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&HO(this._menuNode,this.getMenuProps)),dx(this.props,"selectedItem")&&this.props.selectedItemChanged(o.selectedItem,this.props.selectedItem)&&this.internalSetState({type:vq,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(i,o)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},n.componentWillUnmount=function(){this.cleanup()},n.render=function(){var o=BO(this.props.children,Bn);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var i=BO(o(this.getStateAndHelpers()));if(!i)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&cG(i,this.getRootProps),i;if(Q2(i))return T.cloneElement(i,this.getRootProps(eq(i)));if(process.env.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")},r})(T.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:X8,itemToString:function(t){return t==null?"":(process.env.NODE_ENV!=="production"&&eG(t)&&!t.hasOwnProperty("toString")&&console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.","The object that was passed:",t),String(t))},onStateChange:Bn,onInputValueChange:Bn,onUserAction:Bn,onChange:Bn,onSelect:Bn,onOuterClick:Bn,selectedItemChanged:function(t,r){return t!==r},environment:typeof window>"u"?void 0:window,stateReducer:function(t,r){return r},suppressRefError:!1,scrollIntoView:J2},e.stateChangeTypes=rG,e})();process.env.NODE_ENV!=="production"&&(lG.propTypes={children:ye.func,defaultHighlightedIndex:ye.number,defaultIsOpen:ye.bool,initialHighlightedIndex:ye.number,initialSelectedItem:ye.any,initialInputValue:ye.string,initialIsOpen:ye.bool,getA11yStatusMessage:ye.func,itemToString:ye.func,onChange:ye.func,onSelect:ye.func,onStateChange:ye.func,onInputValueChange:ye.func,onUserAction:ye.func,onOuterClick:ye.func,selectedItemChanged:ye.func,stateReducer:ye.func,itemCount:ye.number,id:ye.string,environment:ye.shape({addEventListener:ye.func.isRequired,removeEventListener:ye.func.isRequired,document:ye.shape({createElement:ye.func.isRequired,getElementById:ye.func.isRequired,activeElement:ye.any.isRequired,body:ye.any.isRequired}).isRequired,Node:ye.func.isRequired}),suppressRefError:ye.bool,scrollIntoView:ye.func,selectedItem:ye.any,isOpen:ye.bool,inputValue:ye.string,highlightedIndex:ye.number,labelId:ye.string,inputId:ye.string,menuId:ye.string,getItemId:ye.func});function HO(e,t){var r=t.refKey;e||console.error('downshift: The ref prop "'+r+'" from getMenuProps was not applied correctly on your menu element.')}function cG(e,t){var r=t.refKey,n=r!=="ref",o=!Q2(e);o&&!n&&!MO.isForwardRef(e)?console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps"):!o&&n&&console.error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "'+r+'"'),!MO.isForwardRef(e)&&!eq(e)[r]&&console.error('downshift: You must apply the ref prop "'+r+'" from getRootProps onto your root element.')}function uG(e,t){return t.changes}t_(function(e,t){rq(e,t)},200);var gs={itemToString:function(e){return e?String(e):""},itemToKey:function(e){return e},stateReducer:uG,scrollIntoView:J2,environment:typeof window>"u"?void 0:window};process.env.NODE_ENV;process.env.NODE_ENV;function dG(){var e=T.useRef(!0);return T.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}var Gc={environment:ye.shape({addEventListener:ye.func.isRequired,removeEventListener:ye.func.isRequired,document:ye.shape({createElement:ye.func.isRequired,getElementById:ye.func.isRequired,activeElement:ye.any.isRequired,body:ye.any.isRequired}).isRequired,Node:ye.func.isRequired}),itemToString:ye.func,itemToKey:ye.func,stateReducer:ye.func},mq=Ot({},Gc,{getA11yStatusMessage:ye.func,highlightedIndex:ye.number,defaultHighlightedIndex:ye.number,initialHighlightedIndex:ye.number,isOpen:ye.bool,defaultIsOpen:ye.bool,initialIsOpen:ye.bool,selectedItem:ye.any,initialSelectedItem:ye.any,defaultSelectedItem:ye.any,id:ye.string,labelId:ye.string,menuId:ye.string,getItemId:ye.func,toggleButtonId:ye.string,onSelectedItemChange:ye.func,onHighlightedIndexChange:ye.func,onStateChange:ye.func,onIsOpenChange:ye.func,scrollIntoView:ye.func}),fG=Ui(Ui({},mq),{items:ye.array.isRequired,isItemDisabled:ye.func});Ui(Ui({},gs),{isItemDisabled:function(){return!1}});process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;var pG=Ot({},mq,{items:ye.array.isRequired,isItemDisabled:ye.func,inputValue:ye.string,defaultInputValue:ye.string,initialInputValue:ye.string,inputId:ye.string,onInputValueChange:ye.func});process.env.NODE_ENV;Ot({},gs,{isItemDisabled:function(){return!1}});var hG={stateReducer:Gc.stateReducer,itemToKey:Gc.itemToKey,environment:Gc.environment,selectedItems:ye.array,initialSelectedItems:ye.array,defaultSelectedItems:ye.array,getA11yStatusMessage:ye.func,activeIndex:ye.number,initialActiveIndex:ye.number,defaultActiveIndex:ye.number,onActiveIndexChange:ye.func,onSelectedItemsChange:ye.func,keyNavigationNext:ye.string,keyNavigationPrevious:ye.string};gs.itemToKey,gs.stateReducer,gs.environment;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;const vG=T.forwardRef(({className:e,children:t,isFocused:r,isDisabled:n,...o},i)=>{const{size:a,color:s,isDisabled:c,hasMessage:u,downshift:d,isInvalid:p}=Fu(),h=n??c,v=r??d.isOpen;return C.jsx("div",{ref:i,className:qe(P8({size:a,color:s,isDisabled:h,isFocused:!!v,isInvalid:p&&!d.isOpen,hasMessage:u}),e),"aria-disabled":h,"aria-invalid":p,role:"combobox",tabIndex:h?-1:0,...o,children:t})}),gG=T.forwardRef(({isHidden:e,inputClassName:t,...r},n)=>{const{size:o,color:i}=Fu();return e?C.jsx("input",{ref:n,type:"text",style:{position:"absolute",top:0,left:0,opacity:0,width:"100%",height:"100%",pointerEvents:"none"},tabIndex:-1,...r}):C.jsx("input",{ref:n,type:"text",className:qe(T8({size:o,color:i}),t),...r})}),mG=T.forwardRef(({className:e,children:t,placement:r,...n},o)=>{const{size:i,hasMessage:a,color:s}=Fu();return C.jsx("div",{"data-qui":"SelectMenu",ref:o,className:qe(A8({size:i,placement:r,hasMessage:a,color:s}),e),...n,children:t})}),bG=T.forwardRef(({className:e,children:t,maxHeight:r=300,...n},o)=>{const{size:i}=Fu();return C.jsx(Yx,{scrollableNodeProps:{ref:o},className:qe(k8({size:i}),e),style:{maxHeight:r},...n,children:t})});vG.displayName="Select.Control";gG.displayName="Select.Input";mG.displayName="Select.Menu";bG.displayName="Select.MenuList";T.createContext(void 0);const yG=({active:e,disabled:t,error:r,isOpen:n,className:o})=>qe("flex w-full items-center justify-between text-left leading-5 transition-colors duration-200",{"cursor-pointer":!t,"text-inactive-text":t,"bg-primary hover:bg-primary-hover text-tab-active-fg":e&&!t,"text-negative":r&&!e&&!t,"bg-primary":n&&!e&&!t,"text-tab-inactive-fg":!e&&!t&&!r,"hover:bg-primary-hover hover:text-tab-active-fg":!t&&!e},o),wG=T.forwardRef(({active:e,disabled:t,error:r,isOpen:n,className:o,children:i,as:a="div",...s},c)=>{const u=yG({active:e,disabled:t,error:r,isOpen:n,className:o});return C.jsx(a,{"data-qui":"ListItem",ref:c,className:u,"aria-disabled":t,"aria-selected":e,"aria-invalid":r,"aria-expanded":n,role:s.onClick?"button":"listitem",...s,children:i})});wG.displayName="ListItem";function xG({qodly:e,activeTab:t,forceLogin:r,onTabChange:n,restrictedByDefault:o,onRestrictedByDefaultChange:i,onForceLoginChange:a}){return C.jsx(C.Fragment,{children:C.jsx(mo,{depth:1,className:"relative mb-0 flex h-auto flex-wrap items-center justify-between border-b px-4 py-3",children:C.jsx("div",{className:"flex w-full flex-wrap items-center justify-between",children:C.jsxs("div",{className:"relative flex w-full justify-between",children:[C.jsx("span",{className:"inline-block whitespace-nowrap text-sm leading-relaxed text-white",children:C.jsxs("div",{className:"flex items-center justify-center",children:[C.jsx("button",{"data-cy":"roles_btn_navbar",className:ht(" min-w-[110px] rounded-l px-4 py-2 text-xs text-white outline-none transition-all duration-150 ease-linear focus:bg-primary-dark focus:text-white focus:outline-none",t==="roles"?"bg-primary-dark font-bold":"bg-grey-300 hover:bg-primary-hover hover:text-white"),type:"button",onClick:()=>n("roles"),children:"Roles"}),C.jsx("button",{"data-cy":"privileges_btn_navbar",className:ht(" min-w-[110px] rounded-r px-4 py-2 text-xs text-white outline-none transition-all duration-150 ease-linear focus:bg-primary-dark focus:text-white focus:outline-none",t==="privileges"?"bg-primary-dark font-bold":"bg-grey-300 hover:bg-primary-hover hover:text-white"),type:"button",onClick:()=>n("privileges"),children:"Privileges"})]})}),C.jsxs("div",{className:"flex gap-2 justify-between",children:[C.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[C.jsx(de.ControlledSwitch,{size:"sm",value:o||!1,onChange:s=>{i(s)}}),C.jsx("span",{className:"px-1 text-xs text-white",children:"Restrict Access By Default"}),C.jsx(de.Tip,{tipKey:"editors:roles:toolbar:restrictedByDefault",alwaysOn:!0,side:"left"})]}),e===!1&&C.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[C.jsx(de.ControlledSwitch,{size:"sm",value:r||!1,onChange:s=>{a(s)}}),C.jsx("span",{className:"px-1 text-xs text-white",children:"Force login"}),C.jsx(de.Tip,{tipKey:"editors:roles:toolbar:forceLogin",alwaysOn:!0,side:"left"})]})]})]})})})})}const bq=T.createContext(void 0),_G=({children:e})=>{const[t,r]=T.useState(null);function n(i){r(i)}const o={selectedRole:t,selectRole:n};return C.jsx(bq.Provider,{value:o,children:e})};function n_(){const e=T.useContext(bq);if(e===void 0)throw new Error("useSelectedRole must be used within a SelectedRoleProvider");return e}var VO=function(t){return t.reduce(function(r,n){var o=n[0],i=n[1];return r[o]=i,r},{})},WO=typeof window<"u"&&window.document&&window.document.createElement?ue.useLayoutEffect:ue.useEffect,lr="top",Fr="bottom",$r="right",cr="left",o_="auto",js=[lr,Fr,$r,cr],Gi="start",Ss="end",EG="clippingParents",yq="viewport",Fa="popper",SG="reference",UO=js.reduce(function(e,t){return e.concat([t+"-"+Gi,t+"-"+Ss])},[]),wq=[].concat(js,[o_]).reduce(function(e,t){return e.concat([t,t+"-"+Gi,t+"-"+Ss])},[]),OG="beforeRead",CG="read",IG="afterRead",RG="beforeMain",NG="main",PG="afterMain",TG="beforeWrite",AG="write",kG="afterWrite",MG=[OG,CG,IG,RG,NG,PG,TG,AG,kG];function Sn(e){return e?(e.nodeName||"").toLowerCase():null}function Er(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Uo(e){var t=Er(e).Element;return e instanceof t||e instanceof Element}function Br(e){var t=Er(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function i_(e){if(typeof ShadowRoot>"u")return!1;var t=Er(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function DG(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},o=t.attributes[r]||{},i=t.elements[r];!Br(i)||!Sn(i)||(Object.assign(i.style,n),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function jG(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var o=t.elements[n],i=t.attributes[n]||{},a=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),s=a.reduce(function(c,u){return c[u]="",c},{});!Br(o)||!Sn(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(c){o.removeAttribute(c)}))})}}const qG={name:"applyStyles",enabled:!0,phase:"write",fn:DG,effect:jG,requires:["computeStyles"]};function wn(e){return e.split("-")[0]}var Bo=Math.max,cu=Math.min,Ki=Math.round;function px(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function xq(){return!/^((?!chrome|android).)*safari/i.test(px())}function Yi(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),o=1,i=1;t&&Br(e)&&(o=e.offsetWidth>0&&Ki(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Ki(n.height)/e.offsetHeight||1);var a=Uo(e)?Er(e):window,s=a.visualViewport,c=!xq()&&r,u=(n.left+(c&&s?s.offsetLeft:0))/o,d=(n.top+(c&&s?s.offsetTop:0))/i,p=n.width/o,h=n.height/i;return{width:p,height:h,top:d,right:u+p,bottom:d+h,left:u,x:u,y:d}}function a_(e){var t=Yi(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function _q(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&i_(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Hn(e){return Er(e).getComputedStyle(e)}function LG(e){return["table","td","th"].indexOf(Sn(e))>=0}function xo(e){return((Uo(e)?e.ownerDocument:e.document)||window.document).documentElement}function Hu(e){return Sn(e)==="html"?e:e.assignedSlot||e.parentNode||(i_(e)?e.host:null)||xo(e)}function GO(e){return!Br(e)||Hn(e).position==="fixed"?null:e.offsetParent}function zG(e){var t=/firefox/i.test(px()),r=/Trident/i.test(px());if(r&&Br(e)){var n=Hn(e);if(n.position==="fixed")return null}var o=Hu(e);for(i_(o)&&(o=o.host);Br(o)&&["html","body"].indexOf(Sn(o))<0;){var i=Hn(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function qs(e){for(var t=Er(e),r=GO(e);r&&LG(r)&&Hn(r).position==="static";)r=GO(r);return r&&(Sn(r)==="html"||Sn(r)==="body"&&Hn(r).position==="static")?t:r||zG(e)||t}function s_(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ms(e,t,r){return Bo(e,cu(t,r))}function BG(e,t,r){var n=ms(e,t,r);return n>r?r:n}function Eq(){return{top:0,right:0,bottom:0,left:0}}function Sq(e){return Object.assign({},Eq(),e)}function Oq(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var FG=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Sq(typeof t!="number"?t:Oq(t,js))};function $G(e){var t,r=e.state,n=e.name,o=e.options,i=r.elements.arrow,a=r.modifiersData.popperOffsets,s=wn(r.placement),c=s_(s),u=[cr,$r].indexOf(s)>=0,d=u?"height":"width";if(!(!i||!a)){var p=FG(o.padding,r),h=a_(i),v=c==="y"?lr:cr,y=c==="y"?Fr:$r,g=r.rects.reference[d]+r.rects.reference[c]-a[c]-r.rects.popper[d],b=a[c]-r.rects.reference[c],x=qs(i),w=x?c==="y"?x.clientHeight||0:x.clientWidth||0:0,E=g/2-b/2,S=p[v],_=w-h[d]-p[y],O=w/2-h[d]/2+E,N=ms(S,O,_),R=c;r.modifiersData[n]=(t={},t[R]=N,t.centerOffset=N-O,t)}}function HG(e){var t=e.state,r=e.options,n=r.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||_q(t.elements.popper,o)&&(t.elements.arrow=o))}const VG={name:"arrow",enabled:!0,phase:"main",fn:$G,effect:HG,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Xi(e){return e.split("-")[1]}var WG={top:"auto",right:"auto",bottom:"auto",left:"auto"};function UG(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:Ki(r*o)/o||0,y:Ki(n*o)/o||0}}function KO(e){var t,r=e.popper,n=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,c=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,p=e.isFixed,h=a.x,v=h===void 0?0:h,y=a.y,g=y===void 0?0:y,b=typeof d=="function"?d({x:v,y:g}):{x:v,y:g};v=b.x,g=b.y;var x=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),E=cr,S=lr,_=window;if(u){var O=qs(r),N="clientHeight",R="clientWidth";if(O===Er(r)&&(O=xo(r),Hn(O).position!=="static"&&s==="absolute"&&(N="scrollHeight",R="scrollWidth")),O=O,o===lr||(o===cr||o===$r)&&i===Ss){S=Fr;var A=p&&O===_&&_.visualViewport?_.visualViewport.height:O[N];g-=A-n.height,g*=c?1:-1}if(o===cr||(o===lr||o===Fr)&&i===Ss){E=$r;var D=p&&O===_&&_.visualViewport?_.visualViewport.width:O[R];v-=D-n.width,v*=c?1:-1}}var B=Object.assign({position:s},u&&WG),j=d===!0?UG({x:v,y:g},Er(r)):{x:v,y:g};if(v=j.x,g=j.y,c){var M;return Object.assign({},B,(M={},M[S]=w?"0":"",M[E]=x?"0":"",M.transform=(_.devicePixelRatio||1)<=1?"translate("+v+"px, "+g+"px)":"translate3d("+v+"px, "+g+"px, 0)",M))}return Object.assign({},B,(t={},t[S]=w?g+"px":"",t[E]=x?v+"px":"",t.transform="",t))}function GG(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=n===void 0?!0:n,i=r.adaptive,a=i===void 0?!0:i,s=r.roundOffsets,c=s===void 0?!0:s,u={placement:wn(t.placement),variation:Xi(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,KO(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,KO(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const KG={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:GG,data:{}};var mc={passive:!0};function YG(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,i=o===void 0?!0:o,a=n.resize,s=a===void 0?!0:a,c=Er(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(d){d.addEventListener("scroll",r.update,mc)}),s&&c.addEventListener("resize",r.update,mc),function(){i&&u.forEach(function(d){d.removeEventListener("scroll",r.update,mc)}),s&&c.removeEventListener("resize",r.update,mc)}}const XG={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:YG,data:{}};var ZG={left:"right",right:"left",bottom:"top",top:"bottom"};function Kc(e){return e.replace(/left|right|bottom|top/g,function(t){return ZG[t]})}var JG={start:"end",end:"start"};function YO(e){return e.replace(/start|end/g,function(t){return JG[t]})}function l_(e){var t=Er(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function c_(e){return Yi(xo(e)).left+l_(e).scrollLeft}function QG(e,t){var r=Er(e),n=xo(e),o=r.visualViewport,i=n.clientWidth,a=n.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;var u=xq();(u||!u&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s+c_(e),y:c}}function e7(e){var t,r=xo(e),n=l_(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=Bo(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Bo(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-n.scrollLeft+c_(e),c=-n.scrollTop;return Hn(o||r).direction==="rtl"&&(s+=Bo(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:c}}function u_(e){var t=Hn(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function Cq(e){return["html","body","#document"].indexOf(Sn(e))>=0?e.ownerDocument.body:Br(e)&&u_(e)?e:Cq(Hu(e))}function bs(e,t){var r;t===void 0&&(t=[]);var n=Cq(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),i=Er(n),a=o?[i].concat(i.visualViewport||[],u_(n)?n:[]):n,s=t.concat(a);return o?s:s.concat(bs(Hu(a)))}function hx(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function t7(e,t){var r=Yi(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function XO(e,t,r){return t===yq?hx(QG(e,r)):Uo(t)?t7(t,r):hx(e7(xo(e)))}function r7(e){var t=bs(Hu(e)),r=["absolute","fixed"].indexOf(Hn(e).position)>=0,n=r&&Br(e)?qs(e):e;return Uo(n)?t.filter(function(o){return Uo(o)&&_q(o,n)&&Sn(o)!=="body"}):[]}function n7(e,t,r,n){var o=t==="clippingParents"?r7(e):[].concat(t),i=[].concat(o,[r]),a=i[0],s=i.reduce(function(c,u){var d=XO(e,u,n);return c.top=Bo(d.top,c.top),c.right=cu(d.right,c.right),c.bottom=cu(d.bottom,c.bottom),c.left=Bo(d.left,c.left),c},XO(e,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Iq(e){var t=e.reference,r=e.element,n=e.placement,o=n?wn(n):null,i=n?Xi(n):null,a=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,c;switch(o){case lr:c={x:a,y:t.y-r.height};break;case Fr:c={x:a,y:t.y+t.height};break;case $r:c={x:t.x+t.width,y:s};break;case cr:c={x:t.x-r.width,y:s};break;default:c={x:t.x,y:t.y}}var u=o?s_(o):null;if(u!=null){var d=u==="y"?"height":"width";switch(i){case Gi:c[u]=c[u]-(t[d]/2-r[d]/2);break;case Ss:c[u]=c[u]+(t[d]/2-r[d]/2);break}}return c}function Os(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=n===void 0?e.placement:n,i=r.strategy,a=i===void 0?e.strategy:i,s=r.boundary,c=s===void 0?EG:s,u=r.rootBoundary,d=u===void 0?yq:u,p=r.elementContext,h=p===void 0?Fa:p,v=r.altBoundary,y=v===void 0?!1:v,g=r.padding,b=g===void 0?0:g,x=Sq(typeof b!="number"?b:Oq(b,js)),w=h===Fa?SG:Fa,E=e.rects.popper,S=e.elements[y?w:h],_=n7(Uo(S)?S:S.contextElement||xo(e.elements.popper),c,d,a),O=Yi(e.elements.reference),N=Iq({reference:O,element:E,placement:o}),R=hx(Object.assign({},E,N)),A=h===Fa?R:O,D={top:_.top-A.top+x.top,bottom:A.bottom-_.bottom+x.bottom,left:_.left-A.left+x.left,right:A.right-_.right+x.right},B=e.modifiersData.offset;if(h===Fa&&B){var j=B[o];Object.keys(D).forEach(function(M){var P=[$r,Fr].indexOf(M)>=0?1:-1,V=[lr,Fr].indexOf(M)>=0?"y":"x";D[M]+=j[V]*P})}return D}function o7(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=r.boundary,i=r.rootBoundary,a=r.padding,s=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?wq:c,d=Xi(n),p=d?s?UO:UO.filter(function(y){return Xi(y)===d}):js,h=p.filter(function(y){return u.indexOf(y)>=0});h.length===0&&(h=p);var v=h.reduce(function(y,g){return y[g]=Os(e,{placement:g,boundary:o,rootBoundary:i,padding:a})[wn(g)],y},{});return Object.keys(v).sort(function(y,g){return v[y]-v[g]})}function i7(e){if(wn(e)===o_)return[];var t=Kc(e);return[YO(e),t,YO(t)]}function a7(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,i=o===void 0?!0:o,a=r.altAxis,s=a===void 0?!0:a,c=r.fallbackPlacements,u=r.padding,d=r.boundary,p=r.rootBoundary,h=r.altBoundary,v=r.flipVariations,y=v===void 0?!0:v,g=r.allowedAutoPlacements,b=t.options.placement,x=wn(b),w=x===b,E=c||(w||!y?[Kc(b)]:i7(b)),S=[b].concat(E).reduce(function($,K){return $.concat(wn(K)===o_?o7(t,{placement:K,boundary:d,rootBoundary:p,padding:u,flipVariations:y,allowedAutoPlacements:g}):K)},[]),_=t.rects.reference,O=t.rects.popper,N=new Map,R=!0,A=S[0],D=0;D<S.length;D++){var B=S[D],j=wn(B),M=Xi(B)===Gi,P=[lr,Fr].indexOf(j)>=0,V=P?"width":"height",q=Os(t,{placement:B,boundary:d,rootBoundary:p,altBoundary:h,padding:u}),G=P?M?$r:cr:M?Fr:lr;_[V]>O[V]&&(G=Kc(G));var W=Kc(G),Q=[];if(i&&Q.push(q[j]<=0),s&&Q.push(q[G]<=0,q[W]<=0),Q.every(function($){return $})){A=B,R=!1;break}N.set(B,Q)}if(R)for(var z=y?3:1,U=function(K){var Z=S.find(function(H){var Y=N.get(H);if(Y)return Y.slice(0,K).every(function(oe){return oe})});if(Z)return A=Z,"break"},ie=z;ie>0;ie--){var te=U(ie);if(te==="break")break}t.placement!==A&&(t.modifiersData[n]._skip=!0,t.placement=A,t.reset=!0)}}const s7={name:"flip",enabled:!0,phase:"main",fn:a7,requiresIfExists:["offset"],data:{_skip:!1}};function ZO(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function JO(e){return[lr,$r,Fr,cr].some(function(t){return e[t]>=0})}function l7(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Os(t,{elementContext:"reference"}),s=Os(t,{altBoundary:!0}),c=ZO(a,n),u=ZO(s,o,i),d=JO(c),p=JO(u);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}const c7={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:l7};function u7(e,t,r){var n=wn(e),o=[cr,lr].indexOf(n)>=0?-1:1,i=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[cr,$r].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}function d7(e){var t=e.state,r=e.options,n=e.name,o=r.offset,i=o===void 0?[0,0]:o,a=wq.reduce(function(d,p){return d[p]=u7(p,t.rects,i),d},{}),s=a[t.placement],c=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=a}const f7={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:d7};function p7(e){var t=e.state,r=e.name;t.modifiersData[r]=Iq({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const h7={name:"popperOffsets",enabled:!0,phase:"read",fn:p7,data:{}};function v7(e){return e==="x"?"y":"x"}function g7(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,i=o===void 0?!0:o,a=r.altAxis,s=a===void 0?!1:a,c=r.boundary,u=r.rootBoundary,d=r.altBoundary,p=r.padding,h=r.tether,v=h===void 0?!0:h,y=r.tetherOffset,g=y===void 0?0:y,b=Os(t,{boundary:c,rootBoundary:u,padding:p,altBoundary:d}),x=wn(t.placement),w=Xi(t.placement),E=!w,S=s_(x),_=v7(S),O=t.modifiersData.popperOffsets,N=t.rects.reference,R=t.rects.popper,A=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,D=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(O){if(i){var M,P=S==="y"?lr:cr,V=S==="y"?Fr:$r,q=S==="y"?"height":"width",G=O[S],W=G+b[P],Q=G-b[V],z=v?-R[q]/2:0,U=w===Gi?N[q]:R[q],ie=w===Gi?-R[q]:-N[q],te=t.elements.arrow,$=v&&te?a_(te):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Eq(),Z=K[P],H=K[V],Y=ms(0,N[q],$[q]),oe=E?N[q]/2-z-Y-Z-D.mainAxis:U-Y-Z-D.mainAxis,re=E?-N[q]/2+z+Y+H+D.mainAxis:ie+Y+H+D.mainAxis,se=t.elements.arrow&&qs(t.elements.arrow),ee=se?S==="y"?se.clientTop||0:se.clientLeft||0:0,we=(M=B==null?void 0:B[S])!=null?M:0,ve=G+oe-we-ee,Ee=G+re-we,pe=ms(v?cu(W,ve):W,G,v?Bo(Q,Ee):Q);O[S]=pe,j[S]=pe-G}if(s){var ce,Ce=S==="x"?lr:cr,ke=S==="x"?Fr:$r,Ke=O[_],ze=_==="y"?"height":"width",rt=Ke+b[Ce],Xe=Ke-b[ke],It=[lr,cr].indexOf(x)!==-1,lt=(ce=B==null?void 0:B[_])!=null?ce:0,Wt=It?rt:Ke-N[ze]-R[ze]-lt+D.altAxis,mt=It?Ke+N[ze]+R[ze]-lt-D.altAxis:Xe,ct=v&&It?BG(Wt,Ke,mt):ms(v?Wt:rt,Ke,v?mt:Xe);O[_]=ct,j[_]=ct-Ke}t.modifiersData[n]=j}}const m7={name:"preventOverflow",enabled:!0,phase:"main",fn:g7,requiresIfExists:["offset"]};function b7(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function y7(e){return e===Er(e)||!Br(e)?l_(e):b7(e)}function w7(e){var t=e.getBoundingClientRect(),r=Ki(t.width)/e.offsetWidth||1,n=Ki(t.height)/e.offsetHeight||1;return r!==1||n!==1}function x7(e,t,r){r===void 0&&(r=!1);var n=Br(t),o=Br(t)&&w7(t),i=xo(t),a=Yi(e,o,r),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((Sn(t)!=="body"||u_(i))&&(s=y7(t)),Br(t)?(c=Yi(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):i&&(c.x=c_(i))),{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function _7(e){var t=new Map,r=new Set,n=[];e.forEach(function(i){t.set(i.name,i)});function o(i){r.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!r.has(s)){var c=t.get(s);c&&o(c)}}),n.push(i)}return e.forEach(function(i){r.has(i.name)||o(i)}),n}function E7(e){var t=_7(e);return MG.reduce(function(r,n){return r.concat(t.filter(function(o){return o.phase===n}))},[])}function S7(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function O7(e){var t=e.reduce(function(r,n){var o=r[n.name];return r[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var QO={placement:"bottom",modifiers:[],strategy:"absolute"};function eC(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function C7(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,o=t.defaultOptions,i=o===void 0?QO:o;return function(s,c,u){u===void 0&&(u=i);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},QO,i),modifiersData:{},elements:{reference:s,popper:c},attributes:{},styles:{}},p=[],h=!1,v={state:d,setOptions:function(x){var w=typeof x=="function"?x(d.options):x;g(),d.options=Object.assign({},i,d.options,w),d.scrollParents={reference:Uo(s)?bs(s):s.contextElement?bs(s.contextElement):[],popper:bs(c)};var E=E7(O7([].concat(n,d.options.modifiers)));return d.orderedModifiers=E.filter(function(S){return S.enabled}),y(),v.update()},forceUpdate:function(){if(!h){var x=d.elements,w=x.reference,E=x.popper;if(eC(w,E)){d.rects={reference:x7(w,qs(E),d.options.strategy==="fixed"),popper:a_(E)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(D){return d.modifiersData[D.name]=Object.assign({},D.data)});for(var S=0;S<d.orderedModifiers.length;S++){if(d.reset===!0){d.reset=!1,S=-1;continue}var _=d.orderedModifiers[S],O=_.fn,N=_.options,R=N===void 0?{}:N,A=_.name;typeof O=="function"&&(d=O({state:d,options:R,name:A,instance:v})||d)}}}},update:S7(function(){return new Promise(function(b){v.forceUpdate(),b(d)})}),destroy:function(){g(),h=!0}};if(!eC(s,c))return v;v.setOptions(u).then(function(b){!h&&u.onFirstUpdate&&u.onFirstUpdate(b)});function y(){d.orderedModifiers.forEach(function(b){var x=b.name,w=b.options,E=w===void 0?{}:w,S=b.effect;if(typeof S=="function"){var _=S({state:d,name:x,instance:v,options:E}),O=function(){};p.push(_||O)}})}function g(){p.forEach(function(b){return b()}),p=[]}return v}}var I7=[XG,h7,KG,qG,f7,s7,m7,VG,c7],R7=C7({defaultModifiers:I7}),Pp,tC;function N7(){if(tC)return Pp;tC=1;var e=typeof Element<"u",t=typeof Map=="function",r=typeof Set=="function",n=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function o(i,a){if(i===a)return!0;if(i&&a&&typeof i=="object"&&typeof a=="object"){if(i.constructor!==a.constructor)return!1;var s,c,u;if(Array.isArray(i)){if(s=i.length,s!=a.length)return!1;for(c=s;c--!==0;)if(!o(i[c],a[c]))return!1;return!0}var d;if(t&&i instanceof Map&&a instanceof Map){if(i.size!==a.size)return!1;for(d=i.entries();!(c=d.next()).done;)if(!a.has(c.value[0]))return!1;for(d=i.entries();!(c=d.next()).done;)if(!o(c.value[1],a.get(c.value[0])))return!1;return!0}if(r&&i instanceof Set&&a instanceof Set){if(i.size!==a.size)return!1;for(d=i.entries();!(c=d.next()).done;)if(!a.has(c.value[0]))return!1;return!0}if(n&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(a)){if(s=i.length,s!=a.length)return!1;for(c=s;c--!==0;)if(i[c]!==a[c])return!1;return!0}if(i.constructor===RegExp)return i.source===a.source&&i.flags===a.flags;if(i.valueOf!==Object.prototype.valueOf&&typeof i.valueOf=="function"&&typeof a.valueOf=="function")return i.valueOf()===a.valueOf();if(i.toString!==Object.prototype.toString&&typeof i.toString=="function"&&typeof a.toString=="function")return i.toString()===a.toString();if(u=Object.keys(i),s=u.length,s!==Object.keys(a).length)return!1;for(c=s;c--!==0;)if(!Object.prototype.hasOwnProperty.call(a,u[c]))return!1;if(e&&i instanceof Element)return!1;for(c=s;c--!==0;)if(!((u[c]==="_owner"||u[c]==="__v"||u[c]==="__o")&&i.$$typeof)&&!o(i[u[c]],a[u[c]]))return!1;return!0}return i!==i&&a!==a}return Pp=function(a,s){try{return o(a,s)}catch(c){if((c.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw c}},Pp}var P7=N7();const T7=wo(P7);var A7=[],Vu=function(t,r,n){n===void 0&&(n={});var o=ue.useRef(null),i={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||A7},a=ue.useState({styles:{popper:{position:i.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=a[0],c=a[1],u=ue.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(v){var y=v.state,g=Object.keys(y.elements);Ux.flushSync(function(){c({styles:VO(g.map(function(b){return[b,y.styles[b]||{}]})),attributes:VO(g.map(function(b){return[b,y.attributes[b]]}))})})},requires:["computeStyles"]}},[]),d=ue.useMemo(function(){var h={onFirstUpdate:i.onFirstUpdate,placement:i.placement,strategy:i.strategy,modifiers:[].concat(i.modifiers,[u,{name:"applyStyles",enabled:!1}])};return T7(o.current,h)?o.current||h:(o.current=h,h)},[i.onFirstUpdate,i.placement,i.strategy,i.modifiers,u]),p=ue.useRef();return WO(function(){p.current&&p.current.setOptions(d)},[d]),WO(function(){if(!(t==null||r==null)){var h=n.createPopper||R7,v=h(t,r,d);return p.current=v,function(){v.destroy(),p.current=null}}},[t,r,n.createPopper]),{state:p.current?p.current.state:null,styles:s.styles,attributes:s.attributes,update:p.current?p.current.update:null,forceUpdate:p.current?p.current.forceUpdate:null}};const Rq=({tab:e})=>C.jsx(mo,{depth:1,className:"flex flex-1 items-center justify-center border-l-[0.5px]",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-grey-200",children:[C.jsx(xe.FdInfoBold,{className:"h-10 w-10"}),C.jsxs("div",{className:"font-semibold",children:["No ",e," Selected"]}),C.jsxs("div",{className:"text-sm",children:["Click on a ",e," in the Sidebar to select it."]})]})});function d_(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Tp,rC;function k7(){if(rC)return Tp;rC=1;function e(){this.__data__=[],this.size=0}return Tp=e,Tp}var Ap,nC;function oa(){if(nC)return Ap;nC=1;function e(t,r){return t===r||t!==t&&r!==r}return Ap=e,Ap}var kp,oC;function Wu(){if(oC)return kp;oC=1;var e=oa();function t(r,n){for(var o=r.length;o--;)if(e(r[o][0],n))return o;return-1}return kp=t,kp}var Mp,iC;function M7(){if(iC)return Mp;iC=1;var e=Wu(),t=Array.prototype,r=t.splice;function n(o){var i=this.__data__,a=e(i,o);if(a<0)return!1;var s=i.length-1;return a==s?i.pop():r.call(i,a,1),--this.size,!0}return Mp=n,Mp}var Dp,aC;function D7(){if(aC)return Dp;aC=1;var e=Wu();function t(r){var n=this.__data__,o=e(n,r);return o<0?void 0:n[o][1]}return Dp=t,Dp}var jp,sC;function j7(){if(sC)return jp;sC=1;var e=Wu();function t(r){return e(this.__data__,r)>-1}return jp=t,jp}var qp,lC;function q7(){if(lC)return qp;lC=1;var e=Wu();function t(r,n){var o=this.__data__,i=e(o,r);return i<0?(++this.size,o.push([r,n])):o[i][1]=n,this}return qp=t,qp}var Lp,cC;function Uu(){if(cC)return Lp;cC=1;var e=k7(),t=M7(),r=D7(),n=j7(),o=q7();function i(a){var s=-1,c=a==null?0:a.length;for(this.clear();++s<c;){var u=a[s];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,Lp=i,Lp}var zp,uC;function L7(){if(uC)return zp;uC=1;var e=Uu();function t(){this.__data__=new e,this.size=0}return zp=t,zp}var Bp,dC;function z7(){if(dC)return Bp;dC=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return Bp=e,Bp}var Fp,fC;function B7(){if(fC)return Fp;fC=1;function e(t){return this.__data__.get(t)}return Fp=e,Fp}var $p,pC;function F7(){if(pC)return $p;pC=1;function e(t){return this.__data__.has(t)}return $p=e,$p}var Hp,hC;function Nq(){if(hC)return Hp;hC=1;var e=typeof _t=="object"&&_t&&_t.Object===Object&&_t;return Hp=e,Hp}var Vp,vC;function on(){if(vC)return Vp;vC=1;var e=Nq(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Vp=r,Vp}var Wp,gC;function ia(){if(gC)return Wp;gC=1;var e=on(),t=e.Symbol;return Wp=t,Wp}var Up,mC;function $7(){if(mC)return Up;mC=1;var e=ia(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,o=e?e.toStringTag:void 0;function i(a){var s=r.call(a,o),c=a[o];try{a[o]=void 0;var u=!0}catch{}var d=n.call(a);return u&&(s?a[o]=c:delete a[o]),d}return Up=i,Up}var Gp,bC;function H7(){if(bC)return Gp;bC=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return Gp=r,Gp}var Kp,yC;function Jo(){if(yC)return Kp;yC=1;var e=ia(),t=$7(),r=H7(),n="[object Null]",o="[object Undefined]",i=e?e.toStringTag:void 0;function a(s){return s==null?s===void 0?o:n:i&&i in Object(s)?t(s):r(s)}return Kp=a,Kp}var Yp,wC;function Hr(){if(wC)return Yp;wC=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Yp=e,Yp}var Xp,xC;function Ls(){if(xC)return Xp;xC=1;var e=Jo(),t=Hr(),r="[object AsyncFunction]",n="[object Function]",o="[object GeneratorFunction]",i="[object Proxy]";function a(s){if(!t(s))return!1;var c=e(s);return c==n||c==o||c==r||c==i}return Xp=a,Xp}var Zp,_C;function V7(){if(_C)return Zp;_C=1;var e=on(),t=e["__core-js_shared__"];return Zp=t,Zp}var Jp,EC;function W7(){if(EC)return Jp;EC=1;var e=V7(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return Jp=r,Jp}var Qp,SC;function Pq(){if(SC)return Qp;SC=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return Qp=r,Qp}var eh,OC;function U7(){if(OC)return eh;OC=1;var e=Ls(),t=W7(),r=Hr(),n=Pq(),o=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,c=a.toString,u=s.hasOwnProperty,d=RegExp("^"+c.call(u).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(h){if(!r(h)||t(h))return!1;var v=e(h)?d:i;return v.test(n(h))}return eh=p,eh}var th,CC;function G7(){if(CC)return th;CC=1;function e(t,r){return t==null?void 0:t[r]}return th=e,th}var rh,IC;function Qo(){if(IC)return rh;IC=1;var e=U7(),t=G7();function r(n,o){var i=t(n,o);return e(i)?i:void 0}return rh=r,rh}var nh,RC;function f_(){if(RC)return nh;RC=1;var e=Qo(),t=on(),r=e(t,"Map");return nh=r,nh}var oh,NC;function Gu(){if(NC)return oh;NC=1;var e=Qo(),t=e(Object,"create");return oh=t,oh}var ih,PC;function K7(){if(PC)return ih;PC=1;var e=Gu();function t(){this.__data__=e?e(null):{},this.size=0}return ih=t,ih}var ah,TC;function Y7(){if(TC)return ah;TC=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return ah=e,ah}var sh,AC;function X7(){if(AC)return sh;AC=1;var e=Gu(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function o(i){var a=this.__data__;if(e){var s=a[i];return s===t?void 0:s}return n.call(a,i)?a[i]:void 0}return sh=o,sh}var lh,kC;function Z7(){if(kC)return lh;kC=1;var e=Gu(),t=Object.prototype,r=t.hasOwnProperty;function n(o){var i=this.__data__;return e?i[o]!==void 0:r.call(i,o)}return lh=n,lh}var ch,MC;function J7(){if(MC)return ch;MC=1;var e=Gu(),t="__lodash_hash_undefined__";function r(n,o){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=e&&o===void 0?t:o,this}return ch=r,ch}var uh,DC;function Q7(){if(DC)return uh;DC=1;var e=K7(),t=Y7(),r=X7(),n=Z7(),o=J7();function i(a){var s=-1,c=a==null?0:a.length;for(this.clear();++s<c;){var u=a[s];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,uh=i,uh}var dh,jC;function e9(){if(jC)return dh;jC=1;var e=Q7(),t=Uu(),r=f_();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return dh=n,dh}var fh,qC;function t9(){if(qC)return fh;qC=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return fh=e,fh}var ph,LC;function Ku(){if(LC)return ph;LC=1;var e=t9();function t(r,n){var o=r.__data__;return e(n)?o[typeof n=="string"?"string":"hash"]:o.map}return ph=t,ph}var hh,zC;function r9(){if(zC)return hh;zC=1;var e=Ku();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return hh=t,hh}var vh,BC;function n9(){if(BC)return vh;BC=1;var e=Ku();function t(r){return e(this,r).get(r)}return vh=t,vh}var gh,FC;function o9(){if(FC)return gh;FC=1;var e=Ku();function t(r){return e(this,r).has(r)}return gh=t,gh}var mh,$C;function i9(){if($C)return mh;$C=1;var e=Ku();function t(r,n){var o=e(this,r),i=o.size;return o.set(r,n),this.size+=o.size==i?0:1,this}return mh=t,mh}var bh,HC;function p_(){if(HC)return bh;HC=1;var e=e9(),t=r9(),r=n9(),n=o9(),o=i9();function i(a){var s=-1,c=a==null?0:a.length;for(this.clear();++s<c;){var u=a[s];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,bh=i,bh}var yh,VC;function a9(){if(VC)return yh;VC=1;var e=Uu(),t=f_(),r=p_(),n=200;function o(i,a){var s=this.__data__;if(s instanceof e){var c=s.__data__;if(!t||c.length<n-1)return c.push([i,a]),this.size=++s.size,this;s=this.__data__=new r(c)}return s.set(i,a),this.size=s.size,this}return yh=o,yh}var wh,WC;function Yu(){if(WC)return wh;WC=1;var e=Uu(),t=L7(),r=z7(),n=B7(),o=F7(),i=a9();function a(s){var c=this.__data__=new e(s);this.size=c.size}return a.prototype.clear=t,a.prototype.delete=r,a.prototype.get=n,a.prototype.has=o,a.prototype.set=i,wh=a,wh}var xh,UC;function h_(){if(UC)return xh;UC=1;function e(t,r){for(var n=-1,o=t==null?0:t.length;++n<o&&r(t[n],n,t)!==!1;);return t}return xh=e,xh}var _h,GC;function Tq(){if(GC)return _h;GC=1;var e=Qo(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return _h=t,_h}var Eh,KC;function Xu(){if(KC)return Eh;KC=1;var e=Tq();function t(r,n,o){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:o,writable:!0}):r[n]=o}return Eh=t,Eh}var Sh,YC;function Zu(){if(YC)return Sh;YC=1;var e=Xu(),t=oa(),r=Object.prototype,n=r.hasOwnProperty;function o(i,a,s){var c=i[a];(!(n.call(i,a)&&t(c,s))||s===void 0&&!(a in i))&&e(i,a,s)}return Sh=o,Sh}var Oh,XC;function zs(){if(XC)return Oh;XC=1;var e=Zu(),t=Xu();function r(n,o,i,a){var s=!i;i||(i={});for(var c=-1,u=o.length;++c<u;){var d=o[c],p=a?a(i[d],n[d],d,i,n):void 0;p===void 0&&(p=n[d]),s?t(i,d,p):e(i,d,p)}return i}return Oh=r,Oh}var Ch,ZC;function s9(){if(ZC)return Ch;ZC=1;function e(t,r){for(var n=-1,o=Array(t);++n<t;)o[n]=r(n);return o}return Ch=e,Ch}var Ih,JC;function Cn(){if(JC)return Ih;JC=1;function e(t){return t!=null&&typeof t=="object"}return Ih=e,Ih}var Rh,QC;function l9(){if(QC)return Rh;QC=1;var e=Jo(),t=Cn(),r="[object Arguments]";function n(o){return t(o)&&e(o)==r}return Rh=n,Rh}var Nh,eI;function Bs(){if(eI)return Nh;eI=1;var e=l9(),t=Cn(),r=Object.prototype,n=r.hasOwnProperty,o=r.propertyIsEnumerable,i=e((function(){return arguments})())?e:function(a){return t(a)&&n.call(a,"callee")&&!o.call(a,"callee")};return Nh=i,Nh}var Ph,tI;function Nt(){if(tI)return Ph;tI=1;var e=Array.isArray;return Ph=e,Ph}var cs={exports:{}},Th,rI;function c9(){if(rI)return Th;rI=1;function e(){return!1}return Th=e,Th}cs.exports;var nI;function aa(){return nI||(nI=1,(function(e,t){var r=on(),n=c9(),o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a?r.Buffer:void 0,c=s?s.isBuffer:void 0,u=c||n;e.exports=u})(cs,cs.exports)),cs.exports}var Ah,oI;function Ju(){if(oI)return Ah;oI=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,o){var i=typeof n;return o=o??e,!!o&&(i=="number"||i!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<o}return Ah=r,Ah}var kh,iI;function v_(){if(iI)return kh;iI=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return kh=t,kh}var Mh,aI;function u9(){if(aI)return Mh;aI=1;var e=Jo(),t=v_(),r=Cn(),n="[object Arguments]",o="[object Array]",i="[object Boolean]",a="[object Date]",s="[object Error]",c="[object Function]",u="[object Map]",d="[object Number]",p="[object Object]",h="[object RegExp]",v="[object Set]",y="[object String]",g="[object WeakMap]",b="[object ArrayBuffer]",x="[object DataView]",w="[object Float32Array]",E="[object Float64Array]",S="[object Int8Array]",_="[object Int16Array]",O="[object Int32Array]",N="[object Uint8Array]",R="[object Uint8ClampedArray]",A="[object Uint16Array]",D="[object Uint32Array]",B={};B[w]=B[E]=B[S]=B[_]=B[O]=B[N]=B[R]=B[A]=B[D]=!0,B[n]=B[o]=B[b]=B[i]=B[x]=B[a]=B[s]=B[c]=B[u]=B[d]=B[p]=B[h]=B[v]=B[y]=B[g]=!1;function j(M){return r(M)&&t(M.length)&&!!B[e(M)]}return Mh=j,Mh}var Dh,sI;function Qu(){if(sI)return Dh;sI=1;function e(t){return function(r){return t(r)}}return Dh=e,Dh}var us={exports:{}};us.exports;var lI;function g_(){return lI||(lI=1,(function(e,t){var r=Nq(),n=t&&!t.nodeType&&t,o=n&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===n,a=i&&r.process,s=(function(){try{var c=o&&o.require&&o.require("util").types;return c||a&&a.binding&&a.binding("util")}catch{}})();e.exports=s})(us,us.exports)),us.exports}var jh,cI;function Fs(){if(cI)return jh;cI=1;var e=u9(),t=Qu(),r=g_(),n=r&&r.isTypedArray,o=n?t(n):e;return jh=o,jh}var qh,uI;function Aq(){if(uI)return qh;uI=1;var e=s9(),t=Bs(),r=Nt(),n=aa(),o=Ju(),i=Fs(),a=Object.prototype,s=a.hasOwnProperty;function c(u,d){var p=r(u),h=!p&&t(u),v=!p&&!h&&n(u),y=!p&&!h&&!v&&i(u),g=p||h||v||y,b=g?e(u.length,String):[],x=b.length;for(var w in u)(d||s.call(u,w))&&!(g&&(w=="length"||v&&(w=="offset"||w=="parent")||y&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||o(w,x)))&&b.push(w);return b}return qh=c,qh}var Lh,dI;function ed(){if(dI)return Lh;dI=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,o=typeof n=="function"&&n.prototype||e;return r===o}return Lh=t,Lh}var zh,fI;function kq(){if(fI)return zh;fI=1;function e(t,r){return function(n){return t(r(n))}}return zh=e,zh}var Bh,pI;function d9(){if(pI)return Bh;pI=1;var e=kq(),t=e(Object.keys,Object);return Bh=t,Bh}var Fh,hI;function m_(){if(hI)return Fh;hI=1;var e=ed(),t=d9(),r=Object.prototype,n=r.hasOwnProperty;function o(i){if(!e(i))return t(i);var a=[];for(var s in Object(i))n.call(i,s)&&s!="constructor"&&a.push(s);return a}return Fh=o,Fh}var $h,vI;function Gn(){if(vI)return $h;vI=1;var e=Ls(),t=v_();function r(n){return n!=null&&t(n.length)&&!e(n)}return $h=r,$h}var Hh,gI;function _o(){if(gI)return Hh;gI=1;var e=Aq(),t=m_(),r=Gn();function n(o){return r(o)?e(o):t(o)}return Hh=n,Hh}var Vh,mI;function f9(){if(mI)return Vh;mI=1;var e=zs(),t=_o();function r(n,o){return n&&e(o,t(o),n)}return Vh=r,Vh}var Wh,bI;function p9(){if(bI)return Wh;bI=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return Wh=e,Wh}var Uh,yI;function h9(){if(yI)return Uh;yI=1;var e=Hr(),t=ed(),r=p9(),n=Object.prototype,o=n.hasOwnProperty;function i(a){if(!e(a))return r(a);var s=t(a),c=[];for(var u in a)u=="constructor"&&(s||!o.call(a,u))||c.push(u);return c}return Uh=i,Uh}var Gh,wI;function ei(){if(wI)return Gh;wI=1;var e=Aq(),t=h9(),r=Gn();function n(o){return r(o)?e(o,!0):t(o)}return Gh=n,Gh}var Kh,xI;function v9(){if(xI)return Kh;xI=1;var e=zs(),t=ei();function r(n,o){return n&&e(o,t(o),n)}return Kh=r,Kh}var ds={exports:{}};ds.exports;var _I;function Mq(){return _I||(_I=1,(function(e,t){var r=on(),n=t&&!t.nodeType&&t,o=n&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===n,a=i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;function c(u,d){if(d)return u.slice();var p=u.length,h=s?s(p):new u.constructor(p);return u.copy(h),h}e.exports=c})(ds,ds.exports)),ds.exports}var Yh,EI;function Dq(){if(EI)return Yh;EI=1;function e(t,r){var n=-1,o=t.length;for(r||(r=Array(o));++n<o;)r[n]=t[n];return r}return Yh=e,Yh}var Xh,SI;function jq(){if(SI)return Xh;SI=1;function e(t,r){for(var n=-1,o=t==null?0:t.length,i=0,a=[];++n<o;){var s=t[n];r(s,n,t)&&(a[i++]=s)}return a}return Xh=e,Xh}var Zh,OI;function qq(){if(OI)return Zh;OI=1;function e(){return[]}return Zh=e,Zh}var Jh,CI;function b_(){if(CI)return Jh;CI=1;var e=jq(),t=qq(),r=Object.prototype,n=r.propertyIsEnumerable,o=Object.getOwnPropertySymbols,i=o?function(a){return a==null?[]:(a=Object(a),e(o(a),function(s){return n.call(a,s)}))}:t;return Jh=i,Jh}var Qh,II;function g9(){if(II)return Qh;II=1;var e=zs(),t=b_();function r(n,o){return e(n,t(n),o)}return Qh=r,Qh}var ev,RI;function y_(){if(RI)return ev;RI=1;function e(t,r){for(var n=-1,o=r.length,i=t.length;++n<o;)t[i+n]=r[n];return t}return ev=e,ev}var tv,NI;function td(){if(NI)return tv;NI=1;var e=kq(),t=e(Object.getPrototypeOf,Object);return tv=t,tv}var rv,PI;function Lq(){if(PI)return rv;PI=1;var e=y_(),t=td(),r=b_(),n=qq(),o=Object.getOwnPropertySymbols,i=o?function(a){for(var s=[];a;)e(s,r(a)),a=t(a);return s}:n;return rv=i,rv}var nv,TI;function m9(){if(TI)return nv;TI=1;var e=zs(),t=Lq();function r(n,o){return e(n,t(n),o)}return nv=r,nv}var ov,AI;function zq(){if(AI)return ov;AI=1;var e=y_(),t=Nt();function r(n,o,i){var a=o(n);return t(n)?a:e(a,i(n))}return ov=r,ov}var iv,kI;function Bq(){if(kI)return iv;kI=1;var e=zq(),t=b_(),r=_o();function n(o){return e(o,r,t)}return iv=n,iv}var av,MI;function b9(){if(MI)return av;MI=1;var e=zq(),t=Lq(),r=ei();function n(o){return e(o,r,t)}return av=n,av}var sv,DI;function y9(){if(DI)return sv;DI=1;var e=Qo(),t=on(),r=e(t,"DataView");return sv=r,sv}var lv,jI;function w9(){if(jI)return lv;jI=1;var e=Qo(),t=on(),r=e(t,"Promise");return lv=r,lv}var cv,qI;function Fq(){if(qI)return cv;qI=1;var e=Qo(),t=on(),r=e(t,"Set");return cv=r,cv}var uv,LI;function x9(){if(LI)return uv;LI=1;var e=Qo(),t=on(),r=e(t,"WeakMap");return uv=r,uv}var dv,zI;function sa(){if(zI)return dv;zI=1;var e=y9(),t=f_(),r=w9(),n=Fq(),o=x9(),i=Jo(),a=Pq(),s="[object Map]",c="[object Object]",u="[object Promise]",d="[object Set]",p="[object WeakMap]",h="[object DataView]",v=a(e),y=a(t),g=a(r),b=a(n),x=a(o),w=i;return(e&&w(new e(new ArrayBuffer(1)))!=h||t&&w(new t)!=s||r&&w(r.resolve())!=u||n&&w(new n)!=d||o&&w(new o)!=p)&&(w=function(E){var S=i(E),_=S==c?E.constructor:void 0,O=_?a(_):"";if(O)switch(O){case v:return h;case y:return s;case g:return u;case b:return d;case x:return p}return S}),dv=w,dv}var fv,BI;function _9(){if(BI)return fv;BI=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n){var o=n.length,i=new n.constructor(o);return o&&typeof n[0]=="string"&&t.call(n,"index")&&(i.index=n.index,i.input=n.input),i}return fv=r,fv}var pv,FI;function $q(){if(FI)return pv;FI=1;var e=on(),t=e.Uint8Array;return pv=t,pv}var hv,$I;function w_(){if($I)return hv;$I=1;var e=$q();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return hv=t,hv}var vv,HI;function E9(){if(HI)return vv;HI=1;var e=w_();function t(r,n){var o=n?e(r.buffer):r.buffer;return new r.constructor(o,r.byteOffset,r.byteLength)}return vv=t,vv}var gv,VI;function S9(){if(VI)return gv;VI=1;var e=/\w*$/;function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}return gv=t,gv}var mv,WI;function O9(){if(WI)return mv;WI=1;var e=ia(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function n(o){return r?Object(r.call(o)):{}}return mv=n,mv}var bv,UI;function Hq(){if(UI)return bv;UI=1;var e=w_();function t(r,n){var o=n?e(r.buffer):r.buffer;return new r.constructor(o,r.byteOffset,r.length)}return bv=t,bv}var yv,GI;function C9(){if(GI)return yv;GI=1;var e=w_(),t=E9(),r=S9(),n=O9(),o=Hq(),i="[object Boolean]",a="[object Date]",s="[object Map]",c="[object Number]",u="[object RegExp]",d="[object Set]",p="[object String]",h="[object Symbol]",v="[object ArrayBuffer]",y="[object DataView]",g="[object Float32Array]",b="[object Float64Array]",x="[object Int8Array]",w="[object Int16Array]",E="[object Int32Array]",S="[object Uint8Array]",_="[object Uint8ClampedArray]",O="[object Uint16Array]",N="[object Uint32Array]";function R(A,D,B){var j=A.constructor;switch(D){case v:return e(A);case i:case a:return new j(+A);case y:return t(A,B);case g:case b:case x:case w:case E:case S:case _:case O:case N:return o(A,B);case s:return new j;case c:case p:return new j(A);case u:return r(A);case d:return new j;case h:return n(A)}}return yv=R,yv}var wv,KI;function Vq(){if(KI)return wv;KI=1;var e=Hr(),t=Object.create,r=(function(){function n(){}return function(o){if(!e(o))return{};if(t)return t(o);n.prototype=o;var i=new n;return n.prototype=void 0,i}})();return wv=r,wv}var xv,YI;function Wq(){if(YI)return xv;YI=1;var e=Vq(),t=td(),r=ed();function n(o){return typeof o.constructor=="function"&&!r(o)?e(t(o)):{}}return xv=n,xv}var _v,XI;function I9(){if(XI)return _v;XI=1;var e=sa(),t=Cn(),r="[object Map]";function n(o){return t(o)&&e(o)==r}return _v=n,_v}var Ev,ZI;function R9(){if(ZI)return Ev;ZI=1;var e=I9(),t=Qu(),r=g_(),n=r&&r.isMap,o=n?t(n):e;return Ev=o,Ev}var Sv,JI;function N9(){if(JI)return Sv;JI=1;var e=sa(),t=Cn(),r="[object Set]";function n(o){return t(o)&&e(o)==r}return Sv=n,Sv}var Ov,QI;function P9(){if(QI)return Ov;QI=1;var e=N9(),t=Qu(),r=g_(),n=r&&r.isSet,o=n?t(n):e;return Ov=o,Ov}var Cv,eR;function Uq(){if(eR)return Cv;eR=1;var e=Yu(),t=h_(),r=Zu(),n=f9(),o=v9(),i=Mq(),a=Dq(),s=g9(),c=m9(),u=Bq(),d=b9(),p=sa(),h=_9(),v=C9(),y=Wq(),g=Nt(),b=aa(),x=R9(),w=Hr(),E=P9(),S=_o(),_=ei(),O=1,N=2,R=4,A="[object Arguments]",D="[object Array]",B="[object Boolean]",j="[object Date]",M="[object Error]",P="[object Function]",V="[object GeneratorFunction]",q="[object Map]",G="[object Number]",W="[object Object]",Q="[object RegExp]",z="[object Set]",U="[object String]",ie="[object Symbol]",te="[object WeakMap]",$="[object ArrayBuffer]",K="[object DataView]",Z="[object Float32Array]",H="[object Float64Array]",Y="[object Int8Array]",oe="[object Int16Array]",re="[object Int32Array]",se="[object Uint8Array]",ee="[object Uint8ClampedArray]",we="[object Uint16Array]",ve="[object Uint32Array]",Ee={};Ee[A]=Ee[D]=Ee[$]=Ee[K]=Ee[B]=Ee[j]=Ee[Z]=Ee[H]=Ee[Y]=Ee[oe]=Ee[re]=Ee[q]=Ee[G]=Ee[W]=Ee[Q]=Ee[z]=Ee[U]=Ee[ie]=Ee[se]=Ee[ee]=Ee[we]=Ee[ve]=!0,Ee[M]=Ee[P]=Ee[te]=!1;function pe(ce,Ce,ke,Ke,ze,rt){var Xe,It=Ce&O,lt=Ce&N,Wt=Ce&R;if(ke&&(Xe=ze?ke(ce,Ke,ze,rt):ke(ce)),Xe!==void 0)return Xe;if(!w(ce))return ce;var mt=g(ce);if(mt){if(Xe=h(ce),!It)return a(ce,Xe)}else{var ct=p(ce),Lt=ct==P||ct==V;if(b(ce))return i(ce,It);if(ct==W||ct==A||Lt&&!ze){if(Xe=lt||Lt?{}:y(ce),!It)return lt?c(ce,o(Xe,ce)):s(ce,n(Xe,ce))}else{if(!Ee[ct])return ze?ce:{};Xe=v(ce,ct,It)}}rt||(rt=new e);var pr=rt.get(ce);if(pr)return pr;rt.set(ce,Xe),E(ce)?ce.forEach(function(Tt){Xe.add(pe(Tt,Ce,ke,Tt,ce,rt))}):x(ce)&&ce.forEach(function(Tt,Yt){Xe.set(Yt,pe(Tt,Ce,ke,Yt,ce,rt))});var Cr=Wt?lt?d:u:lt?_:S,Kt=mt?void 0:Cr(ce);return t(Kt||ce,function(Tt,Yt){Kt&&(Yt=Tt,Tt=ce[Yt]),r(Xe,Yt,pe(Tt,Ce,ke,Yt,ce,rt))}),Xe}return Cv=pe,Cv}var Iv,tR;function T9(){if(tR)return Iv;tR=1;var e=Uq(),t=4;function r(n){return e(n,t)}return Iv=r,Iv}var Rv,rR;function x_(){if(rR)return Rv;rR=1;function e(t){return function(){return t}}return Rv=e,Rv}var Nv,nR;function A9(){if(nR)return Nv;nR=1;function e(t){return function(r,n,o){for(var i=-1,a=Object(r),s=o(r),c=s.length;c--;){var u=s[t?c:++i];if(n(a[u],u,a)===!1)break}return r}}return Nv=e,Nv}var Pv,oR;function __(){if(oR)return Pv;oR=1;var e=A9(),t=e();return Pv=t,Pv}var Tv,iR;function E_(){if(iR)return Tv;iR=1;var e=__(),t=_o();function r(n,o){return n&&e(n,o,t)}return Tv=r,Tv}var Av,aR;function k9(){if(aR)return Av;aR=1;var e=Gn();function t(r,n){return function(o,i){if(o==null)return o;if(!e(o))return r(o,i);for(var a=o.length,s=n?a:-1,c=Object(o);(n?s--:++s<a)&&i(c[s],s,c)!==!1;);return o}}return Av=t,Av}var kv,sR;function rd(){if(sR)return kv;sR=1;var e=E_(),t=k9(),r=t(e);return kv=r,kv}var Mv,lR;function ti(){if(lR)return Mv;lR=1;function e(t){return t}return Mv=e,Mv}var Dv,cR;function Gq(){if(cR)return Dv;cR=1;var e=ti();function t(r){return typeof r=="function"?r:e}return Dv=t,Dv}var jv,uR;function Kq(){if(uR)return jv;uR=1;var e=h_(),t=rd(),r=Gq(),n=Nt();function o(i,a){var s=n(i)?e:t;return s(i,r(a))}return jv=o,jv}var qv,dR;function Yq(){return dR||(dR=1,qv=Kq()),qv}var Lv,fR;function M9(){if(fR)return Lv;fR=1;var e=rd();function t(r,n){var o=[];return e(r,function(i,a,s){n(i,a,s)&&o.push(i)}),o}return Lv=t,Lv}var zv,pR;function D9(){if(pR)return zv;pR=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return zv=t,zv}var Bv,hR;function j9(){if(hR)return Bv;hR=1;function e(t){return this.__data__.has(t)}return Bv=e,Bv}var Fv,vR;function Xq(){if(vR)return Fv;vR=1;var e=p_(),t=D9(),r=j9();function n(o){var i=-1,a=o==null?0:o.length;for(this.__data__=new e;++i<a;)this.add(o[i])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,Fv=n,Fv}var $v,gR;function q9(){if(gR)return $v;gR=1;function e(t,r){for(var n=-1,o=t==null?0:t.length;++n<o;)if(r(t[n],n,t))return!0;return!1}return $v=e,$v}var Hv,mR;function Zq(){if(mR)return Hv;mR=1;function e(t,r){return t.has(r)}return Hv=e,Hv}var Vv,bR;function Jq(){if(bR)return Vv;bR=1;var e=Xq(),t=q9(),r=Zq(),n=1,o=2;function i(a,s,c,u,d,p){var h=c&n,v=a.length,y=s.length;if(v!=y&&!(h&&y>v))return!1;var g=p.get(a),b=p.get(s);if(g&&b)return g==s&&b==a;var x=-1,w=!0,E=c&o?new e:void 0;for(p.set(a,s),p.set(s,a);++x<v;){var S=a[x],_=s[x];if(u)var O=h?u(_,S,x,s,a,p):u(S,_,x,a,s,p);if(O!==void 0){if(O)continue;w=!1;break}if(E){if(!t(s,function(N,R){if(!r(E,R)&&(S===N||d(S,N,c,u,p)))return E.push(R)})){w=!1;break}}else if(!(S===_||d(S,_,c,u,p))){w=!1;break}}return p.delete(a),p.delete(s),w}return Vv=i,Vv}var Wv,yR;function L9(){if(yR)return Wv;yR=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(o,i){n[++r]=[i,o]}),n}return Wv=e,Wv}var Uv,wR;function S_(){if(wR)return Uv;wR=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(o){n[++r]=o}),n}return Uv=e,Uv}var Gv,xR;function z9(){if(xR)return Gv;xR=1;var e=ia(),t=$q(),r=oa(),n=Jq(),o=L9(),i=S_(),a=1,s=2,c="[object Boolean]",u="[object Date]",d="[object Error]",p="[object Map]",h="[object Number]",v="[object RegExp]",y="[object Set]",g="[object String]",b="[object Symbol]",x="[object ArrayBuffer]",w="[object DataView]",E=e?e.prototype:void 0,S=E?E.valueOf:void 0;function _(O,N,R,A,D,B,j){switch(R){case w:if(O.byteLength!=N.byteLength||O.byteOffset!=N.byteOffset)return!1;O=O.buffer,N=N.buffer;case x:return!(O.byteLength!=N.byteLength||!B(new t(O),new t(N)));case c:case u:case h:return r(+O,+N);case d:return O.name==N.name&&O.message==N.message;case v:case g:return O==N+"";case p:var M=o;case y:var P=A&a;if(M||(M=i),O.size!=N.size&&!P)return!1;var V=j.get(O);if(V)return V==N;A|=s,j.set(O,N);var q=n(M(O),M(N),A,D,B,j);return j.delete(O),q;case b:if(S)return S.call(O)==S.call(N)}return!1}return Gv=_,Gv}var Kv,_R;function B9(){if(_R)return Kv;_R=1;var e=Bq(),t=1,r=Object.prototype,n=r.hasOwnProperty;function o(i,a,s,c,u,d){var p=s&t,h=e(i),v=h.length,y=e(a),g=y.length;if(v!=g&&!p)return!1;for(var b=v;b--;){var x=h[b];if(!(p?x in a:n.call(a,x)))return!1}var w=d.get(i),E=d.get(a);if(w&&E)return w==a&&E==i;var S=!0;d.set(i,a),d.set(a,i);for(var _=p;++b<v;){x=h[b];var O=i[x],N=a[x];if(c)var R=p?c(N,O,x,a,i,d):c(O,N,x,i,a,d);if(!(R===void 0?O===N||u(O,N,s,c,d):R)){S=!1;break}_||(_=x=="constructor")}if(S&&!_){var A=i.constructor,D=a.constructor;A!=D&&"constructor"in i&&"constructor"in a&&!(typeof A=="function"&&A instanceof A&&typeof D=="function"&&D instanceof D)&&(S=!1)}return d.delete(i),d.delete(a),S}return Kv=o,Kv}var Yv,ER;function F9(){if(ER)return Yv;ER=1;var e=Yu(),t=Jq(),r=z9(),n=B9(),o=sa(),i=Nt(),a=aa(),s=Fs(),c=1,u="[object Arguments]",d="[object Array]",p="[object Object]",h=Object.prototype,v=h.hasOwnProperty;function y(g,b,x,w,E,S){var _=i(g),O=i(b),N=_?d:o(g),R=O?d:o(b);N=N==u?p:N,R=R==u?p:R;var A=N==p,D=R==p,B=N==R;if(B&&a(g)){if(!a(b))return!1;_=!0,A=!1}if(B&&!A)return S||(S=new e),_||s(g)?t(g,b,x,w,E,S):r(g,b,N,x,w,E,S);if(!(x&c)){var j=A&&v.call(g,"__wrapped__"),M=D&&v.call(b,"__wrapped__");if(j||M){var P=j?g.value():g,V=M?b.value():b;return S||(S=new e),E(P,V,x,w,S)}}return B?(S||(S=new e),n(g,b,x,w,E,S)):!1}return Yv=y,Yv}var Xv,SR;function Qq(){if(SR)return Xv;SR=1;var e=F9(),t=Cn();function r(n,o,i,a,s){return n===o?!0:n==null||o==null||!t(n)&&!t(o)?n!==n&&o!==o:e(n,o,i,a,r,s)}return Xv=r,Xv}var Zv,OR;function $9(){if(OR)return Zv;OR=1;var e=Yu(),t=Qq(),r=1,n=2;function o(i,a,s,c){var u=s.length,d=u,p=!c;if(i==null)return!d;for(i=Object(i);u--;){var h=s[u];if(p&&h[2]?h[1]!==i[h[0]]:!(h[0]in i))return!1}for(;++u<d;){h=s[u];var v=h[0],y=i[v],g=h[1];if(p&&h[2]){if(y===void 0&&!(v in i))return!1}else{var b=new e;if(c)var x=c(y,g,v,i,a,b);if(!(x===void 0?t(g,y,r|n,c,b):x))return!1}}return!0}return Zv=o,Zv}var Jv,CR;function eL(){if(CR)return Jv;CR=1;var e=Hr();function t(r){return r===r&&!e(r)}return Jv=t,Jv}var Qv,IR;function H9(){if(IR)return Qv;IR=1;var e=eL(),t=_o();function r(n){for(var o=t(n),i=o.length;i--;){var a=o[i],s=n[a];o[i]=[a,s,e(s)]}return o}return Qv=r,Qv}var eg,RR;function tL(){if(RR)return eg;RR=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return eg=e,eg}var tg,NR;function V9(){if(NR)return tg;NR=1;var e=$9(),t=H9(),r=tL();function n(o){var i=t(o);return i.length==1&&i[0][2]?r(i[0][0],i[0][1]):function(a){return a===o||e(a,o,i)}}return tg=n,tg}var rg,PR;function la(){if(PR)return rg;PR=1;var e=Jo(),t=Cn(),r="[object Symbol]";function n(o){return typeof o=="symbol"||t(o)&&e(o)==r}return rg=n,rg}var ng,TR;function O_(){if(TR)return ng;TR=1;var e=Nt(),t=la(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function o(i,a){if(e(i))return!1;var s=typeof i;return s=="number"||s=="symbol"||s=="boolean"||i==null||t(i)?!0:n.test(i)||!r.test(i)||a!=null&&i in Object(a)}return ng=o,ng}var og,AR;function W9(){if(AR)return og;AR=1;var e=p_(),t="Expected a function";function r(n,o){if(typeof n!="function"||o!=null&&typeof o!="function")throw new TypeError(t);var i=function(){var a=arguments,s=o?o.apply(this,a):a[0],c=i.cache;if(c.has(s))return c.get(s);var u=n.apply(this,a);return i.cache=c.set(s,u)||c,u};return i.cache=new(r.Cache||e),i}return r.Cache=e,og=r,og}var ig,kR;function U9(){if(kR)return ig;kR=1;var e=W9(),t=500;function r(n){var o=e(n,function(a){return i.size===t&&i.clear(),a}),i=o.cache;return o}return ig=r,ig}var ag,MR;function G9(){if(MR)return ag;MR=1;var e=U9(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(o){var i=[];return o.charCodeAt(0)===46&&i.push(""),o.replace(t,function(a,s,c,u){i.push(c?u.replace(r,"$1"):s||a)}),i});return ag=n,ag}var sg,DR;function nd(){if(DR)return sg;DR=1;function e(t,r){for(var n=-1,o=t==null?0:t.length,i=Array(o);++n<o;)i[n]=r(t[n],n,t);return i}return sg=e,sg}var lg,jR;function K9(){if(jR)return lg;jR=1;var e=ia(),t=nd(),r=Nt(),n=la(),o=e?e.prototype:void 0,i=o?o.toString:void 0;function a(s){if(typeof s=="string")return s;if(r(s))return t(s,a)+"";if(n(s))return i?i.call(s):"";var c=s+"";return c=="0"&&1/s==-1/0?"-0":c}return lg=a,lg}var cg,qR;function rL(){if(qR)return cg;qR=1;var e=K9();function t(r){return r==null?"":e(r)}return cg=t,cg}var ug,LR;function od(){if(LR)return ug;LR=1;var e=Nt(),t=O_(),r=G9(),n=rL();function o(i,a){return e(i)?i:t(i,a)?[i]:r(n(i))}return ug=o,ug}var dg,zR;function $s(){if(zR)return dg;zR=1;var e=la();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return dg=t,dg}var fg,BR;function id(){if(BR)return fg;BR=1;var e=od(),t=$s();function r(n,o){o=e(o,n);for(var i=0,a=o.length;n!=null&&i<a;)n=n[t(o[i++])];return i&&i==a?n:void 0}return fg=r,fg}var pg,FR;function Y9(){if(FR)return pg;FR=1;var e=id();function t(r,n,o){var i=r==null?void 0:e(r,n);return i===void 0?o:i}return pg=t,pg}var hg,$R;function X9(){if($R)return hg;$R=1;function e(t,r){return t!=null&&r in Object(t)}return hg=e,hg}var vg,HR;function nL(){if(HR)return vg;HR=1;var e=od(),t=Bs(),r=Nt(),n=Ju(),o=v_(),i=$s();function a(s,c,u){c=e(c,s);for(var d=-1,p=c.length,h=!1;++d<p;){var v=i(c[d]);if(!(h=s!=null&&u(s,v)))break;s=s[v]}return h||++d!=p?h:(p=s==null?0:s.length,!!p&&o(p)&&n(v,p)&&(r(s)||t(s)))}return vg=a,vg}var gg,VR;function oL(){if(VR)return gg;VR=1;var e=X9(),t=nL();function r(n,o){return n!=null&&t(n,o,e)}return gg=r,gg}var mg,WR;function Z9(){if(WR)return mg;WR=1;var e=Qq(),t=Y9(),r=oL(),n=O_(),o=eL(),i=tL(),a=$s(),s=1,c=2;function u(d,p){return n(d)&&o(p)?i(a(d),p):function(h){var v=t(h,d);return v===void 0&&v===p?r(h,d):e(p,v,s|c)}}return mg=u,mg}var bg,UR;function iL(){if(UR)return bg;UR=1;function e(t){return function(r){return r==null?void 0:r[t]}}return bg=e,bg}var yg,GR;function J9(){if(GR)return yg;GR=1;var e=id();function t(r){return function(n){return e(n,r)}}return yg=t,yg}var wg,KR;function Q9(){if(KR)return wg;KR=1;var e=iL(),t=J9(),r=O_(),n=$s();function o(i){return r(i)?e(n(i)):t(i)}return wg=o,wg}var xg,YR;function Kn(){if(YR)return xg;YR=1;var e=V9(),t=Z9(),r=ti(),n=Nt(),o=Q9();function i(a){return typeof a=="function"?a:a==null?r:typeof a=="object"?n(a)?t(a[0],a[1]):e(a):o(a)}return xg=i,xg}var _g,XR;function aL(){if(XR)return _g;XR=1;var e=jq(),t=M9(),r=Kn(),n=Nt();function o(i,a){var s=n(i)?e:t;return s(i,r(a,3))}return _g=o,_g}var Eg,ZR;function eK(){if(ZR)return Eg;ZR=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,o){return n!=null&&t.call(n,o)}return Eg=r,Eg}var Sg,JR;function sL(){if(JR)return Sg;JR=1;var e=eK(),t=nL();function r(n,o){return n!=null&&t(n,o,e)}return Sg=r,Sg}var Og,QR;function tK(){if(QR)return Og;QR=1;var e=m_(),t=sa(),r=Bs(),n=Nt(),o=Gn(),i=aa(),a=ed(),s=Fs(),c="[object Map]",u="[object Set]",d=Object.prototype,p=d.hasOwnProperty;function h(v){if(v==null)return!0;if(o(v)&&(n(v)||typeof v=="string"||typeof v.splice=="function"||i(v)||s(v)||r(v)))return!v.length;var y=t(v);if(y==c||y==u)return!v.size;if(a(v))return!e(v).length;for(var g in v)if(p.call(v,g))return!1;return!0}return Og=h,Og}var Cg,eN;function lL(){if(eN)return Cg;eN=1;function e(t){return t===void 0}return Cg=e,Cg}var Ig,tN;function cL(){if(tN)return Ig;tN=1;var e=rd(),t=Gn();function r(n,o){var i=-1,a=t(n)?Array(n.length):[];return e(n,function(s,c,u){a[++i]=o(s,c,u)}),a}return Ig=r,Ig}var Rg,rN;function uL(){if(rN)return Rg;rN=1;var e=nd(),t=Kn(),r=cL(),n=Nt();function o(i,a){var s=n(i)?e:r;return s(i,t(a,3))}return Rg=o,Rg}var Ng,nN;function rK(){if(nN)return Ng;nN=1;function e(t,r,n,o){var i=-1,a=t==null?0:t.length;for(o&&a&&(n=t[++i]);++i<a;)n=r(n,t[i],i,t);return n}return Ng=e,Ng}var Pg,oN;function nK(){if(oN)return Pg;oN=1;function e(t,r,n,o,i){return i(t,function(a,s,c){n=o?(o=!1,a):r(n,a,s,c)}),n}return Pg=e,Pg}var Tg,iN;function dL(){if(iN)return Tg;iN=1;var e=rK(),t=rd(),r=Kn(),n=nK(),o=Nt();function i(a,s,c){var u=o(a)?e:n,d=arguments.length<3;return u(a,r(s,4),c,d,t)}return Tg=i,Tg}var Ag,aN;function oK(){if(aN)return Ag;aN=1;var e=Jo(),t=Nt(),r=Cn(),n="[object String]";function o(i){return typeof i=="string"||!t(i)&&r(i)&&e(i)==n}return Ag=o,Ag}var kg,sN;function iK(){if(sN)return kg;sN=1;var e=iL(),t=e("length");return kg=t,kg}var Mg,lN;function aK(){if(lN)return Mg;lN=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",o=t+r+n,i="\\ufe0e\\ufe0f",a="\\u200d",s=RegExp("["+a+e+o+i+"]");function c(u){return s.test(u)}return Mg=c,Mg}var Dg,cN;function sK(){if(cN)return Dg;cN=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",o=t+r+n,i="\\ufe0e\\ufe0f",a="["+e+"]",s="["+o+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+s+"|"+c+")",d="[^"+e+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",y=u+"?",g="["+i+"]?",b="(?:"+v+"(?:"+[d,p,h].join("|")+")"+g+y+")*",x=g+y+b,w="(?:"+[d+s+"?",s,p,h,a].join("|")+")",E=RegExp(c+"(?="+c+")|"+w+x,"g");function S(_){for(var O=E.lastIndex=0;E.test(_);)++O;return O}return Dg=S,Dg}var jg,uN;function lK(){if(uN)return jg;uN=1;var e=iK(),t=aK(),r=sK();function n(o){return t(o)?r(o):e(o)}return jg=n,jg}var qg,dN;function cK(){if(dN)return qg;dN=1;var e=m_(),t=sa(),r=Gn(),n=oK(),o=lK(),i="[object Map]",a="[object Set]";function s(c){if(c==null)return 0;if(r(c))return n(c)?o(c):c.length;var u=t(c);return u==i||u==a?c.size:e(c).length}return qg=s,qg}var Lg,fN;function uK(){if(fN)return Lg;fN=1;var e=h_(),t=Vq(),r=E_(),n=Kn(),o=td(),i=Nt(),a=aa(),s=Ls(),c=Hr(),u=Fs();function d(p,h,v){var y=i(p),g=y||a(p)||u(p);if(h=n(h,4),v==null){var b=p&&p.constructor;g?v=y?new b:[]:c(p)?v=s(b)?t(o(p)):{}:v={}}return(g?e:r)(p,function(x,w,E){return h(v,x,w,E)}),v}return Lg=d,Lg}var zg,pN;function dK(){if(pN)return zg;pN=1;var e=ia(),t=Bs(),r=Nt(),n=e?e.isConcatSpreadable:void 0;function o(i){return r(i)||t(i)||!!(n&&i&&i[n])}return zg=o,zg}var Bg,hN;function C_(){if(hN)return Bg;hN=1;var e=y_(),t=dK();function r(n,o,i,a,s){var c=-1,u=n.length;for(i||(i=t),s||(s=[]);++c<u;){var d=n[c];o>0&&i(d)?o>1?r(d,o-1,i,a,s):e(s,d):a||(s[s.length]=d)}return s}return Bg=r,Bg}var Fg,vN;function fK(){if(vN)return Fg;vN=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return Fg=e,Fg}var $g,gN;function fL(){if(gN)return $g;gN=1;var e=fK(),t=Math.max;function r(n,o,i){return o=t(o===void 0?n.length-1:o,0),function(){for(var a=arguments,s=-1,c=t(a.length-o,0),u=Array(c);++s<c;)u[s]=a[o+s];s=-1;for(var d=Array(o+1);++s<o;)d[s]=a[s];return d[o]=i(u),e(n,this,d)}}return $g=r,$g}var Hg,mN;function pK(){if(mN)return Hg;mN=1;var e=x_(),t=Tq(),r=ti(),n=t?function(o,i){return t(o,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:r;return Hg=n,Hg}var Vg,bN;function hK(){if(bN)return Vg;bN=1;var e=800,t=16,r=Date.now;function n(o){var i=0,a=0;return function(){var s=r(),c=t-(s-a);if(a=s,c>0){if(++i>=e)return arguments[0]}else i=0;return o.apply(void 0,arguments)}}return Vg=n,Vg}var Wg,yN;function pL(){if(yN)return Wg;yN=1;var e=pK(),t=hK(),r=t(e);return Wg=r,Wg}var Ug,wN;function ad(){if(wN)return Ug;wN=1;var e=ti(),t=fL(),r=pL();function n(o,i){return r(t(o,i,e),o+"")}return Ug=n,Ug}var Gg,xN;function hL(){if(xN)return Gg;xN=1;function e(t,r,n,o){for(var i=t.length,a=n+(o?1:-1);o?a--:++a<i;)if(r(t[a],a,t))return a;return-1}return Gg=e,Gg}var Kg,_N;function vK(){if(_N)return Kg;_N=1;function e(t){return t!==t}return Kg=e,Kg}var Yg,EN;function gK(){if(EN)return Yg;EN=1;function e(t,r,n){for(var o=n-1,i=t.length;++o<i;)if(t[o]===r)return o;return-1}return Yg=e,Yg}var Xg,SN;function mK(){if(SN)return Xg;SN=1;var e=hL(),t=vK(),r=gK();function n(o,i,a){return i===i?r(o,i,a):e(o,t,a)}return Xg=n,Xg}var Zg,ON;function bK(){if(ON)return Zg;ON=1;var e=mK();function t(r,n){var o=r==null?0:r.length;return!!o&&e(r,n,0)>-1}return Zg=t,Zg}var Jg,CN;function yK(){if(CN)return Jg;CN=1;function e(t,r,n){for(var o=-1,i=t==null?0:t.length;++o<i;)if(n(r,t[o]))return!0;return!1}return Jg=e,Jg}var Qg,IN;function wK(){if(IN)return Qg;IN=1;function e(){}return Qg=e,Qg}var em,RN;function xK(){if(RN)return em;RN=1;var e=Fq(),t=wK(),r=S_(),n=1/0,o=e&&1/r(new e([,-0]))[1]==n?function(i){return new e(i)}:t;return em=o,em}var tm,NN;function _K(){if(NN)return tm;NN=1;var e=Xq(),t=bK(),r=yK(),n=Zq(),o=xK(),i=S_(),a=200;function s(c,u,d){var p=-1,h=t,v=c.length,y=!0,g=[],b=g;if(d)y=!1,h=r;else if(v>=a){var x=u?null:o(c);if(x)return i(x);y=!1,h=n,b=new e}else b=u?[]:g;e:for(;++p<v;){var w=c[p],E=u?u(w):w;if(w=d||w!==0?w:0,y&&E===E){for(var S=b.length;S--;)if(b[S]===E)continue e;u&&b.push(E),g.push(w)}else h(b,E,d)||(b!==g&&b.push(E),g.push(w))}return g}return tm=s,tm}var rm,PN;function vL(){if(PN)return rm;PN=1;var e=Gn(),t=Cn();function r(n){return t(n)&&e(n)}return rm=r,rm}var nm,TN;function EK(){if(TN)return nm;TN=1;var e=C_(),t=ad(),r=_K(),n=vL(),o=t(function(i){return r(e(i,1,n,!0))});return nm=o,nm}var om,AN;function SK(){if(AN)return om;AN=1;var e=nd();function t(r,n){return e(n,function(o){return r[o]})}return om=t,om}var im,kN;function gL(){if(kN)return im;kN=1;var e=SK(),t=_o();function r(n){return n==null?[]:e(n,t(n))}return im=r,im}var am,MN;function Vr(){if(MN)return am;MN=1;var e;if(typeof d_=="function")try{e={clone:T9(),constant:x_(),each:Yq(),filter:aL(),has:sL(),isArray:Nt(),isEmpty:tK(),isFunction:Ls(),isUndefined:lL(),keys:_o(),map:uL(),reduce:dL(),size:cK(),transform:uK(),union:EK(),values:gL()}}catch{}return e||(e=window._),am=e,am}var sm,DN;function I_(){if(DN)return sm;DN=1;var e=Vr();sm=o;var t="\0",r="\0",n="";function o(d){this._isDirected=e.has(d,"directed")?d.directed:!0,this._isMultigraph=e.has(d,"multigraph")?d.multigraph:!1,this._isCompound=e.has(d,"compound")?d.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[r]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}o.prototype._nodeCount=0,o.prototype._edgeCount=0,o.prototype.isDirected=function(){return this._isDirected},o.prototype.isMultigraph=function(){return this._isMultigraph},o.prototype.isCompound=function(){return this._isCompound},o.prototype.setGraph=function(d){return this._label=d,this},o.prototype.graph=function(){return this._label},o.prototype.setDefaultNodeLabel=function(d){return e.isFunction(d)||(d=e.constant(d)),this._defaultNodeLabelFn=d,this},o.prototype.nodeCount=function(){return this._nodeCount},o.prototype.nodes=function(){return e.keys(this._nodes)},o.prototype.sources=function(){var d=this;return e.filter(this.nodes(),function(p){return e.isEmpty(d._in[p])})},o.prototype.sinks=function(){var d=this;return e.filter(this.nodes(),function(p){return e.isEmpty(d._out[p])})},o.prototype.setNodes=function(d,p){var h=arguments,v=this;return e.each(d,function(y){h.length>1?v.setNode(y,p):v.setNode(y)}),this},o.prototype.setNode=function(d,p){return e.has(this._nodes,d)?(arguments.length>1&&(this._nodes[d]=p),this):(this._nodes[d]=arguments.length>1?p:this._defaultNodeLabelFn(d),this._isCompound&&(this._parent[d]=r,this._children[d]={},this._children[r][d]=!0),this._in[d]={},this._preds[d]={},this._out[d]={},this._sucs[d]={},++this._nodeCount,this)},o.prototype.node=function(d){return this._nodes[d]},o.prototype.hasNode=function(d){return e.has(this._nodes,d)},o.prototype.removeNode=function(d){var p=this;if(e.has(this._nodes,d)){var h=function(v){p.removeEdge(p._edgeObjs[v])};delete this._nodes[d],this._isCompound&&(this._removeFromParentsChildList(d),delete this._parent[d],e.each(this.children(d),function(v){p.setParent(v)}),delete this._children[d]),e.each(e.keys(this._in[d]),h),delete this._in[d],delete this._preds[d],e.each(e.keys(this._out[d]),h),delete this._out[d],delete this._sucs[d],--this._nodeCount}return this},o.prototype.setParent=function(d,p){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(p))p=r;else{p+="";for(var h=p;!e.isUndefined(h);h=this.parent(h))if(h===d)throw new Error("Setting "+p+" as parent of "+d+" would create a cycle");this.setNode(p)}return this.setNode(d),this._removeFromParentsChildList(d),this._parent[d]=p,this._children[p][d]=!0,this},o.prototype._removeFromParentsChildList=function(d){delete this._children[this._parent[d]][d]},o.prototype.parent=function(d){if(this._isCompound){var p=this._parent[d];if(p!==r)return p}},o.prototype.children=function(d){if(e.isUndefined(d)&&(d=r),this._isCompound){var p=this._children[d];if(p)return e.keys(p)}else{if(d===r)return this.nodes();if(this.hasNode(d))return[]}},o.prototype.predecessors=function(d){var p=this._preds[d];if(p)return e.keys(p)},o.prototype.successors=function(d){var p=this._sucs[d];if(p)return e.keys(p)},o.prototype.neighbors=function(d){var p=this.predecessors(d);if(p)return e.union(p,this.successors(d))},o.prototype.isLeaf=function(d){var p;return this.isDirected()?p=this.successors(d):p=this.neighbors(d),p.length===0},o.prototype.filterNodes=function(d){var p=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});p.setGraph(this.graph());var h=this;e.each(this._nodes,function(g,b){d(b)&&p.setNode(b,g)}),e.each(this._edgeObjs,function(g){p.hasNode(g.v)&&p.hasNode(g.w)&&p.setEdge(g,h.edge(g))});var v={};function y(g){var b=h.parent(g);return b===void 0||p.hasNode(b)?(v[g]=b,b):b in v?v[b]:y(b)}return this._isCompound&&e.each(p.nodes(),function(g){p.setParent(g,y(g))}),p},o.prototype.setDefaultEdgeLabel=function(d){return e.isFunction(d)||(d=e.constant(d)),this._defaultEdgeLabelFn=d,this},o.prototype.edgeCount=function(){return this._edgeCount},o.prototype.edges=function(){return e.values(this._edgeObjs)},o.prototype.setPath=function(d,p){var h=this,v=arguments;return e.reduce(d,function(y,g){return v.length>1?h.setEdge(y,g,p):h.setEdge(y,g),g}),this},o.prototype.setEdge=function(){var d,p,h,v,y=!1,g=arguments[0];typeof g=="object"&&g!==null&&"v"in g?(d=g.v,p=g.w,h=g.name,arguments.length===2&&(v=arguments[1],y=!0)):(d=g,p=arguments[1],h=arguments[3],arguments.length>2&&(v=arguments[2],y=!0)),d=""+d,p=""+p,e.isUndefined(h)||(h=""+h);var b=s(this._isDirected,d,p,h);if(e.has(this._edgeLabels,b))return y&&(this._edgeLabels[b]=v),this;if(!e.isUndefined(h)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(d),this.setNode(p),this._edgeLabels[b]=y?v:this._defaultEdgeLabelFn(d,p,h);var x=c(this._isDirected,d,p,h);return d=x.v,p=x.w,Object.freeze(x),this._edgeObjs[b]=x,i(this._preds[p],d),i(this._sucs[d],p),this._in[p][b]=x,this._out[d][b]=x,this._edgeCount++,this},o.prototype.edge=function(d,p,h){var v=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,d,p,h);return this._edgeLabels[v]},o.prototype.hasEdge=function(d,p,h){var v=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,d,p,h);return e.has(this._edgeLabels,v)},o.prototype.removeEdge=function(d,p,h){var v=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,d,p,h),y=this._edgeObjs[v];return y&&(d=y.v,p=y.w,delete this._edgeLabels[v],delete this._edgeObjs[v],a(this._preds[p],d),a(this._sucs[d],p),delete this._in[p][v],delete this._out[d][v],this._edgeCount--),this},o.prototype.inEdges=function(d,p){var h=this._in[d];if(h){var v=e.values(h);return p?e.filter(v,function(y){return y.v===p}):v}},o.prototype.outEdges=function(d,p){var h=this._out[d];if(h){var v=e.values(h);return p?e.filter(v,function(y){return y.w===p}):v}},o.prototype.nodeEdges=function(d,p){var h=this.inEdges(d,p);if(h)return h.concat(this.outEdges(d,p))};function i(d,p){d[p]?d[p]++:d[p]=1}function a(d,p){--d[p]||delete d[p]}function s(d,p,h,v){var y=""+p,g=""+h;if(!d&&y>g){var b=y;y=g,g=b}return y+n+g+n+(e.isUndefined(v)?t:v)}function c(d,p,h,v){var y=""+p,g=""+h;if(!d&&y>g){var b=y;y=g,g=b}var x={v:y,w:g};return v&&(x.name=v),x}function u(d,p){return s(d,p.v,p.w,p.name)}return sm}var lm,jN;function OK(){return jN||(jN=1,lm="2.1.8"),lm}var cm,qN;function CK(){return qN||(qN=1,cm={Graph:I_(),version:OK()}),cm}var um,LN;function IK(){if(LN)return um;LN=1;var e=Vr(),t=I_();um={write:r,read:i};function r(a){var s={options:{directed:a.isDirected(),multigraph:a.isMultigraph(),compound:a.isCompound()},nodes:n(a),edges:o(a)};return e.isUndefined(a.graph())||(s.value=e.clone(a.graph())),s}function n(a){return e.map(a.nodes(),function(s){var c=a.node(s),u=a.parent(s),d={v:s};return e.isUndefined(c)||(d.value=c),e.isUndefined(u)||(d.parent=u),d})}function o(a){return e.map(a.edges(),function(s){var c=a.edge(s),u={v:s.v,w:s.w};return e.isUndefined(s.name)||(u.name=s.name),e.isUndefined(c)||(u.value=c),u})}function i(a){var s=new t(a.options).setGraph(a.value);return e.each(a.nodes,function(c){s.setNode(c.v,c.value),c.parent&&s.setParent(c.v,c.parent)}),e.each(a.edges,function(c){s.setEdge({v:c.v,w:c.w,name:c.name},c.value)}),s}return um}var dm,zN;function RK(){if(zN)return dm;zN=1;var e=Vr();dm=t;function t(r){var n={},o=[],i;function a(s){e.has(n,s)||(n[s]=!0,i.push(s),e.each(r.successors(s),a),e.each(r.predecessors(s),a))}return e.each(r.nodes(),function(s){i=[],a(s),i.length&&o.push(i)}),o}return dm}var fm,BN;function mL(){if(BN)return fm;BN=1;var e=Vr();fm=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(r){return r.key})},t.prototype.has=function(r){return e.has(this._keyIndices,r)},t.prototype.priority=function(r){var n=this._keyIndices[r];if(n!==void 0)return this._arr[n].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(r,n){var o=this._keyIndices;if(r=String(r),!e.has(o,r)){var i=this._arr,a=i.length;return o[r]=a,i.push({key:r,priority:n}),this._decrease(a),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var r=this._arr.pop();return delete this._keyIndices[r.key],this._heapify(0),r.key},t.prototype.decrease=function(r,n){var o=this._keyIndices[r];if(n>this._arr[o].priority)throw new Error("New priority is greater than current priority. Key: "+r+" Old: "+this._arr[o].priority+" New: "+n);this._arr[o].priority=n,this._decrease(o)},t.prototype._heapify=function(r){var n=this._arr,o=2*r,i=o+1,a=r;o<n.length&&(a=n[o].priority<n[a].priority?o:a,i<n.length&&(a=n[i].priority<n[a].priority?i:a),a!==r&&(this._swap(r,a),this._heapify(a)))},t.prototype._decrease=function(r){for(var n=this._arr,o=n[r].priority,i;r!==0&&(i=r>>1,!(n[i].priority<o));)this._swap(r,i),r=i},t.prototype._swap=function(r,n){var o=this._arr,i=this._keyIndices,a=o[r],s=o[n];o[r]=s,o[n]=a,i[s.key]=r,i[a.key]=n},fm}var pm,FN;function bL(){if(FN)return pm;FN=1;var e=Vr(),t=mL();pm=n;var r=e.constant(1);function n(i,a,s,c){return o(i,String(a),s||r,c||function(u){return i.outEdges(u)})}function o(i,a,s,c){var u={},d=new t,p,h,v=function(y){var g=y.v!==p?y.v:y.w,b=u[g],x=s(y),w=h.distance+x;if(x<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+y+" Weight: "+x);w<b.distance&&(b.distance=w,b.predecessor=p,d.decrease(g,w))};for(i.nodes().forEach(function(y){var g=y===a?0:Number.POSITIVE_INFINITY;u[y]={distance:g},d.add(y,g)});d.size()>0&&(p=d.removeMin(),h=u[p],h.distance!==Number.POSITIVE_INFINITY);)c(p).forEach(v);return u}return pm}var hm,$N;function NK(){if($N)return hm;$N=1;var e=bL(),t=Vr();hm=r;function r(n,o,i){return t.transform(n.nodes(),function(a,s){a[s]=e(n,s,o,i)},{})}return hm}var vm,HN;function yL(){if(HN)return vm;HN=1;var e=Vr();vm=t;function t(r){var n=0,o=[],i={},a=[];function s(c){var u=i[c]={onStack:!0,lowlink:n,index:n++};if(o.push(c),r.successors(c).forEach(function(h){e.has(i,h)?i[h].onStack&&(u.lowlink=Math.min(u.lowlink,i[h].index)):(s(h),u.lowlink=Math.min(u.lowlink,i[h].lowlink))}),u.lowlink===u.index){var d=[],p;do p=o.pop(),i[p].onStack=!1,d.push(p);while(c!==p);a.push(d)}}return r.nodes().forEach(function(c){e.has(i,c)||s(c)}),a}return vm}var gm,VN;function PK(){if(VN)return gm;VN=1;var e=Vr(),t=yL();gm=r;function r(n){return e.filter(t(n),function(o){return o.length>1||o.length===1&&n.hasEdge(o[0],o[0])})}return gm}var mm,WN;function TK(){if(WN)return mm;WN=1;var e=Vr();mm=r;var t=e.constant(1);function r(o,i,a){return n(o,i||t,a||function(s){return o.outEdges(s)})}function n(o,i,a){var s={},c=o.nodes();return c.forEach(function(u){s[u]={},s[u][u]={distance:0},c.forEach(function(d){u!==d&&(s[u][d]={distance:Number.POSITIVE_INFINITY})}),a(u).forEach(function(d){var p=d.v===u?d.w:d.v,h=i(d);s[u][p]={distance:h,predecessor:u}})}),c.forEach(function(u){var d=s[u];c.forEach(function(p){var h=s[p];c.forEach(function(v){var y=h[u],g=d[v],b=h[v],x=y.distance+g.distance;x<b.distance&&(b.distance=x,b.predecessor=g.predecessor)})})}),s}return mm}var bm,UN;function wL(){if(UN)return bm;UN=1;var e=Vr();bm=t,t.CycleException=r;function t(n){var o={},i={},a=[];function s(c){if(e.has(i,c))throw new r;e.has(o,c)||(i[c]=!0,o[c]=!0,e.each(n.predecessors(c),s),delete i[c],a.push(c))}if(e.each(n.sinks(),s),e.size(o)!==n.nodeCount())throw new r;return a}function r(){}return r.prototype=new Error,bm}var ym,GN;function AK(){if(GN)return ym;GN=1;var e=wL();ym=t;function t(r){try{e(r)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return ym}var wm,KN;function xL(){if(KN)return wm;KN=1;var e=Vr();wm=t;function t(n,o,i){e.isArray(o)||(o=[o]);var a=(n.isDirected()?n.successors:n.neighbors).bind(n),s=[],c={};return e.each(o,function(u){if(!n.hasNode(u))throw new Error("Graph does not have node: "+u);r(n,u,i==="post",c,a,s)}),s}function r(n,o,i,a,s,c){e.has(a,o)||(a[o]=!0,i||c.push(o),e.each(s(o),function(u){r(n,u,i,a,s,c)}),i&&c.push(o))}return wm}var xm,YN;function kK(){if(YN)return xm;YN=1;var e=xL();xm=t;function t(r,n){return e(r,n,"post")}return xm}var _m,XN;function MK(){if(XN)return _m;XN=1;var e=xL();_m=t;function t(r,n){return e(r,n,"pre")}return _m}var Em,ZN;function DK(){if(ZN)return Em;ZN=1;var e=Vr(),t=I_(),r=mL();Em=n;function n(o,i){var a=new t,s={},c=new r,u;function d(h){var v=h.v===u?h.w:h.v,y=c.priority(v);if(y!==void 0){var g=i(h);g<y&&(s[v]=u,c.decrease(v,g))}}if(o.nodeCount()===0)return a;e.each(o.nodes(),function(h){c.add(h,Number.POSITIVE_INFINITY),a.setNode(h)}),c.decrease(o.nodes()[0],0);for(var p=!1;c.size()>0;){if(u=c.removeMin(),e.has(s,u))a.setEdge(u,s[u]);else{if(p)throw new Error("Input graph is not connected: "+o);p=!0}o.nodeEdges(u).forEach(d)}return a}return Em}var Sm,JN;function jK(){return JN||(JN=1,Sm={components:RK(),dijkstra:bL(),dijkstraAll:NK(),findCycles:PK(),floydWarshall:TK(),isAcyclic:AK(),postorder:kK(),preorder:MK(),prim:DK(),tarjan:yL(),topsort:wL()}),Sm}var Om,QN;function qK(){if(QN)return Om;QN=1;var e=CK();return Om={Graph:e.Graph,json:IK(),alg:jK(),version:e.version},Om}var Cm,eP;function tn(){if(eP)return Cm;eP=1;var e;if(typeof d_=="function")try{e=qK()}catch{}return e||(e=window.graphlib),Cm=e,Cm}var Im,tP;function LK(){if(tP)return Im;tP=1;var e=Uq(),t=1,r=4;function n(o){return e(o,t|r)}return Im=n,Im}var Rm,rP;function sd(){if(rP)return Rm;rP=1;var e=oa(),t=Gn(),r=Ju(),n=Hr();function o(i,a,s){if(!n(s))return!1;var c=typeof a;return(c=="number"?t(s)&&r(a,s.length):c=="string"&&a in s)?e(s[a],i):!1}return Rm=o,Rm}var Nm,nP;function zK(){if(nP)return Nm;nP=1;var e=ad(),t=oa(),r=sd(),n=ei(),o=Object.prototype,i=o.hasOwnProperty,a=e(function(s,c){s=Object(s);var u=-1,d=c.length,p=d>2?c[2]:void 0;for(p&&r(c[0],c[1],p)&&(d=1);++u<d;)for(var h=c[u],v=n(h),y=-1,g=v.length;++y<g;){var b=v[y],x=s[b];(x===void 0||t(x,o[b])&&!i.call(s,b))&&(s[b]=h[b])}return s});return Nm=a,Nm}var Pm,oP;function BK(){if(oP)return Pm;oP=1;var e=Kn(),t=Gn(),r=_o();function n(o){return function(i,a,s){var c=Object(i);if(!t(i)){var u=e(a,3);i=r(i),a=function(p){return u(c[p],p,c)}}var d=o(i,a,s);return d>-1?c[u?i[d]:d]:void 0}}return Pm=n,Pm}var Tm,iP;function FK(){if(iP)return Tm;iP=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Tm=t,Tm}var Am,aP;function $K(){if(aP)return Am;aP=1;var e=FK(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Am=r,Am}var km,sP;function HK(){if(sP)return km;sP=1;var e=$K(),t=Hr(),r=la(),n=NaN,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt;function c(u){if(typeof u=="number")return u;if(r(u))return n;if(t(u)){var d=typeof u.valueOf=="function"?u.valueOf():u;u=t(d)?d+"":d}if(typeof u!="string")return u===0?u:+u;u=e(u);var p=i.test(u);return p||a.test(u)?s(u.slice(2),p?2:8):o.test(u)?n:+u}return km=c,km}var Mm,lP;function _L(){if(lP)return Mm;lP=1;var e=HK(),t=1/0,r=17976931348623157e292;function n(o){if(!o)return o===0?o:0;if(o=e(o),o===t||o===-t){var i=o<0?-1:1;return i*r}return o===o?o:0}return Mm=n,Mm}var Dm,cP;function VK(){if(cP)return Dm;cP=1;var e=_L();function t(r){var n=e(r),o=n%1;return n===n?o?n-o:n:0}return Dm=t,Dm}var jm,uP;function WK(){if(uP)return jm;uP=1;var e=hL(),t=Kn(),r=VK(),n=Math.max;function o(i,a,s){var c=i==null?0:i.length;if(!c)return-1;var u=s==null?0:r(s);return u<0&&(u=n(c+u,0)),e(i,t(a,3),u)}return jm=o,jm}var qm,dP;function UK(){if(dP)return qm;dP=1;var e=BK(),t=WK(),r=e(t);return qm=r,qm}var Lm,fP;function EL(){if(fP)return Lm;fP=1;var e=C_();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return Lm=t,Lm}var zm,pP;function GK(){if(pP)return zm;pP=1;var e=__(),t=Gq(),r=ei();function n(o,i){return o==null?o:e(o,t(i),r)}return zm=n,zm}var Bm,hP;function KK(){if(hP)return Bm;hP=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return Bm=e,Bm}var Fm,vP;function YK(){if(vP)return Fm;vP=1;var e=Xu(),t=E_(),r=Kn();function n(o,i){var a={};return i=r(i,3),t(o,function(s,c,u){e(a,c,i(s,c,u))}),a}return Fm=n,Fm}var $m,gP;function R_(){if(gP)return $m;gP=1;var e=la();function t(r,n,o){for(var i=-1,a=r.length;++i<a;){var s=r[i],c=n(s);if(c!=null&&(u===void 0?c===c&&!e(c):o(c,u)))var u=c,d=s}return d}return $m=t,$m}var Hm,mP;function XK(){if(mP)return Hm;mP=1;function e(t,r){return t>r}return Hm=e,Hm}var Vm,bP;function ZK(){if(bP)return Vm;bP=1;var e=R_(),t=XK(),r=ti();function n(o){return o&&o.length?e(o,r,t):void 0}return Vm=n,Vm}var Wm,yP;function SL(){if(yP)return Wm;yP=1;var e=Xu(),t=oa();function r(n,o,i){(i!==void 0&&!t(n[o],i)||i===void 0&&!(o in n))&&e(n,o,i)}return Wm=r,Wm}var Um,wP;function JK(){if(wP)return Um;wP=1;var e=Jo(),t=td(),r=Cn(),n="[object Object]",o=Function.prototype,i=Object.prototype,a=o.toString,s=i.hasOwnProperty,c=a.call(Object);function u(d){if(!r(d)||e(d)!=n)return!1;var p=t(d);if(p===null)return!0;var h=s.call(p,"constructor")&&p.constructor;return typeof h=="function"&&h instanceof h&&a.call(h)==c}return Um=u,Um}var Gm,xP;function OL(){if(xP)return Gm;xP=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return Gm=e,Gm}var Km,_P;function QK(){if(_P)return Km;_P=1;var e=zs(),t=ei();function r(n){return e(n,t(n))}return Km=r,Km}var Ym,EP;function eY(){if(EP)return Ym;EP=1;var e=SL(),t=Mq(),r=Hq(),n=Dq(),o=Wq(),i=Bs(),a=Nt(),s=vL(),c=aa(),u=Ls(),d=Hr(),p=JK(),h=Fs(),v=OL(),y=QK();function g(b,x,w,E,S,_,O){var N=v(b,w),R=v(x,w),A=O.get(R);if(A){e(b,w,A);return}var D=_?_(N,R,w+"",b,x,O):void 0,B=D===void 0;if(B){var j=a(R),M=!j&&c(R),P=!j&&!M&&h(R);D=R,j||M||P?a(N)?D=N:s(N)?D=n(N):M?(B=!1,D=t(R,!0)):P?(B=!1,D=r(R,!0)):D=[]:p(R)||i(R)?(D=N,i(N)?D=y(N):(!d(N)||u(N))&&(D=o(R))):B=!1}B&&(O.set(R,D),S(D,R,E,_,O),O.delete(R)),e(b,w,D)}return Ym=g,Ym}var Xm,SP;function tY(){if(SP)return Xm;SP=1;var e=Yu(),t=SL(),r=__(),n=eY(),o=Hr(),i=ei(),a=OL();function s(c,u,d,p,h){c!==u&&r(u,function(v,y){if(h||(h=new e),o(v))n(c,u,y,d,s,p,h);else{var g=p?p(a(c,y),v,y+"",c,u,h):void 0;g===void 0&&(g=v),t(c,y,g)}},i)}return Xm=s,Xm}var Zm,OP;function rY(){if(OP)return Zm;OP=1;var e=ad(),t=sd();function r(n){return e(function(o,i){var a=-1,s=i.length,c=s>1?i[s-1]:void 0,u=s>2?i[2]:void 0;for(c=n.length>3&&typeof c=="function"?(s--,c):void 0,u&&t(i[0],i[1],u)&&(c=s<3?void 0:c,s=1),o=Object(o);++a<s;){var d=i[a];d&&n(o,d,a,c)}return o})}return Zm=r,Zm}var Jm,CP;function nY(){if(CP)return Jm;CP=1;var e=tY(),t=rY(),r=t(function(n,o,i){e(n,o,i)});return Jm=r,Jm}var Qm,IP;function CL(){if(IP)return Qm;IP=1;function e(t,r){return t<r}return Qm=e,Qm}var eb,RP;function oY(){if(RP)return eb;RP=1;var e=R_(),t=CL(),r=ti();function n(o){return o&&o.length?e(o,r,t):void 0}return eb=n,eb}var tb,NP;function iY(){if(NP)return tb;NP=1;var e=R_(),t=Kn(),r=CL();function n(o,i){return o&&o.length?e(o,t(i,2),r):void 0}return tb=n,tb}var rb,PP;function aY(){if(PP)return rb;PP=1;var e=on(),t=function(){return e.Date.now()};return rb=t,rb}var nb,TP;function sY(){if(TP)return nb;TP=1;var e=Zu(),t=od(),r=Ju(),n=Hr(),o=$s();function i(a,s,c,u){if(!n(a))return a;s=t(s,a);for(var d=-1,p=s.length,h=p-1,v=a;v!=null&&++d<p;){var y=o(s[d]),g=c;if(y==="__proto__"||y==="constructor"||y==="prototype")return a;if(d!=h){var b=v[y];g=u?u(b,y,v):void 0,g===void 0&&(g=n(b)?b:r(s[d+1])?[]:{})}e(v,y,g),v=v[y]}return a}return nb=i,nb}var ob,AP;function lY(){if(AP)return ob;AP=1;var e=id(),t=sY(),r=od();function n(o,i,a){for(var s=-1,c=i.length,u={};++s<c;){var d=i[s],p=e(o,d);a(p,d)&&t(u,r(d,o),p)}return u}return ob=n,ob}var ib,kP;function cY(){if(kP)return ib;kP=1;var e=lY(),t=oL();function r(n,o){return e(n,o,function(i,a){return t(n,a)})}return ib=r,ib}var ab,MP;function uY(){if(MP)return ab;MP=1;var e=EL(),t=fL(),r=pL();function n(o){return r(t(o,void 0,e),o+"")}return ab=n,ab}var sb,DP;function dY(){if(DP)return sb;DP=1;var e=cY(),t=uY(),r=t(function(n,o){return n==null?{}:e(n,o)});return sb=r,sb}var lb,jP;function fY(){if(jP)return lb;jP=1;var e=Math.ceil,t=Math.max;function r(n,o,i,a){for(var s=-1,c=t(e((o-n)/(i||1)),0),u=Array(c);c--;)u[a?c:++s]=n,n+=i;return u}return lb=r,lb}var cb,qP;function pY(){if(qP)return cb;qP=1;var e=fY(),t=sd(),r=_L();function n(o){return function(i,a,s){return s&&typeof s!="number"&&t(i,a,s)&&(a=s=void 0),i=r(i),a===void 0?(a=i,i=0):a=r(a),s=s===void 0?i<a?1:-1:r(s),e(i,a,s,o)}}return cb=n,cb}var ub,LP;function hY(){if(LP)return ub;LP=1;var e=pY(),t=e();return ub=t,ub}var db,zP;function vY(){if(zP)return db;zP=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return db=e,db}var fb,BP;function gY(){if(BP)return fb;BP=1;var e=la();function t(r,n){if(r!==n){var o=r!==void 0,i=r===null,a=r===r,s=e(r),c=n!==void 0,u=n===null,d=n===n,p=e(n);if(!u&&!p&&!s&&r>n||s&&c&&d&&!u&&!p||i&&c&&d||!o&&d||!a)return 1;if(!i&&!s&&!p&&r<n||p&&o&&a&&!i&&!s||u&&o&&a||!c&&a||!d)return-1}return 0}return fb=t,fb}var pb,FP;function mY(){if(FP)return pb;FP=1;var e=gY();function t(r,n,o){for(var i=-1,a=r.criteria,s=n.criteria,c=a.length,u=o.length;++i<c;){var d=e(a[i],s[i]);if(d){if(i>=u)return d;var p=o[i];return d*(p=="desc"?-1:1)}}return r.index-n.index}return pb=t,pb}var hb,$P;function bY(){if($P)return hb;$P=1;var e=nd(),t=id(),r=Kn(),n=cL(),o=vY(),i=Qu(),a=mY(),s=ti(),c=Nt();function u(d,p,h){p.length?p=e(p,function(g){return c(g)?function(b){return t(b,g.length===1?g[0]:g)}:g}):p=[s];var v=-1;p=e(p,i(r));var y=n(d,function(g,b,x){var w=e(p,function(E){return E(g)});return{criteria:w,index:++v,value:g}});return o(y,function(g,b){return a(g,b,h)})}return hb=u,hb}var vb,HP;function yY(){if(HP)return vb;HP=1;var e=C_(),t=bY(),r=ad(),n=sd(),o=r(function(i,a){if(i==null)return[];var s=a.length;return s>1&&n(i,a[0],a[1])?a=[]:s>2&&n(a[0],a[1],a[2])&&(a=[a[0]]),t(i,e(a,1),[])});return vb=o,vb}var gb,VP;function wY(){if(VP)return gb;VP=1;var e=rL(),t=0;function r(n){var o=++t;return e(n)+o}return gb=r,gb}var mb,WP;function xY(){if(WP)return mb;WP=1;function e(t,r,n){for(var o=-1,i=t.length,a=r.length,s={};++o<i;){var c=o<a?r[o]:void 0;n(s,t[o],c)}return s}return mb=e,mb}var bb,UP;function _Y(){if(UP)return bb;UP=1;var e=Zu(),t=xY();function r(n,o){return t(n||[],o||[],e)}return bb=r,bb}var yb,GP;function yt(){if(GP)return yb;GP=1;var e;if(typeof d_=="function")try{e={cloneDeep:LK(),constant:x_(),defaults:zK(),each:Yq(),filter:aL(),find:UK(),flatten:EL(),forEach:Kq(),forIn:GK(),has:sL(),isUndefined:lL(),last:KK(),map:uL(),mapValues:YK(),max:ZK(),merge:nY(),min:oY(),minBy:iY(),now:aY(),pick:dY(),range:hY(),reduce:dL(),sortBy:yY(),uniqueId:wY(),values:gL(),zipObject:_Y()}}catch{}return e||(e=window._),yb=e,yb}var wb,KP;function EY(){if(KP)return wb;KP=1,wb=e;function e(){var n={};n._next=n._prev=n,this._sentinel=n}e.prototype.dequeue=function(){var n=this._sentinel,o=n._prev;if(o!==n)return t(o),o},e.prototype.enqueue=function(n){var o=this._sentinel;n._prev&&n._next&&t(n),n._next=o._next,o._next._prev=n,o._next=n,n._prev=o},e.prototype.toString=function(){for(var n=[],o=this._sentinel,i=o._prev;i!==o;)n.push(JSON.stringify(i,r)),i=i._prev;return"["+n.join(", ")+"]"};function t(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function r(n,o){if(n!=="_next"&&n!=="_prev")return o}return wb}var xb,YP;function SY(){if(YP)return xb;YP=1;var e=yt(),t=tn().Graph,r=EY();xb=o;var n=e.constant(1);function o(u,d){if(u.nodeCount()<=1)return[];var p=s(u,d||n),h=i(p.graph,p.buckets,p.zeroIdx);return e.flatten(e.map(h,function(v){return u.outEdges(v.v,v.w)}),!0)}function i(u,d,p){for(var h=[],v=d[d.length-1],y=d[0],g;u.nodeCount();){for(;g=y.dequeue();)a(u,d,p,g);for(;g=v.dequeue();)a(u,d,p,g);if(u.nodeCount()){for(var b=d.length-2;b>0;--b)if(g=d[b].dequeue(),g){h=h.concat(a(u,d,p,g,!0));break}}}return h}function a(u,d,p,h,v){var y=v?[]:void 0;return e.forEach(u.inEdges(h.v),function(g){var b=u.edge(g),x=u.node(g.v);v&&y.push({v:g.v,w:g.w}),x.out-=b,c(d,p,x)}),e.forEach(u.outEdges(h.v),function(g){var b=u.edge(g),x=g.w,w=u.node(x);w.in-=b,c(d,p,w)}),u.removeNode(h.v),y}function s(u,d){var p=new t,h=0,v=0;e.forEach(u.nodes(),function(b){p.setNode(b,{v:b,in:0,out:0})}),e.forEach(u.edges(),function(b){var x=p.edge(b.v,b.w)||0,w=d(b),E=x+w;p.setEdge(b.v,b.w,E),v=Math.max(v,p.node(b.v).out+=w),h=Math.max(h,p.node(b.w).in+=w)});var y=e.range(v+h+3).map(function(){return new r}),g=h+1;return e.forEach(p.nodes(),function(b){c(y,g,p.node(b))}),{graph:p,buckets:y,zeroIdx:g}}function c(u,d,p){p.out?p.in?u[p.out-p.in+d].enqueue(p):u[u.length-1].enqueue(p):u[0].enqueue(p)}return xb}var _b,XP;function OY(){if(XP)return _b;XP=1;var e=yt(),t=SY();_b={run:r,undo:o};function r(i){var a=i.graph().acyclicer==="greedy"?t(i,s(i)):n(i);e.forEach(a,function(c){var u=i.edge(c);i.removeEdge(c),u.forwardName=c.name,u.reversed=!0,i.setEdge(c.w,c.v,u,e.uniqueId("rev"))});function s(c){return function(u){return c.edge(u).weight}}}function n(i){var a=[],s={},c={};function u(d){e.has(c,d)||(c[d]=!0,s[d]=!0,e.forEach(i.outEdges(d),function(p){e.has(s,p.w)?a.push(p):u(p.w)}),delete s[d])}return e.forEach(i.nodes(),u),a}function o(i){e.forEach(i.edges(),function(a){var s=i.edge(a);if(s.reversed){i.removeEdge(a);var c=s.forwardName;delete s.reversed,delete s.forwardName,i.setEdge(a.w,a.v,s,c)}})}return _b}var Eb,ZP;function ur(){if(ZP)return Eb;ZP=1;var e=yt(),t=tn().Graph;Eb={addDummyNode:r,simplify:n,asNonCompoundGraph:o,successorWeights:i,predecessorWeights:a,intersectRect:s,buildLayerMatrix:c,normalizeRanks:u,removeEmptyRanks:d,addBorderNode:p,maxRank:h,partition:v,time:y,notime:g};function r(b,x,w,E){var S;do S=e.uniqueId(E);while(b.hasNode(S));return w.dummy=x,b.setNode(S,w),S}function n(b){var x=new t().setGraph(b.graph());return e.forEach(b.nodes(),function(w){x.setNode(w,b.node(w))}),e.forEach(b.edges(),function(w){var E=x.edge(w.v,w.w)||{weight:0,minlen:1},S=b.edge(w);x.setEdge(w.v,w.w,{weight:E.weight+S.weight,minlen:Math.max(E.minlen,S.minlen)})}),x}function o(b){var x=new t({multigraph:b.isMultigraph()}).setGraph(b.graph());return e.forEach(b.nodes(),function(w){b.children(w).length||x.setNode(w,b.node(w))}),e.forEach(b.edges(),function(w){x.setEdge(w,b.edge(w))}),x}function i(b){var x=e.map(b.nodes(),function(w){var E={};return e.forEach(b.outEdges(w),function(S){E[S.w]=(E[S.w]||0)+b.edge(S).weight}),E});return e.zipObject(b.nodes(),x)}function a(b){var x=e.map(b.nodes(),function(w){var E={};return e.forEach(b.inEdges(w),function(S){E[S.v]=(E[S.v]||0)+b.edge(S).weight}),E});return e.zipObject(b.nodes(),x)}function s(b,x){var w=b.x,E=b.y,S=x.x-w,_=x.y-E,O=b.width/2,N=b.height/2;if(!S&&!_)throw new Error("Not possible to find intersection inside of the rectangle");var R,A;return Math.abs(_)*O>Math.abs(S)*N?(_<0&&(N=-N),R=N*S/_,A=N):(S<0&&(O=-O),R=O,A=O*_/S),{x:w+R,y:E+A}}function c(b){var x=e.map(e.range(h(b)+1),function(){return[]});return e.forEach(b.nodes(),function(w){var E=b.node(w),S=E.rank;e.isUndefined(S)||(x[S][E.order]=w)}),x}function u(b){var x=e.min(e.map(b.nodes(),function(w){return b.node(w).rank}));e.forEach(b.nodes(),function(w){var E=b.node(w);e.has(E,"rank")&&(E.rank-=x)})}function d(b){var x=e.min(e.map(b.nodes(),function(_){return b.node(_).rank})),w=[];e.forEach(b.nodes(),function(_){var O=b.node(_).rank-x;w[O]||(w[O]=[]),w[O].push(_)});var E=0,S=b.graph().nodeRankFactor;e.forEach(w,function(_,O){e.isUndefined(_)&&O%S!==0?--E:E&&e.forEach(_,function(N){b.node(N).rank+=E})})}function p(b,x,w,E){var S={width:0,height:0};return arguments.length>=4&&(S.rank=w,S.order=E),r(b,"border",S,x)}function h(b){return e.max(e.map(b.nodes(),function(x){var w=b.node(x).rank;if(!e.isUndefined(w))return w}))}function v(b,x){var w={lhs:[],rhs:[]};return e.forEach(b,function(E){x(E)?w.lhs.push(E):w.rhs.push(E)}),w}function y(b,x){var w=e.now();try{return x()}finally{console.log(b+" time: "+(e.now()-w)+"ms")}}function g(b,x){return x()}return Eb}var Sb,JP;function CY(){if(JP)return Sb;JP=1;var e=yt(),t=ur();Sb={run:r,undo:o};function r(i){i.graph().dummyChains=[],e.forEach(i.edges(),function(a){n(i,a)})}function n(i,a){var s=a.v,c=i.node(s).rank,u=a.w,d=i.node(u).rank,p=a.name,h=i.edge(a),v=h.labelRank;if(d!==c+1){i.removeEdge(a);var y,g,b;for(b=0,++c;c<d;++b,++c)h.points=[],g={width:0,height:0,edgeLabel:h,edgeObj:a,rank:c},y=t.addDummyNode(i,"edge",g,"_d"),c===v&&(g.width=h.width,g.height=h.height,g.dummy="edge-label",g.labelpos=h.labelpos),i.setEdge(s,y,{weight:h.weight},p),b===0&&i.graph().dummyChains.push(y),s=y;i.setEdge(s,u,{weight:h.weight},p)}}function o(i){e.forEach(i.graph().dummyChains,function(a){var s=i.node(a),c=s.edgeLabel,u;for(i.setEdge(s.edgeObj,c);s.dummy;)u=i.successors(a)[0],i.removeNode(a),c.points.push({x:s.x,y:s.y}),s.dummy==="edge-label"&&(c.x=s.x,c.y=s.y,c.width=s.width,c.height=s.height),a=u,s=i.node(a)})}return Sb}var Ob,QP;function uu(){if(QP)return Ob;QP=1;var e=yt();Ob={longestPath:t,slack:r};function t(n){var o={};function i(a){var s=n.node(a);if(e.has(o,a))return s.rank;o[a]=!0;var c=e.min(e.map(n.outEdges(a),function(u){return i(u.w)-n.edge(u).minlen}));return(c===Number.POSITIVE_INFINITY||c===void 0||c===null)&&(c=0),s.rank=c}e.forEach(n.sources(),i)}function r(n,o){return n.node(o.w).rank-n.node(o.v).rank-n.edge(o).minlen}return Ob}var Cb,eT;function IL(){if(eT)return Cb;eT=1;var e=yt(),t=tn().Graph,r=uu().slack;Cb=n;function n(s){var c=new t({directed:!1}),u=s.nodes()[0],d=s.nodeCount();c.setNode(u,{});for(var p,h;o(c,s)<d;)p=i(c,s),h=c.hasNode(p.v)?r(s,p):-r(s,p),a(c,s,h);return c}function o(s,c){function u(d){e.forEach(c.nodeEdges(d),function(p){var h=p.v,v=d===h?p.w:h;!s.hasNode(v)&&!r(c,p)&&(s.setNode(v,{}),s.setEdge(d,v,{}),u(v))})}return e.forEach(s.nodes(),u),s.nodeCount()}function i(s,c){return e.minBy(c.edges(),function(u){if(s.hasNode(u.v)!==s.hasNode(u.w))return r(c,u)})}function a(s,c,u){e.forEach(s.nodes(),function(d){c.node(d).rank+=u})}return Cb}var Ib,tT;function IY(){if(tT)return Ib;tT=1;var e=yt(),t=IL(),r=uu().slack,n=uu().longestPath,o=tn().alg.preorder,i=tn().alg.postorder,a=ur().simplify;Ib=s,s.initLowLimValues=p,s.initCutValues=c,s.calcCutValue=d,s.leaveEdge=v,s.enterEdge=y,s.exchangeEdges=g;function s(E){E=a(E),n(E);var S=t(E);p(S),c(S,E);for(var _,O;_=v(S);)O=y(S,E,_),g(S,E,_,O)}function c(E,S){var _=i(E,E.nodes());_=_.slice(0,_.length-1),e.forEach(_,function(O){u(E,S,O)})}function u(E,S,_){var O=E.node(_),N=O.parent;E.edge(_,N).cutvalue=d(E,S,_)}function d(E,S,_){var O=E.node(_),N=O.parent,R=!0,A=S.edge(_,N),D=0;return A||(R=!1,A=S.edge(N,_)),D=A.weight,e.forEach(S.nodeEdges(_),function(B){var j=B.v===_,M=j?B.w:B.v;if(M!==N){var P=j===R,V=S.edge(B).weight;if(D+=P?V:-V,x(E,_,M)){var q=E.edge(_,M).cutvalue;D+=P?-q:q}}}),D}function p(E,S){arguments.length<2&&(S=E.nodes()[0]),h(E,{},1,S)}function h(E,S,_,O,N){var R=_,A=E.node(O);return S[O]=!0,e.forEach(E.neighbors(O),function(D){e.has(S,D)||(_=h(E,S,_,D,O))}),A.low=R,A.lim=_++,N?A.parent=N:delete A.parent,_}function v(E){return e.find(E.edges(),function(S){return E.edge(S).cutvalue<0})}function y(E,S,_){var O=_.v,N=_.w;S.hasEdge(O,N)||(O=_.w,N=_.v);var R=E.node(O),A=E.node(N),D=R,B=!1;R.lim>A.lim&&(D=A,B=!0);var j=e.filter(S.edges(),function(M){return B===w(E,E.node(M.v),D)&&B!==w(E,E.node(M.w),D)});return e.minBy(j,function(M){return r(S,M)})}function g(E,S,_,O){var N=_.v,R=_.w;E.removeEdge(N,R),E.setEdge(O.v,O.w,{}),p(E),c(E,S),b(E,S)}function b(E,S){var _=e.find(E.nodes(),function(N){return!S.node(N).parent}),O=o(E,_);O=O.slice(1),e.forEach(O,function(N){var R=E.node(N).parent,A=S.edge(N,R),D=!1;A||(A=S.edge(R,N),D=!0),S.node(N).rank=S.node(R).rank+(D?A.minlen:-A.minlen)})}function x(E,S,_){return E.hasEdge(S,_)}function w(E,S,_){return _.low<=S.lim&&S.lim<=_.lim}return Ib}var Rb,rT;function RY(){if(rT)return Rb;rT=1;var e=uu(),t=e.longestPath,r=IL(),n=IY();Rb=o;function o(c){switch(c.graph().ranker){case"network-simplex":s(c);break;case"tight-tree":a(c);break;case"longest-path":i(c);break;default:s(c)}}var i=t;function a(c){t(c),r(c)}function s(c){n(c)}return Rb}var Nb,nT;function NY(){if(nT)return Nb;nT=1;var e=yt();Nb=t;function t(o){var i=n(o);e.forEach(o.graph().dummyChains,function(a){for(var s=o.node(a),c=s.edgeObj,u=r(o,i,c.v,c.w),d=u.path,p=u.lca,h=0,v=d[h],y=!0;a!==c.w;){if(s=o.node(a),y){for(;(v=d[h])!==p&&o.node(v).maxRank<s.rank;)h++;v===p&&(y=!1)}if(!y){for(;h<d.length-1&&o.node(v=d[h+1]).minRank<=s.rank;)h++;v=d[h]}o.setParent(a,v),a=o.successors(a)[0]}})}function r(o,i,a,s){var c=[],u=[],d=Math.min(i[a].low,i[s].low),p=Math.max(i[a].lim,i[s].lim),h,v;h=a;do h=o.parent(h),c.push(h);while(h&&(i[h].low>d||p>i[h].lim));for(v=h,h=s;(h=o.parent(h))!==v;)u.push(h);return{path:c.concat(u.reverse()),lca:v}}function n(o){var i={},a=0;function s(c){var u=a;e.forEach(o.children(c),s),i[c]={low:u,lim:a++}}return e.forEach(o.children(),s),i}return Nb}var Pb,oT;function PY(){if(oT)return Pb;oT=1;var e=yt(),t=ur();Pb={run:r,cleanup:a};function r(s){var c=t.addDummyNode(s,"root",{},"_root"),u=o(s),d=e.max(e.values(u))-1,p=2*d+1;s.graph().nestingRoot=c,e.forEach(s.edges(),function(v){s.edge(v).minlen*=p});var h=i(s)+1;e.forEach(s.children(),function(v){n(s,c,p,h,d,u,v)}),s.graph().nodeRankFactor=p}function n(s,c,u,d,p,h,v){var y=s.children(v);if(!y.length){v!==c&&s.setEdge(c,v,{weight:0,minlen:u});return}var g=t.addBorderNode(s,"_bt"),b=t.addBorderNode(s,"_bb"),x=s.node(v);s.setParent(g,v),x.borderTop=g,s.setParent(b,v),x.borderBottom=b,e.forEach(y,function(w){n(s,c,u,d,p,h,w);var E=s.node(w),S=E.borderTop?E.borderTop:w,_=E.borderBottom?E.borderBottom:w,O=E.borderTop?d:2*d,N=S!==_?1:p-h[v]+1;s.setEdge(g,S,{weight:O,minlen:N,nestingEdge:!0}),s.setEdge(_,b,{weight:O,minlen:N,nestingEdge:!0})}),s.parent(v)||s.setEdge(c,g,{weight:0,minlen:p+h[v]})}function o(s){var c={};function u(d,p){var h=s.children(d);h&&h.length&&e.forEach(h,function(v){u(v,p+1)}),c[d]=p}return e.forEach(s.children(),function(d){u(d,1)}),c}function i(s){return e.reduce(s.edges(),function(c,u){return c+s.edge(u).weight},0)}function a(s){var c=s.graph();s.removeNode(c.nestingRoot),delete c.nestingRoot,e.forEach(s.edges(),function(u){var d=s.edge(u);d.nestingEdge&&s.removeEdge(u)})}return Pb}var Tb,iT;function TY(){if(iT)return Tb;iT=1;var e=yt(),t=ur();Tb=r;function r(o){function i(a){var s=o.children(a),c=o.node(a);if(s.length&&e.forEach(s,i),e.has(c,"minRank")){c.borderLeft=[],c.borderRight=[];for(var u=c.minRank,d=c.maxRank+1;u<d;++u)n(o,"borderLeft","_bl",a,c,u),n(o,"borderRight","_br",a,c,u)}}e.forEach(o.children(),i)}function n(o,i,a,s,c,u){var d={width:0,height:0,rank:u,borderType:i},p=c[i][u-1],h=t.addDummyNode(o,"border",d,a);c[i][u]=h,o.setParent(h,s),p&&o.setEdge(p,h,{weight:1})}return Tb}var Ab,aT;function AY(){if(aT)return Ab;aT=1;var e=yt();Ab={adjust:t,undo:r};function t(u){var d=u.graph().rankdir.toLowerCase();(d==="lr"||d==="rl")&&n(u)}function r(u){var d=u.graph().rankdir.toLowerCase();(d==="bt"||d==="rl")&&i(u),(d==="lr"||d==="rl")&&(s(u),n(u))}function n(u){e.forEach(u.nodes(),function(d){o(u.node(d))}),e.forEach(u.edges(),function(d){o(u.edge(d))})}function o(u){var d=u.width;u.width=u.height,u.height=d}function i(u){e.forEach(u.nodes(),function(d){a(u.node(d))}),e.forEach(u.edges(),function(d){var p=u.edge(d);e.forEach(p.points,a),e.has(p,"y")&&a(p)})}function a(u){u.y=-u.y}function s(u){e.forEach(u.nodes(),function(d){c(u.node(d))}),e.forEach(u.edges(),function(d){var p=u.edge(d);e.forEach(p.points,c),e.has(p,"x")&&c(p)})}function c(u){var d=u.x;u.x=u.y,u.y=d}return Ab}var kb,sT;function kY(){if(sT)return kb;sT=1;var e=yt();kb=t;function t(r){var n={},o=e.filter(r.nodes(),function(u){return!r.children(u).length}),i=e.max(e.map(o,function(u){return r.node(u).rank})),a=e.map(e.range(i+1),function(){return[]});function s(u){if(!e.has(n,u)){n[u]=!0;var d=r.node(u);a[d.rank].push(u),e.forEach(r.successors(u),s)}}var c=e.sortBy(o,function(u){return r.node(u).rank});return e.forEach(c,s),a}return kb}var Mb,lT;function MY(){if(lT)return Mb;lT=1;var e=yt();Mb=t;function t(n,o){for(var i=0,a=1;a<o.length;++a)i+=r(n,o[a-1],o[a]);return i}function r(n,o,i){for(var a=e.zipObject(i,e.map(i,function(h,v){return v})),s=e.flatten(e.map(o,function(h){return e.sortBy(e.map(n.outEdges(h),function(v){return{pos:a[v.w],weight:n.edge(v).weight}}),"pos")}),!0),c=1;c<i.length;)c<<=1;var u=2*c-1;c-=1;var d=e.map(new Array(u),function(){return 0}),p=0;return e.forEach(s.forEach(function(h){var v=h.pos+c;d[v]+=h.weight;for(var y=0;v>0;)v%2&&(y+=d[v+1]),v=v-1>>1,d[v]+=h.weight;p+=h.weight*y})),p}return Mb}var Db,cT;function DY(){if(cT)return Db;cT=1;var e=yt();Db=t;function t(r,n){return e.map(n,function(o){var i=r.inEdges(o);if(i.length){var a=e.reduce(i,function(s,c){var u=r.edge(c),d=r.node(c.v);return{sum:s.sum+u.weight*d.order,weight:s.weight+u.weight}},{sum:0,weight:0});return{v:o,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:o}})}return Db}var jb,uT;function jY(){if(uT)return jb;uT=1;var e=yt();jb=t;function t(o,i){var a={};e.forEach(o,function(c,u){var d=a[c.v]={indegree:0,in:[],out:[],vs:[c.v],i:u};e.isUndefined(c.barycenter)||(d.barycenter=c.barycenter,d.weight=c.weight)}),e.forEach(i.edges(),function(c){var u=a[c.v],d=a[c.w];!e.isUndefined(u)&&!e.isUndefined(d)&&(d.indegree++,u.out.push(a[c.w]))});var s=e.filter(a,function(c){return!c.indegree});return r(s)}function r(o){var i=[];function a(u){return function(d){d.merged||(e.isUndefined(d.barycenter)||e.isUndefined(u.barycenter)||d.barycenter>=u.barycenter)&&n(u,d)}}function s(u){return function(d){d.in.push(u),--d.indegree===0&&o.push(d)}}for(;o.length;){var c=o.pop();i.push(c),e.forEach(c.in.reverse(),a(c)),e.forEach(c.out,s(c))}return e.map(e.filter(i,function(u){return!u.merged}),function(u){return e.pick(u,["vs","i","barycenter","weight"])})}function n(o,i){var a=0,s=0;o.weight&&(a+=o.barycenter*o.weight,s+=o.weight),i.weight&&(a+=i.barycenter*i.weight,s+=i.weight),o.vs=i.vs.concat(o.vs),o.barycenter=a/s,o.weight=s,o.i=Math.min(i.i,o.i),i.merged=!0}return jb}var qb,dT;function qY(){if(dT)return qb;dT=1;var e=yt(),t=ur();qb=r;function r(i,a){var s=t.partition(i,function(g){return e.has(g,"barycenter")}),c=s.lhs,u=e.sortBy(s.rhs,function(g){return-g.i}),d=[],p=0,h=0,v=0;c.sort(o(!!a)),v=n(d,u,v),e.forEach(c,function(g){v+=g.vs.length,d.push(g.vs),p+=g.barycenter*g.weight,h+=g.weight,v=n(d,u,v)});var y={vs:e.flatten(d,!0)};return h&&(y.barycenter=p/h,y.weight=h),y}function n(i,a,s){for(var c;a.length&&(c=e.last(a)).i<=s;)a.pop(),i.push(c.vs),s++;return s}function o(i){return function(a,s){return a.barycenter<s.barycenter?-1:a.barycenter>s.barycenter?1:i?s.i-a.i:a.i-s.i}}return qb}var Lb,fT;function LY(){if(fT)return Lb;fT=1;var e=yt(),t=DY(),r=jY(),n=qY();Lb=o;function o(s,c,u,d){var p=s.children(c),h=s.node(c),v=h?h.borderLeft:void 0,y=h?h.borderRight:void 0,g={};v&&(p=e.filter(p,function(_){return _!==v&&_!==y}));var b=t(s,p);e.forEach(b,function(_){if(s.children(_.v).length){var O=o(s,_.v,u,d);g[_.v]=O,e.has(O,"barycenter")&&a(_,O)}});var x=r(b,u);i(x,g);var w=n(x,d);if(v&&(w.vs=e.flatten([v,w.vs,y],!0),s.predecessors(v).length)){var E=s.node(s.predecessors(v)[0]),S=s.node(s.predecessors(y)[0]);e.has(w,"barycenter")||(w.barycenter=0,w.weight=0),w.barycenter=(w.barycenter*w.weight+E.order+S.order)/(w.weight+2),w.weight+=2}return w}function i(s,c){e.forEach(s,function(u){u.vs=e.flatten(u.vs.map(function(d){return c[d]?c[d].vs:d}),!0)})}function a(s,c){e.isUndefined(s.barycenter)?(s.barycenter=c.barycenter,s.weight=c.weight):(s.barycenter=(s.barycenter*s.weight+c.barycenter*c.weight)/(s.weight+c.weight),s.weight+=c.weight)}return Lb}var zb,pT;function zY(){if(pT)return zb;pT=1;var e=yt(),t=tn().Graph;zb=r;function r(o,i,a){var s=n(o),c=new t({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(u){return o.node(u)});return e.forEach(o.nodes(),function(u){var d=o.node(u),p=o.parent(u);(d.rank===i||d.minRank<=i&&i<=d.maxRank)&&(c.setNode(u),c.setParent(u,p||s),e.forEach(o[a](u),function(h){var v=h.v===u?h.w:h.v,y=c.edge(v,u),g=e.isUndefined(y)?0:y.weight;c.setEdge(v,u,{weight:o.edge(h).weight+g})}),e.has(d,"minRank")&&c.setNode(u,{borderLeft:d.borderLeft[i],borderRight:d.borderRight[i]}))}),c}function n(o){for(var i;o.hasNode(i=e.uniqueId("_root")););return i}return zb}var Bb,hT;function BY(){if(hT)return Bb;hT=1;var e=yt();Bb=t;function t(r,n,o){var i={},a;e.forEach(o,function(s){for(var c=r.parent(s),u,d;c;){if(u=r.parent(c),u?(d=i[u],i[u]=c):(d=a,a=c),d&&d!==c){n.setEdge(d,c);return}c=u}})}return Bb}var Fb,vT;function FY(){if(vT)return Fb;vT=1;var e=yt(),t=kY(),r=MY(),n=LY(),o=zY(),i=BY(),a=tn().Graph,s=ur();Fb=c;function c(h){var v=s.maxRank(h),y=u(h,e.range(1,v+1),"inEdges"),g=u(h,e.range(v-1,-1,-1),"outEdges"),b=t(h);p(h,b);for(var x=Number.POSITIVE_INFINITY,w,E=0,S=0;S<4;++E,++S){d(E%2?y:g,E%4>=2),b=s.buildLayerMatrix(h);var _=r(h,b);_<x&&(S=0,w=e.cloneDeep(b),x=_)}p(h,w)}function u(h,v,y){return e.map(v,function(g){return o(h,g,y)})}function d(h,v){var y=new a;e.forEach(h,function(g){var b=g.graph().root,x=n(g,b,y,v);e.forEach(x.vs,function(w,E){g.node(w).order=E}),i(g,y,x.vs)})}function p(h,v){e.forEach(v,function(y){e.forEach(y,function(g,b){h.node(g).order=b})})}return Fb}var $b,gT;function $Y(){if(gT)return $b;gT=1;var e=yt(),t=tn().Graph,r=ur();$b={positionX:y,findType1Conflicts:n,findType2Conflicts:o,addConflict:a,hasConflict:s,verticalAlignment:c,horizontalCompaction:u,alignCoordinates:h,findSmallestWidthAlignment:p,balance:v};function n(x,w){var E={};function S(_,O){var N=0,R=0,A=_.length,D=e.last(O);return e.forEach(O,function(B,j){var M=i(x,B),P=M?x.node(M).order:A;(M||B===D)&&(e.forEach(O.slice(R,j+1),function(V){e.forEach(x.predecessors(V),function(q){var G=x.node(q),W=G.order;(W<N||P<W)&&!(G.dummy&&x.node(V).dummy)&&a(E,q,V)})}),R=j+1,N=P)}),O}return e.reduce(w,S),E}function o(x,w){var E={};function S(O,N,R,A,D){var B;e.forEach(e.range(N,R),function(j){B=O[j],x.node(B).dummy&&e.forEach(x.predecessors(B),function(M){var P=x.node(M);P.dummy&&(P.order<A||P.order>D)&&a(E,M,B)})})}function _(O,N){var R=-1,A,D=0;return e.forEach(N,function(B,j){if(x.node(B).dummy==="border"){var M=x.predecessors(B);M.length&&(A=x.node(M[0]).order,S(N,D,j,R,A),D=j,R=A)}S(N,D,N.length,A,O.length)}),N}return e.reduce(w,_),E}function i(x,w){if(x.node(w).dummy)return e.find(x.predecessors(w),function(E){return x.node(E).dummy})}function a(x,w,E){if(w>E){var S=w;w=E,E=S}var _=x[w];_||(x[w]=_={}),_[E]=!0}function s(x,w,E){if(w>E){var S=w;w=E,E=S}return e.has(x[w],E)}function c(x,w,E,S){var _={},O={},N={};return e.forEach(w,function(R){e.forEach(R,function(A,D){_[A]=A,O[A]=A,N[A]=D})}),e.forEach(w,function(R){var A=-1;e.forEach(R,function(D){var B=S(D);if(B.length){B=e.sortBy(B,function(q){return N[q]});for(var j=(B.length-1)/2,M=Math.floor(j),P=Math.ceil(j);M<=P;++M){var V=B[M];O[D]===D&&A<N[V]&&!s(E,D,V)&&(O[V]=D,O[D]=_[D]=_[V],A=N[V])}}})}),{root:_,align:O}}function u(x,w,E,S,_){var O={},N=d(x,w,E,_),R=_?"borderLeft":"borderRight";function A(j,M){for(var P=N.nodes(),V=P.pop(),q={};V;)q[V]?j(V):(q[V]=!0,P.push(V),P=P.concat(M(V))),V=P.pop()}function D(j){O[j]=N.inEdges(j).reduce(function(M,P){return Math.max(M,O[P.v]+N.edge(P))},0)}function B(j){var M=N.outEdges(j).reduce(function(V,q){return Math.min(V,O[q.w]-N.edge(q))},Number.POSITIVE_INFINITY),P=x.node(j);M!==Number.POSITIVE_INFINITY&&P.borderType!==R&&(O[j]=Math.max(O[j],M))}return A(D,N.predecessors.bind(N)),A(B,N.successors.bind(N)),e.forEach(S,function(j){O[j]=O[E[j]]}),O}function d(x,w,E,S){var _=new t,O=x.graph(),N=g(O.nodesep,O.edgesep,S);return e.forEach(w,function(R){var A;e.forEach(R,function(D){var B=E[D];if(_.setNode(B),A){var j=E[A],M=_.edge(j,B);_.setEdge(j,B,Math.max(N(x,D,A),M||0))}A=D})}),_}function p(x,w){return e.minBy(e.values(w),function(E){var S=Number.NEGATIVE_INFINITY,_=Number.POSITIVE_INFINITY;return e.forIn(E,function(O,N){var R=b(x,N)/2;S=Math.max(O+R,S),_=Math.min(O-R,_)}),S-_})}function h(x,w){var E=e.values(w),S=e.min(E),_=e.max(E);e.forEach(["u","d"],function(O){e.forEach(["l","r"],function(N){var R=O+N,A=x[R],D;if(A!==w){var B=e.values(A);D=N==="l"?S-e.min(B):_-e.max(B),D&&(x[R]=e.mapValues(A,function(j){return j+D}))}})})}function v(x,w){return e.mapValues(x.ul,function(E,S){if(w)return x[w.toLowerCase()][S];var _=e.sortBy(e.map(x,S));return(_[1]+_[2])/2})}function y(x){var w=r.buildLayerMatrix(x),E=e.merge(n(x,w),o(x,w)),S={},_;e.forEach(["u","d"],function(N){_=N==="u"?w:e.values(w).reverse(),e.forEach(["l","r"],function(R){R==="r"&&(_=e.map(_,function(j){return e.values(j).reverse()}));var A=(N==="u"?x.predecessors:x.successors).bind(x),D=c(x,_,E,A),B=u(x,_,D.root,D.align,R==="r");R==="r"&&(B=e.mapValues(B,function(j){return-j})),S[N+R]=B})});var O=p(x,S);return h(S,O),v(S,x.graph().align)}function g(x,w,E){return function(S,_,O){var N=S.node(_),R=S.node(O),A=0,D;if(A+=N.width/2,e.has(N,"labelpos"))switch(N.labelpos.toLowerCase()){case"l":D=-N.width/2;break;case"r":D=N.width/2;break}if(D&&(A+=E?D:-D),D=0,A+=(N.dummy?w:x)/2,A+=(R.dummy?w:x)/2,A+=R.width/2,e.has(R,"labelpos"))switch(R.labelpos.toLowerCase()){case"l":D=R.width/2;break;case"r":D=-R.width/2;break}return D&&(A+=E?D:-D),D=0,A}}function b(x,w){return x.node(w).width}return $b}var Hb,mT;function HY(){if(mT)return Hb;mT=1;var e=yt(),t=ur(),r=$Y().positionX;Hb=n;function n(i){i=t.asNonCompoundGraph(i),o(i),e.forEach(r(i),function(a,s){i.node(s).x=a})}function o(i){var a=t.buildLayerMatrix(i),s=i.graph().ranksep,c=0;e.forEach(a,function(u){var d=e.max(e.map(u,function(p){return i.node(p).height}));e.forEach(u,function(p){i.node(p).y=c+d/2}),c+=d+s})}return Hb}var Vb,bT;function VY(){if(bT)return Vb;bT=1;var e=yt(),t=OY(),r=CY(),n=RY(),o=ur().normalizeRanks,i=NY(),a=ur().removeEmptyRanks,s=PY(),c=TY(),u=AY(),d=FY(),p=HY(),h=ur(),v=tn().Graph;Vb=y;function y($,K){var Z=K&&K.debugTiming?h.time:h.notime;Z("layout",function(){var H=Z(" buildLayoutGraph",function(){return A($)});Z(" runLayout",function(){g(H,Z)}),Z(" updateInputGraph",function(){b($,H)})})}function g($,K){K(" makeSpaceForEdgeLabels",function(){D($)}),K(" removeSelfEdges",function(){Q($)}),K(" acyclic",function(){t.run($)}),K(" nestingGraph.run",function(){s.run($)}),K(" rank",function(){n(h.asNonCompoundGraph($))}),K(" injectEdgeLabelProxies",function(){B($)}),K(" removeEmptyRanks",function(){a($)}),K(" nestingGraph.cleanup",function(){s.cleanup($)}),K(" normalizeRanks",function(){o($)}),K(" assignRankMinMax",function(){j($)}),K(" removeEdgeLabelProxies",function(){M($)}),K(" normalize.run",function(){r.run($)}),K(" parentDummyChains",function(){i($)}),K(" addBorderSegments",function(){c($)}),K(" order",function(){d($)}),K(" insertSelfEdges",function(){z($)}),K(" adjustCoordinateSystem",function(){u.adjust($)}),K(" position",function(){p($)}),K(" positionSelfEdges",function(){U($)}),K(" removeBorderNodes",function(){W($)}),K(" normalize.undo",function(){r.undo($)}),K(" fixupEdgeLabelCoords",function(){q($)}),K(" undoCoordinateSystem",function(){u.undo($)}),K(" translateGraph",function(){P($)}),K(" assignNodeIntersects",function(){V($)}),K(" reversePoints",function(){G($)}),K(" acyclic.undo",function(){t.undo($)})}function b($,K){e.forEach($.nodes(),function(Z){var H=$.node(Z),Y=K.node(Z);H&&(H.x=Y.x,H.y=Y.y,K.children(Z).length&&(H.width=Y.width,H.height=Y.height))}),e.forEach($.edges(),function(Z){var H=$.edge(Z),Y=K.edge(Z);H.points=Y.points,e.has(Y,"x")&&(H.x=Y.x,H.y=Y.y)}),$.graph().width=K.graph().width,$.graph().height=K.graph().height}var x=["nodesep","edgesep","ranksep","marginx","marginy"],w={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},E=["acyclicer","ranker","rankdir","align"],S=["width","height"],_={width:0,height:0},O=["minlen","weight","width","height","labeloffset"],N={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},R=["labelpos"];function A($){var K=new v({multigraph:!0,compound:!0}),Z=te($.graph());return K.setGraph(e.merge({},w,ie(Z,x),e.pick(Z,E))),e.forEach($.nodes(),function(H){var Y=te($.node(H));K.setNode(H,e.defaults(ie(Y,S),_)),K.setParent(H,$.parent(H))}),e.forEach($.edges(),function(H){var Y=te($.edge(H));K.setEdge(H,e.merge({},N,ie(Y,O),e.pick(Y,R)))}),K}function D($){var K=$.graph();K.ranksep/=2,e.forEach($.edges(),function(Z){var H=$.edge(Z);H.minlen*=2,H.labelpos.toLowerCase()!=="c"&&(K.rankdir==="TB"||K.rankdir==="BT"?H.width+=H.labeloffset:H.height+=H.labeloffset)})}function B($){e.forEach($.edges(),function(K){var Z=$.edge(K);if(Z.width&&Z.height){var H=$.node(K.v),Y=$.node(K.w),oe={rank:(Y.rank-H.rank)/2+H.rank,e:K};h.addDummyNode($,"edge-proxy",oe,"_ep")}})}function j($){var K=0;e.forEach($.nodes(),function(Z){var H=$.node(Z);H.borderTop&&(H.minRank=$.node(H.borderTop).rank,H.maxRank=$.node(H.borderBottom).rank,K=e.max(K,H.maxRank))}),$.graph().maxRank=K}function M($){e.forEach($.nodes(),function(K){var Z=$.node(K);Z.dummy==="edge-proxy"&&($.edge(Z.e).labelRank=Z.rank,$.removeNode(K))})}function P($){var K=Number.POSITIVE_INFINITY,Z=0,H=Number.POSITIVE_INFINITY,Y=0,oe=$.graph(),re=oe.marginx||0,se=oe.marginy||0;function ee(we){var ve=we.x,Ee=we.y,pe=we.width,ce=we.height;K=Math.min(K,ve-pe/2),Z=Math.max(Z,ve+pe/2),H=Math.min(H,Ee-ce/2),Y=Math.max(Y,Ee+ce/2)}e.forEach($.nodes(),function(we){ee($.node(we))}),e.forEach($.edges(),function(we){var ve=$.edge(we);e.has(ve,"x")&&ee(ve)}),K-=re,H-=se,e.forEach($.nodes(),function(we){var ve=$.node(we);ve.x-=K,ve.y-=H}),e.forEach($.edges(),function(we){var ve=$.edge(we);e.forEach(ve.points,function(Ee){Ee.x-=K,Ee.y-=H}),e.has(ve,"x")&&(ve.x-=K),e.has(ve,"y")&&(ve.y-=H)}),oe.width=Z-K+re,oe.height=Y-H+se}function V($){e.forEach($.edges(),function(K){var Z=$.edge(K),H=$.node(K.v),Y=$.node(K.w),oe,re;Z.points?(oe=Z.points[0],re=Z.points[Z.points.length-1]):(Z.points=[],oe=Y,re=H),Z.points.unshift(h.intersectRect(H,oe)),Z.points.push(h.intersectRect(Y,re))})}function q($){e.forEach($.edges(),function(K){var Z=$.edge(K);if(e.has(Z,"x"))switch((Z.labelpos==="l"||Z.labelpos==="r")&&(Z.width-=Z.labeloffset),Z.labelpos){case"l":Z.x-=Z.width/2+Z.labeloffset;break;case"r":Z.x+=Z.width/2+Z.labeloffset;break}})}function G($){e.forEach($.edges(),function(K){var Z=$.edge(K);Z.reversed&&Z.points.reverse()})}function W($){e.forEach($.nodes(),function(K){if($.children(K).length){var Z=$.node(K),H=$.node(Z.borderTop),Y=$.node(Z.borderBottom),oe=$.node(e.last(Z.borderLeft)),re=$.node(e.last(Z.borderRight));Z.width=Math.abs(re.x-oe.x),Z.height=Math.abs(Y.y-H.y),Z.x=oe.x+Z.width/2,Z.y=H.y+Z.height/2}}),e.forEach($.nodes(),function(K){$.node(K).dummy==="border"&&$.removeNode(K)})}function Q($){e.forEach($.edges(),function(K){if(K.v===K.w){var Z=$.node(K.v);Z.selfEdges||(Z.selfEdges=[]),Z.selfEdges.push({e:K,label:$.edge(K)}),$.removeEdge(K)}})}function z($){var K=h.buildLayerMatrix($);e.forEach(K,function(Z){var H=0;e.forEach(Z,function(Y,oe){var re=$.node(Y);re.order=oe+H,e.forEach(re.selfEdges,function(se){h.addDummyNode($,"selfedge",{width:se.label.width,height:se.label.height,rank:re.rank,order:oe+ ++H,e:se.e,label:se.label},"_se")}),delete re.selfEdges})})}function U($){e.forEach($.nodes(),function(K){var Z=$.node(K);if(Z.dummy==="selfedge"){var H=$.node(Z.e.v),Y=H.x+H.width/2,oe=H.y,re=Z.x-Y,se=H.height/2;$.setEdge(Z.e,Z.label),$.removeNode(K),Z.label.points=[{x:Y+2*re/3,y:oe-se},{x:Y+5*re/6,y:oe-se},{x:Y+re,y:oe},{x:Y+5*re/6,y:oe+se},{x:Y+2*re/3,y:oe+se}],Z.label.x=Z.x,Z.label.y=Z.y}})}function ie($,K){return e.mapValues(e.pick($,K),Number)}function te($){var K={};return e.forEach($,function(Z,H){K[H.toLowerCase()]=Z}),K}return Vb}var Wb,yT;function WY(){if(yT)return Wb;yT=1;var e=yt(),t=ur(),r=tn().Graph;Wb={debugOrdering:n};function n(o){var i=t.buildLayerMatrix(o),a=new r({compound:!0,multigraph:!0}).setGraph({});return e.forEach(o.nodes(),function(s){a.setNode(s,{label:s}),a.setParent(s,"layer"+o.node(s).rank)}),e.forEach(o.edges(),function(s){a.setEdge(s.v,s.w,{},s.name)}),e.forEach(i,function(s,c){var u="layer"+c;a.setNode(u,{rank:"same"}),e.reduce(s,function(d,p){return a.setEdge(d,p,{style:"invis"}),p})}),a}return Wb}var Ub,wT;function UY(){return wT||(wT=1,Ub="0.8.5"),Ub}var Gb,xT;function GY(){return xT||(xT=1,Gb={graphlib:tn(),layout:VY(),debug:WY(),util:{time:ur().time,notime:ur().notime},version:UY()}),Gb}var KY=GY();const _T=wo(KY);function YY(e){let t;const r=new Set,n=(u,d)=>{const p=typeof u=="function"?u(t):u;if(p!==t){const h=t;t=d?p:Object.assign({},t,p),r.forEach(v=>v(t,h))}},o=()=>t,i=(u,d=o,p=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let h=d(t);function v(){const y=d(t);if(!p(h,y)){const g=h;u(h=y,g)}}return r.add(v),()=>r.delete(v)},c={setState:n,getState:o,subscribe:(u,d,p)=>d||p?i(u,d,p):(r.add(u),()=>r.delete(u)),destroy:()=>r.clear()};return t=e(n,o,c),c}const XY=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),ET=XY?T.useEffect:T.useLayoutEffect;function ZY(e){const t=typeof e=="function"?YY(e):e,r=(n=t.getState,o=Object.is)=>{const[,i]=T.useReducer(b=>b+1,0),a=t.getState(),s=T.useRef(a),c=T.useRef(n),u=T.useRef(o),d=T.useRef(!1),p=T.useRef();p.current===void 0&&(p.current=n(a));let h,v=!1;(s.current!==a||c.current!==n||u.current!==o||d.current)&&(h=n(a),v=!o(p.current,h)),ET(()=>{v&&(p.current=h),s.current=a,c.current=n,u.current=o,d.current=!1});const y=T.useRef(a);ET(()=>{const b=()=>{try{const w=t.getState(),E=c.current(w);u.current(p.current,E)||(s.current=w,p.current=E,i())}catch{d.current=!0,i()}},x=t.subscribe(b);return t.getState()!==y.current&&b(),x},[]);const g=v?h:p.current;return T.useDebugValue(g),g};return Object.assign(r,t),r[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const n=[r,t];return{next(){const o=n.length<=0;return{value:n.shift(),done:o}}}},r}function JY(){const e=T.createContext(void 0);return{Provider:({initialStore:o,createStore:i,children:a})=>{const s=T.useRef();return s.current||(o&&(console.warn("Provider initialStore is deprecated and will be removed in the next version."),i||(i=()=>o)),s.current=i()),T.createElement(e.Provider,{value:s.current},a)},useStore:(o,i=Object.is)=>{const a=T.useContext(e);if(!a)throw new Error("Seems like you have not used zustand provider as an ancestor.");return a(o,i)},useStoreApi:()=>{const o=T.useContext(e);if(!o)throw new Error("Seems like you have not used zustand provider as an ancestor.");return T.useMemo(()=>({getState:o.getState,setState:o.setState,subscribe:o.subscribe,destroy:o.destroy}),[o])}}}var QY={value:()=>{}};function ld(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new Yc(r)}function Yc(e){this._=e}function eX(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",o=r.indexOf(".");if(o>=0&&(n=r.slice(o+1),r=r.slice(0,o)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Yc.prototype=ld.prototype={constructor:Yc,on:function(e,t){var r=this._,n=eX(e+"",r),o,i=-1,a=n.length;if(arguments.length<2){for(;++i<a;)if((o=(e=n[i]).type)&&(o=tX(r[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<a;)if(o=(e=n[i]).type)r[o]=ST(r[o],e.name,t);else if(t==null)for(o in r)r[o]=ST(r[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Yc(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var r=new Array(o),n=0,o,i;n<o;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],n=0,o=i.length;n<o;++n)i[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],o=0,i=n.length;o<i;++o)n[o].value.apply(t,r)}};function tX(e,t){for(var r=0,n=e.length,o;r<n;++r)if((o=e[r]).name===t)return o.value}function ST(e,t,r){for(var n=0,o=e.length;n<o;++n)if(e[n].name===t){e[n]=QY,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var vx="http://www.w3.org/1999/xhtml";const OT={svg:"http://www.w3.org/2000/svg",xhtml:vx,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function cd(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),OT.hasOwnProperty(t)?{space:OT[t],local:e}:e}function rX(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===vx&&t.documentElement.namespaceURI===vx?t.createElement(e):t.createElementNS(r,e)}}function nX(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function RL(e){var t=cd(e);return(t.local?nX:rX)(t)}function oX(){}function N_(e){return e==null?oX:function(){return this.querySelector(e)}}function iX(e){typeof e!="function"&&(e=N_(e));for(var t=this._groups,r=t.length,n=new Array(r),o=0;o<r;++o)for(var i=t[o],a=i.length,s=n[o]=new Array(a),c,u,d=0;d<a;++d)(c=i[d])&&(u=e.call(c,c.__data__,d,i))&&("__data__"in c&&(u.__data__=c.__data__),s[d]=u);return new Sr(n,this._parents)}function aX(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function sX(){return[]}function NL(e){return e==null?sX:function(){return this.querySelectorAll(e)}}function lX(e){return function(){return aX(e.apply(this,arguments))}}function cX(e){typeof e=="function"?e=lX(e):e=NL(e);for(var t=this._groups,r=t.length,n=[],o=[],i=0;i<r;++i)for(var a=t[i],s=a.length,c,u=0;u<s;++u)(c=a[u])&&(n.push(e.call(c,c.__data__,u,a)),o.push(c));return new Sr(n,o)}function PL(e){return function(){return this.matches(e)}}function TL(e){return function(t){return t.matches(e)}}var uX=Array.prototype.find;function dX(e){return function(){return uX.call(this.children,e)}}function fX(){return this.firstElementChild}function pX(e){return this.select(e==null?fX:dX(typeof e=="function"?e:TL(e)))}var hX=Array.prototype.filter;function vX(){return Array.from(this.children)}function gX(e){return function(){return hX.call(this.children,e)}}function mX(e){return this.selectAll(e==null?vX:gX(typeof e=="function"?e:TL(e)))}function bX(e){typeof e!="function"&&(e=PL(e));for(var t=this._groups,r=t.length,n=new Array(r),o=0;o<r;++o)for(var i=t[o],a=i.length,s=n[o]=[],c,u=0;u<a;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&s.push(c);return new Sr(n,this._parents)}function AL(e){return new Array(e.length)}function yX(){return new Sr(this._enter||this._groups.map(AL),this._parents)}function du(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}du.prototype={constructor:du,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function wX(e){return function(){return e}}function xX(e,t,r,n,o,i){for(var a=0,s,c=t.length,u=i.length;a<u;++a)(s=t[a])?(s.__data__=i[a],n[a]=s):r[a]=new du(e,i[a]);for(;a<c;++a)(s=t[a])&&(o[a]=s)}function _X(e,t,r,n,o,i,a){var s,c,u=new Map,d=t.length,p=i.length,h=new Array(d),v;for(s=0;s<d;++s)(c=t[s])&&(h[s]=v=a.call(c,c.__data__,s,t)+"",u.has(v)?o[s]=c:u.set(v,c));for(s=0;s<p;++s)v=a.call(e,i[s],s,i)+"",(c=u.get(v))?(n[s]=c,c.__data__=i[s],u.delete(v)):r[s]=new du(e,i[s]);for(s=0;s<d;++s)(c=t[s])&&u.get(h[s])===c&&(o[s]=c)}function EX(e){return e.__data__}function SX(e,t){if(!arguments.length)return Array.from(this,EX);var r=t?_X:xX,n=this._parents,o=this._groups;typeof e!="function"&&(e=wX(e));for(var i=o.length,a=new Array(i),s=new Array(i),c=new Array(i),u=0;u<i;++u){var d=n[u],p=o[u],h=p.length,v=OX(e.call(d,d&&d.__data__,u,n)),y=v.length,g=s[u]=new Array(y),b=a[u]=new Array(y),x=c[u]=new Array(h);r(d,p,g,b,x,v,t);for(var w=0,E=0,S,_;w<y;++w)if(S=g[w]){for(w>=E&&(E=w+1);!(_=b[E])&&++E<y;);S._next=_||null}}return a=new Sr(a,n),a._enter=s,a._exit=c,a}function OX(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function CX(){return new Sr(this._exit||this._groups.map(AL),this._parents)}function IX(e,t,r){var n=this.enter(),o=this,i=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),r==null?i.remove():r(i),n&&o?n.merge(o).order():o}function RX(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,o=r.length,i=n.length,a=Math.min(o,i),s=new Array(o),c=0;c<a;++c)for(var u=r[c],d=n[c],p=u.length,h=s[c]=new Array(p),v,y=0;y<p;++y)(v=u[y]||d[y])&&(h[y]=v);for(;c<o;++c)s[c]=r[c];return new Sr(s,this._parents)}function NX(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],o=n.length-1,i=n[o],a;--o>=0;)(a=n[o])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function PX(e){e||(e=TX);function t(p,h){return p&&h?e(p.__data__,h.__data__):!p-!h}for(var r=this._groups,n=r.length,o=new Array(n),i=0;i<n;++i){for(var a=r[i],s=a.length,c=o[i]=new Array(s),u,d=0;d<s;++d)(u=a[d])&&(c[d]=u);c.sort(t)}return new Sr(o,this._parents).order()}function TX(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function AX(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function kX(){return Array.from(this)}function MX(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],o=0,i=n.length;o<i;++o){var a=n[o];if(a)return a}return null}function DX(){let e=0;for(const t of this)++e;return e}function jX(){return!this.node()}function qX(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var o=t[r],i=0,a=o.length,s;i<a;++i)(s=o[i])&&e.call(s,s.__data__,i,o);return this}function LX(e){return function(){this.removeAttribute(e)}}function zX(e){return function(){this.removeAttributeNS(e.space,e.local)}}function BX(e,t){return function(){this.setAttribute(e,t)}}function FX(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function $X(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function HX(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function VX(e,t){var r=cd(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?zX:LX:typeof t=="function"?r.local?HX:$X:r.local?FX:BX)(r,t))}function kL(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function WX(e){return function(){this.style.removeProperty(e)}}function UX(e,t,r){return function(){this.style.setProperty(e,t,r)}}function GX(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function KX(e,t,r){return arguments.length>1?this.each((t==null?WX:typeof t=="function"?GX:UX)(e,t,r??"")):Zi(this.node(),e)}function Zi(e,t){return e.style.getPropertyValue(t)||kL(e).getComputedStyle(e,null).getPropertyValue(t)}function YX(e){return function(){delete this[e]}}function XX(e,t){return function(){this[e]=t}}function ZX(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function JX(e,t){return arguments.length>1?this.each((t==null?YX:typeof t=="function"?ZX:XX)(e,t)):this.node()[e]}function ML(e){return e.trim().split(/^|\s+/)}function P_(e){return e.classList||new DL(e)}function DL(e){this._node=e,this._names=ML(e.getAttribute("class")||"")}DL.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function jL(e,t){for(var r=P_(e),n=-1,o=t.length;++n<o;)r.add(t[n])}function qL(e,t){for(var r=P_(e),n=-1,o=t.length;++n<o;)r.remove(t[n])}function QX(e){return function(){jL(this,e)}}function eZ(e){return function(){qL(this,e)}}function tZ(e,t){return function(){(t.apply(this,arguments)?jL:qL)(this,e)}}function rZ(e,t){var r=ML(e+"");if(arguments.length<2){for(var n=P_(this.node()),o=-1,i=r.length;++o<i;)if(!n.contains(r[o]))return!1;return!0}return this.each((typeof t=="function"?tZ:t?QX:eZ)(r,t))}function nZ(){this.textContent=""}function oZ(e){return function(){this.textContent=e}}function iZ(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function aZ(e){return arguments.length?this.each(e==null?nZ:(typeof e=="function"?iZ:oZ)(e)):this.node().textContent}function sZ(){this.innerHTML=""}function lZ(e){return function(){this.innerHTML=e}}function cZ(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function uZ(e){return arguments.length?this.each(e==null?sZ:(typeof e=="function"?cZ:lZ)(e)):this.node().innerHTML}function dZ(){this.nextSibling&&this.parentNode.appendChild(this)}function fZ(){return this.each(dZ)}function pZ(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function hZ(){return this.each(pZ)}function vZ(e){var t=typeof e=="function"?e:RL(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function gZ(){return null}function mZ(e,t){var r=typeof e=="function"?e:RL(e),n=t==null?gZ:typeof t=="function"?t:N_(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function bZ(){var e=this.parentNode;e&&e.removeChild(this)}function yZ(){return this.each(bZ)}function wZ(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function xZ(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function _Z(e){return this.select(e?xZ:wZ)}function EZ(e){return arguments.length?this.property("__data__",e):this.node().__data__}function SZ(e){return function(t){e.call(this,t,this.__data__)}}function OZ(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function CZ(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,o=t.length,i;r<o;++r)i=t[r],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++n]=i;++n?t.length=n:delete this.__on}}}function IZ(e,t,r){return function(){var n=this.__on,o,i=SZ(t);if(n){for(var a=0,s=n.length;a<s;++a)if((o=n[a]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=r),o.value=t;return}}this.addEventListener(e.type,i,r),o={type:e.type,name:e.name,value:t,listener:i,options:r},n?n.push(o):this.__on=[o]}}function RZ(e,t,r){var n=OZ(e+""),o,i=n.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,u=s.length,d;c<u;++c)for(o=0,d=s[c];o<i;++o)if((a=n[o]).type===d.type&&a.name===d.name)return d.value}return}for(s=t?IZ:CZ,o=0;o<i;++o)this.each(s(n[o],t,r));return this}function LL(e,t,r){var n=kL(e),o=n.CustomEvent;typeof o=="function"?o=new o(t,r):(o=n.document.createEvent("Event"),r?(o.initEvent(t,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function NZ(e,t){return function(){return LL(this,e,t)}}function PZ(e,t){return function(){return LL(this,e,t.apply(this,arguments))}}function TZ(e,t){return this.each((typeof t=="function"?PZ:NZ)(e,t))}function*AZ(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],o=0,i=n.length,a;o<i;++o)(a=n[o])&&(yield a)}var zL=[null];function Sr(e,t){this._groups=e,this._parents=t}function Hs(){return new Sr([[document.documentElement]],zL)}function kZ(){return this}Sr.prototype=Hs.prototype={constructor:Sr,select:iX,selectAll:cX,selectChild:pX,selectChildren:mX,filter:bX,data:SX,enter:yX,exit:CX,join:IX,merge:RX,selection:kZ,order:NX,sort:PX,call:AX,nodes:kX,node:MX,size:DX,empty:jX,each:qX,attr:VX,style:KX,property:JX,classed:rZ,text:aZ,html:uZ,raise:fZ,lower:hZ,append:vZ,insert:mZ,remove:yZ,clone:_Z,datum:EZ,on:RZ,dispatch:TZ,[Symbol.iterator]:AZ};function Zr(e){return typeof e=="string"?new Sr([[document.querySelector(e)]],[document.documentElement]):new Sr([[e]],zL)}function MZ(e){let t;for(;t=e.sourceEvent;)e=t;return e}function mn(e,t){if(e=MZ(e),t===void 0&&(t=e.currentTarget),t){var r=t.ownerSVGElement||t;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,n=n.matrixTransform(t.getScreenCTM().inverse()),[n.x,n.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const DZ={passive:!1},Cs={capture:!0,passive:!1};function Kb(e){e.stopImmediatePropagation()}function Li(e){e.preventDefault(),e.stopImmediatePropagation()}function BL(e){var t=e.document.documentElement,r=Zr(e).on("dragstart.drag",Li,Cs);"onselectstart"in t?r.on("selectstart.drag",Li,Cs):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function FL(e,t){var r=e.document.documentElement,n=Zr(e).on("dragstart.drag",null);t&&(n.on("click.drag",Li,Cs),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const bc=e=>()=>e;function gx(e,{sourceEvent:t,subject:r,target:n,identifier:o,active:i,x:a,y:s,dx:c,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}gx.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function jZ(e){return!e.ctrlKey&&!e.button}function qZ(){return this.parentNode}function LZ(e,t){return t??{x:e.x,y:e.y}}function zZ(){return navigator.maxTouchPoints||"ontouchstart"in this}function BZ(){var e=jZ,t=qZ,r=LZ,n=zZ,o={},i=ld("start","drag","end"),a=0,s,c,u,d,p=0;function h(S){S.on("mousedown.drag",v).filter(n).on("touchstart.drag",b).on("touchmove.drag",x,DZ).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(S,_){if(!(d||!e.call(this,S,_))){var O=E(this,t.call(this,S,_),S,_,"mouse");O&&(Zr(S.view).on("mousemove.drag",y,Cs).on("mouseup.drag",g,Cs),BL(S.view),Kb(S),u=!1,s=S.clientX,c=S.clientY,O("start",S))}}function y(S){if(Li(S),!u){var _=S.clientX-s,O=S.clientY-c;u=_*_+O*O>p}o.mouse("drag",S)}function g(S){Zr(S.view).on("mousemove.drag mouseup.drag",null),FL(S.view,u),Li(S),o.mouse("end",S)}function b(S,_){if(e.call(this,S,_)){var O=S.changedTouches,N=t.call(this,S,_),R=O.length,A,D;for(A=0;A<R;++A)(D=E(this,N,S,_,O[A].identifier,O[A]))&&(Kb(S),D("start",S,O[A]))}}function x(S){var _=S.changedTouches,O=_.length,N,R;for(N=0;N<O;++N)(R=o[_[N].identifier])&&(Li(S),R("drag",S,_[N]))}function w(S){var _=S.changedTouches,O=_.length,N,R;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),N=0;N<O;++N)(R=o[_[N].identifier])&&(Kb(S),R("end",S,_[N]))}function E(S,_,O,N,R,A){var D=i.copy(),B=mn(A||O,_),j,M,P;if((P=r.call(S,new gx("beforestart",{sourceEvent:O,target:h,identifier:R,active:a,x:B[0],y:B[1],dx:0,dy:0,dispatch:D}),N))!=null)return j=P.x-B[0]||0,M=P.y-B[1]||0,function V(q,G,W){var Q=B,z;switch(q){case"start":o[R]=V,z=a++;break;case"end":delete o[R],--a;case"drag":B=mn(W||G,_),z=a;break}D.call(q,S,new gx(q,{sourceEvent:G,subject:P,target:h,identifier:R,active:z,x:B[0]+j,y:B[1]+M,dx:B[0]-Q[0],dy:B[1]-Q[1],dispatch:D}),N)}}return h.filter=function(S){return arguments.length?(e=typeof S=="function"?S:bc(!!S),h):e},h.container=function(S){return arguments.length?(t=typeof S=="function"?S:bc(S),h):t},h.subject=function(S){return arguments.length?(r=typeof S=="function"?S:bc(S),h):r},h.touchable=function(S){return arguments.length?(n=typeof S=="function"?S:bc(!!S),h):n},h.on=function(){var S=i.on.apply(i,arguments);return S===i?h:S},h.clickDistance=function(S){return arguments.length?(p=(S=+S)*S,h):Math.sqrt(p)},h}function T_(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function $L(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Vs(){}var Is=.7,fu=1/Is,zi="\\s*([+-]?\\d+)\\s*",Rs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",FZ=/^#([0-9a-f]{3,8})$/,$Z=new RegExp(`^rgb\\(${zi},${zi},${zi}\\)$`),HZ=new RegExp(`^rgb\\(${xn},${xn},${xn}\\)$`),VZ=new RegExp(`^rgba\\(${zi},${zi},${zi},${Rs}\\)$`),WZ=new RegExp(`^rgba\\(${xn},${xn},${xn},${Rs}\\)$`),UZ=new RegExp(`^hsl\\(${Rs},${xn},${xn}\\)$`),GZ=new RegExp(`^hsla\\(${Rs},${xn},${xn},${Rs}\\)$`),CT={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};T_(Vs,Ns,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:IT,formatHex:IT,formatHex8:KZ,formatHsl:YZ,formatRgb:RT,toString:RT});function IT(){return this.rgb().formatHex()}function KZ(){return this.rgb().formatHex8()}function YZ(){return HL(this).formatHsl()}function RT(){return this.rgb().formatRgb()}function Ns(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=FZ.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?NT(t):r===3?new sr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?yc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?yc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=$Z.exec(e))?new sr(t[1],t[2],t[3],1):(t=HZ.exec(e))?new sr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=VZ.exec(e))?yc(t[1],t[2],t[3],t[4]):(t=WZ.exec(e))?yc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=UZ.exec(e))?AT(t[1],t[2]/100,t[3]/100,1):(t=GZ.exec(e))?AT(t[1],t[2]/100,t[3]/100,t[4]):CT.hasOwnProperty(e)?NT(CT[e]):e==="transparent"?new sr(NaN,NaN,NaN,0):null}function NT(e){return new sr(e>>16&255,e>>8&255,e&255,1)}function yc(e,t,r,n){return n<=0&&(e=t=r=NaN),new sr(e,t,r,n)}function XZ(e){return e instanceof Vs||(e=Ns(e)),e?(e=e.rgb(),new sr(e.r,e.g,e.b,e.opacity)):new sr}function mx(e,t,r,n){return arguments.length===1?XZ(e):new sr(e,t,r,n??1)}function sr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}T_(sr,mx,$L(Vs,{brighter(e){return e=e==null?fu:Math.pow(fu,e),new sr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Is:Math.pow(Is,e),new sr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new sr(Fo(this.r),Fo(this.g),Fo(this.b),pu(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:PT,formatHex:PT,formatHex8:ZZ,formatRgb:TT,toString:TT}));function PT(){return`#${zo(this.r)}${zo(this.g)}${zo(this.b)}`}function ZZ(){return`#${zo(this.r)}${zo(this.g)}${zo(this.b)}${zo((isNaN(this.opacity)?1:this.opacity)*255)}`}function TT(){const e=pu(this.opacity);return`${e===1?"rgb(":"rgba("}${Fo(this.r)}, ${Fo(this.g)}, ${Fo(this.b)}${e===1?")":`, ${e})`}`}function pu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Fo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function zo(e){return e=Fo(e),(e<16?"0":"")+e.toString(16)}function AT(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Jr(e,t,r,n)}function HL(e){if(e instanceof Jr)return new Jr(e.h,e.s,e.l,e.opacity);if(e instanceof Vs||(e=Ns(e)),!e)return new Jr;if(e instanceof Jr)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=NaN,s=i-o,c=(i+o)/2;return s?(t===i?a=(r-n)/s+(r<n)*6:r===i?a=(n-t)/s+2:a=(t-r)/s+4,s/=c<.5?i+o:2-i-o,a*=60):s=c>0&&c<1?0:a,new Jr(a,s,c,e.opacity)}function JZ(e,t,r,n){return arguments.length===1?HL(e):new Jr(e,t,r,n??1)}function Jr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}T_(Jr,JZ,$L(Vs,{brighter(e){return e=e==null?fu:Math.pow(fu,e),new Jr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Is:Math.pow(Is,e),new Jr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new sr(Yb(e>=240?e-240:e+120,o,n),Yb(e,o,n),Yb(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new Jr(kT(this.h),wc(this.s),wc(this.l),pu(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=pu(this.opacity);return`${e===1?"hsl(":"hsla("}${kT(this.h)}, ${wc(this.s)*100}%, ${wc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function kT(e){return e=(e||0)%360,e<0?e+360:e}function wc(e){return Math.max(0,Math.min(1,e||0))}function Yb(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const VL=e=>()=>e;function QZ(e,t){return function(r){return e+r*t}}function eJ(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function tJ(e){return(e=+e)==1?WL:function(t,r){return r-t?eJ(t,r,e):VL(isNaN(t)?r:t)}}function WL(e,t){var r=t-e;return r?QZ(e,r):VL(isNaN(e)?t:e)}const MT=(function e(t){var r=tJ(t);function n(o,i){var a=r((o=mx(o)).r,(i=mx(i)).r),s=r(o.g,i.g),c=r(o.b,i.b),u=WL(o.opacity,i.opacity);return function(d){return o.r=a(d),o.g=s(d),o.b=c(d),o.opacity=u(d),o+""}}return n.gamma=e,n})(1);function ho(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var bx=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xb=new RegExp(bx.source,"g");function rJ(e){return function(){return e}}function nJ(e){return function(t){return e(t)+""}}function oJ(e,t){var r=bx.lastIndex=Xb.lastIndex=0,n,o,i,a=-1,s=[],c=[];for(e=e+"",t=t+"";(n=bx.exec(e))&&(o=Xb.exec(t));)(i=o.index)>r&&(i=t.slice(r,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,c.push({i:a,x:ho(n,o)})),r=Xb.lastIndex;return r<t.length&&(i=t.slice(r),s[a]?s[a]+=i:s[++a]=i),s.length<2?c[0]?nJ(c[0].x):rJ(t):(t=c.length,function(u){for(var d=0,p;d<t;++d)s[(p=c[d]).i]=p.x(u);return s.join("")})}var DT=180/Math.PI,yx={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function UL(e,t,r,n,o,i){var a,s,c;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(c=e*r+t*n)&&(r-=e*c,n-=t*c),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,c/=s),e*n<t*r&&(e=-e,t=-t,c=-c,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*DT,skewX:Math.atan(c)*DT,scaleX:a,scaleY:s}}var xc;function iJ(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?yx:UL(t.a,t.b,t.c,t.d,t.e,t.f)}function aJ(e){return e==null||(xc||(xc=document.createElementNS("http://www.w3.org/2000/svg","g")),xc.setAttribute("transform",e),!(e=xc.transform.baseVal.consolidate()))?yx:(e=e.matrix,UL(e.a,e.b,e.c,e.d,e.e,e.f))}function GL(e,t,r,n){function o(u){return u.length?u.pop()+" ":""}function i(u,d,p,h,v,y){if(u!==p||d!==h){var g=v.push("translate(",null,t,null,r);y.push({i:g-4,x:ho(u,p)},{i:g-2,x:ho(d,h)})}else(p||h)&&v.push("translate("+p+t+h+r)}function a(u,d,p,h){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),h.push({i:p.push(o(p)+"rotate(",null,n)-2,x:ho(u,d)})):d&&p.push(o(p)+"rotate("+d+n)}function s(u,d,p,h){u!==d?h.push({i:p.push(o(p)+"skewX(",null,n)-2,x:ho(u,d)}):d&&p.push(o(p)+"skewX("+d+n)}function c(u,d,p,h,v,y){if(u!==p||d!==h){var g=v.push(o(v)+"scale(",null,",",null,")");y.push({i:g-4,x:ho(u,p)},{i:g-2,x:ho(d,h)})}else(p!==1||h!==1)&&v.push(o(v)+"scale("+p+","+h+")")}return function(u,d){var p=[],h=[];return u=e(u),d=e(d),i(u.translateX,u.translateY,d.translateX,d.translateY,p,h),a(u.rotate,d.rotate,p,h),s(u.skewX,d.skewX,p,h),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,p,h),u=d=null,function(v){for(var y=-1,g=h.length,b;++y<g;)p[(b=h[y]).i]=b.x(v);return p.join("")}}}var sJ=GL(iJ,"px, ","px)","deg)"),lJ=GL(aJ,", ",")",")"),cJ=1e-12;function jT(e){return((e=Math.exp(e))+1/e)/2}function uJ(e){return((e=Math.exp(e))-1/e)/2}function dJ(e){return((e=Math.exp(2*e))-1)/(e+1)}const fJ=(function e(t,r,n){function o(i,a){var s=i[0],c=i[1],u=i[2],d=a[0],p=a[1],h=a[2],v=d-s,y=p-c,g=v*v+y*y,b,x;if(g<cJ)x=Math.log(h/u)/t,b=function(N){return[s+N*v,c+N*y,u*Math.exp(t*N*x)]};else{var w=Math.sqrt(g),E=(h*h-u*u+n*g)/(2*u*r*w),S=(h*h-u*u-n*g)/(2*h*r*w),_=Math.log(Math.sqrt(E*E+1)-E),O=Math.log(Math.sqrt(S*S+1)-S);x=(O-_)/t,b=function(N){var R=N*x,A=jT(_),D=u/(r*w)*(A*dJ(t*R+_)-uJ(_));return[s+D*v,c+D*y,u*A/jT(t*R+_)]}}return b.duration=x*1e3*t/Math.SQRT2,b}return o.rho=function(i){var a=Math.max(.001,+i),s=a*a,c=s*s;return e(a,s,c)},o})(Math.SQRT2,2,4);var Ji=0,fs=0,$a=0,KL=1e3,hu,ps,vu=0,Go=0,ud=0,Ps=typeof performance=="object"&&performance.now?performance:Date,YL=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function A_(){return Go||(YL(pJ),Go=Ps.now()+ud)}function pJ(){Go=0}function gu(){this._call=this._time=this._next=null}gu.prototype=XL.prototype={constructor:gu,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?A_():+r)+(t==null?0:+t),!this._next&&ps!==this&&(ps?ps._next=this:hu=this,ps=this),this._call=e,this._time=r,wx()},stop:function(){this._call&&(this._call=null,this._time=1/0,wx())}};function XL(e,t,r){var n=new gu;return n.restart(e,t,r),n}function hJ(){A_(),++Ji;for(var e=hu,t;e;)(t=Go-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ji}function qT(){Go=(vu=Ps.now())+ud,Ji=fs=0;try{hJ()}finally{Ji=0,gJ(),Go=0}}function vJ(){var e=Ps.now(),t=e-vu;t>KL&&(ud-=t,vu=e)}function gJ(){for(var e,t=hu,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:hu=r);ps=e,wx(n)}function wx(e){if(!Ji){fs&&(fs=clearTimeout(fs));var t=e-Go;t>24?(e<1/0&&(fs=setTimeout(qT,e-Ps.now()-ud)),$a&&($a=clearInterval($a))):($a||(vu=Ps.now(),$a=setInterval(vJ,KL)),Ji=1,YL(qT))}}function LT(e,t,r){var n=new gu;return t=t==null?0:+t,n.restart(o=>{n.stop(),e(o+t)},t,r),n}var mJ=ld("start","end","cancel","interrupt"),bJ=[],ZL=0,zT=1,xx=2,Xc=3,BT=4,_x=5,Zc=6;function dd(e,t,r,n,o,i){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;yJ(e,r,{name:t,index:n,group:o,on:mJ,tween:bJ,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:ZL})}function k_(e,t){var r=an(e,t);if(r.state>ZL)throw new Error("too late; already scheduled");return r}function In(e,t){var r=an(e,t);if(r.state>Xc)throw new Error("too late; already running");return r}function an(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function yJ(e,t,r){var n=e.__transition,o;n[t]=r,r.timer=XL(i,0,r.time);function i(u){r.state=zT,r.timer.restart(a,r.delay,r.time),r.delay<=u&&a(u-r.delay)}function a(u){var d,p,h,v;if(r.state!==zT)return c();for(d in n)if(v=n[d],v.name===r.name){if(v.state===Xc)return LT(a);v.state===BT?(v.state=Zc,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete n[d]):+d<t&&(v.state=Zc,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete n[d])}if(LT(function(){r.state===Xc&&(r.state=BT,r.timer.restart(s,r.delay,r.time),s(u))}),r.state=xx,r.on.call("start",e,e.__data__,r.index,r.group),r.state===xx){for(r.state=Xc,o=new Array(h=r.tween.length),d=0,p=-1;d<h;++d)(v=r.tween[d].value.call(e,e.__data__,r.index,r.group))&&(o[++p]=v);o.length=p+1}}function s(u){for(var d=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(c),r.state=_x,1),p=-1,h=o.length;++p<h;)o[p].call(e,d);r.state===_x&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=Zc,r.timer.stop(),delete n[t];for(var u in n)return;delete e.__transition}}function Jc(e,t){var r=e.__transition,n,o,i=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((n=r[a]).name!==t){i=!1;continue}o=n.state>xx&&n.state<_x,n.state=Zc,n.timer.stop(),n.on.call(o?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}i&&delete e.__transition}}function wJ(e){return this.each(function(){Jc(this,e)})}function xJ(e,t){var r,n;return function(){var o=In(this,e),i=o.tween;if(i!==r){n=r=i;for(var a=0,s=n.length;a<s;++a)if(n[a].name===t){n=n.slice(),n.splice(a,1);break}}o.tween=n}}function _J(e,t,r){var n,o;if(typeof r!="function")throw new Error;return function(){var i=In(this,e),a=i.tween;if(a!==n){o=(n=a).slice();for(var s={name:t,value:r},c=0,u=o.length;c<u;++c)if(o[c].name===t){o[c]=s;break}c===u&&o.push(s)}i.tween=o}}function EJ(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=an(this.node(),r).tween,o=0,i=n.length,a;o<i;++o)if((a=n[o]).name===e)return a.value;return null}return this.each((t==null?xJ:_J)(r,e,t))}function M_(e,t,r){var n=e._id;return e.each(function(){var o=In(this,n);(o.value||(o.value={}))[t]=r.apply(this,arguments)}),function(o){return an(o,n).value[t]}}function JL(e,t){var r;return(typeof t=="number"?ho:t instanceof Ns?MT:(r=Ns(t))?(t=r,MT):oJ)(e,t)}function SJ(e){return function(){this.removeAttribute(e)}}function OJ(e){return function(){this.removeAttributeNS(e.space,e.local)}}function CJ(e,t,r){var n,o=r+"",i;return function(){var a=this.getAttribute(e);return a===o?null:a===n?i:i=t(n=a,r)}}function IJ(e,t,r){var n,o=r+"",i;return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===n?i:i=t(n=a,r)}}function RJ(e,t,r){var n,o,i;return function(){var a,s=r(this),c;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),c=s+"",a===c?null:a===n&&c===o?i:(o=c,i=t(n=a,s)))}}function NJ(e,t,r){var n,o,i;return function(){var a,s=r(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),c=s+"",a===c?null:a===n&&c===o?i:(o=c,i=t(n=a,s)))}}function PJ(e,t){var r=cd(e),n=r==="transform"?lJ:JL;return this.attrTween(e,typeof t=="function"?(r.local?NJ:RJ)(r,n,M_(this,"attr."+e,t)):t==null?(r.local?OJ:SJ)(r):(r.local?IJ:CJ)(r,n,t))}function TJ(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function AJ(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function kJ(e,t){var r,n;function o(){var i=t.apply(this,arguments);return i!==n&&(r=(n=i)&&AJ(e,i)),r}return o._value=t,o}function MJ(e,t){var r,n;function o(){var i=t.apply(this,arguments);return i!==n&&(r=(n=i)&&TJ(e,i)),r}return o._value=t,o}function DJ(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=cd(e);return this.tween(r,(n.local?kJ:MJ)(n,t))}function jJ(e,t){return function(){k_(this,e).delay=+t.apply(this,arguments)}}function qJ(e,t){return t=+t,function(){k_(this,e).delay=t}}function LJ(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?jJ:qJ)(t,e)):an(this.node(),t).delay}function zJ(e,t){return function(){In(this,e).duration=+t.apply(this,arguments)}}function BJ(e,t){return t=+t,function(){In(this,e).duration=t}}function FJ(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?zJ:BJ)(t,e)):an(this.node(),t).duration}function $J(e,t){if(typeof t!="function")throw new Error;return function(){In(this,e).ease=t}}function HJ(e){var t=this._id;return arguments.length?this.each($J(t,e)):an(this.node(),t).ease}function VJ(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;In(this,e).ease=r}}function WJ(e){if(typeof e!="function")throw new Error;return this.each(VJ(this._id,e))}function UJ(e){typeof e!="function"&&(e=PL(e));for(var t=this._groups,r=t.length,n=new Array(r),o=0;o<r;++o)for(var i=t[o],a=i.length,s=n[o]=[],c,u=0;u<a;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&s.push(c);return new Vn(n,this._parents,this._name,this._id)}function GJ(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,o=r.length,i=Math.min(n,o),a=new Array(n),s=0;s<i;++s)for(var c=t[s],u=r[s],d=c.length,p=a[s]=new Array(d),h,v=0;v<d;++v)(h=c[v]||u[v])&&(p[v]=h);for(;s<n;++s)a[s]=t[s];return new Vn(a,this._parents,this._name,this._id)}function KJ(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function YJ(e,t,r){var n,o,i=KJ(t)?k_:In;return function(){var a=i(this,e),s=a.on;s!==n&&(o=(n=s).copy()).on(t,r),a.on=o}}function XJ(e,t){var r=this._id;return arguments.length<2?an(this.node(),r).on.on(e):this.each(YJ(r,e,t))}function ZJ(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function JJ(){return this.on("end.remove",ZJ(this._id))}function QJ(e){var t=this._name,r=this._id;typeof e!="function"&&(e=N_(e));for(var n=this._groups,o=n.length,i=new Array(o),a=0;a<o;++a)for(var s=n[a],c=s.length,u=i[a]=new Array(c),d,p,h=0;h<c;++h)(d=s[h])&&(p=e.call(d,d.__data__,h,s))&&("__data__"in d&&(p.__data__=d.__data__),u[h]=p,dd(u[h],t,r,h,u,an(d,r)));return new Vn(i,this._parents,t,r)}function eQ(e){var t=this._name,r=this._id;typeof e!="function"&&(e=NL(e));for(var n=this._groups,o=n.length,i=[],a=[],s=0;s<o;++s)for(var c=n[s],u=c.length,d,p=0;p<u;++p)if(d=c[p]){for(var h=e.call(d,d.__data__,p,c),v,y=an(d,r),g=0,b=h.length;g<b;++g)(v=h[g])&&dd(v,t,r,g,h,y);i.push(h),a.push(d)}return new Vn(i,a,t,r)}var tQ=Hs.prototype.constructor;function rQ(){return new tQ(this._groups,this._parents)}function nQ(e,t){var r,n,o;return function(){var i=Zi(this,e),a=(this.style.removeProperty(e),Zi(this,e));return i===a?null:i===r&&a===n?o:o=t(r=i,n=a)}}function QL(e){return function(){this.style.removeProperty(e)}}function oQ(e,t,r){var n,o=r+"",i;return function(){var a=Zi(this,e);return a===o?null:a===n?i:i=t(n=a,r)}}function iQ(e,t,r){var n,o,i;return function(){var a=Zi(this,e),s=r(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),Zi(this,e))),a===c?null:a===n&&c===o?i:(o=c,i=t(n=a,s))}}function aQ(e,t){var r,n,o,i="style."+t,a="end."+i,s;return function(){var c=In(this,e),u=c.on,d=c.value[i]==null?s||(s=QL(t)):void 0;(u!==r||o!==d)&&(n=(r=u).copy()).on(a,o=d),c.on=n}}function sQ(e,t,r){var n=(e+="")=="transform"?sJ:JL;return t==null?this.styleTween(e,nQ(e,n)).on("end.style."+e,QL(e)):typeof t=="function"?this.styleTween(e,iQ(e,n,M_(this,"style."+e,t))).each(aQ(this._id,e)):this.styleTween(e,oQ(e,n,t),r).on("end.style."+e,null)}function lQ(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function cQ(e,t,r){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&lQ(e,a,r)),n}return i._value=t,i}function uQ(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,cQ(e,t,r??""))}function dQ(e){return function(){this.textContent=e}}function fQ(e){return function(){var t=e(this);this.textContent=t??""}}function pQ(e){return this.tween("text",typeof e=="function"?fQ(M_(this,"text",e)):dQ(e==null?"":e+""))}function hQ(e){return function(t){this.textContent=e.call(this,t)}}function vQ(e){var t,r;function n(){var o=e.apply(this,arguments);return o!==r&&(t=(r=o)&&hQ(o)),t}return n._value=e,n}function gQ(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,vQ(e))}function mQ(){for(var e=this._name,t=this._id,r=e5(),n=this._groups,o=n.length,i=0;i<o;++i)for(var a=n[i],s=a.length,c,u=0;u<s;++u)if(c=a[u]){var d=an(c,t);dd(c,e,r,u,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Vn(n,this._parents,e,r)}function bQ(){var e,t,r=this,n=r._id,o=r.size();return new Promise(function(i,a){var s={value:a},c={value:function(){--o===0&&i()}};r.each(function(){var u=In(this,n),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),u.on=t}),o===0&&i()})}var yQ=0;function Vn(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function e5(){return++yQ}var zn=Hs.prototype;Vn.prototype={constructor:Vn,select:QJ,selectAll:eQ,selectChild:zn.selectChild,selectChildren:zn.selectChildren,filter:UJ,merge:GJ,selection:rQ,transition:mQ,call:zn.call,nodes:zn.nodes,node:zn.node,size:zn.size,empty:zn.empty,each:zn.each,on:XJ,attr:PJ,attrTween:DJ,style:sQ,styleTween:uQ,text:pQ,textTween:gQ,remove:JJ,tween:EJ,delay:LJ,duration:FJ,ease:HJ,easeVarying:WJ,end:bQ,[Symbol.iterator]:zn[Symbol.iterator]};function wQ(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var xQ={time:null,delay:0,duration:250,ease:wQ};function _Q(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function EQ(e){var t,r;e instanceof Vn?(t=e._id,e=e._name):(t=e5(),(r=xQ).time=A_(),e=e==null?null:e+"");for(var n=this._groups,o=n.length,i=0;i<o;++i)for(var a=n[i],s=a.length,c,u=0;u<s;++u)(c=a[u])&&dd(c,e,t,u,a,r||_Q(c,t));return new Vn(n,this._parents,e,t)}Hs.prototype.interrupt=wJ;Hs.prototype.transition=EQ;const _c=e=>()=>e;function SQ(e,{sourceEvent:t,target:r,transform:n,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:o}})}function $n(e,t,r){this.k=e,this.x=t,this.y=r}$n.prototype={constructor:$n,scale:function(e){return e===1?this:new $n(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new $n(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var $o=new $n(1,0,0);$n.prototype;function Zb(e){e.stopImmediatePropagation()}function Ha(e){e.preventDefault(),e.stopImmediatePropagation()}function OQ(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function CQ(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function FT(){return this.__zoom||$o}function IQ(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function RQ(){return navigator.maxTouchPoints||"ontouchstart"in this}function NQ(e,t,r){var n=e.invertX(t[0][0])-r[0][0],o=e.invertX(t[1][0])-r[1][0],i=e.invertY(t[0][1])-r[0][1],a=e.invertY(t[1][1])-r[1][1];return e.translate(o>n?(n+o)/2:Math.min(0,n)||Math.max(0,o),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function PQ(){var e=OQ,t=CQ,r=NQ,n=IQ,o=RQ,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,c=fJ,u=ld("start","zoom","end"),d,p,h,v=500,y=150,g=0,b=10;function x(P){P.property("__zoom",FT).on("wheel.zoom",R,{passive:!1}).on("mousedown.zoom",A).on("dblclick.zoom",D).filter(o).on("touchstart.zoom",B).on("touchmove.zoom",j).on("touchend.zoom touchcancel.zoom",M).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}x.transform=function(P,V,q,G){var W=P.selection?P.selection():P;W.property("__zoom",FT),P!==W?_(P,V,q,G):W.interrupt().each(function(){O(this,arguments).event(G).start().zoom(null,typeof V=="function"?V.apply(this,arguments):V).end()})},x.scaleBy=function(P,V,q,G){x.scaleTo(P,function(){var W=this.__zoom.k,Q=typeof V=="function"?V.apply(this,arguments):V;return W*Q},q,G)},x.scaleTo=function(P,V,q,G){x.transform(P,function(){var W=t.apply(this,arguments),Q=this.__zoom,z=q==null?S(W):typeof q=="function"?q.apply(this,arguments):q,U=Q.invert(z),ie=typeof V=="function"?V.apply(this,arguments):V;return r(E(w(Q,ie),z,U),W,a)},q,G)},x.translateBy=function(P,V,q,G){x.transform(P,function(){return r(this.__zoom.translate(typeof V=="function"?V.apply(this,arguments):V,typeof q=="function"?q.apply(this,arguments):q),t.apply(this,arguments),a)},null,G)},x.translateTo=function(P,V,q,G,W){x.transform(P,function(){var Q=t.apply(this,arguments),z=this.__zoom,U=G==null?S(Q):typeof G=="function"?G.apply(this,arguments):G;return r($o.translate(U[0],U[1]).scale(z.k).translate(typeof V=="function"?-V.apply(this,arguments):-V,typeof q=="function"?-q.apply(this,arguments):-q),Q,a)},G,W)};function w(P,V){return V=Math.max(i[0],Math.min(i[1],V)),V===P.k?P:new $n(V,P.x,P.y)}function E(P,V,q){var G=V[0]-q[0]*P.k,W=V[1]-q[1]*P.k;return G===P.x&&W===P.y?P:new $n(P.k,G,W)}function S(P){return[(+P[0][0]+ +P[1][0])/2,(+P[0][1]+ +P[1][1])/2]}function _(P,V,q,G){P.on("start.zoom",function(){O(this,arguments).event(G).start()}).on("interrupt.zoom end.zoom",function(){O(this,arguments).event(G).end()}).tween("zoom",function(){var W=this,Q=arguments,z=O(W,Q).event(G),U=t.apply(W,Q),ie=q==null?S(U):typeof q=="function"?q.apply(W,Q):q,te=Math.max(U[1][0]-U[0][0],U[1][1]-U[0][1]),$=W.__zoom,K=typeof V=="function"?V.apply(W,Q):V,Z=c($.invert(ie).concat(te/$.k),K.invert(ie).concat(te/K.k));return function(H){if(H===1)H=K;else{var Y=Z(H),oe=te/Y[2];H=new $n(oe,ie[0]-Y[0]*oe,ie[1]-Y[1]*oe)}z.zoom(null,H)}})}function O(P,V,q){return!q&&P.__zooming||new N(P,V)}function N(P,V){this.that=P,this.args=V,this.active=0,this.sourceEvent=null,this.extent=t.apply(P,V),this.taps=0}N.prototype={event:function(P){return P&&(this.sourceEvent=P),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(P,V){return this.mouse&&P!=="mouse"&&(this.mouse[1]=V.invert(this.mouse[0])),this.touch0&&P!=="touch"&&(this.touch0[1]=V.invert(this.touch0[0])),this.touch1&&P!=="touch"&&(this.touch1[1]=V.invert(this.touch1[0])),this.that.__zoom=V,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(P){var V=Zr(this.that).datum();u.call(P,this.that,new SQ(P,{sourceEvent:this.sourceEvent,target:x,transform:this.that.__zoom,dispatch:u}),V)}};function R(P,...V){if(!e.apply(this,arguments))return;var q=O(this,V).event(P),G=this.__zoom,W=Math.max(i[0],Math.min(i[1],G.k*Math.pow(2,n.apply(this,arguments)))),Q=mn(P);if(q.wheel)(q.mouse[0][0]!==Q[0]||q.mouse[0][1]!==Q[1])&&(q.mouse[1]=G.invert(q.mouse[0]=Q)),clearTimeout(q.wheel);else{if(G.k===W)return;q.mouse=[Q,G.invert(Q)],Jc(this),q.start()}Ha(P),q.wheel=setTimeout(z,y),q.zoom("mouse",r(E(w(G,W),q.mouse[0],q.mouse[1]),q.extent,a));function z(){q.wheel=null,q.end()}}function A(P,...V){if(h||!e.apply(this,arguments))return;var q=P.currentTarget,G=O(this,V,!0).event(P),W=Zr(P.view).on("mousemove.zoom",ie,!0).on("mouseup.zoom",te,!0),Q=mn(P,q),z=P.clientX,U=P.clientY;BL(P.view),Zb(P),G.mouse=[Q,this.__zoom.invert(Q)],Jc(this),G.start();function ie($){if(Ha($),!G.moved){var K=$.clientX-z,Z=$.clientY-U;G.moved=K*K+Z*Z>g}G.event($).zoom("mouse",r(E(G.that.__zoom,G.mouse[0]=mn($,q),G.mouse[1]),G.extent,a))}function te($){W.on("mousemove.zoom mouseup.zoom",null),FL($.view,G.moved),Ha($),G.event($).end()}}function D(P,...V){if(e.apply(this,arguments)){var q=this.__zoom,G=mn(P.changedTouches?P.changedTouches[0]:P,this),W=q.invert(G),Q=q.k*(P.shiftKey?.5:2),z=r(E(w(q,Q),G,W),t.apply(this,V),a);Ha(P),s>0?Zr(this).transition().duration(s).call(_,z,G,P):Zr(this).call(x.transform,z,G,P)}}function B(P,...V){if(e.apply(this,arguments)){var q=P.touches,G=q.length,W=O(this,V,P.changedTouches.length===G).event(P),Q,z,U,ie;for(Zb(P),z=0;z<G;++z)U=q[z],ie=mn(U,this),ie=[ie,this.__zoom.invert(ie),U.identifier],W.touch0?!W.touch1&&W.touch0[2]!==ie[2]&&(W.touch1=ie,W.taps=0):(W.touch0=ie,Q=!0,W.taps=1+!!d);d&&(d=clearTimeout(d)),Q&&(W.taps<2&&(p=ie[0],d=setTimeout(function(){d=null},v)),Jc(this),W.start())}}function j(P,...V){if(this.__zooming){var q=O(this,V).event(P),G=P.changedTouches,W=G.length,Q,z,U,ie;for(Ha(P),Q=0;Q<W;++Q)z=G[Q],U=mn(z,this),q.touch0&&q.touch0[2]===z.identifier?q.touch0[0]=U:q.touch1&&q.touch1[2]===z.identifier&&(q.touch1[0]=U);if(z=q.that.__zoom,q.touch1){var te=q.touch0[0],$=q.touch0[1],K=q.touch1[0],Z=q.touch1[1],H=(H=K[0]-te[0])*H+(H=K[1]-te[1])*H,Y=(Y=Z[0]-$[0])*Y+(Y=Z[1]-$[1])*Y;z=w(z,Math.sqrt(H/Y)),U=[(te[0]+K[0])/2,(te[1]+K[1])/2],ie=[($[0]+Z[0])/2,($[1]+Z[1])/2]}else if(q.touch0)U=q.touch0[0],ie=q.touch0[1];else return;q.zoom("touch",r(E(z,U,ie),q.extent,a))}}function M(P,...V){if(this.__zooming){var q=O(this,V).event(P),G=P.changedTouches,W=G.length,Q,z;for(Zb(P),h&&clearTimeout(h),h=setTimeout(function(){h=null},v),Q=0;Q<W;++Q)z=G[Q],q.touch0&&q.touch0[2]===z.identifier?delete q.touch0:q.touch1&&q.touch1[2]===z.identifier&&delete q.touch1;if(q.touch1&&!q.touch0&&(q.touch0=q.touch1,delete q.touch1),q.touch0)q.touch0[1]=this.__zoom.invert(q.touch0[0]);else if(q.end(),q.taps===2&&(z=mn(z,this),Math.hypot(p[0]-z[0],p[1]-z[1])<b)){var U=Zr(this).on("dblclick.zoom");U&&U.apply(this,arguments)}}}return x.wheelDelta=function(P){return arguments.length?(n=typeof P=="function"?P:_c(+P),x):n},x.filter=function(P){return arguments.length?(e=typeof P=="function"?P:_c(!!P),x):e},x.touchable=function(P){return arguments.length?(o=typeof P=="function"?P:_c(!!P),x):o},x.extent=function(P){return arguments.length?(t=typeof P=="function"?P:_c([[+P[0][0],+P[0][1]],[+P[1][0],+P[1][1]]]),x):t},x.scaleExtent=function(P){return arguments.length?(i[0]=+P[0],i[1]=+P[1],x):[i[0],i[1]]},x.translateExtent=function(P){return arguments.length?(a[0][0]=+P[0][0],a[1][0]=+P[1][0],a[0][1]=+P[0][1],a[1][1]=+P[1][1],x):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},x.constrain=function(P){return arguments.length?(r=P,x):r},x.duration=function(P){return arguments.length?(s=+P,x):s},x.interpolate=function(P){return arguments.length?(c=P,x):c},x.on=function(){var P=u.on.apply(u,arguments);return P===u?x:P},x.clickDistance=function(P){return arguments.length?(g=(P=+P)*P,x):Math.sqrt(g)},x.tapDistance=function(P){return arguments.length?(b=+P,x):b},x}function Ge(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ex(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t5(e,t){if(e){if(typeof e=="string")return Ex(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ex(e,t)}}function TQ(e){if(Array.isArray(e))return e}function AQ(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,s;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(c){i=!0,s=c}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw s}}return n}}function kQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
54
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function He(e,t){return TQ(e)||AQ(e,t)||t5(e,t)||kQ()}var Qi;(function(e){e.Strict="strict",e.Loose="loose"})(Qi||(Qi={}));var Ko;(function(e){e.Lines="lines",e.Dots="dots"})(Ko||(Ko={}));var Bi;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Bi||(Bi={}));var go;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(go||(go={}));var mu;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(mu||(mu={}));var Se;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Se||(Se={}));var D_=function(t){return{width:t.offsetWidth,height:t.offsetHeight}},Fi=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.min(Math.max(t,r),n)},r5=function(t,r){return{x:Fi(t.x,r[0][0],r[1][0]),y:Fi(t.y,r[0][1],r[1][1])}},n5=function(t){var r,n;return((r=t.getRootNode)===null||r===void 0?void 0:r.call(t))||((n=window)===null||n===void 0?void 0:n.document)},MQ=function(t,r){return{x:Math.min(t.x,r.x),y:Math.min(t.y,r.y),x2:Math.max(t.x2,r.x2),y2:Math.max(t.y2,r.y2)}},bu=function(t){var r=t.x,n=t.y,o=t.width,i=t.height;return{x:r,y:n,x2:r+o,y2:n+i}},DQ=function(t){var r=t.x,n=t.y,o=t.x2,i=t.y2;return{x:r,y:n,width:o-r,height:i-n}},o5=function(t){return!isNaN(t)&&isFinite(t)},$t=Symbol("internals");function $T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function hs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$T(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$T(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HT(e,t){var r=e.find(function(u){return u.id===t.parentNode});if(r){var n=t.position.x+t.width-r.width,o=t.position.y+t.height-r.height;if(n>0||o>0||t.position.x<0||t.position.y<0){var i,a;if(r.style=hs({},r.style)||{},r.style.width=(i=r.style.width)!==null&&i!==void 0?i:r.width,r.style.height=(a=r.style.height)!==null&&a!==void 0?a:r.height,n>0&&(r.style.width+=n),o>0&&(r.style.height+=o),t.position.x<0){var s=Math.abs(t.position.x);r.position.x=r.position.x-s,r.style.width+=s,t.position.x=0}if(t.position.y<0){var c=Math.abs(t.position.y);r.position.y=r.position.y-c,r.style.height+=c,t.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function i5(e,t){if(e.some(function(n){return n.type==="reset"}))return e.filter(function(n){return n.type==="reset"}).map(function(n){return n.item});var r=e.filter(function(n){return n.type==="add"}).map(function(n){return n.item});return t.reduce(function(n,o){var i=e.find(function(c){return c.id===o.id});if(i)switch(i.type){case"select":return n.push(hs(hs({},o),{},{selected:i.selected})),n;case"position":{var a=hs({},o);return typeof i.position<"u"&&(a.position=i.position),typeof i.positionAbsolute<"u"&&(a.positionAbsolute=i.positionAbsolute),typeof i.dragging<"u"&&(a.dragging=i.dragging),a.expandParent&&HT(n,a),n.push(a),n}case"dimensions":{var s=hs({},o);return typeof i.dimensions<"u"&&(s.width=i.dimensions.width,s.height=i.dimensions.height),s.expandParent&&HT(n,s),n.push(s),n}case"remove":return n}return n.push(o),n},r)}function a5(e,t){return i5(e,t)}function jQ(e,t){return i5(e,t)}var vo=function(t,r){return{id:t,type:"select",selected:r}};function Di(e,t){return e.reduce(function(r,n){var o=t.includes(n.id);return!n.selected&&o?(n.selected=!0,r.push(vo(n.id,!0))):n.selected&&!o&&(n.selected=!1,r.push(vo(n.id,!1))),r},[])}function VT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function s5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VT(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var WT=function(t,r,n){var o=r.querySelectorAll(t);if(!o||!o.length)return null;var i=Array.from(o),a=r.getBoundingClientRect();return i.map(function(s){var c=s.getBoundingClientRect();return s5({id:s.getAttribute("data-handleid"),position:s.getAttribute("data-handlepos"),x:(c.left-a.left)/n,y:(c.top-a.top)/n},D_(s))})};function Va(e,t,r){return r===void 0?r:function(n){var o=t().nodeInternals.get(e);r(n,s5({},o))}}function l5(e){var t=e.id,r=e.store,n=r.getState(),o=n.addSelectedNodes,i=n.unselectNodesAndEdges,a=n.multiSelectionActive,s=n.nodeInternals,c=s.get(t);r.setState({nodesSelectionActive:!1}),c.selected?c.selected&&a&&i({nodes:[c]}):o([t])}function UT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ys(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UT(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var qQ=function(t){return"id"in t&&"source"in t&&"target"in t},LQ=function(t){var r=t.source,n=t.sourceHandle,o=t.target,i=t.targetHandle;return"reactflow__edge-".concat(r).concat(n||"","-").concat(o).concat(i||"")},Sx=function(t,r){if(typeof t>"u")return"";if(typeof t=="string")return t;var n=r?"".concat(r,"__"):"";return"".concat(n).concat(Object.keys(t).sort().map(function(o){return"".concat(o,"=").concat(t[o])}).join("&"))},zQ=function(t,r){return r.some(function(n){return n.source===t.source&&n.target===t.target&&(n.sourceHandle===t.sourceHandle||!n.sourceHandle&&!t.sourceHandle)&&(n.targetHandle===t.targetHandle||!n.targetHandle&&!t.targetHandle)})},BQ=function(t,r){if(!t.source||!t.target)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Can't create edge. An edge needs a source and a target. Help: https://reactflow.dev/error#600"),r;var n;return qQ(t)?n=ys({},t):n=ys(ys({},t),{},{id:LQ(t)}),zQ(n,r)?r:r.concat(n)},c5=function(t,r,n,o){var i=t.x,a=t.y,s=He(r,3),c=s[0],u=s[1],d=s[2],p=He(o,2),h=p[0],v=p[1],y={x:(i-c)/d,y:(a-u)/d};return n?{x:h*Math.round(y.x/h),y:v*Math.round(y.y/v)}:y},j_=function(t){if(t.length===0)return{x:0,y:0,width:0,height:0};var r=t.reduce(function(n,o){var i=o.positionAbsolute,a=o.position,s=o.width,c=o.height;return MQ(n,bu({x:i?i.x:a.x,y:i?i.y:a.y,width:s||0,height:c||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return DQ(r)},u5=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0,1],o=He(n,3),i=o[0],a=o[1],s=o[2],c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,d=bu({x:(r.x-i)/s,y:(r.y-a)/s,width:r.width/s,height:r.height/s}),p=[];return t.forEach(function(h){var v=h.positionAbsolute,y=h.width,g=h.height,b=h.selectable,x=b===void 0?!0:b;if(u&&!x)return!1;var w=bu(ys(ys({},v),{},{width:y||0,height:g||0})),E=Math.max(0,Math.min(d.x2,w.x2)-Math.max(d.x,w.x)),S=Math.max(0,Math.min(d.y2,w.y2)-Math.max(d.y,w.y)),_=Math.ceil(E*S),O=typeof y>"u"||typeof g>"u"||y===null||g===null,N=c&&_>0,R=(y||0)*(g||0),A=O||N||_>=R;A&&p.push(h)}),p},d5=function(t,r){var n=t.map(function(o){return o.id});return r.filter(function(o){return n.includes(o.source)||n.includes(o.target)})},f5=function(t,r,n,o,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:.1,s=r/(t.width*(1+a)),c=n/(t.height*(1+a)),u=Math.min(s,c),d=Fi(u,o,i),p=t.x+t.width/2,h=t.y+t.height/2,v=r/2-p*d,y=n/2-h*d;return[v,y,d]},qo=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.transition().duration(r)};function GT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ji(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GT(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function p5(e,t,r,n){var o,i,a,s,c,u,d,p,h,v,y,g;if(!e.parentNode)return n;var b=t.get(e.parentNode);return p5(b,t,r,{x:((o=n.x)!==null&&o!==void 0?o:0)+((i=(a=b.position)===null||a===void 0?void 0:a.x)!==null&&i!==void 0?i:0),y:((s=n.y)!==null&&s!==void 0?s:0)+((c=(u=b.position)===null||u===void 0?void 0:u.y)!==null&&c!==void 0?c:0),z:((d=(p=b[$t])===null||p===void 0?void 0:p.z)!==null&&d!==void 0?d:0)>((h=n.z)!==null&&h!==void 0?h:0)?(v=(y=b[$t])===null||y===void 0?void 0:y.z)!==null&&v!==void 0?v:0:(g=n.z)!==null&&g!==void 0?g:0})}function Jb(e,t){var r=new Map,n={};return e.forEach(function(o){var i,a=o5(o.zIndex)?o.zIndex:o.selected?1e3:0,s=t.get(o.id),c=ji(ji({width:s==null?void 0:s.width,height:s==null?void 0:s.height},o),{},{positionAbsolute:{x:o.position.x,y:o.position.y}});o.parentNode&&(c.parentNode=o.parentNode,n[o.parentNode]=!0),Object.defineProperty(c,$t,{enumerable:!1,value:{handleBounds:s==null||(i=s[$t])===null||i===void 0?void 0:i.handleBounds,z:a}}),r.set(o.id,c)}),r.forEach(function(o){if(o.parentNode&&!r.has(o.parentNode))throw new Error("Parent node ".concat(o.parentNode," not found"));if(o.parentNode||n[o.id]){var i,a,s=p5(o,r,n,ji(ji({},o.position),{},{z:(i=(a=o[$t])===null||a===void 0?void 0:a.z)!==null&&i!==void 0?i:0})),c=s.x,u=s.y,d=s.z;o.positionAbsolute={x:c,y:u},o[$t].z=d,n[o.id]&&(o[$t].isParent=!0)}}),r}function h5(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e(),n=r.nodeInternals,o=r.width,i=r.height,a=r.minZoom,s=r.maxZoom,c=r.d3Zoom,u=r.d3Selection,d=r.fitViewOnInitDone,p=r.fitViewOnInit;if((t.initial&&!d&&p||!t.initial)&&c&&u){var h=Array.from(n.values()).filter(function(R){return t.includeHiddenNodes?R.width&&R.height:!R.hidden}),v=h.every(function(R){return R.width&&R.height});if(h.length>0&&v){var y,g,b,x=j_(h),w=f5(x,o,i,(y=t.minZoom)!==null&&y!==void 0?y:a,(g=t.maxZoom)!==null&&g!==void 0?g:s,(b=t.padding)!==null&&b!==void 0?b:.1),E=He(w,3),S=E[0],_=E[1],O=E[2],N=$o.translate(S,_).scale(O);return typeof t.duration=="number"&&t.duration>0?c.transform(qo(u,t.duration),N):c.transform(u,N),!0}}return!1}function FQ(e,t){return e.forEach(function(r){var n=t.get(r.id);if(n){var o;t.set(n.id,ji(ji({},n),{},(o={},Ge(o,$t,n[$t]),Ge(o,"selected",r.selected),o)))}}),new Map(t)}function $Q(e,t){return t.map(function(r){var n=e.find(function(o){return o.id===r.id});return n&&(r.selected=n.selected),r})}function Ec(e){var t=e.changedNodes,r=e.changedEdges,n=e.get,o=e.set,i=n(),a=i.nodeInternals,s=i.edges,c=i.onNodesChange,u=i.onEdgesChange,d=i.hasDefaultNodes,p=i.hasDefaultEdges;t!=null&&t.length&&(d&&o({nodeInternals:FQ(t,a)}),c==null||c(t)),r!=null&&r.length&&(p&&o({edges:$Q(r,s)}),u==null||u(r))}var Ox=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],KT={width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:Ox,nodeExtent:Ox,nodesSelectionActive:!1,userSelectionActive:!1,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionMode:Qi.Strict,domNode:null,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,elementsSelectable:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,multiSelectionActive:!1,reactFlowVersion:"10.3.17",connectionStartHandle:null,connectOnClick:!0};function YT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function hn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YT(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var q_=JY(),HQ=q_.Provider,Ct=q_.useStore,er=q_.useStoreApi,VQ=function(){return ZY(function(t,r){return hn(hn({},KT),{},{setNodes:function(o){t({nodeInternals:Jb(o,r().nodeInternals)})},setEdges:function(o){var i=r(),a=i.defaultEdgeOptions,s=a===void 0?{}:a;t({edges:o.map(function(c){return hn(hn({},s),c)})})},setDefaultNodesAndEdges:function(o,i){var a=typeof o<"u",s=typeof i<"u",c=a?Jb(o,new Map):new Map,u=s?i:[];t({nodeInternals:c,edges:u,hasDefaultNodes:a,hasDefaultEdges:s})},updateNodeDimensions:function(o){var i=r(),a=i.onNodesChange,s=i.nodeInternals,c=i.fitViewOnInit,u=i.fitViewOnInitDone,d=i.fitViewOnInitOptions,p=i.domNode,h=p==null?void 0:p.querySelector(".react-flow__viewport");if(h){var v=window.getComputedStyle(h),y=new window.DOMMatrixReadOnly(v.transform),g=y.m22,b=o.reduce(function(w,E){var S=s.get(E.id);if(S){var _=D_(E.nodeElement),O=!!(_.width&&_.height&&(S.width!==_.width||S.height!==_.height||E.forceUpdate));O&&(s.set(S.id,hn(hn({},S),{},Ge({},$t,hn(hn({},S[$t]),{},{handleBounds:{source:WT(".source",E.nodeElement,g),target:WT(".target",E.nodeElement,g)}})),_)),w.push({id:S.id,type:"dimensions",dimensions:_}))}return w},[]),x=u||c&&!u&&h5(r,hn({initial:!0},d));t({nodeInternals:new Map(s),fitViewOnInitDone:x}),(b==null?void 0:b.length)>0&&(a==null||a(b))}},updateNodePositions:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=r(),c=s.onNodesChange,u=s.nodeInternals,d=s.hasDefaultNodes;if(d||c){var p=o.map(function(y){var g={id:y.id,type:"position",dragging:a};return i&&(g.positionAbsolute=y.positionAbsolute,g.position=y.position),g});if(p!=null&&p.length){if(d){var h=a5(p,Array.from(u.values())),v=Jb(h,u);t({nodeInternals:v})}c==null||c(p)}}},addSelectedNodes:function(o){var i=r(),a=i.multiSelectionActive,s=i.nodeInternals,c=i.edges,u,d=null;a?u=o.map(function(p){return vo(p,!0)}):(u=Di(Array.from(s.values()),o),d=Di(c,[])),Ec({changedNodes:u,changedEdges:d,get:r,set:t})},addSelectedEdges:function(o){var i=r(),a=i.multiSelectionActive,s=i.edges,c=i.nodeInternals,u,d=null;a?u=o.map(function(p){return vo(p,!0)}):(u=Di(s,o),d=Di(Array.from(c.values()),[])),Ec({changedNodes:d,changedEdges:u,get:r,set:t})},unselectNodesAndEdges:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=o.nodes,a=o.edges,s=r(),c=s.nodeInternals,u=s.edges,d=i||Array.from(c.values()),p=a||u,h=d.map(function(y){return y.selected=!1,vo(y.id,!1)}),v=p.map(function(y){return vo(y.id,!1)});Ec({changedNodes:h,changedEdges:v,get:r,set:t})},setMinZoom:function(o){var i=r(),a=i.d3Zoom,s=i.maxZoom;a==null||a.scaleExtent([o,s]),t({minZoom:o})},setMaxZoom:function(o){var i=r(),a=i.d3Zoom,s=i.minZoom;a==null||a.scaleExtent([s,o]),t({maxZoom:o})},setTranslateExtent:function(o){var i=r(),a=i.d3Zoom;a==null||a.translateExtent(o),t({translateExtent:o})},resetSelectedElements:function(){var o=r(),i=o.nodeInternals,a=o.edges,s=Array.from(i.values()),c=s.filter(function(d){return d.selected}).map(function(d){return vo(d.id,!1)}),u=a.filter(function(d){return d.selected}).map(function(d){return vo(d.id,!1)});Ec({changedNodes:c,changedEdges:u,get:r,set:t})},setNodeExtent:function(o){var i=r(),a=i.nodeInternals;a.forEach(function(s){s.positionAbsolute=r5(s.position,o)}),t({nodeExtent:o,nodeInternals:new Map(a)})},reset:function(){return t(hn({},KT))}})})};function Or(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let r=0,n;r<e.length;r++)(n=Or(e[r]))!==""&&(t+=(t&&" ")+n);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}function dr(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!Object.is(e[r[n]],t[r[n]]))return!1;return!0}function WQ(e){if(Array.isArray(e))return Ex(e)}function UQ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function GQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
55
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ho(e){return WQ(e)||UQ(e)||t5(e)||GQ()}var KQ={zoomIn:function(){},zoomOut:function(){},zoomTo:function(t){},getZoom:function(){return 1},setViewport:function(t){},getViewport:function(){return{x:0,y:0,zoom:1}},fitView:function(){},setCenter:function(t,r){},fitBounds:function(t){},project:function(t){return t},viewportInitialized:!1},YQ=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}},XQ=function(){var t=er(),r=Ct(YQ,dr),n=r.d3Zoom,o=r.d3Selection,i=T.useMemo(function(){return o&&n?{zoomIn:function(s){return n.scaleBy(qo(o,s==null?void 0:s.duration),1.2)},zoomOut:function(s){return n.scaleBy(qo(o,s==null?void 0:s.duration),1/1.2)},zoomTo:function(s,c){return n.scaleTo(qo(o,c==null?void 0:c.duration),s)},getZoom:function(){return t.getState().transform[2]},setViewport:function(s,c){var u,d,p,h=He(t.getState().transform,3),v=h[0],y=h[1],g=h[2],b=$o.translate((u=s.x)!==null&&u!==void 0?u:v,(d=s.y)!==null&&d!==void 0?d:y).scale((p=s.zoom)!==null&&p!==void 0?p:g);n.transform(qo(o,c==null?void 0:c.duration),b)},getViewport:function(){var s=He(t.getState().transform,3),c=s[0],u=s[1],d=s[2];return{x:c,y:u,zoom:d}},fitView:function(s){return h5(t.getState,s)},setCenter:function(s,c,u){var d=t.getState(),p=d.width,h=d.height,v=d.maxZoom,y=typeof(u==null?void 0:u.zoom)<"u"?u.zoom:v,g=p/2-s*y,b=h/2-c*y,x=$o.translate(g,b).scale(y);n.transform(qo(o,u==null?void 0:u.duration),x)},fitBounds:function(s,c){var u,d=t.getState(),p=d.width,h=d.height,v=d.minZoom,y=d.maxZoom,g=f5(s,p,h,v,y,(u=c==null?void 0:c.padding)!==null&&u!==void 0?u:.1),b=He(g,3),x=b[0],w=b[1],E=b[2],S=$o.translate(x,w).scale(E);n.transform(qo(o,c==null?void 0:c.duration),S)},project:function(s){var c=t.getState(),u=c.transform,d=c.snapToGrid,p=c.snapGrid;return c5(s,u,d,p)},viewportInitialized:!0}:KQ},[n,o]);return i};function XT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ci(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XT(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function v5(){var e=XQ(),t=er(),r=T.useCallback(function(){var p=t.getState(),h=p.nodeInternals,v=Array.from(h.values());return v.map(function(y){return Ci({},y)})},[]),n=T.useCallback(function(p){var h=t.getState(),v=h.nodeInternals;return v.get(p)},[]),o=T.useCallback(function(){var p=t.getState(),h=p.edges,v=h===void 0?[]:h;return v.map(function(y){return Ci({},y)})},[]),i=T.useCallback(function(p){var h=t.getState(),v=h.edges,y=v===void 0?[]:v;return y.find(function(g){return g.id===p})},[]),a=T.useCallback(function(p){var h=t.getState(),v=h.nodeInternals,y=h.setNodes,g=h.hasDefaultNodes,b=h.onNodesChange,x=Array.from(v.values()),w=typeof p=="function"?p(x):p;if(g)y(w);else if(b){var E=w.length===0?x.map(function(S){return{type:"remove",id:S.id}}):w.map(function(S){return{item:S,type:"reset"}});b(E)}},[]),s=T.useCallback(function(p){var h=t.getState(),v=h.edges,y=v===void 0?[]:v,g=h.setEdges,b=h.hasDefaultEdges,x=h.onEdgesChange,w=typeof p=="function"?p(y):p;if(b)g(w);else if(x){var E=w.length===0?y.map(function(S){return{type:"remove",id:S.id}}):w.map(function(S){return{item:S,type:"reset"}});x(E)}},[]),c=T.useCallback(function(p){var h=Array.isArray(p)?p:[p],v=t.getState(),y=v.nodeInternals,g=v.setNodes,b=v.hasDefaultNodes,x=v.onNodesChange;if(b){var w=Array.from(y.values()),E=[].concat(w,Ho(h));g(E)}else if(x){var S=h.map(function(_){return{item:_,type:"add"}});x(S)}},[]),u=T.useCallback(function(p){var h=Array.isArray(p)?p:[p],v=t.getState(),y=v.edges,g=y===void 0?[]:y,b=v.setEdges,x=v.hasDefaultEdges,w=v.onEdgesChange;if(x)b([].concat(Ho(g),Ho(h)));else if(w){var E=h.map(function(S){return{item:S,type:"add"}});w(E)}},[]),d=T.useCallback(function(){var p=t.getState(),h=p.nodeInternals,v=p.edges,y=v===void 0?[]:v,g=p.transform,b=Array.from(h.values()),x=He(g,3),w=x[0],E=x[1],S=x[2];return{nodes:b.map(function(_){return Ci({},_)}),edges:y.map(function(_){return Ci({},_)}),viewport:{x:w,y:E,zoom:S}}},[]);return T.useMemo(function(){return Ci(Ci({},e),{},{getNodes:r,getNode:n,getEdges:o,getEdge:i,setNodes:a,setEdges:s,addNodes:c,addEdges:u,toObject:d})},[e,r,n,o,i,a,s,c,u,d])}function ZQ(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function fd(e,t){if(e==null)return{};var r=ZQ(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function JQ(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},T.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function QQ(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},T.createElement("path",{d:"M0 0h32v4.2H0z"}))}function eee(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},T.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function tee(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},T.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function ree(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},T.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}var nee=["children","className"];function ZT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function oee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZT(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Sc=function(t){var r=t.children,n=t.className,o=fd(t,nee);return T.createElement("button",oee({type:"button",className:Or(["react-flow__controls-button",n])},o),r)},iee=function(t){return t.nodesDraggable&&t.nodesConnectable&&t.elementsSelectable},aee=function(t){var r=t.style,n=t.showZoom,o=n===void 0?!0:n,i=t.showFitView,a=i===void 0?!0:i,s=t.showInteractive,c=s===void 0?!0:s,u=t.fitViewOptions,d=t.onZoomIn,p=t.onZoomOut,h=t.onFitView,v=t.onInteractiveChange,y=t.className,g=t.children,b=er(),x=T.useState(!1),w=He(x,2),E=w[0],S=w[1],_=Ct(iee),O=v5(),N=O.zoomIn,R=O.zoomOut,A=O.fitView;if(T.useEffect(function(){S(!0)},[]),!E)return null;var D=function(){N==null||N(),d==null||d()},B=function(){R==null||R(),p==null||p()},j=function(){A==null||A(u),h==null||h()},M=function(){b.setState({nodesDraggable:!_,nodesConnectable:!_,elementsSelectable:!_}),v==null||v(!_)};return T.createElement("div",{className:Or(["react-flow__controls",y]),style:r},o&&T.createElement(T.Fragment,null,T.createElement(Sc,{onClick:D,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in"},T.createElement(JQ,null)),T.createElement(Sc,{onClick:B,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out"},T.createElement(QQ,null))),a&&T.createElement(Sc,{className:"react-flow__controls-fitview",onClick:j,title:"fit view","aria-label":"fit view"},T.createElement(eee,null)),c&&T.createElement(Sc,{className:"react-flow__controls-interactive",onClick:M,title:"toggle interactivity","aria-label":"toggle interactivity"},_?T.createElement(ree,null):T.createElement(tee,null)),g)};aee.displayName="Controls";var see=function(t,r,n){return T.createElement("path",{stroke:n,strokeWidth:r,d:"M".concat(t/2," 0 V").concat(t," M0 ").concat(t/2," H").concat(t)})},lee=function(t,r){return T.createElement("circle",{cx:t,cy:t,r:t,fill:r})},Oc;function JT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function QT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JT(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var cee=(Oc={},Ge(Oc,Ko.Dots,"#81818a"),Ge(Oc,Ko.Lines,"#eee"),Oc),uee=function(t){return t.transform},g5=function(t){var r=t.variant,n=r===void 0?Ko.Dots:r,o=t.gap,i=o===void 0?15:o,a=t.size,s=a===void 0?.4:a,c=t.color,u=t.style,d=t.className,p=T.useRef(null),h=T.useState(null),v=He(h,2),y=v[0],g=v[1],b=Ct(uee),x=He(b,3),w=x[0],E=x[1],S=x[2];T.useEffect(function(){var B=document.querySelectorAll(".react-flow__background"),j=Array.from(B).findIndex(function(M){return M===p.current});g("pattern-".concat(j))},[]);var _=i*S||1,O=w%_,N=E%_,R=n===Ko.Lines,A=c||cee[n],D=R?see(_,s,A):lee(s*S,A);return T.createElement("svg",{className:Or(["react-flow__background","react-flow__container",d]),style:QT(QT({},u),{},{width:"100%",height:"100%"}),ref:p},y&&T.createElement(T.Fragment,null,T.createElement("pattern",{id:y,x:O,y:N,width:_,height:_,patternUnits:"userSpaceOnUse"},D),T.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#".concat(y,")")})))};g5.displayName="Background";var dee=T.memo(g5),fee=["paid-pro","paid-sponsor","paid-enterprise","paid-custom"];function pee(e){var t=e.proOptions,r=e.position,n=r===void 0?"bottom-right":r;if(t!=null&&t.account&&fee.includes(t==null?void 0:t.account)&&t!==null&&t!==void 0&&t.hideAttribution)return null;var o="".concat(n).split("-");return T.createElement("div",{className:Or(["react-flow__attribution"].concat(Ho(o))),"data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev/pricing"},T.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer"},"React Flow"))}var hee=["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"];function eA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function vee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var gee=function(t){var r=t.x,n=t.y,o=t.label,i=t.labelStyle,a=i===void 0?{}:i,s=t.labelShowBg,c=s===void 0?!0:s,u=t.labelBgStyle,d=u===void 0?{}:u,p=t.labelBgPadding,h=p===void 0?[2,4]:p,v=t.labelBgBorderRadius,y=v===void 0?2:v,g=t.children,b=t.className,x=fd(t,hee),w=T.useRef(null),E=T.useState({x:0,y:0,width:0,height:0}),S=He(E,2),_=S[0],O=S[1],N=Or(["react-flow__edge-textwrapper",b]);return T.useEffect(function(){if(w.current){var R=w.current.getBBox();O({x:R.x,y:R.y,width:R.width,height:R.height})}},[o]),typeof o>"u"||!o?null:T.createElement("g",vee({transform:"translate(".concat(r-_.width/2," ").concat(n-_.height/2,")"),className:N},x),c&&T.createElement("rect",{width:_.width+2*h[0],x:-h[0],y:-h[1],height:_.height+2*h[1],className:"react-flow__edge-textbg",style:d,rx:y,ry:y}),T.createElement("text",{className:"react-flow__edge-text",y:_.height/2,dy:"0.3em",ref:w,style:a},o),g)},mee=T.memo(gee),pd=(function(e){var t=e.path,r=e.centerX,n=e.centerY,o=e.label,i=e.labelStyle,a=e.labelShowBg,s=e.labelBgStyle,c=e.labelBgPadding,u=e.labelBgBorderRadius,d=e.style,p=e.markerEnd,h=e.markerStart,v=o?T.createElement(mee,{x:r,y:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:u}):null;return T.createElement(T.Fragment,null,T.createElement("path",{style:d,d:t,className:"react-flow__edge-path",markerEnd:p,markerStart:h}),v)});function yu(e){var t=e.pos,r=e.x1,n=e.y1,o=e.x2,i=e.y2,a,s;switch(t){case Se.Left:case Se.Right:a=.5*(r+o),s=n;break;case Se.Top:case Se.Bottom:a=r,s=.5*(n+i);break}return[a,s]}function m5(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,o=n===void 0?Se.Bottom:n,i=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Se.Top:s,u=yu({pos:o,x1:t,y1:r,x2:i,y2:a}),d=He(u,2),p=d[0],h=d[1],v=yu({pos:c,x1:i,y1:a,x2:t,y2:r}),y=He(v,2),g=y[0],b=y[1];return"M".concat(t,",").concat(r," C").concat(p,",").concat(h," ").concat(g,",").concat(b," ").concat(i,",").concat(a)}function bee(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,o=n===void 0?Se.Bottom:n,i=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Se.Top:s,u=yu({pos:o,x1:t,y1:r,x2:i,y2:a}),d=He(u,2),p=d[0],h=d[1],v=yu({pos:c,x1:i,y1:a,x2:t,y2:r}),y=He(v,2),g=y[0],b=y[1],x=t*.125+p*.375+g*.375+i*.125,w=r*.125+h*.375+b*.375+a*.125,E=Math.abs(x-t),S=Math.abs(w-r);return[x,w,E,S]}var b5=T.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,o=e.targetY,i=e.sourcePosition,a=i===void 0?Se.Bottom:i,s=e.targetPosition,c=s===void 0?Se.Top:s,u=e.label,d=e.labelStyle,p=e.labelShowBg,h=e.labelBgStyle,v=e.labelBgPadding,y=e.labelBgBorderRadius,g=e.style,b=e.markerEnd,x=e.markerStart,w={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:o,targetPosition:c},E=m5(w),S=bee(w),_=He(S,2),O=_[0],N=_[1];return T.createElement(pd,{path:E,centerX:O,centerY:N,label:u,labelStyle:d,labelShowBg:p,labelBgStyle:h,labelBgPadding:v,labelBgBorderRadius:y,style:g,markerEnd:b,markerStart:x})});function tA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function yee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var rA=[Se.Left,Se.Right],y5=function(t){var r=t.sourceX,n=t.sourceY,o=t.targetX,i=t.targetY,a=t.sourcePosition,s=a===void 0?Se.Bottom:a,c=t.targetPosition,u=c===void 0?Se.Top:c,d=rA.includes(s),p=rA.includes(u),h=d&&!p||p&&!d;if(h){var v=d?Math.abs(o-r):0,y=r>o?r-v:r+v,g=d?0:Math.abs(i-n),b=n<i?n+g:n-g;return[y,b,v,g]}var x=Math.abs(o-r)/2,w=o<r?o+x:o-x,E=Math.abs(i-n)/2,S=i<n?i+E:i-E;return[w,S,x,E]};function Wa(e,t,r){return r===void 0?r:function(n){var o=t().edges.find(function(i){return i.id===e});r(n,yee({},o))}}var Qb=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},ey=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},ty=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},ry=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},ny=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)},oy=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},iy=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},ay=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)};function Cx(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,o=n===void 0?Se.Bottom:n,i=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Se.Top:s,u=e.borderRadius,d=u===void 0?5:u,p=e.centerX,h=e.centerY,v=y5({sourceX:t,sourceY:r,targetX:i,targetY:a}),y=He(v,4),g=y[0],b=y[1],x=y[2],w=y[3],E=Math.min(d,Math.abs(i-t)),S=Math.min(d,Math.abs(a-r)),_=Math.min(E,S,x,w),O=[Se.Left,Se.Right],N=typeof p<"u"?p:g,R=typeof h<"u"?h:b,A=null,D=null;return t<=i?(A=r<=a?Qb(t,R,_):oy(t,R,_),D=r<=a?ay(i,R,_):ry(i,R,_)):(A=r<a?ty(t,R,_):iy(t,R,_),D=r<a?ny(i,R,_):ey(i,R,_)),O.includes(o)&&O.includes(c)?t<=i?(A=r<=a?ay(N,r,_):ry(N,r,_),D=r<=a?Qb(N,a,_):oy(N,a,_)):(o===Se.Right&&c===Se.Left||o===Se.Left&&c===Se.Right||o===Se.Left&&c===Se.Left)&&(A=r<=a?ny(N,r,_):ey(N,r,_),D=r<=a?ty(N,a,_):iy(N,a,_)):O.includes(o)&&!O.includes(c)?(t<=i?A=r<=a?ay(i,r,_):ry(i,r,_):A=r<=a?ny(i,r,_):ey(i,r,_),D=""):!O.includes(o)&&O.includes(c)&&(t<=i?A=r<=a?Qb(t,a,_):oy(t,a,_):A=r<=a?ty(t,a,_):iy(t,a,_),D=""),"M ".concat(t,",").concat(r).concat(A).concat(D,"L ").concat(i,",").concat(a)}var L_=T.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,o=e.targetY,i=e.label,a=e.labelStyle,s=e.labelShowBg,c=e.labelBgStyle,u=e.labelBgPadding,d=e.labelBgBorderRadius,p=e.style,h=e.sourcePosition,v=h===void 0?Se.Bottom:h,y=e.targetPosition,g=y===void 0?Se.Top:y,b=e.markerEnd,x=e.markerStart,w=e.borderRadius,E=w===void 0?5:w,S=y5({sourceX:t,sourceY:r,targetX:n,targetY:o,sourcePosition:v,targetPosition:g}),_=He(S,2),O=_[0],N=_[1],R=Cx({sourceX:t,sourceY:r,sourcePosition:v,targetX:n,targetY:o,targetPosition:g,borderRadius:E});return T.createElement(pd,{path:R,centerX:O,centerY:N,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:p,markerEnd:b,markerStart:x})});function nA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function oA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var w5=T.memo(function(e){return T.createElement(L_,oA(oA({},e),{},{borderRadius:0}))}),x5=T.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,o=e.targetY,i=e.label,a=e.labelStyle,s=e.labelShowBg,c=e.labelBgStyle,u=e.labelBgPadding,d=e.labelBgBorderRadius,p=e.style,h=e.markerEnd,v=e.markerStart,y=Math.abs(o-r)/2,g=o<r?o+y:o-y,b=Math.abs(n-t)/2,x=n<t?n+b:n-b,w="M ".concat(t,",").concat(r,"L ").concat(n,",").concat(o);return T.createElement(pd,{path:w,centerX:x,centerY:g,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:p,markerEnd:h,markerStart:v})});function Cc(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function wu(e){var t=e.pos,r=e.x1,n=e.y1,o=e.x2,i=e.y2,a=e.c,s,c;switch(t){case Se.Left:s=r-Cc(r-o,a),c=n;break;case Se.Right:s=r+Cc(o-r,a),c=n;break;case Se.Top:s=r,c=n-Cc(n-i,a);break;case Se.Bottom:s=r,c=n+Cc(i-n,a);break}return[s,c]}function hd(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,o=n===void 0?Se.Bottom:n,i=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Se.Top:s,u=e.curvature,d=u===void 0?.25:u,p=wu({pos:o,x1:t,y1:r,x2:i,y2:a,c:d}),h=He(p,2),v=h[0],y=h[1],g=wu({pos:c,x1:i,y1:a,x2:t,y2:r,c:d}),b=He(g,2),x=b[0],w=b[1];return"M".concat(t,",").concat(r," C").concat(v,",").concat(y," ").concat(x,",").concat(w," ").concat(i,",").concat(a)}function wee(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,o=n===void 0?Se.Bottom:n,i=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Se.Top:s,u=e.curvature,d=u===void 0?.25:u,p=wu({pos:o,x1:t,y1:r,x2:i,y2:a,c:d}),h=He(p,2),v=h[0],y=h[1],g=wu({pos:c,x1:i,y1:a,x2:t,y2:r,c:d}),b=He(g,2),x=b[0],w=b[1],E=t*.125+v*.375+x*.375+i*.125,S=r*.125+y*.375+w*.375+a*.125,_=Math.abs(E-t),O=Math.abs(S-r);return[E,S,_,O]}var Ix=T.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,o=e.targetY,i=e.sourcePosition,a=i===void 0?Se.Bottom:i,s=e.targetPosition,c=s===void 0?Se.Top:s,u=e.label,d=e.labelStyle,p=e.labelShowBg,h=e.labelBgStyle,v=e.labelBgPadding,y=e.labelBgBorderRadius,g=e.style,b=e.markerEnd,x=e.markerStart,w=e.curvature,E={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:o,targetPosition:c,curvature:w},S=hd(E),_=wee(E),O=He(_,2),N=O[0],R=O[1];return T.createElement(pd,{path:S,centerX:N,centerY:R,label:u,labelStyle:d,labelShowBg:p,labelBgStyle:h,labelBgPadding:v,labelBgBorderRadius:y,style:g,markerEnd:b,markerStart:x})}),z_=T.createContext(null),xee=z_.Provider;z_.Consumer;function Rx(e,t,r,n,o,i,a){var s=a.elementFromPoint(e.clientX,e.clientY),c=(s==null?void 0:s.classList.contains("target"))||!1,u=(s==null?void 0:s.classList.contains("source"))||!1,d={elementBelow:s,isValid:!1,connection:{source:null,target:null,sourceHandle:null,targetHandle:null},isHoveringHandle:!1};if(s&&(c||u)){d.isHoveringHandle=!0;var p=s.getAttribute("data-nodeid"),h=s.getAttribute("data-handleid"),v=r?{source:p,sourceHandle:h,target:n,targetHandle:o}:{source:n,sourceHandle:o,target:p,targetHandle:h};d.connection=v;var y=t===Qi.Strict?r&&u||!r&&c:!0;y&&(d.isValid=i(v))}return d}function sy(e){e==null||e.classList.remove("react-flow__handle-valid"),e==null||e.classList.remove("react-flow__handle-connecting")}function _5(e){var t=e.event,r=e.handleId,n=e.nodeId,o=e.onConnect,i=e.isTarget,a=e.getState,s=e.setState,c=e.isValidConnection,u=e.elementEdgeUpdaterType,d=e.onEdgeUpdateEnd,p=t.target.closest(".react-flow"),h=n5(t.target);if(!h)return;var v=h.elementFromPoint(t.clientX,t.clientY),y=v==null?void 0:v.classList.contains("target"),g=v==null?void 0:v.classList.contains("source");if(!p||!y&&!g&&!u)return;var b=a(),x=b.onConnectStart,w=b.connectionMode,E=u||(y?"target":"source"),S=p.getBoundingClientRect(),_;s({connectionPosition:{x:t.clientX-S.left,y:t.clientY-S.top},connectionNodeId:n,connectionHandleId:r,connectionHandleType:E}),x==null||x(t,{nodeId:n,handleId:r,handleType:E});function O(R){s({connectionPosition:{x:R.clientX-S.left,y:R.clientY-S.top}});var A=Rx(R,w,i,n,r,c,h),D=A.connection,B=A.elementBelow,j=A.isValid,M=A.isHoveringHandle;if(!M)return sy(_);D.source!==D.target&&B&&(sy(_),_=B,B.classList.add("react-flow__handle-connecting"),B.classList.toggle("react-flow__handle-valid",j))}function N(R){var A=a(),D=A.onConnectStop,B=A.onConnectEnd,j=Rx(R,w,i,n,r,c,h),M=j.connection,P=j.isValid;D==null||D(R),P&&(o==null||o(M)),B==null||B(R),u&&d&&d(R),sy(_),s({connectionNodeId:null,connectionHandleId:null,connectionHandleType:null}),h.removeEventListener("mousemove",O),h.removeEventListener("mouseup",N)}h.addEventListener("mousemove",O),h.addEventListener("mouseup",N)}var _ee=["type","position","isValidConnection","isConnectable","id","onConnect","children","className","onMouseDown"];function iA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ly(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Eee=function(){return!0},See=function(t){return{connectionStartHandle:t.connectionStartHandle,connectOnClick:t.connectOnClick}},E5=T.forwardRef(function(e,t){var r=e.type,n=r===void 0?"source":r,o=e.position,i=o===void 0?Se.Top:o,a=e.isValidConnection,s=a===void 0?Eee:a,c=e.isConnectable,u=c===void 0?!0:c,d=e.id,p=e.onConnect,h=e.children,v=e.className,y=e.onMouseDown,g=fd(e,_ee),b=er(),x=T.useContext(z_),w=Ct(See,dr),E=w.connectionStartHandle,S=w.connectOnClick,_=d||null,O=n==="target",N=function(B){var j=b.getState(),M=j.defaultEdgeOptions,P=j.onConnect,V=j.hasDefaultEdges,q=ly(ly({},M),B);if(V){var G=b.getState(),W=G.edges;b.setState({edges:BQ(q,W)})}P==null||P(q),p==null||p(q)},R=function(B){B.button===0&&_5({event:B,handleId:_,nodeId:x,onConnect:N,isTarget:O,getState:b.getState,setState:b.setState,isValidConnection:s}),y==null||y(B)},A=function(B){var j=b.getState(),M=j.onClickConnectStart,P=j.onClickConnectStop,V=j.onClickConnectEnd,q=j.connectionMode;if(!E){M==null||M(B,{nodeId:x,handleId:_,handleType:n}),b.setState({connectionStartHandle:{nodeId:x,type:n,handleId:_}});return}var G=n5(B.target),W=Rx(B,q,E.type==="target",E.nodeId,E.handleId||null,s,G),Q=W.connection,z=W.isValid;P==null||P(B),z&&N(Q),V==null||V(B),b.setState({connectionStartHandle:null})};return T.createElement("div",ly({"data-handleid":_,"data-nodeid":x,"data-handlepos":i,className:Or(["react-flow__handle","react-flow__handle-".concat(i),"nodrag",v,{source:!O,target:O,connectable:u,connecting:(E==null?void 0:E.nodeId)===x&&(E==null?void 0:E.handleId)===_&&(E==null?void 0:E.type)===n}]),onMouseDown:R,onClick:S?A:void 0,ref:t},g),h)});E5.displayName="Handle";var xu=T.memo(E5),S5=function(t){var r=t.data,n=t.isConnectable,o=t.targetPosition,i=o===void 0?Se.Top:o,a=t.sourcePosition,s=a===void 0?Se.Bottom:a;return T.createElement(T.Fragment,null,T.createElement(xu,{type:"target",position:i,isConnectable:n}),r==null?void 0:r.label,T.createElement(xu,{type:"source",position:s,isConnectable:n}))};S5.displayName="DefaultNode";var Nx=T.memo(S5),O5=function(t){var r=t.data,n=t.isConnectable,o=t.sourcePosition,i=o===void 0?Se.Bottom:o;return T.createElement(T.Fragment,null,r==null?void 0:r.label,T.createElement(xu,{type:"source",position:i,isConnectable:n}))};O5.displayName="InputNode";var C5=T.memo(O5),I5=function(t){var r=t.data,n=t.isConnectable,o=t.targetPosition,i=o===void 0?Se.Top:o;return T.createElement(T.Fragment,null,T.createElement(xu,{type:"target",position:i,isConnectable:n}),r==null?void 0:r.label)};I5.displayName="OutputNode";var R5=T.memo(I5),Oee=function(t){return{selectedNodes:Array.from(t.nodeInternals.values()).filter(function(r){return r.selected}),selectedEdges:t.edges.filter(function(r){return r.selected})}},Cee=function(t,r){var n=t.selectedNodes.map(function(s){return s.id}),o=r.selectedNodes.map(function(s){return s.id}),i=t.selectedEdges.map(function(s){return s.id}),a=r.selectedEdges.map(function(s){return s.id});return dr(n,o)&&dr(i,a)};function Iee(e){var t=e.onSelectionChange,r=Ct(Oee,Cee),n=r.selectedNodes,o=r.selectedEdges;return T.useEffect(function(){t({nodes:n,edges:o})},[n,o]),null}var Ree=T.memo(Iee),Nee=function(t){return{setNodes:t.setNodes,setEdges:t.setEdges,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset}};function uo(e,t){T.useEffect(function(){typeof e<"u"&&t(e)},[e])}function dt(e,t,r){T.useEffect(function(){typeof t<"u"&&r(Ge({},e,t))},[t])}var Pee=function(t){var r=t.nodes,n=t.edges,o=t.defaultNodes,i=t.defaultEdges,a=t.onConnect,s=t.onConnectStart,c=t.onConnectStop,u=t.onConnectEnd,d=t.onClickConnectStart,p=t.onClickConnectStop,h=t.onClickConnectEnd,v=t.nodesDraggable,y=t.nodesConnectable,g=t.minZoom,b=t.maxZoom,x=t.nodeExtent,w=t.onNodesChange,E=t.onEdgesChange,S=t.elementsSelectable,_=t.connectionMode,O=t.snapGrid,N=t.snapToGrid,R=t.translateExtent,A=t.connectOnClick,D=t.defaultEdgeOptions,B=t.fitView,j=t.fitViewOptions,M=t.onNodesDelete,P=t.onEdgesDelete,V=t.onNodeDrag,q=t.onNodeDragStart,G=t.onNodeDragStop,W=t.onSelectionDrag,Q=t.onSelectionDragStart,z=t.onSelectionDragStop,U=Ct(Nee,dr),ie=U.setNodes,te=U.setEdges,$=U.setDefaultNodesAndEdges,K=U.setMinZoom,Z=U.setMaxZoom,H=U.setTranslateExtent,Y=U.setNodeExtent,oe=U.reset,re=er();return T.useEffect(function(){return $(o,i),function(){oe()}},[]),dt("defaultEdgeOptions",D,re.setState),dt("connectionMode",_,re.setState),dt("onConnect",a,re.setState),dt("onConnectStart",s,re.setState),dt("onConnectStop",c,re.setState),dt("onConnectEnd",u,re.setState),dt("onClickConnectStart",d,re.setState),dt("onClickConnectStop",p,re.setState),dt("onClickConnectEnd",h,re.setState),dt("nodesDraggable",v,re.setState),dt("nodesConnectable",y,re.setState),dt("elementsSelectable",S,re.setState),dt("snapToGrid",N,re.setState),dt("snapGrid",O,re.setState),dt("onNodesChange",w,re.setState),dt("onEdgesChange",E,re.setState),dt("connectOnClick",A,re.setState),dt("fitViewOnInit",B,re.setState),dt("fitViewOnInitOptions",j,re.setState),dt("onNodesDelete",M,re.setState),dt("onEdgesDelete",P,re.setState),dt("onNodeDrag",V,re.setState),dt("onNodeDragStart",q,re.setState),dt("onNodeDragStop",G,re.setState),dt("onSelectionDrag",W,re.setState),dt("onSelectionDragStart",Q,re.setState),dt("onSelectionDragStop",z,re.setState),uo(r,ie),uo(n,te),uo(o,ie),uo(i,te),uo(g,K),uo(b,Z),uo(R,H),uo(x,Y),null},Tee=".react-flow{height:100%;overflow:hidden;position:relative;width:100%}.react-flow__container{height:100%;left:0;position:absolute;top:0;width:100%}.react-flow__pane{z-index:1}.react-flow__viewport{pointer-events:none;transform-origin:0 0;z-index:2}.react-flow__renderer{z-index:4}.react-flow__selectionpane{z-index:5}.react-flow .react-flow__edges{overflow:visible;pointer-events:none}.react-flow .react-flow__connectionline{z-index:1001}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.inactive{pointer-events:none}@-webkit-keyframes dashdraw{0%{stroke-dashoffset:10}}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edge-path{fill:none}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__connection-path{fill:none}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{box-sizing:border-box;pointer-events:all;position:absolute;transform-origin:0 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.react-flow__nodesselection{pointer-events:none;transform-origin:left top;z-index:3}.react-flow__nodesselection-rect{cursor:-webkit-grab;cursor:grab;pointer-events:all;position:absolute}.react-flow__handle{pointer-events:none;position:absolute}.react-flow__handle.connectable{pointer-events:all}.react-flow__handle-bottom{bottom:-4px;left:50%;top:auto;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{left:-4px;top:50%;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__controls{bottom:20px;left:15px;position:absolute;z-index:5}.react-flow__controls-button{border:none;height:24px;width:24px}.react-flow__controls-button svg{width:100%}.react-flow__minimap{bottom:20px;position:absolute;right:15px;z-index:5}.react-flow__attribution{background:hsla(0,0%,100%,.5);color:#999;font-size:10px;padding:2px 3px;position:absolute;z-index:1000}.react-flow__attribution a{color:#555;text-decoration:none}.react-flow__attribution.top{top:0}.react-flow__attribution.bottom{bottom:0}.react-flow__attribution.left{left:0}.react-flow__attribution.right{right:0}.react-flow__attribution.center{left:50%;transform:translateX(-50%)}",Aee=Tee,kee=".react-flow__edge.selected .react-flow__edge-path{stroke:#555}.react-flow__edge.animated path{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-path{stroke:#b1b1b7;stroke-width:1}.react-flow__edge-text{font-size:10px}.react-flow__edge-textbg{fill:#fff}.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1}.react-flow__node{cursor:-webkit-grab;cursor:grab}.react-flow__node-default,.react-flow__node-group,.react-flow__node-input,.react-flow__node-output{background:#fff;border:1px solid #1a192b;border-radius:3px;color:#222;font-size:12px;padding:10px;text-align:center;width:150px}.react-flow__node-default.selected,.react-flow__node-group.selected,.react-flow__node-input.selected,.react-flow__node-output.selected{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-default .react-flow__handle,.react-flow__node-group .react-flow__handle,.react-flow__node-input .react-flow__handle,.react-flow__node-output .react-flow__handle{background:#1a192b}.react-flow__node-default.selectable:hover,.react-flow__node-group.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover{box-shadow:0 1px 4px 1px rgba(0,0,0,.08)}.react-flow__node-default.selectable.selected,.react-flow__node-group.selectable.selected,.react-flow__node-input.selectable.selected,.react-flow__node-output.selectable.selected{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background:hsla(0,0%,94%,.25);border-color:#1a192b}.react-flow__nodesselection-rect,.react-flow__selection{background:rgba(0,89,220,.08);border:1px dotted rgba(0,89,220,.8)}.react-flow__handle{background:#555;border:1px solid #fff;border-radius:100%;height:6px;width:6px}.react-flow__handle.connectable{cursor:crosshair}.react-flow__minimap{background-color:#fff}.react-flow__controls{box-shadow:0 0 2px 1px rgba(0,0,0,.08)}.react-flow__controls-button{align-items:center;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;cursor:pointer;display:flex;height:16px;justify-content:center;padding:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:16px}.react-flow__controls-button svg{max-height:12px;max-width:12px}.react-flow__controls-button:hover{background:#f4f4f4}",Mee=kee,Dee=function(t,r,n){return n===Se.Left?t-r:n===Se.Right?t+r:t},jee=function(t,r,n){return n===Se.Top?t-r:n===Se.Bottom?t+r:t},aA=function(t){var r=t.className,n=t.position,o=t.centerX,i=t.centerY,a=t.radius,s=a===void 0?10:a;return T.createElement("circle",{className:Or(["react-flow__edgeupdater",r]),cx:Dee(o,s,n),cy:jee(i,s,n),r:s,stroke:"transparent",fill:"transparent"})},Ii=(function(e){var t=function(n){var o=n.id,i=n.className,a=n.type,s=n.data,c=n.onClick,u=n.onEdgeDoubleClick,d=n.selected,p=n.animated,h=n.label,v=n.labelStyle,y=n.labelShowBg,g=n.labelBgStyle,b=n.labelBgPadding,x=n.labelBgBorderRadius,w=n.style,E=n.source,S=n.target,_=n.sourceX,O=n.sourceY,N=n.targetX,R=n.targetY,A=n.sourcePosition,D=n.targetPosition,B=n.elementsSelectable,j=n.hidden,M=n.sourceHandleId,P=n.targetHandleId,V=n.onContextMenu,q=n.onMouseEnter,G=n.onMouseMove,W=n.onMouseLeave,Q=n.edgeUpdaterRadius,z=n.onEdgeUpdate,U=n.onEdgeUpdateStart,ie=n.onEdgeUpdateEnd,te=n.markerEnd,$=n.markerStart,K=n.rfId,Z=T.useState(!1),H=He(Z,2),Y=H[0],oe=H[1],re=er(),se=function(ct){var Lt=re.getState(),pr=Lt.edges,Cr=Lt.addSelectedEdges,Kt=pr.find(function(Tt){return Tt.id===o});B&&(re.setState({nodesSelectionActive:!1}),Cr([o])),c==null||c(ct,Kt)},ee=Wa(o,re.getState,u),we=Wa(o,re.getState,V),ve=Wa(o,re.getState,q),Ee=Wa(o,re.getState,G),pe=Wa(o,re.getState,W),ce=function(ct,Lt){var pr=Lt?S:E,Cr=(Lt?P:M)||null,Kt=Lt?"target":"source",Tt=function(){return!0},Yt=Lt,ln=re.getState().edges.find(function(cn){return cn.id===o});U==null||U(ct,ln,Kt);var Oo=ie?function(cn){return ie(cn,ln,Kt)}:void 0,Xn=function(ai){return z==null?void 0:z(ln,ai)};_5({event:ct,handleId:Cr,nodeId:pr,onConnect:Xn,isTarget:Yt,getState:re.getState,setState:re.setState,isValidConnection:Tt,elementEdgeUpdaterType:Kt,onEdgeUpdateEnd:Oo})},Ce=function(ct){return ce(ct,!0)},ke=function(ct){return ce(ct,!1)},Ke=function(){return oe(!0)},ze=function(){return oe(!1)},rt=T.useMemo(function(){return"url(#".concat(Sx($,K),")")},[$,K]),Xe=T.useMemo(function(){return"url(#".concat(Sx(te,K),")")},[te,K]);if(j)return null;var It=!B&&!c,lt=typeof z<"u",Wt=Or(["react-flow__edge","react-flow__edge-".concat(a),i,{selected:d,animated:p,inactive:It,updating:Y}]);return T.createElement("g",{className:Wt,onClick:se,onDoubleClick:ee,onContextMenu:we,onMouseEnter:ve,onMouseMove:Ee,onMouseLeave:pe},T.createElement(e,{id:o,source:E,target:S,selected:d,animated:p,label:h,labelStyle:v,labelShowBg:y,labelBgStyle:g,labelBgPadding:b,labelBgBorderRadius:x,data:s,style:w,sourceX:_,sourceY:O,targetX:N,targetY:R,sourcePosition:A,targetPosition:D,sourceHandleId:M,targetHandleId:P,markerStart:rt,markerEnd:Xe,"data-testid":"rf__edge-".concat(o)}),lt&&T.createElement("g",{onMouseDown:Ce,onMouseEnter:Ke,onMouseOut:ze},T.createElement(aA,{position:A,centerX:_,centerY:O,radius:Q})),lt&&T.createElement("g",{onMouseDown:ke,onMouseEnter:Ke,onMouseOut:ze},T.createElement(aA,{position:D,centerX:N,centerY:R,radius:Q})))};return t.displayName="EdgeWrapper",T.memo(t)});function sA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function lA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qee(e){var t={default:Ii(e.default||Ix),straight:Ii(e.bezier||x5),step:Ii(e.step||w5),smoothstep:Ii(e.step||L_),simplebezier:Ii(e.simplebezier||b5)},r={},n=Object.keys(e).filter(function(o){return!["default","bezier"].includes(o)}).reduce(function(o,i){return o[i]=Ii(e[i]||Ix),o},r);return lA(lA({},t),n)}function cA(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=((r==null?void 0:r.x)||0)+t.x,o=((r==null?void 0:r.y)||0)+t.y,i=(r==null?void 0:r.width)||t.width,a=(r==null?void 0:r.height)||t.height;switch(e){case Se.Top:return{x:n+i/2,y:o};case Se.Right:return{x:n+i,y:o+a/2};case Se.Bottom:return{x:n+i/2,y:o+a};case Se.Left:return{x:n,y:o+a/2}}}function uA(e,t){if(!e)return null;var r=null;return e.length===1||!t?r=e[0]:t&&(r=e.find(function(n){return n.id===t})),typeof r>"u"?null:r}var Lee=function(t,r,n,o,i,a){var s=cA(n,t,r),c=cA(a,o,i);return{sourceX:s.x,sourceY:s.y,targetX:c.x,targetY:c.y}};function zee(e){var t=e.sourcePos,r=e.targetPos,n=e.sourceWidth,o=e.sourceHeight,i=e.targetWidth,a=e.targetHeight,s=e.width,c=e.height,u=e.transform,d={x:Math.min(t.x,r.x),y:Math.min(t.y,r.y),x2:Math.max(t.x+n,r.x+i),y2:Math.max(t.y+o,r.y+a)};d.x===d.x2&&(d.x2+=1),d.y===d.y2&&(d.y2+=1);var p=bu({x:(0-u[0])/u[2],y:(0-u[1])/u[2],width:s/u[2],height:c/u[2]}),h=Math.max(0,Math.min(p.x2,d.x2)-Math.max(p.x,d.x)),v=Math.max(0,Math.min(p.y2,d.y2)-Math.max(p.y,d.y)),y=Math.ceil(h*v);return y>0}function dA(e,t){var r,n,o,i,a,s=e.get(t),c=(s==null||(r=s[$t])===null||r===void 0?void 0:r.handleBounds)||null,u=!s||!c||!s.width||!s.height||typeof((n=s.positionAbsolute)===null||n===void 0?void 0:n.x)>"u"||typeof((o=s.positionAbsolute)===null||o===void 0?void 0:o.y)>"u";return[{x:(s==null||(i=s.positionAbsolute)===null||i===void 0?void 0:i.x)||0,y:(s==null||(a=s.positionAbsolute)===null||a===void 0?void 0:a.y)||0,width:(s==null?void 0:s.width)||0,height:(s==null?void 0:s.height)||0},c,!u]}var Bee=typeof document<"u"?document:null,_u=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{target:Bee},r=T.useState(!1),n=He(r,2),o=n[0],i=n[1],a=T.useRef(new Set([])),s=T.useMemo(function(){if(e!==null){var p=Array.isArray(e)?e:[e],h=p.filter(function(y){return typeof y=="string"}).map(function(y){return y.split("+")}),v=h.reduce(function(y,g){return y.concat.apply(y,Ho(g))},[]);return[h,v]}return[[],[]]},[e]),c=He(s,2),u=c[0],d=c[1];return T.useEffect(function(){if(e!==null){var p,h,v=function(x){if(hA(x))return!1;var w=pA(x.code,d);a.current.add(x[w]),fA(u,a.current,!1)&&(x.preventDefault(),i(!0))},y=function(x){if(hA(x))return!1;var w=pA(x.code,d);fA(u,a.current,!0)?(i(!1),a.current.clear()):a.current.delete(x[w])},g=function(){a.current.clear(),i(!1)};return t==null||(p=t.target)===null||p===void 0||p.addEventListener("keydown",v),t==null||(h=t.target)===null||h===void 0||h.addEventListener("keyup",y),window.addEventListener("blur",g),function(){var b,x;t==null||(b=t.target)===null||b===void 0||b.removeEventListener("keydown",v),t==null||(x=t.target)===null||x===void 0||x.removeEventListener("keyup",y),window.removeEventListener("blur",g)}}},[e,i]),o});function fA(e,t,r){return e.filter(function(n){return r||n.length===t.size}).some(function(n){return n.every(function(o){return t.has(o)})})}function pA(e,t){return t.includes(e)?"code":"key"}function hA(e){var t,r=((t=e.composedPath)===null||t===void 0?void 0:t.call(e)[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(r==null?void 0:r.nodeName)||(r==null?void 0:r.hasAttribute("contenteditable"))}var Fee=function(t){return{onNodesChange:t.onNodesChange,onEdgesChange:t.onEdgesChange}},$ee=(function(e){var t=e.deleteKeyCode,r=e.multiSelectionKeyCode,n=er(),o=Ct(Fee,dr),i=o.onNodesChange,a=o.onEdgesChange,s=_u(t),c=_u(r);T.useEffect(function(){var u=n.getState(),d=u.nodeInternals,p=u.edges,h=u.hasDefaultNodes,v=u.hasDefaultEdges,y=u.onNodesDelete,g=u.onEdgesDelete,b=Array.from(d.values()),x=b.reduce(function(R,A){return(!A.selected&&A.parentNode&&R.find(function(D){return D.id===A.parentNode})||A.selected)&&R.push(A),R},[]),w=p.filter(function(R){return R.selected});if(s&&(x||w)){var E=d5(x,p),S=[].concat(Ho(w),Ho(E)),_=S.reduce(function(R,A){return R.includes(A.id)||R.push(A.id),R},[]);if((v||h)&&(v&&n.setState({edges:p.filter(function(R){return!_.includes(R.id)})}),h&&(x.forEach(function(R){d.delete(R.id)}),n.setState({nodeInternals:new Map(d)}))),_.length>0&&(g==null||g(S),a)){var O=_.map(function(R){return{id:R,type:"remove"}});a(O)}if(x.length>0&&(y==null||y(x),i)){var N=x.map(function(R){return{id:R.id,type:"remove"}});i(N)}n.setState({nodesSelectionActive:!1})}},[s,i,a]),T.useEffect(function(){n.setState({multiSelectionActive:c})},[c])});function Hee(e){var t=er();T.useEffect(function(){var r,n=function(){if(e.current){var i=D_(e.current);process.env.NODE_ENV==="development"&&(i.height===0||i.width===0)&&console.warn("[React Flow]: The React Flow parent container needs a width and a height to render the graph. Help: https://reactflow.dev/error#400"),t.setState({width:i.width||500,height:i.height||500})}};return n(),window.onresize=n,e.current&&(r=new ResizeObserver(function(){return n()}),r.observe(e.current)),function(){window.onresize=null,r&&e.current&&r.unobserve(e.current)}},[])}var Vee=function(t,r){return t.x!==r.x||t.y!==r.y||t.zoom!==r.k},cy=function(t){return{x:t.x,y:t.y,zoom:t.k}},Ic=function(t,r){return t.target.closest(".".concat(r))},Wee=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler}},Uee=function(t){var r=t.onMove,n=t.onMoveStart,o=t.onMoveEnd,i=t.zoomOnScroll,a=i===void 0?!0:i,s=t.zoomOnPinch,c=s===void 0?!0:s,u=t.panOnScroll,d=u===void 0?!1:u,p=t.panOnScrollSpeed,h=p===void 0?.5:p,v=t.panOnScrollMode,y=v===void 0?Bi.Free:v,g=t.zoomOnDoubleClick,b=g===void 0?!0:g,x=t.selectionKeyPressed,w=t.elementsSelectable,E=t.panOnDrag,S=E===void 0?!0:E,_=t.translateExtent,O=t.minZoom,N=t.maxZoom,R=t.defaultZoom,A=R===void 0?1:R,D=t.defaultPosition,B=D===void 0?[0,0]:D,j=t.zoomActivationKeyCode,M=t.preventScrolling,P=M===void 0?!0:M,V=t.children,q=t.noWheelClassName,G=t.noPanClassName,W=er(),Q=T.useRef(!1),z=T.useRef(null),U=T.useRef({x:0,y:0,zoom:0}),ie=Ct(Wee,dr),te=ie.d3Zoom,$=ie.d3Selection,K=ie.d3ZoomHandler,Z=_u(j);return Hee(z),T.useEffect(function(){if(z.current){var H,Y=PQ().scaleExtent([O,N]).translateExtent(_),oe=Zr(z.current).call(Y),re=Fi(B[0],_[0][0],_[1][0]),se=Fi(B[1],_[0][1],_[1][1]),ee=Fi(A,O,N),we=$o.translate(re,se).scale(ee);Y.transform(oe,we),W.setState({d3Zoom:Y,d3Selection:oe,d3ZoomHandler:oe.on("wheel.zoom"),transform:[re,se,ee],domNode:(H=oe.node())===null||H===void 0?void 0:H.closest(".react-flow")})}},[]),T.useEffect(function(){$&&te&&(d&&!Z?$.on("wheel",function(H){if(Ic(H,q))return!1;H.preventDefault(),H.stopImmediatePropagation();var Y=$.property("__zoom").k||1;if(H.ctrlKey&&c){var oe=mn(H),re=-H.deltaY*(H.deltaMode===1?.05:H.deltaMode?1:.002)*10,se=Y*Math.pow(2,re);te.scaleTo($,se,oe);return}var ee=H.deltaMode===1?20:1,we=y===Bi.Vertical?0:H.deltaX*ee,ve=y===Bi.Horizontal?0:H.deltaY*ee;te.translateBy($,-(we/Y)*h,-(ve/Y)*h)}).on("wheel.zoom",null):typeof K<"u"&&$.on("wheel",function(H){if(!P||Ic(H,q))return null;H.preventDefault()}).on("wheel.zoom",K))},[d,y,$,te,K,Z,c,P,q]),T.useEffect(function(){te&&(x&&!Q.current?te.on("zoom",null):x||te.on("zoom",function(H){if(W.setState({transform:[H.transform.x,H.transform.y,H.transform.k]}),r){var Y=cy(H.transform);r(H.sourceEvent,Y)}}))},[x,te,r]),T.useEffect(function(){te&&te.on("start",function(H){if(Q.current=!0,n){var Y=cy(H.transform);U.current=Y,n(H.sourceEvent,Y)}})},[te,n]),T.useEffect(function(){te&&te.on("end",function(H){if(Q.current=!1,o&&Vee(U.current,H.transform)){var Y=cy(H.transform);U.current=Y,o(H.sourceEvent,Y)}})},[te,o]),T.useEffect(function(){te&&te.filter(function(H){var Y=Z||a,oe=c&&H.ctrlKey;return!S&&!Y&&!d&&!b&&!c||x||!b&&H.type==="dblclick"||Ic(H,q)&&H.type==="wheel"||Ic(H,G)&&H.type!=="wheel"||!c&&H.ctrlKey&&H.type==="wheel"||!Y&&!d&&!oe&&H.type==="wheel"||!S&&(H.type==="mousedown"||H.type==="touchstart")?!1:(!H.ctrlKey||H.type==="wheel")&&!H.button})},[te,a,c,d,b,S,x,w,Z]),T.createElement("div",{className:"react-flow__renderer react-flow__container",ref:z},V)};function vA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function gA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mA(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}var Gee=function(t){return{userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable}},bA={startX:0,startY:0,x:0,y:0,width:0,height:0,draw:!1},Kee=T.memo(function(e){var t=e.selectionKeyPressed,r=er(),n=T.useRef(0),o=T.useRef(0),i=T.useRef(),a=T.useState(bA),s=He(a,2),c=s[0],u=s[1],d=Ct(Gee,dr),p=d.userSelectionActive,h=d.elementsSelectable,v=p||t;if(!h||!v)return null;var y=function(){u(bA),r.setState({userSelectionActive:!1}),n.current=0,o.current=0},g=function(S){var _=S.target.closest(".react-flow");i.current=_.getBoundingClientRect();var O=mA(S,i.current);u({width:0,height:0,startX:O.x,startY:O.y,x:O.x,y:O.y,draw:!0}),r.setState({userSelectionActive:!0,nodesSelectionActive:!1})},b=function(S){var _,O;if(!(!t||!c.draw||!i.current)){var N=mA(S,i.current),R=(_=c.startX)!==null&&_!==void 0?_:0,A=(O=c.startY)!==null&&O!==void 0?O:0,D=gA(gA({},c),{},{x:N.x<R?N.x:R,y:N.y<A?N.y:A,width:Math.abs(N.x-R),height:Math.abs(N.y-A)}),B=r.getState(),j=B.nodeInternals,M=B.edges,P=B.transform,V=B.onNodesChange,q=B.onEdgesChange,G=Array.from(j.values()),W=u5(j,D,P,!1,!0),Q=d5(W,M).map(function(te){return te.id}),z=W.map(function(te){return te.id});if(n.current!==z.length){n.current=z.length;var U=Di(G,z);U.length&&(V==null||V(U))}if(o.current!==Q.length){o.current=Q.length;var ie=Di(M,Q);ie.length&&(q==null||q(ie))}u(D)}},x=function(){r.setState({nodesSelectionActive:n.current>0}),y()},w=function(){r.setState({nodesSelectionActive:!1}),y()};return T.createElement("div",{className:"react-flow__selectionpane react-flow__container",onMouseDown:g,onMouseMove:b,onMouseUp:x,onMouseLeave:w},c.draw&&T.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:c.width,height:c.height,transform:"translate(".concat(c.x,"px, ").concat(c.y,"px)")}}))});function yA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function wA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function N5(e,t){if(!e.parentNode)return!1;var r=t.get(e.parentNode);return r?r.selected?!0:N5(r,t):!1}function xA(e,t,r){var n=e;do{var o;if((o=n)!==null&&o!==void 0&&o.matches(t))return!0;if(n===r.current)return!1;n=n.parentElement}while(n);return!1}function Yee(e,t,r){return Array.from(e.values()).filter(function(n){return(n.selected||n.id===r)&&(!n.parentNode||!N5(n,e))}).map(function(n){var o,i,a,s;return{id:n.id,position:n.position||{x:0,y:0},positionAbsolute:n.positionAbsolute||{x:0,y:0},distance:{x:t.x-((o=(i=n.positionAbsolute)===null||i===void 0?void 0:i.x)!==null&&o!==void 0?o:0),y:t.y-((a=(s=n.positionAbsolute)===null||s===void 0?void 0:s.y)!==null&&a!==void 0?a:0)},delta:{x:0,y:0},extent:n.extent,parentNode:n.parentNode,width:n.width,height:n.height}})}function Xee(e,t,r,n,o,i){var a=He(n,2),s=a[0],c=a[1],u=e.extent||i,d={x:t.x-e.distance.x,y:t.y-e.distance.y};if(r&&(d.x=s*Math.round(d.x/s),d.y=c*Math.round(d.y/c)),e.extent==="parent")if(e.parentNode&&e.width&&e.height){var p=o.get(e.parentNode);u=p!=null&&p.positionAbsolute&&p!==null&&p!==void 0&&p.width&&p!==null&&p!==void 0&&p.height?[[p.positionAbsolute.x,p.positionAbsolute.y],[p.positionAbsolute.x+p.width-e.width,p.positionAbsolute.y+p.height-e.height]]:u}else process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Only child nodes can use a parent extent. Help: https://reactflow.dev/error#500"),u=i;else if(e.extent&&e.parentNode){var h,v,y,g,b=o.get(e.parentNode),x=(h=b==null||(v=b.positionAbsolute)===null||v===void 0?void 0:v.x)!==null&&h!==void 0?h:0,w=(y=b==null||(g=b.positionAbsolute)===null||g===void 0?void 0:g.y)!==null&&y!==void 0?y:0;u=[[e.extent[0][0]+x,e.extent[0][1]+w],[e.extent[1][0]+x,e.extent[1][1]+w]]}var E={x:0,y:0};if(e.parentNode){var S,_,O,N,R=o.get(e.parentNode);E={x:(S=R==null||(_=R.positionAbsolute)===null||_===void 0?void 0:_.x)!==null&&S!==void 0?S:0,y:(O=R==null||(N=R.positionAbsolute)===null||N===void 0?void 0:N.y)!==null&&O!==void 0?O:0}}return e.positionAbsolute=u?r5(d,u):d,e.position={x:e.positionAbsolute.x-E.x,y:e.positionAbsolute.y-E.y},e}function uy(e){var t=e.nodeId,r=e.dragItems,n=e.nodeInternals,o=r.map(function(i){var a=n.get(i.id);return wA(wA({},a),{},{position:i.position,positionAbsolute:i.positionAbsolute})});return[t?o.find(function(i){return i.id===t}):o[0],o]}function dy(e){return function(t,r,n){return e==null?void 0:e(t,n)}}function P5(e){var t=e.nodeRef,r=e.disabled,n=r===void 0?!1:r,o=e.noDragClassName,i=e.handleSelector,a=e.nodeId,s=e.isSelectable,c=e.selectNodesOnDrag,u=T.useState(!1),d=He(u,2),p=d[0],h=d[1],v=er(),y=T.useRef(),g=T.useRef({x:null,y:null}),b=T.useCallback(function(x){var w=x.sourceEvent,E=v.getState(),S=E.transform,_=E.snapGrid,O=E.snapToGrid,N=w.touches?w.touches[0].clientX:w.clientX,R=w.touches?w.touches[0].clientY:w.clientY,A=c5({x:N,y:R},S,O,_);return A},[]);return T.useEffect(function(){if(t!=null&&t.current){var x=Zr(t.current);if(n)x.on(".drag",null);else{var w=BZ().on("start",function(E){var S=v.getState(),_=S.nodeInternals,O=S.multiSelectionActive,N=S.unselectNodesAndEdges,R=S.onNodeDragStart,A=S.onSelectionDragStart,D=a?R:dy(A);if(!c&&!O&&a){var B;(B=_.get(a))!==null&&B!==void 0&&B.selected||N()}a&&s&&c&&l5({id:a,store:v});var j=b(E);if(g.current=j,y.current=Yee(_,j,a),D&&y.current){var M=uy({nodeId:a,dragItems:y.current,nodeInternals:_}),P=He(M,2),V=P[0],q=P[1];D(E.sourceEvent,V,q)}}).on("drag",function(E){var S=v.getState(),_=S.updateNodePositions,O=S.snapToGrid,N=S.snapGrid,R=S.nodeInternals,A=S.nodeExtent,D=S.onNodeDrag,B=S.onSelectionDrag,j=b(E);if((g.current.x!==j.x||g.current.y!==j.y)&&y.current){g.current=j,y.current=y.current.map(function(W){return Xee(W,j,O,N,R,A)});var M=a?D:dy(B);if(_(y.current,!0,!0),h(!0),M){var P=uy({nodeId:a,dragItems:y.current,nodeInternals:R}),V=He(P,2),q=V[0],G=V[1];M(E.sourceEvent,q,G)}}E.on("end",function(W){if(h(!1),y.current){var Q=v.getState(),z=Q.updateNodePositions,U=Q.nodeInternals,ie=Q.onNodeDragStop,te=Q.onSelectionDragStop,$=a?ie:dy(te);if(z(y.current,!1,!1),$){var K=uy({nodeId:a,dragItems:y.current,nodeInternals:U}),Z=He(K,2),H=Z[0],Y=Z[1];$(W.sourceEvent,H,Y)}}})}).filter(function(E){var S=E.target,_=!E.button&&(!o||!xA(S,".".concat(o),t))&&(!i||xA(S,i,t));return _});return x.call(w),function(){x.on(".drag",null)}}}},[t,n,o,i,s,v,a,c,b]),p}function _A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Zee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_A(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_A(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Jee=function(t){return Zee({transformString:"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")"),userSelectionActive:t.userSelectionActive},j_(Array.from(t.nodeInternals.values()).filter(function(r){return r.selected})))},Qee=function(t){var r=Array.from(t.nodeInternals.values()).filter(function(n){return n.selected});return j_(r)};function ete(e){var t=e.onSelectionContextMenu,r=e.noPanClassName,n=er(),o=Ct(Jee,dr),i=o.transformString,a=o.userSelectionActive,s=Ct(Qee,dr),c=s.width,u=s.height,d=s.x,p=s.y,h=T.useRef(null);if(P5({nodeRef:h}),a||!c||!u)return null;var v=t?function(y){var g=Array.from(n.getState().nodeInternals.values()).filter(function(b){return b.selected});t(y,g)}:void 0;return T.createElement("div",{className:Or(["react-flow__nodesselection","react-flow__container",r]),style:{transform:i}},T.createElement("div",{ref:h,className:"react-flow__nodesselection-rect",onContextMenu:v,style:{width:c,height:u,top:p,left:d}}))}var tte=T.memo(ete),rte=function(t){return t.nodesSelectionActive},T5=function(t){var r=t.children,n=t.onPaneClick,o=t.onPaneContextMenu,i=t.onPaneScroll,a=t.deleteKeyCode,s=t.onMove,c=t.onMoveStart,u=t.onMoveEnd,d=t.selectionKeyCode,p=t.multiSelectionKeyCode,h=t.zoomActivationKeyCode,v=t.elementsSelectable,y=t.zoomOnScroll,g=t.zoomOnPinch,b=t.panOnScroll,x=t.panOnScrollSpeed,w=t.panOnScrollMode,E=t.zoomOnDoubleClick,S=t.panOnDrag,_=t.translateExtent,O=t.minZoom,N=t.maxZoom,R=t.defaultZoom,A=t.defaultPosition,D=t.preventScrolling,B=t.onSelectionContextMenu,j=t.noWheelClassName,M=t.noPanClassName,P=er(),V=Ct(rte),q=_u(d);$ee({deleteKeyCode:a,multiSelectionKeyCode:p});var G=function(U){n==null||n(U),P.getState().resetSelectedElements(),P.setState({nodesSelectionActive:!1})},W=o?function(z){return o(z)}:void 0,Q=i?function(z){return i(z)}:void 0;return T.createElement(Uee,{onMove:s,onMoveStart:c,onMoveEnd:u,selectionKeyPressed:q,elementsSelectable:v,zoomOnScroll:y,zoomOnPinch:g,panOnScroll:b,panOnScrollSpeed:x,panOnScrollMode:w,zoomOnDoubleClick:E,panOnDrag:S,translateExtent:_,minZoom:O,maxZoom:N,defaultZoom:R,defaultPosition:A,zoomActivationKeyCode:h,preventScrolling:D,noWheelClassName:j,noPanClassName:M},r,T.createElement(Kee,{selectionKeyPressed:q}),V&&T.createElement(tte,{onSelectionContextMenu:B,noPanClassName:M}),T.createElement("div",{className:"react-flow__pane react-flow__container",onClick:G,onContextMenu:W,onWheel:Q}))};T5.displayName="FlowRenderer";var nte=T.memo(T5);function ote(e){var t=Ct(T.useCallback(function(r){return e?u5(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):Array.from(r.nodeInternals.values())},[e]));return t}var ite=function(t){return{nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,updateNodeDimensions:t.updateNodeDimensions}},A5=function(t){var r=Ct(ite,dr),n=r.nodesDraggable,o=r.nodesConnectable,i=r.elementsSelectable,a=r.updateNodeDimensions,s=ote(t.onlyRenderVisibleElements),c=T.useRef(),u=T.useMemo(function(){if(typeof ResizeObserver>"u")return null;var d=new ResizeObserver(function(p){var h=p.map(function(v){return{id:v.target.getAttribute("data-id"),nodeElement:v.target,forceUpdate:!0}});a(h)});return c.current=d,d},[]);return T.useEffect(function(){return function(){var d;c==null||(d=c.current)===null||d===void 0||d.disconnect()}},[]),T.createElement("div",{className:"react-flow__nodes react-flow__container"},s.map(function(d){var p,h,v,y,g,b,x,w=d.type||"default";t.nodeTypes[w]||(process.env.NODE_ENV==="development"&&console.warn('[React Flow]: Node type "'.concat(w,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),w="default");var E=t.nodeTypes[w]||t.nodeTypes.default,S=!!(d.draggable||n&&typeof d.draggable>"u"),_=!!(d.selectable||i&&typeof d.selectable>"u"),O=!!(d.connectable||o&&typeof d.connectable>"u");return T.createElement(E,{key:d.id,id:d.id,className:d.className,style:d.style,type:w,data:d.data,sourcePosition:d.sourcePosition||Se.Bottom,targetPosition:d.targetPosition||Se.Top,hidden:d.hidden,xPos:(p=(h=d.positionAbsolute)===null||h===void 0?void 0:h.x)!==null&&p!==void 0?p:0,yPos:(v=(y=d.positionAbsolute)===null||y===void 0?void 0:y.y)!==null&&v!==void 0?v:0,selectNodesOnDrag:t.selectNodesOnDrag,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,selected:!!d.selected,isDraggable:S,isSelectable:_,isConnectable:O,resizeObserver:u,dragHandle:d.dragHandle,zIndex:(g=(b=d[$t])===null||b===void 0?void 0:b.z)!==null&&g!==void 0?g:0,isParent:!!((x=d[$t])!==null&&x!==void 0&&x.isParent),noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,initialized:!!d.width&&!!d.height})}))};A5.displayName="NodeRenderer";var ate=T.memo(A5),Ri;function EA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function SA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ste=(Ri={},Ge(Ri,Se.Left,Se.Right),Ge(Ri,Se.Right,Se.Left),Ge(Ri,Se.Top,Se.Bottom),Ge(Ri,Se.Bottom,Se.Top),Ri),lte=(function(e){var t,r,n,o,i,a=e.connectionNodeId,s=e.connectionHandleType,c=e.connectionLineStyle,u=e.connectionLineType,d=u===void 0?go.Bezier:u,p=e.isConnectable,h=e.CustomConnectionLineComponent,v=Ct(T.useCallback(function(Q){return{fromNode:Q.nodeInternals.get(a),handleId:Q.connectionHandleId,toX:(Q.connectionPosition.x-Q.transform[0])/Q.transform[2],toY:(Q.connectionPosition.y-Q.transform[1])/Q.transform[2]}},[a]),dr),y=v.fromNode,g=v.handleId,b=v.toX,x=v.toY,w=y==null||(t=y[$t])===null||t===void 0?void 0:t.handleBounds;if(!y||!p||!(w!=null&&w[s]))return null;var E=w[s],S=g?E.find(function(Q){return Q.id===g}):E[0],_=S?S.x+S.width/2:((r=y==null?void 0:y.width)!==null&&r!==void 0?r:0)/2,O=S?S.y+S.height/2:(n=y==null?void 0:y.height)!==null&&n!==void 0?n:0,N=((y==null||(o=y.positionAbsolute)===null||o===void 0?void 0:o.x)||0)+_,R=((y==null||(i=y.positionAbsolute)===null||i===void 0?void 0:i.y)||0)+O,A=S==null?void 0:S.position;if(!A)return null;var D=ste[A],B,j,M,P,V,q;switch(s){case"source":B=N,j=R,M=A,P=b,V=x,q=D;break;case"target":B=b,j=x,M=D,P=N,V=R,q=A;break}if(h)return T.createElement("g",{className:"react-flow__connection"},T.createElement(h,{connectionLineType:d,connectionLineStyle:c,fromNode:y,fromHandle:S,fromX:N,fromY:R,toX:b,toY:x,fromPosition:A,toPosition:D,sourcePosition:M,targetPosition:q,sourceNode:y,sourceHandle:S,targetX:P,targetY:V,sourceX:B,sourceY:j}));var G="",W={sourceX:B,sourceY:j,sourcePosition:M,targetX:P,targetY:V,targetPosition:q};return d===go.Bezier?G=hd(W):d===go.Step?G=Cx(SA(SA({},W),{},{borderRadius:0})):d===go.SmoothStep?G=Cx(W):d===go.SimpleBezier?G=m5(W):G="M".concat(B,",").concat(j," ").concat(P,",").concat(V),T.createElement("g",{className:"react-flow__connection"},T.createElement("path",{d:G,className:"react-flow__connection-path",style:c}))});function Px(e){"@babel/helpers - typeof";return Px=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Px(e)}var Rc,cte=function(t){var r=t.color,n=r===void 0?"none":r,o=t.strokeWidth,i=o===void 0?1:o;return T.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:i,fill:"none",points:"-5,-4 0,0 -5,4"})},ute=function(t){var r=t.color,n=r===void 0?"none":r,o=t.strokeWidth,i=o===void 0?1:o;return T.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:i,fill:n,points:"-5,-4 0,0 -5,4 -5,-4"})},OA=(Rc={},Ge(Rc,mu.Arrow,cte),Ge(Rc,mu.ArrowClosed,ute),Rc);function dte(e){var t=T.useMemo(function(){var r=OA.hasOwnProperty(e);return r?OA[e]:(process.env.NODE_ENV==="development"&&console.warn('[React Flow]: Marker type "'.concat(e,`" doesn't exist. Help: https://reactflow.dev/error#900`)),function(){return null})},[e]);return t}function CA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function fte(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var pte=function(t){var r=t.id,n=t.type,o=t.color,i=t.width,a=i===void 0?12.5:i,s=t.height,c=s===void 0?12.5:s,u=t.markerUnits,d=u===void 0?"strokeWidth":u,p=t.strokeWidth,h=t.orient,v=h===void 0?"auto":h,y=dte(n);return T.createElement("marker",{className:"react-flow__arrowhead",id:r,markerWidth:"".concat(a),markerHeight:"".concat(c),viewBox:"-10 -10 20 20",markerUnits:d,orient:v,refX:"0",refY:"0"},T.createElement(y,{color:o,strokeWidth:p}))},hte=function(t){var r=t.defaultColor,n=t.rfId;return function(o){var i=[];return o.edges.reduce(function(a,s){return[s.markerStart,s.markerEnd].forEach(function(c){if(c&&Px(c)==="object"){var u=Sx(c,n);i.includes(u)||(a.push(fte({id:u,color:c.color||r},c)),i.push(u))}}),a},[]).sort(function(a,s){return a.id.localeCompare(s.id)})}},k5=function(t){var r=t.defaultColor,n=t.rfId,o=Ct(T.useCallback(hte({defaultColor:r,rfId:n}),[r,n]),function(i,a){return!(i.length!==a.length||i.some(function(s,c){return s.id!==a[c].id}))});return T.createElement("defs",null,o.map(function(i){return T.createElement(pte,{id:i.id,key:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient})}))};k5.displayName="MarkerDefinitions";var vte=T.memo(k5),gte=[{level:0,isMaxLevel:!0,edges:[]}];function mte(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=-1,o=e.reduce(function(a,s){var c=o5(s.zIndex),u=c?s.zIndex:0;if(r){var d,p,h,v;u=c?s.zIndex:Math.max(((d=t.get(s.source))===null||d===void 0||(p=d[$t])===null||p===void 0?void 0:p.z)||0,((h=t.get(s.target))===null||h===void 0||(v=h[$t])===null||v===void 0?void 0:v.z)||0)}return a[u]?a[u].push(s):a[u]=[s],n=u>n?u:n,a},{}),i=Object.entries(o).map(function(a){var s=He(a,2),c=s[0],u=s[1],d=+c;return{edges:u,level:d,isMaxLevel:d===n}});return i.length===0?gte:i}function bte(e,t,r){var n=Ct(T.useCallback(function(o){return e?o.edges.filter(function(i){var a=t.get(i.source),s=t.get(i.target);return(a==null?void 0:a.width)&&(a==null?void 0:a.height)&&(s==null?void 0:s.width)&&(s==null?void 0:s.height)&&zee({sourcePos:a.positionAbsolute||{x:0,y:0},targetPos:s.positionAbsolute||{x:0,y:0},sourceWidth:a.width,sourceHeight:a.height,targetWidth:s.width,targetHeight:s.height,width:o.width,height:o.height,transform:o.transform})}):o.edges},[e,t]));return mte(n,t,r)}var yte=function(t){return{connectionNodeId:t.connectionNodeId,connectionHandleType:t.connectionHandleType,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,width:t.width,height:t.height,connectionMode:t.connectionMode,nodeInternals:t.nodeInternals}},M5=function(t){var r=Ct(yte,dr),n=r.connectionNodeId,o=r.connectionHandleType,i=r.nodesConnectable,a=r.elementsSelectable,s=r.width,c=r.height,u=r.connectionMode,d=r.nodeInternals,p=bte(t.onlyRenderVisibleElements,d,t.elevateEdgesOnSelect);if(!s)return null;var h=t.connectionLineType,v=t.defaultMarkerColor,y=t.connectionLineStyle,g=t.connectionLineComponent,b=t.connectionLineContainerStyle,x=n&&o;return T.createElement(T.Fragment,null,p.map(function(w){var E=w.level,S=w.edges,_=w.isMaxLevel;return T.createElement("svg",{key:E,style:{zIndex:E},width:s,height:c,className:"react-flow__edges react-flow__container"},_&&T.createElement(vte,{defaultColor:v,rfId:t.rfId}),T.createElement("g",null,S.map(function(O){var N=dA(d,O.source),R=He(N,3),A=R[0],D=R[1],B=R[2],j=dA(d,O.target),M=He(j,3),P=M[0],V=M[1],q=M[2];if(!B||!q)return null;var G=O.type||"default";t.edgeTypes[G]||(console.warn('[React Flow]: Edge type "'.concat(G,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),G="default");var W=t.edgeTypes[G]||t.edgeTypes.default,Q=u===Qi.Strict?V.target:V.target||V.source,z=uA(D.source,O.sourceHandle||null),U=uA(Q,O.targetHandle||null),ie=(z==null?void 0:z.position)||Se.Bottom,te=(U==null?void 0:U.position)||Se.Top;if(!z)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Couldn't create edge for source handle id: ".concat(O.sourceHandle,"; edge id: ").concat(O.id,". Help: https://reactflow.dev/error#800")),null;if(!U)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Couldn't create edge for target handle id: ".concat(O.targetHandle,"; edge id: ").concat(O.id,". Help: https://reactflow.dev/error#800")),null;var $=Lee(A,z,ie,P,U,te),K=$.sourceX,Z=$.sourceY,H=$.targetX,Y=$.targetY;return T.createElement(W,{key:O.id,id:O.id,className:Or([O.className,t.noPanClassName]),type:G,data:O.data,selected:!!O.selected,animated:!!O.animated,hidden:!!O.hidden,label:O.label,labelStyle:O.labelStyle,labelShowBg:O.labelShowBg,labelBgStyle:O.labelBgStyle,labelBgPadding:O.labelBgPadding,labelBgBorderRadius:O.labelBgBorderRadius,style:O.style,source:O.source,target:O.target,sourceHandleId:O.sourceHandle,targetHandleId:O.targetHandle,markerEnd:O.markerEnd,markerStart:O.markerStart,sourceX:K,sourceY:Z,targetX:H,targetY:Y,sourcePosition:ie,targetPosition:te,elementsSelectable:a,onEdgeUpdate:t.onEdgeUpdate,onContextMenu:t.onEdgeContextMenu,onMouseEnter:t.onEdgeMouseEnter,onMouseMove:t.onEdgeMouseMove,onMouseLeave:t.onEdgeMouseLeave,onClick:t.onEdgeClick,edgeUpdaterRadius:t.edgeUpdaterRadius,onEdgeDoubleClick:t.onEdgeDoubleClick,onEdgeUpdateStart:t.onEdgeUpdateStart,onEdgeUpdateEnd:t.onEdgeUpdateEnd,rfId:t.rfId})})))}),x&&T.createElement("svg",{style:b,width:s,height:c,className:"react-flow__edges react-flow__connectionline react-flow__container"},T.createElement(lte,{connectionNodeId:n,connectionHandleType:o,connectionLineStyle:y,connectionLineType:h,isConnectable:i,CustomConnectionLineComponent:g})))};M5.displayName="EdgeRenderer";var wte=T.memo(M5),xte=function(t){return"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")")};function _te(e){var t=e.children,r=Ct(xte);return T.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:r}},t)}function Ete(e){var t=v5(),r=T.useRef(!1);T.useEffect(function(){!r.current&&t.viewportInitialized&&e&&(setTimeout(function(){return e(t)},1),r.current=!0)},[e,t.viewportInitialized])}var D5=function(t){var r=t.nodeTypes,n=t.edgeTypes,o=t.onMove,i=t.onMoveStart,a=t.onMoveEnd,s=t.onInit,c=t.onNodeClick,u=t.onEdgeClick,d=t.onNodeDoubleClick,p=t.onEdgeDoubleClick,h=t.onNodeMouseEnter,v=t.onNodeMouseMove,y=t.onNodeMouseLeave,g=t.onNodeContextMenu,b=t.onSelectionContextMenu,x=t.connectionLineType,w=t.connectionLineStyle,E=t.connectionLineComponent,S=t.connectionLineContainerStyle,_=t.selectionKeyCode,O=t.multiSelectionKeyCode,N=t.zoomActivationKeyCode,R=t.deleteKeyCode,A=t.onlyRenderVisibleElements,D=t.elementsSelectable,B=t.selectNodesOnDrag,j=t.translateExtent,M=t.minZoom,P=t.maxZoom,V=t.defaultZoom,q=t.defaultPosition,G=t.preventScrolling,W=t.defaultMarkerColor,Q=t.zoomOnScroll,z=t.zoomOnPinch,U=t.panOnScroll,ie=t.panOnScrollSpeed,te=t.panOnScrollMode,$=t.zoomOnDoubleClick,K=t.panOnDrag,Z=t.onPaneClick,H=t.onPaneScroll,Y=t.onPaneContextMenu,oe=t.onEdgeUpdate,re=t.onEdgeContextMenu,se=t.onEdgeMouseEnter,ee=t.onEdgeMouseMove,we=t.onEdgeMouseLeave,ve=t.edgeUpdaterRadius,Ee=t.onEdgeUpdateStart,pe=t.onEdgeUpdateEnd,ce=t.noDragClassName,Ce=t.noWheelClassName,ke=t.noPanClassName,Ke=t.elevateEdgesOnSelect,ze=t.id;return Ete(s),T.createElement(nte,{onPaneClick:Z,onPaneContextMenu:Y,onPaneScroll:H,deleteKeyCode:R,selectionKeyCode:_,multiSelectionKeyCode:O,zoomActivationKeyCode:N,elementsSelectable:D,onMove:o,onMoveStart:i,onMoveEnd:a,zoomOnScroll:Q,zoomOnPinch:z,zoomOnDoubleClick:$,panOnScroll:U,panOnScrollSpeed:ie,panOnScrollMode:te,panOnDrag:K,translateExtent:j,minZoom:M,maxZoom:P,defaultZoom:V,defaultPosition:q,onSelectionContextMenu:b,preventScrolling:G,noDragClassName:ce,noWheelClassName:Ce,noPanClassName:ke},T.createElement(_te,null,T.createElement(wte,{edgeTypes:n,onEdgeClick:u,onEdgeDoubleClick:p,connectionLineType:x,connectionLineStyle:w,connectionLineComponent:E,connectionLineContainerStyle:S,onEdgeUpdate:oe,onlyRenderVisibleElements:A,onEdgeContextMenu:re,onEdgeMouseEnter:se,onEdgeMouseMove:ee,onEdgeMouseLeave:we,onEdgeUpdateStart:Ee,onEdgeUpdateEnd:pe,edgeUpdaterRadius:ve,defaultMarkerColor:W,noPanClassName:ke,elevateEdgesOnSelect:!!Ke,rfId:ze}),T.createElement(ate,{nodeTypes:r,onNodeClick:c,onNodeDoubleClick:d,onNodeMouseEnter:h,onNodeMouseMove:v,onNodeMouseLeave:y,onNodeContextMenu:g,selectNodesOnDrag:B,onlyRenderVisibleElements:A,noPanClassName:ke,noDragClassName:ce})))};D5.displayName="GraphView";var Ste=T.memo(D5),j5=function(){return null};j5.displayName="GroupNode";function IA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function RA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?IA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ua=(function(e){var t=function(n){var o=n.id,i=n.type,a=n.data,s=n.xPos,c=n.yPos,u=n.selected,d=n.onClick,p=n.onMouseEnter,h=n.onMouseMove,v=n.onMouseLeave,y=n.onContextMenu,g=n.onDoubleClick,b=n.style,x=n.className,w=n.isDraggable,E=n.isSelectable,S=n.isConnectable,_=n.selectNodesOnDrag,O=n.sourcePosition,N=n.targetPosition,R=n.hidden,A=n.resizeObserver,D=n.dragHandle,B=n.zIndex,j=n.isParent,M=n.noPanClassName,P=n.noDragClassName,V=n.initialized,q=er(),G=T.useRef(null),W=T.useRef(O),Q=T.useRef(N),z=T.useRef(i),U=E||w||d||p||h||v,ie=Va(o,q.getState,p),te=Va(o,q.getState,h),$=Va(o,q.getState,v),K=Va(o,q.getState,y),Z=Va(o,q.getState,g),H=function(re){if(E&&(!_||!w)&&l5({id:o,store:q}),d){var se=q.getState().nodeInternals.get(o);d(re,RA({},se))}};T.useEffect(function(){if(G.current&&!R){var oe=G.current;return A==null||A.observe(oe),function(){return A==null?void 0:A.unobserve(oe)}}},[R]),T.useEffect(function(){var oe=z.current!==i,re=W.current!==O,se=Q.current!==N;G.current&&(oe||re||se)&&(oe&&(z.current=i),re&&(W.current=O),se&&(Q.current=N),q.getState().updateNodeDimensions([{id:o,nodeElement:G.current,forceUpdate:!0}]))},[o,i,O,N]);var Y=P5({nodeRef:G,disabled:R||!w,noDragClassName:P,handleSelector:D,nodeId:o,isSelectable:E,selectNodesOnDrag:_});return R?null:T.createElement("div",{className:Or(["react-flow__node","react-flow__node-".concat(i),M,x,{selected:u,selectable:E,parent:j}]),ref:G,style:RA({zIndex:B,transform:"translate(".concat(s,"px,").concat(c,"px)"),pointerEvents:U?"all":"none",visibility:V?"visible":"hidden"},b),onMouseEnter:ie,onMouseMove:te,onMouseLeave:$,onContextMenu:K,onClick:H,onDoubleClick:Z,"data-testid":"rf__node-".concat(o),"data-id":o},T.createElement(xee,{value:o},T.createElement(e,{id:o,data:a,type:i,xPos:s,yPos:c,selected:u,isConnectable:S,sourcePosition:O,targetPosition:N,dragging:Y,dragHandle:D,zIndex:B})))};return t.displayName="NodeWrapper",T.memo(t)});function NA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function PA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?NA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ote(e){var t={input:Ua(e.input||C5),default:Ua(e.default||Nx),output:Ua(e.output||R5),group:Ua(e.group||j5)},r={},n=Object.keys(e).filter(function(o){return!["input","default","output","group"].includes(o)}).reduce(function(o,i){return o[i]=Ua(e[i]||Nx),o},r);return PA(PA({},t),n)}function TA(e,t){var r=T.useRef(null),n=T.useMemo(function(){if(process.env.NODE_ENV==="development"){var o=Object.keys(e);dr(r.current,o)&&console.warn("[React Flow]: It looks like you have created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them. Help: https://reactflow.dev/error#200"),r.current=o}return t(e)},[e]);return n}function AA(e){if(!(!e||typeof document>"u")){var t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");t.appendChild(r),r.appendChild(document.createTextNode(e))}}var q5=function(t){var r=t.children,n=!0;try{er()}catch{n=!1}return n?T.createElement(T.Fragment,null,r):T.createElement(HQ,{createStore:VQ},r)};q5.displayName="ReactFlowWrapper";var Cte=["nodes","edges","defaultNodes","defaultEdges","className","nodeTypes","edgeTypes","onNodeClick","onEdgeClick","onInit","onMove","onMoveStart","onMoveEnd","onConnect","onConnectStart","onConnectStop","onConnectEnd","onClickConnectStart","onClickConnectStop","onClickConnectEnd","onNodeMouseEnter","onNodeMouseMove","onNodeMouseLeave","onNodeContextMenu","onNodeDoubleClick","onNodeDragStart","onNodeDrag","onNodeDragStop","onNodesDelete","onEdgesDelete","onSelectionChange","onSelectionDragStart","onSelectionDrag","onSelectionDragStop","onSelectionContextMenu","connectionMode","connectionLineType","connectionLineStyle","connectionLineComponent","connectionLineContainerStyle","deleteKeyCode","selectionKeyCode","multiSelectionKeyCode","zoomActivationKeyCode","snapToGrid","snapGrid","onlyRenderVisibleElements","selectNodesOnDrag","nodesDraggable","nodesConnectable","elementsSelectable","minZoom","maxZoom","defaultZoom","defaultPosition","translateExtent","preventScrolling","nodeExtent","defaultMarkerColor","zoomOnScroll","zoomOnPinch","panOnScroll","panOnScrollSpeed","panOnScrollMode","zoomOnDoubleClick","panOnDrag","onPaneClick","onPaneScroll","onPaneContextMenu","children","onEdgeUpdate","onEdgeContextMenu","onEdgeDoubleClick","onEdgeMouseEnter","onEdgeMouseMove","onEdgeMouseLeave","onEdgeUpdateStart","onEdgeUpdateEnd","edgeUpdaterRadius","onNodesChange","onEdgesChange","noDragClassName","noWheelClassName","noPanClassName","fitView","fitViewOptions","connectOnClick","attributionPosition","proOptions","defaultEdgeOptions","elevateEdgesOnSelect"];function kA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function MA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kA(Object(r),!0).forEach(function(n){Ge(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}AA(Aee),AA(Mee);var Ite={input:C5,default:Nx,output:R5},Rte={default:Ix,straight:x5,step:w5,smoothstep:L_,simplebezier:b5},Nte=[15,15],Pte=[0,0],L5=T.forwardRef(function(e,t){var r=e.nodes,n=e.edges,o=e.defaultNodes,i=e.defaultEdges,a=e.className,s=e.nodeTypes,c=s===void 0?Ite:s,u=e.edgeTypes,d=u===void 0?Rte:u,p=e.onNodeClick,h=e.onEdgeClick,v=e.onInit,y=e.onMove,g=e.onMoveStart,b=e.onMoveEnd,x=e.onConnect,w=e.onConnectStart,E=e.onConnectStop,S=e.onConnectEnd,_=e.onClickConnectStart,O=e.onClickConnectStop,N=e.onClickConnectEnd,R=e.onNodeMouseEnter,A=e.onNodeMouseMove,D=e.onNodeMouseLeave,B=e.onNodeContextMenu,j=e.onNodeDoubleClick,M=e.onNodeDragStart,P=e.onNodeDrag,V=e.onNodeDragStop,q=e.onNodesDelete,G=e.onEdgesDelete,W=e.onSelectionChange,Q=e.onSelectionDragStart,z=e.onSelectionDrag,U=e.onSelectionDragStop,ie=e.onSelectionContextMenu,te=e.connectionMode,$=te===void 0?Qi.Strict:te,K=e.connectionLineType,Z=K===void 0?go.Bezier:K,H=e.connectionLineStyle,Y=e.connectionLineComponent,oe=e.connectionLineContainerStyle,re=e.deleteKeyCode,se=re===void 0?"Backspace":re,ee=e.selectionKeyCode,we=ee===void 0?"Shift":ee,ve=e.multiSelectionKeyCode,Ee=ve===void 0?"Meta":ve,pe=e.zoomActivationKeyCode,ce=pe===void 0?"Meta":pe,Ce=e.snapToGrid,ke=Ce===void 0?!1:Ce,Ke=e.snapGrid,ze=Ke===void 0?Nte:Ke,rt=e.onlyRenderVisibleElements,Xe=rt===void 0?!1:rt,It=e.selectNodesOnDrag,lt=It===void 0?!0:It,Wt=e.nodesDraggable,mt=e.nodesConnectable,ct=e.elementsSelectable,Lt=e.minZoom,pr=Lt===void 0?.5:Lt,Cr=e.maxZoom,Kt=Cr===void 0?2:Cr,Tt=e.defaultZoom,Yt=Tt===void 0?1:Tt,ln=e.defaultPosition,Oo=ln===void 0?Pte:ln,Xn=e.translateExtent,cn=Xn===void 0?Ox:Xn,ai=e.preventScrolling,zd=ai===void 0?!0:ai,Js=e.nodeExtent,ga=e.defaultMarkerColor,Bd=ga===void 0?"#b1b1b7":ga,Qs=e.zoomOnScroll,Fd=Qs===void 0?!0:Qs,el=e.zoomOnPinch,tl=el===void 0?!0:el,rl=e.panOnScroll,$d=rl===void 0?!1:rl,nl=e.panOnScrollSpeed,ma=nl===void 0?.5:nl,ol=e.panOnScrollMode,ba=ol===void 0?Bi.Free:ol,il=e.zoomOnDoubleClick,Hd=il===void 0?!0:il,al=e.panOnDrag,Vd=al===void 0?!0:al,Wd=e.onPaneClick,Ud=e.onPaneScroll,Gd=e.onPaneContextMenu,Kd=e.children,sl=e.onEdgeUpdate,Yd=e.onEdgeContextMenu,Xd=e.onEdgeDoubleClick,Zd=e.onEdgeMouseEnter,Jd=e.onEdgeMouseMove,Qd=e.onEdgeMouseLeave,ef=e.onEdgeUpdateStart,si=e.onEdgeUpdateEnd,ll=e.edgeUpdaterRadius,li=ll===void 0?10:ll,tf=e.onNodesChange,rf=e.onEdgesChange,cl=e.noDragClassName,ul=cl===void 0?"nodrag":cl,ya=e.noWheelClassName,dl=ya===void 0?"nowheel":ya,fl=e.noPanClassName,nf=fl===void 0?"nopan":fl,pl=e.fitView,of=pl===void 0?!1:pl,hl=e.fitViewOptions,wa=e.connectOnClick,vl=wa===void 0?!0:wa,xa=e.attributionPosition,af=e.proOptions,gl=e.defaultEdgeOptions,Co=e.elevateEdgesOnSelect,ml=Co===void 0?!1:Co,ci=fd(e,Cte),bl=TA(c,Ote),yl=TA(d,qee);return T.createElement("div",MA(MA({},ci),{},{ref:t,className:Or(["react-flow",a])}),T.createElement(q5,null,T.createElement(Ste,{onInit:v,onMove:y,onMoveStart:g,onMoveEnd:b,onNodeClick:p,onEdgeClick:h,onNodeMouseEnter:R,onNodeMouseMove:A,onNodeMouseLeave:D,onNodeContextMenu:B,onNodeDoubleClick:j,nodeTypes:bl,edgeTypes:yl,connectionLineType:Z,connectionLineStyle:H,connectionLineComponent:Y,connectionLineContainerStyle:oe,selectionKeyCode:we,deleteKeyCode:se,multiSelectionKeyCode:Ee,zoomActivationKeyCode:ce,onlyRenderVisibleElements:Xe,selectNodesOnDrag:lt,translateExtent:cn,minZoom:pr,maxZoom:Kt,defaultZoom:Yt,defaultPosition:Oo,preventScrolling:zd,zoomOnScroll:Fd,zoomOnPinch:tl,zoomOnDoubleClick:Hd,panOnScroll:$d,panOnScrollSpeed:ma,panOnScrollMode:ba,panOnDrag:Vd,onPaneClick:Wd,onPaneScroll:Ud,onPaneContextMenu:Gd,onSelectionContextMenu:ie,onEdgeUpdate:sl,onEdgeContextMenu:Yd,onEdgeDoubleClick:Xd,onEdgeMouseEnter:Zd,onEdgeMouseMove:Jd,onEdgeMouseLeave:Qd,onEdgeUpdateStart:ef,onEdgeUpdateEnd:si,edgeUpdaterRadius:li,defaultMarkerColor:Bd,noDragClassName:ul,noWheelClassName:dl,noPanClassName:nf,elevateEdgesOnSelect:ml,id:ci==null?void 0:ci.id}),T.createElement(Pee,{nodes:r,edges:n,defaultNodes:o,defaultEdges:i,onConnect:x,onConnectStart:w,onConnectStop:E,onConnectEnd:S,onClickConnectStart:_,onClickConnectStop:O,onClickConnectEnd:N,nodesDraggable:Wt,nodesConnectable:mt,elementsSelectable:ct,minZoom:pr,maxZoom:Kt,nodeExtent:Js,onNodesChange:tf,onEdgesChange:rf,snapToGrid:ke,snapGrid:ze,connectionMode:$,translateExtent:cn,connectOnClick:vl,defaultEdgeOptions:gl,fitView:of,fitViewOptions:hl,onNodesDelete:q,onEdgesDelete:G,onNodeDragStart:M,onNodeDrag:P,onNodeDragStop:V,onSelectionDrag:z,onSelectionDragStart:Q,onSelectionDragStop:U}),W&&T.createElement(Ree,{onSelectionChange:W}),Kd,T.createElement(pee,{proOptions:af,position:xa})))});L5.displayName="ReactFlow";function z5(e){return function(t){var r=T.useState(t),n=He(r,2),o=n[0],i=n[1],a=T.useCallback(function(s){return i(function(c){return e(s,c)})},[]);return[o,i,a]}}var Tte=z5(a5),Ate=z5(jQ);function DA(e,t){const{width:r,height:n,positionAbsolute:o}=e,i=t.positionAbsolute,a=r/2,s=n/2,c=o.x+a,u=o.y+s,d=i.x+a,p=i.y+s,h=(d-c)/(2*a)-(p-u)/(2*s),v=(d-c)/(2*a)+(p-u)/(2*s),y=1/(Math.abs(h)+Math.abs(v)),g=y*h,b=y*v,x=a*(g+b)+c,w=s*(-g+b)+u;return{x,y:w}}function jA(e,t){const r={...e.positionAbsolute,...e},n=Math.round(r.x),o=Math.round(r.y),i=Math.round(t.x),a=Math.round(t.y);return i<=n+1?Se.Left:i>=n+r.width-1?Se.Right:a<=o+1?Se.Top:a>=r.y+r.height-1?Se.Bottom:Se.Top}function B5(e,t){const r=DA(e,t),n=DA(t,e),o=jA(e,r),i=jA(t,n);return{sx:r.x,sy:r.y,tx:n.x,ty:n.y,sourcePos:o,targetPos:i}}const kte=({targetX:e,targetY:t,sourcePosition:r,targetPosition:n,sourceNode:o})=>{if(!o)return null;const i={id:"connection-target",width:1,height:1,position:{x:e,y:t}},{sx:a,sy:s}=B5(o,i),c=hd({sourceX:a,sourceY:s,sourcePosition:r,targetPosition:n,targetX:e,targetY:t});return C.jsxs("g",{children:[C.jsx("path",{fill:"none",stroke:"#222",strokeWidth:1.5,className:"animated",d:c}),C.jsx("circle",{cx:e,cy:t,fill:"#fff",r:3,stroke:"#222",strokeWidth:1.5})]})},Mte=({id:e,source:t,target:r,markerEnd:n,style:o})=>{const i=Ct(T.useCallback(y=>y.nodeInternals.get(t),[t])),a=Ct(T.useCallback(y=>y.nodeInternals.get(r),[r]));if(!i||!a)return null;const{sx:s,sy:c,tx:u,ty:d,sourcePos:p,targetPos:h}=B5(i,a),v=hd({sourceX:s,sourceY:c,sourcePosition:p,targetPosition:h,targetX:u,targetY:d});return C.jsx("path",{id:e,className:"react-flow__edge-path",d:v,markerEnd:n,style:o})},qA=172,LA=36,Dte={custom:Mte},jte=(e,t,r="LR")=>{const n=new _T.graphlib.Graph;n.setDefaultEdgeLabel(()=>({}));const o=r==="LR";return n.setGraph({rankdir:r}),e.forEach(i=>{n.setNode(i.id,{width:qA,height:LA})}),t.forEach(i=>{n.setEdge(i.source,i.target)}),_T.layout(n),e.forEach(i=>{const a=n.node(i.id);return i.targetPosition=o?Se.Left:Se.Top,i.sourcePosition=o?Se.Right:Se.Bottom,i.position={x:a.x-qA/2,y:a.y-LA/2},i}),{nodes:e,edges:t}},qte=()=>{},Lte=({data:e,dict:t,onSelect:r=qte})=>{const{nodes:n,edges:o}=jte(Object.values(t).filter(p=>p.id===e.selected||e.parents.flat().includes(p.id)||e.children.flat().includes(p.id)).map(p=>({id:p.id,type:p.parents.length===0?"input":p.includes.length===0?"output":"default",sourcePosition:Se.Right,targetPosition:Se.Left,data:{label:p.privilege},position:{x:0,y:0},className:p.id===e.selected?"highlighted":"",selected:p.id===e.selected})),e.links.map(({source:p,target:h})=>({id:`e${p}-${h}`,source:p,target:h}))),[i,a,s]=Tte(n),[c,u,d]=Ate(o);return T.useEffect(()=>{a([...n]),u([...o])},[e]),C.jsx(L5,{nodes:i,edges:c,fitView:!0,onNodesChange:s,onEdgesChange:d,onNodeClick:(p,h)=>{r(h.id)},defaultZoom:.5,edgeTypes:Dte,connectionLineComponent:kte,children:C.jsx(dee,{variant:Ko.Dots,color:"#81818140",gap:18,size:1})})};var F5=(e=>(e.method="methods",e.entityCollection="entityselMethod",e.dataClass="dataclassMethod",e.dataStore="dsMethod",e.entity="entityMethod",e.attribute="attributes",e.singletonMethod="singletonMethod",e))(F5||{});const $5=e=>{switch(e){case"entityCollection":return de.ESubPermissionType.ENTITY_SEL_METHOD;case"dataClass":return de.ESubPermissionType.DATACLASS_METHOD;case"dataStore":return de.ESubPermissionType.DS_METHOD;case"entity":return de.ESubPermissionType.ENTITY_METHOD;default:return de.EPermissionType.METHOD}},zA=(e=[],t,r)=>{var o;const n=[];for(const i of e)(o=i[F5[r]])==null||o.forEach(a=>{if(`${i.name.toLowerCase()}.${a.name.toLowerCase()}`.includes(t)||!t){const c={applyTo:`${i.name}.${a.name}`,type:r};r===de.EPermissionType.METHOD&&(c.subType=$5(a.applyTo)),n.push(c)}});return n},zte=(e=[],t)=>{var n;const r=[];for(const o of e)(n=o.methods)==null||n.forEach(i=>{(`${o.name.toLowerCase()}.${i.name.toLowerCase()}`.includes(t)||!t)&&r.push({applyTo:`${o.name}.${i.name}`,type:de.EPermissionType.SINGLETON_METHOD})});return r};function B_(e,t=[],r=[],n=[]){const o=zA(r,e,de.EPermissionType.ATTRIBUTE),i=zA(r,e,de.EPermissionType.METHOD),a=zte(n,e),s=t.filter(p=>!e||`ds.${p.name.toLowerCase()}`.includes(e)).map(p=>({applyTo:`ds.${p.name}`,type:de.ESubPermissionType.DS_METHOD})),c=[],u=[];return r.filter(p=>p.name.toLowerCase().includes(e)).forEach(p=>{c.push({applyTo:p.name,type:de.EPermissionType.DATACLASS})}),n.filter(p=>p.name.toLowerCase().includes(e)).forEach(p=>{u.push({applyTo:p.name,type:de.EPermissionType.SINGLETON})}),[...[{applyTo:"ds",type:de.EPermissionType.DATASTORE}].filter(p=>!e||`ds.${p.applyTo.toLowerCase()}`.includes(e)),...s,...c,...o,...i,...u,...a].reduce((p,h)=>{const v=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],[y,g]=h.applyTo.split("."),b=p.find(x=>x.prefix===y);return b?(b.resources=[...b.resources,h].sort((x,w)=>{const E=v.indexOf(x.type),S=v.indexOf(w.type);return E>S?1:-1}),b.type=g?b.type:h.type,[...p].sort((x,w)=>{const E=v.indexOf(x.type),S=v.indexOf(w.type);return E>S?1:-1})):[...p,{prefix:y,type:g?null:h.type,resources:[h]}]},[]).reduce((p,h)=>[...p,...h.resources],[])}const Bte=(e=[],t=[],r=[])=>{const n=B_("",e,t,r),o={ds:{applyTo:"ds",type:de.EPermissionType.DATASTORE,methods:[],dataClasses:[],singletons:[]}},i=(s,c)=>s.applyTo.localeCompare(c.applyTo);n.forEach(s=>{const[c,u]=s.applyTo.split(".");if(u||(s.type===de.EPermissionType.DATACLASS?o.ds.dataClasses.push({applyTo:c,type:de.EPermissionType.DATACLASS,methods:[],attributes:[]}):s.type===de.EPermissionType.SINGLETON&&o.ds.singletons.push({applyTo:c,type:de.EPermissionType.SINGLETON,methods:[],attributes:[]})),u){const d=(p,h,v)=>{p.forEach(y=>{y.applyTo===c&&y[h].push(v)})};[de.ESubPermissionType.DS_METHOD,de.ESubPermissionType.DATACLASS_METHOD,de.ESubPermissionType.ENTITY_METHOD,de.ESubPermissionType.ENTITY_SEL_METHOD].includes(s.type)?c==="ds"?o.ds.methods.push(s):d(o.ds.dataClasses,"methods",s):s.type===de.EPermissionType.ATTRIBUTE?(d(o.ds.dataClasses,"attributes",s),d(o.ds.singletons,"attributes",s)):s.type===de.EPermissionType.SINGLETON_METHOD&&d(o.ds.singletons,"methods",s)}});const a=s=>{s.forEach(c=>{c.methods&&c.methods.sort(i),c.attributes&&c.attributes.sort(i)})};return o.ds.methods.sort(i),o.ds.dataClasses.sort(i),o.ds.singletons.sort(i),a(o.ds.dataClasses),a(o.ds.singletons),o},H5=(e,t=[])=>{const r={};return Object.entries(e).forEach(([n,o])=>{r[n]={...o,resources:o.resources.map(i=>{var a,s,c;if(i.type===de.EPermissionType.METHOD&&t.length){const[u,d]=i.resource.split("."),p=u==="ds"?"dataStore":((c=(s=(a=t.find(h=>h.name===u))==null?void 0:a.methods)==null?void 0:s.find(h=>h.name===d))==null?void 0:c.applyTo)||"dataClass";return{...i,type:i.type,subType:$5(p)}}return i})}}),r},V5=(e,t)=>Object.entries(e).map(([r,n])=>{const o=n.resources.map(i=>{var u,d,p,h,v,y,g,b;const[a,s]=i.resource.split(".");let c=!0;switch(i.type){case de.EPermissionType.DATASTORE:c=!!t;break;case de.ESubPermissionType.DS_METHOD:c=!!t.methods.find(x=>x.name===s&&x.applyTo==="dataStore");break;case de.EPermissionType.DATACLASS:c=!!t.dataClasses[a];break;case de.EPermissionType.ATTRIBUTE:c=!!((d=(u=t.dataClasses[a])==null?void 0:u.attributes)!=null&&d.find(x=>x.name===s));break;case de.EPermissionType.METHOD:c=!!((h=(p=t.dataClasses[a])==null?void 0:p.methods)!=null&&h.find(x=>x.name===s));break;case de.ESubPermissionType.ENTITY_SEL_METHOD:c=!!((v=t.dataClasses[a])!=null&&v.methods.find(x=>x.name===s&&x.applyTo==="entityCollection"));break;case de.ESubPermissionType.DATACLASS_METHOD:c=!!((y=t.dataClasses[a])!=null&&y.methods.find(x=>x.name===s&&x.applyTo==="dataClass"));break;case de.ESubPermissionType.ENTITY_METHOD:c=!!((g=t.dataClasses[a])!=null&&g.methods.find(x=>x.name===s&&x.applyTo==="entity"));break;case de.EPermissionType.SINGLETON_METHOD:c=!!((b=t.singletons[a])!=null&&b.methods.find(x=>x.name===s));break;case de.EPermissionType.SINGLETON:c=!!t.singletons[a];break;default:c=!0}return{...i,exists:c}});return{[r]:{...n,resources:o}}}).reduce((r,n)=>({...r,...n}),{});var vs={exports:{}};/**
56
56
  * @license
57
57
  * Lodash <https://lodash.com/>
58
58
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
59
59
  * Released under MIT license <https://lodash.com/license>
60
60
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
61
61
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
62
- */var Fte=hs.exports,BA;function $te(){return BA||(BA=1,(function(e,t){(function(){var r,n="4.17.21",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",u=500,d="__lodash_placeholder__",p=1,h=2,v=4,y=1,g=2,b=1,x=2,w=4,E=8,S=16,_=32,O=64,N=128,R=256,A=512,D=30,B="...",j=800,M=16,P=1,V=2,q=3,G=1/0,W=9007199254740991,Q=17976931348623157e292,z=NaN,U=4294967295,ie=U-1,te=U>>>1,$=[["ary",N],["bind",b],["bindKey",x],["curry",E],["curryRight",S],["flip",A],["partial",_],["partialRight",O],["rearg",R]],K="[object Arguments]",Z="[object Array]",H="[object AsyncFunction]",Y="[object Boolean]",oe="[object Date]",re="[object DOMException]",se="[object Error]",ee="[object Function]",we="[object GeneratorFunction]",ve="[object Map]",Ee="[object Number]",pe="[object Null]",ce="[object Object]",Ce="[object Promise]",ke="[object Proxy]",Ke="[object RegExp]",ze="[object Set]",rt="[object String]",Xe="[object Symbol]",It="[object Undefined]",lt="[object WeakMap]",Wt="[object WeakSet]",mt="[object ArrayBuffer]",ct="[object DataView]",Lt="[object Float32Array]",pr="[object Float64Array]",Cr="[object Int8Array]",Kt="[object Int16Array]",Tt="[object Int32Array]",Yt="[object Uint8Array]",ln="[object Uint8ClampedArray]",Oo="[object Uint16Array]",Xn="[object Uint32Array]",cn=/\b__p \+= '';/g,ai=/\b(__p \+=) '' \+/g,zd=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Js=/&(?:amp|lt|gt|quot|#39);/g,va=/[&<>"']/g,Bd=RegExp(Js.source),Qs=RegExp(va.source),Fd=/<%-([\s\S]+?)%>/g,el=/<%([\s\S]+?)%>/g,tl=/<%=([\s\S]+?)%>/g,rl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$d=/^\w*$/,nl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ga=/[\\^$.*+?()[\]{}|]/g,ol=RegExp(ga.source),ma=/^\s+/,il=/\s/,Hd=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,al=/\{\n\/\* \[wrapped with (.+)\] \*/,Vd=/,? & /,Wd=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ud=/[()=,{}\[\]\/\s]/,Gd=/\\(\\)?/g,Kd=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,sl=/\w*$/,Yd=/^[-+]0x[0-9a-f]+$/i,Xd=/^0b[01]+$/i,Zd=/^\[object .+?Constructor\]$/,Jd=/^0o[0-7]+$/i,Qd=/^(?:0|[1-9]\d*)$/,ef=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,si=/($^)/,ll=/['\n\r\u2028\u2029\\]/g,li="\\ud800-\\udfff",tf="\\u0300-\\u036f",rf="\\ufe20-\\ufe2f",cl="\\u20d0-\\u20ff",ul=tf+rf+cl,ba="\\u2700-\\u27bf",dl="a-z\\xdf-\\xf6\\xf8-\\xff",fl="\\xac\\xb1\\xd7\\xf7",nf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",pl="\\u2000-\\u206f",of=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",hl="A-Z\\xc0-\\xd6\\xd8-\\xde",ya="\\ufe0e\\ufe0f",vl=fl+nf+pl+of,wa="['’]",af="["+li+"]",gl="["+vl+"]",Co="["+ul+"]",ml="\\d+",ci="["+ba+"]",bl="["+dl+"]",yl="[^"+li+vl+ml+ba+dl+hl+"]",sf="\\ud83c[\\udffb-\\udfff]",vF="(?:"+Co+"|"+sf+")",A1="[^"+li+"]",lf="(?:\\ud83c[\\udde6-\\uddff]){2}",cf="[\\ud800-\\udbff][\\udc00-\\udfff]",ui="["+hl+"]",k1="\\u200d",M1="(?:"+bl+"|"+yl+")",gF="(?:"+ui+"|"+yl+")",D1="(?:"+wa+"(?:d|ll|m|re|s|t|ve))?",j1="(?:"+wa+"(?:D|LL|M|RE|S|T|VE))?",q1=vF+"?",L1="["+ya+"]?",mF="(?:"+k1+"(?:"+[A1,lf,cf].join("|")+")"+L1+q1+")*",bF="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",yF="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",z1=L1+q1+mF,wF="(?:"+[ci,lf,cf].join("|")+")"+z1,xF="(?:"+[A1+Co+"?",Co,lf,cf,af].join("|")+")",_F=RegExp(wa,"g"),EF=RegExp(Co,"g"),uf=RegExp(sf+"(?="+sf+")|"+xF+z1,"g"),SF=RegExp([ui+"?"+bl+"+"+D1+"(?="+[gl,ui,"$"].join("|")+")",gF+"+"+j1+"(?="+[gl,ui+M1,"$"].join("|")+")",ui+"?"+M1+"+"+D1,ui+"+"+j1,yF,bF,ml,wF].join("|"),"g"),OF=RegExp("["+k1+li+ul+ya+"]"),CF=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,IF=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],RF=-1,gt={};gt[Lt]=gt[pr]=gt[Cr]=gt[Kt]=gt[Tt]=gt[Yt]=gt[ln]=gt[Oo]=gt[Xn]=!0,gt[K]=gt[Z]=gt[mt]=gt[Y]=gt[ct]=gt[oe]=gt[se]=gt[ee]=gt[ve]=gt[Ee]=gt[ce]=gt[Ke]=gt[ze]=gt[rt]=gt[lt]=!1;var pt={};pt[K]=pt[Z]=pt[mt]=pt[ct]=pt[Y]=pt[oe]=pt[Lt]=pt[pr]=pt[Cr]=pt[Kt]=pt[Tt]=pt[ve]=pt[Ee]=pt[ce]=pt[Ke]=pt[ze]=pt[rt]=pt[Xe]=pt[Yt]=pt[ln]=pt[Oo]=pt[Xn]=!0,pt[se]=pt[ee]=pt[lt]=!1;var NF={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},PF={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},TF={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},AF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},kF=parseFloat,MF=parseInt,B1=typeof _t=="object"&&_t&&_t.Object===Object&&_t,DF=typeof self=="object"&&self&&self.Object===Object&&self,zt=B1||DF||Function("return this")(),df=t&&!t.nodeType&&t,Io=df&&!0&&e&&!e.nodeType&&e,F1=Io&&Io.exports===df,ff=F1&&B1.process,Ir=(function(){try{var ne=Io&&Io.require&&Io.require("util").types;return ne||ff&&ff.binding&&ff.binding("util")}catch{}})(),$1=Ir&&Ir.isArrayBuffer,H1=Ir&&Ir.isDate,V1=Ir&&Ir.isMap,W1=Ir&&Ir.isRegExp,U1=Ir&&Ir.isSet,G1=Ir&&Ir.isTypedArray;function hr(ne,he,le){switch(le.length){case 0:return ne.call(he);case 1:return ne.call(he,le[0]);case 2:return ne.call(he,le[0],le[1]);case 3:return ne.call(he,le[0],le[1],le[2])}return ne.apply(he,le)}function jF(ne,he,le,Oe){for(var Me=-1,Ye=ne==null?0:ne.length;++Me<Ye;){var At=ne[Me];he(Oe,At,le(At),ne)}return Oe}function Rr(ne,he){for(var le=-1,Oe=ne==null?0:ne.length;++le<Oe&&he(ne[le],le,ne)!==!1;);return ne}function qF(ne,he){for(var le=ne==null?0:ne.length;le--&&he(ne[le],le,ne)!==!1;);return ne}function K1(ne,he){for(var le=-1,Oe=ne==null?0:ne.length;++le<Oe;)if(!he(ne[le],le,ne))return!1;return!0}function Zn(ne,he){for(var le=-1,Oe=ne==null?0:ne.length,Me=0,Ye=[];++le<Oe;){var At=ne[le];he(At,le,ne)&&(Ye[Me++]=At)}return Ye}function wl(ne,he){var le=ne==null?0:ne.length;return!!le&&di(ne,he,0)>-1}function pf(ne,he,le){for(var Oe=-1,Me=ne==null?0:ne.length;++Oe<Me;)if(le(he,ne[Oe]))return!0;return!1}function bt(ne,he){for(var le=-1,Oe=ne==null?0:ne.length,Me=Array(Oe);++le<Oe;)Me[le]=he(ne[le],le,ne);return Me}function Jn(ne,he){for(var le=-1,Oe=he.length,Me=ne.length;++le<Oe;)ne[Me+le]=he[le];return ne}function hf(ne,he,le,Oe){var Me=-1,Ye=ne==null?0:ne.length;for(Oe&&Ye&&(le=ne[++Me]);++Me<Ye;)le=he(le,ne[Me],Me,ne);return le}function LF(ne,he,le,Oe){var Me=ne==null?0:ne.length;for(Oe&&Me&&(le=ne[--Me]);Me--;)le=he(le,ne[Me],Me,ne);return le}function vf(ne,he){for(var le=-1,Oe=ne==null?0:ne.length;++le<Oe;)if(he(ne[le],le,ne))return!0;return!1}var zF=gf("length");function BF(ne){return ne.split("")}function FF(ne){return ne.match(Wd)||[]}function Y1(ne,he,le){var Oe;return le(ne,function(Me,Ye,At){if(he(Me,Ye,At))return Oe=Ye,!1}),Oe}function xl(ne,he,le,Oe){for(var Me=ne.length,Ye=le+(Oe?1:-1);Oe?Ye--:++Ye<Me;)if(he(ne[Ye],Ye,ne))return Ye;return-1}function di(ne,he,le){return he===he?QF(ne,he,le):xl(ne,X1,le)}function $F(ne,he,le,Oe){for(var Me=le-1,Ye=ne.length;++Me<Ye;)if(Oe(ne[Me],he))return Me;return-1}function X1(ne){return ne!==ne}function Z1(ne,he){var le=ne==null?0:ne.length;return le?bf(ne,he)/le:z}function gf(ne){return function(he){return he==null?r:he[ne]}}function mf(ne){return function(he){return ne==null?r:ne[he]}}function J1(ne,he,le,Oe,Me){return Me(ne,function(Ye,At,ut){le=Oe?(Oe=!1,Ye):he(le,Ye,At,ut)}),le}function HF(ne,he){var le=ne.length;for(ne.sort(he);le--;)ne[le]=ne[le].value;return ne}function bf(ne,he){for(var le,Oe=-1,Me=ne.length;++Oe<Me;){var Ye=he(ne[Oe]);Ye!==r&&(le=le===r?Ye:le+Ye)}return le}function yf(ne,he){for(var le=-1,Oe=Array(ne);++le<ne;)Oe[le]=he(le);return Oe}function VF(ne,he){return bt(he,function(le){return[le,ne[le]]})}function Q1(ne){return ne&&ne.slice(0,nE(ne)+1).replace(ma,"")}function vr(ne){return function(he){return ne(he)}}function wf(ne,he){return bt(he,function(le){return ne[le]})}function xa(ne,he){return ne.has(he)}function eE(ne,he){for(var le=-1,Oe=ne.length;++le<Oe&&di(he,ne[le],0)>-1;);return le}function tE(ne,he){for(var le=ne.length;le--&&di(he,ne[le],0)>-1;);return le}function WF(ne,he){for(var le=ne.length,Oe=0;le--;)ne[le]===he&&++Oe;return Oe}var UF=mf(NF),GF=mf(PF);function KF(ne){return"\\"+AF[ne]}function YF(ne,he){return ne==null?r:ne[he]}function fi(ne){return OF.test(ne)}function XF(ne){return CF.test(ne)}function ZF(ne){for(var he,le=[];!(he=ne.next()).done;)le.push(he.value);return le}function xf(ne){var he=-1,le=Array(ne.size);return ne.forEach(function(Oe,Me){le[++he]=[Me,Oe]}),le}function rE(ne,he){return function(le){return ne(he(le))}}function Qn(ne,he){for(var le=-1,Oe=ne.length,Me=0,Ye=[];++le<Oe;){var At=ne[le];(At===he||At===d)&&(ne[le]=d,Ye[Me++]=le)}return Ye}function _l(ne){var he=-1,le=Array(ne.size);return ne.forEach(function(Oe){le[++he]=Oe}),le}function JF(ne){var he=-1,le=Array(ne.size);return ne.forEach(function(Oe){le[++he]=[Oe,Oe]}),le}function QF(ne,he,le){for(var Oe=le-1,Me=ne.length;++Oe<Me;)if(ne[Oe]===he)return Oe;return-1}function e$(ne,he,le){for(var Oe=le+1;Oe--;)if(ne[Oe]===he)return Oe;return Oe}function pi(ne){return fi(ne)?r$(ne):zF(ne)}function Gr(ne){return fi(ne)?n$(ne):BF(ne)}function nE(ne){for(var he=ne.length;he--&&il.test(ne.charAt(he)););return he}var t$=mf(TF);function r$(ne){for(var he=uf.lastIndex=0;uf.test(ne);)++he;return he}function n$(ne){return ne.match(uf)||[]}function o$(ne){return ne.match(SF)||[]}var i$=(function ne(he){he=he==null?zt:hi.defaults(zt.Object(),he,hi.pick(zt,IF));var le=he.Array,Oe=he.Date,Me=he.Error,Ye=he.Function,At=he.Math,ut=he.Object,_f=he.RegExp,a$=he.String,Nr=he.TypeError,El=le.prototype,s$=Ye.prototype,vi=ut.prototype,Sl=he["__core-js_shared__"],Ol=s$.toString,nt=vi.hasOwnProperty,l$=0,oE=(function(){var l=/[^.]+$/.exec(Sl&&Sl.keys&&Sl.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),Cl=vi.toString,c$=Ol.call(ut),u$=zt._,d$=_f("^"+Ol.call(nt).replace(ga,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Il=F1?he.Buffer:r,eo=he.Symbol,Rl=he.Uint8Array,iE=Il?Il.allocUnsafe:r,Nl=rE(ut.getPrototypeOf,ut),aE=ut.create,sE=vi.propertyIsEnumerable,Pl=El.splice,lE=eo?eo.isConcatSpreadable:r,_a=eo?eo.iterator:r,Ro=eo?eo.toStringTag:r,Tl=(function(){try{var l=ko(ut,"defineProperty");return l({},"",{}),l}catch{}})(),f$=he.clearTimeout!==zt.clearTimeout&&he.clearTimeout,p$=Oe&&Oe.now!==zt.Date.now&&Oe.now,h$=he.setTimeout!==zt.setTimeout&&he.setTimeout,Al=At.ceil,kl=At.floor,Ef=ut.getOwnPropertySymbols,v$=Il?Il.isBuffer:r,cE=he.isFinite,g$=El.join,m$=rE(ut.keys,ut),kt=At.max,Ut=At.min,b$=Oe.now,y$=he.parseInt,uE=At.random,w$=El.reverse,Sf=ko(he,"DataView"),Ea=ko(he,"Map"),Of=ko(he,"Promise"),gi=ko(he,"Set"),Sa=ko(he,"WeakMap"),Oa=ko(ut,"create"),Ml=Sa&&new Sa,mi={},x$=Mo(Sf),_$=Mo(Ea),E$=Mo(Of),S$=Mo(gi),O$=Mo(Sa),Dl=eo?eo.prototype:r,Ca=Dl?Dl.valueOf:r,dE=Dl?Dl.toString:r;function L(l){if(xt(l)&&!De(l)&&!(l instanceof Ve)){if(l instanceof Pr)return l;if(nt.call(l,"__wrapped__"))return fS(l)}return new Pr(l)}var bi=(function(){function l(){}return function(f){if(!wt(f))return{};if(aE)return aE(f);l.prototype=f;var m=new l;return l.prototype=r,m}})();function jl(){}function Pr(l,f){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=r}L.templateSettings={escape:Fd,evaluate:el,interpolate:tl,variable:"",imports:{_:L}},L.prototype=jl.prototype,L.prototype.constructor=L,Pr.prototype=bi(jl.prototype),Pr.prototype.constructor=Pr;function Ve(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=U,this.__views__=[]}function C$(){var l=new Ve(this.__wrapped__);return l.__actions__=rr(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=rr(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=rr(this.__views__),l}function I$(){if(this.__filtered__){var l=new Ve(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function R$(){var l=this.__wrapped__.value(),f=this.__dir__,m=De(l),I=f<0,k=m?l.length:0,F=B3(0,k,this.__views__),X=F.start,J=F.end,ae=J-X,ge=I?J:X-1,me=this.__iteratees__,be=me.length,_e=0,Ne=Ut(ae,this.__takeCount__);if(!m||!I&&k==ae&&Ne==ae)return DE(l,this.__actions__);var Te=[];e:for(;ae--&&_e<Ne;){ge+=f;for(var Le=-1,Ae=l[ge];++Le<be;){var $e=me[Le],We=$e.iteratee,br=$e.type,Jt=We(Ae);if(br==V)Ae=Jt;else if(!Jt){if(br==P)continue e;break e}}Te[_e++]=Ae}return Te}Ve.prototype=bi(jl.prototype),Ve.prototype.constructor=Ve;function No(l){var f=-1,m=l==null?0:l.length;for(this.clear();++f<m;){var I=l[f];this.set(I[0],I[1])}}function N$(){this.__data__=Oa?Oa(null):{},this.size=0}function P$(l){var f=this.has(l)&&delete this.__data__[l];return this.size-=f?1:0,f}function T$(l){var f=this.__data__;if(Oa){var m=f[l];return m===c?r:m}return nt.call(f,l)?f[l]:r}function A$(l){var f=this.__data__;return Oa?f[l]!==r:nt.call(f,l)}function k$(l,f){var m=this.__data__;return this.size+=this.has(l)?0:1,m[l]=Oa&&f===r?c:f,this}No.prototype.clear=N$,No.prototype.delete=P$,No.prototype.get=T$,No.prototype.has=A$,No.prototype.set=k$;function Nn(l){var f=-1,m=l==null?0:l.length;for(this.clear();++f<m;){var I=l[f];this.set(I[0],I[1])}}function M$(){this.__data__=[],this.size=0}function D$(l){var f=this.__data__,m=ql(f,l);if(m<0)return!1;var I=f.length-1;return m==I?f.pop():Pl.call(f,m,1),--this.size,!0}function j$(l){var f=this.__data__,m=ql(f,l);return m<0?r:f[m][1]}function q$(l){return ql(this.__data__,l)>-1}function L$(l,f){var m=this.__data__,I=ql(m,l);return I<0?(++this.size,m.push([l,f])):m[I][1]=f,this}Nn.prototype.clear=M$,Nn.prototype.delete=D$,Nn.prototype.get=j$,Nn.prototype.has=q$,Nn.prototype.set=L$;function Pn(l){var f=-1,m=l==null?0:l.length;for(this.clear();++f<m;){var I=l[f];this.set(I[0],I[1])}}function z$(){this.size=0,this.__data__={hash:new No,map:new(Ea||Nn),string:new No}}function B$(l){var f=Yl(this,l).delete(l);return this.size-=f?1:0,f}function F$(l){return Yl(this,l).get(l)}function $$(l){return Yl(this,l).has(l)}function H$(l,f){var m=Yl(this,l),I=m.size;return m.set(l,f),this.size+=m.size==I?0:1,this}Pn.prototype.clear=z$,Pn.prototype.delete=B$,Pn.prototype.get=F$,Pn.prototype.has=$$,Pn.prototype.set=H$;function Po(l){var f=-1,m=l==null?0:l.length;for(this.__data__=new Pn;++f<m;)this.add(l[f])}function V$(l){return this.__data__.set(l,c),this}function W$(l){return this.__data__.has(l)}Po.prototype.add=Po.prototype.push=V$,Po.prototype.has=W$;function Kr(l){var f=this.__data__=new Nn(l);this.size=f.size}function U$(){this.__data__=new Nn,this.size=0}function G$(l){var f=this.__data__,m=f.delete(l);return this.size=f.size,m}function K$(l){return this.__data__.get(l)}function Y$(l){return this.__data__.has(l)}function X$(l,f){var m=this.__data__;if(m instanceof Nn){var I=m.__data__;if(!Ea||I.length<o-1)return I.push([l,f]),this.size=++m.size,this;m=this.__data__=new Pn(I)}return m.set(l,f),this.size=m.size,this}Kr.prototype.clear=U$,Kr.prototype.delete=G$,Kr.prototype.get=K$,Kr.prototype.has=Y$,Kr.prototype.set=X$;function fE(l,f){var m=De(l),I=!m&&Do(l),k=!m&&!I&&io(l),F=!m&&!I&&!k&&_i(l),X=m||I||k||F,J=X?yf(l.length,a$):[],ae=J.length;for(var ge in l)(f||nt.call(l,ge))&&!(X&&(ge=="length"||k&&(ge=="offset"||ge=="parent")||F&&(ge=="buffer"||ge=="byteLength"||ge=="byteOffset")||Mn(ge,ae)))&&J.push(ge);return J}function pE(l){var f=l.length;return f?l[jf(0,f-1)]:r}function Z$(l,f){return Xl(rr(l),To(f,0,l.length))}function J$(l){return Xl(rr(l))}function Cf(l,f,m){(m!==r&&!Yr(l[f],m)||m===r&&!(f in l))&&Tn(l,f,m)}function Ia(l,f,m){var I=l[f];(!(nt.call(l,f)&&Yr(I,m))||m===r&&!(f in l))&&Tn(l,f,m)}function ql(l,f){for(var m=l.length;m--;)if(Yr(l[m][0],f))return m;return-1}function Q$(l,f,m,I){return to(l,function(k,F,X){f(I,k,m(k),X)}),I}function hE(l,f){return l&&dn(f,jt(f),l)}function e3(l,f){return l&&dn(f,or(f),l)}function Tn(l,f,m){f=="__proto__"&&Tl?Tl(l,f,{configurable:!0,enumerable:!0,value:m,writable:!0}):l[f]=m}function If(l,f){for(var m=-1,I=f.length,k=le(I),F=l==null;++m<I;)k[m]=F?r:sp(l,f[m]);return k}function To(l,f,m){return l===l&&(m!==r&&(l=l<=m?l:m),f!==r&&(l=l>=f?l:f)),l}function Tr(l,f,m,I,k,F){var X,J=f&p,ae=f&h,ge=f&v;if(m&&(X=k?m(l,I,k,F):m(l)),X!==r)return X;if(!wt(l))return l;var me=De(l);if(me){if(X=$3(l),!J)return rr(l,X)}else{var be=Gt(l),_e=be==ee||be==we;if(io(l))return LE(l,J);if(be==ce||be==K||_e&&!k){if(X=ae||_e?{}:nS(l),!J)return ae?T3(l,e3(X,l)):P3(l,hE(X,l))}else{if(!pt[be])return k?l:{};X=H3(l,be,J)}}F||(F=new Kr);var Ne=F.get(l);if(Ne)return Ne;F.set(l,X),AS(l)?l.forEach(function(Ae){X.add(Tr(Ae,f,m,Ae,l,F))}):PS(l)&&l.forEach(function(Ae,$e){X.set($e,Tr(Ae,f,m,$e,l,F))});var Te=ge?ae?Gf:Uf:ae?or:jt,Le=me?r:Te(l);return Rr(Le||l,function(Ae,$e){Le&&($e=Ae,Ae=l[$e]),Ia(X,$e,Tr(Ae,f,m,$e,l,F))}),X}function t3(l){var f=jt(l);return function(m){return vE(m,l,f)}}function vE(l,f,m){var I=m.length;if(l==null)return!I;for(l=ut(l);I--;){var k=m[I],F=f[k],X=l[k];if(X===r&&!(k in l)||!F(X))return!1}return!0}function gE(l,f,m){if(typeof l!="function")throw new Nr(a);return Ma(function(){l.apply(r,m)},f)}function Ra(l,f,m,I){var k=-1,F=wl,X=!0,J=l.length,ae=[],ge=f.length;if(!J)return ae;m&&(f=bt(f,vr(m))),I?(F=pf,X=!1):f.length>=o&&(F=xa,X=!1,f=new Po(f));e:for(;++k<J;){var me=l[k],be=m==null?me:m(me);if(me=I||me!==0?me:0,X&&be===be){for(var _e=ge;_e--;)if(f[_e]===be)continue e;ae.push(me)}else F(f,be,I)||ae.push(me)}return ae}var to=HE(un),mE=HE(Nf,!0);function r3(l,f){var m=!0;return to(l,function(I,k,F){return m=!!f(I,k,F),m}),m}function Ll(l,f,m){for(var I=-1,k=l.length;++I<k;){var F=l[I],X=f(F);if(X!=null&&(J===r?X===X&&!mr(X):m(X,J)))var J=X,ae=F}return ae}function n3(l,f,m,I){var k=l.length;for(m=je(m),m<0&&(m=-m>k?0:k+m),I=I===r||I>k?k:je(I),I<0&&(I+=k),I=m>I?0:MS(I);m<I;)l[m++]=f;return l}function bE(l,f){var m=[];return to(l,function(I,k,F){f(I,k,F)&&m.push(I)}),m}function Bt(l,f,m,I,k){var F=-1,X=l.length;for(m||(m=W3),k||(k=[]);++F<X;){var J=l[F];f>0&&m(J)?f>1?Bt(J,f-1,m,I,k):Jn(k,J):I||(k[k.length]=J)}return k}var Rf=VE(),yE=VE(!0);function un(l,f){return l&&Rf(l,f,jt)}function Nf(l,f){return l&&yE(l,f,jt)}function zl(l,f){return Zn(f,function(m){return Dn(l[m])})}function Ao(l,f){f=no(f,l);for(var m=0,I=f.length;l!=null&&m<I;)l=l[fn(f[m++])];return m&&m==I?l:r}function wE(l,f,m){var I=f(l);return De(l)?I:Jn(I,m(l))}function Xt(l){return l==null?l===r?It:pe:Ro&&Ro in ut(l)?z3(l):J3(l)}function Pf(l,f){return l>f}function o3(l,f){return l!=null&&nt.call(l,f)}function i3(l,f){return l!=null&&f in ut(l)}function a3(l,f,m){return l>=Ut(f,m)&&l<kt(f,m)}function Tf(l,f,m){for(var I=m?pf:wl,k=l[0].length,F=l.length,X=F,J=le(F),ae=1/0,ge=[];X--;){var me=l[X];X&&f&&(me=bt(me,vr(f))),ae=Ut(me.length,ae),J[X]=!m&&(f||k>=120&&me.length>=120)?new Po(X&&me):r}me=l[0];var be=-1,_e=J[0];e:for(;++be<k&&ge.length<ae;){var Ne=me[be],Te=f?f(Ne):Ne;if(Ne=m||Ne!==0?Ne:0,!(_e?xa(_e,Te):I(ge,Te,m))){for(X=F;--X;){var Le=J[X];if(!(Le?xa(Le,Te):I(l[X],Te,m)))continue e}_e&&_e.push(Te),ge.push(Ne)}}return ge}function s3(l,f,m,I){return un(l,function(k,F,X){f(I,m(k),F,X)}),I}function Na(l,f,m){f=no(f,l),l=sS(l,f);var I=l==null?l:l[fn(kr(f))];return I==null?r:hr(I,l,m)}function xE(l){return xt(l)&&Xt(l)==K}function l3(l){return xt(l)&&Xt(l)==mt}function c3(l){return xt(l)&&Xt(l)==oe}function Pa(l,f,m,I,k){return l===f?!0:l==null||f==null||!xt(l)&&!xt(f)?l!==l&&f!==f:u3(l,f,m,I,Pa,k)}function u3(l,f,m,I,k,F){var X=De(l),J=De(f),ae=X?Z:Gt(l),ge=J?Z:Gt(f);ae=ae==K?ce:ae,ge=ge==K?ce:ge;var me=ae==ce,be=ge==ce,_e=ae==ge;if(_e&&io(l)){if(!io(f))return!1;X=!0,me=!1}if(_e&&!me)return F||(F=new Kr),X||_i(l)?eS(l,f,m,I,k,F):q3(l,f,ae,m,I,k,F);if(!(m&y)){var Ne=me&&nt.call(l,"__wrapped__"),Te=be&&nt.call(f,"__wrapped__");if(Ne||Te){var Le=Ne?l.value():l,Ae=Te?f.value():f;return F||(F=new Kr),k(Le,Ae,m,I,F)}}return _e?(F||(F=new Kr),L3(l,f,m,I,k,F)):!1}function d3(l){return xt(l)&&Gt(l)==ve}function Af(l,f,m,I){var k=m.length,F=k,X=!I;if(l==null)return!F;for(l=ut(l);k--;){var J=m[k];if(X&&J[2]?J[1]!==l[J[0]]:!(J[0]in l))return!1}for(;++k<F;){J=m[k];var ae=J[0],ge=l[ae],me=J[1];if(X&&J[2]){if(ge===r&&!(ae in l))return!1}else{var be=new Kr;if(I)var _e=I(ge,me,ae,l,f,be);if(!(_e===r?Pa(me,ge,y|g,I,be):_e))return!1}}return!0}function _E(l){if(!wt(l)||G3(l))return!1;var f=Dn(l)?d$:Zd;return f.test(Mo(l))}function f3(l){return xt(l)&&Xt(l)==Ke}function p3(l){return xt(l)&&Gt(l)==ze}function h3(l){return xt(l)&&rc(l.length)&&!!gt[Xt(l)]}function EE(l){return typeof l=="function"?l:l==null?ir:typeof l=="object"?De(l)?CE(l[0],l[1]):OE(l):WS(l)}function kf(l){if(!ka(l))return m$(l);var f=[];for(var m in ut(l))nt.call(l,m)&&m!="constructor"&&f.push(m);return f}function v3(l){if(!wt(l))return Z3(l);var f=ka(l),m=[];for(var I in l)I=="constructor"&&(f||!nt.call(l,I))||m.push(I);return m}function Mf(l,f){return l<f}function SE(l,f){var m=-1,I=nr(l)?le(l.length):[];return to(l,function(k,F,X){I[++m]=f(k,F,X)}),I}function OE(l){var f=Yf(l);return f.length==1&&f[0][2]?iS(f[0][0],f[0][1]):function(m){return m===l||Af(m,l,f)}}function CE(l,f){return Zf(l)&&oS(f)?iS(fn(l),f):function(m){var I=sp(m,l);return I===r&&I===f?lp(m,l):Pa(f,I,y|g)}}function Bl(l,f,m,I,k){l!==f&&Rf(f,function(F,X){if(k||(k=new Kr),wt(F))g3(l,f,X,m,Bl,I,k);else{var J=I?I(Qf(l,X),F,X+"",l,f,k):r;J===r&&(J=F),Cf(l,X,J)}},or)}function g3(l,f,m,I,k,F,X){var J=Qf(l,m),ae=Qf(f,m),ge=X.get(ae);if(ge){Cf(l,m,ge);return}var me=F?F(J,ae,m+"",l,f,X):r,be=me===r;if(be){var _e=De(ae),Ne=!_e&&io(ae),Te=!_e&&!Ne&&_i(ae);me=ae,_e||Ne||Te?De(J)?me=J:Et(J)?me=rr(J):Ne?(be=!1,me=LE(ae,!0)):Te?(be=!1,me=zE(ae,!0)):me=[]:Da(ae)||Do(ae)?(me=J,Do(J)?me=DS(J):(!wt(J)||Dn(J))&&(me=nS(ae))):be=!1}be&&(X.set(ae,me),k(me,ae,I,F,X),X.delete(ae)),Cf(l,m,me)}function IE(l,f){var m=l.length;if(m)return f+=f<0?m:0,Mn(f,m)?l[f]:r}function RE(l,f,m){f.length?f=bt(f,function(F){return De(F)?function(X){return Ao(X,F.length===1?F[0]:F)}:F}):f=[ir];var I=-1;f=bt(f,vr(Pe()));var k=SE(l,function(F,X,J){var ae=bt(f,function(ge){return ge(F)});return{criteria:ae,index:++I,value:F}});return HF(k,function(F,X){return N3(F,X,m)})}function m3(l,f){return NE(l,f,function(m,I){return lp(l,I)})}function NE(l,f,m){for(var I=-1,k=f.length,F={};++I<k;){var X=f[I],J=Ao(l,X);m(J,X)&&Ta(F,no(X,l),J)}return F}function b3(l){return function(f){return Ao(f,l)}}function Df(l,f,m,I){var k=I?$F:di,F=-1,X=f.length,J=l;for(l===f&&(f=rr(f)),m&&(J=bt(l,vr(m)));++F<X;)for(var ae=0,ge=f[F],me=m?m(ge):ge;(ae=k(J,me,ae,I))>-1;)J!==l&&Pl.call(J,ae,1),Pl.call(l,ae,1);return l}function PE(l,f){for(var m=l?f.length:0,I=m-1;m--;){var k=f[m];if(m==I||k!==F){var F=k;Mn(k)?Pl.call(l,k,1):zf(l,k)}}return l}function jf(l,f){return l+kl(uE()*(f-l+1))}function y3(l,f,m,I){for(var k=-1,F=kt(Al((f-l)/(m||1)),0),X=le(F);F--;)X[I?F:++k]=l,l+=m;return X}function qf(l,f){var m="";if(!l||f<1||f>W)return m;do f%2&&(m+=l),f=kl(f/2),f&&(l+=l);while(f);return m}function Be(l,f){return ep(aS(l,f,ir),l+"")}function w3(l){return pE(Ei(l))}function x3(l,f){var m=Ei(l);return Xl(m,To(f,0,m.length))}function Ta(l,f,m,I){if(!wt(l))return l;f=no(f,l);for(var k=-1,F=f.length,X=F-1,J=l;J!=null&&++k<F;){var ae=fn(f[k]),ge=m;if(ae==="__proto__"||ae==="constructor"||ae==="prototype")return l;if(k!=X){var me=J[ae];ge=I?I(me,ae,J):r,ge===r&&(ge=wt(me)?me:Mn(f[k+1])?[]:{})}Ia(J,ae,ge),J=J[ae]}return l}var TE=Ml?function(l,f){return Ml.set(l,f),l}:ir,_3=Tl?function(l,f){return Tl(l,"toString",{configurable:!0,enumerable:!1,value:up(f),writable:!0})}:ir;function E3(l){return Xl(Ei(l))}function Ar(l,f,m){var I=-1,k=l.length;f<0&&(f=-f>k?0:k+f),m=m>k?k:m,m<0&&(m+=k),k=f>m?0:m-f>>>0,f>>>=0;for(var F=le(k);++I<k;)F[I]=l[I+f];return F}function S3(l,f){var m;return to(l,function(I,k,F){return m=f(I,k,F),!m}),!!m}function Fl(l,f,m){var I=0,k=l==null?I:l.length;if(typeof f=="number"&&f===f&&k<=te){for(;I<k;){var F=I+k>>>1,X=l[F];X!==null&&!mr(X)&&(m?X<=f:X<f)?I=F+1:k=F}return k}return Lf(l,f,ir,m)}function Lf(l,f,m,I){var k=0,F=l==null?0:l.length;if(F===0)return 0;f=m(f);for(var X=f!==f,J=f===null,ae=mr(f),ge=f===r;k<F;){var me=kl((k+F)/2),be=m(l[me]),_e=be!==r,Ne=be===null,Te=be===be,Le=mr(be);if(X)var Ae=I||Te;else ge?Ae=Te&&(I||_e):J?Ae=Te&&_e&&(I||!Ne):ae?Ae=Te&&_e&&!Ne&&(I||!Le):Ne||Le?Ae=!1:Ae=I?be<=f:be<f;Ae?k=me+1:F=me}return Ut(F,ie)}function AE(l,f){for(var m=-1,I=l.length,k=0,F=[];++m<I;){var X=l[m],J=f?f(X):X;if(!m||!Yr(J,ae)){var ae=J;F[k++]=X===0?0:X}}return F}function kE(l){return typeof l=="number"?l:mr(l)?z:+l}function gr(l){if(typeof l=="string")return l;if(De(l))return bt(l,gr)+"";if(mr(l))return dE?dE.call(l):"";var f=l+"";return f=="0"&&1/l==-G?"-0":f}function ro(l,f,m){var I=-1,k=wl,F=l.length,X=!0,J=[],ae=J;if(m)X=!1,k=pf;else if(F>=o){var ge=f?null:D3(l);if(ge)return _l(ge);X=!1,k=xa,ae=new Po}else ae=f?[]:J;e:for(;++I<F;){var me=l[I],be=f?f(me):me;if(me=m||me!==0?me:0,X&&be===be){for(var _e=ae.length;_e--;)if(ae[_e]===be)continue e;f&&ae.push(be),J.push(me)}else k(ae,be,m)||(ae!==J&&ae.push(be),J.push(me))}return J}function zf(l,f){return f=no(f,l),l=sS(l,f),l==null||delete l[fn(kr(f))]}function ME(l,f,m,I){return Ta(l,f,m(Ao(l,f)),I)}function $l(l,f,m,I){for(var k=l.length,F=I?k:-1;(I?F--:++F<k)&&f(l[F],F,l););return m?Ar(l,I?0:F,I?F+1:k):Ar(l,I?F+1:0,I?k:F)}function DE(l,f){var m=l;return m instanceof Ve&&(m=m.value()),hf(f,function(I,k){return k.func.apply(k.thisArg,Jn([I],k.args))},m)}function Bf(l,f,m){var I=l.length;if(I<2)return I?ro(l[0]):[];for(var k=-1,F=le(I);++k<I;)for(var X=l[k],J=-1;++J<I;)J!=k&&(F[k]=Ra(F[k]||X,l[J],f,m));return ro(Bt(F,1),f,m)}function jE(l,f,m){for(var I=-1,k=l.length,F=f.length,X={};++I<k;){var J=I<F?f[I]:r;m(X,l[I],J)}return X}function Ff(l){return Et(l)?l:[]}function $f(l){return typeof l=="function"?l:ir}function no(l,f){return De(l)?l:Zf(l,f)?[l]:dS(Ze(l))}var O3=Be;function oo(l,f,m){var I=l.length;return m=m===r?I:m,!f&&m>=I?l:Ar(l,f,m)}var qE=f$||function(l){return zt.clearTimeout(l)};function LE(l,f){if(f)return l.slice();var m=l.length,I=iE?iE(m):new l.constructor(m);return l.copy(I),I}function Hf(l){var f=new l.constructor(l.byteLength);return new Rl(f).set(new Rl(l)),f}function C3(l,f){var m=f?Hf(l.buffer):l.buffer;return new l.constructor(m,l.byteOffset,l.byteLength)}function I3(l){var f=new l.constructor(l.source,sl.exec(l));return f.lastIndex=l.lastIndex,f}function R3(l){return Ca?ut(Ca.call(l)):{}}function zE(l,f){var m=f?Hf(l.buffer):l.buffer;return new l.constructor(m,l.byteOffset,l.length)}function BE(l,f){if(l!==f){var m=l!==r,I=l===null,k=l===l,F=mr(l),X=f!==r,J=f===null,ae=f===f,ge=mr(f);if(!J&&!ge&&!F&&l>f||F&&X&&ae&&!J&&!ge||I&&X&&ae||!m&&ae||!k)return 1;if(!I&&!F&&!ge&&l<f||ge&&m&&k&&!I&&!F||J&&m&&k||!X&&k||!ae)return-1}return 0}function N3(l,f,m){for(var I=-1,k=l.criteria,F=f.criteria,X=k.length,J=m.length;++I<X;){var ae=BE(k[I],F[I]);if(ae){if(I>=J)return ae;var ge=m[I];return ae*(ge=="desc"?-1:1)}}return l.index-f.index}function FE(l,f,m,I){for(var k=-1,F=l.length,X=m.length,J=-1,ae=f.length,ge=kt(F-X,0),me=le(ae+ge),be=!I;++J<ae;)me[J]=f[J];for(;++k<X;)(be||k<F)&&(me[m[k]]=l[k]);for(;ge--;)me[J++]=l[k++];return me}function $E(l,f,m,I){for(var k=-1,F=l.length,X=-1,J=m.length,ae=-1,ge=f.length,me=kt(F-J,0),be=le(me+ge),_e=!I;++k<me;)be[k]=l[k];for(var Ne=k;++ae<ge;)be[Ne+ae]=f[ae];for(;++X<J;)(_e||k<F)&&(be[Ne+m[X]]=l[k++]);return be}function rr(l,f){var m=-1,I=l.length;for(f||(f=le(I));++m<I;)f[m]=l[m];return f}function dn(l,f,m,I){var k=!m;m||(m={});for(var F=-1,X=f.length;++F<X;){var J=f[F],ae=I?I(m[J],l[J],J,m,l):r;ae===r&&(ae=l[J]),k?Tn(m,J,ae):Ia(m,J,ae)}return m}function P3(l,f){return dn(l,Xf(l),f)}function T3(l,f){return dn(l,tS(l),f)}function Hl(l,f){return function(m,I){var k=De(m)?jF:Q$,F=f?f():{};return k(m,l,Pe(I,2),F)}}function yi(l){return Be(function(f,m){var I=-1,k=m.length,F=k>1?m[k-1]:r,X=k>2?m[2]:r;for(F=l.length>3&&typeof F=="function"?(k--,F):r,X&&Zt(m[0],m[1],X)&&(F=k<3?r:F,k=1),f=ut(f);++I<k;){var J=m[I];J&&l(f,J,I,F)}return f})}function HE(l,f){return function(m,I){if(m==null)return m;if(!nr(m))return l(m,I);for(var k=m.length,F=f?k:-1,X=ut(m);(f?F--:++F<k)&&I(X[F],F,X)!==!1;);return m}}function VE(l){return function(f,m,I){for(var k=-1,F=ut(f),X=I(f),J=X.length;J--;){var ae=X[l?J:++k];if(m(F[ae],ae,F)===!1)break}return f}}function A3(l,f,m){var I=f&b,k=Aa(l);function F(){var X=this&&this!==zt&&this instanceof F?k:l;return X.apply(I?m:this,arguments)}return F}function WE(l){return function(f){f=Ze(f);var m=fi(f)?Gr(f):r,I=m?m[0]:f.charAt(0),k=m?oo(m,1).join(""):f.slice(1);return I[l]()+k}}function wi(l){return function(f){return hf(HS($S(f).replace(_F,"")),l,"")}}function Aa(l){return function(){var f=arguments;switch(f.length){case 0:return new l;case 1:return new l(f[0]);case 2:return new l(f[0],f[1]);case 3:return new l(f[0],f[1],f[2]);case 4:return new l(f[0],f[1],f[2],f[3]);case 5:return new l(f[0],f[1],f[2],f[3],f[4]);case 6:return new l(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new l(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var m=bi(l.prototype),I=l.apply(m,f);return wt(I)?I:m}}function k3(l,f,m){var I=Aa(l);function k(){for(var F=arguments.length,X=le(F),J=F,ae=xi(k);J--;)X[J]=arguments[J];var ge=F<3&&X[0]!==ae&&X[F-1]!==ae?[]:Qn(X,ae);if(F-=ge.length,F<m)return XE(l,f,Vl,k.placeholder,r,X,ge,r,r,m-F);var me=this&&this!==zt&&this instanceof k?I:l;return hr(me,this,X)}return k}function UE(l){return function(f,m,I){var k=ut(f);if(!nr(f)){var F=Pe(m,3);f=jt(f),m=function(J){return F(k[J],J,k)}}var X=l(f,m,I);return X>-1?k[F?f[X]:X]:r}}function GE(l){return kn(function(f){var m=f.length,I=m,k=Pr.prototype.thru;for(l&&f.reverse();I--;){var F=f[I];if(typeof F!="function")throw new Nr(a);if(k&&!X&&Kl(F)=="wrapper")var X=new Pr([],!0)}for(I=X?I:m;++I<m;){F=f[I];var J=Kl(F),ae=J=="wrapper"?Kf(F):r;ae&&Jf(ae[0])&&ae[1]==(N|E|_|R)&&!ae[4].length&&ae[9]==1?X=X[Kl(ae[0])].apply(X,ae[3]):X=F.length==1&&Jf(F)?X[J]():X.thru(F)}return function(){var ge=arguments,me=ge[0];if(X&&ge.length==1&&De(me))return X.plant(me).value();for(var be=0,_e=m?f[be].apply(this,ge):me;++be<m;)_e=f[be].call(this,_e);return _e}})}function Vl(l,f,m,I,k,F,X,J,ae,ge){var me=f&N,be=f&b,_e=f&x,Ne=f&(E|S),Te=f&A,Le=_e?r:Aa(l);function Ae(){for(var $e=arguments.length,We=le($e),br=$e;br--;)We[br]=arguments[br];if(Ne)var Jt=xi(Ae),yr=WF(We,Jt);if(I&&(We=FE(We,I,k,Ne)),F&&(We=$E(We,F,X,Ne)),$e-=yr,Ne&&$e<ge){var St=Qn(We,Jt);return XE(l,f,Vl,Ae.placeholder,m,We,St,J,ae,ge-$e)}var Xr=be?m:this,qn=_e?Xr[l]:l;return $e=We.length,J?We=Q3(We,J):Te&&$e>1&&We.reverse(),me&&ae<$e&&(We.length=ae),this&&this!==zt&&this instanceof Ae&&(qn=Le||Aa(qn)),qn.apply(Xr,We)}return Ae}function KE(l,f){return function(m,I){return s3(m,l,f(I),{})}}function Wl(l,f){return function(m,I){var k;if(m===r&&I===r)return f;if(m!==r&&(k=m),I!==r){if(k===r)return I;typeof m=="string"||typeof I=="string"?(m=gr(m),I=gr(I)):(m=kE(m),I=kE(I)),k=l(m,I)}return k}}function Vf(l){return kn(function(f){return f=bt(f,vr(Pe())),Be(function(m){var I=this;return l(f,function(k){return hr(k,I,m)})})})}function Ul(l,f){f=f===r?" ":gr(f);var m=f.length;if(m<2)return m?qf(f,l):f;var I=qf(f,Al(l/pi(f)));return fi(f)?oo(Gr(I),0,l).join(""):I.slice(0,l)}function M3(l,f,m,I){var k=f&b,F=Aa(l);function X(){for(var J=-1,ae=arguments.length,ge=-1,me=I.length,be=le(me+ae),_e=this&&this!==zt&&this instanceof X?F:l;++ge<me;)be[ge]=I[ge];for(;ae--;)be[ge++]=arguments[++J];return hr(_e,k?m:this,be)}return X}function YE(l){return function(f,m,I){return I&&typeof I!="number"&&Zt(f,m,I)&&(m=I=r),f=jn(f),m===r?(m=f,f=0):m=jn(m),I=I===r?f<m?1:-1:jn(I),y3(f,m,I,l)}}function Gl(l){return function(f,m){return typeof f=="string"&&typeof m=="string"||(f=Mr(f),m=Mr(m)),l(f,m)}}function XE(l,f,m,I,k,F,X,J,ae,ge){var me=f&E,be=me?X:r,_e=me?r:X,Ne=me?F:r,Te=me?r:F;f|=me?_:O,f&=~(me?O:_),f&w||(f&=-4);var Le=[l,f,k,Ne,be,Te,_e,J,ae,ge],Ae=m.apply(r,Le);return Jf(l)&&lS(Ae,Le),Ae.placeholder=I,cS(Ae,l,f)}function Wf(l){var f=At[l];return function(m,I){if(m=Mr(m),I=I==null?0:Ut(je(I),292),I&&cE(m)){var k=(Ze(m)+"e").split("e"),F=f(k[0]+"e"+(+k[1]+I));return k=(Ze(F)+"e").split("e"),+(k[0]+"e"+(+k[1]-I))}return f(m)}}var D3=gi&&1/_l(new gi([,-0]))[1]==G?function(l){return new gi(l)}:pp;function ZE(l){return function(f){var m=Gt(f);return m==ve?xf(f):m==ze?JF(f):VF(f,l(f))}}function An(l,f,m,I,k,F,X,J){var ae=f&x;if(!ae&&typeof l!="function")throw new Nr(a);var ge=I?I.length:0;if(ge||(f&=-97,I=k=r),X=X===r?X:kt(je(X),0),J=J===r?J:je(J),ge-=k?k.length:0,f&O){var me=I,be=k;I=k=r}var _e=ae?r:Kf(l),Ne=[l,f,m,I,k,me,be,F,X,J];if(_e&&X3(Ne,_e),l=Ne[0],f=Ne[1],m=Ne[2],I=Ne[3],k=Ne[4],J=Ne[9]=Ne[9]===r?ae?0:l.length:kt(Ne[9]-ge,0),!J&&f&(E|S)&&(f&=-25),!f||f==b)var Te=A3(l,f,m);else f==E||f==S?Te=k3(l,f,J):(f==_||f==(b|_))&&!k.length?Te=M3(l,f,m,I):Te=Vl.apply(r,Ne);var Le=_e?TE:lS;return cS(Le(Te,Ne),l,f)}function JE(l,f,m,I){return l===r||Yr(l,vi[m])&&!nt.call(I,m)?f:l}function QE(l,f,m,I,k,F){return wt(l)&&wt(f)&&(F.set(f,l),Bl(l,f,r,QE,F),F.delete(f)),l}function j3(l){return Da(l)?r:l}function eS(l,f,m,I,k,F){var X=m&y,J=l.length,ae=f.length;if(J!=ae&&!(X&&ae>J))return!1;var ge=F.get(l),me=F.get(f);if(ge&&me)return ge==f&&me==l;var be=-1,_e=!0,Ne=m&g?new Po:r;for(F.set(l,f),F.set(f,l);++be<J;){var Te=l[be],Le=f[be];if(I)var Ae=X?I(Le,Te,be,f,l,F):I(Te,Le,be,l,f,F);if(Ae!==r){if(Ae)continue;_e=!1;break}if(Ne){if(!vf(f,function($e,We){if(!xa(Ne,We)&&(Te===$e||k(Te,$e,m,I,F)))return Ne.push(We)})){_e=!1;break}}else if(!(Te===Le||k(Te,Le,m,I,F))){_e=!1;break}}return F.delete(l),F.delete(f),_e}function q3(l,f,m,I,k,F,X){switch(m){case ct:if(l.byteLength!=f.byteLength||l.byteOffset!=f.byteOffset)return!1;l=l.buffer,f=f.buffer;case mt:return!(l.byteLength!=f.byteLength||!F(new Rl(l),new Rl(f)));case Y:case oe:case Ee:return Yr(+l,+f);case se:return l.name==f.name&&l.message==f.message;case Ke:case rt:return l==f+"";case ve:var J=xf;case ze:var ae=I&y;if(J||(J=_l),l.size!=f.size&&!ae)return!1;var ge=X.get(l);if(ge)return ge==f;I|=g,X.set(l,f);var me=eS(J(l),J(f),I,k,F,X);return X.delete(l),me;case Xe:if(Ca)return Ca.call(l)==Ca.call(f)}return!1}function L3(l,f,m,I,k,F){var X=m&y,J=Uf(l),ae=J.length,ge=Uf(f),me=ge.length;if(ae!=me&&!X)return!1;for(var be=ae;be--;){var _e=J[be];if(!(X?_e in f:nt.call(f,_e)))return!1}var Ne=F.get(l),Te=F.get(f);if(Ne&&Te)return Ne==f&&Te==l;var Le=!0;F.set(l,f),F.set(f,l);for(var Ae=X;++be<ae;){_e=J[be];var $e=l[_e],We=f[_e];if(I)var br=X?I(We,$e,_e,f,l,F):I($e,We,_e,l,f,F);if(!(br===r?$e===We||k($e,We,m,I,F):br)){Le=!1;break}Ae||(Ae=_e=="constructor")}if(Le&&!Ae){var Jt=l.constructor,yr=f.constructor;Jt!=yr&&"constructor"in l&&"constructor"in f&&!(typeof Jt=="function"&&Jt instanceof Jt&&typeof yr=="function"&&yr instanceof yr)&&(Le=!1)}return F.delete(l),F.delete(f),Le}function kn(l){return ep(aS(l,r,vS),l+"")}function Uf(l){return wE(l,jt,Xf)}function Gf(l){return wE(l,or,tS)}var Kf=Ml?function(l){return Ml.get(l)}:pp;function Kl(l){for(var f=l.name+"",m=mi[f],I=nt.call(mi,f)?m.length:0;I--;){var k=m[I],F=k.func;if(F==null||F==l)return k.name}return f}function xi(l){var f=nt.call(L,"placeholder")?L:l;return f.placeholder}function Pe(){var l=L.iteratee||dp;return l=l===dp?EE:l,arguments.length?l(arguments[0],arguments[1]):l}function Yl(l,f){var m=l.__data__;return U3(f)?m[typeof f=="string"?"string":"hash"]:m.map}function Yf(l){for(var f=jt(l),m=f.length;m--;){var I=f[m],k=l[I];f[m]=[I,k,oS(k)]}return f}function ko(l,f){var m=YF(l,f);return _E(m)?m:r}function z3(l){var f=nt.call(l,Ro),m=l[Ro];try{l[Ro]=r;var I=!0}catch{}var k=Cl.call(l);return I&&(f?l[Ro]=m:delete l[Ro]),k}var Xf=Ef?function(l){return l==null?[]:(l=ut(l),Zn(Ef(l),function(f){return sE.call(l,f)}))}:hp,tS=Ef?function(l){for(var f=[];l;)Jn(f,Xf(l)),l=Nl(l);return f}:hp,Gt=Xt;(Sf&&Gt(new Sf(new ArrayBuffer(1)))!=ct||Ea&&Gt(new Ea)!=ve||Of&&Gt(Of.resolve())!=Ce||gi&&Gt(new gi)!=ze||Sa&&Gt(new Sa)!=lt)&&(Gt=function(l){var f=Xt(l),m=f==ce?l.constructor:r,I=m?Mo(m):"";if(I)switch(I){case x$:return ct;case _$:return ve;case E$:return Ce;case S$:return ze;case O$:return lt}return f});function B3(l,f,m){for(var I=-1,k=m.length;++I<k;){var F=m[I],X=F.size;switch(F.type){case"drop":l+=X;break;case"dropRight":f-=X;break;case"take":f=Ut(f,l+X);break;case"takeRight":l=kt(l,f-X);break}}return{start:l,end:f}}function F3(l){var f=l.match(al);return f?f[1].split(Vd):[]}function rS(l,f,m){f=no(f,l);for(var I=-1,k=f.length,F=!1;++I<k;){var X=fn(f[I]);if(!(F=l!=null&&m(l,X)))break;l=l[X]}return F||++I!=k?F:(k=l==null?0:l.length,!!k&&rc(k)&&Mn(X,k)&&(De(l)||Do(l)))}function $3(l){var f=l.length,m=new l.constructor(f);return f&&typeof l[0]=="string"&&nt.call(l,"index")&&(m.index=l.index,m.input=l.input),m}function nS(l){return typeof l.constructor=="function"&&!ka(l)?bi(Nl(l)):{}}function H3(l,f,m){var I=l.constructor;switch(f){case mt:return Hf(l);case Y:case oe:return new I(+l);case ct:return C3(l,m);case Lt:case pr:case Cr:case Kt:case Tt:case Yt:case ln:case Oo:case Xn:return zE(l,m);case ve:return new I;case Ee:case rt:return new I(l);case Ke:return I3(l);case ze:return new I;case Xe:return R3(l)}}function V3(l,f){var m=f.length;if(!m)return l;var I=m-1;return f[I]=(m>1?"& ":"")+f[I],f=f.join(m>2?", ":" "),l.replace(Hd,`{
62
+ */var Fte=vs.exports,BA;function $te(){return BA||(BA=1,(function(e,t){(function(){var r,n="4.17.21",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",u=500,d="__lodash_placeholder__",p=1,h=2,v=4,y=1,g=2,b=1,x=2,w=4,E=8,S=16,_=32,O=64,N=128,R=256,A=512,D=30,B="...",j=800,M=16,P=1,V=2,q=3,G=1/0,W=9007199254740991,Q=17976931348623157e292,z=NaN,U=4294967295,ie=U-1,te=U>>>1,$=[["ary",N],["bind",b],["bindKey",x],["curry",E],["curryRight",S],["flip",A],["partial",_],["partialRight",O],["rearg",R]],K="[object Arguments]",Z="[object Array]",H="[object AsyncFunction]",Y="[object Boolean]",oe="[object Date]",re="[object DOMException]",se="[object Error]",ee="[object Function]",we="[object GeneratorFunction]",ve="[object Map]",Ee="[object Number]",pe="[object Null]",ce="[object Object]",Ce="[object Promise]",ke="[object Proxy]",Ke="[object RegExp]",ze="[object Set]",rt="[object String]",Xe="[object Symbol]",It="[object Undefined]",lt="[object WeakMap]",Wt="[object WeakSet]",mt="[object ArrayBuffer]",ct="[object DataView]",Lt="[object Float32Array]",pr="[object Float64Array]",Cr="[object Int8Array]",Kt="[object Int16Array]",Tt="[object Int32Array]",Yt="[object Uint8Array]",ln="[object Uint8ClampedArray]",Oo="[object Uint16Array]",Xn="[object Uint32Array]",cn=/\b__p \+= '';/g,ai=/\b(__p \+=) '' \+/g,zd=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Js=/&(?:amp|lt|gt|quot|#39);/g,ga=/[&<>"']/g,Bd=RegExp(Js.source),Qs=RegExp(ga.source),Fd=/<%-([\s\S]+?)%>/g,el=/<%([\s\S]+?)%>/g,tl=/<%=([\s\S]+?)%>/g,rl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$d=/^\w*$/,nl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ma=/[\\^$.*+?()[\]{}|]/g,ol=RegExp(ma.source),ba=/^\s+/,il=/\s/,Hd=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,al=/\{\n\/\* \[wrapped with (.+)\] \*/,Vd=/,? & /,Wd=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ud=/[()=,{}\[\]\/\s]/,Gd=/\\(\\)?/g,Kd=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,sl=/\w*$/,Yd=/^[-+]0x[0-9a-f]+$/i,Xd=/^0b[01]+$/i,Zd=/^\[object .+?Constructor\]$/,Jd=/^0o[0-7]+$/i,Qd=/^(?:0|[1-9]\d*)$/,ef=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,si=/($^)/,ll=/['\n\r\u2028\u2029\\]/g,li="\\ud800-\\udfff",tf="\\u0300-\\u036f",rf="\\ufe20-\\ufe2f",cl="\\u20d0-\\u20ff",ul=tf+rf+cl,ya="\\u2700-\\u27bf",dl="a-z\\xdf-\\xf6\\xf8-\\xff",fl="\\xac\\xb1\\xd7\\xf7",nf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",pl="\\u2000-\\u206f",of=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",hl="A-Z\\xc0-\\xd6\\xd8-\\xde",wa="\\ufe0e\\ufe0f",vl=fl+nf+pl+of,xa="['’]",af="["+li+"]",gl="["+vl+"]",Co="["+ul+"]",ml="\\d+",ci="["+ya+"]",bl="["+dl+"]",yl="[^"+li+vl+ml+ya+dl+hl+"]",sf="\\ud83c[\\udffb-\\udfff]",vF="(?:"+Co+"|"+sf+")",A1="[^"+li+"]",lf="(?:\\ud83c[\\udde6-\\uddff]){2}",cf="[\\ud800-\\udbff][\\udc00-\\udfff]",ui="["+hl+"]",k1="\\u200d",M1="(?:"+bl+"|"+yl+")",gF="(?:"+ui+"|"+yl+")",D1="(?:"+xa+"(?:d|ll|m|re|s|t|ve))?",j1="(?:"+xa+"(?:D|LL|M|RE|S|T|VE))?",q1=vF+"?",L1="["+wa+"]?",mF="(?:"+k1+"(?:"+[A1,lf,cf].join("|")+")"+L1+q1+")*",bF="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",yF="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",z1=L1+q1+mF,wF="(?:"+[ci,lf,cf].join("|")+")"+z1,xF="(?:"+[A1+Co+"?",Co,lf,cf,af].join("|")+")",_F=RegExp(xa,"g"),EF=RegExp(Co,"g"),uf=RegExp(sf+"(?="+sf+")|"+xF+z1,"g"),SF=RegExp([ui+"?"+bl+"+"+D1+"(?="+[gl,ui,"$"].join("|")+")",gF+"+"+j1+"(?="+[gl,ui+M1,"$"].join("|")+")",ui+"?"+M1+"+"+D1,ui+"+"+j1,yF,bF,ml,wF].join("|"),"g"),OF=RegExp("["+k1+li+ul+wa+"]"),CF=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,IF=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],RF=-1,gt={};gt[Lt]=gt[pr]=gt[Cr]=gt[Kt]=gt[Tt]=gt[Yt]=gt[ln]=gt[Oo]=gt[Xn]=!0,gt[K]=gt[Z]=gt[mt]=gt[Y]=gt[ct]=gt[oe]=gt[se]=gt[ee]=gt[ve]=gt[Ee]=gt[ce]=gt[Ke]=gt[ze]=gt[rt]=gt[lt]=!1;var pt={};pt[K]=pt[Z]=pt[mt]=pt[ct]=pt[Y]=pt[oe]=pt[Lt]=pt[pr]=pt[Cr]=pt[Kt]=pt[Tt]=pt[ve]=pt[Ee]=pt[ce]=pt[Ke]=pt[ze]=pt[rt]=pt[Xe]=pt[Yt]=pt[ln]=pt[Oo]=pt[Xn]=!0,pt[se]=pt[ee]=pt[lt]=!1;var NF={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},PF={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},TF={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},AF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},kF=parseFloat,MF=parseInt,B1=typeof _t=="object"&&_t&&_t.Object===Object&&_t,DF=typeof self=="object"&&self&&self.Object===Object&&self,zt=B1||DF||Function("return this")(),df=t&&!t.nodeType&&t,Io=df&&!0&&e&&!e.nodeType&&e,F1=Io&&Io.exports===df,ff=F1&&B1.process,Ir=(function(){try{var ne=Io&&Io.require&&Io.require("util").types;return ne||ff&&ff.binding&&ff.binding("util")}catch{}})(),$1=Ir&&Ir.isArrayBuffer,H1=Ir&&Ir.isDate,V1=Ir&&Ir.isMap,W1=Ir&&Ir.isRegExp,U1=Ir&&Ir.isSet,G1=Ir&&Ir.isTypedArray;function hr(ne,he,le){switch(le.length){case 0:return ne.call(he);case 1:return ne.call(he,le[0]);case 2:return ne.call(he,le[0],le[1]);case 3:return ne.call(he,le[0],le[1],le[2])}return ne.apply(he,le)}function jF(ne,he,le,Oe){for(var Me=-1,Ye=ne==null?0:ne.length;++Me<Ye;){var At=ne[Me];he(Oe,At,le(At),ne)}return Oe}function Rr(ne,he){for(var le=-1,Oe=ne==null?0:ne.length;++le<Oe&&he(ne[le],le,ne)!==!1;);return ne}function qF(ne,he){for(var le=ne==null?0:ne.length;le--&&he(ne[le],le,ne)!==!1;);return ne}function K1(ne,he){for(var le=-1,Oe=ne==null?0:ne.length;++le<Oe;)if(!he(ne[le],le,ne))return!1;return!0}function Zn(ne,he){for(var le=-1,Oe=ne==null?0:ne.length,Me=0,Ye=[];++le<Oe;){var At=ne[le];he(At,le,ne)&&(Ye[Me++]=At)}return Ye}function wl(ne,he){var le=ne==null?0:ne.length;return!!le&&di(ne,he,0)>-1}function pf(ne,he,le){for(var Oe=-1,Me=ne==null?0:ne.length;++Oe<Me;)if(le(he,ne[Oe]))return!0;return!1}function bt(ne,he){for(var le=-1,Oe=ne==null?0:ne.length,Me=Array(Oe);++le<Oe;)Me[le]=he(ne[le],le,ne);return Me}function Jn(ne,he){for(var le=-1,Oe=he.length,Me=ne.length;++le<Oe;)ne[Me+le]=he[le];return ne}function hf(ne,he,le,Oe){var Me=-1,Ye=ne==null?0:ne.length;for(Oe&&Ye&&(le=ne[++Me]);++Me<Ye;)le=he(le,ne[Me],Me,ne);return le}function LF(ne,he,le,Oe){var Me=ne==null?0:ne.length;for(Oe&&Me&&(le=ne[--Me]);Me--;)le=he(le,ne[Me],Me,ne);return le}function vf(ne,he){for(var le=-1,Oe=ne==null?0:ne.length;++le<Oe;)if(he(ne[le],le,ne))return!0;return!1}var zF=gf("length");function BF(ne){return ne.split("")}function FF(ne){return ne.match(Wd)||[]}function Y1(ne,he,le){var Oe;return le(ne,function(Me,Ye,At){if(he(Me,Ye,At))return Oe=Ye,!1}),Oe}function xl(ne,he,le,Oe){for(var Me=ne.length,Ye=le+(Oe?1:-1);Oe?Ye--:++Ye<Me;)if(he(ne[Ye],Ye,ne))return Ye;return-1}function di(ne,he,le){return he===he?QF(ne,he,le):xl(ne,X1,le)}function $F(ne,he,le,Oe){for(var Me=le-1,Ye=ne.length;++Me<Ye;)if(Oe(ne[Me],he))return Me;return-1}function X1(ne){return ne!==ne}function Z1(ne,he){var le=ne==null?0:ne.length;return le?bf(ne,he)/le:z}function gf(ne){return function(he){return he==null?r:he[ne]}}function mf(ne){return function(he){return ne==null?r:ne[he]}}function J1(ne,he,le,Oe,Me){return Me(ne,function(Ye,At,ut){le=Oe?(Oe=!1,Ye):he(le,Ye,At,ut)}),le}function HF(ne,he){var le=ne.length;for(ne.sort(he);le--;)ne[le]=ne[le].value;return ne}function bf(ne,he){for(var le,Oe=-1,Me=ne.length;++Oe<Me;){var Ye=he(ne[Oe]);Ye!==r&&(le=le===r?Ye:le+Ye)}return le}function yf(ne,he){for(var le=-1,Oe=Array(ne);++le<ne;)Oe[le]=he(le);return Oe}function VF(ne,he){return bt(he,function(le){return[le,ne[le]]})}function Q1(ne){return ne&&ne.slice(0,nE(ne)+1).replace(ba,"")}function vr(ne){return function(he){return ne(he)}}function wf(ne,he){return bt(he,function(le){return ne[le]})}function _a(ne,he){return ne.has(he)}function eE(ne,he){for(var le=-1,Oe=ne.length;++le<Oe&&di(he,ne[le],0)>-1;);return le}function tE(ne,he){for(var le=ne.length;le--&&di(he,ne[le],0)>-1;);return le}function WF(ne,he){for(var le=ne.length,Oe=0;le--;)ne[le]===he&&++Oe;return Oe}var UF=mf(NF),GF=mf(PF);function KF(ne){return"\\"+AF[ne]}function YF(ne,he){return ne==null?r:ne[he]}function fi(ne){return OF.test(ne)}function XF(ne){return CF.test(ne)}function ZF(ne){for(var he,le=[];!(he=ne.next()).done;)le.push(he.value);return le}function xf(ne){var he=-1,le=Array(ne.size);return ne.forEach(function(Oe,Me){le[++he]=[Me,Oe]}),le}function rE(ne,he){return function(le){return ne(he(le))}}function Qn(ne,he){for(var le=-1,Oe=ne.length,Me=0,Ye=[];++le<Oe;){var At=ne[le];(At===he||At===d)&&(ne[le]=d,Ye[Me++]=le)}return Ye}function _l(ne){var he=-1,le=Array(ne.size);return ne.forEach(function(Oe){le[++he]=Oe}),le}function JF(ne){var he=-1,le=Array(ne.size);return ne.forEach(function(Oe){le[++he]=[Oe,Oe]}),le}function QF(ne,he,le){for(var Oe=le-1,Me=ne.length;++Oe<Me;)if(ne[Oe]===he)return Oe;return-1}function e$(ne,he,le){for(var Oe=le+1;Oe--;)if(ne[Oe]===he)return Oe;return Oe}function pi(ne){return fi(ne)?r$(ne):zF(ne)}function Gr(ne){return fi(ne)?n$(ne):BF(ne)}function nE(ne){for(var he=ne.length;he--&&il.test(ne.charAt(he)););return he}var t$=mf(TF);function r$(ne){for(var he=uf.lastIndex=0;uf.test(ne);)++he;return he}function n$(ne){return ne.match(uf)||[]}function o$(ne){return ne.match(SF)||[]}var i$=(function ne(he){he=he==null?zt:hi.defaults(zt.Object(),he,hi.pick(zt,IF));var le=he.Array,Oe=he.Date,Me=he.Error,Ye=he.Function,At=he.Math,ut=he.Object,_f=he.RegExp,a$=he.String,Nr=he.TypeError,El=le.prototype,s$=Ye.prototype,vi=ut.prototype,Sl=he["__core-js_shared__"],Ol=s$.toString,nt=vi.hasOwnProperty,l$=0,oE=(function(){var l=/[^.]+$/.exec(Sl&&Sl.keys&&Sl.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),Cl=vi.toString,c$=Ol.call(ut),u$=zt._,d$=_f("^"+Ol.call(nt).replace(ma,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Il=F1?he.Buffer:r,eo=he.Symbol,Rl=he.Uint8Array,iE=Il?Il.allocUnsafe:r,Nl=rE(ut.getPrototypeOf,ut),aE=ut.create,sE=vi.propertyIsEnumerable,Pl=El.splice,lE=eo?eo.isConcatSpreadable:r,Ea=eo?eo.iterator:r,Ro=eo?eo.toStringTag:r,Tl=(function(){try{var l=ko(ut,"defineProperty");return l({},"",{}),l}catch{}})(),f$=he.clearTimeout!==zt.clearTimeout&&he.clearTimeout,p$=Oe&&Oe.now!==zt.Date.now&&Oe.now,h$=he.setTimeout!==zt.setTimeout&&he.setTimeout,Al=At.ceil,kl=At.floor,Ef=ut.getOwnPropertySymbols,v$=Il?Il.isBuffer:r,cE=he.isFinite,g$=El.join,m$=rE(ut.keys,ut),kt=At.max,Ut=At.min,b$=Oe.now,y$=he.parseInt,uE=At.random,w$=El.reverse,Sf=ko(he,"DataView"),Sa=ko(he,"Map"),Of=ko(he,"Promise"),gi=ko(he,"Set"),Oa=ko(he,"WeakMap"),Ca=ko(ut,"create"),Ml=Oa&&new Oa,mi={},x$=Mo(Sf),_$=Mo(Sa),E$=Mo(Of),S$=Mo(gi),O$=Mo(Oa),Dl=eo?eo.prototype:r,Ia=Dl?Dl.valueOf:r,dE=Dl?Dl.toString:r;function L(l){if(xt(l)&&!De(l)&&!(l instanceof Ve)){if(l instanceof Pr)return l;if(nt.call(l,"__wrapped__"))return fS(l)}return new Pr(l)}var bi=(function(){function l(){}return function(f){if(!wt(f))return{};if(aE)return aE(f);l.prototype=f;var m=new l;return l.prototype=r,m}})();function jl(){}function Pr(l,f){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=r}L.templateSettings={escape:Fd,evaluate:el,interpolate:tl,variable:"",imports:{_:L}},L.prototype=jl.prototype,L.prototype.constructor=L,Pr.prototype=bi(jl.prototype),Pr.prototype.constructor=Pr;function Ve(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=U,this.__views__=[]}function C$(){var l=new Ve(this.__wrapped__);return l.__actions__=rr(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=rr(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=rr(this.__views__),l}function I$(){if(this.__filtered__){var l=new Ve(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function R$(){var l=this.__wrapped__.value(),f=this.__dir__,m=De(l),I=f<0,k=m?l.length:0,F=B3(0,k,this.__views__),X=F.start,J=F.end,ae=J-X,ge=I?J:X-1,me=this.__iteratees__,be=me.length,_e=0,Ne=Ut(ae,this.__takeCount__);if(!m||!I&&k==ae&&Ne==ae)return DE(l,this.__actions__);var Te=[];e:for(;ae--&&_e<Ne;){ge+=f;for(var Le=-1,Ae=l[ge];++Le<be;){var $e=me[Le],We=$e.iteratee,br=$e.type,Jt=We(Ae);if(br==V)Ae=Jt;else if(!Jt){if(br==P)continue e;break e}}Te[_e++]=Ae}return Te}Ve.prototype=bi(jl.prototype),Ve.prototype.constructor=Ve;function No(l){var f=-1,m=l==null?0:l.length;for(this.clear();++f<m;){var I=l[f];this.set(I[0],I[1])}}function N$(){this.__data__=Ca?Ca(null):{},this.size=0}function P$(l){var f=this.has(l)&&delete this.__data__[l];return this.size-=f?1:0,f}function T$(l){var f=this.__data__;if(Ca){var m=f[l];return m===c?r:m}return nt.call(f,l)?f[l]:r}function A$(l){var f=this.__data__;return Ca?f[l]!==r:nt.call(f,l)}function k$(l,f){var m=this.__data__;return this.size+=this.has(l)?0:1,m[l]=Ca&&f===r?c:f,this}No.prototype.clear=N$,No.prototype.delete=P$,No.prototype.get=T$,No.prototype.has=A$,No.prototype.set=k$;function Nn(l){var f=-1,m=l==null?0:l.length;for(this.clear();++f<m;){var I=l[f];this.set(I[0],I[1])}}function M$(){this.__data__=[],this.size=0}function D$(l){var f=this.__data__,m=ql(f,l);if(m<0)return!1;var I=f.length-1;return m==I?f.pop():Pl.call(f,m,1),--this.size,!0}function j$(l){var f=this.__data__,m=ql(f,l);return m<0?r:f[m][1]}function q$(l){return ql(this.__data__,l)>-1}function L$(l,f){var m=this.__data__,I=ql(m,l);return I<0?(++this.size,m.push([l,f])):m[I][1]=f,this}Nn.prototype.clear=M$,Nn.prototype.delete=D$,Nn.prototype.get=j$,Nn.prototype.has=q$,Nn.prototype.set=L$;function Pn(l){var f=-1,m=l==null?0:l.length;for(this.clear();++f<m;){var I=l[f];this.set(I[0],I[1])}}function z$(){this.size=0,this.__data__={hash:new No,map:new(Sa||Nn),string:new No}}function B$(l){var f=Yl(this,l).delete(l);return this.size-=f?1:0,f}function F$(l){return Yl(this,l).get(l)}function $$(l){return Yl(this,l).has(l)}function H$(l,f){var m=Yl(this,l),I=m.size;return m.set(l,f),this.size+=m.size==I?0:1,this}Pn.prototype.clear=z$,Pn.prototype.delete=B$,Pn.prototype.get=F$,Pn.prototype.has=$$,Pn.prototype.set=H$;function Po(l){var f=-1,m=l==null?0:l.length;for(this.__data__=new Pn;++f<m;)this.add(l[f])}function V$(l){return this.__data__.set(l,c),this}function W$(l){return this.__data__.has(l)}Po.prototype.add=Po.prototype.push=V$,Po.prototype.has=W$;function Kr(l){var f=this.__data__=new Nn(l);this.size=f.size}function U$(){this.__data__=new Nn,this.size=0}function G$(l){var f=this.__data__,m=f.delete(l);return this.size=f.size,m}function K$(l){return this.__data__.get(l)}function Y$(l){return this.__data__.has(l)}function X$(l,f){var m=this.__data__;if(m instanceof Nn){var I=m.__data__;if(!Sa||I.length<o-1)return I.push([l,f]),this.size=++m.size,this;m=this.__data__=new Pn(I)}return m.set(l,f),this.size=m.size,this}Kr.prototype.clear=U$,Kr.prototype.delete=G$,Kr.prototype.get=K$,Kr.prototype.has=Y$,Kr.prototype.set=X$;function fE(l,f){var m=De(l),I=!m&&Do(l),k=!m&&!I&&io(l),F=!m&&!I&&!k&&_i(l),X=m||I||k||F,J=X?yf(l.length,a$):[],ae=J.length;for(var ge in l)(f||nt.call(l,ge))&&!(X&&(ge=="length"||k&&(ge=="offset"||ge=="parent")||F&&(ge=="buffer"||ge=="byteLength"||ge=="byteOffset")||Mn(ge,ae)))&&J.push(ge);return J}function pE(l){var f=l.length;return f?l[jf(0,f-1)]:r}function Z$(l,f){return Xl(rr(l),To(f,0,l.length))}function J$(l){return Xl(rr(l))}function Cf(l,f,m){(m!==r&&!Yr(l[f],m)||m===r&&!(f in l))&&Tn(l,f,m)}function Ra(l,f,m){var I=l[f];(!(nt.call(l,f)&&Yr(I,m))||m===r&&!(f in l))&&Tn(l,f,m)}function ql(l,f){for(var m=l.length;m--;)if(Yr(l[m][0],f))return m;return-1}function Q$(l,f,m,I){return to(l,function(k,F,X){f(I,k,m(k),X)}),I}function hE(l,f){return l&&dn(f,jt(f),l)}function e3(l,f){return l&&dn(f,or(f),l)}function Tn(l,f,m){f=="__proto__"&&Tl?Tl(l,f,{configurable:!0,enumerable:!0,value:m,writable:!0}):l[f]=m}function If(l,f){for(var m=-1,I=f.length,k=le(I),F=l==null;++m<I;)k[m]=F?r:sp(l,f[m]);return k}function To(l,f,m){return l===l&&(m!==r&&(l=l<=m?l:m),f!==r&&(l=l>=f?l:f)),l}function Tr(l,f,m,I,k,F){var X,J=f&p,ae=f&h,ge=f&v;if(m&&(X=k?m(l,I,k,F):m(l)),X!==r)return X;if(!wt(l))return l;var me=De(l);if(me){if(X=$3(l),!J)return rr(l,X)}else{var be=Gt(l),_e=be==ee||be==we;if(io(l))return LE(l,J);if(be==ce||be==K||_e&&!k){if(X=ae||_e?{}:nS(l),!J)return ae?T3(l,e3(X,l)):P3(l,hE(X,l))}else{if(!pt[be])return k?l:{};X=H3(l,be,J)}}F||(F=new Kr);var Ne=F.get(l);if(Ne)return Ne;F.set(l,X),AS(l)?l.forEach(function(Ae){X.add(Tr(Ae,f,m,Ae,l,F))}):PS(l)&&l.forEach(function(Ae,$e){X.set($e,Tr(Ae,f,m,$e,l,F))});var Te=ge?ae?Gf:Uf:ae?or:jt,Le=me?r:Te(l);return Rr(Le||l,function(Ae,$e){Le&&($e=Ae,Ae=l[$e]),Ra(X,$e,Tr(Ae,f,m,$e,l,F))}),X}function t3(l){var f=jt(l);return function(m){return vE(m,l,f)}}function vE(l,f,m){var I=m.length;if(l==null)return!I;for(l=ut(l);I--;){var k=m[I],F=f[k],X=l[k];if(X===r&&!(k in l)||!F(X))return!1}return!0}function gE(l,f,m){if(typeof l!="function")throw new Nr(a);return Da(function(){l.apply(r,m)},f)}function Na(l,f,m,I){var k=-1,F=wl,X=!0,J=l.length,ae=[],ge=f.length;if(!J)return ae;m&&(f=bt(f,vr(m))),I?(F=pf,X=!1):f.length>=o&&(F=_a,X=!1,f=new Po(f));e:for(;++k<J;){var me=l[k],be=m==null?me:m(me);if(me=I||me!==0?me:0,X&&be===be){for(var _e=ge;_e--;)if(f[_e]===be)continue e;ae.push(me)}else F(f,be,I)||ae.push(me)}return ae}var to=HE(un),mE=HE(Nf,!0);function r3(l,f){var m=!0;return to(l,function(I,k,F){return m=!!f(I,k,F),m}),m}function Ll(l,f,m){for(var I=-1,k=l.length;++I<k;){var F=l[I],X=f(F);if(X!=null&&(J===r?X===X&&!mr(X):m(X,J)))var J=X,ae=F}return ae}function n3(l,f,m,I){var k=l.length;for(m=je(m),m<0&&(m=-m>k?0:k+m),I=I===r||I>k?k:je(I),I<0&&(I+=k),I=m>I?0:MS(I);m<I;)l[m++]=f;return l}function bE(l,f){var m=[];return to(l,function(I,k,F){f(I,k,F)&&m.push(I)}),m}function Bt(l,f,m,I,k){var F=-1,X=l.length;for(m||(m=W3),k||(k=[]);++F<X;){var J=l[F];f>0&&m(J)?f>1?Bt(J,f-1,m,I,k):Jn(k,J):I||(k[k.length]=J)}return k}var Rf=VE(),yE=VE(!0);function un(l,f){return l&&Rf(l,f,jt)}function Nf(l,f){return l&&yE(l,f,jt)}function zl(l,f){return Zn(f,function(m){return Dn(l[m])})}function Ao(l,f){f=no(f,l);for(var m=0,I=f.length;l!=null&&m<I;)l=l[fn(f[m++])];return m&&m==I?l:r}function wE(l,f,m){var I=f(l);return De(l)?I:Jn(I,m(l))}function Xt(l){return l==null?l===r?It:pe:Ro&&Ro in ut(l)?z3(l):J3(l)}function Pf(l,f){return l>f}function o3(l,f){return l!=null&&nt.call(l,f)}function i3(l,f){return l!=null&&f in ut(l)}function a3(l,f,m){return l>=Ut(f,m)&&l<kt(f,m)}function Tf(l,f,m){for(var I=m?pf:wl,k=l[0].length,F=l.length,X=F,J=le(F),ae=1/0,ge=[];X--;){var me=l[X];X&&f&&(me=bt(me,vr(f))),ae=Ut(me.length,ae),J[X]=!m&&(f||k>=120&&me.length>=120)?new Po(X&&me):r}me=l[0];var be=-1,_e=J[0];e:for(;++be<k&&ge.length<ae;){var Ne=me[be],Te=f?f(Ne):Ne;if(Ne=m||Ne!==0?Ne:0,!(_e?_a(_e,Te):I(ge,Te,m))){for(X=F;--X;){var Le=J[X];if(!(Le?_a(Le,Te):I(l[X],Te,m)))continue e}_e&&_e.push(Te),ge.push(Ne)}}return ge}function s3(l,f,m,I){return un(l,function(k,F,X){f(I,m(k),F,X)}),I}function Pa(l,f,m){f=no(f,l),l=sS(l,f);var I=l==null?l:l[fn(kr(f))];return I==null?r:hr(I,l,m)}function xE(l){return xt(l)&&Xt(l)==K}function l3(l){return xt(l)&&Xt(l)==mt}function c3(l){return xt(l)&&Xt(l)==oe}function Ta(l,f,m,I,k){return l===f?!0:l==null||f==null||!xt(l)&&!xt(f)?l!==l&&f!==f:u3(l,f,m,I,Ta,k)}function u3(l,f,m,I,k,F){var X=De(l),J=De(f),ae=X?Z:Gt(l),ge=J?Z:Gt(f);ae=ae==K?ce:ae,ge=ge==K?ce:ge;var me=ae==ce,be=ge==ce,_e=ae==ge;if(_e&&io(l)){if(!io(f))return!1;X=!0,me=!1}if(_e&&!me)return F||(F=new Kr),X||_i(l)?eS(l,f,m,I,k,F):q3(l,f,ae,m,I,k,F);if(!(m&y)){var Ne=me&&nt.call(l,"__wrapped__"),Te=be&&nt.call(f,"__wrapped__");if(Ne||Te){var Le=Ne?l.value():l,Ae=Te?f.value():f;return F||(F=new Kr),k(Le,Ae,m,I,F)}}return _e?(F||(F=new Kr),L3(l,f,m,I,k,F)):!1}function d3(l){return xt(l)&&Gt(l)==ve}function Af(l,f,m,I){var k=m.length,F=k,X=!I;if(l==null)return!F;for(l=ut(l);k--;){var J=m[k];if(X&&J[2]?J[1]!==l[J[0]]:!(J[0]in l))return!1}for(;++k<F;){J=m[k];var ae=J[0],ge=l[ae],me=J[1];if(X&&J[2]){if(ge===r&&!(ae in l))return!1}else{var be=new Kr;if(I)var _e=I(ge,me,ae,l,f,be);if(!(_e===r?Ta(me,ge,y|g,I,be):_e))return!1}}return!0}function _E(l){if(!wt(l)||G3(l))return!1;var f=Dn(l)?d$:Zd;return f.test(Mo(l))}function f3(l){return xt(l)&&Xt(l)==Ke}function p3(l){return xt(l)&&Gt(l)==ze}function h3(l){return xt(l)&&rc(l.length)&&!!gt[Xt(l)]}function EE(l){return typeof l=="function"?l:l==null?ir:typeof l=="object"?De(l)?CE(l[0],l[1]):OE(l):WS(l)}function kf(l){if(!Ma(l))return m$(l);var f=[];for(var m in ut(l))nt.call(l,m)&&m!="constructor"&&f.push(m);return f}function v3(l){if(!wt(l))return Z3(l);var f=Ma(l),m=[];for(var I in l)I=="constructor"&&(f||!nt.call(l,I))||m.push(I);return m}function Mf(l,f){return l<f}function SE(l,f){var m=-1,I=nr(l)?le(l.length):[];return to(l,function(k,F,X){I[++m]=f(k,F,X)}),I}function OE(l){var f=Yf(l);return f.length==1&&f[0][2]?iS(f[0][0],f[0][1]):function(m){return m===l||Af(m,l,f)}}function CE(l,f){return Zf(l)&&oS(f)?iS(fn(l),f):function(m){var I=sp(m,l);return I===r&&I===f?lp(m,l):Ta(f,I,y|g)}}function Bl(l,f,m,I,k){l!==f&&Rf(f,function(F,X){if(k||(k=new Kr),wt(F))g3(l,f,X,m,Bl,I,k);else{var J=I?I(Qf(l,X),F,X+"",l,f,k):r;J===r&&(J=F),Cf(l,X,J)}},or)}function g3(l,f,m,I,k,F,X){var J=Qf(l,m),ae=Qf(f,m),ge=X.get(ae);if(ge){Cf(l,m,ge);return}var me=F?F(J,ae,m+"",l,f,X):r,be=me===r;if(be){var _e=De(ae),Ne=!_e&&io(ae),Te=!_e&&!Ne&&_i(ae);me=ae,_e||Ne||Te?De(J)?me=J:Et(J)?me=rr(J):Ne?(be=!1,me=LE(ae,!0)):Te?(be=!1,me=zE(ae,!0)):me=[]:ja(ae)||Do(ae)?(me=J,Do(J)?me=DS(J):(!wt(J)||Dn(J))&&(me=nS(ae))):be=!1}be&&(X.set(ae,me),k(me,ae,I,F,X),X.delete(ae)),Cf(l,m,me)}function IE(l,f){var m=l.length;if(m)return f+=f<0?m:0,Mn(f,m)?l[f]:r}function RE(l,f,m){f.length?f=bt(f,function(F){return De(F)?function(X){return Ao(X,F.length===1?F[0]:F)}:F}):f=[ir];var I=-1;f=bt(f,vr(Pe()));var k=SE(l,function(F,X,J){var ae=bt(f,function(ge){return ge(F)});return{criteria:ae,index:++I,value:F}});return HF(k,function(F,X){return N3(F,X,m)})}function m3(l,f){return NE(l,f,function(m,I){return lp(l,I)})}function NE(l,f,m){for(var I=-1,k=f.length,F={};++I<k;){var X=f[I],J=Ao(l,X);m(J,X)&&Aa(F,no(X,l),J)}return F}function b3(l){return function(f){return Ao(f,l)}}function Df(l,f,m,I){var k=I?$F:di,F=-1,X=f.length,J=l;for(l===f&&(f=rr(f)),m&&(J=bt(l,vr(m)));++F<X;)for(var ae=0,ge=f[F],me=m?m(ge):ge;(ae=k(J,me,ae,I))>-1;)J!==l&&Pl.call(J,ae,1),Pl.call(l,ae,1);return l}function PE(l,f){for(var m=l?f.length:0,I=m-1;m--;){var k=f[m];if(m==I||k!==F){var F=k;Mn(k)?Pl.call(l,k,1):zf(l,k)}}return l}function jf(l,f){return l+kl(uE()*(f-l+1))}function y3(l,f,m,I){for(var k=-1,F=kt(Al((f-l)/(m||1)),0),X=le(F);F--;)X[I?F:++k]=l,l+=m;return X}function qf(l,f){var m="";if(!l||f<1||f>W)return m;do f%2&&(m+=l),f=kl(f/2),f&&(l+=l);while(f);return m}function Be(l,f){return ep(aS(l,f,ir),l+"")}function w3(l){return pE(Ei(l))}function x3(l,f){var m=Ei(l);return Xl(m,To(f,0,m.length))}function Aa(l,f,m,I){if(!wt(l))return l;f=no(f,l);for(var k=-1,F=f.length,X=F-1,J=l;J!=null&&++k<F;){var ae=fn(f[k]),ge=m;if(ae==="__proto__"||ae==="constructor"||ae==="prototype")return l;if(k!=X){var me=J[ae];ge=I?I(me,ae,J):r,ge===r&&(ge=wt(me)?me:Mn(f[k+1])?[]:{})}Ra(J,ae,ge),J=J[ae]}return l}var TE=Ml?function(l,f){return Ml.set(l,f),l}:ir,_3=Tl?function(l,f){return Tl(l,"toString",{configurable:!0,enumerable:!1,value:up(f),writable:!0})}:ir;function E3(l){return Xl(Ei(l))}function Ar(l,f,m){var I=-1,k=l.length;f<0&&(f=-f>k?0:k+f),m=m>k?k:m,m<0&&(m+=k),k=f>m?0:m-f>>>0,f>>>=0;for(var F=le(k);++I<k;)F[I]=l[I+f];return F}function S3(l,f){var m;return to(l,function(I,k,F){return m=f(I,k,F),!m}),!!m}function Fl(l,f,m){var I=0,k=l==null?I:l.length;if(typeof f=="number"&&f===f&&k<=te){for(;I<k;){var F=I+k>>>1,X=l[F];X!==null&&!mr(X)&&(m?X<=f:X<f)?I=F+1:k=F}return k}return Lf(l,f,ir,m)}function Lf(l,f,m,I){var k=0,F=l==null?0:l.length;if(F===0)return 0;f=m(f);for(var X=f!==f,J=f===null,ae=mr(f),ge=f===r;k<F;){var me=kl((k+F)/2),be=m(l[me]),_e=be!==r,Ne=be===null,Te=be===be,Le=mr(be);if(X)var Ae=I||Te;else ge?Ae=Te&&(I||_e):J?Ae=Te&&_e&&(I||!Ne):ae?Ae=Te&&_e&&!Ne&&(I||!Le):Ne||Le?Ae=!1:Ae=I?be<=f:be<f;Ae?k=me+1:F=me}return Ut(F,ie)}function AE(l,f){for(var m=-1,I=l.length,k=0,F=[];++m<I;){var X=l[m],J=f?f(X):X;if(!m||!Yr(J,ae)){var ae=J;F[k++]=X===0?0:X}}return F}function kE(l){return typeof l=="number"?l:mr(l)?z:+l}function gr(l){if(typeof l=="string")return l;if(De(l))return bt(l,gr)+"";if(mr(l))return dE?dE.call(l):"";var f=l+"";return f=="0"&&1/l==-G?"-0":f}function ro(l,f,m){var I=-1,k=wl,F=l.length,X=!0,J=[],ae=J;if(m)X=!1,k=pf;else if(F>=o){var ge=f?null:D3(l);if(ge)return _l(ge);X=!1,k=_a,ae=new Po}else ae=f?[]:J;e:for(;++I<F;){var me=l[I],be=f?f(me):me;if(me=m||me!==0?me:0,X&&be===be){for(var _e=ae.length;_e--;)if(ae[_e]===be)continue e;f&&ae.push(be),J.push(me)}else k(ae,be,m)||(ae!==J&&ae.push(be),J.push(me))}return J}function zf(l,f){return f=no(f,l),l=sS(l,f),l==null||delete l[fn(kr(f))]}function ME(l,f,m,I){return Aa(l,f,m(Ao(l,f)),I)}function $l(l,f,m,I){for(var k=l.length,F=I?k:-1;(I?F--:++F<k)&&f(l[F],F,l););return m?Ar(l,I?0:F,I?F+1:k):Ar(l,I?F+1:0,I?k:F)}function DE(l,f){var m=l;return m instanceof Ve&&(m=m.value()),hf(f,function(I,k){return k.func.apply(k.thisArg,Jn([I],k.args))},m)}function Bf(l,f,m){var I=l.length;if(I<2)return I?ro(l[0]):[];for(var k=-1,F=le(I);++k<I;)for(var X=l[k],J=-1;++J<I;)J!=k&&(F[k]=Na(F[k]||X,l[J],f,m));return ro(Bt(F,1),f,m)}function jE(l,f,m){for(var I=-1,k=l.length,F=f.length,X={};++I<k;){var J=I<F?f[I]:r;m(X,l[I],J)}return X}function Ff(l){return Et(l)?l:[]}function $f(l){return typeof l=="function"?l:ir}function no(l,f){return De(l)?l:Zf(l,f)?[l]:dS(Ze(l))}var O3=Be;function oo(l,f,m){var I=l.length;return m=m===r?I:m,!f&&m>=I?l:Ar(l,f,m)}var qE=f$||function(l){return zt.clearTimeout(l)};function LE(l,f){if(f)return l.slice();var m=l.length,I=iE?iE(m):new l.constructor(m);return l.copy(I),I}function Hf(l){var f=new l.constructor(l.byteLength);return new Rl(f).set(new Rl(l)),f}function C3(l,f){var m=f?Hf(l.buffer):l.buffer;return new l.constructor(m,l.byteOffset,l.byteLength)}function I3(l){var f=new l.constructor(l.source,sl.exec(l));return f.lastIndex=l.lastIndex,f}function R3(l){return Ia?ut(Ia.call(l)):{}}function zE(l,f){var m=f?Hf(l.buffer):l.buffer;return new l.constructor(m,l.byteOffset,l.length)}function BE(l,f){if(l!==f){var m=l!==r,I=l===null,k=l===l,F=mr(l),X=f!==r,J=f===null,ae=f===f,ge=mr(f);if(!J&&!ge&&!F&&l>f||F&&X&&ae&&!J&&!ge||I&&X&&ae||!m&&ae||!k)return 1;if(!I&&!F&&!ge&&l<f||ge&&m&&k&&!I&&!F||J&&m&&k||!X&&k||!ae)return-1}return 0}function N3(l,f,m){for(var I=-1,k=l.criteria,F=f.criteria,X=k.length,J=m.length;++I<X;){var ae=BE(k[I],F[I]);if(ae){if(I>=J)return ae;var ge=m[I];return ae*(ge=="desc"?-1:1)}}return l.index-f.index}function FE(l,f,m,I){for(var k=-1,F=l.length,X=m.length,J=-1,ae=f.length,ge=kt(F-X,0),me=le(ae+ge),be=!I;++J<ae;)me[J]=f[J];for(;++k<X;)(be||k<F)&&(me[m[k]]=l[k]);for(;ge--;)me[J++]=l[k++];return me}function $E(l,f,m,I){for(var k=-1,F=l.length,X=-1,J=m.length,ae=-1,ge=f.length,me=kt(F-J,0),be=le(me+ge),_e=!I;++k<me;)be[k]=l[k];for(var Ne=k;++ae<ge;)be[Ne+ae]=f[ae];for(;++X<J;)(_e||k<F)&&(be[Ne+m[X]]=l[k++]);return be}function rr(l,f){var m=-1,I=l.length;for(f||(f=le(I));++m<I;)f[m]=l[m];return f}function dn(l,f,m,I){var k=!m;m||(m={});for(var F=-1,X=f.length;++F<X;){var J=f[F],ae=I?I(m[J],l[J],J,m,l):r;ae===r&&(ae=l[J]),k?Tn(m,J,ae):Ra(m,J,ae)}return m}function P3(l,f){return dn(l,Xf(l),f)}function T3(l,f){return dn(l,tS(l),f)}function Hl(l,f){return function(m,I){var k=De(m)?jF:Q$,F=f?f():{};return k(m,l,Pe(I,2),F)}}function yi(l){return Be(function(f,m){var I=-1,k=m.length,F=k>1?m[k-1]:r,X=k>2?m[2]:r;for(F=l.length>3&&typeof F=="function"?(k--,F):r,X&&Zt(m[0],m[1],X)&&(F=k<3?r:F,k=1),f=ut(f);++I<k;){var J=m[I];J&&l(f,J,I,F)}return f})}function HE(l,f){return function(m,I){if(m==null)return m;if(!nr(m))return l(m,I);for(var k=m.length,F=f?k:-1,X=ut(m);(f?F--:++F<k)&&I(X[F],F,X)!==!1;);return m}}function VE(l){return function(f,m,I){for(var k=-1,F=ut(f),X=I(f),J=X.length;J--;){var ae=X[l?J:++k];if(m(F[ae],ae,F)===!1)break}return f}}function A3(l,f,m){var I=f&b,k=ka(l);function F(){var X=this&&this!==zt&&this instanceof F?k:l;return X.apply(I?m:this,arguments)}return F}function WE(l){return function(f){f=Ze(f);var m=fi(f)?Gr(f):r,I=m?m[0]:f.charAt(0),k=m?oo(m,1).join(""):f.slice(1);return I[l]()+k}}function wi(l){return function(f){return hf(HS($S(f).replace(_F,"")),l,"")}}function ka(l){return function(){var f=arguments;switch(f.length){case 0:return new l;case 1:return new l(f[0]);case 2:return new l(f[0],f[1]);case 3:return new l(f[0],f[1],f[2]);case 4:return new l(f[0],f[1],f[2],f[3]);case 5:return new l(f[0],f[1],f[2],f[3],f[4]);case 6:return new l(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new l(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var m=bi(l.prototype),I=l.apply(m,f);return wt(I)?I:m}}function k3(l,f,m){var I=ka(l);function k(){for(var F=arguments.length,X=le(F),J=F,ae=xi(k);J--;)X[J]=arguments[J];var ge=F<3&&X[0]!==ae&&X[F-1]!==ae?[]:Qn(X,ae);if(F-=ge.length,F<m)return XE(l,f,Vl,k.placeholder,r,X,ge,r,r,m-F);var me=this&&this!==zt&&this instanceof k?I:l;return hr(me,this,X)}return k}function UE(l){return function(f,m,I){var k=ut(f);if(!nr(f)){var F=Pe(m,3);f=jt(f),m=function(J){return F(k[J],J,k)}}var X=l(f,m,I);return X>-1?k[F?f[X]:X]:r}}function GE(l){return kn(function(f){var m=f.length,I=m,k=Pr.prototype.thru;for(l&&f.reverse();I--;){var F=f[I];if(typeof F!="function")throw new Nr(a);if(k&&!X&&Kl(F)=="wrapper")var X=new Pr([],!0)}for(I=X?I:m;++I<m;){F=f[I];var J=Kl(F),ae=J=="wrapper"?Kf(F):r;ae&&Jf(ae[0])&&ae[1]==(N|E|_|R)&&!ae[4].length&&ae[9]==1?X=X[Kl(ae[0])].apply(X,ae[3]):X=F.length==1&&Jf(F)?X[J]():X.thru(F)}return function(){var ge=arguments,me=ge[0];if(X&&ge.length==1&&De(me))return X.plant(me).value();for(var be=0,_e=m?f[be].apply(this,ge):me;++be<m;)_e=f[be].call(this,_e);return _e}})}function Vl(l,f,m,I,k,F,X,J,ae,ge){var me=f&N,be=f&b,_e=f&x,Ne=f&(E|S),Te=f&A,Le=_e?r:ka(l);function Ae(){for(var $e=arguments.length,We=le($e),br=$e;br--;)We[br]=arguments[br];if(Ne)var Jt=xi(Ae),yr=WF(We,Jt);if(I&&(We=FE(We,I,k,Ne)),F&&(We=$E(We,F,X,Ne)),$e-=yr,Ne&&$e<ge){var St=Qn(We,Jt);return XE(l,f,Vl,Ae.placeholder,m,We,St,J,ae,ge-$e)}var Xr=be?m:this,qn=_e?Xr[l]:l;return $e=We.length,J?We=Q3(We,J):Te&&$e>1&&We.reverse(),me&&ae<$e&&(We.length=ae),this&&this!==zt&&this instanceof Ae&&(qn=Le||ka(qn)),qn.apply(Xr,We)}return Ae}function KE(l,f){return function(m,I){return s3(m,l,f(I),{})}}function Wl(l,f){return function(m,I){var k;if(m===r&&I===r)return f;if(m!==r&&(k=m),I!==r){if(k===r)return I;typeof m=="string"||typeof I=="string"?(m=gr(m),I=gr(I)):(m=kE(m),I=kE(I)),k=l(m,I)}return k}}function Vf(l){return kn(function(f){return f=bt(f,vr(Pe())),Be(function(m){var I=this;return l(f,function(k){return hr(k,I,m)})})})}function Ul(l,f){f=f===r?" ":gr(f);var m=f.length;if(m<2)return m?qf(f,l):f;var I=qf(f,Al(l/pi(f)));return fi(f)?oo(Gr(I),0,l).join(""):I.slice(0,l)}function M3(l,f,m,I){var k=f&b,F=ka(l);function X(){for(var J=-1,ae=arguments.length,ge=-1,me=I.length,be=le(me+ae),_e=this&&this!==zt&&this instanceof X?F:l;++ge<me;)be[ge]=I[ge];for(;ae--;)be[ge++]=arguments[++J];return hr(_e,k?m:this,be)}return X}function YE(l){return function(f,m,I){return I&&typeof I!="number"&&Zt(f,m,I)&&(m=I=r),f=jn(f),m===r?(m=f,f=0):m=jn(m),I=I===r?f<m?1:-1:jn(I),y3(f,m,I,l)}}function Gl(l){return function(f,m){return typeof f=="string"&&typeof m=="string"||(f=Mr(f),m=Mr(m)),l(f,m)}}function XE(l,f,m,I,k,F,X,J,ae,ge){var me=f&E,be=me?X:r,_e=me?r:X,Ne=me?F:r,Te=me?r:F;f|=me?_:O,f&=~(me?O:_),f&w||(f&=-4);var Le=[l,f,k,Ne,be,Te,_e,J,ae,ge],Ae=m.apply(r,Le);return Jf(l)&&lS(Ae,Le),Ae.placeholder=I,cS(Ae,l,f)}function Wf(l){var f=At[l];return function(m,I){if(m=Mr(m),I=I==null?0:Ut(je(I),292),I&&cE(m)){var k=(Ze(m)+"e").split("e"),F=f(k[0]+"e"+(+k[1]+I));return k=(Ze(F)+"e").split("e"),+(k[0]+"e"+(+k[1]-I))}return f(m)}}var D3=gi&&1/_l(new gi([,-0]))[1]==G?function(l){return new gi(l)}:pp;function ZE(l){return function(f){var m=Gt(f);return m==ve?xf(f):m==ze?JF(f):VF(f,l(f))}}function An(l,f,m,I,k,F,X,J){var ae=f&x;if(!ae&&typeof l!="function")throw new Nr(a);var ge=I?I.length:0;if(ge||(f&=-97,I=k=r),X=X===r?X:kt(je(X),0),J=J===r?J:je(J),ge-=k?k.length:0,f&O){var me=I,be=k;I=k=r}var _e=ae?r:Kf(l),Ne=[l,f,m,I,k,me,be,F,X,J];if(_e&&X3(Ne,_e),l=Ne[0],f=Ne[1],m=Ne[2],I=Ne[3],k=Ne[4],J=Ne[9]=Ne[9]===r?ae?0:l.length:kt(Ne[9]-ge,0),!J&&f&(E|S)&&(f&=-25),!f||f==b)var Te=A3(l,f,m);else f==E||f==S?Te=k3(l,f,J):(f==_||f==(b|_))&&!k.length?Te=M3(l,f,m,I):Te=Vl.apply(r,Ne);var Le=_e?TE:lS;return cS(Le(Te,Ne),l,f)}function JE(l,f,m,I){return l===r||Yr(l,vi[m])&&!nt.call(I,m)?f:l}function QE(l,f,m,I,k,F){return wt(l)&&wt(f)&&(F.set(f,l),Bl(l,f,r,QE,F),F.delete(f)),l}function j3(l){return ja(l)?r:l}function eS(l,f,m,I,k,F){var X=m&y,J=l.length,ae=f.length;if(J!=ae&&!(X&&ae>J))return!1;var ge=F.get(l),me=F.get(f);if(ge&&me)return ge==f&&me==l;var be=-1,_e=!0,Ne=m&g?new Po:r;for(F.set(l,f),F.set(f,l);++be<J;){var Te=l[be],Le=f[be];if(I)var Ae=X?I(Le,Te,be,f,l,F):I(Te,Le,be,l,f,F);if(Ae!==r){if(Ae)continue;_e=!1;break}if(Ne){if(!vf(f,function($e,We){if(!_a(Ne,We)&&(Te===$e||k(Te,$e,m,I,F)))return Ne.push(We)})){_e=!1;break}}else if(!(Te===Le||k(Te,Le,m,I,F))){_e=!1;break}}return F.delete(l),F.delete(f),_e}function q3(l,f,m,I,k,F,X){switch(m){case ct:if(l.byteLength!=f.byteLength||l.byteOffset!=f.byteOffset)return!1;l=l.buffer,f=f.buffer;case mt:return!(l.byteLength!=f.byteLength||!F(new Rl(l),new Rl(f)));case Y:case oe:case Ee:return Yr(+l,+f);case se:return l.name==f.name&&l.message==f.message;case Ke:case rt:return l==f+"";case ve:var J=xf;case ze:var ae=I&y;if(J||(J=_l),l.size!=f.size&&!ae)return!1;var ge=X.get(l);if(ge)return ge==f;I|=g,X.set(l,f);var me=eS(J(l),J(f),I,k,F,X);return X.delete(l),me;case Xe:if(Ia)return Ia.call(l)==Ia.call(f)}return!1}function L3(l,f,m,I,k,F){var X=m&y,J=Uf(l),ae=J.length,ge=Uf(f),me=ge.length;if(ae!=me&&!X)return!1;for(var be=ae;be--;){var _e=J[be];if(!(X?_e in f:nt.call(f,_e)))return!1}var Ne=F.get(l),Te=F.get(f);if(Ne&&Te)return Ne==f&&Te==l;var Le=!0;F.set(l,f),F.set(f,l);for(var Ae=X;++be<ae;){_e=J[be];var $e=l[_e],We=f[_e];if(I)var br=X?I(We,$e,_e,f,l,F):I($e,We,_e,l,f,F);if(!(br===r?$e===We||k($e,We,m,I,F):br)){Le=!1;break}Ae||(Ae=_e=="constructor")}if(Le&&!Ae){var Jt=l.constructor,yr=f.constructor;Jt!=yr&&"constructor"in l&&"constructor"in f&&!(typeof Jt=="function"&&Jt instanceof Jt&&typeof yr=="function"&&yr instanceof yr)&&(Le=!1)}return F.delete(l),F.delete(f),Le}function kn(l){return ep(aS(l,r,vS),l+"")}function Uf(l){return wE(l,jt,Xf)}function Gf(l){return wE(l,or,tS)}var Kf=Ml?function(l){return Ml.get(l)}:pp;function Kl(l){for(var f=l.name+"",m=mi[f],I=nt.call(mi,f)?m.length:0;I--;){var k=m[I],F=k.func;if(F==null||F==l)return k.name}return f}function xi(l){var f=nt.call(L,"placeholder")?L:l;return f.placeholder}function Pe(){var l=L.iteratee||dp;return l=l===dp?EE:l,arguments.length?l(arguments[0],arguments[1]):l}function Yl(l,f){var m=l.__data__;return U3(f)?m[typeof f=="string"?"string":"hash"]:m.map}function Yf(l){for(var f=jt(l),m=f.length;m--;){var I=f[m],k=l[I];f[m]=[I,k,oS(k)]}return f}function ko(l,f){var m=YF(l,f);return _E(m)?m:r}function z3(l){var f=nt.call(l,Ro),m=l[Ro];try{l[Ro]=r;var I=!0}catch{}var k=Cl.call(l);return I&&(f?l[Ro]=m:delete l[Ro]),k}var Xf=Ef?function(l){return l==null?[]:(l=ut(l),Zn(Ef(l),function(f){return sE.call(l,f)}))}:hp,tS=Ef?function(l){for(var f=[];l;)Jn(f,Xf(l)),l=Nl(l);return f}:hp,Gt=Xt;(Sf&&Gt(new Sf(new ArrayBuffer(1)))!=ct||Sa&&Gt(new Sa)!=ve||Of&&Gt(Of.resolve())!=Ce||gi&&Gt(new gi)!=ze||Oa&&Gt(new Oa)!=lt)&&(Gt=function(l){var f=Xt(l),m=f==ce?l.constructor:r,I=m?Mo(m):"";if(I)switch(I){case x$:return ct;case _$:return ve;case E$:return Ce;case S$:return ze;case O$:return lt}return f});function B3(l,f,m){for(var I=-1,k=m.length;++I<k;){var F=m[I],X=F.size;switch(F.type){case"drop":l+=X;break;case"dropRight":f-=X;break;case"take":f=Ut(f,l+X);break;case"takeRight":l=kt(l,f-X);break}}return{start:l,end:f}}function F3(l){var f=l.match(al);return f?f[1].split(Vd):[]}function rS(l,f,m){f=no(f,l);for(var I=-1,k=f.length,F=!1;++I<k;){var X=fn(f[I]);if(!(F=l!=null&&m(l,X)))break;l=l[X]}return F||++I!=k?F:(k=l==null?0:l.length,!!k&&rc(k)&&Mn(X,k)&&(De(l)||Do(l)))}function $3(l){var f=l.length,m=new l.constructor(f);return f&&typeof l[0]=="string"&&nt.call(l,"index")&&(m.index=l.index,m.input=l.input),m}function nS(l){return typeof l.constructor=="function"&&!Ma(l)?bi(Nl(l)):{}}function H3(l,f,m){var I=l.constructor;switch(f){case mt:return Hf(l);case Y:case oe:return new I(+l);case ct:return C3(l,m);case Lt:case pr:case Cr:case Kt:case Tt:case Yt:case ln:case Oo:case Xn:return zE(l,m);case ve:return new I;case Ee:case rt:return new I(l);case Ke:return I3(l);case ze:return new I;case Xe:return R3(l)}}function V3(l,f){var m=f.length;if(!m)return l;var I=m-1;return f[I]=(m>1?"& ":"")+f[I],f=f.join(m>2?", ":" "),l.replace(Hd,`{
63
63
  /* [wrapped with `+f+`] */
64
- `)}function W3(l){return De(l)||Do(l)||!!(lE&&l&&l[lE])}function Mn(l,f){var m=typeof l;return f=f??W,!!f&&(m=="number"||m!="symbol"&&Qd.test(l))&&l>-1&&l%1==0&&l<f}function Zt(l,f,m){if(!wt(m))return!1;var I=typeof f;return(I=="number"?nr(m)&&Mn(f,m.length):I=="string"&&f in m)?Yr(m[f],l):!1}function Zf(l,f){if(De(l))return!1;var m=typeof l;return m=="number"||m=="symbol"||m=="boolean"||l==null||mr(l)?!0:$d.test(l)||!rl.test(l)||f!=null&&l in ut(f)}function U3(l){var f=typeof l;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?l!=="__proto__":l===null}function Jf(l){var f=Kl(l),m=L[f];if(typeof m!="function"||!(f in Ve.prototype))return!1;if(l===m)return!0;var I=Kf(m);return!!I&&l===I[0]}function G3(l){return!!oE&&oE in l}var K3=Sl?Dn:vp;function ka(l){var f=l&&l.constructor,m=typeof f=="function"&&f.prototype||vi;return l===m}function oS(l){return l===l&&!wt(l)}function iS(l,f){return function(m){return m==null?!1:m[l]===f&&(f!==r||l in ut(m))}}function Y3(l){var f=ec(l,function(I){return m.size===u&&m.clear(),I}),m=f.cache;return f}function X3(l,f){var m=l[1],I=f[1],k=m|I,F=k<(b|x|N),X=I==N&&m==E||I==N&&m==R&&l[7].length<=f[8]||I==(N|R)&&f[7].length<=f[8]&&m==E;if(!(F||X))return l;I&b&&(l[2]=f[2],k|=m&b?0:w);var J=f[3];if(J){var ae=l[3];l[3]=ae?FE(ae,J,f[4]):J,l[4]=ae?Qn(l[3],d):f[4]}return J=f[5],J&&(ae=l[5],l[5]=ae?$E(ae,J,f[6]):J,l[6]=ae?Qn(l[5],d):f[6]),J=f[7],J&&(l[7]=J),I&N&&(l[8]=l[8]==null?f[8]:Ut(l[8],f[8])),l[9]==null&&(l[9]=f[9]),l[0]=f[0],l[1]=k,l}function Z3(l){var f=[];if(l!=null)for(var m in ut(l))f.push(m);return f}function J3(l){return Cl.call(l)}function aS(l,f,m){return f=kt(f===r?l.length-1:f,0),function(){for(var I=arguments,k=-1,F=kt(I.length-f,0),X=le(F);++k<F;)X[k]=I[f+k];k=-1;for(var J=le(f+1);++k<f;)J[k]=I[k];return J[f]=m(X),hr(l,this,J)}}function sS(l,f){return f.length<2?l:Ao(l,Ar(f,0,-1))}function Q3(l,f){for(var m=l.length,I=Ut(f.length,m),k=rr(l);I--;){var F=f[I];l[I]=Mn(F,m)?k[F]:r}return l}function Qf(l,f){if(!(f==="constructor"&&typeof l[f]=="function")&&f!="__proto__")return l[f]}var lS=uS(TE),Ma=h$||function(l,f){return zt.setTimeout(l,f)},ep=uS(_3);function cS(l,f,m){var I=f+"";return ep(l,V3(I,e4(F3(I),m)))}function uS(l){var f=0,m=0;return function(){var I=b$(),k=M-(I-m);if(m=I,k>0){if(++f>=j)return arguments[0]}else f=0;return l.apply(r,arguments)}}function Xl(l,f){var m=-1,I=l.length,k=I-1;for(f=f===r?I:f;++m<f;){var F=jf(m,k),X=l[F];l[F]=l[m],l[m]=X}return l.length=f,l}var dS=Y3(function(l){var f=[];return l.charCodeAt(0)===46&&f.push(""),l.replace(nl,function(m,I,k,F){f.push(k?F.replace(Gd,"$1"):I||m)}),f});function fn(l){if(typeof l=="string"||mr(l))return l;var f=l+"";return f=="0"&&1/l==-G?"-0":f}function Mo(l){if(l!=null){try{return Ol.call(l)}catch{}try{return l+""}catch{}}return""}function e4(l,f){return Rr($,function(m){var I="_."+m[0];f&m[1]&&!wl(l,I)&&l.push(I)}),l.sort()}function fS(l){if(l instanceof Ve)return l.clone();var f=new Pr(l.__wrapped__,l.__chain__);return f.__actions__=rr(l.__actions__),f.__index__=l.__index__,f.__values__=l.__values__,f}function t4(l,f,m){(m?Zt(l,f,m):f===r)?f=1:f=kt(je(f),0);var I=l==null?0:l.length;if(!I||f<1)return[];for(var k=0,F=0,X=le(Al(I/f));k<I;)X[F++]=Ar(l,k,k+=f);return X}function r4(l){for(var f=-1,m=l==null?0:l.length,I=0,k=[];++f<m;){var F=l[f];F&&(k[I++]=F)}return k}function n4(){var l=arguments.length;if(!l)return[];for(var f=le(l-1),m=arguments[0],I=l;I--;)f[I-1]=arguments[I];return Jn(De(m)?rr(m):[m],Bt(f,1))}var o4=Be(function(l,f){return Et(l)?Ra(l,Bt(f,1,Et,!0)):[]}),i4=Be(function(l,f){var m=kr(f);return Et(m)&&(m=r),Et(l)?Ra(l,Bt(f,1,Et,!0),Pe(m,2)):[]}),a4=Be(function(l,f){var m=kr(f);return Et(m)&&(m=r),Et(l)?Ra(l,Bt(f,1,Et,!0),r,m):[]});function s4(l,f,m){var I=l==null?0:l.length;return I?(f=m||f===r?1:je(f),Ar(l,f<0?0:f,I)):[]}function l4(l,f,m){var I=l==null?0:l.length;return I?(f=m||f===r?1:je(f),f=I-f,Ar(l,0,f<0?0:f)):[]}function c4(l,f){return l&&l.length?$l(l,Pe(f,3),!0,!0):[]}function u4(l,f){return l&&l.length?$l(l,Pe(f,3),!0):[]}function d4(l,f,m,I){var k=l==null?0:l.length;return k?(m&&typeof m!="number"&&Zt(l,f,m)&&(m=0,I=k),n3(l,f,m,I)):[]}function pS(l,f,m){var I=l==null?0:l.length;if(!I)return-1;var k=m==null?0:je(m);return k<0&&(k=kt(I+k,0)),xl(l,Pe(f,3),k)}function hS(l,f,m){var I=l==null?0:l.length;if(!I)return-1;var k=I-1;return m!==r&&(k=je(m),k=m<0?kt(I+k,0):Ut(k,I-1)),xl(l,Pe(f,3),k,!0)}function vS(l){var f=l==null?0:l.length;return f?Bt(l,1):[]}function f4(l){var f=l==null?0:l.length;return f?Bt(l,G):[]}function p4(l,f){var m=l==null?0:l.length;return m?(f=f===r?1:je(f),Bt(l,f)):[]}function h4(l){for(var f=-1,m=l==null?0:l.length,I={};++f<m;){var k=l[f];I[k[0]]=k[1]}return I}function gS(l){return l&&l.length?l[0]:r}function v4(l,f,m){var I=l==null?0:l.length;if(!I)return-1;var k=m==null?0:je(m);return k<0&&(k=kt(I+k,0)),di(l,f,k)}function g4(l){var f=l==null?0:l.length;return f?Ar(l,0,-1):[]}var m4=Be(function(l){var f=bt(l,Ff);return f.length&&f[0]===l[0]?Tf(f):[]}),b4=Be(function(l){var f=kr(l),m=bt(l,Ff);return f===kr(m)?f=r:m.pop(),m.length&&m[0]===l[0]?Tf(m,Pe(f,2)):[]}),y4=Be(function(l){var f=kr(l),m=bt(l,Ff);return f=typeof f=="function"?f:r,f&&m.pop(),m.length&&m[0]===l[0]?Tf(m,r,f):[]});function w4(l,f){return l==null?"":g$.call(l,f)}function kr(l){var f=l==null?0:l.length;return f?l[f-1]:r}function x4(l,f,m){var I=l==null?0:l.length;if(!I)return-1;var k=I;return m!==r&&(k=je(m),k=k<0?kt(I+k,0):Ut(k,I-1)),f===f?e$(l,f,k):xl(l,X1,k,!0)}function _4(l,f){return l&&l.length?IE(l,je(f)):r}var E4=Be(mS);function mS(l,f){return l&&l.length&&f&&f.length?Df(l,f):l}function S4(l,f,m){return l&&l.length&&f&&f.length?Df(l,f,Pe(m,2)):l}function O4(l,f,m){return l&&l.length&&f&&f.length?Df(l,f,r,m):l}var C4=kn(function(l,f){var m=l==null?0:l.length,I=If(l,f);return PE(l,bt(f,function(k){return Mn(k,m)?+k:k}).sort(BE)),I});function I4(l,f){var m=[];if(!(l&&l.length))return m;var I=-1,k=[],F=l.length;for(f=Pe(f,3);++I<F;){var X=l[I];f(X,I,l)&&(m.push(X),k.push(I))}return PE(l,k),m}function tp(l){return l==null?l:w$.call(l)}function R4(l,f,m){var I=l==null?0:l.length;return I?(m&&typeof m!="number"&&Zt(l,f,m)?(f=0,m=I):(f=f==null?0:je(f),m=m===r?I:je(m)),Ar(l,f,m)):[]}function N4(l,f){return Fl(l,f)}function P4(l,f,m){return Lf(l,f,Pe(m,2))}function T4(l,f){var m=l==null?0:l.length;if(m){var I=Fl(l,f);if(I<m&&Yr(l[I],f))return I}return-1}function A4(l,f){return Fl(l,f,!0)}function k4(l,f,m){return Lf(l,f,Pe(m,2),!0)}function M4(l,f){var m=l==null?0:l.length;if(m){var I=Fl(l,f,!0)-1;if(Yr(l[I],f))return I}return-1}function D4(l){return l&&l.length?AE(l):[]}function j4(l,f){return l&&l.length?AE(l,Pe(f,2)):[]}function q4(l){var f=l==null?0:l.length;return f?Ar(l,1,f):[]}function L4(l,f,m){return l&&l.length?(f=m||f===r?1:je(f),Ar(l,0,f<0?0:f)):[]}function z4(l,f,m){var I=l==null?0:l.length;return I?(f=m||f===r?1:je(f),f=I-f,Ar(l,f<0?0:f,I)):[]}function B4(l,f){return l&&l.length?$l(l,Pe(f,3),!1,!0):[]}function F4(l,f){return l&&l.length?$l(l,Pe(f,3)):[]}var $4=Be(function(l){return ro(Bt(l,1,Et,!0))}),H4=Be(function(l){var f=kr(l);return Et(f)&&(f=r),ro(Bt(l,1,Et,!0),Pe(f,2))}),V4=Be(function(l){var f=kr(l);return f=typeof f=="function"?f:r,ro(Bt(l,1,Et,!0),r,f)});function W4(l){return l&&l.length?ro(l):[]}function U4(l,f){return l&&l.length?ro(l,Pe(f,2)):[]}function G4(l,f){return f=typeof f=="function"?f:r,l&&l.length?ro(l,r,f):[]}function rp(l){if(!(l&&l.length))return[];var f=0;return l=Zn(l,function(m){if(Et(m))return f=kt(m.length,f),!0}),yf(f,function(m){return bt(l,gf(m))})}function bS(l,f){if(!(l&&l.length))return[];var m=rp(l);return f==null?m:bt(m,function(I){return hr(f,r,I)})}var K4=Be(function(l,f){return Et(l)?Ra(l,f):[]}),Y4=Be(function(l){return Bf(Zn(l,Et))}),X4=Be(function(l){var f=kr(l);return Et(f)&&(f=r),Bf(Zn(l,Et),Pe(f,2))}),Z4=Be(function(l){var f=kr(l);return f=typeof f=="function"?f:r,Bf(Zn(l,Et),r,f)}),J4=Be(rp);function Q4(l,f){return jE(l||[],f||[],Ia)}function eH(l,f){return jE(l||[],f||[],Ta)}var tH=Be(function(l){var f=l.length,m=f>1?l[f-1]:r;return m=typeof m=="function"?(l.pop(),m):r,bS(l,m)});function yS(l){var f=L(l);return f.__chain__=!0,f}function rH(l,f){return f(l),l}function Zl(l,f){return f(l)}var nH=kn(function(l){var f=l.length,m=f?l[0]:0,I=this.__wrapped__,k=function(F){return If(F,l)};return f>1||this.__actions__.length||!(I instanceof Ve)||!Mn(m)?this.thru(k):(I=I.slice(m,+m+(f?1:0)),I.__actions__.push({func:Zl,args:[k],thisArg:r}),new Pr(I,this.__chain__).thru(function(F){return f&&!F.length&&F.push(r),F}))});function oH(){return yS(this)}function iH(){return new Pr(this.value(),this.__chain__)}function aH(){this.__values__===r&&(this.__values__=kS(this.value()));var l=this.__index__>=this.__values__.length,f=l?r:this.__values__[this.__index__++];return{done:l,value:f}}function sH(){return this}function lH(l){for(var f,m=this;m instanceof jl;){var I=fS(m);I.__index__=0,I.__values__=r,f?k.__wrapped__=I:f=I;var k=I;m=m.__wrapped__}return k.__wrapped__=l,f}function cH(){var l=this.__wrapped__;if(l instanceof Ve){var f=l;return this.__actions__.length&&(f=new Ve(this)),f=f.reverse(),f.__actions__.push({func:Zl,args:[tp],thisArg:r}),new Pr(f,this.__chain__)}return this.thru(tp)}function uH(){return DE(this.__wrapped__,this.__actions__)}var dH=Hl(function(l,f,m){nt.call(l,m)?++l[m]:Tn(l,m,1)});function fH(l,f,m){var I=De(l)?K1:r3;return m&&Zt(l,f,m)&&(f=r),I(l,Pe(f,3))}function pH(l,f){var m=De(l)?Zn:bE;return m(l,Pe(f,3))}var hH=UE(pS),vH=UE(hS);function gH(l,f){return Bt(Jl(l,f),1)}function mH(l,f){return Bt(Jl(l,f),G)}function bH(l,f,m){return m=m===r?1:je(m),Bt(Jl(l,f),m)}function wS(l,f){var m=De(l)?Rr:to;return m(l,Pe(f,3))}function xS(l,f){var m=De(l)?qF:mE;return m(l,Pe(f,3))}var yH=Hl(function(l,f,m){nt.call(l,m)?l[m].push(f):Tn(l,m,[f])});function wH(l,f,m,I){l=nr(l)?l:Ei(l),m=m&&!I?je(m):0;var k=l.length;return m<0&&(m=kt(k+m,0)),nc(l)?m<=k&&l.indexOf(f,m)>-1:!!k&&di(l,f,m)>-1}var xH=Be(function(l,f,m){var I=-1,k=typeof f=="function",F=nr(l)?le(l.length):[];return to(l,function(X){F[++I]=k?hr(f,X,m):Na(X,f,m)}),F}),_H=Hl(function(l,f,m){Tn(l,m,f)});function Jl(l,f){var m=De(l)?bt:SE;return m(l,Pe(f,3))}function EH(l,f,m,I){return l==null?[]:(De(f)||(f=f==null?[]:[f]),m=I?r:m,De(m)||(m=m==null?[]:[m]),RE(l,f,m))}var SH=Hl(function(l,f,m){l[m?0:1].push(f)},function(){return[[],[]]});function OH(l,f,m){var I=De(l)?hf:J1,k=arguments.length<3;return I(l,Pe(f,4),m,k,to)}function CH(l,f,m){var I=De(l)?LF:J1,k=arguments.length<3;return I(l,Pe(f,4),m,k,mE)}function IH(l,f){var m=De(l)?Zn:bE;return m(l,tc(Pe(f,3)))}function RH(l){var f=De(l)?pE:w3;return f(l)}function NH(l,f,m){(m?Zt(l,f,m):f===r)?f=1:f=je(f);var I=De(l)?Z$:x3;return I(l,f)}function PH(l){var f=De(l)?J$:E3;return f(l)}function TH(l){if(l==null)return 0;if(nr(l))return nc(l)?pi(l):l.length;var f=Gt(l);return f==ve||f==ze?l.size:kf(l).length}function AH(l,f,m){var I=De(l)?vf:S3;return m&&Zt(l,f,m)&&(f=r),I(l,Pe(f,3))}var kH=Be(function(l,f){if(l==null)return[];var m=f.length;return m>1&&Zt(l,f[0],f[1])?f=[]:m>2&&Zt(f[0],f[1],f[2])&&(f=[f[0]]),RE(l,Bt(f,1),[])}),Ql=p$||function(){return zt.Date.now()};function MH(l,f){if(typeof f!="function")throw new Nr(a);return l=je(l),function(){if(--l<1)return f.apply(this,arguments)}}function _S(l,f,m){return f=m?r:f,f=l&&f==null?l.length:f,An(l,N,r,r,r,r,f)}function ES(l,f){var m;if(typeof f!="function")throw new Nr(a);return l=je(l),function(){return--l>0&&(m=f.apply(this,arguments)),l<=1&&(f=r),m}}var np=Be(function(l,f,m){var I=b;if(m.length){var k=Qn(m,xi(np));I|=_}return An(l,I,f,m,k)}),SS=Be(function(l,f,m){var I=b|x;if(m.length){var k=Qn(m,xi(SS));I|=_}return An(f,I,l,m,k)});function OS(l,f,m){f=m?r:f;var I=An(l,E,r,r,r,r,r,f);return I.placeholder=OS.placeholder,I}function CS(l,f,m){f=m?r:f;var I=An(l,S,r,r,r,r,r,f);return I.placeholder=CS.placeholder,I}function IS(l,f,m){var I,k,F,X,J,ae,ge=0,me=!1,be=!1,_e=!0;if(typeof l!="function")throw new Nr(a);f=Mr(f)||0,wt(m)&&(me=!!m.leading,be="maxWait"in m,F=be?kt(Mr(m.maxWait)||0,f):F,_e="trailing"in m?!!m.trailing:_e);function Ne(St){var Xr=I,qn=k;return I=k=r,ge=St,X=l.apply(qn,Xr),X}function Te(St){return ge=St,J=Ma($e,f),me?Ne(St):X}function Le(St){var Xr=St-ae,qn=St-ge,US=f-Xr;return be?Ut(US,F-qn):US}function Ae(St){var Xr=St-ae,qn=St-ge;return ae===r||Xr>=f||Xr<0||be&&qn>=F}function $e(){var St=Ql();if(Ae(St))return We(St);J=Ma($e,Le(St))}function We(St){return J=r,_e&&I?Ne(St):(I=k=r,X)}function br(){J!==r&&qE(J),ge=0,I=ae=k=J=r}function Jt(){return J===r?X:We(Ql())}function yr(){var St=Ql(),Xr=Ae(St);if(I=arguments,k=this,ae=St,Xr){if(J===r)return Te(ae);if(be)return qE(J),J=Ma($e,f),Ne(ae)}return J===r&&(J=Ma($e,f)),X}return yr.cancel=br,yr.flush=Jt,yr}var DH=Be(function(l,f){return gE(l,1,f)}),jH=Be(function(l,f,m){return gE(l,Mr(f)||0,m)});function qH(l){return An(l,A)}function ec(l,f){if(typeof l!="function"||f!=null&&typeof f!="function")throw new Nr(a);var m=function(){var I=arguments,k=f?f.apply(this,I):I[0],F=m.cache;if(F.has(k))return F.get(k);var X=l.apply(this,I);return m.cache=F.set(k,X)||F,X};return m.cache=new(ec.Cache||Pn),m}ec.Cache=Pn;function tc(l){if(typeof l!="function")throw new Nr(a);return function(){var f=arguments;switch(f.length){case 0:return!l.call(this);case 1:return!l.call(this,f[0]);case 2:return!l.call(this,f[0],f[1]);case 3:return!l.call(this,f[0],f[1],f[2])}return!l.apply(this,f)}}function LH(l){return ES(2,l)}var zH=O3(function(l,f){f=f.length==1&&De(f[0])?bt(f[0],vr(Pe())):bt(Bt(f,1),vr(Pe()));var m=f.length;return Be(function(I){for(var k=-1,F=Ut(I.length,m);++k<F;)I[k]=f[k].call(this,I[k]);return hr(l,this,I)})}),op=Be(function(l,f){var m=Qn(f,xi(op));return An(l,_,r,f,m)}),RS=Be(function(l,f){var m=Qn(f,xi(RS));return An(l,O,r,f,m)}),BH=kn(function(l,f){return An(l,R,r,r,r,f)});function FH(l,f){if(typeof l!="function")throw new Nr(a);return f=f===r?f:je(f),Be(l,f)}function $H(l,f){if(typeof l!="function")throw new Nr(a);return f=f==null?0:kt(je(f),0),Be(function(m){var I=m[f],k=oo(m,0,f);return I&&Jn(k,I),hr(l,this,k)})}function HH(l,f,m){var I=!0,k=!0;if(typeof l!="function")throw new Nr(a);return wt(m)&&(I="leading"in m?!!m.leading:I,k="trailing"in m?!!m.trailing:k),IS(l,f,{leading:I,maxWait:f,trailing:k})}function VH(l){return _S(l,1)}function WH(l,f){return op($f(f),l)}function UH(){if(!arguments.length)return[];var l=arguments[0];return De(l)?l:[l]}function GH(l){return Tr(l,v)}function KH(l,f){return f=typeof f=="function"?f:r,Tr(l,v,f)}function YH(l){return Tr(l,p|v)}function XH(l,f){return f=typeof f=="function"?f:r,Tr(l,p|v,f)}function ZH(l,f){return f==null||vE(l,f,jt(f))}function Yr(l,f){return l===f||l!==l&&f!==f}var JH=Gl(Pf),QH=Gl(function(l,f){return l>=f}),Do=xE((function(){return arguments})())?xE:function(l){return xt(l)&&nt.call(l,"callee")&&!sE.call(l,"callee")},De=le.isArray,eV=$1?vr($1):l3;function nr(l){return l!=null&&rc(l.length)&&!Dn(l)}function Et(l){return xt(l)&&nr(l)}function tV(l){return l===!0||l===!1||xt(l)&&Xt(l)==Y}var io=v$||vp,rV=H1?vr(H1):c3;function nV(l){return xt(l)&&l.nodeType===1&&!Da(l)}function oV(l){if(l==null)return!0;if(nr(l)&&(De(l)||typeof l=="string"||typeof l.splice=="function"||io(l)||_i(l)||Do(l)))return!l.length;var f=Gt(l);if(f==ve||f==ze)return!l.size;if(ka(l))return!kf(l).length;for(var m in l)if(nt.call(l,m))return!1;return!0}function iV(l,f){return Pa(l,f)}function aV(l,f,m){m=typeof m=="function"?m:r;var I=m?m(l,f):r;return I===r?Pa(l,f,r,m):!!I}function ip(l){if(!xt(l))return!1;var f=Xt(l);return f==se||f==re||typeof l.message=="string"&&typeof l.name=="string"&&!Da(l)}function sV(l){return typeof l=="number"&&cE(l)}function Dn(l){if(!wt(l))return!1;var f=Xt(l);return f==ee||f==we||f==H||f==ke}function NS(l){return typeof l=="number"&&l==je(l)}function rc(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=W}function wt(l){var f=typeof l;return l!=null&&(f=="object"||f=="function")}function xt(l){return l!=null&&typeof l=="object"}var PS=V1?vr(V1):d3;function lV(l,f){return l===f||Af(l,f,Yf(f))}function cV(l,f,m){return m=typeof m=="function"?m:r,Af(l,f,Yf(f),m)}function uV(l){return TS(l)&&l!=+l}function dV(l){if(K3(l))throw new Me(i);return _E(l)}function fV(l){return l===null}function pV(l){return l==null}function TS(l){return typeof l=="number"||xt(l)&&Xt(l)==Ee}function Da(l){if(!xt(l)||Xt(l)!=ce)return!1;var f=Nl(l);if(f===null)return!0;var m=nt.call(f,"constructor")&&f.constructor;return typeof m=="function"&&m instanceof m&&Ol.call(m)==c$}var ap=W1?vr(W1):f3;function hV(l){return NS(l)&&l>=-W&&l<=W}var AS=U1?vr(U1):p3;function nc(l){return typeof l=="string"||!De(l)&&xt(l)&&Xt(l)==rt}function mr(l){return typeof l=="symbol"||xt(l)&&Xt(l)==Xe}var _i=G1?vr(G1):h3;function vV(l){return l===r}function gV(l){return xt(l)&&Gt(l)==lt}function mV(l){return xt(l)&&Xt(l)==Wt}var bV=Gl(Mf),yV=Gl(function(l,f){return l<=f});function kS(l){if(!l)return[];if(nr(l))return nc(l)?Gr(l):rr(l);if(_a&&l[_a])return ZF(l[_a]());var f=Gt(l),m=f==ve?xf:f==ze?_l:Ei;return m(l)}function jn(l){if(!l)return l===0?l:0;if(l=Mr(l),l===G||l===-G){var f=l<0?-1:1;return f*Q}return l===l?l:0}function je(l){var f=jn(l),m=f%1;return f===f?m?f-m:f:0}function MS(l){return l?To(je(l),0,U):0}function Mr(l){if(typeof l=="number")return l;if(mr(l))return z;if(wt(l)){var f=typeof l.valueOf=="function"?l.valueOf():l;l=wt(f)?f+"":f}if(typeof l!="string")return l===0?l:+l;l=Q1(l);var m=Xd.test(l);return m||Jd.test(l)?MF(l.slice(2),m?2:8):Yd.test(l)?z:+l}function DS(l){return dn(l,or(l))}function wV(l){return l?To(je(l),-W,W):l===0?l:0}function Ze(l){return l==null?"":gr(l)}var xV=yi(function(l,f){if(ka(f)||nr(f)){dn(f,jt(f),l);return}for(var m in f)nt.call(f,m)&&Ia(l,m,f[m])}),jS=yi(function(l,f){dn(f,or(f),l)}),oc=yi(function(l,f,m,I){dn(f,or(f),l,I)}),_V=yi(function(l,f,m,I){dn(f,jt(f),l,I)}),EV=kn(If);function SV(l,f){var m=bi(l);return f==null?m:hE(m,f)}var OV=Be(function(l,f){l=ut(l);var m=-1,I=f.length,k=I>2?f[2]:r;for(k&&Zt(f[0],f[1],k)&&(I=1);++m<I;)for(var F=f[m],X=or(F),J=-1,ae=X.length;++J<ae;){var ge=X[J],me=l[ge];(me===r||Yr(me,vi[ge])&&!nt.call(l,ge))&&(l[ge]=F[ge])}return l}),CV=Be(function(l){return l.push(r,QE),hr(qS,r,l)});function IV(l,f){return Y1(l,Pe(f,3),un)}function RV(l,f){return Y1(l,Pe(f,3),Nf)}function NV(l,f){return l==null?l:Rf(l,Pe(f,3),or)}function PV(l,f){return l==null?l:yE(l,Pe(f,3),or)}function TV(l,f){return l&&un(l,Pe(f,3))}function AV(l,f){return l&&Nf(l,Pe(f,3))}function kV(l){return l==null?[]:zl(l,jt(l))}function MV(l){return l==null?[]:zl(l,or(l))}function sp(l,f,m){var I=l==null?r:Ao(l,f);return I===r?m:I}function DV(l,f){return l!=null&&rS(l,f,o3)}function lp(l,f){return l!=null&&rS(l,f,i3)}var jV=KE(function(l,f,m){f!=null&&typeof f.toString!="function"&&(f=Cl.call(f)),l[f]=m},up(ir)),qV=KE(function(l,f,m){f!=null&&typeof f.toString!="function"&&(f=Cl.call(f)),nt.call(l,f)?l[f].push(m):l[f]=[m]},Pe),LV=Be(Na);function jt(l){return nr(l)?fE(l):kf(l)}function or(l){return nr(l)?fE(l,!0):v3(l)}function zV(l,f){var m={};return f=Pe(f,3),un(l,function(I,k,F){Tn(m,f(I,k,F),I)}),m}function BV(l,f){var m={};return f=Pe(f,3),un(l,function(I,k,F){Tn(m,k,f(I,k,F))}),m}var FV=yi(function(l,f,m){Bl(l,f,m)}),qS=yi(function(l,f,m,I){Bl(l,f,m,I)}),$V=kn(function(l,f){var m={};if(l==null)return m;var I=!1;f=bt(f,function(F){return F=no(F,l),I||(I=F.length>1),F}),dn(l,Gf(l),m),I&&(m=Tr(m,p|h|v,j3));for(var k=f.length;k--;)zf(m,f[k]);return m});function HV(l,f){return LS(l,tc(Pe(f)))}var VV=kn(function(l,f){return l==null?{}:m3(l,f)});function LS(l,f){if(l==null)return{};var m=bt(Gf(l),function(I){return[I]});return f=Pe(f),NE(l,m,function(I,k){return f(I,k[0])})}function WV(l,f,m){f=no(f,l);var I=-1,k=f.length;for(k||(k=1,l=r);++I<k;){var F=l==null?r:l[fn(f[I])];F===r&&(I=k,F=m),l=Dn(F)?F.call(l):F}return l}function UV(l,f,m){return l==null?l:Ta(l,f,m)}function GV(l,f,m,I){return I=typeof I=="function"?I:r,l==null?l:Ta(l,f,m,I)}var zS=ZE(jt),BS=ZE(or);function KV(l,f,m){var I=De(l),k=I||io(l)||_i(l);if(f=Pe(f,4),m==null){var F=l&&l.constructor;k?m=I?new F:[]:wt(l)?m=Dn(F)?bi(Nl(l)):{}:m={}}return(k?Rr:un)(l,function(X,J,ae){return f(m,X,J,ae)}),m}function YV(l,f){return l==null?!0:zf(l,f)}function XV(l,f,m){return l==null?l:ME(l,f,$f(m))}function ZV(l,f,m,I){return I=typeof I=="function"?I:r,l==null?l:ME(l,f,$f(m),I)}function Ei(l){return l==null?[]:wf(l,jt(l))}function JV(l){return l==null?[]:wf(l,or(l))}function QV(l,f,m){return m===r&&(m=f,f=r),m!==r&&(m=Mr(m),m=m===m?m:0),f!==r&&(f=Mr(f),f=f===f?f:0),To(Mr(l),f,m)}function e6(l,f,m){return f=jn(f),m===r?(m=f,f=0):m=jn(m),l=Mr(l),a3(l,f,m)}function t6(l,f,m){if(m&&typeof m!="boolean"&&Zt(l,f,m)&&(f=m=r),m===r&&(typeof f=="boolean"?(m=f,f=r):typeof l=="boolean"&&(m=l,l=r)),l===r&&f===r?(l=0,f=1):(l=jn(l),f===r?(f=l,l=0):f=jn(f)),l>f){var I=l;l=f,f=I}if(m||l%1||f%1){var k=uE();return Ut(l+k*(f-l+kF("1e-"+((k+"").length-1))),f)}return jf(l,f)}var r6=wi(function(l,f,m){return f=f.toLowerCase(),l+(m?FS(f):f)});function FS(l){return cp(Ze(l).toLowerCase())}function $S(l){return l=Ze(l),l&&l.replace(ef,UF).replace(EF,"")}function n6(l,f,m){l=Ze(l),f=gr(f);var I=l.length;m=m===r?I:To(je(m),0,I);var k=m;return m-=f.length,m>=0&&l.slice(m,k)==f}function o6(l){return l=Ze(l),l&&Qs.test(l)?l.replace(va,GF):l}function i6(l){return l=Ze(l),l&&ol.test(l)?l.replace(ga,"\\$&"):l}var a6=wi(function(l,f,m){return l+(m?"-":"")+f.toLowerCase()}),s6=wi(function(l,f,m){return l+(m?" ":"")+f.toLowerCase()}),l6=WE("toLowerCase");function c6(l,f,m){l=Ze(l),f=je(f);var I=f?pi(l):0;if(!f||I>=f)return l;var k=(f-I)/2;return Ul(kl(k),m)+l+Ul(Al(k),m)}function u6(l,f,m){l=Ze(l),f=je(f);var I=f?pi(l):0;return f&&I<f?l+Ul(f-I,m):l}function d6(l,f,m){l=Ze(l),f=je(f);var I=f?pi(l):0;return f&&I<f?Ul(f-I,m)+l:l}function f6(l,f,m){return m||f==null?f=0:f&&(f=+f),y$(Ze(l).replace(ma,""),f||0)}function p6(l,f,m){return(m?Zt(l,f,m):f===r)?f=1:f=je(f),qf(Ze(l),f)}function h6(){var l=arguments,f=Ze(l[0]);return l.length<3?f:f.replace(l[1],l[2])}var v6=wi(function(l,f,m){return l+(m?"_":"")+f.toLowerCase()});function g6(l,f,m){return m&&typeof m!="number"&&Zt(l,f,m)&&(f=m=r),m=m===r?U:m>>>0,m?(l=Ze(l),l&&(typeof f=="string"||f!=null&&!ap(f))&&(f=gr(f),!f&&fi(l))?oo(Gr(l),0,m):l.split(f,m)):[]}var m6=wi(function(l,f,m){return l+(m?" ":"")+cp(f)});function b6(l,f,m){return l=Ze(l),m=m==null?0:To(je(m),0,l.length),f=gr(f),l.slice(m,m+f.length)==f}function y6(l,f,m){var I=L.templateSettings;m&&Zt(l,f,m)&&(f=r),l=Ze(l),f=oc({},f,I,JE);var k=oc({},f.imports,I.imports,JE),F=jt(k),X=wf(k,F),J,ae,ge=0,me=f.interpolate||si,be="__p += '",_e=_f((f.escape||si).source+"|"+me.source+"|"+(me===tl?Kd:si).source+"|"+(f.evaluate||si).source+"|$","g"),Ne="//# sourceURL="+(nt.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++RF+"]")+`
64
+ `)}function W3(l){return De(l)||Do(l)||!!(lE&&l&&l[lE])}function Mn(l,f){var m=typeof l;return f=f??W,!!f&&(m=="number"||m!="symbol"&&Qd.test(l))&&l>-1&&l%1==0&&l<f}function Zt(l,f,m){if(!wt(m))return!1;var I=typeof f;return(I=="number"?nr(m)&&Mn(f,m.length):I=="string"&&f in m)?Yr(m[f],l):!1}function Zf(l,f){if(De(l))return!1;var m=typeof l;return m=="number"||m=="symbol"||m=="boolean"||l==null||mr(l)?!0:$d.test(l)||!rl.test(l)||f!=null&&l in ut(f)}function U3(l){var f=typeof l;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?l!=="__proto__":l===null}function Jf(l){var f=Kl(l),m=L[f];if(typeof m!="function"||!(f in Ve.prototype))return!1;if(l===m)return!0;var I=Kf(m);return!!I&&l===I[0]}function G3(l){return!!oE&&oE in l}var K3=Sl?Dn:vp;function Ma(l){var f=l&&l.constructor,m=typeof f=="function"&&f.prototype||vi;return l===m}function oS(l){return l===l&&!wt(l)}function iS(l,f){return function(m){return m==null?!1:m[l]===f&&(f!==r||l in ut(m))}}function Y3(l){var f=ec(l,function(I){return m.size===u&&m.clear(),I}),m=f.cache;return f}function X3(l,f){var m=l[1],I=f[1],k=m|I,F=k<(b|x|N),X=I==N&&m==E||I==N&&m==R&&l[7].length<=f[8]||I==(N|R)&&f[7].length<=f[8]&&m==E;if(!(F||X))return l;I&b&&(l[2]=f[2],k|=m&b?0:w);var J=f[3];if(J){var ae=l[3];l[3]=ae?FE(ae,J,f[4]):J,l[4]=ae?Qn(l[3],d):f[4]}return J=f[5],J&&(ae=l[5],l[5]=ae?$E(ae,J,f[6]):J,l[6]=ae?Qn(l[5],d):f[6]),J=f[7],J&&(l[7]=J),I&N&&(l[8]=l[8]==null?f[8]:Ut(l[8],f[8])),l[9]==null&&(l[9]=f[9]),l[0]=f[0],l[1]=k,l}function Z3(l){var f=[];if(l!=null)for(var m in ut(l))f.push(m);return f}function J3(l){return Cl.call(l)}function aS(l,f,m){return f=kt(f===r?l.length-1:f,0),function(){for(var I=arguments,k=-1,F=kt(I.length-f,0),X=le(F);++k<F;)X[k]=I[f+k];k=-1;for(var J=le(f+1);++k<f;)J[k]=I[k];return J[f]=m(X),hr(l,this,J)}}function sS(l,f){return f.length<2?l:Ao(l,Ar(f,0,-1))}function Q3(l,f){for(var m=l.length,I=Ut(f.length,m),k=rr(l);I--;){var F=f[I];l[I]=Mn(F,m)?k[F]:r}return l}function Qf(l,f){if(!(f==="constructor"&&typeof l[f]=="function")&&f!="__proto__")return l[f]}var lS=uS(TE),Da=h$||function(l,f){return zt.setTimeout(l,f)},ep=uS(_3);function cS(l,f,m){var I=f+"";return ep(l,V3(I,e4(F3(I),m)))}function uS(l){var f=0,m=0;return function(){var I=b$(),k=M-(I-m);if(m=I,k>0){if(++f>=j)return arguments[0]}else f=0;return l.apply(r,arguments)}}function Xl(l,f){var m=-1,I=l.length,k=I-1;for(f=f===r?I:f;++m<f;){var F=jf(m,k),X=l[F];l[F]=l[m],l[m]=X}return l.length=f,l}var dS=Y3(function(l){var f=[];return l.charCodeAt(0)===46&&f.push(""),l.replace(nl,function(m,I,k,F){f.push(k?F.replace(Gd,"$1"):I||m)}),f});function fn(l){if(typeof l=="string"||mr(l))return l;var f=l+"";return f=="0"&&1/l==-G?"-0":f}function Mo(l){if(l!=null){try{return Ol.call(l)}catch{}try{return l+""}catch{}}return""}function e4(l,f){return Rr($,function(m){var I="_."+m[0];f&m[1]&&!wl(l,I)&&l.push(I)}),l.sort()}function fS(l){if(l instanceof Ve)return l.clone();var f=new Pr(l.__wrapped__,l.__chain__);return f.__actions__=rr(l.__actions__),f.__index__=l.__index__,f.__values__=l.__values__,f}function t4(l,f,m){(m?Zt(l,f,m):f===r)?f=1:f=kt(je(f),0);var I=l==null?0:l.length;if(!I||f<1)return[];for(var k=0,F=0,X=le(Al(I/f));k<I;)X[F++]=Ar(l,k,k+=f);return X}function r4(l){for(var f=-1,m=l==null?0:l.length,I=0,k=[];++f<m;){var F=l[f];F&&(k[I++]=F)}return k}function n4(){var l=arguments.length;if(!l)return[];for(var f=le(l-1),m=arguments[0],I=l;I--;)f[I-1]=arguments[I];return Jn(De(m)?rr(m):[m],Bt(f,1))}var o4=Be(function(l,f){return Et(l)?Na(l,Bt(f,1,Et,!0)):[]}),i4=Be(function(l,f){var m=kr(f);return Et(m)&&(m=r),Et(l)?Na(l,Bt(f,1,Et,!0),Pe(m,2)):[]}),a4=Be(function(l,f){var m=kr(f);return Et(m)&&(m=r),Et(l)?Na(l,Bt(f,1,Et,!0),r,m):[]});function s4(l,f,m){var I=l==null?0:l.length;return I?(f=m||f===r?1:je(f),Ar(l,f<0?0:f,I)):[]}function l4(l,f,m){var I=l==null?0:l.length;return I?(f=m||f===r?1:je(f),f=I-f,Ar(l,0,f<0?0:f)):[]}function c4(l,f){return l&&l.length?$l(l,Pe(f,3),!0,!0):[]}function u4(l,f){return l&&l.length?$l(l,Pe(f,3),!0):[]}function d4(l,f,m,I){var k=l==null?0:l.length;return k?(m&&typeof m!="number"&&Zt(l,f,m)&&(m=0,I=k),n3(l,f,m,I)):[]}function pS(l,f,m){var I=l==null?0:l.length;if(!I)return-1;var k=m==null?0:je(m);return k<0&&(k=kt(I+k,0)),xl(l,Pe(f,3),k)}function hS(l,f,m){var I=l==null?0:l.length;if(!I)return-1;var k=I-1;return m!==r&&(k=je(m),k=m<0?kt(I+k,0):Ut(k,I-1)),xl(l,Pe(f,3),k,!0)}function vS(l){var f=l==null?0:l.length;return f?Bt(l,1):[]}function f4(l){var f=l==null?0:l.length;return f?Bt(l,G):[]}function p4(l,f){var m=l==null?0:l.length;return m?(f=f===r?1:je(f),Bt(l,f)):[]}function h4(l){for(var f=-1,m=l==null?0:l.length,I={};++f<m;){var k=l[f];I[k[0]]=k[1]}return I}function gS(l){return l&&l.length?l[0]:r}function v4(l,f,m){var I=l==null?0:l.length;if(!I)return-1;var k=m==null?0:je(m);return k<0&&(k=kt(I+k,0)),di(l,f,k)}function g4(l){var f=l==null?0:l.length;return f?Ar(l,0,-1):[]}var m4=Be(function(l){var f=bt(l,Ff);return f.length&&f[0]===l[0]?Tf(f):[]}),b4=Be(function(l){var f=kr(l),m=bt(l,Ff);return f===kr(m)?f=r:m.pop(),m.length&&m[0]===l[0]?Tf(m,Pe(f,2)):[]}),y4=Be(function(l){var f=kr(l),m=bt(l,Ff);return f=typeof f=="function"?f:r,f&&m.pop(),m.length&&m[0]===l[0]?Tf(m,r,f):[]});function w4(l,f){return l==null?"":g$.call(l,f)}function kr(l){var f=l==null?0:l.length;return f?l[f-1]:r}function x4(l,f,m){var I=l==null?0:l.length;if(!I)return-1;var k=I;return m!==r&&(k=je(m),k=k<0?kt(I+k,0):Ut(k,I-1)),f===f?e$(l,f,k):xl(l,X1,k,!0)}function _4(l,f){return l&&l.length?IE(l,je(f)):r}var E4=Be(mS);function mS(l,f){return l&&l.length&&f&&f.length?Df(l,f):l}function S4(l,f,m){return l&&l.length&&f&&f.length?Df(l,f,Pe(m,2)):l}function O4(l,f,m){return l&&l.length&&f&&f.length?Df(l,f,r,m):l}var C4=kn(function(l,f){var m=l==null?0:l.length,I=If(l,f);return PE(l,bt(f,function(k){return Mn(k,m)?+k:k}).sort(BE)),I});function I4(l,f){var m=[];if(!(l&&l.length))return m;var I=-1,k=[],F=l.length;for(f=Pe(f,3);++I<F;){var X=l[I];f(X,I,l)&&(m.push(X),k.push(I))}return PE(l,k),m}function tp(l){return l==null?l:w$.call(l)}function R4(l,f,m){var I=l==null?0:l.length;return I?(m&&typeof m!="number"&&Zt(l,f,m)?(f=0,m=I):(f=f==null?0:je(f),m=m===r?I:je(m)),Ar(l,f,m)):[]}function N4(l,f){return Fl(l,f)}function P4(l,f,m){return Lf(l,f,Pe(m,2))}function T4(l,f){var m=l==null?0:l.length;if(m){var I=Fl(l,f);if(I<m&&Yr(l[I],f))return I}return-1}function A4(l,f){return Fl(l,f,!0)}function k4(l,f,m){return Lf(l,f,Pe(m,2),!0)}function M4(l,f){var m=l==null?0:l.length;if(m){var I=Fl(l,f,!0)-1;if(Yr(l[I],f))return I}return-1}function D4(l){return l&&l.length?AE(l):[]}function j4(l,f){return l&&l.length?AE(l,Pe(f,2)):[]}function q4(l){var f=l==null?0:l.length;return f?Ar(l,1,f):[]}function L4(l,f,m){return l&&l.length?(f=m||f===r?1:je(f),Ar(l,0,f<0?0:f)):[]}function z4(l,f,m){var I=l==null?0:l.length;return I?(f=m||f===r?1:je(f),f=I-f,Ar(l,f<0?0:f,I)):[]}function B4(l,f){return l&&l.length?$l(l,Pe(f,3),!1,!0):[]}function F4(l,f){return l&&l.length?$l(l,Pe(f,3)):[]}var $4=Be(function(l){return ro(Bt(l,1,Et,!0))}),H4=Be(function(l){var f=kr(l);return Et(f)&&(f=r),ro(Bt(l,1,Et,!0),Pe(f,2))}),V4=Be(function(l){var f=kr(l);return f=typeof f=="function"?f:r,ro(Bt(l,1,Et,!0),r,f)});function W4(l){return l&&l.length?ro(l):[]}function U4(l,f){return l&&l.length?ro(l,Pe(f,2)):[]}function G4(l,f){return f=typeof f=="function"?f:r,l&&l.length?ro(l,r,f):[]}function rp(l){if(!(l&&l.length))return[];var f=0;return l=Zn(l,function(m){if(Et(m))return f=kt(m.length,f),!0}),yf(f,function(m){return bt(l,gf(m))})}function bS(l,f){if(!(l&&l.length))return[];var m=rp(l);return f==null?m:bt(m,function(I){return hr(f,r,I)})}var K4=Be(function(l,f){return Et(l)?Na(l,f):[]}),Y4=Be(function(l){return Bf(Zn(l,Et))}),X4=Be(function(l){var f=kr(l);return Et(f)&&(f=r),Bf(Zn(l,Et),Pe(f,2))}),Z4=Be(function(l){var f=kr(l);return f=typeof f=="function"?f:r,Bf(Zn(l,Et),r,f)}),J4=Be(rp);function Q4(l,f){return jE(l||[],f||[],Ra)}function eH(l,f){return jE(l||[],f||[],Aa)}var tH=Be(function(l){var f=l.length,m=f>1?l[f-1]:r;return m=typeof m=="function"?(l.pop(),m):r,bS(l,m)});function yS(l){var f=L(l);return f.__chain__=!0,f}function rH(l,f){return f(l),l}function Zl(l,f){return f(l)}var nH=kn(function(l){var f=l.length,m=f?l[0]:0,I=this.__wrapped__,k=function(F){return If(F,l)};return f>1||this.__actions__.length||!(I instanceof Ve)||!Mn(m)?this.thru(k):(I=I.slice(m,+m+(f?1:0)),I.__actions__.push({func:Zl,args:[k],thisArg:r}),new Pr(I,this.__chain__).thru(function(F){return f&&!F.length&&F.push(r),F}))});function oH(){return yS(this)}function iH(){return new Pr(this.value(),this.__chain__)}function aH(){this.__values__===r&&(this.__values__=kS(this.value()));var l=this.__index__>=this.__values__.length,f=l?r:this.__values__[this.__index__++];return{done:l,value:f}}function sH(){return this}function lH(l){for(var f,m=this;m instanceof jl;){var I=fS(m);I.__index__=0,I.__values__=r,f?k.__wrapped__=I:f=I;var k=I;m=m.__wrapped__}return k.__wrapped__=l,f}function cH(){var l=this.__wrapped__;if(l instanceof Ve){var f=l;return this.__actions__.length&&(f=new Ve(this)),f=f.reverse(),f.__actions__.push({func:Zl,args:[tp],thisArg:r}),new Pr(f,this.__chain__)}return this.thru(tp)}function uH(){return DE(this.__wrapped__,this.__actions__)}var dH=Hl(function(l,f,m){nt.call(l,m)?++l[m]:Tn(l,m,1)});function fH(l,f,m){var I=De(l)?K1:r3;return m&&Zt(l,f,m)&&(f=r),I(l,Pe(f,3))}function pH(l,f){var m=De(l)?Zn:bE;return m(l,Pe(f,3))}var hH=UE(pS),vH=UE(hS);function gH(l,f){return Bt(Jl(l,f),1)}function mH(l,f){return Bt(Jl(l,f),G)}function bH(l,f,m){return m=m===r?1:je(m),Bt(Jl(l,f),m)}function wS(l,f){var m=De(l)?Rr:to;return m(l,Pe(f,3))}function xS(l,f){var m=De(l)?qF:mE;return m(l,Pe(f,3))}var yH=Hl(function(l,f,m){nt.call(l,m)?l[m].push(f):Tn(l,m,[f])});function wH(l,f,m,I){l=nr(l)?l:Ei(l),m=m&&!I?je(m):0;var k=l.length;return m<0&&(m=kt(k+m,0)),nc(l)?m<=k&&l.indexOf(f,m)>-1:!!k&&di(l,f,m)>-1}var xH=Be(function(l,f,m){var I=-1,k=typeof f=="function",F=nr(l)?le(l.length):[];return to(l,function(X){F[++I]=k?hr(f,X,m):Pa(X,f,m)}),F}),_H=Hl(function(l,f,m){Tn(l,m,f)});function Jl(l,f){var m=De(l)?bt:SE;return m(l,Pe(f,3))}function EH(l,f,m,I){return l==null?[]:(De(f)||(f=f==null?[]:[f]),m=I?r:m,De(m)||(m=m==null?[]:[m]),RE(l,f,m))}var SH=Hl(function(l,f,m){l[m?0:1].push(f)},function(){return[[],[]]});function OH(l,f,m){var I=De(l)?hf:J1,k=arguments.length<3;return I(l,Pe(f,4),m,k,to)}function CH(l,f,m){var I=De(l)?LF:J1,k=arguments.length<3;return I(l,Pe(f,4),m,k,mE)}function IH(l,f){var m=De(l)?Zn:bE;return m(l,tc(Pe(f,3)))}function RH(l){var f=De(l)?pE:w3;return f(l)}function NH(l,f,m){(m?Zt(l,f,m):f===r)?f=1:f=je(f);var I=De(l)?Z$:x3;return I(l,f)}function PH(l){var f=De(l)?J$:E3;return f(l)}function TH(l){if(l==null)return 0;if(nr(l))return nc(l)?pi(l):l.length;var f=Gt(l);return f==ve||f==ze?l.size:kf(l).length}function AH(l,f,m){var I=De(l)?vf:S3;return m&&Zt(l,f,m)&&(f=r),I(l,Pe(f,3))}var kH=Be(function(l,f){if(l==null)return[];var m=f.length;return m>1&&Zt(l,f[0],f[1])?f=[]:m>2&&Zt(f[0],f[1],f[2])&&(f=[f[0]]),RE(l,Bt(f,1),[])}),Ql=p$||function(){return zt.Date.now()};function MH(l,f){if(typeof f!="function")throw new Nr(a);return l=je(l),function(){if(--l<1)return f.apply(this,arguments)}}function _S(l,f,m){return f=m?r:f,f=l&&f==null?l.length:f,An(l,N,r,r,r,r,f)}function ES(l,f){var m;if(typeof f!="function")throw new Nr(a);return l=je(l),function(){return--l>0&&(m=f.apply(this,arguments)),l<=1&&(f=r),m}}var np=Be(function(l,f,m){var I=b;if(m.length){var k=Qn(m,xi(np));I|=_}return An(l,I,f,m,k)}),SS=Be(function(l,f,m){var I=b|x;if(m.length){var k=Qn(m,xi(SS));I|=_}return An(f,I,l,m,k)});function OS(l,f,m){f=m?r:f;var I=An(l,E,r,r,r,r,r,f);return I.placeholder=OS.placeholder,I}function CS(l,f,m){f=m?r:f;var I=An(l,S,r,r,r,r,r,f);return I.placeholder=CS.placeholder,I}function IS(l,f,m){var I,k,F,X,J,ae,ge=0,me=!1,be=!1,_e=!0;if(typeof l!="function")throw new Nr(a);f=Mr(f)||0,wt(m)&&(me=!!m.leading,be="maxWait"in m,F=be?kt(Mr(m.maxWait)||0,f):F,_e="trailing"in m?!!m.trailing:_e);function Ne(St){var Xr=I,qn=k;return I=k=r,ge=St,X=l.apply(qn,Xr),X}function Te(St){return ge=St,J=Da($e,f),me?Ne(St):X}function Le(St){var Xr=St-ae,qn=St-ge,US=f-Xr;return be?Ut(US,F-qn):US}function Ae(St){var Xr=St-ae,qn=St-ge;return ae===r||Xr>=f||Xr<0||be&&qn>=F}function $e(){var St=Ql();if(Ae(St))return We(St);J=Da($e,Le(St))}function We(St){return J=r,_e&&I?Ne(St):(I=k=r,X)}function br(){J!==r&&qE(J),ge=0,I=ae=k=J=r}function Jt(){return J===r?X:We(Ql())}function yr(){var St=Ql(),Xr=Ae(St);if(I=arguments,k=this,ae=St,Xr){if(J===r)return Te(ae);if(be)return qE(J),J=Da($e,f),Ne(ae)}return J===r&&(J=Da($e,f)),X}return yr.cancel=br,yr.flush=Jt,yr}var DH=Be(function(l,f){return gE(l,1,f)}),jH=Be(function(l,f,m){return gE(l,Mr(f)||0,m)});function qH(l){return An(l,A)}function ec(l,f){if(typeof l!="function"||f!=null&&typeof f!="function")throw new Nr(a);var m=function(){var I=arguments,k=f?f.apply(this,I):I[0],F=m.cache;if(F.has(k))return F.get(k);var X=l.apply(this,I);return m.cache=F.set(k,X)||F,X};return m.cache=new(ec.Cache||Pn),m}ec.Cache=Pn;function tc(l){if(typeof l!="function")throw new Nr(a);return function(){var f=arguments;switch(f.length){case 0:return!l.call(this);case 1:return!l.call(this,f[0]);case 2:return!l.call(this,f[0],f[1]);case 3:return!l.call(this,f[0],f[1],f[2])}return!l.apply(this,f)}}function LH(l){return ES(2,l)}var zH=O3(function(l,f){f=f.length==1&&De(f[0])?bt(f[0],vr(Pe())):bt(Bt(f,1),vr(Pe()));var m=f.length;return Be(function(I){for(var k=-1,F=Ut(I.length,m);++k<F;)I[k]=f[k].call(this,I[k]);return hr(l,this,I)})}),op=Be(function(l,f){var m=Qn(f,xi(op));return An(l,_,r,f,m)}),RS=Be(function(l,f){var m=Qn(f,xi(RS));return An(l,O,r,f,m)}),BH=kn(function(l,f){return An(l,R,r,r,r,f)});function FH(l,f){if(typeof l!="function")throw new Nr(a);return f=f===r?f:je(f),Be(l,f)}function $H(l,f){if(typeof l!="function")throw new Nr(a);return f=f==null?0:kt(je(f),0),Be(function(m){var I=m[f],k=oo(m,0,f);return I&&Jn(k,I),hr(l,this,k)})}function HH(l,f,m){var I=!0,k=!0;if(typeof l!="function")throw new Nr(a);return wt(m)&&(I="leading"in m?!!m.leading:I,k="trailing"in m?!!m.trailing:k),IS(l,f,{leading:I,maxWait:f,trailing:k})}function VH(l){return _S(l,1)}function WH(l,f){return op($f(f),l)}function UH(){if(!arguments.length)return[];var l=arguments[0];return De(l)?l:[l]}function GH(l){return Tr(l,v)}function KH(l,f){return f=typeof f=="function"?f:r,Tr(l,v,f)}function YH(l){return Tr(l,p|v)}function XH(l,f){return f=typeof f=="function"?f:r,Tr(l,p|v,f)}function ZH(l,f){return f==null||vE(l,f,jt(f))}function Yr(l,f){return l===f||l!==l&&f!==f}var JH=Gl(Pf),QH=Gl(function(l,f){return l>=f}),Do=xE((function(){return arguments})())?xE:function(l){return xt(l)&&nt.call(l,"callee")&&!sE.call(l,"callee")},De=le.isArray,eV=$1?vr($1):l3;function nr(l){return l!=null&&rc(l.length)&&!Dn(l)}function Et(l){return xt(l)&&nr(l)}function tV(l){return l===!0||l===!1||xt(l)&&Xt(l)==Y}var io=v$||vp,rV=H1?vr(H1):c3;function nV(l){return xt(l)&&l.nodeType===1&&!ja(l)}function oV(l){if(l==null)return!0;if(nr(l)&&(De(l)||typeof l=="string"||typeof l.splice=="function"||io(l)||_i(l)||Do(l)))return!l.length;var f=Gt(l);if(f==ve||f==ze)return!l.size;if(Ma(l))return!kf(l).length;for(var m in l)if(nt.call(l,m))return!1;return!0}function iV(l,f){return Ta(l,f)}function aV(l,f,m){m=typeof m=="function"?m:r;var I=m?m(l,f):r;return I===r?Ta(l,f,r,m):!!I}function ip(l){if(!xt(l))return!1;var f=Xt(l);return f==se||f==re||typeof l.message=="string"&&typeof l.name=="string"&&!ja(l)}function sV(l){return typeof l=="number"&&cE(l)}function Dn(l){if(!wt(l))return!1;var f=Xt(l);return f==ee||f==we||f==H||f==ke}function NS(l){return typeof l=="number"&&l==je(l)}function rc(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=W}function wt(l){var f=typeof l;return l!=null&&(f=="object"||f=="function")}function xt(l){return l!=null&&typeof l=="object"}var PS=V1?vr(V1):d3;function lV(l,f){return l===f||Af(l,f,Yf(f))}function cV(l,f,m){return m=typeof m=="function"?m:r,Af(l,f,Yf(f),m)}function uV(l){return TS(l)&&l!=+l}function dV(l){if(K3(l))throw new Me(i);return _E(l)}function fV(l){return l===null}function pV(l){return l==null}function TS(l){return typeof l=="number"||xt(l)&&Xt(l)==Ee}function ja(l){if(!xt(l)||Xt(l)!=ce)return!1;var f=Nl(l);if(f===null)return!0;var m=nt.call(f,"constructor")&&f.constructor;return typeof m=="function"&&m instanceof m&&Ol.call(m)==c$}var ap=W1?vr(W1):f3;function hV(l){return NS(l)&&l>=-W&&l<=W}var AS=U1?vr(U1):p3;function nc(l){return typeof l=="string"||!De(l)&&xt(l)&&Xt(l)==rt}function mr(l){return typeof l=="symbol"||xt(l)&&Xt(l)==Xe}var _i=G1?vr(G1):h3;function vV(l){return l===r}function gV(l){return xt(l)&&Gt(l)==lt}function mV(l){return xt(l)&&Xt(l)==Wt}var bV=Gl(Mf),yV=Gl(function(l,f){return l<=f});function kS(l){if(!l)return[];if(nr(l))return nc(l)?Gr(l):rr(l);if(Ea&&l[Ea])return ZF(l[Ea]());var f=Gt(l),m=f==ve?xf:f==ze?_l:Ei;return m(l)}function jn(l){if(!l)return l===0?l:0;if(l=Mr(l),l===G||l===-G){var f=l<0?-1:1;return f*Q}return l===l?l:0}function je(l){var f=jn(l),m=f%1;return f===f?m?f-m:f:0}function MS(l){return l?To(je(l),0,U):0}function Mr(l){if(typeof l=="number")return l;if(mr(l))return z;if(wt(l)){var f=typeof l.valueOf=="function"?l.valueOf():l;l=wt(f)?f+"":f}if(typeof l!="string")return l===0?l:+l;l=Q1(l);var m=Xd.test(l);return m||Jd.test(l)?MF(l.slice(2),m?2:8):Yd.test(l)?z:+l}function DS(l){return dn(l,or(l))}function wV(l){return l?To(je(l),-W,W):l===0?l:0}function Ze(l){return l==null?"":gr(l)}var xV=yi(function(l,f){if(Ma(f)||nr(f)){dn(f,jt(f),l);return}for(var m in f)nt.call(f,m)&&Ra(l,m,f[m])}),jS=yi(function(l,f){dn(f,or(f),l)}),oc=yi(function(l,f,m,I){dn(f,or(f),l,I)}),_V=yi(function(l,f,m,I){dn(f,jt(f),l,I)}),EV=kn(If);function SV(l,f){var m=bi(l);return f==null?m:hE(m,f)}var OV=Be(function(l,f){l=ut(l);var m=-1,I=f.length,k=I>2?f[2]:r;for(k&&Zt(f[0],f[1],k)&&(I=1);++m<I;)for(var F=f[m],X=or(F),J=-1,ae=X.length;++J<ae;){var ge=X[J],me=l[ge];(me===r||Yr(me,vi[ge])&&!nt.call(l,ge))&&(l[ge]=F[ge])}return l}),CV=Be(function(l){return l.push(r,QE),hr(qS,r,l)});function IV(l,f){return Y1(l,Pe(f,3),un)}function RV(l,f){return Y1(l,Pe(f,3),Nf)}function NV(l,f){return l==null?l:Rf(l,Pe(f,3),or)}function PV(l,f){return l==null?l:yE(l,Pe(f,3),or)}function TV(l,f){return l&&un(l,Pe(f,3))}function AV(l,f){return l&&Nf(l,Pe(f,3))}function kV(l){return l==null?[]:zl(l,jt(l))}function MV(l){return l==null?[]:zl(l,or(l))}function sp(l,f,m){var I=l==null?r:Ao(l,f);return I===r?m:I}function DV(l,f){return l!=null&&rS(l,f,o3)}function lp(l,f){return l!=null&&rS(l,f,i3)}var jV=KE(function(l,f,m){f!=null&&typeof f.toString!="function"&&(f=Cl.call(f)),l[f]=m},up(ir)),qV=KE(function(l,f,m){f!=null&&typeof f.toString!="function"&&(f=Cl.call(f)),nt.call(l,f)?l[f].push(m):l[f]=[m]},Pe),LV=Be(Pa);function jt(l){return nr(l)?fE(l):kf(l)}function or(l){return nr(l)?fE(l,!0):v3(l)}function zV(l,f){var m={};return f=Pe(f,3),un(l,function(I,k,F){Tn(m,f(I,k,F),I)}),m}function BV(l,f){var m={};return f=Pe(f,3),un(l,function(I,k,F){Tn(m,k,f(I,k,F))}),m}var FV=yi(function(l,f,m){Bl(l,f,m)}),qS=yi(function(l,f,m,I){Bl(l,f,m,I)}),$V=kn(function(l,f){var m={};if(l==null)return m;var I=!1;f=bt(f,function(F){return F=no(F,l),I||(I=F.length>1),F}),dn(l,Gf(l),m),I&&(m=Tr(m,p|h|v,j3));for(var k=f.length;k--;)zf(m,f[k]);return m});function HV(l,f){return LS(l,tc(Pe(f)))}var VV=kn(function(l,f){return l==null?{}:m3(l,f)});function LS(l,f){if(l==null)return{};var m=bt(Gf(l),function(I){return[I]});return f=Pe(f),NE(l,m,function(I,k){return f(I,k[0])})}function WV(l,f,m){f=no(f,l);var I=-1,k=f.length;for(k||(k=1,l=r);++I<k;){var F=l==null?r:l[fn(f[I])];F===r&&(I=k,F=m),l=Dn(F)?F.call(l):F}return l}function UV(l,f,m){return l==null?l:Aa(l,f,m)}function GV(l,f,m,I){return I=typeof I=="function"?I:r,l==null?l:Aa(l,f,m,I)}var zS=ZE(jt),BS=ZE(or);function KV(l,f,m){var I=De(l),k=I||io(l)||_i(l);if(f=Pe(f,4),m==null){var F=l&&l.constructor;k?m=I?new F:[]:wt(l)?m=Dn(F)?bi(Nl(l)):{}:m={}}return(k?Rr:un)(l,function(X,J,ae){return f(m,X,J,ae)}),m}function YV(l,f){return l==null?!0:zf(l,f)}function XV(l,f,m){return l==null?l:ME(l,f,$f(m))}function ZV(l,f,m,I){return I=typeof I=="function"?I:r,l==null?l:ME(l,f,$f(m),I)}function Ei(l){return l==null?[]:wf(l,jt(l))}function JV(l){return l==null?[]:wf(l,or(l))}function QV(l,f,m){return m===r&&(m=f,f=r),m!==r&&(m=Mr(m),m=m===m?m:0),f!==r&&(f=Mr(f),f=f===f?f:0),To(Mr(l),f,m)}function e6(l,f,m){return f=jn(f),m===r?(m=f,f=0):m=jn(m),l=Mr(l),a3(l,f,m)}function t6(l,f,m){if(m&&typeof m!="boolean"&&Zt(l,f,m)&&(f=m=r),m===r&&(typeof f=="boolean"?(m=f,f=r):typeof l=="boolean"&&(m=l,l=r)),l===r&&f===r?(l=0,f=1):(l=jn(l),f===r?(f=l,l=0):f=jn(f)),l>f){var I=l;l=f,f=I}if(m||l%1||f%1){var k=uE();return Ut(l+k*(f-l+kF("1e-"+((k+"").length-1))),f)}return jf(l,f)}var r6=wi(function(l,f,m){return f=f.toLowerCase(),l+(m?FS(f):f)});function FS(l){return cp(Ze(l).toLowerCase())}function $S(l){return l=Ze(l),l&&l.replace(ef,UF).replace(EF,"")}function n6(l,f,m){l=Ze(l),f=gr(f);var I=l.length;m=m===r?I:To(je(m),0,I);var k=m;return m-=f.length,m>=0&&l.slice(m,k)==f}function o6(l){return l=Ze(l),l&&Qs.test(l)?l.replace(ga,GF):l}function i6(l){return l=Ze(l),l&&ol.test(l)?l.replace(ma,"\\$&"):l}var a6=wi(function(l,f,m){return l+(m?"-":"")+f.toLowerCase()}),s6=wi(function(l,f,m){return l+(m?" ":"")+f.toLowerCase()}),l6=WE("toLowerCase");function c6(l,f,m){l=Ze(l),f=je(f);var I=f?pi(l):0;if(!f||I>=f)return l;var k=(f-I)/2;return Ul(kl(k),m)+l+Ul(Al(k),m)}function u6(l,f,m){l=Ze(l),f=je(f);var I=f?pi(l):0;return f&&I<f?l+Ul(f-I,m):l}function d6(l,f,m){l=Ze(l),f=je(f);var I=f?pi(l):0;return f&&I<f?Ul(f-I,m)+l:l}function f6(l,f,m){return m||f==null?f=0:f&&(f=+f),y$(Ze(l).replace(ba,""),f||0)}function p6(l,f,m){return(m?Zt(l,f,m):f===r)?f=1:f=je(f),qf(Ze(l),f)}function h6(){var l=arguments,f=Ze(l[0]);return l.length<3?f:f.replace(l[1],l[2])}var v6=wi(function(l,f,m){return l+(m?"_":"")+f.toLowerCase()});function g6(l,f,m){return m&&typeof m!="number"&&Zt(l,f,m)&&(f=m=r),m=m===r?U:m>>>0,m?(l=Ze(l),l&&(typeof f=="string"||f!=null&&!ap(f))&&(f=gr(f),!f&&fi(l))?oo(Gr(l),0,m):l.split(f,m)):[]}var m6=wi(function(l,f,m){return l+(m?" ":"")+cp(f)});function b6(l,f,m){return l=Ze(l),m=m==null?0:To(je(m),0,l.length),f=gr(f),l.slice(m,m+f.length)==f}function y6(l,f,m){var I=L.templateSettings;m&&Zt(l,f,m)&&(f=r),l=Ze(l),f=oc({},f,I,JE);var k=oc({},f.imports,I.imports,JE),F=jt(k),X=wf(k,F),J,ae,ge=0,me=f.interpolate||si,be="__p += '",_e=_f((f.escape||si).source+"|"+me.source+"|"+(me===tl?Kd:si).source+"|"+(f.evaluate||si).source+"|$","g"),Ne="//# sourceURL="+(nt.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++RF+"]")+`
65
65
  `;l.replace(_e,function(Ae,$e,We,br,Jt,yr){return We||(We=br),be+=l.slice(ge,yr).replace(ll,KF),$e&&(J=!0,be+=`' +
66
66
  __e(`+$e+`) +
67
67
  '`),Jt&&(ae=!0,be+=`';
@@ -78,9 +78,9 @@ __p += '`),We&&(be+=`' +
78
78
  function print() { __p += __j.call(arguments, '') }
79
79
  `:`;
80
80
  `)+be+`return __p
81
- }`;var Le=VS(function(){return Ye(F,Ne+"return "+be).apply(r,X)});if(Le.source=be,ip(Le))throw Le;return Le}function w6(l){return Ze(l).toLowerCase()}function x6(l){return Ze(l).toUpperCase()}function _6(l,f,m){if(l=Ze(l),l&&(m||f===r))return Q1(l);if(!l||!(f=gr(f)))return l;var I=Gr(l),k=Gr(f),F=eE(I,k),X=tE(I,k)+1;return oo(I,F,X).join("")}function E6(l,f,m){if(l=Ze(l),l&&(m||f===r))return l.slice(0,nE(l)+1);if(!l||!(f=gr(f)))return l;var I=Gr(l),k=tE(I,Gr(f))+1;return oo(I,0,k).join("")}function S6(l,f,m){if(l=Ze(l),l&&(m||f===r))return l.replace(ma,"");if(!l||!(f=gr(f)))return l;var I=Gr(l),k=eE(I,Gr(f));return oo(I,k).join("")}function O6(l,f){var m=D,I=B;if(wt(f)){var k="separator"in f?f.separator:k;m="length"in f?je(f.length):m,I="omission"in f?gr(f.omission):I}l=Ze(l);var F=l.length;if(fi(l)){var X=Gr(l);F=X.length}if(m>=F)return l;var J=m-pi(I);if(J<1)return I;var ae=X?oo(X,0,J).join(""):l.slice(0,J);if(k===r)return ae+I;if(X&&(J+=ae.length-J),ap(k)){if(l.slice(J).search(k)){var ge,me=ae;for(k.global||(k=_f(k.source,Ze(sl.exec(k))+"g")),k.lastIndex=0;ge=k.exec(me);)var be=ge.index;ae=ae.slice(0,be===r?J:be)}}else if(l.indexOf(gr(k),J)!=J){var _e=ae.lastIndexOf(k);_e>-1&&(ae=ae.slice(0,_e))}return ae+I}function C6(l){return l=Ze(l),l&&Bd.test(l)?l.replace(Js,t$):l}var I6=wi(function(l,f,m){return l+(m?" ":"")+f.toUpperCase()}),cp=WE("toUpperCase");function HS(l,f,m){return l=Ze(l),f=m?r:f,f===r?XF(l)?o$(l):FF(l):l.match(f)||[]}var VS=Be(function(l,f){try{return hr(l,r,f)}catch(m){return ip(m)?m:new Me(m)}}),R6=kn(function(l,f){return Rr(f,function(m){m=fn(m),Tn(l,m,np(l[m],l))}),l});function N6(l){var f=l==null?0:l.length,m=Pe();return l=f?bt(l,function(I){if(typeof I[1]!="function")throw new Nr(a);return[m(I[0]),I[1]]}):[],Be(function(I){for(var k=-1;++k<f;){var F=l[k];if(hr(F[0],this,I))return hr(F[1],this,I)}})}function P6(l){return t3(Tr(l,p))}function up(l){return function(){return l}}function T6(l,f){return l==null||l!==l?f:l}var A6=GE(),k6=GE(!0);function ir(l){return l}function dp(l){return EE(typeof l=="function"?l:Tr(l,p))}function M6(l){return OE(Tr(l,p))}function D6(l,f){return CE(l,Tr(f,p))}var j6=Be(function(l,f){return function(m){return Na(m,l,f)}}),q6=Be(function(l,f){return function(m){return Na(l,m,f)}});function fp(l,f,m){var I=jt(f),k=zl(f,I);m==null&&!(wt(f)&&(k.length||!I.length))&&(m=f,f=l,l=this,k=zl(f,jt(f)));var F=!(wt(m)&&"chain"in m)||!!m.chain,X=Dn(l);return Rr(k,function(J){var ae=f[J];l[J]=ae,X&&(l.prototype[J]=function(){var ge=this.__chain__;if(F||ge){var me=l(this.__wrapped__),be=me.__actions__=rr(this.__actions__);return be.push({func:ae,args:arguments,thisArg:l}),me.__chain__=ge,me}return ae.apply(l,Jn([this.value()],arguments))})}),l}function L6(){return zt._===this&&(zt._=u$),this}function pp(){}function z6(l){return l=je(l),Be(function(f){return IE(f,l)})}var B6=Vf(bt),F6=Vf(K1),$6=Vf(vf);function WS(l){return Zf(l)?gf(fn(l)):b3(l)}function H6(l){return function(f){return l==null?r:Ao(l,f)}}var V6=YE(),W6=YE(!0);function hp(){return[]}function vp(){return!1}function U6(){return{}}function G6(){return""}function K6(){return!0}function Y6(l,f){if(l=je(l),l<1||l>W)return[];var m=U,I=Ut(l,U);f=Pe(f),l-=U;for(var k=yf(I,f);++m<l;)f(m);return k}function X6(l){return De(l)?bt(l,fn):mr(l)?[l]:rr(dS(Ze(l)))}function Z6(l){var f=++l$;return Ze(l)+f}var J6=Wl(function(l,f){return l+f},0),Q6=Wf("ceil"),eW=Wl(function(l,f){return l/f},1),tW=Wf("floor");function rW(l){return l&&l.length?Ll(l,ir,Pf):r}function nW(l,f){return l&&l.length?Ll(l,Pe(f,2),Pf):r}function oW(l){return Z1(l,ir)}function iW(l,f){return Z1(l,Pe(f,2))}function aW(l){return l&&l.length?Ll(l,ir,Mf):r}function sW(l,f){return l&&l.length?Ll(l,Pe(f,2),Mf):r}var lW=Wl(function(l,f){return l*f},1),cW=Wf("round"),uW=Wl(function(l,f){return l-f},0);function dW(l){return l&&l.length?bf(l,ir):0}function fW(l,f){return l&&l.length?bf(l,Pe(f,2)):0}return L.after=MH,L.ary=_S,L.assign=xV,L.assignIn=jS,L.assignInWith=oc,L.assignWith=_V,L.at=EV,L.before=ES,L.bind=np,L.bindAll=R6,L.bindKey=SS,L.castArray=UH,L.chain=yS,L.chunk=t4,L.compact=r4,L.concat=n4,L.cond=N6,L.conforms=P6,L.constant=up,L.countBy=dH,L.create=SV,L.curry=OS,L.curryRight=CS,L.debounce=IS,L.defaults=OV,L.defaultsDeep=CV,L.defer=DH,L.delay=jH,L.difference=o4,L.differenceBy=i4,L.differenceWith=a4,L.drop=s4,L.dropRight=l4,L.dropRightWhile=c4,L.dropWhile=u4,L.fill=d4,L.filter=pH,L.flatMap=gH,L.flatMapDeep=mH,L.flatMapDepth=bH,L.flatten=vS,L.flattenDeep=f4,L.flattenDepth=p4,L.flip=qH,L.flow=A6,L.flowRight=k6,L.fromPairs=h4,L.functions=kV,L.functionsIn=MV,L.groupBy=yH,L.initial=g4,L.intersection=m4,L.intersectionBy=b4,L.intersectionWith=y4,L.invert=jV,L.invertBy=qV,L.invokeMap=xH,L.iteratee=dp,L.keyBy=_H,L.keys=jt,L.keysIn=or,L.map=Jl,L.mapKeys=zV,L.mapValues=BV,L.matches=M6,L.matchesProperty=D6,L.memoize=ec,L.merge=FV,L.mergeWith=qS,L.method=j6,L.methodOf=q6,L.mixin=fp,L.negate=tc,L.nthArg=z6,L.omit=$V,L.omitBy=HV,L.once=LH,L.orderBy=EH,L.over=B6,L.overArgs=zH,L.overEvery=F6,L.overSome=$6,L.partial=op,L.partialRight=RS,L.partition=SH,L.pick=VV,L.pickBy=LS,L.property=WS,L.propertyOf=H6,L.pull=E4,L.pullAll=mS,L.pullAllBy=S4,L.pullAllWith=O4,L.pullAt=C4,L.range=V6,L.rangeRight=W6,L.rearg=BH,L.reject=IH,L.remove=I4,L.rest=FH,L.reverse=tp,L.sampleSize=NH,L.set=UV,L.setWith=GV,L.shuffle=PH,L.slice=R4,L.sortBy=kH,L.sortedUniq=D4,L.sortedUniqBy=j4,L.split=g6,L.spread=$H,L.tail=q4,L.take=L4,L.takeRight=z4,L.takeRightWhile=B4,L.takeWhile=F4,L.tap=rH,L.throttle=HH,L.thru=Zl,L.toArray=kS,L.toPairs=zS,L.toPairsIn=BS,L.toPath=X6,L.toPlainObject=DS,L.transform=KV,L.unary=VH,L.union=$4,L.unionBy=H4,L.unionWith=V4,L.uniq=W4,L.uniqBy=U4,L.uniqWith=G4,L.unset=YV,L.unzip=rp,L.unzipWith=bS,L.update=XV,L.updateWith=ZV,L.values=Ei,L.valuesIn=JV,L.without=K4,L.words=HS,L.wrap=WH,L.xor=Y4,L.xorBy=X4,L.xorWith=Z4,L.zip=J4,L.zipObject=Q4,L.zipObjectDeep=eH,L.zipWith=tH,L.entries=zS,L.entriesIn=BS,L.extend=jS,L.extendWith=oc,fp(L,L),L.add=J6,L.attempt=VS,L.camelCase=r6,L.capitalize=FS,L.ceil=Q6,L.clamp=QV,L.clone=GH,L.cloneDeep=YH,L.cloneDeepWith=XH,L.cloneWith=KH,L.conformsTo=ZH,L.deburr=$S,L.defaultTo=T6,L.divide=eW,L.endsWith=n6,L.eq=Yr,L.escape=o6,L.escapeRegExp=i6,L.every=fH,L.find=hH,L.findIndex=pS,L.findKey=IV,L.findLast=vH,L.findLastIndex=hS,L.findLastKey=RV,L.floor=tW,L.forEach=wS,L.forEachRight=xS,L.forIn=NV,L.forInRight=PV,L.forOwn=TV,L.forOwnRight=AV,L.get=sp,L.gt=JH,L.gte=QH,L.has=DV,L.hasIn=lp,L.head=gS,L.identity=ir,L.includes=wH,L.indexOf=v4,L.inRange=e6,L.invoke=LV,L.isArguments=Do,L.isArray=De,L.isArrayBuffer=eV,L.isArrayLike=nr,L.isArrayLikeObject=Et,L.isBoolean=tV,L.isBuffer=io,L.isDate=rV,L.isElement=nV,L.isEmpty=oV,L.isEqual=iV,L.isEqualWith=aV,L.isError=ip,L.isFinite=sV,L.isFunction=Dn,L.isInteger=NS,L.isLength=rc,L.isMap=PS,L.isMatch=lV,L.isMatchWith=cV,L.isNaN=uV,L.isNative=dV,L.isNil=pV,L.isNull=fV,L.isNumber=TS,L.isObject=wt,L.isObjectLike=xt,L.isPlainObject=Da,L.isRegExp=ap,L.isSafeInteger=hV,L.isSet=AS,L.isString=nc,L.isSymbol=mr,L.isTypedArray=_i,L.isUndefined=vV,L.isWeakMap=gV,L.isWeakSet=mV,L.join=w4,L.kebabCase=a6,L.last=kr,L.lastIndexOf=x4,L.lowerCase=s6,L.lowerFirst=l6,L.lt=bV,L.lte=yV,L.max=rW,L.maxBy=nW,L.mean=oW,L.meanBy=iW,L.min=aW,L.minBy=sW,L.stubArray=hp,L.stubFalse=vp,L.stubObject=U6,L.stubString=G6,L.stubTrue=K6,L.multiply=lW,L.nth=_4,L.noConflict=L6,L.noop=pp,L.now=Ql,L.pad=c6,L.padEnd=u6,L.padStart=d6,L.parseInt=f6,L.random=t6,L.reduce=OH,L.reduceRight=CH,L.repeat=p6,L.replace=h6,L.result=WV,L.round=cW,L.runInContext=ne,L.sample=RH,L.size=TH,L.snakeCase=v6,L.some=AH,L.sortedIndex=N4,L.sortedIndexBy=P4,L.sortedIndexOf=T4,L.sortedLastIndex=A4,L.sortedLastIndexBy=k4,L.sortedLastIndexOf=M4,L.startCase=m6,L.startsWith=b6,L.subtract=uW,L.sum=dW,L.sumBy=fW,L.template=y6,L.times=Y6,L.toFinite=jn,L.toInteger=je,L.toLength=MS,L.toLower=w6,L.toNumber=Mr,L.toSafeInteger=wV,L.toString=Ze,L.toUpper=x6,L.trim=_6,L.trimEnd=E6,L.trimStart=S6,L.truncate=O6,L.unescape=C6,L.uniqueId=Z6,L.upperCase=I6,L.upperFirst=cp,L.each=wS,L.eachRight=xS,L.first=gS,fp(L,(function(){var l={};return un(L,function(f,m){nt.call(L.prototype,m)||(l[m]=f)}),l})(),{chain:!1}),L.VERSION=n,Rr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){L[l].placeholder=L}),Rr(["drop","take"],function(l,f){Ve.prototype[l]=function(m){m=m===r?1:kt(je(m),0);var I=this.__filtered__&&!f?new Ve(this):this.clone();return I.__filtered__?I.__takeCount__=Ut(m,I.__takeCount__):I.__views__.push({size:Ut(m,U),type:l+(I.__dir__<0?"Right":"")}),I},Ve.prototype[l+"Right"]=function(m){return this.reverse()[l](m).reverse()}}),Rr(["filter","map","takeWhile"],function(l,f){var m=f+1,I=m==P||m==q;Ve.prototype[l]=function(k){var F=this.clone();return F.__iteratees__.push({iteratee:Pe(k,3),type:m}),F.__filtered__=F.__filtered__||I,F}}),Rr(["head","last"],function(l,f){var m="take"+(f?"Right":"");Ve.prototype[l]=function(){return this[m](1).value()[0]}}),Rr(["initial","tail"],function(l,f){var m="drop"+(f?"":"Right");Ve.prototype[l]=function(){return this.__filtered__?new Ve(this):this[m](1)}}),Ve.prototype.compact=function(){return this.filter(ir)},Ve.prototype.find=function(l){return this.filter(l).head()},Ve.prototype.findLast=function(l){return this.reverse().find(l)},Ve.prototype.invokeMap=Be(function(l,f){return typeof l=="function"?new Ve(this):this.map(function(m){return Na(m,l,f)})}),Ve.prototype.reject=function(l){return this.filter(tc(Pe(l)))},Ve.prototype.slice=function(l,f){l=je(l);var m=this;return m.__filtered__&&(l>0||f<0)?new Ve(m):(l<0?m=m.takeRight(-l):l&&(m=m.drop(l)),f!==r&&(f=je(f),m=f<0?m.dropRight(-f):m.take(f-l)),m)},Ve.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},Ve.prototype.toArray=function(){return this.take(U)},un(Ve.prototype,function(l,f){var m=/^(?:filter|find|map|reject)|While$/.test(f),I=/^(?:head|last)$/.test(f),k=L[I?"take"+(f=="last"?"Right":""):f],F=I||/^find/.test(f);k&&(L.prototype[f]=function(){var X=this.__wrapped__,J=I?[1]:arguments,ae=X instanceof Ve,ge=J[0],me=ae||De(X),be=function($e){var We=k.apply(L,Jn([$e],J));return I&&_e?We[0]:We};me&&m&&typeof ge=="function"&&ge.length!=1&&(ae=me=!1);var _e=this.__chain__,Ne=!!this.__actions__.length,Te=F&&!_e,Le=ae&&!Ne;if(!F&&me){X=Le?X:new Ve(this);var Ae=l.apply(X,J);return Ae.__actions__.push({func:Zl,args:[be],thisArg:r}),new Pr(Ae,_e)}return Te&&Le?l.apply(this,J):(Ae=this.thru(be),Te?I?Ae.value()[0]:Ae.value():Ae)})}),Rr(["pop","push","shift","sort","splice","unshift"],function(l){var f=El[l],m=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",I=/^(?:pop|shift)$/.test(l);L.prototype[l]=function(){var k=arguments;if(I&&!this.__chain__){var F=this.value();return f.apply(De(F)?F:[],k)}return this[m](function(X){return f.apply(De(X)?X:[],k)})}}),un(Ve.prototype,function(l,f){var m=L[f];if(m){var I=m.name+"";nt.call(mi,I)||(mi[I]=[]),mi[I].push({name:f,func:m})}}),mi[Vl(r,x).name]=[{name:"wrapper",func:r}],Ve.prototype.clone=C$,Ve.prototype.reverse=I$,Ve.prototype.value=R$,L.prototype.at=nH,L.prototype.chain=oH,L.prototype.commit=iH,L.prototype.next=aH,L.prototype.plant=lH,L.prototype.reverse=cH,L.prototype.toJSON=L.prototype.valueOf=L.prototype.value=uH,L.prototype.first=L.prototype.head,_a&&(L.prototype[_a]=sH),L}),hi=i$();Io?((Io.exports=hi)._=hi,df._=hi):zt._=hi}).call(Fte)})(hs,hs.exports)),hs.exports}var Vs=$te();function Hte(){const e=Ue.useAppDispatch(),t=Ue.useAppSelector(Ue.selectRoles),r=Ue.useAppSelector(Ue.selectPrivileges),n=Ue.useAppSelector(Ue.selectRolesFlags),o=Ue.useAppSelector(Ue.selectRolesAndPrivileges,(y,g)=>Vs.isEqual(y,g)),i=Ue.useAppSelector(Ue.selectCatalog),a=Ue.useAppSelector(Ue.selectQodly),s=Ue.useAppSelector(Ue.selectSelectedTab),c=Ue.useAppSelector(Ue.selectForceLogin),u=Ue.useAppSelector(Ue.selectRestrictedByDefault),d=Ue.useAppSelector(Ue.selectGuestPrivilege),p=Ue.useAppSelector(Ue.selectCatalogMethods),h=Ue.useAppSelector(Ue.selectDataclasses),v=Ue.useAppSelector(Ue.selectSingletons);return{getRoles:()=>t,getPrivileges:()=>r,getRolesFlags:()=>n,getRolesAndPrivileges:()=>o,getCatalog:()=>i,getQodly:()=>a,getSelectedTab:()=>s,getForceLogin:()=>c??!1,getRestrictedByDefault:()=>u??!1,actions:{updateRoles:y=>{e(Ue.updateRoles(y))},updatePrivileges:y=>{e(Ue.updatePrivileges(y))},setRolesContent:y=>{e(Ue.setRolesContent(y))},toggleTab:y=>{e(Ue.toggleTab(y))},toggleForceLogin:y=>{e(Ue.toggleForceLogin(y))},toggleRestrictedByDefault:y=>{e(Ue.toggleRestrictedByDefault(y))},setTabFlags:(y,g)=>{e(Ue.setTabFlags({path:y,flags:g}))},openModal:async y=>await e(Ue.openModal(y)).unwrap()},getGuestPrivilege:()=>d,getCatalogMethods:()=>p,getDataclasses:()=>h,getSingletons:()=>v}}const W5=T.createContext(null),U5=({children:e,adapter:t})=>C.jsx(W5.Provider,{value:t,children:e});function Ht(){const e=T.useContext(W5);if(!e)throw new Error("useEditorStateAdapter must be used within an EditorStateAdapterProvider");return e}var Tx=function(e,t){return Tx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},Tx(e,t)};function Ws(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Tx(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Eu=function(){return Eu=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Eu.apply(this,arguments)};function Ax(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function kx(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function Mx(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}function _n(e){return typeof e=="function"}function G5(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var fy=G5(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
81
+ }`;var Le=VS(function(){return Ye(F,Ne+"return "+be).apply(r,X)});if(Le.source=be,ip(Le))throw Le;return Le}function w6(l){return Ze(l).toLowerCase()}function x6(l){return Ze(l).toUpperCase()}function _6(l,f,m){if(l=Ze(l),l&&(m||f===r))return Q1(l);if(!l||!(f=gr(f)))return l;var I=Gr(l),k=Gr(f),F=eE(I,k),X=tE(I,k)+1;return oo(I,F,X).join("")}function E6(l,f,m){if(l=Ze(l),l&&(m||f===r))return l.slice(0,nE(l)+1);if(!l||!(f=gr(f)))return l;var I=Gr(l),k=tE(I,Gr(f))+1;return oo(I,0,k).join("")}function S6(l,f,m){if(l=Ze(l),l&&(m||f===r))return l.replace(ba,"");if(!l||!(f=gr(f)))return l;var I=Gr(l),k=eE(I,Gr(f));return oo(I,k).join("")}function O6(l,f){var m=D,I=B;if(wt(f)){var k="separator"in f?f.separator:k;m="length"in f?je(f.length):m,I="omission"in f?gr(f.omission):I}l=Ze(l);var F=l.length;if(fi(l)){var X=Gr(l);F=X.length}if(m>=F)return l;var J=m-pi(I);if(J<1)return I;var ae=X?oo(X,0,J).join(""):l.slice(0,J);if(k===r)return ae+I;if(X&&(J+=ae.length-J),ap(k)){if(l.slice(J).search(k)){var ge,me=ae;for(k.global||(k=_f(k.source,Ze(sl.exec(k))+"g")),k.lastIndex=0;ge=k.exec(me);)var be=ge.index;ae=ae.slice(0,be===r?J:be)}}else if(l.indexOf(gr(k),J)!=J){var _e=ae.lastIndexOf(k);_e>-1&&(ae=ae.slice(0,_e))}return ae+I}function C6(l){return l=Ze(l),l&&Bd.test(l)?l.replace(Js,t$):l}var I6=wi(function(l,f,m){return l+(m?" ":"")+f.toUpperCase()}),cp=WE("toUpperCase");function HS(l,f,m){return l=Ze(l),f=m?r:f,f===r?XF(l)?o$(l):FF(l):l.match(f)||[]}var VS=Be(function(l,f){try{return hr(l,r,f)}catch(m){return ip(m)?m:new Me(m)}}),R6=kn(function(l,f){return Rr(f,function(m){m=fn(m),Tn(l,m,np(l[m],l))}),l});function N6(l){var f=l==null?0:l.length,m=Pe();return l=f?bt(l,function(I){if(typeof I[1]!="function")throw new Nr(a);return[m(I[0]),I[1]]}):[],Be(function(I){for(var k=-1;++k<f;){var F=l[k];if(hr(F[0],this,I))return hr(F[1],this,I)}})}function P6(l){return t3(Tr(l,p))}function up(l){return function(){return l}}function T6(l,f){return l==null||l!==l?f:l}var A6=GE(),k6=GE(!0);function ir(l){return l}function dp(l){return EE(typeof l=="function"?l:Tr(l,p))}function M6(l){return OE(Tr(l,p))}function D6(l,f){return CE(l,Tr(f,p))}var j6=Be(function(l,f){return function(m){return Pa(m,l,f)}}),q6=Be(function(l,f){return function(m){return Pa(l,m,f)}});function fp(l,f,m){var I=jt(f),k=zl(f,I);m==null&&!(wt(f)&&(k.length||!I.length))&&(m=f,f=l,l=this,k=zl(f,jt(f)));var F=!(wt(m)&&"chain"in m)||!!m.chain,X=Dn(l);return Rr(k,function(J){var ae=f[J];l[J]=ae,X&&(l.prototype[J]=function(){var ge=this.__chain__;if(F||ge){var me=l(this.__wrapped__),be=me.__actions__=rr(this.__actions__);return be.push({func:ae,args:arguments,thisArg:l}),me.__chain__=ge,me}return ae.apply(l,Jn([this.value()],arguments))})}),l}function L6(){return zt._===this&&(zt._=u$),this}function pp(){}function z6(l){return l=je(l),Be(function(f){return IE(f,l)})}var B6=Vf(bt),F6=Vf(K1),$6=Vf(vf);function WS(l){return Zf(l)?gf(fn(l)):b3(l)}function H6(l){return function(f){return l==null?r:Ao(l,f)}}var V6=YE(),W6=YE(!0);function hp(){return[]}function vp(){return!1}function U6(){return{}}function G6(){return""}function K6(){return!0}function Y6(l,f){if(l=je(l),l<1||l>W)return[];var m=U,I=Ut(l,U);f=Pe(f),l-=U;for(var k=yf(I,f);++m<l;)f(m);return k}function X6(l){return De(l)?bt(l,fn):mr(l)?[l]:rr(dS(Ze(l)))}function Z6(l){var f=++l$;return Ze(l)+f}var J6=Wl(function(l,f){return l+f},0),Q6=Wf("ceil"),eW=Wl(function(l,f){return l/f},1),tW=Wf("floor");function rW(l){return l&&l.length?Ll(l,ir,Pf):r}function nW(l,f){return l&&l.length?Ll(l,Pe(f,2),Pf):r}function oW(l){return Z1(l,ir)}function iW(l,f){return Z1(l,Pe(f,2))}function aW(l){return l&&l.length?Ll(l,ir,Mf):r}function sW(l,f){return l&&l.length?Ll(l,Pe(f,2),Mf):r}var lW=Wl(function(l,f){return l*f},1),cW=Wf("round"),uW=Wl(function(l,f){return l-f},0);function dW(l){return l&&l.length?bf(l,ir):0}function fW(l,f){return l&&l.length?bf(l,Pe(f,2)):0}return L.after=MH,L.ary=_S,L.assign=xV,L.assignIn=jS,L.assignInWith=oc,L.assignWith=_V,L.at=EV,L.before=ES,L.bind=np,L.bindAll=R6,L.bindKey=SS,L.castArray=UH,L.chain=yS,L.chunk=t4,L.compact=r4,L.concat=n4,L.cond=N6,L.conforms=P6,L.constant=up,L.countBy=dH,L.create=SV,L.curry=OS,L.curryRight=CS,L.debounce=IS,L.defaults=OV,L.defaultsDeep=CV,L.defer=DH,L.delay=jH,L.difference=o4,L.differenceBy=i4,L.differenceWith=a4,L.drop=s4,L.dropRight=l4,L.dropRightWhile=c4,L.dropWhile=u4,L.fill=d4,L.filter=pH,L.flatMap=gH,L.flatMapDeep=mH,L.flatMapDepth=bH,L.flatten=vS,L.flattenDeep=f4,L.flattenDepth=p4,L.flip=qH,L.flow=A6,L.flowRight=k6,L.fromPairs=h4,L.functions=kV,L.functionsIn=MV,L.groupBy=yH,L.initial=g4,L.intersection=m4,L.intersectionBy=b4,L.intersectionWith=y4,L.invert=jV,L.invertBy=qV,L.invokeMap=xH,L.iteratee=dp,L.keyBy=_H,L.keys=jt,L.keysIn=or,L.map=Jl,L.mapKeys=zV,L.mapValues=BV,L.matches=M6,L.matchesProperty=D6,L.memoize=ec,L.merge=FV,L.mergeWith=qS,L.method=j6,L.methodOf=q6,L.mixin=fp,L.negate=tc,L.nthArg=z6,L.omit=$V,L.omitBy=HV,L.once=LH,L.orderBy=EH,L.over=B6,L.overArgs=zH,L.overEvery=F6,L.overSome=$6,L.partial=op,L.partialRight=RS,L.partition=SH,L.pick=VV,L.pickBy=LS,L.property=WS,L.propertyOf=H6,L.pull=E4,L.pullAll=mS,L.pullAllBy=S4,L.pullAllWith=O4,L.pullAt=C4,L.range=V6,L.rangeRight=W6,L.rearg=BH,L.reject=IH,L.remove=I4,L.rest=FH,L.reverse=tp,L.sampleSize=NH,L.set=UV,L.setWith=GV,L.shuffle=PH,L.slice=R4,L.sortBy=kH,L.sortedUniq=D4,L.sortedUniqBy=j4,L.split=g6,L.spread=$H,L.tail=q4,L.take=L4,L.takeRight=z4,L.takeRightWhile=B4,L.takeWhile=F4,L.tap=rH,L.throttle=HH,L.thru=Zl,L.toArray=kS,L.toPairs=zS,L.toPairsIn=BS,L.toPath=X6,L.toPlainObject=DS,L.transform=KV,L.unary=VH,L.union=$4,L.unionBy=H4,L.unionWith=V4,L.uniq=W4,L.uniqBy=U4,L.uniqWith=G4,L.unset=YV,L.unzip=rp,L.unzipWith=bS,L.update=XV,L.updateWith=ZV,L.values=Ei,L.valuesIn=JV,L.without=K4,L.words=HS,L.wrap=WH,L.xor=Y4,L.xorBy=X4,L.xorWith=Z4,L.zip=J4,L.zipObject=Q4,L.zipObjectDeep=eH,L.zipWith=tH,L.entries=zS,L.entriesIn=BS,L.extend=jS,L.extendWith=oc,fp(L,L),L.add=J6,L.attempt=VS,L.camelCase=r6,L.capitalize=FS,L.ceil=Q6,L.clamp=QV,L.clone=GH,L.cloneDeep=YH,L.cloneDeepWith=XH,L.cloneWith=KH,L.conformsTo=ZH,L.deburr=$S,L.defaultTo=T6,L.divide=eW,L.endsWith=n6,L.eq=Yr,L.escape=o6,L.escapeRegExp=i6,L.every=fH,L.find=hH,L.findIndex=pS,L.findKey=IV,L.findLast=vH,L.findLastIndex=hS,L.findLastKey=RV,L.floor=tW,L.forEach=wS,L.forEachRight=xS,L.forIn=NV,L.forInRight=PV,L.forOwn=TV,L.forOwnRight=AV,L.get=sp,L.gt=JH,L.gte=QH,L.has=DV,L.hasIn=lp,L.head=gS,L.identity=ir,L.includes=wH,L.indexOf=v4,L.inRange=e6,L.invoke=LV,L.isArguments=Do,L.isArray=De,L.isArrayBuffer=eV,L.isArrayLike=nr,L.isArrayLikeObject=Et,L.isBoolean=tV,L.isBuffer=io,L.isDate=rV,L.isElement=nV,L.isEmpty=oV,L.isEqual=iV,L.isEqualWith=aV,L.isError=ip,L.isFinite=sV,L.isFunction=Dn,L.isInteger=NS,L.isLength=rc,L.isMap=PS,L.isMatch=lV,L.isMatchWith=cV,L.isNaN=uV,L.isNative=dV,L.isNil=pV,L.isNull=fV,L.isNumber=TS,L.isObject=wt,L.isObjectLike=xt,L.isPlainObject=ja,L.isRegExp=ap,L.isSafeInteger=hV,L.isSet=AS,L.isString=nc,L.isSymbol=mr,L.isTypedArray=_i,L.isUndefined=vV,L.isWeakMap=gV,L.isWeakSet=mV,L.join=w4,L.kebabCase=a6,L.last=kr,L.lastIndexOf=x4,L.lowerCase=s6,L.lowerFirst=l6,L.lt=bV,L.lte=yV,L.max=rW,L.maxBy=nW,L.mean=oW,L.meanBy=iW,L.min=aW,L.minBy=sW,L.stubArray=hp,L.stubFalse=vp,L.stubObject=U6,L.stubString=G6,L.stubTrue=K6,L.multiply=lW,L.nth=_4,L.noConflict=L6,L.noop=pp,L.now=Ql,L.pad=c6,L.padEnd=u6,L.padStart=d6,L.parseInt=f6,L.random=t6,L.reduce=OH,L.reduceRight=CH,L.repeat=p6,L.replace=h6,L.result=WV,L.round=cW,L.runInContext=ne,L.sample=RH,L.size=TH,L.snakeCase=v6,L.some=AH,L.sortedIndex=N4,L.sortedIndexBy=P4,L.sortedIndexOf=T4,L.sortedLastIndex=A4,L.sortedLastIndexBy=k4,L.sortedLastIndexOf=M4,L.startCase=m6,L.startsWith=b6,L.subtract=uW,L.sum=dW,L.sumBy=fW,L.template=y6,L.times=Y6,L.toFinite=jn,L.toInteger=je,L.toLength=MS,L.toLower=w6,L.toNumber=Mr,L.toSafeInteger=wV,L.toString=Ze,L.toUpper=x6,L.trim=_6,L.trimEnd=E6,L.trimStart=S6,L.truncate=O6,L.unescape=C6,L.uniqueId=Z6,L.upperCase=I6,L.upperFirst=cp,L.each=wS,L.eachRight=xS,L.first=gS,fp(L,(function(){var l={};return un(L,function(f,m){nt.call(L.prototype,m)||(l[m]=f)}),l})(),{chain:!1}),L.VERSION=n,Rr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){L[l].placeholder=L}),Rr(["drop","take"],function(l,f){Ve.prototype[l]=function(m){m=m===r?1:kt(je(m),0);var I=this.__filtered__&&!f?new Ve(this):this.clone();return I.__filtered__?I.__takeCount__=Ut(m,I.__takeCount__):I.__views__.push({size:Ut(m,U),type:l+(I.__dir__<0?"Right":"")}),I},Ve.prototype[l+"Right"]=function(m){return this.reverse()[l](m).reverse()}}),Rr(["filter","map","takeWhile"],function(l,f){var m=f+1,I=m==P||m==q;Ve.prototype[l]=function(k){var F=this.clone();return F.__iteratees__.push({iteratee:Pe(k,3),type:m}),F.__filtered__=F.__filtered__||I,F}}),Rr(["head","last"],function(l,f){var m="take"+(f?"Right":"");Ve.prototype[l]=function(){return this[m](1).value()[0]}}),Rr(["initial","tail"],function(l,f){var m="drop"+(f?"":"Right");Ve.prototype[l]=function(){return this.__filtered__?new Ve(this):this[m](1)}}),Ve.prototype.compact=function(){return this.filter(ir)},Ve.prototype.find=function(l){return this.filter(l).head()},Ve.prototype.findLast=function(l){return this.reverse().find(l)},Ve.prototype.invokeMap=Be(function(l,f){return typeof l=="function"?new Ve(this):this.map(function(m){return Pa(m,l,f)})}),Ve.prototype.reject=function(l){return this.filter(tc(Pe(l)))},Ve.prototype.slice=function(l,f){l=je(l);var m=this;return m.__filtered__&&(l>0||f<0)?new Ve(m):(l<0?m=m.takeRight(-l):l&&(m=m.drop(l)),f!==r&&(f=je(f),m=f<0?m.dropRight(-f):m.take(f-l)),m)},Ve.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},Ve.prototype.toArray=function(){return this.take(U)},un(Ve.prototype,function(l,f){var m=/^(?:filter|find|map|reject)|While$/.test(f),I=/^(?:head|last)$/.test(f),k=L[I?"take"+(f=="last"?"Right":""):f],F=I||/^find/.test(f);k&&(L.prototype[f]=function(){var X=this.__wrapped__,J=I?[1]:arguments,ae=X instanceof Ve,ge=J[0],me=ae||De(X),be=function($e){var We=k.apply(L,Jn([$e],J));return I&&_e?We[0]:We};me&&m&&typeof ge=="function"&&ge.length!=1&&(ae=me=!1);var _e=this.__chain__,Ne=!!this.__actions__.length,Te=F&&!_e,Le=ae&&!Ne;if(!F&&me){X=Le?X:new Ve(this);var Ae=l.apply(X,J);return Ae.__actions__.push({func:Zl,args:[be],thisArg:r}),new Pr(Ae,_e)}return Te&&Le?l.apply(this,J):(Ae=this.thru(be),Te?I?Ae.value()[0]:Ae.value():Ae)})}),Rr(["pop","push","shift","sort","splice","unshift"],function(l){var f=El[l],m=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",I=/^(?:pop|shift)$/.test(l);L.prototype[l]=function(){var k=arguments;if(I&&!this.__chain__){var F=this.value();return f.apply(De(F)?F:[],k)}return this[m](function(X){return f.apply(De(X)?X:[],k)})}}),un(Ve.prototype,function(l,f){var m=L[f];if(m){var I=m.name+"";nt.call(mi,I)||(mi[I]=[]),mi[I].push({name:f,func:m})}}),mi[Vl(r,x).name]=[{name:"wrapper",func:r}],Ve.prototype.clone=C$,Ve.prototype.reverse=I$,Ve.prototype.value=R$,L.prototype.at=nH,L.prototype.chain=oH,L.prototype.commit=iH,L.prototype.next=aH,L.prototype.plant=lH,L.prototype.reverse=cH,L.prototype.toJSON=L.prototype.valueOf=L.prototype.value=uH,L.prototype.first=L.prototype.head,Ea&&(L.prototype[Ea]=sH),L}),hi=i$();Io?((Io.exports=hi)._=hi,df._=hi):zt._=hi}).call(Fte)})(vs,vs.exports)),vs.exports}var ca=$te();function Hte(){const e=Ue.useAppDispatch(),t=Ue.useAppSelector(Ue.selectRoles),r=Ue.useAppSelector(Ue.selectPrivileges),n=Ue.useAppSelector(Ue.selectRolesFlags),o=Ue.useAppSelector(Ue.selectRolesAndPrivileges,(y,g)=>ca.isEqual(y,g)),i=Ue.useAppSelector(Ue.selectCatalog),a=Ue.useAppSelector(Ue.selectQodly),s=Ue.useAppSelector(Ue.selectSelectedTab),c=Ue.useAppSelector(Ue.selectForceLogin),u=Ue.useAppSelector(Ue.selectRestrictedByDefault),d=Ue.useAppSelector(Ue.selectGuestPrivilege),p=Ue.useAppSelector(Ue.selectCatalogMethods),h=Ue.useAppSelector(Ue.selectDataclasses),v=Ue.useAppSelector(Ue.selectSingletons);return{getRoles:()=>t,getPrivileges:()=>r,getRolesFlags:()=>n,getRolesAndPrivileges:()=>o,getCatalog:()=>i,getQodly:()=>a,getSelectedTab:()=>s,getForceLogin:()=>c??!1,getRestrictedByDefault:()=>u??!1,actions:{updateRoles:y=>{e(Ue.updateRoles(y))},updatePrivileges:y=>{e(Ue.updatePrivileges(y))},setRolesContent:y=>{e(Ue.setRolesContent(y))},toggleTab:y=>{e(Ue.toggleTab(y))},toggleForceLogin:y=>{e(Ue.toggleForceLogin(y))},toggleRestrictedByDefault:y=>{e(Ue.toggleRestrictedByDefault(y))},setTabFlags:(y,g)=>{e(Ue.setTabFlags({path:y,flags:g}))},openModal:async y=>await e(Ue.openModal(y)).unwrap()},getGuestPrivilege:()=>d,getCatalogMethods:()=>p,getDataclasses:()=>h,getSingletons:()=>v}}const W5=T.createContext(null),U5=({children:e,adapter:t})=>C.jsx(W5.Provider,{value:t,children:e});function Ht(){const e=T.useContext(W5);if(!e)throw new Error("useEditorStateAdapter must be used within an EditorStateAdapterProvider");return e}var Tx=function(e,t){return Tx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},Tx(e,t)};function Ws(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Tx(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Eu=function(){return Eu=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Eu.apply(this,arguments)};function Ax(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function kx(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function Mx(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}function _n(e){return typeof e=="function"}function G5(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var fy=G5(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
82
82
  `+r.map(function(n,o){return o+1+") "+n.toString()}).join(`
83
- `):"",this.name="UnsubscriptionError",this.errors=r}});function Dx(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var vd=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,o,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=Ax(a),c=s.next();!c.done;c=s.next()){var u=c.value;u.remove(this)}}catch(g){t={error:g}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}else a.remove(this);var d=this.initialTeardown;if(_n(d))try{d()}catch(g){i=g instanceof fy?g.errors:[g]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var h=Ax(p),v=h.next();!v.done;v=h.next()){var y=v.value;try{FA(y)}catch(g){i=i??[],g instanceof fy?i=Mx(Mx([],kx(i)),kx(g.errors)):i.push(g)}}}catch(g){n={error:g}}finally{try{v&&!v.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}}if(i)throw new fy(i)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)FA(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&Dx(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Dx(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),K5=vd.EMPTY;function Y5(e){return e instanceof vd||e&&"closed"in e&&_n(e.remove)&&_n(e.add)&&_n(e.unsubscribe)}function FA(e){_n(e)?e():e.unsubscribe()}var Vte={Promise:void 0},Wte={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,Mx([e,t],kx(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Ute(e){Wte.setTimeout(function(){throw e})}function $A(){}function Qc(e){e()}var F_=(function(e){Ws(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,Y5(r)&&r.add(n)):n.destination=Yte,n}return t.create=function(r,n,o){return new jx(r,n,o)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(vd),Gte=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){Nc(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){Nc(n)}else Nc(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){Nc(r)}},e})(),jx=(function(e){Ws(t,e);function t(r,n,o){var i=e.call(this)||this,a;return _n(r)||!r?a={next:r??void 0,error:n??void 0,complete:o??void 0}:a=r,i.destination=new Gte(a),i}return t})(F_);function Nc(e){Ute(e)}function Kte(e){throw e}var Yte={closed:!0,next:$A,error:Kte,complete:$A},Xte=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Zte(e){return e}function Jte(e){return e.length===0?Zte:e.length===1?e[0]:function(r){return e.reduce(function(n,o){return o(n)},r)}}var HA=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var o=this,i=ere(t)?t:new jx(t,r,n);return Qc(function(){var a=o,s=a.operator,c=a.source;i.add(s?s.call(i,c):c?o._subscribe(i):o._trySubscribe(i))}),i},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=VA(r),new r(function(o,i){var a=new jx({next:function(s){try{t(s)}catch(c){i(c),a.unsubscribe()}},error:i,complete:o});n.subscribe(a)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[Xte]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Jte(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=VA(t),new t(function(n,o){var i;r.subscribe(function(a){return i=a},function(a){return o(a)},function(){return n(i)})})},e.create=function(t){return new e(t)},e})();function VA(e){var t;return(t=e??Vte.Promise)!==null&&t!==void 0?t:Promise}function Qte(e){return e&&_n(e.next)&&_n(e.error)&&_n(e.complete)}function ere(e){return e&&e instanceof F_||Qte(e)&&Y5(e)}function tre(e){return _n(e==null?void 0:e.lift)}function rre(e){return function(t){if(tre(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function nre(e,t,r,n,o){return new ore(e,t,r,n,o)}var ore=(function(e){Ws(t,e);function t(r,n,o,i,a,s){var c=e.call(this,r)||this;return c.onFinalize=a,c.shouldUnsubscribe=s,c._next=n?function(u){try{n(u)}catch(d){r.error(d)}}:e.prototype._next,c._error=i?function(u){try{i(u)}catch(d){r.error(d)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=o?function(){try{o()}catch(u){r.error(u)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t})(F_),ire=G5(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),X5=(function(e){Ws(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var n=new WA(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new ire},t.prototype.next=function(r){var n=this;Qc(function(){var o,i;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=Ax(n.currentObservers),s=a.next();!s.done;s=a.next()){var c=s.value;c.next(r)}}catch(u){o={error:u}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}}})},t.prototype.error=function(r){var n=this;Qc(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var o=n.observers;o.length;)o.shift().error(r)}})},t.prototype.complete=function(){var r=this;Qc(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,o=this,i=o.hasError,a=o.isStopped,s=o.observers;return i||a?K5:(this.currentObservers=null,s.push(r),new vd(function(){n.currentObservers=null,Dx(s,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,o=n.hasError,i=n.thrownError,a=n.isStopped;o?r.error(i):a&&r.complete()},t.prototype.asObservable=function(){var r=new HA;return r.source=this,r},t.create=function(r,n){return new WA(r,n)},t})(HA),WA=(function(e){Ws(t,e);function t(r,n){var o=e.call(this)||this;return o.destination=r,o.source=n,o}return t.prototype.next=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.next)===null||o===void 0||o.call(n,r)},t.prototype.error=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.error)===null||o===void 0||o.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,o;return(o=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&o!==void 0?o:K5},t})(X5);function are(e,t){return rre(function(r,n){var o=0;r.subscribe(nre(n,function(i){return e.call(t,i,o++)&&n.next(i)}))})}var py={},Ua={},Pc={},UA;function Z5(){if(UA)return Pc;UA=1,Object.defineProperty(Pc,"__esModule",{value:!0}),Pc.default=r;let e;const t=new Uint8Array(16);function r(){if(!e&&(e=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!e))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(t)}return Pc}var Ni={},Ga={},Ka={},GA;function sre(){if(GA)return Ka;GA=1,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.default=void 0;var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return Ka.default=e,Ka}var KA;function gd(){if(KA)return Ga;KA=1,Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.default=void 0;var e=t(sre());function t(o){return o&&o.__esModule?o:{default:o}}function r(o){return typeof o=="string"&&e.default.test(o)}var n=r;return Ga.default=n,Ga}var YA;function md(){if(YA)return Ni;YA=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.default=void 0,Ni.unsafeStringify=n;var e=t(gd());function t(a){return a&&a.__esModule?a:{default:a}}const r=[];for(let a=0;a<256;++a)r.push((a+256).toString(16).slice(1));function n(a,s=0){return r[a[s+0]]+r[a[s+1]]+r[a[s+2]]+r[a[s+3]]+"-"+r[a[s+4]]+r[a[s+5]]+"-"+r[a[s+6]]+r[a[s+7]]+"-"+r[a[s+8]]+r[a[s+9]]+"-"+r[a[s+10]]+r[a[s+11]]+r[a[s+12]]+r[a[s+13]]+r[a[s+14]]+r[a[s+15]]}function o(a,s=0){const c=n(a,s);if(!(0,e.default)(c))throw TypeError("Stringified UUID is invalid");return c}var i=o;return Ni.default=i,Ni}var XA;function lre(){if(XA)return Ua;XA=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.default=void 0;var e=r(Z5()),t=md();function r(u){return u&&u.__esModule?u:{default:u}}let n,o,i=0,a=0;function s(u,d,p){let h=d&&p||0;const v=d||new Array(16);u=u||{};let y=u.node||n,g=u.clockseq!==void 0?u.clockseq:o;if(y==null||g==null){const _=u.random||(u.rng||e.default)();y==null&&(y=n=[_[0]|1,_[1],_[2],_[3],_[4],_[5]]),g==null&&(g=o=(_[6]<<8|_[7])&16383)}let b=u.msecs!==void 0?u.msecs:Date.now(),x=u.nsecs!==void 0?u.nsecs:a+1;const w=b-i+(x-a)/1e4;if(w<0&&u.clockseq===void 0&&(g=g+1&16383),(w<0||b>i)&&u.nsecs===void 0&&(x=0),x>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");i=b,a=x,o=g,b+=122192928e5;const E=((b&268435455)*1e4+x)%4294967296;v[h++]=E>>>24&255,v[h++]=E>>>16&255,v[h++]=E>>>8&255,v[h++]=E&255;const S=b/4294967296*1e4&268435455;v[h++]=S>>>8&255,v[h++]=S&255,v[h++]=S>>>24&15|16,v[h++]=S>>>16&255,v[h++]=g>>>8|128,v[h++]=g&255;for(let _=0;_<6;++_)v[h+_]=y[_];return d||(0,t.unsafeStringify)(v)}var c=s;return Ua.default=c,Ua}var Ya={},fo={},Xa={},ZA;function J5(){if(ZA)return Xa;ZA=1,Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.default=void 0;var e=t(gd());function t(o){return o&&o.__esModule?o:{default:o}}function r(o){if(!(0,e.default)(o))throw TypeError("Invalid UUID");let i;const a=new Uint8Array(16);return a[0]=(i=parseInt(o.slice(0,8),16))>>>24,a[1]=i>>>16&255,a[2]=i>>>8&255,a[3]=i&255,a[4]=(i=parseInt(o.slice(9,13),16))>>>8,a[5]=i&255,a[6]=(i=parseInt(o.slice(14,18),16))>>>8,a[7]=i&255,a[8]=(i=parseInt(o.slice(19,23),16))>>>8,a[9]=i&255,a[10]=(i=parseInt(o.slice(24,36),16))/1099511627776&255,a[11]=i/4294967296&255,a[12]=i>>>24&255,a[13]=i>>>16&255,a[14]=i>>>8&255,a[15]=i&255,a}var n=r;return Xa.default=n,Xa}var JA;function Q5(){if(JA)return fo;JA=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.URL=fo.DNS=void 0,fo.default=a;var e=md(),t=r(J5());function r(s){return s&&s.__esModule?s:{default:s}}function n(s){s=unescape(encodeURIComponent(s));const c=[];for(let u=0;u<s.length;++u)c.push(s.charCodeAt(u));return c}const o="6ba7b810-9dad-11d1-80b4-00c04fd430c8";fo.DNS=o;const i="6ba7b811-9dad-11d1-80b4-00c04fd430c8";fo.URL=i;function a(s,c,u){function d(p,h,v,y){var g;if(typeof p=="string"&&(p=n(p)),typeof h=="string"&&(h=(0,t.default)(h)),((g=h)===null||g===void 0?void 0:g.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let b=new Uint8Array(16+p.length);if(b.set(h),b.set(p,h.length),b=u(b),b[6]=b[6]&15|c,b[8]=b[8]&63|128,v){y=y||0;for(let x=0;x<16;++x)v[y+x]=b[x];return v}return(0,e.unsafeStringify)(b)}try{d.name=s}catch{}return d.DNS=o,d.URL=i,d}return fo}var Za={},QA;function cre(){if(QA)return Za;QA=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.default=void 0;function e(v){if(typeof v=="string"){const y=unescape(encodeURIComponent(v));v=new Uint8Array(y.length);for(let g=0;g<y.length;++g)v[g]=y.charCodeAt(g)}return t(n(o(v),v.length*8))}function t(v){const y=[],g=v.length*32,b="0123456789abcdef";for(let x=0;x<g;x+=8){const w=v[x>>5]>>>x%32&255,E=parseInt(b.charAt(w>>>4&15)+b.charAt(w&15),16);y.push(E)}return y}function r(v){return(v+64>>>9<<4)+14+1}function n(v,y){v[y>>5]|=128<<y%32,v[r(y)-1]=y;let g=1732584193,b=-271733879,x=-1732584194,w=271733878;for(let E=0;E<v.length;E+=16){const S=g,_=b,O=x,N=w;g=c(g,b,x,w,v[E],7,-680876936),w=c(w,g,b,x,v[E+1],12,-389564586),x=c(x,w,g,b,v[E+2],17,606105819),b=c(b,x,w,g,v[E+3],22,-1044525330),g=c(g,b,x,w,v[E+4],7,-176418897),w=c(w,g,b,x,v[E+5],12,1200080426),x=c(x,w,g,b,v[E+6],17,-1473231341),b=c(b,x,w,g,v[E+7],22,-45705983),g=c(g,b,x,w,v[E+8],7,1770035416),w=c(w,g,b,x,v[E+9],12,-1958414417),x=c(x,w,g,b,v[E+10],17,-42063),b=c(b,x,w,g,v[E+11],22,-1990404162),g=c(g,b,x,w,v[E+12],7,1804603682),w=c(w,g,b,x,v[E+13],12,-40341101),x=c(x,w,g,b,v[E+14],17,-1502002290),b=c(b,x,w,g,v[E+15],22,1236535329),g=u(g,b,x,w,v[E+1],5,-165796510),w=u(w,g,b,x,v[E+6],9,-1069501632),x=u(x,w,g,b,v[E+11],14,643717713),b=u(b,x,w,g,v[E],20,-373897302),g=u(g,b,x,w,v[E+5],5,-701558691),w=u(w,g,b,x,v[E+10],9,38016083),x=u(x,w,g,b,v[E+15],14,-660478335),b=u(b,x,w,g,v[E+4],20,-405537848),g=u(g,b,x,w,v[E+9],5,568446438),w=u(w,g,b,x,v[E+14],9,-1019803690),x=u(x,w,g,b,v[E+3],14,-187363961),b=u(b,x,w,g,v[E+8],20,1163531501),g=u(g,b,x,w,v[E+13],5,-1444681467),w=u(w,g,b,x,v[E+2],9,-51403784),x=u(x,w,g,b,v[E+7],14,1735328473),b=u(b,x,w,g,v[E+12],20,-1926607734),g=d(g,b,x,w,v[E+5],4,-378558),w=d(w,g,b,x,v[E+8],11,-2022574463),x=d(x,w,g,b,v[E+11],16,1839030562),b=d(b,x,w,g,v[E+14],23,-35309556),g=d(g,b,x,w,v[E+1],4,-1530992060),w=d(w,g,b,x,v[E+4],11,1272893353),x=d(x,w,g,b,v[E+7],16,-155497632),b=d(b,x,w,g,v[E+10],23,-1094730640),g=d(g,b,x,w,v[E+13],4,681279174),w=d(w,g,b,x,v[E],11,-358537222),x=d(x,w,g,b,v[E+3],16,-722521979),b=d(b,x,w,g,v[E+6],23,76029189),g=d(g,b,x,w,v[E+9],4,-640364487),w=d(w,g,b,x,v[E+12],11,-421815835),x=d(x,w,g,b,v[E+15],16,530742520),b=d(b,x,w,g,v[E+2],23,-995338651),g=p(g,b,x,w,v[E],6,-198630844),w=p(w,g,b,x,v[E+7],10,1126891415),x=p(x,w,g,b,v[E+14],15,-1416354905),b=p(b,x,w,g,v[E+5],21,-57434055),g=p(g,b,x,w,v[E+12],6,1700485571),w=p(w,g,b,x,v[E+3],10,-1894986606),x=p(x,w,g,b,v[E+10],15,-1051523),b=p(b,x,w,g,v[E+1],21,-2054922799),g=p(g,b,x,w,v[E+8],6,1873313359),w=p(w,g,b,x,v[E+15],10,-30611744),x=p(x,w,g,b,v[E+6],15,-1560198380),b=p(b,x,w,g,v[E+13],21,1309151649),g=p(g,b,x,w,v[E+4],6,-145523070),w=p(w,g,b,x,v[E+11],10,-1120210379),x=p(x,w,g,b,v[E+2],15,718787259),b=p(b,x,w,g,v[E+9],21,-343485551),g=i(g,S),b=i(b,_),x=i(x,O),w=i(w,N)}return[g,b,x,w]}function o(v){if(v.length===0)return[];const y=v.length*8,g=new Uint32Array(r(y));for(let b=0;b<y;b+=8)g[b>>5]|=(v[b/8]&255)<<b%32;return g}function i(v,y){const g=(v&65535)+(y&65535);return(v>>16)+(y>>16)+(g>>16)<<16|g&65535}function a(v,y){return v<<y|v>>>32-y}function s(v,y,g,b,x,w){return i(a(i(i(y,v),i(b,w)),x),g)}function c(v,y,g,b,x,w,E){return s(y&g|~y&b,v,y,x,w,E)}function u(v,y,g,b,x,w,E){return s(y&b|g&~b,v,y,x,w,E)}function d(v,y,g,b,x,w,E){return s(y^g^b,v,y,x,w,E)}function p(v,y,g,b,x,w,E){return s(g^(y|~b),v,y,x,w,E)}var h=e;return Za.default=h,Za}var ek;function ure(){if(ek)return Ya;ek=1,Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.default=void 0;var e=r(Q5()),t=r(cre());function r(i){return i&&i.__esModule?i:{default:i}}var o=(0,e.default)("v3",48,t.default);return Ya.default=o,Ya}var Ja={},Qa={},tk;function dre(){if(tk)return Qa;tk=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.default=void 0;var t={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};return Qa.default=t,Qa}var rk;function fre(){if(rk)return Ja;rk=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.default=void 0;var e=n(dre()),t=n(Z5()),r=md();function n(a){return a&&a.__esModule?a:{default:a}}function o(a,s,c){if(e.default.randomUUID&&!s&&!a)return e.default.randomUUID();a=a||{};const u=a.random||(a.rng||t.default)();if(u[6]=u[6]&15|64,u[8]=u[8]&63|128,s){c=c||0;for(let d=0;d<16;++d)s[c+d]=u[d];return s}return(0,r.unsafeStringify)(u)}var i=o;return Ja.default=i,Ja}var es={},ts={},nk;function pre(){if(nk)return ts;nk=1,Object.defineProperty(ts,"__esModule",{value:!0}),ts.default=void 0;function e(o,i,a,s){switch(o){case 0:return i&a^~i&s;case 1:return i^a^s;case 2:return i&a^i&s^a&s;case 3:return i^a^s}}function t(o,i){return o<<i|o>>>32-i}function r(o){const i=[1518500249,1859775393,2400959708,3395469782],a=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof o=="string"){const d=unescape(encodeURIComponent(o));o=[];for(let p=0;p<d.length;++p)o.push(d.charCodeAt(p))}else Array.isArray(o)||(o=Array.prototype.slice.call(o));o.push(128);const s=o.length/4+2,c=Math.ceil(s/16),u=new Array(c);for(let d=0;d<c;++d){const p=new Uint32Array(16);for(let h=0;h<16;++h)p[h]=o[d*64+h*4]<<24|o[d*64+h*4+1]<<16|o[d*64+h*4+2]<<8|o[d*64+h*4+3];u[d]=p}u[c-1][14]=(o.length-1)*8/Math.pow(2,32),u[c-1][14]=Math.floor(u[c-1][14]),u[c-1][15]=(o.length-1)*8&4294967295;for(let d=0;d<c;++d){const p=new Uint32Array(80);for(let x=0;x<16;++x)p[x]=u[d][x];for(let x=16;x<80;++x)p[x]=t(p[x-3]^p[x-8]^p[x-14]^p[x-16],1);let h=a[0],v=a[1],y=a[2],g=a[3],b=a[4];for(let x=0;x<80;++x){const w=Math.floor(x/20),E=t(h,5)+e(w,v,y,g)+b+i[w]+p[x]>>>0;b=g,g=y,y=t(v,30)>>>0,v=h,h=E}a[0]=a[0]+h>>>0,a[1]=a[1]+v>>>0,a[2]=a[2]+y>>>0,a[3]=a[3]+g>>>0,a[4]=a[4]+b>>>0}return[a[0]>>24&255,a[0]>>16&255,a[0]>>8&255,a[0]&255,a[1]>>24&255,a[1]>>16&255,a[1]>>8&255,a[1]&255,a[2]>>24&255,a[2]>>16&255,a[2]>>8&255,a[2]&255,a[3]>>24&255,a[3]>>16&255,a[3]>>8&255,a[3]&255,a[4]>>24&255,a[4]>>16&255,a[4]>>8&255,a[4]&255]}var n=r;return ts.default=n,ts}var ok;function hre(){if(ok)return es;ok=1,Object.defineProperty(es,"__esModule",{value:!0}),es.default=void 0;var e=r(Q5()),t=r(pre());function r(i){return i&&i.__esModule?i:{default:i}}var o=(0,e.default)("v5",80,t.default);return es.default=o,es}var rs={},ik;function vre(){if(ik)return rs;ik=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.default=void 0;var e="00000000-0000-0000-0000-000000000000";return rs.default=e,rs}var ns={},ak;function gre(){if(ak)return ns;ak=1,Object.defineProperty(ns,"__esModule",{value:!0}),ns.default=void 0;var e=t(gd());function t(o){return o&&o.__esModule?o:{default:o}}function r(o){if(!(0,e.default)(o))throw TypeError("Invalid UUID");return parseInt(o.slice(14,15),16)}var n=r;return ns.default=n,ns}var sk;function mre(){return sk||(sk=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NIL",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"v1",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"v3",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"v4",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"v5",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"validate",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return a.default}});var t=d(lre()),r=d(ure()),n=d(fre()),o=d(hre()),i=d(vre()),a=d(gre()),s=d(gd()),c=d(md()),u=d(J5());function d(p){return p&&p.__esModule?p:{default:p}}})(py)),py}var hy,lk;function bre(){if(lk)return hy;lk=1;function e(t,r){if(!t||!r||!t.length||!r.length)throw new Error("Bad alphabet");this.srcAlphabet=t,this.dstAlphabet=r}return e.prototype.convert=function(t){var r,n,o,i={},a=this.srcAlphabet.length,s=this.dstAlphabet.length,c=t.length,u=typeof t=="string"?"":[];if(!this.isValid(t))throw new Error('Number "'+t+'" contains of non-alphabetic digits ('+this.srcAlphabet+")");if(this.srcAlphabet===this.dstAlphabet)return t;for(r=0;r<c;r++)i[r]=this.srcAlphabet.indexOf(t[r]);do{for(n=0,o=0,r=0;r<c;r++)n=n*a+i[r],n>=s?(i[o++]=parseInt(n/s,10),n=n%s):o>0&&(i[o++]=0);c=o,u=this.dstAlphabet.slice(n,n+1).concat(u)}while(o!==0);return u},e.prototype.isValid=function(t){for(var r=0;r<t.length;++r)if(this.srcAlphabet.indexOf(t[r])===-1)return!1;return!0},hy=e,hy}var vy,ck;function yre(){if(ck)return vy;ck=1;var e=bre();function t(r,n){var o=new e(r,n);return function(i){return o.convert(i)}}return t.BIN="01",t.OCT="01234567",t.DEC="0123456789",t.HEX="0123456789abcdef",vy=t,vy}var gy,uk;function wre(){if(uk)return gy;uk=1;const{v4:e,validate:t}=mre(),r=yre(),n={cookieBase90:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",flickrBase58:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",uuid25Base36:"0123456789abcdefghijklmnopqrstuvwxyz"},o={consistentLength:!0};let i;const a=(u,d,p)=>{const h=d(u.toLowerCase().replace(/-/g,""));return!p||!p.consistentLength?h:h.padStart(p.shortIdLength,p.paddingChar)},s=(u,d)=>{const h=d(u).padStart(32,"0").match(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);return[h[1],h[2],h[3],h[4],h[5]].join("-")},c=u=>Math.ceil(Math.log(2**128)/Math.log(u));return gy=(()=>{const u=(d,p)=>{const h=d||n.flickrBase58,v={...o,...p};if([...new Set(Array.from(h))].length!==h.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const y=c(h.length),g={shortIdLength:y,consistentLength:v.consistentLength,paddingChar:h[0]},b=r(r.HEX,h),x=r(h,r.HEX),w=()=>a(e(),b,g),S={alphabet:h,fromUUID:_=>a(_,b,g),maxLength:y,generate:w,new:w,toUUID:_=>s(_,x),uuid:e,validate:(_,O=!1)=>{if(!_||typeof _!="string")return!1;const N=v.consistentLength?_.length===y:_.length<=y,R=_.split("").every(A=>h.includes(A));return O===!1?N&&R:N&&R&&t(s(_,x))}};return Object.freeze(S),S};return u.constants=n,u.uuid=e,u.generate=()=>(i||(i=u(n.flickrBase58).generate),i()),u})(),gy}var ez=wre();const tz=new X5;function xre(e,t){switch(t.type){case"UPDATE_ROLES":return{...e,roles:t.payload,flags:{...e.flags,touched:!0}};case"UPDATE_PRIVILEGES":return{...e,privileges:t.payload,flags:{...e.flags,touched:!0}};case"SET_ROLES_CONTENT":{const{content:r,flags:n={},...o}=t.payload,i=de.sanitize(r),a={...e.flags,...n};return{...e,...i,...o,flags:a}}case"TOGGLE_TAB":return{...e,selectedTab:t.payload};case"TOGGLE_FORCE_LOGIN":return e.forceLogin===t.payload?e:{...e,forceLogin:t.payload,flags:{...e.flags,touched:!0}};case"TOGGLE_RESTRICTED_BY_DEFAULT":return e.restrictedByDefault===t.payload?e:{...e,restrictedByDefault:t.payload,flags:{...e.flags,touched:!0}};case"SET_FLAGS":return{...e,flags:{...e.flags,...t.payload}};case"CREATE_MODAL":return{...e,modals:{...e.modals,list:[...e.modals.list,t.payload]}};case"REMOVE_MODAL":return{...e,modals:{...e.modals,list:e.modals.list.filter(r=>r.id!==t.payload)}};case"CLOSE_MODAL":{const{id:r,reason:n}=t.payload;let o;if(n)if(e.modals.list.find(a=>a.id===r))o={...e,modals:{...e.modals,list:e.modals.list.map(a=>a.id===r?{...a,closeReason:n,isOpen:!1}:a)}};else return e;else o={...e,modals:{...e.modals,list:e.modals.list.filter(i=>i.id!==r)}};return tz.next(o.modals),o}case"EDIT_MODAL":{const{id:r,...n}=t.payload;return e.modals.list.find(i=>i.id===r)?{...e,modals:{...e.modals,list:e.modals.list.map(i=>i.id===r?{...i,...n}:i)}}:e}default:return e}}const $_=T.createContext(null),_re=()=>({roles:{},privileges:{},flags:{touched:!1},date:void 0,selectedTab:"roles",forceLogin:!1,restrictedByDefault:!1,modals:{list:[]}}),Ere=({children:e,catalog:t=null,qodly:r=!1,guestPrivilege:n=null,catalogMethods:o=[],dataclasses:i={},singletons:a={},onSetTabFlags:s,initialState:c})=>{const u=_re(),[d,p]=T.useReducer(xre,{...u,...c}),h=T.useMemo(()=>({catalog:t,qodly:r,guestPrivilege:n,catalogMethods:o,dataclasses:i,singletons:a,onSetTabFlags:s}),[t,r,n,o,i,a,s]);return C.jsx($_.Provider,{value:{state:d,dispatch:p,external:h},children:e})};function Sre(){const e=T.useContext($_);if(!e)throw new Error("useReducerAdapter must be used within a ReducerAdapterProvider");const{state:t,dispatch:r,external:n}=e,o=T.useMemo(()=>de.toAPI({roles:t.roles,privileges:t.privileges,forceLogin:t.forceLogin,restrictedByDefault:t.restrictedByDefault}),[t.roles,t.privileges,t.forceLogin,t.restrictedByDefault]);return{getRoles:T.useCallback(()=>t.roles,[t.roles]),getPrivileges:T.useCallback(()=>t.privileges,[t.privileges]),getRolesFlags:T.useCallback(()=>t.flags,[t.flags]),getRolesAndPrivileges:T.useCallback(()=>o,[o]),getCatalog:T.useCallback(()=>n.catalog??null,[n.catalog]),getQodly:T.useCallback(()=>n.qodly,[n.qodly]),getSelectedTab:T.useCallback(()=>t.selectedTab,[t.selectedTab]),getForceLogin:T.useCallback(()=>t.forceLogin??!1,[t.forceLogin]),getRestrictedByDefault:T.useCallback(()=>t.restrictedByDefault??!1,[t.restrictedByDefault]),actions:{updateRoles:T.useCallback(i=>{r({type:"UPDATE_ROLES",payload:i})},[]),updatePrivileges:T.useCallback(i=>{r({type:"UPDATE_PRIVILEGES",payload:i})},[]),setRolesContent:T.useCallback(i=>{r({type:"SET_ROLES_CONTENT",payload:i})},[]),toggleTab:T.useCallback(i=>{r({type:"TOGGLE_TAB",payload:i})},[]),toggleForceLogin:T.useCallback(i=>{r({type:"TOGGLE_FORCE_LOGIN",payload:i})},[]),toggleRestrictedByDefault:T.useCallback(i=>{r({type:"TOGGLE_RESTRICTED_BY_DEFAULT",payload:i})},[]),setTabFlags:T.useCallback((i,a)=>{n.onSetTabFlags&&n.onSetTabFlags(i,a)},[n.onSetTabFlags]),openModal:T.useCallback(async i=>{const{type:a=de.ModalType.ALERT}=i,s=ez.generate();return r({type:"CREATE_MODAL",payload:{id:s,type:a,isOpen:!0,...i}}),a===de.ModalType.CONFIRM?new Promise(c=>{const u=tz.pipe(are(d=>{const p=d.list.find(h=>h.id===s);return p!==void 0&&!p.isOpen})).subscribe(d=>{var h;const p=d.list.find(v=>v.id===s);if(p){const v=p.closeReason===de.ModalCloseReason.CONFIRMED,y=Vs.entries(((h=p.views)==null?void 0:h.toggles)||{}).reduce((g,b)=>({...g,[b[0]]:b[1].value}),{});r({type:"REMOVE_MODAL",payload:s}),u.unsubscribe(),c({confirmed:v,options:y})}})}):{confirmed:!1}},[r])},getGuestPrivilege:T.useCallback(()=>n.guestPrivilege??null,[n.guestPrivilege]),getCatalogMethods:T.useCallback(()=>n.catalogMethods,[n.catalogMethods]),getDataclasses:T.useCallback(()=>n.dataclasses,[n.dataclasses]),getSingletons:T.useCallback(()=>n.singletons,[n.singletons])}}function Ore(){const e=T.useContext($_);if(!e)throw new Error("useModals must be used within a ReducerAdapterProvider");const{state:t,dispatch:r}=e;return{modals:t.modals.list,closeModal:T.useCallback(n=>{r({type:"CLOSE_MODAL",payload:n})},[r]),editModal:T.useCallback(n=>{r({type:"EDIT_MODAL",payload:n})},[r]),removeModal:T.useCallback(n=>{r({type:"REMOVE_MODAL",payload:n})},[r])}}const my=({child:e,parent:t,status:r,onSelect:n,currentPrivilegeId:o})=>{const i=Ht(),a=i.getPrivileges();function s(){const u=de.addPrivilegeIn(t.id,e.id,a);i.actions.updatePrivileges(u)}function c(){const u=de.removePrivilegeFrom(t.id,e.id,a);i.actions.updatePrivileges(u)}return C.jsxs("div",{className:ht("inline-flex cursor-pointer items-center gap-1 space-x-1 rounded px-2 py-0.5",{"bg-primary-dark text-white":r==="included","bg-grey-300 text-grey-100":r!=="included","opacity-40":r==="disabled"}),children:[C.jsx("span",{onClick:()=>n(o),className:"text-xs hover:underline",children:e.privilege}),r==="included"?C.jsx("button",{onClick:c,children:C.jsx("span",{className:"text-[13px]",children:C.jsx(xe.FdPlus,{className:"rotate-45 transform text-white"})})}):C.jsx("button",{disabled:r==="disabled",onClick:s,className:"opacity-70 disabled:cursor-not-allowed",children:C.jsx("span",{className:"text-[13px]",children:C.jsx(xe.FdPlus,{className:"text-white"})})})]})},Cre=({selectedPrivilege:e,privileges:t,onSelect:r,setShowIncluded:n,showIncluded:o})=>{const i=Object.values(t),a=de.getPrivilegeById(e.id,t);let s=a?de.populateShallow(a.includes,t):[],c=a?de.populateShallow(de.parents(a.id,t),t):[],u=a?de.populateShallow(de.allowed(a.id,t),t):[];return[s,c,u]=[s,c,u].map(d=>d.filter(p=>(p==null?void 0:p.privilege)!=="guest")),i.length<2&&s.length+c.length+u.length===0?null:C.jsxs("div",{className:"w-full border-b border-grey-900 p-4",children:[C.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[" ",i.length>2?C.jsx("h4",{className:"text-[13px] font-semibold text-white",children:"Include a privilege"}):C.jsx("div",{}),C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx(de.ControlledSwitch,{onChange:()=>n(!o),value:o}),C.jsxs("label",{className:"text-xs text-[#F6F6F6]",children:[" ","Show inherited permissions"]})]})]}),C.jsxs("div",{className:"flex flex-wrap items-start justify-start gap-1",children:[s.map(d=>C.jsx(my,{child:d,parent:e,status:"included",onSelect:r,currentPrivilegeId:d.id},d.id)),u.map(d=>C.jsx(my,{child:d,parent:e,status:"available",onSelect:r,currentPrivilegeId:d.id},d.id)),c.map(d=>C.jsx(my,{child:d,parent:e,status:"disabled",onSelect:r,currentPrivilegeId:d.id},d.id))]})]})};function Lr(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function rz(e,t=[]){let r=[];function n(i,a){const s=ue.createContext(a),c=r.length;r=[...r,a];const u=p=>{var x;const{scope:h,children:v,...y}=p,g=((x=h==null?void 0:h[e])==null?void 0:x[c])||s,b=ue.useMemo(()=>y,Object.values(y));return C.jsx(g.Provider,{value:b,children:v})};u.displayName=i+"Provider";function d(p,h){var g;const v=((g=h==null?void 0:h[e])==null?void 0:g[c])||s,y=ue.useContext(v);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=r.map(a=>ue.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return ue.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[n,Ire(o,...t)]}function Ire(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:c,scopeName:u})=>{const p=c(i)[`__scope${u}`];return{...s,...p}},{});return ue.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}var Yo=globalThis!=null&&globalThis.document?ue.useLayoutEffect:()=>{},Rre=ue[" useInsertionEffect ".trim().toString()]||Yo;function Nre({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,i,a]=Pre({defaultProp:t,onChange:r}),s=e!==void 0,c=s?e:o;{const d=ue.useRef(e!==void 0);ue.useEffect(()=>{const p=d.current;p!==s&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=s},[s,n])}const u=ue.useCallback(d=>{var p;if(s){const h=Tre(d)?d(e):d;h!==e&&((p=a.current)==null||p.call(a,h))}else i(d)},[s,e,i,a]);return[c,u]}function Pre({defaultProp:e,onChange:t}){const[r,n]=ue.useState(e),o=ue.useRef(r),i=ue.useRef(t);return Rre(()=>{i.current=t},[t]),ue.useEffect(()=>{var a;o.current!==r&&((a=i.current)==null||a.call(i,r),o.current=r)},[r,o]),[r,n,i]}function Tre(e){return typeof e=="function"}function dk(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function nz(...e){return t=>{let r=!1;const n=e.map(o=>{const i=dk(o,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let o=0;o<n.length;o++){const i=n[o];typeof i=="function"?i():dk(e[o],null)}}}}function ca(...e){return ue.useCallback(nz(...e),e)}const Are=["top","right","bottom","left"],bo=Math.min,xr=Math.max,Su=Math.round,Tc=Math.floor,En=e=>({x:e,y:e}),kre={left:"right",right:"left",bottom:"top",top:"bottom"},Mre={start:"end",end:"start"};function qx(e,t,r){return xr(e,bo(t,r))}function Wn(e,t){return typeof e=="function"?e(t):e}function Un(e){return e.split("-")[0]}function ua(e){return e.split("-")[1]}function H_(e){return e==="x"?"y":"x"}function V_(e){return e==="y"?"height":"width"}const Dre=new Set(["top","bottom"]);function yn(e){return Dre.has(Un(e))?"y":"x"}function W_(e){return H_(yn(e))}function jre(e,t,r){r===void 0&&(r=!1);const n=ua(e),o=W_(e),i=V_(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ou(a)),[a,Ou(a)]}function qre(e){const t=Ou(e);return[Lx(e),t,Lx(t)]}function Lx(e){return e.replace(/start|end/g,t=>Mre[t])}const fk=["left","right"],pk=["right","left"],Lre=["top","bottom"],zre=["bottom","top"];function Bre(e,t,r){switch(e){case"top":case"bottom":return r?t?pk:fk:t?fk:pk;case"left":case"right":return t?Lre:zre;default:return[]}}function Fre(e,t,r,n){const o=ua(e);let i=Bre(Un(e),r==="start",n);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Lx)))),i}function Ou(e){return e.replace(/left|right|bottom|top/g,t=>kre[t])}function $re(e){return{top:0,right:0,bottom:0,left:0,...e}}function oz(e){return typeof e!="number"?$re(e):{top:e,right:e,bottom:e,left:e}}function Cu(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function hk(e,t,r){let{reference:n,floating:o}=e;const i=yn(t),a=W_(t),s=V_(a),c=Un(t),u=i==="y",d=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,h=n[s]/2-o[s]/2;let v;switch(c){case"top":v={x:d,y:n.y-o.height};break;case"bottom":v={x:d,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:p};break;case"left":v={x:n.x-o.width,y:p};break;default:v={x:n.x,y:n.y}}switch(ua(t)){case"start":v[a]-=h*(r&&u?-1:1);break;case"end":v[a]+=h*(r&&u?-1:1);break}return v}const Hre=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:p}=hk(u,n,c),h=n,v={},y=0;for(let g=0;g<s.length;g++){const{name:b,fn:x}=s[g],{x:w,y:E,data:S,reset:_}=await x({x:d,y:p,initialPlacement:n,placement:h,strategy:o,middlewareData:v,rects:u,platform:a,elements:{reference:e,floating:t}});d=w??d,p=E??p,v={...v,[b]:{...v[b],...S}},_&&y<=50&&(y++,typeof _=="object"&&(_.placement&&(h=_.placement),_.rects&&(u=_.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:d,y:p}=hk(u,h,c)),g=-1)}return{x:d,y:p,placement:h,strategy:o,middlewareData:v}};async function Ps(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:h=!1,padding:v=0}=Wn(t,e),y=oz(v),b=s[h?p==="floating"?"reference":"floating":p],x=Cu(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:c})),w=p==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),S=await(i.isElement==null?void 0:i.isElement(E))?await(i.getScale==null?void 0:i.getScale(E))||{x:1,y:1}:{x:1,y:1},_=Cu(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:E,strategy:c}):w);return{top:(x.top-_.top+y.top)/S.y,bottom:(_.bottom-x.bottom+y.bottom)/S.y,left:(x.left-_.left+y.left)/S.x,right:(_.right-x.right+y.right)/S.x}}const Vre=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:a,elements:s,middlewareData:c}=t,{element:u,padding:d=0}=Wn(e,t)||{};if(u==null)return{};const p=oz(d),h={x:r,y:n},v=W_(o),y=V_(v),g=await a.getDimensions(u),b=v==="y",x=b?"top":"left",w=b?"bottom":"right",E=b?"clientHeight":"clientWidth",S=i.reference[y]+i.reference[v]-h[v]-i.floating[y],_=h[v]-i.reference[v],O=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let N=O?O[E]:0;(!N||!await(a.isElement==null?void 0:a.isElement(O)))&&(N=s.floating[E]||i.floating[y]);const R=S/2-_/2,A=N/2-g[y]/2-1,D=bo(p[x],A),B=bo(p[w],A),j=D,M=N-g[y]-B,P=N/2-g[y]/2+R,V=qx(j,P,M),q=!c.arrow&&ua(o)!=null&&P!==V&&i.reference[y]/2-(P<j?D:B)-g[y]/2<0,G=q?P<j?P-j:P-M:0;return{[v]:h[v]+G,data:{[v]:V,centerOffset:P-V-G,...q&&{alignmentOffset:G}},reset:q}}}),Wre=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...b}=Wn(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const x=Un(o),w=yn(s),E=Un(s)===s,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),_=h||(E||!g?[Ou(s)]:qre(s)),O=y!=="none";!h&&O&&_.push(...Fre(s,g,y,S));const N=[s,..._],R=await Ps(t,b),A=[];let D=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&A.push(R[x]),p){const P=jre(o,a,S);A.push(R[P[0]],R[P[1]])}if(D=[...D,{placement:o,overflows:A}],!A.every(P=>P<=0)){var B,j;const P=(((B=i.flip)==null?void 0:B.index)||0)+1,V=N[P];if(V&&(!(p==="alignment"?w!==yn(V):!1)||D.every(W=>yn(W.placement)===w?W.overflows[0]>0:!0)))return{data:{index:P,overflows:D},reset:{placement:V}};let q=(j=D.filter(G=>G.overflows[0]<=0).sort((G,W)=>G.overflows[1]-W.overflows[1])[0])==null?void 0:j.placement;if(!q)switch(v){case"bestFit":{var M;const G=(M=D.filter(W=>{if(O){const Q=yn(W.placement);return Q===w||Q==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(Q=>Q>0).reduce((Q,z)=>Q+z,0)]).sort((W,Q)=>W[1]-Q[1])[0])==null?void 0:M[0];G&&(q=G);break}case"initialPlacement":q=s;break}if(o!==q)return{reset:{placement:q}}}return{}}}};function vk(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gk(e){return Are.some(t=>e[t]>=0)}const Ure=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Wn(e,t);switch(n){case"referenceHidden":{const i=await Ps(t,{...o,elementContext:"reference"}),a=vk(i,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:gk(a)}}}case"escaped":{const i=await Ps(t,{...o,altBoundary:!0}),a=vk(i,r.floating);return{data:{escapedOffsets:a,escaped:gk(a)}}}default:return{}}}}},iz=new Set(["left","top"]);async function Gre(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=Un(r),s=ua(r),c=yn(r)==="y",u=iz.has(a)?-1:1,d=i&&c?-1:1,p=Wn(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&typeof y=="number"&&(v=s==="end"?y*-1:y),c?{x:v*d,y:h*u}:{x:h*u,y:v*d}}const Kre=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:s}=t,c=await Gre(t,e);return a===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:a}}}}},Yre=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:b=>{let{x,y:w}=b;return{x,y:w}}},...c}=Wn(e,t),u={x:r,y:n},d=await Ps(t,c),p=yn(Un(o)),h=H_(p);let v=u[h],y=u[p];if(i){const b=h==="y"?"top":"left",x=h==="y"?"bottom":"right",w=v+d[b],E=v-d[x];v=qx(w,v,E)}if(a){const b=p==="y"?"top":"left",x=p==="y"?"bottom":"right",w=y+d[b],E=y-d[x];y=qx(w,y,E)}const g=s.fn({...t,[h]:v,[p]:y});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[h]:i,[p]:a}}}}}},Xre=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:u=!0}=Wn(e,t),d={x:r,y:n},p=yn(o),h=H_(p);let v=d[h],y=d[p];const g=Wn(s,t),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const E=h==="y"?"height":"width",S=i.reference[h]-i.floating[E]+b.mainAxis,_=i.reference[h]+i.reference[E]-b.mainAxis;v<S?v=S:v>_&&(v=_)}if(u){var x,w;const E=h==="y"?"width":"height",S=iz.has(Un(o)),_=i.reference[p]-i.floating[E]+(S&&((x=a.offset)==null?void 0:x[p])||0)+(S?0:b.crossAxis),O=i.reference[p]+i.reference[E]+(S?0:((w=a.offset)==null?void 0:w[p])||0)-(S?b.crossAxis:0);y<_?y=_:y>O&&(y=O)}return{[h]:v,[p]:y}}}},Zre=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:c=()=>{},...u}=Wn(e,t),d=await Ps(t,u),p=Un(o),h=ua(o),v=yn(o)==="y",{width:y,height:g}=i.floating;let b,x;p==="top"||p==="bottom"?(b=p,x=h===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(x=p,b=h==="end"?"top":"bottom");const w=g-d.top-d.bottom,E=y-d.left-d.right,S=bo(g-d[b],w),_=bo(y-d[x],E),O=!t.middlewareData.shift;let N=S,R=_;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=E),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=w),O&&!h){const D=xr(d.left,0),B=xr(d.right,0),j=xr(d.top,0),M=xr(d.bottom,0);v?R=y-2*(D!==0||B!==0?D+B:xr(d.left,d.right)):N=g-2*(j!==0||M!==0?j+M:xr(d.top,d.bottom))}await c({...t,availableWidth:R,availableHeight:N});const A=await a.getDimensions(s.floating);return y!==A.width||g!==A.height?{reset:{rects:!0}}:{}}}};function bd(){return typeof window<"u"}function da(e){return az(e)?(e.nodeName||"").toLowerCase():"#document"}function _r(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Rn(e){var t;return(t=(az(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function az(e){return bd()?e instanceof Node||e instanceof _r(e).Node:!1}function rn(e){return bd()?e instanceof Element||e instanceof _r(e).Element:!1}function On(e){return bd()?e instanceof HTMLElement||e instanceof _r(e).HTMLElement:!1}function mk(e){return!bd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof _r(e).ShadowRoot}const Jre=new Set(["inline","contents"]);function Us(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=nn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Jre.has(o)}const Qre=new Set(["table","td","th"]);function ene(e){return Qre.has(da(e))}const tne=[":popover-open",":modal"];function yd(e){return tne.some(t=>{try{return e.matches(t)}catch{return!1}})}const rne=["transform","translate","scale","rotate","perspective"],nne=["transform","translate","scale","rotate","perspective","filter"],one=["paint","layout","strict","content"];function U_(e){const t=G_(),r=rn(e)?nn(e):e;return rne.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||nne.some(n=>(r.willChange||"").includes(n))||one.some(n=>(r.contain||"").includes(n))}function ine(e){let t=yo(e);for(;On(t)&&!ea(t);){if(U_(t))return t;if(yd(t))return null;t=yo(t)}return null}function G_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ane=new Set(["html","body","#document"]);function ea(e){return ane.has(da(e))}function nn(e){return _r(e).getComputedStyle(e)}function wd(e){return rn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yo(e){if(da(e)==="html")return e;const t=e.assignedSlot||e.parentNode||mk(e)&&e.host||Rn(e);return mk(t)?t.host:t}function sz(e){const t=yo(e);return ea(t)?e.ownerDocument?e.ownerDocument.body:e.body:On(t)&&Us(t)?t:sz(t)}function Ts(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=sz(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),a=_r(o);if(i){const s=zx(a);return t.concat(a,a.visualViewport||[],Us(o)?o:[],s&&r?Ts(s):[])}return t.concat(o,Ts(o,[],r))}function zx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lz(e){const t=nn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=On(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=Su(r)!==i||Su(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function K_(e){return rn(e)?e:e.contextElement}function $i(e){const t=K_(e);if(!On(t))return En(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=lz(t);let a=(i?Su(r.width):r.width)/n,s=(i?Su(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const sne=En(0);function cz(e){const t=_r(e);return!G_()||!t.visualViewport?sne:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lne(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==_r(e)?!1:t}function Xo(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=K_(e);let a=En(1);t&&(n?rn(n)&&(a=$i(n)):a=$i(e));const s=lne(i,r,n)?cz(i):En(0);let c=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,d=o.width/a.x,p=o.height/a.y;if(i){const h=_r(i),v=n&&rn(n)?_r(n):n;let y=h,g=zx(y);for(;g&&n&&v!==y;){const b=$i(g),x=g.getBoundingClientRect(),w=nn(g),E=x.left+(g.clientLeft+parseFloat(w.paddingLeft))*b.x,S=x.top+(g.clientTop+parseFloat(w.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,p*=b.y,c+=E,u+=S,y=_r(g),g=zx(y)}}return Cu({width:d,height:p,x:c,y:u})}function xd(e,t){const r=wd(e).scrollLeft;return t?t.left+r:Xo(Rn(e)).left+r}function uz(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-xd(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function cne(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",a=Rn(n),s=t?yd(t.floating):!1;if(n===a||s&&i)return r;let c={scrollLeft:0,scrollTop:0},u=En(1);const d=En(0),p=On(n);if((p||!p&&!i)&&((da(n)!=="body"||Us(a))&&(c=wd(n)),On(n))){const v=Xo(n);u=$i(n),d.x=v.x+n.clientLeft,d.y=v.y+n.clientTop}const h=a&&!p&&!i?uz(a,c):En(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:r.y*u.y-c.scrollTop*u.y+d.y+h.y}}function une(e){return Array.from(e.getClientRects())}function dne(e){const t=Rn(e),r=wd(e),n=e.ownerDocument.body,o=xr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=xr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+xd(e);const s=-r.scrollTop;return nn(n).direction==="rtl"&&(a+=xr(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:s}}const bk=25;function fne(e,t){const r=_r(e),n=Rn(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const d=G_();(!d||d&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}const u=xd(n);if(u<=0){const d=n.ownerDocument,p=d.body,h=getComputedStyle(p),v=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,y=Math.abs(n.clientWidth-p.clientWidth-v);y<=bk&&(i-=y)}else u<=bk&&(i+=u);return{width:i,height:a,x:s,y:c}}const pne=new Set(["absolute","fixed"]);function hne(e,t){const r=Xo(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=On(e)?$i(e):En(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,u=n*i.y;return{width:a,height:s,x:c,y:u}}function yk(e,t,r){let n;if(t==="viewport")n=fne(e,r);else if(t==="document")n=dne(Rn(e));else if(rn(t))n=hne(t,r);else{const o=cz(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Cu(n)}function dz(e,t){const r=yo(e);return r===t||!rn(r)||ea(r)?!1:nn(r).position==="fixed"||dz(r,t)}function vne(e,t){const r=t.get(e);if(r)return r;let n=Ts(e,[],!1).filter(s=>rn(s)&&da(s)!=="body"),o=null;const i=nn(e).position==="fixed";let a=i?yo(e):e;for(;rn(a)&&!ea(a);){const s=nn(a),c=U_(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&pne.has(o.position)||Us(a)&&!c&&dz(e,a))?n=n.filter(d=>d!==a):o=s,a=yo(a)}return t.set(e,n),n}function gne(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?yd(t)?[]:vne(t,this._c):[].concat(r),n],s=a[0],c=a.reduce((u,d)=>{const p=yk(t,d,o);return u.top=xr(p.top,u.top),u.right=bo(p.right,u.right),u.bottom=bo(p.bottom,u.bottom),u.left=xr(p.left,u.left),u},yk(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function mne(e){const{width:t,height:r}=lz(e);return{width:t,height:r}}function bne(e,t,r){const n=On(t),o=Rn(t),i=r==="fixed",a=Xo(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=En(0);function u(){c.x=xd(o)}if(n||!n&&!i)if((da(t)!=="body"||Us(o))&&(s=wd(t)),n){const v=Xo(t,!0,i,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else o&&u();i&&!n&&o&&u();const d=o&&!n&&!i?uz(o,s):En(0),p=a.left+s.scrollLeft-c.x-d.x,h=a.top+s.scrollTop-c.y-d.y;return{x:p,y:h,width:a.width,height:a.height}}function by(e){return nn(e).position==="static"}function wk(e,t){if(!On(e)||nn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Rn(e)===r&&(r=r.ownerDocument.body),r}function fz(e,t){const r=_r(e);if(yd(e))return r;if(!On(e)){let o=yo(e);for(;o&&!ea(o);){if(rn(o)&&!by(o))return o;o=yo(o)}return r}let n=wk(e,t);for(;n&&ene(n)&&by(n);)n=wk(n,t);return n&&ea(n)&&by(n)&&!U_(n)?r:n||ine(e)||r}const yne=async function(e){const t=this.getOffsetParent||fz,r=this.getDimensions,n=await r(e.floating);return{reference:bne(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function wne(e){return nn(e).direction==="rtl"}const xne={convertOffsetParentRelativeRectToViewportRelativeRect:cne,getDocumentElement:Rn,getClippingRect:gne,getOffsetParent:fz,getElementRects:yne,getClientRects:une,getDimensions:mne,getScale:$i,isElement:rn,isRTL:wne};function pz(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function _ne(e,t){let r=null,n;const o=Rn(e);function i(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const u=e.getBoundingClientRect(),{left:d,top:p,width:h,height:v}=u;if(s||t(),!h||!v)return;const y=Tc(p),g=Tc(o.clientWidth-(d+h)),b=Tc(o.clientHeight-(p+v)),x=Tc(d),E={rootMargin:-y+"px "+-g+"px "+-b+"px "+-x+"px",threshold:xr(0,bo(1,c))||1};let S=!0;function _(O){const N=O[0].intersectionRatio;if(N!==c){if(!S)return a();N?a(!1,N):n=setTimeout(()=>{a(!1,1e-7)},1e3)}N===1&&!pz(u,e.getBoundingClientRect())&&a(),S=!1}try{r=new IntersectionObserver(_,{...E,root:o.ownerDocument})}catch{r=new IntersectionObserver(_,E)}r.observe(e)}return a(!0),i}function Ene(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=K_(e),d=o||i?[...u?Ts(u):[],...Ts(t)]:[];d.forEach(x=>{o&&x.addEventListener("scroll",r,{passive:!0}),i&&x.addEventListener("resize",r)});const p=u&&s?_ne(u,r):null;let h=-1,v=null;a&&(v=new ResizeObserver(x=>{let[w]=x;w&&w.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=v)==null||E.observe(t)})),r()}),u&&!c&&v.observe(u),v.observe(t));let y,g=c?Xo(e):null;c&&b();function b(){const x=Xo(e);g&&!pz(g,x)&&r(),g=x,y=requestAnimationFrame(b)}return r(),()=>{var x;d.forEach(w=>{o&&w.removeEventListener("scroll",r),i&&w.removeEventListener("resize",r)}),p==null||p(),(x=v)==null||x.disconnect(),v=null,c&&cancelAnimationFrame(y)}}const Sne=Kre,One=Yre,Cne=Wre,Ine=Zre,Rne=Ure,xk=Vre,Nne=Xre,Pne=(e,t,r)=>{const n=new Map,o={platform:xne,...r},i={...o.platform,_c:n};return Hre(e,t,{...o,platform:i})};var Tne=typeof document<"u",Ane=function(){},eu=Tne?T.useLayoutEffect:Ane;function Iu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Iu(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!Iu(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function hz(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _k(e,t){const r=hz(e);return Math.round(t*r)/r}function yy(e){const t=ue.useRef(e);return eu(()=>{t.current=e}),t}function kne(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[d,p]=ue.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=ue.useState(n);Iu(h,n)||v(n);const[y,g]=ue.useState(null),[b,x]=ue.useState(null),w=ue.useCallback(W=>{W!==O.current&&(O.current=W,g(W))},[]),E=ue.useCallback(W=>{W!==N.current&&(N.current=W,x(W))},[]),S=i||y,_=a||b,O=ue.useRef(null),N=ue.useRef(null),R=ue.useRef(d),A=c!=null,D=yy(c),B=yy(o),j=yy(u),M=ue.useCallback(()=>{if(!O.current||!N.current)return;const W={placement:t,strategy:r,middleware:h};B.current&&(W.platform=B.current),Pne(O.current,N.current,W).then(Q=>{const z={...Q,isPositioned:j.current!==!1};P.current&&!Iu(R.current,z)&&(R.current=z,Ux.flushSync(()=>{p(z)}))})},[h,t,r,B,j]);eu(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,p(W=>({...W,isPositioned:!1})))},[u]);const P=ue.useRef(!1);eu(()=>(P.current=!0,()=>{P.current=!1}),[]),eu(()=>{if(S&&(O.current=S),_&&(N.current=_),S&&_){if(D.current)return D.current(S,_,M);M()}},[S,_,M,D,A]);const V=ue.useMemo(()=>({reference:O,floating:N,setReference:w,setFloating:E}),[w,E]),q=ue.useMemo(()=>({reference:S,floating:_}),[S,_]),G=ue.useMemo(()=>{const W={position:r,left:0,top:0};if(!q.floating)return W;const Q=_k(q.floating,d.x),z=_k(q.floating,d.y);return s?{...W,transform:"translate("+Q+"px, "+z+"px)",...hz(q.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Q,top:z}},[r,s,q.floating,d.x,d.y]);return ue.useMemo(()=>({...d,update:M,refs:V,elements:q,floatingStyles:G}),[d,M,V,q,G])}const Mne=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?xk({element:n.current,padding:o}).fn(r):{}:n?xk({element:n,padding:o}).fn(r):{}}}},Dne=(e,t)=>({...Sne(e),options:[e,t]}),jne=(e,t)=>({...One(e),options:[e,t]}),qne=(e,t)=>({...Nne(e),options:[e,t]}),Lne=(e,t)=>({...Cne(e),options:[e,t]}),zne=(e,t)=>({...Ine(e),options:[e,t]}),Bne=(e,t)=>({...Rne(e),options:[e,t]}),Fne=(e,t)=>({...Mne(e),options:[e,t]});function $ne(e){const t=Hne(e),r=ue.forwardRef((n,o)=>{const{children:i,...a}=n,s=ue.Children.toArray(i),c=s.find(Wne);if(c){const u=c.props.children,d=s.map(p=>p===c?ue.Children.count(u)>1?ue.Children.only(null):ue.isValidElement(u)?u.props.children:null:p);return C.jsx(t,{...a,ref:o,children:ue.isValidElement(u)?ue.cloneElement(u,void 0,d):null})}return C.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function Hne(e){const t=ue.forwardRef((r,n)=>{const{children:o,...i}=r;if(ue.isValidElement(o)){const a=Gne(o),s=Une(i,o.props);return o.type!==ue.Fragment&&(s.ref=n?nz(n,a):a),ue.cloneElement(o,s)}return ue.Children.count(o)>1?ue.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Vne=Symbol("radix.slottable");function Wne(e){return ue.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vne}function Une(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{const c=i(...s);return o(...s),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function Gne(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Kne=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ri=Kne.reduce((e,t)=>{const r=$ne(`Primitive.${t}`),n=ue.forwardRef((o,i)=>{const{asChild:a,...s}=o,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(c,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Yne(e,t){e&&Ux.flushSync(()=>e.dispatchEvent(t))}var Xne="Arrow",vz=ue.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return C.jsx(ri.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:C.jsx("polygon",{points:"0,0 30,0 15,10"})})});vz.displayName=Xne;var Zne=vz;function _d(e){const t=ue.useRef(e);return ue.useEffect(()=>{t.current=e}),ue.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Jne(e){const[t,r]=ue.useState(void 0);return Yo(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;r({width:a,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Y_="Popper",[gz,mz]=rz(Y_),[Qne,bz]=gz(Y_),yz=e=>{const{__scopePopper:t,children:r}=e,[n,o]=ue.useState(null);return C.jsx(Qne,{scope:t,anchor:n,onAnchorChange:o,children:r})};yz.displayName=Y_;var wz="PopperAnchor",xz=ue.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=bz(wz,r),a=ue.useRef(null),s=ca(t,a),c=ue.useRef(null);return ue.useEffect(()=>{const u=c.current;c.current=(n==null?void 0:n.current)||a.current,u!==c.current&&i.onAnchorChange(c.current)}),n?null:C.jsx(ri.div,{...o,ref:s})});xz.displayName=wz;var X_="PopperContent",[eoe,toe]=gz(X_),_z=ue.forwardRef((e,t)=>{var H,Y,oe,re,se,ee;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:y,...g}=e,b=bz(X_,r),[x,w]=ue.useState(null),E=ca(t,we=>w(we)),[S,_]=ue.useState(null),O=Jne(S),N=(O==null?void 0:O.width)??0,R=(O==null?void 0:O.height)??0,A=n+(i!=="center"?"-"+i:""),D=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},B=Array.isArray(u)?u:[u],j=B.length>0,M={padding:D,boundary:B.filter(noe),altBoundary:j},{refs:P,floatingStyles:V,placement:q,isPositioned:G,middlewareData:W}=kne({strategy:"fixed",placement:A,whileElementsMounted:(...we)=>Ene(...we,{animationFrame:v==="always"}),elements:{reference:b.anchor},middleware:[Dne({mainAxis:o+R,alignmentAxis:a}),c&&jne({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?qne():void 0,...M}),c&&Lne({...M}),zne({...M,apply:({elements:we,rects:ve,availableWidth:Ee,availableHeight:pe})=>{const{width:ce,height:Ce}=ve.reference,ke=we.floating.style;ke.setProperty("--radix-popper-available-width",`${Ee}px`),ke.setProperty("--radix-popper-available-height",`${pe}px`),ke.setProperty("--radix-popper-anchor-width",`${ce}px`),ke.setProperty("--radix-popper-anchor-height",`${Ce}px`)}}),S&&Fne({element:S,padding:s}),ooe({arrowWidth:N,arrowHeight:R}),h&&Bne({strategy:"referenceHidden",...M})]}),[Q,z]=Oz(q),U=_d(y);Yo(()=>{G&&(U==null||U())},[G,U]);const ie=(H=W.arrow)==null?void 0:H.x,te=(Y=W.arrow)==null?void 0:Y.y,$=((oe=W.arrow)==null?void 0:oe.centerOffset)!==0,[K,Z]=ue.useState();return Yo(()=>{x&&Z(window.getComputedStyle(x).zIndex)},[x]),C.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:G?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[(re=W.transformOrigin)==null?void 0:re.x,(se=W.transformOrigin)==null?void 0:se.y].join(" "),...((ee=W.hide)==null?void 0:ee.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:C.jsx(eoe,{scope:r,placedSide:Q,onArrowChange:_,arrowX:ie,arrowY:te,shouldHideArrow:$,children:C.jsx(ri.div,{"data-side":Q,"data-align":z,...g,ref:E,style:{...g.style,animation:G?void 0:"none"}})})})});_z.displayName=X_;var Ez="PopperArrow",roe={top:"bottom",right:"left",bottom:"top",left:"right"},Sz=ue.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=toe(Ez,n),a=roe[i.placedSide];return C.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:C.jsx(Zne,{...o,ref:r,style:{...o.style,display:"block"}})})});Sz.displayName=Ez;function noe(e){return e!==null}var ooe=e=>({name:"transformOrigin",options:e,fn(t){var b,x,w;const{placement:r,rects:n,middlewareData:o}=t,a=((b=o.arrow)==null?void 0:b.centerOffset)!==0,s=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,d]=Oz(r),p={start:"0%",center:"50%",end:"100%"}[d],h=(((x=o.arrow)==null?void 0:x.x)??0)+s/2,v=(((w=o.arrow)==null?void 0:w.y)??0)+c/2;let y="",g="";return u==="bottom"?(y=a?p:`${h}px`,g=`${-c}px`):u==="top"?(y=a?p:`${h}px`,g=`${n.floating.height+c}px`):u==="right"?(y=`${-c}px`,g=a?p:`${v}px`):u==="left"&&(y=`${n.floating.width+c}px`,g=a?p:`${v}px`),{data:{x:y,y:g}}}});function Oz(e){const[t,r="center"]=e.split("-");return[t,r]}var ioe=yz,aoe=xz,soe=_z,loe=Sz,coe="Portal",Cz=ue.forwardRef((e,t)=>{var s;const{container:r,...n}=e,[o,i]=ue.useState(!1);Yo(()=>i(!0),[]);const a=r||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?Wx.createPortal(C.jsx(ri.div,{...n,ref:t}),a):null});Cz.displayName=coe;function uoe(e,t){return ue.useReducer((r,n)=>t[r][n]??r,e)}var Z_=e=>{const{present:t,children:r}=e,n=doe(t),o=typeof r=="function"?r({present:n.isPresent}):ue.Children.only(r),i=ca(n.ref,foe(o));return typeof r=="function"||n.isPresent?ue.cloneElement(o,{ref:i}):null};Z_.displayName="Presence";function doe(e){const[t,r]=ue.useState(),n=ue.useRef(null),o=ue.useRef(e),i=ue.useRef("none"),a=e?"mounted":"unmounted",[s,c]=uoe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ue.useEffect(()=>{const u=Ac(n.current);i.current=s==="mounted"?u:"none"},[s]),Yo(()=>{const u=n.current,d=o.current;if(d!==e){const h=i.current,v=Ac(u);e?c("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&h!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Yo(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,p=v=>{const g=Ac(n.current).includes(CSS.escape(v.animationName));if(v.target===t&&g&&(c("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=v=>{v.target===t&&(i.current=Ac(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:ue.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Ac(e){return(e==null?void 0:e.animationName)||"none"}function foe(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function poe(e,t=globalThis==null?void 0:globalThis.document){const r=_d(e);ue.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var hoe="DismissableLayer",Bx="dismissableLayer.update",voe="dismissableLayer.pointerDownOutside",goe="dismissableLayer.focusOutside",Ek,Iz=ue.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rz=ue.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...c}=e,u=ue.useContext(Iz),[d,p]=ue.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=ue.useState({}),y=ca(t,N=>p(N)),g=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(b),w=d?g.indexOf(d):-1,E=u.layersWithOutsidePointerEventsDisabled.size>0,S=w>=x,_=yoe(N=>{const R=N.target,A=[...u.branches].some(D=>D.contains(R));!S||A||(o==null||o(N),a==null||a(N),N.defaultPrevented||s==null||s())},h),O=woe(N=>{const R=N.target;[...u.branches].some(D=>D.contains(R))||(i==null||i(N),a==null||a(N),N.defaultPrevented||s==null||s())},h);return poe(N=>{w===u.layers.size-1&&(n==null||n(N),!N.defaultPrevented&&s&&(N.preventDefault(),s()))},h),ue.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ek=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Sk(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Ek)}},[d,h,r,u]),ue.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Sk())},[d,u]),ue.useEffect(()=>{const N=()=>v({});return document.addEventListener(Bx,N),()=>document.removeEventListener(Bx,N)},[]),C.jsx(ri.div,{...c,ref:y,style:{pointerEvents:E?S?"auto":"none":void 0,...e.style},onFocusCapture:Lr(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Lr(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Lr(e.onPointerDownCapture,_.onPointerDownCapture)})});Rz.displayName=hoe;var moe="DismissableLayerBranch",boe=ue.forwardRef((e,t)=>{const r=ue.useContext(Iz),n=ue.useRef(null),o=ca(t,n);return ue.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),C.jsx(ri.div,{...e,ref:o})});boe.displayName=moe;function yoe(e,t=globalThis==null?void 0:globalThis.document){const r=_d(e),n=ue.useRef(!1),o=ue.useRef(()=>{});return ue.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let c=function(){Nz(voe,r,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function woe(e,t=globalThis==null?void 0:globalThis.document){const r=_d(e),n=ue.useRef(!1);return ue.useEffect(()=>{const o=i=>{i.target&&!n.current&&Nz(goe,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Sk(){const e=new CustomEvent(Bx);document.dispatchEvent(e)}function Nz(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Yne(o,i):o.dispatchEvent(i)}var wy,Ed="HoverCard",[Pz]=rz(Ed,[mz]),Sd=mz(),[xoe,Od]=Pz(Ed),Tz=e=>{const{__scopeHoverCard:t,children:r,open:n,defaultOpen:o,onOpenChange:i,openDelay:a=700,closeDelay:s=300}=e,c=Sd(t),u=ue.useRef(0),d=ue.useRef(0),p=ue.useRef(!1),h=ue.useRef(!1),[v,y]=Nre({prop:n,defaultProp:o??!1,onChange:i,caller:Ed}),g=ue.useCallback(()=>{clearTimeout(d.current),u.current=window.setTimeout(()=>y(!0),a)},[a,y]),b=ue.useCallback(()=>{clearTimeout(u.current),!p.current&&!h.current&&(d.current=window.setTimeout(()=>y(!1),s))},[s,y]),x=ue.useCallback(()=>y(!1),[y]);return ue.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(d.current)},[]),C.jsx(xoe,{scope:t,open:v,onOpenChange:y,onOpen:g,onClose:b,onDismiss:x,hasSelectionRef:p,isPointerDownOnContentRef:h,children:C.jsx(ioe,{...c,children:r})})};Tz.displayName=Ed;var Az="HoverCardTrigger",kz=ue.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,o=Od(Az,r),i=Sd(r);return C.jsx(aoe,{asChild:!0,...i,children:C.jsx(ri.a,{"data-state":o.open?"open":"closed",...n,ref:t,onPointerEnter:Lr(e.onPointerEnter,Nu(o.onOpen)),onPointerLeave:Lr(e.onPointerLeave,Nu(o.onClose)),onFocus:Lr(e.onFocus,o.onOpen),onBlur:Lr(e.onBlur,o.onClose),onTouchStart:Lr(e.onTouchStart,a=>a.preventDefault())})})});kz.displayName=Az;var J_="HoverCardPortal",[_oe,Eoe]=Pz(J_,{forceMount:void 0}),Mz=e=>{const{__scopeHoverCard:t,forceMount:r,children:n,container:o}=e,i=Od(J_,t);return C.jsx(_oe,{scope:t,forceMount:r,children:C.jsx(Z_,{present:r||i.open,children:C.jsx(Cz,{asChild:!0,container:o,children:n})})})};Mz.displayName=J_;var Ru="HoverCardContent",Dz=ue.forwardRef((e,t)=>{const r=Eoe(Ru,e.__scopeHoverCard),{forceMount:n=r.forceMount,...o}=e,i=Od(Ru,e.__scopeHoverCard);return C.jsx(Z_,{present:n||i.open,children:C.jsx(Soe,{"data-state":i.open?"open":"closed",...o,onPointerEnter:Lr(e.onPointerEnter,Nu(i.onOpen)),onPointerLeave:Lr(e.onPointerLeave,Nu(i.onClose)),ref:t})})});Dz.displayName=Ru;var Soe=ue.forwardRef((e,t)=>{const{__scopeHoverCard:r,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,...s}=e,c=Od(Ru,r),u=Sd(r),d=ue.useRef(null),p=ca(t,d),[h,v]=ue.useState(!1);return ue.useEffect(()=>{if(h){const y=document.body;return wy=y.style.userSelect||y.style.webkitUserSelect,y.style.userSelect="none",y.style.webkitUserSelect="none",()=>{y.style.userSelect=wy,y.style.webkitUserSelect=wy}}},[h]),ue.useEffect(()=>{if(d.current){const y=()=>{v(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var b;((b=document.getSelection())==null?void 0:b.toString())!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",y),()=>{document.removeEventListener("pointerup",y),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),ue.useEffect(()=>{d.current&&Ioe(d.current).forEach(g=>g.setAttribute("tabindex","-1"))}),C.jsx(Rz,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:Lr(i,y=>{y.preventDefault()}),onDismiss:c.onDismiss,children:C.jsx(soe,{...u,...s,onPointerDown:Lr(s.onPointerDown,y=>{y.currentTarget.contains(y.target)&&v(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:p,style:{...s.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Ooe="HoverCardArrow",Coe=ue.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,o=Sd(r);return C.jsx(loe,{...o,...n,ref:t})});Coe.displayName=Ooe;function Nu(e){return t=>t.pointerType==="touch"?void 0:e()}function Ioe(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)t.push(r.currentNode);return t}var Q_=Tz,e1=kz,Qr=Mz,en=Dz;const Roe=({item:e,depth:t})=>{const r=Ht(),[n,o]=T.useState(!1),i=r.getPrivileges(),a=de.populateShallow(e.includes,i);return C.jsxs("div",{className:"py-1 text-xs text-white",children:[C.jsxs("div",{className:"flex items-center",children:[C.jsx("button",{className:"-ml-1",onClick:s=>{s.stopPropagation(),o(!n)},children:C.jsx(xe.FdRight,{className:ht("h-4 w-4",{"tranform rotate-90":n})})})," ",C.jsx("div",{children:e.privilege})]}),C.jsx("div",{className:"border-l pl-2",style:{marginLeft:t?t*4:3},children:n&&C.jsx(jz,{depth:t+1,data:a})})]})},jz=({data:e,depth:t=0})=>e.map(r=>r.includes.length?C.jsx(Roe,{item:r,depth:t},r.id):C.jsx("div",{className:ht("py-1 text-xs text-white",{}),children:r.privilege},r.id)),Qt=()=>document.querySelector(`.${g2.ROLES_EDITOR_SCOPE_CLASS}`)||document.body,Cd=({container:e,...t})=>C.jsx(de.Portal,{...t,container:e||Qt()}),Ok=Q_,Ck=e1,Ik=({privilege:e,selectedPrivilege:t,onSelect:r,isGuest:n=!1})=>{const o=Ht(),i=o.getPrivileges(),a=de.populateShallow(e.includes,i),[s,c]=T.useState(!1),[u,d]=T.useState(e.privilege),[p,h]=T.useState(null),v=de.useOutsideClick(()=>{s&&b()});de.useDidMountEffect(()=>{e.privilege!==u&&d(e.privilege)},[e.privilege]);function y(){c(!0),h(null)}function g(){c(!1),d(e.privilege)}function b(){h(null);try{de.validateName(u);const E=de.renamePrivilege(u,e.id,i);o.actions.updatePrivileges(E),c(!1)}catch(E){h(E.message)}}const x=async E=>{E.stopPropagation();const{confirmed:S}=await o.actions.openModal({title:"Delete Privilege",type:de.ModalType.CONFIRM,color:de.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"});if(S){const _=de.removePrivilege(e.id,i);o.actions.updatePrivileges(_),r(null)}},w=T.useMemo(()=>e.resources.some(E=>E.exists===!1),[e]);return C.jsxs(Ok,{openDelay:0,closeDelay:0,children:[C.jsx(Ck,{asChild:!0,children:C.jsxs("div",{className:ht("rounded border bg-grey-300 p-2",{"border-grey-100":(t==null?void 0:t.id)!==e.id,"border-primary-dark":(t==null?void 0:t.id)===e.id,"border-red-400":w&&(t==null?void 0:t.id)!==e.id}),role:"button","data-cy":"privilegeCard",onClick:()=>{r(e)},ref:v,children:[C.jsxs("div",{className:"flex items-center justify-between",children:[C.jsxs("div",{className:"flex flex-1 items-center text-white",children:[C.jsx("span",{className:"mr-4",children:n?C.jsx(xe.FdGuest,{className:"h-6 w-6"}):C.jsx(xe.FdGroup,{className:"h-6 w-6"})}),s?C.jsxs("div",{className:"relative h-6 flex-1 mr-2",children:[C.jsx("input",{autoFocus:!0,onKeyDown:E=>{E.key==="Enter"&&b(),E.key==="Escape"&&g()},type:"text",className:ht("absolute inset-0 h-6 min-w-0 rounded border border-grey-200 bg-grey-300 p-1 text-xs focus:outline-none",{"border-b border-red-400 rounded-b-none":p,"focus:border-primary-dark":!p}),value:u,onChange:E=>d(E.target.value)}),p&&C.jsx("p",{className:"absolute top-5 mt-1 w-full rounded rounded-t-none bg-red-400 p-1 text-xs text-white shadow-md",children:p})]}):C.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",children:u})]}),n?C.jsx("div",{className:"flex items-center justify-center",children:C.jsxs(Ok,{openDelay:0,closeDelay:0,children:[C.jsx(Ck,{asChild:!0,children:C.jsx("span",{children:C.jsx(xe.FdInfoBold,{className:"h-4 w-4 text-grey-50"})})}),C.jsx(Qr,{container:Qt(),children:C.jsx(en,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"the guest privilege must be used to indicate resources accessible without any permission required (e.g. an authenticate function)"})]})})})})]})}):C.jsx("div",{className:"flex items-center space-x-2",children:s?C.jsxs(C.Fragment,{children:[C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:g,children:C.jsx("span",{children:C.jsx(xe.FdClose,{className:"h-4 w-4 text-grey-50"})})}),C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:b,children:C.jsx("span",{children:C.jsx(xe.FdCheckCircle,{className:"h-4 w-4 text-grey-50"})})})]}):C.jsxs(C.Fragment,{children:[C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:y,children:C.jsx("span",{children:C.jsx(xe.FdPen,{className:"h-4 w-4 text-grey-50"})})}),C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:x,children:C.jsx("span",{children:C.jsx(xe.FdTrash,{className:"h-4 w-4 text-grey-50"})})})]})})]}),a.length?C.jsx("div",{className:"ml-[43px]",children:C.jsx(jz,{data:a})}):null]})}),C.jsx(Qr,{container:Qt(),children:C.jsxs(en,{hidden:!w,style:{zIndex:50},avoidCollisions:!0,side:"top",className:"text-red-500 mb-1 flex max-w-xs items-center gap-x-1 rounded bg-negative-200 px-2 py-2 text-s font-semibold",children:[C.jsx(xe.FdBulb,{className:"m-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"This privilege uses non-existing resources"})]})})]})},Noe=({privileges:e,selectPrivilege:t,selectedPrivilege:r})=>{const n=Ht(),o=n.getGuestPrivilege(),i=n.getCatalog(),a=T.useMemo(()=>{if(i===null||!o)return o;const s=H5({guest:o},Object.values((i==null?void 0:i.dataClasses)??{}));return V5(s,i).guest},[e,i]);return C.jsxs("div",{className:"flex flex-1 flex-col gap-y-4 overflow-auto p-4 pb-10 pt-1",children:[a?C.jsx(Ik,{privilege:a,onSelect:t,selectedPrivilege:r,isGuest:!0}):null,Object.entries(e).length?Object.entries(e).filter(([,s])=>s.privilege!=="guest").map(([s,c])=>C.jsx(Ik,{privilege:c,onSelect:t,selectedPrivilege:r},s)):C.jsx("div",{className:"flex h-full items-center justify-center",children:C.jsx("div",{className:"flex flex-1 items-center justify-center bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-grey-200",children:[C.jsx(xe.FdInfoBold,{className:"h-10 w-10"}),C.jsx("div",{className:"font-semibold",children:"There are no privileges"}),C.jsxs("div",{className:"flex items-center text-sm",children:["Create a new Privilege by clicking on the"," ",C.jsx(xe.FdPlus,{className:"ml-2 inline h-4 w-4 text-white"})]})]})})})]})};var kc={exports:{}},Mc={exports:{}},et={};/** @license React v16.13.1
83
+ `):"",this.name="UnsubscriptionError",this.errors=r}});function Dx(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var vd=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,o,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=Ax(a),c=s.next();!c.done;c=s.next()){var u=c.value;u.remove(this)}}catch(g){t={error:g}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}else a.remove(this);var d=this.initialTeardown;if(_n(d))try{d()}catch(g){i=g instanceof fy?g.errors:[g]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var h=Ax(p),v=h.next();!v.done;v=h.next()){var y=v.value;try{FA(y)}catch(g){i=i??[],g instanceof fy?i=Mx(Mx([],kx(i)),kx(g.errors)):i.push(g)}}}catch(g){n={error:g}}finally{try{v&&!v.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}}if(i)throw new fy(i)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)FA(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&Dx(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Dx(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),K5=vd.EMPTY;function Y5(e){return e instanceof vd||e&&"closed"in e&&_n(e.remove)&&_n(e.add)&&_n(e.unsubscribe)}function FA(e){_n(e)?e():e.unsubscribe()}var Vte={Promise:void 0},Wte={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,Mx([e,t],kx(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Ute(e){Wte.setTimeout(function(){throw e})}function $A(){}function Qc(e){e()}var F_=(function(e){Ws(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,Y5(r)&&r.add(n)):n.destination=Yte,n}return t.create=function(r,n,o){return new jx(r,n,o)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(vd),Gte=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){Nc(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){Nc(n)}else Nc(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){Nc(r)}},e})(),jx=(function(e){Ws(t,e);function t(r,n,o){var i=e.call(this)||this,a;return _n(r)||!r?a={next:r??void 0,error:n??void 0,complete:o??void 0}:a=r,i.destination=new Gte(a),i}return t})(F_);function Nc(e){Ute(e)}function Kte(e){throw e}var Yte={closed:!0,next:$A,error:Kte,complete:$A},Xte=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Zte(e){return e}function Jte(e){return e.length===0?Zte:e.length===1?e[0]:function(r){return e.reduce(function(n,o){return o(n)},r)}}var HA=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var o=this,i=ere(t)?t:new jx(t,r,n);return Qc(function(){var a=o,s=a.operator,c=a.source;i.add(s?s.call(i,c):c?o._subscribe(i):o._trySubscribe(i))}),i},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=VA(r),new r(function(o,i){var a=new jx({next:function(s){try{t(s)}catch(c){i(c),a.unsubscribe()}},error:i,complete:o});n.subscribe(a)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[Xte]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Jte(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=VA(t),new t(function(n,o){var i;r.subscribe(function(a){return i=a},function(a){return o(a)},function(){return n(i)})})},e.create=function(t){return new e(t)},e})();function VA(e){var t;return(t=e??Vte.Promise)!==null&&t!==void 0?t:Promise}function Qte(e){return e&&_n(e.next)&&_n(e.error)&&_n(e.complete)}function ere(e){return e&&e instanceof F_||Qte(e)&&Y5(e)}function tre(e){return _n(e==null?void 0:e.lift)}function rre(e){return function(t){if(tre(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function nre(e,t,r,n,o){return new ore(e,t,r,n,o)}var ore=(function(e){Ws(t,e);function t(r,n,o,i,a,s){var c=e.call(this,r)||this;return c.onFinalize=a,c.shouldUnsubscribe=s,c._next=n?function(u){try{n(u)}catch(d){r.error(d)}}:e.prototype._next,c._error=i?function(u){try{i(u)}catch(d){r.error(d)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=o?function(){try{o()}catch(u){r.error(u)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t})(F_),ire=G5(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),X5=(function(e){Ws(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var n=new WA(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new ire},t.prototype.next=function(r){var n=this;Qc(function(){var o,i;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=Ax(n.currentObservers),s=a.next();!s.done;s=a.next()){var c=s.value;c.next(r)}}catch(u){o={error:u}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}}})},t.prototype.error=function(r){var n=this;Qc(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var o=n.observers;o.length;)o.shift().error(r)}})},t.prototype.complete=function(){var r=this;Qc(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,o=this,i=o.hasError,a=o.isStopped,s=o.observers;return i||a?K5:(this.currentObservers=null,s.push(r),new vd(function(){n.currentObservers=null,Dx(s,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,o=n.hasError,i=n.thrownError,a=n.isStopped;o?r.error(i):a&&r.complete()},t.prototype.asObservable=function(){var r=new HA;return r.source=this,r},t.create=function(r,n){return new WA(r,n)},t})(HA),WA=(function(e){Ws(t,e);function t(r,n){var o=e.call(this)||this;return o.destination=r,o.source=n,o}return t.prototype.next=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.next)===null||o===void 0||o.call(n,r)},t.prototype.error=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.error)===null||o===void 0||o.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,o;return(o=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&o!==void 0?o:K5},t})(X5);function are(e,t){return rre(function(r,n){var o=0;r.subscribe(nre(n,function(i){return e.call(t,i,o++)&&n.next(i)}))})}var py={},Ga={},Pc={},UA;function Z5(){if(UA)return Pc;UA=1,Object.defineProperty(Pc,"__esModule",{value:!0}),Pc.default=r;let e;const t=new Uint8Array(16);function r(){if(!e&&(e=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!e))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(t)}return Pc}var Ni={},Ka={},Ya={},GA;function sre(){if(GA)return Ya;GA=1,Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.default=void 0;var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return Ya.default=e,Ya}var KA;function gd(){if(KA)return Ka;KA=1,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.default=void 0;var e=t(sre());function t(o){return o&&o.__esModule?o:{default:o}}function r(o){return typeof o=="string"&&e.default.test(o)}var n=r;return Ka.default=n,Ka}var YA;function md(){if(YA)return Ni;YA=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.default=void 0,Ni.unsafeStringify=n;var e=t(gd());function t(a){return a&&a.__esModule?a:{default:a}}const r=[];for(let a=0;a<256;++a)r.push((a+256).toString(16).slice(1));function n(a,s=0){return r[a[s+0]]+r[a[s+1]]+r[a[s+2]]+r[a[s+3]]+"-"+r[a[s+4]]+r[a[s+5]]+"-"+r[a[s+6]]+r[a[s+7]]+"-"+r[a[s+8]]+r[a[s+9]]+"-"+r[a[s+10]]+r[a[s+11]]+r[a[s+12]]+r[a[s+13]]+r[a[s+14]]+r[a[s+15]]}function o(a,s=0){const c=n(a,s);if(!(0,e.default)(c))throw TypeError("Stringified UUID is invalid");return c}var i=o;return Ni.default=i,Ni}var XA;function lre(){if(XA)return Ga;XA=1,Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.default=void 0;var e=r(Z5()),t=md();function r(u){return u&&u.__esModule?u:{default:u}}let n,o,i=0,a=0;function s(u,d,p){let h=d&&p||0;const v=d||new Array(16);u=u||{};let y=u.node||n,g=u.clockseq!==void 0?u.clockseq:o;if(y==null||g==null){const _=u.random||(u.rng||e.default)();y==null&&(y=n=[_[0]|1,_[1],_[2],_[3],_[4],_[5]]),g==null&&(g=o=(_[6]<<8|_[7])&16383)}let b=u.msecs!==void 0?u.msecs:Date.now(),x=u.nsecs!==void 0?u.nsecs:a+1;const w=b-i+(x-a)/1e4;if(w<0&&u.clockseq===void 0&&(g=g+1&16383),(w<0||b>i)&&u.nsecs===void 0&&(x=0),x>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");i=b,a=x,o=g,b+=122192928e5;const E=((b&268435455)*1e4+x)%4294967296;v[h++]=E>>>24&255,v[h++]=E>>>16&255,v[h++]=E>>>8&255,v[h++]=E&255;const S=b/4294967296*1e4&268435455;v[h++]=S>>>8&255,v[h++]=S&255,v[h++]=S>>>24&15|16,v[h++]=S>>>16&255,v[h++]=g>>>8|128,v[h++]=g&255;for(let _=0;_<6;++_)v[h+_]=y[_];return d||(0,t.unsafeStringify)(v)}var c=s;return Ga.default=c,Ga}var Xa={},fo={},Za={},ZA;function J5(){if(ZA)return Za;ZA=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.default=void 0;var e=t(gd());function t(o){return o&&o.__esModule?o:{default:o}}function r(o){if(!(0,e.default)(o))throw TypeError("Invalid UUID");let i;const a=new Uint8Array(16);return a[0]=(i=parseInt(o.slice(0,8),16))>>>24,a[1]=i>>>16&255,a[2]=i>>>8&255,a[3]=i&255,a[4]=(i=parseInt(o.slice(9,13),16))>>>8,a[5]=i&255,a[6]=(i=parseInt(o.slice(14,18),16))>>>8,a[7]=i&255,a[8]=(i=parseInt(o.slice(19,23),16))>>>8,a[9]=i&255,a[10]=(i=parseInt(o.slice(24,36),16))/1099511627776&255,a[11]=i/4294967296&255,a[12]=i>>>24&255,a[13]=i>>>16&255,a[14]=i>>>8&255,a[15]=i&255,a}var n=r;return Za.default=n,Za}var JA;function Q5(){if(JA)return fo;JA=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.URL=fo.DNS=void 0,fo.default=a;var e=md(),t=r(J5());function r(s){return s&&s.__esModule?s:{default:s}}function n(s){s=unescape(encodeURIComponent(s));const c=[];for(let u=0;u<s.length;++u)c.push(s.charCodeAt(u));return c}const o="6ba7b810-9dad-11d1-80b4-00c04fd430c8";fo.DNS=o;const i="6ba7b811-9dad-11d1-80b4-00c04fd430c8";fo.URL=i;function a(s,c,u){function d(p,h,v,y){var g;if(typeof p=="string"&&(p=n(p)),typeof h=="string"&&(h=(0,t.default)(h)),((g=h)===null||g===void 0?void 0:g.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let b=new Uint8Array(16+p.length);if(b.set(h),b.set(p,h.length),b=u(b),b[6]=b[6]&15|c,b[8]=b[8]&63|128,v){y=y||0;for(let x=0;x<16;++x)v[y+x]=b[x];return v}return(0,e.unsafeStringify)(b)}try{d.name=s}catch{}return d.DNS=o,d.URL=i,d}return fo}var Ja={},QA;function cre(){if(QA)return Ja;QA=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.default=void 0;function e(v){if(typeof v=="string"){const y=unescape(encodeURIComponent(v));v=new Uint8Array(y.length);for(let g=0;g<y.length;++g)v[g]=y.charCodeAt(g)}return t(n(o(v),v.length*8))}function t(v){const y=[],g=v.length*32,b="0123456789abcdef";for(let x=0;x<g;x+=8){const w=v[x>>5]>>>x%32&255,E=parseInt(b.charAt(w>>>4&15)+b.charAt(w&15),16);y.push(E)}return y}function r(v){return(v+64>>>9<<4)+14+1}function n(v,y){v[y>>5]|=128<<y%32,v[r(y)-1]=y;let g=1732584193,b=-271733879,x=-1732584194,w=271733878;for(let E=0;E<v.length;E+=16){const S=g,_=b,O=x,N=w;g=c(g,b,x,w,v[E],7,-680876936),w=c(w,g,b,x,v[E+1],12,-389564586),x=c(x,w,g,b,v[E+2],17,606105819),b=c(b,x,w,g,v[E+3],22,-1044525330),g=c(g,b,x,w,v[E+4],7,-176418897),w=c(w,g,b,x,v[E+5],12,1200080426),x=c(x,w,g,b,v[E+6],17,-1473231341),b=c(b,x,w,g,v[E+7],22,-45705983),g=c(g,b,x,w,v[E+8],7,1770035416),w=c(w,g,b,x,v[E+9],12,-1958414417),x=c(x,w,g,b,v[E+10],17,-42063),b=c(b,x,w,g,v[E+11],22,-1990404162),g=c(g,b,x,w,v[E+12],7,1804603682),w=c(w,g,b,x,v[E+13],12,-40341101),x=c(x,w,g,b,v[E+14],17,-1502002290),b=c(b,x,w,g,v[E+15],22,1236535329),g=u(g,b,x,w,v[E+1],5,-165796510),w=u(w,g,b,x,v[E+6],9,-1069501632),x=u(x,w,g,b,v[E+11],14,643717713),b=u(b,x,w,g,v[E],20,-373897302),g=u(g,b,x,w,v[E+5],5,-701558691),w=u(w,g,b,x,v[E+10],9,38016083),x=u(x,w,g,b,v[E+15],14,-660478335),b=u(b,x,w,g,v[E+4],20,-405537848),g=u(g,b,x,w,v[E+9],5,568446438),w=u(w,g,b,x,v[E+14],9,-1019803690),x=u(x,w,g,b,v[E+3],14,-187363961),b=u(b,x,w,g,v[E+8],20,1163531501),g=u(g,b,x,w,v[E+13],5,-1444681467),w=u(w,g,b,x,v[E+2],9,-51403784),x=u(x,w,g,b,v[E+7],14,1735328473),b=u(b,x,w,g,v[E+12],20,-1926607734),g=d(g,b,x,w,v[E+5],4,-378558),w=d(w,g,b,x,v[E+8],11,-2022574463),x=d(x,w,g,b,v[E+11],16,1839030562),b=d(b,x,w,g,v[E+14],23,-35309556),g=d(g,b,x,w,v[E+1],4,-1530992060),w=d(w,g,b,x,v[E+4],11,1272893353),x=d(x,w,g,b,v[E+7],16,-155497632),b=d(b,x,w,g,v[E+10],23,-1094730640),g=d(g,b,x,w,v[E+13],4,681279174),w=d(w,g,b,x,v[E],11,-358537222),x=d(x,w,g,b,v[E+3],16,-722521979),b=d(b,x,w,g,v[E+6],23,76029189),g=d(g,b,x,w,v[E+9],4,-640364487),w=d(w,g,b,x,v[E+12],11,-421815835),x=d(x,w,g,b,v[E+15],16,530742520),b=d(b,x,w,g,v[E+2],23,-995338651),g=p(g,b,x,w,v[E],6,-198630844),w=p(w,g,b,x,v[E+7],10,1126891415),x=p(x,w,g,b,v[E+14],15,-1416354905),b=p(b,x,w,g,v[E+5],21,-57434055),g=p(g,b,x,w,v[E+12],6,1700485571),w=p(w,g,b,x,v[E+3],10,-1894986606),x=p(x,w,g,b,v[E+10],15,-1051523),b=p(b,x,w,g,v[E+1],21,-2054922799),g=p(g,b,x,w,v[E+8],6,1873313359),w=p(w,g,b,x,v[E+15],10,-30611744),x=p(x,w,g,b,v[E+6],15,-1560198380),b=p(b,x,w,g,v[E+13],21,1309151649),g=p(g,b,x,w,v[E+4],6,-145523070),w=p(w,g,b,x,v[E+11],10,-1120210379),x=p(x,w,g,b,v[E+2],15,718787259),b=p(b,x,w,g,v[E+9],21,-343485551),g=i(g,S),b=i(b,_),x=i(x,O),w=i(w,N)}return[g,b,x,w]}function o(v){if(v.length===0)return[];const y=v.length*8,g=new Uint32Array(r(y));for(let b=0;b<y;b+=8)g[b>>5]|=(v[b/8]&255)<<b%32;return g}function i(v,y){const g=(v&65535)+(y&65535);return(v>>16)+(y>>16)+(g>>16)<<16|g&65535}function a(v,y){return v<<y|v>>>32-y}function s(v,y,g,b,x,w){return i(a(i(i(y,v),i(b,w)),x),g)}function c(v,y,g,b,x,w,E){return s(y&g|~y&b,v,y,x,w,E)}function u(v,y,g,b,x,w,E){return s(y&b|g&~b,v,y,x,w,E)}function d(v,y,g,b,x,w,E){return s(y^g^b,v,y,x,w,E)}function p(v,y,g,b,x,w,E){return s(g^(y|~b),v,y,x,w,E)}var h=e;return Ja.default=h,Ja}var ek;function ure(){if(ek)return Xa;ek=1,Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.default=void 0;var e=r(Q5()),t=r(cre());function r(i){return i&&i.__esModule?i:{default:i}}var o=(0,e.default)("v3",48,t.default);return Xa.default=o,Xa}var Qa={},es={},tk;function dre(){if(tk)return es;tk=1,Object.defineProperty(es,"__esModule",{value:!0}),es.default=void 0;var t={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};return es.default=t,es}var rk;function fre(){if(rk)return Qa;rk=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.default=void 0;var e=n(dre()),t=n(Z5()),r=md();function n(a){return a&&a.__esModule?a:{default:a}}function o(a,s,c){if(e.default.randomUUID&&!s&&!a)return e.default.randomUUID();a=a||{};const u=a.random||(a.rng||t.default)();if(u[6]=u[6]&15|64,u[8]=u[8]&63|128,s){c=c||0;for(let d=0;d<16;++d)s[c+d]=u[d];return s}return(0,r.unsafeStringify)(u)}var i=o;return Qa.default=i,Qa}var ts={},rs={},nk;function pre(){if(nk)return rs;nk=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.default=void 0;function e(o,i,a,s){switch(o){case 0:return i&a^~i&s;case 1:return i^a^s;case 2:return i&a^i&s^a&s;case 3:return i^a^s}}function t(o,i){return o<<i|o>>>32-i}function r(o){const i=[1518500249,1859775393,2400959708,3395469782],a=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof o=="string"){const d=unescape(encodeURIComponent(o));o=[];for(let p=0;p<d.length;++p)o.push(d.charCodeAt(p))}else Array.isArray(o)||(o=Array.prototype.slice.call(o));o.push(128);const s=o.length/4+2,c=Math.ceil(s/16),u=new Array(c);for(let d=0;d<c;++d){const p=new Uint32Array(16);for(let h=0;h<16;++h)p[h]=o[d*64+h*4]<<24|o[d*64+h*4+1]<<16|o[d*64+h*4+2]<<8|o[d*64+h*4+3];u[d]=p}u[c-1][14]=(o.length-1)*8/Math.pow(2,32),u[c-1][14]=Math.floor(u[c-1][14]),u[c-1][15]=(o.length-1)*8&4294967295;for(let d=0;d<c;++d){const p=new Uint32Array(80);for(let x=0;x<16;++x)p[x]=u[d][x];for(let x=16;x<80;++x)p[x]=t(p[x-3]^p[x-8]^p[x-14]^p[x-16],1);let h=a[0],v=a[1],y=a[2],g=a[3],b=a[4];for(let x=0;x<80;++x){const w=Math.floor(x/20),E=t(h,5)+e(w,v,y,g)+b+i[w]+p[x]>>>0;b=g,g=y,y=t(v,30)>>>0,v=h,h=E}a[0]=a[0]+h>>>0,a[1]=a[1]+v>>>0,a[2]=a[2]+y>>>0,a[3]=a[3]+g>>>0,a[4]=a[4]+b>>>0}return[a[0]>>24&255,a[0]>>16&255,a[0]>>8&255,a[0]&255,a[1]>>24&255,a[1]>>16&255,a[1]>>8&255,a[1]&255,a[2]>>24&255,a[2]>>16&255,a[2]>>8&255,a[2]&255,a[3]>>24&255,a[3]>>16&255,a[3]>>8&255,a[3]&255,a[4]>>24&255,a[4]>>16&255,a[4]>>8&255,a[4]&255]}var n=r;return rs.default=n,rs}var ok;function hre(){if(ok)return ts;ok=1,Object.defineProperty(ts,"__esModule",{value:!0}),ts.default=void 0;var e=r(Q5()),t=r(pre());function r(i){return i&&i.__esModule?i:{default:i}}var o=(0,e.default)("v5",80,t.default);return ts.default=o,ts}var ns={},ik;function vre(){if(ik)return ns;ik=1,Object.defineProperty(ns,"__esModule",{value:!0}),ns.default=void 0;var e="00000000-0000-0000-0000-000000000000";return ns.default=e,ns}var os={},ak;function gre(){if(ak)return os;ak=1,Object.defineProperty(os,"__esModule",{value:!0}),os.default=void 0;var e=t(gd());function t(o){return o&&o.__esModule?o:{default:o}}function r(o){if(!(0,e.default)(o))throw TypeError("Invalid UUID");return parseInt(o.slice(14,15),16)}var n=r;return os.default=n,os}var sk;function mre(){return sk||(sk=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NIL",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"v1",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"v3",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"v4",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"v5",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"validate",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return a.default}});var t=d(lre()),r=d(ure()),n=d(fre()),o=d(hre()),i=d(vre()),a=d(gre()),s=d(gd()),c=d(md()),u=d(J5());function d(p){return p&&p.__esModule?p:{default:p}}})(py)),py}var hy,lk;function bre(){if(lk)return hy;lk=1;function e(t,r){if(!t||!r||!t.length||!r.length)throw new Error("Bad alphabet");this.srcAlphabet=t,this.dstAlphabet=r}return e.prototype.convert=function(t){var r,n,o,i={},a=this.srcAlphabet.length,s=this.dstAlphabet.length,c=t.length,u=typeof t=="string"?"":[];if(!this.isValid(t))throw new Error('Number "'+t+'" contains of non-alphabetic digits ('+this.srcAlphabet+")");if(this.srcAlphabet===this.dstAlphabet)return t;for(r=0;r<c;r++)i[r]=this.srcAlphabet.indexOf(t[r]);do{for(n=0,o=0,r=0;r<c;r++)n=n*a+i[r],n>=s?(i[o++]=parseInt(n/s,10),n=n%s):o>0&&(i[o++]=0);c=o,u=this.dstAlphabet.slice(n,n+1).concat(u)}while(o!==0);return u},e.prototype.isValid=function(t){for(var r=0;r<t.length;++r)if(this.srcAlphabet.indexOf(t[r])===-1)return!1;return!0},hy=e,hy}var vy,ck;function yre(){if(ck)return vy;ck=1;var e=bre();function t(r,n){var o=new e(r,n);return function(i){return o.convert(i)}}return t.BIN="01",t.OCT="01234567",t.DEC="0123456789",t.HEX="0123456789abcdef",vy=t,vy}var gy,uk;function wre(){if(uk)return gy;uk=1;const{v4:e,validate:t}=mre(),r=yre(),n={cookieBase90:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",flickrBase58:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",uuid25Base36:"0123456789abcdefghijklmnopqrstuvwxyz"},o={consistentLength:!0};let i;const a=(u,d,p)=>{const h=d(u.toLowerCase().replace(/-/g,""));return!p||!p.consistentLength?h:h.padStart(p.shortIdLength,p.paddingChar)},s=(u,d)=>{const h=d(u).padStart(32,"0").match(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);return[h[1],h[2],h[3],h[4],h[5]].join("-")},c=u=>Math.ceil(Math.log(2**128)/Math.log(u));return gy=(()=>{const u=(d,p)=>{const h=d||n.flickrBase58,v={...o,...p};if([...new Set(Array.from(h))].length!==h.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const y=c(h.length),g={shortIdLength:y,consistentLength:v.consistentLength,paddingChar:h[0]},b=r(r.HEX,h),x=r(h,r.HEX),w=()=>a(e(),b,g),S={alphabet:h,fromUUID:_=>a(_,b,g),maxLength:y,generate:w,new:w,toUUID:_=>s(_,x),uuid:e,validate:(_,O=!1)=>{if(!_||typeof _!="string")return!1;const N=v.consistentLength?_.length===y:_.length<=y,R=_.split("").every(A=>h.includes(A));return O===!1?N&&R:N&&R&&t(s(_,x))}};return Object.freeze(S),S};return u.constants=n,u.uuid=e,u.generate=()=>(i||(i=u(n.flickrBase58).generate),i()),u})(),gy}var ez=wre();const tz=new X5;function xre(e,t){switch(t.type){case"UPDATE_STATE":return{...e,...t.payload};case"UPDATE_ROLES":return{...e,roles:t.payload,flags:{...e.flags,touched:!0}};case"UPDATE_PRIVILEGES":return{...e,privileges:t.payload,flags:{...e.flags,touched:!0}};case"SET_ROLES_CONTENT":{const{content:r,flags:n={},...o}=t.payload,i=de.sanitizeRoles(r),a={...e.flags,...n};return{...e,...i,...o,flags:a}}case"TOGGLE_TAB":return{...e,selectedTab:t.payload};case"TOGGLE_FORCE_LOGIN":return e.forceLogin===t.payload?e:{...e,forceLogin:t.payload,flags:{...e.flags,touched:!0}};case"TOGGLE_RESTRICTED_BY_DEFAULT":return e.restrictedByDefault===t.payload?e:{...e,restrictedByDefault:t.payload,flags:{...e.flags,touched:!0}};case"SET_FLAGS":return{...e,flags:{...e.flags,...t.payload}};case"CREATE_MODAL":return{...e,modals:{...e.modals,list:[...e.modals.list,t.payload]}};case"REMOVE_MODAL":return{...e,modals:{...e.modals,list:e.modals.list.filter(r=>r.id!==t.payload)}};case"CLOSE_MODAL":{const{id:r,reason:n}=t.payload;let o;if(n)if(e.modals.list.find(a=>a.id===r))o={...e,modals:{...e.modals,list:e.modals.list.map(a=>a.id===r?{...a,closeReason:n,isOpen:!1}:a)}};else return e;else o={...e,modals:{...e.modals,list:e.modals.list.filter(i=>i.id!==r)}};return tz.next(o.modals),o}case"EDIT_MODAL":{const{id:r,...n}=t.payload;return e.modals.list.find(i=>i.id===r)?{...e,modals:{...e.modals,list:e.modals.list.map(i=>i.id===r?{...i,...n}:i)}}:e}default:return e}}const $_=T.createContext(null),_re=()=>({roles:{},privileges:{},flags:{touched:!1},date:void 0,selectedTab:"roles",forceLogin:!1,restrictedByDefault:!1,modals:{list:[]}}),Ere=({children:e,catalog:t=null,qodly:r=!1,catalogMethods:n=[],dataclasses:o={},singletons:i={},onSetTabFlags:a,initialState:s})=>{const[c,u]=T.useReducer(xre,{..._re(),...s});de.useDidMountEffect(()=>{!s||ca.isEqual(c,s)||u({type:"UPDATE_STATE",payload:s})},[s]);const d=T.useMemo(()=>({catalog:t,qodly:r,catalogMethods:n,dataclasses:o,singletons:i,onSetTabFlags:a}),[t,r,n,o,i,a]);return C.jsx($_.Provider,{value:{state:c,dispatch:u,external:d},children:e})};function Sre(){const e=T.useContext($_);if(!e)throw new Error("useReducerAdapter must be used within a ReducerAdapterProvider");const{state:t,dispatch:r,external:n}=e,o=T.useMemo(()=>de.rolesToAPI({roles:t.roles,privileges:t.privileges,forceLogin:t.forceLogin,restrictedByDefault:t.restrictedByDefault}),[t.roles,t.privileges,t.forceLogin,t.restrictedByDefault]);return{getRoles:T.useCallback(()=>t.roles,[t.roles]),getPrivileges:T.useCallback(()=>t.privileges,[t.privileges]),getRolesFlags:T.useCallback(()=>t.flags,[t.flags]),getRolesAndPrivileges:T.useCallback(()=>o,[o]),getCatalog:T.useCallback(()=>n.catalog??null,[n.catalog]),getQodly:T.useCallback(()=>n.qodly,[n.qodly]),getSelectedTab:T.useCallback(()=>t.selectedTab,[t.selectedTab]),getForceLogin:T.useCallback(()=>t.forceLogin??!1,[t.forceLogin]),getRestrictedByDefault:T.useCallback(()=>t.restrictedByDefault??!1,[t.restrictedByDefault]),getGuestPrivilege:T.useCallback(()=>Object.values(t.privileges).find(({privilege:i})=>i==="guest")??null,[t.privileges]),actions:{updateRoles:T.useCallback(i=>{r({type:"UPDATE_ROLES",payload:i})},[]),updatePrivileges:T.useCallback(i=>{r({type:"UPDATE_PRIVILEGES",payload:i})},[]),setRolesContent:T.useCallback(i=>{r({type:"SET_ROLES_CONTENT",payload:i})},[]),toggleTab:T.useCallback(i=>{r({type:"TOGGLE_TAB",payload:i})},[]),toggleForceLogin:T.useCallback(i=>{r({type:"TOGGLE_FORCE_LOGIN",payload:i})},[]),toggleRestrictedByDefault:T.useCallback(i=>{r({type:"TOGGLE_RESTRICTED_BY_DEFAULT",payload:i})},[]),setTabFlags:T.useCallback((i,a)=>{n.onSetTabFlags&&n.onSetTabFlags(i,a)},[n.onSetTabFlags]),openModal:T.useCallback(async i=>{const{type:a=de.ModalType.ALERT}=i,s=ez.generate();return r({type:"CREATE_MODAL",payload:{id:s,type:a,isOpen:!0,...i}}),a===de.ModalType.CONFIRM?new Promise(c=>{const u=tz.pipe(are(d=>{const p=d.list.find(h=>h.id===s);return p!==void 0&&!p.isOpen})).subscribe(d=>{var h;const p=d.list.find(v=>v.id===s);if(p){const v=p.closeReason===de.ModalCloseReason.CONFIRMED,y=ca.entries(((h=p.views)==null?void 0:h.toggles)||{}).reduce((g,b)=>({...g,[b[0]]:b[1].value}),{});r({type:"REMOVE_MODAL",payload:s}),u.unsubscribe(),c({confirmed:v,options:y})}})}):{confirmed:!1}},[r])},getCatalogMethods:T.useCallback(()=>n.catalogMethods,[n.catalogMethods]),getDataclasses:T.useCallback(()=>n.dataclasses,[n.dataclasses]),getSingletons:T.useCallback(()=>n.singletons,[n.singletons])}}function Ore(){const e=T.useContext($_);if(!e)throw new Error("useModals must be used within a ReducerAdapterProvider");const{state:t,dispatch:r}=e;return{modals:t.modals.list,closeModal:T.useCallback(n=>{r({type:"CLOSE_MODAL",payload:n})},[r]),editModal:T.useCallback(n=>{r({type:"EDIT_MODAL",payload:n})},[r]),removeModal:T.useCallback(n=>{r({type:"REMOVE_MODAL",payload:n})},[r])}}const my=({child:e,parent:t,status:r,onSelect:n,currentPrivilegeId:o})=>{const i=Ht(),a=i.getPrivileges();function s(){const u=de.addPrivilegeIn(t.id,e.id,a);i.actions.updatePrivileges(u)}function c(){const u=de.removePrivilegeFrom(t.id,e.id,a);i.actions.updatePrivileges(u)}return C.jsxs("div",{className:ht("inline-flex cursor-pointer items-center gap-1 space-x-1 rounded px-2 py-0.5",{"bg-primary-dark text-white":r==="included","bg-grey-300 text-grey-100":r!=="included","opacity-40":r==="disabled"}),children:[C.jsx("span",{onClick:()=>n(o),className:"text-xs hover:underline",children:e.privilege}),r==="included"?C.jsx("button",{onClick:c,children:C.jsx("span",{className:"text-[13px]",children:C.jsx(xe.FdPlus,{className:"rotate-45 transform text-white"})})}):C.jsx("button",{disabled:r==="disabled",onClick:s,className:"opacity-70 disabled:cursor-not-allowed",children:C.jsx("span",{className:"text-[13px]",children:C.jsx(xe.FdPlus,{className:"text-white"})})})]})},Cre=({selectedPrivilege:e,privileges:t,onSelect:r,setShowIncluded:n,showIncluded:o})=>{const i=Object.values(t),a=de.getPrivilegeById(e.id,t);let s=a?de.populateShallow(a.includes,t):[],c=a?de.populateShallow(de.parents(a.id,t),t):[],u=a?de.populateShallow(de.allowed(a.id,t),t):[];return[s,c,u]=[s,c,u].map(d=>d.filter(p=>(p==null?void 0:p.privilege)!=="guest")),i.length<2&&s.length+c.length+u.length===0?null:C.jsxs("div",{className:"w-full border-b border-grey-900 p-4",children:[C.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[" ",i.length>2?C.jsx("h4",{className:"text-[13px] font-semibold text-white",children:"Include a privilege"}):C.jsx("div",{}),C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx(de.ControlledSwitch,{onChange:()=>n(!o),value:o}),C.jsxs("label",{className:"text-xs text-[#F6F6F6]",children:[" ","Show inherited permissions"]})]})]}),C.jsxs("div",{className:"flex flex-wrap items-start justify-start gap-1",children:[s.map(d=>C.jsx(my,{child:d,parent:e,status:"included",onSelect:r,currentPrivilegeId:d.id},d.id)),u.map(d=>C.jsx(my,{child:d,parent:e,status:"available",onSelect:r,currentPrivilegeId:d.id},d.id)),c.map(d=>C.jsx(my,{child:d,parent:e,status:"disabled",onSelect:r,currentPrivilegeId:d.id},d.id))]})]})};function Lr(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function rz(e,t=[]){let r=[];function n(i,a){const s=ue.createContext(a),c=r.length;r=[...r,a];const u=p=>{var x;const{scope:h,children:v,...y}=p,g=((x=h==null?void 0:h[e])==null?void 0:x[c])||s,b=ue.useMemo(()=>y,Object.values(y));return C.jsx(g.Provider,{value:b,children:v})};u.displayName=i+"Provider";function d(p,h){var g;const v=((g=h==null?void 0:h[e])==null?void 0:g[c])||s,y=ue.useContext(v);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=r.map(a=>ue.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return ue.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[n,Ire(o,...t)]}function Ire(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:c,scopeName:u})=>{const p=c(i)[`__scope${u}`];return{...s,...p}},{});return ue.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}var Yo=globalThis!=null&&globalThis.document?ue.useLayoutEffect:()=>{},Rre=ue[" useInsertionEffect ".trim().toString()]||Yo;function Nre({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,i,a]=Pre({defaultProp:t,onChange:r}),s=e!==void 0,c=s?e:o;{const d=ue.useRef(e!==void 0);ue.useEffect(()=>{const p=d.current;p!==s&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=s},[s,n])}const u=ue.useCallback(d=>{var p;if(s){const h=Tre(d)?d(e):d;h!==e&&((p=a.current)==null||p.call(a,h))}else i(d)},[s,e,i,a]);return[c,u]}function Pre({defaultProp:e,onChange:t}){const[r,n]=ue.useState(e),o=ue.useRef(r),i=ue.useRef(t);return Rre(()=>{i.current=t},[t]),ue.useEffect(()=>{var a;o.current!==r&&((a=i.current)==null||a.call(i,r),o.current=r)},[r,o]),[r,n,i]}function Tre(e){return typeof e=="function"}function dk(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function nz(...e){return t=>{let r=!1;const n=e.map(o=>{const i=dk(o,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let o=0;o<n.length;o++){const i=n[o];typeof i=="function"?i():dk(e[o],null)}}}}function ua(...e){return ue.useCallback(nz(...e),e)}const Are=["top","right","bottom","left"],bo=Math.min,xr=Math.max,Su=Math.round,Tc=Math.floor,En=e=>({x:e,y:e}),kre={left:"right",right:"left",bottom:"top",top:"bottom"},Mre={start:"end",end:"start"};function qx(e,t,r){return xr(e,bo(t,r))}function Wn(e,t){return typeof e=="function"?e(t):e}function Un(e){return e.split("-")[0]}function da(e){return e.split("-")[1]}function H_(e){return e==="x"?"y":"x"}function V_(e){return e==="y"?"height":"width"}const Dre=new Set(["top","bottom"]);function yn(e){return Dre.has(Un(e))?"y":"x"}function W_(e){return H_(yn(e))}function jre(e,t,r){r===void 0&&(r=!1);const n=da(e),o=W_(e),i=V_(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ou(a)),[a,Ou(a)]}function qre(e){const t=Ou(e);return[Lx(e),t,Lx(t)]}function Lx(e){return e.replace(/start|end/g,t=>Mre[t])}const fk=["left","right"],pk=["right","left"],Lre=["top","bottom"],zre=["bottom","top"];function Bre(e,t,r){switch(e){case"top":case"bottom":return r?t?pk:fk:t?fk:pk;case"left":case"right":return t?Lre:zre;default:return[]}}function Fre(e,t,r,n){const o=da(e);let i=Bre(Un(e),r==="start",n);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Lx)))),i}function Ou(e){return e.replace(/left|right|bottom|top/g,t=>kre[t])}function $re(e){return{top:0,right:0,bottom:0,left:0,...e}}function oz(e){return typeof e!="number"?$re(e):{top:e,right:e,bottom:e,left:e}}function Cu(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function hk(e,t,r){let{reference:n,floating:o}=e;const i=yn(t),a=W_(t),s=V_(a),c=Un(t),u=i==="y",d=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,h=n[s]/2-o[s]/2;let v;switch(c){case"top":v={x:d,y:n.y-o.height};break;case"bottom":v={x:d,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:p};break;case"left":v={x:n.x-o.width,y:p};break;default:v={x:n.x,y:n.y}}switch(da(t)){case"start":v[a]-=h*(r&&u?-1:1);break;case"end":v[a]+=h*(r&&u?-1:1);break}return v}const Hre=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:p}=hk(u,n,c),h=n,v={},y=0;for(let g=0;g<s.length;g++){const{name:b,fn:x}=s[g],{x:w,y:E,data:S,reset:_}=await x({x:d,y:p,initialPlacement:n,placement:h,strategy:o,middlewareData:v,rects:u,platform:a,elements:{reference:e,floating:t}});d=w??d,p=E??p,v={...v,[b]:{...v[b],...S}},_&&y<=50&&(y++,typeof _=="object"&&(_.placement&&(h=_.placement),_.rects&&(u=_.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:d,y:p}=hk(u,h,c)),g=-1)}return{x:d,y:p,placement:h,strategy:o,middlewareData:v}};async function Ts(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:h=!1,padding:v=0}=Wn(t,e),y=oz(v),b=s[h?p==="floating"?"reference":"floating":p],x=Cu(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:c})),w=p==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),S=await(i.isElement==null?void 0:i.isElement(E))?await(i.getScale==null?void 0:i.getScale(E))||{x:1,y:1}:{x:1,y:1},_=Cu(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:E,strategy:c}):w);return{top:(x.top-_.top+y.top)/S.y,bottom:(_.bottom-x.bottom+y.bottom)/S.y,left:(x.left-_.left+y.left)/S.x,right:(_.right-x.right+y.right)/S.x}}const Vre=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:a,elements:s,middlewareData:c}=t,{element:u,padding:d=0}=Wn(e,t)||{};if(u==null)return{};const p=oz(d),h={x:r,y:n},v=W_(o),y=V_(v),g=await a.getDimensions(u),b=v==="y",x=b?"top":"left",w=b?"bottom":"right",E=b?"clientHeight":"clientWidth",S=i.reference[y]+i.reference[v]-h[v]-i.floating[y],_=h[v]-i.reference[v],O=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let N=O?O[E]:0;(!N||!await(a.isElement==null?void 0:a.isElement(O)))&&(N=s.floating[E]||i.floating[y]);const R=S/2-_/2,A=N/2-g[y]/2-1,D=bo(p[x],A),B=bo(p[w],A),j=D,M=N-g[y]-B,P=N/2-g[y]/2+R,V=qx(j,P,M),q=!c.arrow&&da(o)!=null&&P!==V&&i.reference[y]/2-(P<j?D:B)-g[y]/2<0,G=q?P<j?P-j:P-M:0;return{[v]:h[v]+G,data:{[v]:V,centerOffset:P-V-G,...q&&{alignmentOffset:G}},reset:q}}}),Wre=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...b}=Wn(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const x=Un(o),w=yn(s),E=Un(s)===s,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),_=h||(E||!g?[Ou(s)]:qre(s)),O=y!=="none";!h&&O&&_.push(...Fre(s,g,y,S));const N=[s,..._],R=await Ts(t,b),A=[];let D=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&A.push(R[x]),p){const P=jre(o,a,S);A.push(R[P[0]],R[P[1]])}if(D=[...D,{placement:o,overflows:A}],!A.every(P=>P<=0)){var B,j;const P=(((B=i.flip)==null?void 0:B.index)||0)+1,V=N[P];if(V&&(!(p==="alignment"?w!==yn(V):!1)||D.every(W=>yn(W.placement)===w?W.overflows[0]>0:!0)))return{data:{index:P,overflows:D},reset:{placement:V}};let q=(j=D.filter(G=>G.overflows[0]<=0).sort((G,W)=>G.overflows[1]-W.overflows[1])[0])==null?void 0:j.placement;if(!q)switch(v){case"bestFit":{var M;const G=(M=D.filter(W=>{if(O){const Q=yn(W.placement);return Q===w||Q==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(Q=>Q>0).reduce((Q,z)=>Q+z,0)]).sort((W,Q)=>W[1]-Q[1])[0])==null?void 0:M[0];G&&(q=G);break}case"initialPlacement":q=s;break}if(o!==q)return{reset:{placement:q}}}return{}}}};function vk(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gk(e){return Are.some(t=>e[t]>=0)}const Ure=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Wn(e,t);switch(n){case"referenceHidden":{const i=await Ts(t,{...o,elementContext:"reference"}),a=vk(i,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:gk(a)}}}case"escaped":{const i=await Ts(t,{...o,altBoundary:!0}),a=vk(i,r.floating);return{data:{escapedOffsets:a,escaped:gk(a)}}}default:return{}}}}},iz=new Set(["left","top"]);async function Gre(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=Un(r),s=da(r),c=yn(r)==="y",u=iz.has(a)?-1:1,d=i&&c?-1:1,p=Wn(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&typeof y=="number"&&(v=s==="end"?y*-1:y),c?{x:v*d,y:h*u}:{x:h*u,y:v*d}}const Kre=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:s}=t,c=await Gre(t,e);return a===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:a}}}}},Yre=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:b=>{let{x,y:w}=b;return{x,y:w}}},...c}=Wn(e,t),u={x:r,y:n},d=await Ts(t,c),p=yn(Un(o)),h=H_(p);let v=u[h],y=u[p];if(i){const b=h==="y"?"top":"left",x=h==="y"?"bottom":"right",w=v+d[b],E=v-d[x];v=qx(w,v,E)}if(a){const b=p==="y"?"top":"left",x=p==="y"?"bottom":"right",w=y+d[b],E=y-d[x];y=qx(w,y,E)}const g=s.fn({...t,[h]:v,[p]:y});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[h]:i,[p]:a}}}}}},Xre=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:u=!0}=Wn(e,t),d={x:r,y:n},p=yn(o),h=H_(p);let v=d[h],y=d[p];const g=Wn(s,t),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const E=h==="y"?"height":"width",S=i.reference[h]-i.floating[E]+b.mainAxis,_=i.reference[h]+i.reference[E]-b.mainAxis;v<S?v=S:v>_&&(v=_)}if(u){var x,w;const E=h==="y"?"width":"height",S=iz.has(Un(o)),_=i.reference[p]-i.floating[E]+(S&&((x=a.offset)==null?void 0:x[p])||0)+(S?0:b.crossAxis),O=i.reference[p]+i.reference[E]+(S?0:((w=a.offset)==null?void 0:w[p])||0)-(S?b.crossAxis:0);y<_?y=_:y>O&&(y=O)}return{[h]:v,[p]:y}}}},Zre=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:c=()=>{},...u}=Wn(e,t),d=await Ts(t,u),p=Un(o),h=da(o),v=yn(o)==="y",{width:y,height:g}=i.floating;let b,x;p==="top"||p==="bottom"?(b=p,x=h===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(x=p,b=h==="end"?"top":"bottom");const w=g-d.top-d.bottom,E=y-d.left-d.right,S=bo(g-d[b],w),_=bo(y-d[x],E),O=!t.middlewareData.shift;let N=S,R=_;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=E),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=w),O&&!h){const D=xr(d.left,0),B=xr(d.right,0),j=xr(d.top,0),M=xr(d.bottom,0);v?R=y-2*(D!==0||B!==0?D+B:xr(d.left,d.right)):N=g-2*(j!==0||M!==0?j+M:xr(d.top,d.bottom))}await c({...t,availableWidth:R,availableHeight:N});const A=await a.getDimensions(s.floating);return y!==A.width||g!==A.height?{reset:{rects:!0}}:{}}}};function bd(){return typeof window<"u"}function fa(e){return az(e)?(e.nodeName||"").toLowerCase():"#document"}function _r(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Rn(e){var t;return(t=(az(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function az(e){return bd()?e instanceof Node||e instanceof _r(e).Node:!1}function rn(e){return bd()?e instanceof Element||e instanceof _r(e).Element:!1}function On(e){return bd()?e instanceof HTMLElement||e instanceof _r(e).HTMLElement:!1}function mk(e){return!bd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof _r(e).ShadowRoot}const Jre=new Set(["inline","contents"]);function Us(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=nn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Jre.has(o)}const Qre=new Set(["table","td","th"]);function ene(e){return Qre.has(fa(e))}const tne=[":popover-open",":modal"];function yd(e){return tne.some(t=>{try{return e.matches(t)}catch{return!1}})}const rne=["transform","translate","scale","rotate","perspective"],nne=["transform","translate","scale","rotate","perspective","filter"],one=["paint","layout","strict","content"];function U_(e){const t=G_(),r=rn(e)?nn(e):e;return rne.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||nne.some(n=>(r.willChange||"").includes(n))||one.some(n=>(r.contain||"").includes(n))}function ine(e){let t=yo(e);for(;On(t)&&!ea(t);){if(U_(t))return t;if(yd(t))return null;t=yo(t)}return null}function G_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ane=new Set(["html","body","#document"]);function ea(e){return ane.has(fa(e))}function nn(e){return _r(e).getComputedStyle(e)}function wd(e){return rn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yo(e){if(fa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||mk(e)&&e.host||Rn(e);return mk(t)?t.host:t}function sz(e){const t=yo(e);return ea(t)?e.ownerDocument?e.ownerDocument.body:e.body:On(t)&&Us(t)?t:sz(t)}function As(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=sz(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),a=_r(o);if(i){const s=zx(a);return t.concat(a,a.visualViewport||[],Us(o)?o:[],s&&r?As(s):[])}return t.concat(o,As(o,[],r))}function zx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lz(e){const t=nn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=On(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=Su(r)!==i||Su(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function K_(e){return rn(e)?e:e.contextElement}function $i(e){const t=K_(e);if(!On(t))return En(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=lz(t);let a=(i?Su(r.width):r.width)/n,s=(i?Su(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const sne=En(0);function cz(e){const t=_r(e);return!G_()||!t.visualViewport?sne:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lne(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==_r(e)?!1:t}function Xo(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=K_(e);let a=En(1);t&&(n?rn(n)&&(a=$i(n)):a=$i(e));const s=lne(i,r,n)?cz(i):En(0);let c=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,d=o.width/a.x,p=o.height/a.y;if(i){const h=_r(i),v=n&&rn(n)?_r(n):n;let y=h,g=zx(y);for(;g&&n&&v!==y;){const b=$i(g),x=g.getBoundingClientRect(),w=nn(g),E=x.left+(g.clientLeft+parseFloat(w.paddingLeft))*b.x,S=x.top+(g.clientTop+parseFloat(w.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,p*=b.y,c+=E,u+=S,y=_r(g),g=zx(y)}}return Cu({width:d,height:p,x:c,y:u})}function xd(e,t){const r=wd(e).scrollLeft;return t?t.left+r:Xo(Rn(e)).left+r}function uz(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-xd(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function cne(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",a=Rn(n),s=t?yd(t.floating):!1;if(n===a||s&&i)return r;let c={scrollLeft:0,scrollTop:0},u=En(1);const d=En(0),p=On(n);if((p||!p&&!i)&&((fa(n)!=="body"||Us(a))&&(c=wd(n)),On(n))){const v=Xo(n);u=$i(n),d.x=v.x+n.clientLeft,d.y=v.y+n.clientTop}const h=a&&!p&&!i?uz(a,c):En(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:r.y*u.y-c.scrollTop*u.y+d.y+h.y}}function une(e){return Array.from(e.getClientRects())}function dne(e){const t=Rn(e),r=wd(e),n=e.ownerDocument.body,o=xr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=xr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+xd(e);const s=-r.scrollTop;return nn(n).direction==="rtl"&&(a+=xr(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:s}}const bk=25;function fne(e,t){const r=_r(e),n=Rn(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const d=G_();(!d||d&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}const u=xd(n);if(u<=0){const d=n.ownerDocument,p=d.body,h=getComputedStyle(p),v=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,y=Math.abs(n.clientWidth-p.clientWidth-v);y<=bk&&(i-=y)}else u<=bk&&(i+=u);return{width:i,height:a,x:s,y:c}}const pne=new Set(["absolute","fixed"]);function hne(e,t){const r=Xo(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=On(e)?$i(e):En(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,u=n*i.y;return{width:a,height:s,x:c,y:u}}function yk(e,t,r){let n;if(t==="viewport")n=fne(e,r);else if(t==="document")n=dne(Rn(e));else if(rn(t))n=hne(t,r);else{const o=cz(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Cu(n)}function dz(e,t){const r=yo(e);return r===t||!rn(r)||ea(r)?!1:nn(r).position==="fixed"||dz(r,t)}function vne(e,t){const r=t.get(e);if(r)return r;let n=As(e,[],!1).filter(s=>rn(s)&&fa(s)!=="body"),o=null;const i=nn(e).position==="fixed";let a=i?yo(e):e;for(;rn(a)&&!ea(a);){const s=nn(a),c=U_(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&pne.has(o.position)||Us(a)&&!c&&dz(e,a))?n=n.filter(d=>d!==a):o=s,a=yo(a)}return t.set(e,n),n}function gne(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?yd(t)?[]:vne(t,this._c):[].concat(r),n],s=a[0],c=a.reduce((u,d)=>{const p=yk(t,d,o);return u.top=xr(p.top,u.top),u.right=bo(p.right,u.right),u.bottom=bo(p.bottom,u.bottom),u.left=xr(p.left,u.left),u},yk(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function mne(e){const{width:t,height:r}=lz(e);return{width:t,height:r}}function bne(e,t,r){const n=On(t),o=Rn(t),i=r==="fixed",a=Xo(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=En(0);function u(){c.x=xd(o)}if(n||!n&&!i)if((fa(t)!=="body"||Us(o))&&(s=wd(t)),n){const v=Xo(t,!0,i,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else o&&u();i&&!n&&o&&u();const d=o&&!n&&!i?uz(o,s):En(0),p=a.left+s.scrollLeft-c.x-d.x,h=a.top+s.scrollTop-c.y-d.y;return{x:p,y:h,width:a.width,height:a.height}}function by(e){return nn(e).position==="static"}function wk(e,t){if(!On(e)||nn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Rn(e)===r&&(r=r.ownerDocument.body),r}function fz(e,t){const r=_r(e);if(yd(e))return r;if(!On(e)){let o=yo(e);for(;o&&!ea(o);){if(rn(o)&&!by(o))return o;o=yo(o)}return r}let n=wk(e,t);for(;n&&ene(n)&&by(n);)n=wk(n,t);return n&&ea(n)&&by(n)&&!U_(n)?r:n||ine(e)||r}const yne=async function(e){const t=this.getOffsetParent||fz,r=this.getDimensions,n=await r(e.floating);return{reference:bne(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function wne(e){return nn(e).direction==="rtl"}const xne={convertOffsetParentRelativeRectToViewportRelativeRect:cne,getDocumentElement:Rn,getClippingRect:gne,getOffsetParent:fz,getElementRects:yne,getClientRects:une,getDimensions:mne,getScale:$i,isElement:rn,isRTL:wne};function pz(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function _ne(e,t){let r=null,n;const o=Rn(e);function i(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const u=e.getBoundingClientRect(),{left:d,top:p,width:h,height:v}=u;if(s||t(),!h||!v)return;const y=Tc(p),g=Tc(o.clientWidth-(d+h)),b=Tc(o.clientHeight-(p+v)),x=Tc(d),E={rootMargin:-y+"px "+-g+"px "+-b+"px "+-x+"px",threshold:xr(0,bo(1,c))||1};let S=!0;function _(O){const N=O[0].intersectionRatio;if(N!==c){if(!S)return a();N?a(!1,N):n=setTimeout(()=>{a(!1,1e-7)},1e3)}N===1&&!pz(u,e.getBoundingClientRect())&&a(),S=!1}try{r=new IntersectionObserver(_,{...E,root:o.ownerDocument})}catch{r=new IntersectionObserver(_,E)}r.observe(e)}return a(!0),i}function Ene(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=K_(e),d=o||i?[...u?As(u):[],...As(t)]:[];d.forEach(x=>{o&&x.addEventListener("scroll",r,{passive:!0}),i&&x.addEventListener("resize",r)});const p=u&&s?_ne(u,r):null;let h=-1,v=null;a&&(v=new ResizeObserver(x=>{let[w]=x;w&&w.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=v)==null||E.observe(t)})),r()}),u&&!c&&v.observe(u),v.observe(t));let y,g=c?Xo(e):null;c&&b();function b(){const x=Xo(e);g&&!pz(g,x)&&r(),g=x,y=requestAnimationFrame(b)}return r(),()=>{var x;d.forEach(w=>{o&&w.removeEventListener("scroll",r),i&&w.removeEventListener("resize",r)}),p==null||p(),(x=v)==null||x.disconnect(),v=null,c&&cancelAnimationFrame(y)}}const Sne=Kre,One=Yre,Cne=Wre,Ine=Zre,Rne=Ure,xk=Vre,Nne=Xre,Pne=(e,t,r)=>{const n=new Map,o={platform:xne,...r},i={...o.platform,_c:n};return Hre(e,t,{...o,platform:i})};var Tne=typeof document<"u",Ane=function(){},eu=Tne?T.useLayoutEffect:Ane;function Iu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Iu(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!Iu(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function hz(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _k(e,t){const r=hz(e);return Math.round(t*r)/r}function yy(e){const t=ue.useRef(e);return eu(()=>{t.current=e}),t}function kne(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[d,p]=ue.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=ue.useState(n);Iu(h,n)||v(n);const[y,g]=ue.useState(null),[b,x]=ue.useState(null),w=ue.useCallback(W=>{W!==O.current&&(O.current=W,g(W))},[]),E=ue.useCallback(W=>{W!==N.current&&(N.current=W,x(W))},[]),S=i||y,_=a||b,O=ue.useRef(null),N=ue.useRef(null),R=ue.useRef(d),A=c!=null,D=yy(c),B=yy(o),j=yy(u),M=ue.useCallback(()=>{if(!O.current||!N.current)return;const W={placement:t,strategy:r,middleware:h};B.current&&(W.platform=B.current),Pne(O.current,N.current,W).then(Q=>{const z={...Q,isPositioned:j.current!==!1};P.current&&!Iu(R.current,z)&&(R.current=z,Ux.flushSync(()=>{p(z)}))})},[h,t,r,B,j]);eu(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,p(W=>({...W,isPositioned:!1})))},[u]);const P=ue.useRef(!1);eu(()=>(P.current=!0,()=>{P.current=!1}),[]),eu(()=>{if(S&&(O.current=S),_&&(N.current=_),S&&_){if(D.current)return D.current(S,_,M);M()}},[S,_,M,D,A]);const V=ue.useMemo(()=>({reference:O,floating:N,setReference:w,setFloating:E}),[w,E]),q=ue.useMemo(()=>({reference:S,floating:_}),[S,_]),G=ue.useMemo(()=>{const W={position:r,left:0,top:0};if(!q.floating)return W;const Q=_k(q.floating,d.x),z=_k(q.floating,d.y);return s?{...W,transform:"translate("+Q+"px, "+z+"px)",...hz(q.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Q,top:z}},[r,s,q.floating,d.x,d.y]);return ue.useMemo(()=>({...d,update:M,refs:V,elements:q,floatingStyles:G}),[d,M,V,q,G])}const Mne=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?xk({element:n.current,padding:o}).fn(r):{}:n?xk({element:n,padding:o}).fn(r):{}}}},Dne=(e,t)=>({...Sne(e),options:[e,t]}),jne=(e,t)=>({...One(e),options:[e,t]}),qne=(e,t)=>({...Nne(e),options:[e,t]}),Lne=(e,t)=>({...Cne(e),options:[e,t]}),zne=(e,t)=>({...Ine(e),options:[e,t]}),Bne=(e,t)=>({...Rne(e),options:[e,t]}),Fne=(e,t)=>({...Mne(e),options:[e,t]});function $ne(e){const t=Hne(e),r=ue.forwardRef((n,o)=>{const{children:i,...a}=n,s=ue.Children.toArray(i),c=s.find(Wne);if(c){const u=c.props.children,d=s.map(p=>p===c?ue.Children.count(u)>1?ue.Children.only(null):ue.isValidElement(u)?u.props.children:null:p);return C.jsx(t,{...a,ref:o,children:ue.isValidElement(u)?ue.cloneElement(u,void 0,d):null})}return C.jsx(t,{...a,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}function Hne(e){const t=ue.forwardRef((r,n)=>{const{children:o,...i}=r;if(ue.isValidElement(o)){const a=Gne(o),s=Une(i,o.props);return o.type!==ue.Fragment&&(s.ref=n?nz(n,a):a),ue.cloneElement(o,s)}return ue.Children.count(o)>1?ue.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Vne=Symbol("radix.slottable");function Wne(e){return ue.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vne}function Une(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{const c=i(...s);return o(...s),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function Gne(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Kne=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ri=Kne.reduce((e,t)=>{const r=$ne(`Primitive.${t}`),n=ue.forwardRef((o,i)=>{const{asChild:a,...s}=o,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(c,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Yne(e,t){e&&Ux.flushSync(()=>e.dispatchEvent(t))}var Xne="Arrow",vz=ue.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return C.jsx(ri.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:C.jsx("polygon",{points:"0,0 30,0 15,10"})})});vz.displayName=Xne;var Zne=vz;function _d(e){const t=ue.useRef(e);return ue.useEffect(()=>{t.current=e}),ue.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Jne(e){const[t,r]=ue.useState(void 0);return Yo(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;r({width:a,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Y_="Popper",[gz,mz]=rz(Y_),[Qne,bz]=gz(Y_),yz=e=>{const{__scopePopper:t,children:r}=e,[n,o]=ue.useState(null);return C.jsx(Qne,{scope:t,anchor:n,onAnchorChange:o,children:r})};yz.displayName=Y_;var wz="PopperAnchor",xz=ue.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=bz(wz,r),a=ue.useRef(null),s=ua(t,a),c=ue.useRef(null);return ue.useEffect(()=>{const u=c.current;c.current=(n==null?void 0:n.current)||a.current,u!==c.current&&i.onAnchorChange(c.current)}),n?null:C.jsx(ri.div,{...o,ref:s})});xz.displayName=wz;var X_="PopperContent",[eoe,toe]=gz(X_),_z=ue.forwardRef((e,t)=>{var H,Y,oe,re,se,ee;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:y,...g}=e,b=bz(X_,r),[x,w]=ue.useState(null),E=ua(t,we=>w(we)),[S,_]=ue.useState(null),O=Jne(S),N=(O==null?void 0:O.width)??0,R=(O==null?void 0:O.height)??0,A=n+(i!=="center"?"-"+i:""),D=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},B=Array.isArray(u)?u:[u],j=B.length>0,M={padding:D,boundary:B.filter(noe),altBoundary:j},{refs:P,floatingStyles:V,placement:q,isPositioned:G,middlewareData:W}=kne({strategy:"fixed",placement:A,whileElementsMounted:(...we)=>Ene(...we,{animationFrame:v==="always"}),elements:{reference:b.anchor},middleware:[Dne({mainAxis:o+R,alignmentAxis:a}),c&&jne({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?qne():void 0,...M}),c&&Lne({...M}),zne({...M,apply:({elements:we,rects:ve,availableWidth:Ee,availableHeight:pe})=>{const{width:ce,height:Ce}=ve.reference,ke=we.floating.style;ke.setProperty("--radix-popper-available-width",`${Ee}px`),ke.setProperty("--radix-popper-available-height",`${pe}px`),ke.setProperty("--radix-popper-anchor-width",`${ce}px`),ke.setProperty("--radix-popper-anchor-height",`${Ce}px`)}}),S&&Fne({element:S,padding:s}),ooe({arrowWidth:N,arrowHeight:R}),h&&Bne({strategy:"referenceHidden",...M})]}),[Q,z]=Oz(q),U=_d(y);Yo(()=>{G&&(U==null||U())},[G,U]);const ie=(H=W.arrow)==null?void 0:H.x,te=(Y=W.arrow)==null?void 0:Y.y,$=((oe=W.arrow)==null?void 0:oe.centerOffset)!==0,[K,Z]=ue.useState();return Yo(()=>{x&&Z(window.getComputedStyle(x).zIndex)},[x]),C.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:G?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[(re=W.transformOrigin)==null?void 0:re.x,(se=W.transformOrigin)==null?void 0:se.y].join(" "),...((ee=W.hide)==null?void 0:ee.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:C.jsx(eoe,{scope:r,placedSide:Q,onArrowChange:_,arrowX:ie,arrowY:te,shouldHideArrow:$,children:C.jsx(ri.div,{"data-side":Q,"data-align":z,...g,ref:E,style:{...g.style,animation:G?void 0:"none"}})})})});_z.displayName=X_;var Ez="PopperArrow",roe={top:"bottom",right:"left",bottom:"top",left:"right"},Sz=ue.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=toe(Ez,n),a=roe[i.placedSide];return C.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:C.jsx(Zne,{...o,ref:r,style:{...o.style,display:"block"}})})});Sz.displayName=Ez;function noe(e){return e!==null}var ooe=e=>({name:"transformOrigin",options:e,fn(t){var b,x,w;const{placement:r,rects:n,middlewareData:o}=t,a=((b=o.arrow)==null?void 0:b.centerOffset)!==0,s=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,d]=Oz(r),p={start:"0%",center:"50%",end:"100%"}[d],h=(((x=o.arrow)==null?void 0:x.x)??0)+s/2,v=(((w=o.arrow)==null?void 0:w.y)??0)+c/2;let y="",g="";return u==="bottom"?(y=a?p:`${h}px`,g=`${-c}px`):u==="top"?(y=a?p:`${h}px`,g=`${n.floating.height+c}px`):u==="right"?(y=`${-c}px`,g=a?p:`${v}px`):u==="left"&&(y=`${n.floating.width+c}px`,g=a?p:`${v}px`),{data:{x:y,y:g}}}});function Oz(e){const[t,r="center"]=e.split("-");return[t,r]}var ioe=yz,aoe=xz,soe=_z,loe=Sz,coe="Portal",Cz=ue.forwardRef((e,t)=>{var s;const{container:r,...n}=e,[o,i]=ue.useState(!1);Yo(()=>i(!0),[]);const a=r||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?Wx.createPortal(C.jsx(ri.div,{...n,ref:t}),a):null});Cz.displayName=coe;function uoe(e,t){return ue.useReducer((r,n)=>t[r][n]??r,e)}var Z_=e=>{const{present:t,children:r}=e,n=doe(t),o=typeof r=="function"?r({present:n.isPresent}):ue.Children.only(r),i=ua(n.ref,foe(o));return typeof r=="function"||n.isPresent?ue.cloneElement(o,{ref:i}):null};Z_.displayName="Presence";function doe(e){const[t,r]=ue.useState(),n=ue.useRef(null),o=ue.useRef(e),i=ue.useRef("none"),a=e?"mounted":"unmounted",[s,c]=uoe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ue.useEffect(()=>{const u=Ac(n.current);i.current=s==="mounted"?u:"none"},[s]),Yo(()=>{const u=n.current,d=o.current;if(d!==e){const h=i.current,v=Ac(u);e?c("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&h!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Yo(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,p=v=>{const g=Ac(n.current).includes(CSS.escape(v.animationName));if(v.target===t&&g&&(c("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=v=>{v.target===t&&(i.current=Ac(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:ue.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Ac(e){return(e==null?void 0:e.animationName)||"none"}function foe(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function poe(e,t=globalThis==null?void 0:globalThis.document){const r=_d(e);ue.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var hoe="DismissableLayer",Bx="dismissableLayer.update",voe="dismissableLayer.pointerDownOutside",goe="dismissableLayer.focusOutside",Ek,Iz=ue.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rz=ue.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...c}=e,u=ue.useContext(Iz),[d,p]=ue.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=ue.useState({}),y=ua(t,N=>p(N)),g=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(b),w=d?g.indexOf(d):-1,E=u.layersWithOutsidePointerEventsDisabled.size>0,S=w>=x,_=yoe(N=>{const R=N.target,A=[...u.branches].some(D=>D.contains(R));!S||A||(o==null||o(N),a==null||a(N),N.defaultPrevented||s==null||s())},h),O=woe(N=>{const R=N.target;[...u.branches].some(D=>D.contains(R))||(i==null||i(N),a==null||a(N),N.defaultPrevented||s==null||s())},h);return poe(N=>{w===u.layers.size-1&&(n==null||n(N),!N.defaultPrevented&&s&&(N.preventDefault(),s()))},h),ue.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ek=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Sk(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Ek)}},[d,h,r,u]),ue.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Sk())},[d,u]),ue.useEffect(()=>{const N=()=>v({});return document.addEventListener(Bx,N),()=>document.removeEventListener(Bx,N)},[]),C.jsx(ri.div,{...c,ref:y,style:{pointerEvents:E?S?"auto":"none":void 0,...e.style},onFocusCapture:Lr(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Lr(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Lr(e.onPointerDownCapture,_.onPointerDownCapture)})});Rz.displayName=hoe;var moe="DismissableLayerBranch",boe=ue.forwardRef((e,t)=>{const r=ue.useContext(Iz),n=ue.useRef(null),o=ua(t,n);return ue.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),C.jsx(ri.div,{...e,ref:o})});boe.displayName=moe;function yoe(e,t=globalThis==null?void 0:globalThis.document){const r=_d(e),n=ue.useRef(!1),o=ue.useRef(()=>{});return ue.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let c=function(){Nz(voe,r,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function woe(e,t=globalThis==null?void 0:globalThis.document){const r=_d(e),n=ue.useRef(!1);return ue.useEffect(()=>{const o=i=>{i.target&&!n.current&&Nz(goe,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Sk(){const e=new CustomEvent(Bx);document.dispatchEvent(e)}function Nz(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Yne(o,i):o.dispatchEvent(i)}var wy,Ed="HoverCard",[Pz]=rz(Ed,[mz]),Sd=mz(),[xoe,Od]=Pz(Ed),Tz=e=>{const{__scopeHoverCard:t,children:r,open:n,defaultOpen:o,onOpenChange:i,openDelay:a=700,closeDelay:s=300}=e,c=Sd(t),u=ue.useRef(0),d=ue.useRef(0),p=ue.useRef(!1),h=ue.useRef(!1),[v,y]=Nre({prop:n,defaultProp:o??!1,onChange:i,caller:Ed}),g=ue.useCallback(()=>{clearTimeout(d.current),u.current=window.setTimeout(()=>y(!0),a)},[a,y]),b=ue.useCallback(()=>{clearTimeout(u.current),!p.current&&!h.current&&(d.current=window.setTimeout(()=>y(!1),s))},[s,y]),x=ue.useCallback(()=>y(!1),[y]);return ue.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(d.current)},[]),C.jsx(xoe,{scope:t,open:v,onOpenChange:y,onOpen:g,onClose:b,onDismiss:x,hasSelectionRef:p,isPointerDownOnContentRef:h,children:C.jsx(ioe,{...c,children:r})})};Tz.displayName=Ed;var Az="HoverCardTrigger",kz=ue.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,o=Od(Az,r),i=Sd(r);return C.jsx(aoe,{asChild:!0,...i,children:C.jsx(ri.a,{"data-state":o.open?"open":"closed",...n,ref:t,onPointerEnter:Lr(e.onPointerEnter,Nu(o.onOpen)),onPointerLeave:Lr(e.onPointerLeave,Nu(o.onClose)),onFocus:Lr(e.onFocus,o.onOpen),onBlur:Lr(e.onBlur,o.onClose),onTouchStart:Lr(e.onTouchStart,a=>a.preventDefault())})})});kz.displayName=Az;var J_="HoverCardPortal",[_oe,Eoe]=Pz(J_,{forceMount:void 0}),Mz=e=>{const{__scopeHoverCard:t,forceMount:r,children:n,container:o}=e,i=Od(J_,t);return C.jsx(_oe,{scope:t,forceMount:r,children:C.jsx(Z_,{present:r||i.open,children:C.jsx(Cz,{asChild:!0,container:o,children:n})})})};Mz.displayName=J_;var Ru="HoverCardContent",Dz=ue.forwardRef((e,t)=>{const r=Eoe(Ru,e.__scopeHoverCard),{forceMount:n=r.forceMount,...o}=e,i=Od(Ru,e.__scopeHoverCard);return C.jsx(Z_,{present:n||i.open,children:C.jsx(Soe,{"data-state":i.open?"open":"closed",...o,onPointerEnter:Lr(e.onPointerEnter,Nu(i.onOpen)),onPointerLeave:Lr(e.onPointerLeave,Nu(i.onClose)),ref:t})})});Dz.displayName=Ru;var Soe=ue.forwardRef((e,t)=>{const{__scopeHoverCard:r,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,...s}=e,c=Od(Ru,r),u=Sd(r),d=ue.useRef(null),p=ua(t,d),[h,v]=ue.useState(!1);return ue.useEffect(()=>{if(h){const y=document.body;return wy=y.style.userSelect||y.style.webkitUserSelect,y.style.userSelect="none",y.style.webkitUserSelect="none",()=>{y.style.userSelect=wy,y.style.webkitUserSelect=wy}}},[h]),ue.useEffect(()=>{if(d.current){const y=()=>{v(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var b;((b=document.getSelection())==null?void 0:b.toString())!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",y),()=>{document.removeEventListener("pointerup",y),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),ue.useEffect(()=>{d.current&&Ioe(d.current).forEach(g=>g.setAttribute("tabindex","-1"))}),C.jsx(Rz,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:Lr(i,y=>{y.preventDefault()}),onDismiss:c.onDismiss,children:C.jsx(soe,{...u,...s,onPointerDown:Lr(s.onPointerDown,y=>{y.currentTarget.contains(y.target)&&v(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:p,style:{...s.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Ooe="HoverCardArrow",Coe=ue.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,o=Sd(r);return C.jsx(loe,{...o,...n,ref:t})});Coe.displayName=Ooe;function Nu(e){return t=>t.pointerType==="touch"?void 0:e()}function Ioe(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)t.push(r.currentNode);return t}var Q_=Tz,e1=kz,Qr=Mz,en=Dz;const Roe=({item:e,depth:t})=>{const r=Ht(),[n,o]=T.useState(!1),i=r.getPrivileges(),a=de.populateShallow(e.includes,i);return C.jsxs("div",{className:"py-1 text-xs text-white",children:[C.jsxs("div",{className:"flex items-center",children:[C.jsx("button",{className:"-ml-1",onClick:s=>{s.stopPropagation(),o(!n)},children:C.jsx(xe.FdRight,{className:ht("h-4 w-4",{"tranform rotate-90":n})})})," ",C.jsx("div",{children:e.privilege})]}),C.jsx("div",{className:"border-l pl-2",style:{marginLeft:t?t*4:3},children:n&&C.jsx(jz,{depth:t+1,data:a})})]})},jz=({data:e,depth:t=0})=>e.map(r=>r.includes.length?C.jsx(Roe,{item:r,depth:t},r.id):C.jsx("div",{className:ht("py-1 text-xs text-white",{}),children:r.privilege},r.id)),Qt=()=>document.querySelector(`.${g2.ROLES_EDITOR_SCOPE_CLASS}`)||document.body,Cd=({container:e,...t})=>C.jsx(de.Portal,{...t,container:e||Qt()}),Ok=Q_,Ck=e1,Ik=({privilege:e,selectedPrivilege:t,onSelect:r,isGuest:n=!1})=>{const o=Ht(),i=o.getPrivileges(),a=de.populateShallow(e.includes,i),[s,c]=T.useState(!1),[u,d]=T.useState(e.privilege),[p,h]=T.useState(null),v=de.useOutsideClick(()=>{s&&b()});de.useDidMountEffect(()=>{e.privilege!==u&&d(e.privilege)},[e.privilege]);function y(){c(!0),h(null)}function g(){c(!1),d(e.privilege)}function b(){h(null);try{de.validateName(u);const E=de.renamePrivilege(u,e.id,i);o.actions.updatePrivileges(E),c(!1)}catch(E){h(E.message)}}const x=async E=>{E.stopPropagation();const{confirmed:S}=await o.actions.openModal({title:"Delete Privilege",type:de.ModalType.CONFIRM,color:de.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"});if(S){const _=de.removePrivilege(e.id,i);o.actions.updatePrivileges(_),r(null)}},w=T.useMemo(()=>e.resources.some(E=>E.exists===!1),[e]);return C.jsxs(Ok,{openDelay:0,closeDelay:0,children:[C.jsx(Ck,{asChild:!0,children:C.jsxs("div",{className:ht("rounded border bg-grey-300 p-2",{"border-grey-100":(t==null?void 0:t.id)!==e.id,"border-primary-dark":(t==null?void 0:t.id)===e.id,"border-red-400":w&&(t==null?void 0:t.id)!==e.id}),role:"button","data-cy":"privilegeCard",onClick:()=>{r(e)},ref:v,children:[C.jsxs("div",{className:"flex items-center justify-between",children:[C.jsxs("div",{className:"flex flex-1 items-center text-white",children:[C.jsx("span",{className:"mr-4",children:n?C.jsx(xe.FdGuest,{className:"h-6 w-6"}):C.jsx(xe.FdGroup,{className:"h-6 w-6"})}),s?C.jsxs("div",{className:"relative h-6 flex-1 mr-2",children:[C.jsx("input",{autoFocus:!0,onKeyDown:E=>{E.key==="Enter"&&b(),E.key==="Escape"&&g()},type:"text",className:ht("absolute inset-0 h-6 min-w-0 rounded border border-grey-200 bg-grey-300 p-1 text-xs focus:outline-none",{"border-b border-red-400 rounded-b-none":p,"focus:border-primary-dark":!p}),value:u,onChange:E=>d(E.target.value)}),p&&C.jsx("p",{className:"absolute top-5 mt-1 w-full rounded rounded-t-none bg-red-400 p-1 text-xs text-white shadow-md",children:p})]}):C.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",children:u})]}),n?C.jsx("div",{className:"flex items-center justify-center",children:C.jsxs(Ok,{openDelay:0,closeDelay:0,children:[C.jsx(Ck,{asChild:!0,children:C.jsx("span",{children:C.jsx(xe.FdInfoBold,{className:"h-4 w-4 text-grey-50"})})}),C.jsx(Qr,{container:Qt(),children:C.jsx(en,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"the guest privilege must be used to indicate resources accessible without any permission required (e.g. an authenticate function)"})]})})})})]})}):C.jsx("div",{className:"flex items-center space-x-2",children:s?C.jsxs(C.Fragment,{children:[C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:g,children:C.jsx("span",{children:C.jsx(xe.FdClose,{className:"h-4 w-4 text-grey-50"})})}),C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:b,children:C.jsx("span",{children:C.jsx(xe.FdCheckCircle,{className:"h-4 w-4 text-grey-50"})})})]}):C.jsxs(C.Fragment,{children:[C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:y,children:C.jsx("span",{children:C.jsx(xe.FdPen,{className:"h-4 w-4 text-grey-50"})})}),C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:x,children:C.jsx("span",{children:C.jsx(xe.FdTrash,{className:"h-4 w-4 text-grey-50"})})})]})})]}),a.length?C.jsx("div",{className:"ml-[43px]",children:C.jsx(jz,{data:a})}):null]})}),C.jsx(Qr,{container:Qt(),children:C.jsxs(en,{hidden:!w,style:{zIndex:50},avoidCollisions:!0,side:"top",className:"text-red-500 mb-1 flex max-w-xs items-center gap-x-1 rounded bg-negative-200 px-2 py-2 text-s font-semibold",children:[C.jsx(xe.FdBulb,{className:"m-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"This privilege uses non-existing resources"})]})})]})},Noe=({privileges:e,selectPrivilege:t,selectedPrivilege:r})=>{const n=Ht(),o=n.getGuestPrivilege(),i=n.getCatalog(),a=T.useMemo(()=>{if(i===null||!o)return o;const s=H5({guest:o},Object.values((i==null?void 0:i.dataClasses)??{}));return V5(s,i).guest},[e,i]);return C.jsxs("div",{className:"flex flex-1 flex-col gap-y-4 overflow-auto p-4 pb-10 pt-1",children:[a?C.jsx(Ik,{privilege:a,onSelect:t,selectedPrivilege:r,isGuest:!0}):null,Object.entries(e).length?Object.entries(e).filter(([,s])=>s.privilege!=="guest").map(([s,c])=>C.jsx(Ik,{privilege:c,onSelect:t,selectedPrivilege:r},s)):C.jsx("div",{className:"flex h-full items-center justify-center",children:C.jsx("div",{className:"flex flex-1 items-center justify-center bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-grey-200",children:[C.jsx(xe.FdInfoBold,{className:"h-10 w-10"}),C.jsx("div",{className:"font-semibold",children:"There are no privileges"}),C.jsxs("div",{className:"flex items-center text-sm",children:["Create a new Privilege by clicking on the"," ",C.jsx(xe.FdPlus,{className:"ml-2 inline h-4 w-4 text-white"})]})]})})})]})};var kc={exports:{}},Mc={exports:{}},et={};/** @license React v16.13.1
84
84
  * react-is.production.min.js
85
85
  *
86
86
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -113,10 +113,10 @@ Valid keys: `+JSON.stringify(Object.keys(z),null," "));var ee=se(H,re,$,K,Z+"."
113
113
  *
114
114
  * This source code is licensed under the MIT license found in the
115
115
  * LICENSE file in the root directory of this source tree.
116
- */var zk;function zoe(){return zk||(zk=1,process.env.NODE_ENV!=="production"&&(function(){var e=60103,t=60106,r=60107,n=60108,o=60114,i=60109,a=60110,s=60112,c=60113,u=60120,d=60115,p=60116,h=60121,v=60122,y=60117,g=60129,b=60131;if(typeof Symbol=="function"&&Symbol.for){var x=Symbol.for;e=x("react.element"),t=x("react.portal"),r=x("react.fragment"),n=x("react.strict_mode"),o=x("react.profiler"),i=x("react.provider"),a=x("react.context"),s=x("react.forward_ref"),c=x("react.suspense"),u=x("react.suspense_list"),d=x("react.memo"),p=x("react.lazy"),h=x("react.block"),v=x("react.server.block"),y=x("react.fundamental"),x("react.scope"),x("react.opaque.id"),g=x("react.debug_trace_mode"),x("react.offscreen"),b=x("react.legacy_hidden")}var w=!1;function E(se){return!!(typeof se=="string"||typeof se=="function"||se===r||se===o||se===g||se===n||se===c||se===u||se===b||w||typeof se=="object"&&se!==null&&(se.$$typeof===p||se.$$typeof===d||se.$$typeof===i||se.$$typeof===a||se.$$typeof===s||se.$$typeof===y||se.$$typeof===h||se[0]===v))}function S(se){if(typeof se=="object"&&se!==null){var ee=se.$$typeof;switch(ee){case e:var we=se.type;switch(we){case r:case o:case n:case c:case u:return we;default:var ve=we&&we.$$typeof;switch(ve){case a:case s:case p:case d:case i:return ve;default:return ee}}case t:return ee}}}var _=a,O=i,N=e,R=s,A=r,D=p,B=d,j=t,M=o,P=n,V=c,q=!1,G=!1;function W(se){return q||(q=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Q(se){return G||(G=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function z(se){return S(se)===a}function U(se){return S(se)===i}function ie(se){return typeof se=="object"&&se!==null&&se.$$typeof===e}function te(se){return S(se)===s}function $(se){return S(se)===r}function K(se){return S(se)===p}function Z(se){return S(se)===d}function H(se){return S(se)===t}function Y(se){return S(se)===o}function oe(se){return S(se)===n}function re(se){return S(se)===c}st.ContextConsumer=_,st.ContextProvider=O,st.Element=N,st.ForwardRef=R,st.Fragment=A,st.Lazy=D,st.Memo=B,st.Portal=j,st.Profiler=M,st.StrictMode=P,st.Suspense=V,st.isAsyncMode=W,st.isConcurrentMode=Q,st.isContextConsumer=z,st.isContextProvider=U,st.isElement=ie,st.isForwardRef=te,st.isFragment=$,st.isLazy=K,st.isMemo=Z,st.isPortal=H,st.isProfiler=Y,st.isStrictMode=oe,st.isSuspense=re,st.isValidElementType=E,st.typeOf=S})()),st}var Bk;function Boe(){return Bk||(Bk=1,process.env.NODE_ENV==="production"?Dc.exports=Loe():Dc.exports=zoe()),Dc.exports}var Fk=Boe();function $k(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function Hk(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function Iy(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var r=getComputedStyle(e,null);return Hk(r.overflowY,t)||Hk(r.overflowX,t)||(function(n){var o=(function(i){if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!o&&(o.clientHeight<n.scrollHeight||o.clientWidth<n.scrollWidth)})(e)}return!1}function jc(e,t,r,n,o,i,a,s){return i<e&&a>t||i>e&&a<t?0:i<=e&&s<=r||a>=t&&s>=r?i-e-n:a>t&&s<r||i<e&&s>r?a-t+o:0}var Foe=function(e,t){var r=window,n=t.inline,o=t.boundary,i=t.skipOverflowHiddenElements,a=typeof o=="function"?o:function(ee){return ee!==o};if(!$k(e))throw new TypeError("Invalid target");for(var s,c,u=document.scrollingElement||document.documentElement,d=[],p=e;$k(p)&&a(p);){if((p=(c=(s=p).parentElement)==null?s.getRootNode().host||null:c)===u){d.push(p);break}p!=null&&p===document.body&&Iy(p)&&!Iy(document.documentElement)||p!=null&&Iy(p,i)&&d.push(p)}for(var h=r.visualViewport?r.visualViewport.width:innerWidth,v=r.visualViewport?r.visualViewport.height:innerHeight,y=window.scrollX||pageXOffset,g=window.scrollY||pageYOffset,b=e.getBoundingClientRect(),x=b.height,w=b.width,E=b.top,S=b.right,_=b.bottom,O=b.left,N=E,R=n==="center"?O+w/2:n==="end"?S:O,A=[],D=0;D<d.length;D++){var B=d[D],j=B.getBoundingClientRect(),M=j.height,P=j.width,V=j.top,q=j.right,G=j.bottom,W=j.left;if(E>=0&&O>=0&&_<=v&&S<=h&&E>=V&&_<=G&&O>=W&&S<=q)return A;var Q=getComputedStyle(B),z=parseInt(Q.borderLeftWidth,10),U=parseInt(Q.borderTopWidth,10),ie=parseInt(Q.borderRightWidth,10),te=parseInt(Q.borderBottomWidth,10),$=0,K=0,Z="offsetWidth"in B?B.offsetWidth-B.clientWidth-z-ie:0,H="offsetHeight"in B?B.offsetHeight-B.clientHeight-U-te:0,Y="offsetWidth"in B?B.offsetWidth===0?0:P/B.offsetWidth:0,oe="offsetHeight"in B?B.offsetHeight===0?0:M/B.offsetHeight:0;if(u===B)$=jc(g,g+v,v,U,te,g+N,g+N+x,x),K=n==="start"?R:n==="center"?R-h/2:n==="end"?R-h:jc(y,y+h,h,z,ie,y+R,y+R+w,w),$=Math.max(0,$+g),K=Math.max(0,K+y);else{$=jc(V,G,M,U,te+H,N,N+x,x),K=n==="start"?R-W-z:n==="center"?R-(W+P/2)+Z/2:n==="end"?R-q+ie+Z:jc(W,q,P,z,ie+Z,R,R+w,w);var re=B.scrollLeft,se=B.scrollTop;N+=se-($=Math.max(0,Math.min(se+$/oe,B.scrollHeight-M/oe+H))),R+=re-(K=Math.max(0,Math.min(re+K/Y,B.scrollWidth-P/Y+Z)))}A.push({el:B,top:$,left:K})}return A};let $oe=0;function Vk(e){return typeof e=="function"?e:jr}function jr(){}function zz(e,t){if(!e)return;Foe(e,{boundary:t}).forEach(n=>{let{el:o,top:i,left:a}=n;o.scrollTop=i,o.scrollLeft=a})}function Wk(e,t,r){return e===t||t instanceof r.Node&&e.contains&&e.contains(t)}function r1(e,t){let r;function n(){r&&clearTimeout(r)}function o(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];n(),r=setTimeout(()=>{r=null,e(...a)},t)}return o.cancel=n,o}function qt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(s=>(s&&s(n,...i),n.preventDownshiftDefault||n.hasOwnProperty("nativeEvent")&&n.nativeEvent.preventDownshiftDefault))}}function Lo(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n=>{t.forEach(o=>{typeof o=="function"?o(n):o&&(o.current=n)})}}function Bz(){return String($oe++)}function Fz(e){let{isOpen:t,resultCount:r,previousResultCount:n}=e;return t?r?r!==n?`${r} result${r===1?" is":"s are"} available, use up and down arrow keys to navigate. Press Enter key to select.`:"":"No results are available.":""}function Uk(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function $z(e){return typeof e.type=="string"}function Hz(e){return e.props}function Hoe(e,t){console.error(`The property "${t}" is required in "${e}"`)}const Voe=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function qc(e){e===void 0&&(e={});const t={};return Voe.forEach(r=>{e.hasOwnProperty(r)&&(t[r]=e[r])}),t}function Pu(e,t){return Object.keys(e).reduce((r,n)=>(r[n]=Tu(t,n)?t[n]:e[n],r),{})}function Tu(e,t){return e[t]!==void 0}function Fx(e){const{key:t,keyCode:r}=e;return r>=37&&r<=40&&t.indexOf("Arrow")!==0?`Arrow${t}`:t}function Woe(e){return Object.prototype.toString.call(e)==="[object Object]"}function Hi(e,t,r,n,o){if(o===void 0&&(o=!0),r===0)return-1;const i=r-1;(typeof t!="number"||t<0||t>=r)&&(t=e>0?-1:i+1);let a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);const s=Zo(e,a,r,n,o);return s===-1?t>=r?-1:t:s}function Zo(e,t,r,n,o){const i=n(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(let a=t+1;a<r;a++)if(!n(a).hasAttribute("disabled"))return a}else for(let a=t-1;a>=0;a--)if(!n(a).hasAttribute("disabled"))return a;return o?e>0?Zo(1,0,r,n,!1):Zo(-1,r-1,r,n,!1):-1}function Au(e,t,r,n){return n===void 0&&(n=!0),t.some(o=>o&&(Wk(o,e,r)||n&&Wk(o,r.document.activeElement,r)))}let n1=jr;process.env.NODE_ENV!=="production"&&(n1=(e,t,r)=>{const n="This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";Object.keys(e).forEach(o=>{t[o]!==void 0&&r[o]===void 0?console.error(`downshift: A component has changed the controlled prop "${o}" to be uncontrolled. ${n}`):t[o]===void 0&&r[o]!==void 0&&console.error(`downshift: A component has changed the uncontrolled prop "${o}" to be controlled. ${n}`)})});const Uoe=r1(e=>{Wz(e).textContent=""},500);function Vz(e,t){const r=Wz(t);e&&(r.textContent=e,Uoe(t))}function Wz(e){e===void 0&&(e=document);let t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}const Uz=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,Gz=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,Kz=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,tu=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,ru=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,Yz=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,Xz=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,Zz=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,Jz=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,Qz=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,eB=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,tB=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,rB=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,$x=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,nB=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,oB=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,iB=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16;var Goe=Object.freeze({__proto__:null,unknown:Uz,mouseUp:Gz,itemMouseEnter:Kz,keyDownArrowUp:tu,keyDownArrowDown:ru,keyDownEscape:Yz,keyDownEnter:Xz,keyDownHome:Zz,keyDownEnd:Jz,clickItem:Qz,blurInput:eB,changeInput:tB,keyDownSpaceButton:rB,clickButton:$x,blurButton:nB,controlledPropUpdatedSelectedItem:oB,touchEnd:iB});const Koe=(()=>{class e extends T.Component{constructor(r){var n;super(r),n=this,this.id=this.props.id||`downshift-${Bz()}`,this.menuId=this.props.menuId||`${this.id}-menu`,this.labelId=this.props.labelId||`${this.id}-label`,this.inputId=this.props.inputId||`${this.id}-input`,this.getItemId=this.props.getItemId||(p=>`${this.id}-item-${p}`),this.input=null,this.items=[],this.itemCount=null,this.previousResultCount=0,this.timeoutIds=[],this.internalSetTimeout=(p,h)=>{const v=setTimeout(()=>{this.timeoutIds=this.timeoutIds.filter(y=>y!==v),p()},h);this.timeoutIds.push(v)},this.setItemCount=p=>{this.itemCount=p},this.unsetItemCount=()=>{this.itemCount=null},this.setHighlightedIndex=function(p,h){p===void 0&&(p=n.props.defaultHighlightedIndex),h===void 0&&(h={}),h=qc(h),n.internalSetState({highlightedIndex:p,...h})},this.clearSelection=p=>{this.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:this.props.defaultHighlightedIndex,isOpen:this.props.defaultIsOpen},p)},this.selectItem=(p,h,v)=>{h=qc(h),this.internalSetState({isOpen:this.props.defaultIsOpen,highlightedIndex:this.props.defaultHighlightedIndex,selectedItem:p,inputValue:this.props.itemToString(p),...h},v)},this.selectItemAtIndex=(p,h,v)=>{const y=this.items[p];y!=null&&this.selectItem(y,h,v)},this.selectHighlightedItem=(p,h)=>this.selectItemAtIndex(this.getState().highlightedIndex,p,h),this.internalSetState=(p,h)=>{let v,y;const g={},b=typeof p=="function";return!b&&p.hasOwnProperty("inputValue")&&this.props.onInputValueChange(p.inputValue,{...this.getStateAndHelpers(),...p}),this.setState(x=>{x=this.getState(x);let w=b?p(x):p;w=this.props.stateReducer(x,w),v=w.hasOwnProperty("selectedItem");const E={};return v&&w.selectedItem!==x.selectedItem&&(y=w.selectedItem),w.type=w.type||Uz,Object.keys(w).forEach(S=>{x[S]!==w[S]&&(g[S]=w[S]),S!=="type"&&(w[S],Tu(this.props,S)||(E[S]=w[S]))}),b&&w.hasOwnProperty("inputValue")&&this.props.onInputValueChange(w.inputValue,{...this.getStateAndHelpers(),...w}),E},()=>{Vk(h)(),Object.keys(g).length>1&&this.props.onStateChange(g,this.getStateAndHelpers()),v&&this.props.onSelect(p.selectedItem,this.getStateAndHelpers()),y!==void 0&&this.props.onChange(y,this.getStateAndHelpers()),this.props.onUserAction(g,this.getStateAndHelpers())})},this.rootRef=p=>this._rootNode=p,this.getRootProps=function(p,h){let{refKey:v="ref",ref:y,...g}=p===void 0?{}:p,{suppressRefError:b=!1}=h===void 0?{}:h;n.getRootProps.called=!0,n.getRootProps.refKey=v,n.getRootProps.suppressRefError=b;const{isOpen:x}=n.getState();return{[v]:Lo(y,n.rootRef),role:"combobox","aria-expanded":x,"aria-haspopup":"listbox","aria-owns":x?n.menuId:null,"aria-labelledby":n.labelId,...g}},this.keyDownHandlers={ArrowDown(p){if(p.preventDefault(),this.getState().isOpen){const h=p.shiftKey?5:1;this.moveHighlightedIndex(h,{type:ru})}else this.internalSetState({isOpen:!0,type:ru},()=>{const h=this.getItemCount();if(h>0){const{highlightedIndex:v}=this.getState(),y=Hi(1,v,h,g=>this.getItemNodeFromIndex(g));this.setHighlightedIndex(y,{type:ru})}})},ArrowUp(p){if(p.preventDefault(),this.getState().isOpen){const h=p.shiftKey?-5:-1;this.moveHighlightedIndex(h,{type:tu})}else this.internalSetState({isOpen:!0,type:tu},()=>{const h=this.getItemCount();if(h>0){const{highlightedIndex:v}=this.getState(),y=Hi(-1,v,h,g=>this.getItemNodeFromIndex(g));this.setHighlightedIndex(y,{type:tu})}})},Enter(p){if(p.which===229)return;const{isOpen:h,highlightedIndex:v}=this.getState();if(h&&v!=null){p.preventDefault();const y=this.items[v],g=this.getItemNodeFromIndex(v);if(y==null||g&&g.hasAttribute("disabled"))return;this.selectHighlightedItem({type:Xz})}},Escape(p){p.preventDefault(),this.reset({type:Yz,...!this.state.isOpen&&{selectedItem:null,inputValue:""}})}},this.buttonKeyDownHandlers={...this.keyDownHandlers," "(p){p.preventDefault(),this.toggleMenu({type:rB})}},this.inputKeyDownHandlers={...this.keyDownHandlers,Home(p){const{isOpen:h}=this.getState();if(!h)return;p.preventDefault();const v=this.getItemCount();if(v<=0||!h)return;const y=Zo(1,0,v,g=>this.getItemNodeFromIndex(g),!1);this.setHighlightedIndex(y,{type:Zz})},End(p){const{isOpen:h}=this.getState();if(!h)return;p.preventDefault();const v=this.getItemCount();if(v<=0||!h)return;const y=Zo(-1,v-1,v,g=>this.getItemNodeFromIndex(g),!1);this.setHighlightedIndex(y,{type:Jz})}},this.getToggleButtonProps=function(p){let{onClick:h,onPress:v,onKeyDown:y,onKeyUp:g,onBlur:b,...x}=p===void 0?{}:p;const{isOpen:w}=n.getState(),E={onClick:qt(h,n.buttonHandleClick),onKeyDown:qt(y,n.buttonHandleKeyDown),onKeyUp:qt(g,n.buttonHandleKeyUp),onBlur:qt(b,n.buttonHandleBlur)},S=x.disabled?{}:E;return{type:"button",role:"button","aria-label":w?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0,...S,...x}},this.buttonHandleKeyUp=p=>{p.preventDefault()},this.buttonHandleKeyDown=p=>{const h=Fx(p);this.buttonKeyDownHandlers[h]&&this.buttonKeyDownHandlers[h].call(this,p)},this.buttonHandleClick=p=>{p.preventDefault(),this.props.environment.document.activeElement===this.props.environment.document.body&&p.target.focus(),process.env.NODE_ENV==="test"?this.toggleMenu({type:$x}):this.internalSetTimeout(()=>this.toggleMenu({type:$x}))},this.buttonHandleBlur=p=>{const h=p.target;this.internalSetTimeout(()=>{!this.isMouseDown&&(this.props.environment.document.activeElement==null||this.props.environment.document.activeElement.id!==this.inputId)&&this.props.environment.document.activeElement!==h&&this.reset({type:nB})})},this.getLabelProps=p=>({htmlFor:this.inputId,id:this.labelId,...p}),this.getInputProps=function(p){let{onKeyDown:h,onBlur:v,onChange:y,onInput:g,onChangeText:b,...x}=p===void 0?{}:p,w,E={};w="onChange";const{inputValue:S,isOpen:_,highlightedIndex:O}=n.getState();return x.disabled||(E={[w]:qt(y,g,n.inputHandleChange),onKeyDown:qt(h,n.inputHandleKeyDown),onBlur:qt(v,n.inputHandleBlur)}),{"aria-autocomplete":"list","aria-activedescendant":_&&typeof O=="number"&&O>=0?n.getItemId(O):null,"aria-controls":_?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:S,id:n.inputId,...E,...x}},this.inputHandleKeyDown=p=>{const h=Fx(p);h&&this.inputKeyDownHandlers[h]&&this.inputKeyDownHandlers[h].call(this,p)},this.inputHandleChange=p=>{this.internalSetState({type:tB,isOpen:!0,inputValue:p.target.value,highlightedIndex:this.props.defaultHighlightedIndex})},this.inputHandleBlur=()=>{this.internalSetTimeout(()=>{const p=this.props.environment.document&&!!this.props.environment.document.activeElement&&!!this.props.environment.document.activeElement.dataset&&this.props.environment.document.activeElement.dataset.toggle&&this._rootNode&&this._rootNode.contains(this.props.environment.document.activeElement);!this.isMouseDown&&!p&&this.reset({type:eB})})},this.menuRef=p=>{this._menuNode=p},this.getMenuProps=function(p,h){let{refKey:v="ref",ref:y,...g}=p===void 0?{}:p,{suppressRefError:b=!1}=h===void 0?{}:h;return n.getMenuProps.called=!0,n.getMenuProps.refKey=v,n.getMenuProps.suppressRefError=b,{[v]:Lo(y,n.menuRef),role:"listbox","aria-labelledby":g&&g["aria-label"]?null:n.labelId,id:n.menuId,...g}},this.getItemProps=function(p){let{onMouseMove:h,onMouseDown:v,onClick:y,onPress:g,index:b,item:x=process.env.NODE_ENV==="production"?void 0:Hoe("getItemProps","item"),...w}=p===void 0?{}:p;b===void 0?(n.items.push(x),b=n.items.indexOf(x)):n.items[b]=x;const E="onClick",S=y,_={onMouseMove:qt(h,()=>{b!==n.getState().highlightedIndex&&(n.setHighlightedIndex(b,{type:Kz}),n.avoidScrolling=!0,n.internalSetTimeout(()=>n.avoidScrolling=!1,250))}),onMouseDown:qt(v,N=>{N.preventDefault()}),[E]:qt(S,()=>{n.selectItemAtIndex(b,{type:Qz})})},O=w.disabled?{onMouseDown:_.onMouseDown}:_;return{id:n.getItemId(b),role:"option","aria-selected":n.getState().highlightedIndex===b,...O,...w}},this.clearItems=()=>{this.items=[]},this.reset=function(p,h){p===void 0&&(p={}),p=qc(p),n.internalSetState(v=>{let{selectedItem:y}=v;return{isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(y),...p}},h)},this.toggleMenu=function(p,h){p===void 0&&(p={}),p=qc(p),n.internalSetState(v=>{let{isOpen:y}=v;return{isOpen:!y,...y&&{highlightedIndex:n.props.defaultHighlightedIndex},...p}},()=>{const{isOpen:v,highlightedIndex:y}=n.getState();v&&n.getItemCount()>0&&typeof y=="number"&&n.setHighlightedIndex(y,p),Vk(h)()})},this.openMenu=p=>{this.internalSetState({isOpen:!0},p)},this.closeMenu=p=>{this.internalSetState({isOpen:!1},p)},this.updateStatus=r1(()=>{const p=this.getState(),h=this.items[p.highlightedIndex],v=this.getItemCount(),y=this.props.getA11yStatusMessage({itemToString:this.props.itemToString,previousResultCount:this.previousResultCount,resultCount:v,highlightedItem:h,...p});this.previousResultCount=v,Vz(y,this.props.environment.document)},200);const{defaultHighlightedIndex:o,initialHighlightedIndex:i=o,defaultIsOpen:a,initialIsOpen:s=a,initialInputValue:c="",initialSelectedItem:u=null}=this.props,d=this.getState({highlightedIndex:i,isOpen:s,inputValue:c,selectedItem:u});d.selectedItem!=null&&this.props.initialInputValue===void 0&&(d.inputValue=this.props.itemToString(d.selectedItem)),this.state=d}internalClearTimeouts(){this.timeoutIds.forEach(r=>{clearTimeout(r)}),this.timeoutIds=[]}getState(r){return r===void 0&&(r=this.state),Pu(r,this.props)}getItemCount(){let r=this.items.length;return this.itemCount!=null?r=this.itemCount:this.props.itemCount!==void 0&&(r=this.props.itemCount),r}getItemNodeFromIndex(r){return this.props.environment.document.getElementById(this.getItemId(r))}scrollHighlightedItemIntoView(){{const r=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(r,this._menuNode)}}moveHighlightedIndex(r,n){const o=this.getItemCount(),{highlightedIndex:i}=this.getState();if(o>0){const a=Hi(r,i,o,s=>this.getItemNodeFromIndex(s));this.setHighlightedIndex(a,n)}}getStateAndHelpers(){const{highlightedIndex:r,inputValue:n,selectedItem:o,isOpen:i}=this.getState(),{itemToString:a}=this.props,{id:s}=this,{getRootProps:c,getToggleButtonProps:u,getLabelProps:d,getMenuProps:p,getInputProps:h,getItemProps:v,openMenu:y,closeMenu:g,toggleMenu:b,selectItem:x,selectItemAtIndex:w,selectHighlightedItem:E,setHighlightedIndex:S,clearSelection:_,clearItems:O,reset:N,setItemCount:R,unsetItemCount:A,internalSetState:D}=this;return{getRootProps:c,getToggleButtonProps:u,getLabelProps:d,getMenuProps:p,getInputProps:h,getItemProps:v,reset:N,openMenu:y,closeMenu:g,toggleMenu:b,selectItem:x,selectItemAtIndex:w,selectHighlightedItem:E,setHighlightedIndex:S,clearSelection:_,clearItems:O,setItemCount:R,unsetItemCount:A,setState:D,itemToString:a,id:s,highlightedIndex:r,inputValue:n,isOpen:i,selectedItem:o}}componentDidMount(){process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Gk(this._menuNode,this.getMenuProps);{const r=()=>{this.isMouseDown=!0},n=c=>{this.isMouseDown=!1,!Au(c.target,[this._rootNode,this._menuNode],this.props.environment)&&this.getState().isOpen&&this.reset({type:Gz},()=>this.props.onOuterClick(this.getStateAndHelpers()))},o=()=>{this.isTouchMove=!1},i=()=>{this.isTouchMove=!0},a=c=>{const u=Au(c.target,[this._rootNode,this._menuNode],this.props.environment,!1);!this.isTouchMove&&!u&&this.getState().isOpen&&this.reset({type:iB},()=>this.props.onOuterClick(this.getStateAndHelpers()))},{environment:s}=this.props;s.addEventListener("mousedown",r),s.addEventListener("mouseup",n),s.addEventListener("touchstart",o),s.addEventListener("touchmove",i),s.addEventListener("touchend",a),this.cleanup=()=>{this.internalClearTimeouts(),this.updateStatus.cancel(),s.removeEventListener("mousedown",r),s.removeEventListener("mouseup",n),s.removeEventListener("touchstart",o),s.removeEventListener("touchmove",i),s.removeEventListener("touchend",a)}}}shouldScroll(r,n){const{highlightedIndex:o}=this.props.highlightedIndex===void 0?this.getState():this.props,{highlightedIndex:i}=n.highlightedIndex===void 0?r:n;return o&&this.getState().isOpen&&!r.isOpen||o!==i}componentDidUpdate(r,n){process.env.NODE_ENV!=="production"&&(n1(this.state,r,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Gk(this._menuNode,this.getMenuProps)),Tu(this.props,"selectedItem")&&this.props.selectedItemChanged(r.selectedItem,this.props.selectedItem)&&this.internalSetState({type:oB,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(n,r)&&this.scrollHighlightedItemIntoView(),this.updateStatus()}componentWillUnmount(){this.cleanup()}render(){const r=Uk(this.props.children,jr);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;const n=Uk(r(this.getStateAndHelpers()));if(!n)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&Yoe(n,this.getRootProps),n;if($z(n))return T.cloneElement(n,this.getRootProps(Hz(n)));if(process.env.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")}}return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:Fz,itemToString:t=>t==null?"":(process.env.NODE_ENV!=="production"&&Woe(t)&&!t.hasOwnProperty("toString")&&console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.","The object that was passed:",t),String(t)),onStateChange:jr,onInputValueChange:jr,onUserAction:jr,onChange:jr,onSelect:jr,onOuterClick:jr,selectedItemChanged:(t,r)=>t!==r,environment:typeof window>"u"?{}:window,stateReducer:(t,r)=>r,suppressRefError:!1,scrollIntoView:zz},e.stateChangeTypes=Goe,e})();process.env.NODE_ENV!=="production"&&(Koe.propTypes={children:fe.func,defaultHighlightedIndex:fe.number,defaultIsOpen:fe.bool,initialHighlightedIndex:fe.number,initialSelectedItem:fe.any,initialInputValue:fe.string,initialIsOpen:fe.bool,getA11yStatusMessage:fe.func,itemToString:fe.func,onChange:fe.func,onSelect:fe.func,onStateChange:fe.func,onInputValueChange:fe.func,onUserAction:fe.func,onOuterClick:fe.func,selectedItemChanged:fe.func,stateReducer:fe.func,itemCount:fe.number,id:fe.string,environment:fe.shape({addEventListener:fe.func,removeEventListener:fe.func,document:fe.shape({getElementById:fe.func,activeElement:fe.any,body:fe.any})}),suppressRefError:fe.bool,scrollIntoView:fe.func,selectedItem:fe.any,isOpen:fe.bool,inputValue:fe.string,highlightedIndex:fe.number,labelId:fe.string,inputId:fe.string,menuId:fe.string,getItemId:fe.func});function Gk(e,t){let{refKey:r}=t;e||console.error(`downshift: The ref prop "${r}" from getMenuProps was not applied correctly on your menu element.`)}function Yoe(e,t){let{refKey:r}=t;const n=r!=="ref",o=!$z(e);o&&!n&&!Fk.isForwardRef(e)?console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps"):!o&&n&&console.error(`downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "${r}"`),!Fk.isForwardRef(e)&&!Hz(e)[r]&&console.error(`downshift: You must apply the ref prop "${r}" from getRootProps onto your root element.`)}const aB={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function Xoe(e,t,r){const{props:n,type:o}=e,i={};Object.keys(t).forEach(a=>{Zoe(a,e,t,r),r[a]!==t[a]&&(i[a]=r[a])}),n.onStateChange&&Object.keys(i).length&&n.onStateChange({type:o,...i})}function Zoe(e,t,r,n){const{props:o,type:i}=t,a=`on${o1(e)}Change`;o[a]&&n[e]!==void 0&&n[e]!==r[e]&&o[a]({type:i,...n})}function Joe(e,t){return t.changes}function Qoe(e){const{selectedItem:t,itemToString:r}=e;return t?`${r(t)} has been selected.`:""}const eie=r1((e,t)=>{Vz(e(),t)},200),tie=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?T.useLayoutEffect:T.useEffect;function rie(e){let{id:t=`downshift-${Bz()}`,labelId:r,menuId:n,getItemId:o,toggleButtonId:i,inputId:a}=e;return T.useRef({labelId:r||`${t}-label`,menuId:n||`${t}-menu`,getItemId:o||(c=>`${t}-item-${c}`),toggleButtonId:i||`${t}-toggle-button`,inputId:a||`${t}-input`}).current}function nie(e,t,r){return e!==void 0?e:r.length===0?-1:r.indexOf(t)}function oie(e){return e?String(e):""}function o1(e){return`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}function sB(e){const t=T.useRef(e);return t.current=e,t}function iie(e,t,r){const n=T.useRef(),o=T.useRef(),i=T.useCallback((p,h)=>{o.current=h,p=Pu(p,h.props);const v=e(p,h);return h.props.stateReducer(p,{...h,changes:v})},[e]),[a,s]=T.useReducer(i,t),c=sB(r),u=T.useCallback(p=>s({props:c.current,...p}),[c]),d=o.current;return T.useEffect(()=>{d&&n.current&&n.current!==a&&Xoe(d,Pu(n.current,d.props),a),n.current=a},[a,r,d]),[a,u]}const ys={itemToString:oie,stateReducer:Joe,getA11ySelectionMessage:Qoe,scrollIntoView:zz,circularNavigation:!1,environment:typeof window>"u"?{}:window};function bn(e,t,r){r===void 0&&(r=aB);const n=e[`default${o1(t)}`];return n!==void 0?n:r[t]}function Lc(e,t,r){r===void 0&&(r=aB);const n=e[t];if(n!==void 0)return n;const o=e[`initial${o1(t)}`];return o!==void 0?o:bn(e,t,r)}function aie(e){const t=Lc(e,"selectedItem"),r=Lc(e,"isOpen"),n=Lc(e,"highlightedIndex"),o=Lc(e,"inputValue");return{highlightedIndex:n<0&&t&&r?e.items.indexOf(t):n,isOpen:r,selectedItem:t,inputValue:o}}function ku(e,t,r,n){const{items:o,initialHighlightedIndex:i,defaultHighlightedIndex:a}=e,{selectedItem:s,highlightedIndex:c}=t;return o.length===0?-1:i!==void 0&&c===i?i:a!==void 0?a:s?r===0?o.indexOf(s):Hi(r,o.indexOf(s),o.length,n,!1):r===0?-1:r<0?o.length-1:0}function sie(e,t,r,n){const o=T.useRef({isMouseDown:!1,isTouchMove:!1});return T.useEffect(()=>{const i=()=>{o.current.isMouseDown=!0},a=d=>{o.current.isMouseDown=!1,e&&!Au(d.target,t.map(p=>p.current),r)&&n()},s=()=>{o.current.isTouchMove=!1},c=()=>{o.current.isTouchMove=!0},u=d=>{e&&!o.current.isTouchMove&&!Au(d.target,t.map(p=>p.current),r,!1)&&n()};return r.addEventListener("mousedown",i),r.addEventListener("mouseup",a),r.addEventListener("touchstart",s),r.addEventListener("touchmove",c),r.addEventListener("touchend",u),function(){r.removeEventListener("mousedown",i),r.removeEventListener("mouseup",a),r.removeEventListener("touchstart",s),r.removeEventListener("touchmove",c),r.removeEventListener("touchend",u)}},[e,r]),o}let lB=()=>jr;process.env.NODE_ENV!=="production"&&(lB=function(){const e=T.useRef(!0);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o=T.useRef(r.reduce((a,s)=>(a[s]={},a),{}));return T.useEffect(()=>{Object.keys(o.current).forEach(a=>{const s=o.current[a];if(e.current&&!Object.keys(s).length){console.error(`downshift: You forgot to call the ${a} getter function on your component / element.`);return}const{suppressRefError:c,refKey:u,elementRef:d}=s;(!d||!d.current)&&!c&&console.error(`downshift: The ref prop "${u}" from ${a} was not applied correctly on your element.`)}),e.current=!1}),T.useCallback((a,s,c,u)=>{o.current[a]={suppressRefError:s,refKey:c,elementRef:u}},[])});function Kk(e,t,r){let{isInitialMount:n,highlightedIndex:o,items:i,environment:a,...s}=r;T.useEffect(()=>{n||eie(()=>e({highlightedIndex:o,highlightedItem:i[o],resultCount:i.length,...s}),a.document)},t)}function lie(e){let{highlightedIndex:t,isOpen:r,itemRefs:n,getItemNodeFromIndex:o,menuElement:i,scrollIntoView:a}=e;const s=T.useRef(!0);return tie(()=>{t<0||!r||!Object.keys(n.current).length||(s.current===!1?s.current=!0:a(o(t),i))},[t]),s}let cB=jr;process.env.NODE_ENV!=="production"&&(cB=e=>{let{isInitialMount:t,props:r,state:n}=e;const o=T.useRef(r);T.useEffect(()=>{t||(n1(n,o.current,r),o.current=r)},[n,r,t])});function cie(e,t,r){const{type:n,props:o}=t;let i;switch(n){case r.ItemMouseMove:i={highlightedIndex:t.disabled?-1:t.index};break;case r.MenuMouseLeave:i={highlightedIndex:-1};break;case r.ToggleButtonClick:case r.FunctionToggleMenu:i={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:ku(o,e,0)};break;case r.FunctionOpenMenu:i={isOpen:!0,highlightedIndex:ku(o,e,0)};break;case r.FunctionCloseMenu:i={isOpen:!1};break;case r.FunctionSetHighlightedIndex:i={highlightedIndex:t.highlightedIndex};break;case r.FunctionSetInputValue:i={inputValue:t.inputValue};break;case r.FunctionReset:i={highlightedIndex:bn(o,"highlightedIndex"),isOpen:bn(o,"isOpen"),selectedItem:bn(o,"selectedItem"),inputValue:bn(o,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return{...e,...i}}fe.array.isRequired,fe.func,fe.func,fe.func,fe.bool,fe.number,fe.number,fe.number,fe.bool,fe.bool,fe.bool,fe.any,fe.any,fe.any,fe.string,fe.string,fe.string,fe.func,fe.string,fe.func,fe.func,fe.func,fe.func,fe.func,fe.shape({addEventListener:fe.func,removeEventListener:fe.func,document:fe.shape({getElementById:fe.func,activeElement:fe.any,body:fe.any})});function uie(e){var t=e.isOpen,r=e.resultCount,n=e.previousResultCount;return t?r?r!==n?"".concat(r," result").concat(r===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}Eu(Eu({},ys),{getA11yStatusMessage:uie});process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;const i1=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,a1=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,s1=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,l1=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,c1=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,u1=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":5,d1=process.env.NODE_ENV!=="production"?"__input_change__":6,Mu=process.env.NODE_ENV!=="production"?"__input_blur__":7,uB=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":8,dB=process.env.NODE_ENV!=="production"?"__item_mouse_move__":9,f1=process.env.NODE_ENV!=="production"?"__item_click__":10,fB=process.env.NODE_ENV!=="production"?"__togglebutton_click__":11,pB=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":12,hB=process.env.NODE_ENV!=="production"?"__function_open_menu__":13,vB=process.env.NODE_ENV!=="production"?"__function_close_menu__":14,gB=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":15,p1=process.env.NODE_ENV!=="production"?"__function_select_item__":16,mB=process.env.NODE_ENV!=="production"?"__function_set_input_value__":17,bB=process.env.NODE_ENV!=="production"?"__function_reset__":18,h1=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":19;var yB=Object.freeze({__proto__:null,InputKeyDownArrowDown:i1,InputKeyDownArrowUp:a1,InputKeyDownEscape:s1,InputKeyDownHome:l1,InputKeyDownEnd:c1,InputKeyDownEnter:u1,InputChange:d1,InputBlur:Mu,MenuMouseLeave:uB,ItemMouseMove:dB,ItemClick:f1,ToggleButtonClick:fB,FunctionToggleMenu:pB,FunctionOpenMenu:hB,FunctionCloseMenu:vB,FunctionSetHighlightedIndex:gB,FunctionSelectItem:p1,FunctionSetInputValue:mB,FunctionReset:bB,ControlledPropUpdatedSelectedItem:h1});function die(e){const t=aie(e),{selectedItem:r}=t;let{inputValue:n}=t;return n===""&&r&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(n=e.itemToString(r)),{...t,inputValue:n}}const fie={items:fe.array.isRequired,itemToString:fe.func,getA11yStatusMessage:fe.func,getA11ySelectionMessage:fe.func,circularNavigation:fe.bool,highlightedIndex:fe.number,defaultHighlightedIndex:fe.number,initialHighlightedIndex:fe.number,isOpen:fe.bool,defaultIsOpen:fe.bool,initialIsOpen:fe.bool,selectedItem:fe.any,initialSelectedItem:fe.any,defaultSelectedItem:fe.any,inputValue:fe.string,defaultInputValue:fe.string,initialInputValue:fe.string,id:fe.string,labelId:fe.string,menuId:fe.string,getItemId:fe.func,inputId:fe.string,toggleButtonId:fe.string,stateReducer:fe.func,onSelectedItemChange:fe.func,onHighlightedIndexChange:fe.func,onStateChange:fe.func,onIsOpenChange:fe.func,onInputValueChange:fe.func,environment:fe.shape({addEventListener:fe.func,removeEventListener:fe.func,document:fe.shape({getElementById:fe.func,activeElement:fe.any,body:fe.any})})};function pie(e,t,r){const n=T.useRef(),[o,i]=iie(e,t,r);return T.useEffect(()=>{Tu(r,"selectedItem")&&(n.current!==r.selectedItem&&i({type:h1,inputValue:r.itemToString(r.selectedItem)}),n.current=o.selectedItem===n.current?r.selectedItem:o.selectedItem)}),[Pu(o,r),i]}let wB=jr;process.env.NODE_ENV!=="production"&&(wB=(e,t)=>{fe.checkPropTypes(fie,e,"prop",t.name)});const hie={...ys,getA11yStatusMessage:Fz,circularNavigation:!0};function vie(e,t){const{type:r,props:n,shiftKey:o}=t;let i;switch(r){case f1:i={isOpen:bn(n,"isOpen"),highlightedIndex:bn(n,"highlightedIndex"),selectedItem:n.items[t.index],inputValue:n.itemToString(n.items[t.index])};break;case i1:e.isOpen?i={highlightedIndex:Hi(o?5:1,e.highlightedIndex,n.items.length,t.getItemNodeFromIndex,n.circularNavigation)}:i={highlightedIndex:ku(n,e,1,t.getItemNodeFromIndex),isOpen:n.items.length>=0};break;case a1:e.isOpen?i={highlightedIndex:Hi(o?-5:-1,e.highlightedIndex,n.items.length,t.getItemNodeFromIndex,n.circularNavigation)}:i={highlightedIndex:ku(n,e,-1,t.getItemNodeFromIndex),isOpen:n.items.length>=0};break;case u1:i={...e.isOpen&&e.highlightedIndex>=0&&{selectedItem:n.items[e.highlightedIndex],isOpen:bn(n,"isOpen"),highlightedIndex:bn(n,"highlightedIndex"),inputValue:n.itemToString(n.items[e.highlightedIndex])}};break;case s1:i={isOpen:!1,highlightedIndex:-1,...!e.isOpen&&{selectedItem:null,inputValue:""}};break;case l1:i={highlightedIndex:Zo(1,0,n.items.length,t.getItemNodeFromIndex,!1)};break;case c1:i={highlightedIndex:Zo(-1,n.items.length-1,n.items.length,t.getItemNodeFromIndex,!1)};break;case Mu:i={isOpen:!1,highlightedIndex:-1,...e.highlightedIndex>=0&&t.selectItem&&{selectedItem:n.items[e.highlightedIndex],inputValue:n.itemToString(n.items[e.highlightedIndex])}};break;case d1:i={isOpen:!0,highlightedIndex:bn(n,"highlightedIndex"),inputValue:t.inputValue};break;case p1:i={selectedItem:t.selectedItem,inputValue:n.itemToString(t.selectedItem)};break;case h1:i={inputValue:t.inputValue};break;default:return cie(e,t,yB)}return{...e,...i}}qi.stateChangeTypes=yB;function qi(e){e===void 0&&(e={}),wB(e,qi);const t={...hie,...e},{initialIsOpen:r,defaultIsOpen:n,items:o,scrollIntoView:i,environment:a,getA11yStatusMessage:s,getA11ySelectionMessage:c,itemToString:u}=t,d=die(t),[p,h]=pie(vie,d,t),{isOpen:v,highlightedIndex:y,selectedItem:g,inputValue:b}=p,x=T.useRef(null),w=T.useRef({}),E=T.useRef(null),S=T.useRef(null),_=T.useRef(null),O=T.useRef(!0),N=rie(t),R=T.useRef(),A=sB({state:p,props:t}),D=T.useCallback(Y=>w.current[N.getItemId(Y)],[N]);Kk(s,[v,y,b,o],{isInitialMount:O.current,previousResultCount:R.current,items:o,environment:a,itemToString:u,...p}),Kk(c,[g],{isInitialMount:O.current,previousResultCount:R.current,items:o,environment:a,itemToString:u,...p});const B=lie({menuElement:x.current,highlightedIndex:y,isOpen:v,itemRefs:w,scrollIntoView:i,getItemNodeFromIndex:D});cB({isInitialMount:O.current,props:t,state:p}),T.useEffect(()=>{(r||n||v)&&E.current&&E.current.focus()},[]),T.useEffect(()=>{O.current||(R.current=o.length)});const j=sie(v,[_,x,S],a,()=>{h({type:Mu,selectItem:!1})}),M=lB("getInputProps","getComboboxProps","getMenuProps");T.useEffect(()=>{O.current=!1},[]),T.useEffect(()=>{v||(w.current={})},[v]);const P=T.useMemo(()=>({ArrowDown(Y){Y.preventDefault(),h({type:i1,shiftKey:Y.shiftKey,getItemNodeFromIndex:D})},ArrowUp(Y){Y.preventDefault(),h({type:a1,shiftKey:Y.shiftKey,getItemNodeFromIndex:D})},Home(Y){A.current.state.isOpen&&(Y.preventDefault(),h({type:l1,getItemNodeFromIndex:D}))},End(Y){A.current.state.isOpen&&(Y.preventDefault(),h({type:c1,getItemNodeFromIndex:D}))},Escape(Y){const oe=A.current.state;(oe.isOpen||oe.inputValue||oe.selectedItem||oe.highlightedIndex>-1)&&(Y.preventDefault(),h({type:s1}))},Enter(Y){const oe=A.current.state;!oe.isOpen||oe.highlightedIndex<0||Y.which===229||(Y.preventDefault(),h({type:u1,getItemNodeFromIndex:D}))}}),[h,A,D]),V=T.useCallback(Y=>({id:N.labelId,htmlFor:N.inputId,...Y}),[N]),q=T.useCallback(function(Y,oe){let{onMouseLeave:re,refKey:se="ref",ref:ee,...we}=Y===void 0?{}:Y,{suppressRefError:ve=!1}=oe===void 0?{}:oe;return M("getMenuProps",ve,se,x),{[se]:Lo(ee,Ee=>{x.current=Ee}),id:N.menuId,role:"listbox","aria-labelledby":N.labelId,onMouseLeave:qt(re,()=>{h({type:uB})}),...we}},[h,M,N]),G=T.useCallback(function(Y){let{item:oe,index:re,refKey:se="ref",ref:ee,onMouseMove:we,onMouseDown:ve,onClick:Ee,onPress:pe,disabled:ce,...Ce}=Y===void 0?{}:Y;const{props:ke,state:Ke}=A.current,ze=nie(re,oe,ke.items);if(ze<0)throw new Error("Pass either item or item index in getItemProps!");const rt="onClick",Xe=Ee,It=()=>{re!==Ke.highlightedIndex&&(B.current=!1,h({type:dB,index:re,disabled:ce}))},lt=()=>{h({type:f1,index:re})},Wt=mt=>mt.preventDefault();return{[se]:Lo(ee,mt=>{mt&&(w.current[N.getItemId(ze)]=mt)}),disabled:ce,role:"option","aria-selected":`${ze===Ke.highlightedIndex}`,id:N.getItemId(ze),...!ce&&{[rt]:qt(Xe,lt)},onMouseMove:qt(we,It),onMouseDown:qt(ve,Wt),...Ce}},[h,A,B,N]),W=T.useCallback(function(Y){let{onClick:oe,onPress:re,refKey:se="ref",ref:ee,...we}=Y===void 0?{}:Y;const ve=()=>{h({type:fB}),!A.current.state.isOpen&&E.current&&E.current.focus()};return{[se]:Lo(ee,Ee=>{S.current=Ee}),id:N.toggleButtonId,tabIndex:-1,...!we.disabled&&{onClick:qt(oe,ve)},...we}},[h,A,N]),Q=T.useCallback(function(Y,oe){let{onKeyDown:re,onChange:se,onInput:ee,onBlur:we,onChangeText:ve,refKey:Ee="ref",ref:pe,...ce}=Y===void 0?{}:Y,{suppressRefError:Ce=!1}=oe===void 0?{}:oe;M("getInputProps",Ce,Ee,E);const ke=A.current.state,Ke=lt=>{const Wt=Fx(lt);Wt&&P[Wt]&&P[Wt](lt)},ze=lt=>{h({type:d1,inputValue:lt.target.value})},rt=()=>{ke.isOpen&&!j.current.isMouseDown&&h({type:Mu,selectItem:!0})},Xe="onChange";let It={};return ce.disabled||(It={[Xe]:qt(se,ee,ze),onKeyDown:qt(re,Ke),onBlur:qt(we,rt)}),{[Ee]:Lo(pe,lt=>{E.current=lt}),id:N.inputId,"aria-autocomplete":"list","aria-controls":N.menuId,...ke.isOpen&&ke.highlightedIndex>-1&&{"aria-activedescendant":N.getItemId(ke.highlightedIndex)},"aria-labelledby":N.labelId,autoComplete:"off",value:ke.inputValue,...It,...ce}},[h,P,A,j,M,N]),z=T.useCallback(function(Y,oe){let{refKey:re="ref",ref:se,...ee}=Y===void 0?{}:Y,{suppressRefError:we=!1}=oe===void 0?{}:oe;return M("getComboboxProps",we,re,_),{[re]:Lo(se,ve=>{_.current=ve}),role:"combobox","aria-haspopup":"listbox","aria-owns":N.menuId,"aria-expanded":A.current.state.isOpen,...ee}},[A,M,N]),U=T.useCallback(()=>{h({type:pB})},[h]),ie=T.useCallback(()=>{h({type:vB})},[h]),te=T.useCallback(()=>{h({type:hB})},[h]),$=T.useCallback(Y=>{h({type:gB,highlightedIndex:Y})},[h]),K=T.useCallback(Y=>{h({type:p1,selectedItem:Y})},[h]),Z=T.useCallback(Y=>{h({type:mB,inputValue:Y})},[h]),H=T.useCallback(()=>{h({type:bB})},[h]);return{getItemProps:G,getLabelProps:V,getMenuProps:q,getInputProps:Q,getComboboxProps:z,getToggleButtonProps:W,toggleMenu:U,openMenu:te,closeMenu:ie,setHighlightedIndex:$,setInputValue:Z,selectItem:K,reset:H,highlightedIndex:y,isOpen:v,selectedItem:g,inputValue:b}}fe.array,fe.array,fe.array,fe.func,fe.func,fe.func,fe.number,fe.number,fe.number,fe.func,fe.func,fe.string,fe.string,fe.shape({addEventListener:fe.func,removeEventListener:fe.func,document:fe.shape({getElementById:fe.func,activeElement:fe.any,body:fe.any})});ys.itemToString,ys.stateReducer,ys.environment;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;var Yk={},os,Xk;function Pt(){if(Xk)return os;Xk=1;var e=function(t){return t&&t.Math===Math&&t};return os=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof _t=="object"&&_t)||e(typeof os=="object"&&os)||(function(){return this})()||Function("return this")(),os}var Ry={},Ny,Zk;function vt(){return Zk||(Zk=1,Ny=function(e){try{return!!e()}catch{return!0}}),Ny}var Py,Jk;function sn(){if(Jk)return Py;Jk=1;var e=vt();return Py=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Py}var Ty,Qk;function Id(){if(Qk)return Ty;Qk=1;var e=vt();return Ty=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),Ty}var Ay,eM;function fr(){if(eM)return Ay;eM=1;var e=Id(),t=Function.prototype.call;return Ay=e?t.bind(t):function(){return t.apply(t,arguments)},Ay}var ky={},tM;function xB(){if(tM)return ky;tM=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return ky.f=r?function(o){var i=t(this,o);return!!i&&i.enumerable}:e,ky}var My,rM;function v1(){return rM||(rM=1,My=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),My}var Dy,nM;function ft(){if(nM)return Dy;nM=1;var e=Id(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return Dy=e?n:function(o){return function(){return r.apply(o,arguments)}},Dy}var jy,oM;function Eo(){if(oM)return jy;oM=1;var e=ft(),t=e({}.toString),r=e("".slice);return jy=function(n){return r(t(n),8,-1)},jy}var qy,iM;function Rd(){if(iM)return qy;iM=1;var e=ft(),t=vt(),r=Eo(),n=Object,o=e("".split);return qy=t(function(){return!n("z").propertyIsEnumerable(0)})?function(i){return r(i)==="String"?o(i,""):n(i)}:n,qy}var Ly,aM;function Gs(){return aM||(aM=1,Ly=function(e){return e==null}),Ly}var zy,sM;function ni(){if(sM)return zy;sM=1;var e=Gs(),t=TypeError;return zy=function(r){if(e(r))throw new t("Can't call method on "+r);return r},zy}var By,lM;function fa(){if(lM)return By;lM=1;var e=Rd(),t=ni();return By=function(r){return e(t(r))},By}var Fy,cM;function Dt(){if(cM)return Fy;cM=1;var e=typeof document=="object"&&document.all;return Fy=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},Fy}var $y,uM;function Vt(){if(uM)return $y;uM=1;var e=Dt();return $y=function(t){return typeof t=="object"?t!==null:e(t)},$y}var Hy,dM;function Nd(){if(dM)return Hy;dM=1;var e=Pt(),t=Dt(),r=function(n){return t(n)?n:void 0};return Hy=function(n,o){return arguments.length<2?r(e[n]):e[n]&&e[n][o]},Hy}var Vy,fM;function Pd(){if(fM)return Vy;fM=1;var e=ft();return Vy=e({}.isPrototypeOf),Vy}var Wy,pM;function _B(){if(pM)return Wy;pM=1;var e=Pt(),t=e.navigator,r=t&&t.userAgent;return Wy=r?String(r):"",Wy}var Uy,hM;function g1(){if(hM)return Uy;hM=1;var e=Pt(),t=_B(),r=e.process,n=e.Deno,o=r&&r.versions||n&&n.version,i=o&&o.v8,a,s;return i&&(a=i.split("."),s=a[0]>0&&a[0]<4?1:+(a[0]+a[1])),!s&&t&&(a=t.match(/Edge\/(\d+)/),(!a||a[1]>=74)&&(a=t.match(/Chrome\/(\d+)/),a&&(s=+a[1]))),Uy=s,Uy}var Gy,vM;function EB(){if(vM)return Gy;vM=1;var e=g1(),t=vt(),r=Pt(),n=r.String;return Gy=!!Object.getOwnPropertySymbols&&!t(function(){var o=Symbol("symbol detection");return!n(o)||!(Object(o)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Gy}var Ky,gM;function SB(){if(gM)return Ky;gM=1;var e=EB();return Ky=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Ky}var Yy,mM;function OB(){if(mM)return Yy;mM=1;var e=Nd(),t=Dt(),r=Pd(),n=SB(),o=Object;return Yy=n?function(i){return typeof i=="symbol"}:function(i){var a=e("Symbol");return t(a)&&r(a.prototype,o(i))},Yy}var Xy,bM;function m1(){if(bM)return Xy;bM=1;var e=String;return Xy=function(t){try{return e(t)}catch{return"Object"}},Xy}var Zy,yM;function Ks(){if(yM)return Zy;yM=1;var e=Dt(),t=m1(),r=TypeError;return Zy=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},Zy}var Jy,wM;function Ys(){if(wM)return Jy;wM=1;var e=Ks(),t=Gs();return Jy=function(r,n){var o=r[n];return t(o)?void 0:e(o)},Jy}var Qy,xM;function gie(){if(xM)return Qy;xM=1;var e=fr(),t=Dt(),r=Vt(),n=TypeError;return Qy=function(o,i){var a,s;if(i==="string"&&t(a=o.toString)&&!r(s=e(a,o))||t(a=o.valueOf)&&!r(s=e(a,o))||i!=="string"&&t(a=o.toString)&&!r(s=e(a,o)))return s;throw new n("Can't convert object to primitive value")},Qy}var e0={exports:{}},t0,_M;function Td(){return _M||(_M=1,t0=!1),t0}var r0,EM;function b1(){if(EM)return r0;EM=1;var e=Pt(),t=Object.defineProperty;return r0=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},r0}var SM;function y1(){if(SM)return e0.exports;SM=1;var e=Td(),t=Pt(),r=b1(),n="__core-js_shared__",o=e0.exports=t[n]||r(n,{});return(o.versions||(o.versions=[])).push({version:"3.45.1",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"}),e0.exports}var n0,OM;function w1(){if(OM)return n0;OM=1;var e=y1();return n0=function(t,r){return e[t]||(e[t]=r||{})},n0}var o0,CM;function pa(){if(CM)return o0;CM=1;var e=ni(),t=Object;return o0=function(r){return t(e(r))},o0}var i0,IM;function Wr(){if(IM)return i0;IM=1;var e=ft(),t=pa(),r=e({}.hasOwnProperty);return i0=Object.hasOwn||function(o,i){return r(t(o),i)},i0}var a0,RM;function x1(){if(RM)return a0;RM=1;var e=ft(),t=0,r=Math.random(),n=e(1.1.toString);return a0=function(o){return"Symbol("+(o===void 0?"":o)+")_"+n(++t+r,36)},a0}var s0,NM;function tr(){if(NM)return s0;NM=1;var e=Pt(),t=w1(),r=Wr(),n=x1(),o=EB(),i=SB(),a=e.Symbol,s=t("wks"),c=i?a.for||a:a&&a.withoutSetter||n;return s0=function(u){return r(s,u)||(s[u]=o&&r(a,u)?a[u]:c("Symbol."+u)),s[u]},s0}var l0,PM;function mie(){if(PM)return l0;PM=1;var e=fr(),t=Vt(),r=OB(),n=Ys(),o=gie(),i=tr(),a=TypeError,s=i("toPrimitive");return l0=function(c,u){if(!t(c)||r(c))return c;var d=n(c,s),p;if(d){if(u===void 0&&(u="default"),p=e(d,c,u),!t(p)||r(p))return p;throw new a("Can't convert object to primitive value")}return u===void 0&&(u="number"),o(c,u)},l0}var c0,TM;function CB(){if(TM)return c0;TM=1;var e=mie(),t=OB();return c0=function(r){var n=e(r,"string");return t(n)?n:n+""},c0}var u0,AM;function _1(){if(AM)return u0;AM=1;var e=Pt(),t=Vt(),r=e.document,n=t(r)&&t(r.createElement);return u0=function(o){return n?r.createElement(o):{}},u0}var d0,kM;function IB(){if(kM)return d0;kM=1;var e=sn(),t=vt(),r=_1();return d0=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),d0}var MM;function RB(){if(MM)return Ry;MM=1;var e=sn(),t=fr(),r=xB(),n=v1(),o=fa(),i=CB(),a=Wr(),s=IB(),c=Object.getOwnPropertyDescriptor;return Ry.f=e?c:function(d,p){if(d=o(d),p=i(p),s)try{return c(d,p)}catch{}if(a(d,p))return n(!t(r.f,d,p),d[p])},Ry}var f0={},p0,DM;function NB(){if(DM)return p0;DM=1;var e=sn(),t=vt();return p0=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),p0}var h0,jM;function Ur(){if(jM)return h0;jM=1;var e=Vt(),t=String,r=TypeError;return h0=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},h0}var qM;function Yn(){if(qM)return f0;qM=1;var e=sn(),t=IB(),r=NB(),n=Ur(),o=CB(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c="enumerable",u="configurable",d="writable";return f0.f=e?r?function(h,v,y){if(n(h),v=o(v),n(y),typeof h=="function"&&v==="prototype"&&"value"in y&&d in y&&!y[d]){var g=s(h,v);g&&g[d]&&(h[v]=y.value,y={configurable:u in y?y[u]:g[u],enumerable:c in y?y[c]:g[c],writable:!1})}return a(h,v,y)}:a:function(h,v,y){if(n(h),v=o(v),n(y),t)try{return a(h,v,y)}catch{}if("get"in y||"set"in y)throw new i("Accessors not supported");return"value"in y&&(h[v]=y.value),h},f0}var v0,LM;function Xs(){if(LM)return v0;LM=1;var e=sn(),t=Yn(),r=v1();return v0=e?function(n,o,i){return t.f(n,o,r(1,i))}:function(n,o,i){return n[o]=i,n},v0}var g0={exports:{}},m0,zM;function E1(){if(zM)return m0;zM=1;var e=sn(),t=Wr(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,o=t(r,"name"),i=o&&(function(){}).name==="something",a=o&&(!e||e&&n(r,"name").configurable);return m0={EXISTS:o,PROPER:i,CONFIGURABLE:a},m0}var b0,BM;function PB(){if(BM)return b0;BM=1;var e=ft(),t=Dt(),r=y1(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(o){return n(o)}),b0=r.inspectSource,b0}var y0,FM;function TB(){if(FM)return y0;FM=1;var e=Pt(),t=Dt(),r=e.WeakMap;return y0=t(r)&&/native code/.test(String(r)),y0}var w0,$M;function S1(){if($M)return w0;$M=1;var e=w1(),t=x1(),r=e("keys");return w0=function(n){return r[n]||(r[n]=t(n))},w0}var x0,HM;function Ad(){return HM||(HM=1,x0={}),x0}var _0,VM;function ha(){if(VM)return _0;VM=1;var e=TB(),t=Pt(),r=Vt(),n=Xs(),o=Wr(),i=y1(),a=S1(),s=Ad(),c="Object already initialized",u=t.TypeError,d=t.WeakMap,p,h,v,y=function(w){return v(w)?h(w):p(w,{})},g=function(w){return function(E){var S;if(!r(E)||(S=h(E)).type!==w)throw new u("Incompatible receiver, "+w+" required");return S}};if(e||i.state){var b=i.state||(i.state=new d);b.get=b.get,b.has=b.has,b.set=b.set,p=function(w,E){if(b.has(w))throw new u(c);return E.facade=w,b.set(w,E),E},h=function(w){return b.get(w)||{}},v=function(w){return b.has(w)}}else{var x=a("state");s[x]=!0,p=function(w,E){if(o(w,x))throw new u(c);return E.facade=w,n(w,x,E),E},h=function(w){return o(w,x)?w[x]:{}},v=function(w){return o(w,x)}}return _0={set:p,get:h,has:v,enforce:y,getterFor:g},_0}var WM;function AB(){if(WM)return g0.exports;WM=1;var e=ft(),t=vt(),r=Dt(),n=Wr(),o=sn(),i=E1().CONFIGURABLE,a=PB(),s=ha(),c=s.enforce,u=s.get,d=String,p=Object.defineProperty,h=e("".slice),v=e("".replace),y=e([].join),g=o&&!t(function(){return p(function(){},"length",{value:8}).length!==8}),b=String(String).split("String"),x=g0.exports=function(w,E,S){h(d(E),0,7)==="Symbol("&&(E="["+v(d(E),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),S&&S.getter&&(E="get "+E),S&&S.setter&&(E="set "+E),(!n(w,"name")||i&&w.name!==E)&&(o?p(w,"name",{value:E,configurable:!0}):w.name=E),g&&S&&n(S,"arity")&&w.length!==S.arity&&p(w,"length",{value:S.arity});try{S&&n(S,"constructor")&&S.constructor?o&&p(w,"prototype",{writable:!1}):w.prototype&&(w.prototype=void 0)}catch{}var _=c(w);return n(_,"source")||(_.source=y(b,typeof E=="string"?E:"")),w};return Function.prototype.toString=x(function(){return r(this)&&u(this).source||a(this)},"toString"),g0.exports}var E0,UM;function oi(){if(UM)return E0;UM=1;var e=Dt(),t=Yn(),r=AB(),n=b1();return E0=function(o,i,a,s){s||(s={});var c=s.enumerable,u=s.name!==void 0?s.name:i;if(e(a)&&r(a,u,s),s.global)c?o[i]=a:n(i,a);else{try{s.unsafe?o[i]&&(c=!0):delete o[i]}catch{}c?o[i]=a:t.f(o,i,{value:a,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return o},E0}var S0={},O0,GM;function bie(){if(GM)return O0;GM=1;var e=Math.ceil,t=Math.floor;return O0=Math.trunc||function(n){var o=+n;return(o>0?t:e)(o)},O0}var C0,KM;function kd(){if(KM)return C0;KM=1;var e=bie();return C0=function(t){var r=+t;return r!==r||r===0?0:e(r)},C0}var I0,YM;function yie(){if(YM)return I0;YM=1;var e=kd(),t=Math.max,r=Math.min;return I0=function(n,o){var i=e(n);return i<0?t(i+o,0):r(i,o)},I0}var R0,XM;function O1(){if(XM)return R0;XM=1;var e=kd(),t=Math.min;return R0=function(r){var n=e(r);return n>0?t(n,9007199254740991):0},R0}var N0,ZM;function Md(){if(ZM)return N0;ZM=1;var e=O1();return N0=function(t){return e(t.length)},N0}var P0,JM;function wie(){if(JM)return P0;JM=1;var e=fa(),t=yie(),r=Md(),n=function(o){return function(i,a,s){var c=e(i),u=r(c);if(u===0)return!o&&-1;var d=t(s,u),p;if(o&&a!==a){for(;u>d;)if(p=c[d++],p!==p)return!0}else for(;u>d;d++)if((o||d in c)&&c[d]===a)return o||d||0;return!o&&-1}};return P0={includes:n(!0),indexOf:n(!1)},P0}var T0,QM;function kB(){if(QM)return T0;QM=1;var e=ft(),t=Wr(),r=fa(),n=wie().indexOf,o=Ad(),i=e([].push);return T0=function(a,s){var c=r(a),u=0,d=[],p;for(p in c)!t(o,p)&&t(c,p)&&i(d,p);for(;s.length>u;)t(c,p=s[u++])&&(~n(d,p)||i(d,p));return d},T0}var A0,eD;function C1(){return eD||(eD=1,A0=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),A0}var tD;function I1(){if(tD)return S0;tD=1;var e=kB(),t=C1(),r=t.concat("length","prototype");return S0.f=Object.getOwnPropertyNames||function(o){return e(o,r)},S0}var k0={},rD;function MB(){return rD||(rD=1,k0.f=Object.getOwnPropertySymbols),k0}var M0,nD;function xie(){if(nD)return M0;nD=1;var e=Nd(),t=ft(),r=I1(),n=MB(),o=Ur(),i=t([].concat);return M0=e("Reflect","ownKeys")||function(s){var c=r.f(o(s)),u=n.f;return u?i(c,u(s)):c},M0}var D0,oD;function _ie(){if(oD)return D0;oD=1;var e=Wr(),t=xie(),r=RB(),n=Yn();return D0=function(o,i,a){for(var s=t(i),c=n.f,u=r.f,d=0;d<s.length;d++){var p=s[d];!e(o,p)&&!(a&&e(a,p))&&c(o,p,u(i,p))}},D0}var j0,iD;function DB(){if(iD)return j0;iD=1;var e=vt(),t=Dt(),r=/#|\.prototype\./,n=function(c,u){var d=i[o(c)];return d===s?!0:d===a?!1:t(u)?e(u):!!u},o=n.normalize=function(c){return String(c).replace(r,".").toLowerCase()},i=n.data={},a=n.NATIVE="N",s=n.POLYFILL="P";return j0=n,j0}var q0,aD;function So(){if(aD)return q0;aD=1;var e=Pt(),t=RB().f,r=Xs(),n=oi(),o=b1(),i=_ie(),a=DB();return q0=function(s,c){var u=s.target,d=s.global,p=s.stat,h,v,y,g,b,x;if(d?v=e:p?v=e[u]||o(u,{}):v=e[u]&&e[u].prototype,v)for(y in c){if(b=c[y],s.dontCallGetSet?(x=t(v,y),g=x&&x.value):g=v[y],h=a(d?y:u+(p?".":"#")+y,s.forced),!h&&g!==void 0){if(typeof b==typeof g)continue;i(b,g)}(s.sham||g&&g.sham)&&r(b,"sham",!0),n(v,y,b,s)}},q0}var L0,sD;function R1(){if(sD)return L0;sD=1;var e=tr(),t=e("toStringTag"),r={};return r[t]="z",L0=String(r)==="[object z]",L0}var z0,lD;function Dd(){if(lD)return z0;lD=1;var e=R1(),t=Dt(),r=Eo(),n=tr(),o=n("toStringTag"),i=Object,a=r((function(){return arguments})())==="Arguments",s=function(c,u){try{return c[u]}catch{}};return z0=e?r:function(c){var u,d,p;return c===void 0?"Undefined":c===null?"Null":typeof(d=s(u=i(c),o))=="string"?d:a?r(u):(p=r(u))==="Object"&&t(u.callee)?"Arguments":p},z0}var B0,cD;function ii(){if(cD)return B0;cD=1;var e=Dd(),t=String;return B0=function(r){if(e(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return t(r)},B0}var F0,uD;function jB(){return uD||(uD=1,F0=`
117
- \v\f\r                 \u2028\u2029\uFEFF`),F0}var $0,dD;function Eie(){if(dD)return $0;dD=1;var e=ft(),t=ni(),r=ii(),n=jB(),o=e("".replace),i=RegExp("^["+n+"]+"),a=RegExp("(^|[^"+n+"])["+n+"]+$"),s=function(c){return function(u){var d=r(t(u));return c&1&&(d=o(d,i,"")),c&2&&(d=o(d,a,"$1")),d}};return $0={start:s(1),end:s(2),trim:s(3)},$0}var H0,fD;function Sie(){if(fD)return H0;fD=1;var e=Pt(),t=vt(),r=ft(),n=ii(),o=Eie().trim,i=jB(),a=e.parseInt,s=e.Symbol,c=s&&s.iterator,u=/^[+-]?0x/i,d=r(u.exec),p=a(i+"08")!==8||a(i+"0x16")!==22||c&&!t(function(){a(Object(c))});return H0=p?function(v,y){var g=o(n(v));return a(g,y>>>0||(d(u,g)?16:10))}:a,H0}var pD;function Oie(){if(pD)return Yk;pD=1;var e=So(),t=Sie();return e({global:!0,forced:parseInt!==t},{parseInt:t}),Yk}Oie();var hD={},V0,vD;function qB(){if(vD)return V0;vD=1;var e=kB(),t=C1();return V0=Object.keys||function(n){return e(n,t)},V0}var W0,gD;function Cie(){if(gD)return W0;gD=1;var e=sn(),t=ft(),r=fr(),n=vt(),o=qB(),i=MB(),a=xB(),s=pa(),c=Rd(),u=Object.assign,d=Object.defineProperty,p=t([].concat);return W0=!u||n(function(){if(e&&u({b:1},u(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var h={},v={},y=Symbol("assign detection"),g="abcdefghijklmnopqrst";return h[y]=7,g.split("").forEach(function(b){v[b]=b}),u({},h)[y]!==7||o(u({},v)).join("")!==g})?function(v,y){for(var g=s(v),b=arguments.length,x=1,w=i.f,E=a.f;b>x;)for(var S=c(arguments[x++]),_=w?p(o(S),w(S)):o(S),O=_.length,N=0,R;O>N;)R=_[N++],(!e||r(E,S,R))&&(g[R]=S[R]);return g}:u,W0}var mD;function Iie(){if(mD)return hD;mD=1;var e=So(),t=Cie();return e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),hD}Iie();var bD={},U0,yD;function Rie(){if(yD)return U0;yD=1;var e=Eo(),t=ft();return U0=function(r){if(e(r)==="Function")return t(r)},U0}var G0,wD;function LB(){if(wD)return G0;wD=1;var e=Rie(),t=Ks(),r=Id(),n=e(e.bind);return G0=function(o,i){return t(o),i===void 0?o:r?n(o,i):function(){return o.apply(i,arguments)}},G0}var K0,xD;function Nie(){if(xD)return K0;xD=1;var e=Eo();return K0=Array.isArray||function(r){return e(r)==="Array"},K0}var Y0,_D;function Pie(){if(_D)return Y0;_D=1;var e=ft(),t=vt(),r=Dt(),n=Dd(),o=Nd(),i=PB(),a=function(){},s=o("Reflect","construct"),c=/^\s*(?:class|function)\b/,u=e(c.exec),d=!c.test(a),p=function(y){if(!r(y))return!1;try{return s(a,[],y),!0}catch{return!1}},h=function(y){if(!r(y))return!1;switch(n(y)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!u(c,i(y))}catch{return!0}};return h.sham=!0,Y0=!s||t(function(){var v;return p(p.call)||!p(Object)||!p(function(){v=!0})||v})?h:p,Y0}var X0,ED;function Tie(){if(ED)return X0;ED=1;var e=Nie(),t=Pie(),r=Vt(),n=tr(),o=n("species"),i=Array;return X0=function(a){var s;return e(a)&&(s=a.constructor,t(s)&&(s===i||e(s.prototype))?s=void 0:r(s)&&(s=s[o],s===null&&(s=void 0))),s===void 0?i:s},X0}var Z0,SD;function Aie(){if(SD)return Z0;SD=1;var e=Tie();return Z0=function(t,r){return new(e(t))(r===0?0:r)},Z0}var J0,OD;function zB(){if(OD)return J0;OD=1;var e=LB(),t=ft(),r=Rd(),n=pa(),o=Md(),i=Aie(),a=t([].push),s=function(c){var u=c===1,d=c===2,p=c===3,h=c===4,v=c===6,y=c===7,g=c===5||v;return function(b,x,w,E){for(var S=n(b),_=r(S),O=o(_),N=e(x,w),R=0,A=E||i,D=u?A(b,O):d||y?A(b,0):void 0,B,j;O>R;R++)if((g||R in _)&&(B=_[R],j=N(B,R,S),c))if(u)D[R]=j;else if(j)switch(c){case 3:return!0;case 5:return B;case 6:return R;case 2:a(D,B)}else switch(c){case 4:return!1;case 7:a(D,B)}return v?-1:p||h?h:D}};return J0={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)},J0}var Q0,CD;function kie(){if(CD)return Q0;CD=1;var e=vt(),t=tr(),r=g1(),n=t("species");return Q0=function(o){return r>=51||!e(function(){var i=[],a=i.constructor={};return a[n]=function(){return{foo:1}},i[o](Boolean).foo!==1})},Q0}var ID;function Mie(){if(ID)return bD;ID=1;var e=So(),t=zB().filter,r=kie(),n=r("filter");return e({target:"Array",proto:!0,forced:!n},{filter:function(i){return t(this,i,arguments.length>1?arguments[1]:void 0)}}),bD}Mie();var RD={},ew,ND;function Die(){if(ND)return ew;ND=1;var e=R1(),t=Dd();return ew=e?{}.toString:function(){return"[object "+t(this)+"]"},ew}var PD;function jie(){if(PD)return RD;PD=1;var e=R1(),t=oi(),r=Die();return e||t(Object.prototype,"toString",r,{unsafe:!0}),RD}jie();var tw={},TD;function qie(){if(TD)return tw;TD=1;var e=sn(),t=NB(),r=Yn(),n=Ur(),o=fa(),i=qB();return tw.f=e&&!t?Object.defineProperties:function(s,c){n(s);for(var u=o(c),d=i(c),p=d.length,h=0,v;p>h;)r.f(s,v=d[h++],u[v]);return s},tw}var rw,AD;function Lie(){if(AD)return rw;AD=1;var e=Nd();return rw=e("document","documentElement"),rw}var nw,kD;function jd(){if(kD)return nw;kD=1;var e=Ur(),t=qie(),r=C1(),n=Ad(),o=Lie(),i=_1(),a=S1(),s=">",c="<",u="prototype",d="script",p=a("IE_PROTO"),h=function(){},v=function(w){return c+d+s+w+c+"/"+d+s},y=function(w){w.write(v("")),w.close();var E=w.parentWindow.Object;return w=null,E},g=function(){var w=i("iframe"),E="java"+d+":",S;return w.style.display="none",o.appendChild(w),w.src=String(E),S=w.contentWindow.document,S.open(),S.write(v("document.F=Object")),S.close(),S.F},b,x=function(){try{b=new ActiveXObject("htmlfile")}catch{}x=typeof document<"u"?document.domain&&b?y(b):g():y(b);for(var w=r.length;w--;)delete x[u][r[w]];return x()};return n[p]=!0,nw=Object.create||function(E,S){var _;return E!==null?(h[u]=e(E),_=new h,h[u]=null,_[p]=E):_=x(),S===void 0?_:t.f(_,S)},nw}var ow,MD;function zie(){if(MD)return ow;MD=1;var e=tr(),t=jd(),r=Yn().f,n=e("unscopables"),o=Array.prototype;return o[n]===void 0&&r(o,n,{configurable:!0,value:t(null)}),ow=function(i){o[n][i]=!0},ow}var iw,DD;function Zs(){return DD||(DD=1,iw={}),iw}var aw,jD;function Bie(){if(jD)return aw;jD=1;var e=vt();return aw=!e(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),aw}var sw,qD;function BB(){if(qD)return sw;qD=1;var e=Wr(),t=Dt(),r=pa(),n=S1(),o=Bie(),i=n("IE_PROTO"),a=Object,s=a.prototype;return sw=o?a.getPrototypeOf:function(c){var u=r(c);if(e(u,i))return u[i];var d=u.constructor;return t(d)&&u instanceof d?d.prototype:u instanceof a?s:null},sw}var lw,LD;function FB(){if(LD)return lw;LD=1;var e=vt(),t=Dt(),r=Vt(),n=jd(),o=BB(),i=oi(),a=tr(),s=Td(),c=a("iterator"),u=!1,d,p,h;[].keys&&(h=[].keys(),"next"in h?(p=o(o(h)),p!==Object.prototype&&(d=p)):u=!0);var v=!r(d)||e(function(){var y={};return d[c].call(y)!==y});return v?d={}:s&&(d=n(d)),t(d[c])||i(d,c,function(){return this}),lw={IteratorPrototype:d,BUGGY_SAFARI_ITERATORS:u},lw}var cw,zD;function qd(){if(zD)return cw;zD=1;var e=Yn().f,t=Wr(),r=tr(),n=r("toStringTag");return cw=function(o,i,a){o&&!a&&(o=o.prototype),o&&!t(o,n)&&e(o,n,{configurable:!0,value:i})},cw}var uw,BD;function Fie(){if(BD)return uw;BD=1;var e=FB().IteratorPrototype,t=jd(),r=v1(),n=qd(),o=Zs(),i=function(){return this};return uw=function(a,s,c,u){var d=s+" Iterator";return a.prototype=t(e,{next:r(+!u,c)}),n(a,d,!1,!0),o[d]=i,a},uw}var dw,FD;function $ie(){if(FD)return dw;FD=1;var e=ft(),t=Ks();return dw=function(r,n,o){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[o]))}catch{}},dw}var fw,$D;function Hie(){if($D)return fw;$D=1;var e=Vt();return fw=function(t){return e(t)||t===null},fw}var pw,HD;function Vie(){if(HD)return pw;HD=1;var e=Hie(),t=String,r=TypeError;return pw=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")},pw}var hw,VD;function $B(){if(VD)return hw;VD=1;var e=$ie(),t=Vt(),r=ni(),n=Vie();return hw=Object.setPrototypeOf||("__proto__"in{}?(function(){var o=!1,i={},a;try{a=e(Object.prototype,"__proto__","set"),a(i,[]),o=i instanceof Array}catch{}return function(c,u){return r(c),n(u),t(c)&&(o?a(c,u):c.__proto__=u),c}})():void 0),hw}var vw,WD;function HB(){if(WD)return vw;WD=1;var e=So(),t=fr(),r=Td(),n=E1(),o=Dt(),i=Fie(),a=BB(),s=$B(),c=qd(),u=Xs(),d=oi(),p=tr(),h=Zs(),v=FB(),y=n.PROPER,g=n.CONFIGURABLE,b=v.IteratorPrototype,x=v.BUGGY_SAFARI_ITERATORS,w=p("iterator"),E="keys",S="values",_="entries",O=function(){return this};return vw=function(N,R,A,D,B,j,M){i(A,R,D);var P=function($){if($===B&&Q)return Q;if(!x&&$&&$ in G)return G[$];switch($){case E:return function(){return new A(this,$)};case S:return function(){return new A(this,$)};case _:return function(){return new A(this,$)}}return function(){return new A(this)}},V=R+" Iterator",q=!1,G=N.prototype,W=G[w]||G["@@iterator"]||B&&G[B],Q=!x&&W||P(B),z=R==="Array"&&G.entries||W,U,ie,te;if(z&&(U=a(z.call(new N)),U!==Object.prototype&&U.next&&(!r&&a(U)!==b&&(s?s(U,b):o(U[w])||d(U,w,O)),c(U,V,!0,!0),r&&(h[V]=O))),y&&B===S&&W&&W.name!==S&&(!r&&g?u(G,"name",S):(q=!0,Q=function(){return t(W,this)})),B)if(ie={values:P(S),keys:j?Q:P(E),entries:P(_)},M)for(te in ie)(x||q||!(te in G))&&d(G,te,ie[te]);else e({target:R,proto:!0,forced:x||q},ie);return(!r||M)&&G[w]!==Q&&d(G,w,Q,{name:B}),h[R]=Q,ie},vw}var gw,UD;function VB(){return UD||(UD=1,gw=function(e,t){return{value:e,done:t}}),gw}var mw,GD;function WB(){if(GD)return mw;GD=1;var e=fa(),t=zie(),r=Zs(),n=ha(),o=Yn().f,i=HB(),a=VB(),s=Td(),c=sn(),u="Array Iterator",d=n.set,p=n.getterFor(u);mw=i(Array,"Array",function(v,y){d(this,{type:u,target:e(v),index:0,kind:y})},function(){var v=p(this),y=v.target,g=v.index++;if(!y||g>=y.length)return v.target=null,a(void 0,!0);switch(v.kind){case"keys":return a(g,!1);case"values":return a(y[g],!1)}return a([g,y[g]],!1)},"values");var h=r.Arguments=r.Array;if(t("keys"),t("values"),t("entries"),!s&&c&&h.name!=="values")try{o(h,"name",{value:"values"})}catch{}return mw}WB();var KD={},bw,YD;function UB(){if(YD)return bw;YD=1;var e=ft(),t=kd(),r=ii(),n=ni(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),s=function(c){return function(u,d){var p=r(n(u)),h=t(d),v=p.length,y,g;return h<0||h>=v?c?"":void 0:(y=i(p,h),y<55296||y>56319||h+1===v||(g=i(p,h+1))<56320||g>57343?c?o(p,h):y:c?a(p,h,h+2):(y-55296<<10)+(g-56320)+65536)}};return bw={codeAt:s(!1),charAt:s(!0)},bw}var XD;function Wie(){if(XD)return KD;XD=1;var e=UB().charAt,t=ii(),r=ha(),n=HB(),o=VB(),i="String Iterator",a=r.set,s=r.getterFor(i);return n(String,"String",function(c){a(this,{type:i,string:t(c),index:0})},function(){var u=s(this),d=u.string,p=u.index,h;return p>=d.length?o(void 0,!0):(h=e(d,p),u.index+=h.length,o(h,!1))}),KD}Wie();var ZD={},JD={},yw,QD;function GB(){if(QD)return yw;QD=1;var e=vt();return yw=!e(function(){return Object.isExtensible(Object.preventExtensions({}))}),yw}var ww,ej;function KB(){if(ej)return ww;ej=1;var e=oi();return ww=function(t,r,n){for(var o in r)e(t,o,r[o],n);return t},ww}var xw={exports:{}},_w={},Ew,tj;function Uie(){if(tj)return Ew;tj=1;var e=ft();return Ew=e([].slice),Ew}var rj;function Gie(){if(rj)return _w;rj=1;var e=Eo(),t=fa(),r=I1().f,n=Uie(),o=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],i=function(a){try{return r(a)}catch{return n(o)}};return _w.f=function(s){return o&&e(s)==="Window"?i(s):r(t(s))},_w}var Sw,nj;function Kie(){if(nj)return Sw;nj=1;var e=vt();return Sw=e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),Sw}var Ow,oj;function Yie(){if(oj)return Ow;oj=1;var e=vt(),t=Vt(),r=Eo(),n=Kie(),o=Object.isExtensible,i=e(function(){});return Ow=i||n?function(s){return!t(s)||n&&r(s)==="ArrayBuffer"?!1:o?o(s):!0}:o,Ow}var ij;function N1(){if(ij)return xw.exports;ij=1;var e=So(),t=ft(),r=Ad(),n=Vt(),o=Wr(),i=Yn().f,a=I1(),s=Gie(),c=Yie(),u=x1(),d=GB(),p=!1,h=u("meta"),v=0,y=function(S){i(S,h,{value:{objectID:"O"+v++,weakData:{}}})},g=function(S,_){if(!n(S))return typeof S=="symbol"?S:(typeof S=="string"?"S":"P")+S;if(!o(S,h)){if(!c(S))return"F";if(!_)return"E";y(S)}return S[h].objectID},b=function(S,_){if(!o(S,h)){if(!c(S))return!0;if(!_)return!1;y(S)}return S[h].weakData},x=function(S){return d&&p&&c(S)&&!o(S,h)&&y(S),S},w=function(){E.enable=function(){},p=!0;var S=a.f,_=t([].splice),O={};O[h]=1,S(O).length&&(a.f=function(N){for(var R=S(N),A=0,D=R.length;A<D;A++)if(R[A]===h){_(R,A,1);break}return R},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},E=xw.exports={enable:w,fastKey:g,getWeakData:b,onFreeze:x};return r[h]=!0,xw.exports}var Cw,aj;function Xie(){if(aj)return Cw;aj=1;var e=tr(),t=Zs(),r=e("iterator"),n=Array.prototype;return Cw=function(o){return o!==void 0&&(t.Array===o||n[r]===o)},Cw}var Iw,sj;function YB(){if(sj)return Iw;sj=1;var e=Dd(),t=Ys(),r=Gs(),n=Zs(),o=tr(),i=o("iterator");return Iw=function(a){if(!r(a))return t(a,i)||t(a,"@@iterator")||n[e(a)]},Iw}var Rw,lj;function Zie(){if(lj)return Rw;lj=1;var e=fr(),t=Ks(),r=Ur(),n=m1(),o=YB(),i=TypeError;return Rw=function(a,s){var c=arguments.length<2?o(a):s;if(t(c))return r(e(c,a));throw new i(n(a)+" is not iterable")},Rw}var Nw,cj;function Jie(){if(cj)return Nw;cj=1;var e=fr(),t=Ur(),r=Ys();return Nw=function(n,o,i){var a,s;t(n);try{if(a=r(n,"return"),!a){if(o==="throw")throw i;return i}a=e(a,n)}catch(c){s=!0,a=c}if(o==="throw")throw i;if(s)throw a;return t(a),i},Nw}var Pw,uj;function XB(){if(uj)return Pw;uj=1;var e=LB(),t=fr(),r=Ur(),n=m1(),o=Xie(),i=Md(),a=Pd(),s=Zie(),c=YB(),u=Jie(),d=TypeError,p=function(v,y){this.stopped=v,this.result=y},h=p.prototype;return Pw=function(v,y,g){var b=g&&g.that,x=!!(g&&g.AS_ENTRIES),w=!!(g&&g.IS_RECORD),E=!!(g&&g.IS_ITERATOR),S=!!(g&&g.INTERRUPTED),_=e(y,b),O,N,R,A,D,B,j,M=function(V){return O&&u(O,"normal"),new p(!0,V)},P=function(V){return x?(r(V),S?_(V[0],V[1],M):_(V[0],V[1])):S?_(V,M):_(V)};if(w)O=v.iterator;else if(E)O=v;else{if(N=c(v),!N)throw new d(n(v)+" is not iterable");if(o(N)){for(R=0,A=i(v);A>R;R++)if(D=P(v[R]),D&&a(h,D))return D;return new p(!1)}O=s(v,N)}for(B=w?v.next:O.next;!(j=t(B,O)).done;){try{D=P(j.value)}catch(V){u(O,"throw",V)}if(typeof D=="object"&&D&&a(h,D))return D}return new p(!1)},Pw}var Tw,dj;function ZB(){if(dj)return Tw;dj=1;var e=Pd(),t=TypeError;return Tw=function(r,n){if(e(n,r))return r;throw new t("Incorrect invocation")},Tw}var Aw,fj;function Qie(){if(fj)return Aw;fj=1;var e=tr(),t=e("iterator"),r=!1;try{var n=0,o={next:function(){return{done:!!n++}},return:function(){r=!0}};o[t]=function(){return this},Array.from(o,function(){throw 2})}catch{}return Aw=function(i,a){try{if(!a&&!r)return!1}catch{return!1}var s=!1;try{var c={};c[t]=function(){return{next:function(){return{done:s=!0}}}},i(c)}catch{}return s},Aw}var kw,pj;function eae(){if(pj)return kw;pj=1;var e=Dt(),t=Vt(),r=$B();return kw=function(n,o,i){var a,s;return r&&e(a=o.constructor)&&a!==i&&t(s=a.prototype)&&s!==i.prototype&&r(n,s),n},kw}var Mw,hj;function tae(){if(hj)return Mw;hj=1;var e=So(),t=Pt(),r=ft(),n=DB(),o=oi(),i=N1(),a=XB(),s=ZB(),c=Dt(),u=Gs(),d=Vt(),p=vt(),h=Qie(),v=qd(),y=eae();return Mw=function(g,b,x){var w=g.indexOf("Map")!==-1,E=g.indexOf("Weak")!==-1,S=w?"set":"add",_=t[g],O=_&&_.prototype,N=_,R={},A=function(q){var G=r(O[q]);o(O,q,q==="add"?function(Q){return G(this,Q===0?0:Q),this}:q==="delete"?function(W){return E&&!d(W)?!1:G(this,W===0?0:W)}:q==="get"?function(Q){return E&&!d(Q)?void 0:G(this,Q===0?0:Q)}:q==="has"?function(Q){return E&&!d(Q)?!1:G(this,Q===0?0:Q)}:function(Q,z){return G(this,Q===0?0:Q,z),this})},D=n(g,!c(_)||!(E||O.forEach&&!p(function(){new _().entries().next()})));if(D)N=x.getConstructor(b,g,w,S),i.enable();else if(n(g,!0)){var B=new N,j=B[S](E?{}:-0,1)!==B,M=p(function(){B.has(1)}),P=h(function(q){new _(q)}),V=!E&&p(function(){for(var q=new _,G=5;G--;)q[S](G,G);return!q.has(-0)});P||(N=b(function(q,G){s(q,O);var W=y(new _,q,N);return u(G)||a(G,W[S],{that:W,AS_ENTRIES:w}),W}),N.prototype=O,O.constructor=N),(M||V)&&(A("delete"),A("has"),w&&A("get")),(V||j)&&A(S),E&&O.clear&&delete O.clear}return R[g]=N,e({global:!0,constructor:!0,forced:N!==_},R),v(N,g),E||x.setStrong(N,g,w),N},Mw}var Dw,vj;function rae(){if(vj)return Dw;vj=1;var e=ft(),t=KB(),r=N1().getWeakData,n=ZB(),o=Ur(),i=Gs(),a=Vt(),s=XB(),c=zB(),u=Wr(),d=ha(),p=d.set,h=d.getterFor,v=c.find,y=c.findIndex,g=e([].splice),b=0,x=function(S){return S.frozen||(S.frozen=new w)},w=function(){this.entries=[]},E=function(S,_){return v(S.entries,function(O){return O[0]===_})};return w.prototype={get:function(S){var _=E(this,S);if(_)return _[1]},has:function(S){return!!E(this,S)},set:function(S,_){var O=E(this,S);O?O[1]=_:this.entries.push([S,_])},delete:function(S){var _=y(this.entries,function(O){return O[0]===S});return~_&&g(this.entries,_,1),!!~_}},Dw={getConstructor:function(S,_,O,N){var R=S(function(j,M){n(j,A),p(j,{type:_,id:b++,frozen:null}),i(M)||s(M,j[N],{that:j,AS_ENTRIES:O})}),A=R.prototype,D=h(_),B=function(j,M,P){var V=D(j),q=r(o(M),!0);return q===!0?x(V).set(M,P):q[V.id]=P,j};return t(A,{delete:function(j){var M=D(this);if(!a(j))return!1;var P=r(j);return P===!0?x(M).delete(j):P&&u(P,M.id)&&delete P[M.id]},has:function(M){var P=D(this);if(!a(M))return!1;var V=r(M);return V===!0?x(P).has(M):V&&u(V,P.id)}}),t(A,O?{get:function(M){var P=D(this);if(a(M)){var V=r(M);if(V===!0)return x(P).get(M);if(V)return V[P.id]}},set:function(M,P){return B(this,M,P)}}:{add:function(M){return B(this,M,!0)}}),R}},Dw}var gj;function nae(){if(gj)return JD;gj=1;var e=GB(),t=Pt(),r=ft(),n=KB(),o=N1(),i=tae(),a=rae(),s=Vt(),c=ha().enforce,u=vt(),d=TB(),p=Object,h=Array.isArray,v=p.isExtensible,y=p.isFrozen,g=p.isSealed,b=p.freeze,x=p.seal,w=!t.ActiveXObject&&"ActiveXObject"in t,E,S=function(j){return function(){return j(this,arguments.length?arguments[0]:void 0)}},_=i("WeakMap",S,a),O=_.prototype,N=r(O.set),R=function(){return e&&u(function(){var j=b([]);return N(new _,j,1),!y(j)})};if(d)if(w){E=a.getConstructor(S,"WeakMap",!0),o.enable();var A=r(O.delete),D=r(O.has),B=r(O.get);n(O,{delete:function(j){if(s(j)&&!v(j)){var M=c(this);return M.frozen||(M.frozen=new E),A(this,j)||M.frozen.delete(j)}return A(this,j)},has:function(M){if(s(M)&&!v(M)){var P=c(this);return P.frozen||(P.frozen=new E),D(this,M)||P.frozen.has(M)}return D(this,M)},get:function(M){if(s(M)&&!v(M)){var P=c(this);return P.frozen||(P.frozen=new E),D(this,M)?B(this,M):P.frozen.get(M)}return B(this,M)},set:function(M,P){if(s(M)&&!v(M)){var V=c(this);V.frozen||(V.frozen=new E),D(this,M)?N(this,M,P):V.frozen.set(M,P)}else N(this,M,P);return this}})}else R()&&n(O,{set:function(M,P){var V;return h(M)&&(y(M)?V=b:g(M)&&(V=x)),N(this,M,P),V&&V(M),this}});return JD}var mj;function oae(){return mj||(mj=1,nae()),ZD}oae();var bj={},jw,yj;function iae(){return yj||(yj=1,jw={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),jw}var qw,wj;function aae(){if(wj)return qw;wj=1;var e=_1(),t=e("span").classList,r=t&&t.constructor&&t.constructor.prototype;return qw=r===Object.prototype?void 0:r,qw}var xj;function sae(){if(xj)return bj;xj=1;var e=Pt(),t=iae(),r=aae(),n=WB(),o=Xs(),i=qd(),a=tr(),s=a("iterator"),c=n.values,u=function(p,h){if(p){if(p[s]!==c)try{o(p,s,c)}catch{p[s]=c}if(i(p,h,!0),t[h]){for(var v in n)if(p[v]!==n[v])try{o(p,v,n[v])}catch{p[v]=n[v]}}}};for(var d in t)u(e[d]&&e[d].prototype,d);return u(r,"DOMTokenList"),bj}sae();var Lw,_j;function lae(){if(_j)return Lw;_j=1;var e="Expected a function",t=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,c=typeof _t=="object"&&_t&&_t.Object===Object&&_t,u=typeof self=="object"&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),p=Object.prototype,h=p.toString,v=Math.max,y=Math.min,g=function(){return d.Date.now()};function b(O,N,R){var A,D,B,j,M,P,V=0,q=!1,G=!1,W=!0;if(typeof O!="function")throw new TypeError(e);N=_(N)||0,w(R)&&(q=!!R.leading,G="maxWait"in R,B=G?v(_(R.maxWait)||0,N):B,W="trailing"in R?!!R.trailing:W);function Q(Y){var oe=A,re=D;return A=D=void 0,V=Y,j=O.apply(re,oe),j}function z(Y){return V=Y,M=setTimeout(te,N),q?Q(Y):j}function U(Y){var oe=Y-P,re=Y-V,se=N-oe;return G?y(se,B-re):se}function ie(Y){var oe=Y-P,re=Y-V;return P===void 0||oe>=N||oe<0||G&&re>=B}function te(){var Y=g();if(ie(Y))return $(Y);M=setTimeout(te,U(Y))}function $(Y){return M=void 0,W&&A?Q(Y):(A=D=void 0,j)}function K(){M!==void 0&&clearTimeout(M),V=0,A=P=D=M=void 0}function Z(){return M===void 0?j:$(g())}function H(){var Y=g(),oe=ie(Y);if(A=arguments,D=this,P=Y,oe){if(M===void 0)return z(P);if(G)return M=setTimeout(te,N),Q(P)}return M===void 0&&(M=setTimeout(te,N)),j}return H.cancel=K,H.flush=Z,H}function x(O,N,R){var A=!0,D=!0;if(typeof O!="function")throw new TypeError(e);return w(R)&&(A="leading"in R?!!R.leading:A,D="trailing"in R?!!R.trailing:D),b(O,N,{leading:A,maxWait:N,trailing:D})}function w(O){var N=typeof O;return!!O&&(N=="object"||N=="function")}function E(O){return!!O&&typeof O=="object"}function S(O){return typeof O=="symbol"||E(O)&&h.call(O)==r}function _(O){if(typeof O=="number")return O;if(S(O))return t;if(w(O)){var N=typeof O.valueOf=="function"?O.valueOf():O;O=w(N)?N+"":N}if(typeof O!="string")return O===0?O:+O;O=O.replace(n,"");var R=i.test(O);return R||a.test(O)?s(O.slice(2),R?2:8):o.test(O)?t:+O}return Lw=x,Lw}var cae=lae();const Ej=wo(cae);var zw,Sj;function uae(){if(Sj)return zw;Sj=1;var e="Expected a function",t=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,c=typeof _t=="object"&&_t&&_t.Object===Object&&_t,u=typeof self=="object"&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),p=Object.prototype,h=p.toString,v=Math.max,y=Math.min,g=function(){return d.Date.now()};function b(_,O,N){var R,A,D,B,j,M,P=0,V=!1,q=!1,G=!0;if(typeof _!="function")throw new TypeError(e);O=S(O)||0,x(N)&&(V=!!N.leading,q="maxWait"in N,D=q?v(S(N.maxWait)||0,O):D,G="trailing"in N?!!N.trailing:G);function W(H){var Y=R,oe=A;return R=A=void 0,P=H,B=_.apply(oe,Y),B}function Q(H){return P=H,j=setTimeout(ie,O),V?W(H):B}function z(H){var Y=H-M,oe=H-P,re=O-Y;return q?y(re,D-oe):re}function U(H){var Y=H-M,oe=H-P;return M===void 0||Y>=O||Y<0||q&&oe>=D}function ie(){var H=g();if(U(H))return te(H);j=setTimeout(ie,z(H))}function te(H){return j=void 0,G&&R?W(H):(R=A=void 0,B)}function $(){j!==void 0&&clearTimeout(j),P=0,R=M=A=j=void 0}function K(){return j===void 0?B:te(g())}function Z(){var H=g(),Y=U(H);if(R=arguments,A=this,M=H,Y){if(j===void 0)return Q(M);if(q)return j=setTimeout(ie,O),W(M)}return j===void 0&&(j=setTimeout(ie,O)),B}return Z.cancel=$,Z.flush=K,Z}function x(_){var O=typeof _;return!!_&&(O=="object"||O=="function")}function w(_){return!!_&&typeof _=="object"}function E(_){return typeof _=="symbol"||w(_)&&h.call(_)==r}function S(_){if(typeof _=="number")return _;if(E(_))return t;if(x(_)){var O=typeof _.valueOf=="function"?_.valueOf():_;_=x(O)?O+"":O}if(typeof _!="string")return _===0?_:+_;_=_.replace(n,"");var N=i.test(_);return N||a.test(_)?s(_.slice(2),N?2:8):o.test(_)?t:+_}return zw=b,zw}var dae=uae();const Oj=wo(dae);var Bw,Cj;function fae(){if(Cj)return Bw;Cj=1;var e="Expected a function",t="__lodash_hash_undefined__",r="[object Function]",n="[object GeneratorFunction]",o=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,a=typeof _t=="object"&&_t&&_t.Object===Object&&_t,s=typeof self=="object"&&self&&self.Object===Object&&self,c=a||s||Function("return this")();function u(pe,ce){return pe==null?void 0:pe[ce]}function d(pe){var ce=!1;if(pe!=null&&typeof pe.toString!="function")try{ce=!!(pe+"")}catch{}return ce}var p=Array.prototype,h=Function.prototype,v=Object.prototype,y=c["__core-js_shared__"],g=(function(){var pe=/[^.]+$/.exec(y&&y.keys&&y.keys.IE_PROTO||"");return pe?"Symbol(src)_1."+pe:""})(),b=h.toString,x=v.hasOwnProperty,w=v.toString,E=RegExp("^"+b.call(x).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=p.splice,_=Y(c,"Map"),O=Y(Object,"create");function N(pe){var ce=-1,Ce=pe?pe.length:0;for(this.clear();++ce<Ce;){var ke=pe[ce];this.set(ke[0],ke[1])}}function R(){this.__data__=O?O(null):{}}function A(pe){return this.has(pe)&&delete this.__data__[pe]}function D(pe){var ce=this.__data__;if(O){var Ce=ce[pe];return Ce===t?void 0:Ce}return x.call(ce,pe)?ce[pe]:void 0}function B(pe){var ce=this.__data__;return O?ce[pe]!==void 0:x.call(ce,pe)}function j(pe,ce){var Ce=this.__data__;return Ce[pe]=O&&ce===void 0?t:ce,this}N.prototype.clear=R,N.prototype.delete=A,N.prototype.get=D,N.prototype.has=B,N.prototype.set=j;function M(pe){var ce=-1,Ce=pe?pe.length:0;for(this.clear();++ce<Ce;){var ke=pe[ce];this.set(ke[0],ke[1])}}function P(){this.__data__=[]}function V(pe){var ce=this.__data__,Ce=K(ce,pe);if(Ce<0)return!1;var ke=ce.length-1;return Ce==ke?ce.pop():S.call(ce,Ce,1),!0}function q(pe){var ce=this.__data__,Ce=K(ce,pe);return Ce<0?void 0:ce[Ce][1]}function G(pe){return K(this.__data__,pe)>-1}function W(pe,ce){var Ce=this.__data__,ke=K(Ce,pe);return ke<0?Ce.push([pe,ce]):Ce[ke][1]=ce,this}M.prototype.clear=P,M.prototype.delete=V,M.prototype.get=q,M.prototype.has=G,M.prototype.set=W;function Q(pe){var ce=-1,Ce=pe?pe.length:0;for(this.clear();++ce<Ce;){var ke=pe[ce];this.set(ke[0],ke[1])}}function z(){this.__data__={hash:new N,map:new(_||M),string:new N}}function U(pe){return H(this,pe).delete(pe)}function ie(pe){return H(this,pe).get(pe)}function te(pe){return H(this,pe).has(pe)}function $(pe,ce){return H(this,pe).set(pe,ce),this}Q.prototype.clear=z,Q.prototype.delete=U,Q.prototype.get=ie,Q.prototype.has=te,Q.prototype.set=$;function K(pe,ce){for(var Ce=pe.length;Ce--;)if(we(pe[Ce][0],ce))return Ce;return-1}function Z(pe){if(!Ee(pe)||re(pe))return!1;var ce=ve(pe)||d(pe)?E:i;return ce.test(se(pe))}function H(pe,ce){var Ce=pe.__data__;return oe(ce)?Ce[typeof ce=="string"?"string":"hash"]:Ce.map}function Y(pe,ce){var Ce=u(pe,ce);return Z(Ce)?Ce:void 0}function oe(pe){var ce=typeof pe;return ce=="string"||ce=="number"||ce=="symbol"||ce=="boolean"?pe!=="__proto__":pe===null}function re(pe){return!!g&&g in pe}function se(pe){if(pe!=null){try{return b.call(pe)}catch{}try{return pe+""}catch{}}return""}function ee(pe,ce){if(typeof pe!="function"||ce&&typeof ce!="function")throw new TypeError(e);var Ce=function(){var ke=arguments,Ke=ce?ce.apply(this,ke):ke[0],ze=Ce.cache;if(ze.has(Ke))return ze.get(Ke);var rt=pe.apply(this,ke);return Ce.cache=ze.set(Ke,rt),rt};return Ce.cache=new(ee.Cache||Q),Ce}ee.Cache=Q;function we(pe,ce){return pe===ce||pe!==pe&&ce!==ce}function ve(pe){var ce=Ee(pe)?w.call(pe):"";return ce==r||ce==n}function Ee(pe){var ce=typeof pe;return!!pe&&(ce=="object"||ce=="function")}return Bw=ee,Bw}var pae=fae();const hae=wo(pae);var Vo=[],vae=function(){return Vo.some(function(e){return e.activeTargets.length>0})},gae=function(){return Vo.some(function(e){return e.skippedTargets.length>0})},Ij="ResizeObserver loop completed with undelivered notifications.",mae=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Ij}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Ij),window.dispatchEvent(e)},As;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(As||(As={}));var Wo=function(e){return Object.freeze(e)},bae=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,Wo(this)}return e})(),JB=(function(){function e(t,r,n,o){return this.x=t,this.y=r,this.width=n,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Wo(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,o=t.top,i=t.right,a=t.bottom,s=t.left,c=t.width,u=t.height;return{x:r,y:n,top:o,right:i,bottom:a,left:s,width:c,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),P1=function(e){return e instanceof SVGElement&&"getBBox"in e},QB=function(e){if(P1(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},Rj=function(e){var t;if(e instanceof Element)return!0;var r=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},yae=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},ws=typeof window<"u"?window:{},zc=new WeakMap,Nj=/auto|scroll/,wae=/^tb|vertical/,xae=/msie|trident/i.test(ws.navigator&&ws.navigator.userAgent),vn=function(e){return parseFloat(e||"0")},Vi=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new bae((r?t:e)||0,(r?e:t)||0)},Pj=Wo({devicePixelContentBoxSize:Vi(),borderBoxSize:Vi(),contentBoxSize:Vi(),contentRect:new JB(0,0,0,0)}),eF=function(e,t){if(t===void 0&&(t=!1),zc.has(e)&&!t)return zc.get(e);if(QB(e))return zc.set(e,Pj),Pj;var r=getComputedStyle(e),n=P1(e)&&e.ownerSVGElement&&e.getBBox(),o=!xae&&r.boxSizing==="border-box",i=wae.test(r.writingMode||""),a=!n&&Nj.test(r.overflowY||""),s=!n&&Nj.test(r.overflowX||""),c=n?0:vn(r.paddingTop),u=n?0:vn(r.paddingRight),d=n?0:vn(r.paddingBottom),p=n?0:vn(r.paddingLeft),h=n?0:vn(r.borderTopWidth),v=n?0:vn(r.borderRightWidth),y=n?0:vn(r.borderBottomWidth),g=n?0:vn(r.borderLeftWidth),b=p+u,x=c+d,w=g+v,E=h+y,S=s?e.offsetHeight-E-e.clientHeight:0,_=a?e.offsetWidth-w-e.clientWidth:0,O=o?b+w:0,N=o?x+E:0,R=n?n.width:vn(r.width)-O-_,A=n?n.height:vn(r.height)-N-S,D=R+b+_+w,B=A+x+S+E,j=Wo({devicePixelContentBoxSize:Vi(Math.round(R*devicePixelRatio),Math.round(A*devicePixelRatio),i),borderBoxSize:Vi(D,B,i),contentBoxSize:Vi(R,A,i),contentRect:new JB(p,c,R,A)});return zc.set(e,j),j},tF=function(e,t,r){var n=eF(e,r),o=n.borderBoxSize,i=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case As.DEVICE_PIXEL_CONTENT_BOX:return a;case As.BORDER_BOX:return o;default:return i}},_ae=(function(){function e(t){var r=eF(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=Wo([r.borderBoxSize]),this.contentBoxSize=Wo([r.contentBoxSize]),this.devicePixelContentBoxSize=Wo([r.devicePixelContentBoxSize])}return e})(),rF=function(e){if(QB(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},Eae=function(){var e=1/0,t=[];Vo.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var d=new _ae(u.target),p=rF(u.target);s.push(d),u.lastReportedSize=tF(u.target,u.observedBox),p<e&&(e=p)}),t.push(function(){a.callback.call(a.observer,s,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var r=0,n=t;r<n.length;r++){var o=n[r];o()}return e},Tj=function(e){Vo.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(o){o.isActive()&&(rF(o.target)>e?r.activeTargets.push(o):r.skippedTargets.push(o))})})},Sae=function(){var e=0;for(Tj(e);vae();)e=Eae(),Tj(e);return gae()&&mae(),e>0},Fw,nF=[],Oae=function(){return nF.splice(0).forEach(function(e){return e()})},Cae=function(e){if(!Fw){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return Oae()}).observe(r,n),Fw=function(){r.textContent="".concat(t?t--:t++)}}nF.push(e),Fw()},Iae=function(e){Cae(function(){requestAnimationFrame(e)})},nu=0,Rae=function(){return!!nu},Nae=250,Pae={attributes:!0,characterData:!0,childList:!0,subtree:!0},Aj=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],kj=function(e){return e===void 0&&(e=0),Date.now()+e},$w=!1,Tae=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var r=this;if(t===void 0&&(t=Nae),!$w){$w=!0;var n=kj(t);Iae(function(){var o=!1;try{o=Sae()}finally{if($w=!1,t=n-kj(),!Rae())return;o?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,Pae)};document.body?r():ws.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Aj.forEach(function(r){return ws.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Aj.forEach(function(r){return ws.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),Hx=new Tae,Mj=function(e){!nu&&e>0&&Hx.start(),nu+=e,!nu&&Hx.stop()},Aae=function(e){return!P1(e)&&!yae(e)&&getComputedStyle(e).display==="inline"},kae=(function(){function e(t,r){this.target=t,this.observedBox=r||As.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=tF(this.target,this.observedBox,!0);return Aae(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),Mae=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Bc=new WeakMap,Dj=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},Fc=(function(){function e(){}return e.connect=function(t,r){var n=new Mae(t,r);Bc.set(t,n)},e.observe=function(t,r,n){var o=Bc.get(t),i=o.observationTargets.length===0;Dj(o.observationTargets,r)<0&&(i&&Vo.push(o),o.observationTargets.push(new kae(r,n&&n.box)),Mj(1),Hx.schedule())},e.unobserve=function(t,r){var n=Bc.get(t),o=Dj(n.observationTargets,r),i=n.observationTargets.length===1;o>=0&&(i&&Vo.splice(Vo.indexOf(n),1),n.observationTargets.splice(o,1),Mj(-1))},e.disconnect=function(t){var r=this,n=Bc.get(t);n.observationTargets.slice().forEach(function(o){return r.unobserve(t,o.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),Dae=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Fc.connect(this,t)}return e.prototype.observe=function(t,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Rj(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Fc.observe(this,t,r)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Rj(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Fc.unobserve(this,t)},e.prototype.disconnect=function(){Fc.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),Hw,jj;function jae(){if(jj)return Hw;jj=1;var e=!!(typeof window<"u"&&window.document&&window.document.createElement);return Hw=e,Hw}var qae=jae();const oF=wo(qae);var qj={},Vw,Lj;function Lae(){if(Lj)return Vw;Lj=1;var e=Ks(),t=pa(),r=Rd(),n=Md(),o=TypeError,i="Reduce of empty array with no initial value",a=function(s){return function(c,u,d,p){var h=t(c),v=r(h),y=n(h);if(e(u),y===0&&d<2)throw new o(i);var g=s?y-1:0,b=s?-1:1;if(d<2)for(;;){if(g in v){p=v[g],g+=b;break}if(g+=b,s?g<0:y<=g)throw new o(i)}for(;s?g>=0:y>g;g+=b)g in v&&(p=u(p,v[g],g,h));return p}};return Vw={left:a(!1),right:a(!0)},Vw}var Ww,zj;function zae(){if(zj)return Ww;zj=1;var e=vt();return Ww=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})},Ww}var Uw,Bj;function Bae(){if(Bj)return Uw;Bj=1;var e=Pt(),t=_B(),r=Eo(),n=function(o){return t.slice(0,o.length)===o};return Uw=(function(){return n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":e.Bun&&typeof Bun.version=="string"?"BUN":e.Deno&&typeof Deno.version=="object"?"DENO":r(e.process)==="process"?"NODE":e.window&&e.document?"BROWSER":"REST"})(),Uw}var Gw,Fj;function Fae(){if(Fj)return Gw;Fj=1;var e=Bae();return Gw=e==="NODE",Gw}var $j;function $ae(){if($j)return qj;$j=1;var e=So(),t=Lae().left,r=zae(),n=g1(),o=Fae(),i=!o&&n>79&&n<83,a=i||!r("reduce");return e({target:"Array",proto:!0,forced:a},{reduce:function(c){var u=arguments.length;return t(this,c,u,u>1?arguments[1]:void 0)}}),qj}$ae();var Hj={},Kw,Vj;function iF(){if(Vj)return Kw;Vj=1;var e=Ur();return Kw=function(){var t=e(this),r="";return t.hasIndices&&(r+="d"),t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),t.sticky&&(r+="y"),r},Kw}var Yw,Wj;function Hae(){if(Wj)return Yw;Wj=1;var e=vt(),t=Pt(),r=t.RegExp,n=e(function(){var a=r("a","y");return a.lastIndex=2,a.exec("abcd")!==null}),o=n||e(function(){return!r("a","y").sticky}),i=n||e(function(){var a=r("^r","gy");return a.lastIndex=2,a.exec("str")!==null});return Yw={BROKEN_CARET:i,MISSED_STICKY:o,UNSUPPORTED_Y:n},Yw}var Xw,Uj;function Vae(){if(Uj)return Xw;Uj=1;var e=vt(),t=Pt(),r=t.RegExp;return Xw=e(function(){var n=r(".","s");return!(n.dotAll&&n.test(`
118
- `)&&n.flags==="s")}),Xw}var Zw,Gj;function Wae(){if(Gj)return Zw;Gj=1;var e=vt(),t=Pt(),r=t.RegExp;return Zw=e(function(){var n=r("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"}),Zw}var Jw,Kj;function T1(){if(Kj)return Jw;Kj=1;var e=fr(),t=ft(),r=ii(),n=iF(),o=Hae(),i=w1(),a=jd(),s=ha().get,c=Vae(),u=Wae(),d=i("native-string-replace",String.prototype.replace),p=RegExp.prototype.exec,h=p,v=t("".charAt),y=t("".indexOf),g=t("".replace),b=t("".slice),x=(function(){var _=/a/,O=/b*/g;return e(p,_,"a"),e(p,O,"a"),_.lastIndex!==0||O.lastIndex!==0})(),w=o.BROKEN_CARET,E=/()??/.exec("")[1]!==void 0,S=x||E||w||c||u;return S&&(h=function(O){var N=this,R=s(N),A=r(O),D=R.raw,B,j,M,P,V,q,G;if(D)return D.lastIndex=N.lastIndex,B=e(h,D,A),N.lastIndex=D.lastIndex,B;var W=R.groups,Q=w&&N.sticky,z=e(n,N),U=N.source,ie=0,te=A;if(Q&&(z=g(z,"y",""),y(z,"g")===-1&&(z+="g"),te=b(A,N.lastIndex),N.lastIndex>0&&(!N.multiline||N.multiline&&v(A,N.lastIndex-1)!==`
119
- `)&&(U="(?: "+U+")",te=" "+te,ie++),j=new RegExp("^(?:"+U+")",z)),E&&(j=new RegExp("^"+U+"$(?!\\s)",z)),x&&(M=N.lastIndex),P=e(p,Q?j:N,te),Q?P?(P.input=b(P.input,ie),P[0]=b(P[0],ie),P.index=N.lastIndex,N.lastIndex+=P[0].length):N.lastIndex=0:x&&P&&(N.lastIndex=N.global?P.index+P[0].length:M),E&&P&&P.length>1&&e(d,P[0],j,function(){for(V=1;V<arguments.length-2;V++)arguments[V]===void 0&&(P[V]=void 0)}),P&&W)for(P.groups=q=a(null),V=0;V<W.length;V++)G=W[V],q[G[0]]=P[G[1]];return P}),Jw=h,Jw}var Yj;function aF(){if(Yj)return Hj;Yj=1;var e=So(),t=T1();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),Hj}aF();var Xj={},Qw,Zj;function sF(){if(Zj)return Qw;Zj=1,aF();var e=fr(),t=oi(),r=T1(),n=vt(),o=tr(),i=Xs(),a=o("species"),s=RegExp.prototype;return Qw=function(c,u,d,p){var h=o(c),v=!n(function(){var x={};return x[h]=function(){return 7},""[c](x)!==7}),y=v&&!n(function(){var x=!1,w=/a/;return c==="split"&&(w={},w.constructor={},w.constructor[a]=function(){return w},w.flags="",w[h]=/./[h]),w.exec=function(){return x=!0,null},w[h](""),!x});if(!v||!y||d){var g=/./[h],b=u(h,""[c],function(x,w,E,S,_){var O=w.exec;return O===r||O===s.exec?v&&!_?{done:!0,value:e(g,w,E,S)}:{done:!0,value:e(x,E,w,S)}:{done:!1}});t(String.prototype,c,b[0]),t(s,h,b[1])}p&&i(s[h],"sham",!0)},Qw}var ex,Jj;function lF(){if(Jj)return ex;Jj=1;var e=UB().charAt;return ex=function(t,r,n){return r+(n?e(t,r).length:1)},ex}var tx,Qj;function Uae(){if(Qj)return tx;Qj=1;var e=Pt(),t=vt(),r=e.RegExp,n=!t(function(){var o=!0;try{r(".","d")}catch{o=!1}var i={},a="",s=o?"dgimsy":"gimsy",c=function(h,v){Object.defineProperty(i,h,{get:function(){return a+=v,!0}})},u={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};o&&(u.hasIndices="d");for(var d in u)c(d,u[d]);var p=Object.getOwnPropertyDescriptor(r.prototype,"flags").get.call(i);return p!==s||a!==s});return tx={correct:n},tx}var rx,e2;function cF(){if(e2)return rx;e2=1;var e=fr(),t=Wr(),r=Pd(),n=Uae(),o=iF(),i=RegExp.prototype;return rx=n.correct?function(a){return a.flags}:function(a){return!n.correct&&r(i,a)&&!t(a,"flags")?e(o,a):a.flags},rx}var nx,t2;function uF(){if(t2)return nx;t2=1;var e=fr(),t=Ur(),r=Dt(),n=Eo(),o=T1(),i=TypeError;return nx=function(a,s){var c=a.exec;if(r(c)){var u=e(c,a,s);return u!==null&&t(u),u}if(n(a)==="RegExp")return e(o,a,s);throw new i("RegExp#exec called on incompatible receiver")},nx}var r2;function Gae(){if(r2)return Xj;r2=1;var e=fr(),t=ft(),r=sF(),n=Ur(),o=Vt(),i=O1(),a=ii(),s=ni(),c=Ys(),u=lF(),d=cF(),p=uF(),h=t("".indexOf);return r("match",function(v,y,g){return[function(x){var w=s(this),E=o(x)?c(x,v):void 0;return E?e(E,x,w):new RegExp(x)[v](a(w))},function(b){var x=n(this),w=a(b),E=g(y,x,w);if(E.done)return E.value;var S=a(d(x));if(h(S,"g")===-1)return p(x,w);var _=h(S,"u")!==-1;x.lastIndex=0;for(var O=[],N=0,R;(R=p(x,w))!==null;){var A=a(R[0]);O[N]=A,A===""&&(x.lastIndex=u(w,i(x.lastIndex),_)),N++}return N===0?null:O}]}),Xj}Gae();var n2={},ox,o2;function Kae(){if(o2)return ox;o2=1;var e=AB(),t=Yn();return ox=function(r,n,o){return o.get&&e(o.get,n,{getter:!0}),o.set&&e(o.set,n,{setter:!0}),t.f(r,n,o)},ox}var i2;function Yae(){if(i2)return n2;i2=1;var e=sn(),t=E1().EXISTS,r=ft(),n=Kae(),o=Function.prototype,i=r(o.toString),a=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,s=r(a.exec),c="name";return e&&!t&&n(o,c,{configurable:!0,get:function(){try{return s(a,i(this))[1]}catch{return""}}}),n2}Yae();var a2={},ix,s2;function Xae(){if(s2)return ix;s2=1;var e=Id(),t=Function.prototype,r=t.apply,n=t.call;return ix=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),ix}var ax,l2;function Zae(){if(l2)return ax;l2=1;var e=ft(),t=pa(),r=Math.floor,n=e("".charAt),o=e("".replace),i=e("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;return ax=function(c,u,d,p,h,v){var y=d+c.length,g=p.length,b=s;return h!==void 0&&(h=t(h),b=a),o(v,b,function(x,w){var E;switch(n(w,0)){case"$":return"$";case"&":return c;case"`":return i(u,0,d);case"'":return i(u,y);case"<":E=h[i(w,1,-1)];break;default:var S=+w;if(S===0)return x;if(S>g){var _=r(S/10);return _===0?x:_<=g?p[_-1]===void 0?n(w,1):p[_-1]+n(w,1):x}E=p[S-1]}return E===void 0?"":E})},ax}var c2;function Jae(){if(c2)return a2;c2=1;var e=Xae(),t=fr(),r=ft(),n=sF(),o=vt(),i=Ur(),a=Dt(),s=Vt(),c=kd(),u=O1(),d=ii(),p=ni(),h=lF(),v=Ys(),y=Zae(),g=cF(),b=uF(),x=tr(),w=x("replace"),E=Math.max,S=Math.min,_=r([].concat),O=r([].push),N=r("".indexOf),R=r("".slice),A=function(M){return M===void 0?M:String(M)},D=(function(){return"a".replace(/./,"$0")==="$0"})(),B=(function(){return/./[w]?/./[w]("a","$0")==="":!1})(),j=!o(function(){var M=/./;return M.exec=function(){var P=[];return P.groups={a:"7"},P},"".replace(M,"$<a>")!=="7"});return n("replace",function(M,P,V){var q=B?"$":"$0";return[function(W,Q){var z=p(this),U=s(W)?v(W,w):void 0;return U?t(U,W,z,Q):t(P,d(z),W,Q)},function(G,W){var Q=i(this),z=d(G);if(typeof W=="string"&&N(W,q)===-1&&N(W,"$<")===-1){var U=V(P,Q,z,W);if(U.done)return U.value}var ie=a(W);ie||(W=d(W));var te=d(g(Q)),$=N(te,"g")!==-1,K;$&&(K=N(te,"u")!==-1,Q.lastIndex=0);for(var Z=[],H;H=b(Q,z),!(H===null||(O(Z,H),!$));){var Y=d(H[0]);Y===""&&(Q.lastIndex=h(z,u(Q.lastIndex),K))}for(var oe="",re=0,se=0;se<Z.length;se++){H=Z[se];for(var ee=d(H[0]),we=E(S(c(H.index),z.length),0),ve=[],Ee,pe=1;pe<H.length;pe++)O(ve,A(H[pe]));var ce=H.groups;if(ie){var Ce=_([ee],ve,we,z);ce!==void 0&&O(Ce,ce),Ee=d(e(W,void 0,Ce))}else Ee=y(ee,z,we,ve,ce,W);we>=re&&(oe+=R(z,re,we)+Ee,re=we+ee.length)}return oe+R(z,re)}]},!j||!D||B),a2}Jae();function po(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function ou(e){return!e||!e.ownerDocument?document:e.ownerDocument}var Ai=null,u2=null;oF&&window.addEventListener("resize",function(){u2!==window.devicePixelRatio&&(u2=window.devicePixelRatio,Ai=null)});function d2(e){if(Ai===null){var t=ou(e);if(typeof t>"u")return Ai=0,Ai;var r=t.body,n=t.createElement("div");n.classList.add("simplebar-hide-scrollbar"),r.appendChild(n);var o=n.getBoundingClientRect().right;r.removeChild(n),Ai=o}return Ai}var Du=(function(){function e(r,n){var o=this;this.onScroll=function(){var i=po(o.el);o.scrollXTicking||(i.requestAnimationFrame(o.scrollX),o.scrollXTicking=!0),o.scrollYTicking||(i.requestAnimationFrame(o.scrollY),o.scrollYTicking=!0)},this.scrollX=function(){o.axis.x.isOverflowing&&(o.showScrollbar("x"),o.positionScrollbar("x")),o.scrollXTicking=!1},this.scrollY=function(){o.axis.y.isOverflowing&&(o.showScrollbar("y"),o.positionScrollbar("y")),o.scrollYTicking=!1},this.onMouseEnter=function(){o.showScrollbar("x"),o.showScrollbar("y")},this.onMouseMove=function(i){o.mouseX=i.clientX,o.mouseY=i.clientY,(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&o.onMouseMoveForAxis("x"),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&o.onMouseMoveForAxis("y")},this.onMouseLeave=function(){o.onMouseMove.cancel(),(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&o.onMouseLeaveForAxis("x"),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&o.onMouseLeaveForAxis("y"),o.mouseX=-1,o.mouseY=-1},this.onWindowResize=function(){o.scrollbarWidth=o.getScrollbarWidth(),o.hideNativeScrollbar()},this.hideScrollbars=function(){o.axis.x.track.rect=o.axis.x.track.el.getBoundingClientRect(),o.axis.y.track.rect=o.axis.y.track.el.getBoundingClientRect(),o.isWithinBounds(o.axis.y.track.rect)||(o.axis.y.scrollbar.el.classList.remove(o.classNames.visible),o.axis.y.isVisible=!1),o.isWithinBounds(o.axis.x.track.rect)||(o.axis.x.scrollbar.el.classList.remove(o.classNames.visible),o.axis.x.isVisible=!1)},this.onPointerEvent=function(i){var a,s;o.axis.x.track.rect=o.axis.x.track.el.getBoundingClientRect(),o.axis.y.track.rect=o.axis.y.track.el.getBoundingClientRect(),(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&(a=o.isWithinBounds(o.axis.x.track.rect)),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&(s=o.isWithinBounds(o.axis.y.track.rect)),(a||s)&&(i.preventDefault(),i.stopPropagation(),i.type==="mousedown"&&(a&&(o.axis.x.scrollbar.rect=o.axis.x.scrollbar.el.getBoundingClientRect(),o.isWithinBounds(o.axis.x.scrollbar.rect)?o.onDragStart(i,"x"):o.onTrackClick(i,"x")),s&&(o.axis.y.scrollbar.rect=o.axis.y.scrollbar.el.getBoundingClientRect(),o.isWithinBounds(o.axis.y.scrollbar.rect)?o.onDragStart(i,"y"):o.onTrackClick(i,"y"))))},this.drag=function(i){var a,s=o.axis[o.draggedAxis].track,c=s.rect[o.axis[o.draggedAxis].sizeAttr],u=o.axis[o.draggedAxis].scrollbar,d=o.contentWrapperEl[o.axis[o.draggedAxis].scrollSizeAttr],p=parseInt(o.elStyles[o.axis[o.draggedAxis].sizeAttr],10);i.preventDefault(),i.stopPropagation(),o.draggedAxis==="y"?a=i.pageY:a=i.pageX;var h=a-s.rect[o.axis[o.draggedAxis].offsetAttr]-o.axis[o.draggedAxis].dragOffset,v=h/(c-u.size),y=v*(d-p);o.draggedAxis==="x"&&(y=o.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?y-(c+u.size):y,y=o.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-y:y),o.contentWrapperEl[o.axis[o.draggedAxis].scrollOffsetAttr]=y},this.onEndDrag=function(i){var a=ou(o.el),s=po(o.el);i.preventDefault(),i.stopPropagation(),o.el.classList.remove(o.classNames.dragging),a.removeEventListener("mousemove",o.drag,!0),a.removeEventListener("mouseup",o.onEndDrag,!0),o.removePreventClickId=s.setTimeout(function(){a.removeEventListener("click",o.preventClick,!0),a.removeEventListener("dblclick",o.preventClick,!0),o.removePreventClickId=null})},this.preventClick=function(i){i.preventDefault(),i.stopPropagation()},this.el=r,this.minScrollbarWidth=20,this.options=Object.assign({},e.defaultOptions,n),this.classNames=Object.assign({},e.defaultOptions.classNames,this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,!e.instances.has(this.el)&&(this.recalculate=Ej(this.recalculate.bind(this),64),this.onMouseMove=Ej(this.onMouseMove.bind(this),64),this.hideScrollbars=Oj(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=Oj(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=hae(e.getRtlHelpers),this.init())}e.getRtlHelpers=function(){var n=document.createElement("div");n.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var o=n.firstElementChild;document.body.appendChild(o);var i=o.firstElementChild;o.scrollLeft=0;var a=e.getOffset(o),s=e.getOffset(i);o.scrollLeft=999;var c=e.getOffset(i);return{isRtlScrollingInverted:a.left!==s.left&&s.left-c.left!==0,isRtlScrollbarInverted:a.left!==s.left}},e.getOffset=function(n){var o=n.getBoundingClientRect(),i=ou(n),a=po(n);return{top:o.top+(a.pageYOffset||i.documentElement.scrollTop),left:o.left+(a.pageXOffset||i.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),oF&&(this.initDOM(),this.setAccessibilityAttributes(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.initDOM=function(){var n=this;if(Array.prototype.filter.call(this.el.children,function(a){return a.classList.contains(n.classNames.wrapper)}).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var o=document.createElement("div"),i=document.createElement("div");o.classList.add(this.classNames.track),i.classList.add(this.classNames.scrollbar),o.appendChild(i),this.axis.x.track.el=o.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=o.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},t.setAccessibilityAttributes=function(){var n=this.options.ariaLabel||"scrollable content";this.contentWrapperEl.setAttribute("tabindex","0"),this.contentWrapperEl.setAttribute("role","region"),this.contentWrapperEl.setAttribute("aria-label",n)},t.initListeners=function(){var n=this,o=po(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(function(c){n.el.addEventListener(c,n.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(function(c){n.el.addEventListener(c,n.onPointerEvent,{capture:!0,passive:!0})}),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),o.addEventListener("resize",this.onWindowResize);var i=!1,a=null,s=o.ResizeObserver||Dae;this.resizeObserver=new s(function(){!i||a!==null||(a=o.requestAnimationFrame(function(){n.recalculate(),a=null}))}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),o.requestAnimationFrame(function(){i=!0}),this.mutationObserver=new o.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var n=po(this.el);this.elStyles=n.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var o=this.heightAutoObserverEl.offsetHeight<=1,i=this.heightAutoObserverEl.offsetWidth<=1,a=this.contentEl.offsetWidth,s=this.contentWrapperEl.offsetWidth,c=this.elStyles.overflowX,u=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var d=this.contentEl.scrollHeight,p=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=o?"auto":"100%",this.placeholderEl.style.width=i?a+"px":"auto",this.placeholderEl.style.height=d+"px";var h=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=p>a,this.axis.y.isOverflowing=d>h,this.axis.x.isOverflowing=c==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=u==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var v=this.axis.x.isOverflowing?this.scrollbarWidth:0,y=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&p>s-y,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&d>h-v,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},t.getScrollbarSize=function(n){if(n===void 0&&(n="y"),!this.axis[n].isOverflowing)return 0;var o=this.contentEl[this.axis[n].scrollSizeAttr],i=this.axis[n].track.el[this.axis[n].offsetSizeAttr],a,s=i/o;return a=Math.max(~~(s*i),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(a=Math.min(a,this.options.scrollbarMaxSize)),a},t.positionScrollbar=function(n){if(n===void 0&&(n="y"),!!this.axis[n].isOverflowing){var o=this.contentWrapperEl[this.axis[n].scrollSizeAttr],i=this.axis[n].track.el[this.axis[n].offsetSizeAttr],a=parseInt(this.elStyles[this.axis[n].sizeAttr],10),s=this.axis[n].scrollbar,c=this.contentWrapperEl[this.axis[n].scrollOffsetAttr];c=n==="x"&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-c:c;var u=c/(o-a),d=~~((i-s.size)*u);d=n==="x"&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?d+(i-s.size):d,s.el.style.transform=n==="x"?"translate3d("+d+"px, 0, 0)":"translate3d(0, "+d+"px, 0)"}},t.toggleTrackVisibility=function(n){n===void 0&&(n="y");var o=this.axis[n].track.el,i=this.axis[n].scrollbar.el;this.axis[n].isOverflowing||this.axis[n].forceVisible?(o.style.visibility="visible",this.contentWrapperEl.style[this.axis[n].overflowAttr]="scroll"):(o.style.visibility="hidden",this.contentWrapperEl.style[this.axis[n].overflowAttr]="hidden"),this.axis[n].isOverflowing?i.style.display="block":i.style.display="none"},t.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},t.onMouseMoveForAxis=function(n){n===void 0&&(n="y"),this.axis[n].track.rect=this.axis[n].track.el.getBoundingClientRect(),this.axis[n].scrollbar.rect=this.axis[n].scrollbar.el.getBoundingClientRect();var o=this.isWithinBounds(this.axis[n].scrollbar.rect);o?this.axis[n].scrollbar.el.classList.add(this.classNames.hover):this.axis[n].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[n].track.rect)?(this.showScrollbar(n),this.axis[n].track.el.classList.add(this.classNames.hover)):this.axis[n].track.el.classList.remove(this.classNames.hover)},t.onMouseLeaveForAxis=function(n){n===void 0&&(n="y"),this.axis[n].track.el.classList.remove(this.classNames.hover),this.axis[n].scrollbar.el.classList.remove(this.classNames.hover)},t.showScrollbar=function(n){n===void 0&&(n="y");var o=this.axis[n].scrollbar.el;this.axis[n].isVisible||(o.classList.add(this.classNames.visible),this.axis[n].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(n,o){o===void 0&&(o="y");var i=ou(this.el),a=po(this.el),s=this.axis[o].scrollbar,c=o==="y"?n.pageY:n.pageX;this.axis[o].dragOffset=c-s.rect[this.axis[o].offsetAttr],this.draggedAxis=o,this.el.classList.add(this.classNames.dragging),i.addEventListener("mousemove",this.drag,!0),i.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(i.addEventListener("click",this.preventClick,!0),i.addEventListener("dblclick",this.preventClick,!0)):(a.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(n,o){var i=this;if(o===void 0&&(o="y"),!!this.options.clickOnTrack){var a=po(this.el);this.axis[o].scrollbar.rect=this.axis[o].scrollbar.el.getBoundingClientRect();var s=this.axis[o].scrollbar,c=s.rect[this.axis[o].offsetAttr],u=parseInt(this.elStyles[this.axis[o].sizeAttr],10),d=this.contentWrapperEl[this.axis[o].scrollOffsetAttr],p=o==="y"?this.mouseY-c:this.mouseX-c,h=p<0?-1:1,v=h===-1?d-u:d+u,y=function g(){if(h===-1){if(d>v){var b;d-=i.options.clickOnTrackSpeed,i.contentWrapperEl.scrollTo((b={},b[i.axis[o].offsetAttr]=d,b)),a.requestAnimationFrame(g)}}else if(d<v){var x;d+=i.options.clickOnTrackSpeed,i.contentWrapperEl.scrollTo((x={},x[i.axis[o].offsetAttr]=d,x)),a.requestAnimationFrame(g)}};y()}},t.getContentElement=function(){return this.contentEl},t.getScrollElement=function(){return this.contentWrapperEl},t.getScrollbarWidth=function(){try{return getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:d2(this.el)}catch{return d2(this.el)}},t.removeListeners=function(){var n=this,o=po(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(function(i){n.el.removeEventListener(i,n.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(function(i){n.el.removeEventListener(i,n.onPointerEvent,{capture:!0,passive:!0})}),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),o.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},t.unMount=function(){this.removeListeners(),e.instances.delete(this.el)},t.isWithinBounds=function(n){return this.mouseX>=n.left&&this.mouseX<=n.left+n.width&&this.mouseY>=n.top&&this.mouseY<=n.top+n.height},t.findChild=function(n,o){var i=n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector;return Array.prototype.filter.call(n.children,function(a){return i.call(a,o)})[0]},e})();Du.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3};Du.instances=new WeakMap;function f2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function $c(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?f2(Object(r),!0).forEach(function(n){Qae(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qae(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ju(){return ju=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ju.apply(this,arguments)}function ese(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function tse(e,t){if(e==null)return{};var r=ese(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var rse=["children","scrollableNodeProps","tag"],nse=function(t){var r=Array.prototype.reduce.call(t,function(n,o){var i=o.name.match(/data-simplebar-(.+)/);if(i){var a=i[1].replace(/\W+(.)/g,function(s,c){return c.toUpperCase()});switch(o.value){case"true":n[a]=!0;break;case"false":n[a]=!1;break;case void 0:n[a]=!0;break;default:n[a]=o.value}}return n},{});return r},Ld=T.forwardRef(function(e,t){var r=e.children,n=e.scrollableNodeProps,o=n===void 0?{}:n,i=e.tag,a=i===void 0?"div":i,s=tse(e,rse),c=a,u,d=T.useRef(),p=T.useRef(),h=T.useRef(),v={},y={},g=[];return Object.keys(s).forEach(function(b){Object.prototype.hasOwnProperty.call(Du.defaultOptions,b)?v[b]=s[b]:b.match(/data-simplebar-(.+)/)&&b!=="data-simplebar-direction"?g.push({name:b,value:s[b]}):y[b]=s[b]}),g.length&&console.warn(`simplebar-react: this way of passing options is deprecated. Pass it like normal props instead:
116
+ */var zk;function zoe(){return zk||(zk=1,process.env.NODE_ENV!=="production"&&(function(){var e=60103,t=60106,r=60107,n=60108,o=60114,i=60109,a=60110,s=60112,c=60113,u=60120,d=60115,p=60116,h=60121,v=60122,y=60117,g=60129,b=60131;if(typeof Symbol=="function"&&Symbol.for){var x=Symbol.for;e=x("react.element"),t=x("react.portal"),r=x("react.fragment"),n=x("react.strict_mode"),o=x("react.profiler"),i=x("react.provider"),a=x("react.context"),s=x("react.forward_ref"),c=x("react.suspense"),u=x("react.suspense_list"),d=x("react.memo"),p=x("react.lazy"),h=x("react.block"),v=x("react.server.block"),y=x("react.fundamental"),x("react.scope"),x("react.opaque.id"),g=x("react.debug_trace_mode"),x("react.offscreen"),b=x("react.legacy_hidden")}var w=!1;function E(se){return!!(typeof se=="string"||typeof se=="function"||se===r||se===o||se===g||se===n||se===c||se===u||se===b||w||typeof se=="object"&&se!==null&&(se.$$typeof===p||se.$$typeof===d||se.$$typeof===i||se.$$typeof===a||se.$$typeof===s||se.$$typeof===y||se.$$typeof===h||se[0]===v))}function S(se){if(typeof se=="object"&&se!==null){var ee=se.$$typeof;switch(ee){case e:var we=se.type;switch(we){case r:case o:case n:case c:case u:return we;default:var ve=we&&we.$$typeof;switch(ve){case a:case s:case p:case d:case i:return ve;default:return ee}}case t:return ee}}}var _=a,O=i,N=e,R=s,A=r,D=p,B=d,j=t,M=o,P=n,V=c,q=!1,G=!1;function W(se){return q||(q=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Q(se){return G||(G=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function z(se){return S(se)===a}function U(se){return S(se)===i}function ie(se){return typeof se=="object"&&se!==null&&se.$$typeof===e}function te(se){return S(se)===s}function $(se){return S(se)===r}function K(se){return S(se)===p}function Z(se){return S(se)===d}function H(se){return S(se)===t}function Y(se){return S(se)===o}function oe(se){return S(se)===n}function re(se){return S(se)===c}st.ContextConsumer=_,st.ContextProvider=O,st.Element=N,st.ForwardRef=R,st.Fragment=A,st.Lazy=D,st.Memo=B,st.Portal=j,st.Profiler=M,st.StrictMode=P,st.Suspense=V,st.isAsyncMode=W,st.isConcurrentMode=Q,st.isContextConsumer=z,st.isContextProvider=U,st.isElement=ie,st.isForwardRef=te,st.isFragment=$,st.isLazy=K,st.isMemo=Z,st.isPortal=H,st.isProfiler=Y,st.isStrictMode=oe,st.isSuspense=re,st.isValidElementType=E,st.typeOf=S})()),st}var Bk;function Boe(){return Bk||(Bk=1,process.env.NODE_ENV==="production"?Dc.exports=Loe():Dc.exports=zoe()),Dc.exports}var Fk=Boe();function $k(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function Hk(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function Iy(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var r=getComputedStyle(e,null);return Hk(r.overflowY,t)||Hk(r.overflowX,t)||(function(n){var o=(function(i){if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!o&&(o.clientHeight<n.scrollHeight||o.clientWidth<n.scrollWidth)})(e)}return!1}function jc(e,t,r,n,o,i,a,s){return i<e&&a>t||i>e&&a<t?0:i<=e&&s<=r||a>=t&&s>=r?i-e-n:a>t&&s<r||i<e&&s>r?a-t+o:0}var Foe=function(e,t){var r=window,n=t.inline,o=t.boundary,i=t.skipOverflowHiddenElements,a=typeof o=="function"?o:function(ee){return ee!==o};if(!$k(e))throw new TypeError("Invalid target");for(var s,c,u=document.scrollingElement||document.documentElement,d=[],p=e;$k(p)&&a(p);){if((p=(c=(s=p).parentElement)==null?s.getRootNode().host||null:c)===u){d.push(p);break}p!=null&&p===document.body&&Iy(p)&&!Iy(document.documentElement)||p!=null&&Iy(p,i)&&d.push(p)}for(var h=r.visualViewport?r.visualViewport.width:innerWidth,v=r.visualViewport?r.visualViewport.height:innerHeight,y=window.scrollX||pageXOffset,g=window.scrollY||pageYOffset,b=e.getBoundingClientRect(),x=b.height,w=b.width,E=b.top,S=b.right,_=b.bottom,O=b.left,N=E,R=n==="center"?O+w/2:n==="end"?S:O,A=[],D=0;D<d.length;D++){var B=d[D],j=B.getBoundingClientRect(),M=j.height,P=j.width,V=j.top,q=j.right,G=j.bottom,W=j.left;if(E>=0&&O>=0&&_<=v&&S<=h&&E>=V&&_<=G&&O>=W&&S<=q)return A;var Q=getComputedStyle(B),z=parseInt(Q.borderLeftWidth,10),U=parseInt(Q.borderTopWidth,10),ie=parseInt(Q.borderRightWidth,10),te=parseInt(Q.borderBottomWidth,10),$=0,K=0,Z="offsetWidth"in B?B.offsetWidth-B.clientWidth-z-ie:0,H="offsetHeight"in B?B.offsetHeight-B.clientHeight-U-te:0,Y="offsetWidth"in B?B.offsetWidth===0?0:P/B.offsetWidth:0,oe="offsetHeight"in B?B.offsetHeight===0?0:M/B.offsetHeight:0;if(u===B)$=jc(g,g+v,v,U,te,g+N,g+N+x,x),K=n==="start"?R:n==="center"?R-h/2:n==="end"?R-h:jc(y,y+h,h,z,ie,y+R,y+R+w,w),$=Math.max(0,$+g),K=Math.max(0,K+y);else{$=jc(V,G,M,U,te+H,N,N+x,x),K=n==="start"?R-W-z:n==="center"?R-(W+P/2)+Z/2:n==="end"?R-q+ie+Z:jc(W,q,P,z,ie+Z,R,R+w,w);var re=B.scrollLeft,se=B.scrollTop;N+=se-($=Math.max(0,Math.min(se+$/oe,B.scrollHeight-M/oe+H))),R+=re-(K=Math.max(0,Math.min(re+K/Y,B.scrollWidth-P/Y+Z)))}A.push({el:B,top:$,left:K})}return A};let $oe=0;function Vk(e){return typeof e=="function"?e:jr}function jr(){}function zz(e,t){if(!e)return;Foe(e,{boundary:t}).forEach(n=>{let{el:o,top:i,left:a}=n;o.scrollTop=i,o.scrollLeft=a})}function Wk(e,t,r){return e===t||t instanceof r.Node&&e.contains&&e.contains(t)}function r1(e,t){let r;function n(){r&&clearTimeout(r)}function o(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];n(),r=setTimeout(()=>{r=null,e(...a)},t)}return o.cancel=n,o}function qt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(s=>(s&&s(n,...i),n.preventDownshiftDefault||n.hasOwnProperty("nativeEvent")&&n.nativeEvent.preventDownshiftDefault))}}function Lo(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n=>{t.forEach(o=>{typeof o=="function"?o(n):o&&(o.current=n)})}}function Bz(){return String($oe++)}function Fz(e){let{isOpen:t,resultCount:r,previousResultCount:n}=e;return t?r?r!==n?`${r} result${r===1?" is":"s are"} available, use up and down arrow keys to navigate. Press Enter key to select.`:"":"No results are available.":""}function Uk(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function $z(e){return typeof e.type=="string"}function Hz(e){return e.props}function Hoe(e,t){console.error(`The property "${t}" is required in "${e}"`)}const Voe=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function qc(e){e===void 0&&(e={});const t={};return Voe.forEach(r=>{e.hasOwnProperty(r)&&(t[r]=e[r])}),t}function Pu(e,t){return Object.keys(e).reduce((r,n)=>(r[n]=Tu(t,n)?t[n]:e[n],r),{})}function Tu(e,t){return e[t]!==void 0}function Fx(e){const{key:t,keyCode:r}=e;return r>=37&&r<=40&&t.indexOf("Arrow")!==0?`Arrow${t}`:t}function Woe(e){return Object.prototype.toString.call(e)==="[object Object]"}function Hi(e,t,r,n,o){if(o===void 0&&(o=!0),r===0)return-1;const i=r-1;(typeof t!="number"||t<0||t>=r)&&(t=e>0?-1:i+1);let a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);const s=Zo(e,a,r,n,o);return s===-1?t>=r?-1:t:s}function Zo(e,t,r,n,o){const i=n(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(let a=t+1;a<r;a++)if(!n(a).hasAttribute("disabled"))return a}else for(let a=t-1;a>=0;a--)if(!n(a).hasAttribute("disabled"))return a;return o?e>0?Zo(1,0,r,n,!1):Zo(-1,r-1,r,n,!1):-1}function Au(e,t,r,n){return n===void 0&&(n=!0),t.some(o=>o&&(Wk(o,e,r)||n&&Wk(o,r.document.activeElement,r)))}let n1=jr;process.env.NODE_ENV!=="production"&&(n1=(e,t,r)=>{const n="This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";Object.keys(e).forEach(o=>{t[o]!==void 0&&r[o]===void 0?console.error(`downshift: A component has changed the controlled prop "${o}" to be uncontrolled. ${n}`):t[o]===void 0&&r[o]!==void 0&&console.error(`downshift: A component has changed the uncontrolled prop "${o}" to be controlled. ${n}`)})});const Uoe=r1(e=>{Wz(e).textContent=""},500);function Vz(e,t){const r=Wz(t);e&&(r.textContent=e,Uoe(t))}function Wz(e){e===void 0&&(e=document);let t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}const Uz=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,Gz=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,Kz=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,tu=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,ru=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,Yz=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,Xz=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,Zz=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,Jz=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,Qz=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,eB=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,tB=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,rB=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,$x=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,nB=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,oB=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,iB=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16;var Goe=Object.freeze({__proto__:null,unknown:Uz,mouseUp:Gz,itemMouseEnter:Kz,keyDownArrowUp:tu,keyDownArrowDown:ru,keyDownEscape:Yz,keyDownEnter:Xz,keyDownHome:Zz,keyDownEnd:Jz,clickItem:Qz,blurInput:eB,changeInput:tB,keyDownSpaceButton:rB,clickButton:$x,blurButton:nB,controlledPropUpdatedSelectedItem:oB,touchEnd:iB});const Koe=(()=>{class e extends T.Component{constructor(r){var n;super(r),n=this,this.id=this.props.id||`downshift-${Bz()}`,this.menuId=this.props.menuId||`${this.id}-menu`,this.labelId=this.props.labelId||`${this.id}-label`,this.inputId=this.props.inputId||`${this.id}-input`,this.getItemId=this.props.getItemId||(p=>`${this.id}-item-${p}`),this.input=null,this.items=[],this.itemCount=null,this.previousResultCount=0,this.timeoutIds=[],this.internalSetTimeout=(p,h)=>{const v=setTimeout(()=>{this.timeoutIds=this.timeoutIds.filter(y=>y!==v),p()},h);this.timeoutIds.push(v)},this.setItemCount=p=>{this.itemCount=p},this.unsetItemCount=()=>{this.itemCount=null},this.setHighlightedIndex=function(p,h){p===void 0&&(p=n.props.defaultHighlightedIndex),h===void 0&&(h={}),h=qc(h),n.internalSetState({highlightedIndex:p,...h})},this.clearSelection=p=>{this.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:this.props.defaultHighlightedIndex,isOpen:this.props.defaultIsOpen},p)},this.selectItem=(p,h,v)=>{h=qc(h),this.internalSetState({isOpen:this.props.defaultIsOpen,highlightedIndex:this.props.defaultHighlightedIndex,selectedItem:p,inputValue:this.props.itemToString(p),...h},v)},this.selectItemAtIndex=(p,h,v)=>{const y=this.items[p];y!=null&&this.selectItem(y,h,v)},this.selectHighlightedItem=(p,h)=>this.selectItemAtIndex(this.getState().highlightedIndex,p,h),this.internalSetState=(p,h)=>{let v,y;const g={},b=typeof p=="function";return!b&&p.hasOwnProperty("inputValue")&&this.props.onInputValueChange(p.inputValue,{...this.getStateAndHelpers(),...p}),this.setState(x=>{x=this.getState(x);let w=b?p(x):p;w=this.props.stateReducer(x,w),v=w.hasOwnProperty("selectedItem");const E={};return v&&w.selectedItem!==x.selectedItem&&(y=w.selectedItem),w.type=w.type||Uz,Object.keys(w).forEach(S=>{x[S]!==w[S]&&(g[S]=w[S]),S!=="type"&&(w[S],Tu(this.props,S)||(E[S]=w[S]))}),b&&w.hasOwnProperty("inputValue")&&this.props.onInputValueChange(w.inputValue,{...this.getStateAndHelpers(),...w}),E},()=>{Vk(h)(),Object.keys(g).length>1&&this.props.onStateChange(g,this.getStateAndHelpers()),v&&this.props.onSelect(p.selectedItem,this.getStateAndHelpers()),y!==void 0&&this.props.onChange(y,this.getStateAndHelpers()),this.props.onUserAction(g,this.getStateAndHelpers())})},this.rootRef=p=>this._rootNode=p,this.getRootProps=function(p,h){let{refKey:v="ref",ref:y,...g}=p===void 0?{}:p,{suppressRefError:b=!1}=h===void 0?{}:h;n.getRootProps.called=!0,n.getRootProps.refKey=v,n.getRootProps.suppressRefError=b;const{isOpen:x}=n.getState();return{[v]:Lo(y,n.rootRef),role:"combobox","aria-expanded":x,"aria-haspopup":"listbox","aria-owns":x?n.menuId:null,"aria-labelledby":n.labelId,...g}},this.keyDownHandlers={ArrowDown(p){if(p.preventDefault(),this.getState().isOpen){const h=p.shiftKey?5:1;this.moveHighlightedIndex(h,{type:ru})}else this.internalSetState({isOpen:!0,type:ru},()=>{const h=this.getItemCount();if(h>0){const{highlightedIndex:v}=this.getState(),y=Hi(1,v,h,g=>this.getItemNodeFromIndex(g));this.setHighlightedIndex(y,{type:ru})}})},ArrowUp(p){if(p.preventDefault(),this.getState().isOpen){const h=p.shiftKey?-5:-1;this.moveHighlightedIndex(h,{type:tu})}else this.internalSetState({isOpen:!0,type:tu},()=>{const h=this.getItemCount();if(h>0){const{highlightedIndex:v}=this.getState(),y=Hi(-1,v,h,g=>this.getItemNodeFromIndex(g));this.setHighlightedIndex(y,{type:tu})}})},Enter(p){if(p.which===229)return;const{isOpen:h,highlightedIndex:v}=this.getState();if(h&&v!=null){p.preventDefault();const y=this.items[v],g=this.getItemNodeFromIndex(v);if(y==null||g&&g.hasAttribute("disabled"))return;this.selectHighlightedItem({type:Xz})}},Escape(p){p.preventDefault(),this.reset({type:Yz,...!this.state.isOpen&&{selectedItem:null,inputValue:""}})}},this.buttonKeyDownHandlers={...this.keyDownHandlers," "(p){p.preventDefault(),this.toggleMenu({type:rB})}},this.inputKeyDownHandlers={...this.keyDownHandlers,Home(p){const{isOpen:h}=this.getState();if(!h)return;p.preventDefault();const v=this.getItemCount();if(v<=0||!h)return;const y=Zo(1,0,v,g=>this.getItemNodeFromIndex(g),!1);this.setHighlightedIndex(y,{type:Zz})},End(p){const{isOpen:h}=this.getState();if(!h)return;p.preventDefault();const v=this.getItemCount();if(v<=0||!h)return;const y=Zo(-1,v-1,v,g=>this.getItemNodeFromIndex(g),!1);this.setHighlightedIndex(y,{type:Jz})}},this.getToggleButtonProps=function(p){let{onClick:h,onPress:v,onKeyDown:y,onKeyUp:g,onBlur:b,...x}=p===void 0?{}:p;const{isOpen:w}=n.getState(),E={onClick:qt(h,n.buttonHandleClick),onKeyDown:qt(y,n.buttonHandleKeyDown),onKeyUp:qt(g,n.buttonHandleKeyUp),onBlur:qt(b,n.buttonHandleBlur)},S=x.disabled?{}:E;return{type:"button",role:"button","aria-label":w?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0,...S,...x}},this.buttonHandleKeyUp=p=>{p.preventDefault()},this.buttonHandleKeyDown=p=>{const h=Fx(p);this.buttonKeyDownHandlers[h]&&this.buttonKeyDownHandlers[h].call(this,p)},this.buttonHandleClick=p=>{p.preventDefault(),this.props.environment.document.activeElement===this.props.environment.document.body&&p.target.focus(),process.env.NODE_ENV==="test"?this.toggleMenu({type:$x}):this.internalSetTimeout(()=>this.toggleMenu({type:$x}))},this.buttonHandleBlur=p=>{const h=p.target;this.internalSetTimeout(()=>{!this.isMouseDown&&(this.props.environment.document.activeElement==null||this.props.environment.document.activeElement.id!==this.inputId)&&this.props.environment.document.activeElement!==h&&this.reset({type:nB})})},this.getLabelProps=p=>({htmlFor:this.inputId,id:this.labelId,...p}),this.getInputProps=function(p){let{onKeyDown:h,onBlur:v,onChange:y,onInput:g,onChangeText:b,...x}=p===void 0?{}:p,w,E={};w="onChange";const{inputValue:S,isOpen:_,highlightedIndex:O}=n.getState();return x.disabled||(E={[w]:qt(y,g,n.inputHandleChange),onKeyDown:qt(h,n.inputHandleKeyDown),onBlur:qt(v,n.inputHandleBlur)}),{"aria-autocomplete":"list","aria-activedescendant":_&&typeof O=="number"&&O>=0?n.getItemId(O):null,"aria-controls":_?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:S,id:n.inputId,...E,...x}},this.inputHandleKeyDown=p=>{const h=Fx(p);h&&this.inputKeyDownHandlers[h]&&this.inputKeyDownHandlers[h].call(this,p)},this.inputHandleChange=p=>{this.internalSetState({type:tB,isOpen:!0,inputValue:p.target.value,highlightedIndex:this.props.defaultHighlightedIndex})},this.inputHandleBlur=()=>{this.internalSetTimeout(()=>{const p=this.props.environment.document&&!!this.props.environment.document.activeElement&&!!this.props.environment.document.activeElement.dataset&&this.props.environment.document.activeElement.dataset.toggle&&this._rootNode&&this._rootNode.contains(this.props.environment.document.activeElement);!this.isMouseDown&&!p&&this.reset({type:eB})})},this.menuRef=p=>{this._menuNode=p},this.getMenuProps=function(p,h){let{refKey:v="ref",ref:y,...g}=p===void 0?{}:p,{suppressRefError:b=!1}=h===void 0?{}:h;return n.getMenuProps.called=!0,n.getMenuProps.refKey=v,n.getMenuProps.suppressRefError=b,{[v]:Lo(y,n.menuRef),role:"listbox","aria-labelledby":g&&g["aria-label"]?null:n.labelId,id:n.menuId,...g}},this.getItemProps=function(p){let{onMouseMove:h,onMouseDown:v,onClick:y,onPress:g,index:b,item:x=process.env.NODE_ENV==="production"?void 0:Hoe("getItemProps","item"),...w}=p===void 0?{}:p;b===void 0?(n.items.push(x),b=n.items.indexOf(x)):n.items[b]=x;const E="onClick",S=y,_={onMouseMove:qt(h,()=>{b!==n.getState().highlightedIndex&&(n.setHighlightedIndex(b,{type:Kz}),n.avoidScrolling=!0,n.internalSetTimeout(()=>n.avoidScrolling=!1,250))}),onMouseDown:qt(v,N=>{N.preventDefault()}),[E]:qt(S,()=>{n.selectItemAtIndex(b,{type:Qz})})},O=w.disabled?{onMouseDown:_.onMouseDown}:_;return{id:n.getItemId(b),role:"option","aria-selected":n.getState().highlightedIndex===b,...O,...w}},this.clearItems=()=>{this.items=[]},this.reset=function(p,h){p===void 0&&(p={}),p=qc(p),n.internalSetState(v=>{let{selectedItem:y}=v;return{isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(y),...p}},h)},this.toggleMenu=function(p,h){p===void 0&&(p={}),p=qc(p),n.internalSetState(v=>{let{isOpen:y}=v;return{isOpen:!y,...y&&{highlightedIndex:n.props.defaultHighlightedIndex},...p}},()=>{const{isOpen:v,highlightedIndex:y}=n.getState();v&&n.getItemCount()>0&&typeof y=="number"&&n.setHighlightedIndex(y,p),Vk(h)()})},this.openMenu=p=>{this.internalSetState({isOpen:!0},p)},this.closeMenu=p=>{this.internalSetState({isOpen:!1},p)},this.updateStatus=r1(()=>{const p=this.getState(),h=this.items[p.highlightedIndex],v=this.getItemCount(),y=this.props.getA11yStatusMessage({itemToString:this.props.itemToString,previousResultCount:this.previousResultCount,resultCount:v,highlightedItem:h,...p});this.previousResultCount=v,Vz(y,this.props.environment.document)},200);const{defaultHighlightedIndex:o,initialHighlightedIndex:i=o,defaultIsOpen:a,initialIsOpen:s=a,initialInputValue:c="",initialSelectedItem:u=null}=this.props,d=this.getState({highlightedIndex:i,isOpen:s,inputValue:c,selectedItem:u});d.selectedItem!=null&&this.props.initialInputValue===void 0&&(d.inputValue=this.props.itemToString(d.selectedItem)),this.state=d}internalClearTimeouts(){this.timeoutIds.forEach(r=>{clearTimeout(r)}),this.timeoutIds=[]}getState(r){return r===void 0&&(r=this.state),Pu(r,this.props)}getItemCount(){let r=this.items.length;return this.itemCount!=null?r=this.itemCount:this.props.itemCount!==void 0&&(r=this.props.itemCount),r}getItemNodeFromIndex(r){return this.props.environment.document.getElementById(this.getItemId(r))}scrollHighlightedItemIntoView(){{const r=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(r,this._menuNode)}}moveHighlightedIndex(r,n){const o=this.getItemCount(),{highlightedIndex:i}=this.getState();if(o>0){const a=Hi(r,i,o,s=>this.getItemNodeFromIndex(s));this.setHighlightedIndex(a,n)}}getStateAndHelpers(){const{highlightedIndex:r,inputValue:n,selectedItem:o,isOpen:i}=this.getState(),{itemToString:a}=this.props,{id:s}=this,{getRootProps:c,getToggleButtonProps:u,getLabelProps:d,getMenuProps:p,getInputProps:h,getItemProps:v,openMenu:y,closeMenu:g,toggleMenu:b,selectItem:x,selectItemAtIndex:w,selectHighlightedItem:E,setHighlightedIndex:S,clearSelection:_,clearItems:O,reset:N,setItemCount:R,unsetItemCount:A,internalSetState:D}=this;return{getRootProps:c,getToggleButtonProps:u,getLabelProps:d,getMenuProps:p,getInputProps:h,getItemProps:v,reset:N,openMenu:y,closeMenu:g,toggleMenu:b,selectItem:x,selectItemAtIndex:w,selectHighlightedItem:E,setHighlightedIndex:S,clearSelection:_,clearItems:O,setItemCount:R,unsetItemCount:A,setState:D,itemToString:a,id:s,highlightedIndex:r,inputValue:n,isOpen:i,selectedItem:o}}componentDidMount(){process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Gk(this._menuNode,this.getMenuProps);{const r=()=>{this.isMouseDown=!0},n=c=>{this.isMouseDown=!1,!Au(c.target,[this._rootNode,this._menuNode],this.props.environment)&&this.getState().isOpen&&this.reset({type:Gz},()=>this.props.onOuterClick(this.getStateAndHelpers()))},o=()=>{this.isTouchMove=!1},i=()=>{this.isTouchMove=!0},a=c=>{const u=Au(c.target,[this._rootNode,this._menuNode],this.props.environment,!1);!this.isTouchMove&&!u&&this.getState().isOpen&&this.reset({type:iB},()=>this.props.onOuterClick(this.getStateAndHelpers()))},{environment:s}=this.props;s.addEventListener("mousedown",r),s.addEventListener("mouseup",n),s.addEventListener("touchstart",o),s.addEventListener("touchmove",i),s.addEventListener("touchend",a),this.cleanup=()=>{this.internalClearTimeouts(),this.updateStatus.cancel(),s.removeEventListener("mousedown",r),s.removeEventListener("mouseup",n),s.removeEventListener("touchstart",o),s.removeEventListener("touchmove",i),s.removeEventListener("touchend",a)}}}shouldScroll(r,n){const{highlightedIndex:o}=this.props.highlightedIndex===void 0?this.getState():this.props,{highlightedIndex:i}=n.highlightedIndex===void 0?r:n;return o&&this.getState().isOpen&&!r.isOpen||o!==i}componentDidUpdate(r,n){process.env.NODE_ENV!=="production"&&(n1(this.state,r,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Gk(this._menuNode,this.getMenuProps)),Tu(this.props,"selectedItem")&&this.props.selectedItemChanged(r.selectedItem,this.props.selectedItem)&&this.internalSetState({type:oB,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(n,r)&&this.scrollHighlightedItemIntoView(),this.updateStatus()}componentWillUnmount(){this.cleanup()}render(){const r=Uk(this.props.children,jr);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;const n=Uk(r(this.getStateAndHelpers()));if(!n)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&Yoe(n,this.getRootProps),n;if($z(n))return T.cloneElement(n,this.getRootProps(Hz(n)));if(process.env.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")}}return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:Fz,itemToString:t=>t==null?"":(process.env.NODE_ENV!=="production"&&Woe(t)&&!t.hasOwnProperty("toString")&&console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.","The object that was passed:",t),String(t)),onStateChange:jr,onInputValueChange:jr,onUserAction:jr,onChange:jr,onSelect:jr,onOuterClick:jr,selectedItemChanged:(t,r)=>t!==r,environment:typeof window>"u"?{}:window,stateReducer:(t,r)=>r,suppressRefError:!1,scrollIntoView:zz},e.stateChangeTypes=Goe,e})();process.env.NODE_ENV!=="production"&&(Koe.propTypes={children:fe.func,defaultHighlightedIndex:fe.number,defaultIsOpen:fe.bool,initialHighlightedIndex:fe.number,initialSelectedItem:fe.any,initialInputValue:fe.string,initialIsOpen:fe.bool,getA11yStatusMessage:fe.func,itemToString:fe.func,onChange:fe.func,onSelect:fe.func,onStateChange:fe.func,onInputValueChange:fe.func,onUserAction:fe.func,onOuterClick:fe.func,selectedItemChanged:fe.func,stateReducer:fe.func,itemCount:fe.number,id:fe.string,environment:fe.shape({addEventListener:fe.func,removeEventListener:fe.func,document:fe.shape({getElementById:fe.func,activeElement:fe.any,body:fe.any})}),suppressRefError:fe.bool,scrollIntoView:fe.func,selectedItem:fe.any,isOpen:fe.bool,inputValue:fe.string,highlightedIndex:fe.number,labelId:fe.string,inputId:fe.string,menuId:fe.string,getItemId:fe.func});function Gk(e,t){let{refKey:r}=t;e||console.error(`downshift: The ref prop "${r}" from getMenuProps was not applied correctly on your menu element.`)}function Yoe(e,t){let{refKey:r}=t;const n=r!=="ref",o=!$z(e);o&&!n&&!Fk.isForwardRef(e)?console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps"):!o&&n&&console.error(`downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "${r}"`),!Fk.isForwardRef(e)&&!Hz(e)[r]&&console.error(`downshift: You must apply the ref prop "${r}" from getRootProps onto your root element.`)}const aB={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function Xoe(e,t,r){const{props:n,type:o}=e,i={};Object.keys(t).forEach(a=>{Zoe(a,e,t,r),r[a]!==t[a]&&(i[a]=r[a])}),n.onStateChange&&Object.keys(i).length&&n.onStateChange({type:o,...i})}function Zoe(e,t,r,n){const{props:o,type:i}=t,a=`on${o1(e)}Change`;o[a]&&n[e]!==void 0&&n[e]!==r[e]&&o[a]({type:i,...n})}function Joe(e,t){return t.changes}function Qoe(e){const{selectedItem:t,itemToString:r}=e;return t?`${r(t)} has been selected.`:""}const eie=r1((e,t)=>{Vz(e(),t)},200),tie=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?T.useLayoutEffect:T.useEffect;function rie(e){let{id:t=`downshift-${Bz()}`,labelId:r,menuId:n,getItemId:o,toggleButtonId:i,inputId:a}=e;return T.useRef({labelId:r||`${t}-label`,menuId:n||`${t}-menu`,getItemId:o||(c=>`${t}-item-${c}`),toggleButtonId:i||`${t}-toggle-button`,inputId:a||`${t}-input`}).current}function nie(e,t,r){return e!==void 0?e:r.length===0?-1:r.indexOf(t)}function oie(e){return e?String(e):""}function o1(e){return`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}function sB(e){const t=T.useRef(e);return t.current=e,t}function iie(e,t,r){const n=T.useRef(),o=T.useRef(),i=T.useCallback((p,h)=>{o.current=h,p=Pu(p,h.props);const v=e(p,h);return h.props.stateReducer(p,{...h,changes:v})},[e]),[a,s]=T.useReducer(i,t),c=sB(r),u=T.useCallback(p=>s({props:c.current,...p}),[c]),d=o.current;return T.useEffect(()=>{d&&n.current&&n.current!==a&&Xoe(d,Pu(n.current,d.props),a),n.current=a},[a,r,d]),[a,u]}const ws={itemToString:oie,stateReducer:Joe,getA11ySelectionMessage:Qoe,scrollIntoView:zz,circularNavigation:!1,environment:typeof window>"u"?{}:window};function bn(e,t,r){r===void 0&&(r=aB);const n=e[`default${o1(t)}`];return n!==void 0?n:r[t]}function Lc(e,t,r){r===void 0&&(r=aB);const n=e[t];if(n!==void 0)return n;const o=e[`initial${o1(t)}`];return o!==void 0?o:bn(e,t,r)}function aie(e){const t=Lc(e,"selectedItem"),r=Lc(e,"isOpen"),n=Lc(e,"highlightedIndex"),o=Lc(e,"inputValue");return{highlightedIndex:n<0&&t&&r?e.items.indexOf(t):n,isOpen:r,selectedItem:t,inputValue:o}}function ku(e,t,r,n){const{items:o,initialHighlightedIndex:i,defaultHighlightedIndex:a}=e,{selectedItem:s,highlightedIndex:c}=t;return o.length===0?-1:i!==void 0&&c===i?i:a!==void 0?a:s?r===0?o.indexOf(s):Hi(r,o.indexOf(s),o.length,n,!1):r===0?-1:r<0?o.length-1:0}function sie(e,t,r,n){const o=T.useRef({isMouseDown:!1,isTouchMove:!1});return T.useEffect(()=>{const i=()=>{o.current.isMouseDown=!0},a=d=>{o.current.isMouseDown=!1,e&&!Au(d.target,t.map(p=>p.current),r)&&n()},s=()=>{o.current.isTouchMove=!1},c=()=>{o.current.isTouchMove=!0},u=d=>{e&&!o.current.isTouchMove&&!Au(d.target,t.map(p=>p.current),r,!1)&&n()};return r.addEventListener("mousedown",i),r.addEventListener("mouseup",a),r.addEventListener("touchstart",s),r.addEventListener("touchmove",c),r.addEventListener("touchend",u),function(){r.removeEventListener("mousedown",i),r.removeEventListener("mouseup",a),r.removeEventListener("touchstart",s),r.removeEventListener("touchmove",c),r.removeEventListener("touchend",u)}},[e,r]),o}let lB=()=>jr;process.env.NODE_ENV!=="production"&&(lB=function(){const e=T.useRef(!0);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o=T.useRef(r.reduce((a,s)=>(a[s]={},a),{}));return T.useEffect(()=>{Object.keys(o.current).forEach(a=>{const s=o.current[a];if(e.current&&!Object.keys(s).length){console.error(`downshift: You forgot to call the ${a} getter function on your component / element.`);return}const{suppressRefError:c,refKey:u,elementRef:d}=s;(!d||!d.current)&&!c&&console.error(`downshift: The ref prop "${u}" from ${a} was not applied correctly on your element.`)}),e.current=!1}),T.useCallback((a,s,c,u)=>{o.current[a]={suppressRefError:s,refKey:c,elementRef:u}},[])});function Kk(e,t,r){let{isInitialMount:n,highlightedIndex:o,items:i,environment:a,...s}=r;T.useEffect(()=>{n||eie(()=>e({highlightedIndex:o,highlightedItem:i[o],resultCount:i.length,...s}),a.document)},t)}function lie(e){let{highlightedIndex:t,isOpen:r,itemRefs:n,getItemNodeFromIndex:o,menuElement:i,scrollIntoView:a}=e;const s=T.useRef(!0);return tie(()=>{t<0||!r||!Object.keys(n.current).length||(s.current===!1?s.current=!0:a(o(t),i))},[t]),s}let cB=jr;process.env.NODE_ENV!=="production"&&(cB=e=>{let{isInitialMount:t,props:r,state:n}=e;const o=T.useRef(r);T.useEffect(()=>{t||(n1(n,o.current,r),o.current=r)},[n,r,t])});function cie(e,t,r){const{type:n,props:o}=t;let i;switch(n){case r.ItemMouseMove:i={highlightedIndex:t.disabled?-1:t.index};break;case r.MenuMouseLeave:i={highlightedIndex:-1};break;case r.ToggleButtonClick:case r.FunctionToggleMenu:i={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:ku(o,e,0)};break;case r.FunctionOpenMenu:i={isOpen:!0,highlightedIndex:ku(o,e,0)};break;case r.FunctionCloseMenu:i={isOpen:!1};break;case r.FunctionSetHighlightedIndex:i={highlightedIndex:t.highlightedIndex};break;case r.FunctionSetInputValue:i={inputValue:t.inputValue};break;case r.FunctionReset:i={highlightedIndex:bn(o,"highlightedIndex"),isOpen:bn(o,"isOpen"),selectedItem:bn(o,"selectedItem"),inputValue:bn(o,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return{...e,...i}}fe.array.isRequired,fe.func,fe.func,fe.func,fe.bool,fe.number,fe.number,fe.number,fe.bool,fe.bool,fe.bool,fe.any,fe.any,fe.any,fe.string,fe.string,fe.string,fe.func,fe.string,fe.func,fe.func,fe.func,fe.func,fe.func,fe.shape({addEventListener:fe.func,removeEventListener:fe.func,document:fe.shape({getElementById:fe.func,activeElement:fe.any,body:fe.any})});function uie(e){var t=e.isOpen,r=e.resultCount,n=e.previousResultCount;return t?r?r!==n?"".concat(r," result").concat(r===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}Eu(Eu({},ws),{getA11yStatusMessage:uie});process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;const i1=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,a1=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,s1=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,l1=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,c1=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,u1=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":5,d1=process.env.NODE_ENV!=="production"?"__input_change__":6,Mu=process.env.NODE_ENV!=="production"?"__input_blur__":7,uB=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":8,dB=process.env.NODE_ENV!=="production"?"__item_mouse_move__":9,f1=process.env.NODE_ENV!=="production"?"__item_click__":10,fB=process.env.NODE_ENV!=="production"?"__togglebutton_click__":11,pB=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":12,hB=process.env.NODE_ENV!=="production"?"__function_open_menu__":13,vB=process.env.NODE_ENV!=="production"?"__function_close_menu__":14,gB=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":15,p1=process.env.NODE_ENV!=="production"?"__function_select_item__":16,mB=process.env.NODE_ENV!=="production"?"__function_set_input_value__":17,bB=process.env.NODE_ENV!=="production"?"__function_reset__":18,h1=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":19;var yB=Object.freeze({__proto__:null,InputKeyDownArrowDown:i1,InputKeyDownArrowUp:a1,InputKeyDownEscape:s1,InputKeyDownHome:l1,InputKeyDownEnd:c1,InputKeyDownEnter:u1,InputChange:d1,InputBlur:Mu,MenuMouseLeave:uB,ItemMouseMove:dB,ItemClick:f1,ToggleButtonClick:fB,FunctionToggleMenu:pB,FunctionOpenMenu:hB,FunctionCloseMenu:vB,FunctionSetHighlightedIndex:gB,FunctionSelectItem:p1,FunctionSetInputValue:mB,FunctionReset:bB,ControlledPropUpdatedSelectedItem:h1});function die(e){const t=aie(e),{selectedItem:r}=t;let{inputValue:n}=t;return n===""&&r&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(n=e.itemToString(r)),{...t,inputValue:n}}const fie={items:fe.array.isRequired,itemToString:fe.func,getA11yStatusMessage:fe.func,getA11ySelectionMessage:fe.func,circularNavigation:fe.bool,highlightedIndex:fe.number,defaultHighlightedIndex:fe.number,initialHighlightedIndex:fe.number,isOpen:fe.bool,defaultIsOpen:fe.bool,initialIsOpen:fe.bool,selectedItem:fe.any,initialSelectedItem:fe.any,defaultSelectedItem:fe.any,inputValue:fe.string,defaultInputValue:fe.string,initialInputValue:fe.string,id:fe.string,labelId:fe.string,menuId:fe.string,getItemId:fe.func,inputId:fe.string,toggleButtonId:fe.string,stateReducer:fe.func,onSelectedItemChange:fe.func,onHighlightedIndexChange:fe.func,onStateChange:fe.func,onIsOpenChange:fe.func,onInputValueChange:fe.func,environment:fe.shape({addEventListener:fe.func,removeEventListener:fe.func,document:fe.shape({getElementById:fe.func,activeElement:fe.any,body:fe.any})})};function pie(e,t,r){const n=T.useRef(),[o,i]=iie(e,t,r);return T.useEffect(()=>{Tu(r,"selectedItem")&&(n.current!==r.selectedItem&&i({type:h1,inputValue:r.itemToString(r.selectedItem)}),n.current=o.selectedItem===n.current?r.selectedItem:o.selectedItem)}),[Pu(o,r),i]}let wB=jr;process.env.NODE_ENV!=="production"&&(wB=(e,t)=>{fe.checkPropTypes(fie,e,"prop",t.name)});const hie={...ws,getA11yStatusMessage:Fz,circularNavigation:!0};function vie(e,t){const{type:r,props:n,shiftKey:o}=t;let i;switch(r){case f1:i={isOpen:bn(n,"isOpen"),highlightedIndex:bn(n,"highlightedIndex"),selectedItem:n.items[t.index],inputValue:n.itemToString(n.items[t.index])};break;case i1:e.isOpen?i={highlightedIndex:Hi(o?5:1,e.highlightedIndex,n.items.length,t.getItemNodeFromIndex,n.circularNavigation)}:i={highlightedIndex:ku(n,e,1,t.getItemNodeFromIndex),isOpen:n.items.length>=0};break;case a1:e.isOpen?i={highlightedIndex:Hi(o?-5:-1,e.highlightedIndex,n.items.length,t.getItemNodeFromIndex,n.circularNavigation)}:i={highlightedIndex:ku(n,e,-1,t.getItemNodeFromIndex),isOpen:n.items.length>=0};break;case u1:i={...e.isOpen&&e.highlightedIndex>=0&&{selectedItem:n.items[e.highlightedIndex],isOpen:bn(n,"isOpen"),highlightedIndex:bn(n,"highlightedIndex"),inputValue:n.itemToString(n.items[e.highlightedIndex])}};break;case s1:i={isOpen:!1,highlightedIndex:-1,...!e.isOpen&&{selectedItem:null,inputValue:""}};break;case l1:i={highlightedIndex:Zo(1,0,n.items.length,t.getItemNodeFromIndex,!1)};break;case c1:i={highlightedIndex:Zo(-1,n.items.length-1,n.items.length,t.getItemNodeFromIndex,!1)};break;case Mu:i={isOpen:!1,highlightedIndex:-1,...e.highlightedIndex>=0&&t.selectItem&&{selectedItem:n.items[e.highlightedIndex],inputValue:n.itemToString(n.items[e.highlightedIndex])}};break;case d1:i={isOpen:!0,highlightedIndex:bn(n,"highlightedIndex"),inputValue:t.inputValue};break;case p1:i={selectedItem:t.selectedItem,inputValue:n.itemToString(t.selectedItem)};break;case h1:i={inputValue:t.inputValue};break;default:return cie(e,t,yB)}return{...e,...i}}qi.stateChangeTypes=yB;function qi(e){e===void 0&&(e={}),wB(e,qi);const t={...hie,...e},{initialIsOpen:r,defaultIsOpen:n,items:o,scrollIntoView:i,environment:a,getA11yStatusMessage:s,getA11ySelectionMessage:c,itemToString:u}=t,d=die(t),[p,h]=pie(vie,d,t),{isOpen:v,highlightedIndex:y,selectedItem:g,inputValue:b}=p,x=T.useRef(null),w=T.useRef({}),E=T.useRef(null),S=T.useRef(null),_=T.useRef(null),O=T.useRef(!0),N=rie(t),R=T.useRef(),A=sB({state:p,props:t}),D=T.useCallback(Y=>w.current[N.getItemId(Y)],[N]);Kk(s,[v,y,b,o],{isInitialMount:O.current,previousResultCount:R.current,items:o,environment:a,itemToString:u,...p}),Kk(c,[g],{isInitialMount:O.current,previousResultCount:R.current,items:o,environment:a,itemToString:u,...p});const B=lie({menuElement:x.current,highlightedIndex:y,isOpen:v,itemRefs:w,scrollIntoView:i,getItemNodeFromIndex:D});cB({isInitialMount:O.current,props:t,state:p}),T.useEffect(()=>{(r||n||v)&&E.current&&E.current.focus()},[]),T.useEffect(()=>{O.current||(R.current=o.length)});const j=sie(v,[_,x,S],a,()=>{h({type:Mu,selectItem:!1})}),M=lB("getInputProps","getComboboxProps","getMenuProps");T.useEffect(()=>{O.current=!1},[]),T.useEffect(()=>{v||(w.current={})},[v]);const P=T.useMemo(()=>({ArrowDown(Y){Y.preventDefault(),h({type:i1,shiftKey:Y.shiftKey,getItemNodeFromIndex:D})},ArrowUp(Y){Y.preventDefault(),h({type:a1,shiftKey:Y.shiftKey,getItemNodeFromIndex:D})},Home(Y){A.current.state.isOpen&&(Y.preventDefault(),h({type:l1,getItemNodeFromIndex:D}))},End(Y){A.current.state.isOpen&&(Y.preventDefault(),h({type:c1,getItemNodeFromIndex:D}))},Escape(Y){const oe=A.current.state;(oe.isOpen||oe.inputValue||oe.selectedItem||oe.highlightedIndex>-1)&&(Y.preventDefault(),h({type:s1}))},Enter(Y){const oe=A.current.state;!oe.isOpen||oe.highlightedIndex<0||Y.which===229||(Y.preventDefault(),h({type:u1,getItemNodeFromIndex:D}))}}),[h,A,D]),V=T.useCallback(Y=>({id:N.labelId,htmlFor:N.inputId,...Y}),[N]),q=T.useCallback(function(Y,oe){let{onMouseLeave:re,refKey:se="ref",ref:ee,...we}=Y===void 0?{}:Y,{suppressRefError:ve=!1}=oe===void 0?{}:oe;return M("getMenuProps",ve,se,x),{[se]:Lo(ee,Ee=>{x.current=Ee}),id:N.menuId,role:"listbox","aria-labelledby":N.labelId,onMouseLeave:qt(re,()=>{h({type:uB})}),...we}},[h,M,N]),G=T.useCallback(function(Y){let{item:oe,index:re,refKey:se="ref",ref:ee,onMouseMove:we,onMouseDown:ve,onClick:Ee,onPress:pe,disabled:ce,...Ce}=Y===void 0?{}:Y;const{props:ke,state:Ke}=A.current,ze=nie(re,oe,ke.items);if(ze<0)throw new Error("Pass either item or item index in getItemProps!");const rt="onClick",Xe=Ee,It=()=>{re!==Ke.highlightedIndex&&(B.current=!1,h({type:dB,index:re,disabled:ce}))},lt=()=>{h({type:f1,index:re})},Wt=mt=>mt.preventDefault();return{[se]:Lo(ee,mt=>{mt&&(w.current[N.getItemId(ze)]=mt)}),disabled:ce,role:"option","aria-selected":`${ze===Ke.highlightedIndex}`,id:N.getItemId(ze),...!ce&&{[rt]:qt(Xe,lt)},onMouseMove:qt(we,It),onMouseDown:qt(ve,Wt),...Ce}},[h,A,B,N]),W=T.useCallback(function(Y){let{onClick:oe,onPress:re,refKey:se="ref",ref:ee,...we}=Y===void 0?{}:Y;const ve=()=>{h({type:fB}),!A.current.state.isOpen&&E.current&&E.current.focus()};return{[se]:Lo(ee,Ee=>{S.current=Ee}),id:N.toggleButtonId,tabIndex:-1,...!we.disabled&&{onClick:qt(oe,ve)},...we}},[h,A,N]),Q=T.useCallback(function(Y,oe){let{onKeyDown:re,onChange:se,onInput:ee,onBlur:we,onChangeText:ve,refKey:Ee="ref",ref:pe,...ce}=Y===void 0?{}:Y,{suppressRefError:Ce=!1}=oe===void 0?{}:oe;M("getInputProps",Ce,Ee,E);const ke=A.current.state,Ke=lt=>{const Wt=Fx(lt);Wt&&P[Wt]&&P[Wt](lt)},ze=lt=>{h({type:d1,inputValue:lt.target.value})},rt=()=>{ke.isOpen&&!j.current.isMouseDown&&h({type:Mu,selectItem:!0})},Xe="onChange";let It={};return ce.disabled||(It={[Xe]:qt(se,ee,ze),onKeyDown:qt(re,Ke),onBlur:qt(we,rt)}),{[Ee]:Lo(pe,lt=>{E.current=lt}),id:N.inputId,"aria-autocomplete":"list","aria-controls":N.menuId,...ke.isOpen&&ke.highlightedIndex>-1&&{"aria-activedescendant":N.getItemId(ke.highlightedIndex)},"aria-labelledby":N.labelId,autoComplete:"off",value:ke.inputValue,...It,...ce}},[h,P,A,j,M,N]),z=T.useCallback(function(Y,oe){let{refKey:re="ref",ref:se,...ee}=Y===void 0?{}:Y,{suppressRefError:we=!1}=oe===void 0?{}:oe;return M("getComboboxProps",we,re,_),{[re]:Lo(se,ve=>{_.current=ve}),role:"combobox","aria-haspopup":"listbox","aria-owns":N.menuId,"aria-expanded":A.current.state.isOpen,...ee}},[A,M,N]),U=T.useCallback(()=>{h({type:pB})},[h]),ie=T.useCallback(()=>{h({type:vB})},[h]),te=T.useCallback(()=>{h({type:hB})},[h]),$=T.useCallback(Y=>{h({type:gB,highlightedIndex:Y})},[h]),K=T.useCallback(Y=>{h({type:p1,selectedItem:Y})},[h]),Z=T.useCallback(Y=>{h({type:mB,inputValue:Y})},[h]),H=T.useCallback(()=>{h({type:bB})},[h]);return{getItemProps:G,getLabelProps:V,getMenuProps:q,getInputProps:Q,getComboboxProps:z,getToggleButtonProps:W,toggleMenu:U,openMenu:te,closeMenu:ie,setHighlightedIndex:$,setInputValue:Z,selectItem:K,reset:H,highlightedIndex:y,isOpen:v,selectedItem:g,inputValue:b}}fe.array,fe.array,fe.array,fe.func,fe.func,fe.func,fe.number,fe.number,fe.number,fe.func,fe.func,fe.string,fe.string,fe.shape({addEventListener:fe.func,removeEventListener:fe.func,document:fe.shape({getElementById:fe.func,activeElement:fe.any,body:fe.any})});ws.itemToString,ws.stateReducer,ws.environment;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;var Yk={},is,Xk;function Pt(){if(Xk)return is;Xk=1;var e=function(t){return t&&t.Math===Math&&t};return is=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof _t=="object"&&_t)||e(typeof is=="object"&&is)||(function(){return this})()||Function("return this")(),is}var Ry={},Ny,Zk;function vt(){return Zk||(Zk=1,Ny=function(e){try{return!!e()}catch{return!0}}),Ny}var Py,Jk;function sn(){if(Jk)return Py;Jk=1;var e=vt();return Py=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Py}var Ty,Qk;function Id(){if(Qk)return Ty;Qk=1;var e=vt();return Ty=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),Ty}var Ay,eM;function fr(){if(eM)return Ay;eM=1;var e=Id(),t=Function.prototype.call;return Ay=e?t.bind(t):function(){return t.apply(t,arguments)},Ay}var ky={},tM;function xB(){if(tM)return ky;tM=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return ky.f=r?function(o){var i=t(this,o);return!!i&&i.enumerable}:e,ky}var My,rM;function v1(){return rM||(rM=1,My=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),My}var Dy,nM;function ft(){if(nM)return Dy;nM=1;var e=Id(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return Dy=e?n:function(o){return function(){return r.apply(o,arguments)}},Dy}var jy,oM;function Eo(){if(oM)return jy;oM=1;var e=ft(),t=e({}.toString),r=e("".slice);return jy=function(n){return r(t(n),8,-1)},jy}var qy,iM;function Rd(){if(iM)return qy;iM=1;var e=ft(),t=vt(),r=Eo(),n=Object,o=e("".split);return qy=t(function(){return!n("z").propertyIsEnumerable(0)})?function(i){return r(i)==="String"?o(i,""):n(i)}:n,qy}var Ly,aM;function Gs(){return aM||(aM=1,Ly=function(e){return e==null}),Ly}var zy,sM;function ni(){if(sM)return zy;sM=1;var e=Gs(),t=TypeError;return zy=function(r){if(e(r))throw new t("Can't call method on "+r);return r},zy}var By,lM;function pa(){if(lM)return By;lM=1;var e=Rd(),t=ni();return By=function(r){return e(t(r))},By}var Fy,cM;function Dt(){if(cM)return Fy;cM=1;var e=typeof document=="object"&&document.all;return Fy=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},Fy}var $y,uM;function Vt(){if(uM)return $y;uM=1;var e=Dt();return $y=function(t){return typeof t=="object"?t!==null:e(t)},$y}var Hy,dM;function Nd(){if(dM)return Hy;dM=1;var e=Pt(),t=Dt(),r=function(n){return t(n)?n:void 0};return Hy=function(n,o){return arguments.length<2?r(e[n]):e[n]&&e[n][o]},Hy}var Vy,fM;function Pd(){if(fM)return Vy;fM=1;var e=ft();return Vy=e({}.isPrototypeOf),Vy}var Wy,pM;function _B(){if(pM)return Wy;pM=1;var e=Pt(),t=e.navigator,r=t&&t.userAgent;return Wy=r?String(r):"",Wy}var Uy,hM;function g1(){if(hM)return Uy;hM=1;var e=Pt(),t=_B(),r=e.process,n=e.Deno,o=r&&r.versions||n&&n.version,i=o&&o.v8,a,s;return i&&(a=i.split("."),s=a[0]>0&&a[0]<4?1:+(a[0]+a[1])),!s&&t&&(a=t.match(/Edge\/(\d+)/),(!a||a[1]>=74)&&(a=t.match(/Chrome\/(\d+)/),a&&(s=+a[1]))),Uy=s,Uy}var Gy,vM;function EB(){if(vM)return Gy;vM=1;var e=g1(),t=vt(),r=Pt(),n=r.String;return Gy=!!Object.getOwnPropertySymbols&&!t(function(){var o=Symbol("symbol detection");return!n(o)||!(Object(o)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Gy}var Ky,gM;function SB(){if(gM)return Ky;gM=1;var e=EB();return Ky=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Ky}var Yy,mM;function OB(){if(mM)return Yy;mM=1;var e=Nd(),t=Dt(),r=Pd(),n=SB(),o=Object;return Yy=n?function(i){return typeof i=="symbol"}:function(i){var a=e("Symbol");return t(a)&&r(a.prototype,o(i))},Yy}var Xy,bM;function m1(){if(bM)return Xy;bM=1;var e=String;return Xy=function(t){try{return e(t)}catch{return"Object"}},Xy}var Zy,yM;function Ks(){if(yM)return Zy;yM=1;var e=Dt(),t=m1(),r=TypeError;return Zy=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},Zy}var Jy,wM;function Ys(){if(wM)return Jy;wM=1;var e=Ks(),t=Gs();return Jy=function(r,n){var o=r[n];return t(o)?void 0:e(o)},Jy}var Qy,xM;function gie(){if(xM)return Qy;xM=1;var e=fr(),t=Dt(),r=Vt(),n=TypeError;return Qy=function(o,i){var a,s;if(i==="string"&&t(a=o.toString)&&!r(s=e(a,o))||t(a=o.valueOf)&&!r(s=e(a,o))||i!=="string"&&t(a=o.toString)&&!r(s=e(a,o)))return s;throw new n("Can't convert object to primitive value")},Qy}var e0={exports:{}},t0,_M;function Td(){return _M||(_M=1,t0=!1),t0}var r0,EM;function b1(){if(EM)return r0;EM=1;var e=Pt(),t=Object.defineProperty;return r0=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},r0}var SM;function y1(){if(SM)return e0.exports;SM=1;var e=Td(),t=Pt(),r=b1(),n="__core-js_shared__",o=e0.exports=t[n]||r(n,{});return(o.versions||(o.versions=[])).push({version:"3.45.1",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"}),e0.exports}var n0,OM;function w1(){if(OM)return n0;OM=1;var e=y1();return n0=function(t,r){return e[t]||(e[t]=r||{})},n0}var o0,CM;function ha(){if(CM)return o0;CM=1;var e=ni(),t=Object;return o0=function(r){return t(e(r))},o0}var i0,IM;function Wr(){if(IM)return i0;IM=1;var e=ft(),t=ha(),r=e({}.hasOwnProperty);return i0=Object.hasOwn||function(o,i){return r(t(o),i)},i0}var a0,RM;function x1(){if(RM)return a0;RM=1;var e=ft(),t=0,r=Math.random(),n=e(1.1.toString);return a0=function(o){return"Symbol("+(o===void 0?"":o)+")_"+n(++t+r,36)},a0}var s0,NM;function tr(){if(NM)return s0;NM=1;var e=Pt(),t=w1(),r=Wr(),n=x1(),o=EB(),i=SB(),a=e.Symbol,s=t("wks"),c=i?a.for||a:a&&a.withoutSetter||n;return s0=function(u){return r(s,u)||(s[u]=o&&r(a,u)?a[u]:c("Symbol."+u)),s[u]},s0}var l0,PM;function mie(){if(PM)return l0;PM=1;var e=fr(),t=Vt(),r=OB(),n=Ys(),o=gie(),i=tr(),a=TypeError,s=i("toPrimitive");return l0=function(c,u){if(!t(c)||r(c))return c;var d=n(c,s),p;if(d){if(u===void 0&&(u="default"),p=e(d,c,u),!t(p)||r(p))return p;throw new a("Can't convert object to primitive value")}return u===void 0&&(u="number"),o(c,u)},l0}var c0,TM;function CB(){if(TM)return c0;TM=1;var e=mie(),t=OB();return c0=function(r){var n=e(r,"string");return t(n)?n:n+""},c0}var u0,AM;function _1(){if(AM)return u0;AM=1;var e=Pt(),t=Vt(),r=e.document,n=t(r)&&t(r.createElement);return u0=function(o){return n?r.createElement(o):{}},u0}var d0,kM;function IB(){if(kM)return d0;kM=1;var e=sn(),t=vt(),r=_1();return d0=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),d0}var MM;function RB(){if(MM)return Ry;MM=1;var e=sn(),t=fr(),r=xB(),n=v1(),o=pa(),i=CB(),a=Wr(),s=IB(),c=Object.getOwnPropertyDescriptor;return Ry.f=e?c:function(d,p){if(d=o(d),p=i(p),s)try{return c(d,p)}catch{}if(a(d,p))return n(!t(r.f,d,p),d[p])},Ry}var f0={},p0,DM;function NB(){if(DM)return p0;DM=1;var e=sn(),t=vt();return p0=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),p0}var h0,jM;function Ur(){if(jM)return h0;jM=1;var e=Vt(),t=String,r=TypeError;return h0=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},h0}var qM;function Yn(){if(qM)return f0;qM=1;var e=sn(),t=IB(),r=NB(),n=Ur(),o=CB(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c="enumerable",u="configurable",d="writable";return f0.f=e?r?function(h,v,y){if(n(h),v=o(v),n(y),typeof h=="function"&&v==="prototype"&&"value"in y&&d in y&&!y[d]){var g=s(h,v);g&&g[d]&&(h[v]=y.value,y={configurable:u in y?y[u]:g[u],enumerable:c in y?y[c]:g[c],writable:!1})}return a(h,v,y)}:a:function(h,v,y){if(n(h),v=o(v),n(y),t)try{return a(h,v,y)}catch{}if("get"in y||"set"in y)throw new i("Accessors not supported");return"value"in y&&(h[v]=y.value),h},f0}var v0,LM;function Xs(){if(LM)return v0;LM=1;var e=sn(),t=Yn(),r=v1();return v0=e?function(n,o,i){return t.f(n,o,r(1,i))}:function(n,o,i){return n[o]=i,n},v0}var g0={exports:{}},m0,zM;function E1(){if(zM)return m0;zM=1;var e=sn(),t=Wr(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,o=t(r,"name"),i=o&&(function(){}).name==="something",a=o&&(!e||e&&n(r,"name").configurable);return m0={EXISTS:o,PROPER:i,CONFIGURABLE:a},m0}var b0,BM;function PB(){if(BM)return b0;BM=1;var e=ft(),t=Dt(),r=y1(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(o){return n(o)}),b0=r.inspectSource,b0}var y0,FM;function TB(){if(FM)return y0;FM=1;var e=Pt(),t=Dt(),r=e.WeakMap;return y0=t(r)&&/native code/.test(String(r)),y0}var w0,$M;function S1(){if($M)return w0;$M=1;var e=w1(),t=x1(),r=e("keys");return w0=function(n){return r[n]||(r[n]=t(n))},w0}var x0,HM;function Ad(){return HM||(HM=1,x0={}),x0}var _0,VM;function va(){if(VM)return _0;VM=1;var e=TB(),t=Pt(),r=Vt(),n=Xs(),o=Wr(),i=y1(),a=S1(),s=Ad(),c="Object already initialized",u=t.TypeError,d=t.WeakMap,p,h,v,y=function(w){return v(w)?h(w):p(w,{})},g=function(w){return function(E){var S;if(!r(E)||(S=h(E)).type!==w)throw new u("Incompatible receiver, "+w+" required");return S}};if(e||i.state){var b=i.state||(i.state=new d);b.get=b.get,b.has=b.has,b.set=b.set,p=function(w,E){if(b.has(w))throw new u(c);return E.facade=w,b.set(w,E),E},h=function(w){return b.get(w)||{}},v=function(w){return b.has(w)}}else{var x=a("state");s[x]=!0,p=function(w,E){if(o(w,x))throw new u(c);return E.facade=w,n(w,x,E),E},h=function(w){return o(w,x)?w[x]:{}},v=function(w){return o(w,x)}}return _0={set:p,get:h,has:v,enforce:y,getterFor:g},_0}var WM;function AB(){if(WM)return g0.exports;WM=1;var e=ft(),t=vt(),r=Dt(),n=Wr(),o=sn(),i=E1().CONFIGURABLE,a=PB(),s=va(),c=s.enforce,u=s.get,d=String,p=Object.defineProperty,h=e("".slice),v=e("".replace),y=e([].join),g=o&&!t(function(){return p(function(){},"length",{value:8}).length!==8}),b=String(String).split("String"),x=g0.exports=function(w,E,S){h(d(E),0,7)==="Symbol("&&(E="["+v(d(E),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),S&&S.getter&&(E="get "+E),S&&S.setter&&(E="set "+E),(!n(w,"name")||i&&w.name!==E)&&(o?p(w,"name",{value:E,configurable:!0}):w.name=E),g&&S&&n(S,"arity")&&w.length!==S.arity&&p(w,"length",{value:S.arity});try{S&&n(S,"constructor")&&S.constructor?o&&p(w,"prototype",{writable:!1}):w.prototype&&(w.prototype=void 0)}catch{}var _=c(w);return n(_,"source")||(_.source=y(b,typeof E=="string"?E:"")),w};return Function.prototype.toString=x(function(){return r(this)&&u(this).source||a(this)},"toString"),g0.exports}var E0,UM;function oi(){if(UM)return E0;UM=1;var e=Dt(),t=Yn(),r=AB(),n=b1();return E0=function(o,i,a,s){s||(s={});var c=s.enumerable,u=s.name!==void 0?s.name:i;if(e(a)&&r(a,u,s),s.global)c?o[i]=a:n(i,a);else{try{s.unsafe?o[i]&&(c=!0):delete o[i]}catch{}c?o[i]=a:t.f(o,i,{value:a,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return o},E0}var S0={},O0,GM;function bie(){if(GM)return O0;GM=1;var e=Math.ceil,t=Math.floor;return O0=Math.trunc||function(n){var o=+n;return(o>0?t:e)(o)},O0}var C0,KM;function kd(){if(KM)return C0;KM=1;var e=bie();return C0=function(t){var r=+t;return r!==r||r===0?0:e(r)},C0}var I0,YM;function yie(){if(YM)return I0;YM=1;var e=kd(),t=Math.max,r=Math.min;return I0=function(n,o){var i=e(n);return i<0?t(i+o,0):r(i,o)},I0}var R0,XM;function O1(){if(XM)return R0;XM=1;var e=kd(),t=Math.min;return R0=function(r){var n=e(r);return n>0?t(n,9007199254740991):0},R0}var N0,ZM;function Md(){if(ZM)return N0;ZM=1;var e=O1();return N0=function(t){return e(t.length)},N0}var P0,JM;function wie(){if(JM)return P0;JM=1;var e=pa(),t=yie(),r=Md(),n=function(o){return function(i,a,s){var c=e(i),u=r(c);if(u===0)return!o&&-1;var d=t(s,u),p;if(o&&a!==a){for(;u>d;)if(p=c[d++],p!==p)return!0}else for(;u>d;d++)if((o||d in c)&&c[d]===a)return o||d||0;return!o&&-1}};return P0={includes:n(!0),indexOf:n(!1)},P0}var T0,QM;function kB(){if(QM)return T0;QM=1;var e=ft(),t=Wr(),r=pa(),n=wie().indexOf,o=Ad(),i=e([].push);return T0=function(a,s){var c=r(a),u=0,d=[],p;for(p in c)!t(o,p)&&t(c,p)&&i(d,p);for(;s.length>u;)t(c,p=s[u++])&&(~n(d,p)||i(d,p));return d},T0}var A0,eD;function C1(){return eD||(eD=1,A0=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),A0}var tD;function I1(){if(tD)return S0;tD=1;var e=kB(),t=C1(),r=t.concat("length","prototype");return S0.f=Object.getOwnPropertyNames||function(o){return e(o,r)},S0}var k0={},rD;function MB(){return rD||(rD=1,k0.f=Object.getOwnPropertySymbols),k0}var M0,nD;function xie(){if(nD)return M0;nD=1;var e=Nd(),t=ft(),r=I1(),n=MB(),o=Ur(),i=t([].concat);return M0=e("Reflect","ownKeys")||function(s){var c=r.f(o(s)),u=n.f;return u?i(c,u(s)):c},M0}var D0,oD;function _ie(){if(oD)return D0;oD=1;var e=Wr(),t=xie(),r=RB(),n=Yn();return D0=function(o,i,a){for(var s=t(i),c=n.f,u=r.f,d=0;d<s.length;d++){var p=s[d];!e(o,p)&&!(a&&e(a,p))&&c(o,p,u(i,p))}},D0}var j0,iD;function DB(){if(iD)return j0;iD=1;var e=vt(),t=Dt(),r=/#|\.prototype\./,n=function(c,u){var d=i[o(c)];return d===s?!0:d===a?!1:t(u)?e(u):!!u},o=n.normalize=function(c){return String(c).replace(r,".").toLowerCase()},i=n.data={},a=n.NATIVE="N",s=n.POLYFILL="P";return j0=n,j0}var q0,aD;function So(){if(aD)return q0;aD=1;var e=Pt(),t=RB().f,r=Xs(),n=oi(),o=b1(),i=_ie(),a=DB();return q0=function(s,c){var u=s.target,d=s.global,p=s.stat,h,v,y,g,b,x;if(d?v=e:p?v=e[u]||o(u,{}):v=e[u]&&e[u].prototype,v)for(y in c){if(b=c[y],s.dontCallGetSet?(x=t(v,y),g=x&&x.value):g=v[y],h=a(d?y:u+(p?".":"#")+y,s.forced),!h&&g!==void 0){if(typeof b==typeof g)continue;i(b,g)}(s.sham||g&&g.sham)&&r(b,"sham",!0),n(v,y,b,s)}},q0}var L0,sD;function R1(){if(sD)return L0;sD=1;var e=tr(),t=e("toStringTag"),r={};return r[t]="z",L0=String(r)==="[object z]",L0}var z0,lD;function Dd(){if(lD)return z0;lD=1;var e=R1(),t=Dt(),r=Eo(),n=tr(),o=n("toStringTag"),i=Object,a=r((function(){return arguments})())==="Arguments",s=function(c,u){try{return c[u]}catch{}};return z0=e?r:function(c){var u,d,p;return c===void 0?"Undefined":c===null?"Null":typeof(d=s(u=i(c),o))=="string"?d:a?r(u):(p=r(u))==="Object"&&t(u.callee)?"Arguments":p},z0}var B0,cD;function ii(){if(cD)return B0;cD=1;var e=Dd(),t=String;return B0=function(r){if(e(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return t(r)},B0}var F0,uD;function jB(){return uD||(uD=1,F0=`
117
+ \v\f\r                 \u2028\u2029\uFEFF`),F0}var $0,dD;function Eie(){if(dD)return $0;dD=1;var e=ft(),t=ni(),r=ii(),n=jB(),o=e("".replace),i=RegExp("^["+n+"]+"),a=RegExp("(^|[^"+n+"])["+n+"]+$"),s=function(c){return function(u){var d=r(t(u));return c&1&&(d=o(d,i,"")),c&2&&(d=o(d,a,"$1")),d}};return $0={start:s(1),end:s(2),trim:s(3)},$0}var H0,fD;function Sie(){if(fD)return H0;fD=1;var e=Pt(),t=vt(),r=ft(),n=ii(),o=Eie().trim,i=jB(),a=e.parseInt,s=e.Symbol,c=s&&s.iterator,u=/^[+-]?0x/i,d=r(u.exec),p=a(i+"08")!==8||a(i+"0x16")!==22||c&&!t(function(){a(Object(c))});return H0=p?function(v,y){var g=o(n(v));return a(g,y>>>0||(d(u,g)?16:10))}:a,H0}var pD;function Oie(){if(pD)return Yk;pD=1;var e=So(),t=Sie();return e({global:!0,forced:parseInt!==t},{parseInt:t}),Yk}Oie();var hD={},V0,vD;function qB(){if(vD)return V0;vD=1;var e=kB(),t=C1();return V0=Object.keys||function(n){return e(n,t)},V0}var W0,gD;function Cie(){if(gD)return W0;gD=1;var e=sn(),t=ft(),r=fr(),n=vt(),o=qB(),i=MB(),a=xB(),s=ha(),c=Rd(),u=Object.assign,d=Object.defineProperty,p=t([].concat);return W0=!u||n(function(){if(e&&u({b:1},u(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var h={},v={},y=Symbol("assign detection"),g="abcdefghijklmnopqrst";return h[y]=7,g.split("").forEach(function(b){v[b]=b}),u({},h)[y]!==7||o(u({},v)).join("")!==g})?function(v,y){for(var g=s(v),b=arguments.length,x=1,w=i.f,E=a.f;b>x;)for(var S=c(arguments[x++]),_=w?p(o(S),w(S)):o(S),O=_.length,N=0,R;O>N;)R=_[N++],(!e||r(E,S,R))&&(g[R]=S[R]);return g}:u,W0}var mD;function Iie(){if(mD)return hD;mD=1;var e=So(),t=Cie();return e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),hD}Iie();var bD={},U0,yD;function Rie(){if(yD)return U0;yD=1;var e=Eo(),t=ft();return U0=function(r){if(e(r)==="Function")return t(r)},U0}var G0,wD;function LB(){if(wD)return G0;wD=1;var e=Rie(),t=Ks(),r=Id(),n=e(e.bind);return G0=function(o,i){return t(o),i===void 0?o:r?n(o,i):function(){return o.apply(i,arguments)}},G0}var K0,xD;function Nie(){if(xD)return K0;xD=1;var e=Eo();return K0=Array.isArray||function(r){return e(r)==="Array"},K0}var Y0,_D;function Pie(){if(_D)return Y0;_D=1;var e=ft(),t=vt(),r=Dt(),n=Dd(),o=Nd(),i=PB(),a=function(){},s=o("Reflect","construct"),c=/^\s*(?:class|function)\b/,u=e(c.exec),d=!c.test(a),p=function(y){if(!r(y))return!1;try{return s(a,[],y),!0}catch{return!1}},h=function(y){if(!r(y))return!1;switch(n(y)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!u(c,i(y))}catch{return!0}};return h.sham=!0,Y0=!s||t(function(){var v;return p(p.call)||!p(Object)||!p(function(){v=!0})||v})?h:p,Y0}var X0,ED;function Tie(){if(ED)return X0;ED=1;var e=Nie(),t=Pie(),r=Vt(),n=tr(),o=n("species"),i=Array;return X0=function(a){var s;return e(a)&&(s=a.constructor,t(s)&&(s===i||e(s.prototype))?s=void 0:r(s)&&(s=s[o],s===null&&(s=void 0))),s===void 0?i:s},X0}var Z0,SD;function Aie(){if(SD)return Z0;SD=1;var e=Tie();return Z0=function(t,r){return new(e(t))(r===0?0:r)},Z0}var J0,OD;function zB(){if(OD)return J0;OD=1;var e=LB(),t=ft(),r=Rd(),n=ha(),o=Md(),i=Aie(),a=t([].push),s=function(c){var u=c===1,d=c===2,p=c===3,h=c===4,v=c===6,y=c===7,g=c===5||v;return function(b,x,w,E){for(var S=n(b),_=r(S),O=o(_),N=e(x,w),R=0,A=E||i,D=u?A(b,O):d||y?A(b,0):void 0,B,j;O>R;R++)if((g||R in _)&&(B=_[R],j=N(B,R,S),c))if(u)D[R]=j;else if(j)switch(c){case 3:return!0;case 5:return B;case 6:return R;case 2:a(D,B)}else switch(c){case 4:return!1;case 7:a(D,B)}return v?-1:p||h?h:D}};return J0={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)},J0}var Q0,CD;function kie(){if(CD)return Q0;CD=1;var e=vt(),t=tr(),r=g1(),n=t("species");return Q0=function(o){return r>=51||!e(function(){var i=[],a=i.constructor={};return a[n]=function(){return{foo:1}},i[o](Boolean).foo!==1})},Q0}var ID;function Mie(){if(ID)return bD;ID=1;var e=So(),t=zB().filter,r=kie(),n=r("filter");return e({target:"Array",proto:!0,forced:!n},{filter:function(i){return t(this,i,arguments.length>1?arguments[1]:void 0)}}),bD}Mie();var RD={},ew,ND;function Die(){if(ND)return ew;ND=1;var e=R1(),t=Dd();return ew=e?{}.toString:function(){return"[object "+t(this)+"]"},ew}var PD;function jie(){if(PD)return RD;PD=1;var e=R1(),t=oi(),r=Die();return e||t(Object.prototype,"toString",r,{unsafe:!0}),RD}jie();var tw={},TD;function qie(){if(TD)return tw;TD=1;var e=sn(),t=NB(),r=Yn(),n=Ur(),o=pa(),i=qB();return tw.f=e&&!t?Object.defineProperties:function(s,c){n(s);for(var u=o(c),d=i(c),p=d.length,h=0,v;p>h;)r.f(s,v=d[h++],u[v]);return s},tw}var rw,AD;function Lie(){if(AD)return rw;AD=1;var e=Nd();return rw=e("document","documentElement"),rw}var nw,kD;function jd(){if(kD)return nw;kD=1;var e=Ur(),t=qie(),r=C1(),n=Ad(),o=Lie(),i=_1(),a=S1(),s=">",c="<",u="prototype",d="script",p=a("IE_PROTO"),h=function(){},v=function(w){return c+d+s+w+c+"/"+d+s},y=function(w){w.write(v("")),w.close();var E=w.parentWindow.Object;return w=null,E},g=function(){var w=i("iframe"),E="java"+d+":",S;return w.style.display="none",o.appendChild(w),w.src=String(E),S=w.contentWindow.document,S.open(),S.write(v("document.F=Object")),S.close(),S.F},b,x=function(){try{b=new ActiveXObject("htmlfile")}catch{}x=typeof document<"u"?document.domain&&b?y(b):g():y(b);for(var w=r.length;w--;)delete x[u][r[w]];return x()};return n[p]=!0,nw=Object.create||function(E,S){var _;return E!==null?(h[u]=e(E),_=new h,h[u]=null,_[p]=E):_=x(),S===void 0?_:t.f(_,S)},nw}var ow,MD;function zie(){if(MD)return ow;MD=1;var e=tr(),t=jd(),r=Yn().f,n=e("unscopables"),o=Array.prototype;return o[n]===void 0&&r(o,n,{configurable:!0,value:t(null)}),ow=function(i){o[n][i]=!0},ow}var iw,DD;function Zs(){return DD||(DD=1,iw={}),iw}var aw,jD;function Bie(){if(jD)return aw;jD=1;var e=vt();return aw=!e(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),aw}var sw,qD;function BB(){if(qD)return sw;qD=1;var e=Wr(),t=Dt(),r=ha(),n=S1(),o=Bie(),i=n("IE_PROTO"),a=Object,s=a.prototype;return sw=o?a.getPrototypeOf:function(c){var u=r(c);if(e(u,i))return u[i];var d=u.constructor;return t(d)&&u instanceof d?d.prototype:u instanceof a?s:null},sw}var lw,LD;function FB(){if(LD)return lw;LD=1;var e=vt(),t=Dt(),r=Vt(),n=jd(),o=BB(),i=oi(),a=tr(),s=Td(),c=a("iterator"),u=!1,d,p,h;[].keys&&(h=[].keys(),"next"in h?(p=o(o(h)),p!==Object.prototype&&(d=p)):u=!0);var v=!r(d)||e(function(){var y={};return d[c].call(y)!==y});return v?d={}:s&&(d=n(d)),t(d[c])||i(d,c,function(){return this}),lw={IteratorPrototype:d,BUGGY_SAFARI_ITERATORS:u},lw}var cw,zD;function qd(){if(zD)return cw;zD=1;var e=Yn().f,t=Wr(),r=tr(),n=r("toStringTag");return cw=function(o,i,a){o&&!a&&(o=o.prototype),o&&!t(o,n)&&e(o,n,{configurable:!0,value:i})},cw}var uw,BD;function Fie(){if(BD)return uw;BD=1;var e=FB().IteratorPrototype,t=jd(),r=v1(),n=qd(),o=Zs(),i=function(){return this};return uw=function(a,s,c,u){var d=s+" Iterator";return a.prototype=t(e,{next:r(+!u,c)}),n(a,d,!1,!0),o[d]=i,a},uw}var dw,FD;function $ie(){if(FD)return dw;FD=1;var e=ft(),t=Ks();return dw=function(r,n,o){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[o]))}catch{}},dw}var fw,$D;function Hie(){if($D)return fw;$D=1;var e=Vt();return fw=function(t){return e(t)||t===null},fw}var pw,HD;function Vie(){if(HD)return pw;HD=1;var e=Hie(),t=String,r=TypeError;return pw=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")},pw}var hw,VD;function $B(){if(VD)return hw;VD=1;var e=$ie(),t=Vt(),r=ni(),n=Vie();return hw=Object.setPrototypeOf||("__proto__"in{}?(function(){var o=!1,i={},a;try{a=e(Object.prototype,"__proto__","set"),a(i,[]),o=i instanceof Array}catch{}return function(c,u){return r(c),n(u),t(c)&&(o?a(c,u):c.__proto__=u),c}})():void 0),hw}var vw,WD;function HB(){if(WD)return vw;WD=1;var e=So(),t=fr(),r=Td(),n=E1(),o=Dt(),i=Fie(),a=BB(),s=$B(),c=qd(),u=Xs(),d=oi(),p=tr(),h=Zs(),v=FB(),y=n.PROPER,g=n.CONFIGURABLE,b=v.IteratorPrototype,x=v.BUGGY_SAFARI_ITERATORS,w=p("iterator"),E="keys",S="values",_="entries",O=function(){return this};return vw=function(N,R,A,D,B,j,M){i(A,R,D);var P=function($){if($===B&&Q)return Q;if(!x&&$&&$ in G)return G[$];switch($){case E:return function(){return new A(this,$)};case S:return function(){return new A(this,$)};case _:return function(){return new A(this,$)}}return function(){return new A(this)}},V=R+" Iterator",q=!1,G=N.prototype,W=G[w]||G["@@iterator"]||B&&G[B],Q=!x&&W||P(B),z=R==="Array"&&G.entries||W,U,ie,te;if(z&&(U=a(z.call(new N)),U!==Object.prototype&&U.next&&(!r&&a(U)!==b&&(s?s(U,b):o(U[w])||d(U,w,O)),c(U,V,!0,!0),r&&(h[V]=O))),y&&B===S&&W&&W.name!==S&&(!r&&g?u(G,"name",S):(q=!0,Q=function(){return t(W,this)})),B)if(ie={values:P(S),keys:j?Q:P(E),entries:P(_)},M)for(te in ie)(x||q||!(te in G))&&d(G,te,ie[te]);else e({target:R,proto:!0,forced:x||q},ie);return(!r||M)&&G[w]!==Q&&d(G,w,Q,{name:B}),h[R]=Q,ie},vw}var gw,UD;function VB(){return UD||(UD=1,gw=function(e,t){return{value:e,done:t}}),gw}var mw,GD;function WB(){if(GD)return mw;GD=1;var e=pa(),t=zie(),r=Zs(),n=va(),o=Yn().f,i=HB(),a=VB(),s=Td(),c=sn(),u="Array Iterator",d=n.set,p=n.getterFor(u);mw=i(Array,"Array",function(v,y){d(this,{type:u,target:e(v),index:0,kind:y})},function(){var v=p(this),y=v.target,g=v.index++;if(!y||g>=y.length)return v.target=null,a(void 0,!0);switch(v.kind){case"keys":return a(g,!1);case"values":return a(y[g],!1)}return a([g,y[g]],!1)},"values");var h=r.Arguments=r.Array;if(t("keys"),t("values"),t("entries"),!s&&c&&h.name!=="values")try{o(h,"name",{value:"values"})}catch{}return mw}WB();var KD={},bw,YD;function UB(){if(YD)return bw;YD=1;var e=ft(),t=kd(),r=ii(),n=ni(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),s=function(c){return function(u,d){var p=r(n(u)),h=t(d),v=p.length,y,g;return h<0||h>=v?c?"":void 0:(y=i(p,h),y<55296||y>56319||h+1===v||(g=i(p,h+1))<56320||g>57343?c?o(p,h):y:c?a(p,h,h+2):(y-55296<<10)+(g-56320)+65536)}};return bw={codeAt:s(!1),charAt:s(!0)},bw}var XD;function Wie(){if(XD)return KD;XD=1;var e=UB().charAt,t=ii(),r=va(),n=HB(),o=VB(),i="String Iterator",a=r.set,s=r.getterFor(i);return n(String,"String",function(c){a(this,{type:i,string:t(c),index:0})},function(){var u=s(this),d=u.string,p=u.index,h;return p>=d.length?o(void 0,!0):(h=e(d,p),u.index+=h.length,o(h,!1))}),KD}Wie();var ZD={},JD={},yw,QD;function GB(){if(QD)return yw;QD=1;var e=vt();return yw=!e(function(){return Object.isExtensible(Object.preventExtensions({}))}),yw}var ww,ej;function KB(){if(ej)return ww;ej=1;var e=oi();return ww=function(t,r,n){for(var o in r)e(t,o,r[o],n);return t},ww}var xw={exports:{}},_w={},Ew,tj;function Uie(){if(tj)return Ew;tj=1;var e=ft();return Ew=e([].slice),Ew}var rj;function Gie(){if(rj)return _w;rj=1;var e=Eo(),t=pa(),r=I1().f,n=Uie(),o=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],i=function(a){try{return r(a)}catch{return n(o)}};return _w.f=function(s){return o&&e(s)==="Window"?i(s):r(t(s))},_w}var Sw,nj;function Kie(){if(nj)return Sw;nj=1;var e=vt();return Sw=e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),Sw}var Ow,oj;function Yie(){if(oj)return Ow;oj=1;var e=vt(),t=Vt(),r=Eo(),n=Kie(),o=Object.isExtensible,i=e(function(){});return Ow=i||n?function(s){return!t(s)||n&&r(s)==="ArrayBuffer"?!1:o?o(s):!0}:o,Ow}var ij;function N1(){if(ij)return xw.exports;ij=1;var e=So(),t=ft(),r=Ad(),n=Vt(),o=Wr(),i=Yn().f,a=I1(),s=Gie(),c=Yie(),u=x1(),d=GB(),p=!1,h=u("meta"),v=0,y=function(S){i(S,h,{value:{objectID:"O"+v++,weakData:{}}})},g=function(S,_){if(!n(S))return typeof S=="symbol"?S:(typeof S=="string"?"S":"P")+S;if(!o(S,h)){if(!c(S))return"F";if(!_)return"E";y(S)}return S[h].objectID},b=function(S,_){if(!o(S,h)){if(!c(S))return!0;if(!_)return!1;y(S)}return S[h].weakData},x=function(S){return d&&p&&c(S)&&!o(S,h)&&y(S),S},w=function(){E.enable=function(){},p=!0;var S=a.f,_=t([].splice),O={};O[h]=1,S(O).length&&(a.f=function(N){for(var R=S(N),A=0,D=R.length;A<D;A++)if(R[A]===h){_(R,A,1);break}return R},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},E=xw.exports={enable:w,fastKey:g,getWeakData:b,onFreeze:x};return r[h]=!0,xw.exports}var Cw,aj;function Xie(){if(aj)return Cw;aj=1;var e=tr(),t=Zs(),r=e("iterator"),n=Array.prototype;return Cw=function(o){return o!==void 0&&(t.Array===o||n[r]===o)},Cw}var Iw,sj;function YB(){if(sj)return Iw;sj=1;var e=Dd(),t=Ys(),r=Gs(),n=Zs(),o=tr(),i=o("iterator");return Iw=function(a){if(!r(a))return t(a,i)||t(a,"@@iterator")||n[e(a)]},Iw}var Rw,lj;function Zie(){if(lj)return Rw;lj=1;var e=fr(),t=Ks(),r=Ur(),n=m1(),o=YB(),i=TypeError;return Rw=function(a,s){var c=arguments.length<2?o(a):s;if(t(c))return r(e(c,a));throw new i(n(a)+" is not iterable")},Rw}var Nw,cj;function Jie(){if(cj)return Nw;cj=1;var e=fr(),t=Ur(),r=Ys();return Nw=function(n,o,i){var a,s;t(n);try{if(a=r(n,"return"),!a){if(o==="throw")throw i;return i}a=e(a,n)}catch(c){s=!0,a=c}if(o==="throw")throw i;if(s)throw a;return t(a),i},Nw}var Pw,uj;function XB(){if(uj)return Pw;uj=1;var e=LB(),t=fr(),r=Ur(),n=m1(),o=Xie(),i=Md(),a=Pd(),s=Zie(),c=YB(),u=Jie(),d=TypeError,p=function(v,y){this.stopped=v,this.result=y},h=p.prototype;return Pw=function(v,y,g){var b=g&&g.that,x=!!(g&&g.AS_ENTRIES),w=!!(g&&g.IS_RECORD),E=!!(g&&g.IS_ITERATOR),S=!!(g&&g.INTERRUPTED),_=e(y,b),O,N,R,A,D,B,j,M=function(V){return O&&u(O,"normal"),new p(!0,V)},P=function(V){return x?(r(V),S?_(V[0],V[1],M):_(V[0],V[1])):S?_(V,M):_(V)};if(w)O=v.iterator;else if(E)O=v;else{if(N=c(v),!N)throw new d(n(v)+" is not iterable");if(o(N)){for(R=0,A=i(v);A>R;R++)if(D=P(v[R]),D&&a(h,D))return D;return new p(!1)}O=s(v,N)}for(B=w?v.next:O.next;!(j=t(B,O)).done;){try{D=P(j.value)}catch(V){u(O,"throw",V)}if(typeof D=="object"&&D&&a(h,D))return D}return new p(!1)},Pw}var Tw,dj;function ZB(){if(dj)return Tw;dj=1;var e=Pd(),t=TypeError;return Tw=function(r,n){if(e(n,r))return r;throw new t("Incorrect invocation")},Tw}var Aw,fj;function Qie(){if(fj)return Aw;fj=1;var e=tr(),t=e("iterator"),r=!1;try{var n=0,o={next:function(){return{done:!!n++}},return:function(){r=!0}};o[t]=function(){return this},Array.from(o,function(){throw 2})}catch{}return Aw=function(i,a){try{if(!a&&!r)return!1}catch{return!1}var s=!1;try{var c={};c[t]=function(){return{next:function(){return{done:s=!0}}}},i(c)}catch{}return s},Aw}var kw,pj;function eae(){if(pj)return kw;pj=1;var e=Dt(),t=Vt(),r=$B();return kw=function(n,o,i){var a,s;return r&&e(a=o.constructor)&&a!==i&&t(s=a.prototype)&&s!==i.prototype&&r(n,s),n},kw}var Mw,hj;function tae(){if(hj)return Mw;hj=1;var e=So(),t=Pt(),r=ft(),n=DB(),o=oi(),i=N1(),a=XB(),s=ZB(),c=Dt(),u=Gs(),d=Vt(),p=vt(),h=Qie(),v=qd(),y=eae();return Mw=function(g,b,x){var w=g.indexOf("Map")!==-1,E=g.indexOf("Weak")!==-1,S=w?"set":"add",_=t[g],O=_&&_.prototype,N=_,R={},A=function(q){var G=r(O[q]);o(O,q,q==="add"?function(Q){return G(this,Q===0?0:Q),this}:q==="delete"?function(W){return E&&!d(W)?!1:G(this,W===0?0:W)}:q==="get"?function(Q){return E&&!d(Q)?void 0:G(this,Q===0?0:Q)}:q==="has"?function(Q){return E&&!d(Q)?!1:G(this,Q===0?0:Q)}:function(Q,z){return G(this,Q===0?0:Q,z),this})},D=n(g,!c(_)||!(E||O.forEach&&!p(function(){new _().entries().next()})));if(D)N=x.getConstructor(b,g,w,S),i.enable();else if(n(g,!0)){var B=new N,j=B[S](E?{}:-0,1)!==B,M=p(function(){B.has(1)}),P=h(function(q){new _(q)}),V=!E&&p(function(){for(var q=new _,G=5;G--;)q[S](G,G);return!q.has(-0)});P||(N=b(function(q,G){s(q,O);var W=y(new _,q,N);return u(G)||a(G,W[S],{that:W,AS_ENTRIES:w}),W}),N.prototype=O,O.constructor=N),(M||V)&&(A("delete"),A("has"),w&&A("get")),(V||j)&&A(S),E&&O.clear&&delete O.clear}return R[g]=N,e({global:!0,constructor:!0,forced:N!==_},R),v(N,g),E||x.setStrong(N,g,w),N},Mw}var Dw,vj;function rae(){if(vj)return Dw;vj=1;var e=ft(),t=KB(),r=N1().getWeakData,n=ZB(),o=Ur(),i=Gs(),a=Vt(),s=XB(),c=zB(),u=Wr(),d=va(),p=d.set,h=d.getterFor,v=c.find,y=c.findIndex,g=e([].splice),b=0,x=function(S){return S.frozen||(S.frozen=new w)},w=function(){this.entries=[]},E=function(S,_){return v(S.entries,function(O){return O[0]===_})};return w.prototype={get:function(S){var _=E(this,S);if(_)return _[1]},has:function(S){return!!E(this,S)},set:function(S,_){var O=E(this,S);O?O[1]=_:this.entries.push([S,_])},delete:function(S){var _=y(this.entries,function(O){return O[0]===S});return~_&&g(this.entries,_,1),!!~_}},Dw={getConstructor:function(S,_,O,N){var R=S(function(j,M){n(j,A),p(j,{type:_,id:b++,frozen:null}),i(M)||s(M,j[N],{that:j,AS_ENTRIES:O})}),A=R.prototype,D=h(_),B=function(j,M,P){var V=D(j),q=r(o(M),!0);return q===!0?x(V).set(M,P):q[V.id]=P,j};return t(A,{delete:function(j){var M=D(this);if(!a(j))return!1;var P=r(j);return P===!0?x(M).delete(j):P&&u(P,M.id)&&delete P[M.id]},has:function(M){var P=D(this);if(!a(M))return!1;var V=r(M);return V===!0?x(P).has(M):V&&u(V,P.id)}}),t(A,O?{get:function(M){var P=D(this);if(a(M)){var V=r(M);if(V===!0)return x(P).get(M);if(V)return V[P.id]}},set:function(M,P){return B(this,M,P)}}:{add:function(M){return B(this,M,!0)}}),R}},Dw}var gj;function nae(){if(gj)return JD;gj=1;var e=GB(),t=Pt(),r=ft(),n=KB(),o=N1(),i=tae(),a=rae(),s=Vt(),c=va().enforce,u=vt(),d=TB(),p=Object,h=Array.isArray,v=p.isExtensible,y=p.isFrozen,g=p.isSealed,b=p.freeze,x=p.seal,w=!t.ActiveXObject&&"ActiveXObject"in t,E,S=function(j){return function(){return j(this,arguments.length?arguments[0]:void 0)}},_=i("WeakMap",S,a),O=_.prototype,N=r(O.set),R=function(){return e&&u(function(){var j=b([]);return N(new _,j,1),!y(j)})};if(d)if(w){E=a.getConstructor(S,"WeakMap",!0),o.enable();var A=r(O.delete),D=r(O.has),B=r(O.get);n(O,{delete:function(j){if(s(j)&&!v(j)){var M=c(this);return M.frozen||(M.frozen=new E),A(this,j)||M.frozen.delete(j)}return A(this,j)},has:function(M){if(s(M)&&!v(M)){var P=c(this);return P.frozen||(P.frozen=new E),D(this,M)||P.frozen.has(M)}return D(this,M)},get:function(M){if(s(M)&&!v(M)){var P=c(this);return P.frozen||(P.frozen=new E),D(this,M)?B(this,M):P.frozen.get(M)}return B(this,M)},set:function(M,P){if(s(M)&&!v(M)){var V=c(this);V.frozen||(V.frozen=new E),D(this,M)?N(this,M,P):V.frozen.set(M,P)}else N(this,M,P);return this}})}else R()&&n(O,{set:function(M,P){var V;return h(M)&&(y(M)?V=b:g(M)&&(V=x)),N(this,M,P),V&&V(M),this}});return JD}var mj;function oae(){return mj||(mj=1,nae()),ZD}oae();var bj={},jw,yj;function iae(){return yj||(yj=1,jw={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),jw}var qw,wj;function aae(){if(wj)return qw;wj=1;var e=_1(),t=e("span").classList,r=t&&t.constructor&&t.constructor.prototype;return qw=r===Object.prototype?void 0:r,qw}var xj;function sae(){if(xj)return bj;xj=1;var e=Pt(),t=iae(),r=aae(),n=WB(),o=Xs(),i=qd(),a=tr(),s=a("iterator"),c=n.values,u=function(p,h){if(p){if(p[s]!==c)try{o(p,s,c)}catch{p[s]=c}if(i(p,h,!0),t[h]){for(var v in n)if(p[v]!==n[v])try{o(p,v,n[v])}catch{p[v]=n[v]}}}};for(var d in t)u(e[d]&&e[d].prototype,d);return u(r,"DOMTokenList"),bj}sae();var Lw,_j;function lae(){if(_j)return Lw;_j=1;var e="Expected a function",t=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,c=typeof _t=="object"&&_t&&_t.Object===Object&&_t,u=typeof self=="object"&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),p=Object.prototype,h=p.toString,v=Math.max,y=Math.min,g=function(){return d.Date.now()};function b(O,N,R){var A,D,B,j,M,P,V=0,q=!1,G=!1,W=!0;if(typeof O!="function")throw new TypeError(e);N=_(N)||0,w(R)&&(q=!!R.leading,G="maxWait"in R,B=G?v(_(R.maxWait)||0,N):B,W="trailing"in R?!!R.trailing:W);function Q(Y){var oe=A,re=D;return A=D=void 0,V=Y,j=O.apply(re,oe),j}function z(Y){return V=Y,M=setTimeout(te,N),q?Q(Y):j}function U(Y){var oe=Y-P,re=Y-V,se=N-oe;return G?y(se,B-re):se}function ie(Y){var oe=Y-P,re=Y-V;return P===void 0||oe>=N||oe<0||G&&re>=B}function te(){var Y=g();if(ie(Y))return $(Y);M=setTimeout(te,U(Y))}function $(Y){return M=void 0,W&&A?Q(Y):(A=D=void 0,j)}function K(){M!==void 0&&clearTimeout(M),V=0,A=P=D=M=void 0}function Z(){return M===void 0?j:$(g())}function H(){var Y=g(),oe=ie(Y);if(A=arguments,D=this,P=Y,oe){if(M===void 0)return z(P);if(G)return M=setTimeout(te,N),Q(P)}return M===void 0&&(M=setTimeout(te,N)),j}return H.cancel=K,H.flush=Z,H}function x(O,N,R){var A=!0,D=!0;if(typeof O!="function")throw new TypeError(e);return w(R)&&(A="leading"in R?!!R.leading:A,D="trailing"in R?!!R.trailing:D),b(O,N,{leading:A,maxWait:N,trailing:D})}function w(O){var N=typeof O;return!!O&&(N=="object"||N=="function")}function E(O){return!!O&&typeof O=="object"}function S(O){return typeof O=="symbol"||E(O)&&h.call(O)==r}function _(O){if(typeof O=="number")return O;if(S(O))return t;if(w(O)){var N=typeof O.valueOf=="function"?O.valueOf():O;O=w(N)?N+"":N}if(typeof O!="string")return O===0?O:+O;O=O.replace(n,"");var R=i.test(O);return R||a.test(O)?s(O.slice(2),R?2:8):o.test(O)?t:+O}return Lw=x,Lw}var cae=lae();const Ej=wo(cae);var zw,Sj;function uae(){if(Sj)return zw;Sj=1;var e="Expected a function",t=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,c=typeof _t=="object"&&_t&&_t.Object===Object&&_t,u=typeof self=="object"&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),p=Object.prototype,h=p.toString,v=Math.max,y=Math.min,g=function(){return d.Date.now()};function b(_,O,N){var R,A,D,B,j,M,P=0,V=!1,q=!1,G=!0;if(typeof _!="function")throw new TypeError(e);O=S(O)||0,x(N)&&(V=!!N.leading,q="maxWait"in N,D=q?v(S(N.maxWait)||0,O):D,G="trailing"in N?!!N.trailing:G);function W(H){var Y=R,oe=A;return R=A=void 0,P=H,B=_.apply(oe,Y),B}function Q(H){return P=H,j=setTimeout(ie,O),V?W(H):B}function z(H){var Y=H-M,oe=H-P,re=O-Y;return q?y(re,D-oe):re}function U(H){var Y=H-M,oe=H-P;return M===void 0||Y>=O||Y<0||q&&oe>=D}function ie(){var H=g();if(U(H))return te(H);j=setTimeout(ie,z(H))}function te(H){return j=void 0,G&&R?W(H):(R=A=void 0,B)}function $(){j!==void 0&&clearTimeout(j),P=0,R=M=A=j=void 0}function K(){return j===void 0?B:te(g())}function Z(){var H=g(),Y=U(H);if(R=arguments,A=this,M=H,Y){if(j===void 0)return Q(M);if(q)return j=setTimeout(ie,O),W(M)}return j===void 0&&(j=setTimeout(ie,O)),B}return Z.cancel=$,Z.flush=K,Z}function x(_){var O=typeof _;return!!_&&(O=="object"||O=="function")}function w(_){return!!_&&typeof _=="object"}function E(_){return typeof _=="symbol"||w(_)&&h.call(_)==r}function S(_){if(typeof _=="number")return _;if(E(_))return t;if(x(_)){var O=typeof _.valueOf=="function"?_.valueOf():_;_=x(O)?O+"":O}if(typeof _!="string")return _===0?_:+_;_=_.replace(n,"");var N=i.test(_);return N||a.test(_)?s(_.slice(2),N?2:8):o.test(_)?t:+_}return zw=b,zw}var dae=uae();const Oj=wo(dae);var Bw,Cj;function fae(){if(Cj)return Bw;Cj=1;var e="Expected a function",t="__lodash_hash_undefined__",r="[object Function]",n="[object GeneratorFunction]",o=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,a=typeof _t=="object"&&_t&&_t.Object===Object&&_t,s=typeof self=="object"&&self&&self.Object===Object&&self,c=a||s||Function("return this")();function u(pe,ce){return pe==null?void 0:pe[ce]}function d(pe){var ce=!1;if(pe!=null&&typeof pe.toString!="function")try{ce=!!(pe+"")}catch{}return ce}var p=Array.prototype,h=Function.prototype,v=Object.prototype,y=c["__core-js_shared__"],g=(function(){var pe=/[^.]+$/.exec(y&&y.keys&&y.keys.IE_PROTO||"");return pe?"Symbol(src)_1."+pe:""})(),b=h.toString,x=v.hasOwnProperty,w=v.toString,E=RegExp("^"+b.call(x).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=p.splice,_=Y(c,"Map"),O=Y(Object,"create");function N(pe){var ce=-1,Ce=pe?pe.length:0;for(this.clear();++ce<Ce;){var ke=pe[ce];this.set(ke[0],ke[1])}}function R(){this.__data__=O?O(null):{}}function A(pe){return this.has(pe)&&delete this.__data__[pe]}function D(pe){var ce=this.__data__;if(O){var Ce=ce[pe];return Ce===t?void 0:Ce}return x.call(ce,pe)?ce[pe]:void 0}function B(pe){var ce=this.__data__;return O?ce[pe]!==void 0:x.call(ce,pe)}function j(pe,ce){var Ce=this.__data__;return Ce[pe]=O&&ce===void 0?t:ce,this}N.prototype.clear=R,N.prototype.delete=A,N.prototype.get=D,N.prototype.has=B,N.prototype.set=j;function M(pe){var ce=-1,Ce=pe?pe.length:0;for(this.clear();++ce<Ce;){var ke=pe[ce];this.set(ke[0],ke[1])}}function P(){this.__data__=[]}function V(pe){var ce=this.__data__,Ce=K(ce,pe);if(Ce<0)return!1;var ke=ce.length-1;return Ce==ke?ce.pop():S.call(ce,Ce,1),!0}function q(pe){var ce=this.__data__,Ce=K(ce,pe);return Ce<0?void 0:ce[Ce][1]}function G(pe){return K(this.__data__,pe)>-1}function W(pe,ce){var Ce=this.__data__,ke=K(Ce,pe);return ke<0?Ce.push([pe,ce]):Ce[ke][1]=ce,this}M.prototype.clear=P,M.prototype.delete=V,M.prototype.get=q,M.prototype.has=G,M.prototype.set=W;function Q(pe){var ce=-1,Ce=pe?pe.length:0;for(this.clear();++ce<Ce;){var ke=pe[ce];this.set(ke[0],ke[1])}}function z(){this.__data__={hash:new N,map:new(_||M),string:new N}}function U(pe){return H(this,pe).delete(pe)}function ie(pe){return H(this,pe).get(pe)}function te(pe){return H(this,pe).has(pe)}function $(pe,ce){return H(this,pe).set(pe,ce),this}Q.prototype.clear=z,Q.prototype.delete=U,Q.prototype.get=ie,Q.prototype.has=te,Q.prototype.set=$;function K(pe,ce){for(var Ce=pe.length;Ce--;)if(we(pe[Ce][0],ce))return Ce;return-1}function Z(pe){if(!Ee(pe)||re(pe))return!1;var ce=ve(pe)||d(pe)?E:i;return ce.test(se(pe))}function H(pe,ce){var Ce=pe.__data__;return oe(ce)?Ce[typeof ce=="string"?"string":"hash"]:Ce.map}function Y(pe,ce){var Ce=u(pe,ce);return Z(Ce)?Ce:void 0}function oe(pe){var ce=typeof pe;return ce=="string"||ce=="number"||ce=="symbol"||ce=="boolean"?pe!=="__proto__":pe===null}function re(pe){return!!g&&g in pe}function se(pe){if(pe!=null){try{return b.call(pe)}catch{}try{return pe+""}catch{}}return""}function ee(pe,ce){if(typeof pe!="function"||ce&&typeof ce!="function")throw new TypeError(e);var Ce=function(){var ke=arguments,Ke=ce?ce.apply(this,ke):ke[0],ze=Ce.cache;if(ze.has(Ke))return ze.get(Ke);var rt=pe.apply(this,ke);return Ce.cache=ze.set(Ke,rt),rt};return Ce.cache=new(ee.Cache||Q),Ce}ee.Cache=Q;function we(pe,ce){return pe===ce||pe!==pe&&ce!==ce}function ve(pe){var ce=Ee(pe)?w.call(pe):"";return ce==r||ce==n}function Ee(pe){var ce=typeof pe;return!!pe&&(ce=="object"||ce=="function")}return Bw=ee,Bw}var pae=fae();const hae=wo(pae);var Vo=[],vae=function(){return Vo.some(function(e){return e.activeTargets.length>0})},gae=function(){return Vo.some(function(e){return e.skippedTargets.length>0})},Ij="ResizeObserver loop completed with undelivered notifications.",mae=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Ij}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Ij),window.dispatchEvent(e)},ks;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ks||(ks={}));var Wo=function(e){return Object.freeze(e)},bae=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,Wo(this)}return e})(),JB=(function(){function e(t,r,n,o){return this.x=t,this.y=r,this.width=n,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Wo(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,o=t.top,i=t.right,a=t.bottom,s=t.left,c=t.width,u=t.height;return{x:r,y:n,top:o,right:i,bottom:a,left:s,width:c,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),P1=function(e){return e instanceof SVGElement&&"getBBox"in e},QB=function(e){if(P1(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},Rj=function(e){var t;if(e instanceof Element)return!0;var r=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},yae=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},xs=typeof window<"u"?window:{},zc=new WeakMap,Nj=/auto|scroll/,wae=/^tb|vertical/,xae=/msie|trident/i.test(xs.navigator&&xs.navigator.userAgent),vn=function(e){return parseFloat(e||"0")},Vi=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new bae((r?t:e)||0,(r?e:t)||0)},Pj=Wo({devicePixelContentBoxSize:Vi(),borderBoxSize:Vi(),contentBoxSize:Vi(),contentRect:new JB(0,0,0,0)}),eF=function(e,t){if(t===void 0&&(t=!1),zc.has(e)&&!t)return zc.get(e);if(QB(e))return zc.set(e,Pj),Pj;var r=getComputedStyle(e),n=P1(e)&&e.ownerSVGElement&&e.getBBox(),o=!xae&&r.boxSizing==="border-box",i=wae.test(r.writingMode||""),a=!n&&Nj.test(r.overflowY||""),s=!n&&Nj.test(r.overflowX||""),c=n?0:vn(r.paddingTop),u=n?0:vn(r.paddingRight),d=n?0:vn(r.paddingBottom),p=n?0:vn(r.paddingLeft),h=n?0:vn(r.borderTopWidth),v=n?0:vn(r.borderRightWidth),y=n?0:vn(r.borderBottomWidth),g=n?0:vn(r.borderLeftWidth),b=p+u,x=c+d,w=g+v,E=h+y,S=s?e.offsetHeight-E-e.clientHeight:0,_=a?e.offsetWidth-w-e.clientWidth:0,O=o?b+w:0,N=o?x+E:0,R=n?n.width:vn(r.width)-O-_,A=n?n.height:vn(r.height)-N-S,D=R+b+_+w,B=A+x+S+E,j=Wo({devicePixelContentBoxSize:Vi(Math.round(R*devicePixelRatio),Math.round(A*devicePixelRatio),i),borderBoxSize:Vi(D,B,i),contentBoxSize:Vi(R,A,i),contentRect:new JB(p,c,R,A)});return zc.set(e,j),j},tF=function(e,t,r){var n=eF(e,r),o=n.borderBoxSize,i=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case ks.DEVICE_PIXEL_CONTENT_BOX:return a;case ks.BORDER_BOX:return o;default:return i}},_ae=(function(){function e(t){var r=eF(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=Wo([r.borderBoxSize]),this.contentBoxSize=Wo([r.contentBoxSize]),this.devicePixelContentBoxSize=Wo([r.devicePixelContentBoxSize])}return e})(),rF=function(e){if(QB(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},Eae=function(){var e=1/0,t=[];Vo.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var d=new _ae(u.target),p=rF(u.target);s.push(d),u.lastReportedSize=tF(u.target,u.observedBox),p<e&&(e=p)}),t.push(function(){a.callback.call(a.observer,s,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var r=0,n=t;r<n.length;r++){var o=n[r];o()}return e},Tj=function(e){Vo.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(o){o.isActive()&&(rF(o.target)>e?r.activeTargets.push(o):r.skippedTargets.push(o))})})},Sae=function(){var e=0;for(Tj(e);vae();)e=Eae(),Tj(e);return gae()&&mae(),e>0},Fw,nF=[],Oae=function(){return nF.splice(0).forEach(function(e){return e()})},Cae=function(e){if(!Fw){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return Oae()}).observe(r,n),Fw=function(){r.textContent="".concat(t?t--:t++)}}nF.push(e),Fw()},Iae=function(e){Cae(function(){requestAnimationFrame(e)})},nu=0,Rae=function(){return!!nu},Nae=250,Pae={attributes:!0,characterData:!0,childList:!0,subtree:!0},Aj=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],kj=function(e){return e===void 0&&(e=0),Date.now()+e},$w=!1,Tae=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var r=this;if(t===void 0&&(t=Nae),!$w){$w=!0;var n=kj(t);Iae(function(){var o=!1;try{o=Sae()}finally{if($w=!1,t=n-kj(),!Rae())return;o?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,Pae)};document.body?r():xs.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Aj.forEach(function(r){return xs.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Aj.forEach(function(r){return xs.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),Hx=new Tae,Mj=function(e){!nu&&e>0&&Hx.start(),nu+=e,!nu&&Hx.stop()},Aae=function(e){return!P1(e)&&!yae(e)&&getComputedStyle(e).display==="inline"},kae=(function(){function e(t,r){this.target=t,this.observedBox=r||ks.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=tF(this.target,this.observedBox,!0);return Aae(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),Mae=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Bc=new WeakMap,Dj=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},Fc=(function(){function e(){}return e.connect=function(t,r){var n=new Mae(t,r);Bc.set(t,n)},e.observe=function(t,r,n){var o=Bc.get(t),i=o.observationTargets.length===0;Dj(o.observationTargets,r)<0&&(i&&Vo.push(o),o.observationTargets.push(new kae(r,n&&n.box)),Mj(1),Hx.schedule())},e.unobserve=function(t,r){var n=Bc.get(t),o=Dj(n.observationTargets,r),i=n.observationTargets.length===1;o>=0&&(i&&Vo.splice(Vo.indexOf(n),1),n.observationTargets.splice(o,1),Mj(-1))},e.disconnect=function(t){var r=this,n=Bc.get(t);n.observationTargets.slice().forEach(function(o){return r.unobserve(t,o.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),Dae=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Fc.connect(this,t)}return e.prototype.observe=function(t,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Rj(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Fc.observe(this,t,r)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Rj(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Fc.unobserve(this,t)},e.prototype.disconnect=function(){Fc.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),Hw,jj;function jae(){if(jj)return Hw;jj=1;var e=!!(typeof window<"u"&&window.document&&window.document.createElement);return Hw=e,Hw}var qae=jae();const oF=wo(qae);var qj={},Vw,Lj;function Lae(){if(Lj)return Vw;Lj=1;var e=Ks(),t=ha(),r=Rd(),n=Md(),o=TypeError,i="Reduce of empty array with no initial value",a=function(s){return function(c,u,d,p){var h=t(c),v=r(h),y=n(h);if(e(u),y===0&&d<2)throw new o(i);var g=s?y-1:0,b=s?-1:1;if(d<2)for(;;){if(g in v){p=v[g],g+=b;break}if(g+=b,s?g<0:y<=g)throw new o(i)}for(;s?g>=0:y>g;g+=b)g in v&&(p=u(p,v[g],g,h));return p}};return Vw={left:a(!1),right:a(!0)},Vw}var Ww,zj;function zae(){if(zj)return Ww;zj=1;var e=vt();return Ww=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})},Ww}var Uw,Bj;function Bae(){if(Bj)return Uw;Bj=1;var e=Pt(),t=_B(),r=Eo(),n=function(o){return t.slice(0,o.length)===o};return Uw=(function(){return n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":e.Bun&&typeof Bun.version=="string"?"BUN":e.Deno&&typeof Deno.version=="object"?"DENO":r(e.process)==="process"?"NODE":e.window&&e.document?"BROWSER":"REST"})(),Uw}var Gw,Fj;function Fae(){if(Fj)return Gw;Fj=1;var e=Bae();return Gw=e==="NODE",Gw}var $j;function $ae(){if($j)return qj;$j=1;var e=So(),t=Lae().left,r=zae(),n=g1(),o=Fae(),i=!o&&n>79&&n<83,a=i||!r("reduce");return e({target:"Array",proto:!0,forced:a},{reduce:function(c){var u=arguments.length;return t(this,c,u,u>1?arguments[1]:void 0)}}),qj}$ae();var Hj={},Kw,Vj;function iF(){if(Vj)return Kw;Vj=1;var e=Ur();return Kw=function(){var t=e(this),r="";return t.hasIndices&&(r+="d"),t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),t.sticky&&(r+="y"),r},Kw}var Yw,Wj;function Hae(){if(Wj)return Yw;Wj=1;var e=vt(),t=Pt(),r=t.RegExp,n=e(function(){var a=r("a","y");return a.lastIndex=2,a.exec("abcd")!==null}),o=n||e(function(){return!r("a","y").sticky}),i=n||e(function(){var a=r("^r","gy");return a.lastIndex=2,a.exec("str")!==null});return Yw={BROKEN_CARET:i,MISSED_STICKY:o,UNSUPPORTED_Y:n},Yw}var Xw,Uj;function Vae(){if(Uj)return Xw;Uj=1;var e=vt(),t=Pt(),r=t.RegExp;return Xw=e(function(){var n=r(".","s");return!(n.dotAll&&n.test(`
118
+ `)&&n.flags==="s")}),Xw}var Zw,Gj;function Wae(){if(Gj)return Zw;Gj=1;var e=vt(),t=Pt(),r=t.RegExp;return Zw=e(function(){var n=r("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"}),Zw}var Jw,Kj;function T1(){if(Kj)return Jw;Kj=1;var e=fr(),t=ft(),r=ii(),n=iF(),o=Hae(),i=w1(),a=jd(),s=va().get,c=Vae(),u=Wae(),d=i("native-string-replace",String.prototype.replace),p=RegExp.prototype.exec,h=p,v=t("".charAt),y=t("".indexOf),g=t("".replace),b=t("".slice),x=(function(){var _=/a/,O=/b*/g;return e(p,_,"a"),e(p,O,"a"),_.lastIndex!==0||O.lastIndex!==0})(),w=o.BROKEN_CARET,E=/()??/.exec("")[1]!==void 0,S=x||E||w||c||u;return S&&(h=function(O){var N=this,R=s(N),A=r(O),D=R.raw,B,j,M,P,V,q,G;if(D)return D.lastIndex=N.lastIndex,B=e(h,D,A),N.lastIndex=D.lastIndex,B;var W=R.groups,Q=w&&N.sticky,z=e(n,N),U=N.source,ie=0,te=A;if(Q&&(z=g(z,"y",""),y(z,"g")===-1&&(z+="g"),te=b(A,N.lastIndex),N.lastIndex>0&&(!N.multiline||N.multiline&&v(A,N.lastIndex-1)!==`
119
+ `)&&(U="(?: "+U+")",te=" "+te,ie++),j=new RegExp("^(?:"+U+")",z)),E&&(j=new RegExp("^"+U+"$(?!\\s)",z)),x&&(M=N.lastIndex),P=e(p,Q?j:N,te),Q?P?(P.input=b(P.input,ie),P[0]=b(P[0],ie),P.index=N.lastIndex,N.lastIndex+=P[0].length):N.lastIndex=0:x&&P&&(N.lastIndex=N.global?P.index+P[0].length:M),E&&P&&P.length>1&&e(d,P[0],j,function(){for(V=1;V<arguments.length-2;V++)arguments[V]===void 0&&(P[V]=void 0)}),P&&W)for(P.groups=q=a(null),V=0;V<W.length;V++)G=W[V],q[G[0]]=P[G[1]];return P}),Jw=h,Jw}var Yj;function aF(){if(Yj)return Hj;Yj=1;var e=So(),t=T1();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),Hj}aF();var Xj={},Qw,Zj;function sF(){if(Zj)return Qw;Zj=1,aF();var e=fr(),t=oi(),r=T1(),n=vt(),o=tr(),i=Xs(),a=o("species"),s=RegExp.prototype;return Qw=function(c,u,d,p){var h=o(c),v=!n(function(){var x={};return x[h]=function(){return 7},""[c](x)!==7}),y=v&&!n(function(){var x=!1,w=/a/;return c==="split"&&(w={},w.constructor={},w.constructor[a]=function(){return w},w.flags="",w[h]=/./[h]),w.exec=function(){return x=!0,null},w[h](""),!x});if(!v||!y||d){var g=/./[h],b=u(h,""[c],function(x,w,E,S,_){var O=w.exec;return O===r||O===s.exec?v&&!_?{done:!0,value:e(g,w,E,S)}:{done:!0,value:e(x,E,w,S)}:{done:!1}});t(String.prototype,c,b[0]),t(s,h,b[1])}p&&i(s[h],"sham",!0)},Qw}var ex,Jj;function lF(){if(Jj)return ex;Jj=1;var e=UB().charAt;return ex=function(t,r,n){return r+(n?e(t,r).length:1)},ex}var tx,Qj;function Uae(){if(Qj)return tx;Qj=1;var e=Pt(),t=vt(),r=e.RegExp,n=!t(function(){var o=!0;try{r(".","d")}catch{o=!1}var i={},a="",s=o?"dgimsy":"gimsy",c=function(h,v){Object.defineProperty(i,h,{get:function(){return a+=v,!0}})},u={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};o&&(u.hasIndices="d");for(var d in u)c(d,u[d]);var p=Object.getOwnPropertyDescriptor(r.prototype,"flags").get.call(i);return p!==s||a!==s});return tx={correct:n},tx}var rx,e2;function cF(){if(e2)return rx;e2=1;var e=fr(),t=Wr(),r=Pd(),n=Uae(),o=iF(),i=RegExp.prototype;return rx=n.correct?function(a){return a.flags}:function(a){return!n.correct&&r(i,a)&&!t(a,"flags")?e(o,a):a.flags},rx}var nx,t2;function uF(){if(t2)return nx;t2=1;var e=fr(),t=Ur(),r=Dt(),n=Eo(),o=T1(),i=TypeError;return nx=function(a,s){var c=a.exec;if(r(c)){var u=e(c,a,s);return u!==null&&t(u),u}if(n(a)==="RegExp")return e(o,a,s);throw new i("RegExp#exec called on incompatible receiver")},nx}var r2;function Gae(){if(r2)return Xj;r2=1;var e=fr(),t=ft(),r=sF(),n=Ur(),o=Vt(),i=O1(),a=ii(),s=ni(),c=Ys(),u=lF(),d=cF(),p=uF(),h=t("".indexOf);return r("match",function(v,y,g){return[function(x){var w=s(this),E=o(x)?c(x,v):void 0;return E?e(E,x,w):new RegExp(x)[v](a(w))},function(b){var x=n(this),w=a(b),E=g(y,x,w);if(E.done)return E.value;var S=a(d(x));if(h(S,"g")===-1)return p(x,w);var _=h(S,"u")!==-1;x.lastIndex=0;for(var O=[],N=0,R;(R=p(x,w))!==null;){var A=a(R[0]);O[N]=A,A===""&&(x.lastIndex=u(w,i(x.lastIndex),_)),N++}return N===0?null:O}]}),Xj}Gae();var n2={},ox,o2;function Kae(){if(o2)return ox;o2=1;var e=AB(),t=Yn();return ox=function(r,n,o){return o.get&&e(o.get,n,{getter:!0}),o.set&&e(o.set,n,{setter:!0}),t.f(r,n,o)},ox}var i2;function Yae(){if(i2)return n2;i2=1;var e=sn(),t=E1().EXISTS,r=ft(),n=Kae(),o=Function.prototype,i=r(o.toString),a=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,s=r(a.exec),c="name";return e&&!t&&n(o,c,{configurable:!0,get:function(){try{return s(a,i(this))[1]}catch{return""}}}),n2}Yae();var a2={},ix,s2;function Xae(){if(s2)return ix;s2=1;var e=Id(),t=Function.prototype,r=t.apply,n=t.call;return ix=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),ix}var ax,l2;function Zae(){if(l2)return ax;l2=1;var e=ft(),t=ha(),r=Math.floor,n=e("".charAt),o=e("".replace),i=e("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;return ax=function(c,u,d,p,h,v){var y=d+c.length,g=p.length,b=s;return h!==void 0&&(h=t(h),b=a),o(v,b,function(x,w){var E;switch(n(w,0)){case"$":return"$";case"&":return c;case"`":return i(u,0,d);case"'":return i(u,y);case"<":E=h[i(w,1,-1)];break;default:var S=+w;if(S===0)return x;if(S>g){var _=r(S/10);return _===0?x:_<=g?p[_-1]===void 0?n(w,1):p[_-1]+n(w,1):x}E=p[S-1]}return E===void 0?"":E})},ax}var c2;function Jae(){if(c2)return a2;c2=1;var e=Xae(),t=fr(),r=ft(),n=sF(),o=vt(),i=Ur(),a=Dt(),s=Vt(),c=kd(),u=O1(),d=ii(),p=ni(),h=lF(),v=Ys(),y=Zae(),g=cF(),b=uF(),x=tr(),w=x("replace"),E=Math.max,S=Math.min,_=r([].concat),O=r([].push),N=r("".indexOf),R=r("".slice),A=function(M){return M===void 0?M:String(M)},D=(function(){return"a".replace(/./,"$0")==="$0"})(),B=(function(){return/./[w]?/./[w]("a","$0")==="":!1})(),j=!o(function(){var M=/./;return M.exec=function(){var P=[];return P.groups={a:"7"},P},"".replace(M,"$<a>")!=="7"});return n("replace",function(M,P,V){var q=B?"$":"$0";return[function(W,Q){var z=p(this),U=s(W)?v(W,w):void 0;return U?t(U,W,z,Q):t(P,d(z),W,Q)},function(G,W){var Q=i(this),z=d(G);if(typeof W=="string"&&N(W,q)===-1&&N(W,"$<")===-1){var U=V(P,Q,z,W);if(U.done)return U.value}var ie=a(W);ie||(W=d(W));var te=d(g(Q)),$=N(te,"g")!==-1,K;$&&(K=N(te,"u")!==-1,Q.lastIndex=0);for(var Z=[],H;H=b(Q,z),!(H===null||(O(Z,H),!$));){var Y=d(H[0]);Y===""&&(Q.lastIndex=h(z,u(Q.lastIndex),K))}for(var oe="",re=0,se=0;se<Z.length;se++){H=Z[se];for(var ee=d(H[0]),we=E(S(c(H.index),z.length),0),ve=[],Ee,pe=1;pe<H.length;pe++)O(ve,A(H[pe]));var ce=H.groups;if(ie){var Ce=_([ee],ve,we,z);ce!==void 0&&O(Ce,ce),Ee=d(e(W,void 0,Ce))}else Ee=y(ee,z,we,ve,ce,W);we>=re&&(oe+=R(z,re,we)+Ee,re=we+ee.length)}return oe+R(z,re)}]},!j||!D||B),a2}Jae();function po(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function ou(e){return!e||!e.ownerDocument?document:e.ownerDocument}var Ai=null,u2=null;oF&&window.addEventListener("resize",function(){u2!==window.devicePixelRatio&&(u2=window.devicePixelRatio,Ai=null)});function d2(e){if(Ai===null){var t=ou(e);if(typeof t>"u")return Ai=0,Ai;var r=t.body,n=t.createElement("div");n.classList.add("simplebar-hide-scrollbar"),r.appendChild(n);var o=n.getBoundingClientRect().right;r.removeChild(n),Ai=o}return Ai}var Du=(function(){function e(r,n){var o=this;this.onScroll=function(){var i=po(o.el);o.scrollXTicking||(i.requestAnimationFrame(o.scrollX),o.scrollXTicking=!0),o.scrollYTicking||(i.requestAnimationFrame(o.scrollY),o.scrollYTicking=!0)},this.scrollX=function(){o.axis.x.isOverflowing&&(o.showScrollbar("x"),o.positionScrollbar("x")),o.scrollXTicking=!1},this.scrollY=function(){o.axis.y.isOverflowing&&(o.showScrollbar("y"),o.positionScrollbar("y")),o.scrollYTicking=!1},this.onMouseEnter=function(){o.showScrollbar("x"),o.showScrollbar("y")},this.onMouseMove=function(i){o.mouseX=i.clientX,o.mouseY=i.clientY,(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&o.onMouseMoveForAxis("x"),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&o.onMouseMoveForAxis("y")},this.onMouseLeave=function(){o.onMouseMove.cancel(),(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&o.onMouseLeaveForAxis("x"),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&o.onMouseLeaveForAxis("y"),o.mouseX=-1,o.mouseY=-1},this.onWindowResize=function(){o.scrollbarWidth=o.getScrollbarWidth(),o.hideNativeScrollbar()},this.hideScrollbars=function(){o.axis.x.track.rect=o.axis.x.track.el.getBoundingClientRect(),o.axis.y.track.rect=o.axis.y.track.el.getBoundingClientRect(),o.isWithinBounds(o.axis.y.track.rect)||(o.axis.y.scrollbar.el.classList.remove(o.classNames.visible),o.axis.y.isVisible=!1),o.isWithinBounds(o.axis.x.track.rect)||(o.axis.x.scrollbar.el.classList.remove(o.classNames.visible),o.axis.x.isVisible=!1)},this.onPointerEvent=function(i){var a,s;o.axis.x.track.rect=o.axis.x.track.el.getBoundingClientRect(),o.axis.y.track.rect=o.axis.y.track.el.getBoundingClientRect(),(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&(a=o.isWithinBounds(o.axis.x.track.rect)),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&(s=o.isWithinBounds(o.axis.y.track.rect)),(a||s)&&(i.preventDefault(),i.stopPropagation(),i.type==="mousedown"&&(a&&(o.axis.x.scrollbar.rect=o.axis.x.scrollbar.el.getBoundingClientRect(),o.isWithinBounds(o.axis.x.scrollbar.rect)?o.onDragStart(i,"x"):o.onTrackClick(i,"x")),s&&(o.axis.y.scrollbar.rect=o.axis.y.scrollbar.el.getBoundingClientRect(),o.isWithinBounds(o.axis.y.scrollbar.rect)?o.onDragStart(i,"y"):o.onTrackClick(i,"y"))))},this.drag=function(i){var a,s=o.axis[o.draggedAxis].track,c=s.rect[o.axis[o.draggedAxis].sizeAttr],u=o.axis[o.draggedAxis].scrollbar,d=o.contentWrapperEl[o.axis[o.draggedAxis].scrollSizeAttr],p=parseInt(o.elStyles[o.axis[o.draggedAxis].sizeAttr],10);i.preventDefault(),i.stopPropagation(),o.draggedAxis==="y"?a=i.pageY:a=i.pageX;var h=a-s.rect[o.axis[o.draggedAxis].offsetAttr]-o.axis[o.draggedAxis].dragOffset,v=h/(c-u.size),y=v*(d-p);o.draggedAxis==="x"&&(y=o.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?y-(c+u.size):y,y=o.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-y:y),o.contentWrapperEl[o.axis[o.draggedAxis].scrollOffsetAttr]=y},this.onEndDrag=function(i){var a=ou(o.el),s=po(o.el);i.preventDefault(),i.stopPropagation(),o.el.classList.remove(o.classNames.dragging),a.removeEventListener("mousemove",o.drag,!0),a.removeEventListener("mouseup",o.onEndDrag,!0),o.removePreventClickId=s.setTimeout(function(){a.removeEventListener("click",o.preventClick,!0),a.removeEventListener("dblclick",o.preventClick,!0),o.removePreventClickId=null})},this.preventClick=function(i){i.preventDefault(),i.stopPropagation()},this.el=r,this.minScrollbarWidth=20,this.options=Object.assign({},e.defaultOptions,n),this.classNames=Object.assign({},e.defaultOptions.classNames,this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,!e.instances.has(this.el)&&(this.recalculate=Ej(this.recalculate.bind(this),64),this.onMouseMove=Ej(this.onMouseMove.bind(this),64),this.hideScrollbars=Oj(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=Oj(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=hae(e.getRtlHelpers),this.init())}e.getRtlHelpers=function(){var n=document.createElement("div");n.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var o=n.firstElementChild;document.body.appendChild(o);var i=o.firstElementChild;o.scrollLeft=0;var a=e.getOffset(o),s=e.getOffset(i);o.scrollLeft=999;var c=e.getOffset(i);return{isRtlScrollingInverted:a.left!==s.left&&s.left-c.left!==0,isRtlScrollbarInverted:a.left!==s.left}},e.getOffset=function(n){var o=n.getBoundingClientRect(),i=ou(n),a=po(n);return{top:o.top+(a.pageYOffset||i.documentElement.scrollTop),left:o.left+(a.pageXOffset||i.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),oF&&(this.initDOM(),this.setAccessibilityAttributes(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.initDOM=function(){var n=this;if(Array.prototype.filter.call(this.el.children,function(a){return a.classList.contains(n.classNames.wrapper)}).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var o=document.createElement("div"),i=document.createElement("div");o.classList.add(this.classNames.track),i.classList.add(this.classNames.scrollbar),o.appendChild(i),this.axis.x.track.el=o.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=o.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},t.setAccessibilityAttributes=function(){var n=this.options.ariaLabel||"scrollable content";this.contentWrapperEl.setAttribute("tabindex","0"),this.contentWrapperEl.setAttribute("role","region"),this.contentWrapperEl.setAttribute("aria-label",n)},t.initListeners=function(){var n=this,o=po(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(function(c){n.el.addEventListener(c,n.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(function(c){n.el.addEventListener(c,n.onPointerEvent,{capture:!0,passive:!0})}),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),o.addEventListener("resize",this.onWindowResize);var i=!1,a=null,s=o.ResizeObserver||Dae;this.resizeObserver=new s(function(){!i||a!==null||(a=o.requestAnimationFrame(function(){n.recalculate(),a=null}))}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),o.requestAnimationFrame(function(){i=!0}),this.mutationObserver=new o.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var n=po(this.el);this.elStyles=n.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var o=this.heightAutoObserverEl.offsetHeight<=1,i=this.heightAutoObserverEl.offsetWidth<=1,a=this.contentEl.offsetWidth,s=this.contentWrapperEl.offsetWidth,c=this.elStyles.overflowX,u=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var d=this.contentEl.scrollHeight,p=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=o?"auto":"100%",this.placeholderEl.style.width=i?a+"px":"auto",this.placeholderEl.style.height=d+"px";var h=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=p>a,this.axis.y.isOverflowing=d>h,this.axis.x.isOverflowing=c==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=u==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var v=this.axis.x.isOverflowing?this.scrollbarWidth:0,y=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&p>s-y,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&d>h-v,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},t.getScrollbarSize=function(n){if(n===void 0&&(n="y"),!this.axis[n].isOverflowing)return 0;var o=this.contentEl[this.axis[n].scrollSizeAttr],i=this.axis[n].track.el[this.axis[n].offsetSizeAttr],a,s=i/o;return a=Math.max(~~(s*i),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(a=Math.min(a,this.options.scrollbarMaxSize)),a},t.positionScrollbar=function(n){if(n===void 0&&(n="y"),!!this.axis[n].isOverflowing){var o=this.contentWrapperEl[this.axis[n].scrollSizeAttr],i=this.axis[n].track.el[this.axis[n].offsetSizeAttr],a=parseInt(this.elStyles[this.axis[n].sizeAttr],10),s=this.axis[n].scrollbar,c=this.contentWrapperEl[this.axis[n].scrollOffsetAttr];c=n==="x"&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-c:c;var u=c/(o-a),d=~~((i-s.size)*u);d=n==="x"&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?d+(i-s.size):d,s.el.style.transform=n==="x"?"translate3d("+d+"px, 0, 0)":"translate3d(0, "+d+"px, 0)"}},t.toggleTrackVisibility=function(n){n===void 0&&(n="y");var o=this.axis[n].track.el,i=this.axis[n].scrollbar.el;this.axis[n].isOverflowing||this.axis[n].forceVisible?(o.style.visibility="visible",this.contentWrapperEl.style[this.axis[n].overflowAttr]="scroll"):(o.style.visibility="hidden",this.contentWrapperEl.style[this.axis[n].overflowAttr]="hidden"),this.axis[n].isOverflowing?i.style.display="block":i.style.display="none"},t.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},t.onMouseMoveForAxis=function(n){n===void 0&&(n="y"),this.axis[n].track.rect=this.axis[n].track.el.getBoundingClientRect(),this.axis[n].scrollbar.rect=this.axis[n].scrollbar.el.getBoundingClientRect();var o=this.isWithinBounds(this.axis[n].scrollbar.rect);o?this.axis[n].scrollbar.el.classList.add(this.classNames.hover):this.axis[n].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[n].track.rect)?(this.showScrollbar(n),this.axis[n].track.el.classList.add(this.classNames.hover)):this.axis[n].track.el.classList.remove(this.classNames.hover)},t.onMouseLeaveForAxis=function(n){n===void 0&&(n="y"),this.axis[n].track.el.classList.remove(this.classNames.hover),this.axis[n].scrollbar.el.classList.remove(this.classNames.hover)},t.showScrollbar=function(n){n===void 0&&(n="y");var o=this.axis[n].scrollbar.el;this.axis[n].isVisible||(o.classList.add(this.classNames.visible),this.axis[n].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(n,o){o===void 0&&(o="y");var i=ou(this.el),a=po(this.el),s=this.axis[o].scrollbar,c=o==="y"?n.pageY:n.pageX;this.axis[o].dragOffset=c-s.rect[this.axis[o].offsetAttr],this.draggedAxis=o,this.el.classList.add(this.classNames.dragging),i.addEventListener("mousemove",this.drag,!0),i.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(i.addEventListener("click",this.preventClick,!0),i.addEventListener("dblclick",this.preventClick,!0)):(a.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(n,o){var i=this;if(o===void 0&&(o="y"),!!this.options.clickOnTrack){var a=po(this.el);this.axis[o].scrollbar.rect=this.axis[o].scrollbar.el.getBoundingClientRect();var s=this.axis[o].scrollbar,c=s.rect[this.axis[o].offsetAttr],u=parseInt(this.elStyles[this.axis[o].sizeAttr],10),d=this.contentWrapperEl[this.axis[o].scrollOffsetAttr],p=o==="y"?this.mouseY-c:this.mouseX-c,h=p<0?-1:1,v=h===-1?d-u:d+u,y=function g(){if(h===-1){if(d>v){var b;d-=i.options.clickOnTrackSpeed,i.contentWrapperEl.scrollTo((b={},b[i.axis[o].offsetAttr]=d,b)),a.requestAnimationFrame(g)}}else if(d<v){var x;d+=i.options.clickOnTrackSpeed,i.contentWrapperEl.scrollTo((x={},x[i.axis[o].offsetAttr]=d,x)),a.requestAnimationFrame(g)}};y()}},t.getContentElement=function(){return this.contentEl},t.getScrollElement=function(){return this.contentWrapperEl},t.getScrollbarWidth=function(){try{return getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:d2(this.el)}catch{return d2(this.el)}},t.removeListeners=function(){var n=this,o=po(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(function(i){n.el.removeEventListener(i,n.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(function(i){n.el.removeEventListener(i,n.onPointerEvent,{capture:!0,passive:!0})}),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),o.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},t.unMount=function(){this.removeListeners(),e.instances.delete(this.el)},t.isWithinBounds=function(n){return this.mouseX>=n.left&&this.mouseX<=n.left+n.width&&this.mouseY>=n.top&&this.mouseY<=n.top+n.height},t.findChild=function(n,o){var i=n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector;return Array.prototype.filter.call(n.children,function(a){return i.call(a,o)})[0]},e})();Du.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3};Du.instances=new WeakMap;function f2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function $c(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?f2(Object(r),!0).forEach(function(n){Qae(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qae(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ju(){return ju=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ju.apply(this,arguments)}function ese(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function tse(e,t){if(e==null)return{};var r=ese(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var rse=["children","scrollableNodeProps","tag"],nse=function(t){var r=Array.prototype.reduce.call(t,function(n,o){var i=o.name.match(/data-simplebar-(.+)/);if(i){var a=i[1].replace(/\W+(.)/g,function(s,c){return c.toUpperCase()});switch(o.value){case"true":n[a]=!0;break;case"false":n[a]=!1;break;case void 0:n[a]=!0;break;default:n[a]=o.value}}return n},{});return r},Ld=T.forwardRef(function(e,t){var r=e.children,n=e.scrollableNodeProps,o=n===void 0?{}:n,i=e.tag,a=i===void 0?"div":i,s=tse(e,rse),c=a,u,d=T.useRef(),p=T.useRef(),h=T.useRef(),v={},y={},g=[];return Object.keys(s).forEach(function(b){Object.prototype.hasOwnProperty.call(Du.defaultOptions,b)?v[b]=s[b]:b.match(/data-simplebar-(.+)/)&&b!=="data-simplebar-direction"?g.push({name:b,value:s[b]}):y[b]=s[b]}),g.length&&console.warn(`simplebar-react: this way of passing options is deprecated. Pass it like normal props instead:
120
120
  'data-simplebar-auto-hide="false"' —> 'autoHide="false"'
121
- `),T.useEffect(function(){return d=o.ref||d,p.current&&(u=new Du(p.current,$c($c($c($c({},nse(g)),v),d&&{scrollableNode:d.current}),h.current&&{contentNode:h.current})),typeof t=="function"?t(u):t&&(t.current=u)),function(){u.unMount(),u=null,typeof t=="function"&&t(null)}},[]),T.createElement(c,ju({ref:p,"data-simplebar":!0},y),T.createElement("div",{className:"simplebar-wrapper"},T.createElement("div",{className:"simplebar-height-auto-observer-wrapper"},T.createElement("div",{className:"simplebar-height-auto-observer"})),T.createElement("div",{className:"simplebar-mask"},T.createElement("div",{className:"simplebar-offset"},typeof r=="function"?r({scrollableNodeRef:d,contentNodeRef:h}):T.createElement("div",ju({},o,{className:"simplebar-content-wrapper".concat(o.className?" ".concat(o.className):"")}),T.createElement("div",{className:"simplebar-content"},r)))),T.createElement("div",{className:"simplebar-placeholder"})),T.createElement("div",{className:"simplebar-track simplebar-horizontal"},T.createElement("div",{className:"simplebar-scrollbar"})),T.createElement("div",{className:"simplebar-track simplebar-vertical"},T.createElement("div",{className:"simplebar-scrollbar"})))});Ld.displayName="SimpleBar";Ld.propTypes={children:fe.oneOfType([fe.node,fe.func]),scrollableNodeProps:fe.object,tag:fe.string};const qu=Q_,Lu=e1,dF=(e,t)=>{if(e===de.EPermissionType.METHOD&&t)switch(t){case de.ESubPermissionType.ENTITY_SEL_METHOD:return C.jsx(xe.FdFunctionSelection,{className:"h-6 w-6"});case de.ESubPermissionType.ENTITY_METHOD:return C.jsx(xe.FdFunctionEntity,{className:"h-6 w-6"});case de.ESubPermissionType.DS_METHOD:return C.jsx(xe.FdFunctionDatastore,{className:"h-6 w-6"});case de.ESubPermissionType.DATACLASS_METHOD:return C.jsx(xe.FdFunctionDataclass,{className:"h-6 w-6"})}switch(e){case de.EPermissionType.DATACLASS:return C.jsx(xe.FdTableHeader,{className:"h-6 w-6"});case de.EPermissionType.SINGLETON:return C.jsx(xe.FdSingleton,{className:"h-6 w-6"});case de.EPermissionType.DATASTORE:return C.jsx(xe.FdModel3,{className:"h-6 w-6"});case de.EPermissionType.ATTRIBUTE:return C.jsx(xe.FdTableColumn,{className:"h-6 w-6"});case de.EPermissionType.METHOD:return C.jsx(xe.FdCode,{className:"h-6 w-6"});case de.EPermissionType.SINGLETON_METHOD:return C.jsx(xe.FdFunctionSingleton,{className:"h-6 w-6"});default:return C.jsx(xe.FdTableHeader,{className:"h-6 w-6"})}},p2=({children:e})=>C.jsx("div",{className:"h-full w-full",children:C.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 py-4 text-grey-200",children:[C.jsx(xe.FdInfoBold,{className:"h-10 w-10"}),C.jsx("div",{className:"text-center text-sm",children:e})]})})}),Pi=({permissions:e,label:t,onToggle:r,onSelect:n,promoted:o,showIncluded:i,privileges:a,exists:s})=>{const c=e.find(u=>u.name===t);return c?C.jsxs("div",{className:"relative mx-auto flex w-fit items-center",children:[C.jsx(Ft,{value:c.checked||c.from.length===0||t==="promote"?c.checked:i&&c.from.length>0?null:!1,onChange:()=>r&&r(c),isInvalid:s===!1}),C.jsxs("div",{className:"absolute left-full translate-x-1/4 top-1/2 -translate-y-1/2 flex cursor-pointer items-center space-x-1",children:[t!=="promote"&&(c.checked&&(c.info||c.from.length>0)||!c.checked&&c.from.length>0)&&C.jsx(C.Fragment,{children:C.jsxs(qu,{openDelay:0,closeDelay:0,children:[C.jsx(Lu,{children:C.jsx(xe.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Qr,{container:Qt(),children:C.jsx(en,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsxs("div",{className:"space-y-1 px-2",children:[c.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:c.from.map(u=>C.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[u].id),children:a[u].privilege}))})]})]}):null,c.info&&C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.FdInfoCircle,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"})," ",c.info]})]})})})]})}),(c.checked||c.from.length>0)&&["execute"].includes(t)&&!!(o!=null&&o.length)&&C.jsxs(qu,{openDelay:0,closeDelay:0,children:[C.jsx(Lu,{children:C.jsx(xe.FdCrown,{className:"h-3 w-3 text-white"})}),C.jsx(Qr,{container:Qt(),children:C.jsx(en,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.FdInfoCircle,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsxs("span",{className:"mr-1",children:["Function is promoted with:"," "]}),o==null?void 0:o.map(u=>C.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[u].id),children:a[u].privilege}))]})]})})})})]})]})]}):null},ose=({privilegeId:e,privileges:t})=>{const r=Ht(),n=r.getCatalogMethods(),o=r.getDataclasses(),i=r.getSingletons(),a=t[e],[s,c]=T.useState([]),[u,d]=T.useState("");T.useEffect(()=>{d("")},[e]);const{isOpen:p,getMenuProps:h,getInputProps:v,getComboboxProps:y,highlightedIndex:g,getItemProps:b,selectedItem:x,openMenu:w}=qi({onInputValueChange(){c([])},items:[],itemToString(_){return _?_.applyTo:""},defaultHighlightedIndex:0,stateReducer:(_,O)=>{const{changes:N,type:R}=O;switch(R){case qi.stateChangeTypes.InputKeyDownArrowDown:return{...N,isOpen:!0,highlightedIndex:_.highlightedIndex<=s.length?_.highlightedIndex+1:0};case qi.stateChangeTypes.InputKeyDownArrowUp:return{...N,isOpen:!0,highlightedIndex:_.highlightedIndex>=0?_.highlightedIndex-1:s.length};case qi.stateChangeTypes.InputKeyDownEnter:const A=s[_.highlightedIndex];if(!A)return N;const D=de.addPermission(e,A,t);return r.actions.updatePrivileges(D),{...N,isOpen:!0,highlightedIndex:0}}return N}});T.useEffect(()=>{const _=a.resources.map(({resource:N,type:R,subType:A})=>({type:R,applyTo:N,subType:A})),O=B_(u.toLowerCase(),n,Object.values(o),Object.values(i));c(O.filter(({applyTo:N,type:R,subType:A})=>!Vs.find(_,{applyTo:N,type:R,subType:A})))},[u,a.resources]);const E=h({},{suppressRefError:!0}),S=T.useRef(null);return T.useEffect(()=>{p&&S.current&&S.current.focus()},[p]),C.jsxs("div",{className:"relative w-56 text-white group",...y(),children:[C.jsx("div",{...y(),children:C.jsx("input",{...v({},{suppressRefError:!0}),ref:S,type:"text",className:"block h-6 w-full rounded bg-grey-300 px-1 py-1.5 pl-2 pr-5 text-xs border-grey-500 focus:outline-none focus:ring-1 focus:ring-white focus:rounded-b-none focus:ring-inset",placeholder:"Create a permission",value:u,onChange:({target:{value:_}})=>d(_),onFocus:()=>{w()}})}),C.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-1",children:C.jsx(xe.FdDown,{className:"h-4 w-4 cursor-pointer",onMouseDown:_=>{_.preventDefault()},onClick:()=>{w()}})}),p&&C.jsx("ul",{...E,tabIndex:0,className:"absolute max-h-80 inset-x-0 top-full overflow-auto rounded-md border border-grey-50 bg-grey-900 p-0 text-grey-50 shadow-md group-focus-within:rounded-t-none group-focus-within:border-t-0",children:s.map((_,O)=>C.jsxs("li",{className:ht(x===_&&"font-bold","flex min-w-fit cursor-pointer items-center space-x-2 px-3 py-2 text-xs shadow-sm",{"bg-primary-hover":g===O,"font-bold":x===_}),...b({item:_,index:O}),onClick:()=>{const N=de.addPermission(e,_,t);r.actions.updatePrivileges(N)},children:[dF(_.type,_.subType),C.jsx("span",{children:_.applyTo})]},`${_.applyTo}-${O}`))})]})};function ise(e){const t=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],r=e.reduce((n,o)=>{const[i]=o.resource.split("."),a=n.find(s=>s.prefix===i.toLowerCase());return a?(a.resources.push(o),n):[...n,{prefix:i.toLowerCase(),type:o.type,resources:[o]}]},[]);return r.sort((n,o)=>n.prefix==="ds"?-1:o.prefix==="ds"||n.prefix>o.prefix?1:-1),r.map(n=>({...n,resources:n.resources.sort((o,i)=>{const a=t.indexOf(o.type),s=t.indexOf(i.type);return a!==s?a-s:o.resource.toLowerCase()>i.resource.toLowerCase()?1:-1})})).reduce((n,o)=>[...n,...o.resources],[])}const ase=({selectedPrivilege:e,onSelect:t,showIncluded:r,privileges:n})=>{const[o,i]=T.useState(null),[a,s]=T.useState(null),{styles:c,attributes:u}=Vu(o,a,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),d=Ht(),[p,h]=T.useState([]),[v,y]=T.useState(""),{id:g}=e,b=T.useMemo(()=>de.getInheritedResources(g,n),[g,n[g].includes,n[g].resources]),x=T.useMemo(()=>de.getPromotions(g,n),[n[g]]);function w(j){h(M=>M.some(P=>j.includes(P))?M.filter(P=>!j.includes(P)):[...M,...j])}const E=async j=>{const{confirmed:M}=await d.actions.openModal({title:"Delete Privilege",type:de.ModalType.CONFIRM,color:de.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"});if(M){const P=de.removePermission(e.id,j,n);d.actions.updatePrivileges(P)}},S=async()=>{const{confirmed:j}=await d.actions.openModal({title:"Reset Permissions",type:de.ModalType.CONFIRM,color:de.ModalColor.DANGER,message:"Are you sure you want to reset permissions for this Privilege?",icon:"FdWarningDanger"});if(j){const M=de.resetResources(e.id,n);d.actions.updatePrivileges(M)}},O=b.filter(j=>p.length===0?!0:p.includes(j.type)).filter(({resource:j})=>v?new RegExp(Vs.escapeRegExp(v),"i").test(j):!0),N=ise(O),R=N.filter(j=>{const M=j.permissions.every(P=>!P.checked)&&j.permissions.some(P=>P.from.length>0);return r||!M}),A=(j,M)=>{const P=de.togglePermission(e.id,j,M,n);d.actions.updatePrivileges(P)},D=T.useMemo(()=>R.some(j=>j.exists===!1),[R]),B=async()=>{const{confirmed:j}=await d.actions.openModal({title:"Delete Privilege",type:de.ModalType.CONFIRM,color:de.ModalColor.DANGER,message:"Are you sure you want to remove these permissions?",views:{tips:[{type:"warning",message:"This action will remove all permissions that don't exist in the catalog for all privileges"}]},icon:"FdWarningDanger"}),M=Object.entries(n).map(([P,V])=>{const q=V.resources.filter(G=>!G.exists);return{[P]:q.map(G=>({applyTo:G.resource,type:G.type}))}}).reduce((P,V)=>({...P,...V}),{});if(j){const P=de.removeMultiplePermissions(M,n);d.actions.updatePrivileges(P)}};return C.jsxs(Ld,{className:"z-20 h-full flex-1 overflow-auto p-[15px] pt-0",style:{maxHeight:"calc(100vh - 5.5rem - 85px - 20px)"},children:[C.jsxs("table",{className:"relative h-full w-full",children:[C.jsx("thead",{className:"sticky top-0 z-20",children:C.jsxs("tr",{className:"border-b border-grey-100",children:[C.jsx("td",{className:"py-2",children:C.jsxs("div",{className:"flex items-center space-x-2",children:[C.jsxs("div",{className:"relative w-56 text-white",children:[C.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center px-1",children:C.jsx(xe.FdSearch,{className:"h-4 w-4 text-gray-400"})}),C.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-2",children:C.jsx(zr.Popover,{className:"flex items-center",children:({open:j})=>C.jsxs(C.Fragment,{children:[C.jsx(zr.Popover.Button,{ref:i,children:C.jsx(xe.FdAdjust,{className:"h-4 w-4"})}),j&&C.jsx(Cd,{children:C.jsxs(zr.Popover.Panel,{ref:s,style:c.popper,...u.popper,className:"z-50 rounded-md border border-grey-50 bg-grey-900 px-4 py-2.5",static:!0,children:[C.jsx("h5",{className:"mb-2 text-sm text-grey-50",children:"Filter"}),C.jsxs("div",{className:"space-y-2 text-s",children:[C.jsx("div",{className:"flex items-center",children:C.jsx(Ft,{value:p.includes("datastore"),onChange:()=>{w(["datastore"])},label:"Datastore",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Ft,{value:p.includes("dataclass"),onChange:()=>{w(["dataclass"])},label:"Dataclass",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Ft,{value:p.includes("singleton"),onChange:()=>{w(["singleton"])},label:"Singleton",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Ft,{value:p.some(M=>["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"].includes(M)),onChange:()=>{w(["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"])},label:"Functions",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Ft,{value:p.includes("attribute"),onChange:()=>{w(["attribute"])},label:"Attribute",size:"sm"})})]})]})})]})})}),C.jsx("input",{type:"text",className:"block h-6 w-full rounded bg-grey-300 px-1 py-1.5 pl-6 text-xs focus:outline-none",placeholder:"Search available permissions",value:v,onChange:j=>{y(j.target.value)}})]}),C.jsx(ose,{privilegeId:g,privileges:n}),C.jsx("div",{children:C.jsxs(qu,{openDelay:0,closeDelay:0,children:[C.jsx(Lu,{children:C.jsx("button",{className:"flex h-6 items-center space-x-1 rounded-md px-2 text-sm text-grey-50 hover:bg-primary-hover",onClick:S,children:C.jsx(xe.FdReload,{})})}),C.jsx(Qr,{container:Qt(),children:C.jsxs(en,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"mb-1 flex max-w-xs items-center gap-x-1 rounded bg-primary-light px-2 py-2 text-s font-semibold text-primary-darker",children:[C.jsx(xe.FdBulb,{className:"m-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"Resetting the privilege will remove all configured ressources"})]})})]})}),C.jsxs(qu,{openDelay:0,closeDelay:0,children:[C.jsx(Lu,{children:C.jsx("button",{className:ht("flex h-6 items-center space-x-1 rounded-md px-2 text-sm text-grey-50 hover:bg-primary-hover disabled:opacity-50 disabled:hover:bg-primary-dark"),onClick:B,disabled:!D,children:C.jsx(xe.FdClean,{className:"h-4 w-4"})})}),C.jsx(Qr,{container:Qt(),children:C.jsxs(en,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"mb-1 flex max-w-xs items-center gap-x-1 rounded bg-primary-light px-2 py-2 text-s font-semibold text-primary-darker",children:[C.jsx(xe.FdBulb,{className:"m-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"Delete all the non existing resources from privileges"})]})})]})]})}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Read"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Create"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Update"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Delete"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Execute"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Promote"})]})}),R.length?C.jsx("tbody",{children:R.map((j,M)=>{const P=j.permissions.some(V=>V.from.length>0);return C.jsxs("tr",{className:ht("group even:bg-grey-600",{"opacity-60":j.exists===!1}),children:[C.jsxs("td",{className:ht("group flex items-center gap-3 py-2 text-xs group-hover:rounded-l group-hover:bg-grey-300",j.exists===!1?"text-negative-400":"text-white",{"border-b-[0.5px] border-grey-300":!1}),children:[dF(j.type,j.subType),j.resource,C.jsx(de.Tooltip,{placement:"top",label:"Remove Permission",isDisabled:P,container:Qt(),children:C.jsx("button",{onClick:()=>{P?de.toastSubject.next({kind:"info",markdown:!0,message:`<div className="flex gap-x-3"><h3 className="font-bold">Info:</h3><p className="font-normal">Inherited permissions can't be removed</p></div>`,customIcon:xe.FdInfoBold}):E({applyTo:j.resource,type:j.type})},className:ht("flex flex-shrink-0 items-center justify-center rounded p-1 opacity-0 group-hover:opacity-100",P?"hover:bg-grey-300 group-hover:opacity-70":"hover:bg-primary-hover"),children:C.jsx(xe.FdPlus,{className:"h-4 w-4 rotate-45 transform text-white"})})})]}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Pi,{permissions:j.permissions,showIncluded:r,label:"read",onToggle:V=>A(j,V),onSelect:t,privileges:n,exists:j.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Pi,{permissions:j.permissions,showIncluded:r,label:"create",onToggle:V=>A(j,V),onSelect:t,privileges:n,exists:j.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Pi,{permissions:j.permissions,showIncluded:r,label:"update",onToggle:V=>A(j,V),onSelect:t,privileges:n,exists:j.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Pi,{permissions:j.permissions,showIncluded:r,label:"drop",onToggle:V=>A(j,V),onSelect:t,privileges:n,exists:j.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Pi,{promoted:x[j.resource],permissions:j.permissions,showIncluded:r,label:"execute",onToggle:V=>A(j,V),onSelect:t,privileges:n,exists:j.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:rounded-r group-hover:bg-grey-300 ",children:C.jsx(Pi,{permissions:j.permissions,showIncluded:r,label:"promote",onToggle:V=>A(j,V),onSelect:t,privileges:n,exists:j.exists})})]},M)})}):null]}),!N.length&&v?C.jsx(p2,{children:"The Permission you're looking for can't be found "}):null,!N.length&&!v?C.jsxs(p2,{children:["This Privilege has no Permissions configured yet ",C.jsx("br",{}),'Add a new permission by using the "Create a permission" input above']}):null]})},sse=({onCreate:e})=>{const t=Ht(),r=t.getPrivileges(),[n,o]=T.useState(null),[i,a]=T.useState(null),[s,c]=T.useState(""),[u,d]=T.useState(null),{styles:p,attributes:h}=Vu(n,i,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});return T.useEffect(()=>{c(""),d(null)},[i]),C.jsx(zr.Popover,{children:({open:v,close:y})=>C.jsxs(C.Fragment,{children:[C.jsx(zr.Popover.Button,{className:"rounded p-1 hover:bg-primary-hover","data-cy":"New-priv-btn",ref:o,children:C.jsx("span",{children:C.jsx(xe.FdPlus,{className:"h-4 w-4 text-white"})})}),v&&C.jsx(Cd,{children:C.jsxs(zr.Popover.Panel,{ref:a,style:p.popper,...h.popper,"data-cy":"New-priv-pop-up",className:"z-50 min-w-[256px] rounded border border-grey-50 bg-grey-900 px-4 py-2 text-xs text-grey-50 shadow-md",static:!0,children:[C.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Privilege"}),C.jsxs("div",{className:"mt-2",children:[C.jsxs("label",{className:"flex items-center space-x-4",children:[C.jsx("span",{className:"text-grey-100",children:"Name"}),C.jsx("input",{autoFocus:!0,value:s,onChange:g=>c(g.target.value),onKeyDown:g=>{if(g.key==="Enter"){d(null);try{const b=de.createPrivilege(s,r);t.actions.updatePrivileges(b);const x=Object.values(b).find(w=>w.privilege===s);x&&(e(x),y())}catch(b){d(b.message)}}},type:"text",className:ht("w-full rounded border bg-grey-300 p-1 focus:outline-none",{"border-grey-100":!u,"border-red-400":u})})]}),u&&C.jsx("p",{className:"mt-1 text-xs text-red-400",children:u})]}),C.jsxs("div",{className:"mt-4 flex items-center justify-center space-x-2",children:[C.jsx("button",{className:"rounded border border-primary-dark bg-primary-dark px-4 py-1 hover:border-primary-hover hover:bg-primary-hover",onClick:()=>{d(null);try{const g=de.createPrivilege(s,r);t.actions.updatePrivileges(g);const b=Object.values(g).find(x=>x.privilege===s);b&&e(b),y()}catch(g){d(g.message)}},children:"Create"}),C.jsx("button",{className:"rounded border border-grey-100 px-4 py-1 text-grey-100 hover:bg-white hover:text-primary-dark",onClick:()=>y(),children:"Cancel"})]})]})})]})})},lse=()=>{const e=Ht(),t=e.getCatalog(),r=e.getPrivileges(),n=T.useMemo(()=>{if(t===null)return r;const u=H5(r,Object.values((t==null?void 0:t.dataClasses)??{}));return V5(u,t)},[r,t]),[o,i]=T.useState(null),a=T.useMemo(()=>Object.keys(n),[n]);T.useEffect(()=>{o&&n[o.id]||!a.length||i(n[a[0]])},[n]),T.useEffect(()=>{a.length<2&&c(!0)},[a.length]);const[s,c]=T.useState(!0);return C.jsxs("div",{className:"flex flex-1 h-full",children:[C.jsxs(mo,{depth:1,className:"flex h-full w-[356px] flex-col",children:[C.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between px-3.5 py-[10px]",children:[C.jsxs("div",{className:"flex items-center space-x-1 text-[#DDE1E6]",children:[C.jsx("span",{children:C.jsx(xe.FdGroup,{className:"h-[14px] w-[14px]"})}),C.jsx("span",{className:"text-[11px] font-semibold",children:"Privileges"})]}),C.jsx(sse,{onCreate:u=>{i(u)}})]}),C.jsx(Noe,{privileges:n,selectedPrivilege:o,selectPrivilege:u=>{i(u)}})]}),o&&n[o.id]?C.jsxs(mo,{depth:1,className:"privileges-container relative flex flex-1 flex-col overflow-x-auto border-l-[0.5px]",children:[C.jsxs("div",{className:"mb-1 flex h-full w-full flex-col items-stretch",children:[o.privilege!=="guest"?C.jsx(Cre,{privileges:n,selectedPrivilege:o,onSelect:u=>i(r[u]),setShowIncluded:c,showIncluded:s}):null,C.jsx(ase,{privileges:n,selectedPrivilege:o,onSelect:u=>i(r[u]),showIncluded:s})]}),C.jsx(cse,{privileges:n,selectedPrivilege:o,setSelectedPrivilege:i})]}):C.jsx(Rq,{tab:"Privilege"})]})},cse=({privileges:e,selectedPrivilege:t,setSelectedPrivilege:r})=>{const[n,o]=T.useState(!1);return C.jsx(de.Panel,{path:de.ROLES_TAB_PATH,isOpen:n,onOpen:()=>o(!0),onClose:()=>o(!1),children:C.jsx("div",{className:"h-full w-full px-3 pb-3",children:C.jsx(mo,{depth:2,className:"h-full w-full rounded",children:C.jsx(Lte,{dict:e,data:de.getGraphData(t.id,e),onSelect:i=>r(e[i])})})})})},use=({role:e})=>{var _;const t=Ht(),[r,n]=T.useState(e),[o,i]=T.useState(e.role),[a,s]=T.useState(null),c=t.getPrivileges(),u=((_=r.privileges)==null?void 0:_.filter(O=>c[O]&&c[O].privilege!=="guest").length)||0,d=t.getRoles(),{selectedRole:p,selectRole:h}=n_(),[v,y]=T.useState(!1),g=de.useOutsideClick(()=>{v&&x()});de.useDidMountEffect(()=>{o!==e.role&&i(e.role)},[e.role]),T.useEffect(()=>{e.role||y(!0)},[]),T.useEffect(()=>{n(e)},[e]);const b=()=>{s(null),y(!0)},x=()=>{s(null),e.role&&e.role===o&&y(!1);try{const O=de.saveRole({...r,role:o},d);t.actions.updateRoles(O),y(!1)}catch(O){s(O.message)}},w=async O=>{O.stopPropagation();const{confirmed:N}=await t.actions.openModal({title:"Delete Role",type:de.ModalType.CONFIRM,color:de.ModalColor.DANGER,message:"Are you sure you want to remove this Role?",icon:"FdWarningDanger"});N&&E()},E=()=>{const O=de.removeRole(r.id,d),N=Object.keys(O),R=N.length>=1,A=N[N.length-1];h(A&&R?A:null),t.actions.updateRoles(O)},S=(O=null)=>{if(O&&O.stopPropagation(),!e.role){E();return}y(!1),i(e.role)};return C.jsx(C.Fragment,{children:C.jsxs("div",{className:ht("rounded border bg-grey-300 p-2",{"border-grey-100":p!==r.id,"border-primary-dark":p===r.id}),role:"button","data-cy":"privilegeCard",onClick:()=>{h(r.id)},ref:g,children:[C.jsx("div",{className:"flex items-center justify-between",children:C.jsxs("div",{className:"flex flex-1 items-center text-white",children:[C.jsx("span",{className:"mr-4",children:C.jsx(xe.FdGroup,{className:"h-6 w-6"})}),v?C.jsxs("div",{className:"relative h-6 flex-1 mr-2",children:[C.jsx("input",{type:"text",value:o,onChange:({target:{value:O}})=>{i(O)},onKeyDown:O=>{O.key==="Enter"&&x(),O.key==="Escape"&&S()},className:ht("absolute inset-0 h-6 min-w-0 rounded border border-grey-200 bg-grey-300 p-1 text-xs focus:outline-none",{"border-b border-red-400 rounded-b-none":a,"focus:border-primary-dark":!a}),placeholder:"role",autoComplete:"off",autoFocus:!0}),a&&C.jsx("p",{className:"absolute top-5 mt-1 w-full rounded rounded-t-none bg-red-400 p-1 text-xs text-white shadow-md",children:a})]}):C.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",title:o,children:r.role}),C.jsx("div",{className:ht("justify-betwee ml-auto flex w-fit items-center gap-x-2"),children:v?C.jsxs(C.Fragment,{children:[C.jsx("button",{onClick:x,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(xe.FdSave,{className:"h-4 w-4 text-grey-50"})}),C.jsx("button",{onClick:S,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(xe.FdClose,{className:"h-4 w-4 text-grey-50"})})]}):C.jsxs(C.Fragment,{children:[C.jsx("button",{onClick:b,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(xe.FdPen,{className:"h-4 w-4 text-grey-50"})}),C.jsx("button",{onClick:O=>w(O),className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(xe.FdTrash,{className:"h-4 w-4 text-grey-50"})})]})})]})}),C.jsxs("span",{className:ht("ml-[43px] py-1 text-xs text-white"),children:[u," Privilege",u>1?"s":""]})]})})},fF=(e,t)=>e?t[e]:null,h2=(e,t,r)=>{const n=fF(e,r);return n?Object.values(r).reduce((o,i)=>i.id===e?n.privileges.includes(t)?{...o,[n.id]:{...n,privileges:n.privileges.filter(a=>a!==t)}}:{...o,[n.id]:{...n,privileges:[...n.privileges,t]}}:{...o,[i.id]:i},{}):r},dse=()=>{const e=Ht(),t=e.getPrivileges(),r=e.getRoles(),{selectedRole:n}=n_(),o=fF(n,r),i=(a,s)=>s&&s.privileges.includes(a.id);return C.jsxs("div",{className:"w-full border-b border-grey-900 p-4 ",children:[C.jsx("div",{className:"mb-4 flex items-center gap-x-5 text-white",children:C.jsx("h4",{className:"text-[13px] font-semibold ",children:"Privileges"})}),C.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[C.jsx("div",{"data-cy":"item=>Permisions",className:ht("inline-flex items-center gap-1 space-x-1 rounded bg-primary-darker px-2 py-0.5 text-xs font-semibold italic text-white"),children:"guest"}),Object.values(t).filter(a=>i(a,o)&&a.privilege!=="guest").map((a,s)=>C.jsxs("div",{"data-cy":"item=>Permisions",className:ht("inline-flex cursor-pointer items-center gap-1 space-x-1 rounded px-2 py-0.5",{"bg-primary-dark text-white":i(a,o),"bg-grey-300 text-grey-100":!i(a,o)}),onClick:()=>{const c=h2(o.id,a.id,r);e.actions.updateRoles(c)},children:[C.jsx("span",{className:"text-xs",children:a.privilege}),C.jsx("button",{className:"focus:outline-none",children:i(a,o)?C.jsx(xe.FdMinus,{className:"h-[14px] w-[14px]"}):C.jsx(xe.FdPlus,{className:"h-[14px] w-[14px]"})})]},s)),Object.values(t).filter(a=>!i(a,o)&&a.privilege!=="guest").map((a,s)=>C.jsxs("div",{"data-cy":"item=>Permisions",className:ht("inline-flex cursor-pointer items-center gap-1 space-x-1 rounded px-2 py-0.5",{"bg-primary-dark text-white":i(a,o),"bg-grey-300 text-grey-100":!i(a,o)}),onClick:()=>{const c=h2(o.id,a.id,r);e.actions.updateRoles(c)},children:[C.jsx("span",{className:"text-xs",children:a.privilege}),C.jsx("button",{className:"text-white focus:outline-none",children:i(a,o)?C.jsx(xe.FdMinus,{className:"h-[14px] w-[14px]"}):C.jsx(xe.FdPlus,{className:"h-[14px] w-[14px]"})})]},s))]})]})},fse=({children:e})=>C.jsx("div",{className:"h-full w-full",children:C.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 py-4 text-grey-200",children:[C.jsx(xe.FdInfoBold,{className:"absolute -right-full h-10 w-10 translate-x-1"}),C.jsx("div",{className:"text-center text-sm",children:e})]})})}),Vx=(e,t,r,n=!1)=>{const o=e.applyTo,i=e.type===de.EPermissionType.DATACLASS?"ds":o.split(".")[0],a={...t,...r},s=()=>({value:!n,inherited:!1,from:[],explicitly:!1}),c={read:s(),create:s(),update:s(),drop:s(),execute:s(),promote:s()},u=p=>{p.forEach(h=>{a[h]&&(a[h].resources.forEach(v=>{if(v.resource===o||v.resource===i){const y=Vx(e,t,{[h]:a[h]},n);Object.values(v.permissions).forEach(g=>{c[g.name].explicitly||(!c[g.name].from.includes(a[h].privilege)&&g.checked&&c[g.name].from.push(a[h].privilege),c[g.name].inherited=c[g.name].inherited||y[g.name].value||y[g.name].inherited)})}}),a[h].includes.length>0&&u(a[h].includes))})};if(Object.values(r).forEach(p=>{p.resources.forEach(h=>{h.resource===o&&Object.values(h.permissions).forEach(v=>{v.checked&&(c[v.name].explicitly=!0,n&&(c[v.name].value=!0))})}),(p.includes.length>0||p.privilege==="guest")&&u(p.includes)}),Object.values(t).forEach(p=>{p.resources.forEach(h=>{h.resource===o&&(p.privilege==="guest"?Object.values(h.permissions).forEach(v=>{v.checked&&(c[v.name].explicitly=!0,n&&(c[v.name].value=!0))}):Object.values(h.permissions).forEach(v=>{!c[v.name].explicitly&&v.checked&&(n?c[v.name].value=!0:c[v.name].value=!1)}))})}),(n?Object.entries(c).some(([p,h])=>p!=="promote"&&!h.value&&!h.explicitly):Object.entries(c).some(([p,h])=>p!=="promote"&&h.value&&!h.explicitly))&&![de.EPermissionType.DATASTORE,de.EPermissionType.SINGLETON].includes(e.type)){const p={applyTo:i,type:e.type===de.EPermissionType.DATACLASS?de.EPermissionType.DATASTORE:e.type===de.EPermissionType.SINGLETON_METHOD?de.EPermissionType.SINGLETON:de.EPermissionType.DATACLASS},h=Vx(p,t,r,n),v=y=>{let g=c[y].value;return n?!c[y].value&&!c[y].explicitly&&(g=h[y].value):c[y].value&&!c[y].explicitly&&(g=h[y].value),{value:g,inherited:c[y].inherited||h[y].inherited,from:c[y].from.length>0?c[y].from:h[y].from,explicitly:c[y].explicitly}};return{read:v("read"),create:v("create"),update:v("update"),drop:v("drop"),execute:v("execute"),promote:v("promote")}}return{read:c.read,create:c.create,update:c.update,drop:c.drop,execute:c.execute,promote:c.promote}},pse=e=>{switch(e){case"dataclass":return C.jsx(xe.FdTableHeader,{className:"h-6 w-6"});case"singleton":return C.jsx(xe.FdSingleton,{className:"h-6 w-6"});case"datastore":return C.jsx(xe.FdModel3,{className:"h-6 w-6"});case"attribute":return C.jsx(xe.FdTableColumn,{className:"h-6 w-6"});case"method":return C.jsx(xe.FdCode,{className:"h-6 w-6"});case"singletonMethod":return C.jsx(xe.FdFunctionSingleton,{className:"h-6 w-6"});case"entityselMethod":return C.jsx(xe.FdFunctionSelection,{className:"h-6 w-6"});case"entityMethod":return C.jsx(xe.FdFunctionEntity,{className:"h-6 w-6"});case"dsMethod":return C.jsx(xe.FdFunctionDatastore,{className:"h-6 w-6"});case"dataclassMethod":return C.jsx(xe.FdFunctionDataclass,{className:"h-6 w-6"});default:return C.jsx(xe.FdTableHeader,{className:"h-6 w-6"})}},is=Q_,as=e1,Wi=({privileges:e,permission:t,hasChild:r,depth:n,isChild:o=!1,className:i,inSearch:a,toggleCollapse:s,collapsed:c,isRestrictedByDefault:u,toastMessageCallback:d})=>{const[p,h]=t.applyTo.split("."),v=T.useMemo(()=>Vx(t,e.otherPrivs,e.rolePrivs,u),[e,t,u]);return C.jsxs("tr",{className:ht("group even:bg-grey-600",i),children:[C.jsxs("td",{className:ht("flex h-full w-full items-center gap-3 p-0 text-xs group-hover:rounded-l group-hover:bg-grey-300",{"px-1":a}),children:[Array(n).fill("").map((y,g)=>C.jsx("div",{className:ht("ml-1.5 mr-1 h-full w-0.5 border-l-2 border-grey-100",{"mr-0.5":o})},g)),r&&C.jsx("button",{onClick:s,className:"w-3",children:c?C.jsx(xe.FdRight,{className:"inline h-4 w-4"}):C.jsx(xe.FdDown,{className:"inline h-4 w-4"})}),pse(t.type),a?t.applyTo:h||p]}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:[de.EPermissionType.ATTRIBUTE,de.EPermissionType.DATASTORE,de.EPermissionType.DATACLASS].includes(t.type)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx(Ft,{value:v.read.value||v.read.inherited,onClick:d,isDisabled:!0}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.read.value&&v.read.inherited?C.jsxs(is,{openDelay:0,closeDelay:0,children:[C.jsx(as,{children:C.jsx(xe.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Qr,{container:Qt(),children:C.jsx(en,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.read.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.read.from.map((y,g)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},g))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:[de.EPermissionType.ATTRIBUTE,de.EPermissionType.DATASTORE,de.EPermissionType.DATACLASS].includes(t.type)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx(Ft,{value:v.create.value||v.create.inherited,onClick:d,isDisabled:!0}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.create.value&&v.create.inherited?C.jsxs(is,{openDelay:0,closeDelay:0,children:[C.jsx(as,{children:C.jsx(xe.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Qr,{container:Qt(),children:C.jsx(en,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.create.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.create.from.map((y,g)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},g))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:[de.EPermissionType.ATTRIBUTE,de.EPermissionType.DATASTORE,de.EPermissionType.DATACLASS].includes(t.type)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx(Ft,{value:v.update.value||v.update.inherited,onClick:d,isDisabled:!0}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.update.value&&v.update.inherited?C.jsxs(is,{openDelay:0,closeDelay:0,children:[C.jsx(as,{children:C.jsx(xe.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Qr,{container:Qt(),children:C.jsx(en,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.update.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.update.from.map((y,g)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},g))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:[de.EPermissionType.ATTRIBUTE,de.EPermissionType.DATASTORE,de.EPermissionType.DATACLASS].includes(t.type)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx(Ft,{value:v.drop.value||v.drop.inherited,onClick:d,isDisabled:!0}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.drop.value&&v.drop.inherited?C.jsxs(is,{openDelay:0,closeDelay:0,children:[C.jsx(as,{children:C.jsx(xe.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Qr,{container:Qt(),children:C.jsx(en,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.drop.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.drop.from.map((y,g)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},g))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center group-hover:rounded-r group-hover:bg-grey-300",children:t.type!=="attribute"&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx(Ft,{value:v.execute.value||v.execute.inherited,onClick:d,isDisabled:!0}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.execute.value&&v.execute.inherited?C.jsxs(is,{openDelay:0,closeDelay:0,children:[C.jsx(as,{children:C.jsx(xe.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Qr,{container:Qt(),children:C.jsx(en,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.execute.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.execute.from.map((y,g)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},g))})]})]}):null})})})]}):""})]})})]})},v2=({depth:e,permission:t,privileges:r,childCollapsed:n,didChildCollapsed:o,toastMessageCallback:i})=>{const[a,s]=T.useState(n),c=Ht(),u=c.getRestrictedByDefault(),d=c.getPrivileges();return T.useEffect(()=>{n===!0&&s(!0)},[n]),C.jsxs(C.Fragment,{children:[C.jsx(Wi,{privileges:r,permission:t,isChild:!0,depth:e,hasChild:!0,toggleCollapse:()=>{const p=!a;s(p),o==null||o(p)},isRestrictedByDefault:u,allPrivileges:d,collapsed:a,toastMessageCallback:i}),!a&&C.jsxs(C.Fragment,{children:[t.attributes.map((p,h)=>C.jsx(Wi,{privileges:r,permission:p,depth:e+1,isRestrictedByDefault:u,allPrivileges:d,toastMessageCallback:i},`${p.type}-${h}`)),t.methods.map((p,h)=>C.jsx(Wi,{privileges:r,permission:p,depth:e+1,isRestrictedByDefault:u,allPrivileges:d,toastMessageCallback:i},`${p.type}-${h}`))]})]})},hse=({selectedRole:e})=>{const[t,r]=T.useState(null),[n,o]=T.useState(null),{styles:i,attributes:a}=Vu(t,n,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),s=Ht(),c=s.getRestrictedByDefault(),u=s.getPrivileges(),[d,p]=T.useState([]),[h,v]=T.useState(""),y=s.getCatalogMethods(),g=s.getDataclasses(),b=s.getSingletons(),[x,w]=T.useState({}),[E,S]=T.useState([]);T.useEffect(()=>{const q=Bte(y,Object.values(g),Object.values(b));w(q)},[e]);function _(q){const G=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"];return q.sort((W,Q)=>{const z=G.indexOf(W.type),U=G.indexOf(Q.type);return z!==U?z-U:W.applyTo.toLowerCase()>Q.applyTo.toLowerCase()?1:-1})}T.useEffect(()=>{S(_(B_(h,y,Object.values(g),Object.values(b)).filter(q=>d.length?d.includes(q.type):!0)))},[d,h]);const[O,N]=T.useState(!1),R=q=>{p(G=>G.some(W=>q.includes(W))?G.filter(W=>!q.includes(W)):[...G,...q])},A=s.getRoles(),D={toggleAllCollapsed:q=>{q.allCollapsed=!q.allCollapsed},toggleChildCollapsed:q=>{q.childCollapsed=!q.childCollapsed},setAllCollapsed:(q,G)=>{q.allCollapsed=G},setChildCollapsed:(q,G)=>{q.childCollapsed=G}},B=T.useMemo(()=>{const q=Object.values(u).find(U=>U.privilege==="guest"),G=A[e],W=G?Object.fromEntries(G.privileges.map(U=>[U,u[U]]).filter(([,U])=>!!U)):{};if(c)return{rolePrivs:W,otherPrivs:q?{[q.id]:q}:{}};const Q=q?{[q.id]:{...q,active:!0}}:{},z=Object.fromEntries(Object.entries(u).filter(([U])=>U!==(q==null?void 0:q.id)&&!(G!=null&&G.privileges.includes(U))).map(([U,ie])=>[U,{...ie,active:!1}]));return{rolePrivs:W,otherPrivs:{...Q,...z}}},[u,A,e,c]),{state:{allCollapsed:j,childCollapsed:M},dispatch:P}=de.useEnhancedState({allCollapsed:!1,childCollapsed:!1},D,"Table Collapse Store"),V=()=>{de.toastSubject.next({kind:"info",markdown:!0,message:'<div className="flex gap-x-1 items-center"><h3 className="font-bold mr-1">Info:</h3><p className="font-normal">You can add or modify permissions only in the Privilege section.</p></div>',customIcon:xe.FdInfoCircle})};return C.jsxs(Ld,{className:"z-20 h-full flex-1 overflow-auto p-[15px] pt-0",style:{maxHeight:"calc(100vh - 5.5rem - 85px - 20px)"},children:[C.jsxs("table",{className:"relative h-full w-full",children:[C.jsx("thead",{className:"sticky top-0 z-20",children:C.jsxs("tr",{className:"border-b border-grey-100",children:[C.jsx("td",{className:"py-2",children:C.jsxs("div",{className:"flex items-center space-x-2",children:[C.jsx(de.Tooltip,{label:"Collapse All",placement:"top",container:Qt(),children:C.jsx("button",{onClick:()=>{M?(P.setAllCollapsed(!0),N(!0)):P.setChildCollapsed(!0)},className:ht("cursor-pointer rounded-md p-1 hover:bg-primary-hover focus:outline-none",{"pointer-events-none text-grey-200":j,"text-white":!j}),children:C.jsx(xe.FdCollapseAll,{className:"h-4 w-4"})})}),C.jsxs("div",{className:"relative w-56 text-white",children:[C.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center px-1",children:C.jsx(xe.FdSearch,{className:"h-4 w-4 text-gray-400"})}),C.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-2",children:C.jsx(zr.Popover,{className:"flex items-center",children:({open:q})=>C.jsxs(C.Fragment,{children:[C.jsx(zr.Popover.Button,{ref:r,children:C.jsx(xe.FdAdjust,{className:"h-4 w-4"})}),q&&C.jsx(Cd,{children:C.jsxs(zr.Popover.Panel,{ref:o,style:i.popper,...a.popper,className:"z-50 rounded-md border border-grey-50 bg-grey-900 px-4 py-2.5 text-xs text-grey-50",static:!0,children:[C.jsx("h5",{className:"mb-2 text-sm",children:"Filter"}),C.jsxs("div",{className:"space-y-2 text-s",children:[C.jsx("div",{className:"flex items-center",children:C.jsx(Ft,{value:d.includes("datastore"),onChange:()=>{R(["datastore"])},label:"Datastore",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Ft,{value:d.includes("dataclass"),onChange:()=>{R(["dataclass"])},label:"Dataclass",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Ft,{value:d.includes("singleton"),onChange:()=>{R(["singleton"])},label:"Singleton",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Ft,{value:d.some(G=>["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"].includes(G)),onChange:()=>{R(["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"])},label:"Functions",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Ft,{value:d.includes("attribute"),onChange:()=>{R(["attribute"])},label:"Attribute",size:"sm"})})]})]})})]})})}),C.jsx("input",{type:"text",className:"block h-6 w-full rounded bg-grey-300 px-1 py-1.5 pl-6 text-xs focus:outline-none",placeholder:"Search",value:h,onChange:q=>{v(q.target.value)}})]})]})}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"read"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Create"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Update"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Delete"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Execute"})]})}),C.jsx("tbody",{className:"relative",children:d.length||h?E.map((q,G)=>C.jsx(Wi,{privileges:B,permission:q,depth:0,inSearch:!0,isRestrictedByDefault:c,allPrivileges:u,toastMessageCallback:V},`${q.type}-${G}`)):Object.values(x).map((q,G)=>C.jsxs(T.Fragment,{children:[C.jsx(Wi,{privileges:B,permission:q,isRestrictedByDefault:c,allPrivileges:u,hasChild:!0,depth:0,toggleCollapse:()=>{const W=!O;N(W),P.setAllCollapsed(!W&&j?!1:j)},collapsed:O,toastMessageCallback:V}),q.type==="datastore"&&!O?C.jsxs(C.Fragment,{children:[q.methods.map((W,Q)=>C.jsx(Wi,{privileges:B,isRestrictedByDefault:c,allPrivileges:u,permission:W,depth:1,collapsed:j||!1,toastMessageCallback:V},`${W.type}-${Q}`)),q.dataClasses.map((W,Q)=>C.jsx(v2,{depth:1,privileges:B,permission:W,childCollapsed:M,didChildCollapsed:z=>{P.setChildCollapsed(z?M:!1)},toastMessageCallback:V},`${W.type}-${Q}`))]}):null,q.singletons.map((W,Q)=>C.jsx(v2,{depth:0,privileges:B,permission:W,childCollapsed:j,didChildCollapsed:z=>{P.setAllCollapsed(z?j:!1)},toastMessageCallback:V},`${W.type}-${Q}`))]},`${q.type}-${G}`))})]}),(h||d.length)&&!E.length?C.jsx(fse,{children:"The Permission you're looking for can't be found "}):null]})},vse=()=>{const e=Ht(),t=e.getRoles(),[r,n]=T.useState(null),[o,i]=T.useState(null),[a,s]=T.useState(""),[c,u]=T.useState(null),{styles:d,attributes:p}=Vu(r,o,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});T.useEffect(()=>{s(""),u(null)},[o]);const h=()=>{if(!a)throw new Error("Please enter a valid name");if(Object.values(t).find(b=>b.role===a))throw new Error(`A role with the name ${a} already exists`);const y=ez.generate(),g=de.createRole(y,a,t);e.actions.updateRoles(g)};return C.jsx(zr.Popover,{children:({open:v,close:y})=>{const g=()=>{u(null);try{de.validateName(a),h(),y()}catch(b){u(b.message)}};return C.jsxs(C.Fragment,{children:[C.jsx(zr.Popover.Button,{className:"rounded p-1 hover:bg-primary-hover","data-cy":"New-priv-btn",ref:n,children:C.jsx("span",{children:C.jsx(xe.FdPlus,{className:"h-4 w-4 text-white"})})}),v&&C.jsx(Cd,{children:C.jsxs(zr.Popover.Panel,{ref:i,style:d.popper,...p.popper,"data-cy":"New-priv-pop-up",className:"z-50 min-w-[256px] rounded border border-grey-50 bg-grey-900 px-4 py-2 text-xs text-grey-50 shadow-md",static:!0,children:[C.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Role"}),C.jsxs("div",{className:"mt-2",children:[C.jsxs("label",{className:"flex items-center space-x-4",children:[C.jsx("span",{className:"text-grey-100",children:"Name"}),C.jsx("input",{autoFocus:!0,value:a,onChange:b=>s(b.target.value),onKeyDown:b=>{b.key==="Enter"&&g()},type:"text",className:ht("w-full rounded border bg-grey-300 p-1 focus:outline-none",{"border-grey-100":!c,"border-red-400":c})})]}),c&&C.jsx("p",{className:"mt-1 text-xs text-red-400",children:c})]}),C.jsxs("div",{className:"mt-4 flex items-center justify-center space-x-2",children:[C.jsx("button",{className:"rounded border border-primary-dark bg-primary-dark px-4 py-1 hover:border-primary-hover hover:bg-primary-hover",onClick:()=>{g()},children:"Create"}),C.jsx("button",{className:"rounded border border-grey-100 px-4 py-1 text-grey-100 hover:bg-white hover:text-primary-dark",onClick:()=>y(),children:"Cancel"})]})]})})]})}})},gse=()=>{const t=Ht().getRoles(),{selectedRole:r}=n_();return C.jsxs("div",{className:"flex flex-1 h-full",children:[C.jsxs(mo,{depth:1,className:"flex h-full w-[356px] flex-col",children:[C.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between px-3.5 py-[10px]",children:[C.jsxs("div",{className:"flex items-center space-x-1 text-[#DDE1E6]",children:[C.jsx("span",{children:C.jsx(xe.FdGroup,{className:"h-[14px] w-[14px]"})}),C.jsx("span",{className:"text-[11px] font-semibold",children:"Roles"})]}),C.jsx(vse,{})]}),C.jsx("div",{className:"flex-1 space-y-4 overflow-auto p-4 pb-10 pt-1",children:Object.values(t).map((n,o)=>C.jsx(use,{role:n},o))})]}),C.jsx(mo,{depth:1,className:ht("relative flex h-full w-full flex-1 flex-col items-stretch overflow-x-auto",{"border-l-[0.5px]":r}),children:C.jsx("div",{className:"flex h-full w-full select-none flex-col",children:r?C.jsxs(C.Fragment,{children:[C.jsx(dse,{}),C.jsx(hse,{selectedRole:r})]}):C.jsx(Rq,{tab:"Role"})})})]})};function pF(){const e=Ht(),t=e.getRolesFlags();T.useEffect(()=>{e.actions.setTabFlags(de.ROLES_TAB_PATH,t)},[t,e])}const hF=()=>{const e=Ht(),t=e.getQodly(),r=e.getSelectedTab(),n=e.getForceLogin(),o=e.getRestrictedByDefault(),i=T.useRef();return pF(),C.jsx("div",{className:"absolute inset-0 flex flex-1 overflow-hidden",children:C.jsx("div",{className:"relative flex flex-1 overflow-x-auto bg-grey-900","data-cy":"Roles&Privileges-editor-cy",ref:a=>i.current=a,children:C.jsxs("div",{className:"flex w-full flex-col",children:[C.jsx(xG,{activeTab:r,forceLogin:n,restrictedByDefault:o,onTabChange:a=>{e.actions.toggleTab(a)},onForceLoginChange:a=>{e.actions.toggleForceLogin(a)},onRestrictedByDefaultChange:a=>{e.actions.toggleRestrictedByDefault(a)},qodly:t}),r==="roles"?C.jsx(_G,{children:C.jsx(gse,{})}):C.jsx(lse,{})]})})})},mse=()=>{const{modals:e,closeModal:t,editModal:r}=Ore();return C.jsx(C.Fragment,{children:e.map((n,o)=>C.jsx(de.Modal,{hasOverlay:o===0,...n,onClose:t,onEdit:r,container:Qt()},n.id))})},bse=({initialValue:e,onChange:t,...r})=>{const n=Ht(),o=n.getRolesFlags(),i=n.getRolesAndPrivileges();return T.useEffect(()=>{if(e)try{const a=JSON.parse(e);if(Vs.isEqual(a,i))return;n.actions.setRolesContent({content:a,flags:{touched:!1}})}catch(a){console.error("[Roles Editor Standalone] Error while parsing the initial value:",a)}},[e]),de.useDidMountEffect(()=>{if(o.touched&&t)try{const a=JSON.stringify(i,null,2);t(a)}catch(a){console.error("[Roles Editor Standalone] Error on value stringify:",a)}},[i]),C.jsxs(C.Fragment,{children:[C.jsx("div",{className:"relative z-10 overflow-hidden",style:{height:"100vh"},children:C.jsx(hF,{...r})}),C.jsx(mse,{})]})},yse=e=>{const t=Sre();return C.jsx(U5,{adapter:t,children:C.jsx(de.TipsProvider,{children:C.jsx(bse,{...e})})})},wse=e=>C.jsx(Ere,{children:C.jsx(yse,{...e})});exports.ROLES_EDITOR_SCOPE_CLASS=g2.ROLES_EDITOR_SCOPE_CLASS;exports.EditorStateAdapterProvider=U5;exports.Roles=hF;exports.Standalone=wse;exports.useReduxAdapter=Hte;exports.useRolesFlagsSync=pF;
121
+ `),T.useEffect(function(){return d=o.ref||d,p.current&&(u=new Du(p.current,$c($c($c($c({},nse(g)),v),d&&{scrollableNode:d.current}),h.current&&{contentNode:h.current})),typeof t=="function"?t(u):t&&(t.current=u)),function(){u.unMount(),u=null,typeof t=="function"&&t(null)}},[]),T.createElement(c,ju({ref:p,"data-simplebar":!0},y),T.createElement("div",{className:"simplebar-wrapper"},T.createElement("div",{className:"simplebar-height-auto-observer-wrapper"},T.createElement("div",{className:"simplebar-height-auto-observer"})),T.createElement("div",{className:"simplebar-mask"},T.createElement("div",{className:"simplebar-offset"},typeof r=="function"?r({scrollableNodeRef:d,contentNodeRef:h}):T.createElement("div",ju({},o,{className:"simplebar-content-wrapper".concat(o.className?" ".concat(o.className):"")}),T.createElement("div",{className:"simplebar-content"},r)))),T.createElement("div",{className:"simplebar-placeholder"})),T.createElement("div",{className:"simplebar-track simplebar-horizontal"},T.createElement("div",{className:"simplebar-scrollbar"})),T.createElement("div",{className:"simplebar-track simplebar-vertical"},T.createElement("div",{className:"simplebar-scrollbar"})))});Ld.displayName="SimpleBar";Ld.propTypes={children:fe.oneOfType([fe.node,fe.func]),scrollableNodeProps:fe.object,tag:fe.string};const qu=Q_,Lu=e1,dF=(e,t)=>{if(e===de.EPermissionType.METHOD&&t)switch(t){case de.ESubPermissionType.ENTITY_SEL_METHOD:return C.jsx(xe.FdFunctionSelection,{className:"h-6 w-6"});case de.ESubPermissionType.ENTITY_METHOD:return C.jsx(xe.FdFunctionEntity,{className:"h-6 w-6"});case de.ESubPermissionType.DS_METHOD:return C.jsx(xe.FdFunctionDatastore,{className:"h-6 w-6"});case de.ESubPermissionType.DATACLASS_METHOD:return C.jsx(xe.FdFunctionDataclass,{className:"h-6 w-6"})}switch(e){case de.EPermissionType.DATACLASS:return C.jsx(xe.FdTableHeader,{className:"h-6 w-6"});case de.EPermissionType.SINGLETON:return C.jsx(xe.FdSingleton,{className:"h-6 w-6"});case de.EPermissionType.DATASTORE:return C.jsx(xe.FdModel3,{className:"h-6 w-6"});case de.EPermissionType.ATTRIBUTE:return C.jsx(xe.FdTableColumn,{className:"h-6 w-6"});case de.EPermissionType.METHOD:return C.jsx(xe.FdCode,{className:"h-6 w-6"});case de.EPermissionType.SINGLETON_METHOD:return C.jsx(xe.FdFunctionSingleton,{className:"h-6 w-6"});default:return C.jsx(xe.FdTableHeader,{className:"h-6 w-6"})}},p2=({children:e})=>C.jsx("div",{className:"h-full w-full",children:C.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 py-4 text-grey-200",children:[C.jsx(xe.FdInfoBold,{className:"h-10 w-10"}),C.jsx("div",{className:"text-center text-sm",children:e})]})})}),Pi=({permissions:e,label:t,onToggle:r,onSelect:n,promoted:o,showIncluded:i,privileges:a,exists:s})=>{const c=e.find(u=>u.name===t);return c?C.jsxs("div",{className:"relative mx-auto flex w-fit items-center",children:[C.jsx(Ft,{value:c.checked||c.from.length===0||t==="promote"?c.checked:i&&c.from.length>0?null:!1,onChange:()=>r&&r(c),isInvalid:s===!1}),C.jsxs("div",{className:"absolute left-full translate-x-1/4 top-1/2 -translate-y-1/2 flex cursor-pointer items-center space-x-1",children:[t!=="promote"&&(c.checked&&(c.info||c.from.length>0)||!c.checked&&c.from.length>0)&&C.jsx(C.Fragment,{children:C.jsxs(qu,{openDelay:0,closeDelay:0,children:[C.jsx(Lu,{children:C.jsx(xe.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Qr,{container:Qt(),children:C.jsx(en,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsxs("div",{className:"space-y-1 px-2",children:[c.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:c.from.map(u=>C.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[u].id),children:a[u].privilege}))})]})]}):null,c.info&&C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.FdInfoCircle,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"})," ",c.info]})]})})})]})}),(c.checked||c.from.length>0)&&["execute"].includes(t)&&!!(o!=null&&o.length)&&C.jsxs(qu,{openDelay:0,closeDelay:0,children:[C.jsx(Lu,{children:C.jsx(xe.FdCrown,{className:"h-3 w-3 text-white"})}),C.jsx(Qr,{container:Qt(),children:C.jsx(en,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.FdInfoCircle,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsxs("span",{className:"mr-1",children:["Function is promoted with:"," "]}),o==null?void 0:o.map(u=>C.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[u].id),children:a[u].privilege}))]})]})})})})]})]})]}):null},ose=({privilegeId:e,privileges:t})=>{const r=Ht(),n=r.getCatalogMethods(),o=r.getDataclasses(),i=r.getSingletons(),a=t[e],[s,c]=T.useState([]),[u,d]=T.useState("");T.useEffect(()=>{d("")},[e]);const{isOpen:p,getMenuProps:h,getInputProps:v,getComboboxProps:y,highlightedIndex:g,getItemProps:b,selectedItem:x,openMenu:w}=qi({onInputValueChange(){c([])},items:[],itemToString(_){return _?_.applyTo:""},defaultHighlightedIndex:0,stateReducer:(_,O)=>{const{changes:N,type:R}=O;switch(R){case qi.stateChangeTypes.InputKeyDownArrowDown:return{...N,isOpen:!0,highlightedIndex:_.highlightedIndex<=s.length?_.highlightedIndex+1:0};case qi.stateChangeTypes.InputKeyDownArrowUp:return{...N,isOpen:!0,highlightedIndex:_.highlightedIndex>=0?_.highlightedIndex-1:s.length};case qi.stateChangeTypes.InputKeyDownEnter:const A=s[_.highlightedIndex];if(!A)return N;const D=de.addPermission(e,A,t);return r.actions.updatePrivileges(D),{...N,isOpen:!0,highlightedIndex:0}}return N}});T.useEffect(()=>{const _=a.resources.map(({resource:N,type:R,subType:A})=>({type:R,applyTo:N,subType:A})),O=B_(u.toLowerCase(),n,Object.values(o),Object.values(i));c(O.filter(({applyTo:N,type:R,subType:A})=>!ca.find(_,{applyTo:N,type:R,subType:A})))},[u,a.resources]);const E=h({},{suppressRefError:!0}),S=T.useRef(null);return T.useEffect(()=>{p&&S.current&&S.current.focus()},[p]),C.jsxs("div",{className:"relative w-56 text-white group",...y(),children:[C.jsx("div",{...y(),children:C.jsx("input",{...v({},{suppressRefError:!0}),ref:S,type:"text",className:"block h-6 w-full rounded bg-grey-300 px-1 py-1.5 pl-2 pr-5 text-xs border-grey-500 focus:outline-none focus:ring-1 focus:ring-white focus:rounded-b-none focus:ring-inset",placeholder:"Create a permission",value:u,onChange:({target:{value:_}})=>d(_),onFocus:()=>{w()}})}),C.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-1",children:C.jsx(xe.FdDown,{className:"h-4 w-4 cursor-pointer",onMouseDown:_=>{_.preventDefault()},onClick:()=>{w()}})}),p&&C.jsx("ul",{...E,tabIndex:0,className:"absolute max-h-80 inset-x-0 top-full overflow-auto rounded-md border border-grey-50 bg-grey-900 p-0 text-grey-50 shadow-md group-focus-within:rounded-t-none group-focus-within:border-t-0",children:s.map((_,O)=>C.jsxs("li",{className:ht(x===_&&"font-bold","flex min-w-fit cursor-pointer items-center space-x-2 px-3 py-2 text-xs shadow-sm",{"bg-primary-hover":g===O,"font-bold":x===_}),...b({item:_,index:O}),onClick:()=>{const N=de.addPermission(e,_,t);r.actions.updatePrivileges(N)},children:[dF(_.type,_.subType),C.jsx("span",{children:_.applyTo})]},`${_.applyTo}-${O}`))})]})};function ise(e){const t=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],r=e.reduce((n,o)=>{const[i]=o.resource.split("."),a=n.find(s=>s.prefix===i.toLowerCase());return a?(a.resources.push(o),n):[...n,{prefix:i.toLowerCase(),type:o.type,resources:[o]}]},[]);return r.sort((n,o)=>n.prefix==="ds"?-1:o.prefix==="ds"||n.prefix>o.prefix?1:-1),r.map(n=>({...n,resources:n.resources.sort((o,i)=>{const a=t.indexOf(o.type),s=t.indexOf(i.type);return a!==s?a-s:o.resource.toLowerCase()>i.resource.toLowerCase()?1:-1})})).reduce((n,o)=>[...n,...o.resources],[])}const ase=({selectedPrivilege:e,onSelect:t,showIncluded:r,privileges:n})=>{const[o,i]=T.useState(null),[a,s]=T.useState(null),{styles:c,attributes:u}=Vu(o,a,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),d=Ht(),[p,h]=T.useState([]),[v,y]=T.useState(""),{id:g}=e,b=T.useMemo(()=>de.getInheritedResources(g,n),[g,n[g].includes,n[g].resources]),x=T.useMemo(()=>de.getPromotions(g,n),[n[g]]);function w(j){h(M=>M.some(P=>j.includes(P))?M.filter(P=>!j.includes(P)):[...M,...j])}const E=async j=>{const{confirmed:M}=await d.actions.openModal({title:"Delete Privilege",type:de.ModalType.CONFIRM,color:de.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"});if(M){const P=de.removePermission(e.id,j,n);d.actions.updatePrivileges(P)}},S=async()=>{const{confirmed:j}=await d.actions.openModal({title:"Reset Permissions",type:de.ModalType.CONFIRM,color:de.ModalColor.DANGER,message:"Are you sure you want to reset permissions for this Privilege?",icon:"FdWarningDanger"});if(j){const M=de.resetResources(e.id,n);d.actions.updatePrivileges(M)}},O=b.filter(j=>p.length===0?!0:p.includes(j.type)).filter(({resource:j})=>v?new RegExp(ca.escapeRegExp(v),"i").test(j):!0),N=ise(O),R=N.filter(j=>{const M=j.permissions.every(P=>!P.checked)&&j.permissions.some(P=>P.from.length>0);return r||!M}),A=(j,M)=>{const P=de.togglePermission(e.id,j,M,n);d.actions.updatePrivileges(P)},D=T.useMemo(()=>R.some(j=>j.exists===!1),[R]),B=async()=>{const{confirmed:j}=await d.actions.openModal({title:"Delete Privilege",type:de.ModalType.CONFIRM,color:de.ModalColor.DANGER,message:"Are you sure you want to remove these permissions?",views:{tips:[{type:"warning",message:"This action will remove all permissions that don't exist in the catalog for all privileges"}]},icon:"FdWarningDanger"}),M=Object.entries(n).map(([P,V])=>{const q=V.resources.filter(G=>!G.exists);return{[P]:q.map(G=>({applyTo:G.resource,type:G.type}))}}).reduce((P,V)=>({...P,...V}),{});if(j){const P=de.removeMultiplePermissions(M,n);d.actions.updatePrivileges(P)}};return C.jsxs(Ld,{className:"z-20 h-full flex-1 overflow-auto p-[15px] pt-0",style:{maxHeight:"calc(100vh - 5.5rem - 85px - 20px)"},children:[C.jsxs("table",{className:"relative h-full w-full",children:[C.jsx("thead",{className:"sticky top-0 z-20",children:C.jsxs("tr",{className:"border-b border-grey-100",children:[C.jsx("td",{className:"py-2",children:C.jsxs("div",{className:"flex items-center space-x-2",children:[C.jsxs("div",{className:"relative w-56 text-white",children:[C.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center px-1",children:C.jsx(xe.FdSearch,{className:"h-4 w-4 text-gray-400"})}),C.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-2",children:C.jsx(zr.Popover,{className:"flex items-center",children:({open:j})=>C.jsxs(C.Fragment,{children:[C.jsx(zr.Popover.Button,{ref:i,children:C.jsx(xe.FdAdjust,{className:"h-4 w-4"})}),j&&C.jsx(Cd,{children:C.jsxs(zr.Popover.Panel,{ref:s,style:c.popper,...u.popper,className:"z-50 rounded-md border border-grey-50 bg-grey-900 px-4 py-2.5",static:!0,children:[C.jsx("h5",{className:"mb-2 text-sm text-grey-50",children:"Filter"}),C.jsxs("div",{className:"space-y-2 text-s",children:[C.jsx("div",{className:"flex items-center",children:C.jsx(Ft,{value:p.includes("datastore"),onChange:()=>{w(["datastore"])},label:"Datastore",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Ft,{value:p.includes("dataclass"),onChange:()=>{w(["dataclass"])},label:"Dataclass",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Ft,{value:p.includes("singleton"),onChange:()=>{w(["singleton"])},label:"Singleton",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Ft,{value:p.some(M=>["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"].includes(M)),onChange:()=>{w(["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"])},label:"Functions",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Ft,{value:p.includes("attribute"),onChange:()=>{w(["attribute"])},label:"Attribute",size:"sm"})})]})]})})]})})}),C.jsx("input",{type:"text",className:"block h-6 w-full rounded bg-grey-300 px-1 py-1.5 pl-6 text-xs focus:outline-none",placeholder:"Search available permissions",value:v,onChange:j=>{y(j.target.value)}})]}),C.jsx(ose,{privilegeId:g,privileges:n}),C.jsx("div",{children:C.jsxs(qu,{openDelay:0,closeDelay:0,children:[C.jsx(Lu,{children:C.jsx("button",{className:"flex h-6 items-center space-x-1 rounded-md px-2 text-sm text-grey-50 hover:bg-primary-hover",onClick:S,children:C.jsx(xe.FdReload,{})})}),C.jsx(Qr,{container:Qt(),children:C.jsxs(en,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"mb-1 flex max-w-xs items-center gap-x-1 rounded bg-primary-light px-2 py-2 text-s font-semibold text-primary-darker",children:[C.jsx(xe.FdBulb,{className:"m-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"Resetting the privilege will remove all configured ressources"})]})})]})}),C.jsxs(qu,{openDelay:0,closeDelay:0,children:[C.jsx(Lu,{children:C.jsx("button",{className:ht("flex h-6 items-center space-x-1 rounded-md px-2 text-sm text-grey-50 hover:bg-primary-hover disabled:opacity-50 disabled:hover:bg-primary-dark"),onClick:B,disabled:!D,children:C.jsx(xe.FdClean,{className:"h-4 w-4"})})}),C.jsx(Qr,{container:Qt(),children:C.jsxs(en,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"mb-1 flex max-w-xs items-center gap-x-1 rounded bg-primary-light px-2 py-2 text-s font-semibold text-primary-darker",children:[C.jsx(xe.FdBulb,{className:"m-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"Delete all the non existing resources from privileges"})]})})]})]})}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Read"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Create"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Update"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Delete"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Execute"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Promote"})]})}),R.length?C.jsx("tbody",{children:R.map((j,M)=>{const P=j.permissions.some(V=>V.from.length>0);return C.jsxs("tr",{className:ht("group even:bg-grey-600",{"opacity-60":j.exists===!1}),children:[C.jsxs("td",{className:ht("group flex items-center gap-3 py-2 text-xs group-hover:rounded-l group-hover:bg-grey-300",j.exists===!1?"text-negative-400":"text-white",{"border-b-[0.5px] border-grey-300":!1}),children:[dF(j.type,j.subType),j.resource,C.jsx(de.Tooltip,{placement:"top",label:"Remove Permission",isDisabled:P,container:Qt(),children:C.jsx("button",{onClick:()=>{P?de.toastSubject.next({kind:"info",markdown:!0,message:`<div className="flex gap-x-3"><h3 className="font-bold">Info:</h3><p className="font-normal">Inherited permissions can't be removed</p></div>`,customIcon:xe.FdInfoBold}):E({applyTo:j.resource,type:j.type})},className:ht("flex flex-shrink-0 items-center justify-center rounded p-1 opacity-0 group-hover:opacity-100",P?"hover:bg-grey-300 group-hover:opacity-70":"hover:bg-primary-hover"),children:C.jsx(xe.FdPlus,{className:"h-4 w-4 rotate-45 transform text-white"})})})]}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Pi,{permissions:j.permissions,showIncluded:r,label:"read",onToggle:V=>A(j,V),onSelect:t,privileges:n,exists:j.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Pi,{permissions:j.permissions,showIncluded:r,label:"create",onToggle:V=>A(j,V),onSelect:t,privileges:n,exists:j.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Pi,{permissions:j.permissions,showIncluded:r,label:"update",onToggle:V=>A(j,V),onSelect:t,privileges:n,exists:j.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Pi,{permissions:j.permissions,showIncluded:r,label:"drop",onToggle:V=>A(j,V),onSelect:t,privileges:n,exists:j.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Pi,{promoted:x[j.resource],permissions:j.permissions,showIncluded:r,label:"execute",onToggle:V=>A(j,V),onSelect:t,privileges:n,exists:j.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:rounded-r group-hover:bg-grey-300 ",children:C.jsx(Pi,{permissions:j.permissions,showIncluded:r,label:"promote",onToggle:V=>A(j,V),onSelect:t,privileges:n,exists:j.exists})})]},M)})}):null]}),!N.length&&v?C.jsx(p2,{children:"The Permission you're looking for can't be found "}):null,!N.length&&!v?C.jsxs(p2,{children:["This Privilege has no Permissions configured yet ",C.jsx("br",{}),'Add a new permission by using the "Create a permission" input above']}):null]})},sse=({onCreate:e})=>{const t=Ht(),r=t.getPrivileges(),[n,o]=T.useState(null),[i,a]=T.useState(null),[s,c]=T.useState(""),[u,d]=T.useState(null),{styles:p,attributes:h}=Vu(n,i,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});return T.useEffect(()=>{c(""),d(null)},[i]),C.jsx(zr.Popover,{children:({open:v,close:y})=>C.jsxs(C.Fragment,{children:[C.jsx(zr.Popover.Button,{className:"rounded p-1 hover:bg-primary-hover","data-cy":"New-priv-btn",ref:o,children:C.jsx("span",{children:C.jsx(xe.FdPlus,{className:"h-4 w-4 text-white"})})}),v&&C.jsx(Cd,{children:C.jsxs(zr.Popover.Panel,{ref:a,style:p.popper,...h.popper,"data-cy":"New-priv-pop-up",className:"z-50 min-w-[256px] rounded border border-grey-50 bg-grey-900 px-4 py-2 text-xs text-grey-50 shadow-md",static:!0,children:[C.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Privilege"}),C.jsxs("div",{className:"mt-2",children:[C.jsxs("label",{className:"flex items-center space-x-4",children:[C.jsx("span",{className:"text-grey-100",children:"Name"}),C.jsx("input",{autoFocus:!0,value:s,onChange:g=>c(g.target.value),onKeyDown:g=>{if(g.key==="Enter"){d(null);try{const b=de.createPrivilege(s,r);t.actions.updatePrivileges(b);const x=Object.values(b).find(w=>w.privilege===s);x&&(e(x),y())}catch(b){d(b.message)}}},type:"text",className:ht("w-full rounded border bg-grey-300 p-1 focus:outline-none",{"border-grey-100":!u,"border-red-400":u})})]}),u&&C.jsx("p",{className:"mt-1 text-xs text-red-400",children:u})]}),C.jsxs("div",{className:"mt-4 flex items-center justify-center space-x-2",children:[C.jsx("button",{className:"rounded border border-primary-dark bg-primary-dark px-4 py-1 hover:border-primary-hover hover:bg-primary-hover",onClick:()=>{d(null);try{const g=de.createPrivilege(s,r);t.actions.updatePrivileges(g);const b=Object.values(g).find(x=>x.privilege===s);b&&e(b),y()}catch(g){d(g.message)}},children:"Create"}),C.jsx("button",{className:"rounded border border-grey-100 px-4 py-1 text-grey-100 hover:bg-white hover:text-primary-dark",onClick:()=>y(),children:"Cancel"})]})]})})]})})},lse=()=>{const e=Ht(),t=e.getCatalog(),r=e.getPrivileges(),n=T.useMemo(()=>{if(t===null)return r;const u=H5(r,Object.values((t==null?void 0:t.dataClasses)??{}));return V5(u,t)},[r,t]),[o,i]=T.useState(null),a=T.useMemo(()=>Object.keys(n),[n]);T.useEffect(()=>{o&&n[o.id]||!a.length||i(n[a[0]])},[n]),T.useEffect(()=>{a.length<2&&c(!0)},[a.length]);const[s,c]=T.useState(!0);return C.jsxs("div",{className:"flex flex-1 h-full",children:[C.jsxs(mo,{depth:1,className:"flex h-full w-[356px] flex-col",children:[C.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between px-3.5 py-[10px]",children:[C.jsxs("div",{className:"flex items-center space-x-1 text-[#DDE1E6]",children:[C.jsx("span",{children:C.jsx(xe.FdGroup,{className:"h-[14px] w-[14px]"})}),C.jsx("span",{className:"text-[11px] font-semibold",children:"Privileges"})]}),C.jsx(sse,{onCreate:u=>{i(u)}})]}),C.jsx(Noe,{privileges:n,selectedPrivilege:o,selectPrivilege:u=>{i(u)}})]}),o&&n[o.id]?C.jsxs(mo,{depth:1,className:"privileges-container relative flex flex-1 flex-col overflow-x-auto border-l-[0.5px]",children:[C.jsxs("div",{className:"mb-1 flex h-full w-full flex-col items-stretch",children:[o.privilege!=="guest"?C.jsx(Cre,{privileges:n,selectedPrivilege:o,onSelect:u=>i(r[u]),setShowIncluded:c,showIncluded:s}):null,C.jsx(ase,{privileges:n,selectedPrivilege:o,onSelect:u=>i(r[u]),showIncluded:s})]}),C.jsx(cse,{privileges:n,selectedPrivilege:o,setSelectedPrivilege:i})]}):C.jsx(Rq,{tab:"Privilege"})]})},cse=({privileges:e,selectedPrivilege:t,setSelectedPrivilege:r})=>{const[n,o]=T.useState(!1);return C.jsx(de.Panel,{path:de.ROLES_TAB_PATH,isOpen:n,onOpen:()=>o(!0),onClose:()=>o(!1),children:C.jsx("div",{className:"h-full w-full px-3 pb-3",children:C.jsx(mo,{depth:2,className:"h-full w-full rounded",children:C.jsx(Lte,{dict:e,data:de.getGraphData(t.id,e),onSelect:i=>r(e[i])})})})})},use=({role:e})=>{var _;const t=Ht(),[r,n]=T.useState(e),[o,i]=T.useState(e.role),[a,s]=T.useState(null),c=t.getPrivileges(),u=((_=r.privileges)==null?void 0:_.filter(O=>c[O]&&c[O].privilege!=="guest").length)||0,d=t.getRoles(),{selectedRole:p,selectRole:h}=n_(),[v,y]=T.useState(!1),g=de.useOutsideClick(()=>{v&&x()});de.useDidMountEffect(()=>{o!==e.role&&i(e.role)},[e.role]),T.useEffect(()=>{e.role||y(!0)},[]),T.useEffect(()=>{n(e)},[e]);const b=()=>{s(null),y(!0)},x=()=>{s(null),e.role&&e.role===o&&y(!1);try{const O=de.saveRole({...r,role:o},d);t.actions.updateRoles(O),y(!1)}catch(O){s(O.message)}},w=async O=>{O.stopPropagation();const{confirmed:N}=await t.actions.openModal({title:"Delete Role",type:de.ModalType.CONFIRM,color:de.ModalColor.DANGER,message:"Are you sure you want to remove this Role?",icon:"FdWarningDanger"});N&&E()},E=()=>{const O=de.removeRole(r.id,d),N=Object.keys(O),R=N.length>=1,A=N[N.length-1];h(A&&R?A:null),t.actions.updateRoles(O)},S=(O=null)=>{if(O&&O.stopPropagation(),!e.role){E();return}y(!1),i(e.role)};return C.jsx(C.Fragment,{children:C.jsxs("div",{className:ht("rounded border bg-grey-300 p-2",{"border-grey-100":p!==r.id,"border-primary-dark":p===r.id}),role:"button","data-cy":"privilegeCard",onClick:()=>{h(r.id)},ref:g,children:[C.jsx("div",{className:"flex items-center justify-between",children:C.jsxs("div",{className:"flex flex-1 items-center text-white",children:[C.jsx("span",{className:"mr-4",children:C.jsx(xe.FdGroup,{className:"h-6 w-6"})}),v?C.jsxs("div",{className:"relative h-6 flex-1 mr-2",children:[C.jsx("input",{type:"text",value:o,onChange:({target:{value:O}})=>{i(O)},onKeyDown:O=>{O.key==="Enter"&&x(),O.key==="Escape"&&S()},className:ht("absolute inset-0 h-6 min-w-0 rounded border border-grey-200 bg-grey-300 p-1 text-xs focus:outline-none",{"border-b border-red-400 rounded-b-none":a,"focus:border-primary-dark":!a}),placeholder:"role",autoComplete:"off",autoFocus:!0}),a&&C.jsx("p",{className:"absolute top-5 mt-1 w-full rounded rounded-t-none bg-red-400 p-1 text-xs text-white shadow-md",children:a})]}):C.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",title:o,children:r.role}),C.jsx("div",{className:ht("justify-betwee ml-auto flex w-fit items-center gap-x-2"),children:v?C.jsxs(C.Fragment,{children:[C.jsx("button",{onClick:x,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(xe.FdSave,{className:"h-4 w-4 text-grey-50"})}),C.jsx("button",{onClick:S,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(xe.FdClose,{className:"h-4 w-4 text-grey-50"})})]}):C.jsxs(C.Fragment,{children:[C.jsx("button",{onClick:b,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(xe.FdPen,{className:"h-4 w-4 text-grey-50"})}),C.jsx("button",{onClick:O=>w(O),className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(xe.FdTrash,{className:"h-4 w-4 text-grey-50"})})]})})]})}),C.jsxs("span",{className:ht("ml-[43px] py-1 text-xs text-white"),children:[u," Privilege",u>1?"s":""]})]})})},fF=(e,t)=>e?t[e]:null,h2=(e,t,r)=>{const n=fF(e,r);return n?Object.values(r).reduce((o,i)=>i.id===e?n.privileges.includes(t)?{...o,[n.id]:{...n,privileges:n.privileges.filter(a=>a!==t)}}:{...o,[n.id]:{...n,privileges:[...n.privileges,t]}}:{...o,[i.id]:i},{}):r},dse=()=>{const e=Ht(),t=e.getPrivileges(),r=e.getRoles(),{selectedRole:n}=n_(),o=fF(n,r),i=(a,s)=>s&&s.privileges.includes(a.id);return C.jsxs("div",{className:"w-full border-b border-grey-900 p-4 ",children:[C.jsx("div",{className:"mb-4 flex items-center gap-x-5 text-white",children:C.jsx("h4",{className:"text-[13px] font-semibold ",children:"Privileges"})}),C.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[C.jsx("div",{"data-cy":"item=>Permisions",className:ht("inline-flex items-center gap-1 space-x-1 rounded bg-primary-darker px-2 py-0.5 text-xs font-semibold italic text-white"),children:"guest"}),Object.values(t).filter(a=>i(a,o)&&a.privilege!=="guest").map((a,s)=>C.jsxs("div",{"data-cy":"item=>Permisions",className:ht("inline-flex cursor-pointer items-center gap-1 space-x-1 rounded px-2 py-0.5",{"bg-primary-dark text-white":i(a,o),"bg-grey-300 text-grey-100":!i(a,o)}),onClick:()=>{const c=h2(o.id,a.id,r);e.actions.updateRoles(c)},children:[C.jsx("span",{className:"text-xs",children:a.privilege}),C.jsx("button",{className:"focus:outline-none",children:i(a,o)?C.jsx(xe.FdMinus,{className:"h-[14px] w-[14px]"}):C.jsx(xe.FdPlus,{className:"h-[14px] w-[14px]"})})]},s)),Object.values(t).filter(a=>!i(a,o)&&a.privilege!=="guest").map((a,s)=>C.jsxs("div",{"data-cy":"item=>Permisions",className:ht("inline-flex cursor-pointer items-center gap-1 space-x-1 rounded px-2 py-0.5",{"bg-primary-dark text-white":i(a,o),"bg-grey-300 text-grey-100":!i(a,o)}),onClick:()=>{const c=h2(o.id,a.id,r);e.actions.updateRoles(c)},children:[C.jsx("span",{className:"text-xs",children:a.privilege}),C.jsx("button",{className:"text-white focus:outline-none",children:i(a,o)?C.jsx(xe.FdMinus,{className:"h-[14px] w-[14px]"}):C.jsx(xe.FdPlus,{className:"h-[14px] w-[14px]"})})]},s))]})]})},fse=({children:e})=>C.jsx("div",{className:"h-full w-full",children:C.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 py-4 text-grey-200",children:[C.jsx(xe.FdInfoBold,{className:"absolute -right-full h-10 w-10 translate-x-1"}),C.jsx("div",{className:"text-center text-sm",children:e})]})})}),Vx=(e,t,r,n=!1)=>{const o=e.applyTo,i=e.type===de.EPermissionType.DATACLASS?"ds":o.split(".")[0],a={...t,...r},s=()=>({value:!n,inherited:!1,from:[],explicitly:!1}),c={read:s(),create:s(),update:s(),drop:s(),execute:s(),promote:s()},u=p=>{p.forEach(h=>{a[h]&&(a[h].resources.forEach(v=>{if(v.resource===o||v.resource===i){const y=Vx(e,t,{[h]:a[h]},n);Object.values(v.permissions).forEach(g=>{c[g.name].explicitly||(!c[g.name].from.includes(a[h].privilege)&&g.checked&&c[g.name].from.push(a[h].privilege),c[g.name].inherited=c[g.name].inherited||y[g.name].value||y[g.name].inherited)})}}),a[h].includes.length>0&&u(a[h].includes))})};if(Object.values(r).forEach(p=>{p.resources.forEach(h=>{h.resource===o&&Object.values(h.permissions).forEach(v=>{v.checked&&(c[v.name].explicitly=!0,n&&(c[v.name].value=!0))})}),(p.includes.length>0||p.privilege==="guest")&&u(p.includes)}),Object.values(t).forEach(p=>{p.resources.forEach(h=>{h.resource===o&&(p.privilege==="guest"?Object.values(h.permissions).forEach(v=>{v.checked&&(c[v.name].explicitly=!0,n&&(c[v.name].value=!0))}):Object.values(h.permissions).forEach(v=>{!c[v.name].explicitly&&v.checked&&(n?c[v.name].value=!0:c[v.name].value=!1)}))})}),(n?Object.entries(c).some(([p,h])=>p!=="promote"&&!h.value&&!h.explicitly):Object.entries(c).some(([p,h])=>p!=="promote"&&h.value&&!h.explicitly))&&![de.EPermissionType.DATASTORE,de.EPermissionType.SINGLETON].includes(e.type)){const p={applyTo:i,type:e.type===de.EPermissionType.DATACLASS?de.EPermissionType.DATASTORE:e.type===de.EPermissionType.SINGLETON_METHOD?de.EPermissionType.SINGLETON:de.EPermissionType.DATACLASS},h=Vx(p,t,r,n),v=y=>{let g=c[y].value;return n?!c[y].value&&!c[y].explicitly&&(g=h[y].value):c[y].value&&!c[y].explicitly&&(g=h[y].value),{value:g,inherited:c[y].inherited||h[y].inherited,from:c[y].from.length>0?c[y].from:h[y].from,explicitly:c[y].explicitly}};return{read:v("read"),create:v("create"),update:v("update"),drop:v("drop"),execute:v("execute"),promote:v("promote")}}return{read:c.read,create:c.create,update:c.update,drop:c.drop,execute:c.execute,promote:c.promote}},pse=e=>{switch(e){case"dataclass":return C.jsx(xe.FdTableHeader,{className:"h-6 w-6"});case"singleton":return C.jsx(xe.FdSingleton,{className:"h-6 w-6"});case"datastore":return C.jsx(xe.FdModel3,{className:"h-6 w-6"});case"attribute":return C.jsx(xe.FdTableColumn,{className:"h-6 w-6"});case"method":return C.jsx(xe.FdCode,{className:"h-6 w-6"});case"singletonMethod":return C.jsx(xe.FdFunctionSingleton,{className:"h-6 w-6"});case"entityselMethod":return C.jsx(xe.FdFunctionSelection,{className:"h-6 w-6"});case"entityMethod":return C.jsx(xe.FdFunctionEntity,{className:"h-6 w-6"});case"dsMethod":return C.jsx(xe.FdFunctionDatastore,{className:"h-6 w-6"});case"dataclassMethod":return C.jsx(xe.FdFunctionDataclass,{className:"h-6 w-6"});default:return C.jsx(xe.FdTableHeader,{className:"h-6 w-6"})}},as=Q_,ss=e1,Wi=({privileges:e,permission:t,hasChild:r,depth:n,isChild:o=!1,className:i,inSearch:a,toggleCollapse:s,collapsed:c,isRestrictedByDefault:u,toastMessageCallback:d})=>{const[p,h]=t.applyTo.split("."),v=T.useMemo(()=>Vx(t,e.otherPrivs,e.rolePrivs,u),[e,t,u]);return C.jsxs("tr",{className:ht("group even:bg-grey-600",i),children:[C.jsxs("td",{className:ht("flex h-full w-full items-center gap-3 p-0 text-xs group-hover:rounded-l group-hover:bg-grey-300",{"px-1":a}),children:[Array(n).fill("").map((y,g)=>C.jsx("div",{className:ht("ml-1.5 mr-1 h-full w-0.5 border-l-2 border-grey-100",{"mr-0.5":o})},g)),r&&C.jsx("button",{onClick:s,className:"w-3",children:c?C.jsx(xe.FdRight,{className:"inline h-4 w-4"}):C.jsx(xe.FdDown,{className:"inline h-4 w-4"})}),pse(t.type),a?t.applyTo:h||p]}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:[de.EPermissionType.ATTRIBUTE,de.EPermissionType.DATASTORE,de.EPermissionType.DATACLASS].includes(t.type)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx(Ft,{value:v.read.value||v.read.inherited,onClick:d,isDisabled:!0}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.read.value&&v.read.inherited?C.jsxs(as,{openDelay:0,closeDelay:0,children:[C.jsx(ss,{children:C.jsx(xe.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Qr,{container:Qt(),children:C.jsx(en,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.read.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.read.from.map((y,g)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},g))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:[de.EPermissionType.ATTRIBUTE,de.EPermissionType.DATASTORE,de.EPermissionType.DATACLASS].includes(t.type)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx(Ft,{value:v.create.value||v.create.inherited,onClick:d,isDisabled:!0}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.create.value&&v.create.inherited?C.jsxs(as,{openDelay:0,closeDelay:0,children:[C.jsx(ss,{children:C.jsx(xe.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Qr,{container:Qt(),children:C.jsx(en,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.create.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.create.from.map((y,g)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},g))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:[de.EPermissionType.ATTRIBUTE,de.EPermissionType.DATASTORE,de.EPermissionType.DATACLASS].includes(t.type)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx(Ft,{value:v.update.value||v.update.inherited,onClick:d,isDisabled:!0}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.update.value&&v.update.inherited?C.jsxs(as,{openDelay:0,closeDelay:0,children:[C.jsx(ss,{children:C.jsx(xe.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Qr,{container:Qt(),children:C.jsx(en,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.update.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.update.from.map((y,g)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},g))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:[de.EPermissionType.ATTRIBUTE,de.EPermissionType.DATASTORE,de.EPermissionType.DATACLASS].includes(t.type)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx(Ft,{value:v.drop.value||v.drop.inherited,onClick:d,isDisabled:!0}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.drop.value&&v.drop.inherited?C.jsxs(as,{openDelay:0,closeDelay:0,children:[C.jsx(ss,{children:C.jsx(xe.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Qr,{container:Qt(),children:C.jsx(en,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.drop.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.drop.from.map((y,g)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},g))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center group-hover:rounded-r group-hover:bg-grey-300",children:t.type!=="attribute"&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx(Ft,{value:v.execute.value||v.execute.inherited,onClick:d,isDisabled:!0}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.execute.value&&v.execute.inherited?C.jsxs(as,{openDelay:0,closeDelay:0,children:[C.jsx(ss,{children:C.jsx(xe.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Qr,{container:Qt(),children:C.jsx(en,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.execute.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.execute.from.map((y,g)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},g))})]})]}):null})})})]}):""})]})})]})},v2=({depth:e,permission:t,privileges:r,childCollapsed:n,didChildCollapsed:o,toastMessageCallback:i})=>{const[a,s]=T.useState(n),c=Ht(),u=c.getRestrictedByDefault(),d=c.getPrivileges();return T.useEffect(()=>{n===!0&&s(!0)},[n]),C.jsxs(C.Fragment,{children:[C.jsx(Wi,{privileges:r,permission:t,isChild:!0,depth:e,hasChild:!0,toggleCollapse:()=>{const p=!a;s(p),o==null||o(p)},isRestrictedByDefault:u,allPrivileges:d,collapsed:a,toastMessageCallback:i}),!a&&C.jsxs(C.Fragment,{children:[t.attributes.map((p,h)=>C.jsx(Wi,{privileges:r,permission:p,depth:e+1,isRestrictedByDefault:u,allPrivileges:d,toastMessageCallback:i},`${p.type}-${h}`)),t.methods.map((p,h)=>C.jsx(Wi,{privileges:r,permission:p,depth:e+1,isRestrictedByDefault:u,allPrivileges:d,toastMessageCallback:i},`${p.type}-${h}`))]})]})},hse=({selectedRole:e})=>{const[t,r]=T.useState(null),[n,o]=T.useState(null),{styles:i,attributes:a}=Vu(t,n,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),s=Ht(),c=s.getRestrictedByDefault(),u=s.getPrivileges(),[d,p]=T.useState([]),[h,v]=T.useState(""),y=s.getCatalogMethods(),g=s.getDataclasses(),b=s.getSingletons(),[x,w]=T.useState({}),[E,S]=T.useState([]);T.useEffect(()=>{const q=Bte(y,Object.values(g),Object.values(b));w(q)},[e]);function _(q){const G=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"];return q.sort((W,Q)=>{const z=G.indexOf(W.type),U=G.indexOf(Q.type);return z!==U?z-U:W.applyTo.toLowerCase()>Q.applyTo.toLowerCase()?1:-1})}T.useEffect(()=>{S(_(B_(h,y,Object.values(g),Object.values(b)).filter(q=>d.length?d.includes(q.type):!0)))},[d,h]);const[O,N]=T.useState(!1),R=q=>{p(G=>G.some(W=>q.includes(W))?G.filter(W=>!q.includes(W)):[...G,...q])},A=s.getRoles(),D={toggleAllCollapsed:q=>{q.allCollapsed=!q.allCollapsed},toggleChildCollapsed:q=>{q.childCollapsed=!q.childCollapsed},setAllCollapsed:(q,G)=>{q.allCollapsed=G},setChildCollapsed:(q,G)=>{q.childCollapsed=G}},B=T.useMemo(()=>{const q=Object.values(u).find(U=>U.privilege==="guest"),G=A[e],W=G?Object.fromEntries(G.privileges.map(U=>[U,u[U]]).filter(([,U])=>!!U)):{};if(c)return{rolePrivs:W,otherPrivs:q?{[q.id]:q}:{}};const Q=q?{[q.id]:{...q,active:!0}}:{},z=Object.fromEntries(Object.entries(u).filter(([U])=>U!==(q==null?void 0:q.id)&&!(G!=null&&G.privileges.includes(U))).map(([U,ie])=>[U,{...ie,active:!1}]));return{rolePrivs:W,otherPrivs:{...Q,...z}}},[u,A,e,c]),{state:{allCollapsed:j,childCollapsed:M},dispatch:P}=de.useEnhancedState({allCollapsed:!1,childCollapsed:!1},D,"Table Collapse Store"),V=()=>{de.toastSubject.next({kind:"info",markdown:!0,message:'<div className="flex gap-x-1 items-center"><h3 className="font-bold mr-1">Info:</h3><p className="font-normal">You can add or modify permissions only in the Privilege section.</p></div>',customIcon:xe.FdInfoCircle})};return C.jsxs(Ld,{className:"z-20 h-full flex-1 overflow-auto p-[15px] pt-0",style:{maxHeight:"calc(100vh - 5.5rem - 85px - 20px)"},children:[C.jsxs("table",{className:"relative h-full w-full",children:[C.jsx("thead",{className:"sticky top-0 z-20",children:C.jsxs("tr",{className:"border-b border-grey-100",children:[C.jsx("td",{className:"py-2",children:C.jsxs("div",{className:"flex items-center space-x-2",children:[C.jsx(de.Tooltip,{label:"Collapse All",placement:"top",container:Qt(),children:C.jsx("button",{onClick:()=>{M?(P.setAllCollapsed(!0),N(!0)):P.setChildCollapsed(!0)},className:ht("cursor-pointer rounded-md p-1 hover:bg-primary-hover focus:outline-none",{"pointer-events-none text-grey-200":j,"text-white":!j}),children:C.jsx(xe.FdCollapseAll,{className:"h-4 w-4"})})}),C.jsxs("div",{className:"relative w-56 text-white",children:[C.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center px-1",children:C.jsx(xe.FdSearch,{className:"h-4 w-4 text-gray-400"})}),C.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-2",children:C.jsx(zr.Popover,{className:"flex items-center",children:({open:q})=>C.jsxs(C.Fragment,{children:[C.jsx(zr.Popover.Button,{ref:r,children:C.jsx(xe.FdAdjust,{className:"h-4 w-4"})}),q&&C.jsx(Cd,{children:C.jsxs(zr.Popover.Panel,{ref:o,style:i.popper,...a.popper,className:"z-50 rounded-md border border-grey-50 bg-grey-900 px-4 py-2.5 text-xs text-grey-50",static:!0,children:[C.jsx("h5",{className:"mb-2 text-sm",children:"Filter"}),C.jsxs("div",{className:"space-y-2 text-s",children:[C.jsx("div",{className:"flex items-center",children:C.jsx(Ft,{value:d.includes("datastore"),onChange:()=>{R(["datastore"])},label:"Datastore",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Ft,{value:d.includes("dataclass"),onChange:()=>{R(["dataclass"])},label:"Dataclass",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Ft,{value:d.includes("singleton"),onChange:()=>{R(["singleton"])},label:"Singleton",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Ft,{value:d.some(G=>["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"].includes(G)),onChange:()=>{R(["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"])},label:"Functions",size:"sm"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Ft,{value:d.includes("attribute"),onChange:()=>{R(["attribute"])},label:"Attribute",size:"sm"})})]})]})})]})})}),C.jsx("input",{type:"text",className:"block h-6 w-full rounded bg-grey-300 px-1 py-1.5 pl-6 text-xs focus:outline-none",placeholder:"Search",value:h,onChange:q=>{v(q.target.value)}})]})]})}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"read"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Create"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Update"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Delete"}),C.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Execute"})]})}),C.jsx("tbody",{className:"relative",children:d.length||h?E.map((q,G)=>C.jsx(Wi,{privileges:B,permission:q,depth:0,inSearch:!0,isRestrictedByDefault:c,allPrivileges:u,toastMessageCallback:V},`${q.type}-${G}`)):Object.values(x).map((q,G)=>C.jsxs(T.Fragment,{children:[C.jsx(Wi,{privileges:B,permission:q,isRestrictedByDefault:c,allPrivileges:u,hasChild:!0,depth:0,toggleCollapse:()=>{const W=!O;N(W),P.setAllCollapsed(!W&&j?!1:j)},collapsed:O,toastMessageCallback:V}),q.type==="datastore"&&!O?C.jsxs(C.Fragment,{children:[q.methods.map((W,Q)=>C.jsx(Wi,{privileges:B,isRestrictedByDefault:c,allPrivileges:u,permission:W,depth:1,collapsed:j||!1,toastMessageCallback:V},`${W.type}-${Q}`)),q.dataClasses.map((W,Q)=>C.jsx(v2,{depth:1,privileges:B,permission:W,childCollapsed:M,didChildCollapsed:z=>{P.setChildCollapsed(z?M:!1)},toastMessageCallback:V},`${W.type}-${Q}`))]}):null,q.singletons.map((W,Q)=>C.jsx(v2,{depth:0,privileges:B,permission:W,childCollapsed:j,didChildCollapsed:z=>{P.setAllCollapsed(z?j:!1)},toastMessageCallback:V},`${W.type}-${Q}`))]},`${q.type}-${G}`))})]}),(h||d.length)&&!E.length?C.jsx(fse,{children:"The Permission you're looking for can't be found "}):null]})},vse=()=>{const e=Ht(),t=e.getRoles(),[r,n]=T.useState(null),[o,i]=T.useState(null),[a,s]=T.useState(""),[c,u]=T.useState(null),{styles:d,attributes:p}=Vu(r,o,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});T.useEffect(()=>{s(""),u(null)},[o]);const h=()=>{if(!a)throw new Error("Please enter a valid name");if(Object.values(t).find(b=>b.role===a))throw new Error(`A role with the name ${a} already exists`);const y=ez.generate(),g=de.createRole(y,a,t);e.actions.updateRoles(g)};return C.jsx(zr.Popover,{children:({open:v,close:y})=>{const g=()=>{u(null);try{de.validateName(a),h(),y()}catch(b){u(b.message)}};return C.jsxs(C.Fragment,{children:[C.jsx(zr.Popover.Button,{className:"rounded p-1 hover:bg-primary-hover","data-cy":"New-priv-btn",ref:n,children:C.jsx("span",{children:C.jsx(xe.FdPlus,{className:"h-4 w-4 text-white"})})}),v&&C.jsx(Cd,{children:C.jsxs(zr.Popover.Panel,{ref:i,style:d.popper,...p.popper,"data-cy":"New-priv-pop-up",className:"z-50 min-w-[256px] rounded border border-grey-50 bg-grey-900 px-4 py-2 text-xs text-grey-50 shadow-md",static:!0,children:[C.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Role"}),C.jsxs("div",{className:"mt-2",children:[C.jsxs("label",{className:"flex items-center space-x-4",children:[C.jsx("span",{className:"text-grey-100",children:"Name"}),C.jsx("input",{autoFocus:!0,value:a,onChange:b=>s(b.target.value),onKeyDown:b=>{b.key==="Enter"&&g()},type:"text",className:ht("w-full rounded border bg-grey-300 p-1 focus:outline-none",{"border-grey-100":!c,"border-red-400":c})})]}),c&&C.jsx("p",{className:"mt-1 text-xs text-red-400",children:c})]}),C.jsxs("div",{className:"mt-4 flex items-center justify-center space-x-2",children:[C.jsx("button",{className:"rounded border border-primary-dark bg-primary-dark px-4 py-1 hover:border-primary-hover hover:bg-primary-hover",onClick:()=>{g()},children:"Create"}),C.jsx("button",{className:"rounded border border-grey-100 px-4 py-1 text-grey-100 hover:bg-white hover:text-primary-dark",onClick:()=>y(),children:"Cancel"})]})]})})]})}})},gse=()=>{const t=Ht().getRoles(),{selectedRole:r}=n_();return C.jsxs("div",{className:"flex flex-1 h-full",children:[C.jsxs(mo,{depth:1,className:"flex h-full w-[356px] flex-col",children:[C.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between px-3.5 py-[10px]",children:[C.jsxs("div",{className:"flex items-center space-x-1 text-[#DDE1E6]",children:[C.jsx("span",{children:C.jsx(xe.FdGroup,{className:"h-[14px] w-[14px]"})}),C.jsx("span",{className:"text-[11px] font-semibold",children:"Roles"})]}),C.jsx(vse,{})]}),C.jsx("div",{className:"flex-1 space-y-4 overflow-auto p-4 pb-10 pt-1",children:Object.values(t).map((n,o)=>C.jsx(use,{role:n},o))})]}),C.jsx(mo,{depth:1,className:ht("relative flex h-full w-full flex-1 flex-col items-stretch overflow-x-auto",{"border-l-[0.5px]":r}),children:C.jsx("div",{className:"flex h-full w-full select-none flex-col",children:r?C.jsxs(C.Fragment,{children:[C.jsx(dse,{}),C.jsx(hse,{selectedRole:r})]}):C.jsx(Rq,{tab:"Role"})})})]})};function pF(){const e=Ht(),t=e.getRolesFlags();T.useEffect(()=>{e.actions.setTabFlags(de.ROLES_TAB_PATH,t)},[t,e])}const hF=()=>{const e=Ht(),t=e.getQodly(),r=e.getSelectedTab(),n=e.getForceLogin(),o=e.getRestrictedByDefault(),i=T.useRef();return pF(),C.jsx("div",{className:"absolute inset-0 flex flex-1 overflow-hidden",children:C.jsx("div",{className:"relative flex flex-1 overflow-x-auto bg-grey-900","data-cy":"Roles&Privileges-editor-cy",ref:a=>i.current=a,children:C.jsxs("div",{className:"flex w-full flex-col",children:[C.jsx(xG,{activeTab:r,forceLogin:n,restrictedByDefault:o,onTabChange:a=>{e.actions.toggleTab(a)},onForceLoginChange:a=>{e.actions.toggleForceLogin(a)},onRestrictedByDefaultChange:a=>{e.actions.toggleRestrictedByDefault(a)},qodly:t}),r==="roles"?C.jsx(_G,{children:C.jsx(gse,{})}):C.jsx(lse,{})]})})})},mse=()=>{const{modals:e,closeModal:t,editModal:r}=Ore();return C.jsx(C.Fragment,{children:e.map((n,o)=>C.jsx(de.Modal,{hasOverlay:o===0,...n,onClose:t,onEdit:r,container:Qt()},n.id))})},bse=({onChange:e,...t})=>{const r=Ht(),n=r.getRolesFlags(),o=r.getRolesAndPrivileges();return de.useDidMountEffect(()=>{if(n.touched&&e)try{const i=JSON.stringify(o,null,2);e(i)}catch(i){console.error("[Roles Editor Standalone] Error on value stringify:",i)}},[o]),C.jsxs(C.Fragment,{children:[C.jsx("div",{className:"relative z-10 overflow-hidden",style:{height:"100vh"},children:C.jsx(hF,{...ca.omit(t,"initialValue")})}),C.jsx(mse,{})]})},yse=e=>{const t=Sre();return C.jsx(U5,{adapter:t,children:C.jsx(de.TipsProvider,{children:C.jsx(bse,{...e})})})},wse=e=>{const t=T.useMemo(()=>{if(e.initialValue)try{const r=JSON.parse(e.initialValue);return de.sanitizeRoles(r)}catch(r){console.error("[Roles Editor Standalone] Error while parsing the initial value:",r)}},[e.initialValue]);return C.jsx(Ere,{initialState:t,children:C.jsx(yse,{...e})})};exports.ROLES_EDITOR_SCOPE_CLASS=g2.ROLES_EDITOR_SCOPE_CLASS;exports.EditorStateAdapterProvider=U5;exports.Roles=hF;exports.Standalone=wse;exports.useReduxAdapter=Hte;exports.useRolesFlagsSync=pF;
122
122
  //# sourceMappingURL=index.cjs.js.map