@ws-ui/roles-editor 1.13.0-dev.3 → 1.13.0-dev.4
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/Standalone/index.d.ts +2 -0
- package/dist/adapter/reducer/adapter.d.ts +3 -1
- package/dist/adapter/types.d.ts +6 -0
- package/dist/index.cjs.js +27 -27
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +2047 -2013
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react/jsx-runtime"),C=require("react"),pe=require("@ws-ui/shared"),Tu=require("@ws-ui/icons"),xn=require("react-dom"),wn=require("@headlessui/react"),Ke=require("@ws-ui/store"),XD=require("./common.cjs.js");function ZD(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const nt=ZD(C),gV=ZD(xn);(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-100:oklch(96.7% .003 264.542);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-800:oklch(27.8% .033 256.848);--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-negative-400:var(--ws-negative-400);--color-negative-500:var(--ws-negative-500);--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-text-muted);--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-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-input-disable:var(--ws-disable-input);--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-panel-5:var(--ws-panel-5);--color-panel-border-subtle:var(--ws-panel-border-subtle);--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}.collapse:not(#\\#){visibility:collapse}.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-px:not(#\\#){right:-1px}.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-px:not(#\\#){left:-1px}.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)}.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}.block:not(#\\#){display:block}.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-30:not(#\\#){height:calc(var(--spacing)*30)}.h-100:not(#\\#){height:calc(var(--spacing)*100)}.h-fit:not(#\\#){height:fit-content}.h-full:not(#\\#){height:100%}.h-screen:not(#\\#){height:100vh}.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-72:not(#\\#){width:calc(var(--spacing)*72)}.w-80:not(#\\#){width:calc(var(--spacing)*80)}.w-96:not(#\\#){width:calc(var(--spacing)*96)}.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}.grow:not(#\\#){flex-grow:1}.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}.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-12:not(#\\#){column-gap:calc(var(--spacing)*12)}.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}.scroll-auto:not(#\\#){scroll-behavior: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-b:not(#\\#){border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.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-px:not(#\\#){border-width:1px}.divide:not(#\\#){border-width:.5px}.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-disable:not(#\\#){border-color:var(--color-input-disable)}.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-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-border-subtle:not(#\\#){border-color:var(--color-panel-border-subtle)}.border-panel-subtle:not(#\\#){border-color:var(--color-panel-subtle)}.border-positive:not(#\\#){border-color:var(--color-positive)}.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-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-gray-100:not(#\\#){background-color:var(--color-gray-100)}.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-disable:not(#\\#){background-color:var(--color-input-disable)}.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-text:not(#\\#){background-color:var(--color-input-text)}.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-5:not(#\\#){background-color:var(--color-panel-5)}.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-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-gray-500:not(#\\#){color:var(--color-gray-500)}.text-gray-800:not(#\\#){color:var(--color-gray-800)}.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-disable:not(#\\#){color:var(--color-input-disable)}.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}.lowercase:not(#\\#){text-transform:lowercase}.uppercase:not(#\\#){text-transform:uppercase}.italic:not(#\\#){font-style:italic}.underline:not(#\\#){text-decoration-line:underline}.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-s:not(#\\#){outline-width:.5px}.outline-xs:not(#\\#){outline-width:.3px}.outline-xxs:not(#\\#){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-opacity:not(#\\#){transition-property:opacity;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-sm:not(#\\#)::placeholder{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.placeholder\\:text-xs:not(#\\#)::placeholder{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.placeholder\\:text-s:not(#\\#)::placeholder{font-size:var(--text-s)}.placeholder\\:text-input-placeholder:not(#\\#)::placeholder{color:var(--color-input-placeholder)}.placeholder\\:opacity-60:not(#\\#)::placeholder{opacity:.6}.first\\:bottom-full:first-child:not(#\\#){bottom:100%}.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\\:top-full:last-child:not(#\\#){top:100%}.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\\:top-full:only-child:not(#\\#){top:100%}.only\\:-mx-0\\.5:only-child:not(#\\#){margin-inline:calc(var(--spacing)*-.5)}.only\\:rounded:only-child:not(#\\#){border-radius:.25rem}.only\\:ring-1:only-child: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)}.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-canvas-default:hover:not(#\\#){border-color:var(--color-canvas-default)}.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-default:hover:not(#\\#){background-color:var(--color-canvas-default)}.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-hover:hover:not(#\\#){background-color:var(--color-negative-hover)}.hover\\:bg-positive:hover:not(#\\#){background-color:var(--color-positive)}.hover\\:bg-positive-hover:hover:not(#\\#){background-color:var(--color-positive-hover)}.hover\\:bg-primary:hover:not(#\\#){background-color:var(--color-primary)}.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-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-grey-200:hover:not(#\\#){color:var(--color-grey-200)}.hover\\:text-negative-400:hover:not(#\\#){color:var(--color-negative-400)}.hover\\:text-positive-400:hover:not(#\\#){color:var(--color-positive-400)}.hover\\:text-positive-text:hover:not(#\\#){color:var(--color-positive-text)}.hover\\:text-primary:hover:not(#\\#){color:var(--color-primary)}.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\\: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(--vscode-button-background,var(--theia-button-secondaryForeground,var(--theia-button-background,var(--ws-palette-primary-200)))));--ws-primary-dark:var(--vscode-editor-lineHighlightBackground,var(--vscode-button-foreground,var(--theia-button-secondaryBackground,var(--theia-button-foreground,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(--ws-palette-negative-200);--ws-negative-dark: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-editor-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-200:var(--vscode-editor-background,var(--theia-editor-background,var(--ws-palette-grey-200)));--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-editorGroupHeader-tabsBackground,var(--ws-palette-grey-900)));--ws-card-border:var(--vscode-editorGroupHeader-tabsBorder,var(--theia-editorGroupHeader-tabsBorder,var(--ws-palette-grey-50)));--ws-palette-input-bg:var(--ws-palette-grey-300);--ws-palette-input-border:var(--ws-palette-grey-300);--ws-palette-input-text:var(--ws-palette-grey-50);--ws-palette-input-placeholder:var(--ws-palette-grey-200);--ws-palette-input-focus-border:var(--ws-palette-grey-50);--ws-input-bg:var(--vscode-input-background,var(--vscode-editorWidget-background,var(--theia-input-background,var(--ws-palette-input-bg))));--ws-input-border:var(--vscode-input-border,var(--vscode-panel-border,var(--theia-input-border,var(--ws-palette-input-border))));--ws-input-text:var(--vscode-input-foreground,var(--vscode-editor-foreground,var(--theia-input-foreground,var(--ws-palette-input-text))));--ws-input-placeholder:var(--vscode-input-placeholderForeground,var(--vscode-editor-foreground,var(--theia-input-placeholderForeground,var(--ws-palette-input-placeholder))));--ws-input-focus-border:var(--vscode-focusBorder,var(--vscode-button-background,var(--theia-focusBorder,var(--ws-palette-primary-500))));--ws-select-bg:var(--vscode-dropdown-background,var(--vscode-editorWidget-background,var(--theia-dropdown-background,var(--ws-input-bg))));--ws-select-border:var(--vscode-dropdown-border,var(--vscode-panel-border,var(--theia-dropdown-border,var(--ws-input-border))));--ws-select-text:var(--vscode-dropdown-foreground,var(--vscode-editor-foreground,var(--theia-dropdown-foreground,var(--ws-input-text))));--ws-select-list-bg:var(--vscode-dropdown-listBackground,var(--vscode-editorWidget-background,var(--theia-editorWidget-background,var(--ws-palette-grey-900))));--ws-input-option-hover-bg:var(--vscode-list-hoverBackground,var(--vscode-button-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(--vscode-editorWidget-background,var(--theia-inputValidation-infoBackground,var(--ws-palette-primary-200))));--ws-input-message-text:var(--vscode-editorInfo-foreground,var(--vscode-editor-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-text-muted:var(--vscode-descriptionForeground,var(--vscode-editor-foreground,var(--theia-descriptionForeground,var(--ws-palette-grey-100))));--ws-disable-bg:var(--vscode-button-disabledBackground,var(--theia-button-disabledBackground,var(--ws-palette-grey-300)));--ws-disable-input:var(--vscode-button-disabledBackground,var(--theia-button-disabledBackground,var(--ws-palette-grey-200)));--ws-panel-base-ide:var(--vscode-editor-background,var(--theia-editor-background));--ws-panel-shift-ide:var(--vscode-editor-foreground,var(--theia-panel-foreground));--ws-panel-0-mix:var(--ws-panel-base-ide);--ws-panel-1-mix:var(--ws-panel-base-ide)}@supports (color:color-mix(in lab,red,red)){:root:not(#\\#){--ws-panel-1-mix:color-mix(in srgb,var(--ws-panel-base-ide)96%,var(--ws-panel-shift-ide))}}:root:not(#\\#){--ws-panel-2-mix:var(--ws-panel-base-ide)}@supports (color:color-mix(in lab,red,red)){:root:not(#\\#){--ws-panel-2-mix:color-mix(in srgb,var(--ws-panel-base-ide)92%,var(--ws-panel-shift-ide))}}:root:not(#\\#){--ws-panel-3-mix:var(--ws-panel-base-ide)}@supports (color:color-mix(in lab,red,red)){:root:not(#\\#){--ws-panel-3-mix:color-mix(in srgb,var(--ws-panel-base-ide)88%,var(--ws-panel-shift-ide))}}:root:not(#\\#){--ws-panel-4-mix:var(--ws-panel-base-ide)}@supports (color:color-mix(in lab,red,red)){:root:not(#\\#){--ws-panel-4-mix:color-mix(in srgb,var(--ws-panel-base-ide)84%,var(--ws-panel-shift-ide))}}:root:not(#\\#){--ws-panel-5-mix:var(--ws-panel-base-ide)}@supports (color:color-mix(in lab,red,red)){:root:not(#\\#){--ws-panel-5-mix:color-mix(in srgb,var(--ws-panel-base-ide)80%,var(--ws-panel-shift-ide))}}:root:not(#\\#){--ws-panel-light-mix:var(--ws-panel-base-ide)}@supports (color:color-mix(in lab,red,red)){:root:not(#\\#){--ws-panel-light-mix:color-mix(in srgb,var(--ws-panel-base-ide)70%,var(--ws-panel-shift-ide))}}:root:not(#\\#){--ws-panel-0:var(--ws-panel-0-mix,var(--ws-palette-grey-900));--ws-panel-1:var(--ws-panel-1-mix,var(--ws-palette-grey-700));--ws-panel-2:var(--ws-panel-2-mix,var(--ws-palette-grey-900));--ws-panel-3:var(--ws-panel-3-mix,var(--ws-palette-grey-900));--ws-panel-4:var(--ws-panel-4-mix,var(--ws-palette-grey-300));--ws-panel-5:var(--ws-panel-5-mix,var(--ws-palette-grey-950));--ws-panel-light:var(--ws-panel-light-mix,var(--ws-palette-grey-200));--ws-panel-border-subtle:var(--vscode-panel-border,var(--vscode-tab-border,var(--theia-border-color,var(--ws-palette-grey-100))));--ws-panel-border-strong:var(--vscode-contrastBorder,var(--vscode-focusBorder,var(--theia-contrastBorder,var(--ws-palette-grey-300))));--ws-tab-bg-default:var(--vscode-editorGroupHeader-tabsBackground,var(--vscode-editorWidget-background,var(--ws-palette-grey-900)));--ws-tab-border:var(--vscode-tab-border,var(--vscode-editorGroupHeader-tabsBorder,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(--vscode-editor-foreground,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(--vscode-descriptionForeground,var(--ws-palette-grey-200)));--ws-tab-hover-bg:var(--vscode-tab-hoverBackground,var(--vscode-toolbar-hoverBackground,var(--ws-palette-grey-700)));--ws-panel-header-bg:var(--vscode-sideBarSectionHeader-background,var(--vscode-editorGroupHeader-tabsBackground,var(--ws-palette-grey-800)));--ws-panel-header-fg:var(--vscode-sideBarSectionHeader-foreground,var(--vscode-editor-foreground,var(--ws-bg-foreground)));--ws-panel-bg:var(--vscode-panel-background,var(--vscode-editor-background,var(--ws-bg-default)));--ws-panel-border:var(--vscode-panel-border,var(--vscode-tab-border,var(--ws-palette-grey-950)));--ws-panel-title-active-border:var(--vscode-panelTitle-activeBorder,var(--vscode-focusBorder,var(--ws-palette-primary-500)));--ws-panel-title-active-fg:var(--vscode-panelTitle-activeForeground,var(--vscode-editor-foreground,var(--ws-bg-foreground)));--ws-panel-title-inactive-fg:var(--vscode-panelTitle-inactiveForeground,var(--vscode-descriptionForeground,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}
|
|
2
|
-
`,document.head.prepend(e)}catch(e){console.error("vite-plugin-inject-css: failed to inject css",e)}})();const JD=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M18 2.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v3.67a3.001 3.001 0 0 1 0 5.66v9.67a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-9.67a3.001 3.001 0 0 1 0-5.66V2.5ZM11.5 2a.5.5 0 0 0-.5.5v9.67a3.001 3.001 0 0 0 0 5.66v3.67a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-3.67a3.001 3.001 0 0 0 0-5.66V2.5a.5.5 0 0 0-.5-.5h-1ZM4.5 2a.5.5 0 0 0-.5.5v3.67a3.001 3.001 0 0 0 0 5.66v9.67a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-9.67a3.001 3.001 0 0 0 0-5.66V2.5a.5.5 0 0 0-.5-.5h-1Z",fill:"currentColor"})}),wi=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M8.82 19.748c.001.245.075.486.214.69l.38 1.004c.117.172.573.312.758.41.185.097.391.148.601.148h2.454c.21 0 .417-.05.601-.148.185-.098.621-.238.737-.41l.402-1.003c.138-.205.213-.445.213-.691l.001-1.498H8.82l.002 1.498ZM5 8.875c0 1.733.654 3.314 1.732 4.522.658.737 1.685 2.275 2.077 3.573l.004.03h6.374l.004-.03c.392-1.298 1.42-2.836 2.076-3.573A6.766 6.766 0 0 0 19 8.875C19 5.07 15.854 1.988 11.978 2 7.921 2.012 5 5.241 5 8.875Z",fill:"currentColor"})}),mV=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Zm5.645-14.836a.5.5 0 0 0-.707-.034l-7.703 6.997-1.67-1.684a.5.5 0 0 0-.707-.003l-.71.704a.5.5 0 0 0-.003.707l2.386 2.408.266.292a.5.5 0 0 0 .42.162.498.498 0 0 0 .325-.144l.225-.223 8.516-7.736a.5.5 0 0 0 .034-.706l-.672-.74Z",fill:"currentColor"})}),bV=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.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"})}),QD=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M10.84 2.714c0-.394.346-.714.773-.714h.774c.427 0 .773.32.773.714V9.5h5.025c.427 0 .773.32.773.714v3.572H5.042v-3.572c0-.394.346-.714.773-.714h5.025V2.714ZM5.042 14.5h13.916l1.034 6.685c.067.43-.295.815-.765.815h-2.1l-.681-5.929L15.764 22h-3.236l-.721-2.143L11.086 22h-2.85l-.682-3.929L6.872 22H4.773c-.47 0-.832-.385-.765-.815L5.042 14.5Z",fill:"currentColor"})}),hd=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.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"})}),ej=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.071 19.071c3.905-3.905 3.905-10.237 0-14.142-3.905-3.905-10.237-3.905-14.142 0-3.905 3.905-3.905 10.237 0 14.142 3.905 3.905 10.237 3.905 14.142 0Zm-3.182-4.596a.5.5 0 0 1 0 .707l-.707.707a.5.5 0 0 1-.707 0L12 13.414 9.525 15.89a.5.5 0 0 1-.707 0l-.707-.707a.5.5 0 0 1 0-.707L10.586 12 8.11 9.525a.5.5 0 0 1 0-.707l.707-.707a.5.5 0 0 1 .707 0L12 10.586l2.475-2.475a.5.5 0 0 1 .707 0l.707.707a.5.5 0 0 1 0 .707L13.414 12l2.475 2.475Z",fill:"currentColor"})}),tj=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{d:"M7.126 7.145c-.19-.2-.5-.2-.69 0l-3.538 3.703-.008.008a.403.403 0 0 0-.013.013l-.733.767a.525.525 0 0 0 0 .724l.733.767a.622.622 0 0 0 .019.02l3.54 3.704c.19.2.5.2.69 0l.733-.767c.19-.2.19-.523 0-.723l-3.213-3.363L7.86 8.635c.19-.2.19-.523 0-.723l-.733-.767ZM16.875 16.85c.191.2.5.2.691 0l3.537-3.702a.549.549 0 0 0 .022-.022l.733-.767a.525.525 0 0 0 0-.724l-.733-.767a.564.564 0 0 0-.02-.019l-3.539-3.705c-.19-.2-.5-.2-.69 0l-.733.767c-.19.2-.19.523 0 .723l3.212 3.363-3.212 3.363c-.191.2-.191.524 0 .723l.732.767Z",fill:"currentColor"}),O.jsx("path",{d:"M9 12.995a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM13 11.995a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM15 12.995a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",fill:"currentColor"})]}),yV=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 4v13a2 2 0 0 1-2 2V4H5a2 2 0 0 1 2-2h13a2 2 0 0 1 2 2Z",fill:"currentColor"}),O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 20V8H4v12h12Zm1 2a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h14Z",fill:"currentColor"}),O.jsx("path",{d:"M14 15v-2H6v2h8ZM18 17h2v2h-2v-2ZM7 4v2H5V4h2Z",fill:"currentColor"})]}),xV=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M4.221 16.944a.383.383 0 0 1-.373-.283L2.012 9.525c-.08-.312.256-.57.55-.422l4.124 2.077c.177.09.395.032.502-.131l4.487-6.875a.39.39 0 0 1 .65 0l4.487 6.875c.107.163.325.22.502.131l4.124-2.077c.294-.148.63.11.55.422l-1.836 7.136a.383.383 0 0 1-.373.283H4.22ZM4.221 19a.38.38 0 0 1 .385-.374H19.61a.38.38 0 0 1 .385.374v.747a.38.38 0 0 1-.385.374H4.606a.38.38 0 0 1-.385-.373V19Z",fill:"currentColor"})}),rj=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M11.701 18.797c.206.195.52.195.726 0l2.487-2.349-.008-.007 6.973-6.585a.58.58 0 0 0 0-.835l-2.045-1.932a.524.524 0 0 0-.726 0l-7.052 6.66-7.051-6.66a.524.524 0 0 0-.726 0L2.234 9.021a.58.58 0 0 0 0 .835l9.467 8.941Z",fill:"currentColor"})}),nj=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.987 11.615c0-.346.291-.626.65-.626H21.35c.36 0 .651.28.651.626v8.758a.639.639 0 0 1-.65.626H9.637c-.36 0-.651-.28-.651-.626v-8.758Zm7.808 1.877h-6.507v2.502h6.507v-2.502Zm1.301 0H20.7v6.256h-2.603V13.49Zm-1.301 3.753h-6.507v2.503h6.507v-2.503Z",fill:"currentColor"}),O.jsx("path",{d:"M6.294 8.386h-.87c-.23 0-.441-.07-.581-.25a.911.911 0 0 1-.17-.5c0-.18.06-.34.17-.48.14-.201.35-.281.59-.281h.871c0-.47 0-.981.02-1.552.03-.69.14-1.281.33-1.781.21-.511.541-.901.992-1.152.44-.25.91-.39 1.391-.39.58 0 1.091.18 1.552.53.48.37.7.921.7 1.592 0 .19-.05.39-.2.52-.12.11-.27.16-.43.16a.96.96 0 0 1-.51-.16.926.926 0 0 1-.341-.37v-.03c-.03-.1-.06-.18-.08-.26v-.04a.825.825 0 0 0-.06-.19c-.03-.07-.08-.12-.18-.16a.938.938 0 0 0-.37-.07c-.181 0-.381.05-.601.16a.84.84 0 0 0-.41.42c-.101.22-.251.49-.251.941v1.822h2.602c.27.04.43.11.581.27.1.15.17.32.17.5s-.06.341-.17.481c-.14.2-.35.28-.59.28H7.855v8.269c0 .73-.1 1.421-.2 2.072-.1.66-.26 1.221-.49 1.691-.241.51-.581.901-1.022 1.162-.42.27-.88.41-1.381.41-.66 0-1.251-.23-1.792-.68-.39-.341-.65-.751-.77-1.242-.13-.46-.201-.91-.201-1.351 0-.23.07-.44.26-.57.15-.111.31-.171.5-.171.191 0 .371.06.521.17.19.14.26.34.26.57 0 .251.03.521.1.832.06.29.18.48.331.61.27.22.53.32.79.32.201 0 .381-.06.561-.17.19-.11.34-.28.45-.52.16-.32.281-.781.361-1.382.08-.61.14-1.27.17-1.992V8.376l-.01.01Z",fill:"currentColor"})]}),ij=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{d:"M15.493 19.397c-2.887 0-5.374-.466-6.506-1.137v1.788C8.987 21.126 11.9 22 15.493 22 19.087 22 22 21.126 22 20.048V18.26c-1.132.671-3.62 1.137-6.507 1.137ZM8.987 13.055c1.132.671 3.62 1.137 6.506 1.137 2.888 0 5.375-.466 6.507-1.137v-2.116c0-1.078-2.913-1.952-6.507-1.952-3.593 0-6.506.874-6.506 1.952v2.116ZM8.987 14.356v2.603c1.132.67 3.62 1.137 6.506 1.137 2.888 0 5.375-.466 6.507-1.137v-2.603c-1.132.671-3.62 1.137-6.507 1.137-2.887 0-5.374-.466-6.506-1.137Z",fill:"currentColor"}),O.jsx("path",{d:"M6.294 8.386h-.87c-.23 0-.441-.07-.581-.25a.911.911 0 0 1-.17-.5c0-.18.06-.34.17-.48.14-.201.35-.281.59-.281h.871c0-.47 0-.981.02-1.552.03-.69.14-1.281.33-1.781.21-.511.541-.901.992-1.152.44-.25.91-.39 1.391-.39.58 0 1.091.18 1.552.53.48.37.7.921.7 1.592 0 .19-.05.39-.2.52-.12.11-.27.16-.43.16a.96.96 0 0 1-.51-.16.926.926 0 0 1-.341-.37v-.03c-.03-.1-.06-.18-.08-.26v-.04a.825.825 0 0 0-.06-.19c-.03-.07-.08-.12-.18-.16a.938.938 0 0 0-.37-.07c-.181 0-.381.05-.601.16a.84.84 0 0 0-.41.42c-.101.22-.251.49-.251.941v1.822h2.602c.27.04.43.11.581.27.1.15.17.32.17.5s-.06.341-.17.481c-.14.2-.35.28-.59.28H7.855v8.269c0 .73-.1 1.421-.2 2.072-.1.66-.26 1.221-.49 1.691-.241.51-.581.901-1.022 1.162-.42.27-.88.41-1.381.41-.66 0-1.251-.23-1.792-.68-.39-.341-.65-.751-.77-1.242-.13-.46-.201-.91-.201-1.351 0-.23.07-.44.26-.57.15-.111.31-.171.5-.171.191 0 .371.06.521.17.19.14.26.34.26.57 0 .251.03.521.1.832.06.29.18.48.331.61.27.22.53.32.79.32.201 0 .381-.06.561-.17.19-.11.34-.28.45-.52.16-.32.281-.781.361-1.382.08-.61.14-1.27.17-1.992V8.376l-.01.01Z",fill:"currentColor"})]}),oj=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m15.666 9.018 6.002 2.193c.2.073.332.263.332.476v6.867c0 .193-.11.37-.283.455l-6.002 2.94a.504.504 0 0 1-.443 0l-6.002-2.94a.507.507 0 0 1-.283-.455v-6.867c0-.213.133-.403.332-.476l6.002-2.193a.503.503 0 0 1 .345 0Zm4.77 3.528-4.993-1.922-4.993 1.922 4.993 2.024 4.994-2.024Zm.263 1.646-4.348 1.845v3.845L20.7 17.77v-3.579Z",fill:"currentColor"}),O.jsx("path",{d:"M6.294 8.386h-.87c-.23 0-.441-.07-.581-.25a.911.911 0 0 1-.17-.5c0-.18.06-.34.17-.48.14-.201.35-.281.59-.281h.871c0-.47 0-.981.02-1.552.03-.69.14-1.281.33-1.781.21-.511.541-.901.992-1.152.44-.25.91-.39 1.391-.39.58 0 1.091.18 1.552.53.48.37.7.921.7 1.592 0 .19-.05.39-.2.52-.12.11-.27.16-.43.16a.96.96 0 0 1-.51-.16.926.926 0 0 1-.341-.37v-.03c-.03-.1-.06-.18-.08-.26v-.04a.825.825 0 0 0-.06-.19c-.03-.07-.08-.12-.18-.16a.938.938 0 0 0-.37-.07c-.181 0-.381.05-.601.16a.84.84 0 0 0-.41.42c-.101.22-.251.49-.251.941v1.822h2.602c.27.04.43.11.581.27.1.15.17.32.17.5s-.06.341-.17.481c-.14.2-.35.28-.59.28H7.855v8.269c0 .73-.1 1.421-.2 2.072-.1.66-.26 1.221-.49 1.691-.241.51-.581.901-1.022 1.162-.42.27-.88.41-1.381.41-.66 0-1.251-.23-1.792-.68-.39-.341-.65-.751-.77-1.242-.13-.46-.201-.91-.201-1.351 0-.23.07-.44.26-.57.15-.111.31-.171.5-.171.191 0 .371.06.521.17.19.14.26.34.26.57 0 .251.03.521.1.832.06.29.18.48.331.61.27.22.53.32.79.32.201 0 .381-.06.561-.17.19-.11.34-.28.45-.52.16-.32.281-.781.361-1.382.08-.61.14-1.27.17-1.992V8.376l-.01.01Z",fill:"currentColor"})]}),aj=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{d:"M21.735 10.502c.352.204.354.744.004.951l-5.954 3.516a.474.474 0 0 1-.484.002l-6.05-3.516c-.354-.206-.352-.752.004-.954l6.05-3.453a.474.474 0 0 1 .476.002l5.954 3.452Z",fill:"currentColor"}),O.jsx("path",{d:"M20.253 13.146a.474.474 0 0 0-.483.002L15.785 15.5a.474.474 0 0 1-.484.002l-4.059-2.36a.474.474 0 0 0-.477-.001l-1.51.862c-.356.203-.358.748-.004.954l6.05 3.516c.151.088.333.087.484-.002l5.954-3.516c.35-.206.348-.747-.004-.95l-1.482-.86Z",fill:"currentColor"}),O.jsx("path",{d:"M20.253 16.606a.474.474 0 0 0-.483.002l-3.985 2.354a.474.474 0 0 1-.484.001l-4.059-2.359a.474.474 0 0 0-.477-.002l-1.51.862c-.356.203-.358.749-.004.955l6.05 3.516c.151.087.333.087.484-.002l5.954-3.516c.35-.207.348-.747-.004-.951l-1.482-.86ZM6.294 8.386h-.87c-.23 0-.441-.07-.581-.25a.911.911 0 0 1-.17-.5c0-.18.06-.34.17-.48.14-.201.35-.281.59-.281h.871c0-.47 0-.981.02-1.552.03-.69.14-1.281.33-1.781.21-.511.541-.901.992-1.152.44-.25.91-.39 1.391-.39.58 0 1.091.18 1.552.53.48.37.7.921.7 1.592 0 .19-.05.39-.2.52-.12.11-.27.16-.43.16a.96.96 0 0 1-.51-.16.926.926 0 0 1-.341-.37v-.03c-.03-.1-.06-.18-.08-.26v-.04a.825.825 0 0 0-.06-.19c-.03-.07-.08-.12-.18-.16a.938.938 0 0 0-.37-.07c-.181 0-.381.05-.601.16a.84.84 0 0 0-.41.42c-.101.22-.251.49-.251.941v1.822h2.602c.27.04.43.11.581.27.1.15.17.32.17.5s-.06.341-.17.481c-.14.2-.35.28-.59.28H7.855v8.269c0 .73-.1 1.421-.2 2.072-.1.66-.26 1.221-.49 1.691-.241.51-.581.901-1.022 1.162-.42.27-.88.41-1.381.41-.66 0-1.251-.23-1.792-.68-.39-.341-.65-.751-.77-1.242-.13-.46-.201-.91-.201-1.351 0-.23.07-.44.26-.57.15-.111.31-.171.5-.171.191 0 .371.06.521.17.19.14.26.34.26.57 0 .251.03.521.1.832.06.29.18.48.331.61.27.22.53.32.79.32.201 0 .381-.06.561-.17.19-.11.34-.28.45-.52.16-.32.281-.781.361-1.382.08-.61.14-1.27.17-1.992V8.376l-.01.01Z",fill:"currentColor"})]}),sj=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m21.668 11.21-6.002-2.192a.503.503 0 0 0-.345 0L9.319 11.21a.506.506 0 0 0-.332.476v6.867c0 .193.11.37.283.455l6.002 2.94c.14.068.303.068.443 0l6.002-2.94a.507.507 0 0 0 .283-.455v-6.867a.506.506 0 0 0-.332-.476Zm-7.159-.271a.534.534 0 0 0-.244.052l-1.22.508c-.103.034-.154.112-.154.234v1.496c0 .122.051.182.154.182h.051l1.22-.247c.018-.008.03-.004.039.013.017.018.025.035.025.052v4.867h-1.326a.163.163 0 0 0-.163.163v1.626c0 .09.073.163.163.163h4.88c.09 0 .162-.073.162-.163V18.26a.163.163 0 0 0-.163-.163h-1.138v-6.962a.195.195 0 0 0-.052-.143.19.19 0 0 0-.14-.052h-2.094Z",fill:"currentColor"}),O.jsx("path",{d:"M6.294 8.386h-.87c-.23 0-.441-.07-.581-.25a.911.911 0 0 1-.17-.5c0-.18.06-.34.17-.48.14-.201.35-.281.59-.281h.871c0-.47 0-.981.02-1.552.03-.69.14-1.281.33-1.781.21-.511.541-.901.992-1.152.44-.25.91-.39 1.391-.39.58 0 1.091.18 1.552.53.48.37.7.921.7 1.592 0 .19-.05.39-.2.52-.12.11-.27.16-.43.16a.96.96 0 0 1-.51-.16.926.926 0 0 1-.341-.37v-.03c-.03-.1-.06-.18-.08-.26v-.04a.825.825 0 0 0-.06-.19c-.03-.07-.08-.12-.18-.16a.938.938 0 0 0-.37-.07c-.181 0-.381.05-.601.16a.84.84 0 0 0-.41.42c-.101.22-.251.49-.251.941v1.822h2.602c.27.04.43.11.581.27.1.15.17.32.17.5s-.06.341-.17.481c-.14.2-.35.28-.59.28H7.855v8.269c0 .73-.1 1.421-.2 2.072-.1.66-.26 1.221-.49 1.691-.241.51-.581.901-1.022 1.162-.42.27-.88.41-1.381.41-.66 0-1.251-.23-1.792-.68-.39-.341-.65-.751-.77-1.242-.13-.46-.201-.91-.201-1.351 0-.23.07-.44.26-.57.15-.111.31-.171.5-.171.191 0 .371.06.521.17.19.14.26.34.26.57 0 .251.03.521.1.832.06.29.18.48.331.61.27.22.53.32.79.32.201 0 .381-.06.561-.17.19-.11.34-.28.45-.52.16-.32.281-.781.361-1.382.08-.61.14-1.27.17-1.992V8.376l-.01.01Z",fill:"currentColor"})]}),pd=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M7.907 11.533c-1.762 0-3.19-1.462-3.19-3.266S6.145 5 7.907 5s3.19 1.463 3.19 3.267c0 1.804-1.428 3.266-3.19 3.266ZM7.907 13.4c3.119 0 5.675 2.467 5.908 5.6H2c.233-3.133 2.789-5.6 5.907-5.6ZM12.903 8.267c0 1.804 1.428 3.266 3.19 3.266s3.19-1.462 3.19-3.266S17.855 5 16.093 5s-3.19 1.463-3.19 3.267ZM22 19c-.233-3.133-2.789-5.6-5.907-5.6-1.371 0-2.633.477-3.637 1.277A6.099 6.099 0 0 1 14.726 19H22Z",fill:"currentColor"})}),wV=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{d:"M13.912 15.708v.075h-3.738v-.075c0-1.122.837-2.031 1.869-2.031s1.869.91 1.869 2.03ZM12.669 18.044a.7.7 0 0 1-.332.6v.789h-.665v-.787a.7.7 0 0 1-.334-.602c0-.383.298-.694.665-.694.368 0 .666.31.666.694Z",fill:"currentColor"}),O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 20v2H4v-2a8 8 0 1 1 16 0Zm-5-4.217h-.466v-.075c0-1.496-1.115-2.708-2.491-2.708-1.376 0-2.492 1.212-2.492 2.708v.075H9V20.6c0 .22.172.4.383.4h5.234c.211 0 .383-.18.383-.4v-4.818Z",fill:"currentColor"}),O.jsx("path",{d:"M7.68 6.433c0 2.449 1.934 4.434 4.32 4.434s4.32-1.985 4.32-4.434C16.32 3.985 14.386 2 12 2S7.68 3.985 7.68 6.433Z",fill:"currentColor"})]}),on=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 21c5.523 0 10-4.477 10-10S16.523 1 11 1 1 5.477 1 11s4.477 10 10 10Zm0-14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm1 1.5a.5.5 0 0 0-.5-.5h-2a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h.5v4h-.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5H12V8.5Z",fill:"currentColor"})}),Ew=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{d:"M13 17.5a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-8a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v8ZM12 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z",fill:"currentColor"}),O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z",fill:"currentColor"})]}),lj=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 2a1 1 0 0 0-1 1v1h10V3a1 1 0 0 0-1-1H8Zm9 3H7v1h10V5ZM7 8V7h10v1a1 1 0 0 1-1 1h-3.5v2H17a1 1 0 0 1 1 1v3h3a1 1 0 0 1 1 1v1h-9v-1a1 1 0 0 1 1-1h3v-2.5a.5.5 0 0 0-.5-.5h-9a.5.5 0 0 0-.5.5V15h3a1 1 0 0 1 1 1v1H2v-1a1 1 0 0 1 1-1h3v-3a1 1 0 0 1 1-1h4.5V9H8a1 1 0 0 1-1-1Zm15 10h-9v1h9v-1Zm-9 3v-1h9v1a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1ZM2 18h9v1H2v-1Zm0 2v1a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1v-1H2Z",fill:"currentColor"})}),cj=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m19 10 1.965-1.964a3.536 3.536 0 0 0-5-5L14 5l5 5Zm-1 1-5-5L2.146 16.854a.5.5 0 0 0-.146.353V21.5a.5.5 0 0 0 .5.5h4.293a.5.5 0 0 0 .353-.146L18 11Z",fill:"currentColor"})}),ja=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Zm1-5.5a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5V13H7.5a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5H11V7.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5V11h3.5a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5H13v3.5Z",fill:"currentColor"})}),SV=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M11.83 20c4.492 0 8.134-3.582 8.134-8s-3.642-8-8.134-8a8.177 8.177 0 0 0-5.704 2.297l1.332.766a.494.494 0 0 1-.013.863L2.76 10.505a.5.5 0 0 1-.746-.429L2 4.796a.506.506 0 0 1 .758-.434l1.562.897A10.217 10.217 0 0 1 11.83 2c5.615 0 10.167 4.477 10.167 10S17.445 22 11.83 22A10.205 10.205 0 0 1 3.5 17.733c-.225-.315.012-.733.398-.733h1.346c.15 0 .292.068.39.182A8.172 8.172 0 0 0 11.83 20Z",fill:"currentColor"})}),EV=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.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"})}),uj=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M18.797 12.299a.524.524 0 0 0 0-.726l-2.349-2.487-.007.008L9.856 2.12a.58.58 0 0 0-.835 0L7.089 4.166a.524.524 0 0 0 0 .726l6.66 7.051-6.66 7.053a.524.524 0 0 0 0 .725l1.932 2.045a.58.58 0 0 0 .835 0l8.941-9.467Z",fill:"currentColor"})}),_V=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.076 2.203a.5.5 0 0 0-.354-.146H3.001a1 1 0 0 0-1 1v18a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V8.335a.5.5 0 0 0-.147-.354l-5.778-5.778ZM12 19.057a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm-8-14.5a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-4Z",fill:"currentColor"})}),dj=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.774 15.7A7.513 7.513 0 0 1 4.2 4.2a7.511 7.511 0 0 1 10.623 0 7.515 7.515 0 0 1 .876 9.573l6.01 6.01a.995.995 0 0 1 0 1.407l-.52.519a.995.995 0 0 1-1.406 0l-6.009-6.01Zm-1.076-3a4.507 4.507 0 1 1-6.373-6.374 4.507 4.507 0 0 1 6.373 6.373Z",fill:"currentColor"})}),fj=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m21.49 5.418-9.224-3.371a.774.774 0 0 0-.532 0L2.51 5.417A.778.778 0 0 0 2 6.15v10.554c0 .298.169.57.435.7l9.224 4.518a.774.774 0 0 0 .681 0l9.224-4.518a.779.779 0 0 0 .436-.7V6.15a.778.778 0 0 0-.51-.731ZM10.487 5a.82.82 0 0 0-.375.08l-1.875.78c-.158.053-.237.173-.237.36v2.3c0 .187.079.28.237.28h.079l1.875-.38c.026-.013.046-.007.059.02.026.027.04.053.04.08V16H8.25a.25.25 0 0 0-.25.25v2.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-2.5a.25.25 0 0 0-.25-.25H14V5.3a.3.3 0 0 0-.079-.22.291.291 0 0 0-.217-.08h-3.217Z",fill:"currentColor"})}),hj=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 4a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1H3Zm5 2H4v3h4V6Zm-4 5h4v7H4v-7Zm10-5h-4v3h4V6Zm2 0h4v3h-4V6Zm4 5h-4v7h4v-7Z",fill:"currentColor"})}),Pu=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 5a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5Zm12 3H4v4h10V8Zm2 0h4v10h-4V8Zm-2 6H4v4h10v-4Z",fill:"currentColor"})}),pj=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M9 3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v1h6.5a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-19a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5H9V3ZM4 7h16l-.934 14.071a1 1 0 0 1-.997.929H5.93a1 1 0 0 1-.997-.929L4 7Z",fill:"currentColor"})}),OV=(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},CV=(e,t)=>({classGroupId:e,validator:t}),vj=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Mu="-",TO=[],IV="arbitrary..",RV=e=>{const t=TV(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return NV(i);const o=i.split(Mu),a=o[0]===""&&o.length>1?1:0;return gj(o,a,t)},getConflictingClassGroupIds:(i,o)=>{if(o){const a=n[i],s=r[i];return a?s?OV(s,a):a:s||TO}return r[i]||TO}}},gj=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],i=r.nextPart.get(n);if(i){const c=gj(e,t+1,i);if(c)return c}const o=r.validators;if(o===null)return;const a=t===0?e.join(Mu):e.slice(t).join(Mu),s=o.length;for(let c=0;c<s;c++){const u=o[c];if(u.validator(a))return u.classGroupId}},NV=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?IV+n:void 0})(),TV=e=>{const{theme:t,classGroups:r}=e;return PV(r,t)},PV=(e,t)=>{const r=vj();for(const n in e){const i=e[n];i1(i,r,n,t)}return r},i1=(e,t,r,n)=>{const i=e.length;for(let o=0;o<i;o++){const a=e[o];MV(a,t,r,n)}},MV=(e,t,r,n)=>{if(typeof e=="string"){kV(e,t,r);return}if(typeof e=="function"){AV(e,t,r,n);return}DV(e,t,r,n)},kV=(e,t,r)=>{const n=e===""?t:mj(t,e);n.classGroupId=r},AV=(e,t,r,n)=>{if(jV(e)){i1(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(CV(r,e))},DV=(e,t,r,n)=>{const i=Object.entries(e),o=i.length;for(let a=0;a<o;a++){const[s,c]=i[a];i1(c,mj(t,s),r,n)}},mj=(e,t)=>{let r=e;const n=t.split(Mu),i=n.length;for(let o=0;o<i;o++){const a=n[o];let s=r.nextPart.get(a);s||(s=vj(),r.nextPart.set(a,s)),r=s}return r},jV=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,qV=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(o,a)=>{r[o]=a,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(o){let a=r[o];if(a!==void 0)return a;if((a=n[o])!==void 0)return i(o,a),a},set(o,a){o in r?r[o]=a:i(o,a)}}},_w="!",PO=":",zV=[],MO=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),LV=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const o=[];let a=0,s=0,c=0,u;const d=i.length;for(let m=0;m<d;m++){const g=i[m];if(a===0&&s===0){if(g===PO){o.push(i.slice(c,m)),c=m+1;continue}if(g==="/"){u=m;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const h=o.length===0?i:i.slice(c);let p=h,v=!1;h.endsWith(_w)?(p=h.slice(0,-1),v=!0):h.startsWith(_w)&&(p=h.slice(1),v=!0);const y=u&&u>c?u-c:void 0;return MO(o,v,p,y)};if(t){const i=t+PO,o=n;n=a=>a.startsWith(i)?o(a.slice(i.length)):MO(zV,!1,a,void 0,!0)}if(r){const i=n;n=o=>r({className:o,parseClassName:i})}return n},BV=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let o=0;o<r.length;o++){const a=r[o],s=a[0]==="[",c=t.has(a);s||c?(i.length>0&&(i.sort(),n.push(...i),i=[]),n.push(a)):i.push(a)}return i.length>0&&(i.sort(),n.push(...i)),n}},FV=e=>({cache:qV(e.cacheSize),parseClassName:LV(e),sortModifiers:BV(e),...RV(e)}),$V=/\s+/,VV=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:o}=t,a=[],s=e.trim().split($V);let c="";for(let u=s.length-1;u>=0;u-=1){const d=s[u],{isExternal:h,modifiers:p,hasImportantModifier:v,baseClassName:y,maybePostfixModifierPosition:m}=r(d);if(h){c=d+(c.length>0?" "+c:c);continue}let g=!!m,w=n(g?y.substring(0,m):y);if(!w){if(!g){c=d+(c.length>0?" "+c:c);continue}if(w=n(y),!w){c=d+(c.length>0?" "+c:c);continue}g=!1}const x=p.length===0?"":p.length===1?p[0]:o(p).join(":"),_=v?x+_w:x,S=_+w;if(a.indexOf(S)>-1)continue;a.push(S);const E=i(w,g);for(let I=0;I<E.length;++I){const N=E[I];a.push(_+N)}c=d+(c.length>0?" "+c:c)}return c},HV=(...e)=>{let t=0,r,n,i="";for(;t<e.length;)(r=e[t++])&&(n=bj(r))&&(i&&(i+=" "),i+=n);return i},bj=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=bj(e[n]))&&(r&&(r+=" "),r+=t);return r},kO=(e,...t)=>{let r,n,i,o;const a=c=>{const u=t.reduce((d,h)=>h(d),e());return r=FV(u),n=r.cache.get,i=r.cache.set,o=s,s(c)},s=c=>{const u=n(c);if(u)return u;const d=VV(c,r);return i(c,d),d};return o=a,(...c)=>o(HV(...c))},WV=[],Xt=e=>{const t=r=>r[e]||WV;return t.isThemeGetter=!0,t},yj=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xj=/^\((?:(\w[\w-]*):)?(.+)\)$/i,UV=/^\d+\/\d+$/,GV=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,KV=/\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$/,YV=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,XV=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ZV=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,na=e=>UV.test(e),Ge=e=>!!e&&!Number.isNaN(Number(e)),Li=e=>!!e&&Number.isInteger(Number(e)),Nh=e=>e.endsWith("%")&&Ge(e.slice(0,-1)),bi=e=>GV.test(e),JV=()=>!0,QV=e=>KV.test(e)&&!YV.test(e),wj=()=>!1,eH=e=>XV.test(e),tH=e=>ZV.test(e),rH=e=>!Re(e)&&!Ne(e),nH=e=>qa(e,_j,wj),Re=e=>yj.test(e),go=e=>qa(e,Oj,QV),Th=e=>qa(e,lH,Ge),AO=e=>qa(e,Sj,wj),iH=e=>qa(e,Ej,tH),Pc=e=>qa(e,Cj,eH),Ne=e=>xj.test(e),xs=e=>za(e,Oj),oH=e=>za(e,cH),DO=e=>za(e,Sj),aH=e=>za(e,_j),sH=e=>za(e,Ej),Mc=e=>za(e,Cj,!0),qa=(e,t,r)=>{const n=yj.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},za=(e,t,r=!1)=>{const n=xj.exec(e);return n?n[1]?t(n[1]):r:!1},Sj=e=>e==="position"||e==="percentage",Ej=e=>e==="image"||e==="url",_j=e=>e==="length"||e==="size"||e==="bg-size",Oj=e=>e==="length",lH=e=>e==="number",cH=e=>e==="family-name",Cj=e=>e==="shadow",jO=()=>{const e=Xt("color"),t=Xt("font"),r=Xt("text"),n=Xt("font-weight"),i=Xt("tracking"),o=Xt("leading"),a=Xt("breakpoint"),s=Xt("container"),c=Xt("spacing"),u=Xt("radius"),d=Xt("shadow"),h=Xt("inset-shadow"),p=Xt("text-shadow"),v=Xt("drop-shadow"),y=Xt("blur"),m=Xt("perspective"),g=Xt("aspect"),w=Xt("ease"),x=Xt("animate"),_=()=>["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"],E=()=>[...S(),Ne,Re],I=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],T=()=>[Ne,Re,c],M=()=>[na,"full","auto",...T()],z=()=>[Li,"none","subgrid",Ne,Re],j=()=>["auto",{span:["full",Li,Ne,Re]},Li,Ne,Re],W=()=>[Li,"auto",Ne,Re],U=()=>["auto","min","max","fr",Ne,Re],A=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...T()],te=()=>[na,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],G=()=>[e,Ne,Re],re=()=>[...S(),DO,AO,{position:[Ne,Re]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",aH,nH,{size:[Ne,Re]}],X=()=>[Nh,xs,go],Q=()=>["","none","full",u,Ne,Re],D=()=>["",Ge,xs,go],$=()=>["solid","dashed","dotted","double"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[Ge,Nh,DO,AO],Y=()=>["","none",y,Ne,Re],ie=()=>["none",Ge,Ne,Re],ne=()=>["none",Ge,Ne,Re],ve=()=>[Ge,Ne,Re],Z=()=>[na,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[bi],breakpoint:[bi],color:[JV],container:[bi],"drop-shadow":[bi],ease:["in","out","in-out"],font:[rH],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[bi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[bi],shadow:[bi],spacing:["px",Ge],text:[bi],"text-shadow":[bi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",na,Re,Ne,g]}],container:["container"],columns:[{columns:[Ge,Re,Ne,s]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"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:E()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[Li,"auto",Ne,Re]}],basis:[{basis:[na,"full","auto",s,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ge,na,"auto","initial","none",Re]}],grow:[{grow:["",Ge,Ne,Re]}],shrink:[{shrink:["",Ge,Ne,Re]}],order:[{order:[Li,"first","last","none",Ne,Re]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...A(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...A()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:te()}],w:[{w:[s,"screen",...te()]}],"min-w":[{"min-w":[s,"screen","none",...te()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...te()]}],h:[{h:["screen","lh",...te()]}],"min-h":[{"min-h":["screen","lh","none",...te()]}],"max-h":[{"max-h":["screen","lh",...te()]}],"font-size":[{text:["base",r,xs,go]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Ne,Th]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Nh,Re]}],"font-family":[{font:[oH,Re,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Ne,Re]}],"line-clamp":[{"line-clamp":[Ge,"none",Ne,Th]}],leading:[{leading:[o,...T()]}],"list-image":[{"list-image":["none",Ne,Re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ne,Re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ge,"from-font","auto",Ne,go]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[Ge,"auto",Ne,Re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ne,Re]}],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",Ne,Re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Li,Ne,Re],radial:["",Ne,Re],conic:[Li,Ne,Re]},sH,iH]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:X()}],"gradient-via-pos":[{via:X()}],"gradient-to-pos":[{to:X()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...$(),"hidden","none"]}],"divide-style":[{divide:[...$(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...$(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ge,Ne,Re]}],"outline-w":[{outline:["",Ge,xs,go]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",d,Mc,Pc]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",h,Mc,Pc]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[Ge,go]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",p,Mc,Pc]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[Ge,Ne,Re]}],"mix-blend":[{"mix-blend":[...H(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":H()}],"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":[Ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[Ne,Re]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"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":[Ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ne,Re]}],filter:[{filter:["","none",Ne,Re]}],blur:[{blur:Y()}],brightness:[{brightness:[Ge,Ne,Re]}],contrast:[{contrast:[Ge,Ne,Re]}],"drop-shadow":[{"drop-shadow":["","none",v,Mc,Pc]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",Ge,Ne,Re]}],"hue-rotate":[{"hue-rotate":[Ge,Ne,Re]}],invert:[{invert:["",Ge,Ne,Re]}],saturate:[{saturate:[Ge,Ne,Re]}],sepia:[{sepia:["",Ge,Ne,Re]}],"backdrop-filter":[{"backdrop-filter":["","none",Ne,Re]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[Ge,Ne,Re]}],"backdrop-contrast":[{"backdrop-contrast":[Ge,Ne,Re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ge,Ne,Re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ge,Ne,Re]}],"backdrop-invert":[{"backdrop-invert":["",Ge,Ne,Re]}],"backdrop-opacity":[{"backdrop-opacity":[Ge,Ne,Re]}],"backdrop-saturate":[{"backdrop-saturate":[Ge,Ne,Re]}],"backdrop-sepia":[{"backdrop-sepia":["",Ge,Ne,Re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ne,Re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ge,"initial",Ne,Re]}],ease:[{ease:["linear","initial",w,Ne,Re]}],delay:[{delay:[Ge,Ne,Re]}],animate:[{animate:["none",x,Ne,Re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Ne,Re]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:ie()}],"rotate-x":[{"rotate-x":ie()}],"rotate-y":[{"rotate-y":ie()}],"rotate-z":[{"rotate-z":ie()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[Ne,Re,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Z()}],"translate-x":[{"translate-x":Z()}],"translate-y":[{"translate-y":Z()}],"translate-z":[{"translate-z":Z()}],"translate-none":["translate-none"],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}],"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",Ne,Re]}],"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":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",Ne,Re]}],fill:[{fill:["none",...G()]}],"stroke-w":[{stroke:[Ge,xs,go,Th]}],stroke:[{stroke:["none",...G()]}],"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"]}},uH=(e,{cacheSize:t,prefix:r,experimentalParseClassName:n,extend:i={},override:o={}})=>(Vs(e,"cacheSize",t),Vs(e,"prefix",r),Vs(e,"experimentalParseClassName",n),kc(e.theme,o.theme),kc(e.classGroups,o.classGroups),kc(e.conflictingClassGroups,o.conflictingClassGroups),kc(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),Vs(e,"orderSensitiveModifiers",o.orderSensitiveModifiers),Ac(e.theme,i.theme),Ac(e.classGroups,i.classGroups),Ac(e.conflictingClassGroups,i.conflictingClassGroups),Ac(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Ij(e,i,"orderSensitiveModifiers"),e),Vs=(e,t,r)=>{r!==void 0&&(e[t]=r)},kc=(e,t)=>{if(t)for(const r in t)Vs(e,r,t[r])},Ac=(e,t)=>{if(t)for(const r in t)Ij(e,t,r)},Ij=(e,t,r)=>{const n=t[r];n!==void 0&&(e[r]=e[r]?e[r].concat(n):n)},dH=(e,...t)=>typeof e=="function"?kO(jO,e,...t):kO(()=>uH(jO(),e),...t);function Rj(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qO={exports:{}};/*!
|
|
2
|
+
`,document.head.prepend(e)}catch(e){console.error("vite-plugin-inject-css: failed to inject css",e)}})();const JD=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M18 2.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v3.67a3.001 3.001 0 0 1 0 5.66v9.67a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-9.67a3.001 3.001 0 0 1 0-5.66V2.5ZM11.5 2a.5.5 0 0 0-.5.5v9.67a3.001 3.001 0 0 0 0 5.66v3.67a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-3.67a3.001 3.001 0 0 0 0-5.66V2.5a.5.5 0 0 0-.5-.5h-1ZM4.5 2a.5.5 0 0 0-.5.5v3.67a3.001 3.001 0 0 0 0 5.66v9.67a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-9.67a3.001 3.001 0 0 0 0-5.66V2.5a.5.5 0 0 0-.5-.5h-1Z",fill:"currentColor"})}),wi=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M8.82 19.748c.001.245.075.486.214.69l.38 1.004c.117.172.573.312.758.41.185.097.391.148.601.148h2.454c.21 0 .417-.05.601-.148.185-.098.621-.238.737-.41l.402-1.003c.138-.205.213-.445.213-.691l.001-1.498H8.82l.002 1.498ZM5 8.875c0 1.733.654 3.314 1.732 4.522.658.737 1.685 2.275 2.077 3.573l.004.03h6.374l.004-.03c.392-1.298 1.42-2.836 2.076-3.573A6.766 6.766 0 0 0 19 8.875C19 5.07 15.854 1.988 11.978 2 7.921 2.012 5 5.241 5 8.875Z",fill:"currentColor"})}),mV=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Zm5.645-14.836a.5.5 0 0 0-.707-.034l-7.703 6.997-1.67-1.684a.5.5 0 0 0-.707-.003l-.71.704a.5.5 0 0 0-.003.707l2.386 2.408.266.292a.5.5 0 0 0 .42.162.498.498 0 0 0 .325-.144l.225-.223 8.516-7.736a.5.5 0 0 0 .034-.706l-.672-.74Z",fill:"currentColor"})}),bV=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.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"})}),QD=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M10.84 2.714c0-.394.346-.714.773-.714h.774c.427 0 .773.32.773.714V9.5h5.025c.427 0 .773.32.773.714v3.572H5.042v-3.572c0-.394.346-.714.773-.714h5.025V2.714ZM5.042 14.5h13.916l1.034 6.685c.067.43-.295.815-.765.815h-2.1l-.681-5.929L15.764 22h-3.236l-.721-2.143L11.086 22h-2.85l-.682-3.929L6.872 22H4.773c-.47 0-.832-.385-.765-.815L5.042 14.5Z",fill:"currentColor"})}),hd=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.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"})}),ej=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.071 19.071c3.905-3.905 3.905-10.237 0-14.142-3.905-3.905-10.237-3.905-14.142 0-3.905 3.905-3.905 10.237 0 14.142 3.905 3.905 10.237 3.905 14.142 0Zm-3.182-4.596a.5.5 0 0 1 0 .707l-.707.707a.5.5 0 0 1-.707 0L12 13.414 9.525 15.89a.5.5 0 0 1-.707 0l-.707-.707a.5.5 0 0 1 0-.707L10.586 12 8.11 9.525a.5.5 0 0 1 0-.707l.707-.707a.5.5 0 0 1 .707 0L12 10.586l2.475-2.475a.5.5 0 0 1 .707 0l.707.707a.5.5 0 0 1 0 .707L13.414 12l2.475 2.475Z",fill:"currentColor"})}),tj=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{d:"M7.126 7.145c-.19-.2-.5-.2-.69 0l-3.538 3.703-.008.008a.403.403 0 0 0-.013.013l-.733.767a.525.525 0 0 0 0 .724l.733.767a.622.622 0 0 0 .019.02l3.54 3.704c.19.2.5.2.69 0l.733-.767c.19-.2.19-.523 0-.723l-3.213-3.363L7.86 8.635c.19-.2.19-.523 0-.723l-.733-.767ZM16.875 16.85c.191.2.5.2.691 0l3.537-3.702a.549.549 0 0 0 .022-.022l.733-.767a.525.525 0 0 0 0-.724l-.733-.767a.564.564 0 0 0-.02-.019l-3.539-3.705c-.19-.2-.5-.2-.69 0l-.733.767c-.19.2-.19.523 0 .723l3.212 3.363-3.212 3.363c-.191.2-.191.524 0 .723l.732.767Z",fill:"currentColor"}),O.jsx("path",{d:"M9 12.995a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM13 11.995a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM15 12.995a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",fill:"currentColor"})]}),yV=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 4v13a2 2 0 0 1-2 2V4H5a2 2 0 0 1 2-2h13a2 2 0 0 1 2 2Z",fill:"currentColor"}),O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 20V8H4v12h12Zm1 2a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h14Z",fill:"currentColor"}),O.jsx("path",{d:"M14 15v-2H6v2h8ZM18 17h2v2h-2v-2ZM7 4v2H5V4h2Z",fill:"currentColor"})]}),xV=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M4.221 16.944a.383.383 0 0 1-.373-.283L2.012 9.525c-.08-.312.256-.57.55-.422l4.124 2.077c.177.09.395.032.502-.131l4.487-6.875a.39.39 0 0 1 .65 0l4.487 6.875c.107.163.325.22.502.131l4.124-2.077c.294-.148.63.11.55.422l-1.836 7.136a.383.383 0 0 1-.373.283H4.22ZM4.221 19a.38.38 0 0 1 .385-.374H19.61a.38.38 0 0 1 .385.374v.747a.38.38 0 0 1-.385.374H4.606a.38.38 0 0 1-.385-.373V19Z",fill:"currentColor"})}),rj=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M11.701 18.797c.206.195.52.195.726 0l2.487-2.349-.008-.007 6.973-6.585a.58.58 0 0 0 0-.835l-2.045-1.932a.524.524 0 0 0-.726 0l-7.052 6.66-7.051-6.66a.524.524 0 0 0-.726 0L2.234 9.021a.58.58 0 0 0 0 .835l9.467 8.941Z",fill:"currentColor"})}),nj=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.987 11.615c0-.346.291-.626.65-.626H21.35c.36 0 .651.28.651.626v8.758a.639.639 0 0 1-.65.626H9.637c-.36 0-.651-.28-.651-.626v-8.758Zm7.808 1.877h-6.507v2.502h6.507v-2.502Zm1.301 0H20.7v6.256h-2.603V13.49Zm-1.301 3.753h-6.507v2.503h6.507v-2.503Z",fill:"currentColor"}),O.jsx("path",{d:"M6.294 8.386h-.87c-.23 0-.441-.07-.581-.25a.911.911 0 0 1-.17-.5c0-.18.06-.34.17-.48.14-.201.35-.281.59-.281h.871c0-.47 0-.981.02-1.552.03-.69.14-1.281.33-1.781.21-.511.541-.901.992-1.152.44-.25.91-.39 1.391-.39.58 0 1.091.18 1.552.53.48.37.7.921.7 1.592 0 .19-.05.39-.2.52-.12.11-.27.16-.43.16a.96.96 0 0 1-.51-.16.926.926 0 0 1-.341-.37v-.03c-.03-.1-.06-.18-.08-.26v-.04a.825.825 0 0 0-.06-.19c-.03-.07-.08-.12-.18-.16a.938.938 0 0 0-.37-.07c-.181 0-.381.05-.601.16a.84.84 0 0 0-.41.42c-.101.22-.251.49-.251.941v1.822h2.602c.27.04.43.11.581.27.1.15.17.32.17.5s-.06.341-.17.481c-.14.2-.35.28-.59.28H7.855v8.269c0 .73-.1 1.421-.2 2.072-.1.66-.26 1.221-.49 1.691-.241.51-.581.901-1.022 1.162-.42.27-.88.41-1.381.41-.66 0-1.251-.23-1.792-.68-.39-.341-.65-.751-.77-1.242-.13-.46-.201-.91-.201-1.351 0-.23.07-.44.26-.57.15-.111.31-.171.5-.171.191 0 .371.06.521.17.19.14.26.34.26.57 0 .251.03.521.1.832.06.29.18.48.331.61.27.22.53.32.79.32.201 0 .381-.06.561-.17.19-.11.34-.28.45-.52.16-.32.281-.781.361-1.382.08-.61.14-1.27.17-1.992V8.376l-.01.01Z",fill:"currentColor"})]}),ij=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{d:"M15.493 19.397c-2.887 0-5.374-.466-6.506-1.137v1.788C8.987 21.126 11.9 22 15.493 22 19.087 22 22 21.126 22 20.048V18.26c-1.132.671-3.62 1.137-6.507 1.137ZM8.987 13.055c1.132.671 3.62 1.137 6.506 1.137 2.888 0 5.375-.466 6.507-1.137v-2.116c0-1.078-2.913-1.952-6.507-1.952-3.593 0-6.506.874-6.506 1.952v2.116ZM8.987 14.356v2.603c1.132.67 3.62 1.137 6.506 1.137 2.888 0 5.375-.466 6.507-1.137v-2.603c-1.132.671-3.62 1.137-6.507 1.137-2.887 0-5.374-.466-6.506-1.137Z",fill:"currentColor"}),O.jsx("path",{d:"M6.294 8.386h-.87c-.23 0-.441-.07-.581-.25a.911.911 0 0 1-.17-.5c0-.18.06-.34.17-.48.14-.201.35-.281.59-.281h.871c0-.47 0-.981.02-1.552.03-.69.14-1.281.33-1.781.21-.511.541-.901.992-1.152.44-.25.91-.39 1.391-.39.58 0 1.091.18 1.552.53.48.37.7.921.7 1.592 0 .19-.05.39-.2.52-.12.11-.27.16-.43.16a.96.96 0 0 1-.51-.16.926.926 0 0 1-.341-.37v-.03c-.03-.1-.06-.18-.08-.26v-.04a.825.825 0 0 0-.06-.19c-.03-.07-.08-.12-.18-.16a.938.938 0 0 0-.37-.07c-.181 0-.381.05-.601.16a.84.84 0 0 0-.41.42c-.101.22-.251.49-.251.941v1.822h2.602c.27.04.43.11.581.27.1.15.17.32.17.5s-.06.341-.17.481c-.14.2-.35.28-.59.28H7.855v8.269c0 .73-.1 1.421-.2 2.072-.1.66-.26 1.221-.49 1.691-.241.51-.581.901-1.022 1.162-.42.27-.88.41-1.381.41-.66 0-1.251-.23-1.792-.68-.39-.341-.65-.751-.77-1.242-.13-.46-.201-.91-.201-1.351 0-.23.07-.44.26-.57.15-.111.31-.171.5-.171.191 0 .371.06.521.17.19.14.26.34.26.57 0 .251.03.521.1.832.06.29.18.48.331.61.27.22.53.32.79.32.201 0 .381-.06.561-.17.19-.11.34-.28.45-.52.16-.32.281-.781.361-1.382.08-.61.14-1.27.17-1.992V8.376l-.01.01Z",fill:"currentColor"})]}),oj=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m15.666 9.018 6.002 2.193c.2.073.332.263.332.476v6.867c0 .193-.11.37-.283.455l-6.002 2.94a.504.504 0 0 1-.443 0l-6.002-2.94a.507.507 0 0 1-.283-.455v-6.867c0-.213.133-.403.332-.476l6.002-2.193a.503.503 0 0 1 .345 0Zm4.77 3.528-4.993-1.922-4.993 1.922 4.993 2.024 4.994-2.024Zm.263 1.646-4.348 1.845v3.845L20.7 17.77v-3.579Z",fill:"currentColor"}),O.jsx("path",{d:"M6.294 8.386h-.87c-.23 0-.441-.07-.581-.25a.911.911 0 0 1-.17-.5c0-.18.06-.34.17-.48.14-.201.35-.281.59-.281h.871c0-.47 0-.981.02-1.552.03-.69.14-1.281.33-1.781.21-.511.541-.901.992-1.152.44-.25.91-.39 1.391-.39.58 0 1.091.18 1.552.53.48.37.7.921.7 1.592 0 .19-.05.39-.2.52-.12.11-.27.16-.43.16a.96.96 0 0 1-.51-.16.926.926 0 0 1-.341-.37v-.03c-.03-.1-.06-.18-.08-.26v-.04a.825.825 0 0 0-.06-.19c-.03-.07-.08-.12-.18-.16a.938.938 0 0 0-.37-.07c-.181 0-.381.05-.601.16a.84.84 0 0 0-.41.42c-.101.22-.251.49-.251.941v1.822h2.602c.27.04.43.11.581.27.1.15.17.32.17.5s-.06.341-.17.481c-.14.2-.35.28-.59.28H7.855v8.269c0 .73-.1 1.421-.2 2.072-.1.66-.26 1.221-.49 1.691-.241.51-.581.901-1.022 1.162-.42.27-.88.41-1.381.41-.66 0-1.251-.23-1.792-.68-.39-.341-.65-.751-.77-1.242-.13-.46-.201-.91-.201-1.351 0-.23.07-.44.26-.57.15-.111.31-.171.5-.171.191 0 .371.06.521.17.19.14.26.34.26.57 0 .251.03.521.1.832.06.29.18.48.331.61.27.22.53.32.79.32.201 0 .381-.06.561-.17.19-.11.34-.28.45-.52.16-.32.281-.781.361-1.382.08-.61.14-1.27.17-1.992V8.376l-.01.01Z",fill:"currentColor"})]}),aj=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{d:"M21.735 10.502c.352.204.354.744.004.951l-5.954 3.516a.474.474 0 0 1-.484.002l-6.05-3.516c-.354-.206-.352-.752.004-.954l6.05-3.453a.474.474 0 0 1 .476.002l5.954 3.452Z",fill:"currentColor"}),O.jsx("path",{d:"M20.253 13.146a.474.474 0 0 0-.483.002L15.785 15.5a.474.474 0 0 1-.484.002l-4.059-2.36a.474.474 0 0 0-.477-.001l-1.51.862c-.356.203-.358.748-.004.954l6.05 3.516c.151.088.333.087.484-.002l5.954-3.516c.35-.206.348-.747-.004-.95l-1.482-.86Z",fill:"currentColor"}),O.jsx("path",{d:"M20.253 16.606a.474.474 0 0 0-.483.002l-3.985 2.354a.474.474 0 0 1-.484.001l-4.059-2.359a.474.474 0 0 0-.477-.002l-1.51.862c-.356.203-.358.749-.004.955l6.05 3.516c.151.087.333.087.484-.002l5.954-3.516c.35-.207.348-.747-.004-.951l-1.482-.86ZM6.294 8.386h-.87c-.23 0-.441-.07-.581-.25a.911.911 0 0 1-.17-.5c0-.18.06-.34.17-.48.14-.201.35-.281.59-.281h.871c0-.47 0-.981.02-1.552.03-.69.14-1.281.33-1.781.21-.511.541-.901.992-1.152.44-.25.91-.39 1.391-.39.58 0 1.091.18 1.552.53.48.37.7.921.7 1.592 0 .19-.05.39-.2.52-.12.11-.27.16-.43.16a.96.96 0 0 1-.51-.16.926.926 0 0 1-.341-.37v-.03c-.03-.1-.06-.18-.08-.26v-.04a.825.825 0 0 0-.06-.19c-.03-.07-.08-.12-.18-.16a.938.938 0 0 0-.37-.07c-.181 0-.381.05-.601.16a.84.84 0 0 0-.41.42c-.101.22-.251.49-.251.941v1.822h2.602c.27.04.43.11.581.27.1.15.17.32.17.5s-.06.341-.17.481c-.14.2-.35.28-.59.28H7.855v8.269c0 .73-.1 1.421-.2 2.072-.1.66-.26 1.221-.49 1.691-.241.51-.581.901-1.022 1.162-.42.27-.88.41-1.381.41-.66 0-1.251-.23-1.792-.68-.39-.341-.65-.751-.77-1.242-.13-.46-.201-.91-.201-1.351 0-.23.07-.44.26-.57.15-.111.31-.171.5-.171.191 0 .371.06.521.17.19.14.26.34.26.57 0 .251.03.521.1.832.06.29.18.48.331.61.27.22.53.32.79.32.201 0 .381-.06.561-.17.19-.11.34-.28.45-.52.16-.32.281-.781.361-1.382.08-.61.14-1.27.17-1.992V8.376l-.01.01Z",fill:"currentColor"})]}),sj=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m21.668 11.21-6.002-2.192a.503.503 0 0 0-.345 0L9.319 11.21a.506.506 0 0 0-.332.476v6.867c0 .193.11.37.283.455l6.002 2.94c.14.068.303.068.443 0l6.002-2.94a.507.507 0 0 0 .283-.455v-6.867a.506.506 0 0 0-.332-.476Zm-7.159-.271a.534.534 0 0 0-.244.052l-1.22.508c-.103.034-.154.112-.154.234v1.496c0 .122.051.182.154.182h.051l1.22-.247c.018-.008.03-.004.039.013.017.018.025.035.025.052v4.867h-1.326a.163.163 0 0 0-.163.163v1.626c0 .09.073.163.163.163h4.88c.09 0 .162-.073.162-.163V18.26a.163.163 0 0 0-.163-.163h-1.138v-6.962a.195.195 0 0 0-.052-.143.19.19 0 0 0-.14-.052h-2.094Z",fill:"currentColor"}),O.jsx("path",{d:"M6.294 8.386h-.87c-.23 0-.441-.07-.581-.25a.911.911 0 0 1-.17-.5c0-.18.06-.34.17-.48.14-.201.35-.281.59-.281h.871c0-.47 0-.981.02-1.552.03-.69.14-1.281.33-1.781.21-.511.541-.901.992-1.152.44-.25.91-.39 1.391-.39.58 0 1.091.18 1.552.53.48.37.7.921.7 1.592 0 .19-.05.39-.2.52-.12.11-.27.16-.43.16a.96.96 0 0 1-.51-.16.926.926 0 0 1-.341-.37v-.03c-.03-.1-.06-.18-.08-.26v-.04a.825.825 0 0 0-.06-.19c-.03-.07-.08-.12-.18-.16a.938.938 0 0 0-.37-.07c-.181 0-.381.05-.601.16a.84.84 0 0 0-.41.42c-.101.22-.251.49-.251.941v1.822h2.602c.27.04.43.11.581.27.1.15.17.32.17.5s-.06.341-.17.481c-.14.2-.35.28-.59.28H7.855v8.269c0 .73-.1 1.421-.2 2.072-.1.66-.26 1.221-.49 1.691-.241.51-.581.901-1.022 1.162-.42.27-.88.41-1.381.41-.66 0-1.251-.23-1.792-.68-.39-.341-.65-.751-.77-1.242-.13-.46-.201-.91-.201-1.351 0-.23.07-.44.26-.57.15-.111.31-.171.5-.171.191 0 .371.06.521.17.19.14.26.34.26.57 0 .251.03.521.1.832.06.29.18.48.331.61.27.22.53.32.79.32.201 0 .381-.06.561-.17.19-.11.34-.28.45-.52.16-.32.281-.781.361-1.382.08-.61.14-1.27.17-1.992V8.376l-.01.01Z",fill:"currentColor"})]}),pd=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M7.907 11.533c-1.762 0-3.19-1.462-3.19-3.266S6.145 5 7.907 5s3.19 1.463 3.19 3.267c0 1.804-1.428 3.266-3.19 3.266ZM7.907 13.4c3.119 0 5.675 2.467 5.908 5.6H2c.233-3.133 2.789-5.6 5.907-5.6ZM12.903 8.267c0 1.804 1.428 3.266 3.19 3.266s3.19-1.462 3.19-3.266S17.855 5 16.093 5s-3.19 1.463-3.19 3.267ZM22 19c-.233-3.133-2.789-5.6-5.907-5.6-1.371 0-2.633.477-3.637 1.277A6.099 6.099 0 0 1 14.726 19H22Z",fill:"currentColor"})}),wV=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{d:"M13.912 15.708v.075h-3.738v-.075c0-1.122.837-2.031 1.869-2.031s1.869.91 1.869 2.03ZM12.669 18.044a.7.7 0 0 1-.332.6v.789h-.665v-.787a.7.7 0 0 1-.334-.602c0-.383.298-.694.665-.694.368 0 .666.31.666.694Z",fill:"currentColor"}),O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 20v2H4v-2a8 8 0 1 1 16 0Zm-5-4.217h-.466v-.075c0-1.496-1.115-2.708-2.491-2.708-1.376 0-2.492 1.212-2.492 2.708v.075H9V20.6c0 .22.172.4.383.4h5.234c.211 0 .383-.18.383-.4v-4.818Z",fill:"currentColor"}),O.jsx("path",{d:"M7.68 6.433c0 2.449 1.934 4.434 4.32 4.434s4.32-1.985 4.32-4.434C16.32 3.985 14.386 2 12 2S7.68 3.985 7.68 6.433Z",fill:"currentColor"})]}),on=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 21c5.523 0 10-4.477 10-10S16.523 1 11 1 1 5.477 1 11s4.477 10 10 10Zm0-14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm1 1.5a.5.5 0 0 0-.5-.5h-2a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h.5v4h-.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5H12V8.5Z",fill:"currentColor"})}),Ew=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{d:"M13 17.5a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-8a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v8ZM12 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z",fill:"currentColor"}),O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z",fill:"currentColor"})]}),lj=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 2a1 1 0 0 0-1 1v1h10V3a1 1 0 0 0-1-1H8Zm9 3H7v1h10V5ZM7 8V7h10v1a1 1 0 0 1-1 1h-3.5v2H17a1 1 0 0 1 1 1v3h3a1 1 0 0 1 1 1v1h-9v-1a1 1 0 0 1 1-1h3v-2.5a.5.5 0 0 0-.5-.5h-9a.5.5 0 0 0-.5.5V15h3a1 1 0 0 1 1 1v1H2v-1a1 1 0 0 1 1-1h3v-3a1 1 0 0 1 1-1h4.5V9H8a1 1 0 0 1-1-1Zm15 10h-9v1h9v-1Zm-9 3v-1h9v1a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1ZM2 18h9v1H2v-1Zm0 2v1a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1v-1H2Z",fill:"currentColor"})}),cj=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m19 10 1.965-1.964a3.536 3.536 0 0 0-5-5L14 5l5 5Zm-1 1-5-5L2.146 16.854a.5.5 0 0 0-.146.353V21.5a.5.5 0 0 0 .5.5h4.293a.5.5 0 0 0 .353-.146L18 11Z",fill:"currentColor"})}),ja=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Zm1-5.5a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5V13H7.5a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5H11V7.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5V11h3.5a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5H13v3.5Z",fill:"currentColor"})}),SV=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M11.83 20c4.492 0 8.134-3.582 8.134-8s-3.642-8-8.134-8a8.177 8.177 0 0 0-5.704 2.297l1.332.766a.494.494 0 0 1-.013.863L2.76 10.505a.5.5 0 0 1-.746-.429L2 4.796a.506.506 0 0 1 .758-.434l1.562.897A10.217 10.217 0 0 1 11.83 2c5.615 0 10.167 4.477 10.167 10S17.445 22 11.83 22A10.205 10.205 0 0 1 3.5 17.733c-.225-.315.012-.733.398-.733h1.346c.15 0 .292.068.39.182A8.172 8.172 0 0 0 11.83 20Z",fill:"currentColor"})}),EV=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.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"})}),uj=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M18.797 12.299a.524.524 0 0 0 0-.726l-2.349-2.487-.007.008L9.856 2.12a.58.58 0 0 0-.835 0L7.089 4.166a.524.524 0 0 0 0 .726l6.66 7.051-6.66 7.053a.524.524 0 0 0 0 .725l1.932 2.045a.58.58 0 0 0 .835 0l8.941-9.467Z",fill:"currentColor"})}),_V=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.076 2.203a.5.5 0 0 0-.354-.146H3.001a1 1 0 0 0-1 1v18a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V8.335a.5.5 0 0 0-.147-.354l-5.778-5.778ZM12 19.057a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm-8-14.5a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-4Z",fill:"currentColor"})}),dj=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.774 15.7A7.513 7.513 0 0 1 4.2 4.2a7.511 7.511 0 0 1 10.623 0 7.515 7.515 0 0 1 .876 9.573l6.01 6.01a.995.995 0 0 1 0 1.407l-.52.519a.995.995 0 0 1-1.406 0l-6.009-6.01Zm-1.076-3a4.507 4.507 0 1 1-6.373-6.374 4.507 4.507 0 0 1 6.373 6.373Z",fill:"currentColor"})}),fj=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m21.49 5.418-9.224-3.371a.774.774 0 0 0-.532 0L2.51 5.417A.778.778 0 0 0 2 6.15v10.554c0 .298.169.57.435.7l9.224 4.518a.774.774 0 0 0 .681 0l9.224-4.518a.779.779 0 0 0 .436-.7V6.15a.778.778 0 0 0-.51-.731ZM10.487 5a.82.82 0 0 0-.375.08l-1.875.78c-.158.053-.237.173-.237.36v2.3c0 .187.079.28.237.28h.079l1.875-.38c.026-.013.046-.007.059.02.026.027.04.053.04.08V16H8.25a.25.25 0 0 0-.25.25v2.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-2.5a.25.25 0 0 0-.25-.25H14V5.3a.3.3 0 0 0-.079-.22.291.291 0 0 0-.217-.08h-3.217Z",fill:"currentColor"})}),hj=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 4a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1H3Zm5 2H4v3h4V6Zm-4 5h4v7H4v-7Zm10-5h-4v3h4V6Zm2 0h4v3h-4V6Zm4 5h-4v7h4v-7Z",fill:"currentColor"})}),Pu=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 5a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5Zm12 3H4v4h10V8Zm2 0h4v10h-4V8Zm-2 6H4v4h10v-4Z",fill:"currentColor"})}),pj=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M9 3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v1h6.5a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-19a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5H9V3ZM4 7h16l-.934 14.071a1 1 0 0 1-.997.929H5.93a1 1 0 0 1-.997-.929L4 7Z",fill:"currentColor"})}),OV=(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},CV=(e,t)=>({classGroupId:e,validator:t}),vj=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Mu="-",TO=[],IV="arbitrary..",RV=e=>{const t=TV(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return NV(i);const o=i.split(Mu),a=o[0]===""&&o.length>1?1:0;return gj(o,a,t)},getConflictingClassGroupIds:(i,o)=>{if(o){const a=n[i],s=r[i];return a?s?OV(s,a):a:s||TO}return r[i]||TO}}},gj=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],i=r.nextPart.get(n);if(i){const c=gj(e,t+1,i);if(c)return c}const o=r.validators;if(o===null)return;const a=t===0?e.join(Mu):e.slice(t).join(Mu),s=o.length;for(let c=0;c<s;c++){const d=o[c];if(d.validator(a))return d.classGroupId}},NV=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?IV+n:void 0})(),TV=e=>{const{theme:t,classGroups:r}=e;return PV(r,t)},PV=(e,t)=>{const r=vj();for(const n in e){const i=e[n];i1(i,r,n,t)}return r},i1=(e,t,r,n)=>{const i=e.length;for(let o=0;o<i;o++){const a=e[o];MV(a,t,r,n)}},MV=(e,t,r,n)=>{if(typeof e=="string"){kV(e,t,r);return}if(typeof e=="function"){AV(e,t,r,n);return}DV(e,t,r,n)},kV=(e,t,r)=>{const n=e===""?t:mj(t,e);n.classGroupId=r},AV=(e,t,r,n)=>{if(jV(e)){i1(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(CV(r,e))},DV=(e,t,r,n)=>{const i=Object.entries(e),o=i.length;for(let a=0;a<o;a++){const[s,c]=i[a];i1(c,mj(t,s),r,n)}},mj=(e,t)=>{let r=e;const n=t.split(Mu),i=n.length;for(let o=0;o<i;o++){const a=n[o];let s=r.nextPart.get(a);s||(s=vj(),r.nextPart.set(a,s)),r=s}return r},jV=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,qV=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(o,a)=>{r[o]=a,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(o){let a=r[o];if(a!==void 0)return a;if((a=n[o])!==void 0)return i(o,a),a},set(o,a){o in r?r[o]=a:i(o,a)}}},_w="!",PO=":",zV=[],MO=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),LV=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const o=[];let a=0,s=0,c=0,d;const u=i.length;for(let m=0;m<u;m++){const g=i[m];if(a===0&&s===0){if(g===PO){o.push(i.slice(c,m)),c=m+1;continue}if(g==="/"){d=m;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const h=o.length===0?i:i.slice(c);let p=h,v=!1;h.endsWith(_w)?(p=h.slice(0,-1),v=!0):h.startsWith(_w)&&(p=h.slice(1),v=!0);const y=d&&d>c?d-c:void 0;return MO(o,v,p,y)};if(t){const i=t+PO,o=n;n=a=>a.startsWith(i)?o(a.slice(i.length)):MO(zV,!1,a,void 0,!0)}if(r){const i=n;n=o=>r({className:o,parseClassName:i})}return n},BV=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let o=0;o<r.length;o++){const a=r[o],s=a[0]==="[",c=t.has(a);s||c?(i.length>0&&(i.sort(),n.push(...i),i=[]),n.push(a)):i.push(a)}return i.length>0&&(i.sort(),n.push(...i)),n}},FV=e=>({cache:qV(e.cacheSize),parseClassName:LV(e),sortModifiers:BV(e),...RV(e)}),$V=/\s+/,VV=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:o}=t,a=[],s=e.trim().split($V);let c="";for(let d=s.length-1;d>=0;d-=1){const u=s[d],{isExternal:h,modifiers:p,hasImportantModifier:v,baseClassName:y,maybePostfixModifierPosition:m}=r(u);if(h){c=u+(c.length>0?" "+c:c);continue}let g=!!m,w=n(g?y.substring(0,m):y);if(!w){if(!g){c=u+(c.length>0?" "+c:c);continue}if(w=n(y),!w){c=u+(c.length>0?" "+c:c);continue}g=!1}const x=p.length===0?"":p.length===1?p[0]:o(p).join(":"),_=v?x+_w:x,S=_+w;if(a.indexOf(S)>-1)continue;a.push(S);const E=i(w,g);for(let I=0;I<E.length;++I){const N=E[I];a.push(_+N)}c=u+(c.length>0?" "+c:c)}return c},HV=(...e)=>{let t=0,r,n,i="";for(;t<e.length;)(r=e[t++])&&(n=bj(r))&&(i&&(i+=" "),i+=n);return i},bj=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=bj(e[n]))&&(r&&(r+=" "),r+=t);return r},kO=(e,...t)=>{let r,n,i,o;const a=c=>{const d=t.reduce((u,h)=>h(u),e());return r=FV(d),n=r.cache.get,i=r.cache.set,o=s,s(c)},s=c=>{const d=n(c);if(d)return d;const u=VV(c,r);return i(c,u),u};return o=a,(...c)=>o(HV(...c))},WV=[],Xt=e=>{const t=r=>r[e]||WV;return t.isThemeGetter=!0,t},yj=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xj=/^\((?:(\w[\w-]*):)?(.+)\)$/i,UV=/^\d+\/\d+$/,GV=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,KV=/\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$/,YV=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,XV=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ZV=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,na=e=>UV.test(e),Ge=e=>!!e&&!Number.isNaN(Number(e)),Li=e=>!!e&&Number.isInteger(Number(e)),Nh=e=>e.endsWith("%")&&Ge(e.slice(0,-1)),bi=e=>GV.test(e),JV=()=>!0,QV=e=>KV.test(e)&&!YV.test(e),wj=()=>!1,eH=e=>XV.test(e),tH=e=>ZV.test(e),rH=e=>!Re(e)&&!Ne(e),nH=e=>qa(e,_j,wj),Re=e=>yj.test(e),go=e=>qa(e,Oj,QV),Th=e=>qa(e,lH,Ge),AO=e=>qa(e,Sj,wj),iH=e=>qa(e,Ej,tH),Pc=e=>qa(e,Cj,eH),Ne=e=>xj.test(e),xs=e=>za(e,Oj),oH=e=>za(e,cH),DO=e=>za(e,Sj),aH=e=>za(e,_j),sH=e=>za(e,Ej),Mc=e=>za(e,Cj,!0),qa=(e,t,r)=>{const n=yj.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},za=(e,t,r=!1)=>{const n=xj.exec(e);return n?n[1]?t(n[1]):r:!1},Sj=e=>e==="position"||e==="percentage",Ej=e=>e==="image"||e==="url",_j=e=>e==="length"||e==="size"||e==="bg-size",Oj=e=>e==="length",lH=e=>e==="number",cH=e=>e==="family-name",Cj=e=>e==="shadow",jO=()=>{const e=Xt("color"),t=Xt("font"),r=Xt("text"),n=Xt("font-weight"),i=Xt("tracking"),o=Xt("leading"),a=Xt("breakpoint"),s=Xt("container"),c=Xt("spacing"),d=Xt("radius"),u=Xt("shadow"),h=Xt("inset-shadow"),p=Xt("text-shadow"),v=Xt("drop-shadow"),y=Xt("blur"),m=Xt("perspective"),g=Xt("aspect"),w=Xt("ease"),x=Xt("animate"),_=()=>["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"],E=()=>[...S(),Ne,Re],I=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],T=()=>[Ne,Re,c],M=()=>[na,"full","auto",...T()],z=()=>[Li,"none","subgrid",Ne,Re],j=()=>["auto",{span:["full",Li,Ne,Re]},Li,Ne,Re],W=()=>[Li,"auto",Ne,Re],U=()=>["auto","min","max","fr",Ne,Re],A=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...T()],te=()=>[na,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],G=()=>[e,Ne,Re],re=()=>[...S(),DO,AO,{position:[Ne,Re]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",aH,nH,{size:[Ne,Re]}],X=()=>[Nh,xs,go],Q=()=>["","none","full",d,Ne,Re],D=()=>["",Ge,xs,go],$=()=>["solid","dashed","dotted","double"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[Ge,Nh,DO,AO],Y=()=>["","none",y,Ne,Re],ie=()=>["none",Ge,Ne,Re],ne=()=>["none",Ge,Ne,Re],ve=()=>[Ge,Ne,Re],Z=()=>[na,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[bi],breakpoint:[bi],color:[JV],container:[bi],"drop-shadow":[bi],ease:["in","out","in-out"],font:[rH],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[bi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[bi],shadow:[bi],spacing:["px",Ge],text:[bi],"text-shadow":[bi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",na,Re,Ne,g]}],container:["container"],columns:[{columns:[Ge,Re,Ne,s]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"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:E()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[Li,"auto",Ne,Re]}],basis:[{basis:[na,"full","auto",s,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ge,na,"auto","initial","none",Re]}],grow:[{grow:["",Ge,Ne,Re]}],shrink:[{shrink:["",Ge,Ne,Re]}],order:[{order:[Li,"first","last","none",Ne,Re]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...A(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...A()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:te()}],w:[{w:[s,"screen",...te()]}],"min-w":[{"min-w":[s,"screen","none",...te()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...te()]}],h:[{h:["screen","lh",...te()]}],"min-h":[{"min-h":["screen","lh","none",...te()]}],"max-h":[{"max-h":["screen","lh",...te()]}],"font-size":[{text:["base",r,xs,go]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Ne,Th]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Nh,Re]}],"font-family":[{font:[oH,Re,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Ne,Re]}],"line-clamp":[{"line-clamp":[Ge,"none",Ne,Th]}],leading:[{leading:[o,...T()]}],"list-image":[{"list-image":["none",Ne,Re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ne,Re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ge,"from-font","auto",Ne,go]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[Ge,"auto",Ne,Re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ne,Re]}],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",Ne,Re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Li,Ne,Re],radial:["",Ne,Re],conic:[Li,Ne,Re]},sH,iH]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:X()}],"gradient-via-pos":[{via:X()}],"gradient-to-pos":[{to:X()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...$(),"hidden","none"]}],"divide-style":[{divide:[...$(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...$(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ge,Ne,Re]}],"outline-w":[{outline:["",Ge,xs,go]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",u,Mc,Pc]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",h,Mc,Pc]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[Ge,go]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",p,Mc,Pc]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[Ge,Ne,Re]}],"mix-blend":[{"mix-blend":[...H(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":H()}],"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":[Ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[Ne,Re]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"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":[Ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ne,Re]}],filter:[{filter:["","none",Ne,Re]}],blur:[{blur:Y()}],brightness:[{brightness:[Ge,Ne,Re]}],contrast:[{contrast:[Ge,Ne,Re]}],"drop-shadow":[{"drop-shadow":["","none",v,Mc,Pc]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",Ge,Ne,Re]}],"hue-rotate":[{"hue-rotate":[Ge,Ne,Re]}],invert:[{invert:["",Ge,Ne,Re]}],saturate:[{saturate:[Ge,Ne,Re]}],sepia:[{sepia:["",Ge,Ne,Re]}],"backdrop-filter":[{"backdrop-filter":["","none",Ne,Re]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[Ge,Ne,Re]}],"backdrop-contrast":[{"backdrop-contrast":[Ge,Ne,Re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ge,Ne,Re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ge,Ne,Re]}],"backdrop-invert":[{"backdrop-invert":["",Ge,Ne,Re]}],"backdrop-opacity":[{"backdrop-opacity":[Ge,Ne,Re]}],"backdrop-saturate":[{"backdrop-saturate":[Ge,Ne,Re]}],"backdrop-sepia":[{"backdrop-sepia":["",Ge,Ne,Re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ne,Re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ge,"initial",Ne,Re]}],ease:[{ease:["linear","initial",w,Ne,Re]}],delay:[{delay:[Ge,Ne,Re]}],animate:[{animate:["none",x,Ne,Re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Ne,Re]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:ie()}],"rotate-x":[{"rotate-x":ie()}],"rotate-y":[{"rotate-y":ie()}],"rotate-z":[{"rotate-z":ie()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[Ne,Re,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Z()}],"translate-x":[{"translate-x":Z()}],"translate-y":[{"translate-y":Z()}],"translate-z":[{"translate-z":Z()}],"translate-none":["translate-none"],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}],"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",Ne,Re]}],"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":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",Ne,Re]}],fill:[{fill:["none",...G()]}],"stroke-w":[{stroke:[Ge,xs,go,Th]}],stroke:[{stroke:["none",...G()]}],"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"]}},uH=(e,{cacheSize:t,prefix:r,experimentalParseClassName:n,extend:i={},override:o={}})=>(Vs(e,"cacheSize",t),Vs(e,"prefix",r),Vs(e,"experimentalParseClassName",n),kc(e.theme,o.theme),kc(e.classGroups,o.classGroups),kc(e.conflictingClassGroups,o.conflictingClassGroups),kc(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),Vs(e,"orderSensitiveModifiers",o.orderSensitiveModifiers),Ac(e.theme,i.theme),Ac(e.classGroups,i.classGroups),Ac(e.conflictingClassGroups,i.conflictingClassGroups),Ac(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Ij(e,i,"orderSensitiveModifiers"),e),Vs=(e,t,r)=>{r!==void 0&&(e[t]=r)},kc=(e,t)=>{if(t)for(const r in t)Vs(e,r,t[r])},Ac=(e,t)=>{if(t)for(const r in t)Ij(e,t,r)},Ij=(e,t,r)=>{const n=t[r];n!==void 0&&(e[r]=e[r]?e[r].concat(n):n)},dH=(e,...t)=>typeof e=="function"?kO(jO,e,...t):kO(()=>uH(jO(),e),...t);function Rj(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qO={exports:{}};/*!
|
|
3
3
|
Copyright (c) 2018 Jed Watson.
|
|
4
4
|
Licensed under the MIT License (MIT), see
|
|
5
5
|
http://jedwatson.github.io/classnames
|
|
@@ -7,18 +7,18 @@
|
|
|
7
7
|
appearance-none border rounded transition-all duration-200
|
|
8
8
|
focus:ring-2 focus:ring-offset-2 focus:outline-hidden
|
|
9
9
|
relative
|
|
10
|
-
`,mH=(e,t,r)=>{const{isChecked:n,isIndeterminate:i,isDisabled:o,isInvalid:a}=r,s=n||i;return ye(gH,yl[e].checkbox,{"cursor-pointer":!o},a?{[bn.negative.checked]:s,[bn.negative.unchecked]:!s,[bn.negative.checkedHover]:!o&&s,[bn.negative.focus]:!o,"border-input-disable":o}:{[bn[t].checked]:s&&!o,[bn[t].unchecked]:!s&&!o,[bn[t].checkedHover]:!o&&s,[bn[t].focus]:!o,"border-input-disable":o,"bg-input-disable":o&&s})},bH=(e,t,r)=>{const{isDisabled:n,isInvalid:i}=r;return ye(yl[e].text,i?{[bn.negative.label]:i}:{"text-input-disable":n,[bn[t].label]:!n,"cursor-pointer":!n})},yH=e=>ye("inline-flex items-center ws-group",yl[e].spacing),xH=(e,t,r)=>ye("center-absolute rounded-xs transition-all duration-200 opacity-0 ws-checkbox-hover-target",yl[e].hoverSquare,{[bn.negative.hoverSquare]:r,[bn[t].hoverSquare]:!r}),wH=e=>`${yl[e].icon}`,SH=e=>O.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:O.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",fill:"none"})}),ir=C.forwardRef(({label:e,isDisabled:t=!1,isInvalid:r=!1,isRequired:n=!1,size:i="md",color:o="primary",onChange:a,onFocus:s,onBlur:c,value:
|
|
10
|
+
`,mH=(e,t,r)=>{const{isChecked:n,isIndeterminate:i,isDisabled:o,isInvalid:a}=r,s=n||i;return ye(gH,yl[e].checkbox,{"cursor-pointer":!o},a?{[bn.negative.checked]:s,[bn.negative.unchecked]:!s,[bn.negative.checkedHover]:!o&&s,[bn.negative.focus]:!o,"border-input-disable":o}:{[bn[t].checked]:s&&!o,[bn[t].unchecked]:!s&&!o,[bn[t].checkedHover]:!o&&s,[bn[t].focus]:!o,"border-input-disable":o,"bg-input-disable":o&&s})},bH=(e,t,r)=>{const{isDisabled:n,isInvalid:i}=r;return ye(yl[e].text,i?{[bn.negative.label]:i}:{"text-input-disable":n,[bn[t].label]:!n,"cursor-pointer":!n})},yH=e=>ye("inline-flex items-center ws-group",yl[e].spacing),xH=(e,t,r)=>ye("center-absolute rounded-xs transition-all duration-200 opacity-0 ws-checkbox-hover-target",yl[e].hoverSquare,{[bn.negative.hoverSquare]:r,[bn[t].hoverSquare]:!r}),wH=e=>`${yl[e].icon}`,SH=e=>O.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:O.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",fill:"none"})}),ir=C.forwardRef(({label:e,isDisabled:t=!1,isInvalid:r=!1,isRequired:n=!1,size:i="md",color:o="primary",onChange:a,onFocus:s,onBlur:c,value:d,defaultValue:u,name:h,id:p,...v},y)=>{const[m,g]=C.useState(u),w=d===!0||m===!0,x=d===null,_=w||x,S={isChecked:w,isIndeterminate:x,isDisabled:t,isInvalid:r},E=mH(i,o,S),I=bH(i,o,S),N=yH(i),T=xH(i,o,r),M=wH(i);return O.jsxs("label",{"data-qui":"Checkbox",className:N,children:[O.jsxs("div",{className:E,children:[O.jsx("input",{ref:y,type:"checkbox",className:"sr-only",checked:w,disabled:t,required:n,onChange:z=>{d===void 0&&g(z.target.checked),a==null||a(z)},onFocus:s,onBlur:c,name:h,id:p,...v}),_&&O.jsx("div",{className:"center-absolute",children:x?O.jsx(SH,{className:M}):O.jsx(bV,{className:M})}),!_&&!t&&O.jsx("div",{className:T})]}),e&&O.jsxs("span",{className:I,children:[e,n&&O.jsx("span",{className:"text-negative ml-1",children:"*"})]})]})});ir.displayName="Checkbox";const xl={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"}},ol={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"}},EH=`
|
|
11
11
|
relative rounded-full border transition-all duration-200 ease-in-out bg-transparent
|
|
12
12
|
focus:outline-hidden focus:ring-2 focus:ring-offset-0
|
|
13
13
|
cursor-pointer peer
|
|
14
|
-
`,_H=(e,t,r)=>{const{isDisabled:n,isInvalid:i}=r;return ye(EH,xl[e].radio,i?ol[t].radioInvalid:{[ol[t].radio]:!n,"cursor-not-allowed opacity-60":n})},OH=(e,t,r)=>{const{checked:n,isDisabled:i,isInvalid:o}=r;return ye("center-absolute rounded-full transition-all duration-200 ease-in-out",xl[e].dot,o?"bg-negative":{[ol[t].dot]:!i,"border-neutral":i,"opacity-0 scale-0":!n,"opacity-100 scale-100":n&&!i})},CH=(e,t,r)=>ye("center-absolute rounded-full transition-all duration-200 opacity-0 group-hover:opacity-100",xl[e].hoverDot,{[ol[t].hoverDot]:!r,"bg-negative-bg":r}),IH=e=>ye("cursor-pointer select-none transition-colors duration-200",xl[e].label),RH=(e,t,r,n)=>{const{isDisabled:i,isInvalid:o}=r;return ye("inline-flex items-center group",xl[e].container,o?{"text-negative":o}:{[ol[t].label]:!i,"text-muted":i},n)},NH=C.createContext(null),TH=()=>{const e=C.useContext(NH);if(!e)throw new Error("Radio.Item must be used within Radio.Group");return e},PH=C.forwardRef(({value:e,label:t,size:r,color:n,isDisabled:i,isInvalid:o,isRequired:a,className:s,...c},u)=>{const d=TH(),h=r??d.size,p=n??d.color,v=i??d.isDisabled,y=o??d.isInvalid,m=a??d.isRequired,g=d.value===e,w={checked:g,isDisabled:v,isInvalid:y},x=_H(h,p,w),_=OH(h,p,w),S=CH(h,p,y),E=IH(h),I=RH(h,p,w,s),N=()=>{v||d.onChange(e)};return O.jsxs("label",{"data-qui":"RadioItem",className:I,children:[O.jsxs("div",{className:ye("relative",{hidden:d.hideIndicator}),children:[O.jsx("input",{ref:u,type:"radio",value:e,checked:g,disabled:v,required:m,"aria-invalid":y,"aria-label":t?void 0:c["aria-label"],name:d.name,onChange:N,className:"sr-only",...c}),O.jsxs("div",{className:x,children:[O.jsx("div",{className:_}),!g&&!v&&O.jsx("div",{className:S})]})]}),t&&O.jsxs("span",{className:E,children:[t,m&&O.jsx("span",{className:"text-negative ml-1",children:"*"})]})]})});PH.displayName="RadioItem";const Nj={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"}},MH={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-primary-hover hover:bg-primary hover:text-body",ghost:"hover:bg-primary-hover hover:text-body"}},white:{bg:{solid:"bg-body",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-primary",outline:"text-body",ghost:"text-body"},border:{solid:"border-body",outline:"border-body",ghost:"border-transparent"},hover:{solid:"hover:bg-canvas-subtle hover:border-canvas-subtle",outline:"hover:border-canvas-default hover:bg-canvas-default hover:text-primary",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:bg-positive-hover hover:text-body",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:bg-warning-hover hover:text-body",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:bg-negative-hover hover:text-body",ghost:"hover:bg-negative-hover hover:text-body"}}},kH=(e,t,r,n)=>{const i=Nj[e],o=MH[r],a=ye("inline-flex items-center justify-center font-medium transition-colors duration-200 focus:outline-hidden border",{"cursor-pointer":!n},i.container);return n?ye(a,"text-inactive-text pointer-events-none",{"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"}):ye(a,o.bg[t],o.text[t],o.hover[t],o.border[t])},AH=e=>ye("flex items-center justify-center gap-1",Nj[e].text),Jt=C.forwardRef(({size:e="md",variant:t="solid",color:r="primary",className:n,children:i,disabled:o,...a},s)=>O.jsx("button",{"data-qui":"Button",ref:s,type:"button",className:ye(kH(e,t,r,o),AH(e),n),disabled:o,...a,children:i}));Jt.displayName="Button";const Tj=C.createContext(null),wl=()=>{const e=C.useContext(Tj);if(!e)throw new Error("Input components must be used within Input.Root");return e},La={sm:{group:"h-5 min-h-fit",input:"text-xxs",message:"text-xxs 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"}},wo={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-negative",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"}},DH=()=>ye("flex flex-col relative"),jH=({size:e,color:t,isDisabled:r,isReadOnly:n,hasMessage:i,hasArea:o,isInvalid:a})=>{const s=wo[a?"negative":t];return ye("bg-input-bg flex gap-1 relative px-1 transition-all duration-200 ease-in-out only:rounded first:rounded-t last:rounded-b",s.text,i?s.borderMessage:!n&&s.border,La[e].group,{"ring-1":i,"opacity-60":r,"items-center":!o})},qH=({size:e,color:t})=>ye("bg-transparent ring-0 w-full","focus:outline-hidden",[La[e].input],wo[t].placeholder),LO=({size:e,color:t})=>ye("bg-transparent ring-0 w-full h-fit resize-none py-0.5","focus:outline-hidden",La[e].input,wo[t].placeholder),zH=({size:e,color:t,isDisabled:r,isAction:n})=>{const i=wo[t];return ye("transition-colors duration-200 rounded max-h-full h-fit",La[e].icon,e==="sm"?"m-px":"m-0.5",r?"text-muted opacity-60 pointer-events-none":n?i.action:i.icon,{"cursor-pointer p-0.5":n&&!r,[i.actionHover]:n&&!r,"pointer-events-none":!n})},LH=({size:e,color:t,isDisabled:r,usePortal:n=!1,portalPlacement:i="bottom"})=>ye("flex items-start gap-x-2 ring-1",n?i==="top"?"rounded-t ring-b-0":"rounded-b ring-t-0":["absolute left-0 right-0 z-10","first:bottom-full first:rounded-t first:ring-b-0","last:top-full last:rounded-b last:ring-t-0","only:top-full only:rounded only:ring-1"],r?"text-muted":wo[t].messageText,wo[t].borderMessage,wo[t].messageBackground,La[e].message,{"opacity-60":r}),BH=({size:e})=>ye(La[e].icon);function ku(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var FH=typeof global=="object"&&global&&global.Object===Object&&global,$H=typeof self=="object"&&self&&self.Object===Object&&self,Pj=FH||$H||Function("return this")(),Ph=function(){return Pj.Date.now()},VH=/\s/;function HH(e){for(var t=e.length;t--&&VH.test(e.charAt(t)););return t}var WH=/^\s+/;function UH(e){return e&&e.slice(0,HH(e)+1).replace(WH,"")}var Au=Pj.Symbol,Mj=Object.prototype,GH=Mj.hasOwnProperty,KH=Mj.toString,ws=Au?Au.toStringTag:void 0;function YH(e){var t=GH.call(e,ws),r=e[ws];try{e[ws]=void 0;var n=!0}catch{}var i=KH.call(e);return n&&(t?e[ws]=r:delete e[ws]),i}var XH=Object.prototype,ZH=XH.toString;function JH(e){return ZH.call(e)}var QH="[object Null]",eW="[object Undefined]",BO=Au?Au.toStringTag:void 0;function tW(e){return e==null?e===void 0?eW:QH:BO&&BO in Object(e)?YH(e):JH(e)}function rW(e){return e!=null&&typeof e=="object"}var nW="[object Symbol]";function iW(e){return typeof e=="symbol"||rW(e)&&tW(e)==nW}var FO=NaN,oW=/^[-+]0x[0-9a-f]+$/i,aW=/^0b[01]+$/i,sW=/^0o[0-7]+$/i,lW=parseInt;function $O(e){if(typeof e=="number")return e;if(iW(e))return FO;if(ku(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ku(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=UH(e);var r=aW.test(e);return r||sW.test(e)?lW(e.slice(2),r?2:8):oW.test(e)?FO:+e}var cW="Expected a function",uW=Math.max,dW=Math.min;function fu(e,t,r){var n,i,o,a,s,c,u=0,d=!1,h=!1,p=!0;if(typeof e!="function")throw new TypeError(cW);t=$O(t)||0,ku(r)&&(d=!!r.leading,h="maxWait"in r,o=h?uW($O(r.maxWait)||0,t):o,p="trailing"in r?!!r.trailing:p);function v(I){var N=n,T=i;return n=i=void 0,u=I,a=e.apply(T,N),a}function y(I){return u=I,s=setTimeout(w,t),d?v(I):a}function m(I){var N=I-c,T=I-u,M=t-N;return h?dW(M,o-T):M}function g(I){var N=I-c,T=I-u;return c===void 0||N>=t||N<0||h&&T>=o}function w(){var I=Ph();if(g(I))return x(I);s=setTimeout(w,m(I))}function x(I){return s=void 0,p&&n?v(I):(n=i=void 0,a)}function _(){s!==void 0&&clearTimeout(s),u=0,n=c=i=s=void 0}function S(){return s===void 0?a:x(Ph())}function E(){var I=Ph(),N=g(I);if(n=arguments,i=this,c=I,N){if(s===void 0)return y(c);if(h)return clearTimeout(s),s=setTimeout(w,t),v(c)}return s===void 0&&(s=setTimeout(w,t)),a}return E.cancel=_,E.flush=S,E}var fW="Expected a function";function hW(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(fW);return ku(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),fu(e,t,{leading:n,maxWait:t,trailing:i})}var ba=function(){return ba=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ba.apply(this,arguments)};function kj(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function Aj(e){return!e||!e.ownerDocument?document:e.ownerDocument}var Dj=function(e){var t={},r=Array.prototype.reduce.call(e,function(n,i){var o=i.name.match(/data-simplebar-(.+)/);if(o){var a=o[1].replace(/\W+(.)/g,function(s,c){return c.toUpperCase()});switch(i.value){case"true":n[a]=!0;break;case"false":n[a]=!1;break;case void 0:n[a]=!0;break;default:n[a]=i.value}}return n},t);return r};function jj(e,t){var r;e&&(r=e.classList).add.apply(r,t.split(" "))}function qj(e,t){e&&t.split(" ").forEach(function(r){e.classList.remove(r)})}function zj(e){return".".concat(e.split(" ").join("."))}var o1=!!(typeof window<"u"&&window.document&&window.document.createElement),pW=Object.freeze({__proto__:null,addClasses:jj,canUseDOM:o1,classNamesToQuery:zj,getElementDocument:Aj,getElementWindow:kj,getOptions:Dj,removeClasses:qj}),va=null,VO=null;o1&&window.addEventListener("resize",function(){VO!==window.devicePixelRatio&&(VO=window.devicePixelRatio,va=null)});function HO(){if(va===null){if(typeof document>"u")return va=0,va;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),va=r}return va}var Bi=kj,Mh=Aj,vW=Dj,Fi=jj,$i=qj,qr=zj,Ss=(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 i=Bi(n.el);n.scrollXTicking||(i.requestAnimationFrame(n.scrollX),n.scrollXTicking=!0),n.scrollYTicking||(i.requestAnimationFrame(n.scrollY),n.scrollYTicking=!0),n.isScrolling||(n.isScrolling=!0,Fi(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(){$i(n.el,n.classNames.scrolling),n.options.autoHide&&(n.hideScrollbar("x"),n.hideScrollbar("y")),n.isScrolling=!1},this.onMouseEnter=function(){n.isMouseEntering||(Fi(n.el,n.classNames.mouseEntered),n.showScrollbar("x"),n.showScrollbar("y"),n.isMouseEntering=!0),n.onMouseEntered()},this._onMouseEntered=function(){$i(n.el,n.classNames.mouseEntered),n.options.autoHide&&(n.hideScrollbar("x"),n.hideScrollbar("y")),n.isMouseEntering=!1},this._onMouseMove=function(i){n.mouseX=i.clientX,n.mouseY=i.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(i){if(!(!n.axis.x.track.el||!n.axis.y.track.el||!n.axis.x.scrollbar.el||!n.axis.y.scrollbar.el)){var o,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)&&(o=n.isWithinBounds(n.axis.x.track.rect)),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&(a=n.isWithinBounds(n.axis.y.track.rect)),(o||a)&&(i.stopPropagation(),i.type==="pointerdown"&&i.pointerType!=="touch"&&(o&&(n.axis.x.scrollbar.rect=n.axis.x.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.x.scrollbar.rect)?n.onDragStart(i,"x"):n.onTrackClick(i,"x")),a&&(n.axis.y.scrollbar.rect=n.axis.y.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.y.scrollbar.rect)?n.onDragStart(i,"y"):n.onTrackClick(i,"y"))))}},this.drag=function(i){var o,a,s,c,u,d,h,p,v,y,m;if(!(!n.draggedAxis||!n.contentWrapperEl)){var g,w=n.axis[n.draggedAxis].track,x=(a=(o=w.rect)===null||o===void 0?void 0:o[n.axis[n.draggedAxis].sizeAttr])!==null&&a!==void 0?a:0,_=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,E=parseInt((d=(u=n.elStyles)===null||u===void 0?void 0:u[n.axis[n.draggedAxis].sizeAttr])!==null&&d!==void 0?d:"0px",10);i.preventDefault(),i.stopPropagation(),n.draggedAxis==="y"?g=i.pageY:g=i.pageX;var I=g-((p=(h=w.rect)===null||h===void 0?void 0:h[n.axis[n.draggedAxis].offsetAttr])!==null&&p!==void 0?p:0)-n.axis[n.draggedAxis].dragOffset;I=n.draggedAxis==="x"&&n.isRtl?((y=(v=w.rect)===null||v===void 0?void 0:v[n.axis[n.draggedAxis].sizeAttr])!==null&&y!==void 0?y:0)-_.size-I:I;var N=I/(x-_.size),T=N*(S-E);n.draggedAxis==="x"&&n.isRtl&&(T=!((m=e.getRtlHelpers())===null||m===void 0)&&m.isScrollingToNegative?-T:T),n.contentWrapperEl[n.axis[n.draggedAxis].scrollOffsetAttr]=T}},this.onEndDrag=function(i){n.isDragging=!1;var o=Mh(n.el),a=Bi(n.el);i.preventDefault(),i.stopPropagation(),$i(n.el,n.classNames.dragging),n.onStopScrolling(),o.removeEventListener("mousemove",n.drag,!0),o.removeEventListener("mouseup",n.onEndDrag,!0),n.removePreventClickId=a.setTimeout(function(){o.removeEventListener("click",n.preventClick,!0),o.removeEventListener("dblclick",n.preventClick,!0),n.removePreventClickId=null})},this.preventClick=function(i){i.preventDefault(),i.stopPropagation()},this.el=t,this.options=ba(ba({},e.defaultOptions),r),this.classNames=ba(ba({},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=hW(this._onMouseMove,64),this.onWindowResize=fu(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=fu(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=fu(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 i=e.getOffset(r),o=e.getOffset(n);r.scrollLeft=-999;var a=e.getOffset(n);return document.body.removeChild(r),e.rtlHelpers={isScrollOriginAtZero:i.left!==o.left,isScrollingToNegative:o.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:HO()}catch{return HO()}},e.getOffset=function(t){var r=t.getBoundingClientRect(),n=Mh(t),i=Bi(t);return{top:r.top+(i.pageYOffset||n.documentElement.scrollTop),left:r.left+(i.pageXOffset||n.documentElement.scrollLeft)}},e.prototype.init=function(){o1&&(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(qr(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(qr(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(qr(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(qr(this.classNames.offset)),this.maskEl=this.el.querySelector(qr(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,qr(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(qr(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(qr(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(qr(this.classNames.track)).concat(qr(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(qr(this.classNames.track)).concat(qr(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(qr(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((r=this.axis.y.track.el)===null||r===void 0?void 0:r.querySelector(qr(this.classNames.scrollbar)))||null,this.options.autoHide||(Fi(this.axis.x.scrollbar.el,this.classNames.visible),Fi(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t=this,r,n=Bi(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 i=!1,o=n.ResizeObserver||ResizeObserver;this.resizeObserver=new o(function(){i&&n.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),n.requestAnimationFrame(function(){i=!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=Bi(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var r=this.contentEl.offsetWidth,n=this.heightAutoObserverEl.offsetHeight<=1,i=this.heightAutoObserverEl.offsetWidth<=1||r>0,o=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=i?"".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 h=this.axis.x.isOverflowing?this.scrollbarWidth:0,p=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>o-p,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&c>d-h,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 i=this.contentEl[this.axis[t].scrollSizeAttr],o=(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=o/i,s;return s=Math.max(~~(a*o),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(s=Math.min(s,this.options.scrollbarMaxSize)),s},e.prototype.positionScrollbar=function(t){var r,n,i;t===void 0&&(t="y");var o=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!o.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=!((i=e.getRtlHelpers())===null||i===void 0)&&i.isScrollingToNegative?u:-u);var d=u/(a-c),h=~~((s-o.size)*d);h=t==="x"&&this.isRtl?-h+(s-o.size):h,o.el.style.transform=t==="x"?"translate3d(".concat(h,"px, 0, 0)"):"translate3d(0, ".concat(h,"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&&(Fi(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&&($i(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),Fi(r.track.el,this.classNames.hover),this.isWithinBounds(r.scrollbar.rect)?Fi(r.scrollbar.el,this.classNames.hover):$i(r.scrollbar.el,this.classNames.hover)):($i(r.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),$i(this.axis[t].track.el,this.classNames.hover),$i(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 i=Mh(this.el),o=Bi(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,Fi(this.el,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)):(o.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.prototype.onTrackClick=function(t,r){var n=this,i,o,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=Bi(this.el);this.axis[r].scrollbar.rect=c.scrollbar.el.getBoundingClientRect();var d=this.axis[r].scrollbar,h=(o=(i=d.rect)===null||i===void 0?void 0:i[this.axis[r].offsetAttr])!==null&&o!==void 0?o:0,p=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-h:this.mouseX-h,m=y<0?-1:1,g=m===-1?v-p:v+p,w=40,x=function(){n.contentWrapperEl&&(m===-1?v>g&&(v-=w,n.contentWrapperEl[n.axis[r].scrollOffsetAttr]=v,u.requestAnimationFrame(x)):v<g&&(v+=w,n.contentWrapperEl[n.axis[r].scrollOffsetAttr]=v,u.requestAnimationFrame(x)))};x()}},e.prototype.getContentElement=function(){return this.contentEl},e.prototype.getScrollElement=function(){return this.contentWrapperEl},e.prototype.removeListeners=function(){var t=Bi(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(i){return n.call(i,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=vW,e.helpers=pW,e})(),nn=function(){return nn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},nn.apply(this,arguments)};function gW(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 i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}var a1=nt.forwardRef(function(e,t){var r=e.children,n=e.scrollableNodeProps,i=n===void 0?{}:n,o=gW(e,["children","scrollableNodeProps"]),a=nt.useRef(),s=nt.useRef(),c=nt.useRef(),u={},d={};Object.keys(o).forEach(function(v){Object.prototype.hasOwnProperty.call(Ss.defaultOptions,v)?u[v]=o[v]:d[v]=o[v]});var h=nn(nn({},Ss.defaultOptions.classNames),u.classNames),p=nn(nn({},i),{className:"".concat(h.contentWrapper).concat(i.className?" ".concat(i.className):""),tabIndex:u.tabIndex||Ss.defaultOptions.tabIndex,role:"region","aria-label":u.ariaLabel||Ss.defaultOptions.ariaLabel});return nt.useEffect(function(){var v;return s.current=p.ref?p.ref.current:s.current,a.current&&(v=new Ss(a.current,nn(nn(nn({},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)}},[]),nt.createElement("div",nn({"data-simplebar":"init",ref:a},d),nt.createElement("div",{className:h.wrapper},nt.createElement("div",{className:h.heightAutoObserverWrapperEl},nt.createElement("div",{className:h.heightAutoObserverEl})),nt.createElement("div",{className:h.mask},nt.createElement("div",{className:h.offset},typeof r=="function"?r({scrollableNodeRef:s,scrollableNodeProps:nn(nn({},p),{ref:s}),contentNodeRef:c,contentNodeProps:{className:h.contentEl,ref:c}}):nt.createElement("div",nn({},p),nt.createElement("div",{className:h.contentEl},r)))),nt.createElement("div",{className:h.placeholder})),nt.createElement("div",{className:"".concat(h.track," ").concat(h.horizontal)},nt.createElement("div",{className:h.scrollbar})),nt.createElement("div",{className:"".concat(h.track," ").concat(h.vertical)},nt.createElement("div",{className:h.scrollbar})))});a1.displayName="SimpleBar";const Lj=C.forwardRef(({size:e="md",color:t="primary",isInvalid:r=!1,isDisabled:n=!1,isReadOnly:i=!1,className:o,children:a,...s},c)=>{const[u,d]=C.useState(!1),[h,p]=C.useState(!1),v={size:e,color:r?"negative":t,isInvalid:r,isDisabled:n,isReadOnly:i,hasMessage:u,setHasMessage:d,hasArea:h,setHasArea:p};return O.jsx(Tj.Provider,{value:v,children:O.jsx("div",{ref:c,"data-qui":"Input",className:ye(DH(),o),...s,children:a})})}),Bj=C.forwardRef(({className:e,children:t,...r},n)=>{const{size:i,color:o,isDisabled:a,isReadOnly:s,hasMessage:c,hasArea:u,isInvalid:d}=wl();return O.jsx("div",{ref:n,"data-qui":"InputGroup",className:ye(jH({size:i,color:o,isDisabled:a,isReadOnly:s,hasMessage:c,hasArea:u,isInvalid:d}),e),...r,children:t})}),Fj=C.forwardRef(({className:e,...t},r)=>{const{size:n,color:i,isInvalid:o,isDisabled:a,isReadOnly:s}=wl(),{isDisabled:c,isReadOnly:u,...d}=t;return O.jsx("input",{...d,ref:r,disabled:a||c,readOnly:u||s||!1,"aria-invalid":o,className:ye(qH({size:n,color:i}),e)})}),mW=C.forwardRef(({className:e,wrapperClassName:t,autoHeight:r,...n},i)=>{const{size:o,color:a,isInvalid:s,isDisabled:c,isReadOnly:u,setHasArea:d}=wl(),h=C.useRef(null),p=i||h,v=C.useRef(null);C.useEffect(()=>(d(!0),()=>{d(!1)}),[d]);const y=C.useCallback(()=>{if(h.current){const E=h.current;E.style.height="auto",E.style.height=`${E.scrollHeight}px`}},[]),{isDisabled:m,isReadOnly:g,onInput:w,...x}=n,_=E=>{y(),w==null||w(E)};C.useEffect(()=>{y()},[y,n.value]),C.useEffect(()=>{r&&v.current&&v.current.style.removeProperty("height")},[r]);const S=E=>{E.preventDefault();const I=v.current;if(!I)return;const N=E.clientY,T=I.offsetHeight,M=j=>{const W=T+(j.clientY-N);W>30&&(I.style.height=W+"px")},z=()=>{document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",z)};document.addEventListener("mousemove",M),document.addEventListener("mouseup",z)};return O.jsxs("div",{ref:v,className:ye("w-full relative",!r&&!n.rows&&"h-30",t),children:[r?O.jsx("textarea",{...x,ref:p,rows:1,className:ye(LO({size:o,color:a}),e),disabled:c||m,onInput:_,readOnly:g||u||!1,"aria-invalid":s,style:{overflow:"hidden"}}):O.jsx(a1,{style:{height:"100%"},children:O.jsx("textarea",{...x,ref:p,rows:1,className:ye(LO({size:o,color:a}),e),disabled:c||m,onInput:_,readOnly:g||u||!1,"aria-invalid":s,style:{height:"auto",overflow:"hidden",width:"100%"}})}),!r&&O.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:S,children:O.jsx(EV,{})})]})}),$j=C.forwardRef(({isAction:e=!1,className:t,isDisabled:r=!1,style:n,children:i,...o},a)=>{const{size:s,color:c,isDisabled:u}=wl(),d=r||u,h=zH({size:s,color:c,isDisabled:d,isAction:e});return O.jsx("div",{ref:a,"data-qui":"InputIcon",className:ye(h,t),style:n,role:e||o.onClick?"button":void 0,tabIndex:(e||o.onClick)&&!d?0:void 0,"aria-disabled":d,...o,children:i})}),Vj=C.forwardRef(({icon:e,usePortal:t=!1,className:r,children:n,...i},o)=>{const{size:a,color:s,setHasMessage:c,isDisabled:u}=wl(),d=C.useRef(null),h=C.useRef("bottom"),[p,v]=C.useState(null);C.useEffect(()=>(c(!0),()=>c(!1)),[c]),C.useEffect(()=>{if(!t||!d.current)return;const g=d.current,w=g.closest('[data-qui="Input"]'),x=w==null?void 0:w.querySelector('[data-qui="InputGroup"]'),_=x||w;if(!_)return;const S=!!(x&&g.compareDocumentPosition(x)&Node.DOCUMENT_POSITION_FOLLOWING);h.current=S?"top":"bottom";const E=()=>{const N=_.getBoundingClientRect();v({top:S?N.top:N.bottom,left:N.left,width:N.width})};E();const I=new ResizeObserver(E);return I.observe(_),window.addEventListener("resize",E),window.addEventListener("scroll",E,!0),()=>{I.disconnect(),window.removeEventListener("resize",E),window.removeEventListener("scroll",E,!0)}},[t]);const y=h.current,m=O.jsxs("div",{ref:o,"data-qui":"InputMessage",role:"alert",className:ye(LH({size:a,color:s,isDisabled:u,usePortal:t,portalPlacement:y}),r),...i,children:[e!==void 0&&O.jsx("div",{className:ye(BH({size:a})),children:e}),O.jsx("p",{children:n})]});return t?O.jsxs(O.Fragment,{children:[O.jsx("span",{ref:d,style:{display:"none"}}),p&&xn.createPortal(O.jsx("div",{"data-qui":"InputMessagePortal",style:{position:"fixed",top:y==="top"?void 0:p.top,bottom:y==="top"?`calc(100vh - ${p.top}px)`:void 0,left:p.left,width:p.width,zIndex:50},children:m}),document.body)]}):m});Lj.displayName="InputRoot";Bj.displayName="InputGroup";Fj.displayName="InputField";mW.displayName="InputArea";$j.displayName="InputIcon";Vj.displayName="InputMessage";const wt={Root:Lj,Group:Bj,Field:Fj,Icon:$j,Message:Vj},al={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"}},bW=({color:e})=>ye("min-h-6 absolute py-0.5 px-1 rounded whitespace-nowrap flex items-center gap-1",al[e].container,al[e].icon),yW=({color:e})=>ye("text-xs font-medium leading-3",al[e].text),xW=({color:e})=>ye("p-0.5 rounded cursor-pointer",al[e].button,al[e].icon),Lr=({label:e,color:t="primary",position:r="up",showCloseButton:n=!1,icon:i,children:o,delay:a=0,trigger:s="hover",className:c,container:u,isHidden:d=!1,usePortal:h=!1})=>{const[p,v]=C.useState(!1),[y,m]=C.useState(!1),[g,w]=C.useState({position:r,transform:""}),x=C.useRef(null),_=C.useRef(null),S=C.useRef(null),E=h||u!=null,I=p&&!d;C.useEffect(()=>{I||m(!1)},[I]);const N=C.useCallback(()=>{if(!x.current||!_.current)return;const P=x.current.getBoundingClientRect(),B=_.current.getBoundingClientRect(),X=window.innerWidth,Q=window.innerHeight,D=window.scrollX,$=window.scrollY,H=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth,X),q=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight,Q),Y=4;let ie=r,ne={position:ie,transform:""};const ve=he=>{const{top:ue,left:de,width:le,height:xe}=P,Ee=E?ue+$:0,Ie=E?de+D:0;switch(he){case"up":return{top:`${Ee-B.height-Y}px`,left:`${Ie+le/2}px`,transform:"translateX(-50%)"};case"up-start":return{top:`${Ee-B.height-Y}px`,left:`${Ie}px`,transform:"translateX(0)"};case"up-end":return{top:`${Ee-B.height-Y}px`,left:`${Ie+le-B.width}px`,transform:"translateX(0)"};case"down":return{top:`${Ee+xe+Y}px`,left:`${Ie+le/2}px`,transform:"translateX(-50%)"};case"down-start":return{top:`${Ee+xe+Y}px`,left:`${Ie}px`,transform:"translateX(0)"};case"down-end":return{top:`${Ee+xe+Y}px`,left:`${Ie+le-B.width}px`,transform:"translateX(0)"};case"left":return{top:`${Ee+xe/2}px`,left:`${Ie-B.width-Y}px`,transform:"translateY(-50%)"};case"left-start":return{top:`${Ee}px`,left:`${Ie-B.width-Y}px`,transform:"translateY(0)"};case"left-end":return{top:`${Ee+xe-B.height}px`,left:`${Ie-B.width-Y}px`,transform:"translateY(0)"};case"right":return{top:`${Ee+xe/2}px`,left:`${Ie+le+Y}px`,transform:"translateY(-50%)"};case"right-start":return{top:`${Ee}px`,left:`${Ie+le+Y}px`,transform:"translateY(0)"};case"right-end":return{top:`${Ee+xe-B.height}px`,left:`${Ie+le+Y}px`,transform:"translateY(0)"};default:return{}}},Z={up:{fits:P.top-B.height-Y>=0},"up-start":{fits:P.top-B.height-Y>=0&&P.left+B.width<=X},"up-end":{fits:P.top-B.height-Y>=0&&P.right-B.width>=0},down:{fits:P.bottom+B.height+Y<=Q&&P.bottom+B.height+Y<=q},"down-start":{fits:P.bottom+B.height+Y<=Q&&P.bottom+B.height+Y<=q&&P.left+B.width<=X},"down-end":{fits:P.bottom+B.height+Y<=Q&&P.bottom+B.height+Y<=q&&P.right-B.width>=0},left:{fits:P.left-B.width-Y>=0},"left-start":{fits:P.left-B.width-Y>=0&&P.top+B.height<=Q},"left-end":{fits:P.left-B.width-Y>=0&&P.bottom-B.height>=0},right:{fits:P.right+B.width+Y<=X&&P.right+B.width+Y<=H},"right-start":{fits:P.right+B.width+Y<=X&&P.right+B.width+Y<=H&&P.top+B.height<=Q},"right-end":{fits:P.right+B.width+Y<=X&&P.right+B.width+Y<=H&&P.bottom-B.height>=0}},J=P.left+P.width/2-B.width/2,ae=P.left+P.width/2+B.width/2;if((r==="up"||r==="down")&&(J<0||ae>X)&&(Z[r].fits=!1),Z[r].fits){const he=ve(r);ne={position:r,...he,transform:he.transform||""}}else{const he=["up","up-start","up-end","down","down-start","down-end","right","right-start","right-end","left","left-start","left-end"].find(ue=>Z[ue].fits);if(he){ie=he;const ue=ve(he);ne={position:ie,...ue,transform:ue.transform||""}}else{const ue={up:P.top,"up-start":P.top,"up-end":P.top,down:Math.min(Q-P.bottom,q-P.bottom),"down-start":Math.min(Q-P.bottom,q-P.bottom),"down-end":Math.min(Q-P.bottom,q-P.bottom),left:P.left,"left-start":P.left,"left-end":P.left,right:Math.min(X-P.right,H-P.right),"right-start":Math.min(X-P.right,H-P.right),"right-end":Math.min(X-P.right,H-P.right)},de=Object.entries(ue).reduce((xe,[Ee,Ie])=>Ie>xe.space?{position:Ee,space:Ie}:xe,{position:"up",space:0}).position;ie=de;const le=ve(de);ne={position:ie,...le,transform:le.transform||""}}}w(ne)},[r,E]),T=()=>{S.current&&(clearTimeout(S.current),S.current=null)},M=()=>{T(),v(!1)},z=()=>{T(),a===0?v(!1):S.current=setTimeout(()=>v(!1),a)},j=()=>{s==="click"&&(v(!0),T(),S.current=setTimeout(()=>{y||v(!1)},a))},W=P=>{P.stopPropagation(),M()},U=()=>{m(!0),T()},A=()=>{m(!1),p&&z()},K=()=>{s==="hover"&&(T(),v(!0))},V=()=>{s==="hover"&&z()};C.useEffect(()=>{if(!p||d||!x.current)return;const P=x.current;let B=!1,X=!1;const Q=new IntersectionObserver(([D])=>{if(!B){X=D.isIntersecting,B=!0;return}X&&!D.isIntersecting&&M(),X=D.isIntersecting},{threshold:0});return Q.observe(P),()=>Q.disconnect()},[p,d]),C.useEffect(()=>{if(p){const P=requestAnimationFrame(()=>N());return()=>cancelAnimationFrame(P)}},[p,e,N]),C.useEffect(()=>{if(p){const P=setTimeout(()=>N(),0);return()=>clearTimeout(P)}},[p,N]),C.useEffect(()=>{const P=()=>{p&&N()},B=()=>{p&&N()};return window.addEventListener("resize",P),window.addEventListener("scroll",B,!0),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",B,!0),T()}},[p,N]);const te=u||(typeof document<"u"?document.body:null),G=p&&!d&&!!e,re=O.jsxs("div",{ref:_,role:"tooltip",className:bW({color:t}),style:{position:"absolute",left:g.left??0,top:g.top??0,transform:g.transform,zIndex:1e3,opacity:g.left?1:0,pointerEvents:n?"auto":"none"},onMouseEnter:n?U:void 0,onMouseLeave:n?A:void 0,children:[i&&O.jsx("span",{"data-testid":"tooltip-icon",children:i}),O.jsx("div",{className:yW({color:t}),children:e}),n&&O.jsx("div",{onClick:W,className:xW({color:t}),role:"button",children:O.jsx(hd,{})})]});return O.jsxs(O.Fragment,{children:[O.jsxs("div",{"data-qui":"Tooltip",ref:x,onClick:j,onMouseEnter:K,onMouseLeave:V,className:ye("relative inline-flex items-center",c),children:[o,G&&!E&&re]}),G&&E&&te&&xn.createPortal(re,te)]})};function wW(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return C.useMemo(()=>n=>{t.forEach(i=>i(n))},t)}const vd=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ba(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function s1(e){return"nodeType"in e}function Rr(e){var t,r;return e?Ba(e)?e:s1(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function l1(e){const{Document:t}=Rr(e);return e instanceof t}function Sl(e){return Ba(e)?!1:e instanceof Rr(e).HTMLElement}function Hj(e){return e instanceof Rr(e).SVGElement}function Fa(e){return e?Ba(e)?e.document:s1(e)?l1(e)?e:Sl(e)||Hj(e)?e.ownerDocument:document:document:document}const Bn=vd?C.useLayoutEffect:C.useEffect;function gd(e){const t=C.useRef(e);return Bn(()=>{t.current=e}),C.useCallback(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.current==null?void 0:t.current(...n)},[])}function SW(){const e=C.useRef(null),t=C.useCallback((n,i)=>{e.current=setInterval(n,i)},[]),r=C.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function sl(e,t){t===void 0&&(t=[e]);const r=C.useRef(e);return Bn(()=>{r.current!==e&&(r.current=e)},t),r}function El(e,t){const r=C.useRef();return C.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function Du(e){const t=gd(e),r=C.useRef(null),n=C.useCallback(i=>{i!==r.current&&(t==null||t(i,r.current)),r.current=i},[]);return[r,n]}function ju(e){const t=C.useRef();return C.useEffect(()=>{t.current=e},[e]),t.current}let kh={};function _l(e,t){return C.useMemo(()=>{if(t)return t;const r=kh[e]==null?0:kh[e]+1;return kh[e]=r,e+"-"+r},[e,t])}function Wj(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.reduce((o,a)=>{const s=Object.entries(a);for(const[c,u]of s){const d=o[c];d!=null&&(o[c]=d+e*u)}return o},{...t})}}const wa=Wj(1),qu=Wj(-1);function EW(e){return"clientX"in e&&"clientY"in e}function md(e){if(!e)return!1;const{KeyboardEvent:t}=Rr(e.target);return t&&e instanceof t}function _W(e){if(!e)return!1;const{TouchEvent:t}=Rr(e.target);return t&&e instanceof t}function zu(e){if(_W(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return EW(e)?{x:e.clientX,y:e.clientY}:null}const Zi=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[Zi.Translate.toString(e),Zi.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),WO="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function OW(e){return e.matches(WO)?e:e.querySelector(WO)}const CW={display:"none"};function IW(e){let{id:t,value:r}=e;return C.createElement("div",{id:t,style:CW},r)}function RW(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return C.createElement("div",{id:t,style:i,role:"status","aria-live":n,"aria-atomic":!0},r)}function NW(){const[e,t]=C.useState("");return{announce:C.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Uj=C.createContext(null);function TW(e){const t=C.useContext(Uj);C.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function PW(){const[e]=C.useState(()=>new Set),t=C.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[C.useCallback(r=>{let{type:n,event:i}=r;e.forEach(o=>{var a;return(a=o[n])==null?void 0:a.call(o,i)})},[e]),t]}const MW={draggable:`
|
|
14
|
+
`,_H=(e,t,r)=>{const{isDisabled:n,isInvalid:i}=r;return ye(EH,xl[e].radio,i?ol[t].radioInvalid:{[ol[t].radio]:!n,"cursor-not-allowed opacity-60":n})},OH=(e,t,r)=>{const{checked:n,isDisabled:i,isInvalid:o}=r;return ye("center-absolute rounded-full transition-all duration-200 ease-in-out",xl[e].dot,o?"bg-negative":{[ol[t].dot]:!i,"border-neutral":i,"opacity-0 scale-0":!n,"opacity-100 scale-100":n&&!i})},CH=(e,t,r)=>ye("center-absolute rounded-full transition-all duration-200 opacity-0 group-hover:opacity-100",xl[e].hoverDot,{[ol[t].hoverDot]:!r,"bg-negative-bg":r}),IH=e=>ye("cursor-pointer select-none transition-colors duration-200",xl[e].label),RH=(e,t,r,n)=>{const{isDisabled:i,isInvalid:o}=r;return ye("inline-flex items-center group",xl[e].container,o?{"text-negative":o}:{[ol[t].label]:!i,"text-muted":i},n)},NH=C.createContext(null),TH=()=>{const e=C.useContext(NH);if(!e)throw new Error("Radio.Item must be used within Radio.Group");return e},PH=C.forwardRef(({value:e,label:t,size:r,color:n,isDisabled:i,isInvalid:o,isRequired:a,className:s,...c},d)=>{const u=TH(),h=r??u.size,p=n??u.color,v=i??u.isDisabled,y=o??u.isInvalid,m=a??u.isRequired,g=u.value===e,w={checked:g,isDisabled:v,isInvalid:y},x=_H(h,p,w),_=OH(h,p,w),S=CH(h,p,y),E=IH(h),I=RH(h,p,w,s),N=()=>{v||u.onChange(e)};return O.jsxs("label",{"data-qui":"RadioItem",className:I,children:[O.jsxs("div",{className:ye("relative",{hidden:u.hideIndicator}),children:[O.jsx("input",{ref:d,type:"radio",value:e,checked:g,disabled:v,required:m,"aria-invalid":y,"aria-label":t?void 0:c["aria-label"],name:u.name,onChange:N,className:"sr-only",...c}),O.jsxs("div",{className:x,children:[O.jsx("div",{className:_}),!g&&!v&&O.jsx("div",{className:S})]})]}),t&&O.jsxs("span",{className:E,children:[t,m&&O.jsx("span",{className:"text-negative ml-1",children:"*"})]})]})});PH.displayName="RadioItem";const Nj={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"}},MH={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-primary-hover hover:bg-primary hover:text-body",ghost:"hover:bg-primary-hover hover:text-body"}},white:{bg:{solid:"bg-body",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-primary",outline:"text-body",ghost:"text-body"},border:{solid:"border-body",outline:"border-body",ghost:"border-transparent"},hover:{solid:"hover:bg-canvas-subtle hover:border-canvas-subtle",outline:"hover:border-canvas-default hover:bg-canvas-default hover:text-primary",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:bg-positive-hover hover:text-body",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:bg-warning-hover hover:text-body",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:bg-negative-hover hover:text-body",ghost:"hover:bg-negative-hover hover:text-body"}}},kH=(e,t,r,n)=>{const i=Nj[e],o=MH[r],a=ye("inline-flex items-center justify-center font-medium transition-colors duration-200 focus:outline-hidden border",{"cursor-pointer":!n},i.container);return n?ye(a,"text-inactive-text pointer-events-none",{"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"}):ye(a,o.bg[t],o.text[t],o.hover[t],o.border[t])},AH=e=>ye("flex items-center justify-center gap-1",Nj[e].text),Jt=C.forwardRef(({size:e="md",variant:t="solid",color:r="primary",className:n,children:i,disabled:o,...a},s)=>O.jsx("button",{"data-qui":"Button",ref:s,type:"button",className:ye(kH(e,t,r,o),AH(e),n),disabled:o,...a,children:i}));Jt.displayName="Button";const Tj=C.createContext(null),wl=()=>{const e=C.useContext(Tj);if(!e)throw new Error("Input components must be used within Input.Root");return e},La={sm:{group:"h-5 min-h-fit",input:"text-xxs",message:"text-xxs 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"}},wo={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-negative",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"}},DH=()=>ye("flex flex-col relative"),jH=({size:e,color:t,isDisabled:r,isReadOnly:n,hasMessage:i,hasArea:o,isInvalid:a})=>{const s=wo[a?"negative":t];return ye("bg-input-bg flex gap-1 relative px-1 transition-all duration-200 ease-in-out only:rounded first:rounded-t last:rounded-b",s.text,i?s.borderMessage:!n&&s.border,La[e].group,{"ring-1":i,"opacity-60":r,"items-center":!o})},qH=({size:e,color:t})=>ye("bg-transparent ring-0 w-full","focus:outline-hidden",[La[e].input],wo[t].placeholder),LO=({size:e,color:t})=>ye("bg-transparent ring-0 w-full h-fit resize-none py-0.5","focus:outline-hidden",La[e].input,wo[t].placeholder),zH=({size:e,color:t,isDisabled:r,isAction:n})=>{const i=wo[t];return ye("transition-colors duration-200 rounded max-h-full h-fit",La[e].icon,e==="sm"?"m-px":"m-0.5",r?"text-muted opacity-60 pointer-events-none":n?i.action:i.icon,{"cursor-pointer p-0.5":n&&!r,[i.actionHover]:n&&!r,"pointer-events-none":!n})},LH=({size:e,color:t,isDisabled:r,usePortal:n=!1,portalPlacement:i="bottom"})=>ye("flex items-start gap-x-2 ring-1",n?i==="top"?"rounded-t ring-b-0":"rounded-b ring-t-0":["absolute left-0 right-0 z-10","first:bottom-full first:rounded-t first:ring-b-0","last:top-full last:rounded-b last:ring-t-0","only:top-full only:rounded only:ring-1"],r?"text-muted":wo[t].messageText,wo[t].borderMessage,wo[t].messageBackground,La[e].message,{"opacity-60":r}),BH=({size:e})=>ye(La[e].icon);function ku(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var FH=typeof global=="object"&&global&&global.Object===Object&&global,$H=typeof self=="object"&&self&&self.Object===Object&&self,Pj=FH||$H||Function("return this")(),Ph=function(){return Pj.Date.now()},VH=/\s/;function HH(e){for(var t=e.length;t--&&VH.test(e.charAt(t)););return t}var WH=/^\s+/;function UH(e){return e&&e.slice(0,HH(e)+1).replace(WH,"")}var Au=Pj.Symbol,Mj=Object.prototype,GH=Mj.hasOwnProperty,KH=Mj.toString,ws=Au?Au.toStringTag:void 0;function YH(e){var t=GH.call(e,ws),r=e[ws];try{e[ws]=void 0;var n=!0}catch{}var i=KH.call(e);return n&&(t?e[ws]=r:delete e[ws]),i}var XH=Object.prototype,ZH=XH.toString;function JH(e){return ZH.call(e)}var QH="[object Null]",eW="[object Undefined]",BO=Au?Au.toStringTag:void 0;function tW(e){return e==null?e===void 0?eW:QH:BO&&BO in Object(e)?YH(e):JH(e)}function rW(e){return e!=null&&typeof e=="object"}var nW="[object Symbol]";function iW(e){return typeof e=="symbol"||rW(e)&&tW(e)==nW}var FO=NaN,oW=/^[-+]0x[0-9a-f]+$/i,aW=/^0b[01]+$/i,sW=/^0o[0-7]+$/i,lW=parseInt;function $O(e){if(typeof e=="number")return e;if(iW(e))return FO;if(ku(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ku(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=UH(e);var r=aW.test(e);return r||sW.test(e)?lW(e.slice(2),r?2:8):oW.test(e)?FO:+e}var cW="Expected a function",uW=Math.max,dW=Math.min;function fu(e,t,r){var n,i,o,a,s,c,d=0,u=!1,h=!1,p=!0;if(typeof e!="function")throw new TypeError(cW);t=$O(t)||0,ku(r)&&(u=!!r.leading,h="maxWait"in r,o=h?uW($O(r.maxWait)||0,t):o,p="trailing"in r?!!r.trailing:p);function v(I){var N=n,T=i;return n=i=void 0,d=I,a=e.apply(T,N),a}function y(I){return d=I,s=setTimeout(w,t),u?v(I):a}function m(I){var N=I-c,T=I-d,M=t-N;return h?dW(M,o-T):M}function g(I){var N=I-c,T=I-d;return c===void 0||N>=t||N<0||h&&T>=o}function w(){var I=Ph();if(g(I))return x(I);s=setTimeout(w,m(I))}function x(I){return s=void 0,p&&n?v(I):(n=i=void 0,a)}function _(){s!==void 0&&clearTimeout(s),d=0,n=c=i=s=void 0}function S(){return s===void 0?a:x(Ph())}function E(){var I=Ph(),N=g(I);if(n=arguments,i=this,c=I,N){if(s===void 0)return y(c);if(h)return clearTimeout(s),s=setTimeout(w,t),v(c)}return s===void 0&&(s=setTimeout(w,t)),a}return E.cancel=_,E.flush=S,E}var fW="Expected a function";function hW(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(fW);return ku(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),fu(e,t,{leading:n,maxWait:t,trailing:i})}var ba=function(){return ba=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ba.apply(this,arguments)};function kj(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function Aj(e){return!e||!e.ownerDocument?document:e.ownerDocument}var Dj=function(e){var t={},r=Array.prototype.reduce.call(e,function(n,i){var o=i.name.match(/data-simplebar-(.+)/);if(o){var a=o[1].replace(/\W+(.)/g,function(s,c){return c.toUpperCase()});switch(i.value){case"true":n[a]=!0;break;case"false":n[a]=!1;break;case void 0:n[a]=!0;break;default:n[a]=i.value}}return n},t);return r};function jj(e,t){var r;e&&(r=e.classList).add.apply(r,t.split(" "))}function qj(e,t){e&&t.split(" ").forEach(function(r){e.classList.remove(r)})}function zj(e){return".".concat(e.split(" ").join("."))}var o1=!!(typeof window<"u"&&window.document&&window.document.createElement),pW=Object.freeze({__proto__:null,addClasses:jj,canUseDOM:o1,classNamesToQuery:zj,getElementDocument:Aj,getElementWindow:kj,getOptions:Dj,removeClasses:qj}),va=null,VO=null;o1&&window.addEventListener("resize",function(){VO!==window.devicePixelRatio&&(VO=window.devicePixelRatio,va=null)});function HO(){if(va===null){if(typeof document>"u")return va=0,va;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),va=r}return va}var Bi=kj,Mh=Aj,vW=Dj,Fi=jj,$i=qj,qr=zj,Ss=(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 i=Bi(n.el);n.scrollXTicking||(i.requestAnimationFrame(n.scrollX),n.scrollXTicking=!0),n.scrollYTicking||(i.requestAnimationFrame(n.scrollY),n.scrollYTicking=!0),n.isScrolling||(n.isScrolling=!0,Fi(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(){$i(n.el,n.classNames.scrolling),n.options.autoHide&&(n.hideScrollbar("x"),n.hideScrollbar("y")),n.isScrolling=!1},this.onMouseEnter=function(){n.isMouseEntering||(Fi(n.el,n.classNames.mouseEntered),n.showScrollbar("x"),n.showScrollbar("y"),n.isMouseEntering=!0),n.onMouseEntered()},this._onMouseEntered=function(){$i(n.el,n.classNames.mouseEntered),n.options.autoHide&&(n.hideScrollbar("x"),n.hideScrollbar("y")),n.isMouseEntering=!1},this._onMouseMove=function(i){n.mouseX=i.clientX,n.mouseY=i.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(i){if(!(!n.axis.x.track.el||!n.axis.y.track.el||!n.axis.x.scrollbar.el||!n.axis.y.scrollbar.el)){var o,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)&&(o=n.isWithinBounds(n.axis.x.track.rect)),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&(a=n.isWithinBounds(n.axis.y.track.rect)),(o||a)&&(i.stopPropagation(),i.type==="pointerdown"&&i.pointerType!=="touch"&&(o&&(n.axis.x.scrollbar.rect=n.axis.x.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.x.scrollbar.rect)?n.onDragStart(i,"x"):n.onTrackClick(i,"x")),a&&(n.axis.y.scrollbar.rect=n.axis.y.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.y.scrollbar.rect)?n.onDragStart(i,"y"):n.onTrackClick(i,"y"))))}},this.drag=function(i){var o,a,s,c,d,u,h,p,v,y,m;if(!(!n.draggedAxis||!n.contentWrapperEl)){var g,w=n.axis[n.draggedAxis].track,x=(a=(o=w.rect)===null||o===void 0?void 0:o[n.axis[n.draggedAxis].sizeAttr])!==null&&a!==void 0?a:0,_=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,E=parseInt((u=(d=n.elStyles)===null||d===void 0?void 0:d[n.axis[n.draggedAxis].sizeAttr])!==null&&u!==void 0?u:"0px",10);i.preventDefault(),i.stopPropagation(),n.draggedAxis==="y"?g=i.pageY:g=i.pageX;var I=g-((p=(h=w.rect)===null||h===void 0?void 0:h[n.axis[n.draggedAxis].offsetAttr])!==null&&p!==void 0?p:0)-n.axis[n.draggedAxis].dragOffset;I=n.draggedAxis==="x"&&n.isRtl?((y=(v=w.rect)===null||v===void 0?void 0:v[n.axis[n.draggedAxis].sizeAttr])!==null&&y!==void 0?y:0)-_.size-I:I;var N=I/(x-_.size),T=N*(S-E);n.draggedAxis==="x"&&n.isRtl&&(T=!((m=e.getRtlHelpers())===null||m===void 0)&&m.isScrollingToNegative?-T:T),n.contentWrapperEl[n.axis[n.draggedAxis].scrollOffsetAttr]=T}},this.onEndDrag=function(i){n.isDragging=!1;var o=Mh(n.el),a=Bi(n.el);i.preventDefault(),i.stopPropagation(),$i(n.el,n.classNames.dragging),n.onStopScrolling(),o.removeEventListener("mousemove",n.drag,!0),o.removeEventListener("mouseup",n.onEndDrag,!0),n.removePreventClickId=a.setTimeout(function(){o.removeEventListener("click",n.preventClick,!0),o.removeEventListener("dblclick",n.preventClick,!0),n.removePreventClickId=null})},this.preventClick=function(i){i.preventDefault(),i.stopPropagation()},this.el=t,this.options=ba(ba({},e.defaultOptions),r),this.classNames=ba(ba({},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=hW(this._onMouseMove,64),this.onWindowResize=fu(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=fu(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=fu(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 i=e.getOffset(r),o=e.getOffset(n);r.scrollLeft=-999;var a=e.getOffset(n);return document.body.removeChild(r),e.rtlHelpers={isScrollOriginAtZero:i.left!==o.left,isScrollingToNegative:o.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:HO()}catch{return HO()}},e.getOffset=function(t){var r=t.getBoundingClientRect(),n=Mh(t),i=Bi(t);return{top:r.top+(i.pageYOffset||n.documentElement.scrollTop),left:r.left+(i.pageXOffset||n.documentElement.scrollLeft)}},e.prototype.init=function(){o1&&(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(qr(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(qr(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(qr(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(qr(this.classNames.offset)),this.maskEl=this.el.querySelector(qr(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,qr(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(qr(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(qr(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(qr(this.classNames.track)).concat(qr(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(qr(this.classNames.track)).concat(qr(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(qr(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((r=this.axis.y.track.el)===null||r===void 0?void 0:r.querySelector(qr(this.classNames.scrollbar)))||null,this.options.autoHide||(Fi(this.axis.x.scrollbar.el,this.classNames.visible),Fi(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t=this,r,n=Bi(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 i=!1,o=n.ResizeObserver||ResizeObserver;this.resizeObserver=new o(function(){i&&n.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),n.requestAnimationFrame(function(){i=!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=Bi(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var r=this.contentEl.offsetWidth,n=this.heightAutoObserverEl.offsetHeight<=1,i=this.heightAutoObserverEl.offsetWidth<=1||r>0,o=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,d=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=n?"auto":"100%",this.placeholderEl.style.width=i?"".concat(r||d,"px"):"auto",this.placeholderEl.style.height="".concat(c,"px");var u=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=r!==0&&d>r,this.axis.y.isOverflowing=c>u,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 h=this.axis.x.isOverflowing?this.scrollbarWidth:0,p=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&d>o-p,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&c>u-h,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 i=this.contentEl[this.axis[t].scrollSizeAttr],o=(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=o/i,s;return s=Math.max(~~(a*o),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(s=Math.min(s,this.options.scrollbarMaxSize)),s},e.prototype.positionScrollbar=function(t){var r,n,i;t===void 0&&(t="y");var o=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!o.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),d=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];d=t==="x"&&this.isRtl&&!((n=e.getRtlHelpers())===null||n===void 0)&&n.isScrollOriginAtZero?-d:d,t==="x"&&this.isRtl&&(d=!((i=e.getRtlHelpers())===null||i===void 0)&&i.isScrollingToNegative?d:-d);var u=d/(a-c),h=~~((s-o.size)*u);h=t==="x"&&this.isRtl?-h+(s-o.size):h,o.el.style.transform=t==="x"?"translate3d(".concat(h,"px, 0, 0)"):"translate3d(0, ".concat(h,"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&&(Fi(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&&($i(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),Fi(r.track.el,this.classNames.hover),this.isWithinBounds(r.scrollbar.rect)?Fi(r.scrollbar.el,this.classNames.hover):$i(r.scrollbar.el,this.classNames.hover)):($i(r.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),$i(this.axis[t].track.el,this.classNames.hover),$i(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 i=Mh(this.el),o=Bi(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,Fi(this.el,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)):(o.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.prototype.onTrackClick=function(t,r){var n=this,i,o,a,s;r===void 0&&(r="y");var c=this.axis[r];if(!(!this.options.clickOnTrack||!c.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var d=Bi(this.el);this.axis[r].scrollbar.rect=c.scrollbar.el.getBoundingClientRect();var u=this.axis[r].scrollbar,h=(o=(i=u.rect)===null||i===void 0?void 0:i[this.axis[r].offsetAttr])!==null&&o!==void 0?o:0,p=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-h:this.mouseX-h,m=y<0?-1:1,g=m===-1?v-p:v+p,w=40,x=function(){n.contentWrapperEl&&(m===-1?v>g&&(v-=w,n.contentWrapperEl[n.axis[r].scrollOffsetAttr]=v,d.requestAnimationFrame(x)):v<g&&(v+=w,n.contentWrapperEl[n.axis[r].scrollOffsetAttr]=v,d.requestAnimationFrame(x)))};x()}},e.prototype.getContentElement=function(){return this.contentEl},e.prototype.getScrollElement=function(){return this.contentWrapperEl},e.prototype.removeListeners=function(){var t=Bi(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(i){return n.call(i,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=vW,e.helpers=pW,e})(),nn=function(){return nn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},nn.apply(this,arguments)};function gW(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 i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}var a1=nt.forwardRef(function(e,t){var r=e.children,n=e.scrollableNodeProps,i=n===void 0?{}:n,o=gW(e,["children","scrollableNodeProps"]),a=nt.useRef(),s=nt.useRef(),c=nt.useRef(),d={},u={};Object.keys(o).forEach(function(v){Object.prototype.hasOwnProperty.call(Ss.defaultOptions,v)?d[v]=o[v]:u[v]=o[v]});var h=nn(nn({},Ss.defaultOptions.classNames),d.classNames),p=nn(nn({},i),{className:"".concat(h.contentWrapper).concat(i.className?" ".concat(i.className):""),tabIndex:d.tabIndex||Ss.defaultOptions.tabIndex,role:"region","aria-label":d.ariaLabel||Ss.defaultOptions.ariaLabel});return nt.useEffect(function(){var v;return s.current=p.ref?p.ref.current:s.current,a.current&&(v=new Ss(a.current,nn(nn(nn({},d),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)}},[]),nt.createElement("div",nn({"data-simplebar":"init",ref:a},u),nt.createElement("div",{className:h.wrapper},nt.createElement("div",{className:h.heightAutoObserverWrapperEl},nt.createElement("div",{className:h.heightAutoObserverEl})),nt.createElement("div",{className:h.mask},nt.createElement("div",{className:h.offset},typeof r=="function"?r({scrollableNodeRef:s,scrollableNodeProps:nn(nn({},p),{ref:s}),contentNodeRef:c,contentNodeProps:{className:h.contentEl,ref:c}}):nt.createElement("div",nn({},p),nt.createElement("div",{className:h.contentEl},r)))),nt.createElement("div",{className:h.placeholder})),nt.createElement("div",{className:"".concat(h.track," ").concat(h.horizontal)},nt.createElement("div",{className:h.scrollbar})),nt.createElement("div",{className:"".concat(h.track," ").concat(h.vertical)},nt.createElement("div",{className:h.scrollbar})))});a1.displayName="SimpleBar";const Lj=C.forwardRef(({size:e="md",color:t="primary",isInvalid:r=!1,isDisabled:n=!1,isReadOnly:i=!1,className:o,children:a,...s},c)=>{const[d,u]=C.useState(!1),[h,p]=C.useState(!1),v={size:e,color:r?"negative":t,isInvalid:r,isDisabled:n,isReadOnly:i,hasMessage:d,setHasMessage:u,hasArea:h,setHasArea:p};return O.jsx(Tj.Provider,{value:v,children:O.jsx("div",{ref:c,"data-qui":"Input",className:ye(DH(),o),...s,children:a})})}),Bj=C.forwardRef(({className:e,children:t,...r},n)=>{const{size:i,color:o,isDisabled:a,isReadOnly:s,hasMessage:c,hasArea:d,isInvalid:u}=wl();return O.jsx("div",{ref:n,"data-qui":"InputGroup",className:ye(jH({size:i,color:o,isDisabled:a,isReadOnly:s,hasMessage:c,hasArea:d,isInvalid:u}),e),...r,children:t})}),Fj=C.forwardRef(({className:e,...t},r)=>{const{size:n,color:i,isInvalid:o,isDisabled:a,isReadOnly:s}=wl(),{isDisabled:c,isReadOnly:d,...u}=t;return O.jsx("input",{...u,ref:r,disabled:a||c,readOnly:d||s||!1,"aria-invalid":o,className:ye(qH({size:n,color:i}),e)})}),mW=C.forwardRef(({className:e,wrapperClassName:t,autoHeight:r,...n},i)=>{const{size:o,color:a,isInvalid:s,isDisabled:c,isReadOnly:d,setHasArea:u}=wl(),h=C.useRef(null),p=i||h,v=C.useRef(null);C.useEffect(()=>(u(!0),()=>{u(!1)}),[u]);const y=C.useCallback(()=>{if(h.current){const E=h.current;E.style.height="auto",E.style.height=`${E.scrollHeight}px`}},[]),{isDisabled:m,isReadOnly:g,onInput:w,...x}=n,_=E=>{y(),w==null||w(E)};C.useEffect(()=>{y()},[y,n.value]),C.useEffect(()=>{r&&v.current&&v.current.style.removeProperty("height")},[r]);const S=E=>{E.preventDefault();const I=v.current;if(!I)return;const N=E.clientY,T=I.offsetHeight,M=j=>{const W=T+(j.clientY-N);W>30&&(I.style.height=W+"px")},z=()=>{document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",z)};document.addEventListener("mousemove",M),document.addEventListener("mouseup",z)};return O.jsxs("div",{ref:v,className:ye("w-full relative",!r&&!n.rows&&"h-30",t),children:[r?O.jsx("textarea",{...x,ref:p,rows:1,className:ye(LO({size:o,color:a}),e),disabled:c||m,onInput:_,readOnly:g||d||!1,"aria-invalid":s,style:{overflow:"hidden"}}):O.jsx(a1,{style:{height:"100%"},children:O.jsx("textarea",{...x,ref:p,rows:1,className:ye(LO({size:o,color:a}),e),disabled:c||m,onInput:_,readOnly:g||d||!1,"aria-invalid":s,style:{height:"auto",overflow:"hidden",width:"100%"}})}),!r&&O.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:S,children:O.jsx(EV,{})})]})}),$j=C.forwardRef(({isAction:e=!1,className:t,isDisabled:r=!1,style:n,children:i,...o},a)=>{const{size:s,color:c,isDisabled:d}=wl(),u=r||d,h=zH({size:s,color:c,isDisabled:u,isAction:e});return O.jsx("div",{ref:a,"data-qui":"InputIcon",className:ye(h,t),style:n,role:e||o.onClick?"button":void 0,tabIndex:(e||o.onClick)&&!u?0:void 0,"aria-disabled":u,...o,children:i})}),Vj=C.forwardRef(({icon:e,usePortal:t=!1,className:r,children:n,...i},o)=>{const{size:a,color:s,setHasMessage:c,isDisabled:d}=wl(),u=C.useRef(null),h=C.useRef("bottom"),[p,v]=C.useState(null);C.useEffect(()=>(c(!0),()=>c(!1)),[c]),C.useEffect(()=>{if(!t||!u.current)return;const g=u.current,w=g.closest('[data-qui="Input"]'),x=w==null?void 0:w.querySelector('[data-qui="InputGroup"]'),_=x||w;if(!_)return;const S=!!(x&&g.compareDocumentPosition(x)&Node.DOCUMENT_POSITION_FOLLOWING);h.current=S?"top":"bottom";const E=()=>{const N=_.getBoundingClientRect();v({top:S?N.top:N.bottom,left:N.left,width:N.width})};E();const I=new ResizeObserver(E);return I.observe(_),window.addEventListener("resize",E),window.addEventListener("scroll",E,!0),()=>{I.disconnect(),window.removeEventListener("resize",E),window.removeEventListener("scroll",E,!0)}},[t]);const y=h.current,m=O.jsxs("div",{ref:o,"data-qui":"InputMessage",role:"alert",className:ye(LH({size:a,color:s,isDisabled:d,usePortal:t,portalPlacement:y}),r),...i,children:[e!==void 0&&O.jsx("div",{className:ye(BH({size:a})),children:e}),O.jsx("p",{children:n})]});return t?O.jsxs(O.Fragment,{children:[O.jsx("span",{ref:u,style:{display:"none"}}),p&&xn.createPortal(O.jsx("div",{"data-qui":"InputMessagePortal",style:{position:"fixed",top:y==="top"?void 0:p.top,bottom:y==="top"?`calc(100vh - ${p.top}px)`:void 0,left:p.left,width:p.width,zIndex:50},children:m}),document.body)]}):m});Lj.displayName="InputRoot";Bj.displayName="InputGroup";Fj.displayName="InputField";mW.displayName="InputArea";$j.displayName="InputIcon";Vj.displayName="InputMessage";const wt={Root:Lj,Group:Bj,Field:Fj,Icon:$j,Message:Vj},al={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"}},bW=({color:e})=>ye("min-h-6 absolute py-0.5 px-1 rounded whitespace-nowrap flex items-center gap-1",al[e].container,al[e].icon),yW=({color:e})=>ye("text-xs font-medium leading-3",al[e].text),xW=({color:e})=>ye("p-0.5 rounded cursor-pointer",al[e].button,al[e].icon),Lr=({label:e,color:t="primary",position:r="up",showCloseButton:n=!1,icon:i,children:o,delay:a=0,trigger:s="hover",className:c,container:d,isHidden:u=!1,usePortal:h=!1})=>{const[p,v]=C.useState(!1),[y,m]=C.useState(!1),[g,w]=C.useState({position:r,transform:""}),x=C.useRef(null),_=C.useRef(null),S=C.useRef(null),E=h||d!=null,I=p&&!u;C.useEffect(()=>{I||m(!1)},[I]);const N=C.useCallback(()=>{if(!x.current||!_.current)return;const P=x.current.getBoundingClientRect(),B=_.current.getBoundingClientRect(),X=window.innerWidth,Q=window.innerHeight,D=window.scrollX,$=window.scrollY,H=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth,X),q=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight,Q),Y=4;let ie=r,ne={position:ie,transform:""};const ve=he=>{const{top:ue,left:de,width:le,height:xe}=P,Ee=E?ue+$:0,Ie=E?de+D:0;switch(he){case"up":return{top:`${Ee-B.height-Y}px`,left:`${Ie+le/2}px`,transform:"translateX(-50%)"};case"up-start":return{top:`${Ee-B.height-Y}px`,left:`${Ie}px`,transform:"translateX(0)"};case"up-end":return{top:`${Ee-B.height-Y}px`,left:`${Ie+le-B.width}px`,transform:"translateX(0)"};case"down":return{top:`${Ee+xe+Y}px`,left:`${Ie+le/2}px`,transform:"translateX(-50%)"};case"down-start":return{top:`${Ee+xe+Y}px`,left:`${Ie}px`,transform:"translateX(0)"};case"down-end":return{top:`${Ee+xe+Y}px`,left:`${Ie+le-B.width}px`,transform:"translateX(0)"};case"left":return{top:`${Ee+xe/2}px`,left:`${Ie-B.width-Y}px`,transform:"translateY(-50%)"};case"left-start":return{top:`${Ee}px`,left:`${Ie-B.width-Y}px`,transform:"translateY(0)"};case"left-end":return{top:`${Ee+xe-B.height}px`,left:`${Ie-B.width-Y}px`,transform:"translateY(0)"};case"right":return{top:`${Ee+xe/2}px`,left:`${Ie+le+Y}px`,transform:"translateY(-50%)"};case"right-start":return{top:`${Ee}px`,left:`${Ie+le+Y}px`,transform:"translateY(0)"};case"right-end":return{top:`${Ee+xe-B.height}px`,left:`${Ie+le+Y}px`,transform:"translateY(0)"};default:return{}}},Z={up:{fits:P.top-B.height-Y>=0},"up-start":{fits:P.top-B.height-Y>=0&&P.left+B.width<=X},"up-end":{fits:P.top-B.height-Y>=0&&P.right-B.width>=0},down:{fits:P.bottom+B.height+Y<=Q&&P.bottom+B.height+Y<=q},"down-start":{fits:P.bottom+B.height+Y<=Q&&P.bottom+B.height+Y<=q&&P.left+B.width<=X},"down-end":{fits:P.bottom+B.height+Y<=Q&&P.bottom+B.height+Y<=q&&P.right-B.width>=0},left:{fits:P.left-B.width-Y>=0},"left-start":{fits:P.left-B.width-Y>=0&&P.top+B.height<=Q},"left-end":{fits:P.left-B.width-Y>=0&&P.bottom-B.height>=0},right:{fits:P.right+B.width+Y<=X&&P.right+B.width+Y<=H},"right-start":{fits:P.right+B.width+Y<=X&&P.right+B.width+Y<=H&&P.top+B.height<=Q},"right-end":{fits:P.right+B.width+Y<=X&&P.right+B.width+Y<=H&&P.bottom-B.height>=0}},J=P.left+P.width/2-B.width/2,ae=P.left+P.width/2+B.width/2;if((r==="up"||r==="down")&&(J<0||ae>X)&&(Z[r].fits=!1),Z[r].fits){const he=ve(r);ne={position:r,...he,transform:he.transform||""}}else{const he=["up","up-start","up-end","down","down-start","down-end","right","right-start","right-end","left","left-start","left-end"].find(ue=>Z[ue].fits);if(he){ie=he;const ue=ve(he);ne={position:ie,...ue,transform:ue.transform||""}}else{const ue={up:P.top,"up-start":P.top,"up-end":P.top,down:Math.min(Q-P.bottom,q-P.bottom),"down-start":Math.min(Q-P.bottom,q-P.bottom),"down-end":Math.min(Q-P.bottom,q-P.bottom),left:P.left,"left-start":P.left,"left-end":P.left,right:Math.min(X-P.right,H-P.right),"right-start":Math.min(X-P.right,H-P.right),"right-end":Math.min(X-P.right,H-P.right)},de=Object.entries(ue).reduce((xe,[Ee,Ie])=>Ie>xe.space?{position:Ee,space:Ie}:xe,{position:"up",space:0}).position;ie=de;const le=ve(de);ne={position:ie,...le,transform:le.transform||""}}}w(ne)},[r,E]),T=()=>{S.current&&(clearTimeout(S.current),S.current=null)},M=()=>{T(),v(!1)},z=()=>{T(),a===0?v(!1):S.current=setTimeout(()=>v(!1),a)},j=()=>{s==="click"&&(v(!0),T(),S.current=setTimeout(()=>{y||v(!1)},a))},W=P=>{P.stopPropagation(),M()},U=()=>{m(!0),T()},A=()=>{m(!1),p&&z()},K=()=>{s==="hover"&&(T(),v(!0))},V=()=>{s==="hover"&&z()};C.useEffect(()=>{if(!p||u||!x.current)return;const P=x.current;let B=!1,X=!1;const Q=new IntersectionObserver(([D])=>{if(!B){X=D.isIntersecting,B=!0;return}X&&!D.isIntersecting&&M(),X=D.isIntersecting},{threshold:0});return Q.observe(P),()=>Q.disconnect()},[p,u]),C.useEffect(()=>{if(p){const P=requestAnimationFrame(()=>N());return()=>cancelAnimationFrame(P)}},[p,e,N]),C.useEffect(()=>{if(p){const P=setTimeout(()=>N(),0);return()=>clearTimeout(P)}},[p,N]),C.useEffect(()=>{const P=()=>{p&&N()},B=()=>{p&&N()};return window.addEventListener("resize",P),window.addEventListener("scroll",B,!0),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",B,!0),T()}},[p,N]);const te=d||(typeof document<"u"?document.body:null),G=p&&!u&&!!e,re=O.jsxs("div",{ref:_,role:"tooltip",className:bW({color:t}),style:{position:"absolute",left:g.left??0,top:g.top??0,transform:g.transform,zIndex:1e3,opacity:g.left?1:0,pointerEvents:n?"auto":"none"},onMouseEnter:n?U:void 0,onMouseLeave:n?A:void 0,children:[i&&O.jsx("span",{"data-testid":"tooltip-icon",children:i}),O.jsx("div",{className:yW({color:t}),children:e}),n&&O.jsx("div",{onClick:W,className:xW({color:t}),role:"button",children:O.jsx(hd,{})})]});return O.jsxs(O.Fragment,{children:[O.jsxs("div",{"data-qui":"Tooltip",ref:x,onClick:j,onMouseEnter:K,onMouseLeave:V,className:ye("relative inline-flex items-center",c),children:[o,G&&!E&&re]}),G&&E&&te&&xn.createPortal(re,te)]})};function wW(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return C.useMemo(()=>n=>{t.forEach(i=>i(n))},t)}const vd=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ba(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function s1(e){return"nodeType"in e}function Rr(e){var t,r;return e?Ba(e)?e:s1(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function l1(e){const{Document:t}=Rr(e);return e instanceof t}function Sl(e){return Ba(e)?!1:e instanceof Rr(e).HTMLElement}function Hj(e){return e instanceof Rr(e).SVGElement}function Fa(e){return e?Ba(e)?e.document:s1(e)?l1(e)?e:Sl(e)||Hj(e)?e.ownerDocument:document:document:document}const Bn=vd?C.useLayoutEffect:C.useEffect;function gd(e){const t=C.useRef(e);return Bn(()=>{t.current=e}),C.useCallback(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.current==null?void 0:t.current(...n)},[])}function SW(){const e=C.useRef(null),t=C.useCallback((n,i)=>{e.current=setInterval(n,i)},[]),r=C.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function sl(e,t){t===void 0&&(t=[e]);const r=C.useRef(e);return Bn(()=>{r.current!==e&&(r.current=e)},t),r}function El(e,t){const r=C.useRef();return C.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function Du(e){const t=gd(e),r=C.useRef(null),n=C.useCallback(i=>{i!==r.current&&(t==null||t(i,r.current)),r.current=i},[]);return[r,n]}function ju(e){const t=C.useRef();return C.useEffect(()=>{t.current=e},[e]),t.current}let kh={};function _l(e,t){return C.useMemo(()=>{if(t)return t;const r=kh[e]==null?0:kh[e]+1;return kh[e]=r,e+"-"+r},[e,t])}function Wj(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.reduce((o,a)=>{const s=Object.entries(a);for(const[c,d]of s){const u=o[c];u!=null&&(o[c]=u+e*d)}return o},{...t})}}const wa=Wj(1),qu=Wj(-1);function EW(e){return"clientX"in e&&"clientY"in e}function md(e){if(!e)return!1;const{KeyboardEvent:t}=Rr(e.target);return t&&e instanceof t}function _W(e){if(!e)return!1;const{TouchEvent:t}=Rr(e.target);return t&&e instanceof t}function zu(e){if(_W(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return EW(e)?{x:e.clientX,y:e.clientY}:null}const Zi=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[Zi.Translate.toString(e),Zi.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),WO="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function OW(e){return e.matches(WO)?e:e.querySelector(WO)}const CW={display:"none"};function IW(e){let{id:t,value:r}=e;return C.createElement("div",{id:t,style:CW},r)}function RW(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return C.createElement("div",{id:t,style:i,role:"status","aria-live":n,"aria-atomic":!0},r)}function NW(){const[e,t]=C.useState("");return{announce:C.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Uj=C.createContext(null);function TW(e){const t=C.useContext(Uj);C.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function PW(){const[e]=C.useState(()=>new Set),t=C.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[C.useCallback(r=>{let{type:n,event:i}=r;e.forEach(o=>{var a;return(a=o[n])==null?void 0:a.call(o,i)})},[e]),t]}const MW={draggable:`
|
|
15
15
|
To pick up a draggable item, press the space bar.
|
|
16
16
|
While dragging, use the arrow keys to move the item.
|
|
17
17
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
18
|
-
`},kW={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function AW(e){let{announcements:t=kW,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=MW}=e;const{announce:o,announcement:a}=NW(),s=_l("DndLiveRegion"),[c,u]=C.useState(!1);if(C.useEffect(()=>{u(!0)},[]),TW(C.useMemo(()=>({onDragStart(h){let{active:p}=h;o(t.onDragStart({active:p}))},onDragMove(h){let{active:p,over:v}=h;t.onDragMove&&o(t.onDragMove({active:p,over:v}))},onDragOver(h){let{active:p,over:v}=h;o(t.onDragOver({active:p,over:v}))},onDragEnd(h){let{active:p,over:v}=h;o(t.onDragEnd({active:p,over:v}))},onDragCancel(h){let{active:p,over:v}=h;o(t.onDragCancel({active:p,over:v}))}}),[o,t])),!c)return null;const d=C.createElement(C.Fragment,null,C.createElement(IW,{id:n,value:i.draggable}),C.createElement(RW,{id:s,announcement:a}));return r?xn.createPortal(d,r):d}var Zt;(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"})(Zt||(Zt={}));function Lu(){}function DW(e,t){return C.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function jW(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return C.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const Fn=Object.freeze({x:0,y:0});function qW(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function zW(e,t){const r=zu(e);if(!r)return"0 0";const n={x:(r.x-t.left)/t.width*100,y:(r.y-t.top)/t.height*100};return n.x+"% "+n.y+"%"}function LW(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function BW(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function FW(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function UO(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const $W=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=UO(t,t.left,t.top),o=[];for(const a of n){const{id:s}=a,c=r.get(s);if(c){const u=qW(UO(c),i);o.push({id:s,data:{droppableContainer:a,value:u}})}}return o.sort(LW)};function VW(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-n,s=o-r;if(n<i&&r<o){const c=t.width*t.height,u=e.width*e.height,d=a*s,h=d/(c+u-d);return Number(h.toFixed(4))}return 0}const HW=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=[];for(const o of n){const{id:a}=o,s=r.get(a);if(s){const c=VW(s,t);c>0&&i.push({id:a,data:{droppableContainer:o,value:c}})}}return i.sort(BW)};function WW(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function Gj(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Fn}function UW(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.reduce((o,a)=>({...o,top:o.top+e*a.y,bottom:o.bottom+e*a.y,left:o.left+e*a.x,right:o.right+e*a.x}),{...t})}}const GW=UW(1);function Kj(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function KW(e,t,r){const n=Kj(t);if(!n)return e;const{scaleX:i,scaleY:o,x:a,y:s}=n,c=e.left-a-(1-i)*parseFloat(r),u=e.top-s-(1-o)*parseFloat(r.slice(r.indexOf(" ")+1)),d=i?e.width/i:e.width,h=o?e.height/o:e.height;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c}}const YW={ignoreTransform:!1};function $a(e,t){t===void 0&&(t=YW);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=Rr(e).getComputedStyle(e);u&&(r=KW(r,u,d))}const{top:n,left:i,width:o,height:a,bottom:s,right:c}=r;return{top:n,left:i,width:o,height:a,bottom:s,right:c}}function GO(e){return $a(e,{ignoreTransform:!0})}function XW(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function ZW(e,t){return t===void 0&&(t=Rr(e).getComputedStyle(e)),t.position==="fixed"}function JW(e,t){t===void 0&&(t=Rr(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(n=>{const i=t[n];return typeof i=="string"?r.test(i):!1})}function c1(e,t){const r=[];function n(i){if(t!=null&&r.length>=t||!i)return r;if(l1(i)&&i.scrollingElement!=null&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!Sl(i)||Hj(i)||r.includes(i))return r;const o=Rr(e).getComputedStyle(i);return i!==e&&JW(i,o)&&r.push(i),ZW(i,o)?r:n(i.parentNode)}return e?n(e):r}function Yj(e){const[t]=c1(e,1);return t??null}function Ah(e){return!vd||!e?null:Ba(e)?e:s1(e)?l1(e)||e===Fa(e).scrollingElement?window:Sl(e)?e:null:null}function Xj(e){return Ba(e)?e.scrollX:e.scrollLeft}function Zj(e){return Ba(e)?e.scrollY:e.scrollTop}function Ow(e){return{x:Xj(e),y:Zj(e)}}var nr;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(nr||(nr={}));function Jj(e){return!vd||!e?!1:e===document.scrollingElement}function Qj(e){const t={x:0,y:0},r=Jj(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,a=e.scrollTop>=n.y,s=e.scrollLeft>=n.x;return{isTop:i,isLeft:o,isBottom:a,isRight:s,maxScroll:n,minScroll:t}}const QW={x:.2,y:.2};function eU(e,t,r,n,i){let{top:o,left:a,right:s,bottom:c}=r;n===void 0&&(n=10),i===void 0&&(i=QW);const{isTop:u,isBottom:d,isLeft:h,isRight:p}=Qj(e),v={x:0,y:0},y={x:0,y:0},m={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+m.height?(v.y=nr.Backward,y.y=n*Math.abs((t.top+m.height-o)/m.height)):!d&&c>=t.bottom-m.height&&(v.y=nr.Forward,y.y=n*Math.abs((t.bottom-m.height-c)/m.height)),!p&&s>=t.right-m.width?(v.x=nr.Forward,y.x=n*Math.abs((t.right-m.width-s)/m.width)):!h&&a<=t.left+m.width&&(v.x=nr.Backward,y.x=n*Math.abs((t.left+m.width-a)/m.width)),{direction:v,speed:y}}function tU(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:a}=window;return{top:0,left:0,right:o,bottom:a,width:o,height:a}}const{top:t,left:r,right:n,bottom:i}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:i,width:e.clientWidth,height:e.clientHeight}}function e3(e){return e.reduce((t,r)=>wa(t,Ow(r)),Fn)}function rU(e){return e.reduce((t,r)=>t+Xj(r),0)}function nU(e){return e.reduce((t,r)=>t+Zj(r),0)}function t3(e,t){if(t===void 0&&(t=$a),!e)return;const{top:r,left:n,bottom:i,right:o}=t(e);Yj(e)&&(i<=0||o<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const iU=[["x",["left","right"],rU],["y",["top","bottom"],nU]];class u1{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=c1(r),i=e3(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,a,s]of iU)for(const c of a)Object.defineProperty(this,c,{get:()=>{const u=s(n),d=i[o]-u;return this.rect[c]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Zs{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var i;(i=this.target)==null||i.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function oU(e){const{EventTarget:t}=Rr(e);return e instanceof t?e:Fa(e)}function Dh(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var yn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(yn||(yn={}));function KO(e){e.preventDefault()}function aU(e){e.stopPropagation()}var at;(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"})(at||(at={}));const r3={start:[at.Space,at.Enter],cancel:[at.Esc],end:[at.Space,at.Enter,at.Tab]},sU=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case at.Right:return{...r,x:r.x+25};case at.Left:return{...r,x:r.x-25};case at.Down:return{...r,y:r.y+25};case at.Up:return{...r,y:r.y-25}}};class n3{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new Zs(Fa(r)),this.windowListeners=new Zs(Rr(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(yn.Resize,this.handleCancel),this.windowListeners.add(yn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(yn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&t3(n),r(Fn)}handleKeyDown(t){if(md(t)){const{active:r,context:n,options:i}=this.props,{keyboardCodes:o=r3,coordinateGetter:a=sU,scrollBehavior:s="smooth"}=i,{code:c}=t;if(o.end.includes(c)){this.handleEnd(t);return}if(o.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=n.current,d=u?{x:u.left,y:u.top}:Fn;this.referenceCoordinates||(this.referenceCoordinates=d);const h=a(t,{active:r,context:n.current,currentCoordinates:d});if(h){const p=qu(h,d),v={x:0,y:0},{scrollableAncestors:y}=n.current;for(const m of y){const g=t.code,{isTop:w,isRight:x,isLeft:_,isBottom:S,maxScroll:E,minScroll:I}=Qj(m),N=tU(m),T={x:Math.min(g===at.Right?N.right-N.width/2:N.right,Math.max(g===at.Right?N.left:N.left+N.width/2,h.x)),y:Math.min(g===at.Down?N.bottom-N.height/2:N.bottom,Math.max(g===at.Down?N.top:N.top+N.height/2,h.y))},M=g===at.Right&&!x||g===at.Left&&!_,z=g===at.Down&&!S||g===at.Up&&!w;if(M&&T.x!==h.x){const j=m.scrollLeft+p.x,W=g===at.Right&&j<=E.x||g===at.Left&&j>=I.x;if(W&&!p.y){m.scrollTo({left:j,behavior:s});return}W?v.x=m.scrollLeft-j:v.x=g===at.Right?m.scrollLeft-E.x:m.scrollLeft-I.x,v.x&&m.scrollBy({left:-v.x,behavior:s});break}else if(z&&T.y!==h.y){const j=m.scrollTop+p.y,W=g===at.Down&&j<=E.y||g===at.Up&&j>=I.y;if(W&&!p.x){m.scrollTo({top:j,behavior:s});return}W?v.y=m.scrollTop-j:v.y=g===at.Down?m.scrollTop-E.y:m.scrollTop-I.y,v.y&&m.scrollBy({top:-v.y,behavior:s});break}}this.handleMove(t,wa(qu(h,this.referenceCoordinates),v))}}}handleMove(t,r){const{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}n3.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=r3,onActivation:i}=t,{active:o}=r;const{code:a}=e.nativeEvent;if(n.start.includes(a)){const s=o.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function YO(e){return!!(e&&"distance"in e)}function XO(e){return!!(e&&"delay"in e)}class d1{constructor(t,r,n){var i;n===void 0&&(n=oU(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:o}=t,{target:a}=o;this.props=t,this.events=r,this.document=Fa(a),this.documentListeners=new Zs(this.document),this.listeners=new Zs(n),this.windowListeners=new Zs(Rr(a)),this.initialCoordinates=(i=zu(o))!=null?i:Fn,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(yn.Resize,this.handleCancel),this.windowListeners.add(yn.DragStart,KO),this.windowListeners.add(yn.VisibilityChange,this.handleCancel),this.windowListeners.add(yn.ContextMenu,KO),this.documentListeners.add(yn.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(XO(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(YO(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){const{active:n,onPending:i}=this.props;i(n,t,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(yn.Click,aU,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(yn.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:s}}=o;if(!i)return;const c=(r=zu(t))!=null?r:Fn,u=qu(i,c);if(!n&&s){if(YO(s)){if(s.tolerance!=null&&Dh(u,s.tolerance))return this.handleCancel();if(Dh(u,s.distance))return this.handleStart()}if(XO(s)&&Dh(u,s.tolerance))return this.handleCancel();this.handlePending(s,u);return}t.cancelable&&t.preventDefault(),a(c)}handleEnd(){const{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){const{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===at.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const lU={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class f1 extends d1{constructor(t){const{event:r}=t,n=Fa(r.target);super(t,lU,n)}}f1.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n==null||n({event:r}),!0)}}];const cU={move:{name:"mousemove"},end:{name:"mouseup"}};var Cw;(function(e){e[e.RightClick=2]="RightClick"})(Cw||(Cw={}));class uU extends d1{constructor(t){super(t,cU,Fa(t.event.target))}}uU.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===Cw.RightClick?!1:(n==null||n({event:r}),!0)}}];const jh={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class dU extends d1{constructor(t){super(t,jh)}static setup(){return window.addEventListener(jh.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(jh.move.name,t)};function t(){}}}dU.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:i}=r;return i.length>1?!1:(n==null||n({event:r}),!0)}}];var Js;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Js||(Js={}));var Bu;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Bu||(Bu={}));function fU(e){let{acceleration:t,activator:r=Js.Pointer,canScroll:n,draggingRect:i,enabled:o,interval:a=5,order:s=Bu.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:d,delta:h,threshold:p}=e;const v=pU({delta:h,disabled:!o}),[y,m]=SW(),g=C.useRef({x:0,y:0}),w=C.useRef({x:0,y:0}),x=C.useMemo(()=>{switch(r){case Js.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Js.DraggableRect:return i}},[r,i,c]),_=C.useRef(null),S=C.useCallback(()=>{const I=_.current;if(!I)return;const N=g.current.x*w.current.x,T=g.current.y*w.current.y;I.scrollBy(N,T)},[]),E=C.useMemo(()=>s===Bu.TreeOrder?[...u].reverse():u,[s,u]);C.useEffect(()=>{if(!o||!u.length||!x){m();return}for(const I of E){if((n==null?void 0:n(I))===!1)continue;const N=u.indexOf(I),T=d[N];if(!T)continue;const{direction:M,speed:z}=eU(I,T,x,t,p);for(const j of["x","y"])v[j][M[j]]||(z[j]=0,M[j]=0);if(z.x>0||z.y>0){m(),_.current=I,y(S,a),g.current=z,w.current=M;return}}g.current={x:0,y:0},w.current={x:0,y:0},m()},[t,S,n,m,o,a,JSON.stringify(x),JSON.stringify(v),y,u,E,d,JSON.stringify(p)])}const hU={x:{[nr.Backward]:!1,[nr.Forward]:!1},y:{[nr.Backward]:!1,[nr.Forward]:!1}};function pU(e){let{delta:t,disabled:r}=e;const n=ju(t);return El(i=>{if(r||!n||!i)return hU;const o={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[nr.Backward]:i.x[nr.Backward]||o.x===-1,[nr.Forward]:i.x[nr.Forward]||o.x===1},y:{[nr.Backward]:i.y[nr.Backward]||o.y===-1,[nr.Forward]:i.y[nr.Forward]||o.y===1}}},[r,t,n])}function vU(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return El(i=>{var o;return t==null?null:(o=n??i)!=null?o:null},[n,t])}function gU(e,t){return C.useMemo(()=>e.reduce((r,n)=>{const{sensor:i}=n,o=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,n)}));return[...r,...o]},[]),[e,t])}var ll;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(ll||(ll={}));var Iw;(function(e){e.Optimized="optimized"})(Iw||(Iw={}));const ZO=new Map;function mU(e,t){let{dragging:r,dependencies:n,config:i}=t;const[o,a]=C.useState(null),{frequency:s,measure:c,strategy:u}=i,d=C.useRef(e),h=g(),p=sl(h),v=C.useCallback(function(w){w===void 0&&(w=[]),!p.current&&a(x=>x===null?w:x.concat(w.filter(_=>!x.includes(_))))},[p]),y=C.useRef(null),m=El(w=>{if(h&&!r)return ZO;if(!w||w===ZO||d.current!==e||o!=null){const x=new Map;for(let _ of e){if(!_)continue;if(o&&o.length>0&&!o.includes(_.id)&&_.rect.current){x.set(_.id,_.rect.current);continue}const S=_.node.current,E=S?new u1(c(S),S):null;_.rect.current=E,E&&x.set(_.id,E)}return x}return w},[e,o,r,h,c]);return C.useEffect(()=>{d.current=e},[e]),C.useEffect(()=>{h||v()},[r,h]),C.useEffect(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),C.useEffect(()=>{h||typeof s!="number"||y.current!==null||(y.current=setTimeout(()=>{v(),y.current=null},s))},[s,h,v,...n]),{droppableRects:m,measureDroppableContainers:v,measuringScheduled:o!=null};function g(){switch(u){case ll.Always:return!1;case ll.BeforeDragging:return r;default:return!r}}}function h1(e,t){return El(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function bU(e,t){return h1(e,t)}function yU(e){let{callback:t,disabled:r}=e;const n=gd(t),i=C.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(n)},[n,r]);return C.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function bd(e){let{callback:t,disabled:r}=e;const n=gd(t),i=C.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(n)},[r]);return C.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function xU(e){return new u1($a(e),e)}function JO(e,t,r){t===void 0&&(t=xU);const[n,i]=C.useState(null);function o(){i(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c??r)!=null?u:null}const d=t(e);return JSON.stringify(c)===JSON.stringify(d)?c:d})}const a=yU({callback(c){if(e)for(const u of c){const{type:d,target:h}=u;if(d==="childList"&&h instanceof HTMLElement&&h.contains(e)){o();break}}}}),s=bd({callback:o});return Bn(()=>{o(),e?(s==null||s.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(s==null||s.disconnect(),a==null||a.disconnect())},[e]),n}function wU(e){const t=h1(e);return Gj(e,t)}const QO=[];function SU(e){const t=C.useRef(e),r=El(n=>e?n&&n!==QO&&e&&t.current&&e.parentNode===t.current.parentNode?n:c1(e):QO,[e]);return C.useEffect(()=>{t.current=e},[e]),r}function EU(e){const[t,r]=C.useState(null),n=C.useRef(e),i=C.useCallback(o=>{const a=Ah(o.target);a&&r(s=>s?(s.set(a,Ow(a)),new Map(s)):null)},[]);return C.useEffect(()=>{const o=n.current;if(e!==o){a(o);const s=e.map(c=>{const u=Ah(c);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,Ow(u)]):null}).filter(c=>c!=null);r(s.length?new Map(s):null),n.current=e}return()=>{a(e),a(o)};function a(s){s.forEach(c=>{const u=Ah(c);u==null||u.removeEventListener("scroll",i)})}},[i,e]),C.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>wa(o,a),Fn):e3(e):Fn,[e,t])}function eC(e,t){t===void 0&&(t=[]);const r=C.useRef(null);return C.useEffect(()=>{r.current=null},t),C.useEffect(()=>{const n=e!==Fn;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?qu(e,r.current):Fn}function _U(e){C.useEffect(()=>{if(!vd)return;const t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of t)r==null||r()}},e.map(t=>{let{sensor:r}=t;return r}))}function OU(e,t){return C.useMemo(()=>e.reduce((r,n)=>{let{eventName:i,handler:o}=n;return r[i]=a=>{o(a,t)},r},{}),[e,t])}function i3(e){return C.useMemo(()=>e?XW(e):null,[e])}const tC=[];function CU(e,t){t===void 0&&(t=$a);const[r]=e,n=i3(r?Rr(r):null),[i,o]=C.useState(tC);function a(){o(()=>e.length?e.map(c=>Jj(c)?n:new u1(t(c),c)):tC)}const s=bd({callback:a});return Bn(()=>{s==null||s.disconnect(),a(),e.forEach(c=>s==null?void 0:s.observe(c))},[e]),i}function o3(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Sl(t)?t:e}function IU(e){let{measure:t}=e;const[r,n]=C.useState(null),i=C.useCallback(u=>{for(const{target:d}of u)if(Sl(d)){n(h=>{const p=t(d);return h?{...h,width:p.width,height:p.height}:p});break}},[t]),o=bd({callback:i}),a=C.useCallback(u=>{const d=o3(u);o==null||o.disconnect(),d&&(o==null||o.observe(d)),n(d?t(d):null)},[t,o]),[s,c]=Du(a);return C.useMemo(()=>({nodeRef:s,rect:r,setRef:c}),[r,s,c])}const RU=[{sensor:f1,options:{}},{sensor:n3,options:{}}],NU={current:{}},hu={draggable:{measure:GO},droppable:{measure:GO,strategy:ll.WhileDragging,frequency:Iw.Optimized},dragOverlay:{measure:$a}};class Qs extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}const TU={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Qs,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Lu},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:hu,measureDroppableContainers:Lu,windowRect:null,measuringScheduled:!1},a3={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Lu,draggableNodes:new Map,over:null,measureDroppableContainers:Lu},Ol=C.createContext(a3),s3=C.createContext(TU);function PU(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Qs}}}function MU(e,t){switch(t.type){case Zt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Zt.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Zt.DragEnd:case Zt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Zt.RegisterDroppable:{const{element:r}=t,{id:n}=r,i=new Qs(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case Zt.SetDroppableDisabled:{const{id:r,key:n,disabled:i}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const a=new Qs(e.droppable.containers);return a.set(r,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case Zt.UnregisterDroppable:{const{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const o=new Qs(e.droppable.containers);return o.delete(r),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function kU(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:i}=C.useContext(Ol),o=ju(n),a=ju(r==null?void 0:r.id);return C.useEffect(()=>{if(!t&&!n&&o&&a!=null){if(!md(o)||document.activeElement===o.target)return;const s=i.get(a);if(!s)return;const{activatorNode:c,node:u}=s;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[c.current,u.current]){if(!d)continue;const h=OW(d);if(h){h.focus();break}}})}},[n,t,i,a,o]),null}function l3(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...n}),r):r}function AU(e){return C.useMemo(()=>({draggable:{...hu.draggable,...e==null?void 0:e.draggable},droppable:{...hu.droppable,...e==null?void 0:e.droppable},dragOverlay:{...hu.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function DU(e){let{activeNode:t,measure:r,initialRect:n,config:i=!0}=e;const o=C.useRef(!1),{x:a,y:s}=typeof i=="boolean"?{x:i,y:i}:i;Bn(()=>{if(!a&&!s||!t){o.current=!1;return}if(o.current||!n)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const u=r(c),d=Gj(u,n);if(a||(d.x=0),s||(d.y=0),o.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const h=Yj(c);h&&h.scrollBy({top:d.y,left:d.x})}},[t,a,s,n,r])}const yd=C.createContext({...Fn,scaleX:1,scaleY:1});var Ui;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ui||(Ui={}));const jU=C.memo(function(e){var t,r,n,i;let{id:o,accessibility:a,autoScroll:s=!0,children:c,sensors:u=RU,collisionDetection:d=HW,measuring:h,modifiers:p,...v}=e;const y=C.useReducer(MU,void 0,PU),[m,g]=y,[w,x]=PW(),[_,S]=C.useState(Ui.Uninitialized),E=_===Ui.Initialized,{draggable:{active:I,nodes:N,translate:T},droppable:{containers:M}}=m,z=I!=null?N.get(I):null,j=C.useRef({initial:null,translated:null}),W=C.useMemo(()=>{var zt;return I!=null?{id:I,data:(zt=z==null?void 0:z.data)!=null?zt:NU,rect:j}:null},[I,z]),U=C.useRef(null),[A,K]=C.useState(null),[V,te]=C.useState(null),G=sl(v,Object.values(v)),re=_l("DndDescribedBy",o),P=C.useMemo(()=>M.getEnabled(),[M]),B=AU(h),{droppableRects:X,measureDroppableContainers:Q,measuringScheduled:D}=mU(P,{dragging:E,dependencies:[T.x,T.y],config:B.droppable}),$=vU(N,I),H=C.useMemo(()=>V?zu(V):null,[V]),q=io(),Y=bU($,B.draggable.measure);DU({activeNode:I!=null?N.get(I):null,config:q.layoutShiftCompensation,initialRect:Y,measure:B.draggable.measure});const ie=JO($,B.draggable.measure,Y),ne=JO($?$.parentElement:null),ve=C.useRef({activatorEvent:null,active:null,activeNode:$,collisionRect:null,collisions:null,droppableRects:X,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:M,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Z=M.getNodeFor((t=ve.current.over)==null?void 0:t.id),J=IU({measure:B.dragOverlay.measure}),ae=(r=J.nodeRef.current)!=null?r:$,he=E?(n=J.rect)!=null?n:ie:null,ue=!!(J.nodeRef.current&&J.rect),de=wU(ue?null:ie),le=i3(ae?Rr(ae):null),xe=SU(E?Z??$:null),Ee=CU(xe),Ie=l3(p,{transform:{x:T.x-de.x,y:T.y-de.y,scaleX:1,scaleY:1},activatorEvent:V,active:W,activeNodeRect:ie,containerNodeRect:ne,draggingNodeRect:he,over:ve.current.over,overlayNodeRect:J.rect,scrollableAncestors:xe,scrollableAncestorRects:Ee,windowRect:le}),Te=H?wa(H,T):null,Me=EU(xe),Ze=eC(Me),tt=eC(Me,[ie]),Fe=wa(Ie,Ze),Le=he?GW(he,Ie):null,ze=W&&Le?d({active:W,collisionRect:Le,droppableRects:X,droppableContainers:P,pointerCoordinates:Te}):null,Je=FW(ze,"id"),[rt,Pt]=C.useState(null),gt=ue?Ie:wa(Ie,tt),Rt=WW(gt,(i=rt==null?void 0:rt.rect)!=null?i:null,ie),qt=C.useRef(null),Ot=C.useCallback((zt,Mt)=>{let{sensor:Lt,options:fr}=Mt;if(U.current==null)return;const kt=N.get(U.current);if(!kt)return;const At=zt.nativeEvent,hr=new Lt({active:U.current,activeNode:kt,event:At,options:fr,context:ve,onAbort(Et){if(!N.get(Et))return;const{onDragAbort:Bt}=G.current,pr={id:Et};Bt==null||Bt(pr),w({type:"onDragAbort",event:pr})},onPending(Et,Bt,pr,vr){if(!N.get(Et))return;const{onDragPending:yr}=G.current,sr={id:Et,constraint:Bt,initialCoordinates:pr,offset:vr};yr==null||yr(sr),w({type:"onDragPending",event:sr})},onStart(Et){const Bt=U.current;if(Bt==null)return;const pr=N.get(Bt);if(!pr)return;const{onDragStart:vr}=G.current,yr={activatorEvent:At,active:{id:Bt,data:pr.data,rect:j}};xn.unstable_batchedUpdates(()=>{vr==null||vr(yr),S(Ui.Initializing),g({type:Zt.DragStart,initialCoordinates:Et,active:Bt}),w({type:"onDragStart",event:yr}),K(qt.current),te(At)})},onMove(Et){g({type:Zt.DragMove,coordinates:Et})},onEnd:Mr(Zt.DragEnd),onCancel:Mr(Zt.DragCancel)});qt.current=hr;function Mr(Et){return async function(){const{active:Bt,collisions:pr,over:vr,scrollAdjustedTranslate:yr}=ve.current;let sr=null;if(Bt&&yr){const{cancelDrop:Tn}=G.current;sr={activatorEvent:At,active:Bt,collisions:pr,delta:yr,over:vr},Et===Zt.DragEnd&&typeof Tn=="function"&&await Promise.resolve(Tn(sr))&&(Et=Zt.DragCancel)}U.current=null,xn.unstable_batchedUpdates(()=>{g({type:Et}),S(Ui.Uninitialized),Pt(null),K(null),te(null),qt.current=null;const Tn=Et===Zt.DragEnd?"onDragEnd":"onDragCancel";if(sr){const Un=G.current[Tn];Un==null||Un(sr),w({type:Tn,event:sr})}})}}},[N]),Gr=C.useCallback((zt,Mt)=>(Lt,fr)=>{const kt=Lt.nativeEvent,At=N.get(fr);if(U.current!==null||!At||kt.dndKit||kt.defaultPrevented)return;const hr={active:At};zt(Lt,Mt.options,hr)===!0&&(kt.dndKit={capturedBy:Mt.sensor},U.current=fr,Ot(Lt,Mt))},[N,Ot]),Kr=gU(u,Gr);_U(u),Bn(()=>{ie&&_===Ui.Initializing&&S(Ui.Initialized)},[ie,_]),C.useEffect(()=>{const{onDragMove:zt}=G.current,{active:Mt,activatorEvent:Lt,collisions:fr,over:kt}=ve.current;if(!Mt||!Lt)return;const At={active:Mt,activatorEvent:Lt,collisions:fr,delta:{x:Fe.x,y:Fe.y},over:kt};xn.unstable_batchedUpdates(()=>{zt==null||zt(At),w({type:"onDragMove",event:At})})},[Fe.x,Fe.y]),C.useEffect(()=>{const{active:zt,activatorEvent:Mt,collisions:Lt,droppableContainers:fr,scrollAdjustedTranslate:kt}=ve.current;if(!zt||U.current==null||!Mt||!kt)return;const{onDragOver:At}=G.current,hr=fr.get(Je),Mr=hr&&hr.rect.current?{id:hr.id,rect:hr.rect.current,data:hr.data,disabled:hr.disabled}:null,Et={active:zt,activatorEvent:Mt,collisions:Lt,delta:{x:kt.x,y:kt.y},over:Mr};xn.unstable_batchedUpdates(()=>{Pt(Mr),At==null||At(Et),w({type:"onDragOver",event:Et})})},[Je]),Bn(()=>{ve.current={activatorEvent:V,active:W,activeNode:$,collisionRect:Le,collisions:ze,droppableRects:X,draggableNodes:N,draggingNode:ae,draggingNodeRect:he,droppableContainers:M,over:rt,scrollableAncestors:xe,scrollAdjustedTranslate:Fe},j.current={initial:he,translated:Le}},[W,$,ze,Le,N,ae,he,X,M,rt,xe,Fe]),fU({...q,delta:T,draggingRect:Le,pointerCoordinates:Te,scrollableAncestors:xe,scrollableAncestorRects:Ee});const ar=C.useMemo(()=>({active:W,activeNode:$,activeNodeRect:ie,activatorEvent:V,collisions:ze,containerNodeRect:ne,dragOverlay:J,draggableNodes:N,droppableContainers:M,droppableRects:X,over:rt,measureDroppableContainers:Q,scrollableAncestors:xe,scrollableAncestorRects:Ee,measuringConfiguration:B,measuringScheduled:D,windowRect:le}),[W,$,ie,V,ze,ne,J,N,M,X,rt,Q,xe,Ee,B,D,le]),Nn=C.useMemo(()=>({activatorEvent:V,activators:Kr,active:W,activeNodeRect:ie,ariaDescribedById:{draggable:re},dispatch:g,draggableNodes:N,over:rt,measureDroppableContainers:Q}),[V,Kr,W,ie,g,re,N,rt,Q]);return C.createElement(Uj.Provider,{value:x},C.createElement(Ol.Provider,{value:Nn},C.createElement(s3.Provider,{value:ar},C.createElement(yd.Provider,{value:Rt},c)),C.createElement(kU,{disabled:(a==null?void 0:a.restoreFocus)===!1})),C.createElement(AW,{...a,hiddenTextDescribedById:re}));function io(){const zt=(A==null?void 0:A.autoScrollEnabled)===!1,Mt=typeof s=="object"?s.enabled===!1:s===!1,Lt=E&&!zt&&!Mt;return typeof s=="object"?{...s,enabled:Lt}:{enabled:Lt}}}),qU=C.createContext(null),rC="button",zU="Draggable";function LU(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e;const o=_l(zU),{activators:a,activatorEvent:s,active:c,activeNodeRect:u,ariaDescribedById:d,draggableNodes:h,over:p}=C.useContext(Ol),{role:v=rC,roleDescription:y="draggable",tabIndex:m=0}=i??{},g=(c==null?void 0:c.id)===t,w=C.useContext(g?yd:qU),[x,_]=Du(),[S,E]=Du(),I=OU(a,t),N=sl(r);Bn(()=>(h.set(t,{id:t,key:o,node:x,activatorNode:S,data:N}),()=>{const M=h.get(t);M&&M.key===o&&h.delete(t)}),[h,t]);const T=C.useMemo(()=>({role:v,tabIndex:m,"aria-disabled":n,"aria-pressed":g&&v===rC?!0:void 0,"aria-roledescription":y,"aria-describedby":d.draggable}),[n,v,m,g,y,d.draggable]);return{active:c,activatorEvent:s,activeNodeRect:u,attributes:T,isDragging:g,listeners:n?void 0:I,node:x,over:p,setNodeRef:_,setActivatorNodeRef:E,transform:w}}function c3(){return C.useContext(s3)}const BU="Droppable",FU={timeout:25};function $U(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:i}=e;const o=_l(BU),{active:a,dispatch:s,over:c,measureDroppableContainers:u}=C.useContext(Ol),d=C.useRef({disabled:r}),h=C.useRef(!1),p=C.useRef(null),v=C.useRef(null),{disabled:y,updateMeasurementsFor:m,timeout:g}={...FU,...i},w=sl(m??n),x=C.useCallback(()=>{if(!h.current){h.current=!0;return}v.current!=null&&clearTimeout(v.current),v.current=setTimeout(()=>{u(Array.isArray(w.current)?w.current:[w.current]),v.current=null},g)},[g]),_=bd({callback:x,disabled:y||!a}),S=C.useCallback((T,M)=>{_&&(M&&(_.unobserve(M),h.current=!1),T&&_.observe(T))},[_]),[E,I]=Du(S),N=sl(t);return C.useEffect(()=>{!_||!E.current||(_.disconnect(),h.current=!1,_.observe(E.current))},[E,_]),C.useEffect(()=>(s({type:Zt.RegisterDroppable,element:{id:n,key:o,disabled:r,node:E,rect:p,data:N}}),()=>s({type:Zt.UnregisterDroppable,key:o,id:n})),[n]),C.useEffect(()=>{r!==d.current.disabled&&(s({type:Zt.SetDroppableDisabled,id:n,key:o,disabled:r}),d.current.disabled=r)},[n,o,r,s]),{active:a,rect:p,isOver:(c==null?void 0:c.id)===n,node:E,over:c,setNodeRef:I}}function VU(e){let{animation:t,children:r}=e;const[n,i]=C.useState(null),[o,a]=C.useState(null),s=ju(r);return!r&&!n&&s&&i(s),Bn(()=>{if(!o)return;const c=n==null?void 0:n.key,u=n==null?void 0:n.props.id;if(c==null||u==null){i(null);return}Promise.resolve(t(u,o)).then(()=>{i(null)})},[t,n,o]),C.createElement(C.Fragment,null,r,n?C.cloneElement(n,{ref:a}):null)}const HU={x:0,y:0,scaleX:1,scaleY:1};function WU(e){let{children:t}=e;return C.createElement(Ol.Provider,{value:a3},C.createElement(yd.Provider,{value:HU},t))}const UU={position:"fixed",touchAction:"none"},GU=e=>md(e)?"transform 250ms ease":void 0,KU=C.forwardRef((e,t)=>{let{as:r,activatorEvent:n,adjustScale:i,children:o,className:a,rect:s,style:c,transform:u,transition:d=GU}=e;if(!s)return null;const h=i?u:{...u,scaleX:1,scaleY:1},p={...UU,width:s.width,height:s.height,top:s.top,left:s.left,transform:Zi.Transform.toString(h),transformOrigin:i&&n?zW(n,s):void 0,transition:typeof d=="function"?d(n):d,...c};return C.createElement(r,{className:a,style:p,ref:t},o)}),YU=e=>t=>{let{active:r,dragOverlay:n}=t;const i={},{styles:o,className:a}=e;if(o!=null&&o.active)for(const[s,c]of Object.entries(o.active))c!==void 0&&(i[s]=r.node.style.getPropertyValue(s),r.node.style.setProperty(s,c));if(o!=null&&o.dragOverlay)for(const[s,c]of Object.entries(o.dragOverlay))c!==void 0&&n.node.style.setProperty(s,c);return a!=null&&a.active&&r.node.classList.add(a.active),a!=null&&a.dragOverlay&&n.node.classList.add(a.dragOverlay),function(){for(const[s,c]of Object.entries(i))r.node.style.setProperty(s,c);a!=null&&a.active&&r.node.classList.remove(a.active)}},XU=e=>{let{transform:{initial:t,final:r}}=e;return[{transform:Zi.Transform.toString(t)},{transform:Zi.Transform.toString(r)}]},ZU={duration:250,easing:"ease",keyframes:XU,sideEffects:YU({styles:{active:{opacity:"0"}}})};function JU(e){let{config:t,draggableNodes:r,droppableContainers:n,measuringConfiguration:i}=e;return gd((o,a)=>{if(t===null)return;const s=r.get(o);if(!s)return;const c=s.node.current;if(!c)return;const u=o3(a);if(!u)return;const{transform:d}=Rr(a).getComputedStyle(a),h=Kj(d);if(!h)return;const p=typeof t=="function"?t:QU(t);return t3(c,i.draggable.measure),p({active:{id:o,data:s.data,node:c,rect:i.draggable.measure(c)},draggableNodes:r,dragOverlay:{node:a,rect:i.dragOverlay.measure(u)},droppableContainers:n,measuringConfiguration:i,transform:h})})}function QU(e){const{duration:t,easing:r,sideEffects:n,keyframes:i}={...ZU,...e};return o=>{let{active:a,dragOverlay:s,transform:c,...u}=o;if(!t)return;const d={x:s.rect.left-a.rect.left,y:s.rect.top-a.rect.top},h={scaleX:c.scaleX!==1?a.rect.width*c.scaleX/s.rect.width:1,scaleY:c.scaleY!==1?a.rect.height*c.scaleY/s.rect.height:1},p={x:c.x-d.x,y:c.y-d.y,...h},v=i({...u,active:a,dragOverlay:s,transform:{initial:c,final:p}}),[y]=v,m=v[v.length-1];if(JSON.stringify(y)===JSON.stringify(m))return;const g=n==null?void 0:n({active:a,dragOverlay:s,...u}),w=s.node.animate(v,{duration:t,easing:r,fill:"forwards"});return new Promise(x=>{w.onfinish=()=>{g==null||g(),x()}})}}let nC=0;function eG(e){return C.useMemo(()=>{if(e!=null)return nC++,nC},[e])}const tG=C.memo(e=>{let{adjustScale:t=!1,children:r,dropAnimation:n,style:i,transition:o,modifiers:a,wrapperElement:s="div",className:c,zIndex:u=999}=e;const{activatorEvent:d,active:h,activeNodeRect:p,containerNodeRect:v,draggableNodes:y,droppableContainers:m,dragOverlay:g,over:w,measuringConfiguration:x,scrollableAncestors:_,scrollableAncestorRects:S,windowRect:E}=c3(),I=C.useContext(yd),N=eG(h==null?void 0:h.id),T=l3(a,{activatorEvent:d,active:h,activeNodeRect:p,containerNodeRect:v,draggingNodeRect:g.rect,over:w,overlayNodeRect:g.rect,scrollableAncestors:_,scrollableAncestorRects:S,transform:I,windowRect:E}),M=h1(p),z=JU({config:n,draggableNodes:y,droppableContainers:m,measuringConfiguration:x}),j=M?g.setRef:void 0;return C.createElement(WU,null,C.createElement(VU,{animation:z},h&&N?C.createElement(KU,{key:N,id:h.id,ref:j,as:s,activatorEvent:d,adjustScale:t,className:c,transition:o,rect:M,style:{zIndex:u,...i},transform:T},r):null))});function p1(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function rG(e,t){return e.reduce((r,n,i)=>{const o=t.get(n);return o&&(r[i]=o),r},Array(e.length))}function Dc(e){return e!==null&&e>=0}function nG(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function iG(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const jc={scaleX:1,scaleY:1},oG=e=>{var t;let{rects:r,activeNodeRect:n,activeIndex:i,overIndex:o,index:a}=e;const s=(t=r[i])!=null?t:n;if(!s)return null;const c=aG(r,a,i);if(a===i){const u=r[o];return u?{x:i<o?u.left+u.width-(s.left+s.width):u.left-s.left,y:0,...jc}:null}return a>i&&a<=o?{x:-s.width-c,y:0,...jc}:a<i&&a>=o?{x:s.width+c,y:0,...jc}:{x:0,y:0,...jc}};function aG(e,t,r){const n=e[t],i=e[t-1],o=e[t+1];return!n||!i&&!o?0:r<t?i?n.left-(i.left+i.width):o.left-(n.left+n.width):o?o.left-(n.left+n.width):n.left-(i.left+i.width)}const u3=e=>{let{rects:t,activeIndex:r,overIndex:n,index:i}=e;const o=p1(t,n,r),a=t[i],s=o[i];return!s||!a?null:{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}},d3="Sortable",f3=C.createContext({activeIndex:-1,containerId:d3,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:u3,disabled:{draggable:!1,droppable:!1}});function sG(e){let{children:t,id:r,items:n,strategy:i=u3,disabled:o=!1}=e;const{active:a,dragOverlay:s,droppableRects:c,over:u,measureDroppableContainers:d}=c3(),h=_l(d3,r),p=s.rect!==null,v=C.useMemo(()=>n.map(I=>typeof I=="object"&&"id"in I?I.id:I),[n]),y=a!=null,m=a?v.indexOf(a.id):-1,g=u?v.indexOf(u.id):-1,w=C.useRef(v),x=!nG(v,w.current),_=g!==-1&&m===-1||x,S=iG(o);Bn(()=>{x&&y&&d(v)},[x,v,y,d]),C.useEffect(()=>{w.current=v},[v]);const E=C.useMemo(()=>({activeIndex:m,containerId:h,disabled:S,disableTransforms:_,items:v,overIndex:g,useDragOverlay:p,sortedRects:rG(v,c),strategy:i}),[m,h,S.draggable,S.droppable,_,v,g,c,p,i]);return C.createElement(f3.Provider,{value:E},t)}const lG=e=>{let{id:t,items:r,activeIndex:n,overIndex:i}=e;return p1(r,n,i).indexOf(t)},cG=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:c,transition:u}=e;return!u||!n||s!==o&&i===a?!1:r?!0:a!==i&&t===c},uG={duration:200,easing:"ease"},h3="transform",dG=Zi.Transition.toString({property:h3,duration:0,easing:"linear"}),fG={roleDescription:"sortable"};function hG(e){let{disabled:t,index:r,node:n,rect:i}=e;const[o,a]=C.useState(null),s=C.useRef(r);return Bn(()=>{if(!t&&r!==s.current&&n.current){const c=i.current;if(c){const u=$a(n.current,{ignoreTransform:!0}),d={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(d.x||d.y)&&a(d)}}r!==s.current&&(s.current=r)},[t,r,n,i]),C.useEffect(()=>{o&&a(null)},[o]),o}function pG(e){let{animateLayoutChanges:t=cG,attributes:r,disabled:n,data:i,getNewIndex:o=lG,id:a,strategy:s,resizeObserverConfig:c,transition:u=uG}=e;const{items:d,containerId:h,activeIndex:p,disabled:v,disableTransforms:y,sortedRects:m,overIndex:g,useDragOverlay:w,strategy:x}=C.useContext(f3),_=vG(n,v),S=d.indexOf(a),E=C.useMemo(()=>({sortable:{containerId:h,index:S,items:d},...i}),[h,i,S,d]),I=C.useMemo(()=>d.slice(d.indexOf(a)),[d,a]),{rect:N,node:T,isOver:M,setNodeRef:z}=$U({id:a,data:E,disabled:_.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...c}}),{active:j,activatorEvent:W,activeNodeRect:U,attributes:A,setNodeRef:K,listeners:V,isDragging:te,over:G,setActivatorNodeRef:re,transform:P}=LU({id:a,data:E,attributes:{...fG,...r},disabled:_.draggable}),B=wW(z,K),X=!!j,Q=X&&!y&&Dc(p)&&Dc(g),D=!w&&te,$=D&&Q?P:null,H=Q?$??(s??x)({rects:m,activeNodeRect:U,activeIndex:p,overIndex:g,index:S}):null,q=Dc(p)&&Dc(g)?o({id:a,items:d,activeIndex:p,overIndex:g}):S,Y=j==null?void 0:j.id,ie=C.useRef({activeId:Y,items:d,newIndex:q,containerId:h}),ne=d!==ie.current.items,ve=t({active:j,containerId:h,isDragging:te,isSorting:X,id:a,index:S,items:d,newIndex:ie.current.newIndex,previousItems:ie.current.items,previousContainerId:ie.current.containerId,transition:u,wasDragging:ie.current.activeId!=null}),Z=hG({disabled:!ve,index:S,node:T,rect:N});return C.useEffect(()=>{X&&ie.current.newIndex!==q&&(ie.current.newIndex=q),h!==ie.current.containerId&&(ie.current.containerId=h),d!==ie.current.items&&(ie.current.items=d)},[X,q,h,d]),C.useEffect(()=>{if(Y===ie.current.activeId)return;if(Y!=null&&ie.current.activeId==null){ie.current.activeId=Y;return}const ae=setTimeout(()=>{ie.current.activeId=Y},50);return()=>clearTimeout(ae)},[Y]),{active:j,activeIndex:p,attributes:A,data:E,rect:N,index:S,newIndex:q,items:d,isOver:M,isSorting:X,isDragging:te,listeners:V,node:T,overIndex:g,over:G,setNodeRef:B,setActivatorNodeRef:re,setDroppableNodeRef:z,setDraggableNodeRef:K,transform:Z??H,transition:J()};function J(){if(Z||ne&&ie.current.newIndex===S)return dG;if(!(D&&!md(W)||!u)&&(X||ve))return Zi.Transition.toString({...u,property:h3})}}function vG(e,t){var r,n;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e==null?void 0:e.draggable)!=null?r:t.draggable,droppable:(n=e==null?void 0:e.droppable)!=null?n:t.droppable}}at.Down,at.Right,at.Up,at.Left;const gG=e=>{let{transform:t}=e;return{...t,y:0}};function mG(e,t,r){const n={...e};return t.top+e.y<=r.top?n.y=r.top-t.top:t.bottom+e.y>=r.top+r.height&&(n.y=r.top+r.height-t.bottom),t.left+e.x<=r.left?n.x=r.left-t.left:t.right+e.x>=r.left+r.width&&(n.x=r.left+r.width-t.right),n}const bG=e=>{let{draggingNodeRect:t,transform:r,scrollableAncestorRects:n}=e;const i=n[0];return!t||!i?r:mG(r,t,i)},iC=({tab:e,value:t,isActive:r,onTabClick:n,dragOverlay:i=!1})=>{const o=e,a=o.onClose,s=o.renderTab,{attributes:c,listeners:u,setNodeRef:d,transform:h,transition:p,isDragging:v}=pG({id:t}),y={transform:Zi.Transform.toString(h),transition:p||"transform 200ms cubic-bezier(0.2, 0, 0, 1) 0s",opacity:v&&!i?.5:1,cursor:"pointer"},m=()=>{n(t)},g=w=>{w==null||w.stopPropagation(),a&&a(t)};return s?O.jsx("div",{ref:d,style:y,...c,...u,className:"flex h-full shrink-0 select-none focus:outline-hidden","aria-roledescription":"sortable",children:s({tab:e,isActive:r,onClick:m,onClose:a?g:void 0})}):null},p3={sm:{padding:"px-4 py-0.5",text:"text-xxs",icon:"w-3 h-3",gap:"gap-0.5",badge:"min-w-3.5 h-3.5 text-2"},md:{padding:"px-6 py-1",text:"text-s",icon:"w-4 h-4",gap:"gap-1",badge:"min-w-4.5 h-4.5 text-xxs"},lg:{padding:"px-8 py-1.5",text:"text-base",icon:"w-5 h-5",gap:"gap-1.5",badge:"min-w-5 h-5 text-xs"}},yG={primary:{active:{bg:"bg-primary",text:"text-button-text",border:"border-primary"},inactive:{bg:"bg-input-bg",text:"text-inactive-text",border:"border-transparent"},hover:{bg:"hover:bg-primary-hover",text:"hover:text-button-text"}},positive:{active:{bg:"bg-positive",text:"text-button-text",border:"border-positive"},inactive:{bg:"bg-input-bg",text:"text-inactive-text",border:"border-transparent"},hover:{bg:"hover:bg-positive-hover",text:"hover:text-body"}},warning:{active:{bg:"bg-warning",text:"text-warning-text",border:"border-warning"},inactive:{bg:"bg-input-bg",text:"text-inactive-text",border:"border-transparent"},hover:{bg:"hover:bg-warning-hover",text:"hover:text-body"}},negative:{active:{bg:"bg-negative",text:"text-button-text",border:"border-negative"},inactive:{bg:"bg-input-bg",text:"text-inactive-text",border:"border-transparent"},hover:{bg:"hover:bg-negative-hover",text:"hover:text-body"}}},oC=()=>ye("inline-flex items-center rounded overflow-hidden"),v3=(e,t,r,n)=>{const i=yG[e],o=p3[t],a="relative inline-flex items-center font-medium cursor-pointer transition-all duration-200";return n?ye(a,o.padding,o.text,o.gap,"pointer-events-none cursor-not-allowed opacity-50","bg-card","text-inactive-text"):r?ye(a,o.padding,o.text,o.gap,i.active.bg,i.active.text,"shadow-xs"):ye(a,o.padding,o.text,o.gap,i.inactive.bg,i.inactive.text,i.hover.bg,i.hover.text)},g3=(e,t)=>ye("flex items-center justify-center",p3[e].icon,{"opacity-50":t}),m3=()=>ye("whitespace-nowrap"),qh=()=>ye("min-w-full flex h-8 bg-tab-bg-default pt-0.5"),b3=(e,t)=>{const r=ye("group flex items-center justify-between space-x-4","rounded-t px-2 text-xs","focus:outline-hidden");return e&&!t?ye(r,"z-2 border border-b-0 border-tab-border","bg-tab-active-bg font-semibold text-tab-active-fg"):t&&!e?ye(r,"border border-transparent bg-tab-inactive-bg text-inactive-text"):ye(r,"border border-transparent bg-tab-inactive-bg text-tab-inactive-fg","hover:text-tab-active-fg")},Rw=C.createContext(void 0),y3=C.forwardRef(({value:e,label:t,icon:r,disabled:n,children:i,className:o,onClick:a,active:s,onClose:c,closable:u,touched:d,content:h,renderTab:p,...v},y)=>{const m=C.useContext(Rw);if(!m)return null;const{activeTab:g,onTabChange:w,variant:x,color:_,size:S,showIcons:E,disabled:I}=m,N=s!==void 0?s:g===e,T=n||I,M=z=>{T||(w(e),a==null||a(z))};return x==="file"?O.jsx("div",{"data-qui":"FileTabItem",className:ye(b3(N,!1),"cursor-pointer",o),onClick:z=>!T&&M(z),children:i||O.jsx(O.Fragment,{children:O.jsxs("span",{className:"flex items-center gap-2",children:[r,O.jsx("span",{children:t})]})})}):O.jsxs("button",{ref:y,"data-qui":"TabItem",type:"button",role:"tab","aria-selected":N,"aria-disabled":T,className:ye(v3(_,S,N,T||!1),o),onClick:M,disabled:T,...v,children:[E&&r&&O.jsx("span",{className:g3(S,T||!1),children:r}),O.jsx("span",{className:m3(),children:i||t})]})});y3.displayName="TabItem";const xG=({tab:e,value:t,label:r,isActive:n,color:i="primary",size:o="md",showIcons:a,onTabClick:s})=>{const c=e,u=c.icon,d=c.disabled??!1,h=c.onClose,p=c.renderTab,v=()=>{d||s(t)},y=m=>{m==null||m.stopPropagation(),!d&&h&&h(t)};return p?O.jsx(O.Fragment,{children:p({tab:e,isActive:n,onClick:v,onClose:h?y:void 0})}):O.jsxs("button",{"data-qui":"TabItem",type:"button",role:"tab","aria-selected":n,"aria-disabled":d,className:v3(i,o,n,d),onClick:v,disabled:d,children:[a&&u&&O.jsx("span",{className:g3(o,d),children:u}),O.jsx("span",{className:m3(),children:r})]})},wG=({tab:e,value:t,isActive:r,onTabClick:n})=>{const i=e,o=i.onClose,a=i.renderTab,s=()=>{n(t)},c=u=>{u==null||u.stopPropagation(),o&&o(t)};return a?O.jsx("div",{"data-qui":"FileTabItem",className:"flex h-full shrink-0 select-none focus:outline-hidden",children:a({tab:e,isActive:r,onClick:s,onClose:o?c:void 0})}):null},SG=[],v1=({tabs:e=SG,valueKey:t="value",labelKey:r="label",activeTab:n,defaultValue:i,variant:o="default",color:a="primary",size:s="md",draggable:c=!1,showIcons:u=!0,disabled:d=!1,className:h,tabListClassName:p,onTabChange:v,onReorder:y,renderTab:m,children:g})=>{const w=G=>{const re=G[t]??G.value??G.key;return re!==void 0?String(re):""},x=G=>G[r]??G.label,_=i||(e[0]?w(e[0]):""),[S,E]=C.useState(_),[I,N]=C.useState(null),[T,M]=C.useState(e),z=n!==void 0?n:S,j=T,W=jW(DW(f1,{activationConstraint:{distance:10}})),U=G=>{n===void 0&&E(G),v==null||v(G)},A=G=>j.findIndex(re=>w(re)===G),K=I?A(I):-1;C.useEffect(()=>{M(e)},[e]);const V={activeTab:z,onTabChange:U,variant:o,color:a,size:s,showIcons:u,disabled:d};if(g)return O.jsxs(Rw.Provider,{value:V,children:[O.jsx("div",{"data-qui":"Tabs",role:"tablist",className:ye(o==="file"?qh():oC(),h,p),children:g}),o==="file"&&O.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]});const te=o==="file"&&c?O.jsxs("div",{className:"relative h-full w-full",children:[O.jsxs(jU,{collisionDetection:$W,modifiers:[gG,bG],sensors:W,onDragStart:({active:G})=>{G&&N(G.id)},onDragEnd:({over:G})=>{if(N(null),G){const re=A(G.id);if(K!==re&&K!==-1){const P=p1(j,K,re);M(P),y&&y(P,P[re]),U(w(P[re]))}}},onDragCancel:()=>{N(null)},children:[O.jsx(sG,{items:j.map(G=>w(G)),strategy:oG,children:O.jsx("div",{role:"tablist",className:ye(qh(),p),children:j.map(G=>{const re=w(G);return O.jsx(iC,{value:re,tab:{...G,renderTab:G.renderTab||m},isActive:z===re,onTabClick:U,className:h},re)})})}),O.jsx(tG,{children:I&&K!==-1?O.jsx(iC,{value:w(j[K]),tab:{...j[K],renderTab:j[K].renderTab||m},isActive:z===w(j[K]),onTabClick:U,dragOverlay:!0,className:h}):null})]}),O.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]}):o==="file"?O.jsxs("div",{className:"relative",children:[O.jsx("div",{role:"tablist",className:ye(qh(),p),children:e.map(G=>{const re=w(G);return O.jsx(wG,{value:re,tab:{...G,renderTab:G.renderTab||m},isActive:z===re,onTabClick:U},re)})}),O.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]}):O.jsx("div",{role:"tablist",className:ye(oC(),p),children:e.map(G=>{const re=w(G);return O.jsx(xG,{value:re,label:x(G),tab:{...G,renderTab:G.renderTab||m},isActive:z===re,color:a,size:s,showIcons:u,onTabClick:U},re)})});return O.jsx(Rw.Provider,{value:V,children:O.jsx("div",{"data-qui":"Tabs",className:h,children:te})})},EG=C.forwardRef(({isActive:e=!1,isDesactive:t=!1,children:r,...n},i)=>O.jsx("div",{"data-qui":"TabNavContainer",className:b3(e,t),ref:i,...n,children:r}));EG.displayName="TabNavContainer";v1.displayName="Tabs";v1.Item=y3;const zh=v1;var Wt=function(){return Wt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Wt.apply(this,arguments)},aC={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},sC={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},qc={width:"20px",height:"20px",position:"absolute",zIndex:1},_G={top:Wt(Wt({},aC),{top:"-5px"}),right:Wt(Wt({},sC),{left:void 0,right:"-5px"}),bottom:Wt(Wt({},aC),{top:void 0,bottom:"-5px"}),left:Wt(Wt({},sC),{left:"-5px"}),topRight:Wt(Wt({},qc),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Wt(Wt({},qc),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Wt(Wt({},qc),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Wt(Wt({},qc),{left:"-10px",top:"-10px",cursor:"nw-resize"})},OG=C.memo(function(e){var t=e.onResizeStart,r=e.direction,n=e.children,i=e.replaceStyles,o=e.className,a=C.useCallback(function(u){t(u,r)},[t,r]),s=C.useCallback(function(u){t(u,r)},[t,r]),c=C.useMemo(function(){return Wt(Wt({position:"absolute",userSelect:"none"},_G[r]),i??{})},[i,r]);return O.jsx("div",{className:o||void 0,style:c,onMouseDown:a,onTouchStart:s,children:n})}),CG=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},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)}})(),ei=function(){return ei=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ei.apply(this,arguments)},IG={width:"auto",height:"auto"},zc=function(e,t,r){return Math.max(Math.min(e,r),t)},lC=function(e,t,r){var n=Math.round(e/t);return n*t+r*(n-1)},ia=function(e,t){return new RegExp(e,"i").test(t)},Lc=function(e){return!!(e.touches&&e.touches.length)},RG=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},cC=function(e,t,r){r===void 0&&(r=0);var n=t.reduce(function(o,a,s){return Math.abs(a-e)<Math.abs(t[o]-e)?s:o},0),i=Math.abs(t[n]-e);return r===0||i<r?t[n]:e},Lh=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")},Bc=function(e,t,r,n){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var i=Number(e.replace("%",""))/100;return t*i}if(e.endsWith("vw")){var i=Number(e.replace("vw",""))/100;return r*i}if(e.endsWith("vh")){var i=Number(e.replace("vh",""))/100;return n*i}}return e},NG=function(e,t,r,n,i,o,a){return n=Bc(n,e.width,t,r),i=Bc(i,e.height,t,r),o=Bc(o,e.width,t,r),a=Bc(a,e.height,t,r),{maxWidth:typeof n>"u"?void 0:Number(n),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},TG=function(e){return Array.isArray(e)?e:[e,e]},PG=["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"],uC="__resizable_base__",MG=(function(e){CG(t,e);function t(r){var n,i,o,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(uC):u.className+=uC,c.appendChild(u),u},s.removeBase=function(c){var u=s.parentNode;u&&u.removeChild(c)},s.state={isResizing:!1,width:(i=(n=s.propsSize)===null||n===void 0?void 0:n.width)!==null&&i!==void 0?i:"auto",height:(a=(o=s.propsSize)===null||o===void 0?void 0:o.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||IG},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var r=0,n=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),r=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,n=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,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,i=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","")),h=d/u[s]*100;return"".concat(h,"%")}return Lh(r.state[s])},o=n&&typeof n.width<"u"&&!this.state.isResizing?Lh(n.width):i("width"),a=n&&typeof n.height<"u"&&!this.state.isResizing?Lh(n.height):i("height");return{width:o,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,i=this.parentNode.style.flexWrap;i!=="wrap"&&(n=!0,this.parentNode.style.flexWrap="wrap"),r.style.position="relative",r.style.minWidth="100%",r.style.minHeight="100%";var o={width:r.offsetWidth,height:r.offsetHeight};return n&&(this.parentNode.style.flexWrap=i),this.removeBase(r),o},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 i=this.propsSize&&this.propsSize[n];return this.state[n]==="auto"&&this.state.original[n]===r&&(typeof i>"u"||i==="auto")?"auto":r},t.prototype.calculateNewMaxFromBoundary=function(r,n){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&ia("left",o),s=i&&ia("top",o),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 i=this.props.scale||1,o=TG(this.props.resizeRatio||1),a=o[0],s=o[1],c=this.state,u=c.direction,d=c.original,h=this.props,p=h.lockAspectRatio,v=h.lockAspectRatioExtraHeight,y=h.lockAspectRatioExtraWidth,m=d.width,g=d.height,w=v||0,x=y||0;return ia("right",u)&&(m=d.width+(r-d.x)*a/i,p&&(g=(m-x)/this.ratio+w)),ia("left",u)&&(m=d.width-(r-d.x)*a/i,p&&(g=(m-x)/this.ratio+w)),ia("bottom",u)&&(g=d.height+(n-d.y)*s/i,p&&(m=(g-w)*this.ratio+x)),ia("top",u)&&(g=d.height-(n-d.y)*s/i,p&&(m=(g-w)*this.ratio+x)),{newWidth:m,newHeight:g}},t.prototype.calculateNewSizeFromAspectRatio=function(r,n,i,o){var a=this.props,s=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,d=typeof o.width>"u"?10:o.width,h=typeof i.width>"u"||i.width<0?r:i.width,p=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?n:i.height,y=c||0,m=u||0;if(s){var g=(p-y)*this.ratio+m,w=(v-y)*this.ratio+m,x=(d-m)/this.ratio+y,_=(h-m)/this.ratio+y,S=Math.max(d,g),E=Math.min(h,w),I=Math.max(p,x),N=Math.min(v,_);r=zc(r,S,E),n=zc(n,I,N)}else r=zc(r,d,h),n=zc(n,p,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 i=n.getBoundingClientRect();this.parentLeft=i.left*r,this.parentTop=i.top*r}}if(this.props.bounds&&typeof this.props.bounds!="string"){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left*r,this.targetTop=o.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 i=0,o=0;if(r.nativeEvent&&RG(r.nativeEvent)?(i=r.nativeEvent.clientX,o=r.nativeEvent.clientY):r.nativeEvent&&Lc(r.nativeEvent)&&(i=r.nativeEvent.touches[0].clientX,o=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 h={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ei(ei({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(r.target).cursor||"auto"}),direction:n,flexBasis:s};this.setState(h)}},t.prototype.onMouseMove=function(r){var n=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Lc(r))try{r.preventDefault(),r.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,c=i.minHeight,u=Lc(r)?r.touches[0].clientX:r.clientX,d=Lc(r)?r.touches[0].clientY:r.clientY,h=this.state,p=h.direction,v=h.original,y=h.width,m=h.height,g=this.getParentSize(),w=NG(g,this.window.innerWidth,this.window.innerHeight,o,a,s,c);o=w.maxWidth,a=w.maxHeight,s=w.minWidth,c=w.minHeight;var x=this.calculateNewSizeFromDirection(u,d),_=x.newHeight,S=x.newWidth,E=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(S=cC(S,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(_=cC(_,this.props.snap.y,this.props.snapGap));var I=this.calculateNewSizeFromAspectRatio(S,_,{width:E.maxWidth,height:E.maxHeight},{width:s,height:c});if(S=I.newWidth,_=I.newHeight,this.props.grid){var N=lC(S,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),T=lC(_,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),M=this.props.snapGap||0,z=M===0||Math.abs(N-S)<=M?N:S,j=M===0||Math.abs(T-_)<=M?T:_;S=z,_=j}var W={width:S-v.width,height:_-v.height};if(this.delta=W,y&&typeof y=="string"){if(y.endsWith("%")){var U=S/g.width*100;S="".concat(U,"%")}else if(y.endsWith("vw")){var A=S/this.window.innerWidth*100;S="".concat(A,"vw")}else if(y.endsWith("vh")){var K=S/this.window.innerHeight*100;S="".concat(K,"vh")}}if(m&&typeof m=="string"){if(m.endsWith("%")){var U=_/g.height*100;_="".concat(U,"%")}else if(m.endsWith("vw")){var A=_/this.window.innerWidth*100;_="".concat(A,"vw")}else if(m.endsWith("vh")){var K=_/this.window.innerHeight*100;_="".concat(K,"vh")}}var V={width:this.createSizeForCssProperty(S,"width"),height:this.createSizeForCssProperty(_,"height")};this.flexDir==="row"?V.flexBasis=V.width:this.flexDir==="column"&&(V.flexBasis=V.height);var te=this.state.width!==V.width,G=this.state.height!==V.height,re=this.state.flexBasis!==V.flexBasis,P=te||G||re;P&&xn.flushSync(function(){n.setState(V)}),this.props.onResize&&P&&this.props.onResize(r,p,this.resizable,W)}},t.prototype.onMouseUp=function(r){var n,i,o=this.state,a=o.isResizing,s=o.direction;o.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:(i=this.props.size.height)!==null&&i!==void 0?i:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ei(ei({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(r){var n,i;this.setState({width:(n=r.width)!==null&&n!==void 0?n:"auto",height:(i=r.height)!==null&&i!==void 0?i:"auto"})},t.prototype.renderResizer=function(){var r=this,n=this.props,i=n.enable,o=n.handleStyles,a=n.handleClasses,s=n.handleWrapperStyle,c=n.handleWrapperClass,u=n.handleComponent;if(!i)return null;var d=Object.keys(i).map(function(h){return i[h]!==!1?O.jsx(OG,{direction:h,onResizeStart:r.onResizeStart,replaceStyles:o&&o[h],className:a&&a[h],children:u&&u[h]?u[h]:null},h):null});return O.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 PG.indexOf(s)!==-1||(a[s]=r.props[s]),a},{}),i=ei(ei(ei({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&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return O.jsxs(o,ei({style:i,className:this.props.className},n,{ref:function(a){a&&(r.resizable=a)},children:[this.state.isResizing&&O.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})(C.PureComponent);const kG={0:"bg-panel-0",1:"bg-panel-1",2:"bg-panel-2",3:"bg-panel-3",4:"bg-panel-4",5:"bg-panel-5"},AG={tabs:"border-tab-border",primary:"border-primary",negative:"border-input-error-border",positive:"border-positive",light:"border-panel-border-subtle",default:"border-panel-border"},x3=({depth:e=0,className:t,borderType:r,disabled:n})=>ye("transition-colors duration-200",{"text-body":!n,"text-inactive-text":n},r?AG[r]:"border-panel-border",kG[e],t),DG=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 i=e.match(/min-h-\[(\d+)px\]/);i&&(t.minHeight=parseInt(i[1],10));const o=e.match(/max-h-\[(\d+)px\]/);return o&&(t.maxHeight=parseInt(o[1],10)),t},jG=C.forwardRef(({children:e,width:t,height:r,minWidth:n=10,minHeight:i=10,maxWidth:o,maxHeight:a,defaultWidth:s,defaultHeight:c,defaultSize:u,size:d,grid:h,snap:p,lockAspectRatio:v=!1,enable:y,handleStyles:m={},handleClasses:g={},handleComponent:w={},style:x={},className:_,onResizeStart:S,onResize:E,onResizeStop:I,scale:N=1,bounds:T,snapGap:M,as:z="div",depth:j,disabled:W},U)=>{const A=x3({depth:j,className:_,disabled:W}),K=DG(_),V=d?{size:d}:t!==void 0||r!==void 0?{size:{width:t??"auto",height:r??"auto"}}:{},te=u?{defaultSize:u}:s!==void 0||c!==void 0?{defaultSize:{width:s??"auto",height:c??"auto"}}:{},G=C.useRef(null);return C.useImperativeHandle(U,()=>{var re;return(re=G.current)==null?void 0:re.resizable}),O.jsx(MG,{"data-qui":"Resizable",ref:G,...V,...te,minWidth:n??K.minWidth,minHeight:i??K.minHeight,maxWidth:o??K.maxWidth,maxHeight:a??K.maxHeight,grid:h,snap:p,lockAspectRatio:v,enable:y,handleStyles:m,handleClasses:g,handleComponent:w,style:x,className:ye("relative box-border",A),onResizeStart:S,onResize:E,onResizeStop:I,scale:N,bounds:T,snapGap:M,as:z,children:e})});jG.displayName="Resizable";const oa={sm:{track:"h-4 w-7",thumb:"size-3",thumbUnchecked:"left-0.5",thumbChecked:"left-3.5",label:"text-xs",gap:"gap-2"},md:{track:"h-5 w-9",thumb:"size-4",thumbUnchecked:"left-0.5",thumbChecked:"left-4.5",label:"text-sm",gap:"gap-2.5"},lg:{track:"h-6 w-11",thumb:"size-5",thumbUnchecked:"left-0.5",thumbChecked:"left-5.5",label:"text-base",gap:"gap-3"}},Fc={primary:{bg:"bg-primary",thumb:"group-hover:bg-primary-light",icon:"text-primary"},positive:{bg:"bg-positive",thumb:"group-hover:bg-positive-light",icon:"text-positive"},warning:{bg:"bg-warning",thumb:"group-hover:bg-warning-light",icon:"text-warning"},negative:{bg:"bg-negative",thumb:"group-hover:bg-negative-light",icon:"text-negative"}},qG=(e,t,r,n,i,o)=>({container:ye("inline-flex items-center",oa[e].gap,o),track:ye("relative inline-flex items-center shrink-0 group","transition-colors duration-200 ease-in-out","focus:outline-hidden focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2","border border-input-border rounded-full justify-between",oa[e].track,{[Fc[t].bg]:r&&!n&&!i,"bg-input-bg":!r&&!n||i,"bg-panel cursor-not-allowed":n,"cursor-pointer":!n}),thumb:ye("bg-input-text pointer-events-none inline-flex items-center justify-center shadow-xs","transition-all duration-200 ease-in-out","rounded-full absolute",oa[e].thumb,r?oa[e].thumbChecked:oa[e].thumbUnchecked,{[Fc[t].thumb]:!n,"bg-canvas-subtle":n}),iconLeft:ye("flex items-center justify-center z-10 w-1/2 p-0.5",{[Fc[t].icon]:!r&&!n,"text-panel-subtle":n||r}),iconRight:ye("flex items-center justify-center z-10 w-1/2 p-0.5",{[Fc[t].icon]:r&&!n,"text-panel-subtle":n||!r}),label:ye("font-medium text-body",oa[e].label,{"cursor-pointer":!n,"cursor-not-allowed text-muted":n})}),Fu=C.forwardRef(({label:e,checked:t,defaultChecked:r=!1,disabled:n=!1,size:i="md",color:o="primary",icons:a,onChange:s,className:c,id:u,name:d,...h},p)=>{const[v,y]=C.useState(r),m=t!==void 0,g=m?t:v,w=()=>{const _=!g;m||y(_),s==null||s(_)},x=qG(i,o,g,n,!!a,c);return O.jsxs("div",{"data-qui":"Toggle",className:x.container,children:[e&&O.jsx("label",{htmlFor:u,className:x.label,children:e}),O.jsxs("button",{ref:p,...h,type:"button",role:"switch","aria-checked":g,"aria-label":e,disabled:n,onClick:w,name:d,id:u,className:x.track,children:[a&&O.jsx("span",{className:x.iconLeft,children:a.unchecked}),O.jsx("span",{className:x.thumb,"aria-hidden":"true"}),a&&O.jsx("span",{className:x.iconRight,children:a.checked})]})]})});Fu.displayName="Toggle";C.createContext(null);const br=C.forwardRef(({depth:e=0,className:t,children:r,borderType:n,disabled:i,...o},a)=>{const s=x3({depth:e,className:t,borderType:n,disabled:i});return O.jsx("div",{"data-qui":"Panel",ref:a,className:s,"aria-disabled":i,...o,children:r})});br.displayName="Panel";const cl={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"}},pu={primary:{bg:"bg-primary",text:"text-button-text",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-button-text"},positive:{bg:"bg-positive",text:"text-button-text",border:"border-positive",buttonHover:"hover:bg-positive-hover"},warning:{bg:"bg-warning",text:"text-button-text",border:"border-warning",buttonHover:"hover:bg-warning-hover"},negative:{bg:"bg-negative",text:"text-button-text",border:"border-negative",buttonHover:"hover:bg-negative-hover"},grey:{bg:"bg-input-bg",text:"text-input-text",border:"border-input-border",buttonHover:"hover:bg-input-hover"},dark:{bg:"bg-tab-inactive-bg",text:"text-input-text",border:"border-input-border",buttonHover:"hover:bg-primary-hover hover:text-button-text"}},zG=(e,t,r,n)=>ye("inline-flex items-center justify-center font-medium border",cl[e].container,pu[t].bg,pu[t].text,pu[t].border,cl[e].text,{"opacity-60 pointer-events-none":r,"cursor-pointer hover:bg-opacity-90 transition-opacity":n&&!r}),LG=(e,t,r)=>ye({[cl[e].icon]:!r,"bg-canvas-default outline-canvas-default text-primary":r&&t!=="white"||r,"bg-primary outline-primary text-button-text":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}),BG=e=>ye(cl[e].text),w3=(e,t,r)=>ye("inline-flex items-center justify-center rounded transition-colors duration-200 focus:outline-hidden ",cl[e].iconButton,pu[t].buttonHover,{"pointer-events-none":r}),S3=C.createContext(null),xd=()=>{const e=C.useContext(S3);if(!e)throw new Error("Pill components must be used within a Pill.Root");return e},g1=C.forwardRef(({size:e="md",color:t="primary",className:r,children:n,disabled:i=!1,onClick:o,...a},s)=>{const c={size:e,color:t,disabled:i},u=!!o;return O.jsx(S3.Provider,{value:c,children:O.jsx("div",{"data-qui":"Pill",ref:s,onClick:o,className:ye(zG(e,t,i,u),r),...a,children:n})})});g1.displayName="Pill.Root";const m1=C.forwardRef(({className:e,children:t,...r},n)=>{const{size:i}=xd();return O.jsx("span",{ref:n,className:ye(BG(i),e),...r,children:t})});m1.displayName="Pill.Text";const b1=C.forwardRef(({className:e,children:t,label:r,position:n,...i},o)=>{const{size:a,color:s,disabled:c}=xd(),u=!!r,d=O.jsx("span",{ref:o,className:ye(LG(a,s,u),e,{"opacity-60":c}),...i,children:t});return u&&!c?O.jsx(Lr,{label:r||"",position:n||"up",children:d}):d});b1.displayName="Pill.Icon";const E3=C.forwardRef(({className:e,children:t,...r},n)=>{const{size:i,color:o,disabled:a}=xd();return O.jsx("button",{ref:n,type:"button",disabled:a,className:ye(w3(i,o,a),e),...r,children:t})});E3.displayName="Pill.Button";const y1=C.forwardRef(({className:e,onClose:t,"aria-label":r="Remove pill",children:n,...i},o)=>{const{size:a,color:s,disabled:c}=xd();return O.jsx("button",{ref:o,type:"button",disabled:c,className:ye(w3(a,s,c),e),onClick:t,"aria-label":r,...i,children:n||O.jsx(hd,{})})});y1.displayName="Pill.Close";const _3=C.forwardRef(({size:e="md",color:t="primary",label:r,icon:n,onClose:i,closable:o=!1,className:a,children:s,disabled:c=!1,...u},d)=>O.jsxs(g1,{ref:d,size:e,color:t,className:a,disabled:c,...u,children:[n&&O.jsx(b1,{children:n}),s||r&&O.jsx(m1,{children:r}),o&&O.jsx(y1,{onClose:i})]}));_3.displayName="Pill";const vu=Object.assign(_3,{Root:g1,Text:m1,Icon:b1,Button:E3,Close:y1});function aa(e,t,r){let n=r.initialDeps??[],i,o=!0;function a(){var s,c,u;let d;r.key&&(s=r.debug)!=null&&s.call(r)&&(d=Date.now());const h=e();if(!(h.length!==n.length||h.some((v,y)=>n[y]!==v)))return i;n=h;let p;if(r.key&&(c=r.debug)!=null&&c.call(r)&&(p=Date.now()),i=t(...h),r.key&&(u=r.debug)!=null&&u.call(r)){const v=Math.round((Date.now()-d)*100)/100,y=Math.round((Date.now()-p)*100)/100,m=y/16,g=(w,x)=>{for(w=String(w);w.length<x;)w=" "+w;return w};console.info(`%c⏱ ${g(y,5)} /${g(v,5)} ms`,`
|
|
18
|
+
`},kW={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function AW(e){let{announcements:t=kW,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=MW}=e;const{announce:o,announcement:a}=NW(),s=_l("DndLiveRegion"),[c,d]=C.useState(!1);if(C.useEffect(()=>{d(!0)},[]),TW(C.useMemo(()=>({onDragStart(h){let{active:p}=h;o(t.onDragStart({active:p}))},onDragMove(h){let{active:p,over:v}=h;t.onDragMove&&o(t.onDragMove({active:p,over:v}))},onDragOver(h){let{active:p,over:v}=h;o(t.onDragOver({active:p,over:v}))},onDragEnd(h){let{active:p,over:v}=h;o(t.onDragEnd({active:p,over:v}))},onDragCancel(h){let{active:p,over:v}=h;o(t.onDragCancel({active:p,over:v}))}}),[o,t])),!c)return null;const u=C.createElement(C.Fragment,null,C.createElement(IW,{id:n,value:i.draggable}),C.createElement(RW,{id:s,announcement:a}));return r?xn.createPortal(u,r):u}var Zt;(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"})(Zt||(Zt={}));function Lu(){}function DW(e,t){return C.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function jW(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return C.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const Fn=Object.freeze({x:0,y:0});function qW(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function zW(e,t){const r=zu(e);if(!r)return"0 0";const n={x:(r.x-t.left)/t.width*100,y:(r.y-t.top)/t.height*100};return n.x+"% "+n.y+"%"}function LW(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function BW(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function FW(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function UO(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const $W=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=UO(t,t.left,t.top),o=[];for(const a of n){const{id:s}=a,c=r.get(s);if(c){const d=qW(UO(c),i);o.push({id:s,data:{droppableContainer:a,value:d}})}}return o.sort(LW)};function VW(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-n,s=o-r;if(n<i&&r<o){const c=t.width*t.height,d=e.width*e.height,u=a*s,h=u/(c+d-u);return Number(h.toFixed(4))}return 0}const HW=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=[];for(const o of n){const{id:a}=o,s=r.get(a);if(s){const c=VW(s,t);c>0&&i.push({id:a,data:{droppableContainer:o,value:c}})}}return i.sort(BW)};function WW(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function Gj(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Fn}function UW(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.reduce((o,a)=>({...o,top:o.top+e*a.y,bottom:o.bottom+e*a.y,left:o.left+e*a.x,right:o.right+e*a.x}),{...t})}}const GW=UW(1);function Kj(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function KW(e,t,r){const n=Kj(t);if(!n)return e;const{scaleX:i,scaleY:o,x:a,y:s}=n,c=e.left-a-(1-i)*parseFloat(r),d=e.top-s-(1-o)*parseFloat(r.slice(r.indexOf(" ")+1)),u=i?e.width/i:e.width,h=o?e.height/o:e.height;return{width:u,height:h,top:d,right:c+u,bottom:d+h,left:c}}const YW={ignoreTransform:!1};function $a(e,t){t===void 0&&(t=YW);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:d,transformOrigin:u}=Rr(e).getComputedStyle(e);d&&(r=KW(r,d,u))}const{top:n,left:i,width:o,height:a,bottom:s,right:c}=r;return{top:n,left:i,width:o,height:a,bottom:s,right:c}}function GO(e){return $a(e,{ignoreTransform:!0})}function XW(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function ZW(e,t){return t===void 0&&(t=Rr(e).getComputedStyle(e)),t.position==="fixed"}function JW(e,t){t===void 0&&(t=Rr(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(n=>{const i=t[n];return typeof i=="string"?r.test(i):!1})}function c1(e,t){const r=[];function n(i){if(t!=null&&r.length>=t||!i)return r;if(l1(i)&&i.scrollingElement!=null&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!Sl(i)||Hj(i)||r.includes(i))return r;const o=Rr(e).getComputedStyle(i);return i!==e&&JW(i,o)&&r.push(i),ZW(i,o)?r:n(i.parentNode)}return e?n(e):r}function Yj(e){const[t]=c1(e,1);return t??null}function Ah(e){return!vd||!e?null:Ba(e)?e:s1(e)?l1(e)||e===Fa(e).scrollingElement?window:Sl(e)?e:null:null}function Xj(e){return Ba(e)?e.scrollX:e.scrollLeft}function Zj(e){return Ba(e)?e.scrollY:e.scrollTop}function Ow(e){return{x:Xj(e),y:Zj(e)}}var nr;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(nr||(nr={}));function Jj(e){return!vd||!e?!1:e===document.scrollingElement}function Qj(e){const t={x:0,y:0},r=Jj(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,a=e.scrollTop>=n.y,s=e.scrollLeft>=n.x;return{isTop:i,isLeft:o,isBottom:a,isRight:s,maxScroll:n,minScroll:t}}const QW={x:.2,y:.2};function eU(e,t,r,n,i){let{top:o,left:a,right:s,bottom:c}=r;n===void 0&&(n=10),i===void 0&&(i=QW);const{isTop:d,isBottom:u,isLeft:h,isRight:p}=Qj(e),v={x:0,y:0},y={x:0,y:0},m={height:t.height*i.y,width:t.width*i.x};return!d&&o<=t.top+m.height?(v.y=nr.Backward,y.y=n*Math.abs((t.top+m.height-o)/m.height)):!u&&c>=t.bottom-m.height&&(v.y=nr.Forward,y.y=n*Math.abs((t.bottom-m.height-c)/m.height)),!p&&s>=t.right-m.width?(v.x=nr.Forward,y.x=n*Math.abs((t.right-m.width-s)/m.width)):!h&&a<=t.left+m.width&&(v.x=nr.Backward,y.x=n*Math.abs((t.left+m.width-a)/m.width)),{direction:v,speed:y}}function tU(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:a}=window;return{top:0,left:0,right:o,bottom:a,width:o,height:a}}const{top:t,left:r,right:n,bottom:i}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:i,width:e.clientWidth,height:e.clientHeight}}function e3(e){return e.reduce((t,r)=>wa(t,Ow(r)),Fn)}function rU(e){return e.reduce((t,r)=>t+Xj(r),0)}function nU(e){return e.reduce((t,r)=>t+Zj(r),0)}function t3(e,t){if(t===void 0&&(t=$a),!e)return;const{top:r,left:n,bottom:i,right:o}=t(e);Yj(e)&&(i<=0||o<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const iU=[["x",["left","right"],rU],["y",["top","bottom"],nU]];class u1{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=c1(r),i=e3(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,a,s]of iU)for(const c of a)Object.defineProperty(this,c,{get:()=>{const d=s(n),u=i[o]-d;return this.rect[c]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Zs{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var i;(i=this.target)==null||i.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function oU(e){const{EventTarget:t}=Rr(e);return e instanceof t?e:Fa(e)}function Dh(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var yn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(yn||(yn={}));function KO(e){e.preventDefault()}function aU(e){e.stopPropagation()}var at;(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"})(at||(at={}));const r3={start:[at.Space,at.Enter],cancel:[at.Esc],end:[at.Space,at.Enter,at.Tab]},sU=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case at.Right:return{...r,x:r.x+25};case at.Left:return{...r,x:r.x-25};case at.Down:return{...r,y:r.y+25};case at.Up:return{...r,y:r.y-25}}};class n3{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new Zs(Fa(r)),this.windowListeners=new Zs(Rr(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(yn.Resize,this.handleCancel),this.windowListeners.add(yn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(yn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&t3(n),r(Fn)}handleKeyDown(t){if(md(t)){const{active:r,context:n,options:i}=this.props,{keyboardCodes:o=r3,coordinateGetter:a=sU,scrollBehavior:s="smooth"}=i,{code:c}=t;if(o.end.includes(c)){this.handleEnd(t);return}if(o.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:d}=n.current,u=d?{x:d.left,y:d.top}:Fn;this.referenceCoordinates||(this.referenceCoordinates=u);const h=a(t,{active:r,context:n.current,currentCoordinates:u});if(h){const p=qu(h,u),v={x:0,y:0},{scrollableAncestors:y}=n.current;for(const m of y){const g=t.code,{isTop:w,isRight:x,isLeft:_,isBottom:S,maxScroll:E,minScroll:I}=Qj(m),N=tU(m),T={x:Math.min(g===at.Right?N.right-N.width/2:N.right,Math.max(g===at.Right?N.left:N.left+N.width/2,h.x)),y:Math.min(g===at.Down?N.bottom-N.height/2:N.bottom,Math.max(g===at.Down?N.top:N.top+N.height/2,h.y))},M=g===at.Right&&!x||g===at.Left&&!_,z=g===at.Down&&!S||g===at.Up&&!w;if(M&&T.x!==h.x){const j=m.scrollLeft+p.x,W=g===at.Right&&j<=E.x||g===at.Left&&j>=I.x;if(W&&!p.y){m.scrollTo({left:j,behavior:s});return}W?v.x=m.scrollLeft-j:v.x=g===at.Right?m.scrollLeft-E.x:m.scrollLeft-I.x,v.x&&m.scrollBy({left:-v.x,behavior:s});break}else if(z&&T.y!==h.y){const j=m.scrollTop+p.y,W=g===at.Down&&j<=E.y||g===at.Up&&j>=I.y;if(W&&!p.x){m.scrollTo({top:j,behavior:s});return}W?v.y=m.scrollTop-j:v.y=g===at.Down?m.scrollTop-E.y:m.scrollTop-I.y,v.y&&m.scrollBy({top:-v.y,behavior:s});break}}this.handleMove(t,wa(qu(h,this.referenceCoordinates),v))}}}handleMove(t,r){const{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}n3.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=r3,onActivation:i}=t,{active:o}=r;const{code:a}=e.nativeEvent;if(n.start.includes(a)){const s=o.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function YO(e){return!!(e&&"distance"in e)}function XO(e){return!!(e&&"delay"in e)}class d1{constructor(t,r,n){var i;n===void 0&&(n=oU(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:o}=t,{target:a}=o;this.props=t,this.events=r,this.document=Fa(a),this.documentListeners=new Zs(this.document),this.listeners=new Zs(n),this.windowListeners=new Zs(Rr(a)),this.initialCoordinates=(i=zu(o))!=null?i:Fn,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(yn.Resize,this.handleCancel),this.windowListeners.add(yn.DragStart,KO),this.windowListeners.add(yn.VisibilityChange,this.handleCancel),this.windowListeners.add(yn.ContextMenu,KO),this.documentListeners.add(yn.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(XO(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(YO(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){const{active:n,onPending:i}=this.props;i(n,t,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(yn.Click,aU,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(yn.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:s}}=o;if(!i)return;const c=(r=zu(t))!=null?r:Fn,d=qu(i,c);if(!n&&s){if(YO(s)){if(s.tolerance!=null&&Dh(d,s.tolerance))return this.handleCancel();if(Dh(d,s.distance))return this.handleStart()}if(XO(s)&&Dh(d,s.tolerance))return this.handleCancel();this.handlePending(s,d);return}t.cancelable&&t.preventDefault(),a(c)}handleEnd(){const{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){const{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===at.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const lU={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class f1 extends d1{constructor(t){const{event:r}=t,n=Fa(r.target);super(t,lU,n)}}f1.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n==null||n({event:r}),!0)}}];const cU={move:{name:"mousemove"},end:{name:"mouseup"}};var Cw;(function(e){e[e.RightClick=2]="RightClick"})(Cw||(Cw={}));class uU extends d1{constructor(t){super(t,cU,Fa(t.event.target))}}uU.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===Cw.RightClick?!1:(n==null||n({event:r}),!0)}}];const jh={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class dU extends d1{constructor(t){super(t,jh)}static setup(){return window.addEventListener(jh.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(jh.move.name,t)};function t(){}}}dU.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:i}=r;return i.length>1?!1:(n==null||n({event:r}),!0)}}];var Js;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Js||(Js={}));var Bu;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Bu||(Bu={}));function fU(e){let{acceleration:t,activator:r=Js.Pointer,canScroll:n,draggingRect:i,enabled:o,interval:a=5,order:s=Bu.TreeOrder,pointerCoordinates:c,scrollableAncestors:d,scrollableAncestorRects:u,delta:h,threshold:p}=e;const v=pU({delta:h,disabled:!o}),[y,m]=SW(),g=C.useRef({x:0,y:0}),w=C.useRef({x:0,y:0}),x=C.useMemo(()=>{switch(r){case Js.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Js.DraggableRect:return i}},[r,i,c]),_=C.useRef(null),S=C.useCallback(()=>{const I=_.current;if(!I)return;const N=g.current.x*w.current.x,T=g.current.y*w.current.y;I.scrollBy(N,T)},[]),E=C.useMemo(()=>s===Bu.TreeOrder?[...d].reverse():d,[s,d]);C.useEffect(()=>{if(!o||!d.length||!x){m();return}for(const I of E){if((n==null?void 0:n(I))===!1)continue;const N=d.indexOf(I),T=u[N];if(!T)continue;const{direction:M,speed:z}=eU(I,T,x,t,p);for(const j of["x","y"])v[j][M[j]]||(z[j]=0,M[j]=0);if(z.x>0||z.y>0){m(),_.current=I,y(S,a),g.current=z,w.current=M;return}}g.current={x:0,y:0},w.current={x:0,y:0},m()},[t,S,n,m,o,a,JSON.stringify(x),JSON.stringify(v),y,d,E,u,JSON.stringify(p)])}const hU={x:{[nr.Backward]:!1,[nr.Forward]:!1},y:{[nr.Backward]:!1,[nr.Forward]:!1}};function pU(e){let{delta:t,disabled:r}=e;const n=ju(t);return El(i=>{if(r||!n||!i)return hU;const o={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[nr.Backward]:i.x[nr.Backward]||o.x===-1,[nr.Forward]:i.x[nr.Forward]||o.x===1},y:{[nr.Backward]:i.y[nr.Backward]||o.y===-1,[nr.Forward]:i.y[nr.Forward]||o.y===1}}},[r,t,n])}function vU(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return El(i=>{var o;return t==null?null:(o=n??i)!=null?o:null},[n,t])}function gU(e,t){return C.useMemo(()=>e.reduce((r,n)=>{const{sensor:i}=n,o=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,n)}));return[...r,...o]},[]),[e,t])}var ll;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(ll||(ll={}));var Iw;(function(e){e.Optimized="optimized"})(Iw||(Iw={}));const ZO=new Map;function mU(e,t){let{dragging:r,dependencies:n,config:i}=t;const[o,a]=C.useState(null),{frequency:s,measure:c,strategy:d}=i,u=C.useRef(e),h=g(),p=sl(h),v=C.useCallback(function(w){w===void 0&&(w=[]),!p.current&&a(x=>x===null?w:x.concat(w.filter(_=>!x.includes(_))))},[p]),y=C.useRef(null),m=El(w=>{if(h&&!r)return ZO;if(!w||w===ZO||u.current!==e||o!=null){const x=new Map;for(let _ of e){if(!_)continue;if(o&&o.length>0&&!o.includes(_.id)&&_.rect.current){x.set(_.id,_.rect.current);continue}const S=_.node.current,E=S?new u1(c(S),S):null;_.rect.current=E,E&&x.set(_.id,E)}return x}return w},[e,o,r,h,c]);return C.useEffect(()=>{u.current=e},[e]),C.useEffect(()=>{h||v()},[r,h]),C.useEffect(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),C.useEffect(()=>{h||typeof s!="number"||y.current!==null||(y.current=setTimeout(()=>{v(),y.current=null},s))},[s,h,v,...n]),{droppableRects:m,measureDroppableContainers:v,measuringScheduled:o!=null};function g(){switch(d){case ll.Always:return!1;case ll.BeforeDragging:return r;default:return!r}}}function h1(e,t){return El(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function bU(e,t){return h1(e,t)}function yU(e){let{callback:t,disabled:r}=e;const n=gd(t),i=C.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(n)},[n,r]);return C.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function bd(e){let{callback:t,disabled:r}=e;const n=gd(t),i=C.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(n)},[r]);return C.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function xU(e){return new u1($a(e),e)}function JO(e,t,r){t===void 0&&(t=xU);const[n,i]=C.useState(null);function o(){i(c=>{if(!e)return null;if(e.isConnected===!1){var d;return(d=c??r)!=null?d:null}const u=t(e);return JSON.stringify(c)===JSON.stringify(u)?c:u})}const a=yU({callback(c){if(e)for(const d of c){const{type:u,target:h}=d;if(u==="childList"&&h instanceof HTMLElement&&h.contains(e)){o();break}}}}),s=bd({callback:o});return Bn(()=>{o(),e?(s==null||s.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(s==null||s.disconnect(),a==null||a.disconnect())},[e]),n}function wU(e){const t=h1(e);return Gj(e,t)}const QO=[];function SU(e){const t=C.useRef(e),r=El(n=>e?n&&n!==QO&&e&&t.current&&e.parentNode===t.current.parentNode?n:c1(e):QO,[e]);return C.useEffect(()=>{t.current=e},[e]),r}function EU(e){const[t,r]=C.useState(null),n=C.useRef(e),i=C.useCallback(o=>{const a=Ah(o.target);a&&r(s=>s?(s.set(a,Ow(a)),new Map(s)):null)},[]);return C.useEffect(()=>{const o=n.current;if(e!==o){a(o);const s=e.map(c=>{const d=Ah(c);return d?(d.addEventListener("scroll",i,{passive:!0}),[d,Ow(d)]):null}).filter(c=>c!=null);r(s.length?new Map(s):null),n.current=e}return()=>{a(e),a(o)};function a(s){s.forEach(c=>{const d=Ah(c);d==null||d.removeEventListener("scroll",i)})}},[i,e]),C.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>wa(o,a),Fn):e3(e):Fn,[e,t])}function eC(e,t){t===void 0&&(t=[]);const r=C.useRef(null);return C.useEffect(()=>{r.current=null},t),C.useEffect(()=>{const n=e!==Fn;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?qu(e,r.current):Fn}function _U(e){C.useEffect(()=>{if(!vd)return;const t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of t)r==null||r()}},e.map(t=>{let{sensor:r}=t;return r}))}function OU(e,t){return C.useMemo(()=>e.reduce((r,n)=>{let{eventName:i,handler:o}=n;return r[i]=a=>{o(a,t)},r},{}),[e,t])}function i3(e){return C.useMemo(()=>e?XW(e):null,[e])}const tC=[];function CU(e,t){t===void 0&&(t=$a);const[r]=e,n=i3(r?Rr(r):null),[i,o]=C.useState(tC);function a(){o(()=>e.length?e.map(c=>Jj(c)?n:new u1(t(c),c)):tC)}const s=bd({callback:a});return Bn(()=>{s==null||s.disconnect(),a(),e.forEach(c=>s==null?void 0:s.observe(c))},[e]),i}function o3(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Sl(t)?t:e}function IU(e){let{measure:t}=e;const[r,n]=C.useState(null),i=C.useCallback(d=>{for(const{target:u}of d)if(Sl(u)){n(h=>{const p=t(u);return h?{...h,width:p.width,height:p.height}:p});break}},[t]),o=bd({callback:i}),a=C.useCallback(d=>{const u=o3(d);o==null||o.disconnect(),u&&(o==null||o.observe(u)),n(u?t(u):null)},[t,o]),[s,c]=Du(a);return C.useMemo(()=>({nodeRef:s,rect:r,setRef:c}),[r,s,c])}const RU=[{sensor:f1,options:{}},{sensor:n3,options:{}}],NU={current:{}},hu={draggable:{measure:GO},droppable:{measure:GO,strategy:ll.WhileDragging,frequency:Iw.Optimized},dragOverlay:{measure:$a}};class Qs extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}const TU={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Qs,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Lu},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:hu,measureDroppableContainers:Lu,windowRect:null,measuringScheduled:!1},a3={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Lu,draggableNodes:new Map,over:null,measureDroppableContainers:Lu},Ol=C.createContext(a3),s3=C.createContext(TU);function PU(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Qs}}}function MU(e,t){switch(t.type){case Zt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Zt.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Zt.DragEnd:case Zt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Zt.RegisterDroppable:{const{element:r}=t,{id:n}=r,i=new Qs(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case Zt.SetDroppableDisabled:{const{id:r,key:n,disabled:i}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const a=new Qs(e.droppable.containers);return a.set(r,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case Zt.UnregisterDroppable:{const{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const o=new Qs(e.droppable.containers);return o.delete(r),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function kU(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:i}=C.useContext(Ol),o=ju(n),a=ju(r==null?void 0:r.id);return C.useEffect(()=>{if(!t&&!n&&o&&a!=null){if(!md(o)||document.activeElement===o.target)return;const s=i.get(a);if(!s)return;const{activatorNode:c,node:d}=s;if(!c.current&&!d.current)return;requestAnimationFrame(()=>{for(const u of[c.current,d.current]){if(!u)continue;const h=OW(u);if(h){h.focus();break}}})}},[n,t,i,a,o]),null}function l3(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...n}),r):r}function AU(e){return C.useMemo(()=>({draggable:{...hu.draggable,...e==null?void 0:e.draggable},droppable:{...hu.droppable,...e==null?void 0:e.droppable},dragOverlay:{...hu.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function DU(e){let{activeNode:t,measure:r,initialRect:n,config:i=!0}=e;const o=C.useRef(!1),{x:a,y:s}=typeof i=="boolean"?{x:i,y:i}:i;Bn(()=>{if(!a&&!s||!t){o.current=!1;return}if(o.current||!n)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const d=r(c),u=Gj(d,n);if(a||(u.x=0),s||(u.y=0),o.current=!0,Math.abs(u.x)>0||Math.abs(u.y)>0){const h=Yj(c);h&&h.scrollBy({top:u.y,left:u.x})}},[t,a,s,n,r])}const yd=C.createContext({...Fn,scaleX:1,scaleY:1});var Ui;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ui||(Ui={}));const jU=C.memo(function(e){var t,r,n,i;let{id:o,accessibility:a,autoScroll:s=!0,children:c,sensors:d=RU,collisionDetection:u=HW,measuring:h,modifiers:p,...v}=e;const y=C.useReducer(MU,void 0,PU),[m,g]=y,[w,x]=PW(),[_,S]=C.useState(Ui.Uninitialized),E=_===Ui.Initialized,{draggable:{active:I,nodes:N,translate:T},droppable:{containers:M}}=m,z=I!=null?N.get(I):null,j=C.useRef({initial:null,translated:null}),W=C.useMemo(()=>{var zt;return I!=null?{id:I,data:(zt=z==null?void 0:z.data)!=null?zt:NU,rect:j}:null},[I,z]),U=C.useRef(null),[A,K]=C.useState(null),[V,te]=C.useState(null),G=sl(v,Object.values(v)),re=_l("DndDescribedBy",o),P=C.useMemo(()=>M.getEnabled(),[M]),B=AU(h),{droppableRects:X,measureDroppableContainers:Q,measuringScheduled:D}=mU(P,{dragging:E,dependencies:[T.x,T.y],config:B.droppable}),$=vU(N,I),H=C.useMemo(()=>V?zu(V):null,[V]),q=io(),Y=bU($,B.draggable.measure);DU({activeNode:I!=null?N.get(I):null,config:q.layoutShiftCompensation,initialRect:Y,measure:B.draggable.measure});const ie=JO($,B.draggable.measure,Y),ne=JO($?$.parentElement:null),ve=C.useRef({activatorEvent:null,active:null,activeNode:$,collisionRect:null,collisions:null,droppableRects:X,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:M,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Z=M.getNodeFor((t=ve.current.over)==null?void 0:t.id),J=IU({measure:B.dragOverlay.measure}),ae=(r=J.nodeRef.current)!=null?r:$,he=E?(n=J.rect)!=null?n:ie:null,ue=!!(J.nodeRef.current&&J.rect),de=wU(ue?null:ie),le=i3(ae?Rr(ae):null),xe=SU(E?Z??$:null),Ee=CU(xe),Ie=l3(p,{transform:{x:T.x-de.x,y:T.y-de.y,scaleX:1,scaleY:1},activatorEvent:V,active:W,activeNodeRect:ie,containerNodeRect:ne,draggingNodeRect:he,over:ve.current.over,overlayNodeRect:J.rect,scrollableAncestors:xe,scrollableAncestorRects:Ee,windowRect:le}),Te=H?wa(H,T):null,Me=EU(xe),Ze=eC(Me),tt=eC(Me,[ie]),Fe=wa(Ie,Ze),Le=he?GW(he,Ie):null,ze=W&&Le?u({active:W,collisionRect:Le,droppableRects:X,droppableContainers:P,pointerCoordinates:Te}):null,Je=FW(ze,"id"),[rt,Pt]=C.useState(null),gt=ue?Ie:wa(Ie,tt),Rt=WW(gt,(i=rt==null?void 0:rt.rect)!=null?i:null,ie),qt=C.useRef(null),Ot=C.useCallback((zt,Mt)=>{let{sensor:Lt,options:fr}=Mt;if(U.current==null)return;const kt=N.get(U.current);if(!kt)return;const At=zt.nativeEvent,hr=new Lt({active:U.current,activeNode:kt,event:At,options:fr,context:ve,onAbort(Et){if(!N.get(Et))return;const{onDragAbort:Bt}=G.current,pr={id:Et};Bt==null||Bt(pr),w({type:"onDragAbort",event:pr})},onPending(Et,Bt,pr,vr){if(!N.get(Et))return;const{onDragPending:yr}=G.current,sr={id:Et,constraint:Bt,initialCoordinates:pr,offset:vr};yr==null||yr(sr),w({type:"onDragPending",event:sr})},onStart(Et){const Bt=U.current;if(Bt==null)return;const pr=N.get(Bt);if(!pr)return;const{onDragStart:vr}=G.current,yr={activatorEvent:At,active:{id:Bt,data:pr.data,rect:j}};xn.unstable_batchedUpdates(()=>{vr==null||vr(yr),S(Ui.Initializing),g({type:Zt.DragStart,initialCoordinates:Et,active:Bt}),w({type:"onDragStart",event:yr}),K(qt.current),te(At)})},onMove(Et){g({type:Zt.DragMove,coordinates:Et})},onEnd:Mr(Zt.DragEnd),onCancel:Mr(Zt.DragCancel)});qt.current=hr;function Mr(Et){return async function(){const{active:Bt,collisions:pr,over:vr,scrollAdjustedTranslate:yr}=ve.current;let sr=null;if(Bt&&yr){const{cancelDrop:Tn}=G.current;sr={activatorEvent:At,active:Bt,collisions:pr,delta:yr,over:vr},Et===Zt.DragEnd&&typeof Tn=="function"&&await Promise.resolve(Tn(sr))&&(Et=Zt.DragCancel)}U.current=null,xn.unstable_batchedUpdates(()=>{g({type:Et}),S(Ui.Uninitialized),Pt(null),K(null),te(null),qt.current=null;const Tn=Et===Zt.DragEnd?"onDragEnd":"onDragCancel";if(sr){const Un=G.current[Tn];Un==null||Un(sr),w({type:Tn,event:sr})}})}}},[N]),Gr=C.useCallback((zt,Mt)=>(Lt,fr)=>{const kt=Lt.nativeEvent,At=N.get(fr);if(U.current!==null||!At||kt.dndKit||kt.defaultPrevented)return;const hr={active:At};zt(Lt,Mt.options,hr)===!0&&(kt.dndKit={capturedBy:Mt.sensor},U.current=fr,Ot(Lt,Mt))},[N,Ot]),Kr=gU(d,Gr);_U(d),Bn(()=>{ie&&_===Ui.Initializing&&S(Ui.Initialized)},[ie,_]),C.useEffect(()=>{const{onDragMove:zt}=G.current,{active:Mt,activatorEvent:Lt,collisions:fr,over:kt}=ve.current;if(!Mt||!Lt)return;const At={active:Mt,activatorEvent:Lt,collisions:fr,delta:{x:Fe.x,y:Fe.y},over:kt};xn.unstable_batchedUpdates(()=>{zt==null||zt(At),w({type:"onDragMove",event:At})})},[Fe.x,Fe.y]),C.useEffect(()=>{const{active:zt,activatorEvent:Mt,collisions:Lt,droppableContainers:fr,scrollAdjustedTranslate:kt}=ve.current;if(!zt||U.current==null||!Mt||!kt)return;const{onDragOver:At}=G.current,hr=fr.get(Je),Mr=hr&&hr.rect.current?{id:hr.id,rect:hr.rect.current,data:hr.data,disabled:hr.disabled}:null,Et={active:zt,activatorEvent:Mt,collisions:Lt,delta:{x:kt.x,y:kt.y},over:Mr};xn.unstable_batchedUpdates(()=>{Pt(Mr),At==null||At(Et),w({type:"onDragOver",event:Et})})},[Je]),Bn(()=>{ve.current={activatorEvent:V,active:W,activeNode:$,collisionRect:Le,collisions:ze,droppableRects:X,draggableNodes:N,draggingNode:ae,draggingNodeRect:he,droppableContainers:M,over:rt,scrollableAncestors:xe,scrollAdjustedTranslate:Fe},j.current={initial:he,translated:Le}},[W,$,ze,Le,N,ae,he,X,M,rt,xe,Fe]),fU({...q,delta:T,draggingRect:Le,pointerCoordinates:Te,scrollableAncestors:xe,scrollableAncestorRects:Ee});const ar=C.useMemo(()=>({active:W,activeNode:$,activeNodeRect:ie,activatorEvent:V,collisions:ze,containerNodeRect:ne,dragOverlay:J,draggableNodes:N,droppableContainers:M,droppableRects:X,over:rt,measureDroppableContainers:Q,scrollableAncestors:xe,scrollableAncestorRects:Ee,measuringConfiguration:B,measuringScheduled:D,windowRect:le}),[W,$,ie,V,ze,ne,J,N,M,X,rt,Q,xe,Ee,B,D,le]),Nn=C.useMemo(()=>({activatorEvent:V,activators:Kr,active:W,activeNodeRect:ie,ariaDescribedById:{draggable:re},dispatch:g,draggableNodes:N,over:rt,measureDroppableContainers:Q}),[V,Kr,W,ie,g,re,N,rt,Q]);return C.createElement(Uj.Provider,{value:x},C.createElement(Ol.Provider,{value:Nn},C.createElement(s3.Provider,{value:ar},C.createElement(yd.Provider,{value:Rt},c)),C.createElement(kU,{disabled:(a==null?void 0:a.restoreFocus)===!1})),C.createElement(AW,{...a,hiddenTextDescribedById:re}));function io(){const zt=(A==null?void 0:A.autoScrollEnabled)===!1,Mt=typeof s=="object"?s.enabled===!1:s===!1,Lt=E&&!zt&&!Mt;return typeof s=="object"?{...s,enabled:Lt}:{enabled:Lt}}}),qU=C.createContext(null),rC="button",zU="Draggable";function LU(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e;const o=_l(zU),{activators:a,activatorEvent:s,active:c,activeNodeRect:d,ariaDescribedById:u,draggableNodes:h,over:p}=C.useContext(Ol),{role:v=rC,roleDescription:y="draggable",tabIndex:m=0}=i??{},g=(c==null?void 0:c.id)===t,w=C.useContext(g?yd:qU),[x,_]=Du(),[S,E]=Du(),I=OU(a,t),N=sl(r);Bn(()=>(h.set(t,{id:t,key:o,node:x,activatorNode:S,data:N}),()=>{const M=h.get(t);M&&M.key===o&&h.delete(t)}),[h,t]);const T=C.useMemo(()=>({role:v,tabIndex:m,"aria-disabled":n,"aria-pressed":g&&v===rC?!0:void 0,"aria-roledescription":y,"aria-describedby":u.draggable}),[n,v,m,g,y,u.draggable]);return{active:c,activatorEvent:s,activeNodeRect:d,attributes:T,isDragging:g,listeners:n?void 0:I,node:x,over:p,setNodeRef:_,setActivatorNodeRef:E,transform:w}}function c3(){return C.useContext(s3)}const BU="Droppable",FU={timeout:25};function $U(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:i}=e;const o=_l(BU),{active:a,dispatch:s,over:c,measureDroppableContainers:d}=C.useContext(Ol),u=C.useRef({disabled:r}),h=C.useRef(!1),p=C.useRef(null),v=C.useRef(null),{disabled:y,updateMeasurementsFor:m,timeout:g}={...FU,...i},w=sl(m??n),x=C.useCallback(()=>{if(!h.current){h.current=!0;return}v.current!=null&&clearTimeout(v.current),v.current=setTimeout(()=>{d(Array.isArray(w.current)?w.current:[w.current]),v.current=null},g)},[g]),_=bd({callback:x,disabled:y||!a}),S=C.useCallback((T,M)=>{_&&(M&&(_.unobserve(M),h.current=!1),T&&_.observe(T))},[_]),[E,I]=Du(S),N=sl(t);return C.useEffect(()=>{!_||!E.current||(_.disconnect(),h.current=!1,_.observe(E.current))},[E,_]),C.useEffect(()=>(s({type:Zt.RegisterDroppable,element:{id:n,key:o,disabled:r,node:E,rect:p,data:N}}),()=>s({type:Zt.UnregisterDroppable,key:o,id:n})),[n]),C.useEffect(()=>{r!==u.current.disabled&&(s({type:Zt.SetDroppableDisabled,id:n,key:o,disabled:r}),u.current.disabled=r)},[n,o,r,s]),{active:a,rect:p,isOver:(c==null?void 0:c.id)===n,node:E,over:c,setNodeRef:I}}function VU(e){let{animation:t,children:r}=e;const[n,i]=C.useState(null),[o,a]=C.useState(null),s=ju(r);return!r&&!n&&s&&i(s),Bn(()=>{if(!o)return;const c=n==null?void 0:n.key,d=n==null?void 0:n.props.id;if(c==null||d==null){i(null);return}Promise.resolve(t(d,o)).then(()=>{i(null)})},[t,n,o]),C.createElement(C.Fragment,null,r,n?C.cloneElement(n,{ref:a}):null)}const HU={x:0,y:0,scaleX:1,scaleY:1};function WU(e){let{children:t}=e;return C.createElement(Ol.Provider,{value:a3},C.createElement(yd.Provider,{value:HU},t))}const UU={position:"fixed",touchAction:"none"},GU=e=>md(e)?"transform 250ms ease":void 0,KU=C.forwardRef((e,t)=>{let{as:r,activatorEvent:n,adjustScale:i,children:o,className:a,rect:s,style:c,transform:d,transition:u=GU}=e;if(!s)return null;const h=i?d:{...d,scaleX:1,scaleY:1},p={...UU,width:s.width,height:s.height,top:s.top,left:s.left,transform:Zi.Transform.toString(h),transformOrigin:i&&n?zW(n,s):void 0,transition:typeof u=="function"?u(n):u,...c};return C.createElement(r,{className:a,style:p,ref:t},o)}),YU=e=>t=>{let{active:r,dragOverlay:n}=t;const i={},{styles:o,className:a}=e;if(o!=null&&o.active)for(const[s,c]of Object.entries(o.active))c!==void 0&&(i[s]=r.node.style.getPropertyValue(s),r.node.style.setProperty(s,c));if(o!=null&&o.dragOverlay)for(const[s,c]of Object.entries(o.dragOverlay))c!==void 0&&n.node.style.setProperty(s,c);return a!=null&&a.active&&r.node.classList.add(a.active),a!=null&&a.dragOverlay&&n.node.classList.add(a.dragOverlay),function(){for(const[s,c]of Object.entries(i))r.node.style.setProperty(s,c);a!=null&&a.active&&r.node.classList.remove(a.active)}},XU=e=>{let{transform:{initial:t,final:r}}=e;return[{transform:Zi.Transform.toString(t)},{transform:Zi.Transform.toString(r)}]},ZU={duration:250,easing:"ease",keyframes:XU,sideEffects:YU({styles:{active:{opacity:"0"}}})};function JU(e){let{config:t,draggableNodes:r,droppableContainers:n,measuringConfiguration:i}=e;return gd((o,a)=>{if(t===null)return;const s=r.get(o);if(!s)return;const c=s.node.current;if(!c)return;const d=o3(a);if(!d)return;const{transform:u}=Rr(a).getComputedStyle(a),h=Kj(u);if(!h)return;const p=typeof t=="function"?t:QU(t);return t3(c,i.draggable.measure),p({active:{id:o,data:s.data,node:c,rect:i.draggable.measure(c)},draggableNodes:r,dragOverlay:{node:a,rect:i.dragOverlay.measure(d)},droppableContainers:n,measuringConfiguration:i,transform:h})})}function QU(e){const{duration:t,easing:r,sideEffects:n,keyframes:i}={...ZU,...e};return o=>{let{active:a,dragOverlay:s,transform:c,...d}=o;if(!t)return;const u={x:s.rect.left-a.rect.left,y:s.rect.top-a.rect.top},h={scaleX:c.scaleX!==1?a.rect.width*c.scaleX/s.rect.width:1,scaleY:c.scaleY!==1?a.rect.height*c.scaleY/s.rect.height:1},p={x:c.x-u.x,y:c.y-u.y,...h},v=i({...d,active:a,dragOverlay:s,transform:{initial:c,final:p}}),[y]=v,m=v[v.length-1];if(JSON.stringify(y)===JSON.stringify(m))return;const g=n==null?void 0:n({active:a,dragOverlay:s,...d}),w=s.node.animate(v,{duration:t,easing:r,fill:"forwards"});return new Promise(x=>{w.onfinish=()=>{g==null||g(),x()}})}}let nC=0;function eG(e){return C.useMemo(()=>{if(e!=null)return nC++,nC},[e])}const tG=C.memo(e=>{let{adjustScale:t=!1,children:r,dropAnimation:n,style:i,transition:o,modifiers:a,wrapperElement:s="div",className:c,zIndex:d=999}=e;const{activatorEvent:u,active:h,activeNodeRect:p,containerNodeRect:v,draggableNodes:y,droppableContainers:m,dragOverlay:g,over:w,measuringConfiguration:x,scrollableAncestors:_,scrollableAncestorRects:S,windowRect:E}=c3(),I=C.useContext(yd),N=eG(h==null?void 0:h.id),T=l3(a,{activatorEvent:u,active:h,activeNodeRect:p,containerNodeRect:v,draggingNodeRect:g.rect,over:w,overlayNodeRect:g.rect,scrollableAncestors:_,scrollableAncestorRects:S,transform:I,windowRect:E}),M=h1(p),z=JU({config:n,draggableNodes:y,droppableContainers:m,measuringConfiguration:x}),j=M?g.setRef:void 0;return C.createElement(WU,null,C.createElement(VU,{animation:z},h&&N?C.createElement(KU,{key:N,id:h.id,ref:j,as:s,activatorEvent:u,adjustScale:t,className:c,transition:o,rect:M,style:{zIndex:d,...i},transform:T},r):null))});function p1(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function rG(e,t){return e.reduce((r,n,i)=>{const o=t.get(n);return o&&(r[i]=o),r},Array(e.length))}function Dc(e){return e!==null&&e>=0}function nG(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function iG(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const jc={scaleX:1,scaleY:1},oG=e=>{var t;let{rects:r,activeNodeRect:n,activeIndex:i,overIndex:o,index:a}=e;const s=(t=r[i])!=null?t:n;if(!s)return null;const c=aG(r,a,i);if(a===i){const d=r[o];return d?{x:i<o?d.left+d.width-(s.left+s.width):d.left-s.left,y:0,...jc}:null}return a>i&&a<=o?{x:-s.width-c,y:0,...jc}:a<i&&a>=o?{x:s.width+c,y:0,...jc}:{x:0,y:0,...jc}};function aG(e,t,r){const n=e[t],i=e[t-1],o=e[t+1];return!n||!i&&!o?0:r<t?i?n.left-(i.left+i.width):o.left-(n.left+n.width):o?o.left-(n.left+n.width):n.left-(i.left+i.width)}const u3=e=>{let{rects:t,activeIndex:r,overIndex:n,index:i}=e;const o=p1(t,n,r),a=t[i],s=o[i];return!s||!a?null:{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}},d3="Sortable",f3=C.createContext({activeIndex:-1,containerId:d3,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:u3,disabled:{draggable:!1,droppable:!1}});function sG(e){let{children:t,id:r,items:n,strategy:i=u3,disabled:o=!1}=e;const{active:a,dragOverlay:s,droppableRects:c,over:d,measureDroppableContainers:u}=c3(),h=_l(d3,r),p=s.rect!==null,v=C.useMemo(()=>n.map(I=>typeof I=="object"&&"id"in I?I.id:I),[n]),y=a!=null,m=a?v.indexOf(a.id):-1,g=d?v.indexOf(d.id):-1,w=C.useRef(v),x=!nG(v,w.current),_=g!==-1&&m===-1||x,S=iG(o);Bn(()=>{x&&y&&u(v)},[x,v,y,u]),C.useEffect(()=>{w.current=v},[v]);const E=C.useMemo(()=>({activeIndex:m,containerId:h,disabled:S,disableTransforms:_,items:v,overIndex:g,useDragOverlay:p,sortedRects:rG(v,c),strategy:i}),[m,h,S.draggable,S.droppable,_,v,g,c,p,i]);return C.createElement(f3.Provider,{value:E},t)}const lG=e=>{let{id:t,items:r,activeIndex:n,overIndex:i}=e;return p1(r,n,i).indexOf(t)},cG=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:c,transition:d}=e;return!d||!n||s!==o&&i===a?!1:r?!0:a!==i&&t===c},uG={duration:200,easing:"ease"},h3="transform",dG=Zi.Transition.toString({property:h3,duration:0,easing:"linear"}),fG={roleDescription:"sortable"};function hG(e){let{disabled:t,index:r,node:n,rect:i}=e;const[o,a]=C.useState(null),s=C.useRef(r);return Bn(()=>{if(!t&&r!==s.current&&n.current){const c=i.current;if(c){const d=$a(n.current,{ignoreTransform:!0}),u={x:c.left-d.left,y:c.top-d.top,scaleX:c.width/d.width,scaleY:c.height/d.height};(u.x||u.y)&&a(u)}}r!==s.current&&(s.current=r)},[t,r,n,i]),C.useEffect(()=>{o&&a(null)},[o]),o}function pG(e){let{animateLayoutChanges:t=cG,attributes:r,disabled:n,data:i,getNewIndex:o=lG,id:a,strategy:s,resizeObserverConfig:c,transition:d=uG}=e;const{items:u,containerId:h,activeIndex:p,disabled:v,disableTransforms:y,sortedRects:m,overIndex:g,useDragOverlay:w,strategy:x}=C.useContext(f3),_=vG(n,v),S=u.indexOf(a),E=C.useMemo(()=>({sortable:{containerId:h,index:S,items:u},...i}),[h,i,S,u]),I=C.useMemo(()=>u.slice(u.indexOf(a)),[u,a]),{rect:N,node:T,isOver:M,setNodeRef:z}=$U({id:a,data:E,disabled:_.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...c}}),{active:j,activatorEvent:W,activeNodeRect:U,attributes:A,setNodeRef:K,listeners:V,isDragging:te,over:G,setActivatorNodeRef:re,transform:P}=LU({id:a,data:E,attributes:{...fG,...r},disabled:_.draggable}),B=wW(z,K),X=!!j,Q=X&&!y&&Dc(p)&&Dc(g),D=!w&&te,$=D&&Q?P:null,H=Q?$??(s??x)({rects:m,activeNodeRect:U,activeIndex:p,overIndex:g,index:S}):null,q=Dc(p)&&Dc(g)?o({id:a,items:u,activeIndex:p,overIndex:g}):S,Y=j==null?void 0:j.id,ie=C.useRef({activeId:Y,items:u,newIndex:q,containerId:h}),ne=u!==ie.current.items,ve=t({active:j,containerId:h,isDragging:te,isSorting:X,id:a,index:S,items:u,newIndex:ie.current.newIndex,previousItems:ie.current.items,previousContainerId:ie.current.containerId,transition:d,wasDragging:ie.current.activeId!=null}),Z=hG({disabled:!ve,index:S,node:T,rect:N});return C.useEffect(()=>{X&&ie.current.newIndex!==q&&(ie.current.newIndex=q),h!==ie.current.containerId&&(ie.current.containerId=h),u!==ie.current.items&&(ie.current.items=u)},[X,q,h,u]),C.useEffect(()=>{if(Y===ie.current.activeId)return;if(Y!=null&&ie.current.activeId==null){ie.current.activeId=Y;return}const ae=setTimeout(()=>{ie.current.activeId=Y},50);return()=>clearTimeout(ae)},[Y]),{active:j,activeIndex:p,attributes:A,data:E,rect:N,index:S,newIndex:q,items:u,isOver:M,isSorting:X,isDragging:te,listeners:V,node:T,overIndex:g,over:G,setNodeRef:B,setActivatorNodeRef:re,setDroppableNodeRef:z,setDraggableNodeRef:K,transform:Z??H,transition:J()};function J(){if(Z||ne&&ie.current.newIndex===S)return dG;if(!(D&&!md(W)||!d)&&(X||ve))return Zi.Transition.toString({...d,property:h3})}}function vG(e,t){var r,n;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e==null?void 0:e.draggable)!=null?r:t.draggable,droppable:(n=e==null?void 0:e.droppable)!=null?n:t.droppable}}at.Down,at.Right,at.Up,at.Left;const gG=e=>{let{transform:t}=e;return{...t,y:0}};function mG(e,t,r){const n={...e};return t.top+e.y<=r.top?n.y=r.top-t.top:t.bottom+e.y>=r.top+r.height&&(n.y=r.top+r.height-t.bottom),t.left+e.x<=r.left?n.x=r.left-t.left:t.right+e.x>=r.left+r.width&&(n.x=r.left+r.width-t.right),n}const bG=e=>{let{draggingNodeRect:t,transform:r,scrollableAncestorRects:n}=e;const i=n[0];return!t||!i?r:mG(r,t,i)},iC=({tab:e,value:t,isActive:r,onTabClick:n,dragOverlay:i=!1})=>{const o=e,a=o.onClose,s=o.renderTab,{attributes:c,listeners:d,setNodeRef:u,transform:h,transition:p,isDragging:v}=pG({id:t}),y={transform:Zi.Transform.toString(h),transition:p||"transform 200ms cubic-bezier(0.2, 0, 0, 1) 0s",opacity:v&&!i?.5:1,cursor:"pointer"},m=()=>{n(t)},g=w=>{w==null||w.stopPropagation(),a&&a(t)};return s?O.jsx("div",{ref:u,style:y,...c,...d,className:"flex h-full shrink-0 select-none focus:outline-hidden","aria-roledescription":"sortable",children:s({tab:e,isActive:r,onClick:m,onClose:a?g:void 0})}):null},p3={sm:{padding:"px-4 py-0.5",text:"text-xxs",icon:"w-3 h-3",gap:"gap-0.5",badge:"min-w-3.5 h-3.5 text-2"},md:{padding:"px-6 py-1",text:"text-s",icon:"w-4 h-4",gap:"gap-1",badge:"min-w-4.5 h-4.5 text-xxs"},lg:{padding:"px-8 py-1.5",text:"text-base",icon:"w-5 h-5",gap:"gap-1.5",badge:"min-w-5 h-5 text-xs"}},yG={primary:{active:{bg:"bg-primary",text:"text-button-text",border:"border-primary"},inactive:{bg:"bg-input-bg",text:"text-inactive-text",border:"border-transparent"},hover:{bg:"hover:bg-primary-hover",text:"hover:text-button-text"}},positive:{active:{bg:"bg-positive",text:"text-button-text",border:"border-positive"},inactive:{bg:"bg-input-bg",text:"text-inactive-text",border:"border-transparent"},hover:{bg:"hover:bg-positive-hover",text:"hover:text-body"}},warning:{active:{bg:"bg-warning",text:"text-warning-text",border:"border-warning"},inactive:{bg:"bg-input-bg",text:"text-inactive-text",border:"border-transparent"},hover:{bg:"hover:bg-warning-hover",text:"hover:text-body"}},negative:{active:{bg:"bg-negative",text:"text-button-text",border:"border-negative"},inactive:{bg:"bg-input-bg",text:"text-inactive-text",border:"border-transparent"},hover:{bg:"hover:bg-negative-hover",text:"hover:text-body"}}},oC=()=>ye("inline-flex items-center rounded overflow-hidden"),v3=(e,t,r,n)=>{const i=yG[e],o=p3[t],a="relative inline-flex items-center font-medium cursor-pointer transition-all duration-200";return n?ye(a,o.padding,o.text,o.gap,"pointer-events-none cursor-not-allowed opacity-50","bg-card","text-inactive-text"):r?ye(a,o.padding,o.text,o.gap,i.active.bg,i.active.text,"shadow-xs"):ye(a,o.padding,o.text,o.gap,i.inactive.bg,i.inactive.text,i.hover.bg,i.hover.text)},g3=(e,t)=>ye("flex items-center justify-center",p3[e].icon,{"opacity-50":t}),m3=()=>ye("whitespace-nowrap"),qh=()=>ye("min-w-full flex h-8 bg-tab-bg-default pt-0.5"),b3=(e,t)=>{const r=ye("group flex items-center justify-between space-x-4","rounded-t px-2 text-xs","focus:outline-hidden");return e&&!t?ye(r,"z-2 border border-b-0 border-tab-border","bg-tab-active-bg font-semibold text-tab-active-fg"):t&&!e?ye(r,"border border-transparent bg-tab-inactive-bg text-inactive-text"):ye(r,"border border-transparent bg-tab-inactive-bg text-tab-inactive-fg","hover:text-tab-active-fg")},Rw=C.createContext(void 0),y3=C.forwardRef(({value:e,label:t,icon:r,disabled:n,children:i,className:o,onClick:a,active:s,onClose:c,closable:d,touched:u,content:h,renderTab:p,...v},y)=>{const m=C.useContext(Rw);if(!m)return null;const{activeTab:g,onTabChange:w,variant:x,color:_,size:S,showIcons:E,disabled:I}=m,N=s!==void 0?s:g===e,T=n||I,M=z=>{T||(w(e),a==null||a(z))};return x==="file"?O.jsx("div",{"data-qui":"FileTabItem",className:ye(b3(N,!1),"cursor-pointer",o),onClick:z=>!T&&M(z),children:i||O.jsx(O.Fragment,{children:O.jsxs("span",{className:"flex items-center gap-2",children:[r,O.jsx("span",{children:t})]})})}):O.jsxs("button",{ref:y,"data-qui":"TabItem",type:"button",role:"tab","aria-selected":N,"aria-disabled":T,className:ye(v3(_,S,N,T||!1),o),onClick:M,disabled:T,...v,children:[E&&r&&O.jsx("span",{className:g3(S,T||!1),children:r}),O.jsx("span",{className:m3(),children:i||t})]})});y3.displayName="TabItem";const xG=({tab:e,value:t,label:r,isActive:n,color:i="primary",size:o="md",showIcons:a,onTabClick:s})=>{const c=e,d=c.icon,u=c.disabled??!1,h=c.onClose,p=c.renderTab,v=()=>{u||s(t)},y=m=>{m==null||m.stopPropagation(),!u&&h&&h(t)};return p?O.jsx(O.Fragment,{children:p({tab:e,isActive:n,onClick:v,onClose:h?y:void 0})}):O.jsxs("button",{"data-qui":"TabItem",type:"button",role:"tab","aria-selected":n,"aria-disabled":u,className:v3(i,o,n,u),onClick:v,disabled:u,children:[a&&d&&O.jsx("span",{className:g3(o,u),children:d}),O.jsx("span",{className:m3(),children:r})]})},wG=({tab:e,value:t,isActive:r,onTabClick:n})=>{const i=e,o=i.onClose,a=i.renderTab,s=()=>{n(t)},c=d=>{d==null||d.stopPropagation(),o&&o(t)};return a?O.jsx("div",{"data-qui":"FileTabItem",className:"flex h-full shrink-0 select-none focus:outline-hidden",children:a({tab:e,isActive:r,onClick:s,onClose:o?c:void 0})}):null},SG=[],v1=({tabs:e=SG,valueKey:t="value",labelKey:r="label",activeTab:n,defaultValue:i,variant:o="default",color:a="primary",size:s="md",draggable:c=!1,showIcons:d=!0,disabled:u=!1,className:h,tabListClassName:p,onTabChange:v,onReorder:y,renderTab:m,children:g})=>{const w=G=>{const re=G[t]??G.value??G.key;return re!==void 0?String(re):""},x=G=>G[r]??G.label,_=i||(e[0]?w(e[0]):""),[S,E]=C.useState(_),[I,N]=C.useState(null),[T,M]=C.useState(e),z=n!==void 0?n:S,j=T,W=jW(DW(f1,{activationConstraint:{distance:10}})),U=G=>{n===void 0&&E(G),v==null||v(G)},A=G=>j.findIndex(re=>w(re)===G),K=I?A(I):-1;C.useEffect(()=>{M(e)},[e]);const V={activeTab:z,onTabChange:U,variant:o,color:a,size:s,showIcons:d,disabled:u};if(g)return O.jsxs(Rw.Provider,{value:V,children:[O.jsx("div",{"data-qui":"Tabs",role:"tablist",className:ye(o==="file"?qh():oC(),h,p),children:g}),o==="file"&&O.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]});const te=o==="file"&&c?O.jsxs("div",{className:"relative h-full w-full",children:[O.jsxs(jU,{collisionDetection:$W,modifiers:[gG,bG],sensors:W,onDragStart:({active:G})=>{G&&N(G.id)},onDragEnd:({over:G})=>{if(N(null),G){const re=A(G.id);if(K!==re&&K!==-1){const P=p1(j,K,re);M(P),y&&y(P,P[re]),U(w(P[re]))}}},onDragCancel:()=>{N(null)},children:[O.jsx(sG,{items:j.map(G=>w(G)),strategy:oG,children:O.jsx("div",{role:"tablist",className:ye(qh(),p),children:j.map(G=>{const re=w(G);return O.jsx(iC,{value:re,tab:{...G,renderTab:G.renderTab||m},isActive:z===re,onTabClick:U,className:h},re)})})}),O.jsx(tG,{children:I&&K!==-1?O.jsx(iC,{value:w(j[K]),tab:{...j[K],renderTab:j[K].renderTab||m},isActive:z===w(j[K]),onTabClick:U,dragOverlay:!0,className:h}):null})]}),O.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]}):o==="file"?O.jsxs("div",{className:"relative",children:[O.jsx("div",{role:"tablist",className:ye(qh(),p),children:e.map(G=>{const re=w(G);return O.jsx(wG,{value:re,tab:{...G,renderTab:G.renderTab||m},isActive:z===re,onTabClick:U},re)})}),O.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]}):O.jsx("div",{role:"tablist",className:ye(oC(),p),children:e.map(G=>{const re=w(G);return O.jsx(xG,{value:re,label:x(G),tab:{...G,renderTab:G.renderTab||m},isActive:z===re,color:a,size:s,showIcons:d,onTabClick:U},re)})});return O.jsx(Rw.Provider,{value:V,children:O.jsx("div",{"data-qui":"Tabs",className:h,children:te})})},EG=C.forwardRef(({isActive:e=!1,isDesactive:t=!1,children:r,...n},i)=>O.jsx("div",{"data-qui":"TabNavContainer",className:b3(e,t),ref:i,...n,children:r}));EG.displayName="TabNavContainer";v1.displayName="Tabs";v1.Item=y3;const zh=v1;var Wt=function(){return Wt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Wt.apply(this,arguments)},aC={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},sC={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},qc={width:"20px",height:"20px",position:"absolute",zIndex:1},_G={top:Wt(Wt({},aC),{top:"-5px"}),right:Wt(Wt({},sC),{left:void 0,right:"-5px"}),bottom:Wt(Wt({},aC),{top:void 0,bottom:"-5px"}),left:Wt(Wt({},sC),{left:"-5px"}),topRight:Wt(Wt({},qc),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Wt(Wt({},qc),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Wt(Wt({},qc),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Wt(Wt({},qc),{left:"-10px",top:"-10px",cursor:"nw-resize"})},OG=C.memo(function(e){var t=e.onResizeStart,r=e.direction,n=e.children,i=e.replaceStyles,o=e.className,a=C.useCallback(function(d){t(d,r)},[t,r]),s=C.useCallback(function(d){t(d,r)},[t,r]),c=C.useMemo(function(){return Wt(Wt({position:"absolute",userSelect:"none"},_G[r]),i??{})},[i,r]);return O.jsx("div",{className:o||void 0,style:c,onMouseDown:a,onTouchStart:s,children:n})}),CG=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},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)}})(),ei=function(){return ei=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ei.apply(this,arguments)},IG={width:"auto",height:"auto"},zc=function(e,t,r){return Math.max(Math.min(e,r),t)},lC=function(e,t,r){var n=Math.round(e/t);return n*t+r*(n-1)},ia=function(e,t){return new RegExp(e,"i").test(t)},Lc=function(e){return!!(e.touches&&e.touches.length)},RG=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},cC=function(e,t,r){r===void 0&&(r=0);var n=t.reduce(function(o,a,s){return Math.abs(a-e)<Math.abs(t[o]-e)?s:o},0),i=Math.abs(t[n]-e);return r===0||i<r?t[n]:e},Lh=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")},Bc=function(e,t,r,n){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var i=Number(e.replace("%",""))/100;return t*i}if(e.endsWith("vw")){var i=Number(e.replace("vw",""))/100;return r*i}if(e.endsWith("vh")){var i=Number(e.replace("vh",""))/100;return n*i}}return e},NG=function(e,t,r,n,i,o,a){return n=Bc(n,e.width,t,r),i=Bc(i,e.height,t,r),o=Bc(o,e.width,t,r),a=Bc(a,e.height,t,r),{maxWidth:typeof n>"u"?void 0:Number(n),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},TG=function(e){return Array.isArray(e)?e:[e,e]},PG=["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"],uC="__resizable_base__",MG=(function(e){CG(t,e);function t(r){var n,i,o,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 d=s.window.document.createElement("div");return d.style.width="100%",d.style.height="100%",d.style.position="absolute",d.style.transform="scale(0, 0)",d.style.left="0",d.style.flex="0 0 100%",d.classList?d.classList.add(uC):d.className+=uC,c.appendChild(d),d},s.removeBase=function(c){var d=s.parentNode;d&&d.removeChild(c)},s.state={isResizing:!1,width:(i=(n=s.propsSize)===null||n===void 0?void 0:n.width)!==null&&i!==void 0?i:"auto",height:(a=(o=s.propsSize)===null||o===void 0?void 0:o.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||IG},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var r=0,n=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),r=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,n=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,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,i=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 d=r.getParentSize(),u=Number(r.state[s].toString().replace("px","")),h=u/d[s]*100;return"".concat(h,"%")}return Lh(r.state[s])},o=n&&typeof n.width<"u"&&!this.state.isResizing?Lh(n.width):i("width"),a=n&&typeof n.height<"u"&&!this.state.isResizing?Lh(n.height):i("height");return{width:o,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,i=this.parentNode.style.flexWrap;i!=="wrap"&&(n=!0,this.parentNode.style.flexWrap="wrap"),r.style.position="relative",r.style.minWidth="100%",r.style.minHeight="100%";var o={width:r.offsetWidth,height:r.offsetHeight};return n&&(this.parentNode.style.flexWrap=i),this.removeBase(r),o},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 i=this.propsSize&&this.propsSize[n];return this.state[n]==="auto"&&this.state.original[n]===r&&(typeof i>"u"||i==="auto")?"auto":r},t.prototype.calculateNewMaxFromBoundary=function(r,n){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&ia("left",o),s=i&&ia("top",o),c,d;if(this.props.bounds==="parent"){var u=this.parentNode;u&&(c=a?this.resizableRight-this.parentLeft:u.offsetWidth+(this.parentLeft-this.resizableLeft),d=s?this.resizableBottom-this.parentTop:u.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(c=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,d=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),d=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return c&&Number.isFinite(c)&&(r=r&&r<c?r:c),d&&Number.isFinite(d)&&(n=n&&n<d?n:d),{maxWidth:r,maxHeight:n}},t.prototype.calculateNewSizeFromDirection=function(r,n){var i=this.props.scale||1,o=TG(this.props.resizeRatio||1),a=o[0],s=o[1],c=this.state,d=c.direction,u=c.original,h=this.props,p=h.lockAspectRatio,v=h.lockAspectRatioExtraHeight,y=h.lockAspectRatioExtraWidth,m=u.width,g=u.height,w=v||0,x=y||0;return ia("right",d)&&(m=u.width+(r-u.x)*a/i,p&&(g=(m-x)/this.ratio+w)),ia("left",d)&&(m=u.width-(r-u.x)*a/i,p&&(g=(m-x)/this.ratio+w)),ia("bottom",d)&&(g=u.height+(n-u.y)*s/i,p&&(m=(g-w)*this.ratio+x)),ia("top",d)&&(g=u.height-(n-u.y)*s/i,p&&(m=(g-w)*this.ratio+x)),{newWidth:m,newHeight:g}},t.prototype.calculateNewSizeFromAspectRatio=function(r,n,i,o){var a=this.props,s=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,d=a.lockAspectRatioExtraWidth,u=typeof o.width>"u"?10:o.width,h=typeof i.width>"u"||i.width<0?r:i.width,p=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?n:i.height,y=c||0,m=d||0;if(s){var g=(p-y)*this.ratio+m,w=(v-y)*this.ratio+m,x=(u-m)/this.ratio+y,_=(h-m)/this.ratio+y,S=Math.max(u,g),E=Math.min(h,w),I=Math.max(p,x),N=Math.min(v,_);r=zc(r,S,E),n=zc(n,I,N)}else r=zc(r,u,h),n=zc(n,p,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 i=n.getBoundingClientRect();this.parentLeft=i.left*r,this.parentTop=i.top*r}}if(this.props.bounds&&typeof this.props.bounds!="string"){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left*r,this.targetTop=o.top*r}if(this.resizable){var a=this.resizable.getBoundingClientRect(),s=a.left,c=a.top,d=a.right,u=a.bottom;this.resizableLeft=s*r,this.resizableRight=d*r,this.resizableTop=c*r,this.resizableBottom=u*r}},t.prototype.onResizeStart=function(r,n){if(!(!this.resizable||!this.window)){var i=0,o=0;if(r.nativeEvent&&RG(r.nativeEvent)?(i=r.nativeEvent.clientX,o=r.nativeEvent.clientY):r.nativeEvent&&Lc(r.nativeEvent)&&(i=r.nativeEvent.touches[0].clientX,o=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 d=this.parentNode;if(d){var u=this.window.getComputedStyle(d).flexDirection;this.flexDir=u.startsWith("row")?"row":"column",s=c.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var h={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ei(ei({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(r.target).cursor||"auto"}),direction:n,flexBasis:s};this.setState(h)}},t.prototype.onMouseMove=function(r){var n=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Lc(r))try{r.preventDefault(),r.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,c=i.minHeight,d=Lc(r)?r.touches[0].clientX:r.clientX,u=Lc(r)?r.touches[0].clientY:r.clientY,h=this.state,p=h.direction,v=h.original,y=h.width,m=h.height,g=this.getParentSize(),w=NG(g,this.window.innerWidth,this.window.innerHeight,o,a,s,c);o=w.maxWidth,a=w.maxHeight,s=w.minWidth,c=w.minHeight;var x=this.calculateNewSizeFromDirection(d,u),_=x.newHeight,S=x.newWidth,E=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(S=cC(S,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(_=cC(_,this.props.snap.y,this.props.snapGap));var I=this.calculateNewSizeFromAspectRatio(S,_,{width:E.maxWidth,height:E.maxHeight},{width:s,height:c});if(S=I.newWidth,_=I.newHeight,this.props.grid){var N=lC(S,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),T=lC(_,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),M=this.props.snapGap||0,z=M===0||Math.abs(N-S)<=M?N:S,j=M===0||Math.abs(T-_)<=M?T:_;S=z,_=j}var W={width:S-v.width,height:_-v.height};if(this.delta=W,y&&typeof y=="string"){if(y.endsWith("%")){var U=S/g.width*100;S="".concat(U,"%")}else if(y.endsWith("vw")){var A=S/this.window.innerWidth*100;S="".concat(A,"vw")}else if(y.endsWith("vh")){var K=S/this.window.innerHeight*100;S="".concat(K,"vh")}}if(m&&typeof m=="string"){if(m.endsWith("%")){var U=_/g.height*100;_="".concat(U,"%")}else if(m.endsWith("vw")){var A=_/this.window.innerWidth*100;_="".concat(A,"vw")}else if(m.endsWith("vh")){var K=_/this.window.innerHeight*100;_="".concat(K,"vh")}}var V={width:this.createSizeForCssProperty(S,"width"),height:this.createSizeForCssProperty(_,"height")};this.flexDir==="row"?V.flexBasis=V.width:this.flexDir==="column"&&(V.flexBasis=V.height);var te=this.state.width!==V.width,G=this.state.height!==V.height,re=this.state.flexBasis!==V.flexBasis,P=te||G||re;P&&xn.flushSync(function(){n.setState(V)}),this.props.onResize&&P&&this.props.onResize(r,p,this.resizable,W)}},t.prototype.onMouseUp=function(r){var n,i,o=this.state,a=o.isResizing,s=o.direction;o.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:(i=this.props.size.height)!==null&&i!==void 0?i:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ei(ei({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(r){var n,i;this.setState({width:(n=r.width)!==null&&n!==void 0?n:"auto",height:(i=r.height)!==null&&i!==void 0?i:"auto"})},t.prototype.renderResizer=function(){var r=this,n=this.props,i=n.enable,o=n.handleStyles,a=n.handleClasses,s=n.handleWrapperStyle,c=n.handleWrapperClass,d=n.handleComponent;if(!i)return null;var u=Object.keys(i).map(function(h){return i[h]!==!1?O.jsx(OG,{direction:h,onResizeStart:r.onResizeStart,replaceStyles:o&&o[h],className:a&&a[h],children:d&&d[h]?d[h]:null},h):null});return O.jsx("div",{className:c,style:s,children:u})},t.prototype.render=function(){var r=this,n=Object.keys(this.props).reduce(function(a,s){return PG.indexOf(s)!==-1||(a[s]=r.props[s]),a},{}),i=ei(ei(ei({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&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return O.jsxs(o,ei({style:i,className:this.props.className},n,{ref:function(a){a&&(r.resizable=a)},children:[this.state.isResizing&&O.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})(C.PureComponent);const kG={0:"bg-panel-0",1:"bg-panel-1",2:"bg-panel-2",3:"bg-panel-3",4:"bg-panel-4",5:"bg-panel-5"},AG={tabs:"border-tab-border",primary:"border-primary",negative:"border-input-error-border",positive:"border-positive",light:"border-panel-border-subtle",default:"border-panel-border"},x3=({depth:e=0,className:t,borderType:r,disabled:n})=>ye("transition-colors duration-200",{"text-body":!n,"text-inactive-text":n},r?AG[r]:"border-panel-border",kG[e],t),DG=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 i=e.match(/min-h-\[(\d+)px\]/);i&&(t.minHeight=parseInt(i[1],10));const o=e.match(/max-h-\[(\d+)px\]/);return o&&(t.maxHeight=parseInt(o[1],10)),t},jG=C.forwardRef(({children:e,width:t,height:r,minWidth:n=10,minHeight:i=10,maxWidth:o,maxHeight:a,defaultWidth:s,defaultHeight:c,defaultSize:d,size:u,grid:h,snap:p,lockAspectRatio:v=!1,enable:y,handleStyles:m={},handleClasses:g={},handleComponent:w={},style:x={},className:_,onResizeStart:S,onResize:E,onResizeStop:I,scale:N=1,bounds:T,snapGap:M,as:z="div",depth:j,disabled:W},U)=>{const A=x3({depth:j,className:_,disabled:W}),K=DG(_),V=u?{size:u}:t!==void 0||r!==void 0?{size:{width:t??"auto",height:r??"auto"}}:{},te=d?{defaultSize:d}:s!==void 0||c!==void 0?{defaultSize:{width:s??"auto",height:c??"auto"}}:{},G=C.useRef(null);return C.useImperativeHandle(U,()=>{var re;return(re=G.current)==null?void 0:re.resizable}),O.jsx(MG,{"data-qui":"Resizable",ref:G,...V,...te,minWidth:n??K.minWidth,minHeight:i??K.minHeight,maxWidth:o??K.maxWidth,maxHeight:a??K.maxHeight,grid:h,snap:p,lockAspectRatio:v,enable:y,handleStyles:m,handleClasses:g,handleComponent:w,style:x,className:ye("relative box-border",A),onResizeStart:S,onResize:E,onResizeStop:I,scale:N,bounds:T,snapGap:M,as:z,children:e})});jG.displayName="Resizable";const oa={sm:{track:"h-4 w-7",thumb:"size-3",thumbUnchecked:"left-0.5",thumbChecked:"left-3.5",label:"text-xs",gap:"gap-2"},md:{track:"h-5 w-9",thumb:"size-4",thumbUnchecked:"left-0.5",thumbChecked:"left-4.5",label:"text-sm",gap:"gap-2.5"},lg:{track:"h-6 w-11",thumb:"size-5",thumbUnchecked:"left-0.5",thumbChecked:"left-5.5",label:"text-base",gap:"gap-3"}},Fc={primary:{bg:"bg-primary",thumb:"group-hover:bg-primary-light",icon:"text-primary"},positive:{bg:"bg-positive",thumb:"group-hover:bg-positive-light",icon:"text-positive"},warning:{bg:"bg-warning",thumb:"group-hover:bg-warning-light",icon:"text-warning"},negative:{bg:"bg-negative",thumb:"group-hover:bg-negative-light",icon:"text-negative"}},qG=(e,t,r,n,i,o)=>({container:ye("inline-flex items-center",oa[e].gap,o),track:ye("relative inline-flex items-center shrink-0 group","transition-colors duration-200 ease-in-out","focus:outline-hidden focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2","border border-input-border rounded-full justify-between",oa[e].track,{[Fc[t].bg]:r&&!n&&!i,"bg-input-bg":!r&&!n||i,"bg-panel cursor-not-allowed":n,"cursor-pointer":!n}),thumb:ye("bg-input-text pointer-events-none inline-flex items-center justify-center shadow-xs","transition-all duration-200 ease-in-out","rounded-full absolute",oa[e].thumb,r?oa[e].thumbChecked:oa[e].thumbUnchecked,{[Fc[t].thumb]:!n,"bg-canvas-subtle":n}),iconLeft:ye("flex items-center justify-center z-10 w-1/2 p-0.5",{[Fc[t].icon]:!r&&!n,"text-panel-subtle":n||r}),iconRight:ye("flex items-center justify-center z-10 w-1/2 p-0.5",{[Fc[t].icon]:r&&!n,"text-panel-subtle":n||!r}),label:ye("font-medium text-body",oa[e].label,{"cursor-pointer":!n,"cursor-not-allowed text-muted":n})}),Fu=C.forwardRef(({label:e,checked:t,defaultChecked:r=!1,disabled:n=!1,size:i="md",color:o="primary",icons:a,onChange:s,className:c,id:d,name:u,...h},p)=>{const[v,y]=C.useState(r),m=t!==void 0,g=m?t:v,w=()=>{const _=!g;m||y(_),s==null||s(_)},x=qG(i,o,g,n,!!a,c);return O.jsxs("div",{"data-qui":"Toggle",className:x.container,children:[e&&O.jsx("label",{htmlFor:d,className:x.label,children:e}),O.jsxs("button",{ref:p,...h,type:"button",role:"switch","aria-checked":g,"aria-label":e,disabled:n,onClick:w,name:u,id:d,className:x.track,children:[a&&O.jsx("span",{className:x.iconLeft,children:a.unchecked}),O.jsx("span",{className:x.thumb,"aria-hidden":"true"}),a&&O.jsx("span",{className:x.iconRight,children:a.checked})]})]})});Fu.displayName="Toggle";C.createContext(null);const br=C.forwardRef(({depth:e=0,className:t,children:r,borderType:n,disabled:i,...o},a)=>{const s=x3({depth:e,className:t,borderType:n,disabled:i});return O.jsx("div",{"data-qui":"Panel",ref:a,className:s,"aria-disabled":i,...o,children:r})});br.displayName="Panel";const cl={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"}},pu={primary:{bg:"bg-primary",text:"text-button-text",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-button-text"},positive:{bg:"bg-positive",text:"text-button-text",border:"border-positive",buttonHover:"hover:bg-positive-hover"},warning:{bg:"bg-warning",text:"text-button-text",border:"border-warning",buttonHover:"hover:bg-warning-hover"},negative:{bg:"bg-negative",text:"text-button-text",border:"border-negative",buttonHover:"hover:bg-negative-hover"},grey:{bg:"bg-input-bg",text:"text-input-text",border:"border-input-border",buttonHover:"hover:bg-input-hover"},dark:{bg:"bg-tab-inactive-bg",text:"text-input-text",border:"border-input-border",buttonHover:"hover:bg-primary-hover hover:text-button-text"}},zG=(e,t,r,n)=>ye("inline-flex items-center justify-center font-medium border",cl[e].container,pu[t].bg,pu[t].text,pu[t].border,cl[e].text,{"opacity-60 pointer-events-none":r,"cursor-pointer hover:bg-opacity-90 transition-opacity":n&&!r}),LG=(e,t,r)=>ye({[cl[e].icon]:!r,"bg-canvas-default outline-canvas-default text-primary":r&&t!=="white"||r,"bg-primary outline-primary text-button-text":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}),BG=e=>ye(cl[e].text),w3=(e,t,r)=>ye("inline-flex items-center justify-center rounded transition-colors duration-200 focus:outline-hidden ",cl[e].iconButton,pu[t].buttonHover,{"pointer-events-none":r}),S3=C.createContext(null),xd=()=>{const e=C.useContext(S3);if(!e)throw new Error("Pill components must be used within a Pill.Root");return e},g1=C.forwardRef(({size:e="md",color:t="primary",className:r,children:n,disabled:i=!1,onClick:o,...a},s)=>{const c={size:e,color:t,disabled:i},d=!!o;return O.jsx(S3.Provider,{value:c,children:O.jsx("div",{"data-qui":"Pill",ref:s,onClick:o,className:ye(zG(e,t,i,d),r),...a,children:n})})});g1.displayName="Pill.Root";const m1=C.forwardRef(({className:e,children:t,...r},n)=>{const{size:i}=xd();return O.jsx("span",{ref:n,className:ye(BG(i),e),...r,children:t})});m1.displayName="Pill.Text";const b1=C.forwardRef(({className:e,children:t,label:r,position:n,...i},o)=>{const{size:a,color:s,disabled:c}=xd(),d=!!r,u=O.jsx("span",{ref:o,className:ye(LG(a,s,d),e,{"opacity-60":c}),...i,children:t});return d&&!c?O.jsx(Lr,{label:r||"",position:n||"up",children:u}):u});b1.displayName="Pill.Icon";const E3=C.forwardRef(({className:e,children:t,...r},n)=>{const{size:i,color:o,disabled:a}=xd();return O.jsx("button",{ref:n,type:"button",disabled:a,className:ye(w3(i,o,a),e),...r,children:t})});E3.displayName="Pill.Button";const y1=C.forwardRef(({className:e,onClose:t,"aria-label":r="Remove pill",children:n,...i},o)=>{const{size:a,color:s,disabled:c}=xd();return O.jsx("button",{ref:o,type:"button",disabled:c,className:ye(w3(a,s,c),e),onClick:t,"aria-label":r,...i,children:n||O.jsx(hd,{})})});y1.displayName="Pill.Close";const _3=C.forwardRef(({size:e="md",color:t="primary",label:r,icon:n,onClose:i,closable:o=!1,className:a,children:s,disabled:c=!1,...d},u)=>O.jsxs(g1,{ref:u,size:e,color:t,className:a,disabled:c,...d,children:[n&&O.jsx(b1,{children:n}),s||r&&O.jsx(m1,{children:r}),o&&O.jsx(y1,{onClose:i})]}));_3.displayName="Pill";const vu=Object.assign(_3,{Root:g1,Text:m1,Icon:b1,Button:E3,Close:y1});function aa(e,t,r){let n=r.initialDeps??[],i,o=!0;function a(){var s,c,d;let u;r.key&&(s=r.debug)!=null&&s.call(r)&&(u=Date.now());const h=e();if(!(h.length!==n.length||h.some((v,y)=>n[y]!==v)))return i;n=h;let p;if(r.key&&(c=r.debug)!=null&&c.call(r)&&(p=Date.now()),i=t(...h),r.key&&(d=r.debug)!=null&&d.call(r)){const v=Math.round((Date.now()-u)*100)/100,y=Math.round((Date.now()-p)*100)/100,m=y/16,g=(w,x)=>{for(w=String(w);w.length<x;)w=" "+w;return w};console.info(`%c⏱ ${g(y,5)} /${g(v,5)} ms`,`
|
|
19
19
|
font-size: .6rem;
|
|
20
20
|
font-weight: bold;
|
|
21
|
-
color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,r==null?void 0:r.key)}return r!=null&&r.onChange&&!(o&&r.skipInitialOnChange)&&r.onChange(i),o=!1,i}return a.updateDeps=s=>{n=s},a}function dC(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const FG=(e,t)=>Math.abs(e-t)<1.01,$G=(e,t,r)=>{let n;return function(...i){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,i),r)}},fC=e=>{const{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},VG=e=>e,HG=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let i=t;i<=r;i++)n.push(i);return n},WG=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;const i=a=>{const{width:s,height:c}=a;t({width:Math.round(s),height:Math.round(c)})};if(i(fC(r)),!n.ResizeObserver)return()=>{};const o=new n.ResizeObserver(a=>{const s=()=>{const c=a[0];if(c!=null&&c.borderBoxSize){const u=c.borderBoxSize[0];if(u){i({width:u.inlineSize,height:u.blockSize});return}}i(fC(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return o.observe(r,{box:"border-box"}),()=>{o.unobserve(r)}},hC={passive:!0},pC=typeof window>"u"?!0:"onscrollend"in window,UG=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let i=0;const o=e.options.useScrollendEvent&&pC?()=>{}:$G(n,()=>{t(i,!1)},e.options.isScrollingResetDelay),a=d=>()=>{const{horizontal:h,isRtl:p}=e.options;i=h?r.scrollLeft*(p&&-1||1):r.scrollTop,o(),t(i,d)},s=a(!0),c=a(!1);r.addEventListener("scroll",s,hC);const u=e.options.useScrollendEvent&&pC;return u&&r.addEventListener("scrollend",c,hC),()=>{r.removeEventListener("scroll",s),u&&r.removeEventListener("scrollend",c)}},GG=(e,t,r)=>{if(t!=null&&t.borderBoxSize){const n=t.borderBoxSize[0];if(n)return Math.round(n[r.options.horizontal?"inlineSize":"blockSize"])}return e[r.options.horizontal?"offsetWidth":"offsetHeight"]},KG=(e,{adjustments:t=0,behavior:r},n)=>{var i,o;const a=e+t;(o=(i=n.scrollElement)==null?void 0:i.scrollTo)==null||o.call(i,{[n.options.horizontal?"left":"top"]:a,behavior:r})};class YG{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var r,n,i;return((i=(n=(r=this.targetWindow)==null?void 0:r.performance)==null?void 0:n.now)==null?void 0:i.call(n))??Date.now()},this.observer=(()=>{let r=null;const n=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(i=>{i.forEach(o=>{const a=()=>{const s=o.target,c=this.indexFromElement(s);if(!s.isConnected){this.observer.unobserve(s);return}this.shouldMeasureDuringScroll(c)&&this.resizeItem(c,this.options.measureElement(s,o,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var i;(i=n())==null||i.disconnect(),r=null},observe:i=>{var o;return(o=n())==null?void 0:o.observe(i,{box:"border-box"})},unobserve:i=>{var o;return(o=n())==null?void 0:o.unobserve(i)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([n,i])=>{typeof i>"u"&&delete r[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:VG,rangeExtractor:HG,onChange:()=>{},measureElement:GG,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...r}},this.notify=r=>{var n,i;(i=(n=this.options).onChange)==null||i.call(n,this,r)},this.maybeNotify=aa(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=o,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(r,n)=>{const i=new Map,o=new Map;for(let a=n-1;a>=0;a--){const s=r[a];if(i.has(s.lane))continue;const c=o.get(s.lane);if(c==null||s.end>c.end?o.set(s.lane,s):s.end<c.end&&i.set(s.lane,!0),i.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((a,s)=>a.end===s.end?a.index-s.index:a.end-s.end)[0]:void 0},this.getMeasurementOptions=aa(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(r,n,i,o,a,s)=>(this.prevLanes!==void 0&&this.prevLanes!==s&&(this.lanesChangedFlag=!0),this.prevLanes=s,this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:n,scrollMargin:i,getItemKey:o,enabled:a,lanes:s}),{key:!1}),this.getMeasurements=aa(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:n,scrollMargin:i,getItemKey:o,enabled:a,lanes:s},c)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>r)for(const p of this.laneAssignments.keys())p>=r&&this.laneAssignments.delete(p);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(p=>{this.itemSizeCache.set(p.key,p.size)}));const u=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===r&&(this.lanesSettling=!1);const d=this.measurementsCache.slice(0,u),h=new Array(s).fill(void 0);for(let p=0;p<u;p++){const v=d[p];v&&(h[v.lane]=p)}for(let p=u;p<r;p++){const v=o(p),y=this.laneAssignments.get(p);let m,g;if(y!==void 0&&this.options.lanes>1){m=y;const S=h[m],E=S!==void 0?d[S]:void 0;g=E?E.end+this.options.gap:n+i}else{const S=this.options.lanes===1?d[p-1]:this.getFurthestMeasurement(d,p);g=S?S.end+this.options.gap:n+i,m=S?S.lane:p%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(p,m)}const w=c.get(v),x=typeof w=="number"?w:this.options.estimateSize(p),_=g+x;d[p]={index:p,start:g,size:x,end:_,key:v,lane:m},h[m]=p}return this.measurementsCache=d,d},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=aa(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,n,i,o)=>this.range=r.length>0&&n>0?XG({measurements:r,outerSize:n,scrollOffset:i,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=aa(()=>{let r=null,n=null;const i=this.calculateRange();return i&&(r=i.startIndex,n=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,r,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,r,n]},(r,n,i,o,a)=>o===null||a===null?[]:r({startIndex:o,endIndex:a,overscan:n,count:i}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=r=>{const n=this.options.indexAttribute,i=r.getAttribute(n);return i?parseInt(i,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=r=>{var n;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const i=this.scrollState.index??((n=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:n.index);if(i!==void 0&&this.range){const o=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,i-o),s=Math.min(this.options.count-1,i+o);return r>=a&&r<=s}return!0},this.measureElement=r=>{if(!r){this.elementsCache.forEach((a,s)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(s))});return}const n=this.indexFromElement(r),i=this.options.getItemKey(n),o=this.elementsCache.get(i);o!==r&&(o&&this.observer.unobserve(o),this.observer.observe(r),this.elementsCache.set(i,r)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(r,void 0,this))},this.resizeItem=(r,n)=>{var i;const o=this.measurementsCache[r];if(!o)return;const a=this.itemSizeCache.get(o.key)??o.size,s=n-a;s!==0&&(((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,s,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",s),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,n)),this.notify(!1))},this.getVirtualItems=aa(()=>[this.getVirtualIndexes(),this.getMeasurements()],(r,n)=>{const i=[];for(let o=0,a=r.length;o<a;o++){const s=r[o],c=n[s];i.push(c)}return i},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const n=this.getMeasurements();if(n.length!==0)return dC(n[O3(0,n.length-1,i=>dC(n[i]).start,r)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const r=this.scrollElement.document.documentElement;return this.options.horizontal?r.scrollWidth-this.scrollElement.innerWidth:r.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(r,n,i=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),a=this.getScrollOffset();n==="auto"&&(n=r>=a+o?"end":"start"),n==="center"?r+=(i-o)/2:n==="end"&&(r-=o);const s=this.getMaxScrollOffset();return Math.max(Math.min(s,r),0)},this.getOffsetForIndex=(r,n="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const i=this.getSize(),o=this.getScrollOffset(),a=this.measurementsCache[r];if(!a)return;if(n==="auto")if(a.end>=o+i-this.options.scrollPaddingEnd)n="end";else if(a.start<=o+this.options.scrollPaddingStart)n="start";else return[o,n];if(n==="end"&&r===this.options.count-1)return[this.getMaxScrollOffset(),n];const s=n==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,n,a.size),n]},this.scrollToOffset=(r,{align:n="start",behavior:i="auto"}={})=>{const o=this.getOffsetForAlignment(r,n),a=this.now();this.scrollState={index:null,align:n,behavior:i,startedAt:a,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToIndex=(r,{align:n="auto",behavior:i="auto"}={})=>{r=Math.max(0,Math.min(r,this.options.count-1));const o=this.getOffsetForIndex(r,n);if(!o)return;const[a,s]=o,c=this.now();this.scrollState={index:r,align:s,behavior:i,startedAt:c,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollBy=(r,{behavior:n="auto"}={})=>{const i=this.getScrollOffset()+r,o=this.now();this.scrollState={index:null,align:"start",behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var r;const n=this.getMeasurements();let i;if(n.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((r=n[n.length-1])==null?void 0:r.end)??0;else{const o=Array(this.options.lanes).fill(null);let a=n.length-1;for(;a>=0&&o.some(s=>s===null);){const s=n[a];o[s.lane]===null&&(o[s.lane]=s.end),a--}i=Math.max(...o.filter(s=>s!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(r,{adjustments:n,behavior:i})=>{this.options.scrollToFn(r,{behavior:i,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const t=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,r=t?t[0]:this.scrollState.lastTargetOffset,n=1,i=r!==this.scrollState.lastTargetOffset;if(!i&&FG(r,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=n){this.scrollState=null;return}}else this.scrollState.stableFrames=0,i&&(this.scrollState.lastTargetOffset=r,this.scrollState.behavior="auto",this._scrollToOffset(r,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}const O3=(e,t,r,n)=>{for(;e<=t;){const i=(e+t)/2|0,o=r(i);if(o<n)e=i+1;else if(o>n)t=i-1;else return i}return e>0?e-1:0};function XG({measurements:e,outerSize:t,scrollOffset:r,lanes:n}){const i=e.length-1,o=c=>e[c].start;if(e.length<=n)return{startIndex:0,endIndex:i};let a=O3(0,i,o,r),s=a;if(n===1)for(;s<i&&e[s].end<r+t;)s++;else if(n>1){const c=Array(n).fill(0);for(;s<i&&c.some(d=>d<r+t);){const d=e[s];c[d.lane]=d.end,s++}const u=Array(n).fill(r+t);for(;a>=0&&u.some(d=>d>=r);){const d=e[a];u[d.lane]=d.start,a--}a=Math.max(0,a-a%n),s=Math.min(i,s+(n-1-s%n))}return{startIndex:a,endIndex:s}}const vC=typeof document<"u"?nt.useLayoutEffect:nt.useEffect;function ZG({useFlushSync:e=!0,...t}){const r=nt.useReducer(()=>({}),{})[1],n={...t,onChange:(o,a)=>{var s;e&&a?xn.flushSync(r):r(),(s=t.onChange)==null||s.call(t,o,a)}},[i]=nt.useState(()=>new YG(n));return i.setOptions(n),vC(()=>i._didMount(),[]),vC(()=>i._willUpdate()),i}function JG(e){return ZG({observeElementRect:WG,observeElementOffset:UG,scrollToFn:KG,...e})}const C3=C.createContext(null),or=()=>{const e=C.useContext(C3);if(!e)throw new Error("Select compound components must be used within Select.Root");return e},Qt={sm:{trigger:"h-5 min-h-fit",control:"min-h-5 p-0.5 gap-1",input:"text-xs h-3.5",placeholder:"placeholder:text-xs text-xs",singleValue:"text-xs",multiValue:"h-3.5 px-0.5 gap-1 text-xxs",multiValueLabel:"text-xxs",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-xxs",noOptionsMessage:"px-2 py-1 text-xxs",loadingMessage:"px-2 py-1 text-xxs",message:"text-xxs p-1.5",icon:"text-sm"},md:{trigger:"h-6 min-h-fit",control:"min-h-6 p-1 gap-1.5",input:"text-s h-4",placeholder:"placeholder:text-s text-s",singleValue:"text-s",multiValue:"h-4 p-1 gap-1 text-xs",multiValueLabel:"text-xs",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:"py-1",option:"px-2 py-1 text-s",group:"pt-1.5",groupHeading:"px-3 py-1 text-xs",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-sm h-5",placeholder:"placeholder:text-sm text-sm",singleValue:"text-sm",multiValue:"h-5 px-1.5 gap-1.5 text-s",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-s",noOptionsMessage:"px-4 py-2 text-s",loadingMessage:"px-4 py-2 text-s",message:"text-s p-2.5",icon:"text-lg"}},Tt={primary:{control:"cursor-pointer bg-input-bg text-select-text",controlFocused:"border-input-focus-border",controlDisabled:"opacity-60",controlInvalid:"bg-input-bg border-input-error-border text-select-text",placeholder:"placeholder:text-input-placeholder text-input-text 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-input-focus-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:"ring-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-input-bg text-select-text",controlFocused:"border-positive",controlDisabled:"opacity-60",controlInvalid:"bg-input-bg border-input-error-border text-select-text",placeholder:"placeholder:text-input-placeholder text-input-text 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-positive 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-positive-dark",messageBackground:"bg-positive-light",messageBorder:"ring-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-input-bg text-select-text",controlFocused:"border-input-warning-border",controlDisabled:"opacity-60",controlInvalid:"bg-input-bg border-input-error-border text-select-text",placeholder:"placeholder:text-input-placeholder text-input-text 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-input-warning-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-warning-dark",messageBackground:"bg-input-warning-bg",messageBorder:"ring-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-input-bg text-negative",controlFocused:"border-input-error-border",controlDisabled:"opacity-60",controlInvalid:"bg-input-bg border-input-error-border text-negative",placeholder:"placeholder:text-input-placeholder text-input-text placeholder:opacity-60",singleValue:"text-negative",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-input-error-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:"ring-input-error-border",icon:"text-input-text",iconAction:"text-input-text hover:text-body",iconActionHover:"hover:text-body hover:bg-input-option-hover-bg"}},I3=({menuOpen:e,menuPlacement:t,hasMessage:r,fallback:n})=>{if(!e)return n;const i=t==="top";return r?i?"last:rounded-b":"first:rounded-t":i?"rounded-b":"rounded-t"},QG=()=>ye("flex flex-col relative"),eK=({size:e,color:t,isDisabled:r,hasMessage:n,isInvalid:i,isFocused:o,menuPlacement:a})=>{const s=Tt[i?"negative":t],c=I3({menuOpen:!!(o&&a),menuPlacement:a,hasMessage:n,fallback:"only:rounded first:rounded-t last:rounded-b"});return ye("bg-input-bg flex relative transition-all duration-200 ease-in-out items-center",c,s.control,n?["ring-1",s.messageBorder]:["border",r?"border-input-border":o?s.controlFocused:`border-select-border focus-within:${s.controlFocused}`],Qt[e].trigger,{"ring-1":n,[s.controlDisabled]:r})},tK=({size:e,color:t,isDisabled:r,isAction:n})=>{const i=Tt[t];return ye("transition-colors duration-200 rounded max-h-full h-fit px-0.5",Qt[e].icon,e==="sm"?"m-px":"m-0.5",r?"text-muted opacity-60 pointer-events-none":n?i.iconAction:i.icon,{"cursor-pointer p-0.5":n&&!r,[i.iconActionHover]:n&&!r,"pointer-events-none":!n})},rK=({size:e,color:t,isDisabled:r,isFocused:n,isInvalid:i,hasMessage:o,hasGroup:a,menuPlacement:s})=>{const c=Tt[i?"negative":t],u=I3({menuOpen:!!(n&&s),menuPlacement:s,hasMessage:o,fallback:"rounded"});return a?ye("flex items-center justify-between flex-1 min-w-0",Qt[e].control,"bg-transparent border-0",{[c.controlDisabled]:r}):ye("flex items-center justify-between",u,Qt[e].control,c.control,o?["ring-1",c.messageBorder]:["border",r?"border-input-border":n?c.controlFocused:`border-select-border
|
|
21
|
+
color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,r==null?void 0:r.key)}return r!=null&&r.onChange&&!(o&&r.skipInitialOnChange)&&r.onChange(i),o=!1,i}return a.updateDeps=s=>{n=s},a}function dC(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const FG=(e,t)=>Math.abs(e-t)<1.01,$G=(e,t,r)=>{let n;return function(...i){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,i),r)}},fC=e=>{const{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},VG=e=>e,HG=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let i=t;i<=r;i++)n.push(i);return n},WG=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;const i=a=>{const{width:s,height:c}=a;t({width:Math.round(s),height:Math.round(c)})};if(i(fC(r)),!n.ResizeObserver)return()=>{};const o=new n.ResizeObserver(a=>{const s=()=>{const c=a[0];if(c!=null&&c.borderBoxSize){const d=c.borderBoxSize[0];if(d){i({width:d.inlineSize,height:d.blockSize});return}}i(fC(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return o.observe(r,{box:"border-box"}),()=>{o.unobserve(r)}},hC={passive:!0},pC=typeof window>"u"?!0:"onscrollend"in window,UG=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let i=0;const o=e.options.useScrollendEvent&&pC?()=>{}:$G(n,()=>{t(i,!1)},e.options.isScrollingResetDelay),a=u=>()=>{const{horizontal:h,isRtl:p}=e.options;i=h?r.scrollLeft*(p&&-1||1):r.scrollTop,o(),t(i,u)},s=a(!0),c=a(!1);r.addEventListener("scroll",s,hC);const d=e.options.useScrollendEvent&&pC;return d&&r.addEventListener("scrollend",c,hC),()=>{r.removeEventListener("scroll",s),d&&r.removeEventListener("scrollend",c)}},GG=(e,t,r)=>{if(t!=null&&t.borderBoxSize){const n=t.borderBoxSize[0];if(n)return Math.round(n[r.options.horizontal?"inlineSize":"blockSize"])}return e[r.options.horizontal?"offsetWidth":"offsetHeight"]},KG=(e,{adjustments:t=0,behavior:r},n)=>{var i,o;const a=e+t;(o=(i=n.scrollElement)==null?void 0:i.scrollTo)==null||o.call(i,{[n.options.horizontal?"left":"top"]:a,behavior:r})};class YG{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var r,n,i;return((i=(n=(r=this.targetWindow)==null?void 0:r.performance)==null?void 0:n.now)==null?void 0:i.call(n))??Date.now()},this.observer=(()=>{let r=null;const n=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(i=>{i.forEach(o=>{const a=()=>{const s=o.target,c=this.indexFromElement(s);if(!s.isConnected){this.observer.unobserve(s);return}this.shouldMeasureDuringScroll(c)&&this.resizeItem(c,this.options.measureElement(s,o,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var i;(i=n())==null||i.disconnect(),r=null},observe:i=>{var o;return(o=n())==null?void 0:o.observe(i,{box:"border-box"})},unobserve:i=>{var o;return(o=n())==null?void 0:o.unobserve(i)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([n,i])=>{typeof i>"u"&&delete r[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:VG,rangeExtractor:HG,onChange:()=>{},measureElement:GG,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...r}},this.notify=r=>{var n,i;(i=(n=this.options).onChange)==null||i.call(n,this,r)},this.maybeNotify=aa(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=o,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(r,n)=>{const i=new Map,o=new Map;for(let a=n-1;a>=0;a--){const s=r[a];if(i.has(s.lane))continue;const c=o.get(s.lane);if(c==null||s.end>c.end?o.set(s.lane,s):s.end<c.end&&i.set(s.lane,!0),i.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((a,s)=>a.end===s.end?a.index-s.index:a.end-s.end)[0]:void 0},this.getMeasurementOptions=aa(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(r,n,i,o,a,s)=>(this.prevLanes!==void 0&&this.prevLanes!==s&&(this.lanesChangedFlag=!0),this.prevLanes=s,this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:n,scrollMargin:i,getItemKey:o,enabled:a,lanes:s}),{key:!1}),this.getMeasurements=aa(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:n,scrollMargin:i,getItemKey:o,enabled:a,lanes:s},c)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>r)for(const p of this.laneAssignments.keys())p>=r&&this.laneAssignments.delete(p);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(p=>{this.itemSizeCache.set(p.key,p.size)}));const d=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===r&&(this.lanesSettling=!1);const u=this.measurementsCache.slice(0,d),h=new Array(s).fill(void 0);for(let p=0;p<d;p++){const v=u[p];v&&(h[v.lane]=p)}for(let p=d;p<r;p++){const v=o(p),y=this.laneAssignments.get(p);let m,g;if(y!==void 0&&this.options.lanes>1){m=y;const S=h[m],E=S!==void 0?u[S]:void 0;g=E?E.end+this.options.gap:n+i}else{const S=this.options.lanes===1?u[p-1]:this.getFurthestMeasurement(u,p);g=S?S.end+this.options.gap:n+i,m=S?S.lane:p%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(p,m)}const w=c.get(v),x=typeof w=="number"?w:this.options.estimateSize(p),_=g+x;u[p]={index:p,start:g,size:x,end:_,key:v,lane:m},h[m]=p}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=aa(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,n,i,o)=>this.range=r.length>0&&n>0?XG({measurements:r,outerSize:n,scrollOffset:i,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=aa(()=>{let r=null,n=null;const i=this.calculateRange();return i&&(r=i.startIndex,n=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,r,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,r,n]},(r,n,i,o,a)=>o===null||a===null?[]:r({startIndex:o,endIndex:a,overscan:n,count:i}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=r=>{const n=this.options.indexAttribute,i=r.getAttribute(n);return i?parseInt(i,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=r=>{var n;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const i=this.scrollState.index??((n=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:n.index);if(i!==void 0&&this.range){const o=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,i-o),s=Math.min(this.options.count-1,i+o);return r>=a&&r<=s}return!0},this.measureElement=r=>{if(!r){this.elementsCache.forEach((a,s)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(s))});return}const n=this.indexFromElement(r),i=this.options.getItemKey(n),o=this.elementsCache.get(i);o!==r&&(o&&this.observer.unobserve(o),this.observer.observe(r),this.elementsCache.set(i,r)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(r,void 0,this))},this.resizeItem=(r,n)=>{var i;const o=this.measurementsCache[r];if(!o)return;const a=this.itemSizeCache.get(o.key)??o.size,s=n-a;s!==0&&(((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,s,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",s),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,n)),this.notify(!1))},this.getVirtualItems=aa(()=>[this.getVirtualIndexes(),this.getMeasurements()],(r,n)=>{const i=[];for(let o=0,a=r.length;o<a;o++){const s=r[o],c=n[s];i.push(c)}return i},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const n=this.getMeasurements();if(n.length!==0)return dC(n[O3(0,n.length-1,i=>dC(n[i]).start,r)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const r=this.scrollElement.document.documentElement;return this.options.horizontal?r.scrollWidth-this.scrollElement.innerWidth:r.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(r,n,i=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),a=this.getScrollOffset();n==="auto"&&(n=r>=a+o?"end":"start"),n==="center"?r+=(i-o)/2:n==="end"&&(r-=o);const s=this.getMaxScrollOffset();return Math.max(Math.min(s,r),0)},this.getOffsetForIndex=(r,n="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const i=this.getSize(),o=this.getScrollOffset(),a=this.measurementsCache[r];if(!a)return;if(n==="auto")if(a.end>=o+i-this.options.scrollPaddingEnd)n="end";else if(a.start<=o+this.options.scrollPaddingStart)n="start";else return[o,n];if(n==="end"&&r===this.options.count-1)return[this.getMaxScrollOffset(),n];const s=n==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,n,a.size),n]},this.scrollToOffset=(r,{align:n="start",behavior:i="auto"}={})=>{const o=this.getOffsetForAlignment(r,n),a=this.now();this.scrollState={index:null,align:n,behavior:i,startedAt:a,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToIndex=(r,{align:n="auto",behavior:i="auto"}={})=>{r=Math.max(0,Math.min(r,this.options.count-1));const o=this.getOffsetForIndex(r,n);if(!o)return;const[a,s]=o,c=this.now();this.scrollState={index:r,align:s,behavior:i,startedAt:c,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollBy=(r,{behavior:n="auto"}={})=>{const i=this.getScrollOffset()+r,o=this.now();this.scrollState={index:null,align:"start",behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var r;const n=this.getMeasurements();let i;if(n.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((r=n[n.length-1])==null?void 0:r.end)??0;else{const o=Array(this.options.lanes).fill(null);let a=n.length-1;for(;a>=0&&o.some(s=>s===null);){const s=n[a];o[s.lane]===null&&(o[s.lane]=s.end),a--}i=Math.max(...o.filter(s=>s!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(r,{adjustments:n,behavior:i})=>{this.options.scrollToFn(r,{behavior:i,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const t=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,r=t?t[0]:this.scrollState.lastTargetOffset,n=1,i=r!==this.scrollState.lastTargetOffset;if(!i&&FG(r,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=n){this.scrollState=null;return}}else this.scrollState.stableFrames=0,i&&(this.scrollState.lastTargetOffset=r,this.scrollState.behavior="auto",this._scrollToOffset(r,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}const O3=(e,t,r,n)=>{for(;e<=t;){const i=(e+t)/2|0,o=r(i);if(o<n)e=i+1;else if(o>n)t=i-1;else return i}return e>0?e-1:0};function XG({measurements:e,outerSize:t,scrollOffset:r,lanes:n}){const i=e.length-1,o=c=>e[c].start;if(e.length<=n)return{startIndex:0,endIndex:i};let a=O3(0,i,o,r),s=a;if(n===1)for(;s<i&&e[s].end<r+t;)s++;else if(n>1){const c=Array(n).fill(0);for(;s<i&&c.some(u=>u<r+t);){const u=e[s];c[u.lane]=u.end,s++}const d=Array(n).fill(r+t);for(;a>=0&&d.some(u=>u>=r);){const u=e[a];d[u.lane]=u.start,a--}a=Math.max(0,a-a%n),s=Math.min(i,s+(n-1-s%n))}return{startIndex:a,endIndex:s}}const vC=typeof document<"u"?nt.useLayoutEffect:nt.useEffect;function ZG({useFlushSync:e=!0,...t}){const r=nt.useReducer(()=>({}),{})[1],n={...t,onChange:(o,a)=>{var s;e&&a?xn.flushSync(r):r(),(s=t.onChange)==null||s.call(t,o,a)}},[i]=nt.useState(()=>new YG(n));return i.setOptions(n),vC(()=>i._didMount(),[]),vC(()=>i._willUpdate()),i}function JG(e){return ZG({observeElementRect:WG,observeElementOffset:UG,scrollToFn:KG,...e})}const C3=C.createContext(null),or=()=>{const e=C.useContext(C3);if(!e)throw new Error("Select compound components must be used within Select.Root");return e},Qt={sm:{trigger:"h-5 min-h-fit",control:"min-h-5 p-0.5 gap-1",input:"text-xs h-3.5",placeholder:"placeholder:text-xs text-xs",singleValue:"text-xs",multiValue:"h-3.5 px-0.5 gap-1 text-xxs",multiValueLabel:"text-xxs",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-xxs",noOptionsMessage:"px-2 py-1 text-xxs",loadingMessage:"px-2 py-1 text-xxs",message:"text-xxs p-1.5",icon:"text-sm"},md:{trigger:"h-6 min-h-fit",control:"min-h-6 p-1 gap-1.5",input:"text-s h-4",placeholder:"placeholder:text-s text-s",singleValue:"text-s",multiValue:"h-4 p-1 gap-1 text-xs",multiValueLabel:"text-xs",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:"py-1",option:"px-2 py-1 text-s",group:"pt-1.5",groupHeading:"px-3 py-1 text-xs",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-sm h-5",placeholder:"placeholder:text-sm text-sm",singleValue:"text-sm",multiValue:"h-5 px-1.5 gap-1.5 text-s",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-s",noOptionsMessage:"px-4 py-2 text-s",loadingMessage:"px-4 py-2 text-s",message:"text-s p-2.5",icon:"text-lg"}},Tt={primary:{control:"cursor-pointer bg-input-bg text-select-text",controlFocused:"border-input-focus-border",controlDisabled:"opacity-60",controlInvalid:"bg-input-bg border-input-error-border text-select-text",placeholder:"placeholder:text-input-placeholder text-input-text 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-input-focus-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:"ring-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-input-bg text-select-text",controlFocused:"border-positive",controlDisabled:"opacity-60",controlInvalid:"bg-input-bg border-input-error-border text-select-text",placeholder:"placeholder:text-input-placeholder text-input-text 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-positive 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-positive-dark",messageBackground:"bg-positive-light",messageBorder:"ring-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-input-bg text-select-text",controlFocused:"border-input-warning-border",controlDisabled:"opacity-60",controlInvalid:"bg-input-bg border-input-error-border text-select-text",placeholder:"placeholder:text-input-placeholder text-input-text 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-input-warning-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-warning-dark",messageBackground:"bg-input-warning-bg",messageBorder:"ring-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-input-bg text-negative",controlFocused:"border-input-error-border",controlDisabled:"opacity-60",controlInvalid:"bg-input-bg border-input-error-border text-negative",placeholder:"placeholder:text-input-placeholder text-input-text placeholder:opacity-60",singleValue:"text-negative",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-input-error-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:"ring-input-error-border",icon:"text-input-text",iconAction:"text-input-text hover:text-body",iconActionHover:"hover:text-body hover:bg-input-option-hover-bg"}},I3=({menuOpen:e,menuPlacement:t,hasMessage:r,fallback:n})=>{if(!e)return n;const i=t==="top";return r?i?"last:rounded-b":"first:rounded-t":i?"rounded-b":"rounded-t"},QG=()=>ye("flex flex-col relative"),eK=({size:e,color:t,isDisabled:r,hasMessage:n,isInvalid:i,isFocused:o,menuPlacement:a})=>{const s=Tt[i?"negative":t],c=I3({menuOpen:!!(o&&a),menuPlacement:a,hasMessage:n,fallback:"only:rounded first:rounded-t last:rounded-b"});return ye("bg-input-bg flex relative transition-all duration-200 ease-in-out items-center",c,s.control,n?["ring-1",s.messageBorder]:["border",r?"border-input-border":o?s.controlFocused:`border-select-border focus-within:${s.controlFocused}`],Qt[e].trigger,{"ring-1":n,[s.controlDisabled]:r})},tK=({size:e,color:t,isDisabled:r,isAction:n})=>{const i=Tt[t];return ye("transition-colors duration-200 rounded max-h-full h-fit px-0.5",Qt[e].icon,e==="sm"?"m-px":"m-0.5",r?"text-muted opacity-60 pointer-events-none":n?i.iconAction:i.icon,{"cursor-pointer p-0.5":n&&!r,[i.iconActionHover]:n&&!r,"pointer-events-none":!n})},rK=({size:e,color:t,isDisabled:r,isFocused:n,isInvalid:i,hasMessage:o,hasGroup:a,menuPlacement:s})=>{const c=Tt[i?"negative":t],d=I3({menuOpen:!!(n&&s),menuPlacement:s,hasMessage:o,fallback:"rounded"});return a?ye("flex items-center justify-between flex-1 min-w-0",Qt[e].control,"bg-transparent border-0",{[c.controlDisabled]:r}):ye("flex items-center justify-between",d,Qt[e].control,c.control,o?["ring-1",c.messageBorder]:["border",r?"border-input-border":n?c.controlFocused:`border-select-border
|
|
22
22
|
focus-within:${c.controlFocused}`],{[c.controlDisabled]:r})},nK=({isMulti:e})=>ye("flex items-center gap-1 flex-1 min-w-0 overflow-hidden",{"flex-wrap":e,"px-0.5":!e}),iK=({size:e,color:t})=>ye("bg-transparent border-0 outline-hidden flex-1 min-w-7.5 text-input-text",Qt[e].input,Tt[t].placeholder),oK=({size:e,color:t})=>ye("select-none truncate",Qt[e].placeholder,Tt[t].placeholder),aK=({size:e,color:t,isDisabled:r})=>ye("truncate",Qt[e].singleValue,r?Tt[t].singleValueDisabled:Tt[t].singleValue),sK=({size:e,color:t,isDisabled:r,isFocused:n})=>ye("inline-flex items-center rounded-xs",Qt[e].multiValue,r?Tt[t].multiValueDisabled:Tt[t].multiValue,{"border border-white":n&&!r}),lK=({size:e})=>ye("truncate",Qt[e].multiValueLabel),cK=({size:e,color:t,isDisabled:r})=>ye("flex items-center justify-center cursor-pointer transition-colors",Qt[e].multiValueRemove,Tt[t].multiValueRemove),R3=({size:e,color:t,isDisabled:r})=>ye("flex items-center justify-center transition-colors rounded",Qt[e].clearIndicator,r?"hidden":[Tt[t].clearIndicator,Tt[t].clearIndicatorHover]),uK=({size:e,color:t,isDisabled:r})=>ye("flex items-center justify-center transition-colors rounded",Qt[e].dropdownIndicator,r?"text-grey-200":[Tt[t].dropdownIndicator,Tt[t].dropdownIndicatorHover]),dK=({size:e,placement:t,hasMessage:r,color:n,hasGroup:i})=>{const o=t==="top";return ye("absolute z-50 overflow-hidden border",i?"-left-px -right-px":"w-full",Tt[n].menu,{[Tt[n].messageBorder]:r},o?"bottom-full rounded-t rounded-b-none border-b-0":"top-full rounded-b border-t-0",Qt[e].menu)},fK=({size:e})=>ye("overflow-y-auto",Qt[e].menuList,Tt.primary.menuList),hK=({size:e,color:t,isDisabled:r,isFocused:n,isSelected:i})=>ye("transition-colors duration-150 cursor-pointer mx-1 rounded flex items-center gap-2 min-w-fit",Qt[e].option,{[Tt[t].optionDisabled]:r,[Tt[t].optionSelected]:i&&!r,[Tt[t].optionFocused]:n&&!i&&!r,[Tt[t].option]:!i&&!n&&!r}),pK=({size:e})=>ye(Qt[e].group),vK=({size:e,color:t})=>ye(Qt[e].groupHeading,Tt[t].groupHeading),gK=({size:e})=>ye("text-grey-100",Qt[e].loadingMessage),mK=({size:e})=>ye(Qt[e].noOptionsMessage,Tt.primary.noOptionsMessage),Nw=e=>{const t=e[0];return e.length>0&&typeof t=="object"&&t!==null&&"options"in t&&Array.isArray(t.options)},bK=e=>Nw(e)?e.reduce((t,r)=>[...t,...r.options],[]):e;function Ir(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 je(){return je=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},je.apply(null,arguments)}function Tw(e,t){return Tw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Tw(e,t)}function yK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Tw(e,t)}var $c={exports:{}},Bh={exports:{}},ut={};/** @license React v16.13.1
|
|
23
23
|
* react-is.production.min.js
|
|
24
24
|
*
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
*
|
|
27
27
|
* This source code is licensed under the MIT license found in the
|
|
28
28
|
* LICENSE file in the root directory of this source tree.
|
|
29
|
-
*/var gC;function xK(){if(gC)return ut;gC=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,
|
|
29
|
+
*/var gC;function xK(){if(gC)return ut;gC=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function _(E){if(typeof E=="object"&&E!==null){var I=E.$$typeof;switch(I){case t:switch(E=E.type,E){case c:case d:case n:case o:case i:case h:return E;default:switch(E=E&&E.$$typeof,E){case s:case u:case y:case v:case a:return E;default:return I}}case r:return I}}}function S(E){return _(E)===d}return ut.AsyncMode=c,ut.ConcurrentMode=d,ut.ContextConsumer=s,ut.ContextProvider=a,ut.Element=t,ut.ForwardRef=u,ut.Fragment=n,ut.Lazy=y,ut.Memo=v,ut.Portal=r,ut.Profiler=o,ut.StrictMode=i,ut.Suspense=h,ut.isAsyncMode=function(E){return S(E)||_(E)===c},ut.isConcurrentMode=S,ut.isContextConsumer=function(E){return _(E)===s},ut.isContextProvider=function(E){return _(E)===a},ut.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},ut.isForwardRef=function(E){return _(E)===u},ut.isFragment=function(E){return _(E)===n},ut.isLazy=function(E){return _(E)===y},ut.isMemo=function(E){return _(E)===v},ut.isPortal=function(E){return _(E)===r},ut.isProfiler=function(E){return _(E)===o},ut.isStrictMode=function(E){return _(E)===i},ut.isSuspense=function(E){return _(E)===h},ut.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===n||E===d||E===o||E===i||E===h||E===p||typeof E=="object"&&E!==null&&(E.$$typeof===y||E.$$typeof===v||E.$$typeof===a||E.$$typeof===s||E.$$typeof===u||E.$$typeof===g||E.$$typeof===w||E.$$typeof===x||E.$$typeof===m)},ut.typeOf=_,ut}var pt={};/** @license React v16.13.1
|
|
30
30
|
* react-is.development.js
|
|
31
31
|
*
|
|
32
32
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the MIT license found in the
|
|
35
35
|
* LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/var mC;function wK(){return mC||(mC=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,
|
|
36
|
+
*/var mC;function wK(){return mC||(mC=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function _(Z){return typeof Z=="string"||typeof Z=="function"||Z===n||Z===d||Z===o||Z===i||Z===h||Z===p||typeof Z=="object"&&Z!==null&&(Z.$$typeof===y||Z.$$typeof===v||Z.$$typeof===a||Z.$$typeof===s||Z.$$typeof===u||Z.$$typeof===g||Z.$$typeof===w||Z.$$typeof===x||Z.$$typeof===m)}function S(Z){if(typeof Z=="object"&&Z!==null){var J=Z.$$typeof;switch(J){case t:var ae=Z.type;switch(ae){case c:case d:case n:case o:case i:case h:return ae;default:var he=ae&&ae.$$typeof;switch(he){case s:case u:case y:case v:case a:return he;default:return J}}case r:return J}}}var E=c,I=d,N=s,T=a,M=t,z=u,j=n,W=y,U=v,A=r,K=o,V=i,te=h,G=!1;function re(Z){return G||(G=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),P(Z)||S(Z)===c}function P(Z){return S(Z)===d}function B(Z){return S(Z)===s}function X(Z){return S(Z)===a}function Q(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t}function D(Z){return S(Z)===u}function $(Z){return S(Z)===n}function H(Z){return S(Z)===y}function q(Z){return S(Z)===v}function Y(Z){return S(Z)===r}function ie(Z){return S(Z)===o}function ne(Z){return S(Z)===i}function ve(Z){return S(Z)===h}pt.AsyncMode=E,pt.ConcurrentMode=I,pt.ContextConsumer=N,pt.ContextProvider=T,pt.Element=M,pt.ForwardRef=z,pt.Fragment=j,pt.Lazy=W,pt.Memo=U,pt.Portal=A,pt.Profiler=K,pt.StrictMode=V,pt.Suspense=te,pt.isAsyncMode=re,pt.isConcurrentMode=P,pt.isContextConsumer=B,pt.isContextProvider=X,pt.isElement=Q,pt.isForwardRef=D,pt.isFragment=$,pt.isLazy=H,pt.isMemo=q,pt.isPortal=Y,pt.isProfiler=ie,pt.isStrictMode=ne,pt.isSuspense=ve,pt.isValidElementType=_,pt.typeOf=S})()),pt}var bC;function N3(){return bC||(bC=1,process.env.NODE_ENV==="production"?Bh.exports=xK():Bh.exports=wK()),Bh.exports}/*
|
|
37
37
|
object-assign
|
|
38
38
|
(c) Sindre Sorhus
|
|
39
39
|
@license MIT
|
|
40
|
-
*/var Fh,yC;function SK(){if(yC)return Fh;yC=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(a).map(function(
|
|
41
|
-
Valid keys: `+JSON.stringify(Object.keys(P),null," "));var Z=ve(q,ne,D,$,H+"."+ne,r);if(Z)return Z}return null}return g(B)}function A(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every(A);if(P===null||s(P))return!0;var B=h(P);if(B){var X=B.call(P),Q;if(B!==P.entries){for(;!(Q=X.next()).done;)if(!A(Q.value))return!1}else for(;!(Q=X.next()).done;){var D=Q.value;if(D&&!A(D[1]))return!1}}else return!1;return!0;default:return!1}}function K(P,B){return P==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function V(P){var B=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":K(B,P)?"symbol":B}function te(P){if(typeof P>"u"||P===null)return""+P;var B=V(P);if(B==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return B}function G(P){var B=te(P);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function re(P){return!P.constructor||!P.constructor.name?p:P.constructor.name}return v.checkPropTypes=i,v.resetWarningCache=i.resetWarningCache,v.PropTypes=v,v},Hh}var Wh,OC;function OK(){if(OC)return Wh;OC=1;var e=x1();function t(){}function r(){}return r.resetWarningCache=t,Wh=function(){function n(a,s,c,u,
|
|
40
|
+
*/var Fh,yC;function SK(){if(yC)return Fh;yC=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(c.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(u){d[u]=u}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Fh=i()?Object.assign:function(o,a){for(var s,c=n(o),d,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var h in s)t.call(s,h)&&(c[h]=s[h]);if(e){d=e(s);for(var p=0;p<d.length;p++)r.call(s,d[p])&&(c[d[p]]=s[d[p]])}}return c},Fh}var $h,xC;function x1(){if(xC)return $h;xC=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return $h=e,$h}var wC,SC;function T3(){return SC||(SC=1,wC=Function.call.bind(Object.prototype.hasOwnProperty)),wC}var Vh,EC;function EK(){if(EC)return Vh;EC=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=x1(),r={},n=T3();e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,s,c,d){if(process.env.NODE_ENV!=="production"){for(var u in o)if(n(o,u)){var h;try{if(typeof o[u]!="function"){var p=Error((c||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}h=o[u](a,u,c,s,null,t)}catch(y){h=y}if(h&&!(h instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in r)){r[h.message]=!0;var v=d?d():"";e("Failed "+s+" type: "+h.message+(v??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Vh=i,Vh}var Hh,_C;function _K(){if(_C)return Hh;_C=1;var e=N3(),t=SK(),r=x1(),n=T3(),i=EK(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return Hh=function(s,c){var d=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function h(P){var B=P&&(d&&P[d]||P[u]);if(typeof B=="function")return B}var p="<<anonymous>>",v={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:x(),arrayOf:_,element:S(),elementType:E(),instanceOf:I,node:z(),objectOf:T,oneOf:N,oneOfType:M,shape:W,exact:U};function y(P,B){return P===B?P!==0||1/P===1/B:P!==P&&B!==B}function m(P,B){this.message=P,this.data=B&&typeof B=="object"?B:{},this.stack=""}m.prototype=Error.prototype;function g(P){if(process.env.NODE_ENV!=="production")var B={},X=0;function Q($,H,q,Y,ie,ne,ve){if(Y=Y||p,ne=ne||q,ve!==r){if(c){var Z=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Z.name="Invariant Violation",Z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var J=Y+":"+q;!B[J]&&X<3&&(o("You are manually calling a React.PropTypes validation function for the `"+ne+"` prop on `"+Y+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),B[J]=!0,X++)}}return H[q]==null?$?H[q]===null?new m("The "+ie+" `"+ne+"` is marked as required "+("in `"+Y+"`, but its value is `null`.")):new m("The "+ie+" `"+ne+"` is marked as required in "+("`"+Y+"`, but its value is `undefined`.")):null:P(H,q,Y,ie,ne)}var D=Q.bind(null,!1);return D.isRequired=Q.bind(null,!0),D}function w(P){function B(X,Q,D,$,H,q){var Y=X[Q],ie=V(Y);if(ie!==P){var ne=te(Y);return new m("Invalid "+$+" `"+H+"` of type "+("`"+ne+"` supplied to `"+D+"`, expected ")+("`"+P+"`."),{expectedType:P})}return null}return g(B)}function x(){return g(a)}function _(P){function B(X,Q,D,$,H){if(typeof P!="function")return new m("Property `"+H+"` of component `"+D+"` has invalid PropType notation inside arrayOf.");var q=X[Q];if(!Array.isArray(q)){var Y=V(q);return new m("Invalid "+$+" `"+H+"` of type "+("`"+Y+"` supplied to `"+D+"`, expected an array."))}for(var ie=0;ie<q.length;ie++){var ne=P(q,ie,D,$,H+"["+ie+"]",r);if(ne instanceof Error)return ne}return null}return g(B)}function S(){function P(B,X,Q,D,$){var H=B[X];if(!s(H)){var q=V(H);return new m("Invalid "+D+" `"+$+"` of type "+("`"+q+"` supplied to `"+Q+"`, expected a single ReactElement."))}return null}return g(P)}function E(){function P(B,X,Q,D,$){var H=B[X];if(!e.isValidElementType(H)){var q=V(H);return new m("Invalid "+D+" `"+$+"` of type "+("`"+q+"` supplied to `"+Q+"`, expected a single ReactElement type."))}return null}return g(P)}function I(P){function B(X,Q,D,$,H){if(!(X[Q]instanceof P)){var q=P.name||p,Y=re(X[Q]);return new m("Invalid "+$+" `"+H+"` of type "+("`"+Y+"` supplied to `"+D+"`, expected ")+("instance of `"+q+"`."))}return null}return g(B)}function N(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function B(X,Q,D,$,H){for(var q=X[Q],Y=0;Y<P.length;Y++)if(y(q,P[Y]))return null;var ie=JSON.stringify(P,function(ne,ve){var Z=te(ve);return Z==="symbol"?String(ve):ve});return new m("Invalid "+$+" `"+H+"` of value `"+String(q)+"` "+("supplied to `"+D+"`, expected one of "+ie+"."))}return g(B)}function T(P){function B(X,Q,D,$,H){if(typeof P!="function")return new m("Property `"+H+"` of component `"+D+"` has invalid PropType notation inside objectOf.");var q=X[Q],Y=V(q);if(Y!=="object")return new m("Invalid "+$+" `"+H+"` of type "+("`"+Y+"` supplied to `"+D+"`, expected an object."));for(var ie in q)if(n(q,ie)){var ne=P(q,ie,D,$,H+"."+ie,r);if(ne instanceof Error)return ne}return null}return g(B)}function M(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<P.length;B++){var X=P[B];if(typeof X!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G(X)+" at index "+B+"."),a}function Q(D,$,H,q,Y){for(var ie=[],ne=0;ne<P.length;ne++){var ve=P[ne],Z=ve(D,$,H,q,Y,r);if(Z==null)return null;Z.data&&n(Z.data,"expectedType")&&ie.push(Z.data.expectedType)}var J=ie.length>0?", expected one of type ["+ie.join(", ")+"]":"";return new m("Invalid "+q+" `"+Y+"` supplied to "+("`"+H+"`"+J+"."))}return g(Q)}function z(){function P(B,X,Q,D,$){return A(B[X])?null:new m("Invalid "+D+" `"+$+"` supplied to "+("`"+Q+"`, expected a ReactNode."))}return g(P)}function j(P,B,X,Q,D){return new m((P||"React class")+": "+B+" type `"+X+"."+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+D+"`.")}function W(P){function B(X,Q,D,$,H){var q=X[Q],Y=V(q);if(Y!=="object")return new m("Invalid "+$+" `"+H+"` of type `"+Y+"` "+("supplied to `"+D+"`, expected `object`."));for(var ie in P){var ne=P[ie];if(typeof ne!="function")return j(D,$,H,ie,te(ne));var ve=ne(q,ie,D,$,H+"."+ie,r);if(ve)return ve}return null}return g(B)}function U(P){function B(X,Q,D,$,H){var q=X[Q],Y=V(q);if(Y!=="object")return new m("Invalid "+$+" `"+H+"` of type `"+Y+"` "+("supplied to `"+D+"`, expected `object`."));var ie=t({},X[Q],P);for(var ne in ie){var ve=P[ne];if(n(P,ne)&&typeof ve!="function")return j(D,$,H,ne,te(ve));if(!ve)return new m("Invalid "+$+" `"+H+"` key `"+ne+"` supplied to `"+D+"`.\nBad object: "+JSON.stringify(X[Q],null," ")+`
|
|
41
|
+
Valid keys: `+JSON.stringify(Object.keys(P),null," "));var Z=ve(q,ne,D,$,H+"."+ne,r);if(Z)return Z}return null}return g(B)}function A(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every(A);if(P===null||s(P))return!0;var B=h(P);if(B){var X=B.call(P),Q;if(B!==P.entries){for(;!(Q=X.next()).done;)if(!A(Q.value))return!1}else for(;!(Q=X.next()).done;){var D=Q.value;if(D&&!A(D[1]))return!1}}else return!1;return!0;default:return!1}}function K(P,B){return P==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function V(P){var B=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":K(B,P)?"symbol":B}function te(P){if(typeof P>"u"||P===null)return""+P;var B=V(P);if(B==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return B}function G(P){var B=te(P);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function re(P){return!P.constructor||!P.constructor.name?p:P.constructor.name}return v.checkPropTypes=i,v.resetWarningCache=i.resetWarningCache,v.PropTypes=v,v},Hh}var Wh,OC;function OK(){if(OC)return Wh;OC=1;var e=x1();function t(){}function r(){}return r.resetWarningCache=t,Wh=function(){function n(a,s,c,d,u,h){if(h!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}n.isRequired=n;function i(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return o.PropTypes=o,o},Wh}var CC;function CK(){if(CC)return $c.exports;if(CC=1,process.env.NODE_ENV!=="production"){var e=N3(),t=!0;$c.exports=_K()(e.isElement,t)}else $c.exports=OK()();return $c.exports}var IK=CK();const Se=Rj(IK);var Uh={exports:{}},dt={};/**
|
|
42
42
|
* @license React
|
|
43
43
|
* react-is.production.min.js
|
|
44
44
|
*
|
|
@@ -46,7 +46,7 @@ Valid keys: `+JSON.stringify(Object.keys(P),null," "));var Z=ve(q,ne,D,$,H+"."+
|
|
|
46
46
|
*
|
|
47
47
|
* This source code is licensed under the MIT license found in the
|
|
48
48
|
* LICENSE file in the root directory of this source tree.
|
|
49
|
-
*/var IC;function RK(){if(IC)return dt;IC=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),
|
|
49
|
+
*/var IC;function RK(){if(IC)return dt;IC=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function m(g){if(typeof g=="object"&&g!==null){var w=g.$$typeof;switch(w){case e:switch(g=g.type,g){case r:case i:case n:case d:case u:return g;default:switch(g=g&&g.$$typeof,g){case s:case a:case c:case p:case h:case o:return g;default:return w}}case t:return w}}}return dt.ContextConsumer=a,dt.ContextProvider=o,dt.Element=e,dt.ForwardRef=c,dt.Fragment=r,dt.Lazy=p,dt.Memo=h,dt.Portal=t,dt.Profiler=i,dt.StrictMode=n,dt.Suspense=d,dt.SuspenseList=u,dt.isAsyncMode=function(){return!1},dt.isConcurrentMode=function(){return!1},dt.isContextConsumer=function(g){return m(g)===a},dt.isContextProvider=function(g){return m(g)===o},dt.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},dt.isForwardRef=function(g){return m(g)===c},dt.isFragment=function(g){return m(g)===r},dt.isLazy=function(g){return m(g)===p},dt.isMemo=function(g){return m(g)===h},dt.isPortal=function(g){return m(g)===t},dt.isProfiler=function(g){return m(g)===i},dt.isStrictMode=function(g){return m(g)===n},dt.isSuspense=function(g){return m(g)===d},dt.isSuspenseList=function(g){return m(g)===u},dt.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===r||g===i||g===n||g===d||g===u||g===v||typeof g=="object"&&g!==null&&(g.$$typeof===p||g.$$typeof===h||g.$$typeof===o||g.$$typeof===a||g.$$typeof===c||g.$$typeof===y||g.getModuleId!==void 0)},dt.typeOf=m,dt}var vt={};/**
|
|
50
50
|
* @license React
|
|
51
51
|
* react-is.development.js
|
|
52
52
|
*
|
|
@@ -54,9 +54,9 @@ Valid keys: `+JSON.stringify(Object.keys(P),null," "));var Z=ve(q,ne,D,$,H+"."+
|
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the MIT license found in the
|
|
56
56
|
* LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/var RC;function NK(){return RC||(RC=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"),i=Symbol.for("react.profiler"),o=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"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),y=!1,m=!1,g=!1,w=!1,x=!1,_;_=Symbol.for("react.module.reference");function S(ae){return!!(typeof ae=="string"||typeof ae=="function"||ae===r||ae===i||x||ae===n||ae===u||ae===d||w||ae===v||y||m||g||typeof ae=="object"&&ae!==null&&(ae.$$typeof===p||ae.$$typeof===h||ae.$$typeof===o||ae.$$typeof===a||ae.$$typeof===c||ae.$$typeof===_||ae.getModuleId!==void 0))}function E(ae){if(typeof ae=="object"&&ae!==null){var he=ae.$$typeof;switch(he){case e:var ue=ae.type;switch(ue){case r:case i:case n:case u:case d:return ue;default:var de=ue&&ue.$$typeof;switch(de){case s:case a:case c:case p:case h:case o:return de;default:return he}}case t:return he}}}var I=a,N=o,T=e,M=c,z=r,j=p,W=h,U=t,A=i,K=n,V=u,te=d,G=!1,re=!1;function P(ae){return G||(G=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function B(ae){return re||(re=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function X(ae){return E(ae)===a}function Q(ae){return E(ae)===o}function D(ae){return typeof ae=="object"&&ae!==null&&ae.$$typeof===e}function $(ae){return E(ae)===c}function H(ae){return E(ae)===r}function q(ae){return E(ae)===p}function Y(ae){return E(ae)===h}function ie(ae){return E(ae)===t}function ne(ae){return E(ae)===i}function ve(ae){return E(ae)===n}function Z(ae){return E(ae)===u}function J(ae){return E(ae)===d}vt.ContextConsumer=I,vt.ContextProvider=N,vt.Element=T,vt.ForwardRef=M,vt.Fragment=z,vt.Lazy=j,vt.Memo=W,vt.Portal=U,vt.Profiler=A,vt.StrictMode=K,vt.Suspense=V,vt.SuspenseList=te,vt.isAsyncMode=P,vt.isConcurrentMode=B,vt.isContextConsumer=X,vt.isContextProvider=Q,vt.isElement=D,vt.isForwardRef=$,vt.isFragment=H,vt.isLazy=q,vt.isMemo=Y,vt.isPortal=ie,vt.isProfiler=ne,vt.isStrictMode=ve,vt.isSuspense=Z,vt.isSuspenseList=J,vt.isValidElementType=S,vt.typeOf=E})()),vt}var NC;function TK(){return NC||(NC=1,process.env.NODE_ENV==="production"?Uh.exports=RK():Uh.exports=NK()),Uh.exports}var TC=TK();const PC=e=>typeof e=="object"&&e!=null&&e.nodeType===1,MC=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",Vc=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return MC(r.overflowY,t)||MC(r.overflowX,t)||(n=>{const i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!i&&(i.clientHeight<n.scrollHeight||i.clientWidth<n.scrollWidth)})(e)}return!1},Hc=(e,t,r,n,i,o,a,s)=>o<e&&a>t||o>e&&a<t?0:o<=e&&s<=r||a>=t&&s>=r?o-e-n:a>t&&s<r||o<e&&s>r?a-t+i:0,PK=e=>e.parentElement??(e.getRootNode().host||null),MK=(e,t)=>{var r,n,i,o;if(typeof document>"u")return[];const{inline:a,boundary:s,skipOverflowHiddenElements:c}=t,u=typeof s=="function"?s:U=>U!==s;if(!PC(e))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,h=[];let p=e;for(;PC(p)&&u(p);){if(p=PK(p),p===d){h.push(p);break}p!=null&&p===document.body&&Vc(p)&&!Vc(document.documentElement)||p!=null&&Vc(p,c)&&h.push(p)}const v=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,y=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,{scrollX:m,scrollY:g}=window,{height:w,width:x,top:_,right:S,bottom:E,left:I}=e.getBoundingClientRect(),{top:N,right:T,left:M}=(U=>{const A=window.getComputedStyle(U);return{top:parseFloat(A.scrollMarginTop)||0,right:parseFloat(A.scrollMarginRight)||0,bottom:parseFloat(A.scrollMarginBottom)||0,left:parseFloat(A.scrollMarginLeft)||0}})(e);let z=_-N,j=a==="center"?I+x/2-M+T:a==="end"?S+T:I-M;const W=[];for(let U=0;U<h.length;U++){const A=h[U],{height:K,width:V,top:te,right:G,bottom:re,left:P}=A.getBoundingClientRect();if(_>=0&&I>=0&&E<=y&&S<=v&&(A===d&&!Vc(A)||_>=te&&E<=re&&I>=P&&S<=G))return W;const B=getComputedStyle(A),X=parseInt(B.borderLeftWidth,10),Q=parseInt(B.borderTopWidth,10),D=parseInt(B.borderRightWidth,10),$=parseInt(B.borderBottomWidth,10);let H=0,q=0;const Y="offsetWidth"in A?A.offsetWidth-A.clientWidth-X-D:0,ie="offsetHeight"in A?A.offsetHeight-A.clientHeight-Q-$:0,ne="offsetWidth"in A?A.offsetWidth===0?0:V/A.offsetWidth:0,ve="offsetHeight"in A?A.offsetHeight===0?0:K/A.offsetHeight:0;if(d===A)H=Hc(g,g+y,y,Q,$,g+z,g+z+w,w),q=a==="start"?j:a==="center"?j-v/2:a==="end"?j-v:Hc(m,m+v,v,X,D,m+j,m+j+x,x),H=Math.max(0,H+g),q=Math.max(0,q+m);else{H=Hc(te,re,K,Q,$+ie,z,z+w,w),q=a==="start"?j-P-X:a==="center"?j-(P+V/2)+Y/2:a==="end"?j-G+D+Y:Hc(P,G,V,X,D+Y,j,j+x,x);const{scrollLeft:Z,scrollTop:J}=A;H=ve===0?0:Math.max(0,Math.min(J+H/ve,A.scrollHeight-K/ve+ie)),q=ne===0?0:Math.max(0,Math.min(Z+q/ne,A.scrollWidth-V/ne+Y)),z+=J-H,j+=Z-q}W.push({el:A,top:H,left:q})}return W};var Ia=function(){return Ia=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ia.apply(this,arguments)},kK=0;function kC(e){return typeof e=="function"?e:Cr}function Cr(){}function P3(e,t){if(e){var r=MK(e,{boundary:t});r.forEach(function(n){var i=n.el,o=n.top,a=n.left;i.scrollTop=o,i.scrollLeft=a})}}function AC(e,t,r){var n=e===t||t instanceof r.Node&&e.contains&&e.contains(t);return n}function wd(e,t){var r;function n(){r&&clearTimeout(r)}function i(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];n(),r=setTimeout(function(){r=null,e.apply(void 0,a)},t)}return i.cancel=n,i}function st(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return t.some(function(s){return s&&s.apply(void 0,[n].concat(o)),n.preventDownshiftDefault||n.hasOwnProperty("nativeEvent")&&n.nativeEvent.preventDownshiftDefault})}}function zn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){t.forEach(function(i){typeof i=="function"?i(n):i&&(i.current=n)})}}function M3(){return String(kK++)}function AK(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 DC(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function k3(e){return typeof e.type=="string"}function A3(e){return e.props}function DK(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var jK=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function Wc(e){e===void 0&&(e={});var t={};return jK.forEach(function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}function ul(e,t){return!e||!t?e:Object.keys(e).reduce(function(r,n){return r[n]=$u(t,n)?t[n]:e[n],r},{})}function $u(e,t){return e[t]!==void 0}function Ra(e){var t=e.key,r=e.keyCode;return r>=37&&r<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function qK(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ln(e,t,r,n,i){i===void 0&&(i=!1);var o=r.length;if(o===0)return-1;var a=o-1;(typeof e!="number"||e<0||e>a)&&(e=t>0?-1:a+1);var s=e+t;s<0?s=i?a:0:s>a&&(s=i?0:a);var c=Ji(s,t<0,r,n,i);return c===-1?e>=o?-1:e:c}function Ji(e,t,r,n,i){i===void 0&&(i=!1);var o=r.length;if(t){for(var a=e;a>=0;a--)if(!n(r[a],a))return a}else for(var s=e;s<o;s++)if(!n(r[s],s))return s;return i?Ji(t?o-1:0,t,r,n):-1}function Vu(e,t,r,n){return n===void 0&&(n=!0),r&&t.some(function(i){return i&&(AC(i,e,r)||n&&AC(i,r.document.activeElement,r))})}var w1=Cr;process.env.NODE_ENV!=="production"&&(w1=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(i){t[i]!==void 0&&r[i]===void 0?console.error('downshift: A component has changed the controlled prop "'+i+'" to be uncontrolled. '+n):t[i]===void 0&&r[i]!==void 0&&console.error('downshift: A component has changed the uncontrolled prop "'+i+'" to be controlled. '+n)})});var zK=wd(function(e){D3(e).textContent=""},500);function D3(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 j3(e,t){if(!(!e||!t)){var r=D3(t);r.textContent=e,zK(t)}}function LK(e){var t=e==null?void 0:e.getElementById("a11y-status-message");t&&t.remove()}var q3=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,z3=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,L3=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,gu=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,mu=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,B3=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,F3=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,$3=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,V3=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,H3=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,W3=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,U3=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,G3=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,Pw=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,K3=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,Y3=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,X3=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,BK=Object.freeze({__proto__:null,blurButton:K3,blurInput:W3,changeInput:U3,clickButton:Pw,clickItem:H3,controlledPropUpdatedSelectedItem:Y3,itemMouseEnter:L3,keyDownArrowDown:mu,keyDownArrowUp:gu,keyDownEnd:V3,keyDownEnter:F3,keyDownEscape:B3,keyDownHome:$3,keyDownSpaceButton:G3,mouseUp:z3,touchEnd:X3,unknown:q3}),FK=["refKey","ref"],$K=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],VK=["onKeyDown","onBlur","onChange","onInput","onChangeText"],HK=["refKey","ref"],WK=["onMouseMove","onMouseDown","onClick","onPress","index","item"],UK=(function(){var e=(function(t){function r(i){var o;o=t.call(this,i)||this,o.id=o.props.id||"downshift-"+M3(),o.menuId=o.props.menuId||o.id+"-menu",o.labelId=o.props.labelId||o.id+"-label",o.inputId=o.props.inputId||o.id+"-input",o.getItemId=o.props.getItemId||function(x){return o.id+"-item-"+x},o.items=[],o.itemCount=null,o.previousResultCount=0,o.timeoutIds=[],o.internalSetTimeout=function(x,_){var S=setTimeout(function(){o.timeoutIds=o.timeoutIds.filter(function(E){return E!==S}),x()},_);o.timeoutIds.push(S)},o.setItemCount=function(x){o.itemCount=x},o.unsetItemCount=function(){o.itemCount=null},o.isItemDisabled=function(x,_){var S=o.getItemNodeFromIndex(_);return S&&S.hasAttribute("disabled")},o.setHighlightedIndex=function(x,_){x===void 0&&(x=o.props.defaultHighlightedIndex),_===void 0&&(_={}),_=Wc(_),o.internalSetState(je({highlightedIndex:x},_))},o.clearSelection=function(x){o.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:o.props.defaultHighlightedIndex,isOpen:o.props.defaultIsOpen},x)},o.selectItem=function(x,_,S){_=Wc(_),o.internalSetState(je({isOpen:o.props.defaultIsOpen,highlightedIndex:o.props.defaultHighlightedIndex,selectedItem:x,inputValue:o.props.itemToString(x)},_),S)},o.selectItemAtIndex=function(x,_,S){var E=o.items[x];E!=null&&o.selectItem(E,_,S)},o.selectHighlightedItem=function(x,_){return o.selectItemAtIndex(o.getState().highlightedIndex,x,_)},o.internalSetState=function(x,_){var S,E,I={},N=typeof x=="function";return!N&&x.hasOwnProperty("inputValue")&&o.props.onInputValueChange(x.inputValue,je({},o.getStateAndHelpers(),x)),o.setState(function(T){var M;T=o.getState(T);var z=N?x(T):x;z=o.props.stateReducer(T,z),S=z.hasOwnProperty("selectedItem");var j={};return S&&z.selectedItem!==T.selectedItem&&(E=z.selectedItem),(M=z).type||(M.type=q3),Object.keys(z).forEach(function(W){T[W]!==z[W]&&(I[W]=z[W]),W!=="type"&&(z[W],$u(o.props,W)||(j[W]=z[W]))}),N&&z.hasOwnProperty("inputValue")&&o.props.onInputValueChange(z.inputValue,je({},o.getStateAndHelpers(),z)),j},function(){kC(_)();var T=Object.keys(I).length>1;T&&o.props.onStateChange(I,o.getStateAndHelpers()),S&&o.props.onSelect(x.selectedItem,o.getStateAndHelpers()),E!==void 0&&o.props.onChange(E,o.getStateAndHelpers()),o.props.onUserAction(I,o.getStateAndHelpers())})},o.rootRef=function(x){return o._rootNode=x},o.getRootProps=function(x,_){var S,E=x===void 0?{}:x,I=E.refKey,N=I===void 0?"ref":I,T=E.ref,M=Ir(E,FK),z=_===void 0?{}:_,j=z.suppressRefError,W=j===void 0?!1:j;o.getRootProps.called=!0,o.getRootProps.refKey=N,o.getRootProps.suppressRefError=W;var U=o.getState(),A=U.isOpen;return je((S={},S[N]=zn(T,o.rootRef),S.role="combobox",S["aria-expanded"]=A,S["aria-haspopup"]="listbox",S["aria-owns"]=A?o.menuId:void 0,S["aria-labelledby"]=o.labelId,S),M)},o.keyDownHandlers={ArrowDown:function(x){var _=this;if(x.preventDefault(),this.getState().isOpen){var S=x.shiftKey?5:1;this.moveHighlightedIndex(S,{type:mu})}else this.internalSetState({isOpen:!0,type:mu},function(){var E=_.getItemCount();if(E>0){var I=_.getState(),N=I.highlightedIndex,T=Ln(N,1,{length:E},_.isItemDisabled,!0);_.setHighlightedIndex(T,{type:mu})}})},ArrowUp:function(x){var _=this;if(x.preventDefault(),this.getState().isOpen){var S=x.shiftKey?-5:-1;this.moveHighlightedIndex(S,{type:gu})}else this.internalSetState({isOpen:!0,type:gu},function(){var E=_.getItemCount();if(E>0){var I=_.getState(),N=I.highlightedIndex,T=Ln(N,-1,{length:E},_.isItemDisabled,!0);_.setHighlightedIndex(T,{type:gu})}})},Enter:function(x){if(x.which!==229){var _=this.getState(),S=_.isOpen,E=_.highlightedIndex;if(S&&E!=null){x.preventDefault();var I=this.items[E],N=this.getItemNodeFromIndex(E);if(I==null||N&&N.hasAttribute("disabled"))return;this.selectHighlightedItem({type:F3})}}},Escape:function(x){x.preventDefault(),this.reset(je({type:B3},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},o.buttonKeyDownHandlers=je({},o.keyDownHandlers,{" ":function(x){x.preventDefault(),this.toggleMenu({type:G3})}}),o.inputKeyDownHandlers=je({},o.keyDownHandlers,{Home:function(x){var _=this.getState(),S=_.isOpen;if(S){x.preventDefault();var E=this.getItemCount();if(!(E<=0||!S)){var I=Ji(0,!1,{length:E},this.isItemDisabled);this.setHighlightedIndex(I,{type:$3})}}},End:function(x){var _=this.getState(),S=_.isOpen;if(S){x.preventDefault();var E=this.getItemCount();if(!(E<=0||!S)){var I=Ji(E-1,!0,{length:E},this.isItemDisabled);this.setHighlightedIndex(I,{type:V3})}}}}),o.getToggleButtonProps=function(x){var _=x===void 0?{}:x,S=_.onClick;_.onPress;var E=_.onKeyDown,I=_.onKeyUp,N=_.onBlur,T=Ir(_,$K),M=o.getState(),z=M.isOpen,j={onClick:st(S,o.buttonHandleClick),onKeyDown:st(E,o.buttonHandleKeyDown),onKeyUp:st(I,o.buttonHandleKeyUp),onBlur:st(N,o.buttonHandleBlur)},W=T.disabled?{}:j;return je({type:"button",role:"button","aria-label":z?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},W,T)},o.buttonHandleKeyUp=function(x){x.preventDefault()},o.buttonHandleKeyDown=function(x){var _=Ra(x);o.buttonKeyDownHandlers[_]&&o.buttonKeyDownHandlers[_].call(o,x)},o.buttonHandleClick=function(x){if(x.preventDefault(),o.props.environment){var _=o.props.environment.document,S=_.body,E=_.activeElement;S&&S===E&&x.target.focus()}process.env.NODE_ENV==="test"?o.toggleMenu({type:Pw}):o.internalSetTimeout(function(){return o.toggleMenu({type:Pw})})},o.buttonHandleBlur=function(x){var _=x.target;o.internalSetTimeout(function(){if(!(o.isMouseDown||!o.props.environment)){var S=o.props.environment.document.activeElement;(S==null||S.id!==o.inputId)&&S!==_&&o.reset({type:K3})}})},o.getLabelProps=function(x){return je({htmlFor:o.inputId,id:o.labelId},x)},o.getInputProps=function(x){var _=x===void 0?{}:x,S=_.onKeyDown,E=_.onBlur,I=_.onChange,N=_.onInput;_.onChangeText;var T=Ir(_,VK),M,z={};M="onChange";var j=o.getState(),W=j.inputValue,U=j.isOpen,A=j.highlightedIndex;if(!T.disabled){var K;z=(K={},K[M]=st(I,N,o.inputHandleChange),K.onKeyDown=st(S,o.inputHandleKeyDown),K.onBlur=st(E,o.inputHandleBlur),K)}return je({"aria-autocomplete":"list","aria-activedescendant":U&&typeof A=="number"&&A>=0?o.getItemId(A):void 0,"aria-controls":U?o.menuId:void 0,"aria-labelledby":T&&T["aria-label"]?void 0:o.labelId,autoComplete:"off",value:W,id:o.inputId},z,T)},o.inputHandleKeyDown=function(x){var _=Ra(x);_&&o.inputKeyDownHandlers[_]&&o.inputKeyDownHandlers[_].call(o,x)},o.inputHandleChange=function(x){o.internalSetState({type:U3,isOpen:!0,inputValue:x.target.value,highlightedIndex:o.props.defaultHighlightedIndex})},o.inputHandleBlur=function(){o.internalSetTimeout(function(){var x;if(!(o.isMouseDown||!o.props.environment)){var _=o.props.environment.document.activeElement,S=(_==null||(x=_.dataset)==null?void 0:x.toggle)&&o._rootNode&&o._rootNode.contains(_);S||o.reset({type:W3})}})},o.menuRef=function(x){o._menuNode=x},o.getMenuProps=function(x,_){var S,E=x===void 0?{}:x,I=E.refKey,N=I===void 0?"ref":I,T=E.ref,M=Ir(E,HK),z=_===void 0?{}:_,j=z.suppressRefError,W=j===void 0?!1:j;return o.getMenuProps.called=!0,o.getMenuProps.refKey=N,o.getMenuProps.suppressRefError=W,je((S={},S[N]=zn(T,o.menuRef),S.role="listbox",S["aria-labelledby"]=M&&M["aria-label"]?void 0:o.labelId,S.id=o.menuId,S),M)},o.getItemProps=function(x){var _,S=x===void 0?{}:x,E=S.onMouseMove,I=S.onMouseDown,N=S.onClick;S.onPress;var T=S.index,M=S.item,z=M===void 0?process.env.NODE_ENV==="production"?void 0:DK("getItemProps","item"):M,j=Ir(S,WK);T===void 0?(o.items.push(z),T=o.items.indexOf(z)):o.items[T]=z;var W="onClick",U=N,A=(_={onMouseMove:st(E,function(){T!==o.getState().highlightedIndex&&(o.setHighlightedIndex(T,{type:L3}),o.avoidScrolling=!0,o.internalSetTimeout(function(){return o.avoidScrolling=!1},250))}),onMouseDown:st(I,function(V){V.preventDefault()})},_[W]=st(U,function(){o.selectItemAtIndex(T,{type:H3})}),_),K=j.disabled?{onMouseDown:A.onMouseDown}:A;return je({id:o.getItemId(T),role:"option","aria-selected":o.getState().highlightedIndex===T},K,j)},o.clearItems=function(){o.items=[]},o.reset=function(x,_){x===void 0&&(x={}),x=Wc(x),o.internalSetState(function(S){var E=S.selectedItem;return je({isOpen:o.props.defaultIsOpen,highlightedIndex:o.props.defaultHighlightedIndex,inputValue:o.props.itemToString(E)},x)},_)},o.toggleMenu=function(x,_){x===void 0&&(x={}),x=Wc(x),o.internalSetState(function(S){var E=S.isOpen;return je({isOpen:!E},E&&{highlightedIndex:o.props.defaultHighlightedIndex},x)},function(){var S=o.getState(),E=S.isOpen,I=S.highlightedIndex;E&&o.getItemCount()>0&&typeof I=="number"&&o.setHighlightedIndex(I,x),kC(_)()})},o.openMenu=function(x){o.internalSetState({isOpen:!0},x)},o.closeMenu=function(x){o.internalSetState({isOpen:!1},x)},o.updateStatus=wd(function(){var x;if((x=o.props)!=null&&(x=x.environment)!=null&&x.document){var _=o.getState(),S=o.items[_.highlightedIndex],E=o.getItemCount(),I=o.props.getA11yStatusMessage(je({itemToString:o.props.itemToString,previousResultCount:o.previousResultCount,resultCount:E,highlightedItem:S},_));o.previousResultCount=E,j3(I,o.props.environment.document)}},200);var a=o.props,s=a.defaultHighlightedIndex,c=a.initialHighlightedIndex,u=c===void 0?s:c,d=a.defaultIsOpen,h=a.initialIsOpen,p=h===void 0?d:h,v=a.initialInputValue,y=v===void 0?"":v,m=a.initialSelectedItem,g=m===void 0?null:m,w=o.getState({highlightedIndex:u,isOpen:p,inputValue:y,selectedItem:g});return w.selectedItem!=null&&o.props.initialInputValue===void 0&&(w.inputValue=o.props.itemToString(w.selectedItem)),o.state=w,o}yK(r,t);var n=r.prototype;return n.internalClearTimeouts=function(){this.timeoutIds.forEach(function(i){clearTimeout(i)}),this.timeoutIds=[]},n.getState=function(i){return i===void 0&&(i=this.state),ul(i,this.props)},n.getItemCount=function(){var i=this.items.length;return this.itemCount!=null?i=this.itemCount:this.props.itemCount!==void 0&&(i=this.props.itemCount),i},n.getItemNodeFromIndex=function(i){return this.props.environment?this.props.environment.document.getElementById(this.getItemId(i)):null},n.scrollHighlightedItemIntoView=function(){{var i=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(i,this._menuNode)}},n.moveHighlightedIndex=function(i,o){var a=this.getItemCount(),s=this.getState(),c=s.highlightedIndex;if(a>0){var u=Ln(c,i,{length:a},this.isItemDisabled,!0);this.setHighlightedIndex(u,o)}},n.getStateAndHelpers=function(){var i=this.getState(),o=i.highlightedIndex,a=i.inputValue,s=i.selectedItem,c=i.isOpen,u=this.props.itemToString,d=this.id,h=this.getRootProps,p=this.getToggleButtonProps,v=this.getLabelProps,y=this.getMenuProps,m=this.getInputProps,g=this.getItemProps,w=this.openMenu,x=this.closeMenu,_=this.toggleMenu,S=this.selectItem,E=this.selectItemAtIndex,I=this.selectHighlightedItem,N=this.setHighlightedIndex,T=this.clearSelection,M=this.clearItems,z=this.reset,j=this.setItemCount,W=this.unsetItemCount,U=this.internalSetState;return{getRootProps:h,getToggleButtonProps:p,getLabelProps:v,getMenuProps:y,getInputProps:m,getItemProps:g,reset:z,openMenu:w,closeMenu:x,toggleMenu:_,selectItem:S,selectItemAtIndex:E,selectHighlightedItem:I,setHighlightedIndex:N,clearSelection:T,clearItems:M,setItemCount:j,unsetItemCount:W,setState:U,itemToString:u,id:d,highlightedIndex:o,inputValue:a,isOpen:c,selectedItem:s}},n.componentDidMount=function(){var i=this;if(process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&jC(this._menuNode,this.getMenuProps),!this.props.environment)this.cleanup=function(){i.internalClearTimeouts()};else{var o=function(){i.isMouseDown=!0},a=function(h){i.isMouseDown=!1;var p=Vu(h.target,[i._rootNode,i._menuNode],i.props.environment);!p&&i.getState().isOpen&&i.reset({type:z3},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},s=function(){i.isTouchMove=!1},c=function(){i.isTouchMove=!0},u=function(h){var p=Vu(h.target,[i._rootNode,i._menuNode],i.props.environment,!1);!i.isTouchMove&&!p&&i.getState().isOpen&&i.reset({type:X3},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},d=this.props.environment;d.addEventListener("mousedown",o),d.addEventListener("mouseup",a),d.addEventListener("touchstart",s),d.addEventListener("touchmove",c),d.addEventListener("touchend",u),this.cleanup=function(){i.internalClearTimeouts(),i.updateStatus.cancel(),d.removeEventListener("mousedown",o),d.removeEventListener("mouseup",a),d.removeEventListener("touchstart",s),d.removeEventListener("touchmove",c),d.removeEventListener("touchend",u)}}},n.shouldScroll=function(i,o){var a=this.props.highlightedIndex===void 0?this.getState():this.props,s=a.highlightedIndex,c=o.highlightedIndex===void 0?i:o,u=c.highlightedIndex,d=s&&this.getState().isOpen&&!i.isOpen,h=s!==u;return d||h},n.componentDidUpdate=function(i,o){process.env.NODE_ENV!=="production"&&(w1(this.state,i,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&jC(this._menuNode,this.getMenuProps)),$u(this.props,"selectedItem")&&this.props.selectedItemChanged(i.selectedItem,this.props.selectedItem)&&this.internalSetState({type:Y3,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(o,i)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},n.componentWillUnmount=function(){this.cleanup()},n.render=function(){var i=DC(this.props.children,Cr);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 o=DC(i(this.getStateAndHelpers()));if(!o)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&GK(o,this.getRootProps),o;if(k3(o))return C.cloneElement(o,this.getRootProps(A3(o)));if(process.env.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")},r})(C.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:AK,itemToString:function(t){return t==null?"":(process.env.NODE_ENV!=="production"&&qK(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:Cr,onInputValueChange:Cr,onUserAction:Cr,onChange:Cr,onSelect:Cr,onOuterClick:Cr,selectedItemChanged:function(t,r){return t!==r},environment:typeof window>"u"?void 0:window,stateReducer:function(t,r){return r},suppressRefError:!1,scrollIntoView:P3},e.stateChangeTypes=BK,e})();process.env.NODE_ENV!=="production"&&(UK.propTypes={children:Se.func,defaultHighlightedIndex:Se.number,defaultIsOpen:Se.bool,initialHighlightedIndex:Se.number,initialSelectedItem:Se.any,initialInputValue:Se.string,initialIsOpen:Se.bool,getA11yStatusMessage:Se.func,itemToString:Se.func,onChange:Se.func,onSelect:Se.func,onStateChange:Se.func,onInputValueChange:Se.func,onUserAction:Se.func,onOuterClick:Se.func,selectedItemChanged:Se.func,stateReducer:Se.func,itemCount:Se.number,id:Se.string,environment:Se.shape({addEventListener:Se.func.isRequired,removeEventListener:Se.func.isRequired,document:Se.shape({createElement:Se.func.isRequired,getElementById:Se.func.isRequired,activeElement:Se.any.isRequired,body:Se.any.isRequired}).isRequired,Node:Se.func.isRequired}),suppressRefError:Se.bool,scrollIntoView:Se.func,selectedItem:Se.any,isOpen:Se.bool,inputValue:Se.string,highlightedIndex:Se.number,labelId:Se.string,inputId:Se.string,menuId:Se.string,getItemId:Se.func});function jC(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 GK(e,t){var r=t.refKey,n=r!=="ref",i=!k3(e);i&&!n&&!TC.isForwardRef(e)?console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps"):!i&&n&&console.error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "'+r+'"'),!TC.isForwardRef(e)&&!A3(e)[r]&&console.error('downshift: You must apply the ref prop "'+r+'" from getRootProps onto your root element.')}var Z3={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function KK(e,t,r){var n=e.props,i=e.type,o={};Object.keys(t).forEach(function(a){YK(a,e,t,r),r[a]!==t[a]&&(o[a]=r[a])}),n.onStateChange&&Object.keys(o).length&&n.onStateChange(je({type:i},o))}function YK(e,t,r,n){var i=t.props,o=t.type,a="on"+E1(e)+"Change";i[a]&&n[e]!==void 0&&n[e]!==r[e]&&i[a](je({type:o},n))}function XK(e,t){return t.changes}var qC=wd(function(e,t){j3(e,t)},200),ZK=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?C.useLayoutEffect:C.useEffect,J3="useId"in C?function(e){var t=e.id,r=e.labelId,n=e.menuId,i=e.getItemId,o=e.toggleButtonId,a=e.inputId,s="downshift-"+C.useId();t||(t=s);var c=C.useMemo(function(){return{labelId:r||t+"-label",menuId:n||t+"-menu",getItemId:i||function(u){return t+"-item-"+u},toggleButtonId:o||t+"-toggle-button",inputId:a||t+"-input"}},[i,t,a,r,n,o]);return c}:function(e){var t=e.id,r=t===void 0?"downshift-"+M3():t,n=e.labelId,i=e.menuId,o=e.getItemId,a=e.toggleButtonId,s=e.inputId,c=C.useMemo(function(){return{labelId:n||r+"-label",menuId:i||r+"-menu",getItemId:o||function(u){return r+"-item-"+u},toggleButtonId:a||r+"-toggle-button",inputId:s||r+"-input"}},[o,r,s,n,i,a]);return c};function S1(e,t,r,n){var i,o;if(e===void 0){if(t===void 0)throw new Error(n);i=r[t],o=t}else o=t===void 0?r.indexOf(e):t,i=e;return[i,o]}function JK(e){return/^\S{1}$/.test(e)}function E1(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function Sd(e){var t=C.useRef(e);return t.current=e,t}function Q3(e,t,r,n){var i=C.useRef(),o=C.useRef(),a=C.useCallback(function(v,y){o.current=y,v=ul(v,y.props);var m=e(v,y),g=y.props.stateReducer(v,je({},y,{changes:m}));return g},[e]),s=C.useReducer(a,t,r),c=s[0],u=s[1],d=Sd(t),h=C.useCallback(function(v){return u(je({props:d.current},v))},[d]),p=o.current;return C.useEffect(function(){var v=ul(i.current,p==null?void 0:p.props),y=p&&i.current&&!n(v,c);y&&KK(p,v,c),i.current=c},[c,p,n]),[c,h]}function e4(e,t,r,n){var i=Q3(e,t,r,n),o=i[0],a=i[1];return[ul(o,t),a]}var el={itemToString:function(e){return e?String(e):""},itemToKey:function(e){return e},stateReducer:XK,scrollIntoView:P3,environment:typeof window>"u"?void 0:window};function ri(e,t,r){r===void 0&&(r=Z3);var n=e["default"+E1(t)];return n!==void 0?n:r[t]}function So(e,t,r){r===void 0&&(r=Z3);var n=e[t];if(n!==void 0)return n;var i=e["initial"+E1(t)];return i!==void 0?i:ri(e,t,r)}function t4(e){var t=So(e,"selectedItem"),r=So(e,"isOpen"),n=QK(e),i=So(e,"inputValue");return{highlightedIndex:n<0&&t&&r?e.items.findIndex(function(o){return e.itemToKey(o)===e.itemToKey(t)}):n,isOpen:r,selectedItem:t,inputValue:i}}function Eo(e,t,r){var n=e.items,i=e.initialHighlightedIndex,o=e.defaultHighlightedIndex,a=e.isItemDisabled,s=e.itemToKey,c=t.selectedItem,u=t.highlightedIndex;return n.length===0?-1:i!==void 0&&u===i&&!a(n[i],i)?i:o!==void 0&&!a(n[o],o)?o:c?n.findIndex(function(d){return s(c)===s(d)}):r<0&&!a(n[n.length-1],n.length-1)?n.length-1:r>0&&!a(n[0],0)?0:-1}function r4(e,t,r){var n=C.useRef({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1}),i=C.useCallback(function(){return r.map(function(o){return o.current})},[r]);return C.useEffect(function(){if(!e)return Cr;function o(){n.current.isTouchEnd=!1,n.current.isMouseDown=!0}function a(d){n.current.isMouseDown=!1,Vu(d.target,i(),e)||t()}function s(){n.current.isTouchEnd=!1,n.current.isTouchMove=!1}function c(){n.current.isTouchMove=!0}function u(d){n.current.isTouchEnd=!0,!n.current.isTouchMove&&!Vu(d.target,i(),e,!1)&&t()}return e.addEventListener("mousedown",o),e.addEventListener("mouseup",a),e.addEventListener("touchstart",s),e.addEventListener("touchmove",c),e.addEventListener("touchend",u),function(){e.removeEventListener("mousedown",o),e.removeEventListener("mouseup",a),e.removeEventListener("touchstart",s),e.removeEventListener("touchmove",c),e.removeEventListener("touchend",u)}},[e,i,t]),n.current}var Ed=function(){return Cr};process.env.NODE_ENV!=="production"&&(Ed=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=C.useRef(t.reduce(function(o,a){return o[a]={},o},{}));C.useEffect(function(){Object.keys(n.current).forEach(function(o){var a=n.current[o];if(!Object.keys(a).length){console.error("downshift: You forgot to call the "+o+" getter function on your component / element.");return}var s=a.suppressRefError,c=a.refKey,u=a.elementRef;s||u!=null&&u.current||console.error('downshift: The ref prop "'+c+'" from '+o+" was not applied correctly on your element.")})},[]);var i=C.useCallback(function(o,a,s,c){n.current[o]={suppressRefError:a,refKey:s,elementRef:c}},[]);return i});function _1(e,t,r,n){n===void 0&&(n={});var i=n.document,o=Cl();C.useEffect(function(){if(!(!e||o||!i)){var a=e(t);qC(a,i)}},r),C.useEffect(function(){return function(){qC.cancel(),LK(i)}},[i])}function n4(e){var t=e.highlightedIndex,r=e.isOpen,n=e.itemRefs,i=e.getItemNodeFromIndex,o=e.menuElement,a=e.scrollIntoView,s=C.useRef(!0);return ZK(function(){t<0||!r||!Object.keys(n.current).length||(s.current===!1?s.current=!0:a(i(t),o))},[t]),s}var _d=Cr;process.env.NODE_ENV!=="production"&&(_d=function(e){var t=e.props,r=e.state,n=C.useRef(t),i=Cl();C.useEffect(function(){i||(w1(r,n.current,t),n.current=t)},[r,t,i])});function Hu(e,t,r){var n;r===void 0&&(r=!0);var i=((n=e.items)==null?void 0:n.length)&&t>=0;return je({isOpen:!1,highlightedIndex:-1},i&&je({selectedItem:e.items[t],isOpen:ri(e,"isOpen"),highlightedIndex:ri(e,"highlightedIndex")},r&&{inputValue:e.itemToString(e.items[t])}))}function i4(e,t){return e.isOpen===t.isOpen&&e.inputValue===t.inputValue&&e.highlightedIndex===t.highlightedIndex&&e.selectedItem===t.selectedItem}function Cl(){var e=C.useRef(!0);return C.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}function Wu(e){var t=ri(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function QK(e){var t=So(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}var bu={environment:Se.shape({addEventListener:Se.func.isRequired,removeEventListener:Se.func.isRequired,document:Se.shape({createElement:Se.func.isRequired,getElementById:Se.func.isRequired,activeElement:Se.any.isRequired,body:Se.any.isRequired}).isRequired,Node:Se.func.isRequired}),itemToString:Se.func,itemToKey:Se.func,stateReducer:Se.func},o4=je({},bu,{getA11yStatusMessage:Se.func,highlightedIndex:Se.number,defaultHighlightedIndex:Se.number,initialHighlightedIndex:Se.number,isOpen:Se.bool,defaultIsOpen:Se.bool,initialIsOpen:Se.bool,selectedItem:Se.any,initialSelectedItem:Se.any,defaultSelectedItem:Se.any,id:Se.string,labelId:Se.string,menuId:Se.string,getItemId:Se.func,toggleButtonId:Se.string,onSelectedItemChange:Se.func,onHighlightedIndexChange:Se.func,onStateChange:Se.func,onIsOpenChange:Se.func,scrollIntoView:Se.func});function a4(e,t,r){var n=t.type,i=t.props,o;switch(n){case r.ItemMouseMove:o={highlightedIndex:t.disabled?-1:t.index};break;case r.MenuMouseLeave:o={highlightedIndex:-1};break;case r.ToggleButtonClick:case r.FunctionToggleMenu:o={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Eo(i,e,0)};break;case r.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:Eo(i,e,0)};break;case r.FunctionCloseMenu:o={isOpen:!1};break;case r.FunctionSetHighlightedIndex:o={highlightedIndex:i.isItemDisabled(i.items[t.highlightedIndex],t.highlightedIndex)?-1:t.highlightedIndex};break;case r.FunctionSetInputValue:o={inputValue:t.inputValue};break;case r.FunctionReset:o={highlightedIndex:Wu(i),isOpen:ri(i,"isOpen"),selectedItem:ri(i,"selectedItem"),inputValue:ri(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return je({},e,o)}function eY(e){for(var t=e.keysSoFar,r=e.highlightedIndex,n=e.items,i=e.itemToString,o=e.isItemDisabled,a=t.toLowerCase(),s=0;s<n.length;s++){var c=(s+r+(t.length<2?1:0))%n.length,u=n[c];if(u!==void 0&&i(u).toLowerCase().startsWith(a)&&!o(u,c))return c}return r}var tY=Ia(Ia({},o4),{items:Se.array.isRequired,isItemDisabled:Se.func}),rY=Ia(Ia({},el),{isItemDisabled:function(){return!1}}),s4=Cr;process.env.NODE_ENV!=="production"&&(s4=function(e,t){Se.checkPropTypes(tY,e,"prop",t.name)});var yu=process.env.NODE_ENV!=="production"?"__togglebutton_click__":0,O1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_arrow_down__":1,C1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_arrow_up__":2,Uu=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_character__":3,I1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_escape__":4,R1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_home__":5,N1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_end__":6,T1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_enter__":7,P1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_space_button__":8,M1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_page_up__":9,k1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_page_down__":10,Gu=process.env.NODE_ENV!=="production"?"__togglebutton_blur__":11,l4=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":12,c4=process.env.NODE_ENV!=="production"?"__item_mouse_move__":13,A1=process.env.NODE_ENV!=="production"?"__item_click__":14,u4=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,d4=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,f4=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,h4=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,D1=process.env.NODE_ENV!=="production"?"__function_select_item__":19,Mw=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,p4=process.env.NODE_ENV!=="production"?"__function_reset__":21,v4=Object.freeze({__proto__:null,FunctionCloseMenu:f4,FunctionOpenMenu:d4,FunctionReset:p4,FunctionSelectItem:D1,FunctionSetHighlightedIndex:h4,FunctionSetInputValue:Mw,FunctionToggleMenu:u4,ItemClick:A1,ItemMouseMove:c4,MenuMouseLeave:l4,ToggleButtonBlur:Gu,ToggleButtonClick:yu,ToggleButtonKeyDownArrowDown:O1,ToggleButtonKeyDownArrowUp:C1,ToggleButtonKeyDownCharacter:Uu,ToggleButtonKeyDownEnd:N1,ToggleButtonKeyDownEnter:T1,ToggleButtonKeyDownEscape:I1,ToggleButtonKeyDownHome:R1,ToggleButtonKeyDownPageDown:k1,ToggleButtonKeyDownPageUp:M1,ToggleButtonKeyDownSpaceButton:P1});function nY(e,t){var r,n=t.type,i=t.props,o=t.altKey,a;switch(n){case A1:a={isOpen:ri(i,"isOpen"),highlightedIndex:Wu(i),selectedItem:i.items[t.index]};break;case Uu:{var s=t.key,c=""+e.inputValue+s,u=!e.isOpen&&e.selectedItem?i.items.findIndex(function(v){return i.itemToKey(v)===i.itemToKey(e.selectedItem)}):e.highlightedIndex,d=eY({keysSoFar:c,highlightedIndex:u,items:i.items,itemToString:i.itemToString,isItemDisabled:i.isItemDisabled});a={inputValue:c,highlightedIndex:d,isOpen:!0}}break;case O1:{var h=e.isOpen?Ln(e.highlightedIndex,1,i.items,i.isItemDisabled):o&&e.selectedItem==null?-1:Eo(i,e,1);a={highlightedIndex:h,isOpen:!0}}break;case C1:if(e.isOpen&&o)a=Hu(i,e.highlightedIndex,!1);else{var p=e.isOpen?Ln(e.highlightedIndex,-1,i.items,i.isItemDisabled):Eo(i,e,-1);a={highlightedIndex:p,isOpen:!0}}break;case T1:case P1:a=Hu(i,e.highlightedIndex,!1);break;case R1:a={highlightedIndex:Ji(0,!1,i.items,i.isItemDisabled),isOpen:!0};break;case N1:a={highlightedIndex:Ji(i.items.length-1,!0,i.items,i.isItemDisabled),isOpen:!0};break;case M1:a={highlightedIndex:Ln(e.highlightedIndex,-10,i.items,i.isItemDisabled)};break;case k1:a={highlightedIndex:Ln(e.highlightedIndex,10,i.items,i.isItemDisabled)};break;case I1:a={isOpen:!1,highlightedIndex:-1};break;case Gu:a=je({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((r=i.items)==null?void 0:r.length)&&{selectedItem:i.items[e.highlightedIndex]});break;case D1:a={selectedItem:t.selectedItem};break;default:return a4(e,t,v4)}return je({},e,a)}var iY=["onClick"],oY=["onMouseLeave","refKey","ref"],aY=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],sY=["item","index","onMouseMove","onClick","onMouseDown","onPress","refKey","disabled","ref"];xi.stateChangeTypes=v4;function xi(e){e===void 0&&(e={}),s4(e,xi);var t=je({},rY,e),r=t.scrollIntoView,n=t.environment,i=t.getA11yStatusMessage,o=e4(nY,t,t4,i4),a=o[0],s=o[1],c=a.isOpen,u=a.highlightedIndex,d=a.selectedItem,h=a.inputValue,p=C.useRef(null),v=C.useRef(null),y=C.useRef({}),m=C.useRef(null),g=J3(t),w=Sd({state:a,props:t}),x=C.useCallback(function(P){return y.current[g.getItemId(P)]},[g]);_1(i,a,[c,u,d,h],n);var _=n4({menuElement:v.current,highlightedIndex:u,isOpen:c,itemRefs:y,scrollIntoView:r,getItemNodeFromIndex:x});C.useEffect(function(){return m.current=wd(function(P){P({type:Mw,inputValue:""})},500),function(){m.current.cancel()}},[]),C.useEffect(function(){h&&m.current(s)},[s,h]),_d({props:t,state:a}),C.useEffect(function(){var P=So(t,"isOpen");P&&p.current&&p.current.focus()},[]);var S=C.useCallback(function(){w.current.state.isOpen&&s({type:Gu})},[s,w]),E=C.useMemo(function(){return[v,p]},[]),I=r4(n,S,E),N=Ed("getMenuProps","getToggleButtonProps");C.useEffect(function(){c||(y.current={})},[c]);var T=C.useMemo(function(){return{ArrowDown:function(P){P.preventDefault(),s({type:O1,altKey:P.altKey})},ArrowUp:function(P){P.preventDefault(),s({type:C1,altKey:P.altKey})},Home:function(P){P.preventDefault(),s({type:R1})},End:function(P){P.preventDefault(),s({type:N1})},Escape:function(){w.current.state.isOpen&&s({type:I1})},Enter:function(P){P.preventDefault(),s({type:w.current.state.isOpen?T1:yu})},PageUp:function(P){w.current.state.isOpen&&(P.preventDefault(),s({type:M1}))},PageDown:function(P){w.current.state.isOpen&&(P.preventDefault(),s({type:k1}))}," ":function(P){P.preventDefault();var B=w.current.state;if(!B.isOpen){s({type:yu});return}B.inputValue?s({type:Uu,key:" "}):s({type:P1})}}},[s,w]),M=C.useCallback(function(){s({type:u4})},[s]),z=C.useCallback(function(){s({type:f4})},[s]),j=C.useCallback(function(){s({type:d4})},[s]),W=C.useCallback(function(P){s({type:h4,highlightedIndex:P})},[s]),U=C.useCallback(function(P){s({type:D1,selectedItem:P})},[s]),A=C.useCallback(function(){s({type:p4})},[s]),K=C.useCallback(function(P){s({type:Mw,inputValue:P})},[s]),V=C.useCallback(function(P){var B=P===void 0?{}:P,X=B.onClick,Q=Ir(B,iY),D=function(){var $;($=p.current)==null||$.focus()};return je({id:g.labelId,htmlFor:g.toggleButtonId,onClick:st(X,D)},Q)},[g]),te=C.useCallback(function(P,B){var X,Q=P===void 0?{}:P,D=Q.onMouseLeave,$=Q.refKey,H=$===void 0?"ref":$,q=Q.ref,Y=Ir(Q,oY),ie=B===void 0?{}:B,ne=ie.suppressRefError,ve=ne===void 0?!1:ne,Z=function(){s({type:l4})};return N("getMenuProps",ve,H,v),je((X={},X[H]=zn(q,function(J){v.current=J}),X.id=g.menuId,X.role="listbox",X["aria-labelledby"]=Y&&Y["aria-label"]?void 0:""+g.labelId,X.onMouseLeave=st(D,Z),X),Y)},[s,N,g]),G=C.useCallback(function(P,B){var X,Q=P===void 0?{}:P,D=Q.onBlur,$=Q.onClick;Q.onPress;var H=Q.onKeyDown,q=Q.refKey,Y=q===void 0?"ref":q,ie=Q.ref,ne=Ir(Q,aY),ve=B===void 0?{}:B,Z=ve.suppressRefError,J=Z===void 0?!1:Z,ae=w.current.state,he=function(){s({type:yu})},ue=function(){ae.isOpen&&!I.isMouseDown&&s({type:Gu})},de=function(xe){var Ee=Ra(xe);Ee&&T[Ee]?T[Ee](xe):JK(Ee)&&s({type:Uu,key:Ee})},le=je((X={},X[Y]=zn(ie,function(xe){p.current=xe}),X["aria-activedescendant"]=ae.isOpen&&ae.highlightedIndex>-1?g.getItemId(ae.highlightedIndex):"",X["aria-controls"]=g.menuId,X["aria-expanded"]=w.current.state.isOpen,X["aria-haspopup"]="listbox",X["aria-labelledby"]=ne&&ne["aria-label"]?void 0:""+g.labelId,X.id=g.toggleButtonId,X.role="combobox",X.tabIndex=0,X.onBlur=st(D,ue),X),ne);return ne.disabled||(le.onClick=st($,he),le.onKeyDown=st(H,de)),N("getToggleButtonProps",J,Y,p),le},[s,g,w,I,N,T]),re=C.useCallback(function(P){var B,X=P===void 0?{}:P,Q=X.item,D=X.index,$=X.onMouseMove,H=X.onClick,q=X.onMouseDown;X.onPress;var Y=X.refKey,ie=Y===void 0?"ref":Y,ne=X.disabled,ve=X.ref,Z=Ir(X,sY);ne!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useSelect.');var J=w.current,ae=J.state,he=J.props,ue=S1(Q,D,he.items,"Pass either item or index to getItemProps!"),de=ue[0],le=ue[1],xe=he.isItemDisabled(de,le),Ee=function(){I.isTouchEnd||le===ae.highlightedIndex||(_.current=!1,s({type:c4,index:le,disabled:xe}))},Ie=function(){s({type:A1,index:le})},Te=function(Ze){return Ze.preventDefault()},Me=je((B={},B[ie]=zn(ve,function(Ze){Ze&&(y.current[g.getItemId(le)]=Ze)}),B["aria-disabled"]=xe,B["aria-selected"]=de===ae.selectedItem,B.id=g.getItemId(le),B.role="option",B),Z);return xe||(Me.onClick=st(H,Ie)),Me.onMouseMove=st($,Ee),Me.onMouseDown=st(q,Te),Me},[w,g,I,_,s]);return{getToggleButtonProps:G,getLabelProps:V,getMenuProps:te,getItemProps:re,toggleMenu:M,openMenu:j,closeMenu:z,setHighlightedIndex:W,selectItem:U,reset:A,setInputValue:K,highlightedIndex:u,isOpen:c,selectedItem:d,inputValue:h}}var j1=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,q1=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,z1=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,L1=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,B1=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,F1=process.env.NODE_ENV!=="production"?"__input_keydown_page_up__":5,$1=process.env.NODE_ENV!=="production"?"__input_keydown_page_down__":6,V1=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":7,H1=process.env.NODE_ENV!=="production"?"__input_change__":8,Ku=process.env.NODE_ENV!=="production"?"__input_blur__":9,W1=process.env.NODE_ENV!=="production"?"__input_click__":10,g4=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":11,m4=process.env.NODE_ENV!=="production"?"__item_mouse_move__":12,U1=process.env.NODE_ENV!=="production"?"__item_click__":13,b4=process.env.NODE_ENV!=="production"?"__togglebutton_click__":14,y4=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,x4=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,w4=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,S4=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,G1=process.env.NODE_ENV!=="production"?"__function_select_item__":19,E4=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,_4=process.env.NODE_ENV!=="production"?"__function_reset__":21,K1=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":22,O4=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:K1,FunctionCloseMenu:w4,FunctionOpenMenu:x4,FunctionReset:_4,FunctionSelectItem:G1,FunctionSetHighlightedIndex:S4,FunctionSetInputValue:E4,FunctionToggleMenu:y4,InputBlur:Ku,InputChange:H1,InputClick:W1,InputKeyDownArrowDown:j1,InputKeyDownArrowUp:q1,InputKeyDownEnd:B1,InputKeyDownEnter:V1,InputKeyDownEscape:z1,InputKeyDownHome:L1,InputKeyDownPageDown:$1,InputKeyDownPageUp:F1,ItemClick:U1,ItemMouseMove:m4,MenuMouseLeave:g4,ToggleButtonClick:b4});function lY(e){var t=t4(e),r=t.selectedItem,n=t.inputValue;return n===""&&r&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(n=e.itemToString(r)),je({},t,{inputValue:n})}var cY=je({},o4,{items:Se.array.isRequired,isItemDisabled:Se.func,inputValue:Se.string,defaultInputValue:Se.string,initialInputValue:Se.string,inputId:Se.string,onInputValueChange:Se.func});function uY(e,t,r,n){var i=C.useRef(),o=Q3(e,t,r,n),a=o[0],s=o[1],c=Cl();return C.useEffect(function(){if($u(t,"selectedItem")){if(!c){var u=t.itemToKey(t.selectedItem)!==t.itemToKey(i.current);u&&s({type:K1,inputValue:t.itemToString(t.selectedItem)})}i.current=a.selectedItem===i.current?t.selectedItem:a.selectedItem}},[a.selectedItem,t.selectedItem]),[ul(a,t),s]}var C4=Cr;process.env.NODE_ENV!=="production"&&(C4=function(e,t){Se.checkPropTypes(cY,e,"prop",t.name)});var dY=je({},el,{isItemDisabled:function(){return!1}});function fY(e,t){var r,n=t.type,i=t.props,o=t.altKey,a;switch(n){case U1:a={isOpen:ri(i,"isOpen"),highlightedIndex:Wu(i),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case j1:e.isOpen?a={highlightedIndex:Ln(e.highlightedIndex,1,i.items,i.isItemDisabled,!0)}:a={highlightedIndex:o&&e.selectedItem==null?-1:Eo(i,e,1),isOpen:i.items.length>=0};break;case q1:e.isOpen?o?a=Hu(i,e.highlightedIndex):a={highlightedIndex:Ln(e.highlightedIndex,-1,i.items,i.isItemDisabled,!0)}:a={highlightedIndex:Eo(i,e,-1),isOpen:i.items.length>=0};break;case V1:a=Hu(i,e.highlightedIndex);break;case z1:a=je({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case F1:a={highlightedIndex:Ln(e.highlightedIndex,-10,i.items,i.isItemDisabled,!0)};break;case $1:a={highlightedIndex:Ln(e.highlightedIndex,10,i.items,i.isItemDisabled,!0)};break;case L1:a={highlightedIndex:Ji(0,!1,i.items,i.isItemDisabled)};break;case B1:a={highlightedIndex:Ji(i.items.length-1,!0,i.items,i.isItemDisabled)};break;case Ku:a=je({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((r=i.items)==null?void 0:r.length)&&t.selectItem&&{selectedItem:i.items[e.highlightedIndex],inputValue:i.itemToString(i.items[e.highlightedIndex])});break;case H1:a={isOpen:!0,highlightedIndex:Wu(i),inputValue:t.inputValue};break;case W1:a={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Eo(i,e,0)};break;case G1:a={selectedItem:t.selectedItem,inputValue:i.itemToString(t.selectedItem)};break;case K1:a={inputValue:t.inputValue};break;default:return a4(e,t,O4)}return je({},e,a)}var hY=["onMouseLeave","refKey","ref"],pY=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],vY=["onClick","onPress","refKey","ref"],gY=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];zr.stateChangeTypes=O4;function zr(e){e===void 0&&(e={}),C4(e,zr);var t=je({},dY,e),r=t.items,n=t.scrollIntoView,i=t.environment,o=t.getA11yStatusMessage,a=uY(fY,t,lY,i4),s=a[0],c=a[1],u=s.isOpen,d=s.highlightedIndex,h=s.selectedItem,p=s.inputValue,v=C.useRef(null),y=C.useRef({}),m=C.useRef(null),g=C.useRef(null),w=Cl(),x=J3(t),_=C.useRef(),S=Sd({state:s,props:t}),E=C.useCallback(function(D){return y.current[x.getItemId(D)]},[x]);_1(o,s,[u,d,h,p],i);var I=n4({menuElement:v.current,highlightedIndex:d,isOpen:u,itemRefs:y,scrollIntoView:n,getItemNodeFromIndex:E});_d({props:t,state:s}),C.useEffect(function(){var D=So(t,"isOpen");D&&m.current&&m.current.focus()},[]),C.useEffect(function(){w||(_.current=r.length)});var N=C.useCallback(function(){S.current.state.isOpen&&c({type:Ku})},[c,S]),T=C.useMemo(function(){return[v,g,m]},[]),M=r4(i,N,T),z=Ed("getInputProps","getMenuProps");C.useEffect(function(){u||(y.current={})},[u]),C.useEffect(function(){var D;!u||!(i!=null&&i.document)||!(m!=null&&(D=m.current)!=null&&D.focus)||i.document.activeElement!==m.current&&m.current.focus()},[u,i]);var j=C.useMemo(function(){return{ArrowDown:function(D){D.preventDefault(),c({type:j1,altKey:D.altKey})},ArrowUp:function(D){D.preventDefault(),c({type:q1,altKey:D.altKey})},Home:function(D){S.current.state.isOpen&&(D.preventDefault(),c({type:L1}))},End:function(D){S.current.state.isOpen&&(D.preventDefault(),c({type:B1}))},Escape:function(D){var $=S.current.state;($.isOpen||$.inputValue||$.selectedItem||$.highlightedIndex>-1)&&(D.preventDefault(),c({type:z1}))},Enter:function(D){var $=S.current.state;!$.isOpen||D.which===229||(D.preventDefault(),c({type:V1}))},PageUp:function(D){S.current.state.isOpen&&(D.preventDefault(),c({type:F1}))},PageDown:function(D){S.current.state.isOpen&&(D.preventDefault(),c({type:$1}))}}},[c,S]),W=C.useCallback(function(D){return je({id:x.labelId,htmlFor:x.inputId},D)},[x]),U=C.useCallback(function(D,$){var H,q=D===void 0?{}:D,Y=q.onMouseLeave,ie=q.refKey,ne=ie===void 0?"ref":ie,ve=q.ref,Z=Ir(q,hY),J=$===void 0?{}:$,ae=J.suppressRefError,he=ae===void 0?!1:ae;return z("getMenuProps",he,ne,v),je((H={},H[ne]=zn(ve,function(ue){v.current=ue}),H.id=x.menuId,H.role="listbox",H["aria-labelledby"]=Z&&Z["aria-label"]?void 0:""+x.labelId,H.onMouseLeave=st(Y,function(){c({type:g4})}),H),Z)},[c,z,x]),A=C.useCallback(function(D){var $,H,q=D===void 0?{}:D,Y=q.item,ie=q.index,ne=q.refKey,ve=ne===void 0?"ref":ne,Z=q.ref,J=q.onMouseMove,ae=q.onMouseDown,he=q.onClick;q.onPress;var ue=q.disabled,de=Ir(q,pY);ue!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');var le=S.current,xe=le.props,Ee=le.state,Ie=S1(Y,ie,xe.items,"Pass either item or index to getItemProps!"),Te=Ie[0],Me=Ie[1],Ze=xe.isItemDisabled(Te,Me),tt="onClick",Fe=he,Le=function(){M.isTouchEnd||Me===Ee.highlightedIndex||(I.current=!1,c({type:m4,index:Me,disabled:Ze}))},ze=function(){c({type:U1,index:Me})},Je=function(rt){return rt.preventDefault()};return je(($={},$[ve]=zn(Z,function(rt){rt&&(y.current[x.getItemId(Me)]=rt)}),$["aria-disabled"]=Ze,$["aria-selected"]=Me===Ee.highlightedIndex,$.id=x.getItemId(Me),$.role="option",$),!Ze&&(H={},H[tt]=st(Fe,ze),H),{onMouseMove:st(J,Le),onMouseDown:st(ae,Je)},de)},[c,x,S,M,I]),K=C.useCallback(function(D){var $,H=D===void 0?{}:D,q=H.onClick;H.onPress;var Y=H.refKey,ie=Y===void 0?"ref":Y,ne=H.ref,ve=Ir(H,vY),Z=S.current.state,J=function(){c({type:b4})};return je(($={},$[ie]=zn(ne,function(ae){g.current=ae}),$["aria-controls"]=x.menuId,$["aria-expanded"]=Z.isOpen,$.id=x.toggleButtonId,$.tabIndex=-1,$),!ve.disabled&&je({},{onClick:st(q,J)}),ve)},[c,S,x]),V=C.useCallback(function(D,$){var H,q=D===void 0?{}:D,Y=q.onKeyDown,ie=q.onChange,ne=q.onInput,ve=q.onBlur;q.onChangeText;var Z=q.onClick,J=q.refKey,ae=J===void 0?"ref":J,he=q.ref,ue=Ir(q,gY),de=$===void 0?{}:$,le=de.suppressRefError,xe=le===void 0?!1:le;z("getInputProps",xe,ae,m);var Ee=S.current.state,Ie=function(ze){var Je=Ra(ze);Je&&j[Je]&&j[Je](ze)},Te=function(ze){c({type:H1,inputValue:ze.target.value})},Me=function(ze){if(i!=null&&i.document&&Ee.isOpen&&!M.isMouseDown){var Je=ze.relatedTarget===null&&i.document.activeElement!==i.document.body;c({type:Ku,selectItem:!Je})}},Ze=function(){c({type:W1})},tt="onChange",Fe={};if(!ue.disabled){var Le;Fe=(Le={},Le[tt]=st(ie,ne,Te),Le.onKeyDown=st(Y,Ie),Le.onBlur=st(ve,Me),Le.onClick=st(Z,Ze),Le)}return je((H={},H[ae]=zn(he,function(ze){m.current=ze}),H["aria-activedescendant"]=Ee.isOpen&&Ee.highlightedIndex>-1?x.getItemId(Ee.highlightedIndex):"",H["aria-autocomplete"]="list",H["aria-controls"]=x.menuId,H["aria-expanded"]=Ee.isOpen,H["aria-labelledby"]=ue&&ue["aria-label"]?void 0:x.labelId,H.autoComplete="off",H.id=x.inputId,H.role="combobox",H.value=Ee.inputValue,H),Fe,ue)},[c,x,i,j,S,M,z]),te=C.useCallback(function(){c({type:y4})},[c]),G=C.useCallback(function(){c({type:w4})},[c]),re=C.useCallback(function(){c({type:x4})},[c]),P=C.useCallback(function(D){c({type:S4,highlightedIndex:D})},[c]),B=C.useCallback(function(D){c({type:G1,selectedItem:D})},[c]),X=C.useCallback(function(D){c({type:E4,inputValue:D})},[c]),Q=C.useCallback(function(){c({type:_4})},[c]);return{getItemProps:A,getLabelProps:W,getMenuProps:U,getInputProps:V,getToggleButtonProps:K,toggleMenu:te,openMenu:re,closeMenu:G,setHighlightedIndex:P,setInputValue:X,selectItem:B,reset:Q,highlightedIndex:d,isOpen:u,selectedItem:h,inputValue:p}}var I4={activeIndex:-1,selectedItems:[]};function zC(e,t){return So(e,t,I4)}function LC(e,t){return ri(e,t,I4)}function mY(e){var t=zC(e,"activeIndex"),r=zC(e,"selectedItems");return{activeIndex:t,selectedItems:r}}function BC(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==""&&(t.selectionStart!==0||t.selectionEnd!==0))}function bY(e,t){return e.selectedItems===t.selectedItems&&e.activeIndex===t.activeIndex}var yY={stateReducer:bu.stateReducer,itemToKey:bu.itemToKey,environment:bu.environment,selectedItems:Se.array,initialSelectedItems:Se.array,defaultSelectedItems:Se.array,getA11yStatusMessage:Se.func,activeIndex:Se.number,initialActiveIndex:Se.number,defaultActiveIndex:Se.number,onActiveIndexChange:Se.func,onSelectedItemsChange:Se.func,keyNavigationNext:Se.string,keyNavigationPrevious:Se.string},xY={itemToKey:el.itemToKey,stateReducer:el.stateReducer,environment:el.environment,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},R4=Cr;process.env.NODE_ENV!=="production"&&(R4=function(e,t){Se.checkPropTypes(yY,e,"prop",t.name)});var Y1=process.env.NODE_ENV!=="production"?"__selected_item_click__":0,X1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_delete__":1,Z1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_backspace__":2,J1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_next__":3,Q1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_previous__":4,eS=process.env.NODE_ENV!=="production"?"__dropdown_keydown_navigation_previous__":5,tS=process.env.NODE_ENV!=="production"?"__dropdown_keydown_backspace__":6,rS=process.env.NODE_ENV!=="production"?"__dropdown_click__":7,nS=process.env.NODE_ENV!=="production"?"__function_add_selected_item__":8,iS=process.env.NODE_ENV!=="production"?"__function_remove_selected_item__":9,oS=process.env.NODE_ENV!=="production"?"__function_set_selected_items__":10,aS=process.env.NODE_ENV!=="production"?"__function_set_active_index__":11,sS=process.env.NODE_ENV!=="production"?"__function_reset__":12,wY=Object.freeze({__proto__:null,DropdownClick:rS,DropdownKeyDownBackspace:tS,DropdownKeyDownNavigationPrevious:eS,FunctionAddSelectedItem:nS,FunctionRemoveSelectedItem:iS,FunctionReset:sS,FunctionSetActiveIndex:aS,FunctionSetSelectedItems:oS,SelectedItemClick:Y1,SelectedItemKeyDownBackspace:Z1,SelectedItemKeyDownDelete:X1,SelectedItemKeyDownNavigationNext:J1,SelectedItemKeyDownNavigationPrevious:Q1});function SY(e,t){var r=t.type,n=t.index,i=t.props,o=t.selectedItem,a=e.activeIndex,s=e.selectedItems,c;switch(r){case Y1:c={activeIndex:n};break;case Q1:c={activeIndex:a-1<0?0:a-1};break;case J1:c={activeIndex:a+1>=s.length?-1:a+1};break;case Z1:case X1:{if(a<0)break;var u=a;s.length===1?u=-1:a===s.length-1&&(u=s.length-2),c=je({selectedItems:[].concat(s.slice(0,a),s.slice(a+1))},{activeIndex:u});break}case eS:c={activeIndex:s.length-1};break;case tS:c={selectedItems:s.slice(0,s.length-1)};break;case nS:c={selectedItems:[].concat(s,[o])};break;case rS:c={activeIndex:-1};break;case iS:{var d=a,h=s.findIndex(function(y){return i.itemToKey(y)===i.itemToKey(o)});if(h<0)break;s.length===1?d=-1:h===s.length-1&&(d=s.length-2),c={selectedItems:[].concat(s.slice(0,h),s.slice(h+1)),activeIndex:d};break}case oS:{var p=t.selectedItems;c={selectedItems:p};break}case aS:{var v=t.activeIndex;c={activeIndex:v};break}case sS:c={activeIndex:LC(i,"activeIndex"),selectedItems:LC(i,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return je({},e,c)}var EY=["refKey","ref","onClick","onKeyDown","selectedItem","index"],_Y=["refKey","ref","onKeyDown","onClick","preventKeyAction"];lS.stateChangeTypes=wY;function lS(e){e===void 0&&(e={}),R4(e,lS);var t=je({},xY,e),r=t.getA11yStatusMessage,n=t.environment,i=t.keyNavigationNext,o=t.keyNavigationPrevious,a=e4(SY,t,mY,bY),s=a[0],c=a[1],u=s.activeIndex,d=s.selectedItems,h=Cl(),p=C.useRef(null),v=C.useRef();v.current=[];var y=Sd({state:s,props:t});_1(r,s,[u,d],n),C.useEffect(function(){h||(u===-1&&p.current?p.current.focus():v.current[u]&&v.current[u].focus())},[u]),_d({props:t,state:s});var m=Ed("getDropdownProps"),g=C.useMemo(function(){var M;return M={},M[o]=function(){c({type:Q1})},M[i]=function(){c({type:J1})},M.Delete=function(){c({type:X1})},M.Backspace=function(){c({type:Z1})},M},[c,i,o]),w=C.useMemo(function(){var M;return M={},M[o]=function(z){BC(z)&&c({type:eS})},M.Backspace=function(z){BC(z)&&c({type:tS})},M},[c,o]),x=C.useCallback(function(M){var z,j=M===void 0?{}:M,W=j.refKey,U=W===void 0?"ref":W,A=j.ref,K=j.onClick,V=j.onKeyDown,te=j.selectedItem,G=j.index,re=Ir(j,EY),P=y.current.state,B=S1(te,G,P.selectedItems,"Pass either item or index to getSelectedItemProps!"),X=B[1],Q=X>-1&&X===P.activeIndex,D=function(){c({type:Y1,index:X})},$=function(H){var q=Ra(H);q&&g[q]&&g[q](H)};return je((z={},z[U]=zn(A,function(H){H&&v.current.push(H)}),z.tabIndex=Q?0:-1,z.onClick=st(K,D),z.onKeyDown=st(V,$),z),re)},[c,y,g]),_=C.useCallback(function(M,z){var j,W=M===void 0?{}:M,U=W.refKey,A=U===void 0?"ref":U,K=W.ref,V=W.onKeyDown,te=W.onClick,G=W.preventKeyAction,re=G===void 0?!1:G,P=Ir(W,_Y),B=z===void 0?{}:z,X=B.suppressRefError,Q=X===void 0?!1:X;m("getDropdownProps",Q,A,p);var D=function(H){var q=Ra(H);q&&w[q]&&w[q](H)},$=function(){c({type:rS})};return je((j={},j[A]=zn(K,function(H){H&&(p.current=H)}),j),!re&&{onKeyDown:st(V,D),onClick:st(te,$)},P)},[c,w,m]),S=C.useCallback(function(M){c({type:nS,selectedItem:M})},[c]),E=C.useCallback(function(M){c({type:iS,selectedItem:M})},[c]),I=C.useCallback(function(M){c({type:oS,selectedItems:M})},[c]),N=C.useCallback(function(M){c({type:aS,activeIndex:M})},[c]),T=C.useCallback(function(){c({type:sS})},[c]);return{getSelectedItemProps:x,getDropdownProps:_,addSelectedItem:S,removeSelectedItem:E,setSelectedItems:I,setActiveIndex:N,reset:T,selectedItems:d,activeIndex:u}}let OY=0;const CY=()=>{const e=C.useRef(null);return e.current===null&&(e.current=`select-${++OY}`),e.current},IY=e=>{const{items:t=[],isMulti:r=!1,isSearchable:n=!1,value:i,defaultValue:o,inputValue:a,onChange:s,onInputChange:c,getOptionLabel:u=le=>(le==null?void 0:le.label)||"",getOptionValue:d=le=>(le==null?void 0:le.value)||"",isOpen:h,onOpenChange:p,customOptionGenerator:v,disableInternalFiltering:y=!1,stateReducer:m,isDisabled:g=!1,clearSearchOnSelect:w=!1,closeMenuOnSelect:x,onSelectionComplete:_,id:S}=e,E=CY(),I=S||E,N=C.useCallback(le=>{const xe=u(le);if(typeof xe=="string")return xe;if(typeof xe=="number")return String(xe);const Ee=le;if(typeof Ee=="object"&&Ee!==null){if(typeof Ee.label=="string")return Ee.label;if(typeof Ee.name=="string")return Ee.name}return String(d(le))},[u,d]),T=le=>le?Array.isArray(le)?le:[le]:[],M=o!==void 0?o:i!==void 0?i:null,[z,j]=C.useState(()=>T(M)),[W,U]=C.useState(()=>{if(a!==void 0)return a;if(n&&!r){const le=T(M)[0];if(le!==void 0)return N(le)}return""}),[A,K]=C.useState(()=>h!==void 0?h:!1),V=i!==void 0?T(i):z,te=a!==void 0?a:W,G=h!==void 0?h:A,re=C.useRef(null),P=C.useRef(null),B=C.useRef(!1);C.useEffect(()=>{const le=xe=>{const Ee=xe.target,Ie=document.querySelectorAll(`[data-select-id="${I}"]`);B.current=Array.from(Ie).some(Te=>Te.contains(Ee))};return document.addEventListener("mousedown",le,!0),()=>document.removeEventListener("mousedown",le,!0)},[I]);const X=C.useCallback(le=>{h===void 0&&K(le),p==null||p(le)},[h,p]),Q=C.useCallback(le=>{i===void 0&&j(le);const xe=r?le:le[0]||null;s==null||s(xe)},[i,r,s]),D=C.useCallback(le=>{a===void 0&&U(le),c==null||c(le)},[a,c]),$=lS({selectedItems:V,onSelectedItemsChange:le=>{const xe=le.selectedItems||[];Q(xe)}}),H=C.useCallback(le=>{r&&$.removeSelectedItem(le)},[r,$]),q=C.useCallback(le=>{if(le){if(r)V.some(xe=>d(xe)===d(le))?H(le):$.addSelectedItem(le);else{const xe=V[0];(!xe||d(xe)!==d(le))&&Q([le])}_==null||_(d(le),le)}},[r,V,d,H,$,Q,_]);C.useEffect(()=>{if(P.current){const le=P.current;P.current=null,q(le)}}),C.useLayoutEffect(()=>{if(n&&G){const le=requestAnimationFrame(()=>{var xe;(xe=re.current)==null||xe.focus()});return()=>cancelAnimationFrame(le)}},[n,G]),C.useEffect(()=>{if(n&&!r&&a===void 0&&!G){const le=V[0],xe=le!==void 0?N(le):"";xe!==W&&U(xe)}},[V,G,n,r]);const[Y,ie]=C.useState(te);C.useEffect(()=>{const le=setTimeout(()=>ie(te),120);return()=>clearTimeout(le)},[te]);const ne=C.useMemo(()=>v?v(te,t):y||!n||!Y?t:t.filter(le=>N(le).toLowerCase().includes(Y.toLowerCase())),[t,te,Y,v,y,n,N]),ve={items:ne,itemToString:le=>le?N(le):"",isOpen:G,onIsOpenChange:({isOpen:le})=>{le!==void 0&&X(le)},selectedItem:r?null:V[0]||null},Z=le=>{const xe=new Map;for(const[Ee,Ie]of Object.entries(le.stateChangeTypes))xe.set(Ie,Ee);return(Ee,Ie)=>{const{changes:Te,type:Me}=Ie,Ze=x??!r,tt=[zr.stateChangeTypes.ItemClick,zr.stateChangeTypes.InputKeyDownEnter,zr.stateChangeTypes.FunctionSelectItem,xi.stateChangeTypes.ItemClick,xi.stateChangeTypes.ToggleButtonKeyDownEnter,xi.stateChangeTypes.ToggleButtonKeyDownSpaceButton,xi.stateChangeTypes.FunctionSelectItem].includes(Me);if((Me===zr.stateChangeTypes.InputBlur||Me===xi.stateChangeTypes.ToggleButtonBlur)&&typeof document<"u"){const Fe=document.activeElement,Le=document.querySelectorAll(`[data-select-id="${I}"]`),ze=!!Fe&&Array.from(Le).some(Pt=>Pt.contains(Fe)),Je=Fe===document.body,rt=r&&Je&&B.current;if(ze||rt)return{...Te,isOpen:!0}}if(tt){const Fe=Te.selectedItem||null;Fe&&(P.current=Fe);const Le={...Te};return r?(Le.selectedItem=null,Le.isOpen=!Ze,Le.highlightedIndex=Ee.highlightedIndex,Le.inputValue=""):Fe&&(w?Le.inputValue="":n&&(Le.inputValue=N(Fe)),x===!1&&(Le.isOpen=!0,Le.highlightedIndex=Ee.highlightedIndex)),Le}return n&&!tt&&Me!==zr.stateChangeTypes.InputChange&&(Me===zr.stateChangeTypes.ControlledPropUpdatedSelectedItem||Me===zr.stateChangeTypes.FunctionSetInputValue||Me===zr.stateChangeTypes.InputBlur||Me===zr.stateChangeTypes.FunctionReset)?{...Te,inputValue:Ee.inputValue}:m?m(Ee,{...Ie,type:xe.get(Ie.type)||Ie.type,changes:Te}):Te}},J=n?zr({...ve,inputValue:te,onInputValueChange:({inputValue:le,type:xe})=>{!r&&!le&&xe===zr.stateChangeTypes.InputChange&&Q([]),D(le||"")},stateReducer:Z(zr),id:I}):xi({...ve,stateReducer:Z(xi),id:I}),ae=C.useCallback(()=>{g||("toggleMenu"in J&&typeof J.toggleMenu=="function"?J.toggleMenu():X(!G))},[J,g,X,G]),he=C.useCallback(()=>{g||("openMenu"in J&&typeof J.openMenu=="function"?J.openMenu():X(!0))},[J,g,X]),ue=C.useCallback(()=>{"closeMenu"in J&&typeof J.closeMenu=="function"?J.closeMenu():X(!1)},[J,X]),de=C.useCallback(()=>{Q([]),D(""),r&&$.reset()},[Q,D,r,$]);return{isOpen:J.isOpen,selectedItem:J.selectedItem,highlightedIndex:J.highlightedIndex,inputValue:te,getToggleButtonProps:J.getToggleButtonProps,getMenuProps:J.getMenuProps,getItemProps:J.getItemProps,getInputProps:n?(le,xe)=>({..."getInputProps"in J?J.getInputProps(le,xe):{},ref:re,value:te}):void 0,selectedItems:V,filteredItems:ne,setInputValue:D,setIsOpen:X,toggleMenu:ae,openMenu:he,closeMenu:ue,clearSelection:de,selectItem:"selectItem"in J?J.selectItem:void 0,removeItem:H,multipleSelection:$,isMulti:r,isSearchable:n,inputRef:re,selectId:I}},N4=({size:e="md",color:t="primary",isInvalid:r=!1,isDisabled:n=!1,className:i,children:o,options:a=[],value:s,defaultValue:c,onChange:u,isMulti:d,inputValue:h,onInputChange:p,isSearchable:v,isOpen:y,onOpenChange:m,customOptionGenerator:g,disableInternalFiltering:w,getOptionLabel:x=j=>typeof j=="string"||typeof j=="number"?String(j):(j==null?void 0:j.label)||(j==null?void 0:j.name)||String(j),getOptionValue:_=j=>typeof j=="string"||typeof j=="number"?String(j):(j==null?void 0:j.value)||(j==null?void 0:j.id)||(j==null?void 0:j.name)||String(j),isOptionDisabled:S=j=>(j==null?void 0:j.isDisabled)||!1,stateReducer:E,clearSearchOnSelect:I,closeMenuOnSelect:N,inputClassName:T,onSelectionComplete:M,...z})=>{const[j,W]=C.useState(!1),[U,A]=C.useState(!1),K=C.useRef(null),[V,te]=C.useState(!1),[G,re]=C.useState("bottom"),P=C.useRef(new Set),B=C.useCallback(H=>(P.current.add(H),()=>P.current.delete(H)),[]),X=C.useCallback((H,q)=>{M==null||M(H,q),P.current.forEach(Y=>Y(H,q))},[M]),Q=C.useMemo(()=>bK(a),[a]),D=IY({items:Q,value:s,defaultValue:c,onChange:u,isMulti:d,inputValue:h,onInputChange:p,isSearchable:v,isOpen:y,onOpenChange:m,getOptionLabel:x,getOptionValue:_,customOptionGenerator:g,disableInternalFiltering:w,stateReducer:E,isDisabled:n,clearSearchOnSelect:I,closeMenuOnSelect:N,onSelectionComplete:X}),$={size:e,color:r?"negative":t,isInvalid:r,isDisabled:n,hasMessage:j,setHasMessage:W,hasGroup:U,setHasGroup:A,groupRef:K,menuVisible:V,setMenuVisible:te,menuPlacement:G,setMenuPlacement:re,downshift:D,options:a,getOptionLabel:x,getOptionValue:_,isOptionDisabled:S,inputClassName:T,registerOnSelectionComplete:B};return O.jsx(C3.Provider,{value:$,children:O.jsx("div",{"data-qui":"Select","data-select-id":D.selectId,className:ye(QG(),i),...z,children:o})})},RY=C.forwardRef(({className:e,children:t,isFocused:r,isDisabled:n,...i},o)=>{const{size:a,color:s,isDisabled:c,hasMessage:u,hasGroup:d,downshift:h,isInvalid:p,menuPlacement:v}=or(),y=n??c,m=r??h.isOpen;return O.jsx("div",{ref:o,className:ye(rK({size:a,color:s,isDisabled:y,isFocused:!!m,isInvalid:p&&!h.isOpen,hasMessage:u,hasGroup:d,menuPlacement:h.isOpen?v:void 0}),e),"aria-disabled":y,"aria-invalid":p,role:"combobox",tabIndex:y?-1:0,...i,children:t})}),NY=({className:e,children:t,isMulti:r})=>O.jsx("div",{className:ye(nK({isMulti:r}),e),children:t}),xu=C.forwardRef(({isHidden:e,inputClassName:t,className:r,...n},i)=>{const{size:o,color:a}=or();return e?O.jsx("input",{ref:i,type:"text",className:r,style:{position:"absolute",top:0,left:0,opacity:0,width:"100%",height:"100%",pointerEvents:"none"},tabIndex:-1,...n}):O.jsx("input",{ref:i,type:"text","data-qui":"SelectSearchInput",className:ye(iK({size:o,color:a}),t,e?"":r),...n})}),TY=({className:e,children:t})=>{const{size:r,color:n}=or();return O.jsx("div",{className:ye(oK({size:r,color:n}),e),children:t})},PY=({className:e,children:t,data:r,isDisabled:n})=>{const{size:i,color:o,getOptionLabel:a}=or();return O.jsx("div",{className:ye(aK({size:i,color:o,isDisabled:n}),e),children:t||a(r)})},T4=({className:e,children:t,data:r,isDisabled:n,isFocused:i,onRemove:o})=>{const{size:a,color:s,downshift:c,getOptionLabel:u}=or(),d=()=>{o?o(r):c.removeItem(r)};return O.jsxs("div",{className:ye(sK({size:a,color:s,isDisabled:n,isFocused:i}),e),children:[O.jsx("div",{className:lK({size:a}),children:t||u(r)}),!n&&O.jsx("div",{className:cK({size:a,color:s,isDisabled:!1}),onClick:d,children:O.jsx(hd,{className:"w-3 h-3"})})]})},P4=({color:e,className:t,children:r,onClick:n,isDisabled:i,...o})=>{const{size:a,color:s,isDisabled:c,downshift:u}=or(),d=i??c,h=u.selectedItems.length>0;if(d||!h)return null;const p=v=>{v.stopPropagation(),n?n(v):u.clearSelection()};return O.jsx("div",{className:ye(R3({size:a,color:e||s,isDisabled:d}),t),onClick:p,role:"button",tabIndex:0,"aria-label":"Clear selection",...o,children:r||O.jsx(QD,{})})},MY=({className:e,children:t,onClick:r,isDisabled:n,...i})=>{const{size:o,color:a,isDisabled:s,downshift:c}=or(),u=n??s,d=c.inputValue.length>0&&c.isSearchable;if(u||!d)return null;const h=p=>{u||(p.preventDefault(),p.stopPropagation(),r?r(p):(c.setInputValue(""),c.clearSelection()))};return O.jsx("div",{"data-qui":"SelectIndicator",className:ye(R3({size:o,color:a,isDisabled:u}),"cursor-pointer",e),onClick:h,onMouseDown:p=>{p.preventDefault(),p.stopPropagation()},role:"button",tabIndex:-1,"aria-label":"Clear selection",...i,children:t||O.jsx(hd,{})})},M4=C.forwardRef(({color:e,className:t,children:r,onClick:n,isDisabled:i,...o},a)=>{const{size:s,color:c,isDisabled:u,downshift:d}=or(),h=i??u,p=d.isOpen,v=m=>{h||(m.preventDefault(),m.stopPropagation(),n?n(m):d.toggleMenu())},y=m=>{m.preventDefault(),m.stopPropagation()};return O.jsx("div",{ref:a,"data-qui":"SelectIndicator",className:ye(uK({size:s,color:e||c,isDisabled:h}),"cursor-pointer",t),onClick:y,onMouseDown:v,role:"button",tabIndex:-1,"aria-label":p?"Close menu":"Open menu","aria-expanded":p,"aria-disabled":h,...o,children:r||O.jsx(rj,{className:ye("transition-transform duration-200",{"rotate-180":p})})})}),kY=C.forwardRef(({className:e,children:t,placement:r,...n},i)=>{const{size:o,hasMessage:a,color:s,hasGroup:c}=or();return O.jsx("div",{"data-qui":"SelectMenu",ref:i,className:ye(dK({size:o,placement:r,hasMessage:a,color:s,hasGroup:c}),e),...n,children:t})}),AY=C.forwardRef(({className:e,children:t,maxHeight:r=300,totalHeight:n,...i},o)=>{const{size:a}=or();return O.jsx(a1,{scrollableNodeProps:{ref:o},className:ye(fK({size:a}),e),style:{maxHeight:r},...i,children:n!==void 0?O.jsx("div",{style:{height:n,position:"relative",width:"100%"},children:t}):t})}),wu=({className:e,children:t,data:r,isDisabled:n,isFocused:i,isSelected:o,innerProps:a,optionClassName:s,...c})=>{const{size:u,color:d,getOptionLabel:h}=or();return O.jsx("div",{"data-qui":"SelectOption",className:ye(hK({size:u,color:d,isDisabled:n,isFocused:i,isSelected:o}),s,e),...a,...c,children:t??h(r)})},k4=({className:e,children:t,data:r,label:n,renderGroupHeading:i})=>{const{size:o}=or();return O.jsxs("div",{"data-qui":"SelectOptionGroup",className:ye(pK({size:o}),e),children:[O.jsx(DY,{children:i?i(r):n||r.label}),t]})},DY=({className:e,children:t})=>{const{size:r,color:n}=or();return O.jsx("div",{className:ye(vK({size:r,color:n}),e),children:t})},Gh=({className:e,children:t,inputValue:r})=>{const{size:n}=or();return O.jsx("div",{className:ye(mK({size:n}),e),children:t||`No options found${r?` for "${r}"`:""}`})},A4=C.forwardRef(({className:e,children:t,...r},n)=>{const{size:i,color:o,isDisabled:a,hasMessage:s,isInvalid:c,setHasGroup:u,groupRef:d,menuVisible:h,menuPlacement:p}=or();return C.useEffect(()=>(u(!0),()=>{u(!1)}),[u]),O.jsx("div",{ref:ga([n,d]),"data-qui":"SelectGroup",className:ye(eK({size:i,color:o,isDisabled:a,hasMessage:s,isInvalid:c,isFocused:h,menuPlacement:h?p:void 0}),e),...r,children:t})}),jY=C.forwardRef(({isAction:e=!1,className:t,isDisabled:r=!1,style:n,children:i,...o},a)=>{const{size:s,color:c,isDisabled:u}=or(),d=r||u,h=tK({size:s,color:c,isDisabled:d,isAction:e});return O.jsx("div",{ref:a,"data-qui":"SelectIcon",className:ye(h,t),style:n,role:e||o.onClick?"button":void 0,tabIndex:(e||o.onClick)&&!d?0:void 0,"aria-disabled":d,...o,children:i})}),qY=({isOpen:e,usePortal:t,controlRef:r,selectId:n,children:i})=>{const[o,a]=C.useState(null);return C.useLayoutEffect(()=>{if(t&&e&&r.current){const s=()=>{var c;const u=(c=r.current)==null?void 0:c.closest('[data-qui="SelectGroup"]'),d=u||r.current;if(!d)return;const h=d.getBoundingClientRect();a(u?{top:h.top+window.scrollY+u.clientTop,left:h.left+window.scrollX+u.clientLeft,width:u.clientWidth,height:u.clientHeight}:{top:h.top+window.scrollY,left:h.left+window.scrollX,width:h.width,height:h.height})};return s(),window.addEventListener("resize",s),window.addEventListener("scroll",s,!0),()=>{window.removeEventListener("resize",s),window.removeEventListener("scroll",s,!0)}}},[e,t,r]),e?t&&o?xn.createPortal(O.jsx("div",{"data-qui":"SelectPortal","data-select-id":n,style:{position:"absolute",top:o.top,left:o.left,width:o.width,height:o.height,zIndex:50,pointerEvents:"none"},children:O.jsx("div",{style:{pointerEvents:"auto"},children:i})}),document.body):O.jsx(O.Fragment,{children:i}):null},ga=e=>t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&"current"in r&&(r.current=t)})},zY=e=>{let t=0,r=window.innerHeight,n=e.parentElement;for(;n&&n!==document.body&&n!==document.documentElement;){const{overflowY:i}=window.getComputedStyle(n);if(i!=="visible"){const o=n.getBoundingClientRect();t=Math.max(t,o.top),r=Math.min(r,o.bottom)}n=n.parentElement}return{top:t,bottom:r}},D4=C.forwardRef(({placeholder:e,noOptionsMessage:t,hideNoOptions:r=!1,loadingMessage:n="Loading...",isClearable:i=!1,isSearchClearable:o=!1,isLoading:a=!1,isRequired:s=!1,hideIndicators:c=!1,hideDropdownIndicator:u=!1,searchPlacement:d="trigger",menuPlacement:h="bottom",hideSelectedOptions:p=!1,onFocus:v,onBlur:y,renderMenuHeader:m,formatOptionLabel:g,renderOption:w,optionClassName:x,renderValue:_,renderGroupHeading:S,inputRef:E,controlShouldRenderValue:I=!0,name:N,id:T,onSelectionComplete:M,"aria-label":z,"aria-labelledby":j,"aria-describedby":W,children:U,usePortal:A=!1,virtualizeThreshold:K=100,className:V,inputClassName:te,...G},re)=>{const{size:P,isInvalid:B,isDisabled:X,hasGroup:Q,downshift:D,options:$=[],getOptionLabel:H,getOptionValue:q,isOptionDisabled:Y,menuPlacement:ie,setMenuPlacement:ne,menuVisible:ve,setMenuVisible:Z,inputClassName:J}=or(),ae=te||J,he=C.useMemo(()=>{if(w)return w;if(g)return({data:ke})=>g(ke)},[w,g]),ue=C.useRef(null),de=E||ue,le=C.useRef(null),[xe,Ee]=C.useState(null),Ie=C.useRef(null),{isOpen:Te,openMenu:Me,selectedItem:Ze,inputValue:tt,highlightedIndex:Fe,getToggleButtonProps:Le,getMenuProps:ze,getInputProps:Je,getItemProps:rt,isMulti:Pt,isSearchable:gt,multipleSelection:Rt}=D,{getDropdownProps:qt}=Rt;C.useLayoutEffect(()=>{if(!Te)return;if(h==="top"||h==="bottom"){ne(h);return}const ke=le.current;if(!ke)return;const $e=()=>{const Ht=ke.getBoundingClientRect(),wr=A?{top:0,bottom:window.innerHeight}:zY(ke),Sr=wr.bottom-Ht.bottom,tr=Ht.top-wr.top,un=P==="sm"?22:P==="lg"?36:28,Yr=Math.min((D.filteredItems.length||1)*un+16,300),ci=xe==null?void 0:xe.getBoundingClientRect().height,Ni=ci&&ci>0?ci:Yr,Qa=Sr>=Ni;ne(!Qa&&tr>Sr?"top":"bottom")};$e(),window.addEventListener("resize",$e),window.addEventListener("scroll",$e,!0);const xr=xe&&typeof ResizeObserver<"u"?new ResizeObserver(()=>$e()):void 0;return xe&&(xr==null||xr.observe(xe)),()=>{window.removeEventListener("resize",$e),window.removeEventListener("scroll",$e,!0),xr==null||xr.disconnect()}},[Te,ne,P,D.filteredItems.length,h,A,xe]),C.useLayoutEffect(()=>{const ke=Te&&!(r&&D.filteredItems.length===0);return Z(ke),()=>Z(!1)},[Te,r,D.filteredItems.length,Z]);const Ot=Pt?D.selectedItems??[]:Ze?[Ze]:[],Gr=Ot.length>0,Kr=o&&!!tt&&!X&&!c,ar=i&&(Gr||!!tt)&&!X&&!c,Nn=!u&&!c,io=!Gr&&(!gt||!tt)||!I,zt={},Mt={};Object.entries(G).forEach(([ke,$e])=>{ke.startsWith("data-")||ke.startsWith("aria-")||ke==="role"?zt[ke]=$e:Mt[ke]=$e});const Lt=C.useMemo(()=>ga([le,re]),[re]),fr=ze({},{suppressRefError:!0}),kt=qt({preventKeyAction:Te}),At={ref:de,disabled:X,required:s,name:N,id:T,"aria-label":z,"aria-labelledby":j,"aria-describedby":W,"aria-invalid":B,onFocus:v,onBlur:y,...Mt},hr=gt?(Je==null?void 0:Je({...At,...kt}))??At:{...At,...kt},{ref:Mr,...Et}=hr,Bt=C.useMemo(()=>ga([Mr]),[Mr]),{ref:pr,...vr}=fr,yr=C.useRef(pr);yr.current=pr;const sr=C.useCallback(ke=>{Ee($e=>$e===ke?$e:ke),ga([yr.current])(ke)},[]),Tn=ke=>Ot.some($e=>q($e)===q(ke)),Un=ke=>p?ke.filter($e=>!Tn($e)):ke,Za=ke=>p?ke.map($e=>({...$e,options:Un($e.options)})).filter($e=>$e.options.length>0):ke,Gn=Nw($)?[]:Un(D.filteredItems),Ja={sm:22,md:28,lg:36}[P]??28,Kn=Gn.length>=K,Ri=JG({count:Kn?Gn.length:0,getScrollElement:()=>Ie.current,estimateSize:()=>Ja,overscan:5});C.useEffect(()=>{Kn&&Te&&Fe>=0&&Fe<Gn.length&&Ri.scrollToIndex(Fe,{align:"auto"})},[Fe,Kn,Te]);const{registerOnSelectionComplete:Bo}=or();C.useEffect(()=>{if(M)return Bo(M)},[M,Bo]);const Fo=gt?{}:Le({disabled:X,...kt,ref:ga([Lt,kt.ref])});return O.jsxs("div",{className:ye({relative:!Q,"flex-1 min-w-0":Q}),children:[O.jsxs(RY,{"data-qui":"SelectControl",className:V,...gt?{ref:ga([Lt,kt.ref])}:Fo,...zt,isFocused:ve,isDisabled:X,onClick:ke=>{ke.defaultPrevented||(gt?Me():D.toggleMenu())},children:[U||O.jsxs(NY,{isMulti:Pt,children:[Pt&&I&&Ot.map((ke,$e)=>O.jsx(T4,{data:ke,index:$e,isDisabled:X,children:_?_(ke):void 0},q(ke))),!Pt&&Gr&&I&&!gt&&O.jsx("div",{className:"flex items-center gap-2",children:O.jsx(PY,{data:Ot[0],isDisabled:X,children:_?_(Ot[0]):H(Ot[0])})}),gt&&d==="trigger"?O.jsx(xu,{ref:Bt,...Et,className:V,inputClassName:ae,placeholder:e}):O.jsxs(O.Fragment,{children:[O.jsx(xu,{ref:Bt,...Et,className:V,inputClassName:ae,isHidden:!0,readOnly:!0,value:Ot.map(ke=>q(ke)).join(",")}),io&&O.jsx(TY,{children:e})]})]}),O.jsxs("div",{className:ye("flex items-center size-fit gap-1",{hidden:!ar&&!Nn}),children:[Kr&&O.jsx(MY,{}),ar&&O.jsx(P4,{}),Nn&&O.jsx(M4,{...gt?Le({disabled:X,"aria-label":Te?"Close menu":"Open menu"}):{}})]})]}),!Te&&O.jsx("div",{ref:fr.ref,style:{display:"none"},"aria-hidden":"true"}),O.jsx(qY,{isOpen:Te,usePortal:A,controlRef:le,selectId:D.selectId,children:r&&D.filteredItems.length===0?O.jsx("div",{...vr,style:{display:"none"},"aria-hidden":"true"}):O.jsxs(kY,{ref:sr,...vr,placement:ie,children:[m&&m(D),gt&&d==="menu"&&O.jsx("div",{className:"p-2",children:O.jsx(xu,{ref:Bt,...Et,className:V,inputClassName:ae,autoFocus:!0,placeholder:e,onClick:ke=>ke.stopPropagation()})}),O.jsx(AY,{ref:Ie,totalHeight:Kn?Ri.getTotalSize():void 0,children:a?O.jsx("div",{className:gK({size:P}),children:n}):D.filteredItems.length===0?O.jsx(Gh,{inputValue:tt,children:typeof t=="function"?t(tt):t}):Nw($)?(()=>{const ke=Za($);return ke.length===0?O.jsx(Gh,{inputValue:tt,children:typeof t=="function"?t(tt):t}):ke.map(($e,xr)=>O.jsx(k4,{data:$e,label:$e.label,options:$e.options,renderGroupHeading:S,children:$e.options.map(Ht=>{const wr=q(Ht),Sr=Ot.some(Ni=>q(Ni)===wr),tr=D.filteredItems.indexOf(Ht),un=Fe===tr,Yr=Y(Ht),ci=rt({item:Ht,index:tr});return O.jsx(wu,{...ci,data:Ht,isDisabled:Yr,isFocused:un,isSelected:Sr,optionClassName:x,children:he?he({data:Ht,isFocused:un,isSelected:Sr,isDisabled:Yr}):void 0},`${wr}-${tr}`)})},`${$e.label}-${xr}`))})():Gn.length===0?O.jsx(Gh,{inputValue:tt,children:typeof t=="function"?t(tt):t}):Kn?Ri.getVirtualItems().map(ke=>{const $e=Gn[ke.index],xr=q($e),Ht=Ot.some(Yr=>q(Yr)===xr),wr=D.filteredItems.indexOf($e),Sr=Fe===wr,tr=Y($e),un=rt({item:$e,index:wr});return O.jsx("div",{"data-index":ke.index,ref:Ri.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${ke.start}px)`},children:O.jsx(wu,{...un,data:$e,isDisabled:tr,isFocused:Sr,isSelected:Ht,optionClassName:x,children:he?he({data:$e,isFocused:Sr,isSelected:Ht,isDisabled:tr}):void 0})},ke.key)}):Gn.map(ke=>{const $e=q(ke),xr=Ot.some(un=>q(un)===$e),Ht=D.filteredItems.indexOf(ke),wr=Fe===Ht,Sr=Y(ke),tr=rt({item:ke,index:Ht});return O.jsx(wu,{...tr,data:ke,isDisabled:Sr,isFocused:wr,isSelected:xr,optionClassName:x,children:he?he({data:ke,isFocused:wr,isSelected:xr,isDisabled:Sr}):void 0},`${$e}-${Ht}`)})})]})})]})});N4.displayName="Select.Root";A4.displayName="Select.Group";jY.displayName="Select.Icon";xu.displayName="Select.Input";T4.displayName="Select.MultiValue";P4.displayName="Select.ClearIndicator";M4.displayName="Select.DropdownIndicator";wu.displayName="Select.Option";k4.displayName="Select.OptionGroup";const LY=D4;LY.displayName="Select.Field";const Kh={Root:N4,Group:A4,Field:D4};C.createContext(void 0);const BY=({active:e,disabled:t,error:r,isOpen:n,className:i})=>ye("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":e&&!t,"text-negative":r&&!e&&!t,"bg-primary-hover text-body":n&&!e&&!t,"text-body":!e&&!t&&!r,"hover:bg-primary-hover hover:text-tab-active-fg":!t&&!e},i),FY=C.forwardRef(({active:e,disabled:t,error:r,isOpen:n,className:i,children:o,as:a="div",...s},c)=>{const u=BY({active:e,disabled:t,error:r,isOpen:n,className:i});return O.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:o})});FY.displayName="ListItem";function $Y({qodly:e,activeTab:t,forceLogin:r,canUndo:n,canRedo:i,onUndo:o,onRedo:a,onTabChange:s,restrictedByDefault:c,onRestrictedByDefaultChange:u,onForceLoginChange:d}){return O.jsx(O.Fragment,{children:O.jsx(br,{depth:1,className:"relative mb-0 flex h-auto flex-wrap items-center justify-between border-b px-4 py-3",children:O.jsx("div",{className:"flex w-full flex-wrap items-center justify-between",children:O.jsxs("div",{className:"relative flex w-full justify-between",children:[O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsxs(zh,{defaultValue:t,onTabChange:h=>s(h),children:[O.jsx(zh.Item,{label:"Roles",value:"roles","data-cy":"roles_btn_navbar",className:"min-w-[110px] place-content-center"}),O.jsx(zh.Item,{label:"Privileges",value:"privileges","data-cy":"privileges_btn_navbar",className:"min-w-[110px] place-content-center"})]}),O.jsxs("div",{className:"flex items-center gap-1",children:[O.jsx(pe.ToolbarIcon,{"data-cy":"roles-toolbar-undo-button",label:"Undo",disabled:!n,Icon:Tu.FdUndo,as:"button",onClick:n?o:void 0}),O.jsx(pe.ToolbarIcon,{"data-cy":"roles-toolbar-redo-button",label:"Redo",disabled:!i,Icon:Tu.FdRedo,as:"button",onClick:i?a:void 0})]})]}),O.jsxs("div",{className:"flex gap-2 justify-between",children:[O.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[O.jsx(Fu,{checked:c||!1,onChange:h=>{u(h)}}),O.jsx("span",{className:"px-1 text-xs",children:"Restrict Access By Default"}),O.jsx(pe.Tip,{tipKey:"editors:roles:toolbar:restrictedByDefault",alwaysOn:!0,side:"left"})]}),e===!1&&O.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[O.jsx(Fu,{checked:r||!1,onChange:h=>{d(h)}}),O.jsx("span",{className:"px-1 text-xs",children:"Force login"}),O.jsx(pe.Tip,{tipKey:"editors:roles:toolbar:forceLogin",alwaysOn:!0,side:"left"})]})]})]})})})})}const j4=C.createContext(void 0),VY=({children:e})=>{const[t,r]=C.useState(null),[n,i]=C.useState(null);function o(s){r(s),setTimeout(()=>i(s),0)}const a={selectedRole:t,deferredSelectedRole:n,selectRole:o};return O.jsx(j4.Provider,{value:a,children:e})};function cS(){const e=C.useContext(j4);if(e===void 0)throw new Error("useSelectedRole must be used within a SelectedRoleProvider");return e}var FC=function(t){return t.reduce(function(r,n){var i=n[0],o=n[1];return r[i]=o,r},{})},$C=typeof window<"u"&&window.document&&window.document.createElement?nt.useLayoutEffect:nt.useEffect,$r="top",En="bottom",_n="right",Vr="left",uS="auto",Il=[$r,En,_n,Vr],Na="start",dl="end",HY="clippingParents",q4="viewport",Es="popper",WY="reference",VC=Il.reduce(function(e,t){return e.concat([t+"-"+Na,t+"-"+dl])},[]),z4=[].concat(Il,[uS]).reduce(function(e,t){return e.concat([t,t+"-"+Na,t+"-"+dl])},[]),UY="beforeRead",GY="read",KY="afterRead",YY="beforeMain",XY="main",ZY="afterMain",JY="beforeWrite",QY="write",eX="afterWrite",tX=[UY,GY,KY,YY,XY,ZY,JY,QY,eX];function ai(e){return e?(e.nodeName||"").toLowerCase():null}function sn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function To(e){var t=sn(e).Element;return e instanceof t||e instanceof Element}function Sn(e){var t=sn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function dS(e){if(typeof ShadowRoot>"u")return!1;var t=sn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function rX(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},o=t.elements[r];!Sn(o)||!ai(o)||(Object.assign(o.style,n),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function nX(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 i=t.elements[n],o=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},{});!Sn(i)||!ai(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const iX={name:"applyStyles",enabled:!0,phase:"write",fn:rX,effect:nX,requires:["computeStyles"]};function ni(e){return e.split("-")[0]}var _o=Math.max,Yu=Math.min,Ta=Math.round;function kw(){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 L4(){return!/^((?!chrome|android).)*safari/i.test(kw())}function Pa(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&Sn(e)&&(i=e.offsetWidth>0&&Ta(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Ta(n.height)/e.offsetHeight||1);var a=To(e)?sn(e):window,s=a.visualViewport,c=!L4()&&r,u=(n.left+(c&&s?s.offsetLeft:0))/i,d=(n.top+(c&&s?s.offsetTop:0))/o,h=n.width/i,p=n.height/o;return{width:h,height:p,top:d,right:u+h,bottom:d+p,left:u,x:u,y:d}}function fS(e){var t=Pa(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 B4(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&dS(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ei(e){return sn(e).getComputedStyle(e)}function oX(e){return["table","td","th"].indexOf(ai(e))>=0}function Qi(e){return((To(e)?e.ownerDocument:e.document)||window.document).documentElement}function Od(e){return ai(e)==="html"?e:e.assignedSlot||e.parentNode||(dS(e)?e.host:null)||Qi(e)}function HC(e){return!Sn(e)||Ei(e).position==="fixed"?null:e.offsetParent}function aX(e){var t=/firefox/i.test(kw()),r=/Trident/i.test(kw());if(r&&Sn(e)){var n=Ei(e);if(n.position==="fixed")return null}var i=Od(e);for(dS(i)&&(i=i.host);Sn(i)&&["html","body"].indexOf(ai(i))<0;){var o=Ei(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Rl(e){for(var t=sn(e),r=HC(e);r&&oX(r)&&Ei(r).position==="static";)r=HC(r);return r&&(ai(r)==="html"||ai(r)==="body"&&Ei(r).position==="static")?t:r||aX(e)||t}function hS(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function tl(e,t,r){return _o(e,Yu(t,r))}function sX(e,t,r){var n=tl(e,t,r);return n>r?r:n}function F4(){return{top:0,right:0,bottom:0,left:0}}function $4(e){return Object.assign({},F4(),e)}function V4(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var lX=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,$4(typeof t!="number"?t:V4(t,Il))};function cX(e){var t,r=e.state,n=e.name,i=e.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,s=ni(r.placement),c=hS(s),u=[Vr,_n].indexOf(s)>=0,d=u?"height":"width";if(!(!o||!a)){var h=lX(i.padding,r),p=fS(o),v=c==="y"?$r:Vr,y=c==="y"?En:_n,m=r.rects.reference[d]+r.rects.reference[c]-a[c]-r.rects.popper[d],g=a[c]-r.rects.reference[c],w=Rl(o),x=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,_=m/2-g/2,S=h[v],E=x-p[d]-h[y],I=x/2-p[d]/2+_,N=tl(S,I,E),T=c;r.modifiersData[n]=(t={},t[T]=N,t.centerOffset=N-I,t)}}function uX(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||B4(t.elements.popper,i)&&(t.elements.arrow=i))}const dX={name:"arrow",enabled:!0,phase:"main",fn:cX,effect:uX,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ma(e){return e.split("-")[1]}var fX={top:"auto",right:"auto",bottom:"auto",left:"auto"};function hX(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:Ta(r*i)/i||0,y:Ta(n*i)/i||0}}function WC(e){var t,r=e.popper,n=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,c=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,h=e.isFixed,p=a.x,v=p===void 0?0:p,y=a.y,m=y===void 0?0:y,g=typeof d=="function"?d({x:v,y:m}):{x:v,y:m};v=g.x,m=g.y;var w=a.hasOwnProperty("x"),x=a.hasOwnProperty("y"),_=Vr,S=$r,E=window;if(u){var I=Rl(r),N="clientHeight",T="clientWidth";if(I===sn(r)&&(I=Qi(r),Ei(I).position!=="static"&&s==="absolute"&&(N="scrollHeight",T="scrollWidth")),I=I,i===$r||(i===Vr||i===_n)&&o===dl){S=En;var M=h&&I===E&&E.visualViewport?E.visualViewport.height:I[N];m-=M-n.height,m*=c?1:-1}if(i===Vr||(i===$r||i===En)&&o===dl){_=_n;var z=h&&I===E&&E.visualViewport?E.visualViewport.width:I[T];v-=z-n.width,v*=c?1:-1}}var j=Object.assign({position:s},u&&fX),W=d===!0?hX({x:v,y:m},sn(r)):{x:v,y:m};if(v=W.x,m=W.y,c){var U;return Object.assign({},j,(U={},U[S]=x?"0":"",U[_]=w?"0":"",U.transform=(E.devicePixelRatio||1)<=1?"translate("+v+"px, "+m+"px)":"translate3d("+v+"px, "+m+"px, 0)",U))}return Object.assign({},j,(t={},t[S]=x?m+"px":"",t[_]=w?v+"px":"",t.transform="",t))}function pX(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,o=r.adaptive,a=o===void 0?!0:o,s=r.roundOffsets,c=s===void 0?!0:s,u={placement:ni(t.placement),variation:Ma(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,WC(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,WC(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 vX={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:pX,data:{}};var Uc={passive:!0};function gX(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,o=i===void 0?!0:i,a=n.resize,s=a===void 0?!0:a,c=sn(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(d){d.addEventListener("scroll",r.update,Uc)}),s&&c.addEventListener("resize",r.update,Uc),function(){o&&u.forEach(function(d){d.removeEventListener("scroll",r.update,Uc)}),s&&c.removeEventListener("resize",r.update,Uc)}}const mX={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:gX,data:{}};var bX={left:"right",right:"left",bottom:"top",top:"bottom"};function Su(e){return e.replace(/left|right|bottom|top/g,function(t){return bX[t]})}var yX={start:"end",end:"start"};function UC(e){return e.replace(/start|end/g,function(t){return yX[t]})}function pS(e){var t=sn(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function vS(e){return Pa(Qi(e)).left+pS(e).scrollLeft}function xX(e,t){var r=sn(e),n=Qi(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,c=0;if(i){o=i.width,a=i.height;var u=L4();(u||!u&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:s+vS(e),y:c}}function wX(e){var t,r=Qi(e),n=pS(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=_o(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=_o(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+vS(e),c=-n.scrollTop;return Ei(i||r).direction==="rtl"&&(s+=_o(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:c}}function gS(e){var t=Ei(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function H4(e){return["html","body","#document"].indexOf(ai(e))>=0?e.ownerDocument.body:Sn(e)&&gS(e)?e:H4(Od(e))}function rl(e,t){var r;t===void 0&&(t=[]);var n=H4(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=sn(n),a=i?[o].concat(o.visualViewport||[],gS(n)?n:[]):n,s=t.concat(a);return i?s:s.concat(rl(Od(a)))}function Aw(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function SX(e,t){var r=Pa(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 GC(e,t,r){return t===q4?Aw(xX(e,r)):To(t)?SX(t,r):Aw(wX(Qi(e)))}function EX(e){var t=rl(Od(e)),r=["absolute","fixed"].indexOf(Ei(e).position)>=0,n=r&&Sn(e)?Rl(e):e;return To(n)?t.filter(function(i){return To(i)&&B4(i,n)&&ai(i)!=="body"}):[]}function _X(e,t,r,n){var i=t==="clippingParents"?EX(e):[].concat(t),o=[].concat(i,[r]),a=o[0],s=o.reduce(function(c,u){var d=GC(e,u,n);return c.top=_o(d.top,c.top),c.right=Yu(d.right,c.right),c.bottom=Yu(d.bottom,c.bottom),c.left=_o(d.left,c.left),c},GC(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 W4(e){var t=e.reference,r=e.element,n=e.placement,i=n?ni(n):null,o=n?Ma(n):null,a=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,c;switch(i){case $r:c={x:a,y:t.y-r.height};break;case En:c={x:a,y:t.y+t.height};break;case _n:c={x:t.x+t.width,y:s};break;case Vr:c={x:t.x-r.width,y:s};break;default:c={x:t.x,y:t.y}}var u=i?hS(i):null;if(u!=null){var d=u==="y"?"height":"width";switch(o){case Na:c[u]=c[u]-(t[d]/2-r[d]/2);break;case dl:c[u]=c[u]+(t[d]/2-r[d]/2);break}}return c}function fl(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,o=r.strategy,a=o===void 0?e.strategy:o,s=r.boundary,c=s===void 0?HY:s,u=r.rootBoundary,d=u===void 0?q4:u,h=r.elementContext,p=h===void 0?Es:h,v=r.altBoundary,y=v===void 0?!1:v,m=r.padding,g=m===void 0?0:m,w=$4(typeof g!="number"?g:V4(g,Il)),x=p===Es?WY:Es,_=e.rects.popper,S=e.elements[y?x:p],E=_X(To(S)?S:S.contextElement||Qi(e.elements.popper),c,d,a),I=Pa(e.elements.reference),N=W4({reference:I,element:_,placement:i}),T=Aw(Object.assign({},_,N)),M=p===Es?T:I,z={top:E.top-M.top+w.top,bottom:M.bottom-E.bottom+w.bottom,left:E.left-M.left+w.left,right:M.right-E.right+w.right},j=e.modifiersData.offset;if(p===Es&&j){var W=j[i];Object.keys(z).forEach(function(U){var A=[_n,En].indexOf(U)>=0?1:-1,K=[$r,En].indexOf(U)>=0?"y":"x";z[U]+=W[K]*A})}return z}function OX(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,o=r.rootBoundary,a=r.padding,s=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?z4:c,d=Ma(n),h=d?s?VC:VC.filter(function(y){return Ma(y)===d}):Il,p=h.filter(function(y){return u.indexOf(y)>=0});p.length===0&&(p=h);var v=p.reduce(function(y,m){return y[m]=fl(e,{placement:m,boundary:i,rootBoundary:o,padding:a})[ni(m)],y},{});return Object.keys(v).sort(function(y,m){return v[y]-v[m]})}function CX(e){if(ni(e)===uS)return[];var t=Su(e);return[UC(e),t,UC(t)]}function IX(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,s=a===void 0?!0:a,c=r.fallbackPlacements,u=r.padding,d=r.boundary,h=r.rootBoundary,p=r.altBoundary,v=r.flipVariations,y=v===void 0?!0:v,m=r.allowedAutoPlacements,g=t.options.placement,w=ni(g),x=w===g,_=c||(x||!y?[Su(g)]:CX(g)),S=[g].concat(_).reduce(function(D,$){return D.concat(ni($)===uS?OX(t,{placement:$,boundary:d,rootBoundary:h,padding:u,flipVariations:y,allowedAutoPlacements:m}):$)},[]),E=t.rects.reference,I=t.rects.popper,N=new Map,T=!0,M=S[0],z=0;z<S.length;z++){var j=S[z],W=ni(j),U=Ma(j)===Na,A=[$r,En].indexOf(W)>=0,K=A?"width":"height",V=fl(t,{placement:j,boundary:d,rootBoundary:h,altBoundary:p,padding:u}),te=A?U?_n:Vr:U?En:$r;E[K]>I[K]&&(te=Su(te));var G=Su(te),re=[];if(o&&re.push(V[W]<=0),s&&re.push(V[te]<=0,V[G]<=0),re.every(function(D){return D})){M=j,T=!1;break}N.set(j,re)}if(T)for(var P=y?3:1,B=function($){var H=S.find(function(q){var Y=N.get(q);if(Y)return Y.slice(0,$).every(function(ie){return ie})});if(H)return M=H,"break"},X=P;X>0;X--){var Q=B(X);if(Q==="break")break}t.placement!==M&&(t.modifiersData[n]._skip=!0,t.placement=M,t.reset=!0)}}const RX={name:"flip",enabled:!0,phase:"main",fn:IX,requiresIfExists:["offset"],data:{_skip:!1}};function KC(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 YC(e){return[$r,_n,En,Vr].some(function(t){return e[t]>=0})}function NX(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=fl(t,{elementContext:"reference"}),s=fl(t,{altBoundary:!0}),c=KC(a,n),u=KC(s,i,o),d=YC(c),h=YC(u);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const TX={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:NX};function PX(e,t,r){var n=ni(e),i=[Vr,$r].indexOf(n)>=0?-1:1,o=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Vr,_n].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}function MX(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=i===void 0?[0,0]:i,a=z4.reduce(function(d,h){return d[h]=PX(h,t.rects,o),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 kX={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:MX};function AX(e){var t=e.state,r=e.name;t.modifiersData[r]=W4({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const DX={name:"popperOffsets",enabled:!0,phase:"read",fn:AX,data:{}};function jX(e){return e==="x"?"y":"x"}function qX(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,s=a===void 0?!1:a,c=r.boundary,u=r.rootBoundary,d=r.altBoundary,h=r.padding,p=r.tether,v=p===void 0?!0:p,y=r.tetherOffset,m=y===void 0?0:y,g=fl(t,{boundary:c,rootBoundary:u,padding:h,altBoundary:d}),w=ni(t.placement),x=Ma(t.placement),_=!x,S=hS(w),E=jX(S),I=t.modifiersData.popperOffsets,N=t.rects.reference,T=t.rects.popper,M=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,z=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,W={x:0,y:0};if(I){if(o){var U,A=S==="y"?$r:Vr,K=S==="y"?En:_n,V=S==="y"?"height":"width",te=I[S],G=te+g[A],re=te-g[K],P=v?-T[V]/2:0,B=x===Na?N[V]:T[V],X=x===Na?-T[V]:-N[V],Q=t.elements.arrow,D=v&&Q?fS(Q):{width:0,height:0},$=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:F4(),H=$[A],q=$[K],Y=tl(0,N[V],D[V]),ie=_?N[V]/2-P-Y-H-z.mainAxis:B-Y-H-z.mainAxis,ne=_?-N[V]/2+P+Y+q+z.mainAxis:X+Y+q+z.mainAxis,ve=t.elements.arrow&&Rl(t.elements.arrow),Z=ve?S==="y"?ve.clientTop||0:ve.clientLeft||0:0,J=(U=j==null?void 0:j[S])!=null?U:0,ae=te+ie-J-Z,he=te+ne-J,ue=tl(v?Yu(G,ae):G,te,v?_o(re,he):re);I[S]=ue,W[S]=ue-te}if(s){var de,le=S==="x"?$r:Vr,xe=S==="x"?En:_n,Ee=I[E],Ie=E==="y"?"height":"width",Te=Ee+g[le],Me=Ee-g[xe],Ze=[$r,Vr].indexOf(w)!==-1,tt=(de=j==null?void 0:j[E])!=null?de:0,Fe=Ze?Te:Ee-N[Ie]-T[Ie]-tt+z.altAxis,Le=Ze?Ee+N[Ie]+T[Ie]-tt-z.altAxis:Me,ze=v&&Ze?sX(Fe,Ee,Le):tl(v?Fe:Te,Ee,v?Le:Me);I[E]=ze,W[E]=ze-Ee}t.modifiersData[n]=W}}const zX={name:"preventOverflow",enabled:!0,phase:"main",fn:qX,requiresIfExists:["offset"]};function LX(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function BX(e){return e===sn(e)||!Sn(e)?pS(e):LX(e)}function FX(e){var t=e.getBoundingClientRect(),r=Ta(t.width)/e.offsetWidth||1,n=Ta(t.height)/e.offsetHeight||1;return r!==1||n!==1}function $X(e,t,r){r===void 0&&(r=!1);var n=Sn(t),i=Sn(t)&&FX(t),o=Qi(t),a=Pa(e,i,r),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((ai(t)!=="body"||gS(o))&&(s=BX(t)),Sn(t)?(c=Pa(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=vS(o))),{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function VX(e){var t=new Map,r=new Set,n=[];e.forEach(function(o){t.set(o.name,o)});function i(o){r.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!r.has(s)){var c=t.get(s);c&&i(c)}}),n.push(o)}return e.forEach(function(o){r.has(o.name)||i(o)}),n}function HX(e){var t=VX(e);return tX.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function WX(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function UX(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var XC={placement:"bottom",modifiers:[],strategy:"absolute"};function ZC(){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 GX(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,o=i===void 0?XC:i;return function(s,c,u){u===void 0&&(u=o);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},XC,o),modifiersData:{},elements:{reference:s,popper:c},attributes:{},styles:{}},h=[],p=!1,v={state:d,setOptions:function(w){var x=typeof w=="function"?w(d.options):w;m(),d.options=Object.assign({},o,d.options,x),d.scrollParents={reference:To(s)?rl(s):s.contextElement?rl(s.contextElement):[],popper:rl(c)};var _=HX(UX([].concat(n,d.options.modifiers)));return d.orderedModifiers=_.filter(function(S){return S.enabled}),y(),v.update()},forceUpdate:function(){if(!p){var w=d.elements,x=w.reference,_=w.popper;if(ZC(x,_)){d.rects={reference:$X(x,Rl(_),d.options.strategy==="fixed"),popper:fS(_)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(z){return d.modifiersData[z.name]=Object.assign({},z.data)});for(var S=0;S<d.orderedModifiers.length;S++){if(d.reset===!0){d.reset=!1,S=-1;continue}var E=d.orderedModifiers[S],I=E.fn,N=E.options,T=N===void 0?{}:N,M=E.name;typeof I=="function"&&(d=I({state:d,options:T,name:M,instance:v})||d)}}}},update:WX(function(){return new Promise(function(g){v.forceUpdate(),g(d)})}),destroy:function(){m(),p=!0}};if(!ZC(s,c))return v;v.setOptions(u).then(function(g){!p&&u.onFirstUpdate&&u.onFirstUpdate(g)});function y(){d.orderedModifiers.forEach(function(g){var w=g.name,x=g.options,_=x===void 0?{}:x,S=g.effect;if(typeof S=="function"){var E=S({state:d,name:w,instance:v,options:_}),I=function(){};h.push(E||I)}})}function m(){h.forEach(function(g){return g()}),h=[]}return v}}var KX=[mX,DX,vX,iX,kX,RX,zX,dX,TX],YX=GX({defaultModifiers:KX}),jt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function eo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yh,JC;function XX(){if(JC)return Yh;JC=1;var e=typeof Element<"u",t=typeof Map=="function",r=typeof Set=="function",n=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function i(o,a){if(o===a)return!0;if(o&&a&&typeof o=="object"&&typeof a=="object"){if(o.constructor!==a.constructor)return!1;var s,c,u;if(Array.isArray(o)){if(s=o.length,s!=a.length)return!1;for(c=s;c--!==0;)if(!i(o[c],a[c]))return!1;return!0}var d;if(t&&o instanceof Map&&a instanceof Map){if(o.size!==a.size)return!1;for(d=o.entries();!(c=d.next()).done;)if(!a.has(c.value[0]))return!1;for(d=o.entries();!(c=d.next()).done;)if(!i(c.value[1],a.get(c.value[0])))return!1;return!0}if(r&&o instanceof Set&&a instanceof Set){if(o.size!==a.size)return!1;for(d=o.entries();!(c=d.next()).done;)if(!a.has(c.value[0]))return!1;return!0}if(n&&ArrayBuffer.isView(o)&&ArrayBuffer.isView(a)){if(s=o.length,s!=a.length)return!1;for(c=s;c--!==0;)if(o[c]!==a[c])return!1;return!0}if(o.constructor===RegExp)return o.source===a.source&&o.flags===a.flags;if(o.valueOf!==Object.prototype.valueOf&&typeof o.valueOf=="function"&&typeof a.valueOf=="function")return o.valueOf()===a.valueOf();if(o.toString!==Object.prototype.toString&&typeof o.toString=="function"&&typeof a.toString=="function")return o.toString()===a.toString();if(u=Object.keys(o),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&&o instanceof Element)return!1;for(c=s;c--!==0;)if(!((u[c]==="_owner"||u[c]==="__v"||u[c]==="__o")&&o.$$typeof)&&!i(o[u[c]],a[u[c]]))return!1;return!0}return o!==o&&a!==a}return Yh=function(a,s){try{return i(a,s)}catch(c){if((c.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw c}},Yh}var ZX=XX();const JX=eo(ZX);var QX=[],Cd=function(t,r,n){n===void 0&&(n={});var i=nt.useRef(null),o={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||QX},a=nt.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=a[0],c=a[1],u=nt.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(v){var y=v.state,m=Object.keys(y.elements);gV.flushSync(function(){c({styles:FC(m.map(function(g){return[g,y.styles[g]||{}]})),attributes:FC(m.map(function(g){return[g,y.attributes[g]]}))})})},requires:["computeStyles"]}},[]),d=nt.useMemo(function(){var p={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[].concat(o.modifiers,[u,{name:"applyStyles",enabled:!1}])};return JX(i.current,p)?i.current||p:(i.current=p,p)},[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,u]),h=nt.useRef();return $C(function(){h.current&&h.current.setOptions(d)},[d]),$C(function(){if(!(t==null||r==null)){var p=n.createPopper||YX,v=p(t,r,d);return h.current=v,function(){v.destroy(),h.current=null}}},[t,r,n.createPopper]),{state:h.current?h.current.state:null,styles:s.styles,attributes:s.attributes,update:h.current?h.current.update:null,forceUpdate:h.current?h.current.forceUpdate:null}};const U4=({tab:e})=>O.jsx(br,{depth:1,className:"flex flex-1 items-center justify-center border-l-[0.5px]",children:O.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-4 text-inactive-text",children:[O.jsx(on,{className:"h-10 w-10"}),O.jsxs("div",{className:"font-semibold",children:["No ",e," Selected"]}),O.jsxs("div",{className:"text-sm",children:["Click on a ",e," in the Sidebar to select it."]})]})});function mS(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 Xh,QC;function eZ(){if(QC)return Xh;QC=1;function e(){this.__data__=[],this.size=0}return Xh=e,Xh}var Zh,e2;function Va(){if(e2)return Zh;e2=1;function e(t,r){return t===r||t!==t&&r!==r}return Zh=e,Zh}var Jh,t2;function Id(){if(t2)return Jh;t2=1;var e=Va();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return Jh=t,Jh}var Qh,r2;function tZ(){if(r2)return Qh;r2=1;var e=Id(),t=Array.prototype,r=t.splice;function n(i){var o=this.__data__,a=e(o,i);if(a<0)return!1;var s=o.length-1;return a==s?o.pop():r.call(o,a,1),--this.size,!0}return Qh=n,Qh}var ep,n2;function rZ(){if(n2)return ep;n2=1;var e=Id();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return ep=t,ep}var tp,i2;function nZ(){if(i2)return tp;i2=1;var e=Id();function t(r){return e(this.__data__,r)>-1}return tp=t,tp}var rp,o2;function iZ(){if(o2)return rp;o2=1;var e=Id();function t(r,n){var i=this.__data__,o=e(i,r);return o<0?(++this.size,i.push([r,n])):i[o][1]=n,this}return rp=t,rp}var np,a2;function Rd(){if(a2)return np;a2=1;var e=eZ(),t=tZ(),r=rZ(),n=nZ(),i=iZ();function o(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 o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,np=o,np}var ip,s2;function oZ(){if(s2)return ip;s2=1;var e=Rd();function t(){this.__data__=new e,this.size=0}return ip=t,ip}var op,l2;function aZ(){if(l2)return op;l2=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return op=e,op}var ap,c2;function sZ(){if(c2)return ap;c2=1;function e(t){return this.__data__.get(t)}return ap=e,ap}var sp,u2;function lZ(){if(u2)return sp;u2=1;function e(t){return this.__data__.has(t)}return sp=e,sp}var lp,d2;function G4(){if(d2)return lp;d2=1;var e=typeof jt=="object"&&jt&&jt.Object===Object&&jt;return lp=e,lp}var cp,f2;function Vn(){if(f2)return cp;f2=1;var e=G4(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return cp=r,cp}var up,h2;function Ha(){if(h2)return up;h2=1;var e=Vn(),t=e.Symbol;return up=t,up}var dp,p2;function cZ(){if(p2)return dp;p2=1;var e=Ha(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function o(a){var s=r.call(a,i),c=a[i];try{a[i]=void 0;var u=!0}catch{}var d=n.call(a);return u&&(s?a[i]=c:delete a[i]),d}return dp=o,dp}var fp,v2;function uZ(){if(v2)return fp;v2=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return fp=r,fp}var hp,g2;function ko(){if(g2)return hp;g2=1;var e=Ha(),t=cZ(),r=uZ(),n="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function a(s){return s==null?s===void 0?i:n:o&&o in Object(s)?t(s):r(s)}return hp=a,hp}var pp,m2;function On(){if(m2)return pp;m2=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return pp=e,pp}var vp,b2;function Nl(){if(b2)return vp;b2=1;var e=ko(),t=On(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function a(s){if(!t(s))return!1;var c=e(s);return c==n||c==i||c==r||c==o}return vp=a,vp}var gp,y2;function dZ(){if(y2)return gp;y2=1;var e=Vn(),t=e["__core-js_shared__"];return gp=t,gp}var mp,x2;function fZ(){if(x2)return mp;x2=1;var e=dZ(),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 mp=r,mp}var bp,w2;function K4(){if(w2)return bp;w2=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 bp=r,bp}var yp,S2;function hZ(){if(S2)return yp;S2=1;var e=Nl(),t=fZ(),r=On(),n=K4(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,c=a.toString,u=s.hasOwnProperty,d=RegExp("^"+c.call(u).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(p){if(!r(p)||t(p))return!1;var v=e(p)?d:o;return v.test(n(p))}return yp=h,yp}var xp,E2;function pZ(){if(E2)return xp;E2=1;function e(t,r){return t==null?void 0:t[r]}return xp=e,xp}var wp,_2;function Ao(){if(_2)return wp;_2=1;var e=hZ(),t=pZ();function r(n,i){var o=t(n,i);return e(o)?o:void 0}return wp=r,wp}var Sp,O2;function bS(){if(O2)return Sp;O2=1;var e=Ao(),t=Vn(),r=e(t,"Map");return Sp=r,Sp}var Ep,C2;function Nd(){if(C2)return Ep;C2=1;var e=Ao(),t=e(Object,"create");return Ep=t,Ep}var _p,I2;function vZ(){if(I2)return _p;I2=1;var e=Nd();function t(){this.__data__=e?e(null):{},this.size=0}return _p=t,_p}var Op,R2;function gZ(){if(R2)return Op;R2=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return Op=e,Op}var Cp,N2;function mZ(){if(N2)return Cp;N2=1;var e=Nd(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(o){var a=this.__data__;if(e){var s=a[o];return s===t?void 0:s}return n.call(a,o)?a[o]:void 0}return Cp=i,Cp}var Ip,T2;function bZ(){if(T2)return Ip;T2=1;var e=Nd(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var o=this.__data__;return e?o[i]!==void 0:r.call(o,i)}return Ip=n,Ip}var Rp,P2;function yZ(){if(P2)return Rp;P2=1;var e=Nd(),t="__lodash_hash_undefined__";function r(n,i){var o=this.__data__;return this.size+=this.has(n)?0:1,o[n]=e&&i===void 0?t:i,this}return Rp=r,Rp}var Np,M2;function xZ(){if(M2)return Np;M2=1;var e=vZ(),t=gZ(),r=mZ(),n=bZ(),i=yZ();function o(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 o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,Np=o,Np}var Tp,k2;function wZ(){if(k2)return Tp;k2=1;var e=xZ(),t=Rd(),r=bS();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Tp=n,Tp}var Pp,A2;function SZ(){if(A2)return Pp;A2=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Pp=e,Pp}var Mp,D2;function Td(){if(D2)return Mp;D2=1;var e=SZ();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Mp=t,Mp}var kp,j2;function EZ(){if(j2)return kp;j2=1;var e=Td();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return kp=t,kp}var Ap,q2;function _Z(){if(q2)return Ap;q2=1;var e=Td();function t(r){return e(this,r).get(r)}return Ap=t,Ap}var Dp,z2;function OZ(){if(z2)return Dp;z2=1;var e=Td();function t(r){return e(this,r).has(r)}return Dp=t,Dp}var jp,L2;function CZ(){if(L2)return jp;L2=1;var e=Td();function t(r,n){var i=e(this,r),o=i.size;return i.set(r,n),this.size+=i.size==o?0:1,this}return jp=t,jp}var qp,B2;function yS(){if(B2)return qp;B2=1;var e=wZ(),t=EZ(),r=_Z(),n=OZ(),i=CZ();function o(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 o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,qp=o,qp}var zp,F2;function IZ(){if(F2)return zp;F2=1;var e=Rd(),t=bS(),r=yS(),n=200;function i(o,a){var s=this.__data__;if(s instanceof e){var c=s.__data__;if(!t||c.length<n-1)return c.push([o,a]),this.size=++s.size,this;s=this.__data__=new r(c)}return s.set(o,a),this.size=s.size,this}return zp=i,zp}var Lp,$2;function Pd(){if($2)return Lp;$2=1;var e=Rd(),t=oZ(),r=aZ(),n=sZ(),i=lZ(),o=IZ();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=i,a.prototype.set=o,Lp=a,Lp}var Bp,V2;function xS(){if(V2)return Bp;V2=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i&&r(t[n],n,t)!==!1;);return t}return Bp=e,Bp}var Fp,H2;function Y4(){if(H2)return Fp;H2=1;var e=Ao(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Fp=t,Fp}var $p,W2;function Md(){if(W2)return $p;W2=1;var e=Y4();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return $p=t,$p}var Vp,U2;function kd(){if(U2)return Vp;U2=1;var e=Md(),t=Va(),r=Object.prototype,n=r.hasOwnProperty;function i(o,a,s){var c=o[a];(!(n.call(o,a)&&t(c,s))||s===void 0&&!(a in o))&&e(o,a,s)}return Vp=i,Vp}var Hp,G2;function Tl(){if(G2)return Hp;G2=1;var e=kd(),t=Md();function r(n,i,o,a){var s=!o;o||(o={});for(var c=-1,u=i.length;++c<u;){var d=i[c],h=a?a(o[d],n[d],d,o,n):void 0;h===void 0&&(h=n[d]),s?t(o,d,h):e(o,d,h)}return o}return Hp=r,Hp}var Wp,K2;function RZ(){if(K2)return Wp;K2=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return Wp=e,Wp}var Up,Y2;function si(){if(Y2)return Up;Y2=1;function e(t){return t!=null&&typeof t=="object"}return Up=e,Up}var Gp,X2;function NZ(){if(X2)return Gp;X2=1;var e=ko(),t=si(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return Gp=n,Gp}var Kp,Z2;function Pl(){if(Z2)return Kp;Z2=1;var e=NZ(),t=si(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,o=e((function(){return arguments})())?e:function(a){return t(a)&&n.call(a,"callee")&&!i.call(a,"callee")};return Kp=o,Kp}var Yp,J2;function Ut(){if(J2)return Yp;J2=1;var e=Array.isArray;return Yp=e,Yp}var Hs={exports:{}},Xp,Q2;function TZ(){if(Q2)return Xp;Q2=1;function e(){return!1}return Xp=e,Xp}Hs.exports;var eI;function Wa(){return eI||(eI=1,(function(e,t){var r=Vn(),n=TZ(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,s=a?r.Buffer:void 0,c=s?s.isBuffer:void 0,u=c||n;e.exports=u})(Hs,Hs.exports)),Hs.exports}var Zp,tI;function Ad(){if(tI)return Zp;tI=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,i){var o=typeof n;return i=i??e,!!i&&(o=="number"||o!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<i}return Zp=r,Zp}var Jp,rI;function wS(){if(rI)return Jp;rI=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Jp=t,Jp}var Qp,nI;function PZ(){if(nI)return Qp;nI=1;var e=ko(),t=wS(),r=si(),n="[object Arguments]",i="[object Array]",o="[object Boolean]",a="[object Date]",s="[object Error]",c="[object Function]",u="[object Map]",d="[object Number]",h="[object Object]",p="[object RegExp]",v="[object Set]",y="[object String]",m="[object WeakMap]",g="[object ArrayBuffer]",w="[object DataView]",x="[object Float32Array]",_="[object Float64Array]",S="[object Int8Array]",E="[object Int16Array]",I="[object Int32Array]",N="[object Uint8Array]",T="[object Uint8ClampedArray]",M="[object Uint16Array]",z="[object Uint32Array]",j={};j[x]=j[_]=j[S]=j[E]=j[I]=j[N]=j[T]=j[M]=j[z]=!0,j[n]=j[i]=j[g]=j[o]=j[w]=j[a]=j[s]=j[c]=j[u]=j[d]=j[h]=j[p]=j[v]=j[y]=j[m]=!1;function W(U){return r(U)&&t(U.length)&&!!j[e(U)]}return Qp=W,Qp}var ev,iI;function Dd(){if(iI)return ev;iI=1;function e(t){return function(r){return t(r)}}return ev=e,ev}var Ws={exports:{}};Ws.exports;var oI;function SS(){return oI||(oI=1,(function(e,t){var r=G4(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o&&r.process,s=(function(){try{var c=i&&i.require&&i.require("util").types;return c||a&&a.binding&&a.binding("util")}catch{}})();e.exports=s})(Ws,Ws.exports)),Ws.exports}var tv,aI;function Ml(){if(aI)return tv;aI=1;var e=PZ(),t=Dd(),r=SS(),n=r&&r.isTypedArray,i=n?t(n):e;return tv=i,tv}var rv,sI;function X4(){if(sI)return rv;sI=1;var e=RZ(),t=Pl(),r=Ut(),n=Wa(),i=Ad(),o=Ml(),a=Object.prototype,s=a.hasOwnProperty;function c(u,d){var h=r(u),p=!h&&t(u),v=!h&&!p&&n(u),y=!h&&!p&&!v&&o(u),m=h||p||v||y,g=m?e(u.length,String):[],w=g.length;for(var x in u)(d||s.call(u,x))&&!(m&&(x=="length"||v&&(x=="offset"||x=="parent")||y&&(x=="buffer"||x=="byteLength"||x=="byteOffset")||i(x,w)))&&g.push(x);return g}return rv=c,rv}var nv,lI;function jd(){if(lI)return nv;lI=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return nv=t,nv}var iv,cI;function Z4(){if(cI)return iv;cI=1;function e(t,r){return function(n){return t(r(n))}}return iv=e,iv}var ov,uI;function MZ(){if(uI)return ov;uI=1;var e=Z4(),t=e(Object.keys,Object);return ov=t,ov}var av,dI;function ES(){if(dI)return av;dI=1;var e=jd(),t=MZ(),r=Object.prototype,n=r.hasOwnProperty;function i(o){if(!e(o))return t(o);var a=[];for(var s in Object(o))n.call(o,s)&&s!="constructor"&&a.push(s);return a}return av=i,av}var sv,fI;function Oi(){if(fI)return sv;fI=1;var e=Nl(),t=wS();function r(n){return n!=null&&t(n.length)&&!e(n)}return sv=r,sv}var lv,hI;function to(){if(hI)return lv;hI=1;var e=X4(),t=ES(),r=Oi();function n(i){return r(i)?e(i):t(i)}return lv=n,lv}var cv,pI;function kZ(){if(pI)return cv;pI=1;var e=Tl(),t=to();function r(n,i){return n&&e(i,t(i),n)}return cv=r,cv}var uv,vI;function AZ(){if(vI)return uv;vI=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return uv=e,uv}var dv,gI;function DZ(){if(gI)return dv;gI=1;var e=On(),t=jd(),r=AZ(),n=Object.prototype,i=n.hasOwnProperty;function o(a){if(!e(a))return r(a);var s=t(a),c=[];for(var u in a)u=="constructor"&&(s||!i.call(a,u))||c.push(u);return c}return dv=o,dv}var fv,mI;function Do(){if(mI)return fv;mI=1;var e=X4(),t=DZ(),r=Oi();function n(i){return r(i)?e(i,!0):t(i)}return fv=n,fv}var hv,bI;function jZ(){if(bI)return hv;bI=1;var e=Tl(),t=Do();function r(n,i){return n&&e(i,t(i),n)}return hv=r,hv}var Us={exports:{}};Us.exports;var yI;function J4(){return yI||(yI=1,(function(e,t){var r=Vn(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;function c(u,d){if(d)return u.slice();var h=u.length,p=s?s(h):new u.constructor(h);return u.copy(p),p}e.exports=c})(Us,Us.exports)),Us.exports}var pv,xI;function Q4(){if(xI)return pv;xI=1;function e(t,r){var n=-1,i=t.length;for(r||(r=Array(i));++n<i;)r[n]=t[n];return r}return pv=e,pv}var vv,wI;function e6(){if(wI)return vv;wI=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,o=0,a=[];++n<i;){var s=t[n];r(s,n,t)&&(a[o++]=s)}return a}return vv=e,vv}var gv,SI;function t6(){if(SI)return gv;SI=1;function e(){return[]}return gv=e,gv}var mv,EI;function _S(){if(EI)return mv;EI=1;var e=e6(),t=t6(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(a){return a==null?[]:(a=Object(a),e(i(a),function(s){return n.call(a,s)}))}:t;return mv=o,mv}var bv,_I;function qZ(){if(_I)return bv;_I=1;var e=Tl(),t=_S();function r(n,i){return e(n,t(n),i)}return bv=r,bv}var yv,OI;function OS(){if(OI)return yv;OI=1;function e(t,r){for(var n=-1,i=r.length,o=t.length;++n<i;)t[o+n]=r[n];return t}return yv=e,yv}var xv,CI;function qd(){if(CI)return xv;CI=1;var e=Z4(),t=e(Object.getPrototypeOf,Object);return xv=t,xv}var wv,II;function r6(){if(II)return wv;II=1;var e=OS(),t=qd(),r=_S(),n=t6(),i=Object.getOwnPropertySymbols,o=i?function(a){for(var s=[];a;)e(s,r(a)),a=t(a);return s}:n;return wv=o,wv}var Sv,RI;function zZ(){if(RI)return Sv;RI=1;var e=Tl(),t=r6();function r(n,i){return e(n,t(n),i)}return Sv=r,Sv}var Ev,NI;function n6(){if(NI)return Ev;NI=1;var e=OS(),t=Ut();function r(n,i,o){var a=i(n);return t(n)?a:e(a,o(n))}return Ev=r,Ev}var _v,TI;function i6(){if(TI)return _v;TI=1;var e=n6(),t=_S(),r=to();function n(i){return e(i,r,t)}return _v=n,_v}var Ov,PI;function LZ(){if(PI)return Ov;PI=1;var e=n6(),t=r6(),r=Do();function n(i){return e(i,r,t)}return Ov=n,Ov}var Cv,MI;function BZ(){if(MI)return Cv;MI=1;var e=Ao(),t=Vn(),r=e(t,"DataView");return Cv=r,Cv}var Iv,kI;function FZ(){if(kI)return Iv;kI=1;var e=Ao(),t=Vn(),r=e(t,"Promise");return Iv=r,Iv}var Rv,AI;function o6(){if(AI)return Rv;AI=1;var e=Ao(),t=Vn(),r=e(t,"Set");return Rv=r,Rv}var Nv,DI;function $Z(){if(DI)return Nv;DI=1;var e=Ao(),t=Vn(),r=e(t,"WeakMap");return Nv=r,Nv}var Tv,jI;function Ua(){if(jI)return Tv;jI=1;var e=BZ(),t=bS(),r=FZ(),n=o6(),i=$Z(),o=ko(),a=K4(),s="[object Map]",c="[object Object]",u="[object Promise]",d="[object Set]",h="[object WeakMap]",p="[object DataView]",v=a(e),y=a(t),m=a(r),g=a(n),w=a(i),x=o;return(e&&x(new e(new ArrayBuffer(1)))!=p||t&&x(new t)!=s||r&&x(r.resolve())!=u||n&&x(new n)!=d||i&&x(new i)!=h)&&(x=function(_){var S=o(_),E=S==c?_.constructor:void 0,I=E?a(E):"";if(I)switch(I){case v:return p;case y:return s;case m:return u;case g:return d;case w:return h}return S}),Tv=x,Tv}var Pv,qI;function VZ(){if(qI)return Pv;qI=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n){var i=n.length,o=new n.constructor(i);return i&&typeof n[0]=="string"&&t.call(n,"index")&&(o.index=n.index,o.input=n.input),o}return Pv=r,Pv}var Mv,zI;function a6(){if(zI)return Mv;zI=1;var e=Vn(),t=e.Uint8Array;return Mv=t,Mv}var kv,LI;function CS(){if(LI)return kv;LI=1;var e=a6();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return kv=t,kv}var Av,BI;function HZ(){if(BI)return Av;BI=1;var e=CS();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.byteLength)}return Av=t,Av}var Dv,FI;function WZ(){if(FI)return Dv;FI=1;var e=/\w*$/;function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}return Dv=t,Dv}var jv,$I;function UZ(){if($I)return jv;$I=1;var e=Ha(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function n(i){return r?Object(r.call(i)):{}}return jv=n,jv}var qv,VI;function s6(){if(VI)return qv;VI=1;var e=CS();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}return qv=t,qv}var zv,HI;function GZ(){if(HI)return zv;HI=1;var e=CS(),t=HZ(),r=WZ(),n=UZ(),i=s6(),o="[object Boolean]",a="[object Date]",s="[object Map]",c="[object Number]",u="[object RegExp]",d="[object Set]",h="[object String]",p="[object Symbol]",v="[object ArrayBuffer]",y="[object DataView]",m="[object Float32Array]",g="[object Float64Array]",w="[object Int8Array]",x="[object Int16Array]",_="[object Int32Array]",S="[object Uint8Array]",E="[object Uint8ClampedArray]",I="[object Uint16Array]",N="[object Uint32Array]";function T(M,z,j){var W=M.constructor;switch(z){case v:return e(M);case o:case a:return new W(+M);case y:return t(M,j);case m:case g:case w:case x:case _:case S:case E:case I:case N:return i(M,j);case s:return new W;case c:case h:return new W(M);case u:return r(M);case d:return new W;case p:return n(M)}}return zv=T,zv}var Lv,WI;function l6(){if(WI)return Lv;WI=1;var e=On(),t=Object.create,r=(function(){function n(){}return function(i){if(!e(i))return{};if(t)return t(i);n.prototype=i;var o=new n;return n.prototype=void 0,o}})();return Lv=r,Lv}var Bv,UI;function c6(){if(UI)return Bv;UI=1;var e=l6(),t=qd(),r=jd();function n(i){return typeof i.constructor=="function"&&!r(i)?e(t(i)):{}}return Bv=n,Bv}var Fv,GI;function KZ(){if(GI)return Fv;GI=1;var e=Ua(),t=si(),r="[object Map]";function n(i){return t(i)&&e(i)==r}return Fv=n,Fv}var $v,KI;function YZ(){if(KI)return $v;KI=1;var e=KZ(),t=Dd(),r=SS(),n=r&&r.isMap,i=n?t(n):e;return $v=i,$v}var Vv,YI;function XZ(){if(YI)return Vv;YI=1;var e=Ua(),t=si(),r="[object Set]";function n(i){return t(i)&&e(i)==r}return Vv=n,Vv}var Hv,XI;function ZZ(){if(XI)return Hv;XI=1;var e=XZ(),t=Dd(),r=SS(),n=r&&r.isSet,i=n?t(n):e;return Hv=i,Hv}var Wv,ZI;function u6(){if(ZI)return Wv;ZI=1;var e=Pd(),t=xS(),r=kd(),n=kZ(),i=jZ(),o=J4(),a=Q4(),s=qZ(),c=zZ(),u=i6(),d=LZ(),h=Ua(),p=VZ(),v=GZ(),y=c6(),m=Ut(),g=Wa(),w=YZ(),x=On(),_=ZZ(),S=to(),E=Do(),I=1,N=2,T=4,M="[object Arguments]",z="[object Array]",j="[object Boolean]",W="[object Date]",U="[object Error]",A="[object Function]",K="[object GeneratorFunction]",V="[object Map]",te="[object Number]",G="[object Object]",re="[object RegExp]",P="[object Set]",B="[object String]",X="[object Symbol]",Q="[object WeakMap]",D="[object ArrayBuffer]",$="[object DataView]",H="[object Float32Array]",q="[object Float64Array]",Y="[object Int8Array]",ie="[object Int16Array]",ne="[object Int32Array]",ve="[object Uint8Array]",Z="[object Uint8ClampedArray]",J="[object Uint16Array]",ae="[object Uint32Array]",he={};he[M]=he[z]=he[D]=he[$]=he[j]=he[W]=he[H]=he[q]=he[Y]=he[ie]=he[ne]=he[V]=he[te]=he[G]=he[re]=he[P]=he[B]=he[X]=he[ve]=he[Z]=he[J]=he[ae]=!0,he[U]=he[A]=he[Q]=!1;function ue(de,le,xe,Ee,Ie,Te){var Me,Ze=le&I,tt=le&N,Fe=le&T;if(xe&&(Me=Ie?xe(de,Ee,Ie,Te):xe(de)),Me!==void 0)return Me;if(!x(de))return de;var Le=m(de);if(Le){if(Me=p(de),!Ze)return a(de,Me)}else{var ze=h(de),Je=ze==A||ze==K;if(g(de))return o(de,Ze);if(ze==G||ze==M||Je&&!Ie){if(Me=tt||Je?{}:y(de),!Ze)return tt?c(de,i(Me,de)):s(de,n(Me,de))}else{if(!he[ze])return Ie?de:{};Me=v(de,ze,Ze)}}Te||(Te=new e);var rt=Te.get(de);if(rt)return rt;Te.set(de,Me),_(de)?de.forEach(function(Rt){Me.add(ue(Rt,le,xe,Rt,de,Te))}):w(de)&&de.forEach(function(Rt,qt){Me.set(qt,ue(Rt,le,xe,qt,de,Te))});var Pt=Fe?tt?d:u:tt?E:S,gt=Le?void 0:Pt(de);return t(gt||de,function(Rt,qt){gt&&(qt=Rt,Rt=de[qt]),r(Me,qt,ue(Rt,le,xe,qt,de,Te))}),Me}return Wv=ue,Wv}var Uv,JI;function JZ(){if(JI)return Uv;JI=1;var e=u6(),t=4;function r(n){return e(n,t)}return Uv=r,Uv}var Gv,QI;function IS(){if(QI)return Gv;QI=1;function e(t){return function(){return t}}return Gv=e,Gv}var Kv,eR;function QZ(){if(eR)return Kv;eR=1;function e(t){return function(r,n,i){for(var o=-1,a=Object(r),s=i(r),c=s.length;c--;){var u=s[t?c:++o];if(n(a[u],u,a)===!1)break}return r}}return Kv=e,Kv}var Yv,tR;function RS(){if(tR)return Yv;tR=1;var e=QZ(),t=e();return Yv=t,Yv}var Xv,rR;function NS(){if(rR)return Xv;rR=1;var e=RS(),t=to();function r(n,i){return n&&e(n,i,t)}return Xv=r,Xv}var Zv,nR;function eJ(){if(nR)return Zv;nR=1;var e=Oi();function t(r,n){return function(i,o){if(i==null)return i;if(!e(i))return r(i,o);for(var a=i.length,s=n?a:-1,c=Object(i);(n?s--:++s<a)&&o(c[s],s,c)!==!1;);return i}}return Zv=t,Zv}var Jv,iR;function zd(){if(iR)return Jv;iR=1;var e=NS(),t=eJ(),r=t(e);return Jv=r,Jv}var Qv,oR;function jo(){if(oR)return Qv;oR=1;function e(t){return t}return Qv=e,Qv}var eg,aR;function d6(){if(aR)return eg;aR=1;var e=jo();function t(r){return typeof r=="function"?r:e}return eg=t,eg}var tg,sR;function f6(){if(sR)return tg;sR=1;var e=xS(),t=zd(),r=d6(),n=Ut();function i(o,a){var s=n(o)?e:t;return s(o,r(a))}return tg=i,tg}var rg,lR;function h6(){return lR||(lR=1,rg=f6()),rg}var ng,cR;function tJ(){if(cR)return ng;cR=1;var e=zd();function t(r,n){var i=[];return e(r,function(o,a,s){n(o,a,s)&&i.push(o)}),i}return ng=t,ng}var ig,uR;function rJ(){if(uR)return ig;uR=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return ig=t,ig}var og,dR;function nJ(){if(dR)return og;dR=1;function e(t){return this.__data__.has(t)}return og=e,og}var ag,fR;function p6(){if(fR)return ag;fR=1;var e=yS(),t=rJ(),r=nJ();function n(i){var o=-1,a=i==null?0:i.length;for(this.__data__=new e;++o<a;)this.add(i[o])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,ag=n,ag}var sg,hR;function iJ(){if(hR)return sg;hR=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(t[n],n,t))return!0;return!1}return sg=e,sg}var lg,pR;function v6(){if(pR)return lg;pR=1;function e(t,r){return t.has(r)}return lg=e,lg}var cg,vR;function g6(){if(vR)return cg;vR=1;var e=p6(),t=iJ(),r=v6(),n=1,i=2;function o(a,s,c,u,d,h){var p=c&n,v=a.length,y=s.length;if(v!=y&&!(p&&y>v))return!1;var m=h.get(a),g=h.get(s);if(m&&g)return m==s&&g==a;var w=-1,x=!0,_=c&i?new e:void 0;for(h.set(a,s),h.set(s,a);++w<v;){var S=a[w],E=s[w];if(u)var I=p?u(E,S,w,s,a,h):u(S,E,w,a,s,h);if(I!==void 0){if(I)continue;x=!1;break}if(_){if(!t(s,function(N,T){if(!r(_,T)&&(S===N||d(S,N,c,u,h)))return _.push(T)})){x=!1;break}}else if(!(S===E||d(S,E,c,u,h))){x=!1;break}}return h.delete(a),h.delete(s),x}return cg=o,cg}var ug,gR;function oJ(){if(gR)return ug;gR=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,o){n[++r]=[o,i]}),n}return ug=e,ug}var dg,mR;function TS(){if(mR)return dg;mR=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return dg=e,dg}var fg,bR;function aJ(){if(bR)return fg;bR=1;var e=Ha(),t=a6(),r=Va(),n=g6(),i=oJ(),o=TS(),a=1,s=2,c="[object Boolean]",u="[object Date]",d="[object Error]",h="[object Map]",p="[object Number]",v="[object RegExp]",y="[object Set]",m="[object String]",g="[object Symbol]",w="[object ArrayBuffer]",x="[object DataView]",_=e?e.prototype:void 0,S=_?_.valueOf:void 0;function E(I,N,T,M,z,j,W){switch(T){case x:if(I.byteLength!=N.byteLength||I.byteOffset!=N.byteOffset)return!1;I=I.buffer,N=N.buffer;case w:return!(I.byteLength!=N.byteLength||!j(new t(I),new t(N)));case c:case u:case p:return r(+I,+N);case d:return I.name==N.name&&I.message==N.message;case v:case m:return I==N+"";case h:var U=i;case y:var A=M&a;if(U||(U=o),I.size!=N.size&&!A)return!1;var K=W.get(I);if(K)return K==N;M|=s,W.set(I,N);var V=n(U(I),U(N),M,z,j,W);return W.delete(I),V;case g:if(S)return S.call(I)==S.call(N)}return!1}return fg=E,fg}var hg,yR;function sJ(){if(yR)return hg;yR=1;var e=i6(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(o,a,s,c,u,d){var h=s&t,p=e(o),v=p.length,y=e(a),m=y.length;if(v!=m&&!h)return!1;for(var g=v;g--;){var w=p[g];if(!(h?w in a:n.call(a,w)))return!1}var x=d.get(o),_=d.get(a);if(x&&_)return x==a&&_==o;var S=!0;d.set(o,a),d.set(a,o);for(var E=h;++g<v;){w=p[g];var I=o[w],N=a[w];if(c)var T=h?c(N,I,w,a,o,d):c(I,N,w,o,a,d);if(!(T===void 0?I===N||u(I,N,s,c,d):T)){S=!1;break}E||(E=w=="constructor")}if(S&&!E){var M=o.constructor,z=a.constructor;M!=z&&"constructor"in o&&"constructor"in a&&!(typeof M=="function"&&M instanceof M&&typeof z=="function"&&z instanceof z)&&(S=!1)}return d.delete(o),d.delete(a),S}return hg=i,hg}var pg,xR;function lJ(){if(xR)return pg;xR=1;var e=Pd(),t=g6(),r=aJ(),n=sJ(),i=Ua(),o=Ut(),a=Wa(),s=Ml(),c=1,u="[object Arguments]",d="[object Array]",h="[object Object]",p=Object.prototype,v=p.hasOwnProperty;function y(m,g,w,x,_,S){var E=o(m),I=o(g),N=E?d:i(m),T=I?d:i(g);N=N==u?h:N,T=T==u?h:T;var M=N==h,z=T==h,j=N==T;if(j&&a(m)){if(!a(g))return!1;E=!0,M=!1}if(j&&!M)return S||(S=new e),E||s(m)?t(m,g,w,x,_,S):r(m,g,N,w,x,_,S);if(!(w&c)){var W=M&&v.call(m,"__wrapped__"),U=z&&v.call(g,"__wrapped__");if(W||U){var A=W?m.value():m,K=U?g.value():g;return S||(S=new e),_(A,K,w,x,S)}}return j?(S||(S=new e),n(m,g,w,x,_,S)):!1}return pg=y,pg}var vg,wR;function m6(){if(wR)return vg;wR=1;var e=lJ(),t=si();function r(n,i,o,a,s){return n===i?!0:n==null||i==null||!t(n)&&!t(i)?n!==n&&i!==i:e(n,i,o,a,r,s)}return vg=r,vg}var gg,SR;function cJ(){if(SR)return gg;SR=1;var e=Pd(),t=m6(),r=1,n=2;function i(o,a,s,c){var u=s.length,d=u,h=!c;if(o==null)return!d;for(o=Object(o);u--;){var p=s[u];if(h&&p[2]?p[1]!==o[p[0]]:!(p[0]in o))return!1}for(;++u<d;){p=s[u];var v=p[0],y=o[v],m=p[1];if(h&&p[2]){if(y===void 0&&!(v in o))return!1}else{var g=new e;if(c)var w=c(y,m,v,o,a,g);if(!(w===void 0?t(m,y,r|n,c,g):w))return!1}}return!0}return gg=i,gg}var mg,ER;function b6(){if(ER)return mg;ER=1;var e=On();function t(r){return r===r&&!e(r)}return mg=t,mg}var bg,_R;function uJ(){if(_R)return bg;_R=1;var e=b6(),t=to();function r(n){for(var i=t(n),o=i.length;o--;){var a=i[o],s=n[a];i[o]=[a,s,e(s)]}return i}return bg=r,bg}var yg,OR;function y6(){if(OR)return yg;OR=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return yg=e,yg}var xg,CR;function dJ(){if(CR)return xg;CR=1;var e=cJ(),t=uJ(),r=y6();function n(i){var o=t(i);return o.length==1&&o[0][2]?r(o[0][0],o[0][1]):function(a){return a===i||e(a,i,o)}}return xg=n,xg}var wg,IR;function Ga(){if(IR)return wg;IR=1;var e=ko(),t=si(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return wg=n,wg}var Sg,RR;function PS(){if(RR)return Sg;RR=1;var e=Ut(),t=Ga(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(o,a){if(e(o))return!1;var s=typeof o;return s=="number"||s=="symbol"||s=="boolean"||o==null||t(o)?!0:n.test(o)||!r.test(o)||a!=null&&o in Object(a)}return Sg=i,Sg}var Eg,NR;function fJ(){if(NR)return Eg;NR=1;var e=yS(),t="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var o=function(){var a=arguments,s=i?i.apply(this,a):a[0],c=o.cache;if(c.has(s))return c.get(s);var u=n.apply(this,a);return o.cache=c.set(s,u)||c,u};return o.cache=new(r.Cache||e),o}return r.Cache=e,Eg=r,Eg}var _g,TR;function hJ(){if(TR)return _g;TR=1;var e=fJ(),t=500;function r(n){var i=e(n,function(a){return o.size===t&&o.clear(),a}),o=i.cache;return i}return _g=r,_g}var Og,PR;function pJ(){if(PR)return Og;PR=1;var e=hJ(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(t,function(a,s,c,u){o.push(c?u.replace(r,"$1"):s||a)}),o});return Og=n,Og}var Cg,MR;function Ld(){if(MR)return Cg;MR=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,o=Array(i);++n<i;)o[n]=r(t[n],n,t);return o}return Cg=e,Cg}var Ig,kR;function vJ(){if(kR)return Ig;kR=1;var e=Ha(),t=Ld(),r=Ut(),n=Ga(),i=e?e.prototype:void 0,o=i?i.toString:void 0;function a(s){if(typeof s=="string")return s;if(r(s))return t(s,a)+"";if(n(s))return o?o.call(s):"";var c=s+"";return c=="0"&&1/s==-1/0?"-0":c}return Ig=a,Ig}var Rg,AR;function x6(){if(AR)return Rg;AR=1;var e=vJ();function t(r){return r==null?"":e(r)}return Rg=t,Rg}var Ng,DR;function Bd(){if(DR)return Ng;DR=1;var e=Ut(),t=PS(),r=pJ(),n=x6();function i(o,a){return e(o)?o:t(o,a)?[o]:r(n(o))}return Ng=i,Ng}var Tg,jR;function kl(){if(jR)return Tg;jR=1;var e=Ga();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Tg=t,Tg}var Pg,qR;function Fd(){if(qR)return Pg;qR=1;var e=Bd(),t=kl();function r(n,i){i=e(i,n);for(var o=0,a=i.length;n!=null&&o<a;)n=n[t(i[o++])];return o&&o==a?n:void 0}return Pg=r,Pg}var Mg,zR;function gJ(){if(zR)return Mg;zR=1;var e=Fd();function t(r,n,i){var o=r==null?void 0:e(r,n);return o===void 0?i:o}return Mg=t,Mg}var kg,LR;function mJ(){if(LR)return kg;LR=1;function e(t,r){return t!=null&&r in Object(t)}return kg=e,kg}var Ag,BR;function w6(){if(BR)return Ag;BR=1;var e=Bd(),t=Pl(),r=Ut(),n=Ad(),i=wS(),o=kl();function a(s,c,u){c=e(c,s);for(var d=-1,h=c.length,p=!1;++d<h;){var v=o(c[d]);if(!(p=s!=null&&u(s,v)))break;s=s[v]}return p||++d!=h?p:(h=s==null?0:s.length,!!h&&i(h)&&n(v,h)&&(r(s)||t(s)))}return Ag=a,Ag}var Dg,FR;function S6(){if(FR)return Dg;FR=1;var e=mJ(),t=w6();function r(n,i){return n!=null&&t(n,i,e)}return Dg=r,Dg}var jg,$R;function bJ(){if($R)return jg;$R=1;var e=m6(),t=gJ(),r=S6(),n=PS(),i=b6(),o=y6(),a=kl(),s=1,c=2;function u(d,h){return n(d)&&i(h)?o(a(d),h):function(p){var v=t(p,d);return v===void 0&&v===h?r(p,d):e(h,v,s|c)}}return jg=u,jg}var qg,VR;function E6(){if(VR)return qg;VR=1;function e(t){return function(r){return r==null?void 0:r[t]}}return qg=e,qg}var zg,HR;function yJ(){if(HR)return zg;HR=1;var e=Fd();function t(r){return function(n){return e(n,r)}}return zg=t,zg}var Lg,WR;function xJ(){if(WR)return Lg;WR=1;var e=E6(),t=yJ(),r=PS(),n=kl();function i(o){return r(o)?e(n(o)):t(o)}return Lg=i,Lg}var Bg,UR;function Ci(){if(UR)return Bg;UR=1;var e=dJ(),t=bJ(),r=jo(),n=Ut(),i=xJ();function o(a){return typeof a=="function"?a:a==null?r:typeof a=="object"?n(a)?t(a[0],a[1]):e(a):i(a)}return Bg=o,Bg}var Fg,GR;function _6(){if(GR)return Fg;GR=1;var e=e6(),t=tJ(),r=Ci(),n=Ut();function i(o,a){var s=n(o)?e:t;return s(o,r(a,3))}return Fg=i,Fg}var $g,KR;function wJ(){if(KR)return $g;KR=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,i){return n!=null&&t.call(n,i)}return $g=r,$g}var Vg,YR;function O6(){if(YR)return Vg;YR=1;var e=wJ(),t=w6();function r(n,i){return n!=null&&t(n,i,e)}return Vg=r,Vg}var Hg,XR;function SJ(){if(XR)return Hg;XR=1;var e=ES(),t=Ua(),r=Pl(),n=Ut(),i=Oi(),o=Wa(),a=jd(),s=Ml(),c="[object Map]",u="[object Set]",d=Object.prototype,h=d.hasOwnProperty;function p(v){if(v==null)return!0;if(i(v)&&(n(v)||typeof v=="string"||typeof v.splice=="function"||o(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 m in v)if(h.call(v,m))return!1;return!0}return Hg=p,Hg}var Wg,ZR;function C6(){if(ZR)return Wg;ZR=1;function e(t){return t===void 0}return Wg=e,Wg}var Ug,JR;function I6(){if(JR)return Ug;JR=1;var e=zd(),t=Oi();function r(n,i){var o=-1,a=t(n)?Array(n.length):[];return e(n,function(s,c,u){a[++o]=i(s,c,u)}),a}return Ug=r,Ug}var Gg,QR;function R6(){if(QR)return Gg;QR=1;var e=Ld(),t=Ci(),r=I6(),n=Ut();function i(o,a){var s=n(o)?e:r;return s(o,t(a,3))}return Gg=i,Gg}var Kg,eN;function EJ(){if(eN)return Kg;eN=1;function e(t,r,n,i){var o=-1,a=t==null?0:t.length;for(i&&a&&(n=t[++o]);++o<a;)n=r(n,t[o],o,t);return n}return Kg=e,Kg}var Yg,tN;function _J(){if(tN)return Yg;tN=1;function e(t,r,n,i,o){return o(t,function(a,s,c){n=i?(i=!1,a):r(n,a,s,c)}),n}return Yg=e,Yg}var Xg,rN;function N6(){if(rN)return Xg;rN=1;var e=EJ(),t=zd(),r=Ci(),n=_J(),i=Ut();function o(a,s,c){var u=i(a)?e:n,d=arguments.length<3;return u(a,r(s,4),c,d,t)}return Xg=o,Xg}var Zg,nN;function OJ(){if(nN)return Zg;nN=1;var e=ko(),t=Ut(),r=si(),n="[object String]";function i(o){return typeof o=="string"||!t(o)&&r(o)&&e(o)==n}return Zg=i,Zg}var Jg,iN;function CJ(){if(iN)return Jg;iN=1;var e=E6(),t=e("length");return Jg=t,Jg}var Qg,oN;function IJ(){if(oN)return Qg;oN=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,o="\\ufe0e\\ufe0f",a="\\u200d",s=RegExp("["+a+e+i+o+"]");function c(u){return s.test(u)}return Qg=c,Qg}var em,aN;function RJ(){if(aN)return em;aN=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,o="\\ufe0e\\ufe0f",a="["+e+"]",s="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+s+"|"+c+")",d="[^"+e+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",y=u+"?",m="["+o+"]?",g="(?:"+v+"(?:"+[d,h,p].join("|")+")"+m+y+")*",w=m+y+g,x="(?:"+[d+s+"?",s,h,p,a].join("|")+")",_=RegExp(c+"(?="+c+")|"+x+w,"g");function S(E){for(var I=_.lastIndex=0;_.test(E);)++I;return I}return em=S,em}var tm,sN;function NJ(){if(sN)return tm;sN=1;var e=CJ(),t=IJ(),r=RJ();function n(i){return t(i)?r(i):e(i)}return tm=n,tm}var rm,lN;function TJ(){if(lN)return rm;lN=1;var e=ES(),t=Ua(),r=Oi(),n=OJ(),i=NJ(),o="[object Map]",a="[object Set]";function s(c){if(c==null)return 0;if(r(c))return n(c)?i(c):c.length;var u=t(c);return u==o||u==a?c.size:e(c).length}return rm=s,rm}var nm,cN;function PJ(){if(cN)return nm;cN=1;var e=xS(),t=l6(),r=NS(),n=Ci(),i=qd(),o=Ut(),a=Wa(),s=Nl(),c=On(),u=Ml();function d(h,p,v){var y=o(h),m=y||a(h)||u(h);if(p=n(p,4),v==null){var g=h&&h.constructor;m?v=y?new g:[]:c(h)?v=s(g)?t(i(h)):{}:v={}}return(m?e:r)(h,function(w,x,_){return p(v,w,x,_)}),v}return nm=d,nm}var im,uN;function MJ(){if(uN)return im;uN=1;var e=Ha(),t=Pl(),r=Ut(),n=e?e.isConcatSpreadable:void 0;function i(o){return r(o)||t(o)||!!(n&&o&&o[n])}return im=i,im}var om,dN;function MS(){if(dN)return om;dN=1;var e=OS(),t=MJ();function r(n,i,o,a,s){var c=-1,u=n.length;for(o||(o=t),s||(s=[]);++c<u;){var d=n[c];i>0&&o(d)?i>1?r(d,i-1,o,a,s):e(s,d):a||(s[s.length]=d)}return s}return om=r,om}var am,fN;function kJ(){if(fN)return am;fN=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 am=e,am}var sm,hN;function T6(){if(hN)return sm;hN=1;var e=kJ(),t=Math.max;function r(n,i,o){return i=t(i===void 0?n.length-1:i,0),function(){for(var a=arguments,s=-1,c=t(a.length-i,0),u=Array(c);++s<c;)u[s]=a[i+s];s=-1;for(var d=Array(i+1);++s<i;)d[s]=a[s];return d[i]=o(u),e(n,this,d)}}return sm=r,sm}var lm,pN;function AJ(){if(pN)return lm;pN=1;var e=IS(),t=Y4(),r=jo(),n=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:r;return lm=n,lm}var cm,vN;function DJ(){if(vN)return cm;vN=1;var e=800,t=16,r=Date.now;function n(i){var o=0,a=0;return function(){var s=r(),c=t-(s-a);if(a=s,c>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return cm=n,cm}var um,gN;function P6(){if(gN)return um;gN=1;var e=AJ(),t=DJ(),r=t(e);return um=r,um}var dm,mN;function $d(){if(mN)return dm;mN=1;var e=jo(),t=T6(),r=P6();function n(i,o){return r(t(i,o,e),i+"")}return dm=n,dm}var fm,bN;function M6(){if(bN)return fm;bN=1;function e(t,r,n,i){for(var o=t.length,a=n+(i?1:-1);i?a--:++a<o;)if(r(t[a],a,t))return a;return-1}return fm=e,fm}var hm,yN;function jJ(){if(yN)return hm;yN=1;function e(t){return t!==t}return hm=e,hm}var pm,xN;function qJ(){if(xN)return pm;xN=1;function e(t,r,n){for(var i=n-1,o=t.length;++i<o;)if(t[i]===r)return i;return-1}return pm=e,pm}var vm,wN;function zJ(){if(wN)return vm;wN=1;var e=M6(),t=jJ(),r=qJ();function n(i,o,a){return o===o?r(i,o,a):e(i,t,a)}return vm=n,vm}var gm,SN;function LJ(){if(SN)return gm;SN=1;var e=zJ();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return gm=t,gm}var mm,EN;function BJ(){if(EN)return mm;EN=1;function e(t,r,n){for(var i=-1,o=t==null?0:t.length;++i<o;)if(n(r,t[i]))return!0;return!1}return mm=e,mm}var bm,_N;function FJ(){if(_N)return bm;_N=1;function e(){}return bm=e,bm}var ym,ON;function $J(){if(ON)return ym;ON=1;var e=o6(),t=FJ(),r=TS(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(o){return new e(o)}:t;return ym=i,ym}var xm,CN;function VJ(){if(CN)return xm;CN=1;var e=p6(),t=LJ(),r=BJ(),n=v6(),i=$J(),o=TS(),a=200;function s(c,u,d){var h=-1,p=t,v=c.length,y=!0,m=[],g=m;if(d)y=!1,p=r;else if(v>=a){var w=u?null:i(c);if(w)return o(w);y=!1,p=n,g=new e}else g=u?[]:m;e:for(;++h<v;){var x=c[h],_=u?u(x):x;if(x=d||x!==0?x:0,y&&_===_){for(var S=g.length;S--;)if(g[S]===_)continue e;u&&g.push(_),m.push(x)}else p(g,_,d)||(g!==m&&g.push(_),m.push(x))}return m}return xm=s,xm}var wm,IN;function k6(){if(IN)return wm;IN=1;var e=Oi(),t=si();function r(n){return t(n)&&e(n)}return wm=r,wm}var Sm,RN;function HJ(){if(RN)return Sm;RN=1;var e=MS(),t=$d(),r=VJ(),n=k6(),i=t(function(o){return r(e(o,1,n,!0))});return Sm=i,Sm}var Em,NN;function WJ(){if(NN)return Em;NN=1;var e=Ld();function t(r,n){return e(n,function(i){return r[i]})}return Em=t,Em}var _m,TN;function A6(){if(TN)return _m;TN=1;var e=WJ(),t=to();function r(n){return n==null?[]:e(n,t(n))}return _m=r,_m}var Om,PN;function Cn(){if(PN)return Om;PN=1;var e;if(typeof mS=="function")try{e={clone:JZ(),constant:IS(),each:h6(),filter:_6(),has:O6(),isArray:Ut(),isEmpty:SJ(),isFunction:Nl(),isUndefined:C6(),keys:to(),map:R6(),reduce:N6(),size:TJ(),transform:PJ(),union:HJ(),values:A6()}}catch{}return e||(e=window._),Om=e,Om}var Cm,MN;function kS(){if(MN)return Cm;MN=1;var e=Cn();Cm=i;var t="\0",r="\0",n="";function i(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={}}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(d){return this._label=d,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(d){return e.isFunction(d)||(d=e.constant(d)),this._defaultNodeLabelFn=d,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return e.keys(this._nodes)},i.prototype.sources=function(){var d=this;return e.filter(this.nodes(),function(h){return e.isEmpty(d._in[h])})},i.prototype.sinks=function(){var d=this;return e.filter(this.nodes(),function(h){return e.isEmpty(d._out[h])})},i.prototype.setNodes=function(d,h){var p=arguments,v=this;return e.each(d,function(y){p.length>1?v.setNode(y,h):v.setNode(y)}),this},i.prototype.setNode=function(d,h){return e.has(this._nodes,d)?(arguments.length>1&&(this._nodes[d]=h),this):(this._nodes[d]=arguments.length>1?h: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)},i.prototype.node=function(d){return this._nodes[d]},i.prototype.hasNode=function(d){return e.has(this._nodes,d)},i.prototype.removeNode=function(d){var h=this;if(e.has(this._nodes,d)){var p=function(v){h.removeEdge(h._edgeObjs[v])};delete this._nodes[d],this._isCompound&&(this._removeFromParentsChildList(d),delete this._parent[d],e.each(this.children(d),function(v){h.setParent(v)}),delete this._children[d]),e.each(e.keys(this._in[d]),p),delete this._in[d],delete this._preds[d],e.each(e.keys(this._out[d]),p),delete this._out[d],delete this._sucs[d],--this._nodeCount}return this},i.prototype.setParent=function(d,h){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(h))h=r;else{h+="";for(var p=h;!e.isUndefined(p);p=this.parent(p))if(p===d)throw new Error("Setting "+h+" as parent of "+d+" would create a cycle");this.setNode(h)}return this.setNode(d),this._removeFromParentsChildList(d),this._parent[d]=h,this._children[h][d]=!0,this},i.prototype._removeFromParentsChildList=function(d){delete this._children[this._parent[d]][d]},i.prototype.parent=function(d){if(this._isCompound){var h=this._parent[d];if(h!==r)return h}},i.prototype.children=function(d){if(e.isUndefined(d)&&(d=r),this._isCompound){var h=this._children[d];if(h)return e.keys(h)}else{if(d===r)return this.nodes();if(this.hasNode(d))return[]}},i.prototype.predecessors=function(d){var h=this._preds[d];if(h)return e.keys(h)},i.prototype.successors=function(d){var h=this._sucs[d];if(h)return e.keys(h)},i.prototype.neighbors=function(d){var h=this.predecessors(d);if(h)return e.union(h,this.successors(d))},i.prototype.isLeaf=function(d){var h;return this.isDirected()?h=this.successors(d):h=this.neighbors(d),h.length===0},i.prototype.filterNodes=function(d){var h=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});h.setGraph(this.graph());var p=this;e.each(this._nodes,function(m,g){d(g)&&h.setNode(g,m)}),e.each(this._edgeObjs,function(m){h.hasNode(m.v)&&h.hasNode(m.w)&&h.setEdge(m,p.edge(m))});var v={};function y(m){var g=p.parent(m);return g===void 0||h.hasNode(g)?(v[m]=g,g):g in v?v[g]:y(g)}return this._isCompound&&e.each(h.nodes(),function(m){h.setParent(m,y(m))}),h},i.prototype.setDefaultEdgeLabel=function(d){return e.isFunction(d)||(d=e.constant(d)),this._defaultEdgeLabelFn=d,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return e.values(this._edgeObjs)},i.prototype.setPath=function(d,h){var p=this,v=arguments;return e.reduce(d,function(y,m){return v.length>1?p.setEdge(y,m,h):p.setEdge(y,m),m}),this},i.prototype.setEdge=function(){var d,h,p,v,y=!1,m=arguments[0];typeof m=="object"&&m!==null&&"v"in m?(d=m.v,h=m.w,p=m.name,arguments.length===2&&(v=arguments[1],y=!0)):(d=m,h=arguments[1],p=arguments[3],arguments.length>2&&(v=arguments[2],y=!0)),d=""+d,h=""+h,e.isUndefined(p)||(p=""+p);var g=s(this._isDirected,d,h,p);if(e.has(this._edgeLabels,g))return y&&(this._edgeLabels[g]=v),this;if(!e.isUndefined(p)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(d),this.setNode(h),this._edgeLabels[g]=y?v:this._defaultEdgeLabelFn(d,h,p);var w=c(this._isDirected,d,h,p);return d=w.v,h=w.w,Object.freeze(w),this._edgeObjs[g]=w,o(this._preds[h],d),o(this._sucs[d],h),this._in[h][g]=w,this._out[d][g]=w,this._edgeCount++,this},i.prototype.edge=function(d,h,p){var v=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,d,h,p);return this._edgeLabels[v]},i.prototype.hasEdge=function(d,h,p){var v=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,d,h,p);return e.has(this._edgeLabels,v)},i.prototype.removeEdge=function(d,h,p){var v=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,d,h,p),y=this._edgeObjs[v];return y&&(d=y.v,h=y.w,delete this._edgeLabels[v],delete this._edgeObjs[v],a(this._preds[h],d),a(this._sucs[d],h),delete this._in[h][v],delete this._out[d][v],this._edgeCount--),this},i.prototype.inEdges=function(d,h){var p=this._in[d];if(p){var v=e.values(p);return h?e.filter(v,function(y){return y.v===h}):v}},i.prototype.outEdges=function(d,h){var p=this._out[d];if(p){var v=e.values(p);return h?e.filter(v,function(y){return y.w===h}):v}},i.prototype.nodeEdges=function(d,h){var p=this.inEdges(d,h);if(p)return p.concat(this.outEdges(d,h))};function o(d,h){d[h]?d[h]++:d[h]=1}function a(d,h){--d[h]||delete d[h]}function s(d,h,p,v){var y=""+h,m=""+p;if(!d&&y>m){var g=y;y=m,m=g}return y+n+m+n+(e.isUndefined(v)?t:v)}function c(d,h,p,v){var y=""+h,m=""+p;if(!d&&y>m){var g=y;y=m,m=g}var w={v:y,w:m};return v&&(w.name=v),w}function u(d,h){return s(d,h.v,h.w,h.name)}return Cm}var Im,kN;function UJ(){return kN||(kN=1,Im="2.1.8"),Im}var Rm,AN;function GJ(){return AN||(AN=1,Rm={Graph:kS(),version:UJ()}),Rm}var Nm,DN;function KJ(){if(DN)return Nm;DN=1;var e=Cn(),t=kS();Nm={write:r,read:o};function r(a){var s={options:{directed:a.isDirected(),multigraph:a.isMultigraph(),compound:a.isCompound()},nodes:n(a),edges:i(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 i(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 o(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 Nm}var Tm,jN;function YJ(){if(jN)return Tm;jN=1;var e=Cn();Tm=t;function t(r){var n={},i=[],o;function a(s){e.has(n,s)||(n[s]=!0,o.push(s),e.each(r.successors(s),a),e.each(r.predecessors(s),a))}return e.each(r.nodes(),function(s){o=[],a(s),o.length&&i.push(o)}),i}return Tm}var Pm,qN;function D6(){if(qN)return Pm;qN=1;var e=Cn();Pm=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 i=this._keyIndices;if(r=String(r),!e.has(i,r)){var o=this._arr,a=o.length;return i[r]=a,o.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 i=this._keyIndices[r];if(n>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+r+" Old: "+this._arr[i].priority+" New: "+n);this._arr[i].priority=n,this._decrease(i)},t.prototype._heapify=function(r){var n=this._arr,i=2*r,o=i+1,a=r;i<n.length&&(a=n[i].priority<n[a].priority?i:a,o<n.length&&(a=n[o].priority<n[a].priority?o:a),a!==r&&(this._swap(r,a),this._heapify(a)))},t.prototype._decrease=function(r){for(var n=this._arr,i=n[r].priority,o;r!==0&&(o=r>>1,!(n[o].priority<i));)this._swap(r,o),r=o},t.prototype._swap=function(r,n){var i=this._arr,o=this._keyIndices,a=i[r],s=i[n];i[r]=s,i[n]=a,o[s.key]=r,o[a.key]=n},Pm}var Mm,zN;function j6(){if(zN)return Mm;zN=1;var e=Cn(),t=D6();Mm=n;var r=e.constant(1);function n(o,a,s,c){return i(o,String(a),s||r,c||function(u){return o.outEdges(u)})}function i(o,a,s,c){var u={},d=new t,h,p,v=function(y){var m=y.v!==h?y.v:y.w,g=u[m],w=s(y),x=p.distance+w;if(w<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+y+" Weight: "+w);x<g.distance&&(g.distance=x,g.predecessor=h,d.decrease(m,x))};for(o.nodes().forEach(function(y){var m=y===a?0:Number.POSITIVE_INFINITY;u[y]={distance:m},d.add(y,m)});d.size()>0&&(h=d.removeMin(),p=u[h],p.distance!==Number.POSITIVE_INFINITY);)c(h).forEach(v);return u}return Mm}var km,LN;function XJ(){if(LN)return km;LN=1;var e=j6(),t=Cn();km=r;function r(n,i,o){return t.transform(n.nodes(),function(a,s){a[s]=e(n,s,i,o)},{})}return km}var Am,BN;function q6(){if(BN)return Am;BN=1;var e=Cn();Am=t;function t(r){var n=0,i=[],o={},a=[];function s(c){var u=o[c]={onStack:!0,lowlink:n,index:n++};if(i.push(c),r.successors(c).forEach(function(p){e.has(o,p)?o[p].onStack&&(u.lowlink=Math.min(u.lowlink,o[p].index)):(s(p),u.lowlink=Math.min(u.lowlink,o[p].lowlink))}),u.lowlink===u.index){var d=[],h;do h=i.pop(),o[h].onStack=!1,d.push(h);while(c!==h);a.push(d)}}return r.nodes().forEach(function(c){e.has(o,c)||s(c)}),a}return Am}var Dm,FN;function ZJ(){if(FN)return Dm;FN=1;var e=Cn(),t=q6();Dm=r;function r(n){return e.filter(t(n),function(i){return i.length>1||i.length===1&&n.hasEdge(i[0],i[0])})}return Dm}var jm,$N;function JJ(){if($N)return jm;$N=1;var e=Cn();jm=r;var t=e.constant(1);function r(i,o,a){return n(i,o||t,a||function(s){return i.outEdges(s)})}function n(i,o,a){var s={},c=i.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 h=d.v===u?d.w:d.v,p=o(d);s[u][h]={distance:p,predecessor:u}})}),c.forEach(function(u){var d=s[u];c.forEach(function(h){var p=s[h];c.forEach(function(v){var y=p[u],m=d[v],g=p[v],w=y.distance+m.distance;w<g.distance&&(g.distance=w,g.predecessor=m.predecessor)})})}),s}return jm}var qm,VN;function z6(){if(VN)return qm;VN=1;var e=Cn();qm=t,t.CycleException=r;function t(n){var i={},o={},a=[];function s(c){if(e.has(o,c))throw new r;e.has(i,c)||(o[c]=!0,i[c]=!0,e.each(n.predecessors(c),s),delete o[c],a.push(c))}if(e.each(n.sinks(),s),e.size(i)!==n.nodeCount())throw new r;return a}function r(){}return r.prototype=new Error,qm}var zm,HN;function QJ(){if(HN)return zm;HN=1;var e=z6();zm=t;function t(r){try{e(r)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return zm}var Lm,WN;function L6(){if(WN)return Lm;WN=1;var e=Cn();Lm=t;function t(n,i,o){e.isArray(i)||(i=[i]);var a=(n.isDirected()?n.successors:n.neighbors).bind(n),s=[],c={};return e.each(i,function(u){if(!n.hasNode(u))throw new Error("Graph does not have node: "+u);r(n,u,o==="post",c,a,s)}),s}function r(n,i,o,a,s,c){e.has(a,i)||(a[i]=!0,o||c.push(i),e.each(s(i),function(u){r(n,u,o,a,s,c)}),o&&c.push(i))}return Lm}var Bm,UN;function eQ(){if(UN)return Bm;UN=1;var e=L6();Bm=t;function t(r,n){return e(r,n,"post")}return Bm}var Fm,GN;function tQ(){if(GN)return Fm;GN=1;var e=L6();Fm=t;function t(r,n){return e(r,n,"pre")}return Fm}var $m,KN;function rQ(){if(KN)return $m;KN=1;var e=Cn(),t=kS(),r=D6();$m=n;function n(i,o){var a=new t,s={},c=new r,u;function d(p){var v=p.v===u?p.w:p.v,y=c.priority(v);if(y!==void 0){var m=o(p);m<y&&(s[v]=u,c.decrease(v,m))}}if(i.nodeCount()===0)return a;e.each(i.nodes(),function(p){c.add(p,Number.POSITIVE_INFINITY),a.setNode(p)}),c.decrease(i.nodes()[0],0);for(var h=!1;c.size()>0;){if(u=c.removeMin(),e.has(s,u))a.setEdge(u,s[u]);else{if(h)throw new Error("Input graph is not connected: "+i);h=!0}i.nodeEdges(u).forEach(d)}return a}return $m}var Vm,YN;function nQ(){return YN||(YN=1,Vm={components:YJ(),dijkstra:j6(),dijkstraAll:XJ(),findCycles:ZJ(),floydWarshall:JJ(),isAcyclic:QJ(),postorder:eQ(),preorder:tQ(),prim:rQ(),tarjan:q6(),topsort:z6()}),Vm}var Hm,XN;function iQ(){if(XN)return Hm;XN=1;var e=GJ();return Hm={Graph:e.Graph,json:KJ(),alg:nQ(),version:e.version},Hm}var Wm,ZN;function $n(){if(ZN)return Wm;ZN=1;var e;if(typeof mS=="function")try{e=iQ()}catch{}return e||(e=window.graphlib),Wm=e,Wm}var Um,JN;function oQ(){if(JN)return Um;JN=1;var e=u6(),t=1,r=4;function n(i){return e(i,t|r)}return Um=n,Um}var Gm,QN;function Vd(){if(QN)return Gm;QN=1;var e=Va(),t=Oi(),r=Ad(),n=On();function i(o,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],o):!1}return Gm=i,Gm}var Km,eT;function aQ(){if(eT)return Km;eT=1;var e=$d(),t=Va(),r=Vd(),n=Do(),i=Object.prototype,o=i.hasOwnProperty,a=e(function(s,c){s=Object(s);var u=-1,d=c.length,h=d>2?c[2]:void 0;for(h&&r(c[0],c[1],h)&&(d=1);++u<d;)for(var p=c[u],v=n(p),y=-1,m=v.length;++y<m;){var g=v[y],w=s[g];(w===void 0||t(w,i[g])&&!o.call(s,g))&&(s[g]=p[g])}return s});return Km=a,Km}var Ym,tT;function sQ(){if(tT)return Ym;tT=1;var e=Ci(),t=Oi(),r=to();function n(i){return function(o,a,s){var c=Object(o);if(!t(o)){var u=e(a,3);o=r(o),a=function(h){return u(c[h],h,c)}}var d=i(o,a,s);return d>-1?c[u?o[d]:d]:void 0}}return Ym=n,Ym}var Xm,rT;function lQ(){if(rT)return Xm;rT=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Xm=t,Xm}var Zm,nT;function cQ(){if(nT)return Zm;nT=1;var e=lQ(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Zm=r,Zm}var Jm,iT;function uQ(){if(iT)return Jm;iT=1;var e=cQ(),t=On(),r=Ga(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^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 h=o.test(u);return h||a.test(u)?s(u.slice(2),h?2:8):i.test(u)?n:+u}return Jm=c,Jm}var Qm,oT;function B6(){if(oT)return Qm;oT=1;var e=uQ(),t=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var o=i<0?-1:1;return o*r}return i===i?i:0}return Qm=n,Qm}var eb,aT;function dQ(){if(aT)return eb;aT=1;var e=B6();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return eb=t,eb}var tb,sT;function fQ(){if(sT)return tb;sT=1;var e=M6(),t=Ci(),r=dQ(),n=Math.max;function i(o,a,s){var c=o==null?0:o.length;if(!c)return-1;var u=s==null?0:r(s);return u<0&&(u=n(c+u,0)),e(o,t(a,3),u)}return tb=i,tb}var rb,lT;function hQ(){if(lT)return rb;lT=1;var e=sQ(),t=fQ(),r=e(t);return rb=r,rb}var nb,cT;function F6(){if(cT)return nb;cT=1;var e=MS();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return nb=t,nb}var ib,uT;function pQ(){if(uT)return ib;uT=1;var e=RS(),t=d6(),r=Do();function n(i,o){return i==null?i:e(i,t(o),r)}return ib=n,ib}var ob,dT;function vQ(){if(dT)return ob;dT=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return ob=e,ob}var ab,fT;function gQ(){if(fT)return ab;fT=1;var e=Md(),t=NS(),r=Ci();function n(i,o){var a={};return o=r(o,3),t(i,function(s,c,u){e(a,c,o(s,c,u))}),a}return ab=n,ab}var sb,hT;function AS(){if(hT)return sb;hT=1;var e=Ga();function t(r,n,i){for(var o=-1,a=r.length;++o<a;){var s=r[o],c=n(s);if(c!=null&&(u===void 0?c===c&&!e(c):i(c,u)))var u=c,d=s}return d}return sb=t,sb}var lb,pT;function mQ(){if(pT)return lb;pT=1;function e(t,r){return t>r}return lb=e,lb}var cb,vT;function bQ(){if(vT)return cb;vT=1;var e=AS(),t=mQ(),r=jo();function n(i){return i&&i.length?e(i,r,t):void 0}return cb=n,cb}var ub,gT;function $6(){if(gT)return ub;gT=1;var e=Md(),t=Va();function r(n,i,o){(o!==void 0&&!t(n[i],o)||o===void 0&&!(i in n))&&e(n,i,o)}return ub=r,ub}var db,mT;function yQ(){if(mT)return db;mT=1;var e=ko(),t=qd(),r=si(),n="[object Object]",i=Function.prototype,o=Object.prototype,a=i.toString,s=o.hasOwnProperty,c=a.call(Object);function u(d){if(!r(d)||e(d)!=n)return!1;var h=t(d);if(h===null)return!0;var p=s.call(h,"constructor")&&h.constructor;return typeof p=="function"&&p instanceof p&&a.call(p)==c}return db=u,db}var fb,bT;function V6(){if(bT)return fb;bT=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return fb=e,fb}var hb,yT;function xQ(){if(yT)return hb;yT=1;var e=Tl(),t=Do();function r(n){return e(n,t(n))}return hb=r,hb}var pb,xT;function wQ(){if(xT)return pb;xT=1;var e=$6(),t=J4(),r=s6(),n=Q4(),i=c6(),o=Pl(),a=Ut(),s=k6(),c=Wa(),u=Nl(),d=On(),h=yQ(),p=Ml(),v=V6(),y=xQ();function m(g,w,x,_,S,E,I){var N=v(g,x),T=v(w,x),M=I.get(T);if(M){e(g,x,M);return}var z=E?E(N,T,x+"",g,w,I):void 0,j=z===void 0;if(j){var W=a(T),U=!W&&c(T),A=!W&&!U&&p(T);z=T,W||U||A?a(N)?z=N:s(N)?z=n(N):U?(j=!1,z=t(T,!0)):A?(j=!1,z=r(T,!0)):z=[]:h(T)||o(T)?(z=N,o(N)?z=y(N):(!d(N)||u(N))&&(z=i(T))):j=!1}j&&(I.set(T,z),S(z,T,_,E,I),I.delete(T)),e(g,x,z)}return pb=m,pb}var vb,wT;function SQ(){if(wT)return vb;wT=1;var e=Pd(),t=$6(),r=RS(),n=wQ(),i=On(),o=Do(),a=V6();function s(c,u,d,h,p){c!==u&&r(u,function(v,y){if(p||(p=new e),i(v))n(c,u,y,d,s,h,p);else{var m=h?h(a(c,y),v,y+"",c,u,p):void 0;m===void 0&&(m=v),t(c,y,m)}},o)}return vb=s,vb}var gb,ST;function EQ(){if(ST)return gb;ST=1;var e=$d(),t=Vd();function r(n){return e(function(i,o){var a=-1,s=o.length,c=s>1?o[s-1]:void 0,u=s>2?o[2]:void 0;for(c=n.length>3&&typeof c=="function"?(s--,c):void 0,u&&t(o[0],o[1],u)&&(c=s<3?void 0:c,s=1),i=Object(i);++a<s;){var d=o[a];d&&n(i,d,a,c)}return i})}return gb=r,gb}var mb,ET;function _Q(){if(ET)return mb;ET=1;var e=SQ(),t=EQ(),r=t(function(n,i,o){e(n,i,o)});return mb=r,mb}var bb,_T;function H6(){if(_T)return bb;_T=1;function e(t,r){return t<r}return bb=e,bb}var yb,OT;function OQ(){if(OT)return yb;OT=1;var e=AS(),t=H6(),r=jo();function n(i){return i&&i.length?e(i,r,t):void 0}return yb=n,yb}var xb,CT;function CQ(){if(CT)return xb;CT=1;var e=AS(),t=Ci(),r=H6();function n(i,o){return i&&i.length?e(i,t(o,2),r):void 0}return xb=n,xb}var wb,IT;function IQ(){if(IT)return wb;IT=1;var e=Vn(),t=function(){return e.Date.now()};return wb=t,wb}var Sb,RT;function RQ(){if(RT)return Sb;RT=1;var e=kd(),t=Bd(),r=Ad(),n=On(),i=kl();function o(a,s,c,u){if(!n(a))return a;s=t(s,a);for(var d=-1,h=s.length,p=h-1,v=a;v!=null&&++d<h;){var y=i(s[d]),m=c;if(y==="__proto__"||y==="constructor"||y==="prototype")return a;if(d!=p){var g=v[y];m=u?u(g,y,v):void 0,m===void 0&&(m=n(g)?g:r(s[d+1])?[]:{})}e(v,y,m),v=v[y]}return a}return Sb=o,Sb}var Eb,NT;function NQ(){if(NT)return Eb;NT=1;var e=Fd(),t=RQ(),r=Bd();function n(i,o,a){for(var s=-1,c=o.length,u={};++s<c;){var d=o[s],h=e(i,d);a(h,d)&&t(u,r(d,i),h)}return u}return Eb=n,Eb}var _b,TT;function TQ(){if(TT)return _b;TT=1;var e=NQ(),t=S6();function r(n,i){return e(n,i,function(o,a){return t(n,a)})}return _b=r,_b}var Ob,PT;function PQ(){if(PT)return Ob;PT=1;var e=F6(),t=T6(),r=P6();function n(i){return r(t(i,void 0,e),i+"")}return Ob=n,Ob}var Cb,MT;function MQ(){if(MT)return Cb;MT=1;var e=TQ(),t=PQ(),r=t(function(n,i){return n==null?{}:e(n,i)});return Cb=r,Cb}var Ib,kT;function kQ(){if(kT)return Ib;kT=1;var e=Math.ceil,t=Math.max;function r(n,i,o,a){for(var s=-1,c=t(e((i-n)/(o||1)),0),u=Array(c);c--;)u[a?c:++s]=n,n+=o;return u}return Ib=r,Ib}var Rb,AT;function AQ(){if(AT)return Rb;AT=1;var e=kQ(),t=Vd(),r=B6();function n(i){return function(o,a,s){return s&&typeof s!="number"&&t(o,a,s)&&(a=s=void 0),o=r(o),a===void 0?(a=o,o=0):a=r(a),s=s===void 0?o<a?1:-1:r(s),e(o,a,s,i)}}return Rb=n,Rb}var Nb,DT;function DQ(){if(DT)return Nb;DT=1;var e=AQ(),t=e();return Nb=t,Nb}var Tb,jT;function jQ(){if(jT)return Tb;jT=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return Tb=e,Tb}var Pb,qT;function qQ(){if(qT)return Pb;qT=1;var e=Ga();function t(r,n){if(r!==n){var i=r!==void 0,o=r===null,a=r===r,s=e(r),c=n!==void 0,u=n===null,d=n===n,h=e(n);if(!u&&!h&&!s&&r>n||s&&c&&d&&!u&&!h||o&&c&&d||!i&&d||!a)return 1;if(!o&&!s&&!h&&r<n||h&&i&&a&&!o&&!s||u&&i&&a||!c&&a||!d)return-1}return 0}return Pb=t,Pb}var Mb,zT;function zQ(){if(zT)return Mb;zT=1;var e=qQ();function t(r,n,i){for(var o=-1,a=r.criteria,s=n.criteria,c=a.length,u=i.length;++o<c;){var d=e(a[o],s[o]);if(d){if(o>=u)return d;var h=i[o];return d*(h=="desc"?-1:1)}}return r.index-n.index}return Mb=t,Mb}var kb,LT;function LQ(){if(LT)return kb;LT=1;var e=Ld(),t=Fd(),r=Ci(),n=I6(),i=jQ(),o=Dd(),a=zQ(),s=jo(),c=Ut();function u(d,h,p){h.length?h=e(h,function(m){return c(m)?function(g){return t(g,m.length===1?m[0]:m)}:m}):h=[s];var v=-1;h=e(h,o(r));var y=n(d,function(m,g,w){var x=e(h,function(_){return _(m)});return{criteria:x,index:++v,value:m}});return i(y,function(m,g){return a(m,g,p)})}return kb=u,kb}var Ab,BT;function BQ(){if(BT)return Ab;BT=1;var e=MS(),t=LQ(),r=$d(),n=Vd(),i=r(function(o,a){if(o==null)return[];var s=a.length;return s>1&&n(o,a[0],a[1])?a=[]:s>2&&n(a[0],a[1],a[2])&&(a=[a[0]]),t(o,e(a,1),[])});return Ab=i,Ab}var Db,FT;function FQ(){if(FT)return Db;FT=1;var e=x6(),t=0;function r(n){var i=++t;return e(n)+i}return Db=r,Db}var jb,$T;function $Q(){if($T)return jb;$T=1;function e(t,r,n){for(var i=-1,o=t.length,a=r.length,s={};++i<o;){var c=i<a?r[i]:void 0;n(s,t[i],c)}return s}return jb=e,jb}var qb,VT;function VQ(){if(VT)return qb;VT=1;var e=kd(),t=$Q();function r(n,i){return t(n||[],i||[],e)}return qb=r,qb}var zb,HT;function It(){if(HT)return zb;HT=1;var e;if(typeof mS=="function")try{e={cloneDeep:oQ(),constant:IS(),defaults:aQ(),each:h6(),filter:_6(),find:hQ(),flatten:F6(),forEach:f6(),forIn:pQ(),has:O6(),isUndefined:C6(),last:vQ(),map:R6(),mapValues:gQ(),max:bQ(),merge:_Q(),min:OQ(),minBy:CQ(),now:IQ(),pick:MQ(),range:DQ(),reduce:N6(),sortBy:BQ(),uniqueId:FQ(),values:A6(),zipObject:VQ()}}catch{}return e||(e=window._),zb=e,zb}var Lb,WT;function HQ(){if(WT)return Lb;WT=1,Lb=e;function e(){var n={};n._next=n._prev=n,this._sentinel=n}e.prototype.dequeue=function(){var n=this._sentinel,i=n._prev;if(i!==n)return t(i),i},e.prototype.enqueue=function(n){var i=this._sentinel;n._prev&&n._next&&t(n),n._next=i._next,i._next._prev=n,i._next=n,n._prev=i},e.prototype.toString=function(){for(var n=[],i=this._sentinel,o=i._prev;o!==i;)n.push(JSON.stringify(o,r)),o=o._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,i){if(n!=="_next"&&n!=="_prev")return i}return Lb}var Bb,UT;function WQ(){if(UT)return Bb;UT=1;var e=It(),t=$n().Graph,r=HQ();Bb=i;var n=e.constant(1);function i(u,d){if(u.nodeCount()<=1)return[];var h=s(u,d||n),p=o(h.graph,h.buckets,h.zeroIdx);return e.flatten(e.map(p,function(v){return u.outEdges(v.v,v.w)}),!0)}function o(u,d,h){for(var p=[],v=d[d.length-1],y=d[0],m;u.nodeCount();){for(;m=y.dequeue();)a(u,d,h,m);for(;m=v.dequeue();)a(u,d,h,m);if(u.nodeCount()){for(var g=d.length-2;g>0;--g)if(m=d[g].dequeue(),m){p=p.concat(a(u,d,h,m,!0));break}}}return p}function a(u,d,h,p,v){var y=v?[]:void 0;return e.forEach(u.inEdges(p.v),function(m){var g=u.edge(m),w=u.node(m.v);v&&y.push({v:m.v,w:m.w}),w.out-=g,c(d,h,w)}),e.forEach(u.outEdges(p.v),function(m){var g=u.edge(m),w=m.w,x=u.node(w);x.in-=g,c(d,h,x)}),u.removeNode(p.v),y}function s(u,d){var h=new t,p=0,v=0;e.forEach(u.nodes(),function(g){h.setNode(g,{v:g,in:0,out:0})}),e.forEach(u.edges(),function(g){var w=h.edge(g.v,g.w)||0,x=d(g),_=w+x;h.setEdge(g.v,g.w,_),v=Math.max(v,h.node(g.v).out+=x),p=Math.max(p,h.node(g.w).in+=x)});var y=e.range(v+p+3).map(function(){return new r}),m=p+1;return e.forEach(h.nodes(),function(g){c(y,m,h.node(g))}),{graph:h,buckets:y,zeroIdx:m}}function c(u,d,h){h.out?h.in?u[h.out-h.in+d].enqueue(h):u[u.length-1].enqueue(h):u[0].enqueue(h)}return Bb}var Fb,GT;function UQ(){if(GT)return Fb;GT=1;var e=It(),t=WQ();Fb={run:r,undo:i};function r(o){var a=o.graph().acyclicer==="greedy"?t(o,s(o)):n(o);e.forEach(a,function(c){var u=o.edge(c);o.removeEdge(c),u.forwardName=c.name,u.reversed=!0,o.setEdge(c.w,c.v,u,e.uniqueId("rev"))});function s(c){return function(u){return c.edge(u).weight}}}function n(o){var a=[],s={},c={};function u(d){e.has(c,d)||(c[d]=!0,s[d]=!0,e.forEach(o.outEdges(d),function(h){e.has(s,h.w)?a.push(h):u(h.w)}),delete s[d])}return e.forEach(o.nodes(),u),a}function i(o){e.forEach(o.edges(),function(a){var s=o.edge(a);if(s.reversed){o.removeEdge(a);var c=s.forwardName;delete s.reversed,delete s.forwardName,o.setEdge(a.w,a.v,s,c)}})}return Fb}var $b,KT;function Hr(){if(KT)return $b;KT=1;var e=It(),t=$n().Graph;$b={addDummyNode:r,simplify:n,asNonCompoundGraph:i,successorWeights:o,predecessorWeights:a,intersectRect:s,buildLayerMatrix:c,normalizeRanks:u,removeEmptyRanks:d,addBorderNode:h,maxRank:p,partition:v,time:y,notime:m};function r(g,w,x,_){var S;do S=e.uniqueId(_);while(g.hasNode(S));return x.dummy=w,g.setNode(S,x),S}function n(g){var w=new t().setGraph(g.graph());return e.forEach(g.nodes(),function(x){w.setNode(x,g.node(x))}),e.forEach(g.edges(),function(x){var _=w.edge(x.v,x.w)||{weight:0,minlen:1},S=g.edge(x);w.setEdge(x.v,x.w,{weight:_.weight+S.weight,minlen:Math.max(_.minlen,S.minlen)})}),w}function i(g){var w=new t({multigraph:g.isMultigraph()}).setGraph(g.graph());return e.forEach(g.nodes(),function(x){g.children(x).length||w.setNode(x,g.node(x))}),e.forEach(g.edges(),function(x){w.setEdge(x,g.edge(x))}),w}function o(g){var w=e.map(g.nodes(),function(x){var _={};return e.forEach(g.outEdges(x),function(S){_[S.w]=(_[S.w]||0)+g.edge(S).weight}),_});return e.zipObject(g.nodes(),w)}function a(g){var w=e.map(g.nodes(),function(x){var _={};return e.forEach(g.inEdges(x),function(S){_[S.v]=(_[S.v]||0)+g.edge(S).weight}),_});return e.zipObject(g.nodes(),w)}function s(g,w){var x=g.x,_=g.y,S=w.x-x,E=w.y-_,I=g.width/2,N=g.height/2;if(!S&&!E)throw new Error("Not possible to find intersection inside of the rectangle");var T,M;return Math.abs(E)*I>Math.abs(S)*N?(E<0&&(N=-N),T=N*S/E,M=N):(S<0&&(I=-I),T=I,M=I*E/S),{x:x+T,y:_+M}}function c(g){var w=e.map(e.range(p(g)+1),function(){return[]});return e.forEach(g.nodes(),function(x){var _=g.node(x),S=_.rank;e.isUndefined(S)||(w[S][_.order]=x)}),w}function u(g){var w=e.min(e.map(g.nodes(),function(x){return g.node(x).rank}));e.forEach(g.nodes(),function(x){var _=g.node(x);e.has(_,"rank")&&(_.rank-=w)})}function d(g){var w=e.min(e.map(g.nodes(),function(E){return g.node(E).rank})),x=[];e.forEach(g.nodes(),function(E){var I=g.node(E).rank-w;x[I]||(x[I]=[]),x[I].push(E)});var _=0,S=g.graph().nodeRankFactor;e.forEach(x,function(E,I){e.isUndefined(E)&&I%S!==0?--_:_&&e.forEach(E,function(N){g.node(N).rank+=_})})}function h(g,w,x,_){var S={width:0,height:0};return arguments.length>=4&&(S.rank=x,S.order=_),r(g,"border",S,w)}function p(g){return e.max(e.map(g.nodes(),function(w){var x=g.node(w).rank;if(!e.isUndefined(x))return x}))}function v(g,w){var x={lhs:[],rhs:[]};return e.forEach(g,function(_){w(_)?x.lhs.push(_):x.rhs.push(_)}),x}function y(g,w){var x=e.now();try{return w()}finally{console.log(g+" time: "+(e.now()-x)+"ms")}}function m(g,w){return w()}return $b}var Vb,YT;function GQ(){if(YT)return Vb;YT=1;var e=It(),t=Hr();Vb={run:r,undo:i};function r(o){o.graph().dummyChains=[],e.forEach(o.edges(),function(a){n(o,a)})}function n(o,a){var s=a.v,c=o.node(s).rank,u=a.w,d=o.node(u).rank,h=a.name,p=o.edge(a),v=p.labelRank;if(d!==c+1){o.removeEdge(a);var y,m,g;for(g=0,++c;c<d;++g,++c)p.points=[],m={width:0,height:0,edgeLabel:p,edgeObj:a,rank:c},y=t.addDummyNode(o,"edge",m,"_d"),c===v&&(m.width=p.width,m.height=p.height,m.dummy="edge-label",m.labelpos=p.labelpos),o.setEdge(s,y,{weight:p.weight},h),g===0&&o.graph().dummyChains.push(y),s=y;o.setEdge(s,u,{weight:p.weight},h)}}function i(o){e.forEach(o.graph().dummyChains,function(a){var s=o.node(a),c=s.edgeLabel,u;for(o.setEdge(s.edgeObj,c);s.dummy;)u=o.successors(a)[0],o.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=o.node(a)})}return Vb}var Hb,XT;function Xu(){if(XT)return Hb;XT=1;var e=It();Hb={longestPath:t,slack:r};function t(n){var i={};function o(a){var s=n.node(a);if(e.has(i,a))return s.rank;i[a]=!0;var c=e.min(e.map(n.outEdges(a),function(u){return o(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(),o)}function r(n,i){return n.node(i.w).rank-n.node(i.v).rank-n.edge(i).minlen}return Hb}var Wb,ZT;function W6(){if(ZT)return Wb;ZT=1;var e=It(),t=$n().Graph,r=Xu().slack;Wb=n;function n(s){var c=new t({directed:!1}),u=s.nodes()[0],d=s.nodeCount();c.setNode(u,{});for(var h,p;i(c,s)<d;)h=o(c,s),p=c.hasNode(h.v)?r(s,h):-r(s,h),a(c,s,p);return c}function i(s,c){function u(d){e.forEach(c.nodeEdges(d),function(h){var p=h.v,v=d===p?h.w:p;!s.hasNode(v)&&!r(c,h)&&(s.setNode(v,{}),s.setEdge(d,v,{}),u(v))})}return e.forEach(s.nodes(),u),s.nodeCount()}function o(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 Wb}var Ub,JT;function KQ(){if(JT)return Ub;JT=1;var e=It(),t=W6(),r=Xu().slack,n=Xu().longestPath,i=$n().alg.preorder,o=$n().alg.postorder,a=Hr().simplify;Ub=s,s.initLowLimValues=h,s.initCutValues=c,s.calcCutValue=d,s.leaveEdge=v,s.enterEdge=y,s.exchangeEdges=m;function s(_){_=a(_),n(_);var S=t(_);h(S),c(S,_);for(var E,I;E=v(S);)I=y(S,_,E),m(S,_,E,I)}function c(_,S){var E=o(_,_.nodes());E=E.slice(0,E.length-1),e.forEach(E,function(I){u(_,S,I)})}function u(_,S,E){var I=_.node(E),N=I.parent;_.edge(E,N).cutvalue=d(_,S,E)}function d(_,S,E){var I=_.node(E),N=I.parent,T=!0,M=S.edge(E,N),z=0;return M||(T=!1,M=S.edge(N,E)),z=M.weight,e.forEach(S.nodeEdges(E),function(j){var W=j.v===E,U=W?j.w:j.v;if(U!==N){var A=W===T,K=S.edge(j).weight;if(z+=A?K:-K,w(_,E,U)){var V=_.edge(E,U).cutvalue;z+=A?-V:V}}}),z}function h(_,S){arguments.length<2&&(S=_.nodes()[0]),p(_,{},1,S)}function p(_,S,E,I,N){var T=E,M=_.node(I);return S[I]=!0,e.forEach(_.neighbors(I),function(z){e.has(S,z)||(E=p(_,S,E,z,I))}),M.low=T,M.lim=E++,N?M.parent=N:delete M.parent,E}function v(_){return e.find(_.edges(),function(S){return _.edge(S).cutvalue<0})}function y(_,S,E){var I=E.v,N=E.w;S.hasEdge(I,N)||(I=E.w,N=E.v);var T=_.node(I),M=_.node(N),z=T,j=!1;T.lim>M.lim&&(z=M,j=!0);var W=e.filter(S.edges(),function(U){return j===x(_,_.node(U.v),z)&&j!==x(_,_.node(U.w),z)});return e.minBy(W,function(U){return r(S,U)})}function m(_,S,E,I){var N=E.v,T=E.w;_.removeEdge(N,T),_.setEdge(I.v,I.w,{}),h(_),c(_,S),g(_,S)}function g(_,S){var E=e.find(_.nodes(),function(N){return!S.node(N).parent}),I=i(_,E);I=I.slice(1),e.forEach(I,function(N){var T=_.node(N).parent,M=S.edge(N,T),z=!1;M||(M=S.edge(T,N),z=!0),S.node(N).rank=S.node(T).rank+(z?M.minlen:-M.minlen)})}function w(_,S,E){return _.hasEdge(S,E)}function x(_,S,E){return E.low<=S.lim&&S.lim<=E.lim}return Ub}var Gb,QT;function YQ(){if(QT)return Gb;QT=1;var e=Xu(),t=e.longestPath,r=W6(),n=KQ();Gb=i;function i(c){switch(c.graph().ranker){case"network-simplex":s(c);break;case"tight-tree":a(c);break;case"longest-path":o(c);break;default:s(c)}}var o=t;function a(c){t(c),r(c)}function s(c){n(c)}return Gb}var Kb,eP;function XQ(){if(eP)return Kb;eP=1;var e=It();Kb=t;function t(i){var o=n(i);e.forEach(i.graph().dummyChains,function(a){for(var s=i.node(a),c=s.edgeObj,u=r(i,o,c.v,c.w),d=u.path,h=u.lca,p=0,v=d[p],y=!0;a!==c.w;){if(s=i.node(a),y){for(;(v=d[p])!==h&&i.node(v).maxRank<s.rank;)p++;v===h&&(y=!1)}if(!y){for(;p<d.length-1&&i.node(v=d[p+1]).minRank<=s.rank;)p++;v=d[p]}i.setParent(a,v),a=i.successors(a)[0]}})}function r(i,o,a,s){var c=[],u=[],d=Math.min(o[a].low,o[s].low),h=Math.max(o[a].lim,o[s].lim),p,v;p=a;do p=i.parent(p),c.push(p);while(p&&(o[p].low>d||h>o[p].lim));for(v=p,p=s;(p=i.parent(p))!==v;)u.push(p);return{path:c.concat(u.reverse()),lca:v}}function n(i){var o={},a=0;function s(c){var u=a;e.forEach(i.children(c),s),o[c]={low:u,lim:a++}}return e.forEach(i.children(),s),o}return Kb}var Yb,tP;function ZQ(){if(tP)return Yb;tP=1;var e=It(),t=Hr();Yb={run:r,cleanup:a};function r(s){var c=t.addDummyNode(s,"root",{},"_root"),u=i(s),d=e.max(e.values(u))-1,h=2*d+1;s.graph().nestingRoot=c,e.forEach(s.edges(),function(v){s.edge(v).minlen*=h});var p=o(s)+1;e.forEach(s.children(),function(v){n(s,c,h,p,d,u,v)}),s.graph().nodeRankFactor=h}function n(s,c,u,d,h,p,v){var y=s.children(v);if(!y.length){v!==c&&s.setEdge(c,v,{weight:0,minlen:u});return}var m=t.addBorderNode(s,"_bt"),g=t.addBorderNode(s,"_bb"),w=s.node(v);s.setParent(m,v),w.borderTop=m,s.setParent(g,v),w.borderBottom=g,e.forEach(y,function(x){n(s,c,u,d,h,p,x);var _=s.node(x),S=_.borderTop?_.borderTop:x,E=_.borderBottom?_.borderBottom:x,I=_.borderTop?d:2*d,N=S!==E?1:h-p[v]+1;s.setEdge(m,S,{weight:I,minlen:N,nestingEdge:!0}),s.setEdge(E,g,{weight:I,minlen:N,nestingEdge:!0})}),s.parent(v)||s.setEdge(c,m,{weight:0,minlen:h+p[v]})}function i(s){var c={};function u(d,h){var p=s.children(d);p&&p.length&&e.forEach(p,function(v){u(v,h+1)}),c[d]=h}return e.forEach(s.children(),function(d){u(d,1)}),c}function o(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 Yb}var Xb,rP;function JQ(){if(rP)return Xb;rP=1;var e=It(),t=Hr();Xb=r;function r(i){function o(a){var s=i.children(a),c=i.node(a);if(s.length&&e.forEach(s,o),e.has(c,"minRank")){c.borderLeft=[],c.borderRight=[];for(var u=c.minRank,d=c.maxRank+1;u<d;++u)n(i,"borderLeft","_bl",a,c,u),n(i,"borderRight","_br",a,c,u)}}e.forEach(i.children(),o)}function n(i,o,a,s,c,u){var d={width:0,height:0,rank:u,borderType:o},h=c[o][u-1],p=t.addDummyNode(i,"border",d,a);c[o][u]=p,i.setParent(p,s),h&&i.setEdge(h,p,{weight:1})}return Xb}var Zb,nP;function QQ(){if(nP)return Zb;nP=1;var e=It();Zb={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")&&o(u),(d==="lr"||d==="rl")&&(s(u),n(u))}function n(u){e.forEach(u.nodes(),function(d){i(u.node(d))}),e.forEach(u.edges(),function(d){i(u.edge(d))})}function i(u){var d=u.width;u.width=u.height,u.height=d}function o(u){e.forEach(u.nodes(),function(d){a(u.node(d))}),e.forEach(u.edges(),function(d){var h=u.edge(d);e.forEach(h.points,a),e.has(h,"y")&&a(h)})}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 h=u.edge(d);e.forEach(h.points,c),e.has(h,"x")&&c(h)})}function c(u){var d=u.x;u.x=u.y,u.y=d}return Zb}var Jb,iP;function eee(){if(iP)return Jb;iP=1;var e=It();Jb=t;function t(r){var n={},i=e.filter(r.nodes(),function(u){return!r.children(u).length}),o=e.max(e.map(i,function(u){return r.node(u).rank})),a=e.map(e.range(o+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(i,function(u){return r.node(u).rank});return e.forEach(c,s),a}return Jb}var Qb,oP;function tee(){if(oP)return Qb;oP=1;var e=It();Qb=t;function t(n,i){for(var o=0,a=1;a<i.length;++a)o+=r(n,i[a-1],i[a]);return o}function r(n,i,o){for(var a=e.zipObject(o,e.map(o,function(p,v){return v})),s=e.flatten(e.map(i,function(p){return e.sortBy(e.map(n.outEdges(p),function(v){return{pos:a[v.w],weight:n.edge(v).weight}}),"pos")}),!0),c=1;c<o.length;)c<<=1;var u=2*c-1;c-=1;var d=e.map(new Array(u),function(){return 0}),h=0;return e.forEach(s.forEach(function(p){var v=p.pos+c;d[v]+=p.weight;for(var y=0;v>0;)v%2&&(y+=d[v+1]),v=v-1>>1,d[v]+=p.weight;h+=p.weight*y})),h}return Qb}var e0,aP;function ree(){if(aP)return e0;aP=1;var e=It();e0=t;function t(r,n){return e.map(n,function(i){var o=r.inEdges(i);if(o.length){var a=e.reduce(o,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:i,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:i}})}return e0}var t0,sP;function nee(){if(sP)return t0;sP=1;var e=It();t0=t;function t(i,o){var a={};e.forEach(i,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(o.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(i){var o=[];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&&i.push(d)}}for(;i.length;){var c=i.pop();o.push(c),e.forEach(c.in.reverse(),a(c)),e.forEach(c.out,s(c))}return e.map(e.filter(o,function(u){return!u.merged}),function(u){return e.pick(u,["vs","i","barycenter","weight"])})}function n(i,o){var a=0,s=0;i.weight&&(a+=i.barycenter*i.weight,s+=i.weight),o.weight&&(a+=o.barycenter*o.weight,s+=o.weight),i.vs=o.vs.concat(i.vs),i.barycenter=a/s,i.weight=s,i.i=Math.min(o.i,i.i),o.merged=!0}return t0}var r0,lP;function iee(){if(lP)return r0;lP=1;var e=It(),t=Hr();r0=r;function r(o,a){var s=t.partition(o,function(m){return e.has(m,"barycenter")}),c=s.lhs,u=e.sortBy(s.rhs,function(m){return-m.i}),d=[],h=0,p=0,v=0;c.sort(i(!!a)),v=n(d,u,v),e.forEach(c,function(m){v+=m.vs.length,d.push(m.vs),h+=m.barycenter*m.weight,p+=m.weight,v=n(d,u,v)});var y={vs:e.flatten(d,!0)};return p&&(y.barycenter=h/p,y.weight=p),y}function n(o,a,s){for(var c;a.length&&(c=e.last(a)).i<=s;)a.pop(),o.push(c.vs),s++;return s}function i(o){return function(a,s){return a.barycenter<s.barycenter?-1:a.barycenter>s.barycenter?1:o?s.i-a.i:a.i-s.i}}return r0}var n0,cP;function oee(){if(cP)return n0;cP=1;var e=It(),t=ree(),r=nee(),n=iee();n0=i;function i(s,c,u,d){var h=s.children(c),p=s.node(c),v=p?p.borderLeft:void 0,y=p?p.borderRight:void 0,m={};v&&(h=e.filter(h,function(E){return E!==v&&E!==y}));var g=t(s,h);e.forEach(g,function(E){if(s.children(E.v).length){var I=i(s,E.v,u,d);m[E.v]=I,e.has(I,"barycenter")&&a(E,I)}});var w=r(g,u);o(w,m);var x=n(w,d);if(v&&(x.vs=e.flatten([v,x.vs,y],!0),s.predecessors(v).length)){var _=s.node(s.predecessors(v)[0]),S=s.node(s.predecessors(y)[0]);e.has(x,"barycenter")||(x.barycenter=0,x.weight=0),x.barycenter=(x.barycenter*x.weight+_.order+S.order)/(x.weight+2),x.weight+=2}return x}function o(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 n0}var i0,uP;function aee(){if(uP)return i0;uP=1;var e=It(),t=$n().Graph;i0=r;function r(i,o,a){var s=n(i),c=new t({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(u){return i.node(u)});return e.forEach(i.nodes(),function(u){var d=i.node(u),h=i.parent(u);(d.rank===o||d.minRank<=o&&o<=d.maxRank)&&(c.setNode(u),c.setParent(u,h||s),e.forEach(i[a](u),function(p){var v=p.v===u?p.w:p.v,y=c.edge(v,u),m=e.isUndefined(y)?0:y.weight;c.setEdge(v,u,{weight:i.edge(p).weight+m})}),e.has(d,"minRank")&&c.setNode(u,{borderLeft:d.borderLeft[o],borderRight:d.borderRight[o]}))}),c}function n(i){for(var o;i.hasNode(o=e.uniqueId("_root")););return o}return i0}var o0,dP;function see(){if(dP)return o0;dP=1;var e=It();o0=t;function t(r,n,i){var o={},a;e.forEach(i,function(s){for(var c=r.parent(s),u,d;c;){if(u=r.parent(c),u?(d=o[u],o[u]=c):(d=a,a=c),d&&d!==c){n.setEdge(d,c);return}c=u}})}return o0}var a0,fP;function lee(){if(fP)return a0;fP=1;var e=It(),t=eee(),r=tee(),n=oee(),i=aee(),o=see(),a=$n().Graph,s=Hr();a0=c;function c(p){var v=s.maxRank(p),y=u(p,e.range(1,v+1),"inEdges"),m=u(p,e.range(v-1,-1,-1),"outEdges"),g=t(p);h(p,g);for(var w=Number.POSITIVE_INFINITY,x,_=0,S=0;S<4;++_,++S){d(_%2?y:m,_%4>=2),g=s.buildLayerMatrix(p);var E=r(p,g);E<w&&(S=0,x=e.cloneDeep(g),w=E)}h(p,x)}function u(p,v,y){return e.map(v,function(m){return i(p,m,y)})}function d(p,v){var y=new a;e.forEach(p,function(m){var g=m.graph().root,w=n(m,g,y,v);e.forEach(w.vs,function(x,_){m.node(x).order=_}),o(m,y,w.vs)})}function h(p,v){e.forEach(v,function(y){e.forEach(y,function(m,g){p.node(m).order=g})})}return a0}var s0,hP;function cee(){if(hP)return s0;hP=1;var e=It(),t=$n().Graph,r=Hr();s0={positionX:y,findType1Conflicts:n,findType2Conflicts:i,addConflict:a,hasConflict:s,verticalAlignment:c,horizontalCompaction:u,alignCoordinates:p,findSmallestWidthAlignment:h,balance:v};function n(w,x){var _={};function S(E,I){var N=0,T=0,M=E.length,z=e.last(I);return e.forEach(I,function(j,W){var U=o(w,j),A=U?w.node(U).order:M;(U||j===z)&&(e.forEach(I.slice(T,W+1),function(K){e.forEach(w.predecessors(K),function(V){var te=w.node(V),G=te.order;(G<N||A<G)&&!(te.dummy&&w.node(K).dummy)&&a(_,V,K)})}),T=W+1,N=A)}),I}return e.reduce(x,S),_}function i(w,x){var _={};function S(I,N,T,M,z){var j;e.forEach(e.range(N,T),function(W){j=I[W],w.node(j).dummy&&e.forEach(w.predecessors(j),function(U){var A=w.node(U);A.dummy&&(A.order<M||A.order>z)&&a(_,U,j)})})}function E(I,N){var T=-1,M,z=0;return e.forEach(N,function(j,W){if(w.node(j).dummy==="border"){var U=w.predecessors(j);U.length&&(M=w.node(U[0]).order,S(N,z,W,T,M),z=W,T=M)}S(N,z,N.length,M,I.length)}),N}return e.reduce(x,E),_}function o(w,x){if(w.node(x).dummy)return e.find(w.predecessors(x),function(_){return w.node(_).dummy})}function a(w,x,_){if(x>_){var S=x;x=_,_=S}var E=w[x];E||(w[x]=E={}),E[_]=!0}function s(w,x,_){if(x>_){var S=x;x=_,_=S}return e.has(w[x],_)}function c(w,x,_,S){var E={},I={},N={};return e.forEach(x,function(T){e.forEach(T,function(M,z){E[M]=M,I[M]=M,N[M]=z})}),e.forEach(x,function(T){var M=-1;e.forEach(T,function(z){var j=S(z);if(j.length){j=e.sortBy(j,function(V){return N[V]});for(var W=(j.length-1)/2,U=Math.floor(W),A=Math.ceil(W);U<=A;++U){var K=j[U];I[z]===z&&M<N[K]&&!s(_,z,K)&&(I[K]=z,I[z]=E[z]=E[K],M=N[K])}}})}),{root:E,align:I}}function u(w,x,_,S,E){var I={},N=d(w,x,_,E),T=E?"borderLeft":"borderRight";function M(W,U){for(var A=N.nodes(),K=A.pop(),V={};K;)V[K]?W(K):(V[K]=!0,A.push(K),A=A.concat(U(K))),K=A.pop()}function z(W){I[W]=N.inEdges(W).reduce(function(U,A){return Math.max(U,I[A.v]+N.edge(A))},0)}function j(W){var U=N.outEdges(W).reduce(function(K,V){return Math.min(K,I[V.w]-N.edge(V))},Number.POSITIVE_INFINITY),A=w.node(W);U!==Number.POSITIVE_INFINITY&&A.borderType!==T&&(I[W]=Math.max(I[W],U))}return M(z,N.predecessors.bind(N)),M(j,N.successors.bind(N)),e.forEach(S,function(W){I[W]=I[_[W]]}),I}function d(w,x,_,S){var E=new t,I=w.graph(),N=m(I.nodesep,I.edgesep,S);return e.forEach(x,function(T){var M;e.forEach(T,function(z){var j=_[z];if(E.setNode(j),M){var W=_[M],U=E.edge(W,j);E.setEdge(W,j,Math.max(N(w,z,M),U||0))}M=z})}),E}function h(w,x){return e.minBy(e.values(x),function(_){var S=Number.NEGATIVE_INFINITY,E=Number.POSITIVE_INFINITY;return e.forIn(_,function(I,N){var T=g(w,N)/2;S=Math.max(I+T,S),E=Math.min(I-T,E)}),S-E})}function p(w,x){var _=e.values(x),S=e.min(_),E=e.max(_);e.forEach(["u","d"],function(I){e.forEach(["l","r"],function(N){var T=I+N,M=w[T],z;if(M!==x){var j=e.values(M);z=N==="l"?S-e.min(j):E-e.max(j),z&&(w[T]=e.mapValues(M,function(W){return W+z}))}})})}function v(w,x){return e.mapValues(w.ul,function(_,S){if(x)return w[x.toLowerCase()][S];var E=e.sortBy(e.map(w,S));return(E[1]+E[2])/2})}function y(w){var x=r.buildLayerMatrix(w),_=e.merge(n(w,x),i(w,x)),S={},E;e.forEach(["u","d"],function(N){E=N==="u"?x:e.values(x).reverse(),e.forEach(["l","r"],function(T){T==="r"&&(E=e.map(E,function(W){return e.values(W).reverse()}));var M=(N==="u"?w.predecessors:w.successors).bind(w),z=c(w,E,_,M),j=u(w,E,z.root,z.align,T==="r");T==="r"&&(j=e.mapValues(j,function(W){return-W})),S[N+T]=j})});var I=h(w,S);return p(S,I),v(S,w.graph().align)}function m(w,x,_){return function(S,E,I){var N=S.node(E),T=S.node(I),M=0,z;if(M+=N.width/2,e.has(N,"labelpos"))switch(N.labelpos.toLowerCase()){case"l":z=-N.width/2;break;case"r":z=N.width/2;break}if(z&&(M+=_?z:-z),z=0,M+=(N.dummy?x:w)/2,M+=(T.dummy?x:w)/2,M+=T.width/2,e.has(T,"labelpos"))switch(T.labelpos.toLowerCase()){case"l":z=T.width/2;break;case"r":z=-T.width/2;break}return z&&(M+=_?z:-z),z=0,M}}function g(w,x){return w.node(x).width}return s0}var l0,pP;function uee(){if(pP)return l0;pP=1;var e=It(),t=Hr(),r=cee().positionX;l0=n;function n(o){o=t.asNonCompoundGraph(o),i(o),e.forEach(r(o),function(a,s){o.node(s).x=a})}function i(o){var a=t.buildLayerMatrix(o),s=o.graph().ranksep,c=0;e.forEach(a,function(u){var d=e.max(e.map(u,function(h){return o.node(h).height}));e.forEach(u,function(h){o.node(h).y=c+d/2}),c+=d+s})}return l0}var c0,vP;function dee(){if(vP)return c0;vP=1;var e=It(),t=UQ(),r=GQ(),n=YQ(),i=Hr().normalizeRanks,o=XQ(),a=Hr().removeEmptyRanks,s=ZQ(),c=JQ(),u=QQ(),d=lee(),h=uee(),p=Hr(),v=$n().Graph;c0=y;function y(D,$){var H=$&&$.debugTiming?p.time:p.notime;H("layout",function(){var q=H(" buildLayoutGraph",function(){return M(D)});H(" runLayout",function(){m(q,H)}),H(" updateInputGraph",function(){g(D,q)})})}function m(D,$){$(" makeSpaceForEdgeLabels",function(){z(D)}),$(" removeSelfEdges",function(){re(D)}),$(" acyclic",function(){t.run(D)}),$(" nestingGraph.run",function(){s.run(D)}),$(" rank",function(){n(p.asNonCompoundGraph(D))}),$(" injectEdgeLabelProxies",function(){j(D)}),$(" removeEmptyRanks",function(){a(D)}),$(" nestingGraph.cleanup",function(){s.cleanup(D)}),$(" normalizeRanks",function(){i(D)}),$(" assignRankMinMax",function(){W(D)}),$(" removeEdgeLabelProxies",function(){U(D)}),$(" normalize.run",function(){r.run(D)}),$(" parentDummyChains",function(){o(D)}),$(" addBorderSegments",function(){c(D)}),$(" order",function(){d(D)}),$(" insertSelfEdges",function(){P(D)}),$(" adjustCoordinateSystem",function(){u.adjust(D)}),$(" position",function(){h(D)}),$(" positionSelfEdges",function(){B(D)}),$(" removeBorderNodes",function(){G(D)}),$(" normalize.undo",function(){r.undo(D)}),$(" fixupEdgeLabelCoords",function(){V(D)}),$(" undoCoordinateSystem",function(){u.undo(D)}),$(" translateGraph",function(){A(D)}),$(" assignNodeIntersects",function(){K(D)}),$(" reversePoints",function(){te(D)}),$(" acyclic.undo",function(){t.undo(D)})}function g(D,$){e.forEach(D.nodes(),function(H){var q=D.node(H),Y=$.node(H);q&&(q.x=Y.x,q.y=Y.y,$.children(H).length&&(q.width=Y.width,q.height=Y.height))}),e.forEach(D.edges(),function(H){var q=D.edge(H),Y=$.edge(H);q.points=Y.points,e.has(Y,"x")&&(q.x=Y.x,q.y=Y.y)}),D.graph().width=$.graph().width,D.graph().height=$.graph().height}var w=["nodesep","edgesep","ranksep","marginx","marginy"],x={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],S=["width","height"],E={width:0,height:0},I=["minlen","weight","width","height","labeloffset"],N={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},T=["labelpos"];function M(D){var $=new v({multigraph:!0,compound:!0}),H=Q(D.graph());return $.setGraph(e.merge({},x,X(H,w),e.pick(H,_))),e.forEach(D.nodes(),function(q){var Y=Q(D.node(q));$.setNode(q,e.defaults(X(Y,S),E)),$.setParent(q,D.parent(q))}),e.forEach(D.edges(),function(q){var Y=Q(D.edge(q));$.setEdge(q,e.merge({},N,X(Y,I),e.pick(Y,T)))}),$}function z(D){var $=D.graph();$.ranksep/=2,e.forEach(D.edges(),function(H){var q=D.edge(H);q.minlen*=2,q.labelpos.toLowerCase()!=="c"&&($.rankdir==="TB"||$.rankdir==="BT"?q.width+=q.labeloffset:q.height+=q.labeloffset)})}function j(D){e.forEach(D.edges(),function($){var H=D.edge($);if(H.width&&H.height){var q=D.node($.v),Y=D.node($.w),ie={rank:(Y.rank-q.rank)/2+q.rank,e:$};p.addDummyNode(D,"edge-proxy",ie,"_ep")}})}function W(D){var $=0;e.forEach(D.nodes(),function(H){var q=D.node(H);q.borderTop&&(q.minRank=D.node(q.borderTop).rank,q.maxRank=D.node(q.borderBottom).rank,$=e.max($,q.maxRank))}),D.graph().maxRank=$}function U(D){e.forEach(D.nodes(),function($){var H=D.node($);H.dummy==="edge-proxy"&&(D.edge(H.e).labelRank=H.rank,D.removeNode($))})}function A(D){var $=Number.POSITIVE_INFINITY,H=0,q=Number.POSITIVE_INFINITY,Y=0,ie=D.graph(),ne=ie.marginx||0,ve=ie.marginy||0;function Z(J){var ae=J.x,he=J.y,ue=J.width,de=J.height;$=Math.min($,ae-ue/2),H=Math.max(H,ae+ue/2),q=Math.min(q,he-de/2),Y=Math.max(Y,he+de/2)}e.forEach(D.nodes(),function(J){Z(D.node(J))}),e.forEach(D.edges(),function(J){var ae=D.edge(J);e.has(ae,"x")&&Z(ae)}),$-=ne,q-=ve,e.forEach(D.nodes(),function(J){var ae=D.node(J);ae.x-=$,ae.y-=q}),e.forEach(D.edges(),function(J){var ae=D.edge(J);e.forEach(ae.points,function(he){he.x-=$,he.y-=q}),e.has(ae,"x")&&(ae.x-=$),e.has(ae,"y")&&(ae.y-=q)}),ie.width=H-$+ne,ie.height=Y-q+ve}function K(D){e.forEach(D.edges(),function($){var H=D.edge($),q=D.node($.v),Y=D.node($.w),ie,ne;H.points?(ie=H.points[0],ne=H.points[H.points.length-1]):(H.points=[],ie=Y,ne=q),H.points.unshift(p.intersectRect(q,ie)),H.points.push(p.intersectRect(Y,ne))})}function V(D){e.forEach(D.edges(),function($){var H=D.edge($);if(e.has(H,"x"))switch((H.labelpos==="l"||H.labelpos==="r")&&(H.width-=H.labeloffset),H.labelpos){case"l":H.x-=H.width/2+H.labeloffset;break;case"r":H.x+=H.width/2+H.labeloffset;break}})}function te(D){e.forEach(D.edges(),function($){var H=D.edge($);H.reversed&&H.points.reverse()})}function G(D){e.forEach(D.nodes(),function($){if(D.children($).length){var H=D.node($),q=D.node(H.borderTop),Y=D.node(H.borderBottom),ie=D.node(e.last(H.borderLeft)),ne=D.node(e.last(H.borderRight));H.width=Math.abs(ne.x-ie.x),H.height=Math.abs(Y.y-q.y),H.x=ie.x+H.width/2,H.y=q.y+H.height/2}}),e.forEach(D.nodes(),function($){D.node($).dummy==="border"&&D.removeNode($)})}function re(D){e.forEach(D.edges(),function($){if($.v===$.w){var H=D.node($.v);H.selfEdges||(H.selfEdges=[]),H.selfEdges.push({e:$,label:D.edge($)}),D.removeEdge($)}})}function P(D){var $=p.buildLayerMatrix(D);e.forEach($,function(H){var q=0;e.forEach(H,function(Y,ie){var ne=D.node(Y);ne.order=ie+q,e.forEach(ne.selfEdges,function(ve){p.addDummyNode(D,"selfedge",{width:ve.label.width,height:ve.label.height,rank:ne.rank,order:ie+ ++q,e:ve.e,label:ve.label},"_se")}),delete ne.selfEdges})})}function B(D){e.forEach(D.nodes(),function($){var H=D.node($);if(H.dummy==="selfedge"){var q=D.node(H.e.v),Y=q.x+q.width/2,ie=q.y,ne=H.x-Y,ve=q.height/2;D.setEdge(H.e,H.label),D.removeNode($),H.label.points=[{x:Y+2*ne/3,y:ie-ve},{x:Y+5*ne/6,y:ie-ve},{x:Y+ne,y:ie},{x:Y+5*ne/6,y:ie+ve},{x:Y+2*ne/3,y:ie+ve}],H.label.x=H.x,H.label.y=H.y}})}function X(D,$){return e.mapValues(e.pick(D,$),Number)}function Q(D){var $={};return e.forEach(D,function(H,q){$[q.toLowerCase()]=H}),$}return c0}var u0,gP;function fee(){if(gP)return u0;gP=1;var e=It(),t=Hr(),r=$n().Graph;u0={debugOrdering:n};function n(i){var o=t.buildLayerMatrix(i),a=new r({compound:!0,multigraph:!0}).setGraph({});return e.forEach(i.nodes(),function(s){a.setNode(s,{label:s}),a.setParent(s,"layer"+i.node(s).rank)}),e.forEach(i.edges(),function(s){a.setEdge(s.v,s.w,{},s.name)}),e.forEach(o,function(s,c){var u="layer"+c;a.setNode(u,{rank:"same"}),e.reduce(s,function(d,h){return a.setEdge(d,h,{style:"invis"}),h})}),a}return u0}var d0,mP;function hee(){return mP||(mP=1,d0="0.8.5"),d0}var f0,bP;function pee(){return bP||(bP=1,f0={graphlib:$n(),layout:dee(),debug:fee(),util:{time:Hr().time,notime:Hr().notime},version:hee()}),f0}var vee=pee();const yP=eo(vee);function gee(e){let t;const r=new Set,n=(u,d)=>{const h=typeof u=="function"?u(t):u;if(h!==t){const p=t;t=d?h:Object.assign({},t,h),r.forEach(v=>v(t,p))}},i=()=>t,o=(u,d=i,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=d(t);function v(){const y=d(t);if(!h(p,y)){const m=p;u(p=y,m)}}return r.add(v),()=>r.delete(v)},c={setState:n,getState:i,subscribe:(u,d,h)=>d||h?o(u,d,h):(r.add(u),()=>r.delete(u)),destroy:()=>r.clear()};return t=e(n,i,c),c}const mee=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),xP=mee?C.useEffect:C.useLayoutEffect;function bee(e){const t=typeof e=="function"?gee(e):e,r=(n=t.getState,i=Object.is)=>{const[,o]=C.useReducer(g=>g+1,0),a=t.getState(),s=C.useRef(a),c=C.useRef(n),u=C.useRef(i),d=C.useRef(!1),h=C.useRef();h.current===void 0&&(h.current=n(a));let p,v=!1;(s.current!==a||c.current!==n||u.current!==i||d.current)&&(p=n(a),v=!i(h.current,p)),xP(()=>{v&&(h.current=p),s.current=a,c.current=n,u.current=i,d.current=!1});const y=C.useRef(a);xP(()=>{const g=()=>{try{const x=t.getState(),_=c.current(x);u.current(h.current,_)||(s.current=x,h.current=_,o())}catch{d.current=!0,o()}},w=t.subscribe(g);return t.getState()!==y.current&&g(),w},[]);const m=v?p:h.current;return C.useDebugValue(m),m};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 i=n.length<=0;return{value:n.shift(),done:i}}}},r}function yee(){const e=C.createContext(void 0);return{Provider:({initialStore:i,createStore:o,children:a})=>{const s=C.useRef();return s.current||(i&&(console.warn("Provider initialStore is deprecated and will be removed in the next version."),o||(o=()=>i)),s.current=o()),C.createElement(e.Provider,{value:s.current},a)},useStore:(i,o=Object.is)=>{const a=C.useContext(e);if(!a)throw new Error("Seems like you have not used zustand provider as an ancestor.");return a(i,o)},useStoreApi:()=>{const i=C.useContext(e);if(!i)throw new Error("Seems like you have not used zustand provider as an ancestor.");return C.useMemo(()=>({getState:i.getState,setState:i.setState,subscribe:i.subscribe,destroy:i.destroy}),[i])}}}var xee={value:()=>{}};function Hd(){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 Eu(r)}function Eu(e){this._=e}function wee(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Eu.prototype=Hd.prototype={constructor:Eu,on:function(e,t){var r=this._,n=wee(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=See(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=n[o]).type)r[i]=wP(r[i],e.name,t);else if(t==null)for(i in r)r[i]=wP(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Eu(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[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],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};function See(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function wP(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=xee,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var Dw="http://www.w3.org/1999/xhtml";const SP={svg:"http://www.w3.org/2000/svg",xhtml:Dw,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Wd(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),SP.hasOwnProperty(t)?{space:SP[t],local:e}:e}function Eee(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Dw&&t.documentElement.namespaceURI===Dw?t.createElement(e):t.createElementNS(r,e)}}function _ee(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function U6(e){var t=Wd(e);return(t.local?_ee:Eee)(t)}function Oee(){}function DS(e){return e==null?Oee:function(){return this.querySelector(e)}}function Cee(e){typeof e!="function"&&(e=DS(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=new Array(a),c,u,d=0;d<a;++d)(c=o[d])&&(u=e.call(c,c.__data__,d,o))&&("__data__"in c&&(u.__data__=c.__data__),s[d]=u);return new ln(n,this._parents)}function Iee(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Ree(){return[]}function G6(e){return e==null?Ree:function(){return this.querySelectorAll(e)}}function Nee(e){return function(){return Iee(e.apply(this,arguments))}}function Tee(e){typeof e=="function"?e=Nee(e):e=G6(e);for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a=t[o],s=a.length,c,u=0;u<s;++u)(c=a[u])&&(n.push(e.call(c,c.__data__,u,a)),i.push(c));return new ln(n,i)}function K6(e){return function(){return this.matches(e)}}function Y6(e){return function(t){return t.matches(e)}}var Pee=Array.prototype.find;function Mee(e){return function(){return Pee.call(this.children,e)}}function kee(){return this.firstElementChild}function Aee(e){return this.select(e==null?kee:Mee(typeof e=="function"?e:Y6(e)))}var Dee=Array.prototype.filter;function jee(){return Array.from(this.children)}function qee(e){return function(){return Dee.call(this.children,e)}}function zee(e){return this.selectAll(e==null?jee:qee(typeof e=="function"?e:Y6(e)))}function Lee(e){typeof e!="function"&&(e=K6(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],c,u=0;u<a;++u)(c=o[u])&&e.call(c,c.__data__,u,o)&&s.push(c);return new ln(n,this._parents)}function X6(e){return new Array(e.length)}function Bee(){return new ln(this._enter||this._groups.map(X6),this._parents)}function Zu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Zu.prototype={constructor:Zu,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 Fee(e){return function(){return e}}function $ee(e,t,r,n,i,o){for(var a=0,s,c=t.length,u=o.length;a<u;++a)(s=t[a])?(s.__data__=o[a],n[a]=s):r[a]=new Zu(e,o[a]);for(;a<c;++a)(s=t[a])&&(i[a]=s)}function Vee(e,t,r,n,i,o,a){var s,c,u=new Map,d=t.length,h=o.length,p=new Array(d),v;for(s=0;s<d;++s)(c=t[s])&&(p[s]=v=a.call(c,c.__data__,s,t)+"",u.has(v)?i[s]=c:u.set(v,c));for(s=0;s<h;++s)v=a.call(e,o[s],s,o)+"",(c=u.get(v))?(n[s]=c,c.__data__=o[s],u.delete(v)):r[s]=new Zu(e,o[s]);for(s=0;s<d;++s)(c=t[s])&&u.get(p[s])===c&&(i[s]=c)}function Hee(e){return e.__data__}function Wee(e,t){if(!arguments.length)return Array.from(this,Hee);var r=t?Vee:$ee,n=this._parents,i=this._groups;typeof e!="function"&&(e=Fee(e));for(var o=i.length,a=new Array(o),s=new Array(o),c=new Array(o),u=0;u<o;++u){var d=n[u],h=i[u],p=h.length,v=Uee(e.call(d,d&&d.__data__,u,n)),y=v.length,m=s[u]=new Array(y),g=a[u]=new Array(y),w=c[u]=new Array(p);r(d,h,m,g,w,v,t);for(var x=0,_=0,S,E;x<y;++x)if(S=m[x]){for(x>=_&&(_=x+1);!(E=g[_])&&++_<y;);S._next=E||null}}return a=new ln(a,n),a._enter=s,a._exit=c,a}function Uee(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Gee(){return new ln(this._exit||this._groups.map(X6),this._parents)}function Kee(e,t,r){var n=this.enter(),i=this,o=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}function Yee(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,i=r.length,o=n.length,a=Math.min(i,o),s=new Array(i),c=0;c<a;++c)for(var u=r[c],d=n[c],h=u.length,p=s[c]=new Array(h),v,y=0;y<h;++y)(v=u[y]||d[y])&&(p[y]=v);for(;c<i;++c)s[c]=r[c];return new ln(s,this._parents)}function Xee(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],a;--i>=0;)(a=n[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function Zee(e){e||(e=Jee);function t(h,p){return h&&p?e(h.__data__,p.__data__):!h-!p}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],s=a.length,c=i[o]=new Array(s),u,d=0;d<s;++d)(u=a[d])&&(c[d]=u);c.sort(t)}return new ln(i,this._parents).order()}function Jee(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Qee(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function ete(){return Array.from(this)}function tte(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null}function rte(){let e=0;for(const t of this)++e;return e}function nte(){return!this.node()}function ite(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}function ote(e){return function(){this.removeAttribute(e)}}function ate(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ste(e,t){return function(){this.setAttribute(e,t)}}function lte(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function cte(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function ute(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 dte(e,t){var r=Wd(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?ate:ote:typeof t=="function"?r.local?ute:cte:r.local?lte:ste)(r,t))}function Z6(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function fte(e){return function(){this.style.removeProperty(e)}}function hte(e,t,r){return function(){this.style.setProperty(e,t,r)}}function pte(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function vte(e,t,r){return arguments.length>1?this.each((t==null?fte:typeof t=="function"?pte:hte)(e,t,r??"")):ka(this.node(),e)}function ka(e,t){return e.style.getPropertyValue(t)||Z6(e).getComputedStyle(e,null).getPropertyValue(t)}function gte(e){return function(){delete this[e]}}function mte(e,t){return function(){this[e]=t}}function bte(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function yte(e,t){return arguments.length>1?this.each((t==null?gte:typeof t=="function"?bte:mte)(e,t)):this.node()[e]}function J6(e){return e.trim().split(/^|\s+/)}function jS(e){return e.classList||new Q6(e)}function Q6(e){this._node=e,this._names=J6(e.getAttribute("class")||"")}Q6.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 eq(e,t){for(var r=jS(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function tq(e,t){for(var r=jS(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function xte(e){return function(){eq(this,e)}}function wte(e){return function(){tq(this,e)}}function Ste(e,t){return function(){(t.apply(this,arguments)?eq:tq)(this,e)}}function Ete(e,t){var r=J6(e+"");if(arguments.length<2){for(var n=jS(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?Ste:t?xte:wte)(r,t))}function _te(){this.textContent=""}function Ote(e){return function(){this.textContent=e}}function Cte(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Ite(e){return arguments.length?this.each(e==null?_te:(typeof e=="function"?Cte:Ote)(e)):this.node().textContent}function Rte(){this.innerHTML=""}function Nte(e){return function(){this.innerHTML=e}}function Tte(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Pte(e){return arguments.length?this.each(e==null?Rte:(typeof e=="function"?Tte:Nte)(e)):this.node().innerHTML}function Mte(){this.nextSibling&&this.parentNode.appendChild(this)}function kte(){return this.each(Mte)}function Ate(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Dte(){return this.each(Ate)}function jte(e){var t=typeof e=="function"?e:U6(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function qte(){return null}function zte(e,t){var r=typeof e=="function"?e:U6(e),n=t==null?qte:typeof t=="function"?t:DS(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function Lte(){var e=this.parentNode;e&&e.removeChild(this)}function Bte(){return this.each(Lte)}function Fte(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $te(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Vte(e){return this.select(e?$te:Fte)}function Hte(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Wte(e){return function(t){e.call(this,t,this.__data__)}}function Ute(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 Gte(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++n]=o;++n?t.length=n:delete this.__on}}}function Kte(e,t,r){return function(){var n=this.__on,i,o=Wte(t);if(n){for(var a=0,s=n.length;a<s;++a)if((i=n[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=r),i.value=t;return}}this.addEventListener(e.type,o,r),i={type:e.type,name:e.name,value:t,listener:o,options:r},n?n.push(i):this.__on=[i]}}function Yte(e,t,r){var n=Ute(e+""),i,o=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(i=0,d=s[c];i<o;++i)if((a=n[i]).type===d.type&&a.name===d.name)return d.value}return}for(s=t?Kte:Gte,i=0;i<o;++i)this.each(s(n[i],t,r));return this}function rq(e,t,r){var n=Z6(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Xte(e,t){return function(){return rq(this,e,t)}}function Zte(e,t){return function(){return rq(this,e,t.apply(this,arguments))}}function Jte(e,t){return this.each((typeof t=="function"?Zte:Xte)(e,t))}function*Qte(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length,a;i<o;++i)(a=n[i])&&(yield a)}var nq=[null];function ln(e,t){this._groups=e,this._parents=t}function Al(){return new ln([[document.documentElement]],nq)}function ere(){return this}ln.prototype=Al.prototype={constructor:ln,select:Cee,selectAll:Tee,selectChild:Aee,selectChildren:zee,filter:Lee,data:Wee,enter:Bee,exit:Gee,join:Kee,merge:Yee,selection:ere,order:Xee,sort:Zee,call:Qee,nodes:ete,node:tte,size:rte,empty:nte,each:ite,attr:dte,style:vte,property:yte,classed:Ete,text:Ite,html:Pte,raise:kte,lower:Dte,append:jte,insert:zte,remove:Bte,clone:Vte,datum:Hte,on:Yte,dispatch:Jte,[Symbol.iterator]:Qte};function jn(e){return typeof e=="string"?new ln([[document.querySelector(e)]],[document.documentElement]):new ln([[e]],nq)}function tre(e){let t;for(;t=e.sourceEvent;)e=t;return e}function ti(e,t){if(e=tre(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 i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const rre={passive:!1},hl={capture:!0,passive:!1};function h0(e){e.stopImmediatePropagation()}function Sa(e){e.preventDefault(),e.stopImmediatePropagation()}function iq(e){var t=e.document.documentElement,r=jn(e).on("dragstart.drag",Sa,hl);"onselectstart"in t?r.on("selectstart.drag",Sa,hl):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function oq(e,t){var r=e.document.documentElement,n=jn(e).on("dragstart.drag",null);t&&(n.on("click.drag",Sa,hl),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 Gc=e=>()=>e;function jw(e,{sourceEvent:t,subject:r,target:n,identifier:i,active:o,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:i,enumerable:!0,configurable:!0},active:{value:o,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}})}jw.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function nre(e){return!e.ctrlKey&&!e.button}function ire(){return this.parentNode}function ore(e,t){return t??{x:e.x,y:e.y}}function are(){return navigator.maxTouchPoints||"ontouchstart"in this}function sre(){var e=nre,t=ire,r=ore,n=are,i={},o=Hd("start","drag","end"),a=0,s,c,u,d,h=0;function p(S){S.on("mousedown.drag",v).filter(n).on("touchstart.drag",g).on("touchmove.drag",w,rre).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(S,E){if(!(d||!e.call(this,S,E))){var I=_(this,t.call(this,S,E),S,E,"mouse");I&&(jn(S.view).on("mousemove.drag",y,hl).on("mouseup.drag",m,hl),iq(S.view),h0(S),u=!1,s=S.clientX,c=S.clientY,I("start",S))}}function y(S){if(Sa(S),!u){var E=S.clientX-s,I=S.clientY-c;u=E*E+I*I>h}i.mouse("drag",S)}function m(S){jn(S.view).on("mousemove.drag mouseup.drag",null),oq(S.view,u),Sa(S),i.mouse("end",S)}function g(S,E){if(e.call(this,S,E)){var I=S.changedTouches,N=t.call(this,S,E),T=I.length,M,z;for(M=0;M<T;++M)(z=_(this,N,S,E,I[M].identifier,I[M]))&&(h0(S),z("start",S,I[M]))}}function w(S){var E=S.changedTouches,I=E.length,N,T;for(N=0;N<I;++N)(T=i[E[N].identifier])&&(Sa(S),T("drag",S,E[N]))}function x(S){var E=S.changedTouches,I=E.length,N,T;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),N=0;N<I;++N)(T=i[E[N].identifier])&&(h0(S),T("end",S,E[N]))}function _(S,E,I,N,T,M){var z=o.copy(),j=ti(M||I,E),W,U,A;if((A=r.call(S,new jw("beforestart",{sourceEvent:I,target:p,identifier:T,active:a,x:j[0],y:j[1],dx:0,dy:0,dispatch:z}),N))!=null)return W=A.x-j[0]||0,U=A.y-j[1]||0,function K(V,te,G){var re=j,P;switch(V){case"start":i[T]=K,P=a++;break;case"end":delete i[T],--a;case"drag":j=ti(G||te,E),P=a;break}z.call(V,S,new jw(V,{sourceEvent:te,subject:A,target:p,identifier:T,active:P,x:j[0]+W,y:j[1]+U,dx:j[0]-re[0],dy:j[1]-re[1],dispatch:z}),N)}}return p.filter=function(S){return arguments.length?(e=typeof S=="function"?S:Gc(!!S),p):e},p.container=function(S){return arguments.length?(t=typeof S=="function"?S:Gc(S),p):t},p.subject=function(S){return arguments.length?(r=typeof S=="function"?S:Gc(S),p):r},p.touchable=function(S){return arguments.length?(n=typeof S=="function"?S:Gc(!!S),p):n},p.on=function(){var S=o.on.apply(o,arguments);return S===o?p:S},p.clickDistance=function(S){return arguments.length?(h=(S=+S)*S,p):Math.sqrt(h)},p}function qS(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function aq(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Dl(){}var pl=.7,Ju=1/pl,Ea="\\s*([+-]?\\d+)\\s*",vl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ii="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",lre=/^#([0-9a-f]{3,8})$/,cre=new RegExp(`^rgb\\(${Ea},${Ea},${Ea}\\)$`),ure=new RegExp(`^rgb\\(${ii},${ii},${ii}\\)$`),dre=new RegExp(`^rgba\\(${Ea},${Ea},${Ea},${vl}\\)$`),fre=new RegExp(`^rgba\\(${ii},${ii},${ii},${vl}\\)$`),hre=new RegExp(`^hsl\\(${vl},${ii},${ii}\\)$`),pre=new RegExp(`^hsla\\(${vl},${ii},${ii},${vl}\\)$`),EP={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};qS(Dl,gl,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_P,formatHex:_P,formatHex8:vre,formatHsl:gre,formatRgb:OP,toString:OP});function _P(){return this.rgb().formatHex()}function vre(){return this.rgb().formatHex8()}function gre(){return sq(this).formatHsl()}function OP(){return this.rgb().formatRgb()}function gl(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=lre.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?CP(t):r===3?new Fr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Kc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Kc(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=cre.exec(e))?new Fr(t[1],t[2],t[3],1):(t=ure.exec(e))?new Fr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=dre.exec(e))?Kc(t[1],t[2],t[3],t[4]):(t=fre.exec(e))?Kc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=hre.exec(e))?NP(t[1],t[2]/100,t[3]/100,1):(t=pre.exec(e))?NP(t[1],t[2]/100,t[3]/100,t[4]):EP.hasOwnProperty(e)?CP(EP[e]):e==="transparent"?new Fr(NaN,NaN,NaN,0):null}function CP(e){return new Fr(e>>16&255,e>>8&255,e&255,1)}function Kc(e,t,r,n){return n<=0&&(e=t=r=NaN),new Fr(e,t,r,n)}function mre(e){return e instanceof Dl||(e=gl(e)),e?(e=e.rgb(),new Fr(e.r,e.g,e.b,e.opacity)):new Fr}function qw(e,t,r,n){return arguments.length===1?mre(e):new Fr(e,t,r,n??1)}function Fr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}qS(Fr,qw,aq(Dl,{brighter(e){return e=e==null?Ju:Math.pow(Ju,e),new Fr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?pl:Math.pow(pl,e),new Fr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Fr(Oo(this.r),Oo(this.g),Oo(this.b),Qu(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:IP,formatHex:IP,formatHex8:bre,formatRgb:RP,toString:RP}));function IP(){return`#${xo(this.r)}${xo(this.g)}${xo(this.b)}`}function bre(){return`#${xo(this.r)}${xo(this.g)}${xo(this.b)}${xo((isNaN(this.opacity)?1:this.opacity)*255)}`}function RP(){const e=Qu(this.opacity);return`${e===1?"rgb(":"rgba("}${Oo(this.r)}, ${Oo(this.g)}, ${Oo(this.b)}${e===1?")":`, ${e})`}`}function Qu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Oo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function xo(e){return e=Oo(e),(e<16?"0":"")+e.toString(16)}function NP(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new qn(e,t,r,n)}function sq(e){if(e instanceof qn)return new qn(e.h,e.s,e.l,e.opacity);if(e instanceof Dl||(e=gl(e)),!e)return new qn;if(e instanceof qn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,c=(o+i)/2;return s?(t===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-t)/s+2:a=(t-r)/s+4,s/=c<.5?o+i:2-o-i,a*=60):s=c>0&&c<1?0:a,new qn(a,s,c,e.opacity)}function yre(e,t,r,n){return arguments.length===1?sq(e):new qn(e,t,r,n??1)}function qn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}qS(qn,yre,aq(Dl,{brighter(e){return e=e==null?Ju:Math.pow(Ju,e),new qn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?pl:Math.pow(pl,e),new qn(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,i=2*r-n;return new Fr(p0(e>=240?e-240:e+120,i,n),p0(e,i,n),p0(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new qn(TP(this.h),Yc(this.s),Yc(this.l),Qu(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=Qu(this.opacity);return`${e===1?"hsl(":"hsla("}${TP(this.h)}, ${Yc(this.s)*100}%, ${Yc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function TP(e){return e=(e||0)%360,e<0?e+360:e}function Yc(e){return Math.max(0,Math.min(1,e||0))}function p0(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 lq=e=>()=>e;function xre(e,t){return function(r){return e+r*t}}function wre(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 Sre(e){return(e=+e)==1?cq:function(t,r){return r-t?wre(t,r,e):lq(isNaN(t)?r:t)}}function cq(e,t){var r=t-e;return r?xre(e,r):lq(isNaN(e)?t:e)}const PP=(function e(t){var r=Sre(t);function n(i,o){var a=r((i=qw(i)).r,(o=qw(o)).r),s=r(i.g,o.g),c=r(i.b,o.b),u=cq(i.opacity,o.opacity);return function(d){return i.r=a(d),i.g=s(d),i.b=c(d),i.opacity=u(d),i+""}}return n.gamma=e,n})(1);function Gi(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var zw=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,v0=new RegExp(zw.source,"g");function Ere(e){return function(){return e}}function _re(e){return function(t){return e(t)+""}}function Ore(e,t){var r=zw.lastIndex=v0.lastIndex=0,n,i,o,a=-1,s=[],c=[];for(e=e+"",t=t+"";(n=zw.exec(e))&&(i=v0.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,c.push({i:a,x:Gi(n,i)})),r=v0.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?c[0]?_re(c[0].x):Ere(t):(t=c.length,function(u){for(var d=0,h;d<t;++d)s[(h=c[d]).i]=h.x(u);return s.join("")})}var MP=180/Math.PI,Lw={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function uq(e,t,r,n,i,o){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:i,translateY:o,rotate:Math.atan2(t,e)*MP,skewX:Math.atan(c)*MP,scaleX:a,scaleY:s}}var Xc;function Cre(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Lw:uq(t.a,t.b,t.c,t.d,t.e,t.f)}function Ire(e){return e==null||(Xc||(Xc=document.createElementNS("http://www.w3.org/2000/svg","g")),Xc.setAttribute("transform",e),!(e=Xc.transform.baseVal.consolidate()))?Lw:(e=e.matrix,uq(e.a,e.b,e.c,e.d,e.e,e.f))}function dq(e,t,r,n){function i(u){return u.length?u.pop()+" ":""}function o(u,d,h,p,v,y){if(u!==h||d!==p){var m=v.push("translate(",null,t,null,r);y.push({i:m-4,x:Gi(u,h)},{i:m-2,x:Gi(d,p)})}else(h||p)&&v.push("translate("+h+t+p+r)}function a(u,d,h,p){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),p.push({i:h.push(i(h)+"rotate(",null,n)-2,x:Gi(u,d)})):d&&h.push(i(h)+"rotate("+d+n)}function s(u,d,h,p){u!==d?p.push({i:h.push(i(h)+"skewX(",null,n)-2,x:Gi(u,d)}):d&&h.push(i(h)+"skewX("+d+n)}function c(u,d,h,p,v,y){if(u!==h||d!==p){var m=v.push(i(v)+"scale(",null,",",null,")");y.push({i:m-4,x:Gi(u,h)},{i:m-2,x:Gi(d,p)})}else(h!==1||p!==1)&&v.push(i(v)+"scale("+h+","+p+")")}return function(u,d){var h=[],p=[];return u=e(u),d=e(d),o(u.translateX,u.translateY,d.translateX,d.translateY,h,p),a(u.rotate,d.rotate,h,p),s(u.skewX,d.skewX,h,p),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,h,p),u=d=null,function(v){for(var y=-1,m=p.length,g;++y<m;)h[(g=p[y]).i]=g.x(v);return h.join("")}}}var Rre=dq(Cre,"px, ","px)","deg)"),Nre=dq(Ire,", ",")",")"),Tre=1e-12;function kP(e){return((e=Math.exp(e))+1/e)/2}function Pre(e){return((e=Math.exp(e))-1/e)/2}function Mre(e){return((e=Math.exp(2*e))-1)/(e+1)}const kre=(function e(t,r,n){function i(o,a){var s=o[0],c=o[1],u=o[2],d=a[0],h=a[1],p=a[2],v=d-s,y=h-c,m=v*v+y*y,g,w;if(m<Tre)w=Math.log(p/u)/t,g=function(N){return[s+N*v,c+N*y,u*Math.exp(t*N*w)]};else{var x=Math.sqrt(m),_=(p*p-u*u+n*m)/(2*u*r*x),S=(p*p-u*u-n*m)/(2*p*r*x),E=Math.log(Math.sqrt(_*_+1)-_),I=Math.log(Math.sqrt(S*S+1)-S);w=(I-E)/t,g=function(N){var T=N*w,M=kP(E),z=u/(r*x)*(M*Mre(t*T+E)-Pre(E));return[s+z*v,c+z*y,u*M/kP(t*T+E)]}}return g.duration=w*1e3*t/Math.SQRT2,g}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,c=s*s;return e(a,s,c)},i})(Math.SQRT2,2,4);var Aa=0,Gs=0,_s=0,fq=1e3,ed,Ks,td=0,Po=0,Ud=0,ml=typeof performance=="object"&&performance.now?performance:Date,hq=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function zS(){return Po||(hq(Are),Po=ml.now()+Ud)}function Are(){Po=0}function rd(){this._call=this._time=this._next=null}rd.prototype=pq.prototype={constructor:rd,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?zS():+r)+(t==null?0:+t),!this._next&&Ks!==this&&(Ks?Ks._next=this:ed=this,Ks=this),this._call=e,this._time=r,Bw()},stop:function(){this._call&&(this._call=null,this._time=1/0,Bw())}};function pq(e,t,r){var n=new rd;return n.restart(e,t,r),n}function Dre(){zS(),++Aa;for(var e=ed,t;e;)(t=Po-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Aa}function AP(){Po=(td=ml.now())+Ud,Aa=Gs=0;try{Dre()}finally{Aa=0,qre(),Po=0}}function jre(){var e=ml.now(),t=e-td;t>fq&&(Ud-=t,td=e)}function qre(){for(var e,t=ed,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:ed=r);Ks=e,Bw(n)}function Bw(e){if(!Aa){Gs&&(Gs=clearTimeout(Gs));var t=e-Po;t>24?(e<1/0&&(Gs=setTimeout(AP,e-ml.now()-Ud)),_s&&(_s=clearInterval(_s))):(_s||(td=ml.now(),_s=setInterval(jre,fq)),Aa=1,hq(AP))}}function DP(e,t,r){var n=new rd;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var zre=Hd("start","end","cancel","interrupt"),Lre=[],vq=0,jP=1,Fw=2,_u=3,qP=4,$w=5,Ou=6;function Gd(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;Bre(e,r,{name:t,index:n,group:i,on:zre,tween:Lre,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:vq})}function LS(e,t){var r=Hn(e,t);if(r.state>vq)throw new Error("too late; already scheduled");return r}function li(e,t){var r=Hn(e,t);if(r.state>_u)throw new Error("too late; already running");return r}function Hn(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Bre(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=pq(o,0,r.time);function o(u){r.state=jP,r.timer.restart(a,r.delay,r.time),r.delay<=u&&a(u-r.delay)}function a(u){var d,h,p,v;if(r.state!==jP)return c();for(d in n)if(v=n[d],v.name===r.name){if(v.state===_u)return DP(a);v.state===qP?(v.state=Ou,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete n[d]):+d<t&&(v.state=Ou,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete n[d])}if(DP(function(){r.state===_u&&(r.state=qP,r.timer.restart(s,r.delay,r.time),s(u))}),r.state=Fw,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Fw){for(r.state=_u,i=new Array(p=r.tween.length),d=0,h=-1;d<p;++d)(v=r.tween[d].value.call(e,e.__data__,r.index,r.group))&&(i[++h]=v);i.length=h+1}}function s(u){for(var d=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(c),r.state=$w,1),h=-1,p=i.length;++h<p;)i[h].call(e,d);r.state===$w&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=Ou,r.timer.stop(),delete n[t];for(var u in n)return;delete e.__transition}}function Cu(e,t){var r=e.__transition,n,i,o=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((n=r[a]).name!==t){o=!1;continue}i=n.state>Fw&&n.state<$w,n.state=Ou,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}function Fre(e){return this.each(function(){Cu(this,e)})}function $re(e,t){var r,n;return function(){var i=li(this,e),o=i.tween;if(o!==r){n=r=o;for(var a=0,s=n.length;a<s;++a)if(n[a].name===t){n=n.slice(),n.splice(a,1);break}}i.tween=n}}function Vre(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=li(this,e),a=o.tween;if(a!==n){i=(n=a).slice();for(var s={name:t,value:r},c=0,u=i.length;c<u;++c)if(i[c].name===t){i[c]=s;break}c===u&&i.push(s)}o.tween=i}}function Hre(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=Hn(this.node(),r).tween,i=0,o=n.length,a;i<o;++i)if((a=n[i]).name===e)return a.value;return null}return this.each((t==null?$re:Vre)(r,e,t))}function BS(e,t,r){var n=e._id;return e.each(function(){var i=li(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return Hn(i,n).value[t]}}function gq(e,t){var r;return(typeof t=="number"?Gi:t instanceof gl?PP:(r=gl(t))?(t=r,PP):Ore)(e,t)}function Wre(e){return function(){this.removeAttribute(e)}}function Ure(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Gre(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===n?o:o=t(n=a,r)}}function Kre(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===n?o:o=t(n=a,r)}}function Yre(e,t,r){var n,i,o;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===i?o:(i=c,o=t(n=a,s)))}}function Xre(e,t,r){var n,i,o;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===i?o:(i=c,o=t(n=a,s)))}}function Zre(e,t){var r=Wd(e),n=r==="transform"?Nre:gq;return this.attrTween(e,typeof t=="function"?(r.local?Xre:Yre)(r,n,BS(this,"attr."+e,t)):t==null?(r.local?Ure:Wre)(r):(r.local?Kre:Gre)(r,n,t))}function Jre(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Qre(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function ene(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&Qre(e,o)),r}return i._value=t,i}function tne(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&Jre(e,o)),r}return i._value=t,i}function rne(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=Wd(e);return this.tween(r,(n.local?ene:tne)(n,t))}function nne(e,t){return function(){LS(this,e).delay=+t.apply(this,arguments)}}function ine(e,t){return t=+t,function(){LS(this,e).delay=t}}function one(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?nne:ine)(t,e)):Hn(this.node(),t).delay}function ane(e,t){return function(){li(this,e).duration=+t.apply(this,arguments)}}function sne(e,t){return t=+t,function(){li(this,e).duration=t}}function lne(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ane:sne)(t,e)):Hn(this.node(),t).duration}function cne(e,t){if(typeof t!="function")throw new Error;return function(){li(this,e).ease=t}}function une(e){var t=this._id;return arguments.length?this.each(cne(t,e)):Hn(this.node(),t).ease}function dne(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;li(this,e).ease=r}}function fne(e){if(typeof e!="function")throw new Error;return this.each(dne(this._id,e))}function hne(e){typeof e!="function"&&(e=K6(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],c,u=0;u<a;++u)(c=o[u])&&e.call(c,c.__data__,u,o)&&s.push(c);return new _i(n,this._parents,this._name,this._id)}function pne(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var c=t[s],u=r[s],d=c.length,h=a[s]=new Array(d),p,v=0;v<d;++v)(p=c[v]||u[v])&&(h[v]=p);for(;s<n;++s)a[s]=t[s];return new _i(a,this._parents,this._name,this._id)}function vne(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 gne(e,t,r){var n,i,o=vne(t)?LS:li;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}function mne(e,t){var r=this._id;return arguments.length<2?Hn(this.node(),r).on.on(e):this.each(gne(r,e,t))}function bne(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function yne(){return this.on("end.remove",bne(this._id))}function xne(e){var t=this._name,r=this._id;typeof e!="function"&&(e=DS(e));for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a)for(var s=n[a],c=s.length,u=o[a]=new Array(c),d,h,p=0;p<c;++p)(d=s[p])&&(h=e.call(d,d.__data__,p,s))&&("__data__"in d&&(h.__data__=d.__data__),u[p]=h,Gd(u[p],t,r,p,u,Hn(d,r)));return new _i(o,this._parents,t,r)}function wne(e){var t=this._name,r=this._id;typeof e!="function"&&(e=G6(e));for(var n=this._groups,i=n.length,o=[],a=[],s=0;s<i;++s)for(var c=n[s],u=c.length,d,h=0;h<u;++h)if(d=c[h]){for(var p=e.call(d,d.__data__,h,c),v,y=Hn(d,r),m=0,g=p.length;m<g;++m)(v=p[m])&&Gd(v,t,r,m,p,y);o.push(p),a.push(d)}return new _i(o,a,t,r)}var Sne=Al.prototype.constructor;function Ene(){return new Sne(this._groups,this._parents)}function _ne(e,t){var r,n,i;return function(){var o=ka(this,e),a=(this.style.removeProperty(e),ka(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function mq(e){return function(){this.style.removeProperty(e)}}function One(e,t,r){var n,i=r+"",o;return function(){var a=ka(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function Cne(e,t,r){var n,i,o;return function(){var a=ka(this,e),s=r(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),ka(this,e))),a===c?null:a===n&&c===i?o:(i=c,o=t(n=a,s))}}function Ine(e,t){var r,n,i,o="style."+t,a="end."+o,s;return function(){var c=li(this,e),u=c.on,d=c.value[o]==null?s||(s=mq(t)):void 0;(u!==r||i!==d)&&(n=(r=u).copy()).on(a,i=d),c.on=n}}function Rne(e,t,r){var n=(e+="")=="transform"?Rre:gq;return t==null?this.styleTween(e,_ne(e,n)).on("end.style."+e,mq(e)):typeof t=="function"?this.styleTween(e,Cne(e,n,BS(this,"style."+e,t))).each(Ine(this._id,e)):this.styleTween(e,One(e,n,t),r).on("end.style."+e,null)}function Nne(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function Tne(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&Nne(e,a,r)),n}return o._value=t,o}function Pne(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,Tne(e,t,r??""))}function Mne(e){return function(){this.textContent=e}}function kne(e){return function(){var t=e(this);this.textContent=t??""}}function Ane(e){return this.tween("text",typeof e=="function"?kne(BS(this,"text",e)):Mne(e==null?"":e+""))}function Dne(e){return function(t){this.textContent=e.call(this,t)}}function jne(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&Dne(i)),t}return n._value=e,n}function qne(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,jne(e))}function zne(){for(var e=this._name,t=this._id,r=bq(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,c,u=0;u<s;++u)if(c=a[u]){var d=Hn(c,t);Gd(c,e,r,u,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new _i(n,this._parents,e,r)}function Lne(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(o,a){var s={value:a},c={value:function(){--i===0&&o()}};r.each(function(){var u=li(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}),i===0&&o()})}var Bne=0;function _i(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function bq(){return++Bne}var yi=Al.prototype;_i.prototype={constructor:_i,select:xne,selectAll:wne,selectChild:yi.selectChild,selectChildren:yi.selectChildren,filter:hne,merge:pne,selection:Ene,transition:zne,call:yi.call,nodes:yi.nodes,node:yi.node,size:yi.size,empty:yi.empty,each:yi.each,on:mne,attr:Zre,attrTween:rne,style:Rne,styleTween:Pne,text:Ane,textTween:qne,remove:yne,tween:Hre,delay:one,duration:lne,ease:une,easeVarying:fne,end:Lne,[Symbol.iterator]:yi[Symbol.iterator]};function Fne(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var $ne={time:null,delay:0,duration:250,ease:Fne};function Vne(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 Hne(e){var t,r;e instanceof _i?(t=e._id,e=e._name):(t=bq(),(r=$ne).time=zS(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,c,u=0;u<s;++u)(c=a[u])&&Gd(c,e,t,u,a,r||Vne(c,t));return new _i(n,this._parents,e,t)}Al.prototype.interrupt=Fre;Al.prototype.transition=Hne;const Zc=e=>()=>e;function Wne(e,{sourceEvent:t,target:r,transform:n,dispatch:i}){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:i}})}function Si(e,t,r){this.k=e,this.x=t,this.y=r}Si.prototype={constructor:Si,scale:function(e){return e===1?this:new Si(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Si(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 Co=new Si(1,0,0);Si.prototype;function g0(e){e.stopImmediatePropagation()}function Os(e){e.preventDefault(),e.stopImmediatePropagation()}function Une(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Gne(){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 zP(){return this.__zoom||Co}function Kne(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Yne(){return navigator.maxTouchPoints||"ontouchstart"in this}function Xne(e,t,r){var n=e.invertX(t[0][0])-r[0][0],i=e.invertX(t[1][0])-r[1][0],o=e.invertY(t[0][1])-r[0][1],a=e.invertY(t[1][1])-r[1][1];return e.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function Zne(){var e=Une,t=Gne,r=Xne,n=Kne,i=Yne,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,c=kre,u=Hd("start","zoom","end"),d,h,p,v=500,y=150,m=0,g=10;function w(A){A.property("__zoom",zP).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",z).filter(i).on("touchstart.zoom",j).on("touchmove.zoom",W).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(A,K,V,te){var G=A.selection?A.selection():A;G.property("__zoom",zP),A!==G?E(A,K,V,te):G.interrupt().each(function(){I(this,arguments).event(te).start().zoom(null,typeof K=="function"?K.apply(this,arguments):K).end()})},w.scaleBy=function(A,K,V,te){w.scaleTo(A,function(){var G=this.__zoom.k,re=typeof K=="function"?K.apply(this,arguments):K;return G*re},V,te)},w.scaleTo=function(A,K,V,te){w.transform(A,function(){var G=t.apply(this,arguments),re=this.__zoom,P=V==null?S(G):typeof V=="function"?V.apply(this,arguments):V,B=re.invert(P),X=typeof K=="function"?K.apply(this,arguments):K;return r(_(x(re,X),P,B),G,a)},V,te)},w.translateBy=function(A,K,V,te){w.transform(A,function(){return r(this.__zoom.translate(typeof K=="function"?K.apply(this,arguments):K,typeof V=="function"?V.apply(this,arguments):V),t.apply(this,arguments),a)},null,te)},w.translateTo=function(A,K,V,te,G){w.transform(A,function(){var re=t.apply(this,arguments),P=this.__zoom,B=te==null?S(re):typeof te=="function"?te.apply(this,arguments):te;return r(Co.translate(B[0],B[1]).scale(P.k).translate(typeof K=="function"?-K.apply(this,arguments):-K,typeof V=="function"?-V.apply(this,arguments):-V),re,a)},te,G)};function x(A,K){return K=Math.max(o[0],Math.min(o[1],K)),K===A.k?A:new Si(K,A.x,A.y)}function _(A,K,V){var te=K[0]-V[0]*A.k,G=K[1]-V[1]*A.k;return te===A.x&&G===A.y?A:new Si(A.k,te,G)}function S(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function E(A,K,V,te){A.on("start.zoom",function(){I(this,arguments).event(te).start()}).on("interrupt.zoom end.zoom",function(){I(this,arguments).event(te).end()}).tween("zoom",function(){var G=this,re=arguments,P=I(G,re).event(te),B=t.apply(G,re),X=V==null?S(B):typeof V=="function"?V.apply(G,re):V,Q=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),D=G.__zoom,$=typeof K=="function"?K.apply(G,re):K,H=c(D.invert(X).concat(Q/D.k),$.invert(X).concat(Q/$.k));return function(q){if(q===1)q=$;else{var Y=H(q),ie=Q/Y[2];q=new Si(ie,X[0]-Y[0]*ie,X[1]-Y[1]*ie)}P.zoom(null,q)}})}function I(A,K,V){return!V&&A.__zooming||new N(A,K)}function N(A,K){this.that=A,this.args=K,this.active=0,this.sourceEvent=null,this.extent=t.apply(A,K),this.taps=0}N.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,K){return this.mouse&&A!=="mouse"&&(this.mouse[1]=K.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=K.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=K.invert(this.touch1[0])),this.that.__zoom=K,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var K=jn(this.that).datum();u.call(A,this.that,new Wne(A,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:u}),K)}};function T(A,...K){if(!e.apply(this,arguments))return;var V=I(this,K).event(A),te=this.__zoom,G=Math.max(o[0],Math.min(o[1],te.k*Math.pow(2,n.apply(this,arguments)))),re=ti(A);if(V.wheel)(V.mouse[0][0]!==re[0]||V.mouse[0][1]!==re[1])&&(V.mouse[1]=te.invert(V.mouse[0]=re)),clearTimeout(V.wheel);else{if(te.k===G)return;V.mouse=[re,te.invert(re)],Cu(this),V.start()}Os(A),V.wheel=setTimeout(P,y),V.zoom("mouse",r(_(x(te,G),V.mouse[0],V.mouse[1]),V.extent,a));function P(){V.wheel=null,V.end()}}function M(A,...K){if(p||!e.apply(this,arguments))return;var V=A.currentTarget,te=I(this,K,!0).event(A),G=jn(A.view).on("mousemove.zoom",X,!0).on("mouseup.zoom",Q,!0),re=ti(A,V),P=A.clientX,B=A.clientY;iq(A.view),g0(A),te.mouse=[re,this.__zoom.invert(re)],Cu(this),te.start();function X(D){if(Os(D),!te.moved){var $=D.clientX-P,H=D.clientY-B;te.moved=$*$+H*H>m}te.event(D).zoom("mouse",r(_(te.that.__zoom,te.mouse[0]=ti(D,V),te.mouse[1]),te.extent,a))}function Q(D){G.on("mousemove.zoom mouseup.zoom",null),oq(D.view,te.moved),Os(D),te.event(D).end()}}function z(A,...K){if(e.apply(this,arguments)){var V=this.__zoom,te=ti(A.changedTouches?A.changedTouches[0]:A,this),G=V.invert(te),re=V.k*(A.shiftKey?.5:2),P=r(_(x(V,re),te,G),t.apply(this,K),a);Os(A),s>0?jn(this).transition().duration(s).call(E,P,te,A):jn(this).call(w.transform,P,te,A)}}function j(A,...K){if(e.apply(this,arguments)){var V=A.touches,te=V.length,G=I(this,K,A.changedTouches.length===te).event(A),re,P,B,X;for(g0(A),P=0;P<te;++P)B=V[P],X=ti(B,this),X=[X,this.__zoom.invert(X),B.identifier],G.touch0?!G.touch1&&G.touch0[2]!==X[2]&&(G.touch1=X,G.taps=0):(G.touch0=X,re=!0,G.taps=1+!!d);d&&(d=clearTimeout(d)),re&&(G.taps<2&&(h=X[0],d=setTimeout(function(){d=null},v)),Cu(this),G.start())}}function W(A,...K){if(this.__zooming){var V=I(this,K).event(A),te=A.changedTouches,G=te.length,re,P,B,X;for(Os(A),re=0;re<G;++re)P=te[re],B=ti(P,this),V.touch0&&V.touch0[2]===P.identifier?V.touch0[0]=B:V.touch1&&V.touch1[2]===P.identifier&&(V.touch1[0]=B);if(P=V.that.__zoom,V.touch1){var Q=V.touch0[0],D=V.touch0[1],$=V.touch1[0],H=V.touch1[1],q=(q=$[0]-Q[0])*q+(q=$[1]-Q[1])*q,Y=(Y=H[0]-D[0])*Y+(Y=H[1]-D[1])*Y;P=x(P,Math.sqrt(q/Y)),B=[(Q[0]+$[0])/2,(Q[1]+$[1])/2],X=[(D[0]+H[0])/2,(D[1]+H[1])/2]}else if(V.touch0)B=V.touch0[0],X=V.touch0[1];else return;V.zoom("touch",r(_(P,B,X),V.extent,a))}}function U(A,...K){if(this.__zooming){var V=I(this,K).event(A),te=A.changedTouches,G=te.length,re,P;for(g0(A),p&&clearTimeout(p),p=setTimeout(function(){p=null},v),re=0;re<G;++re)P=te[re],V.touch0&&V.touch0[2]===P.identifier?delete V.touch0:V.touch1&&V.touch1[2]===P.identifier&&delete V.touch1;if(V.touch1&&!V.touch0&&(V.touch0=V.touch1,delete V.touch1),V.touch0)V.touch0[1]=this.__zoom.invert(V.touch0[0]);else if(V.end(),V.taps===2&&(P=ti(P,this),Math.hypot(h[0]-P[0],h[1]-P[1])<g)){var B=jn(this).on("dblclick.zoom");B&&B.apply(this,arguments)}}}return w.wheelDelta=function(A){return arguments.length?(n=typeof A=="function"?A:Zc(+A),w):n},w.filter=function(A){return arguments.length?(e=typeof A=="function"?A:Zc(!!A),w):e},w.touchable=function(A){return arguments.length?(i=typeof A=="function"?A:Zc(!!A),w):i},w.extent=function(A){return arguments.length?(t=typeof A=="function"?A:Zc([[+A[0][0],+A[0][1]],[+A[1][0],+A[1][1]]]),w):t},w.scaleExtent=function(A){return arguments.length?(o[0]=+A[0],o[1]=+A[1],w):[o[0],o[1]]},w.translateExtent=function(A){return arguments.length?(a[0][0]=+A[0][0],a[1][0]=+A[1][0],a[0][1]=+A[0][1],a[1][1]=+A[1][1],w):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},w.constrain=function(A){return arguments.length?(r=A,w):r},w.duration=function(A){return arguments.length?(s=+A,w):s},w.interpolate=function(A){return arguments.length?(c=A,w):c},w.on=function(){var A=u.on.apply(u,arguments);return A===u?w:A},w.clickDistance=function(A){return arguments.length?(m=(A=+A)*A,w):Math.sqrt(m)},w.tapDistance=function(A){return arguments.length?(g=+A,w):g},w}function it(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vw(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 yq(e,t){if(e){if(typeof e=="string")return Vw(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 Vw(e,t)}}function Jne(e){if(Array.isArray(e))return e}function Qne(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,s;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(c){o=!0,s=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw s}}return n}}function eie(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
58
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xe(e,t){return Jne(e)||Qne(e,t)||yq(e,t)||eie()}var Da;(function(e){e.Strict="strict",e.Loose="loose"})(Da||(Da={}));var Mo;(function(e){e.Lines="lines",e.Dots="dots"})(Mo||(Mo={}));var _a;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(_a||(_a={}));var Yi;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Yi||(Yi={}));var nd;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(nd||(nd={}));var Oe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Oe||(Oe={}));var FS=function(t){return{width:t.offsetWidth,height:t.offsetHeight}},Oa=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)},xq=function(t,r){return{x:Oa(t.x,r[0][0],r[1][0]),y:Oa(t.y,r[0][1],r[1][1])}},wq=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)},tie=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)}},id=function(t){var r=t.x,n=t.y,i=t.width,o=t.height;return{x:r,y:n,x2:r+i,y2:n+o}},rie=function(t){var r=t.x,n=t.y,i=t.x2,o=t.y2;return{x:r,y:n,width:i-r,height:o-n}},Sq=function(t){return!isNaN(t)&&isFinite(t)},ur=Symbol("internals");function LP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).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?LP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BP(e,t){var r=e.find(function(u){return u.id===t.parentNode});if(r){var n=t.position.x+t.width-r.width,i=t.position.y+t.height-r.height;if(n>0||i>0||t.position.x<0||t.position.y<0){var o,a;if(r.style=Ys({},r.style)||{},r.style.width=(o=r.style.width)!==null&&o!==void 0?o:r.width,r.style.height=(a=r.style.height)!==null&&a!==void 0?a:r.height,n>0&&(r.style.width+=n),i>0&&(r.style.height+=i),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 Eq(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,i){var o=e.find(function(c){return c.id===i.id});if(o)switch(o.type){case"select":return n.push(Ys(Ys({},i),{},{selected:o.selected})),n;case"position":{var a=Ys({},i);return typeof o.position<"u"&&(a.position=o.position),typeof o.positionAbsolute<"u"&&(a.positionAbsolute=o.positionAbsolute),typeof o.dragging<"u"&&(a.dragging=o.dragging),a.expandParent&&BP(n,a),n.push(a),n}case"dimensions":{var s=Ys({},i);return typeof o.dimensions<"u"&&(s.width=o.dimensions.width,s.height=o.dimensions.height),s.expandParent&&BP(n,s),n.push(s),n}case"remove":return n}return n.push(i),n},r)}function _q(e,t){return Eq(e,t)}function nie(e,t){return Eq(e,t)}var Ki=function(t,r){return{id:t,type:"select",selected:r}};function ya(e,t){return e.reduce(function(r,n){var i=t.includes(n.id);return!n.selected&&i?(n.selected=!0,r.push(Ki(n.id,!0))):n.selected&&!i&&(n.selected=!1,r.push(Ki(n.id,!1))),r},[])}function FP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Oq(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var $P=function(t,r,n){var i=r.querySelectorAll(t);if(!i||!i.length)return null;var o=Array.from(i),a=r.getBoundingClientRect();return o.map(function(s){var c=s.getBoundingClientRect();return Oq({id:s.getAttribute("data-handleid"),position:s.getAttribute("data-handlepos"),x:(c.left-a.left)/n,y:(c.top-a.top)/n},FS(s))})};function Cs(e,t,r){return r===void 0?r:function(n){var i=t().nodeInternals.get(e);r(n,Oq({},i))}}function Cq(e){var t=e.id,r=e.store,n=r.getState(),i=n.addSelectedNodes,o=n.unselectNodesAndEdges,a=n.multiSelectionActive,s=n.nodeInternals,c=s.get(t);r.setState({nodesSelectionActive:!1}),c.selected?c.selected&&a&&o({nodes:[c]}):i([t])}function VP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var iie=function(t){return"id"in t&&"source"in t&&"target"in t},oie=function(t){var r=t.source,n=t.sourceHandle,i=t.target,o=t.targetHandle;return"reactflow__edge-".concat(r).concat(n||"","-").concat(i).concat(o||"")},Hw=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(i){return"".concat(i,"=").concat(t[i])}).join("&"))},aie=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)})},sie=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 iie(t)?n=nl({},t):n=nl(nl({},t),{},{id:oie(t)}),aie(n,r)?r:r.concat(n)},Iq=function(t,r,n,i){var o=t.x,a=t.y,s=Xe(r,3),c=s[0],u=s[1],d=s[2],h=Xe(i,2),p=h[0],v=h[1],y={x:(o-c)/d,y:(a-u)/d};return n?{x:p*Math.round(y.x/p),y:v*Math.round(y.y/v)}:y},$S=function(t){if(t.length===0)return{x:0,y:0,width:0,height:0};var r=t.reduce(function(n,i){var o=i.positionAbsolute,a=i.position,s=i.width,c=i.height;return tie(n,id({x:o?o.x:a.x,y:o?o.y:a.y,width:s||0,height:c||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return rie(r)},Rq=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0,1],i=Xe(n,3),o=i[0],a=i[1],s=i[2],c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,d=id({x:(r.x-o)/s,y:(r.y-a)/s,width:r.width/s,height:r.height/s}),h=[];return t.forEach(function(p){var v=p.positionAbsolute,y=p.width,m=p.height,g=p.selectable,w=g===void 0?!0:g;if(u&&!w)return!1;var x=id(nl(nl({},v),{},{width:y||0,height:m||0})),_=Math.max(0,Math.min(d.x2,x.x2)-Math.max(d.x,x.x)),S=Math.max(0,Math.min(d.y2,x.y2)-Math.max(d.y,x.y)),E=Math.ceil(_*S),I=typeof y>"u"||typeof m>"u"||y===null||m===null,N=c&&E>0,T=(y||0)*(m||0),M=I||N||E>=T;M&&h.push(p)}),h},Nq=function(t,r){var n=t.map(function(i){return i.id});return r.filter(function(i){return n.includes(i.source)||n.includes(i.target)})},Tq=function(t,r,n,i,o){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=Oa(u,i,o),h=t.x+t.width/2,p=t.y+t.height/2,v=r/2-h*d,y=n/2-p*d;return[v,y,d]},mo=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.transition().duration(r)};function HP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pq(e,t,r,n){var i,o,a,s,c,u,d,h,p,v,y,m;if(!e.parentNode)return n;var g=t.get(e.parentNode);return Pq(g,t,r,{x:((i=n.x)!==null&&i!==void 0?i:0)+((o=(a=g.position)===null||a===void 0?void 0:a.x)!==null&&o!==void 0?o:0),y:((s=n.y)!==null&&s!==void 0?s:0)+((c=(u=g.position)===null||u===void 0?void 0:u.y)!==null&&c!==void 0?c:0),z:((d=(h=g[ur])===null||h===void 0?void 0:h.z)!==null&&d!==void 0?d:0)>((p=n.z)!==null&&p!==void 0?p:0)?(v=(y=g[ur])===null||y===void 0?void 0:y.z)!==null&&v!==void 0?v:0:(m=n.z)!==null&&m!==void 0?m:0})}function m0(e,t){var r=new Map,n={};return e.forEach(function(i){var o,a=Sq(i.zIndex)?i.zIndex:i.selected?1e3:0,s=t.get(i.id),c=xa(xa({width:s==null?void 0:s.width,height:s==null?void 0:s.height},i),{},{positionAbsolute:{x:i.position.x,y:i.position.y}});i.parentNode&&(c.parentNode=i.parentNode,n[i.parentNode]=!0),Object.defineProperty(c,ur,{enumerable:!1,value:{handleBounds:s==null||(o=s[ur])===null||o===void 0?void 0:o.handleBounds,z:a}}),r.set(i.id,c)}),r.forEach(function(i){if(i.parentNode&&!r.has(i.parentNode))throw new Error("Parent node ".concat(i.parentNode," not found"));if(i.parentNode||n[i.id]){var o,a,s=Pq(i,r,n,xa(xa({},i.position),{},{z:(o=(a=i[ur])===null||a===void 0?void 0:a.z)!==null&&o!==void 0?o:0})),c=s.x,u=s.y,d=s.z;i.positionAbsolute={x:c,y:u},i[ur].z=d,n[i.id]&&(i[ur].isParent=!0)}}),r}function Mq(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e(),n=r.nodeInternals,i=r.width,o=r.height,a=r.minZoom,s=r.maxZoom,c=r.d3Zoom,u=r.d3Selection,d=r.fitViewOnInitDone,h=r.fitViewOnInit;if((t.initial&&!d&&h||!t.initial)&&c&&u){var p=Array.from(n.values()).filter(function(T){return t.includeHiddenNodes?T.width&&T.height:!T.hidden}),v=p.every(function(T){return T.width&&T.height});if(p.length>0&&v){var y,m,g,w=$S(p),x=Tq(w,i,o,(y=t.minZoom)!==null&&y!==void 0?y:a,(m=t.maxZoom)!==null&&m!==void 0?m:s,(g=t.padding)!==null&&g!==void 0?g:.1),_=Xe(x,3),S=_[0],E=_[1],I=_[2],N=Co.translate(S,E).scale(I);return typeof t.duration=="number"&&t.duration>0?c.transform(mo(u,t.duration),N):c.transform(u,N),!0}}return!1}function lie(e,t){return e.forEach(function(r){var n=t.get(r.id);if(n){var i;t.set(n.id,xa(xa({},n),{},(i={},it(i,ur,n[ur]),it(i,"selected",r.selected),i)))}}),new Map(t)}function cie(e,t){return t.map(function(r){var n=e.find(function(i){return i.id===r.id});return n&&(r.selected=n.selected),r})}function Jc(e){var t=e.changedNodes,r=e.changedEdges,n=e.get,i=e.set,o=n(),a=o.nodeInternals,s=o.edges,c=o.onNodesChange,u=o.onEdgesChange,d=o.hasDefaultNodes,h=o.hasDefaultEdges;t!=null&&t.length&&(d&&i({nodeInternals:lie(t,a)}),c==null||c(t)),r!=null&&r.length&&(h&&i({edges:cie(r,s)}),u==null||u(r))}var Ww=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],WP={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:Ww,nodeExtent:Ww,nodesSelectionActive:!1,userSelectionActive:!1,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionMode:Da.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 UP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Jn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var VS=yee(),uie=VS.Provider,Vt=VS.useStore,Nr=VS.useStoreApi,die=function(){return bee(function(t,r){return Jn(Jn({},WP),{},{setNodes:function(i){t({nodeInternals:m0(i,r().nodeInternals)})},setEdges:function(i){var o=r(),a=o.defaultEdgeOptions,s=a===void 0?{}:a;t({edges:i.map(function(c){return Jn(Jn({},s),c)})})},setDefaultNodesAndEdges:function(i,o){var a=typeof i<"u",s=typeof o<"u",c=a?m0(i,new Map):new Map,u=s?o:[];t({nodeInternals:c,edges:u,hasDefaultNodes:a,hasDefaultEdges:s})},updateNodeDimensions:function(i){var o=r(),a=o.onNodesChange,s=o.nodeInternals,c=o.fitViewOnInit,u=o.fitViewOnInitDone,d=o.fitViewOnInitOptions,h=o.domNode,p=h==null?void 0:h.querySelector(".react-flow__viewport");if(p){var v=window.getComputedStyle(p),y=new window.DOMMatrixReadOnly(v.transform),m=y.m22,g=i.reduce(function(x,_){var S=s.get(_.id);if(S){var E=FS(_.nodeElement),I=!!(E.width&&E.height&&(S.width!==E.width||S.height!==E.height||_.forceUpdate));I&&(s.set(S.id,Jn(Jn({},S),{},it({},ur,Jn(Jn({},S[ur]),{},{handleBounds:{source:$P(".source",_.nodeElement,m),target:$P(".target",_.nodeElement,m)}})),E)),x.push({id:S.id,type:"dimensions",dimensions:E}))}return x},[]),w=u||c&&!u&&Mq(r,Jn({initial:!0},d));t({nodeInternals:new Map(s),fitViewOnInitDone:w}),(g==null?void 0:g.length)>0&&(a==null||a(g))}},updateNodePositions:function(i){var o=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 h=i.map(function(y){var m={id:y.id,type:"position",dragging:a};return o&&(m.positionAbsolute=y.positionAbsolute,m.position=y.position),m});if(h!=null&&h.length){if(d){var p=_q(h,Array.from(u.values())),v=m0(p,u);t({nodeInternals:v})}c==null||c(h)}}},addSelectedNodes:function(i){var o=r(),a=o.multiSelectionActive,s=o.nodeInternals,c=o.edges,u,d=null;a?u=i.map(function(h){return Ki(h,!0)}):(u=ya(Array.from(s.values()),i),d=ya(c,[])),Jc({changedNodes:u,changedEdges:d,get:r,set:t})},addSelectedEdges:function(i){var o=r(),a=o.multiSelectionActive,s=o.edges,c=o.nodeInternals,u,d=null;a?u=i.map(function(h){return Ki(h,!0)}):(u=ya(s,i),d=ya(Array.from(c.values()),[])),Jc({changedNodes:d,changedEdges:u,get:r,set:t})},unselectNodesAndEdges:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=i.nodes,a=i.edges,s=r(),c=s.nodeInternals,u=s.edges,d=o||Array.from(c.values()),h=a||u,p=d.map(function(y){return y.selected=!1,Ki(y.id,!1)}),v=h.map(function(y){return Ki(y.id,!1)});Jc({changedNodes:p,changedEdges:v,get:r,set:t})},setMinZoom:function(i){var o=r(),a=o.d3Zoom,s=o.maxZoom;a==null||a.scaleExtent([i,s]),t({minZoom:i})},setMaxZoom:function(i){var o=r(),a=o.d3Zoom,s=o.minZoom;a==null||a.scaleExtent([s,i]),t({maxZoom:i})},setTranslateExtent:function(i){var o=r(),a=o.d3Zoom;a==null||a.translateExtent(i),t({translateExtent:i})},resetSelectedElements:function(){var i=r(),o=i.nodeInternals,a=i.edges,s=Array.from(o.values()),c=s.filter(function(d){return d.selected}).map(function(d){return Ki(d.id,!1)}),u=a.filter(function(d){return d.selected}).map(function(d){return Ki(d.id,!1)});Jc({changedNodes:c,changedEdges:u,get:r,set:t})},setNodeExtent:function(i){var o=r(),a=o.nodeInternals;a.forEach(function(s){s.positionAbsolute=xq(s.position,i)}),t({nodeExtent:i,nodeInternals:new Map(a)})},reset:function(){return t(Jn({},WP))}})})};function cn(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=cn(e[r]))!==""&&(t+=(t&&" ")+n);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}function Wr(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 fie(e){if(Array.isArray(e))return Vw(e)}function hie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pie(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
59
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Io(e){return fie(e)||hie(e)||yq(e)||pie()}var vie={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},gie=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}},mie=function(){var t=Nr(),r=Vt(gie,Wr),n=r.d3Zoom,i=r.d3Selection,o=C.useMemo(function(){return i&&n?{zoomIn:function(s){return n.scaleBy(mo(i,s==null?void 0:s.duration),1.2)},zoomOut:function(s){return n.scaleBy(mo(i,s==null?void 0:s.duration),1/1.2)},zoomTo:function(s,c){return n.scaleTo(mo(i,c==null?void 0:c.duration),s)},getZoom:function(){return t.getState().transform[2]},setViewport:function(s,c){var u,d,h,p=Xe(t.getState().transform,3),v=p[0],y=p[1],m=p[2],g=Co.translate((u=s.x)!==null&&u!==void 0?u:v,(d=s.y)!==null&&d!==void 0?d:y).scale((h=s.zoom)!==null&&h!==void 0?h:m);n.transform(mo(i,c==null?void 0:c.duration),g)},getViewport:function(){var s=Xe(t.getState().transform,3),c=s[0],u=s[1],d=s[2];return{x:c,y:u,zoom:d}},fitView:function(s){return Mq(t.getState,s)},setCenter:function(s,c,u){var d=t.getState(),h=d.width,p=d.height,v=d.maxZoom,y=typeof(u==null?void 0:u.zoom)<"u"?u.zoom:v,m=h/2-s*y,g=p/2-c*y,w=Co.translate(m,g).scale(y);n.transform(mo(i,u==null?void 0:u.duration),w)},fitBounds:function(s,c){var u,d=t.getState(),h=d.width,p=d.height,v=d.minZoom,y=d.maxZoom,m=Tq(s,h,p,v,y,(u=c==null?void 0:c.padding)!==null&&u!==void 0?u:.1),g=Xe(m,3),w=g[0],x=g[1],_=g[2],S=Co.translate(w,x).scale(_);n.transform(mo(i,c==null?void 0:c.duration),S)},project:function(s){var c=t.getState(),u=c.transform,d=c.snapToGrid,h=c.snapGrid;return Iq(s,u,d,h)},viewportInitialized:!0}:vie},[n,i]);return o};function GP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).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?GP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kq(){var e=mie(),t=Nr(),r=C.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=Array.from(p.values());return v.map(function(y){return sa({},y)})},[]),n=C.useCallback(function(h){var p=t.getState(),v=p.nodeInternals;return v.get(h)},[]),i=C.useCallback(function(){var h=t.getState(),p=h.edges,v=p===void 0?[]:p;return v.map(function(y){return sa({},y)})},[]),o=C.useCallback(function(h){var p=t.getState(),v=p.edges,y=v===void 0?[]:v;return y.find(function(m){return m.id===h})},[]),a=C.useCallback(function(h){var p=t.getState(),v=p.nodeInternals,y=p.setNodes,m=p.hasDefaultNodes,g=p.onNodesChange,w=Array.from(v.values()),x=typeof h=="function"?h(w):h;if(m)y(x);else if(g){var _=x.length===0?w.map(function(S){return{type:"remove",id:S.id}}):x.map(function(S){return{item:S,type:"reset"}});g(_)}},[]),s=C.useCallback(function(h){var p=t.getState(),v=p.edges,y=v===void 0?[]:v,m=p.setEdges,g=p.hasDefaultEdges,w=p.onEdgesChange,x=typeof h=="function"?h(y):h;if(g)m(x);else if(w){var _=x.length===0?y.map(function(S){return{type:"remove",id:S.id}}):x.map(function(S){return{item:S,type:"reset"}});w(_)}},[]),c=C.useCallback(function(h){var p=Array.isArray(h)?h:[h],v=t.getState(),y=v.nodeInternals,m=v.setNodes,g=v.hasDefaultNodes,w=v.onNodesChange;if(g){var x=Array.from(y.values()),_=[].concat(x,Io(p));m(_)}else if(w){var S=p.map(function(E){return{item:E,type:"add"}});w(S)}},[]),u=C.useCallback(function(h){var p=Array.isArray(h)?h:[h],v=t.getState(),y=v.edges,m=y===void 0?[]:y,g=v.setEdges,w=v.hasDefaultEdges,x=v.onEdgesChange;if(w)g([].concat(Io(m),Io(p)));else if(x){var _=p.map(function(S){return{item:S,type:"add"}});x(_)}},[]),d=C.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=h.edges,y=v===void 0?[]:v,m=h.transform,g=Array.from(p.values()),w=Xe(m,3),x=w[0],_=w[1],S=w[2];return{nodes:g.map(function(E){return sa({},E)}),edges:y.map(function(E){return sa({},E)}),viewport:{x,y:_,zoom:S}}},[]);return C.useMemo(function(){return sa(sa({},e),{},{getNodes:r,getNode:n,getEdges:i,getEdge:o,setNodes:a,setEdges:s,addNodes:c,addEdges:u,toObject:d})},[e,r,n,i,o,a,s,c,u,d])}function bie(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Kd(e,t){if(e==null)return{};var r=bie(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function yie(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},C.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function xie(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},C.createElement("path",{d:"M0 0h32v4.2H0z"}))}function wie(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},C.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 Sie(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},C.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 Eie(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},C.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 _ie=["children","className"];function KP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Oie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Qc=function(t){var r=t.children,n=t.className,i=Kd(t,_ie);return C.createElement("button",Oie({type:"button",className:cn(["react-flow__controls-button",n])},i),r)},Cie=function(t){return t.nodesDraggable&&t.nodesConnectable&&t.elementsSelectable},Iie=function(t){var r=t.style,n=t.showZoom,i=n===void 0?!0:n,o=t.showFitView,a=o===void 0?!0:o,s=t.showInteractive,c=s===void 0?!0:s,u=t.fitViewOptions,d=t.onZoomIn,h=t.onZoomOut,p=t.onFitView,v=t.onInteractiveChange,y=t.className,m=t.children,g=Nr(),w=C.useState(!1),x=Xe(w,2),_=x[0],S=x[1],E=Vt(Cie),I=kq(),N=I.zoomIn,T=I.zoomOut,M=I.fitView;if(C.useEffect(function(){S(!0)},[]),!_)return null;var z=function(){N==null||N(),d==null||d()},j=function(){T==null||T(),h==null||h()},W=function(){M==null||M(u),p==null||p()},U=function(){g.setState({nodesDraggable:!E,nodesConnectable:!E,elementsSelectable:!E}),v==null||v(!E)};return C.createElement("div",{className:cn(["react-flow__controls",y]),style:r},i&&C.createElement(C.Fragment,null,C.createElement(Qc,{onClick:z,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in"},C.createElement(yie,null)),C.createElement(Qc,{onClick:j,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out"},C.createElement(xie,null))),a&&C.createElement(Qc,{className:"react-flow__controls-fitview",onClick:W,title:"fit view","aria-label":"fit view"},C.createElement(wie,null)),c&&C.createElement(Qc,{className:"react-flow__controls-interactive",onClick:U,title:"toggle interactivity","aria-label":"toggle interactivity"},E?C.createElement(Eie,null):C.createElement(Sie,null)),m)};Iie.displayName="Controls";var Rie=function(t,r,n){return C.createElement("path",{stroke:n,strokeWidth:r,d:"M".concat(t/2," 0 V").concat(t," M0 ").concat(t/2," H").concat(t)})},Nie=function(t,r){return C.createElement("circle",{cx:t,cy:t,r:t,fill:r})},eu;function YP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function XP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Tie=(eu={},it(eu,Mo.Dots,"#81818a"),it(eu,Mo.Lines,"#eee"),eu),Pie=function(t){return t.transform},Aq=function(t){var r=t.variant,n=r===void 0?Mo.Dots:r,i=t.gap,o=i===void 0?15:i,a=t.size,s=a===void 0?.4:a,c=t.color,u=t.style,d=t.className,h=C.useRef(null),p=C.useState(null),v=Xe(p,2),y=v[0],m=v[1],g=Vt(Pie),w=Xe(g,3),x=w[0],_=w[1],S=w[2];C.useEffect(function(){var j=document.querySelectorAll(".react-flow__background"),W=Array.from(j).findIndex(function(U){return U===h.current});m("pattern-".concat(W))},[]);var E=o*S||1,I=x%E,N=_%E,T=n===Mo.Lines,M=c||Tie[n],z=T?Rie(E,s,M):Nie(s*S,M);return C.createElement("svg",{className:cn(["react-flow__background","react-flow__container",d]),style:XP(XP({},u),{},{width:"100%",height:"100%"}),ref:h},y&&C.createElement(C.Fragment,null,C.createElement("pattern",{id:y,x:I,y:N,width:E,height:E,patternUnits:"userSpaceOnUse"},z),C.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#".concat(y,")")})))};Aq.displayName="Background";var Mie=C.memo(Aq),kie=["paid-pro","paid-sponsor","paid-enterprise","paid-custom"];function Aie(e){var t=e.proOptions,r=e.position,n=r===void 0?"bottom-right":r;if(t!=null&&t.account&&kie.includes(t==null?void 0:t.account)&&t!==null&&t!==void 0&&t.hideAttribution)return null;var i="".concat(n).split("-");return C.createElement("div",{className:cn(["react-flow__attribution"].concat(Io(i))),"data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev/pricing"},C.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer"},"React Flow"))}var Die=["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"];function ZP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var qie=function(t){var r=t.x,n=t.y,i=t.label,o=t.labelStyle,a=o===void 0?{}:o,s=t.labelShowBg,c=s===void 0?!0:s,u=t.labelBgStyle,d=u===void 0?{}:u,h=t.labelBgPadding,p=h===void 0?[2,4]:h,v=t.labelBgBorderRadius,y=v===void 0?2:v,m=t.children,g=t.className,w=Kd(t,Die),x=C.useRef(null),_=C.useState({x:0,y:0,width:0,height:0}),S=Xe(_,2),E=S[0],I=S[1],N=cn(["react-flow__edge-textwrapper",g]);return C.useEffect(function(){if(x.current){var T=x.current.getBBox();I({x:T.x,y:T.y,width:T.width,height:T.height})}},[i]),typeof i>"u"||!i?null:C.createElement("g",jie({transform:"translate(".concat(r-E.width/2," ").concat(n-E.height/2,")"),className:N},w),c&&C.createElement("rect",{width:E.width+2*p[0],x:-p[0],y:-p[1],height:E.height+2*p[1],className:"react-flow__edge-textbg",style:d,rx:y,ry:y}),C.createElement("text",{className:"react-flow__edge-text",y:E.height/2,dy:"0.3em",ref:x,style:a},i),m)},zie=C.memo(qie),Yd=(function(e){var t=e.path,r=e.centerX,n=e.centerY,i=e.label,o=e.labelStyle,a=e.labelShowBg,s=e.labelBgStyle,c=e.labelBgPadding,u=e.labelBgBorderRadius,d=e.style,h=e.markerEnd,p=e.markerStart,v=i?C.createElement(zie,{x:r,y:n,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:u}):null;return C.createElement(C.Fragment,null,C.createElement("path",{style:d,d:t,className:"react-flow__edge-path",markerEnd:h,markerStart:p}),v)});function od(e){var t=e.pos,r=e.x1,n=e.y1,i=e.x2,o=e.y2,a,s;switch(t){case Oe.Left:case Oe.Right:a=.5*(r+i),s=n;break;case Oe.Top:case Oe.Bottom:a=r,s=.5*(n+o);break}return[a,s]}function Dq(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Oe.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Oe.Top:s,u=od({pos:i,x1:t,y1:r,x2:o,y2:a}),d=Xe(u,2),h=d[0],p=d[1],v=od({pos:c,x1:o,y1:a,x2:t,y2:r}),y=Xe(v,2),m=y[0],g=y[1];return"M".concat(t,",").concat(r," C").concat(h,",").concat(p," ").concat(m,",").concat(g," ").concat(o,",").concat(a)}function Lie(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Oe.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Oe.Top:s,u=od({pos:i,x1:t,y1:r,x2:o,y2:a}),d=Xe(u,2),h=d[0],p=d[1],v=od({pos:c,x1:o,y1:a,x2:t,y2:r}),y=Xe(v,2),m=y[0],g=y[1],w=t*.125+h*.375+m*.375+o*.125,x=r*.125+p*.375+g*.375+a*.125,_=Math.abs(w-t),S=Math.abs(x-r);return[w,x,_,S]}var jq=C.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?Oe.Bottom:o,s=e.targetPosition,c=s===void 0?Oe.Top:s,u=e.label,d=e.labelStyle,h=e.labelShowBg,p=e.labelBgStyle,v=e.labelBgPadding,y=e.labelBgBorderRadius,m=e.style,g=e.markerEnd,w=e.markerStart,x={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c},_=Dq(x),S=Lie(x),E=Xe(S,2),I=E[0],N=E[1];return C.createElement(Yd,{path:_,centerX:I,centerY:N,label:u,labelStyle:d,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:y,style:m,markerEnd:g,markerStart:w})});function JP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Bie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var QP=[Oe.Left,Oe.Right],qq=function(t){var r=t.sourceX,n=t.sourceY,i=t.targetX,o=t.targetY,a=t.sourcePosition,s=a===void 0?Oe.Bottom:a,c=t.targetPosition,u=c===void 0?Oe.Top:c,d=QP.includes(s),h=QP.includes(u),p=d&&!h||h&&!d;if(p){var v=d?Math.abs(i-r):0,y=r>i?r-v:r+v,m=d?0:Math.abs(o-n),g=n<o?n+m:n-m;return[y,g,v,m]}var w=Math.abs(i-r)/2,x=i<r?i+w:i-w,_=Math.abs(o-n)/2,S=o<n?o+_:o-_;return[x,S,w,_]};function Is(e,t,r){return r===void 0?r:function(n){var i=t().edges.find(function(o){return o.id===e});r(n,Bie({},i))}}var b0=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},y0=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},x0=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},w0=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},S0=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)},E0=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},_0=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},O0=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)};function Uw(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Oe.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Oe.Top:s,u=e.borderRadius,d=u===void 0?5:u,h=e.centerX,p=e.centerY,v=qq({sourceX:t,sourceY:r,targetX:o,targetY:a}),y=Xe(v,4),m=y[0],g=y[1],w=y[2],x=y[3],_=Math.min(d,Math.abs(o-t)),S=Math.min(d,Math.abs(a-r)),E=Math.min(_,S,w,x),I=[Oe.Left,Oe.Right],N=typeof h<"u"?h:m,T=typeof p<"u"?p:g,M=null,z=null;return t<=o?(M=r<=a?b0(t,T,E):E0(t,T,E),z=r<=a?O0(o,T,E):w0(o,T,E)):(M=r<a?x0(t,T,E):_0(t,T,E),z=r<a?S0(o,T,E):y0(o,T,E)),I.includes(i)&&I.includes(c)?t<=o?(M=r<=a?O0(N,r,E):w0(N,r,E),z=r<=a?b0(N,a,E):E0(N,a,E)):(i===Oe.Right&&c===Oe.Left||i===Oe.Left&&c===Oe.Right||i===Oe.Left&&c===Oe.Left)&&(M=r<=a?S0(N,r,E):y0(N,r,E),z=r<=a?x0(N,a,E):_0(N,a,E)):I.includes(i)&&!I.includes(c)?(t<=o?M=r<=a?O0(o,r,E):w0(o,r,E):M=r<=a?S0(o,r,E):y0(o,r,E),z=""):!I.includes(i)&&I.includes(c)&&(t<=o?M=r<=a?b0(t,a,E):E0(t,a,E):M=r<=a?x0(t,a,E):_0(t,a,E),z=""),"M ".concat(t,",").concat(r).concat(M).concat(z,"L ").concat(o,",").concat(a)}var HS=C.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.label,a=e.labelStyle,s=e.labelShowBg,c=e.labelBgStyle,u=e.labelBgPadding,d=e.labelBgBorderRadius,h=e.style,p=e.sourcePosition,v=p===void 0?Oe.Bottom:p,y=e.targetPosition,m=y===void 0?Oe.Top:y,g=e.markerEnd,w=e.markerStart,x=e.borderRadius,_=x===void 0?5:x,S=qq({sourceX:t,sourceY:r,targetX:n,targetY:i,sourcePosition:v,targetPosition:m}),E=Xe(S,2),I=E[0],N=E[1],T=Uw({sourceX:t,sourceY:r,sourcePosition:v,targetX:n,targetY:i,targetPosition:m,borderRadius:_});return C.createElement(Yd,{path:T,centerX:I,centerY:N,label:o,labelStyle:a,labelShowBg:s,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:h,markerEnd:g,markerStart:w})});function e5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function t5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?e5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var zq=C.memo(function(e){return C.createElement(HS,t5(t5({},e),{},{borderRadius:0}))}),Lq=C.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.label,a=e.labelStyle,s=e.labelShowBg,c=e.labelBgStyle,u=e.labelBgPadding,d=e.labelBgBorderRadius,h=e.style,p=e.markerEnd,v=e.markerStart,y=Math.abs(i-r)/2,m=i<r?i+y:i-y,g=Math.abs(n-t)/2,w=n<t?n+g:n-g,x="M ".concat(t,",").concat(r,"L ").concat(n,",").concat(i);return C.createElement(Yd,{path:x,centerX:w,centerY:m,label:o,labelStyle:a,labelShowBg:s,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:h,markerEnd:p,markerStart:v})});function tu(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function ad(e){var t=e.pos,r=e.x1,n=e.y1,i=e.x2,o=e.y2,a=e.c,s,c;switch(t){case Oe.Left:s=r-tu(r-i,a),c=n;break;case Oe.Right:s=r+tu(i-r,a),c=n;break;case Oe.Top:s=r,c=n-tu(n-o,a);break;case Oe.Bottom:s=r,c=n+tu(o-n,a);break}return[s,c]}function Xd(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Oe.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Oe.Top:s,u=e.curvature,d=u===void 0?.25:u,h=ad({pos:i,x1:t,y1:r,x2:o,y2:a,c:d}),p=Xe(h,2),v=p[0],y=p[1],m=ad({pos:c,x1:o,y1:a,x2:t,y2:r,c:d}),g=Xe(m,2),w=g[0],x=g[1];return"M".concat(t,",").concat(r," C").concat(v,",").concat(y," ").concat(w,",").concat(x," ").concat(o,",").concat(a)}function Fie(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Oe.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Oe.Top:s,u=e.curvature,d=u===void 0?.25:u,h=ad({pos:i,x1:t,y1:r,x2:o,y2:a,c:d}),p=Xe(h,2),v=p[0],y=p[1],m=ad({pos:c,x1:o,y1:a,x2:t,y2:r,c:d}),g=Xe(m,2),w=g[0],x=g[1],_=t*.125+v*.375+w*.375+o*.125,S=r*.125+y*.375+x*.375+a*.125,E=Math.abs(_-t),I=Math.abs(S-r);return[_,S,E,I]}var Gw=C.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?Oe.Bottom:o,s=e.targetPosition,c=s===void 0?Oe.Top:s,u=e.label,d=e.labelStyle,h=e.labelShowBg,p=e.labelBgStyle,v=e.labelBgPadding,y=e.labelBgBorderRadius,m=e.style,g=e.markerEnd,w=e.markerStart,x=e.curvature,_={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c,curvature:x},S=Xd(_),E=Fie(_),I=Xe(E,2),N=I[0],T=I[1];return C.createElement(Yd,{path:S,centerX:N,centerY:T,label:u,labelStyle:d,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:y,style:m,markerEnd:g,markerStart:w})}),WS=C.createContext(null),$ie=WS.Provider;WS.Consumer;function Kw(e,t,r,n,i,o,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 h=s.getAttribute("data-nodeid"),p=s.getAttribute("data-handleid"),v=r?{source:h,sourceHandle:p,target:n,targetHandle:i}:{source:n,sourceHandle:i,target:h,targetHandle:p};d.connection=v;var y=t===Da.Strict?r&&u||!r&&c:!0;y&&(d.isValid=o(v))}return d}function C0(e){e==null||e.classList.remove("react-flow__handle-valid"),e==null||e.classList.remove("react-flow__handle-connecting")}function Bq(e){var t=e.event,r=e.handleId,n=e.nodeId,i=e.onConnect,o=e.isTarget,a=e.getState,s=e.setState,c=e.isValidConnection,u=e.elementEdgeUpdaterType,d=e.onEdgeUpdateEnd,h=t.target.closest(".react-flow"),p=wq(t.target);if(!p)return;var v=p.elementFromPoint(t.clientX,t.clientY),y=v==null?void 0:v.classList.contains("target"),m=v==null?void 0:v.classList.contains("source");if(!h||!y&&!m&&!u)return;var g=a(),w=g.onConnectStart,x=g.connectionMode,_=u||(y?"target":"source"),S=h.getBoundingClientRect(),E;s({connectionPosition:{x:t.clientX-S.left,y:t.clientY-S.top},connectionNodeId:n,connectionHandleId:r,connectionHandleType:_}),w==null||w(t,{nodeId:n,handleId:r,handleType:_});function I(T){s({connectionPosition:{x:T.clientX-S.left,y:T.clientY-S.top}});var M=Kw(T,x,o,n,r,c,p),z=M.connection,j=M.elementBelow,W=M.isValid,U=M.isHoveringHandle;if(!U)return C0(E);z.source!==z.target&&j&&(C0(E),E=j,j.classList.add("react-flow__handle-connecting"),j.classList.toggle("react-flow__handle-valid",W))}function N(T){var M=a(),z=M.onConnectStop,j=M.onConnectEnd,W=Kw(T,x,o,n,r,c,p),U=W.connection,A=W.isValid;z==null||z(T),A&&(i==null||i(U)),j==null||j(T),u&&d&&d(T),C0(E),s({connectionNodeId:null,connectionHandleId:null,connectionHandleType:null}),p.removeEventListener("mousemove",I),p.removeEventListener("mouseup",N)}p.addEventListener("mousemove",I),p.addEventListener("mouseup",N)}var Vie=["type","position","isValidConnection","isConnectable","id","onConnect","children","className","onMouseDown"];function r5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function I0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?r5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):r5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Hie=function(){return!0},Wie=function(t){return{connectionStartHandle:t.connectionStartHandle,connectOnClick:t.connectOnClick}},Fq=C.forwardRef(function(e,t){var r=e.type,n=r===void 0?"source":r,i=e.position,o=i===void 0?Oe.Top:i,a=e.isValidConnection,s=a===void 0?Hie:a,c=e.isConnectable,u=c===void 0?!0:c,d=e.id,h=e.onConnect,p=e.children,v=e.className,y=e.onMouseDown,m=Kd(e,Vie),g=Nr(),w=C.useContext(WS),x=Vt(Wie,Wr),_=x.connectionStartHandle,S=x.connectOnClick,E=d||null,I=n==="target",N=function(j){var W=g.getState(),U=W.defaultEdgeOptions,A=W.onConnect,K=W.hasDefaultEdges,V=I0(I0({},U),j);if(K){var te=g.getState(),G=te.edges;g.setState({edges:sie(V,G)})}A==null||A(V),h==null||h(V)},T=function(j){j.button===0&&Bq({event:j,handleId:E,nodeId:w,onConnect:N,isTarget:I,getState:g.getState,setState:g.setState,isValidConnection:s}),y==null||y(j)},M=function(j){var W=g.getState(),U=W.onClickConnectStart,A=W.onClickConnectStop,K=W.onClickConnectEnd,V=W.connectionMode;if(!_){U==null||U(j,{nodeId:w,handleId:E,handleType:n}),g.setState({connectionStartHandle:{nodeId:w,type:n,handleId:E}});return}var te=wq(j.target),G=Kw(j,V,_.type==="target",_.nodeId,_.handleId||null,s,te),re=G.connection,P=G.isValid;A==null||A(j),P&&N(re),K==null||K(j),g.setState({connectionStartHandle:null})};return C.createElement("div",I0({"data-handleid":E,"data-nodeid":w,"data-handlepos":o,className:cn(["react-flow__handle","react-flow__handle-".concat(o),"nodrag",v,{source:!I,target:I,connectable:u,connecting:(_==null?void 0:_.nodeId)===w&&(_==null?void 0:_.handleId)===E&&(_==null?void 0:_.type)===n}]),onMouseDown:T,onClick:S?M:void 0,ref:t},m),p)});Fq.displayName="Handle";var sd=C.memo(Fq),$q=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?Oe.Top:i,a=t.sourcePosition,s=a===void 0?Oe.Bottom:a;return C.createElement(C.Fragment,null,C.createElement(sd,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label,C.createElement(sd,{type:"source",position:s,isConnectable:n}))};$q.displayName="DefaultNode";var Yw=C.memo($q),Vq=function(t){var r=t.data,n=t.isConnectable,i=t.sourcePosition,o=i===void 0?Oe.Bottom:i;return C.createElement(C.Fragment,null,r==null?void 0:r.label,C.createElement(sd,{type:"source",position:o,isConnectable:n}))};Vq.displayName="InputNode";var Hq=C.memo(Vq),Wq=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?Oe.Top:i;return C.createElement(C.Fragment,null,C.createElement(sd,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label)};Wq.displayName="OutputNode";var Uq=C.memo(Wq),Uie=function(t){return{selectedNodes:Array.from(t.nodeInternals.values()).filter(function(r){return r.selected}),selectedEdges:t.edges.filter(function(r){return r.selected})}},Gie=function(t,r){var n=t.selectedNodes.map(function(s){return s.id}),i=r.selectedNodes.map(function(s){return s.id}),o=t.selectedEdges.map(function(s){return s.id}),a=r.selectedEdges.map(function(s){return s.id});return Wr(n,i)&&Wr(o,a)};function Kie(e){var t=e.onSelectionChange,r=Vt(Uie,Gie),n=r.selectedNodes,i=r.selectedEdges;return C.useEffect(function(){t({nodes:n,edges:i})},[n,i]),null}var Yie=C.memo(Kie),Xie=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 Vi(e,t){C.useEffect(function(){typeof e<"u"&&t(e)},[e])}function bt(e,t,r){C.useEffect(function(){typeof t<"u"&&r(it({},e,t))},[t])}var Zie=function(t){var r=t.nodes,n=t.edges,i=t.defaultNodes,o=t.defaultEdges,a=t.onConnect,s=t.onConnectStart,c=t.onConnectStop,u=t.onConnectEnd,d=t.onClickConnectStart,h=t.onClickConnectStop,p=t.onClickConnectEnd,v=t.nodesDraggable,y=t.nodesConnectable,m=t.minZoom,g=t.maxZoom,w=t.nodeExtent,x=t.onNodesChange,_=t.onEdgesChange,S=t.elementsSelectable,E=t.connectionMode,I=t.snapGrid,N=t.snapToGrid,T=t.translateExtent,M=t.connectOnClick,z=t.defaultEdgeOptions,j=t.fitView,W=t.fitViewOptions,U=t.onNodesDelete,A=t.onEdgesDelete,K=t.onNodeDrag,V=t.onNodeDragStart,te=t.onNodeDragStop,G=t.onSelectionDrag,re=t.onSelectionDragStart,P=t.onSelectionDragStop,B=Vt(Xie,Wr),X=B.setNodes,Q=B.setEdges,D=B.setDefaultNodesAndEdges,$=B.setMinZoom,H=B.setMaxZoom,q=B.setTranslateExtent,Y=B.setNodeExtent,ie=B.reset,ne=Nr();return C.useEffect(function(){return D(i,o),function(){ie()}},[]),bt("defaultEdgeOptions",z,ne.setState),bt("connectionMode",E,ne.setState),bt("onConnect",a,ne.setState),bt("onConnectStart",s,ne.setState),bt("onConnectStop",c,ne.setState),bt("onConnectEnd",u,ne.setState),bt("onClickConnectStart",d,ne.setState),bt("onClickConnectStop",h,ne.setState),bt("onClickConnectEnd",p,ne.setState),bt("nodesDraggable",v,ne.setState),bt("nodesConnectable",y,ne.setState),bt("elementsSelectable",S,ne.setState),bt("snapToGrid",N,ne.setState),bt("snapGrid",I,ne.setState),bt("onNodesChange",x,ne.setState),bt("onEdgesChange",_,ne.setState),bt("connectOnClick",M,ne.setState),bt("fitViewOnInit",j,ne.setState),bt("fitViewOnInitOptions",W,ne.setState),bt("onNodesDelete",U,ne.setState),bt("onEdgesDelete",A,ne.setState),bt("onNodeDrag",K,ne.setState),bt("onNodeDragStart",V,ne.setState),bt("onNodeDragStop",te,ne.setState),bt("onSelectionDrag",G,ne.setState),bt("onSelectionDragStart",re,ne.setState),bt("onSelectionDragStop",P,ne.setState),Vi(r,X),Vi(n,Q),Vi(i,X),Vi(o,Q),Vi(m,$),Vi(g,H),Vi(T,q),Vi(w,Y),null},Jie=".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%)}",Qie=Jie,eoe=".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}",toe=eoe,roe=function(t,r,n){return n===Oe.Left?t-r:n===Oe.Right?t+r:t},noe=function(t,r,n){return n===Oe.Top?t-r:n===Oe.Bottom?t+r:t},n5=function(t){var r=t.className,n=t.position,i=t.centerX,o=t.centerY,a=t.radius,s=a===void 0?10:a;return C.createElement("circle",{className:cn(["react-flow__edgeupdater",r]),cx:roe(i,s,n),cy:noe(o,s,n),r:s,stroke:"transparent",fill:"transparent"})},la=(function(e){var t=function(n){var i=n.id,o=n.className,a=n.type,s=n.data,c=n.onClick,u=n.onEdgeDoubleClick,d=n.selected,h=n.animated,p=n.label,v=n.labelStyle,y=n.labelShowBg,m=n.labelBgStyle,g=n.labelBgPadding,w=n.labelBgBorderRadius,x=n.style,_=n.source,S=n.target,E=n.sourceX,I=n.sourceY,N=n.targetX,T=n.targetY,M=n.sourcePosition,z=n.targetPosition,j=n.elementsSelectable,W=n.hidden,U=n.sourceHandleId,A=n.targetHandleId,K=n.onContextMenu,V=n.onMouseEnter,te=n.onMouseMove,G=n.onMouseLeave,re=n.edgeUpdaterRadius,P=n.onEdgeUpdate,B=n.onEdgeUpdateStart,X=n.onEdgeUpdateEnd,Q=n.markerEnd,D=n.markerStart,$=n.rfId,H=C.useState(!1),q=Xe(H,2),Y=q[0],ie=q[1],ne=Nr(),ve=function(ze){var Je=ne.getState(),rt=Je.edges,Pt=Je.addSelectedEdges,gt=rt.find(function(Rt){return Rt.id===i});j&&(ne.setState({nodesSelectionActive:!1}),Pt([i])),c==null||c(ze,gt)},Z=Is(i,ne.getState,u),J=Is(i,ne.getState,K),ae=Is(i,ne.getState,V),he=Is(i,ne.getState,te),ue=Is(i,ne.getState,G),de=function(ze,Je){var rt=Je?S:_,Pt=(Je?A:U)||null,gt=Je?"target":"source",Rt=function(){return!0},qt=Je,Ot=ne.getState().edges.find(function(ar){return ar.id===i});B==null||B(ze,Ot,gt);var Gr=X?function(ar){return X(ar,Ot,gt)}:void 0,Kr=function(Nn){return P==null?void 0:P(Ot,Nn)};Bq({event:ze,handleId:Pt,nodeId:rt,onConnect:Kr,isTarget:qt,getState:ne.getState,setState:ne.setState,isValidConnection:Rt,elementEdgeUpdaterType:gt,onEdgeUpdateEnd:Gr})},le=function(ze){return de(ze,!0)},xe=function(ze){return de(ze,!1)},Ee=function(){return ie(!0)},Ie=function(){return ie(!1)},Te=C.useMemo(function(){return"url(#".concat(Hw(D,$),")")},[D,$]),Me=C.useMemo(function(){return"url(#".concat(Hw(Q,$),")")},[Q,$]);if(W)return null;var Ze=!j&&!c,tt=typeof P<"u",Fe=cn(["react-flow__edge","react-flow__edge-".concat(a),o,{selected:d,animated:h,inactive:Ze,updating:Y}]);return C.createElement("g",{className:Fe,onClick:ve,onDoubleClick:Z,onContextMenu:J,onMouseEnter:ae,onMouseMove:he,onMouseLeave:ue},C.createElement(e,{id:i,source:_,target:S,selected:d,animated:h,label:p,labelStyle:v,labelShowBg:y,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:w,data:s,style:x,sourceX:E,sourceY:I,targetX:N,targetY:T,sourcePosition:M,targetPosition:z,sourceHandleId:U,targetHandleId:A,markerStart:Te,markerEnd:Me,"data-testid":"rf__edge-".concat(i)}),tt&&C.createElement("g",{onMouseDown:le,onMouseEnter:Ee,onMouseOut:Ie},C.createElement(n5,{position:M,centerX:E,centerY:I,radius:re})),tt&&C.createElement("g",{onMouseDown:xe,onMouseEnter:Ee,onMouseOut:Ie},C.createElement(n5,{position:z,centerX:N,centerY:T,radius:re})))};return t.displayName="EdgeWrapper",C.memo(t)});function i5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function o5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?i5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ioe(e){var t={default:la(e.default||Gw),straight:la(e.bezier||Lq),step:la(e.step||zq),smoothstep:la(e.step||HS),simplebezier:la(e.simplebezier||jq)},r={},n=Object.keys(e).filter(function(i){return!["default","bezier"].includes(i)}).reduce(function(i,o){return i[o]=la(e[o]||Gw),i},r);return o5(o5({},t),n)}function a5(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=((r==null?void 0:r.x)||0)+t.x,i=((r==null?void 0:r.y)||0)+t.y,o=(r==null?void 0:r.width)||t.width,a=(r==null?void 0:r.height)||t.height;switch(e){case Oe.Top:return{x:n+o/2,y:i};case Oe.Right:return{x:n+o,y:i+a/2};case Oe.Bottom:return{x:n+o/2,y:i+a};case Oe.Left:return{x:n,y:i+a/2}}}function s5(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 ooe=function(t,r,n,i,o,a){var s=a5(n,t,r),c=a5(a,i,o);return{sourceX:s.x,sourceY:s.y,targetX:c.x,targetY:c.y}};function aoe(e){var t=e.sourcePos,r=e.targetPos,n=e.sourceWidth,i=e.sourceHeight,o=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+o),y2:Math.max(t.y+i,r.y+a)};d.x===d.x2&&(d.x2+=1),d.y===d.y2&&(d.y2+=1);var h=id({x:(0-u[0])/u[2],y:(0-u[1])/u[2],width:s/u[2],height:c/u[2]}),p=Math.max(0,Math.min(h.x2,d.x2)-Math.max(h.x,d.x)),v=Math.max(0,Math.min(h.y2,d.y2)-Math.max(h.y,d.y)),y=Math.ceil(p*v);return y>0}function l5(e,t){var r,n,i,o,a,s=e.get(t),c=(s==null||(r=s[ur])===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((i=s.positionAbsolute)===null||i===void 0?void 0:i.y)>"u";return[{x:(s==null||(o=s.positionAbsolute)===null||o===void 0?void 0:o.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 soe=typeof document<"u"?document:null,ld=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{target:soe},r=C.useState(!1),n=Xe(r,2),i=n[0],o=n[1],a=C.useRef(new Set([])),s=C.useMemo(function(){if(e!==null){var h=Array.isArray(e)?e:[e],p=h.filter(function(y){return typeof y=="string"}).map(function(y){return y.split("+")}),v=p.reduce(function(y,m){return y.concat.apply(y,Io(m))},[]);return[p,v]}return[[],[]]},[e]),c=Xe(s,2),u=c[0],d=c[1];return C.useEffect(function(){if(e!==null){var h,p,v=function(w){if(d5(w))return!1;var x=u5(w.code,d);a.current.add(w[x]),c5(u,a.current,!1)&&(w.preventDefault(),o(!0))},y=function(w){if(d5(w))return!1;var x=u5(w.code,d);c5(u,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(w[x])},m=function(){a.current.clear(),o(!1)};return t==null||(h=t.target)===null||h===void 0||h.addEventListener("keydown",v),t==null||(p=t.target)===null||p===void 0||p.addEventListener("keyup",y),window.addEventListener("blur",m),function(){var g,w;t==null||(g=t.target)===null||g===void 0||g.removeEventListener("keydown",v),t==null||(w=t.target)===null||w===void 0||w.removeEventListener("keyup",y),window.removeEventListener("blur",m)}}},[e,o]),i});function c5(e,t,r){return e.filter(function(n){return r||n.length===t.size}).some(function(n){return n.every(function(i){return t.has(i)})})}function u5(e,t){return t.includes(e)?"code":"key"}function d5(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 loe=function(t){return{onNodesChange:t.onNodesChange,onEdgesChange:t.onEdgesChange}},coe=(function(e){var t=e.deleteKeyCode,r=e.multiSelectionKeyCode,n=Nr(),i=Vt(loe,Wr),o=i.onNodesChange,a=i.onEdgesChange,s=ld(t),c=ld(r);C.useEffect(function(){var u=n.getState(),d=u.nodeInternals,h=u.edges,p=u.hasDefaultNodes,v=u.hasDefaultEdges,y=u.onNodesDelete,m=u.onEdgesDelete,g=Array.from(d.values()),w=g.reduce(function(T,M){return(!M.selected&&M.parentNode&&T.find(function(z){return z.id===M.parentNode})||M.selected)&&T.push(M),T},[]),x=h.filter(function(T){return T.selected});if(s&&(w||x)){var _=Nq(w,h),S=[].concat(Io(x),Io(_)),E=S.reduce(function(T,M){return T.includes(M.id)||T.push(M.id),T},[]);if((v||p)&&(v&&n.setState({edges:h.filter(function(T){return!E.includes(T.id)})}),p&&(w.forEach(function(T){d.delete(T.id)}),n.setState({nodeInternals:new Map(d)}))),E.length>0&&(m==null||m(S),a)){var I=E.map(function(T){return{id:T,type:"remove"}});a(I)}if(w.length>0&&(y==null||y(w),o)){var N=w.map(function(T){return{id:T.id,type:"remove"}});o(N)}n.setState({nodesSelectionActive:!1})}},[s,o,a]),C.useEffect(function(){n.setState({multiSelectionActive:c})},[c])});function uoe(e){var t=Nr();C.useEffect(function(){var r,n=function(){if(e.current){var o=FS(e.current);process.env.NODE_ENV==="development"&&(o.height===0||o.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:o.width||500,height:o.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 doe=function(t,r){return t.x!==r.x||t.y!==r.y||t.zoom!==r.k},R0=function(t){return{x:t.x,y:t.y,zoom:t.k}},ru=function(t,r){return t.target.closest(".".concat(r))},foe=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler}},hoe=function(t){var r=t.onMove,n=t.onMoveStart,i=t.onMoveEnd,o=t.zoomOnScroll,a=o===void 0?!0:o,s=t.zoomOnPinch,c=s===void 0?!0:s,u=t.panOnScroll,d=u===void 0?!1:u,h=t.panOnScrollSpeed,p=h===void 0?.5:h,v=t.panOnScrollMode,y=v===void 0?_a.Free:v,m=t.zoomOnDoubleClick,g=m===void 0?!0:m,w=t.selectionKeyPressed,x=t.elementsSelectable,_=t.panOnDrag,S=_===void 0?!0:_,E=t.translateExtent,I=t.minZoom,N=t.maxZoom,T=t.defaultZoom,M=T===void 0?1:T,z=t.defaultPosition,j=z===void 0?[0,0]:z,W=t.zoomActivationKeyCode,U=t.preventScrolling,A=U===void 0?!0:U,K=t.children,V=t.noWheelClassName,te=t.noPanClassName,G=Nr(),re=C.useRef(!1),P=C.useRef(null),B=C.useRef({x:0,y:0,zoom:0}),X=Vt(foe,Wr),Q=X.d3Zoom,D=X.d3Selection,$=X.d3ZoomHandler,H=ld(W);return uoe(P),C.useEffect(function(){if(P.current){var q,Y=Zne().scaleExtent([I,N]).translateExtent(E),ie=jn(P.current).call(Y),ne=Oa(j[0],E[0][0],E[1][0]),ve=Oa(j[1],E[0][1],E[1][1]),Z=Oa(M,I,N),J=Co.translate(ne,ve).scale(Z);Y.transform(ie,J),G.setState({d3Zoom:Y,d3Selection:ie,d3ZoomHandler:ie.on("wheel.zoom"),transform:[ne,ve,Z],domNode:(q=ie.node())===null||q===void 0?void 0:q.closest(".react-flow")})}},[]),C.useEffect(function(){D&&Q&&(d&&!H?D.on("wheel",function(q){if(ru(q,V))return!1;q.preventDefault(),q.stopImmediatePropagation();var Y=D.property("__zoom").k||1;if(q.ctrlKey&&c){var ie=ti(q),ne=-q.deltaY*(q.deltaMode===1?.05:q.deltaMode?1:.002)*10,ve=Y*Math.pow(2,ne);Q.scaleTo(D,ve,ie);return}var Z=q.deltaMode===1?20:1,J=y===_a.Vertical?0:q.deltaX*Z,ae=y===_a.Horizontal?0:q.deltaY*Z;Q.translateBy(D,-(J/Y)*p,-(ae/Y)*p)}).on("wheel.zoom",null):typeof $<"u"&&D.on("wheel",function(q){if(!A||ru(q,V))return null;q.preventDefault()}).on("wheel.zoom",$))},[d,y,D,Q,$,H,c,A,V]),C.useEffect(function(){Q&&(w&&!re.current?Q.on("zoom",null):w||Q.on("zoom",function(q){if(G.setState({transform:[q.transform.x,q.transform.y,q.transform.k]}),r){var Y=R0(q.transform);r(q.sourceEvent,Y)}}))},[w,Q,r]),C.useEffect(function(){Q&&Q.on("start",function(q){if(re.current=!0,n){var Y=R0(q.transform);B.current=Y,n(q.sourceEvent,Y)}})},[Q,n]),C.useEffect(function(){Q&&Q.on("end",function(q){if(re.current=!1,i&&doe(B.current,q.transform)){var Y=R0(q.transform);B.current=Y,i(q.sourceEvent,Y)}})},[Q,i]),C.useEffect(function(){Q&&Q.filter(function(q){var Y=H||a,ie=c&&q.ctrlKey;return!S&&!Y&&!d&&!g&&!c||w||!g&&q.type==="dblclick"||ru(q,V)&&q.type==="wheel"||ru(q,te)&&q.type!=="wheel"||!c&&q.ctrlKey&&q.type==="wheel"||!Y&&!d&&!ie&&q.type==="wheel"||!S&&(q.type==="mousedown"||q.type==="touchstart")?!1:(!q.ctrlKey||q.type==="wheel")&&!q.button})},[Q,a,c,d,g,S,w,x,H]),C.createElement("div",{className:"react-flow__renderer react-flow__container",ref:P},K)};function f5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function h5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?f5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function p5(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}var poe=function(t){return{userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable}},v5={startX:0,startY:0,x:0,y:0,width:0,height:0,draw:!1},voe=C.memo(function(e){var t=e.selectionKeyPressed,r=Nr(),n=C.useRef(0),i=C.useRef(0),o=C.useRef(),a=C.useState(v5),s=Xe(a,2),c=s[0],u=s[1],d=Vt(poe,Wr),h=d.userSelectionActive,p=d.elementsSelectable,v=h||t;if(!p||!v)return null;var y=function(){u(v5),r.setState({userSelectionActive:!1}),n.current=0,i.current=0},m=function(S){var E=S.target.closest(".react-flow");o.current=E.getBoundingClientRect();var I=p5(S,o.current);u({width:0,height:0,startX:I.x,startY:I.y,x:I.x,y:I.y,draw:!0}),r.setState({userSelectionActive:!0,nodesSelectionActive:!1})},g=function(S){var E,I;if(!(!t||!c.draw||!o.current)){var N=p5(S,o.current),T=(E=c.startX)!==null&&E!==void 0?E:0,M=(I=c.startY)!==null&&I!==void 0?I:0,z=h5(h5({},c),{},{x:N.x<T?N.x:T,y:N.y<M?N.y:M,width:Math.abs(N.x-T),height:Math.abs(N.y-M)}),j=r.getState(),W=j.nodeInternals,U=j.edges,A=j.transform,K=j.onNodesChange,V=j.onEdgesChange,te=Array.from(W.values()),G=Rq(W,z,A,!1,!0),re=Nq(G,U).map(function(Q){return Q.id}),P=G.map(function(Q){return Q.id});if(n.current!==P.length){n.current=P.length;var B=ya(te,P);B.length&&(K==null||K(B))}if(i.current!==re.length){i.current=re.length;var X=ya(U,re);X.length&&(V==null||V(X))}u(z)}},w=function(){r.setState({nodesSelectionActive:n.current>0}),y()},x=function(){r.setState({nodesSelectionActive:!1}),y()};return C.createElement("div",{className:"react-flow__selectionpane react-flow__container",onMouseDown:m,onMouseMove:g,onMouseUp:w,onMouseLeave:x},c.draw&&C.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 g5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function m5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?g5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Gq(e,t){if(!e.parentNode)return!1;var r=t.get(e.parentNode);return r?r.selected?!0:Gq(r,t):!1}function b5(e,t,r){var n=e;do{var i;if((i=n)!==null&&i!==void 0&&i.matches(t))return!0;if(n===r.current)return!1;n=n.parentElement}while(n);return!1}function goe(e,t,r){return Array.from(e.values()).filter(function(n){return(n.selected||n.id===r)&&(!n.parentNode||!Gq(n,e))}).map(function(n){var i,o,a,s;return{id:n.id,position:n.position||{x:0,y:0},positionAbsolute:n.positionAbsolute||{x:0,y:0},distance:{x:t.x-((i=(o=n.positionAbsolute)===null||o===void 0?void 0:o.x)!==null&&i!==void 0?i: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 moe(e,t,r,n,i,o){var a=Xe(n,2),s=a[0],c=a[1],u=e.extent||o,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 h=i.get(e.parentNode);u=h!=null&&h.positionAbsolute&&h!==null&&h!==void 0&&h.width&&h!==null&&h!==void 0&&h.height?[[h.positionAbsolute.x,h.positionAbsolute.y],[h.positionAbsolute.x+h.width-e.width,h.positionAbsolute.y+h.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=o;else if(e.extent&&e.parentNode){var p,v,y,m,g=i.get(e.parentNode),w=(p=g==null||(v=g.positionAbsolute)===null||v===void 0?void 0:v.x)!==null&&p!==void 0?p:0,x=(y=g==null||(m=g.positionAbsolute)===null||m===void 0?void 0:m.y)!==null&&y!==void 0?y:0;u=[[e.extent[0][0]+w,e.extent[0][1]+x],[e.extent[1][0]+w,e.extent[1][1]+x]]}var _={x:0,y:0};if(e.parentNode){var S,E,I,N,T=i.get(e.parentNode);_={x:(S=T==null||(E=T.positionAbsolute)===null||E===void 0?void 0:E.x)!==null&&S!==void 0?S:0,y:(I=T==null||(N=T.positionAbsolute)===null||N===void 0?void 0:N.y)!==null&&I!==void 0?I:0}}return e.positionAbsolute=u?xq(d,u):d,e.position={x:e.positionAbsolute.x-_.x,y:e.positionAbsolute.y-_.y},e}function N0(e){var t=e.nodeId,r=e.dragItems,n=e.nodeInternals,i=r.map(function(o){var a=n.get(o.id);return m5(m5({},a),{},{position:o.position,positionAbsolute:o.positionAbsolute})});return[t?i.find(function(o){return o.id===t}):i[0],i]}function T0(e){return function(t,r,n){return e==null?void 0:e(t,n)}}function Kq(e){var t=e.nodeRef,r=e.disabled,n=r===void 0?!1:r,i=e.noDragClassName,o=e.handleSelector,a=e.nodeId,s=e.isSelectable,c=e.selectNodesOnDrag,u=C.useState(!1),d=Xe(u,2),h=d[0],p=d[1],v=Nr(),y=C.useRef(),m=C.useRef({x:null,y:null}),g=C.useCallback(function(w){var x=w.sourceEvent,_=v.getState(),S=_.transform,E=_.snapGrid,I=_.snapToGrid,N=x.touches?x.touches[0].clientX:x.clientX,T=x.touches?x.touches[0].clientY:x.clientY,M=Iq({x:N,y:T},S,I,E);return M},[]);return C.useEffect(function(){if(t!=null&&t.current){var w=jn(t.current);if(n)w.on(".drag",null);else{var x=sre().on("start",function(_){var S=v.getState(),E=S.nodeInternals,I=S.multiSelectionActive,N=S.unselectNodesAndEdges,T=S.onNodeDragStart,M=S.onSelectionDragStart,z=a?T:T0(M);if(!c&&!I&&a){var j;(j=E.get(a))!==null&&j!==void 0&&j.selected||N()}a&&s&&c&&Cq({id:a,store:v});var W=g(_);if(m.current=W,y.current=goe(E,W,a),z&&y.current){var U=N0({nodeId:a,dragItems:y.current,nodeInternals:E}),A=Xe(U,2),K=A[0],V=A[1];z(_.sourceEvent,K,V)}}).on("drag",function(_){var S=v.getState(),E=S.updateNodePositions,I=S.snapToGrid,N=S.snapGrid,T=S.nodeInternals,M=S.nodeExtent,z=S.onNodeDrag,j=S.onSelectionDrag,W=g(_);if((m.current.x!==W.x||m.current.y!==W.y)&&y.current){m.current=W,y.current=y.current.map(function(G){return moe(G,W,I,N,T,M)});var U=a?z:T0(j);if(E(y.current,!0,!0),p(!0),U){var A=N0({nodeId:a,dragItems:y.current,nodeInternals:T}),K=Xe(A,2),V=K[0],te=K[1];U(_.sourceEvent,V,te)}}_.on("end",function(G){if(p(!1),y.current){var re=v.getState(),P=re.updateNodePositions,B=re.nodeInternals,X=re.onNodeDragStop,Q=re.onSelectionDragStop,D=a?X:T0(Q);if(P(y.current,!1,!1),D){var $=N0({nodeId:a,dragItems:y.current,nodeInternals:B}),H=Xe($,2),q=H[0],Y=H[1];D(G.sourceEvent,q,Y)}}})}).filter(function(_){var S=_.target,E=!_.button&&(!i||!b5(S,".".concat(i),t))&&(!o||b5(S,o,t));return E});return w.call(x),function(){w.on(".drag",null)}}}},[t,n,i,o,s,v,a,c,g]),h}function y5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function boe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?y5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var yoe=function(t){return boe({transformString:"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")"),userSelectionActive:t.userSelectionActive},$S(Array.from(t.nodeInternals.values()).filter(function(r){return r.selected})))},xoe=function(t){var r=Array.from(t.nodeInternals.values()).filter(function(n){return n.selected});return $S(r)};function woe(e){var t=e.onSelectionContextMenu,r=e.noPanClassName,n=Nr(),i=Vt(yoe,Wr),o=i.transformString,a=i.userSelectionActive,s=Vt(xoe,Wr),c=s.width,u=s.height,d=s.x,h=s.y,p=C.useRef(null);if(Kq({nodeRef:p}),a||!c||!u)return null;var v=t?function(y){var m=Array.from(n.getState().nodeInternals.values()).filter(function(g){return g.selected});t(y,m)}:void 0;return C.createElement("div",{className:cn(["react-flow__nodesselection","react-flow__container",r]),style:{transform:o}},C.createElement("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:v,style:{width:c,height:u,top:h,left:d}}))}var Soe=C.memo(woe),Eoe=function(t){return t.nodesSelectionActive},Yq=function(t){var r=t.children,n=t.onPaneClick,i=t.onPaneContextMenu,o=t.onPaneScroll,a=t.deleteKeyCode,s=t.onMove,c=t.onMoveStart,u=t.onMoveEnd,d=t.selectionKeyCode,h=t.multiSelectionKeyCode,p=t.zoomActivationKeyCode,v=t.elementsSelectable,y=t.zoomOnScroll,m=t.zoomOnPinch,g=t.panOnScroll,w=t.panOnScrollSpeed,x=t.panOnScrollMode,_=t.zoomOnDoubleClick,S=t.panOnDrag,E=t.translateExtent,I=t.minZoom,N=t.maxZoom,T=t.defaultZoom,M=t.defaultPosition,z=t.preventScrolling,j=t.onSelectionContextMenu,W=t.noWheelClassName,U=t.noPanClassName,A=Nr(),K=Vt(Eoe),V=ld(d);coe({deleteKeyCode:a,multiSelectionKeyCode:h});var te=function(B){n==null||n(B),A.getState().resetSelectedElements(),A.setState({nodesSelectionActive:!1})},G=i?function(P){return i(P)}:void 0,re=o?function(P){return o(P)}:void 0;return C.createElement(hoe,{onMove:s,onMoveStart:c,onMoveEnd:u,selectionKeyPressed:V,elementsSelectable:v,zoomOnScroll:y,zoomOnPinch:m,panOnScroll:g,panOnScrollSpeed:w,panOnScrollMode:x,zoomOnDoubleClick:_,panOnDrag:S,translateExtent:E,minZoom:I,maxZoom:N,defaultZoom:T,defaultPosition:M,zoomActivationKeyCode:p,preventScrolling:z,noWheelClassName:W,noPanClassName:U},r,C.createElement(voe,{selectionKeyPressed:V}),K&&C.createElement(Soe,{onSelectionContextMenu:j,noPanClassName:U}),C.createElement("div",{className:"react-flow__pane react-flow__container",onClick:te,onContextMenu:G,onWheel:re}))};Yq.displayName="FlowRenderer";var _oe=C.memo(Yq);function Ooe(e){var t=Vt(C.useCallback(function(r){return e?Rq(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):Array.from(r.nodeInternals.values())},[e]));return t}var Coe=function(t){return{nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,updateNodeDimensions:t.updateNodeDimensions}},Xq=function(t){var r=Vt(Coe,Wr),n=r.nodesDraggable,i=r.nodesConnectable,o=r.elementsSelectable,a=r.updateNodeDimensions,s=Ooe(t.onlyRenderVisibleElements),c=C.useRef(),u=C.useMemo(function(){if(typeof ResizeObserver>"u")return null;var d=new ResizeObserver(function(h){var p=h.map(function(v){return{id:v.target.getAttribute("data-id"),nodeElement:v.target,forceUpdate:!0}});a(p)});return c.current=d,d},[]);return C.useEffect(function(){return function(){var d;c==null||(d=c.current)===null||d===void 0||d.disconnect()}},[]),C.createElement("div",{className:"react-flow__nodes react-flow__container"},s.map(function(d){var h,p,v,y,m,g,w,x=d.type||"default";t.nodeTypes[x]||(process.env.NODE_ENV==="development"&&console.warn('[React Flow]: Node type "'.concat(x,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),x="default");var _=t.nodeTypes[x]||t.nodeTypes.default,S=!!(d.draggable||n&&typeof d.draggable>"u"),E=!!(d.selectable||o&&typeof d.selectable>"u"),I=!!(d.connectable||i&&typeof d.connectable>"u");return C.createElement(_,{key:d.id,id:d.id,className:d.className,style:d.style,type:x,data:d.data,sourcePosition:d.sourcePosition||Oe.Bottom,targetPosition:d.targetPosition||Oe.Top,hidden:d.hidden,xPos:(h=(p=d.positionAbsolute)===null||p===void 0?void 0:p.x)!==null&&h!==void 0?h: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:E,isConnectable:I,resizeObserver:u,dragHandle:d.dragHandle,zIndex:(m=(g=d[ur])===null||g===void 0?void 0:g.z)!==null&&m!==void 0?m:0,isParent:!!((w=d[ur])!==null&&w!==void 0&&w.isParent),noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,initialized:!!d.width&&!!d.height})}))};Xq.displayName="NodeRenderer";var Ioe=C.memo(Xq),ca;function x5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function w5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?x5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Roe=(ca={},it(ca,Oe.Left,Oe.Right),it(ca,Oe.Right,Oe.Left),it(ca,Oe.Top,Oe.Bottom),it(ca,Oe.Bottom,Oe.Top),ca),Noe=(function(e){var t,r,n,i,o,a=e.connectionNodeId,s=e.connectionHandleType,c=e.connectionLineStyle,u=e.connectionLineType,d=u===void 0?Yi.Bezier:u,h=e.isConnectable,p=e.CustomConnectionLineComponent,v=Vt(C.useCallback(function(re){return{fromNode:re.nodeInternals.get(a),handleId:re.connectionHandleId,toX:(re.connectionPosition.x-re.transform[0])/re.transform[2],toY:(re.connectionPosition.y-re.transform[1])/re.transform[2]}},[a]),Wr),y=v.fromNode,m=v.handleId,g=v.toX,w=v.toY,x=y==null||(t=y[ur])===null||t===void 0?void 0:t.handleBounds;if(!y||!h||!(x!=null&&x[s]))return null;var _=x[s],S=m?_.find(function(re){return re.id===m}):_[0],E=S?S.x+S.width/2:((r=y==null?void 0:y.width)!==null&&r!==void 0?r:0)/2,I=S?S.y+S.height/2:(n=y==null?void 0:y.height)!==null&&n!==void 0?n:0,N=((y==null||(i=y.positionAbsolute)===null||i===void 0?void 0:i.x)||0)+E,T=((y==null||(o=y.positionAbsolute)===null||o===void 0?void 0:o.y)||0)+I,M=S==null?void 0:S.position;if(!M)return null;var z=Roe[M],j,W,U,A,K,V;switch(s){case"source":j=N,W=T,U=M,A=g,K=w,V=z;break;case"target":j=g,W=w,U=z,A=N,K=T,V=M;break}if(p)return C.createElement("g",{className:"react-flow__connection"},C.createElement(p,{connectionLineType:d,connectionLineStyle:c,fromNode:y,fromHandle:S,fromX:N,fromY:T,toX:g,toY:w,fromPosition:M,toPosition:z,sourcePosition:U,targetPosition:V,sourceNode:y,sourceHandle:S,targetX:A,targetY:K,sourceX:j,sourceY:W}));var te="",G={sourceX:j,sourceY:W,sourcePosition:U,targetX:A,targetY:K,targetPosition:V};return d===Yi.Bezier?te=Xd(G):d===Yi.Step?te=Uw(w5(w5({},G),{},{borderRadius:0})):d===Yi.SmoothStep?te=Uw(G):d===Yi.SimpleBezier?te=Dq(G):te="M".concat(j,",").concat(W," ").concat(A,",").concat(K),C.createElement("g",{className:"react-flow__connection"},C.createElement("path",{d:te,className:"react-flow__connection-path",style:c}))});function Xw(e){"@babel/helpers - typeof";return Xw=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},Xw(e)}var nu,Toe=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return C.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:"none",points:"-5,-4 0,0 -5,4"})},Poe=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return C.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:n,points:"-5,-4 0,0 -5,4 -5,-4"})},S5=(nu={},it(nu,nd.Arrow,Toe),it(nu,nd.ArrowClosed,Poe),nu);function Moe(e){var t=C.useMemo(function(){var r=S5.hasOwnProperty(e);return r?S5[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 E5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function koe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?E5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Aoe=function(t){var r=t.id,n=t.type,i=t.color,o=t.width,a=o===void 0?12.5:o,s=t.height,c=s===void 0?12.5:s,u=t.markerUnits,d=u===void 0?"strokeWidth":u,h=t.strokeWidth,p=t.orient,v=p===void 0?"auto":p,y=Moe(n);return C.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"},C.createElement(y,{color:i,strokeWidth:h}))},Doe=function(t){var r=t.defaultColor,n=t.rfId;return function(i){var o=[];return i.edges.reduce(function(a,s){return[s.markerStart,s.markerEnd].forEach(function(c){if(c&&Xw(c)==="object"){var u=Hw(c,n);o.includes(u)||(a.push(koe({id:u,color:c.color||r},c)),o.push(u))}}),a},[]).sort(function(a,s){return a.id.localeCompare(s.id)})}},Zq=function(t){var r=t.defaultColor,n=t.rfId,i=Vt(C.useCallback(Doe({defaultColor:r,rfId:n}),[r,n]),function(o,a){return!(o.length!==a.length||o.some(function(s,c){return s.id!==a[c].id}))});return C.createElement("defs",null,i.map(function(o){return C.createElement(Aoe,{id:o.id,key:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient})}))};Zq.displayName="MarkerDefinitions";var joe=C.memo(Zq),qoe=[{level:0,isMaxLevel:!0,edges:[]}];function zoe(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=-1,i=e.reduce(function(a,s){var c=Sq(s.zIndex),u=c?s.zIndex:0;if(r){var d,h,p,v;u=c?s.zIndex:Math.max(((d=t.get(s.source))===null||d===void 0||(h=d[ur])===null||h===void 0?void 0:h.z)||0,((p=t.get(s.target))===null||p===void 0||(v=p[ur])===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},{}),o=Object.entries(i).map(function(a){var s=Xe(a,2),c=s[0],u=s[1],d=+c;return{edges:u,level:d,isMaxLevel:d===n}});return o.length===0?qoe:o}function Loe(e,t,r){var n=Vt(C.useCallback(function(i){return e?i.edges.filter(function(o){var a=t.get(o.source),s=t.get(o.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)&&aoe({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:i.width,height:i.height,transform:i.transform})}):i.edges},[e,t]));return zoe(n,t,r)}var Boe=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}},Jq=function(t){var r=Vt(Boe,Wr),n=r.connectionNodeId,i=r.connectionHandleType,o=r.nodesConnectable,a=r.elementsSelectable,s=r.width,c=r.height,u=r.connectionMode,d=r.nodeInternals,h=Loe(t.onlyRenderVisibleElements,d,t.elevateEdgesOnSelect);if(!s)return null;var p=t.connectionLineType,v=t.defaultMarkerColor,y=t.connectionLineStyle,m=t.connectionLineComponent,g=t.connectionLineContainerStyle,w=n&&i;return C.createElement(C.Fragment,null,h.map(function(x){var _=x.level,S=x.edges,E=x.isMaxLevel;return C.createElement("svg",{key:_,style:{zIndex:_},width:s,height:c,className:"react-flow__edges react-flow__container"},E&&C.createElement(joe,{defaultColor:v,rfId:t.rfId}),C.createElement("g",null,S.map(function(I){var N=l5(d,I.source),T=Xe(N,3),M=T[0],z=T[1],j=T[2],W=l5(d,I.target),U=Xe(W,3),A=U[0],K=U[1],V=U[2];if(!j||!V)return null;var te=I.type||"default";t.edgeTypes[te]||(console.warn('[React Flow]: Edge type "'.concat(te,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),te="default");var G=t.edgeTypes[te]||t.edgeTypes.default,re=u===Da.Strict?K.target:K.target||K.source,P=s5(z.source,I.sourceHandle||null),B=s5(re,I.targetHandle||null),X=(P==null?void 0:P.position)||Oe.Bottom,Q=(B==null?void 0:B.position)||Oe.Top;if(!P)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Couldn't create edge for source handle id: ".concat(I.sourceHandle,"; edge id: ").concat(I.id,". Help: https://reactflow.dev/error#800")),null;if(!B)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Couldn't create edge for target handle id: ".concat(I.targetHandle,"; edge id: ").concat(I.id,". Help: https://reactflow.dev/error#800")),null;var D=ooe(M,P,X,A,B,Q),$=D.sourceX,H=D.sourceY,q=D.targetX,Y=D.targetY;return C.createElement(G,{key:I.id,id:I.id,className:cn([I.className,t.noPanClassName]),type:te,data:I.data,selected:!!I.selected,animated:!!I.animated,hidden:!!I.hidden,label:I.label,labelStyle:I.labelStyle,labelShowBg:I.labelShowBg,labelBgStyle:I.labelBgStyle,labelBgPadding:I.labelBgPadding,labelBgBorderRadius:I.labelBgBorderRadius,style:I.style,source:I.source,target:I.target,sourceHandleId:I.sourceHandle,targetHandleId:I.targetHandle,markerEnd:I.markerEnd,markerStart:I.markerStart,sourceX:$,sourceY:H,targetX:q,targetY:Y,sourcePosition:X,targetPosition:Q,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})})))}),w&&C.createElement("svg",{style:g,width:s,height:c,className:"react-flow__edges react-flow__connectionline react-flow__container"},C.createElement(Noe,{connectionNodeId:n,connectionHandleType:i,connectionLineStyle:y,connectionLineType:p,isConnectable:o,CustomConnectionLineComponent:m})))};Jq.displayName="EdgeRenderer";var Foe=C.memo(Jq),$oe=function(t){return"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")")};function Voe(e){var t=e.children,r=Vt($oe);return C.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:r}},t)}function Hoe(e){var t=kq(),r=C.useRef(!1);C.useEffect(function(){!r.current&&t.viewportInitialized&&e&&(setTimeout(function(){return e(t)},1),r.current=!0)},[e,t.viewportInitialized])}var Qq=function(t){var r=t.nodeTypes,n=t.edgeTypes,i=t.onMove,o=t.onMoveStart,a=t.onMoveEnd,s=t.onInit,c=t.onNodeClick,u=t.onEdgeClick,d=t.onNodeDoubleClick,h=t.onEdgeDoubleClick,p=t.onNodeMouseEnter,v=t.onNodeMouseMove,y=t.onNodeMouseLeave,m=t.onNodeContextMenu,g=t.onSelectionContextMenu,w=t.connectionLineType,x=t.connectionLineStyle,_=t.connectionLineComponent,S=t.connectionLineContainerStyle,E=t.selectionKeyCode,I=t.multiSelectionKeyCode,N=t.zoomActivationKeyCode,T=t.deleteKeyCode,M=t.onlyRenderVisibleElements,z=t.elementsSelectable,j=t.selectNodesOnDrag,W=t.translateExtent,U=t.minZoom,A=t.maxZoom,K=t.defaultZoom,V=t.defaultPosition,te=t.preventScrolling,G=t.defaultMarkerColor,re=t.zoomOnScroll,P=t.zoomOnPinch,B=t.panOnScroll,X=t.panOnScrollSpeed,Q=t.panOnScrollMode,D=t.zoomOnDoubleClick,$=t.panOnDrag,H=t.onPaneClick,q=t.onPaneScroll,Y=t.onPaneContextMenu,ie=t.onEdgeUpdate,ne=t.onEdgeContextMenu,ve=t.onEdgeMouseEnter,Z=t.onEdgeMouseMove,J=t.onEdgeMouseLeave,ae=t.edgeUpdaterRadius,he=t.onEdgeUpdateStart,ue=t.onEdgeUpdateEnd,de=t.noDragClassName,le=t.noWheelClassName,xe=t.noPanClassName,Ee=t.elevateEdgesOnSelect,Ie=t.id;return Hoe(s),C.createElement(_oe,{onPaneClick:H,onPaneContextMenu:Y,onPaneScroll:q,deleteKeyCode:T,selectionKeyCode:E,multiSelectionKeyCode:I,zoomActivationKeyCode:N,elementsSelectable:z,onMove:i,onMoveStart:o,onMoveEnd:a,zoomOnScroll:re,zoomOnPinch:P,zoomOnDoubleClick:D,panOnScroll:B,panOnScrollSpeed:X,panOnScrollMode:Q,panOnDrag:$,translateExtent:W,minZoom:U,maxZoom:A,defaultZoom:K,defaultPosition:V,onSelectionContextMenu:g,preventScrolling:te,noDragClassName:de,noWheelClassName:le,noPanClassName:xe},C.createElement(Voe,null,C.createElement(Foe,{edgeTypes:n,onEdgeClick:u,onEdgeDoubleClick:h,connectionLineType:w,connectionLineStyle:x,connectionLineComponent:_,connectionLineContainerStyle:S,onEdgeUpdate:ie,onlyRenderVisibleElements:M,onEdgeContextMenu:ne,onEdgeMouseEnter:ve,onEdgeMouseMove:Z,onEdgeMouseLeave:J,onEdgeUpdateStart:he,onEdgeUpdateEnd:ue,edgeUpdaterRadius:ae,defaultMarkerColor:G,noPanClassName:xe,elevateEdgesOnSelect:!!Ee,rfId:Ie}),C.createElement(Ioe,{nodeTypes:r,onNodeClick:c,onNodeDoubleClick:d,onNodeMouseEnter:p,onNodeMouseMove:v,onNodeMouseLeave:y,onNodeContextMenu:m,selectNodesOnDrag:j,onlyRenderVisibleElements:M,noPanClassName:xe,noDragClassName:de})))};Qq.displayName="GraphView";var Woe=C.memo(Qq),ez=function(){return null};ez.displayName="GroupNode";function _5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function O5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Rs=(function(e){var t=function(n){var i=n.id,o=n.type,a=n.data,s=n.xPos,c=n.yPos,u=n.selected,d=n.onClick,h=n.onMouseEnter,p=n.onMouseMove,v=n.onMouseLeave,y=n.onContextMenu,m=n.onDoubleClick,g=n.style,w=n.className,x=n.isDraggable,_=n.isSelectable,S=n.isConnectable,E=n.selectNodesOnDrag,I=n.sourcePosition,N=n.targetPosition,T=n.hidden,M=n.resizeObserver,z=n.dragHandle,j=n.zIndex,W=n.isParent,U=n.noPanClassName,A=n.noDragClassName,K=n.initialized,V=Nr(),te=C.useRef(null),G=C.useRef(I),re=C.useRef(N),P=C.useRef(o),B=_||x||d||h||p||v,X=Cs(i,V.getState,h),Q=Cs(i,V.getState,p),D=Cs(i,V.getState,v),$=Cs(i,V.getState,y),H=Cs(i,V.getState,m),q=function(ne){if(_&&(!E||!x)&&Cq({id:i,store:V}),d){var ve=V.getState().nodeInternals.get(i);d(ne,O5({},ve))}};C.useEffect(function(){if(te.current&&!T){var ie=te.current;return M==null||M.observe(ie),function(){return M==null?void 0:M.unobserve(ie)}}},[T]),C.useEffect(function(){var ie=P.current!==o,ne=G.current!==I,ve=re.current!==N;te.current&&(ie||ne||ve)&&(ie&&(P.current=o),ne&&(G.current=I),ve&&(re.current=N),V.getState().updateNodeDimensions([{id:i,nodeElement:te.current,forceUpdate:!0}]))},[i,o,I,N]);var Y=Kq({nodeRef:te,disabled:T||!x,noDragClassName:A,handleSelector:z,nodeId:i,isSelectable:_,selectNodesOnDrag:E});return T?null:C.createElement("div",{className:cn(["react-flow__node","react-flow__node-".concat(o),U,w,{selected:u,selectable:_,parent:W}]),ref:te,style:O5({zIndex:j,transform:"translate(".concat(s,"px,").concat(c,"px)"),pointerEvents:B?"all":"none",visibility:K?"visible":"hidden"},g),onMouseEnter:X,onMouseMove:Q,onMouseLeave:D,onContextMenu:$,onClick:q,onDoubleClick:H,"data-testid":"rf__node-".concat(i),"data-id":i},C.createElement($ie,{value:i},C.createElement(e,{id:i,data:a,type:o,xPos:s,yPos:c,selected:u,isConnectable:S,sourcePosition:I,targetPosition:N,dragging:Y,dragHandle:z,zIndex:j})))};return t.displayName="NodeWrapper",C.memo(t)});function C5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function I5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?C5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Uoe(e){var t={input:Rs(e.input||Hq),default:Rs(e.default||Yw),output:Rs(e.output||Uq),group:Rs(e.group||ez)},r={},n=Object.keys(e).filter(function(i){return!["input","default","output","group"].includes(i)}).reduce(function(i,o){return i[o]=Rs(e[o]||Yw),i},r);return I5(I5({},t),n)}function R5(e,t){var r=C.useRef(null),n=C.useMemo(function(){if(process.env.NODE_ENV==="development"){var i=Object.keys(e);Wr(r.current,i)&&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=i}return t(e)},[e]);return n}function N5(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 tz=function(t){var r=t.children,n=!0;try{Nr()}catch{n=!1}return n?C.createElement(C.Fragment,null,r):C.createElement(uie,{createStore:die},r)};tz.displayName="ReactFlowWrapper";var Goe=["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 T5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function P5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}N5(Qie),N5(toe);var Koe={input:Hq,default:Yw,output:Uq},Yoe={default:Gw,straight:Lq,step:zq,smoothstep:HS,simplebezier:jq},Xoe=[15,15],Zoe=[0,0],rz=C.forwardRef(function(e,t){var r=e.nodes,n=e.edges,i=e.defaultNodes,o=e.defaultEdges,a=e.className,s=e.nodeTypes,c=s===void 0?Koe:s,u=e.edgeTypes,d=u===void 0?Yoe:u,h=e.onNodeClick,p=e.onEdgeClick,v=e.onInit,y=e.onMove,m=e.onMoveStart,g=e.onMoveEnd,w=e.onConnect,x=e.onConnectStart,_=e.onConnectStop,S=e.onConnectEnd,E=e.onClickConnectStart,I=e.onClickConnectStop,N=e.onClickConnectEnd,T=e.onNodeMouseEnter,M=e.onNodeMouseMove,z=e.onNodeMouseLeave,j=e.onNodeContextMenu,W=e.onNodeDoubleClick,U=e.onNodeDragStart,A=e.onNodeDrag,K=e.onNodeDragStop,V=e.onNodesDelete,te=e.onEdgesDelete,G=e.onSelectionChange,re=e.onSelectionDragStart,P=e.onSelectionDrag,B=e.onSelectionDragStop,X=e.onSelectionContextMenu,Q=e.connectionMode,D=Q===void 0?Da.Strict:Q,$=e.connectionLineType,H=$===void 0?Yi.Bezier:$,q=e.connectionLineStyle,Y=e.connectionLineComponent,ie=e.connectionLineContainerStyle,ne=e.deleteKeyCode,ve=ne===void 0?"Backspace":ne,Z=e.selectionKeyCode,J=Z===void 0?"Shift":Z,ae=e.multiSelectionKeyCode,he=ae===void 0?"Meta":ae,ue=e.zoomActivationKeyCode,de=ue===void 0?"Meta":ue,le=e.snapToGrid,xe=le===void 0?!1:le,Ee=e.snapGrid,Ie=Ee===void 0?Xoe:Ee,Te=e.onlyRenderVisibleElements,Me=Te===void 0?!1:Te,Ze=e.selectNodesOnDrag,tt=Ze===void 0?!0:Ze,Fe=e.nodesDraggable,Le=e.nodesConnectable,ze=e.elementsSelectable,Je=e.minZoom,rt=Je===void 0?.5:Je,Pt=e.maxZoom,gt=Pt===void 0?2:Pt,Rt=e.defaultZoom,qt=Rt===void 0?1:Rt,Ot=e.defaultPosition,Gr=Ot===void 0?Zoe:Ot,Kr=e.translateExtent,ar=Kr===void 0?Ww:Kr,Nn=e.preventScrolling,io=Nn===void 0?!0:Nn,zt=e.nodeExtent,Mt=e.defaultMarkerColor,Lt=Mt===void 0?"#b1b1b7":Mt,fr=e.zoomOnScroll,kt=fr===void 0?!0:fr,At=e.zoomOnPinch,hr=At===void 0?!0:At,Mr=e.panOnScroll,Et=Mr===void 0?!1:Mr,Bt=e.panOnScrollSpeed,pr=Bt===void 0?.5:Bt,vr=e.panOnScrollMode,yr=vr===void 0?_a.Free:vr,sr=e.zoomOnDoubleClick,Tn=sr===void 0?!0:sr,Un=e.panOnDrag,Za=Un===void 0?!0:Un,Gn=e.onPaneClick,Ja=e.onPaneScroll,Kn=e.onPaneContextMenu,Ri=e.children,Bo=e.onEdgeUpdate,Fo=e.onEdgeContextMenu,ke=e.onEdgeDoubleClick,$e=e.onEdgeMouseEnter,xr=e.onEdgeMouseMove,Ht=e.onEdgeMouseLeave,wr=e.onEdgeUpdateStart,Sr=e.onEdgeUpdateEnd,tr=e.edgeUpdaterRadius,un=tr===void 0?10:tr,Yr=e.onNodesChange,ci=e.onEdgesChange,Ni=e.noDragClassName,Qa=Ni===void 0?"nodrag":Ni,es=e.noWheelClassName,$l=es===void 0?"nowheel":es,ts=e.noPanClassName,pf=ts===void 0?"nopan":ts,Vl=e.fitView,vf=Vl===void 0?!1:Vl,gf=e.fitViewOptions,rs=e.connectOnClick,Hl=rs===void 0?!0:rs,Wl=e.attributionPosition,ns=e.proOptions,mf=e.defaultEdgeOptions,is=e.elevateEdgesOnSelect,$o=is===void 0?!1:is,oo=Kd(e,Goe),bf=R5(c,Uoe),Ul=R5(d,ioe);return C.createElement("div",P5(P5({},oo),{},{ref:t,className:cn(["react-flow",a])}),C.createElement(tz,null,C.createElement(Woe,{onInit:v,onMove:y,onMoveStart:m,onMoveEnd:g,onNodeClick:h,onEdgeClick:p,onNodeMouseEnter:T,onNodeMouseMove:M,onNodeMouseLeave:z,onNodeContextMenu:j,onNodeDoubleClick:W,nodeTypes:bf,edgeTypes:Ul,connectionLineType:H,connectionLineStyle:q,connectionLineComponent:Y,connectionLineContainerStyle:ie,selectionKeyCode:J,deleteKeyCode:ve,multiSelectionKeyCode:he,zoomActivationKeyCode:de,onlyRenderVisibleElements:Me,selectNodesOnDrag:tt,translateExtent:ar,minZoom:rt,maxZoom:gt,defaultZoom:qt,defaultPosition:Gr,preventScrolling:io,zoomOnScroll:kt,zoomOnPinch:hr,zoomOnDoubleClick:Tn,panOnScroll:Et,panOnScrollSpeed:pr,panOnScrollMode:yr,panOnDrag:Za,onPaneClick:Gn,onPaneScroll:Ja,onPaneContextMenu:Kn,onSelectionContextMenu:X,onEdgeUpdate:Bo,onEdgeContextMenu:Fo,onEdgeDoubleClick:ke,onEdgeMouseEnter:$e,onEdgeMouseMove:xr,onEdgeMouseLeave:Ht,onEdgeUpdateStart:wr,onEdgeUpdateEnd:Sr,edgeUpdaterRadius:un,defaultMarkerColor:Lt,noDragClassName:Qa,noWheelClassName:$l,noPanClassName:pf,elevateEdgesOnSelect:$o,id:oo==null?void 0:oo.id}),C.createElement(Zie,{nodes:r,edges:n,defaultNodes:i,defaultEdges:o,onConnect:w,onConnectStart:x,onConnectStop:_,onConnectEnd:S,onClickConnectStart:E,onClickConnectStop:I,onClickConnectEnd:N,nodesDraggable:Fe,nodesConnectable:Le,elementsSelectable:ze,minZoom:rt,maxZoom:gt,nodeExtent:zt,onNodesChange:Yr,onEdgesChange:ci,snapToGrid:xe,snapGrid:Ie,connectionMode:D,translateExtent:ar,connectOnClick:Hl,defaultEdgeOptions:mf,fitView:vf,fitViewOptions:gf,onNodesDelete:V,onEdgesDelete:te,onNodeDragStart:U,onNodeDrag:A,onNodeDragStop:K,onSelectionDrag:P,onSelectionDragStart:re,onSelectionDragStop:B}),G&&C.createElement(Yie,{onSelectionChange:G}),Ri,C.createElement(Aie,{proOptions:ns,position:Wl})))});rz.displayName="ReactFlow";function nz(e){return function(t){var r=C.useState(t),n=Xe(r,2),i=n[0],o=n[1],a=C.useCallback(function(s){return o(function(c){return e(s,c)})},[]);return[i,o,a]}}var Joe=nz(_q),Qoe=nz(nie);function M5(e,t){const{width:r,height:n,positionAbsolute:i}=e,o=t.positionAbsolute,a=r/2,s=n/2,c=i.x+a,u=i.y+s,d=o.x+a,h=o.y+s,p=(d-c)/(2*a)-(h-u)/(2*s),v=(d-c)/(2*a)+(h-u)/(2*s),y=1/(Math.abs(p)+Math.abs(v)),m=y*p,g=y*v,w=a*(m+g)+c,x=s*(-m+g)+u;return{x:w,y:x}}function k5(e,t){const r={...e.positionAbsolute,...e},n=Math.round(r.x),i=Math.round(r.y),o=Math.round(t.x),a=Math.round(t.y);return o<=n+1?Oe.Left:o>=n+r.width-1?Oe.Right:a<=i+1?Oe.Top:a>=r.y+r.height-1?Oe.Bottom:Oe.Top}function iz(e,t){const r=M5(e,t),n=M5(t,e),i=k5(e,r),o=k5(t,n);return{sx:r.x,sy:r.y,tx:n.x,ty:n.y,sourcePos:i,targetPos:o}}const eae=({targetX:e,targetY:t,sourcePosition:r,targetPosition:n,sourceNode:i})=>{if(!i)return null;const o={id:"connection-target",width:1,height:1,position:{x:e,y:t}},{sx:a,sy:s}=iz(i,o),c=Xd({sourceX:a,sourceY:s,sourcePosition:r,targetPosition:n,targetX:e,targetY:t});return O.jsxs("g",{children:[O.jsx("path",{fill:"none",stroke:"#222",strokeWidth:1.5,className:"animated",d:c}),O.jsx("circle",{cx:e,cy:t,fill:"#fff",r:3,stroke:"#222",strokeWidth:1.5})]})},tae=({id:e,source:t,target:r,markerEnd:n,style:i})=>{const o=Vt(C.useCallback(y=>y.nodeInternals.get(t),[t])),a=Vt(C.useCallback(y=>y.nodeInternals.get(r),[r]));if(!o||!a)return null;const{sx:s,sy:c,tx:u,ty:d,sourcePos:h,targetPos:p}=iz(o,a),v=Xd({sourceX:s,sourceY:c,sourcePosition:h,targetPosition:p,targetX:u,targetY:d});return O.jsx("path",{id:e,className:"react-flow__edge-path",d:v,markerEnd:n,style:i})},A5=172,D5=36,rae={custom:tae},nae=(e,t,r="LR")=>{const n=new yP.graphlib.Graph;n.setDefaultEdgeLabel(()=>({}));const i=r==="LR";return n.setGraph({rankdir:r}),e.forEach(o=>{n.setNode(o.id,{width:A5,height:D5})}),t.forEach(o=>{n.setEdge(o.source,o.target)}),yP.layout(n),e.forEach(o=>{const a=n.node(o.id);return o.targetPosition=i?Oe.Left:Oe.Top,o.sourcePosition=i?Oe.Right:Oe.Bottom,o.position={x:a.x-A5/2,y:a.y-D5/2},o}),{nodes:e,edges:t}},iae=()=>{},oae=({data:e,dict:t,onSelect:r=iae})=>{const{nodes:n,edges:i}=nae(Object.values(t).filter(h=>h.id===e.selected||e.parents.flat().includes(h.id)||e.children.flat().includes(h.id)).map(h=>({id:h.id,type:h.parents.length===0?"input":h.includes.length===0?"output":"default",sourcePosition:Oe.Right,targetPosition:Oe.Left,data:{label:h.privilege},position:{x:0,y:0},className:h.id===e.selected?"highlighted":"",selected:h.id===e.selected})),e.links.map(({source:h,target:p})=>({id:`e${h}-${p}`,source:h,target:p}))),[o,a,s]=Joe(n),[c,u,d]=Qoe(i);return C.useEffect(()=>{a([...n]),u([...i])},[e]),O.jsx(rz,{nodes:o,edges:c,fitView:!0,onNodesChange:s,onEdgesChange:d,onNodeClick:(h,p)=>{r(p.id)},defaultZoom:.5,edgeTypes:rae,connectionLineComponent:eae,children:O.jsx(Mie,{variant:Mo.Dots,color:"#81818140",gap:18,size:1})})};var oz=(e=>(e.method="methods",e.entityCollection="entityselMethod",e.dataClass="dataclassMethod",e.dataStore="dsMethod",e.entity="entityMethod",e.attribute="attributes",e.singletonMethod="singletonMethod",e))(oz||{});const az=e=>{switch(e){case"entityCollection":return pe.ESubPermissionType.ENTITY_SEL_METHOD;case"dataClass":return pe.ESubPermissionType.DATACLASS_METHOD;case"dataStore":return pe.ESubPermissionType.DS_METHOD;case"entity":return pe.ESubPermissionType.ENTITY_METHOD;default:return pe.EPermissionType.METHOD}},j5=(e=[],t,r)=>{var i;const n=[];for(const o of e)(i=o[oz[r]])==null||i.forEach(a=>{if(`${o.name.toLowerCase()}.${a.name.toLowerCase()}`.includes(t)||!t){const c={applyTo:`${o.name}.${a.name}`,type:r};r===pe.EPermissionType.METHOD&&(c.subType=az(a.applyTo)),n.push(c)}});return n},aae=(e=[],t)=>{var n;const r=[];for(const i of e)(n=i.methods)==null||n.forEach(o=>{(`${i.name.toLowerCase()}.${o.name.toLowerCase()}`.includes(t)||!t)&&r.push({applyTo:`${i.name}.${o.name}`,type:pe.EPermissionType.SINGLETON_METHOD})});return r};function US(e,t=[],r=[],n=[]){const i=j5(r,e,pe.EPermissionType.ATTRIBUTE),o=j5(r,e,pe.EPermissionType.METHOD),a=aae(n,e),s=t.filter(h=>!e||`ds.${h.name.toLowerCase()}`.includes(e)).map(h=>({applyTo:`ds.${h.name}`,type:pe.ESubPermissionType.DS_METHOD})),c=[],u=[];return r.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{c.push({applyTo:h.name,type:pe.EPermissionType.DATACLASS})}),n.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{u.push({applyTo:h.name,type:pe.EPermissionType.SINGLETON})}),[...[{applyTo:"ds",type:pe.EPermissionType.DATASTORE}].filter(h=>!e||`ds.${h.applyTo.toLowerCase()}`.includes(e)),...s,...c,...i,...o,...u,...a].reduce((h,p)=>{const v=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],[y,m]=p.applyTo.split("."),g=h.find(w=>w.prefix===y);return g?(g.resources=[...g.resources,p].sort((w,x)=>{const _=v.indexOf(w.type),S=v.indexOf(x.type);return _>S?1:-1}),g.type=m?g.type:p.type,[...h].sort((w,x)=>{const _=v.indexOf(w.type),S=v.indexOf(x.type);return _>S?1:-1})):[...h,{prefix:y,type:m?null:p.type,resources:[p]}]},[]).reduce((h,p)=>[...h,...p.resources],[])}const sae=(e=[],t=[],r=[])=>{const n=US("",e,t,r),i={ds:{applyTo:"ds",type:pe.EPermissionType.DATASTORE,methods:[],dataClasses:[],singletons:[]}},o=(s,c)=>s.applyTo.localeCompare(c.applyTo);n.forEach(s=>{const[c,u]=s.applyTo.split(".");if(u||(s.type===pe.EPermissionType.DATACLASS?i.ds.dataClasses.push({applyTo:c,type:pe.EPermissionType.DATACLASS,methods:[],attributes:[]}):s.type===pe.EPermissionType.SINGLETON&&i.ds.singletons.push({applyTo:c,type:pe.EPermissionType.SINGLETON,methods:[],attributes:[]})),u){const d=(h,p,v)=>{h.forEach(y=>{y.applyTo===c&&y[p].push(v)})};[pe.ESubPermissionType.DS_METHOD,pe.ESubPermissionType.DATACLASS_METHOD,pe.ESubPermissionType.ENTITY_METHOD,pe.ESubPermissionType.ENTITY_SEL_METHOD].includes(s.type)?c==="ds"?i.ds.methods.push(s):d(i.ds.dataClasses,"methods",s):s.type===pe.EPermissionType.ATTRIBUTE?(d(i.ds.dataClasses,"attributes",s),d(i.ds.singletons,"attributes",s)):s.type===pe.EPermissionType.SINGLETON_METHOD&&d(i.ds.singletons,"methods",s)}});const a=s=>{s.forEach(c=>{c.methods&&c.methods.sort(o),c.attributes&&c.attributes.sort(o)})};return i.ds.methods.sort(o),i.ds.dataClasses.sort(o),i.ds.singletons.sort(o),a(i.ds.dataClasses),a(i.ds.singletons),i},sz=(e,t=[])=>{const r={};return Object.entries(e).forEach(([n,i])=>{r[n]={...i,resources:i.resources.map(o=>{var a,s,c;if(o.type===pe.EPermissionType.METHOD&&t.length){const[u,d]=o.resource.split("."),h=u==="ds"?"dataStore":((c=(s=(a=t.find(p=>p.name===u))==null?void 0:a.methods)==null?void 0:s.find(p=>p.name===d))==null?void 0:c.applyTo)||"dataClass";return{...o,type:o.type,subType:az(h)}}return o})}}),r},lz=(e,t)=>Object.entries(e).map(([r,n])=>{const i=n.resources.map(o=>{var u,d,h,p,v,y,m,g;const[a,s]=o.resource.split(".");let c=!0;switch(o.type){case pe.EPermissionType.DATASTORE:c=!!t;break;case pe.EPermissionType.METHOD:a==="ds"?c=!!t.methods.find(w=>w.name===s&&w.applyTo==="dataStore"):c=!!((d=(u=t.dataClasses[a])==null?void 0:u.methods)!=null&&d.find(w=>w.name===s));break;case pe.ESubPermissionType.DS_METHOD:c=!!t.methods.find(w=>w.name===s&&w.applyTo==="dataStore");break;case pe.EPermissionType.DATACLASS:c=!!t.dataClasses[a];break;case pe.EPermissionType.ATTRIBUTE:c=!!((p=(h=t.dataClasses[a])==null?void 0:h.attributes)!=null&&p.find(w=>w.name===s));break;case pe.ESubPermissionType.ENTITY_SEL_METHOD:c=!!((v=t.dataClasses[a])!=null&&v.methods.find(w=>w.name===s&&w.applyTo==="entityCollection"));break;case pe.ESubPermissionType.DATACLASS_METHOD:c=!!((y=t.dataClasses[a])!=null&&y.methods.find(w=>w.name===s&&w.applyTo==="dataClass"));break;case pe.ESubPermissionType.ENTITY_METHOD:c=!!((m=t.dataClasses[a])!=null&&m.methods.find(w=>w.name===s&&w.applyTo==="entity"));break;case pe.EPermissionType.SINGLETON_METHOD:c=!!((g=t.singletons[a])!=null&&g.methods.find(w=>w.name===s));break;case pe.EPermissionType.SINGLETON:c=!!t.singletons[a];break;default:c=!0}return{...o,exists:c}});return{[r]:{...n,resources:i}}}).reduce((r,n)=>({...r,...n}),{});var P0={exports:{}};/*!
|
|
57
|
+
*/var RC;function NK(){return RC||(RC=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"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),y=!1,m=!1,g=!1,w=!1,x=!1,_;_=Symbol.for("react.module.reference");function S(ae){return!!(typeof ae=="string"||typeof ae=="function"||ae===r||ae===i||x||ae===n||ae===d||ae===u||w||ae===v||y||m||g||typeof ae=="object"&&ae!==null&&(ae.$$typeof===p||ae.$$typeof===h||ae.$$typeof===o||ae.$$typeof===a||ae.$$typeof===c||ae.$$typeof===_||ae.getModuleId!==void 0))}function E(ae){if(typeof ae=="object"&&ae!==null){var he=ae.$$typeof;switch(he){case e:var ue=ae.type;switch(ue){case r:case i:case n:case d:case u:return ue;default:var de=ue&&ue.$$typeof;switch(de){case s:case a:case c:case p:case h:case o:return de;default:return he}}case t:return he}}}var I=a,N=o,T=e,M=c,z=r,j=p,W=h,U=t,A=i,K=n,V=d,te=u,G=!1,re=!1;function P(ae){return G||(G=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function B(ae){return re||(re=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function X(ae){return E(ae)===a}function Q(ae){return E(ae)===o}function D(ae){return typeof ae=="object"&&ae!==null&&ae.$$typeof===e}function $(ae){return E(ae)===c}function H(ae){return E(ae)===r}function q(ae){return E(ae)===p}function Y(ae){return E(ae)===h}function ie(ae){return E(ae)===t}function ne(ae){return E(ae)===i}function ve(ae){return E(ae)===n}function Z(ae){return E(ae)===d}function J(ae){return E(ae)===u}vt.ContextConsumer=I,vt.ContextProvider=N,vt.Element=T,vt.ForwardRef=M,vt.Fragment=z,vt.Lazy=j,vt.Memo=W,vt.Portal=U,vt.Profiler=A,vt.StrictMode=K,vt.Suspense=V,vt.SuspenseList=te,vt.isAsyncMode=P,vt.isConcurrentMode=B,vt.isContextConsumer=X,vt.isContextProvider=Q,vt.isElement=D,vt.isForwardRef=$,vt.isFragment=H,vt.isLazy=q,vt.isMemo=Y,vt.isPortal=ie,vt.isProfiler=ne,vt.isStrictMode=ve,vt.isSuspense=Z,vt.isSuspenseList=J,vt.isValidElementType=S,vt.typeOf=E})()),vt}var NC;function TK(){return NC||(NC=1,process.env.NODE_ENV==="production"?Uh.exports=RK():Uh.exports=NK()),Uh.exports}var TC=TK();const PC=e=>typeof e=="object"&&e!=null&&e.nodeType===1,MC=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",Vc=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return MC(r.overflowY,t)||MC(r.overflowX,t)||(n=>{const i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!i&&(i.clientHeight<n.scrollHeight||i.clientWidth<n.scrollWidth)})(e)}return!1},Hc=(e,t,r,n,i,o,a,s)=>o<e&&a>t||o>e&&a<t?0:o<=e&&s<=r||a>=t&&s>=r?o-e-n:a>t&&s<r||o<e&&s>r?a-t+i:0,PK=e=>e.parentElement??(e.getRootNode().host||null),MK=(e,t)=>{var r,n,i,o;if(typeof document>"u")return[];const{inline:a,boundary:s,skipOverflowHiddenElements:c}=t,d=typeof s=="function"?s:U=>U!==s;if(!PC(e))throw new TypeError("Invalid target");const u=document.scrollingElement||document.documentElement,h=[];let p=e;for(;PC(p)&&d(p);){if(p=PK(p),p===u){h.push(p);break}p!=null&&p===document.body&&Vc(p)&&!Vc(document.documentElement)||p!=null&&Vc(p,c)&&h.push(p)}const v=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,y=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,{scrollX:m,scrollY:g}=window,{height:w,width:x,top:_,right:S,bottom:E,left:I}=e.getBoundingClientRect(),{top:N,right:T,left:M}=(U=>{const A=window.getComputedStyle(U);return{top:parseFloat(A.scrollMarginTop)||0,right:parseFloat(A.scrollMarginRight)||0,bottom:parseFloat(A.scrollMarginBottom)||0,left:parseFloat(A.scrollMarginLeft)||0}})(e);let z=_-N,j=a==="center"?I+x/2-M+T:a==="end"?S+T:I-M;const W=[];for(let U=0;U<h.length;U++){const A=h[U],{height:K,width:V,top:te,right:G,bottom:re,left:P}=A.getBoundingClientRect();if(_>=0&&I>=0&&E<=y&&S<=v&&(A===u&&!Vc(A)||_>=te&&E<=re&&I>=P&&S<=G))return W;const B=getComputedStyle(A),X=parseInt(B.borderLeftWidth,10),Q=parseInt(B.borderTopWidth,10),D=parseInt(B.borderRightWidth,10),$=parseInt(B.borderBottomWidth,10);let H=0,q=0;const Y="offsetWidth"in A?A.offsetWidth-A.clientWidth-X-D:0,ie="offsetHeight"in A?A.offsetHeight-A.clientHeight-Q-$:0,ne="offsetWidth"in A?A.offsetWidth===0?0:V/A.offsetWidth:0,ve="offsetHeight"in A?A.offsetHeight===0?0:K/A.offsetHeight:0;if(u===A)H=Hc(g,g+y,y,Q,$,g+z,g+z+w,w),q=a==="start"?j:a==="center"?j-v/2:a==="end"?j-v:Hc(m,m+v,v,X,D,m+j,m+j+x,x),H=Math.max(0,H+g),q=Math.max(0,q+m);else{H=Hc(te,re,K,Q,$+ie,z,z+w,w),q=a==="start"?j-P-X:a==="center"?j-(P+V/2)+Y/2:a==="end"?j-G+D+Y:Hc(P,G,V,X,D+Y,j,j+x,x);const{scrollLeft:Z,scrollTop:J}=A;H=ve===0?0:Math.max(0,Math.min(J+H/ve,A.scrollHeight-K/ve+ie)),q=ne===0?0:Math.max(0,Math.min(Z+q/ne,A.scrollWidth-V/ne+Y)),z+=J-H,j+=Z-q}W.push({el:A,top:H,left:q})}return W};var Ia=function(){return Ia=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ia.apply(this,arguments)},kK=0;function kC(e){return typeof e=="function"?e:Cr}function Cr(){}function P3(e,t){if(e){var r=MK(e,{boundary:t});r.forEach(function(n){var i=n.el,o=n.top,a=n.left;i.scrollTop=o,i.scrollLeft=a})}}function AC(e,t,r){var n=e===t||t instanceof r.Node&&e.contains&&e.contains(t);return n}function wd(e,t){var r;function n(){r&&clearTimeout(r)}function i(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];n(),r=setTimeout(function(){r=null,e.apply(void 0,a)},t)}return i.cancel=n,i}function st(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return t.some(function(s){return s&&s.apply(void 0,[n].concat(o)),n.preventDownshiftDefault||n.hasOwnProperty("nativeEvent")&&n.nativeEvent.preventDownshiftDefault})}}function zn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){t.forEach(function(i){typeof i=="function"?i(n):i&&(i.current=n)})}}function M3(){return String(kK++)}function AK(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 DC(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function k3(e){return typeof e.type=="string"}function A3(e){return e.props}function DK(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var jK=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function Wc(e){e===void 0&&(e={});var t={};return jK.forEach(function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}function ul(e,t){return!e||!t?e:Object.keys(e).reduce(function(r,n){return r[n]=$u(t,n)?t[n]:e[n],r},{})}function $u(e,t){return e[t]!==void 0}function Ra(e){var t=e.key,r=e.keyCode;return r>=37&&r<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function qK(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ln(e,t,r,n,i){i===void 0&&(i=!1);var o=r.length;if(o===0)return-1;var a=o-1;(typeof e!="number"||e<0||e>a)&&(e=t>0?-1:a+1);var s=e+t;s<0?s=i?a:0:s>a&&(s=i?0:a);var c=Ji(s,t<0,r,n,i);return c===-1?e>=o?-1:e:c}function Ji(e,t,r,n,i){i===void 0&&(i=!1);var o=r.length;if(t){for(var a=e;a>=0;a--)if(!n(r[a],a))return a}else for(var s=e;s<o;s++)if(!n(r[s],s))return s;return i?Ji(t?o-1:0,t,r,n):-1}function Vu(e,t,r,n){return n===void 0&&(n=!0),r&&t.some(function(i){return i&&(AC(i,e,r)||n&&AC(i,r.document.activeElement,r))})}var w1=Cr;process.env.NODE_ENV!=="production"&&(w1=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(i){t[i]!==void 0&&r[i]===void 0?console.error('downshift: A component has changed the controlled prop "'+i+'" to be uncontrolled. '+n):t[i]===void 0&&r[i]!==void 0&&console.error('downshift: A component has changed the uncontrolled prop "'+i+'" to be controlled. '+n)})});var zK=wd(function(e){D3(e).textContent=""},500);function D3(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 j3(e,t){if(!(!e||!t)){var r=D3(t);r.textContent=e,zK(t)}}function LK(e){var t=e==null?void 0:e.getElementById("a11y-status-message");t&&t.remove()}var q3=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,z3=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,L3=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,gu=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,mu=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,B3=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,F3=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,$3=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,V3=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,H3=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,W3=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,U3=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,G3=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,Pw=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,K3=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,Y3=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,X3=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,BK=Object.freeze({__proto__:null,blurButton:K3,blurInput:W3,changeInput:U3,clickButton:Pw,clickItem:H3,controlledPropUpdatedSelectedItem:Y3,itemMouseEnter:L3,keyDownArrowDown:mu,keyDownArrowUp:gu,keyDownEnd:V3,keyDownEnter:F3,keyDownEscape:B3,keyDownHome:$3,keyDownSpaceButton:G3,mouseUp:z3,touchEnd:X3,unknown:q3}),FK=["refKey","ref"],$K=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],VK=["onKeyDown","onBlur","onChange","onInput","onChangeText"],HK=["refKey","ref"],WK=["onMouseMove","onMouseDown","onClick","onPress","index","item"],UK=(function(){var e=(function(t){function r(i){var o;o=t.call(this,i)||this,o.id=o.props.id||"downshift-"+M3(),o.menuId=o.props.menuId||o.id+"-menu",o.labelId=o.props.labelId||o.id+"-label",o.inputId=o.props.inputId||o.id+"-input",o.getItemId=o.props.getItemId||function(x){return o.id+"-item-"+x},o.items=[],o.itemCount=null,o.previousResultCount=0,o.timeoutIds=[],o.internalSetTimeout=function(x,_){var S=setTimeout(function(){o.timeoutIds=o.timeoutIds.filter(function(E){return E!==S}),x()},_);o.timeoutIds.push(S)},o.setItemCount=function(x){o.itemCount=x},o.unsetItemCount=function(){o.itemCount=null},o.isItemDisabled=function(x,_){var S=o.getItemNodeFromIndex(_);return S&&S.hasAttribute("disabled")},o.setHighlightedIndex=function(x,_){x===void 0&&(x=o.props.defaultHighlightedIndex),_===void 0&&(_={}),_=Wc(_),o.internalSetState(je({highlightedIndex:x},_))},o.clearSelection=function(x){o.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:o.props.defaultHighlightedIndex,isOpen:o.props.defaultIsOpen},x)},o.selectItem=function(x,_,S){_=Wc(_),o.internalSetState(je({isOpen:o.props.defaultIsOpen,highlightedIndex:o.props.defaultHighlightedIndex,selectedItem:x,inputValue:o.props.itemToString(x)},_),S)},o.selectItemAtIndex=function(x,_,S){var E=o.items[x];E!=null&&o.selectItem(E,_,S)},o.selectHighlightedItem=function(x,_){return o.selectItemAtIndex(o.getState().highlightedIndex,x,_)},o.internalSetState=function(x,_){var S,E,I={},N=typeof x=="function";return!N&&x.hasOwnProperty("inputValue")&&o.props.onInputValueChange(x.inputValue,je({},o.getStateAndHelpers(),x)),o.setState(function(T){var M;T=o.getState(T);var z=N?x(T):x;z=o.props.stateReducer(T,z),S=z.hasOwnProperty("selectedItem");var j={};return S&&z.selectedItem!==T.selectedItem&&(E=z.selectedItem),(M=z).type||(M.type=q3),Object.keys(z).forEach(function(W){T[W]!==z[W]&&(I[W]=z[W]),W!=="type"&&(z[W],$u(o.props,W)||(j[W]=z[W]))}),N&&z.hasOwnProperty("inputValue")&&o.props.onInputValueChange(z.inputValue,je({},o.getStateAndHelpers(),z)),j},function(){kC(_)();var T=Object.keys(I).length>1;T&&o.props.onStateChange(I,o.getStateAndHelpers()),S&&o.props.onSelect(x.selectedItem,o.getStateAndHelpers()),E!==void 0&&o.props.onChange(E,o.getStateAndHelpers()),o.props.onUserAction(I,o.getStateAndHelpers())})},o.rootRef=function(x){return o._rootNode=x},o.getRootProps=function(x,_){var S,E=x===void 0?{}:x,I=E.refKey,N=I===void 0?"ref":I,T=E.ref,M=Ir(E,FK),z=_===void 0?{}:_,j=z.suppressRefError,W=j===void 0?!1:j;o.getRootProps.called=!0,o.getRootProps.refKey=N,o.getRootProps.suppressRefError=W;var U=o.getState(),A=U.isOpen;return je((S={},S[N]=zn(T,o.rootRef),S.role="combobox",S["aria-expanded"]=A,S["aria-haspopup"]="listbox",S["aria-owns"]=A?o.menuId:void 0,S["aria-labelledby"]=o.labelId,S),M)},o.keyDownHandlers={ArrowDown:function(x){var _=this;if(x.preventDefault(),this.getState().isOpen){var S=x.shiftKey?5:1;this.moveHighlightedIndex(S,{type:mu})}else this.internalSetState({isOpen:!0,type:mu},function(){var E=_.getItemCount();if(E>0){var I=_.getState(),N=I.highlightedIndex,T=Ln(N,1,{length:E},_.isItemDisabled,!0);_.setHighlightedIndex(T,{type:mu})}})},ArrowUp:function(x){var _=this;if(x.preventDefault(),this.getState().isOpen){var S=x.shiftKey?-5:-1;this.moveHighlightedIndex(S,{type:gu})}else this.internalSetState({isOpen:!0,type:gu},function(){var E=_.getItemCount();if(E>0){var I=_.getState(),N=I.highlightedIndex,T=Ln(N,-1,{length:E},_.isItemDisabled,!0);_.setHighlightedIndex(T,{type:gu})}})},Enter:function(x){if(x.which!==229){var _=this.getState(),S=_.isOpen,E=_.highlightedIndex;if(S&&E!=null){x.preventDefault();var I=this.items[E],N=this.getItemNodeFromIndex(E);if(I==null||N&&N.hasAttribute("disabled"))return;this.selectHighlightedItem({type:F3})}}},Escape:function(x){x.preventDefault(),this.reset(je({type:B3},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},o.buttonKeyDownHandlers=je({},o.keyDownHandlers,{" ":function(x){x.preventDefault(),this.toggleMenu({type:G3})}}),o.inputKeyDownHandlers=je({},o.keyDownHandlers,{Home:function(x){var _=this.getState(),S=_.isOpen;if(S){x.preventDefault();var E=this.getItemCount();if(!(E<=0||!S)){var I=Ji(0,!1,{length:E},this.isItemDisabled);this.setHighlightedIndex(I,{type:$3})}}},End:function(x){var _=this.getState(),S=_.isOpen;if(S){x.preventDefault();var E=this.getItemCount();if(!(E<=0||!S)){var I=Ji(E-1,!0,{length:E},this.isItemDisabled);this.setHighlightedIndex(I,{type:V3})}}}}),o.getToggleButtonProps=function(x){var _=x===void 0?{}:x,S=_.onClick;_.onPress;var E=_.onKeyDown,I=_.onKeyUp,N=_.onBlur,T=Ir(_,$K),M=o.getState(),z=M.isOpen,j={onClick:st(S,o.buttonHandleClick),onKeyDown:st(E,o.buttonHandleKeyDown),onKeyUp:st(I,o.buttonHandleKeyUp),onBlur:st(N,o.buttonHandleBlur)},W=T.disabled?{}:j;return je({type:"button",role:"button","aria-label":z?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},W,T)},o.buttonHandleKeyUp=function(x){x.preventDefault()},o.buttonHandleKeyDown=function(x){var _=Ra(x);o.buttonKeyDownHandlers[_]&&o.buttonKeyDownHandlers[_].call(o,x)},o.buttonHandleClick=function(x){if(x.preventDefault(),o.props.environment){var _=o.props.environment.document,S=_.body,E=_.activeElement;S&&S===E&&x.target.focus()}process.env.NODE_ENV==="test"?o.toggleMenu({type:Pw}):o.internalSetTimeout(function(){return o.toggleMenu({type:Pw})})},o.buttonHandleBlur=function(x){var _=x.target;o.internalSetTimeout(function(){if(!(o.isMouseDown||!o.props.environment)){var S=o.props.environment.document.activeElement;(S==null||S.id!==o.inputId)&&S!==_&&o.reset({type:K3})}})},o.getLabelProps=function(x){return je({htmlFor:o.inputId,id:o.labelId},x)},o.getInputProps=function(x){var _=x===void 0?{}:x,S=_.onKeyDown,E=_.onBlur,I=_.onChange,N=_.onInput;_.onChangeText;var T=Ir(_,VK),M,z={};M="onChange";var j=o.getState(),W=j.inputValue,U=j.isOpen,A=j.highlightedIndex;if(!T.disabled){var K;z=(K={},K[M]=st(I,N,o.inputHandleChange),K.onKeyDown=st(S,o.inputHandleKeyDown),K.onBlur=st(E,o.inputHandleBlur),K)}return je({"aria-autocomplete":"list","aria-activedescendant":U&&typeof A=="number"&&A>=0?o.getItemId(A):void 0,"aria-controls":U?o.menuId:void 0,"aria-labelledby":T&&T["aria-label"]?void 0:o.labelId,autoComplete:"off",value:W,id:o.inputId},z,T)},o.inputHandleKeyDown=function(x){var _=Ra(x);_&&o.inputKeyDownHandlers[_]&&o.inputKeyDownHandlers[_].call(o,x)},o.inputHandleChange=function(x){o.internalSetState({type:U3,isOpen:!0,inputValue:x.target.value,highlightedIndex:o.props.defaultHighlightedIndex})},o.inputHandleBlur=function(){o.internalSetTimeout(function(){var x;if(!(o.isMouseDown||!o.props.environment)){var _=o.props.environment.document.activeElement,S=(_==null||(x=_.dataset)==null?void 0:x.toggle)&&o._rootNode&&o._rootNode.contains(_);S||o.reset({type:W3})}})},o.menuRef=function(x){o._menuNode=x},o.getMenuProps=function(x,_){var S,E=x===void 0?{}:x,I=E.refKey,N=I===void 0?"ref":I,T=E.ref,M=Ir(E,HK),z=_===void 0?{}:_,j=z.suppressRefError,W=j===void 0?!1:j;return o.getMenuProps.called=!0,o.getMenuProps.refKey=N,o.getMenuProps.suppressRefError=W,je((S={},S[N]=zn(T,o.menuRef),S.role="listbox",S["aria-labelledby"]=M&&M["aria-label"]?void 0:o.labelId,S.id=o.menuId,S),M)},o.getItemProps=function(x){var _,S=x===void 0?{}:x,E=S.onMouseMove,I=S.onMouseDown,N=S.onClick;S.onPress;var T=S.index,M=S.item,z=M===void 0?process.env.NODE_ENV==="production"?void 0:DK("getItemProps","item"):M,j=Ir(S,WK);T===void 0?(o.items.push(z),T=o.items.indexOf(z)):o.items[T]=z;var W="onClick",U=N,A=(_={onMouseMove:st(E,function(){T!==o.getState().highlightedIndex&&(o.setHighlightedIndex(T,{type:L3}),o.avoidScrolling=!0,o.internalSetTimeout(function(){return o.avoidScrolling=!1},250))}),onMouseDown:st(I,function(V){V.preventDefault()})},_[W]=st(U,function(){o.selectItemAtIndex(T,{type:H3})}),_),K=j.disabled?{onMouseDown:A.onMouseDown}:A;return je({id:o.getItemId(T),role:"option","aria-selected":o.getState().highlightedIndex===T},K,j)},o.clearItems=function(){o.items=[]},o.reset=function(x,_){x===void 0&&(x={}),x=Wc(x),o.internalSetState(function(S){var E=S.selectedItem;return je({isOpen:o.props.defaultIsOpen,highlightedIndex:o.props.defaultHighlightedIndex,inputValue:o.props.itemToString(E)},x)},_)},o.toggleMenu=function(x,_){x===void 0&&(x={}),x=Wc(x),o.internalSetState(function(S){var E=S.isOpen;return je({isOpen:!E},E&&{highlightedIndex:o.props.defaultHighlightedIndex},x)},function(){var S=o.getState(),E=S.isOpen,I=S.highlightedIndex;E&&o.getItemCount()>0&&typeof I=="number"&&o.setHighlightedIndex(I,x),kC(_)()})},o.openMenu=function(x){o.internalSetState({isOpen:!0},x)},o.closeMenu=function(x){o.internalSetState({isOpen:!1},x)},o.updateStatus=wd(function(){var x;if((x=o.props)!=null&&(x=x.environment)!=null&&x.document){var _=o.getState(),S=o.items[_.highlightedIndex],E=o.getItemCount(),I=o.props.getA11yStatusMessage(je({itemToString:o.props.itemToString,previousResultCount:o.previousResultCount,resultCount:E,highlightedItem:S},_));o.previousResultCount=E,j3(I,o.props.environment.document)}},200);var a=o.props,s=a.defaultHighlightedIndex,c=a.initialHighlightedIndex,d=c===void 0?s:c,u=a.defaultIsOpen,h=a.initialIsOpen,p=h===void 0?u:h,v=a.initialInputValue,y=v===void 0?"":v,m=a.initialSelectedItem,g=m===void 0?null:m,w=o.getState({highlightedIndex:d,isOpen:p,inputValue:y,selectedItem:g});return w.selectedItem!=null&&o.props.initialInputValue===void 0&&(w.inputValue=o.props.itemToString(w.selectedItem)),o.state=w,o}yK(r,t);var n=r.prototype;return n.internalClearTimeouts=function(){this.timeoutIds.forEach(function(i){clearTimeout(i)}),this.timeoutIds=[]},n.getState=function(i){return i===void 0&&(i=this.state),ul(i,this.props)},n.getItemCount=function(){var i=this.items.length;return this.itemCount!=null?i=this.itemCount:this.props.itemCount!==void 0&&(i=this.props.itemCount),i},n.getItemNodeFromIndex=function(i){return this.props.environment?this.props.environment.document.getElementById(this.getItemId(i)):null},n.scrollHighlightedItemIntoView=function(){{var i=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(i,this._menuNode)}},n.moveHighlightedIndex=function(i,o){var a=this.getItemCount(),s=this.getState(),c=s.highlightedIndex;if(a>0){var d=Ln(c,i,{length:a},this.isItemDisabled,!0);this.setHighlightedIndex(d,o)}},n.getStateAndHelpers=function(){var i=this.getState(),o=i.highlightedIndex,a=i.inputValue,s=i.selectedItem,c=i.isOpen,d=this.props.itemToString,u=this.id,h=this.getRootProps,p=this.getToggleButtonProps,v=this.getLabelProps,y=this.getMenuProps,m=this.getInputProps,g=this.getItemProps,w=this.openMenu,x=this.closeMenu,_=this.toggleMenu,S=this.selectItem,E=this.selectItemAtIndex,I=this.selectHighlightedItem,N=this.setHighlightedIndex,T=this.clearSelection,M=this.clearItems,z=this.reset,j=this.setItemCount,W=this.unsetItemCount,U=this.internalSetState;return{getRootProps:h,getToggleButtonProps:p,getLabelProps:v,getMenuProps:y,getInputProps:m,getItemProps:g,reset:z,openMenu:w,closeMenu:x,toggleMenu:_,selectItem:S,selectItemAtIndex:E,selectHighlightedItem:I,setHighlightedIndex:N,clearSelection:T,clearItems:M,setItemCount:j,unsetItemCount:W,setState:U,itemToString:d,id:u,highlightedIndex:o,inputValue:a,isOpen:c,selectedItem:s}},n.componentDidMount=function(){var i=this;if(process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&jC(this._menuNode,this.getMenuProps),!this.props.environment)this.cleanup=function(){i.internalClearTimeouts()};else{var o=function(){i.isMouseDown=!0},a=function(h){i.isMouseDown=!1;var p=Vu(h.target,[i._rootNode,i._menuNode],i.props.environment);!p&&i.getState().isOpen&&i.reset({type:z3},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},s=function(){i.isTouchMove=!1},c=function(){i.isTouchMove=!0},d=function(h){var p=Vu(h.target,[i._rootNode,i._menuNode],i.props.environment,!1);!i.isTouchMove&&!p&&i.getState().isOpen&&i.reset({type:X3},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},u=this.props.environment;u.addEventListener("mousedown",o),u.addEventListener("mouseup",a),u.addEventListener("touchstart",s),u.addEventListener("touchmove",c),u.addEventListener("touchend",d),this.cleanup=function(){i.internalClearTimeouts(),i.updateStatus.cancel(),u.removeEventListener("mousedown",o),u.removeEventListener("mouseup",a),u.removeEventListener("touchstart",s),u.removeEventListener("touchmove",c),u.removeEventListener("touchend",d)}}},n.shouldScroll=function(i,o){var a=this.props.highlightedIndex===void 0?this.getState():this.props,s=a.highlightedIndex,c=o.highlightedIndex===void 0?i:o,d=c.highlightedIndex,u=s&&this.getState().isOpen&&!i.isOpen,h=s!==d;return u||h},n.componentDidUpdate=function(i,o){process.env.NODE_ENV!=="production"&&(w1(this.state,i,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&jC(this._menuNode,this.getMenuProps)),$u(this.props,"selectedItem")&&this.props.selectedItemChanged(i.selectedItem,this.props.selectedItem)&&this.internalSetState({type:Y3,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(o,i)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},n.componentWillUnmount=function(){this.cleanup()},n.render=function(){var i=DC(this.props.children,Cr);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 o=DC(i(this.getStateAndHelpers()));if(!o)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&GK(o,this.getRootProps),o;if(k3(o))return C.cloneElement(o,this.getRootProps(A3(o)));if(process.env.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")},r})(C.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:AK,itemToString:function(t){return t==null?"":(process.env.NODE_ENV!=="production"&&qK(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:Cr,onInputValueChange:Cr,onUserAction:Cr,onChange:Cr,onSelect:Cr,onOuterClick:Cr,selectedItemChanged:function(t,r){return t!==r},environment:typeof window>"u"?void 0:window,stateReducer:function(t,r){return r},suppressRefError:!1,scrollIntoView:P3},e.stateChangeTypes=BK,e})();process.env.NODE_ENV!=="production"&&(UK.propTypes={children:Se.func,defaultHighlightedIndex:Se.number,defaultIsOpen:Se.bool,initialHighlightedIndex:Se.number,initialSelectedItem:Se.any,initialInputValue:Se.string,initialIsOpen:Se.bool,getA11yStatusMessage:Se.func,itemToString:Se.func,onChange:Se.func,onSelect:Se.func,onStateChange:Se.func,onInputValueChange:Se.func,onUserAction:Se.func,onOuterClick:Se.func,selectedItemChanged:Se.func,stateReducer:Se.func,itemCount:Se.number,id:Se.string,environment:Se.shape({addEventListener:Se.func.isRequired,removeEventListener:Se.func.isRequired,document:Se.shape({createElement:Se.func.isRequired,getElementById:Se.func.isRequired,activeElement:Se.any.isRequired,body:Se.any.isRequired}).isRequired,Node:Se.func.isRequired}),suppressRefError:Se.bool,scrollIntoView:Se.func,selectedItem:Se.any,isOpen:Se.bool,inputValue:Se.string,highlightedIndex:Se.number,labelId:Se.string,inputId:Se.string,menuId:Se.string,getItemId:Se.func});function jC(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 GK(e,t){var r=t.refKey,n=r!=="ref",i=!k3(e);i&&!n&&!TC.isForwardRef(e)?console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps"):!i&&n&&console.error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "'+r+'"'),!TC.isForwardRef(e)&&!A3(e)[r]&&console.error('downshift: You must apply the ref prop "'+r+'" from getRootProps onto your root element.')}var Z3={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function KK(e,t,r){var n=e.props,i=e.type,o={};Object.keys(t).forEach(function(a){YK(a,e,t,r),r[a]!==t[a]&&(o[a]=r[a])}),n.onStateChange&&Object.keys(o).length&&n.onStateChange(je({type:i},o))}function YK(e,t,r,n){var i=t.props,o=t.type,a="on"+E1(e)+"Change";i[a]&&n[e]!==void 0&&n[e]!==r[e]&&i[a](je({type:o},n))}function XK(e,t){return t.changes}var qC=wd(function(e,t){j3(e,t)},200),ZK=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?C.useLayoutEffect:C.useEffect,J3="useId"in C?function(e){var t=e.id,r=e.labelId,n=e.menuId,i=e.getItemId,o=e.toggleButtonId,a=e.inputId,s="downshift-"+C.useId();t||(t=s);var c=C.useMemo(function(){return{labelId:r||t+"-label",menuId:n||t+"-menu",getItemId:i||function(d){return t+"-item-"+d},toggleButtonId:o||t+"-toggle-button",inputId:a||t+"-input"}},[i,t,a,r,n,o]);return c}:function(e){var t=e.id,r=t===void 0?"downshift-"+M3():t,n=e.labelId,i=e.menuId,o=e.getItemId,a=e.toggleButtonId,s=e.inputId,c=C.useMemo(function(){return{labelId:n||r+"-label",menuId:i||r+"-menu",getItemId:o||function(d){return r+"-item-"+d},toggleButtonId:a||r+"-toggle-button",inputId:s||r+"-input"}},[o,r,s,n,i,a]);return c};function S1(e,t,r,n){var i,o;if(e===void 0){if(t===void 0)throw new Error(n);i=r[t],o=t}else o=t===void 0?r.indexOf(e):t,i=e;return[i,o]}function JK(e){return/^\S{1}$/.test(e)}function E1(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function Sd(e){var t=C.useRef(e);return t.current=e,t}function Q3(e,t,r,n){var i=C.useRef(),o=C.useRef(),a=C.useCallback(function(v,y){o.current=y,v=ul(v,y.props);var m=e(v,y),g=y.props.stateReducer(v,je({},y,{changes:m}));return g},[e]),s=C.useReducer(a,t,r),c=s[0],d=s[1],u=Sd(t),h=C.useCallback(function(v){return d(je({props:u.current},v))},[u]),p=o.current;return C.useEffect(function(){var v=ul(i.current,p==null?void 0:p.props),y=p&&i.current&&!n(v,c);y&&KK(p,v,c),i.current=c},[c,p,n]),[c,h]}function e4(e,t,r,n){var i=Q3(e,t,r,n),o=i[0],a=i[1];return[ul(o,t),a]}var el={itemToString:function(e){return e?String(e):""},itemToKey:function(e){return e},stateReducer:XK,scrollIntoView:P3,environment:typeof window>"u"?void 0:window};function ri(e,t,r){r===void 0&&(r=Z3);var n=e["default"+E1(t)];return n!==void 0?n:r[t]}function So(e,t,r){r===void 0&&(r=Z3);var n=e[t];if(n!==void 0)return n;var i=e["initial"+E1(t)];return i!==void 0?i:ri(e,t,r)}function t4(e){var t=So(e,"selectedItem"),r=So(e,"isOpen"),n=QK(e),i=So(e,"inputValue");return{highlightedIndex:n<0&&t&&r?e.items.findIndex(function(o){return e.itemToKey(o)===e.itemToKey(t)}):n,isOpen:r,selectedItem:t,inputValue:i}}function Eo(e,t,r){var n=e.items,i=e.initialHighlightedIndex,o=e.defaultHighlightedIndex,a=e.isItemDisabled,s=e.itemToKey,c=t.selectedItem,d=t.highlightedIndex;return n.length===0?-1:i!==void 0&&d===i&&!a(n[i],i)?i:o!==void 0&&!a(n[o],o)?o:c?n.findIndex(function(u){return s(c)===s(u)}):r<0&&!a(n[n.length-1],n.length-1)?n.length-1:r>0&&!a(n[0],0)?0:-1}function r4(e,t,r){var n=C.useRef({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1}),i=C.useCallback(function(){return r.map(function(o){return o.current})},[r]);return C.useEffect(function(){if(!e)return Cr;function o(){n.current.isTouchEnd=!1,n.current.isMouseDown=!0}function a(u){n.current.isMouseDown=!1,Vu(u.target,i(),e)||t()}function s(){n.current.isTouchEnd=!1,n.current.isTouchMove=!1}function c(){n.current.isTouchMove=!0}function d(u){n.current.isTouchEnd=!0,!n.current.isTouchMove&&!Vu(u.target,i(),e,!1)&&t()}return e.addEventListener("mousedown",o),e.addEventListener("mouseup",a),e.addEventListener("touchstart",s),e.addEventListener("touchmove",c),e.addEventListener("touchend",d),function(){e.removeEventListener("mousedown",o),e.removeEventListener("mouseup",a),e.removeEventListener("touchstart",s),e.removeEventListener("touchmove",c),e.removeEventListener("touchend",d)}},[e,i,t]),n.current}var Ed=function(){return Cr};process.env.NODE_ENV!=="production"&&(Ed=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=C.useRef(t.reduce(function(o,a){return o[a]={},o},{}));C.useEffect(function(){Object.keys(n.current).forEach(function(o){var a=n.current[o];if(!Object.keys(a).length){console.error("downshift: You forgot to call the "+o+" getter function on your component / element.");return}var s=a.suppressRefError,c=a.refKey,d=a.elementRef;s||d!=null&&d.current||console.error('downshift: The ref prop "'+c+'" from '+o+" was not applied correctly on your element.")})},[]);var i=C.useCallback(function(o,a,s,c){n.current[o]={suppressRefError:a,refKey:s,elementRef:c}},[]);return i});function _1(e,t,r,n){n===void 0&&(n={});var i=n.document,o=Cl();C.useEffect(function(){if(!(!e||o||!i)){var a=e(t);qC(a,i)}},r),C.useEffect(function(){return function(){qC.cancel(),LK(i)}},[i])}function n4(e){var t=e.highlightedIndex,r=e.isOpen,n=e.itemRefs,i=e.getItemNodeFromIndex,o=e.menuElement,a=e.scrollIntoView,s=C.useRef(!0);return ZK(function(){t<0||!r||!Object.keys(n.current).length||(s.current===!1?s.current=!0:a(i(t),o))},[t]),s}var _d=Cr;process.env.NODE_ENV!=="production"&&(_d=function(e){var t=e.props,r=e.state,n=C.useRef(t),i=Cl();C.useEffect(function(){i||(w1(r,n.current,t),n.current=t)},[r,t,i])});function Hu(e,t,r){var n;r===void 0&&(r=!0);var i=((n=e.items)==null?void 0:n.length)&&t>=0;return je({isOpen:!1,highlightedIndex:-1},i&&je({selectedItem:e.items[t],isOpen:ri(e,"isOpen"),highlightedIndex:ri(e,"highlightedIndex")},r&&{inputValue:e.itemToString(e.items[t])}))}function i4(e,t){return e.isOpen===t.isOpen&&e.inputValue===t.inputValue&&e.highlightedIndex===t.highlightedIndex&&e.selectedItem===t.selectedItem}function Cl(){var e=C.useRef(!0);return C.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}function Wu(e){var t=ri(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function QK(e){var t=So(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}var bu={environment:Se.shape({addEventListener:Se.func.isRequired,removeEventListener:Se.func.isRequired,document:Se.shape({createElement:Se.func.isRequired,getElementById:Se.func.isRequired,activeElement:Se.any.isRequired,body:Se.any.isRequired}).isRequired,Node:Se.func.isRequired}),itemToString:Se.func,itemToKey:Se.func,stateReducer:Se.func},o4=je({},bu,{getA11yStatusMessage:Se.func,highlightedIndex:Se.number,defaultHighlightedIndex:Se.number,initialHighlightedIndex:Se.number,isOpen:Se.bool,defaultIsOpen:Se.bool,initialIsOpen:Se.bool,selectedItem:Se.any,initialSelectedItem:Se.any,defaultSelectedItem:Se.any,id:Se.string,labelId:Se.string,menuId:Se.string,getItemId:Se.func,toggleButtonId:Se.string,onSelectedItemChange:Se.func,onHighlightedIndexChange:Se.func,onStateChange:Se.func,onIsOpenChange:Se.func,scrollIntoView:Se.func});function a4(e,t,r){var n=t.type,i=t.props,o;switch(n){case r.ItemMouseMove:o={highlightedIndex:t.disabled?-1:t.index};break;case r.MenuMouseLeave:o={highlightedIndex:-1};break;case r.ToggleButtonClick:case r.FunctionToggleMenu:o={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Eo(i,e,0)};break;case r.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:Eo(i,e,0)};break;case r.FunctionCloseMenu:o={isOpen:!1};break;case r.FunctionSetHighlightedIndex:o={highlightedIndex:i.isItemDisabled(i.items[t.highlightedIndex],t.highlightedIndex)?-1:t.highlightedIndex};break;case r.FunctionSetInputValue:o={inputValue:t.inputValue};break;case r.FunctionReset:o={highlightedIndex:Wu(i),isOpen:ri(i,"isOpen"),selectedItem:ri(i,"selectedItem"),inputValue:ri(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return je({},e,o)}function eY(e){for(var t=e.keysSoFar,r=e.highlightedIndex,n=e.items,i=e.itemToString,o=e.isItemDisabled,a=t.toLowerCase(),s=0;s<n.length;s++){var c=(s+r+(t.length<2?1:0))%n.length,d=n[c];if(d!==void 0&&i(d).toLowerCase().startsWith(a)&&!o(d,c))return c}return r}var tY=Ia(Ia({},o4),{items:Se.array.isRequired,isItemDisabled:Se.func}),rY=Ia(Ia({},el),{isItemDisabled:function(){return!1}}),s4=Cr;process.env.NODE_ENV!=="production"&&(s4=function(e,t){Se.checkPropTypes(tY,e,"prop",t.name)});var yu=process.env.NODE_ENV!=="production"?"__togglebutton_click__":0,O1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_arrow_down__":1,C1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_arrow_up__":2,Uu=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_character__":3,I1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_escape__":4,R1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_home__":5,N1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_end__":6,T1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_enter__":7,P1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_space_button__":8,M1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_page_up__":9,k1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_page_down__":10,Gu=process.env.NODE_ENV!=="production"?"__togglebutton_blur__":11,l4=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":12,c4=process.env.NODE_ENV!=="production"?"__item_mouse_move__":13,A1=process.env.NODE_ENV!=="production"?"__item_click__":14,u4=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,d4=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,f4=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,h4=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,D1=process.env.NODE_ENV!=="production"?"__function_select_item__":19,Mw=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,p4=process.env.NODE_ENV!=="production"?"__function_reset__":21,v4=Object.freeze({__proto__:null,FunctionCloseMenu:f4,FunctionOpenMenu:d4,FunctionReset:p4,FunctionSelectItem:D1,FunctionSetHighlightedIndex:h4,FunctionSetInputValue:Mw,FunctionToggleMenu:u4,ItemClick:A1,ItemMouseMove:c4,MenuMouseLeave:l4,ToggleButtonBlur:Gu,ToggleButtonClick:yu,ToggleButtonKeyDownArrowDown:O1,ToggleButtonKeyDownArrowUp:C1,ToggleButtonKeyDownCharacter:Uu,ToggleButtonKeyDownEnd:N1,ToggleButtonKeyDownEnter:T1,ToggleButtonKeyDownEscape:I1,ToggleButtonKeyDownHome:R1,ToggleButtonKeyDownPageDown:k1,ToggleButtonKeyDownPageUp:M1,ToggleButtonKeyDownSpaceButton:P1});function nY(e,t){var r,n=t.type,i=t.props,o=t.altKey,a;switch(n){case A1:a={isOpen:ri(i,"isOpen"),highlightedIndex:Wu(i),selectedItem:i.items[t.index]};break;case Uu:{var s=t.key,c=""+e.inputValue+s,d=!e.isOpen&&e.selectedItem?i.items.findIndex(function(v){return i.itemToKey(v)===i.itemToKey(e.selectedItem)}):e.highlightedIndex,u=eY({keysSoFar:c,highlightedIndex:d,items:i.items,itemToString:i.itemToString,isItemDisabled:i.isItemDisabled});a={inputValue:c,highlightedIndex:u,isOpen:!0}}break;case O1:{var h=e.isOpen?Ln(e.highlightedIndex,1,i.items,i.isItemDisabled):o&&e.selectedItem==null?-1:Eo(i,e,1);a={highlightedIndex:h,isOpen:!0}}break;case C1:if(e.isOpen&&o)a=Hu(i,e.highlightedIndex,!1);else{var p=e.isOpen?Ln(e.highlightedIndex,-1,i.items,i.isItemDisabled):Eo(i,e,-1);a={highlightedIndex:p,isOpen:!0}}break;case T1:case P1:a=Hu(i,e.highlightedIndex,!1);break;case R1:a={highlightedIndex:Ji(0,!1,i.items,i.isItemDisabled),isOpen:!0};break;case N1:a={highlightedIndex:Ji(i.items.length-1,!0,i.items,i.isItemDisabled),isOpen:!0};break;case M1:a={highlightedIndex:Ln(e.highlightedIndex,-10,i.items,i.isItemDisabled)};break;case k1:a={highlightedIndex:Ln(e.highlightedIndex,10,i.items,i.isItemDisabled)};break;case I1:a={isOpen:!1,highlightedIndex:-1};break;case Gu:a=je({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((r=i.items)==null?void 0:r.length)&&{selectedItem:i.items[e.highlightedIndex]});break;case D1:a={selectedItem:t.selectedItem};break;default:return a4(e,t,v4)}return je({},e,a)}var iY=["onClick"],oY=["onMouseLeave","refKey","ref"],aY=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],sY=["item","index","onMouseMove","onClick","onMouseDown","onPress","refKey","disabled","ref"];xi.stateChangeTypes=v4;function xi(e){e===void 0&&(e={}),s4(e,xi);var t=je({},rY,e),r=t.scrollIntoView,n=t.environment,i=t.getA11yStatusMessage,o=e4(nY,t,t4,i4),a=o[0],s=o[1],c=a.isOpen,d=a.highlightedIndex,u=a.selectedItem,h=a.inputValue,p=C.useRef(null),v=C.useRef(null),y=C.useRef({}),m=C.useRef(null),g=J3(t),w=Sd({state:a,props:t}),x=C.useCallback(function(P){return y.current[g.getItemId(P)]},[g]);_1(i,a,[c,d,u,h],n);var _=n4({menuElement:v.current,highlightedIndex:d,isOpen:c,itemRefs:y,scrollIntoView:r,getItemNodeFromIndex:x});C.useEffect(function(){return m.current=wd(function(P){P({type:Mw,inputValue:""})},500),function(){m.current.cancel()}},[]),C.useEffect(function(){h&&m.current(s)},[s,h]),_d({props:t,state:a}),C.useEffect(function(){var P=So(t,"isOpen");P&&p.current&&p.current.focus()},[]);var S=C.useCallback(function(){w.current.state.isOpen&&s({type:Gu})},[s,w]),E=C.useMemo(function(){return[v,p]},[]),I=r4(n,S,E),N=Ed("getMenuProps","getToggleButtonProps");C.useEffect(function(){c||(y.current={})},[c]);var T=C.useMemo(function(){return{ArrowDown:function(P){P.preventDefault(),s({type:O1,altKey:P.altKey})},ArrowUp:function(P){P.preventDefault(),s({type:C1,altKey:P.altKey})},Home:function(P){P.preventDefault(),s({type:R1})},End:function(P){P.preventDefault(),s({type:N1})},Escape:function(){w.current.state.isOpen&&s({type:I1})},Enter:function(P){P.preventDefault(),s({type:w.current.state.isOpen?T1:yu})},PageUp:function(P){w.current.state.isOpen&&(P.preventDefault(),s({type:M1}))},PageDown:function(P){w.current.state.isOpen&&(P.preventDefault(),s({type:k1}))}," ":function(P){P.preventDefault();var B=w.current.state;if(!B.isOpen){s({type:yu});return}B.inputValue?s({type:Uu,key:" "}):s({type:P1})}}},[s,w]),M=C.useCallback(function(){s({type:u4})},[s]),z=C.useCallback(function(){s({type:f4})},[s]),j=C.useCallback(function(){s({type:d4})},[s]),W=C.useCallback(function(P){s({type:h4,highlightedIndex:P})},[s]),U=C.useCallback(function(P){s({type:D1,selectedItem:P})},[s]),A=C.useCallback(function(){s({type:p4})},[s]),K=C.useCallback(function(P){s({type:Mw,inputValue:P})},[s]),V=C.useCallback(function(P){var B=P===void 0?{}:P,X=B.onClick,Q=Ir(B,iY),D=function(){var $;($=p.current)==null||$.focus()};return je({id:g.labelId,htmlFor:g.toggleButtonId,onClick:st(X,D)},Q)},[g]),te=C.useCallback(function(P,B){var X,Q=P===void 0?{}:P,D=Q.onMouseLeave,$=Q.refKey,H=$===void 0?"ref":$,q=Q.ref,Y=Ir(Q,oY),ie=B===void 0?{}:B,ne=ie.suppressRefError,ve=ne===void 0?!1:ne,Z=function(){s({type:l4})};return N("getMenuProps",ve,H,v),je((X={},X[H]=zn(q,function(J){v.current=J}),X.id=g.menuId,X.role="listbox",X["aria-labelledby"]=Y&&Y["aria-label"]?void 0:""+g.labelId,X.onMouseLeave=st(D,Z),X),Y)},[s,N,g]),G=C.useCallback(function(P,B){var X,Q=P===void 0?{}:P,D=Q.onBlur,$=Q.onClick;Q.onPress;var H=Q.onKeyDown,q=Q.refKey,Y=q===void 0?"ref":q,ie=Q.ref,ne=Ir(Q,aY),ve=B===void 0?{}:B,Z=ve.suppressRefError,J=Z===void 0?!1:Z,ae=w.current.state,he=function(){s({type:yu})},ue=function(){ae.isOpen&&!I.isMouseDown&&s({type:Gu})},de=function(xe){var Ee=Ra(xe);Ee&&T[Ee]?T[Ee](xe):JK(Ee)&&s({type:Uu,key:Ee})},le=je((X={},X[Y]=zn(ie,function(xe){p.current=xe}),X["aria-activedescendant"]=ae.isOpen&&ae.highlightedIndex>-1?g.getItemId(ae.highlightedIndex):"",X["aria-controls"]=g.menuId,X["aria-expanded"]=w.current.state.isOpen,X["aria-haspopup"]="listbox",X["aria-labelledby"]=ne&&ne["aria-label"]?void 0:""+g.labelId,X.id=g.toggleButtonId,X.role="combobox",X.tabIndex=0,X.onBlur=st(D,ue),X),ne);return ne.disabled||(le.onClick=st($,he),le.onKeyDown=st(H,de)),N("getToggleButtonProps",J,Y,p),le},[s,g,w,I,N,T]),re=C.useCallback(function(P){var B,X=P===void 0?{}:P,Q=X.item,D=X.index,$=X.onMouseMove,H=X.onClick,q=X.onMouseDown;X.onPress;var Y=X.refKey,ie=Y===void 0?"ref":Y,ne=X.disabled,ve=X.ref,Z=Ir(X,sY);ne!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useSelect.');var J=w.current,ae=J.state,he=J.props,ue=S1(Q,D,he.items,"Pass either item or index to getItemProps!"),de=ue[0],le=ue[1],xe=he.isItemDisabled(de,le),Ee=function(){I.isTouchEnd||le===ae.highlightedIndex||(_.current=!1,s({type:c4,index:le,disabled:xe}))},Ie=function(){s({type:A1,index:le})},Te=function(Ze){return Ze.preventDefault()},Me=je((B={},B[ie]=zn(ve,function(Ze){Ze&&(y.current[g.getItemId(le)]=Ze)}),B["aria-disabled"]=xe,B["aria-selected"]=de===ae.selectedItem,B.id=g.getItemId(le),B.role="option",B),Z);return xe||(Me.onClick=st(H,Ie)),Me.onMouseMove=st($,Ee),Me.onMouseDown=st(q,Te),Me},[w,g,I,_,s]);return{getToggleButtonProps:G,getLabelProps:V,getMenuProps:te,getItemProps:re,toggleMenu:M,openMenu:j,closeMenu:z,setHighlightedIndex:W,selectItem:U,reset:A,setInputValue:K,highlightedIndex:d,isOpen:c,selectedItem:u,inputValue:h}}var j1=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,q1=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,z1=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,L1=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,B1=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,F1=process.env.NODE_ENV!=="production"?"__input_keydown_page_up__":5,$1=process.env.NODE_ENV!=="production"?"__input_keydown_page_down__":6,V1=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":7,H1=process.env.NODE_ENV!=="production"?"__input_change__":8,Ku=process.env.NODE_ENV!=="production"?"__input_blur__":9,W1=process.env.NODE_ENV!=="production"?"__input_click__":10,g4=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":11,m4=process.env.NODE_ENV!=="production"?"__item_mouse_move__":12,U1=process.env.NODE_ENV!=="production"?"__item_click__":13,b4=process.env.NODE_ENV!=="production"?"__togglebutton_click__":14,y4=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,x4=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,w4=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,S4=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,G1=process.env.NODE_ENV!=="production"?"__function_select_item__":19,E4=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,_4=process.env.NODE_ENV!=="production"?"__function_reset__":21,K1=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":22,O4=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:K1,FunctionCloseMenu:w4,FunctionOpenMenu:x4,FunctionReset:_4,FunctionSelectItem:G1,FunctionSetHighlightedIndex:S4,FunctionSetInputValue:E4,FunctionToggleMenu:y4,InputBlur:Ku,InputChange:H1,InputClick:W1,InputKeyDownArrowDown:j1,InputKeyDownArrowUp:q1,InputKeyDownEnd:B1,InputKeyDownEnter:V1,InputKeyDownEscape:z1,InputKeyDownHome:L1,InputKeyDownPageDown:$1,InputKeyDownPageUp:F1,ItemClick:U1,ItemMouseMove:m4,MenuMouseLeave:g4,ToggleButtonClick:b4});function lY(e){var t=t4(e),r=t.selectedItem,n=t.inputValue;return n===""&&r&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(n=e.itemToString(r)),je({},t,{inputValue:n})}var cY=je({},o4,{items:Se.array.isRequired,isItemDisabled:Se.func,inputValue:Se.string,defaultInputValue:Se.string,initialInputValue:Se.string,inputId:Se.string,onInputValueChange:Se.func});function uY(e,t,r,n){var i=C.useRef(),o=Q3(e,t,r,n),a=o[0],s=o[1],c=Cl();return C.useEffect(function(){if($u(t,"selectedItem")){if(!c){var d=t.itemToKey(t.selectedItem)!==t.itemToKey(i.current);d&&s({type:K1,inputValue:t.itemToString(t.selectedItem)})}i.current=a.selectedItem===i.current?t.selectedItem:a.selectedItem}},[a.selectedItem,t.selectedItem]),[ul(a,t),s]}var C4=Cr;process.env.NODE_ENV!=="production"&&(C4=function(e,t){Se.checkPropTypes(cY,e,"prop",t.name)});var dY=je({},el,{isItemDisabled:function(){return!1}});function fY(e,t){var r,n=t.type,i=t.props,o=t.altKey,a;switch(n){case U1:a={isOpen:ri(i,"isOpen"),highlightedIndex:Wu(i),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case j1:e.isOpen?a={highlightedIndex:Ln(e.highlightedIndex,1,i.items,i.isItemDisabled,!0)}:a={highlightedIndex:o&&e.selectedItem==null?-1:Eo(i,e,1),isOpen:i.items.length>=0};break;case q1:e.isOpen?o?a=Hu(i,e.highlightedIndex):a={highlightedIndex:Ln(e.highlightedIndex,-1,i.items,i.isItemDisabled,!0)}:a={highlightedIndex:Eo(i,e,-1),isOpen:i.items.length>=0};break;case V1:a=Hu(i,e.highlightedIndex);break;case z1:a=je({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case F1:a={highlightedIndex:Ln(e.highlightedIndex,-10,i.items,i.isItemDisabled,!0)};break;case $1:a={highlightedIndex:Ln(e.highlightedIndex,10,i.items,i.isItemDisabled,!0)};break;case L1:a={highlightedIndex:Ji(0,!1,i.items,i.isItemDisabled)};break;case B1:a={highlightedIndex:Ji(i.items.length-1,!0,i.items,i.isItemDisabled)};break;case Ku:a=je({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((r=i.items)==null?void 0:r.length)&&t.selectItem&&{selectedItem:i.items[e.highlightedIndex],inputValue:i.itemToString(i.items[e.highlightedIndex])});break;case H1:a={isOpen:!0,highlightedIndex:Wu(i),inputValue:t.inputValue};break;case W1:a={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Eo(i,e,0)};break;case G1:a={selectedItem:t.selectedItem,inputValue:i.itemToString(t.selectedItem)};break;case K1:a={inputValue:t.inputValue};break;default:return a4(e,t,O4)}return je({},e,a)}var hY=["onMouseLeave","refKey","ref"],pY=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],vY=["onClick","onPress","refKey","ref"],gY=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];zr.stateChangeTypes=O4;function zr(e){e===void 0&&(e={}),C4(e,zr);var t=je({},dY,e),r=t.items,n=t.scrollIntoView,i=t.environment,o=t.getA11yStatusMessage,a=uY(fY,t,lY,i4),s=a[0],c=a[1],d=s.isOpen,u=s.highlightedIndex,h=s.selectedItem,p=s.inputValue,v=C.useRef(null),y=C.useRef({}),m=C.useRef(null),g=C.useRef(null),w=Cl(),x=J3(t),_=C.useRef(),S=Sd({state:s,props:t}),E=C.useCallback(function(D){return y.current[x.getItemId(D)]},[x]);_1(o,s,[d,u,h,p],i);var I=n4({menuElement:v.current,highlightedIndex:u,isOpen:d,itemRefs:y,scrollIntoView:n,getItemNodeFromIndex:E});_d({props:t,state:s}),C.useEffect(function(){var D=So(t,"isOpen");D&&m.current&&m.current.focus()},[]),C.useEffect(function(){w||(_.current=r.length)});var N=C.useCallback(function(){S.current.state.isOpen&&c({type:Ku})},[c,S]),T=C.useMemo(function(){return[v,g,m]},[]),M=r4(i,N,T),z=Ed("getInputProps","getMenuProps");C.useEffect(function(){d||(y.current={})},[d]),C.useEffect(function(){var D;!d||!(i!=null&&i.document)||!(m!=null&&(D=m.current)!=null&&D.focus)||i.document.activeElement!==m.current&&m.current.focus()},[d,i]);var j=C.useMemo(function(){return{ArrowDown:function(D){D.preventDefault(),c({type:j1,altKey:D.altKey})},ArrowUp:function(D){D.preventDefault(),c({type:q1,altKey:D.altKey})},Home:function(D){S.current.state.isOpen&&(D.preventDefault(),c({type:L1}))},End:function(D){S.current.state.isOpen&&(D.preventDefault(),c({type:B1}))},Escape:function(D){var $=S.current.state;($.isOpen||$.inputValue||$.selectedItem||$.highlightedIndex>-1)&&(D.preventDefault(),c({type:z1}))},Enter:function(D){var $=S.current.state;!$.isOpen||D.which===229||(D.preventDefault(),c({type:V1}))},PageUp:function(D){S.current.state.isOpen&&(D.preventDefault(),c({type:F1}))},PageDown:function(D){S.current.state.isOpen&&(D.preventDefault(),c({type:$1}))}}},[c,S]),W=C.useCallback(function(D){return je({id:x.labelId,htmlFor:x.inputId},D)},[x]),U=C.useCallback(function(D,$){var H,q=D===void 0?{}:D,Y=q.onMouseLeave,ie=q.refKey,ne=ie===void 0?"ref":ie,ve=q.ref,Z=Ir(q,hY),J=$===void 0?{}:$,ae=J.suppressRefError,he=ae===void 0?!1:ae;return z("getMenuProps",he,ne,v),je((H={},H[ne]=zn(ve,function(ue){v.current=ue}),H.id=x.menuId,H.role="listbox",H["aria-labelledby"]=Z&&Z["aria-label"]?void 0:""+x.labelId,H.onMouseLeave=st(Y,function(){c({type:g4})}),H),Z)},[c,z,x]),A=C.useCallback(function(D){var $,H,q=D===void 0?{}:D,Y=q.item,ie=q.index,ne=q.refKey,ve=ne===void 0?"ref":ne,Z=q.ref,J=q.onMouseMove,ae=q.onMouseDown,he=q.onClick;q.onPress;var ue=q.disabled,de=Ir(q,pY);ue!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');var le=S.current,xe=le.props,Ee=le.state,Ie=S1(Y,ie,xe.items,"Pass either item or index to getItemProps!"),Te=Ie[0],Me=Ie[1],Ze=xe.isItemDisabled(Te,Me),tt="onClick",Fe=he,Le=function(){M.isTouchEnd||Me===Ee.highlightedIndex||(I.current=!1,c({type:m4,index:Me,disabled:Ze}))},ze=function(){c({type:U1,index:Me})},Je=function(rt){return rt.preventDefault()};return je(($={},$[ve]=zn(Z,function(rt){rt&&(y.current[x.getItemId(Me)]=rt)}),$["aria-disabled"]=Ze,$["aria-selected"]=Me===Ee.highlightedIndex,$.id=x.getItemId(Me),$.role="option",$),!Ze&&(H={},H[tt]=st(Fe,ze),H),{onMouseMove:st(J,Le),onMouseDown:st(ae,Je)},de)},[c,x,S,M,I]),K=C.useCallback(function(D){var $,H=D===void 0?{}:D,q=H.onClick;H.onPress;var Y=H.refKey,ie=Y===void 0?"ref":Y,ne=H.ref,ve=Ir(H,vY),Z=S.current.state,J=function(){c({type:b4})};return je(($={},$[ie]=zn(ne,function(ae){g.current=ae}),$["aria-controls"]=x.menuId,$["aria-expanded"]=Z.isOpen,$.id=x.toggleButtonId,$.tabIndex=-1,$),!ve.disabled&&je({},{onClick:st(q,J)}),ve)},[c,S,x]),V=C.useCallback(function(D,$){var H,q=D===void 0?{}:D,Y=q.onKeyDown,ie=q.onChange,ne=q.onInput,ve=q.onBlur;q.onChangeText;var Z=q.onClick,J=q.refKey,ae=J===void 0?"ref":J,he=q.ref,ue=Ir(q,gY),de=$===void 0?{}:$,le=de.suppressRefError,xe=le===void 0?!1:le;z("getInputProps",xe,ae,m);var Ee=S.current.state,Ie=function(ze){var Je=Ra(ze);Je&&j[Je]&&j[Je](ze)},Te=function(ze){c({type:H1,inputValue:ze.target.value})},Me=function(ze){if(i!=null&&i.document&&Ee.isOpen&&!M.isMouseDown){var Je=ze.relatedTarget===null&&i.document.activeElement!==i.document.body;c({type:Ku,selectItem:!Je})}},Ze=function(){c({type:W1})},tt="onChange",Fe={};if(!ue.disabled){var Le;Fe=(Le={},Le[tt]=st(ie,ne,Te),Le.onKeyDown=st(Y,Ie),Le.onBlur=st(ve,Me),Le.onClick=st(Z,Ze),Le)}return je((H={},H[ae]=zn(he,function(ze){m.current=ze}),H["aria-activedescendant"]=Ee.isOpen&&Ee.highlightedIndex>-1?x.getItemId(Ee.highlightedIndex):"",H["aria-autocomplete"]="list",H["aria-controls"]=x.menuId,H["aria-expanded"]=Ee.isOpen,H["aria-labelledby"]=ue&&ue["aria-label"]?void 0:x.labelId,H.autoComplete="off",H.id=x.inputId,H.role="combobox",H.value=Ee.inputValue,H),Fe,ue)},[c,x,i,j,S,M,z]),te=C.useCallback(function(){c({type:y4})},[c]),G=C.useCallback(function(){c({type:w4})},[c]),re=C.useCallback(function(){c({type:x4})},[c]),P=C.useCallback(function(D){c({type:S4,highlightedIndex:D})},[c]),B=C.useCallback(function(D){c({type:G1,selectedItem:D})},[c]),X=C.useCallback(function(D){c({type:E4,inputValue:D})},[c]),Q=C.useCallback(function(){c({type:_4})},[c]);return{getItemProps:A,getLabelProps:W,getMenuProps:U,getInputProps:V,getToggleButtonProps:K,toggleMenu:te,openMenu:re,closeMenu:G,setHighlightedIndex:P,setInputValue:X,selectItem:B,reset:Q,highlightedIndex:u,isOpen:d,selectedItem:h,inputValue:p}}var I4={activeIndex:-1,selectedItems:[]};function zC(e,t){return So(e,t,I4)}function LC(e,t){return ri(e,t,I4)}function mY(e){var t=zC(e,"activeIndex"),r=zC(e,"selectedItems");return{activeIndex:t,selectedItems:r}}function BC(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==""&&(t.selectionStart!==0||t.selectionEnd!==0))}function bY(e,t){return e.selectedItems===t.selectedItems&&e.activeIndex===t.activeIndex}var yY={stateReducer:bu.stateReducer,itemToKey:bu.itemToKey,environment:bu.environment,selectedItems:Se.array,initialSelectedItems:Se.array,defaultSelectedItems:Se.array,getA11yStatusMessage:Se.func,activeIndex:Se.number,initialActiveIndex:Se.number,defaultActiveIndex:Se.number,onActiveIndexChange:Se.func,onSelectedItemsChange:Se.func,keyNavigationNext:Se.string,keyNavigationPrevious:Se.string},xY={itemToKey:el.itemToKey,stateReducer:el.stateReducer,environment:el.environment,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},R4=Cr;process.env.NODE_ENV!=="production"&&(R4=function(e,t){Se.checkPropTypes(yY,e,"prop",t.name)});var Y1=process.env.NODE_ENV!=="production"?"__selected_item_click__":0,X1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_delete__":1,Z1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_backspace__":2,J1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_next__":3,Q1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_previous__":4,eS=process.env.NODE_ENV!=="production"?"__dropdown_keydown_navigation_previous__":5,tS=process.env.NODE_ENV!=="production"?"__dropdown_keydown_backspace__":6,rS=process.env.NODE_ENV!=="production"?"__dropdown_click__":7,nS=process.env.NODE_ENV!=="production"?"__function_add_selected_item__":8,iS=process.env.NODE_ENV!=="production"?"__function_remove_selected_item__":9,oS=process.env.NODE_ENV!=="production"?"__function_set_selected_items__":10,aS=process.env.NODE_ENV!=="production"?"__function_set_active_index__":11,sS=process.env.NODE_ENV!=="production"?"__function_reset__":12,wY=Object.freeze({__proto__:null,DropdownClick:rS,DropdownKeyDownBackspace:tS,DropdownKeyDownNavigationPrevious:eS,FunctionAddSelectedItem:nS,FunctionRemoveSelectedItem:iS,FunctionReset:sS,FunctionSetActiveIndex:aS,FunctionSetSelectedItems:oS,SelectedItemClick:Y1,SelectedItemKeyDownBackspace:Z1,SelectedItemKeyDownDelete:X1,SelectedItemKeyDownNavigationNext:J1,SelectedItemKeyDownNavigationPrevious:Q1});function SY(e,t){var r=t.type,n=t.index,i=t.props,o=t.selectedItem,a=e.activeIndex,s=e.selectedItems,c;switch(r){case Y1:c={activeIndex:n};break;case Q1:c={activeIndex:a-1<0?0:a-1};break;case J1:c={activeIndex:a+1>=s.length?-1:a+1};break;case Z1:case X1:{if(a<0)break;var d=a;s.length===1?d=-1:a===s.length-1&&(d=s.length-2),c=je({selectedItems:[].concat(s.slice(0,a),s.slice(a+1))},{activeIndex:d});break}case eS:c={activeIndex:s.length-1};break;case tS:c={selectedItems:s.slice(0,s.length-1)};break;case nS:c={selectedItems:[].concat(s,[o])};break;case rS:c={activeIndex:-1};break;case iS:{var u=a,h=s.findIndex(function(y){return i.itemToKey(y)===i.itemToKey(o)});if(h<0)break;s.length===1?u=-1:h===s.length-1&&(u=s.length-2),c={selectedItems:[].concat(s.slice(0,h),s.slice(h+1)),activeIndex:u};break}case oS:{var p=t.selectedItems;c={selectedItems:p};break}case aS:{var v=t.activeIndex;c={activeIndex:v};break}case sS:c={activeIndex:LC(i,"activeIndex"),selectedItems:LC(i,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return je({},e,c)}var EY=["refKey","ref","onClick","onKeyDown","selectedItem","index"],_Y=["refKey","ref","onKeyDown","onClick","preventKeyAction"];lS.stateChangeTypes=wY;function lS(e){e===void 0&&(e={}),R4(e,lS);var t=je({},xY,e),r=t.getA11yStatusMessage,n=t.environment,i=t.keyNavigationNext,o=t.keyNavigationPrevious,a=e4(SY,t,mY,bY),s=a[0],c=a[1],d=s.activeIndex,u=s.selectedItems,h=Cl(),p=C.useRef(null),v=C.useRef();v.current=[];var y=Sd({state:s,props:t});_1(r,s,[d,u],n),C.useEffect(function(){h||(d===-1&&p.current?p.current.focus():v.current[d]&&v.current[d].focus())},[d]),_d({props:t,state:s});var m=Ed("getDropdownProps"),g=C.useMemo(function(){var M;return M={},M[o]=function(){c({type:Q1})},M[i]=function(){c({type:J1})},M.Delete=function(){c({type:X1})},M.Backspace=function(){c({type:Z1})},M},[c,i,o]),w=C.useMemo(function(){var M;return M={},M[o]=function(z){BC(z)&&c({type:eS})},M.Backspace=function(z){BC(z)&&c({type:tS})},M},[c,o]),x=C.useCallback(function(M){var z,j=M===void 0?{}:M,W=j.refKey,U=W===void 0?"ref":W,A=j.ref,K=j.onClick,V=j.onKeyDown,te=j.selectedItem,G=j.index,re=Ir(j,EY),P=y.current.state,B=S1(te,G,P.selectedItems,"Pass either item or index to getSelectedItemProps!"),X=B[1],Q=X>-1&&X===P.activeIndex,D=function(){c({type:Y1,index:X})},$=function(H){var q=Ra(H);q&&g[q]&&g[q](H)};return je((z={},z[U]=zn(A,function(H){H&&v.current.push(H)}),z.tabIndex=Q?0:-1,z.onClick=st(K,D),z.onKeyDown=st(V,$),z),re)},[c,y,g]),_=C.useCallback(function(M,z){var j,W=M===void 0?{}:M,U=W.refKey,A=U===void 0?"ref":U,K=W.ref,V=W.onKeyDown,te=W.onClick,G=W.preventKeyAction,re=G===void 0?!1:G,P=Ir(W,_Y),B=z===void 0?{}:z,X=B.suppressRefError,Q=X===void 0?!1:X;m("getDropdownProps",Q,A,p);var D=function(H){var q=Ra(H);q&&w[q]&&w[q](H)},$=function(){c({type:rS})};return je((j={},j[A]=zn(K,function(H){H&&(p.current=H)}),j),!re&&{onKeyDown:st(V,D),onClick:st(te,$)},P)},[c,w,m]),S=C.useCallback(function(M){c({type:nS,selectedItem:M})},[c]),E=C.useCallback(function(M){c({type:iS,selectedItem:M})},[c]),I=C.useCallback(function(M){c({type:oS,selectedItems:M})},[c]),N=C.useCallback(function(M){c({type:aS,activeIndex:M})},[c]),T=C.useCallback(function(){c({type:sS})},[c]);return{getSelectedItemProps:x,getDropdownProps:_,addSelectedItem:S,removeSelectedItem:E,setSelectedItems:I,setActiveIndex:N,reset:T,selectedItems:u,activeIndex:d}}let OY=0;const CY=()=>{const e=C.useRef(null);return e.current===null&&(e.current=`select-${++OY}`),e.current},IY=e=>{const{items:t=[],isMulti:r=!1,isSearchable:n=!1,value:i,defaultValue:o,inputValue:a,onChange:s,onInputChange:c,getOptionLabel:d=le=>(le==null?void 0:le.label)||"",getOptionValue:u=le=>(le==null?void 0:le.value)||"",isOpen:h,onOpenChange:p,customOptionGenerator:v,disableInternalFiltering:y=!1,stateReducer:m,isDisabled:g=!1,clearSearchOnSelect:w=!1,closeMenuOnSelect:x,onSelectionComplete:_,id:S}=e,E=CY(),I=S||E,N=C.useCallback(le=>{const xe=d(le);if(typeof xe=="string")return xe;if(typeof xe=="number")return String(xe);const Ee=le;if(typeof Ee=="object"&&Ee!==null){if(typeof Ee.label=="string")return Ee.label;if(typeof Ee.name=="string")return Ee.name}return String(u(le))},[d,u]),T=le=>le?Array.isArray(le)?le:[le]:[],M=o!==void 0?o:i!==void 0?i:null,[z,j]=C.useState(()=>T(M)),[W,U]=C.useState(()=>{if(a!==void 0)return a;if(n&&!r){const le=T(M)[0];if(le!==void 0)return N(le)}return""}),[A,K]=C.useState(()=>h!==void 0?h:!1),V=i!==void 0?T(i):z,te=a!==void 0?a:W,G=h!==void 0?h:A,re=C.useRef(null),P=C.useRef(null),B=C.useRef(!1);C.useEffect(()=>{const le=xe=>{const Ee=xe.target,Ie=document.querySelectorAll(`[data-select-id="${I}"]`);B.current=Array.from(Ie).some(Te=>Te.contains(Ee))};return document.addEventListener("mousedown",le,!0),()=>document.removeEventListener("mousedown",le,!0)},[I]);const X=C.useCallback(le=>{h===void 0&&K(le),p==null||p(le)},[h,p]),Q=C.useCallback(le=>{i===void 0&&j(le);const xe=r?le:le[0]||null;s==null||s(xe)},[i,r,s]),D=C.useCallback(le=>{a===void 0&&U(le),c==null||c(le)},[a,c]),$=lS({selectedItems:V,onSelectedItemsChange:le=>{const xe=le.selectedItems||[];Q(xe)}}),H=C.useCallback(le=>{r&&$.removeSelectedItem(le)},[r,$]),q=C.useCallback(le=>{if(le){if(r)V.some(xe=>u(xe)===u(le))?H(le):$.addSelectedItem(le);else{const xe=V[0];(!xe||u(xe)!==u(le))&&Q([le])}_==null||_(u(le),le)}},[r,V,u,H,$,Q,_]);C.useEffect(()=>{if(P.current){const le=P.current;P.current=null,q(le)}}),C.useLayoutEffect(()=>{if(n&&G){const le=requestAnimationFrame(()=>{var xe;(xe=re.current)==null||xe.focus()});return()=>cancelAnimationFrame(le)}},[n,G]),C.useEffect(()=>{if(n&&!r&&a===void 0&&!G){const le=V[0],xe=le!==void 0?N(le):"";xe!==W&&U(xe)}},[V,G,n,r]);const[Y,ie]=C.useState(te);C.useEffect(()=>{const le=setTimeout(()=>ie(te),120);return()=>clearTimeout(le)},[te]);const ne=C.useMemo(()=>v?v(te,t):y||!n||!Y?t:t.filter(le=>N(le).toLowerCase().includes(Y.toLowerCase())),[t,te,Y,v,y,n,N]),ve={items:ne,itemToString:le=>le?N(le):"",isOpen:G,onIsOpenChange:({isOpen:le})=>{le!==void 0&&X(le)},selectedItem:r?null:V[0]||null},Z=le=>{const xe=new Map;for(const[Ee,Ie]of Object.entries(le.stateChangeTypes))xe.set(Ie,Ee);return(Ee,Ie)=>{const{changes:Te,type:Me}=Ie,Ze=x??!r,tt=[zr.stateChangeTypes.ItemClick,zr.stateChangeTypes.InputKeyDownEnter,zr.stateChangeTypes.FunctionSelectItem,xi.stateChangeTypes.ItemClick,xi.stateChangeTypes.ToggleButtonKeyDownEnter,xi.stateChangeTypes.ToggleButtonKeyDownSpaceButton,xi.stateChangeTypes.FunctionSelectItem].includes(Me);if((Me===zr.stateChangeTypes.InputBlur||Me===xi.stateChangeTypes.ToggleButtonBlur)&&typeof document<"u"){const Fe=document.activeElement,Le=document.querySelectorAll(`[data-select-id="${I}"]`),ze=!!Fe&&Array.from(Le).some(Pt=>Pt.contains(Fe)),Je=Fe===document.body,rt=r&&Je&&B.current;if(ze||rt)return{...Te,isOpen:!0}}if(tt){const Fe=Te.selectedItem||null;Fe&&(P.current=Fe);const Le={...Te};return r?(Le.selectedItem=null,Le.isOpen=!Ze,Le.highlightedIndex=Ee.highlightedIndex,Le.inputValue=""):Fe&&(w?Le.inputValue="":n&&(Le.inputValue=N(Fe)),x===!1&&(Le.isOpen=!0,Le.highlightedIndex=Ee.highlightedIndex)),Le}return n&&!tt&&Me!==zr.stateChangeTypes.InputChange&&(Me===zr.stateChangeTypes.ControlledPropUpdatedSelectedItem||Me===zr.stateChangeTypes.FunctionSetInputValue||Me===zr.stateChangeTypes.InputBlur||Me===zr.stateChangeTypes.FunctionReset)?{...Te,inputValue:Ee.inputValue}:m?m(Ee,{...Ie,type:xe.get(Ie.type)||Ie.type,changes:Te}):Te}},J=n?zr({...ve,inputValue:te,onInputValueChange:({inputValue:le,type:xe})=>{!r&&!le&&xe===zr.stateChangeTypes.InputChange&&Q([]),D(le||"")},stateReducer:Z(zr),id:I}):xi({...ve,stateReducer:Z(xi),id:I}),ae=C.useCallback(()=>{g||("toggleMenu"in J&&typeof J.toggleMenu=="function"?J.toggleMenu():X(!G))},[J,g,X,G]),he=C.useCallback(()=>{g||("openMenu"in J&&typeof J.openMenu=="function"?J.openMenu():X(!0))},[J,g,X]),ue=C.useCallback(()=>{"closeMenu"in J&&typeof J.closeMenu=="function"?J.closeMenu():X(!1)},[J,X]),de=C.useCallback(()=>{Q([]),D(""),r&&$.reset()},[Q,D,r,$]);return{isOpen:J.isOpen,selectedItem:J.selectedItem,highlightedIndex:J.highlightedIndex,inputValue:te,getToggleButtonProps:J.getToggleButtonProps,getMenuProps:J.getMenuProps,getItemProps:J.getItemProps,getInputProps:n?(le,xe)=>({..."getInputProps"in J?J.getInputProps(le,xe):{},ref:re,value:te}):void 0,selectedItems:V,filteredItems:ne,setInputValue:D,setIsOpen:X,toggleMenu:ae,openMenu:he,closeMenu:ue,clearSelection:de,selectItem:"selectItem"in J?J.selectItem:void 0,removeItem:H,multipleSelection:$,isMulti:r,isSearchable:n,inputRef:re,selectId:I}},N4=({size:e="md",color:t="primary",isInvalid:r=!1,isDisabled:n=!1,className:i,children:o,options:a=[],value:s,defaultValue:c,onChange:d,isMulti:u,inputValue:h,onInputChange:p,isSearchable:v,isOpen:y,onOpenChange:m,customOptionGenerator:g,disableInternalFiltering:w,getOptionLabel:x=j=>typeof j=="string"||typeof j=="number"?String(j):(j==null?void 0:j.label)||(j==null?void 0:j.name)||String(j),getOptionValue:_=j=>typeof j=="string"||typeof j=="number"?String(j):(j==null?void 0:j.value)||(j==null?void 0:j.id)||(j==null?void 0:j.name)||String(j),isOptionDisabled:S=j=>(j==null?void 0:j.isDisabled)||!1,stateReducer:E,clearSearchOnSelect:I,closeMenuOnSelect:N,inputClassName:T,onSelectionComplete:M,...z})=>{const[j,W]=C.useState(!1),[U,A]=C.useState(!1),K=C.useRef(null),[V,te]=C.useState(!1),[G,re]=C.useState("bottom"),P=C.useRef(new Set),B=C.useCallback(H=>(P.current.add(H),()=>P.current.delete(H)),[]),X=C.useCallback((H,q)=>{M==null||M(H,q),P.current.forEach(Y=>Y(H,q))},[M]),Q=C.useMemo(()=>bK(a),[a]),D=IY({items:Q,value:s,defaultValue:c,onChange:d,isMulti:u,inputValue:h,onInputChange:p,isSearchable:v,isOpen:y,onOpenChange:m,getOptionLabel:x,getOptionValue:_,customOptionGenerator:g,disableInternalFiltering:w,stateReducer:E,isDisabled:n,clearSearchOnSelect:I,closeMenuOnSelect:N,onSelectionComplete:X}),$={size:e,color:r?"negative":t,isInvalid:r,isDisabled:n,hasMessage:j,setHasMessage:W,hasGroup:U,setHasGroup:A,groupRef:K,menuVisible:V,setMenuVisible:te,menuPlacement:G,setMenuPlacement:re,downshift:D,options:a,getOptionLabel:x,getOptionValue:_,isOptionDisabled:S,inputClassName:T,registerOnSelectionComplete:B};return O.jsx(C3.Provider,{value:$,children:O.jsx("div",{"data-qui":"Select","data-select-id":D.selectId,className:ye(QG(),i),...z,children:o})})},RY=C.forwardRef(({className:e,children:t,isFocused:r,isDisabled:n,...i},o)=>{const{size:a,color:s,isDisabled:c,hasMessage:d,hasGroup:u,downshift:h,isInvalid:p,menuPlacement:v}=or(),y=n??c,m=r??h.isOpen;return O.jsx("div",{ref:o,className:ye(rK({size:a,color:s,isDisabled:y,isFocused:!!m,isInvalid:p&&!h.isOpen,hasMessage:d,hasGroup:u,menuPlacement:h.isOpen?v:void 0}),e),"aria-disabled":y,"aria-invalid":p,role:"combobox",tabIndex:y?-1:0,...i,children:t})}),NY=({className:e,children:t,isMulti:r})=>O.jsx("div",{className:ye(nK({isMulti:r}),e),children:t}),xu=C.forwardRef(({isHidden:e,inputClassName:t,className:r,...n},i)=>{const{size:o,color:a}=or();return e?O.jsx("input",{ref:i,type:"text",className:r,style:{position:"absolute",top:0,left:0,opacity:0,width:"100%",height:"100%",pointerEvents:"none"},tabIndex:-1,...n}):O.jsx("input",{ref:i,type:"text","data-qui":"SelectSearchInput",className:ye(iK({size:o,color:a}),t,e?"":r),...n})}),TY=({className:e,children:t})=>{const{size:r,color:n}=or();return O.jsx("div",{className:ye(oK({size:r,color:n}),e),children:t})},PY=({className:e,children:t,data:r,isDisabled:n})=>{const{size:i,color:o,getOptionLabel:a}=or();return O.jsx("div",{className:ye(aK({size:i,color:o,isDisabled:n}),e),children:t||a(r)})},T4=({className:e,children:t,data:r,isDisabled:n,isFocused:i,onRemove:o})=>{const{size:a,color:s,downshift:c,getOptionLabel:d}=or(),u=()=>{o?o(r):c.removeItem(r)};return O.jsxs("div",{className:ye(sK({size:a,color:s,isDisabled:n,isFocused:i}),e),children:[O.jsx("div",{className:lK({size:a}),children:t||d(r)}),!n&&O.jsx("div",{className:cK({size:a,color:s,isDisabled:!1}),onClick:u,children:O.jsx(hd,{className:"w-3 h-3"})})]})},P4=({color:e,className:t,children:r,onClick:n,isDisabled:i,...o})=>{const{size:a,color:s,isDisabled:c,downshift:d}=or(),u=i??c,h=d.selectedItems.length>0;if(u||!h)return null;const p=v=>{v.stopPropagation(),n?n(v):d.clearSelection()};return O.jsx("div",{className:ye(R3({size:a,color:e||s,isDisabled:u}),t),onClick:p,role:"button",tabIndex:0,"aria-label":"Clear selection",...o,children:r||O.jsx(QD,{})})},MY=({className:e,children:t,onClick:r,isDisabled:n,...i})=>{const{size:o,color:a,isDisabled:s,downshift:c}=or(),d=n??s,u=c.inputValue.length>0&&c.isSearchable;if(d||!u)return null;const h=p=>{d||(p.preventDefault(),p.stopPropagation(),r?r(p):(c.setInputValue(""),c.clearSelection()))};return O.jsx("div",{"data-qui":"SelectIndicator",className:ye(R3({size:o,color:a,isDisabled:d}),"cursor-pointer",e),onClick:h,onMouseDown:p=>{p.preventDefault(),p.stopPropagation()},role:"button",tabIndex:-1,"aria-label":"Clear selection",...i,children:t||O.jsx(hd,{})})},M4=C.forwardRef(({color:e,className:t,children:r,onClick:n,isDisabled:i,...o},a)=>{const{size:s,color:c,isDisabled:d,downshift:u}=or(),h=i??d,p=u.isOpen,v=m=>{h||(m.preventDefault(),m.stopPropagation(),n?n(m):u.toggleMenu())},y=m=>{m.preventDefault(),m.stopPropagation()};return O.jsx("div",{ref:a,"data-qui":"SelectIndicator",className:ye(uK({size:s,color:e||c,isDisabled:h}),"cursor-pointer",t),onClick:y,onMouseDown:v,role:"button",tabIndex:-1,"aria-label":p?"Close menu":"Open menu","aria-expanded":p,"aria-disabled":h,...o,children:r||O.jsx(rj,{className:ye("transition-transform duration-200",{"rotate-180":p})})})}),kY=C.forwardRef(({className:e,children:t,placement:r,...n},i)=>{const{size:o,hasMessage:a,color:s,hasGroup:c}=or();return O.jsx("div",{"data-qui":"SelectMenu",ref:i,className:ye(dK({size:o,placement:r,hasMessage:a,color:s,hasGroup:c}),e),...n,children:t})}),AY=C.forwardRef(({className:e,children:t,maxHeight:r=300,totalHeight:n,...i},o)=>{const{size:a}=or();return O.jsx(a1,{scrollableNodeProps:{ref:o},className:ye(fK({size:a}),e),style:{maxHeight:r},...i,children:n!==void 0?O.jsx("div",{style:{height:n,position:"relative",width:"100%"},children:t}):t})}),wu=({className:e,children:t,data:r,isDisabled:n,isFocused:i,isSelected:o,innerProps:a,optionClassName:s,...c})=>{const{size:d,color:u,getOptionLabel:h}=or();return O.jsx("div",{"data-qui":"SelectOption",className:ye(hK({size:d,color:u,isDisabled:n,isFocused:i,isSelected:o}),s,e),...a,...c,children:t??h(r)})},k4=({className:e,children:t,data:r,label:n,renderGroupHeading:i})=>{const{size:o}=or();return O.jsxs("div",{"data-qui":"SelectOptionGroup",className:ye(pK({size:o}),e),children:[O.jsx(DY,{children:i?i(r):n||r.label}),t]})},DY=({className:e,children:t})=>{const{size:r,color:n}=or();return O.jsx("div",{className:ye(vK({size:r,color:n}),e),children:t})},Gh=({className:e,children:t,inputValue:r})=>{const{size:n}=or();return O.jsx("div",{className:ye(mK({size:n}),e),children:t||`No options found${r?` for "${r}"`:""}`})},A4=C.forwardRef(({className:e,children:t,...r},n)=>{const{size:i,color:o,isDisabled:a,hasMessage:s,isInvalid:c,setHasGroup:d,groupRef:u,menuVisible:h,menuPlacement:p}=or();return C.useEffect(()=>(d(!0),()=>{d(!1)}),[d]),O.jsx("div",{ref:ga([n,u]),"data-qui":"SelectGroup",className:ye(eK({size:i,color:o,isDisabled:a,hasMessage:s,isInvalid:c,isFocused:h,menuPlacement:h?p:void 0}),e),...r,children:t})}),jY=C.forwardRef(({isAction:e=!1,className:t,isDisabled:r=!1,style:n,children:i,...o},a)=>{const{size:s,color:c,isDisabled:d}=or(),u=r||d,h=tK({size:s,color:c,isDisabled:u,isAction:e});return O.jsx("div",{ref:a,"data-qui":"SelectIcon",className:ye(h,t),style:n,role:e||o.onClick?"button":void 0,tabIndex:(e||o.onClick)&&!u?0:void 0,"aria-disabled":u,...o,children:i})}),qY=({isOpen:e,usePortal:t,controlRef:r,selectId:n,children:i})=>{const[o,a]=C.useState(null);return C.useLayoutEffect(()=>{if(t&&e&&r.current){const s=()=>{var c;const d=(c=r.current)==null?void 0:c.closest('[data-qui="SelectGroup"]'),u=d||r.current;if(!u)return;const h=u.getBoundingClientRect();a(d?{top:h.top+window.scrollY+d.clientTop,left:h.left+window.scrollX+d.clientLeft,width:d.clientWidth,height:d.clientHeight}:{top:h.top+window.scrollY,left:h.left+window.scrollX,width:h.width,height:h.height})};return s(),window.addEventListener("resize",s),window.addEventListener("scroll",s,!0),()=>{window.removeEventListener("resize",s),window.removeEventListener("scroll",s,!0)}}},[e,t,r]),e?t&&o?xn.createPortal(O.jsx("div",{"data-qui":"SelectPortal","data-select-id":n,style:{position:"absolute",top:o.top,left:o.left,width:o.width,height:o.height,zIndex:50,pointerEvents:"none"},children:O.jsx("div",{style:{pointerEvents:"auto"},children:i})}),document.body):O.jsx(O.Fragment,{children:i}):null},ga=e=>t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&"current"in r&&(r.current=t)})},zY=e=>{let t=0,r=window.innerHeight,n=e.parentElement;for(;n&&n!==document.body&&n!==document.documentElement;){const{overflowY:i}=window.getComputedStyle(n);if(i!=="visible"){const o=n.getBoundingClientRect();t=Math.max(t,o.top),r=Math.min(r,o.bottom)}n=n.parentElement}return{top:t,bottom:r}},D4=C.forwardRef(({placeholder:e,noOptionsMessage:t,hideNoOptions:r=!1,loadingMessage:n="Loading...",isClearable:i=!1,isSearchClearable:o=!1,isLoading:a=!1,isRequired:s=!1,hideIndicators:c=!1,hideDropdownIndicator:d=!1,searchPlacement:u="trigger",menuPlacement:h="bottom",hideSelectedOptions:p=!1,onFocus:v,onBlur:y,renderMenuHeader:m,formatOptionLabel:g,renderOption:w,optionClassName:x,renderValue:_,renderGroupHeading:S,inputRef:E,controlShouldRenderValue:I=!0,name:N,id:T,onSelectionComplete:M,"aria-label":z,"aria-labelledby":j,"aria-describedby":W,children:U,usePortal:A=!1,virtualizeThreshold:K=100,className:V,inputClassName:te,...G},re)=>{const{size:P,isInvalid:B,isDisabled:X,hasGroup:Q,downshift:D,options:$=[],getOptionLabel:H,getOptionValue:q,isOptionDisabled:Y,menuPlacement:ie,setMenuPlacement:ne,menuVisible:ve,setMenuVisible:Z,inputClassName:J}=or(),ae=te||J,he=C.useMemo(()=>{if(w)return w;if(g)return({data:ke})=>g(ke)},[w,g]),ue=C.useRef(null),de=E||ue,le=C.useRef(null),[xe,Ee]=C.useState(null),Ie=C.useRef(null),{isOpen:Te,openMenu:Me,selectedItem:Ze,inputValue:tt,highlightedIndex:Fe,getToggleButtonProps:Le,getMenuProps:ze,getInputProps:Je,getItemProps:rt,isMulti:Pt,isSearchable:gt,multipleSelection:Rt}=D,{getDropdownProps:qt}=Rt;C.useLayoutEffect(()=>{if(!Te)return;if(h==="top"||h==="bottom"){ne(h);return}const ke=le.current;if(!ke)return;const $e=()=>{const Ht=ke.getBoundingClientRect(),wr=A?{top:0,bottom:window.innerHeight}:zY(ke),Sr=wr.bottom-Ht.bottom,tr=Ht.top-wr.top,un=P==="sm"?22:P==="lg"?36:28,Yr=Math.min((D.filteredItems.length||1)*un+16,300),ci=xe==null?void 0:xe.getBoundingClientRect().height,Ni=ci&&ci>0?ci:Yr,Qa=Sr>=Ni;ne(!Qa&&tr>Sr?"top":"bottom")};$e(),window.addEventListener("resize",$e),window.addEventListener("scroll",$e,!0);const xr=xe&&typeof ResizeObserver<"u"?new ResizeObserver(()=>$e()):void 0;return xe&&(xr==null||xr.observe(xe)),()=>{window.removeEventListener("resize",$e),window.removeEventListener("scroll",$e,!0),xr==null||xr.disconnect()}},[Te,ne,P,D.filteredItems.length,h,A,xe]),C.useLayoutEffect(()=>{const ke=Te&&!(r&&D.filteredItems.length===0);return Z(ke),()=>Z(!1)},[Te,r,D.filteredItems.length,Z]);const Ot=Pt?D.selectedItems??[]:Ze?[Ze]:[],Gr=Ot.length>0,Kr=o&&!!tt&&!X&&!c,ar=i&&(Gr||!!tt)&&!X&&!c,Nn=!d&&!c,io=!Gr&&(!gt||!tt)||!I,zt={},Mt={};Object.entries(G).forEach(([ke,$e])=>{ke.startsWith("data-")||ke.startsWith("aria-")||ke==="role"?zt[ke]=$e:Mt[ke]=$e});const Lt=C.useMemo(()=>ga([le,re]),[re]),fr=ze({},{suppressRefError:!0}),kt=qt({preventKeyAction:Te}),At={ref:de,disabled:X,required:s,name:N,id:T,"aria-label":z,"aria-labelledby":j,"aria-describedby":W,"aria-invalid":B,onFocus:v,onBlur:y,...Mt},hr=gt?(Je==null?void 0:Je({...At,...kt}))??At:{...At,...kt},{ref:Mr,...Et}=hr,Bt=C.useMemo(()=>ga([Mr]),[Mr]),{ref:pr,...vr}=fr,yr=C.useRef(pr);yr.current=pr;const sr=C.useCallback(ke=>{Ee($e=>$e===ke?$e:ke),ga([yr.current])(ke)},[]),Tn=ke=>Ot.some($e=>q($e)===q(ke)),Un=ke=>p?ke.filter($e=>!Tn($e)):ke,Za=ke=>p?ke.map($e=>({...$e,options:Un($e.options)})).filter($e=>$e.options.length>0):ke,Gn=Nw($)?[]:Un(D.filteredItems),Ja={sm:22,md:28,lg:36}[P]??28,Kn=Gn.length>=K,Ri=JG({count:Kn?Gn.length:0,getScrollElement:()=>Ie.current,estimateSize:()=>Ja,overscan:5});C.useEffect(()=>{Kn&&Te&&Fe>=0&&Fe<Gn.length&&Ri.scrollToIndex(Fe,{align:"auto"})},[Fe,Kn,Te]);const{registerOnSelectionComplete:Bo}=or();C.useEffect(()=>{if(M)return Bo(M)},[M,Bo]);const Fo=gt?{}:Le({disabled:X,...kt,ref:ga([Lt,kt.ref])});return O.jsxs("div",{className:ye({relative:!Q,"flex-1 min-w-0":Q}),children:[O.jsxs(RY,{"data-qui":"SelectControl",className:V,...gt?{ref:ga([Lt,kt.ref])}:Fo,...zt,isFocused:ve,isDisabled:X,onClick:ke=>{ke.defaultPrevented||(gt?Me():D.toggleMenu())},children:[U||O.jsxs(NY,{isMulti:Pt,children:[Pt&&I&&Ot.map((ke,$e)=>O.jsx(T4,{data:ke,index:$e,isDisabled:X,children:_?_(ke):void 0},q(ke))),!Pt&&Gr&&I&&!gt&&O.jsx("div",{className:"flex items-center gap-2",children:O.jsx(PY,{data:Ot[0],isDisabled:X,children:_?_(Ot[0]):H(Ot[0])})}),gt&&u==="trigger"?O.jsx(xu,{ref:Bt,...Et,className:V,inputClassName:ae,placeholder:e}):O.jsxs(O.Fragment,{children:[O.jsx(xu,{ref:Bt,...Et,className:V,inputClassName:ae,isHidden:!0,readOnly:!0,value:Ot.map(ke=>q(ke)).join(",")}),io&&O.jsx(TY,{children:e})]})]}),O.jsxs("div",{className:ye("flex items-center size-fit gap-1",{hidden:!ar&&!Nn}),children:[Kr&&O.jsx(MY,{}),ar&&O.jsx(P4,{}),Nn&&O.jsx(M4,{...gt?Le({disabled:X,"aria-label":Te?"Close menu":"Open menu"}):{}})]})]}),!Te&&O.jsx("div",{ref:fr.ref,style:{display:"none"},"aria-hidden":"true"}),O.jsx(qY,{isOpen:Te,usePortal:A,controlRef:le,selectId:D.selectId,children:r&&D.filteredItems.length===0?O.jsx("div",{...vr,style:{display:"none"},"aria-hidden":"true"}):O.jsxs(kY,{ref:sr,...vr,placement:ie,children:[m&&m(D),gt&&u==="menu"&&O.jsx("div",{className:"p-2",children:O.jsx(xu,{ref:Bt,...Et,className:V,inputClassName:ae,autoFocus:!0,placeholder:e,onClick:ke=>ke.stopPropagation()})}),O.jsx(AY,{ref:Ie,totalHeight:Kn?Ri.getTotalSize():void 0,children:a?O.jsx("div",{className:gK({size:P}),children:n}):D.filteredItems.length===0?O.jsx(Gh,{inputValue:tt,children:typeof t=="function"?t(tt):t}):Nw($)?(()=>{const ke=Za($);return ke.length===0?O.jsx(Gh,{inputValue:tt,children:typeof t=="function"?t(tt):t}):ke.map(($e,xr)=>O.jsx(k4,{data:$e,label:$e.label,options:$e.options,renderGroupHeading:S,children:$e.options.map(Ht=>{const wr=q(Ht),Sr=Ot.some(Ni=>q(Ni)===wr),tr=D.filteredItems.indexOf(Ht),un=Fe===tr,Yr=Y(Ht),ci=rt({item:Ht,index:tr});return O.jsx(wu,{...ci,data:Ht,isDisabled:Yr,isFocused:un,isSelected:Sr,optionClassName:x,children:he?he({data:Ht,isFocused:un,isSelected:Sr,isDisabled:Yr}):void 0},`${wr}-${tr}`)})},`${$e.label}-${xr}`))})():Gn.length===0?O.jsx(Gh,{inputValue:tt,children:typeof t=="function"?t(tt):t}):Kn?Ri.getVirtualItems().map(ke=>{const $e=Gn[ke.index],xr=q($e),Ht=Ot.some(Yr=>q(Yr)===xr),wr=D.filteredItems.indexOf($e),Sr=Fe===wr,tr=Y($e),un=rt({item:$e,index:wr});return O.jsx("div",{"data-index":ke.index,ref:Ri.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${ke.start}px)`},children:O.jsx(wu,{...un,data:$e,isDisabled:tr,isFocused:Sr,isSelected:Ht,optionClassName:x,children:he?he({data:$e,isFocused:Sr,isSelected:Ht,isDisabled:tr}):void 0})},ke.key)}):Gn.map(ke=>{const $e=q(ke),xr=Ot.some(un=>q(un)===$e),Ht=D.filteredItems.indexOf(ke),wr=Fe===Ht,Sr=Y(ke),tr=rt({item:ke,index:Ht});return O.jsx(wu,{...tr,data:ke,isDisabled:Sr,isFocused:wr,isSelected:xr,optionClassName:x,children:he?he({data:ke,isFocused:wr,isSelected:xr,isDisabled:Sr}):void 0},`${$e}-${Ht}`)})})]})})]})});N4.displayName="Select.Root";A4.displayName="Select.Group";jY.displayName="Select.Icon";xu.displayName="Select.Input";T4.displayName="Select.MultiValue";P4.displayName="Select.ClearIndicator";M4.displayName="Select.DropdownIndicator";wu.displayName="Select.Option";k4.displayName="Select.OptionGroup";const LY=D4;LY.displayName="Select.Field";const Kh={Root:N4,Group:A4,Field:D4};C.createContext(void 0);const BY=({active:e,disabled:t,error:r,isOpen:n,className:i})=>ye("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":e&&!t,"text-negative":r&&!e&&!t,"bg-primary-hover text-body":n&&!e&&!t,"text-body":!e&&!t&&!r,"hover:bg-primary-hover hover:text-tab-active-fg":!t&&!e},i),FY=C.forwardRef(({active:e,disabled:t,error:r,isOpen:n,className:i,children:o,as:a="div",...s},c)=>{const d=BY({active:e,disabled:t,error:r,isOpen:n,className:i});return O.jsx(a,{"data-qui":"ListItem",ref:c,className:d,"aria-disabled":t,"aria-selected":e,"aria-invalid":r,"aria-expanded":n,role:s.onClick?"button":"listitem",...s,children:o})});FY.displayName="ListItem";function $Y({qodly:e,activeTab:t,forceLogin:r,canUndo:n,canRedo:i,onUndo:o,onRedo:a,onTabChange:s,restrictedByDefault:c,onRestrictedByDefaultChange:d,onForceLoginChange:u}){return O.jsx(O.Fragment,{children:O.jsx(br,{depth:1,className:"relative mb-0 flex h-auto flex-wrap items-center justify-between border-b px-4 py-3",children:O.jsx("div",{className:"flex w-full flex-wrap items-center justify-between",children:O.jsxs("div",{className:"relative flex w-full justify-between",children:[O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsxs(zh,{defaultValue:t,onTabChange:h=>s(h),children:[O.jsx(zh.Item,{label:"Roles",value:"roles","data-cy":"roles_btn_navbar",className:"min-w-[110px] place-content-center"}),O.jsx(zh.Item,{label:"Privileges",value:"privileges","data-cy":"privileges_btn_navbar",className:"min-w-[110px] place-content-center"})]}),O.jsxs("div",{className:"flex items-center gap-1",children:[O.jsx(pe.ToolbarIcon,{"data-cy":"roles-toolbar-undo-button",label:"Undo",disabled:!n,Icon:Tu.FdUndo,as:"button",onClick:n?o:void 0}),O.jsx(pe.ToolbarIcon,{"data-cy":"roles-toolbar-redo-button",label:"Redo",disabled:!i,Icon:Tu.FdRedo,as:"button",onClick:i?a:void 0})]})]}),O.jsxs("div",{className:"flex gap-2 justify-between",children:[O.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[O.jsx(Fu,{checked:c||!1,onChange:h=>{d(h)}}),O.jsx("span",{className:"px-1 text-xs",children:"Restrict Access By Default"}),O.jsx(pe.Tip,{tipKey:"editors:roles:toolbar:restrictedByDefault",alwaysOn:!0,side:"left"})]}),e===!1&&O.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[O.jsx(Fu,{checked:r||!1,onChange:h=>{u(h)}}),O.jsx("span",{className:"px-1 text-xs",children:"Force login"}),O.jsx(pe.Tip,{tipKey:"editors:roles:toolbar:forceLogin",alwaysOn:!0,side:"left"})]})]})]})})})})}const j4=C.createContext(void 0),VY=({children:e})=>{const[t,r]=C.useState(null),[n,i]=C.useState(null);function o(s){r(s),setTimeout(()=>i(s),0)}const a={selectedRole:t,deferredSelectedRole:n,selectRole:o};return O.jsx(j4.Provider,{value:a,children:e})};function cS(){const e=C.useContext(j4);if(e===void 0)throw new Error("useSelectedRole must be used within a SelectedRoleProvider");return e}var FC=function(t){return t.reduce(function(r,n){var i=n[0],o=n[1];return r[i]=o,r},{})},$C=typeof window<"u"&&window.document&&window.document.createElement?nt.useLayoutEffect:nt.useEffect,$r="top",En="bottom",_n="right",Vr="left",uS="auto",Il=[$r,En,_n,Vr],Na="start",dl="end",HY="clippingParents",q4="viewport",Es="popper",WY="reference",VC=Il.reduce(function(e,t){return e.concat([t+"-"+Na,t+"-"+dl])},[]),z4=[].concat(Il,[uS]).reduce(function(e,t){return e.concat([t,t+"-"+Na,t+"-"+dl])},[]),UY="beforeRead",GY="read",KY="afterRead",YY="beforeMain",XY="main",ZY="afterMain",JY="beforeWrite",QY="write",eX="afterWrite",tX=[UY,GY,KY,YY,XY,ZY,JY,QY,eX];function ai(e){return e?(e.nodeName||"").toLowerCase():null}function sn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function To(e){var t=sn(e).Element;return e instanceof t||e instanceof Element}function Sn(e){var t=sn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function dS(e){if(typeof ShadowRoot>"u")return!1;var t=sn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function rX(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},o=t.elements[r];!Sn(o)||!ai(o)||(Object.assign(o.style,n),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function nX(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 i=t.elements[n],o=t.attributes[n]||{},a=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),s=a.reduce(function(c,d){return c[d]="",c},{});!Sn(i)||!ai(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const iX={name:"applyStyles",enabled:!0,phase:"write",fn:rX,effect:nX,requires:["computeStyles"]};function ni(e){return e.split("-")[0]}var _o=Math.max,Yu=Math.min,Ta=Math.round;function kw(){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 L4(){return!/^((?!chrome|android).)*safari/i.test(kw())}function Pa(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&Sn(e)&&(i=e.offsetWidth>0&&Ta(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Ta(n.height)/e.offsetHeight||1);var a=To(e)?sn(e):window,s=a.visualViewport,c=!L4()&&r,d=(n.left+(c&&s?s.offsetLeft:0))/i,u=(n.top+(c&&s?s.offsetTop:0))/o,h=n.width/i,p=n.height/o;return{width:h,height:p,top:u,right:d+h,bottom:u+p,left:d,x:d,y:u}}function fS(e){var t=Pa(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 B4(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&dS(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ei(e){return sn(e).getComputedStyle(e)}function oX(e){return["table","td","th"].indexOf(ai(e))>=0}function Qi(e){return((To(e)?e.ownerDocument:e.document)||window.document).documentElement}function Od(e){return ai(e)==="html"?e:e.assignedSlot||e.parentNode||(dS(e)?e.host:null)||Qi(e)}function HC(e){return!Sn(e)||Ei(e).position==="fixed"?null:e.offsetParent}function aX(e){var t=/firefox/i.test(kw()),r=/Trident/i.test(kw());if(r&&Sn(e)){var n=Ei(e);if(n.position==="fixed")return null}var i=Od(e);for(dS(i)&&(i=i.host);Sn(i)&&["html","body"].indexOf(ai(i))<0;){var o=Ei(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Rl(e){for(var t=sn(e),r=HC(e);r&&oX(r)&&Ei(r).position==="static";)r=HC(r);return r&&(ai(r)==="html"||ai(r)==="body"&&Ei(r).position==="static")?t:r||aX(e)||t}function hS(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function tl(e,t,r){return _o(e,Yu(t,r))}function sX(e,t,r){var n=tl(e,t,r);return n>r?r:n}function F4(){return{top:0,right:0,bottom:0,left:0}}function $4(e){return Object.assign({},F4(),e)}function V4(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var lX=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,$4(typeof t!="number"?t:V4(t,Il))};function cX(e){var t,r=e.state,n=e.name,i=e.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,s=ni(r.placement),c=hS(s),d=[Vr,_n].indexOf(s)>=0,u=d?"height":"width";if(!(!o||!a)){var h=lX(i.padding,r),p=fS(o),v=c==="y"?$r:Vr,y=c==="y"?En:_n,m=r.rects.reference[u]+r.rects.reference[c]-a[c]-r.rects.popper[u],g=a[c]-r.rects.reference[c],w=Rl(o),x=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,_=m/2-g/2,S=h[v],E=x-p[u]-h[y],I=x/2-p[u]/2+_,N=tl(S,I,E),T=c;r.modifiersData[n]=(t={},t[T]=N,t.centerOffset=N-I,t)}}function uX(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||B4(t.elements.popper,i)&&(t.elements.arrow=i))}const dX={name:"arrow",enabled:!0,phase:"main",fn:cX,effect:uX,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ma(e){return e.split("-")[1]}var fX={top:"auto",right:"auto",bottom:"auto",left:"auto"};function hX(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:Ta(r*i)/i||0,y:Ta(n*i)/i||0}}function WC(e){var t,r=e.popper,n=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,c=e.gpuAcceleration,d=e.adaptive,u=e.roundOffsets,h=e.isFixed,p=a.x,v=p===void 0?0:p,y=a.y,m=y===void 0?0:y,g=typeof u=="function"?u({x:v,y:m}):{x:v,y:m};v=g.x,m=g.y;var w=a.hasOwnProperty("x"),x=a.hasOwnProperty("y"),_=Vr,S=$r,E=window;if(d){var I=Rl(r),N="clientHeight",T="clientWidth";if(I===sn(r)&&(I=Qi(r),Ei(I).position!=="static"&&s==="absolute"&&(N="scrollHeight",T="scrollWidth")),I=I,i===$r||(i===Vr||i===_n)&&o===dl){S=En;var M=h&&I===E&&E.visualViewport?E.visualViewport.height:I[N];m-=M-n.height,m*=c?1:-1}if(i===Vr||(i===$r||i===En)&&o===dl){_=_n;var z=h&&I===E&&E.visualViewport?E.visualViewport.width:I[T];v-=z-n.width,v*=c?1:-1}}var j=Object.assign({position:s},d&&fX),W=u===!0?hX({x:v,y:m},sn(r)):{x:v,y:m};if(v=W.x,m=W.y,c){var U;return Object.assign({},j,(U={},U[S]=x?"0":"",U[_]=w?"0":"",U.transform=(E.devicePixelRatio||1)<=1?"translate("+v+"px, "+m+"px)":"translate3d("+v+"px, "+m+"px, 0)",U))}return Object.assign({},j,(t={},t[S]=x?m+"px":"",t[_]=w?v+"px":"",t.transform="",t))}function pX(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,o=r.adaptive,a=o===void 0?!0:o,s=r.roundOffsets,c=s===void 0?!0:s,d={placement:ni(t.placement),variation:Ma(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,WC(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,WC(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const vX={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:pX,data:{}};var Uc={passive:!0};function gX(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,o=i===void 0?!0:i,a=n.resize,s=a===void 0?!0:a,c=sn(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(u){u.addEventListener("scroll",r.update,Uc)}),s&&c.addEventListener("resize",r.update,Uc),function(){o&&d.forEach(function(u){u.removeEventListener("scroll",r.update,Uc)}),s&&c.removeEventListener("resize",r.update,Uc)}}const mX={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:gX,data:{}};var bX={left:"right",right:"left",bottom:"top",top:"bottom"};function Su(e){return e.replace(/left|right|bottom|top/g,function(t){return bX[t]})}var yX={start:"end",end:"start"};function UC(e){return e.replace(/start|end/g,function(t){return yX[t]})}function pS(e){var t=sn(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function vS(e){return Pa(Qi(e)).left+pS(e).scrollLeft}function xX(e,t){var r=sn(e),n=Qi(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,c=0;if(i){o=i.width,a=i.height;var d=L4();(d||!d&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:s+vS(e),y:c}}function wX(e){var t,r=Qi(e),n=pS(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=_o(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=_o(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+vS(e),c=-n.scrollTop;return Ei(i||r).direction==="rtl"&&(s+=_o(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:c}}function gS(e){var t=Ei(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function H4(e){return["html","body","#document"].indexOf(ai(e))>=0?e.ownerDocument.body:Sn(e)&&gS(e)?e:H4(Od(e))}function rl(e,t){var r;t===void 0&&(t=[]);var n=H4(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=sn(n),a=i?[o].concat(o.visualViewport||[],gS(n)?n:[]):n,s=t.concat(a);return i?s:s.concat(rl(Od(a)))}function Aw(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function SX(e,t){var r=Pa(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 GC(e,t,r){return t===q4?Aw(xX(e,r)):To(t)?SX(t,r):Aw(wX(Qi(e)))}function EX(e){var t=rl(Od(e)),r=["absolute","fixed"].indexOf(Ei(e).position)>=0,n=r&&Sn(e)?Rl(e):e;return To(n)?t.filter(function(i){return To(i)&&B4(i,n)&&ai(i)!=="body"}):[]}function _X(e,t,r,n){var i=t==="clippingParents"?EX(e):[].concat(t),o=[].concat(i,[r]),a=o[0],s=o.reduce(function(c,d){var u=GC(e,d,n);return c.top=_o(u.top,c.top),c.right=Yu(u.right,c.right),c.bottom=Yu(u.bottom,c.bottom),c.left=_o(u.left,c.left),c},GC(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 W4(e){var t=e.reference,r=e.element,n=e.placement,i=n?ni(n):null,o=n?Ma(n):null,a=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,c;switch(i){case $r:c={x:a,y:t.y-r.height};break;case En:c={x:a,y:t.y+t.height};break;case _n:c={x:t.x+t.width,y:s};break;case Vr:c={x:t.x-r.width,y:s};break;default:c={x:t.x,y:t.y}}var d=i?hS(i):null;if(d!=null){var u=d==="y"?"height":"width";switch(o){case Na:c[d]=c[d]-(t[u]/2-r[u]/2);break;case dl:c[d]=c[d]+(t[u]/2-r[u]/2);break}}return c}function fl(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,o=r.strategy,a=o===void 0?e.strategy:o,s=r.boundary,c=s===void 0?HY:s,d=r.rootBoundary,u=d===void 0?q4:d,h=r.elementContext,p=h===void 0?Es:h,v=r.altBoundary,y=v===void 0?!1:v,m=r.padding,g=m===void 0?0:m,w=$4(typeof g!="number"?g:V4(g,Il)),x=p===Es?WY:Es,_=e.rects.popper,S=e.elements[y?x:p],E=_X(To(S)?S:S.contextElement||Qi(e.elements.popper),c,u,a),I=Pa(e.elements.reference),N=W4({reference:I,element:_,placement:i}),T=Aw(Object.assign({},_,N)),M=p===Es?T:I,z={top:E.top-M.top+w.top,bottom:M.bottom-E.bottom+w.bottom,left:E.left-M.left+w.left,right:M.right-E.right+w.right},j=e.modifiersData.offset;if(p===Es&&j){var W=j[i];Object.keys(z).forEach(function(U){var A=[_n,En].indexOf(U)>=0?1:-1,K=[$r,En].indexOf(U)>=0?"y":"x";z[U]+=W[K]*A})}return z}function OX(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,o=r.rootBoundary,a=r.padding,s=r.flipVariations,c=r.allowedAutoPlacements,d=c===void 0?z4:c,u=Ma(n),h=u?s?VC:VC.filter(function(y){return Ma(y)===u}):Il,p=h.filter(function(y){return d.indexOf(y)>=0});p.length===0&&(p=h);var v=p.reduce(function(y,m){return y[m]=fl(e,{placement:m,boundary:i,rootBoundary:o,padding:a})[ni(m)],y},{});return Object.keys(v).sort(function(y,m){return v[y]-v[m]})}function CX(e){if(ni(e)===uS)return[];var t=Su(e);return[UC(e),t,UC(t)]}function IX(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,s=a===void 0?!0:a,c=r.fallbackPlacements,d=r.padding,u=r.boundary,h=r.rootBoundary,p=r.altBoundary,v=r.flipVariations,y=v===void 0?!0:v,m=r.allowedAutoPlacements,g=t.options.placement,w=ni(g),x=w===g,_=c||(x||!y?[Su(g)]:CX(g)),S=[g].concat(_).reduce(function(D,$){return D.concat(ni($)===uS?OX(t,{placement:$,boundary:u,rootBoundary:h,padding:d,flipVariations:y,allowedAutoPlacements:m}):$)},[]),E=t.rects.reference,I=t.rects.popper,N=new Map,T=!0,M=S[0],z=0;z<S.length;z++){var j=S[z],W=ni(j),U=Ma(j)===Na,A=[$r,En].indexOf(W)>=0,K=A?"width":"height",V=fl(t,{placement:j,boundary:u,rootBoundary:h,altBoundary:p,padding:d}),te=A?U?_n:Vr:U?En:$r;E[K]>I[K]&&(te=Su(te));var G=Su(te),re=[];if(o&&re.push(V[W]<=0),s&&re.push(V[te]<=0,V[G]<=0),re.every(function(D){return D})){M=j,T=!1;break}N.set(j,re)}if(T)for(var P=y?3:1,B=function($){var H=S.find(function(q){var Y=N.get(q);if(Y)return Y.slice(0,$).every(function(ie){return ie})});if(H)return M=H,"break"},X=P;X>0;X--){var Q=B(X);if(Q==="break")break}t.placement!==M&&(t.modifiersData[n]._skip=!0,t.placement=M,t.reset=!0)}}const RX={name:"flip",enabled:!0,phase:"main",fn:IX,requiresIfExists:["offset"],data:{_skip:!1}};function KC(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 YC(e){return[$r,_n,En,Vr].some(function(t){return e[t]>=0})}function NX(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=fl(t,{elementContext:"reference"}),s=fl(t,{altBoundary:!0}),c=KC(a,n),d=KC(s,i,o),u=YC(c),h=YC(d);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":h})}const TX={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:NX};function PX(e,t,r){var n=ni(e),i=[Vr,$r].indexOf(n)>=0?-1:1,o=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Vr,_n].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}function MX(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=i===void 0?[0,0]:i,a=z4.reduce(function(u,h){return u[h]=PX(h,t.rects,o),u},{}),s=a[t.placement],c=s.x,d=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[n]=a}const kX={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:MX};function AX(e){var t=e.state,r=e.name;t.modifiersData[r]=W4({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const DX={name:"popperOffsets",enabled:!0,phase:"read",fn:AX,data:{}};function jX(e){return e==="x"?"y":"x"}function qX(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,s=a===void 0?!1:a,c=r.boundary,d=r.rootBoundary,u=r.altBoundary,h=r.padding,p=r.tether,v=p===void 0?!0:p,y=r.tetherOffset,m=y===void 0?0:y,g=fl(t,{boundary:c,rootBoundary:d,padding:h,altBoundary:u}),w=ni(t.placement),x=Ma(t.placement),_=!x,S=hS(w),E=jX(S),I=t.modifiersData.popperOffsets,N=t.rects.reference,T=t.rects.popper,M=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,z=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,W={x:0,y:0};if(I){if(o){var U,A=S==="y"?$r:Vr,K=S==="y"?En:_n,V=S==="y"?"height":"width",te=I[S],G=te+g[A],re=te-g[K],P=v?-T[V]/2:0,B=x===Na?N[V]:T[V],X=x===Na?-T[V]:-N[V],Q=t.elements.arrow,D=v&&Q?fS(Q):{width:0,height:0},$=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:F4(),H=$[A],q=$[K],Y=tl(0,N[V],D[V]),ie=_?N[V]/2-P-Y-H-z.mainAxis:B-Y-H-z.mainAxis,ne=_?-N[V]/2+P+Y+q+z.mainAxis:X+Y+q+z.mainAxis,ve=t.elements.arrow&&Rl(t.elements.arrow),Z=ve?S==="y"?ve.clientTop||0:ve.clientLeft||0:0,J=(U=j==null?void 0:j[S])!=null?U:0,ae=te+ie-J-Z,he=te+ne-J,ue=tl(v?Yu(G,ae):G,te,v?_o(re,he):re);I[S]=ue,W[S]=ue-te}if(s){var de,le=S==="x"?$r:Vr,xe=S==="x"?En:_n,Ee=I[E],Ie=E==="y"?"height":"width",Te=Ee+g[le],Me=Ee-g[xe],Ze=[$r,Vr].indexOf(w)!==-1,tt=(de=j==null?void 0:j[E])!=null?de:0,Fe=Ze?Te:Ee-N[Ie]-T[Ie]-tt+z.altAxis,Le=Ze?Ee+N[Ie]+T[Ie]-tt-z.altAxis:Me,ze=v&&Ze?sX(Fe,Ee,Le):tl(v?Fe:Te,Ee,v?Le:Me);I[E]=ze,W[E]=ze-Ee}t.modifiersData[n]=W}}const zX={name:"preventOverflow",enabled:!0,phase:"main",fn:qX,requiresIfExists:["offset"]};function LX(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function BX(e){return e===sn(e)||!Sn(e)?pS(e):LX(e)}function FX(e){var t=e.getBoundingClientRect(),r=Ta(t.width)/e.offsetWidth||1,n=Ta(t.height)/e.offsetHeight||1;return r!==1||n!==1}function $X(e,t,r){r===void 0&&(r=!1);var n=Sn(t),i=Sn(t)&&FX(t),o=Qi(t),a=Pa(e,i,r),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((ai(t)!=="body"||gS(o))&&(s=BX(t)),Sn(t)?(c=Pa(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=vS(o))),{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function VX(e){var t=new Map,r=new Set,n=[];e.forEach(function(o){t.set(o.name,o)});function i(o){r.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!r.has(s)){var c=t.get(s);c&&i(c)}}),n.push(o)}return e.forEach(function(o){r.has(o.name)||i(o)}),n}function HX(e){var t=VX(e);return tX.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function WX(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function UX(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var XC={placement:"bottom",modifiers:[],strategy:"absolute"};function ZC(){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 GX(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,o=i===void 0?XC:i;return function(s,c,d){d===void 0&&(d=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},XC,o),modifiersData:{},elements:{reference:s,popper:c},attributes:{},styles:{}},h=[],p=!1,v={state:u,setOptions:function(w){var x=typeof w=="function"?w(u.options):w;m(),u.options=Object.assign({},o,u.options,x),u.scrollParents={reference:To(s)?rl(s):s.contextElement?rl(s.contextElement):[],popper:rl(c)};var _=HX(UX([].concat(n,u.options.modifiers)));return u.orderedModifiers=_.filter(function(S){return S.enabled}),y(),v.update()},forceUpdate:function(){if(!p){var w=u.elements,x=w.reference,_=w.popper;if(ZC(x,_)){u.rects={reference:$X(x,Rl(_),u.options.strategy==="fixed"),popper:fS(_)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(z){return u.modifiersData[z.name]=Object.assign({},z.data)});for(var S=0;S<u.orderedModifiers.length;S++){if(u.reset===!0){u.reset=!1,S=-1;continue}var E=u.orderedModifiers[S],I=E.fn,N=E.options,T=N===void 0?{}:N,M=E.name;typeof I=="function"&&(u=I({state:u,options:T,name:M,instance:v})||u)}}}},update:WX(function(){return new Promise(function(g){v.forceUpdate(),g(u)})}),destroy:function(){m(),p=!0}};if(!ZC(s,c))return v;v.setOptions(d).then(function(g){!p&&d.onFirstUpdate&&d.onFirstUpdate(g)});function y(){u.orderedModifiers.forEach(function(g){var w=g.name,x=g.options,_=x===void 0?{}:x,S=g.effect;if(typeof S=="function"){var E=S({state:u,name:w,instance:v,options:_}),I=function(){};h.push(E||I)}})}function m(){h.forEach(function(g){return g()}),h=[]}return v}}var KX=[mX,DX,vX,iX,kX,RX,zX,dX,TX],YX=GX({defaultModifiers:KX}),jt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function eo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yh,JC;function XX(){if(JC)return Yh;JC=1;var e=typeof Element<"u",t=typeof Map=="function",r=typeof Set=="function",n=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function i(o,a){if(o===a)return!0;if(o&&a&&typeof o=="object"&&typeof a=="object"){if(o.constructor!==a.constructor)return!1;var s,c,d;if(Array.isArray(o)){if(s=o.length,s!=a.length)return!1;for(c=s;c--!==0;)if(!i(o[c],a[c]))return!1;return!0}var u;if(t&&o instanceof Map&&a instanceof Map){if(o.size!==a.size)return!1;for(u=o.entries();!(c=u.next()).done;)if(!a.has(c.value[0]))return!1;for(u=o.entries();!(c=u.next()).done;)if(!i(c.value[1],a.get(c.value[0])))return!1;return!0}if(r&&o instanceof Set&&a instanceof Set){if(o.size!==a.size)return!1;for(u=o.entries();!(c=u.next()).done;)if(!a.has(c.value[0]))return!1;return!0}if(n&&ArrayBuffer.isView(o)&&ArrayBuffer.isView(a)){if(s=o.length,s!=a.length)return!1;for(c=s;c--!==0;)if(o[c]!==a[c])return!1;return!0}if(o.constructor===RegExp)return o.source===a.source&&o.flags===a.flags;if(o.valueOf!==Object.prototype.valueOf&&typeof o.valueOf=="function"&&typeof a.valueOf=="function")return o.valueOf()===a.valueOf();if(o.toString!==Object.prototype.toString&&typeof o.toString=="function"&&typeof a.toString=="function")return o.toString()===a.toString();if(d=Object.keys(o),s=d.length,s!==Object.keys(a).length)return!1;for(c=s;c--!==0;)if(!Object.prototype.hasOwnProperty.call(a,d[c]))return!1;if(e&&o instanceof Element)return!1;for(c=s;c--!==0;)if(!((d[c]==="_owner"||d[c]==="__v"||d[c]==="__o")&&o.$$typeof)&&!i(o[d[c]],a[d[c]]))return!1;return!0}return o!==o&&a!==a}return Yh=function(a,s){try{return i(a,s)}catch(c){if((c.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw c}},Yh}var ZX=XX();const JX=eo(ZX);var QX=[],Cd=function(t,r,n){n===void 0&&(n={});var i=nt.useRef(null),o={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||QX},a=nt.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=a[0],c=a[1],d=nt.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(v){var y=v.state,m=Object.keys(y.elements);gV.flushSync(function(){c({styles:FC(m.map(function(g){return[g,y.styles[g]||{}]})),attributes:FC(m.map(function(g){return[g,y.attributes[g]]}))})})},requires:["computeStyles"]}},[]),u=nt.useMemo(function(){var p={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[].concat(o.modifiers,[d,{name:"applyStyles",enabled:!1}])};return JX(i.current,p)?i.current||p:(i.current=p,p)},[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,d]),h=nt.useRef();return $C(function(){h.current&&h.current.setOptions(u)},[u]),$C(function(){if(!(t==null||r==null)){var p=n.createPopper||YX,v=p(t,r,u);return h.current=v,function(){v.destroy(),h.current=null}}},[t,r,n.createPopper]),{state:h.current?h.current.state:null,styles:s.styles,attributes:s.attributes,update:h.current?h.current.update:null,forceUpdate:h.current?h.current.forceUpdate:null}};const U4=({tab:e})=>O.jsx(br,{depth:1,className:"flex flex-1 items-center justify-center border-l-[0.5px]",children:O.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-4 text-inactive-text",children:[O.jsx(on,{className:"h-10 w-10"}),O.jsxs("div",{className:"font-semibold",children:["No ",e," Selected"]}),O.jsxs("div",{className:"text-sm",children:["Click on a ",e," in the Sidebar to select it."]})]})});function mS(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 Xh,QC;function eZ(){if(QC)return Xh;QC=1;function e(){this.__data__=[],this.size=0}return Xh=e,Xh}var Zh,e2;function Va(){if(e2)return Zh;e2=1;function e(t,r){return t===r||t!==t&&r!==r}return Zh=e,Zh}var Jh,t2;function Id(){if(t2)return Jh;t2=1;var e=Va();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return Jh=t,Jh}var Qh,r2;function tZ(){if(r2)return Qh;r2=1;var e=Id(),t=Array.prototype,r=t.splice;function n(i){var o=this.__data__,a=e(o,i);if(a<0)return!1;var s=o.length-1;return a==s?o.pop():r.call(o,a,1),--this.size,!0}return Qh=n,Qh}var ep,n2;function rZ(){if(n2)return ep;n2=1;var e=Id();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return ep=t,ep}var tp,i2;function nZ(){if(i2)return tp;i2=1;var e=Id();function t(r){return e(this.__data__,r)>-1}return tp=t,tp}var rp,o2;function iZ(){if(o2)return rp;o2=1;var e=Id();function t(r,n){var i=this.__data__,o=e(i,r);return o<0?(++this.size,i.push([r,n])):i[o][1]=n,this}return rp=t,rp}var np,a2;function Rd(){if(a2)return np;a2=1;var e=eZ(),t=tZ(),r=rZ(),n=nZ(),i=iZ();function o(a){var s=-1,c=a==null?0:a.length;for(this.clear();++s<c;){var d=a[s];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,np=o,np}var ip,s2;function oZ(){if(s2)return ip;s2=1;var e=Rd();function t(){this.__data__=new e,this.size=0}return ip=t,ip}var op,l2;function aZ(){if(l2)return op;l2=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return op=e,op}var ap,c2;function sZ(){if(c2)return ap;c2=1;function e(t){return this.__data__.get(t)}return ap=e,ap}var sp,u2;function lZ(){if(u2)return sp;u2=1;function e(t){return this.__data__.has(t)}return sp=e,sp}var lp,d2;function G4(){if(d2)return lp;d2=1;var e=typeof jt=="object"&&jt&&jt.Object===Object&&jt;return lp=e,lp}var cp,f2;function Vn(){if(f2)return cp;f2=1;var e=G4(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return cp=r,cp}var up,h2;function Ha(){if(h2)return up;h2=1;var e=Vn(),t=e.Symbol;return up=t,up}var dp,p2;function cZ(){if(p2)return dp;p2=1;var e=Ha(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function o(a){var s=r.call(a,i),c=a[i];try{a[i]=void 0;var d=!0}catch{}var u=n.call(a);return d&&(s?a[i]=c:delete a[i]),u}return dp=o,dp}var fp,v2;function uZ(){if(v2)return fp;v2=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return fp=r,fp}var hp,g2;function ko(){if(g2)return hp;g2=1;var e=Ha(),t=cZ(),r=uZ(),n="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function a(s){return s==null?s===void 0?i:n:o&&o in Object(s)?t(s):r(s)}return hp=a,hp}var pp,m2;function On(){if(m2)return pp;m2=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return pp=e,pp}var vp,b2;function Nl(){if(b2)return vp;b2=1;var e=ko(),t=On(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function a(s){if(!t(s))return!1;var c=e(s);return c==n||c==i||c==r||c==o}return vp=a,vp}var gp,y2;function dZ(){if(y2)return gp;y2=1;var e=Vn(),t=e["__core-js_shared__"];return gp=t,gp}var mp,x2;function fZ(){if(x2)return mp;x2=1;var e=dZ(),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 mp=r,mp}var bp,w2;function K4(){if(w2)return bp;w2=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 bp=r,bp}var yp,S2;function hZ(){if(S2)return yp;S2=1;var e=Nl(),t=fZ(),r=On(),n=K4(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,c=a.toString,d=s.hasOwnProperty,u=RegExp("^"+c.call(d).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(p){if(!r(p)||t(p))return!1;var v=e(p)?u:o;return v.test(n(p))}return yp=h,yp}var xp,E2;function pZ(){if(E2)return xp;E2=1;function e(t,r){return t==null?void 0:t[r]}return xp=e,xp}var wp,_2;function Ao(){if(_2)return wp;_2=1;var e=hZ(),t=pZ();function r(n,i){var o=t(n,i);return e(o)?o:void 0}return wp=r,wp}var Sp,O2;function bS(){if(O2)return Sp;O2=1;var e=Ao(),t=Vn(),r=e(t,"Map");return Sp=r,Sp}var Ep,C2;function Nd(){if(C2)return Ep;C2=1;var e=Ao(),t=e(Object,"create");return Ep=t,Ep}var _p,I2;function vZ(){if(I2)return _p;I2=1;var e=Nd();function t(){this.__data__=e?e(null):{},this.size=0}return _p=t,_p}var Op,R2;function gZ(){if(R2)return Op;R2=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return Op=e,Op}var Cp,N2;function mZ(){if(N2)return Cp;N2=1;var e=Nd(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(o){var a=this.__data__;if(e){var s=a[o];return s===t?void 0:s}return n.call(a,o)?a[o]:void 0}return Cp=i,Cp}var Ip,T2;function bZ(){if(T2)return Ip;T2=1;var e=Nd(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var o=this.__data__;return e?o[i]!==void 0:r.call(o,i)}return Ip=n,Ip}var Rp,P2;function yZ(){if(P2)return Rp;P2=1;var e=Nd(),t="__lodash_hash_undefined__";function r(n,i){var o=this.__data__;return this.size+=this.has(n)?0:1,o[n]=e&&i===void 0?t:i,this}return Rp=r,Rp}var Np,M2;function xZ(){if(M2)return Np;M2=1;var e=vZ(),t=gZ(),r=mZ(),n=bZ(),i=yZ();function o(a){var s=-1,c=a==null?0:a.length;for(this.clear();++s<c;){var d=a[s];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,Np=o,Np}var Tp,k2;function wZ(){if(k2)return Tp;k2=1;var e=xZ(),t=Rd(),r=bS();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Tp=n,Tp}var Pp,A2;function SZ(){if(A2)return Pp;A2=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Pp=e,Pp}var Mp,D2;function Td(){if(D2)return Mp;D2=1;var e=SZ();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Mp=t,Mp}var kp,j2;function EZ(){if(j2)return kp;j2=1;var e=Td();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return kp=t,kp}var Ap,q2;function _Z(){if(q2)return Ap;q2=1;var e=Td();function t(r){return e(this,r).get(r)}return Ap=t,Ap}var Dp,z2;function OZ(){if(z2)return Dp;z2=1;var e=Td();function t(r){return e(this,r).has(r)}return Dp=t,Dp}var jp,L2;function CZ(){if(L2)return jp;L2=1;var e=Td();function t(r,n){var i=e(this,r),o=i.size;return i.set(r,n),this.size+=i.size==o?0:1,this}return jp=t,jp}var qp,B2;function yS(){if(B2)return qp;B2=1;var e=wZ(),t=EZ(),r=_Z(),n=OZ(),i=CZ();function o(a){var s=-1,c=a==null?0:a.length;for(this.clear();++s<c;){var d=a[s];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,qp=o,qp}var zp,F2;function IZ(){if(F2)return zp;F2=1;var e=Rd(),t=bS(),r=yS(),n=200;function i(o,a){var s=this.__data__;if(s instanceof e){var c=s.__data__;if(!t||c.length<n-1)return c.push([o,a]),this.size=++s.size,this;s=this.__data__=new r(c)}return s.set(o,a),this.size=s.size,this}return zp=i,zp}var Lp,$2;function Pd(){if($2)return Lp;$2=1;var e=Rd(),t=oZ(),r=aZ(),n=sZ(),i=lZ(),o=IZ();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=i,a.prototype.set=o,Lp=a,Lp}var Bp,V2;function xS(){if(V2)return Bp;V2=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i&&r(t[n],n,t)!==!1;);return t}return Bp=e,Bp}var Fp,H2;function Y4(){if(H2)return Fp;H2=1;var e=Ao(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Fp=t,Fp}var $p,W2;function Md(){if(W2)return $p;W2=1;var e=Y4();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return $p=t,$p}var Vp,U2;function kd(){if(U2)return Vp;U2=1;var e=Md(),t=Va(),r=Object.prototype,n=r.hasOwnProperty;function i(o,a,s){var c=o[a];(!(n.call(o,a)&&t(c,s))||s===void 0&&!(a in o))&&e(o,a,s)}return Vp=i,Vp}var Hp,G2;function Tl(){if(G2)return Hp;G2=1;var e=kd(),t=Md();function r(n,i,o,a){var s=!o;o||(o={});for(var c=-1,d=i.length;++c<d;){var u=i[c],h=a?a(o[u],n[u],u,o,n):void 0;h===void 0&&(h=n[u]),s?t(o,u,h):e(o,u,h)}return o}return Hp=r,Hp}var Wp,K2;function RZ(){if(K2)return Wp;K2=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return Wp=e,Wp}var Up,Y2;function si(){if(Y2)return Up;Y2=1;function e(t){return t!=null&&typeof t=="object"}return Up=e,Up}var Gp,X2;function NZ(){if(X2)return Gp;X2=1;var e=ko(),t=si(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return Gp=n,Gp}var Kp,Z2;function Pl(){if(Z2)return Kp;Z2=1;var e=NZ(),t=si(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,o=e((function(){return arguments})())?e:function(a){return t(a)&&n.call(a,"callee")&&!i.call(a,"callee")};return Kp=o,Kp}var Yp,J2;function Ut(){if(J2)return Yp;J2=1;var e=Array.isArray;return Yp=e,Yp}var Hs={exports:{}},Xp,Q2;function TZ(){if(Q2)return Xp;Q2=1;function e(){return!1}return Xp=e,Xp}Hs.exports;var eI;function Wa(){return eI||(eI=1,(function(e,t){var r=Vn(),n=TZ(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,s=a?r.Buffer:void 0,c=s?s.isBuffer:void 0,d=c||n;e.exports=d})(Hs,Hs.exports)),Hs.exports}var Zp,tI;function Ad(){if(tI)return Zp;tI=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,i){var o=typeof n;return i=i??e,!!i&&(o=="number"||o!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<i}return Zp=r,Zp}var Jp,rI;function wS(){if(rI)return Jp;rI=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Jp=t,Jp}var Qp,nI;function PZ(){if(nI)return Qp;nI=1;var e=ko(),t=wS(),r=si(),n="[object Arguments]",i="[object Array]",o="[object Boolean]",a="[object Date]",s="[object Error]",c="[object Function]",d="[object Map]",u="[object Number]",h="[object Object]",p="[object RegExp]",v="[object Set]",y="[object String]",m="[object WeakMap]",g="[object ArrayBuffer]",w="[object DataView]",x="[object Float32Array]",_="[object Float64Array]",S="[object Int8Array]",E="[object Int16Array]",I="[object Int32Array]",N="[object Uint8Array]",T="[object Uint8ClampedArray]",M="[object Uint16Array]",z="[object Uint32Array]",j={};j[x]=j[_]=j[S]=j[E]=j[I]=j[N]=j[T]=j[M]=j[z]=!0,j[n]=j[i]=j[g]=j[o]=j[w]=j[a]=j[s]=j[c]=j[d]=j[u]=j[h]=j[p]=j[v]=j[y]=j[m]=!1;function W(U){return r(U)&&t(U.length)&&!!j[e(U)]}return Qp=W,Qp}var ev,iI;function Dd(){if(iI)return ev;iI=1;function e(t){return function(r){return t(r)}}return ev=e,ev}var Ws={exports:{}};Ws.exports;var oI;function SS(){return oI||(oI=1,(function(e,t){var r=G4(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o&&r.process,s=(function(){try{var c=i&&i.require&&i.require("util").types;return c||a&&a.binding&&a.binding("util")}catch{}})();e.exports=s})(Ws,Ws.exports)),Ws.exports}var tv,aI;function Ml(){if(aI)return tv;aI=1;var e=PZ(),t=Dd(),r=SS(),n=r&&r.isTypedArray,i=n?t(n):e;return tv=i,tv}var rv,sI;function X4(){if(sI)return rv;sI=1;var e=RZ(),t=Pl(),r=Ut(),n=Wa(),i=Ad(),o=Ml(),a=Object.prototype,s=a.hasOwnProperty;function c(d,u){var h=r(d),p=!h&&t(d),v=!h&&!p&&n(d),y=!h&&!p&&!v&&o(d),m=h||p||v||y,g=m?e(d.length,String):[],w=g.length;for(var x in d)(u||s.call(d,x))&&!(m&&(x=="length"||v&&(x=="offset"||x=="parent")||y&&(x=="buffer"||x=="byteLength"||x=="byteOffset")||i(x,w)))&&g.push(x);return g}return rv=c,rv}var nv,lI;function jd(){if(lI)return nv;lI=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return nv=t,nv}var iv,cI;function Z4(){if(cI)return iv;cI=1;function e(t,r){return function(n){return t(r(n))}}return iv=e,iv}var ov,uI;function MZ(){if(uI)return ov;uI=1;var e=Z4(),t=e(Object.keys,Object);return ov=t,ov}var av,dI;function ES(){if(dI)return av;dI=1;var e=jd(),t=MZ(),r=Object.prototype,n=r.hasOwnProperty;function i(o){if(!e(o))return t(o);var a=[];for(var s in Object(o))n.call(o,s)&&s!="constructor"&&a.push(s);return a}return av=i,av}var sv,fI;function Oi(){if(fI)return sv;fI=1;var e=Nl(),t=wS();function r(n){return n!=null&&t(n.length)&&!e(n)}return sv=r,sv}var lv,hI;function to(){if(hI)return lv;hI=1;var e=X4(),t=ES(),r=Oi();function n(i){return r(i)?e(i):t(i)}return lv=n,lv}var cv,pI;function kZ(){if(pI)return cv;pI=1;var e=Tl(),t=to();function r(n,i){return n&&e(i,t(i),n)}return cv=r,cv}var uv,vI;function AZ(){if(vI)return uv;vI=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return uv=e,uv}var dv,gI;function DZ(){if(gI)return dv;gI=1;var e=On(),t=jd(),r=AZ(),n=Object.prototype,i=n.hasOwnProperty;function o(a){if(!e(a))return r(a);var s=t(a),c=[];for(var d in a)d=="constructor"&&(s||!i.call(a,d))||c.push(d);return c}return dv=o,dv}var fv,mI;function Do(){if(mI)return fv;mI=1;var e=X4(),t=DZ(),r=Oi();function n(i){return r(i)?e(i,!0):t(i)}return fv=n,fv}var hv,bI;function jZ(){if(bI)return hv;bI=1;var e=Tl(),t=Do();function r(n,i){return n&&e(i,t(i),n)}return hv=r,hv}var Us={exports:{}};Us.exports;var yI;function J4(){return yI||(yI=1,(function(e,t){var r=Vn(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;function c(d,u){if(u)return d.slice();var h=d.length,p=s?s(h):new d.constructor(h);return d.copy(p),p}e.exports=c})(Us,Us.exports)),Us.exports}var pv,xI;function Q4(){if(xI)return pv;xI=1;function e(t,r){var n=-1,i=t.length;for(r||(r=Array(i));++n<i;)r[n]=t[n];return r}return pv=e,pv}var vv,wI;function e6(){if(wI)return vv;wI=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,o=0,a=[];++n<i;){var s=t[n];r(s,n,t)&&(a[o++]=s)}return a}return vv=e,vv}var gv,SI;function t6(){if(SI)return gv;SI=1;function e(){return[]}return gv=e,gv}var mv,EI;function _S(){if(EI)return mv;EI=1;var e=e6(),t=t6(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(a){return a==null?[]:(a=Object(a),e(i(a),function(s){return n.call(a,s)}))}:t;return mv=o,mv}var bv,_I;function qZ(){if(_I)return bv;_I=1;var e=Tl(),t=_S();function r(n,i){return e(n,t(n),i)}return bv=r,bv}var yv,OI;function OS(){if(OI)return yv;OI=1;function e(t,r){for(var n=-1,i=r.length,o=t.length;++n<i;)t[o+n]=r[n];return t}return yv=e,yv}var xv,CI;function qd(){if(CI)return xv;CI=1;var e=Z4(),t=e(Object.getPrototypeOf,Object);return xv=t,xv}var wv,II;function r6(){if(II)return wv;II=1;var e=OS(),t=qd(),r=_S(),n=t6(),i=Object.getOwnPropertySymbols,o=i?function(a){for(var s=[];a;)e(s,r(a)),a=t(a);return s}:n;return wv=o,wv}var Sv,RI;function zZ(){if(RI)return Sv;RI=1;var e=Tl(),t=r6();function r(n,i){return e(n,t(n),i)}return Sv=r,Sv}var Ev,NI;function n6(){if(NI)return Ev;NI=1;var e=OS(),t=Ut();function r(n,i,o){var a=i(n);return t(n)?a:e(a,o(n))}return Ev=r,Ev}var _v,TI;function i6(){if(TI)return _v;TI=1;var e=n6(),t=_S(),r=to();function n(i){return e(i,r,t)}return _v=n,_v}var Ov,PI;function LZ(){if(PI)return Ov;PI=1;var e=n6(),t=r6(),r=Do();function n(i){return e(i,r,t)}return Ov=n,Ov}var Cv,MI;function BZ(){if(MI)return Cv;MI=1;var e=Ao(),t=Vn(),r=e(t,"DataView");return Cv=r,Cv}var Iv,kI;function FZ(){if(kI)return Iv;kI=1;var e=Ao(),t=Vn(),r=e(t,"Promise");return Iv=r,Iv}var Rv,AI;function o6(){if(AI)return Rv;AI=1;var e=Ao(),t=Vn(),r=e(t,"Set");return Rv=r,Rv}var Nv,DI;function $Z(){if(DI)return Nv;DI=1;var e=Ao(),t=Vn(),r=e(t,"WeakMap");return Nv=r,Nv}var Tv,jI;function Ua(){if(jI)return Tv;jI=1;var e=BZ(),t=bS(),r=FZ(),n=o6(),i=$Z(),o=ko(),a=K4(),s="[object Map]",c="[object Object]",d="[object Promise]",u="[object Set]",h="[object WeakMap]",p="[object DataView]",v=a(e),y=a(t),m=a(r),g=a(n),w=a(i),x=o;return(e&&x(new e(new ArrayBuffer(1)))!=p||t&&x(new t)!=s||r&&x(r.resolve())!=d||n&&x(new n)!=u||i&&x(new i)!=h)&&(x=function(_){var S=o(_),E=S==c?_.constructor:void 0,I=E?a(E):"";if(I)switch(I){case v:return p;case y:return s;case m:return d;case g:return u;case w:return h}return S}),Tv=x,Tv}var Pv,qI;function VZ(){if(qI)return Pv;qI=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n){var i=n.length,o=new n.constructor(i);return i&&typeof n[0]=="string"&&t.call(n,"index")&&(o.index=n.index,o.input=n.input),o}return Pv=r,Pv}var Mv,zI;function a6(){if(zI)return Mv;zI=1;var e=Vn(),t=e.Uint8Array;return Mv=t,Mv}var kv,LI;function CS(){if(LI)return kv;LI=1;var e=a6();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return kv=t,kv}var Av,BI;function HZ(){if(BI)return Av;BI=1;var e=CS();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.byteLength)}return Av=t,Av}var Dv,FI;function WZ(){if(FI)return Dv;FI=1;var e=/\w*$/;function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}return Dv=t,Dv}var jv,$I;function UZ(){if($I)return jv;$I=1;var e=Ha(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function n(i){return r?Object(r.call(i)):{}}return jv=n,jv}var qv,VI;function s6(){if(VI)return qv;VI=1;var e=CS();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}return qv=t,qv}var zv,HI;function GZ(){if(HI)return zv;HI=1;var e=CS(),t=HZ(),r=WZ(),n=UZ(),i=s6(),o="[object Boolean]",a="[object Date]",s="[object Map]",c="[object Number]",d="[object RegExp]",u="[object Set]",h="[object String]",p="[object Symbol]",v="[object ArrayBuffer]",y="[object DataView]",m="[object Float32Array]",g="[object Float64Array]",w="[object Int8Array]",x="[object Int16Array]",_="[object Int32Array]",S="[object Uint8Array]",E="[object Uint8ClampedArray]",I="[object Uint16Array]",N="[object Uint32Array]";function T(M,z,j){var W=M.constructor;switch(z){case v:return e(M);case o:case a:return new W(+M);case y:return t(M,j);case m:case g:case w:case x:case _:case S:case E:case I:case N:return i(M,j);case s:return new W;case c:case h:return new W(M);case d:return r(M);case u:return new W;case p:return n(M)}}return zv=T,zv}var Lv,WI;function l6(){if(WI)return Lv;WI=1;var e=On(),t=Object.create,r=(function(){function n(){}return function(i){if(!e(i))return{};if(t)return t(i);n.prototype=i;var o=new n;return n.prototype=void 0,o}})();return Lv=r,Lv}var Bv,UI;function c6(){if(UI)return Bv;UI=1;var e=l6(),t=qd(),r=jd();function n(i){return typeof i.constructor=="function"&&!r(i)?e(t(i)):{}}return Bv=n,Bv}var Fv,GI;function KZ(){if(GI)return Fv;GI=1;var e=Ua(),t=si(),r="[object Map]";function n(i){return t(i)&&e(i)==r}return Fv=n,Fv}var $v,KI;function YZ(){if(KI)return $v;KI=1;var e=KZ(),t=Dd(),r=SS(),n=r&&r.isMap,i=n?t(n):e;return $v=i,$v}var Vv,YI;function XZ(){if(YI)return Vv;YI=1;var e=Ua(),t=si(),r="[object Set]";function n(i){return t(i)&&e(i)==r}return Vv=n,Vv}var Hv,XI;function ZZ(){if(XI)return Hv;XI=1;var e=XZ(),t=Dd(),r=SS(),n=r&&r.isSet,i=n?t(n):e;return Hv=i,Hv}var Wv,ZI;function u6(){if(ZI)return Wv;ZI=1;var e=Pd(),t=xS(),r=kd(),n=kZ(),i=jZ(),o=J4(),a=Q4(),s=qZ(),c=zZ(),d=i6(),u=LZ(),h=Ua(),p=VZ(),v=GZ(),y=c6(),m=Ut(),g=Wa(),w=YZ(),x=On(),_=ZZ(),S=to(),E=Do(),I=1,N=2,T=4,M="[object Arguments]",z="[object Array]",j="[object Boolean]",W="[object Date]",U="[object Error]",A="[object Function]",K="[object GeneratorFunction]",V="[object Map]",te="[object Number]",G="[object Object]",re="[object RegExp]",P="[object Set]",B="[object String]",X="[object Symbol]",Q="[object WeakMap]",D="[object ArrayBuffer]",$="[object DataView]",H="[object Float32Array]",q="[object Float64Array]",Y="[object Int8Array]",ie="[object Int16Array]",ne="[object Int32Array]",ve="[object Uint8Array]",Z="[object Uint8ClampedArray]",J="[object Uint16Array]",ae="[object Uint32Array]",he={};he[M]=he[z]=he[D]=he[$]=he[j]=he[W]=he[H]=he[q]=he[Y]=he[ie]=he[ne]=he[V]=he[te]=he[G]=he[re]=he[P]=he[B]=he[X]=he[ve]=he[Z]=he[J]=he[ae]=!0,he[U]=he[A]=he[Q]=!1;function ue(de,le,xe,Ee,Ie,Te){var Me,Ze=le&I,tt=le&N,Fe=le&T;if(xe&&(Me=Ie?xe(de,Ee,Ie,Te):xe(de)),Me!==void 0)return Me;if(!x(de))return de;var Le=m(de);if(Le){if(Me=p(de),!Ze)return a(de,Me)}else{var ze=h(de),Je=ze==A||ze==K;if(g(de))return o(de,Ze);if(ze==G||ze==M||Je&&!Ie){if(Me=tt||Je?{}:y(de),!Ze)return tt?c(de,i(Me,de)):s(de,n(Me,de))}else{if(!he[ze])return Ie?de:{};Me=v(de,ze,Ze)}}Te||(Te=new e);var rt=Te.get(de);if(rt)return rt;Te.set(de,Me),_(de)?de.forEach(function(Rt){Me.add(ue(Rt,le,xe,Rt,de,Te))}):w(de)&&de.forEach(function(Rt,qt){Me.set(qt,ue(Rt,le,xe,qt,de,Te))});var Pt=Fe?tt?u:d:tt?E:S,gt=Le?void 0:Pt(de);return t(gt||de,function(Rt,qt){gt&&(qt=Rt,Rt=de[qt]),r(Me,qt,ue(Rt,le,xe,qt,de,Te))}),Me}return Wv=ue,Wv}var Uv,JI;function JZ(){if(JI)return Uv;JI=1;var e=u6(),t=4;function r(n){return e(n,t)}return Uv=r,Uv}var Gv,QI;function IS(){if(QI)return Gv;QI=1;function e(t){return function(){return t}}return Gv=e,Gv}var Kv,eR;function QZ(){if(eR)return Kv;eR=1;function e(t){return function(r,n,i){for(var o=-1,a=Object(r),s=i(r),c=s.length;c--;){var d=s[t?c:++o];if(n(a[d],d,a)===!1)break}return r}}return Kv=e,Kv}var Yv,tR;function RS(){if(tR)return Yv;tR=1;var e=QZ(),t=e();return Yv=t,Yv}var Xv,rR;function NS(){if(rR)return Xv;rR=1;var e=RS(),t=to();function r(n,i){return n&&e(n,i,t)}return Xv=r,Xv}var Zv,nR;function eJ(){if(nR)return Zv;nR=1;var e=Oi();function t(r,n){return function(i,o){if(i==null)return i;if(!e(i))return r(i,o);for(var a=i.length,s=n?a:-1,c=Object(i);(n?s--:++s<a)&&o(c[s],s,c)!==!1;);return i}}return Zv=t,Zv}var Jv,iR;function zd(){if(iR)return Jv;iR=1;var e=NS(),t=eJ(),r=t(e);return Jv=r,Jv}var Qv,oR;function jo(){if(oR)return Qv;oR=1;function e(t){return t}return Qv=e,Qv}var eg,aR;function d6(){if(aR)return eg;aR=1;var e=jo();function t(r){return typeof r=="function"?r:e}return eg=t,eg}var tg,sR;function f6(){if(sR)return tg;sR=1;var e=xS(),t=zd(),r=d6(),n=Ut();function i(o,a){var s=n(o)?e:t;return s(o,r(a))}return tg=i,tg}var rg,lR;function h6(){return lR||(lR=1,rg=f6()),rg}var ng,cR;function tJ(){if(cR)return ng;cR=1;var e=zd();function t(r,n){var i=[];return e(r,function(o,a,s){n(o,a,s)&&i.push(o)}),i}return ng=t,ng}var ig,uR;function rJ(){if(uR)return ig;uR=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return ig=t,ig}var og,dR;function nJ(){if(dR)return og;dR=1;function e(t){return this.__data__.has(t)}return og=e,og}var ag,fR;function p6(){if(fR)return ag;fR=1;var e=yS(),t=rJ(),r=nJ();function n(i){var o=-1,a=i==null?0:i.length;for(this.__data__=new e;++o<a;)this.add(i[o])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,ag=n,ag}var sg,hR;function iJ(){if(hR)return sg;hR=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(t[n],n,t))return!0;return!1}return sg=e,sg}var lg,pR;function v6(){if(pR)return lg;pR=1;function e(t,r){return t.has(r)}return lg=e,lg}var cg,vR;function g6(){if(vR)return cg;vR=1;var e=p6(),t=iJ(),r=v6(),n=1,i=2;function o(a,s,c,d,u,h){var p=c&n,v=a.length,y=s.length;if(v!=y&&!(p&&y>v))return!1;var m=h.get(a),g=h.get(s);if(m&&g)return m==s&&g==a;var w=-1,x=!0,_=c&i?new e:void 0;for(h.set(a,s),h.set(s,a);++w<v;){var S=a[w],E=s[w];if(d)var I=p?d(E,S,w,s,a,h):d(S,E,w,a,s,h);if(I!==void 0){if(I)continue;x=!1;break}if(_){if(!t(s,function(N,T){if(!r(_,T)&&(S===N||u(S,N,c,d,h)))return _.push(T)})){x=!1;break}}else if(!(S===E||u(S,E,c,d,h))){x=!1;break}}return h.delete(a),h.delete(s),x}return cg=o,cg}var ug,gR;function oJ(){if(gR)return ug;gR=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,o){n[++r]=[o,i]}),n}return ug=e,ug}var dg,mR;function TS(){if(mR)return dg;mR=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return dg=e,dg}var fg,bR;function aJ(){if(bR)return fg;bR=1;var e=Ha(),t=a6(),r=Va(),n=g6(),i=oJ(),o=TS(),a=1,s=2,c="[object Boolean]",d="[object Date]",u="[object Error]",h="[object Map]",p="[object Number]",v="[object RegExp]",y="[object Set]",m="[object String]",g="[object Symbol]",w="[object ArrayBuffer]",x="[object DataView]",_=e?e.prototype:void 0,S=_?_.valueOf:void 0;function E(I,N,T,M,z,j,W){switch(T){case x:if(I.byteLength!=N.byteLength||I.byteOffset!=N.byteOffset)return!1;I=I.buffer,N=N.buffer;case w:return!(I.byteLength!=N.byteLength||!j(new t(I),new t(N)));case c:case d:case p:return r(+I,+N);case u:return I.name==N.name&&I.message==N.message;case v:case m:return I==N+"";case h:var U=i;case y:var A=M&a;if(U||(U=o),I.size!=N.size&&!A)return!1;var K=W.get(I);if(K)return K==N;M|=s,W.set(I,N);var V=n(U(I),U(N),M,z,j,W);return W.delete(I),V;case g:if(S)return S.call(I)==S.call(N)}return!1}return fg=E,fg}var hg,yR;function sJ(){if(yR)return hg;yR=1;var e=i6(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(o,a,s,c,d,u){var h=s&t,p=e(o),v=p.length,y=e(a),m=y.length;if(v!=m&&!h)return!1;for(var g=v;g--;){var w=p[g];if(!(h?w in a:n.call(a,w)))return!1}var x=u.get(o),_=u.get(a);if(x&&_)return x==a&&_==o;var S=!0;u.set(o,a),u.set(a,o);for(var E=h;++g<v;){w=p[g];var I=o[w],N=a[w];if(c)var T=h?c(N,I,w,a,o,u):c(I,N,w,o,a,u);if(!(T===void 0?I===N||d(I,N,s,c,u):T)){S=!1;break}E||(E=w=="constructor")}if(S&&!E){var M=o.constructor,z=a.constructor;M!=z&&"constructor"in o&&"constructor"in a&&!(typeof M=="function"&&M instanceof M&&typeof z=="function"&&z instanceof z)&&(S=!1)}return u.delete(o),u.delete(a),S}return hg=i,hg}var pg,xR;function lJ(){if(xR)return pg;xR=1;var e=Pd(),t=g6(),r=aJ(),n=sJ(),i=Ua(),o=Ut(),a=Wa(),s=Ml(),c=1,d="[object Arguments]",u="[object Array]",h="[object Object]",p=Object.prototype,v=p.hasOwnProperty;function y(m,g,w,x,_,S){var E=o(m),I=o(g),N=E?u:i(m),T=I?u:i(g);N=N==d?h:N,T=T==d?h:T;var M=N==h,z=T==h,j=N==T;if(j&&a(m)){if(!a(g))return!1;E=!0,M=!1}if(j&&!M)return S||(S=new e),E||s(m)?t(m,g,w,x,_,S):r(m,g,N,w,x,_,S);if(!(w&c)){var W=M&&v.call(m,"__wrapped__"),U=z&&v.call(g,"__wrapped__");if(W||U){var A=W?m.value():m,K=U?g.value():g;return S||(S=new e),_(A,K,w,x,S)}}return j?(S||(S=new e),n(m,g,w,x,_,S)):!1}return pg=y,pg}var vg,wR;function m6(){if(wR)return vg;wR=1;var e=lJ(),t=si();function r(n,i,o,a,s){return n===i?!0:n==null||i==null||!t(n)&&!t(i)?n!==n&&i!==i:e(n,i,o,a,r,s)}return vg=r,vg}var gg,SR;function cJ(){if(SR)return gg;SR=1;var e=Pd(),t=m6(),r=1,n=2;function i(o,a,s,c){var d=s.length,u=d,h=!c;if(o==null)return!u;for(o=Object(o);d--;){var p=s[d];if(h&&p[2]?p[1]!==o[p[0]]:!(p[0]in o))return!1}for(;++d<u;){p=s[d];var v=p[0],y=o[v],m=p[1];if(h&&p[2]){if(y===void 0&&!(v in o))return!1}else{var g=new e;if(c)var w=c(y,m,v,o,a,g);if(!(w===void 0?t(m,y,r|n,c,g):w))return!1}}return!0}return gg=i,gg}var mg,ER;function b6(){if(ER)return mg;ER=1;var e=On();function t(r){return r===r&&!e(r)}return mg=t,mg}var bg,_R;function uJ(){if(_R)return bg;_R=1;var e=b6(),t=to();function r(n){for(var i=t(n),o=i.length;o--;){var a=i[o],s=n[a];i[o]=[a,s,e(s)]}return i}return bg=r,bg}var yg,OR;function y6(){if(OR)return yg;OR=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return yg=e,yg}var xg,CR;function dJ(){if(CR)return xg;CR=1;var e=cJ(),t=uJ(),r=y6();function n(i){var o=t(i);return o.length==1&&o[0][2]?r(o[0][0],o[0][1]):function(a){return a===i||e(a,i,o)}}return xg=n,xg}var wg,IR;function Ga(){if(IR)return wg;IR=1;var e=ko(),t=si(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return wg=n,wg}var Sg,RR;function PS(){if(RR)return Sg;RR=1;var e=Ut(),t=Ga(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(o,a){if(e(o))return!1;var s=typeof o;return s=="number"||s=="symbol"||s=="boolean"||o==null||t(o)?!0:n.test(o)||!r.test(o)||a!=null&&o in Object(a)}return Sg=i,Sg}var Eg,NR;function fJ(){if(NR)return Eg;NR=1;var e=yS(),t="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var o=function(){var a=arguments,s=i?i.apply(this,a):a[0],c=o.cache;if(c.has(s))return c.get(s);var d=n.apply(this,a);return o.cache=c.set(s,d)||c,d};return o.cache=new(r.Cache||e),o}return r.Cache=e,Eg=r,Eg}var _g,TR;function hJ(){if(TR)return _g;TR=1;var e=fJ(),t=500;function r(n){var i=e(n,function(a){return o.size===t&&o.clear(),a}),o=i.cache;return i}return _g=r,_g}var Og,PR;function pJ(){if(PR)return Og;PR=1;var e=hJ(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(t,function(a,s,c,d){o.push(c?d.replace(r,"$1"):s||a)}),o});return Og=n,Og}var Cg,MR;function Ld(){if(MR)return Cg;MR=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,o=Array(i);++n<i;)o[n]=r(t[n],n,t);return o}return Cg=e,Cg}var Ig,kR;function vJ(){if(kR)return Ig;kR=1;var e=Ha(),t=Ld(),r=Ut(),n=Ga(),i=e?e.prototype:void 0,o=i?i.toString:void 0;function a(s){if(typeof s=="string")return s;if(r(s))return t(s,a)+"";if(n(s))return o?o.call(s):"";var c=s+"";return c=="0"&&1/s==-1/0?"-0":c}return Ig=a,Ig}var Rg,AR;function x6(){if(AR)return Rg;AR=1;var e=vJ();function t(r){return r==null?"":e(r)}return Rg=t,Rg}var Ng,DR;function Bd(){if(DR)return Ng;DR=1;var e=Ut(),t=PS(),r=pJ(),n=x6();function i(o,a){return e(o)?o:t(o,a)?[o]:r(n(o))}return Ng=i,Ng}var Tg,jR;function kl(){if(jR)return Tg;jR=1;var e=Ga();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Tg=t,Tg}var Pg,qR;function Fd(){if(qR)return Pg;qR=1;var e=Bd(),t=kl();function r(n,i){i=e(i,n);for(var o=0,a=i.length;n!=null&&o<a;)n=n[t(i[o++])];return o&&o==a?n:void 0}return Pg=r,Pg}var Mg,zR;function gJ(){if(zR)return Mg;zR=1;var e=Fd();function t(r,n,i){var o=r==null?void 0:e(r,n);return o===void 0?i:o}return Mg=t,Mg}var kg,LR;function mJ(){if(LR)return kg;LR=1;function e(t,r){return t!=null&&r in Object(t)}return kg=e,kg}var Ag,BR;function w6(){if(BR)return Ag;BR=1;var e=Bd(),t=Pl(),r=Ut(),n=Ad(),i=wS(),o=kl();function a(s,c,d){c=e(c,s);for(var u=-1,h=c.length,p=!1;++u<h;){var v=o(c[u]);if(!(p=s!=null&&d(s,v)))break;s=s[v]}return p||++u!=h?p:(h=s==null?0:s.length,!!h&&i(h)&&n(v,h)&&(r(s)||t(s)))}return Ag=a,Ag}var Dg,FR;function S6(){if(FR)return Dg;FR=1;var e=mJ(),t=w6();function r(n,i){return n!=null&&t(n,i,e)}return Dg=r,Dg}var jg,$R;function bJ(){if($R)return jg;$R=1;var e=m6(),t=gJ(),r=S6(),n=PS(),i=b6(),o=y6(),a=kl(),s=1,c=2;function d(u,h){return n(u)&&i(h)?o(a(u),h):function(p){var v=t(p,u);return v===void 0&&v===h?r(p,u):e(h,v,s|c)}}return jg=d,jg}var qg,VR;function E6(){if(VR)return qg;VR=1;function e(t){return function(r){return r==null?void 0:r[t]}}return qg=e,qg}var zg,HR;function yJ(){if(HR)return zg;HR=1;var e=Fd();function t(r){return function(n){return e(n,r)}}return zg=t,zg}var Lg,WR;function xJ(){if(WR)return Lg;WR=1;var e=E6(),t=yJ(),r=PS(),n=kl();function i(o){return r(o)?e(n(o)):t(o)}return Lg=i,Lg}var Bg,UR;function Ci(){if(UR)return Bg;UR=1;var e=dJ(),t=bJ(),r=jo(),n=Ut(),i=xJ();function o(a){return typeof a=="function"?a:a==null?r:typeof a=="object"?n(a)?t(a[0],a[1]):e(a):i(a)}return Bg=o,Bg}var Fg,GR;function _6(){if(GR)return Fg;GR=1;var e=e6(),t=tJ(),r=Ci(),n=Ut();function i(o,a){var s=n(o)?e:t;return s(o,r(a,3))}return Fg=i,Fg}var $g,KR;function wJ(){if(KR)return $g;KR=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,i){return n!=null&&t.call(n,i)}return $g=r,$g}var Vg,YR;function O6(){if(YR)return Vg;YR=1;var e=wJ(),t=w6();function r(n,i){return n!=null&&t(n,i,e)}return Vg=r,Vg}var Hg,XR;function SJ(){if(XR)return Hg;XR=1;var e=ES(),t=Ua(),r=Pl(),n=Ut(),i=Oi(),o=Wa(),a=jd(),s=Ml(),c="[object Map]",d="[object Set]",u=Object.prototype,h=u.hasOwnProperty;function p(v){if(v==null)return!0;if(i(v)&&(n(v)||typeof v=="string"||typeof v.splice=="function"||o(v)||s(v)||r(v)))return!v.length;var y=t(v);if(y==c||y==d)return!v.size;if(a(v))return!e(v).length;for(var m in v)if(h.call(v,m))return!1;return!0}return Hg=p,Hg}var Wg,ZR;function C6(){if(ZR)return Wg;ZR=1;function e(t){return t===void 0}return Wg=e,Wg}var Ug,JR;function I6(){if(JR)return Ug;JR=1;var e=zd(),t=Oi();function r(n,i){var o=-1,a=t(n)?Array(n.length):[];return e(n,function(s,c,d){a[++o]=i(s,c,d)}),a}return Ug=r,Ug}var Gg,QR;function R6(){if(QR)return Gg;QR=1;var e=Ld(),t=Ci(),r=I6(),n=Ut();function i(o,a){var s=n(o)?e:r;return s(o,t(a,3))}return Gg=i,Gg}var Kg,eN;function EJ(){if(eN)return Kg;eN=1;function e(t,r,n,i){var o=-1,a=t==null?0:t.length;for(i&&a&&(n=t[++o]);++o<a;)n=r(n,t[o],o,t);return n}return Kg=e,Kg}var Yg,tN;function _J(){if(tN)return Yg;tN=1;function e(t,r,n,i,o){return o(t,function(a,s,c){n=i?(i=!1,a):r(n,a,s,c)}),n}return Yg=e,Yg}var Xg,rN;function N6(){if(rN)return Xg;rN=1;var e=EJ(),t=zd(),r=Ci(),n=_J(),i=Ut();function o(a,s,c){var d=i(a)?e:n,u=arguments.length<3;return d(a,r(s,4),c,u,t)}return Xg=o,Xg}var Zg,nN;function OJ(){if(nN)return Zg;nN=1;var e=ko(),t=Ut(),r=si(),n="[object String]";function i(o){return typeof o=="string"||!t(o)&&r(o)&&e(o)==n}return Zg=i,Zg}var Jg,iN;function CJ(){if(iN)return Jg;iN=1;var e=E6(),t=e("length");return Jg=t,Jg}var Qg,oN;function IJ(){if(oN)return Qg;oN=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,o="\\ufe0e\\ufe0f",a="\\u200d",s=RegExp("["+a+e+i+o+"]");function c(d){return s.test(d)}return Qg=c,Qg}var em,aN;function RJ(){if(aN)return em;aN=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,o="\\ufe0e\\ufe0f",a="["+e+"]",s="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",d="(?:"+s+"|"+c+")",u="[^"+e+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",y=d+"?",m="["+o+"]?",g="(?:"+v+"(?:"+[u,h,p].join("|")+")"+m+y+")*",w=m+y+g,x="(?:"+[u+s+"?",s,h,p,a].join("|")+")",_=RegExp(c+"(?="+c+")|"+x+w,"g");function S(E){for(var I=_.lastIndex=0;_.test(E);)++I;return I}return em=S,em}var tm,sN;function NJ(){if(sN)return tm;sN=1;var e=CJ(),t=IJ(),r=RJ();function n(i){return t(i)?r(i):e(i)}return tm=n,tm}var rm,lN;function TJ(){if(lN)return rm;lN=1;var e=ES(),t=Ua(),r=Oi(),n=OJ(),i=NJ(),o="[object Map]",a="[object Set]";function s(c){if(c==null)return 0;if(r(c))return n(c)?i(c):c.length;var d=t(c);return d==o||d==a?c.size:e(c).length}return rm=s,rm}var nm,cN;function PJ(){if(cN)return nm;cN=1;var e=xS(),t=l6(),r=NS(),n=Ci(),i=qd(),o=Ut(),a=Wa(),s=Nl(),c=On(),d=Ml();function u(h,p,v){var y=o(h),m=y||a(h)||d(h);if(p=n(p,4),v==null){var g=h&&h.constructor;m?v=y?new g:[]:c(h)?v=s(g)?t(i(h)):{}:v={}}return(m?e:r)(h,function(w,x,_){return p(v,w,x,_)}),v}return nm=u,nm}var im,uN;function MJ(){if(uN)return im;uN=1;var e=Ha(),t=Pl(),r=Ut(),n=e?e.isConcatSpreadable:void 0;function i(o){return r(o)||t(o)||!!(n&&o&&o[n])}return im=i,im}var om,dN;function MS(){if(dN)return om;dN=1;var e=OS(),t=MJ();function r(n,i,o,a,s){var c=-1,d=n.length;for(o||(o=t),s||(s=[]);++c<d;){var u=n[c];i>0&&o(u)?i>1?r(u,i-1,o,a,s):e(s,u):a||(s[s.length]=u)}return s}return om=r,om}var am,fN;function kJ(){if(fN)return am;fN=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 am=e,am}var sm,hN;function T6(){if(hN)return sm;hN=1;var e=kJ(),t=Math.max;function r(n,i,o){return i=t(i===void 0?n.length-1:i,0),function(){for(var a=arguments,s=-1,c=t(a.length-i,0),d=Array(c);++s<c;)d[s]=a[i+s];s=-1;for(var u=Array(i+1);++s<i;)u[s]=a[s];return u[i]=o(d),e(n,this,u)}}return sm=r,sm}var lm,pN;function AJ(){if(pN)return lm;pN=1;var e=IS(),t=Y4(),r=jo(),n=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:r;return lm=n,lm}var cm,vN;function DJ(){if(vN)return cm;vN=1;var e=800,t=16,r=Date.now;function n(i){var o=0,a=0;return function(){var s=r(),c=t-(s-a);if(a=s,c>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return cm=n,cm}var um,gN;function P6(){if(gN)return um;gN=1;var e=AJ(),t=DJ(),r=t(e);return um=r,um}var dm,mN;function $d(){if(mN)return dm;mN=1;var e=jo(),t=T6(),r=P6();function n(i,o){return r(t(i,o,e),i+"")}return dm=n,dm}var fm,bN;function M6(){if(bN)return fm;bN=1;function e(t,r,n,i){for(var o=t.length,a=n+(i?1:-1);i?a--:++a<o;)if(r(t[a],a,t))return a;return-1}return fm=e,fm}var hm,yN;function jJ(){if(yN)return hm;yN=1;function e(t){return t!==t}return hm=e,hm}var pm,xN;function qJ(){if(xN)return pm;xN=1;function e(t,r,n){for(var i=n-1,o=t.length;++i<o;)if(t[i]===r)return i;return-1}return pm=e,pm}var vm,wN;function zJ(){if(wN)return vm;wN=1;var e=M6(),t=jJ(),r=qJ();function n(i,o,a){return o===o?r(i,o,a):e(i,t,a)}return vm=n,vm}var gm,SN;function LJ(){if(SN)return gm;SN=1;var e=zJ();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return gm=t,gm}var mm,EN;function BJ(){if(EN)return mm;EN=1;function e(t,r,n){for(var i=-1,o=t==null?0:t.length;++i<o;)if(n(r,t[i]))return!0;return!1}return mm=e,mm}var bm,_N;function FJ(){if(_N)return bm;_N=1;function e(){}return bm=e,bm}var ym,ON;function $J(){if(ON)return ym;ON=1;var e=o6(),t=FJ(),r=TS(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(o){return new e(o)}:t;return ym=i,ym}var xm,CN;function VJ(){if(CN)return xm;CN=1;var e=p6(),t=LJ(),r=BJ(),n=v6(),i=$J(),o=TS(),a=200;function s(c,d,u){var h=-1,p=t,v=c.length,y=!0,m=[],g=m;if(u)y=!1,p=r;else if(v>=a){var w=d?null:i(c);if(w)return o(w);y=!1,p=n,g=new e}else g=d?[]:m;e:for(;++h<v;){var x=c[h],_=d?d(x):x;if(x=u||x!==0?x:0,y&&_===_){for(var S=g.length;S--;)if(g[S]===_)continue e;d&&g.push(_),m.push(x)}else p(g,_,u)||(g!==m&&g.push(_),m.push(x))}return m}return xm=s,xm}var wm,IN;function k6(){if(IN)return wm;IN=1;var e=Oi(),t=si();function r(n){return t(n)&&e(n)}return wm=r,wm}var Sm,RN;function HJ(){if(RN)return Sm;RN=1;var e=MS(),t=$d(),r=VJ(),n=k6(),i=t(function(o){return r(e(o,1,n,!0))});return Sm=i,Sm}var Em,NN;function WJ(){if(NN)return Em;NN=1;var e=Ld();function t(r,n){return e(n,function(i){return r[i]})}return Em=t,Em}var _m,TN;function A6(){if(TN)return _m;TN=1;var e=WJ(),t=to();function r(n){return n==null?[]:e(n,t(n))}return _m=r,_m}var Om,PN;function Cn(){if(PN)return Om;PN=1;var e;if(typeof mS=="function")try{e={clone:JZ(),constant:IS(),each:h6(),filter:_6(),has:O6(),isArray:Ut(),isEmpty:SJ(),isFunction:Nl(),isUndefined:C6(),keys:to(),map:R6(),reduce:N6(),size:TJ(),transform:PJ(),union:HJ(),values:A6()}}catch{}return e||(e=window._),Om=e,Om}var Cm,MN;function kS(){if(MN)return Cm;MN=1;var e=Cn();Cm=i;var t="\0",r="\0",n="";function i(u){this._isDirected=e.has(u,"directed")?u.directed:!0,this._isMultigraph=e.has(u,"multigraph")?u.multigraph:!1,this._isCompound=e.has(u,"compound")?u.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={}}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(u){return this._label=u,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(u){return e.isFunction(u)||(u=e.constant(u)),this._defaultNodeLabelFn=u,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return e.keys(this._nodes)},i.prototype.sources=function(){var u=this;return e.filter(this.nodes(),function(h){return e.isEmpty(u._in[h])})},i.prototype.sinks=function(){var u=this;return e.filter(this.nodes(),function(h){return e.isEmpty(u._out[h])})},i.prototype.setNodes=function(u,h){var p=arguments,v=this;return e.each(u,function(y){p.length>1?v.setNode(y,h):v.setNode(y)}),this},i.prototype.setNode=function(u,h){return e.has(this._nodes,u)?(arguments.length>1&&(this._nodes[u]=h),this):(this._nodes[u]=arguments.length>1?h:this._defaultNodeLabelFn(u),this._isCompound&&(this._parent[u]=r,this._children[u]={},this._children[r][u]=!0),this._in[u]={},this._preds[u]={},this._out[u]={},this._sucs[u]={},++this._nodeCount,this)},i.prototype.node=function(u){return this._nodes[u]},i.prototype.hasNode=function(u){return e.has(this._nodes,u)},i.prototype.removeNode=function(u){var h=this;if(e.has(this._nodes,u)){var p=function(v){h.removeEdge(h._edgeObjs[v])};delete this._nodes[u],this._isCompound&&(this._removeFromParentsChildList(u),delete this._parent[u],e.each(this.children(u),function(v){h.setParent(v)}),delete this._children[u]),e.each(e.keys(this._in[u]),p),delete this._in[u],delete this._preds[u],e.each(e.keys(this._out[u]),p),delete this._out[u],delete this._sucs[u],--this._nodeCount}return this},i.prototype.setParent=function(u,h){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(h))h=r;else{h+="";for(var p=h;!e.isUndefined(p);p=this.parent(p))if(p===u)throw new Error("Setting "+h+" as parent of "+u+" would create a cycle");this.setNode(h)}return this.setNode(u),this._removeFromParentsChildList(u),this._parent[u]=h,this._children[h][u]=!0,this},i.prototype._removeFromParentsChildList=function(u){delete this._children[this._parent[u]][u]},i.prototype.parent=function(u){if(this._isCompound){var h=this._parent[u];if(h!==r)return h}},i.prototype.children=function(u){if(e.isUndefined(u)&&(u=r),this._isCompound){var h=this._children[u];if(h)return e.keys(h)}else{if(u===r)return this.nodes();if(this.hasNode(u))return[]}},i.prototype.predecessors=function(u){var h=this._preds[u];if(h)return e.keys(h)},i.prototype.successors=function(u){var h=this._sucs[u];if(h)return e.keys(h)},i.prototype.neighbors=function(u){var h=this.predecessors(u);if(h)return e.union(h,this.successors(u))},i.prototype.isLeaf=function(u){var h;return this.isDirected()?h=this.successors(u):h=this.neighbors(u),h.length===0},i.prototype.filterNodes=function(u){var h=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});h.setGraph(this.graph());var p=this;e.each(this._nodes,function(m,g){u(g)&&h.setNode(g,m)}),e.each(this._edgeObjs,function(m){h.hasNode(m.v)&&h.hasNode(m.w)&&h.setEdge(m,p.edge(m))});var v={};function y(m){var g=p.parent(m);return g===void 0||h.hasNode(g)?(v[m]=g,g):g in v?v[g]:y(g)}return this._isCompound&&e.each(h.nodes(),function(m){h.setParent(m,y(m))}),h},i.prototype.setDefaultEdgeLabel=function(u){return e.isFunction(u)||(u=e.constant(u)),this._defaultEdgeLabelFn=u,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return e.values(this._edgeObjs)},i.prototype.setPath=function(u,h){var p=this,v=arguments;return e.reduce(u,function(y,m){return v.length>1?p.setEdge(y,m,h):p.setEdge(y,m),m}),this},i.prototype.setEdge=function(){var u,h,p,v,y=!1,m=arguments[0];typeof m=="object"&&m!==null&&"v"in m?(u=m.v,h=m.w,p=m.name,arguments.length===2&&(v=arguments[1],y=!0)):(u=m,h=arguments[1],p=arguments[3],arguments.length>2&&(v=arguments[2],y=!0)),u=""+u,h=""+h,e.isUndefined(p)||(p=""+p);var g=s(this._isDirected,u,h,p);if(e.has(this._edgeLabels,g))return y&&(this._edgeLabels[g]=v),this;if(!e.isUndefined(p)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(u),this.setNode(h),this._edgeLabels[g]=y?v:this._defaultEdgeLabelFn(u,h,p);var w=c(this._isDirected,u,h,p);return u=w.v,h=w.w,Object.freeze(w),this._edgeObjs[g]=w,o(this._preds[h],u),o(this._sucs[u],h),this._in[h][g]=w,this._out[u][g]=w,this._edgeCount++,this},i.prototype.edge=function(u,h,p){var v=arguments.length===1?d(this._isDirected,arguments[0]):s(this._isDirected,u,h,p);return this._edgeLabels[v]},i.prototype.hasEdge=function(u,h,p){var v=arguments.length===1?d(this._isDirected,arguments[0]):s(this._isDirected,u,h,p);return e.has(this._edgeLabels,v)},i.prototype.removeEdge=function(u,h,p){var v=arguments.length===1?d(this._isDirected,arguments[0]):s(this._isDirected,u,h,p),y=this._edgeObjs[v];return y&&(u=y.v,h=y.w,delete this._edgeLabels[v],delete this._edgeObjs[v],a(this._preds[h],u),a(this._sucs[u],h),delete this._in[h][v],delete this._out[u][v],this._edgeCount--),this},i.prototype.inEdges=function(u,h){var p=this._in[u];if(p){var v=e.values(p);return h?e.filter(v,function(y){return y.v===h}):v}},i.prototype.outEdges=function(u,h){var p=this._out[u];if(p){var v=e.values(p);return h?e.filter(v,function(y){return y.w===h}):v}},i.prototype.nodeEdges=function(u,h){var p=this.inEdges(u,h);if(p)return p.concat(this.outEdges(u,h))};function o(u,h){u[h]?u[h]++:u[h]=1}function a(u,h){--u[h]||delete u[h]}function s(u,h,p,v){var y=""+h,m=""+p;if(!u&&y>m){var g=y;y=m,m=g}return y+n+m+n+(e.isUndefined(v)?t:v)}function c(u,h,p,v){var y=""+h,m=""+p;if(!u&&y>m){var g=y;y=m,m=g}var w={v:y,w:m};return v&&(w.name=v),w}function d(u,h){return s(u,h.v,h.w,h.name)}return Cm}var Im,kN;function UJ(){return kN||(kN=1,Im="2.1.8"),Im}var Rm,AN;function GJ(){return AN||(AN=1,Rm={Graph:kS(),version:UJ()}),Rm}var Nm,DN;function KJ(){if(DN)return Nm;DN=1;var e=Cn(),t=kS();Nm={write:r,read:o};function r(a){var s={options:{directed:a.isDirected(),multigraph:a.isMultigraph(),compound:a.isCompound()},nodes:n(a),edges:i(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),d=a.parent(s),u={v:s};return e.isUndefined(c)||(u.value=c),e.isUndefined(d)||(u.parent=d),u})}function i(a){return e.map(a.edges(),function(s){var c=a.edge(s),d={v:s.v,w:s.w};return e.isUndefined(s.name)||(d.name=s.name),e.isUndefined(c)||(d.value=c),d})}function o(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 Nm}var Tm,jN;function YJ(){if(jN)return Tm;jN=1;var e=Cn();Tm=t;function t(r){var n={},i=[],o;function a(s){e.has(n,s)||(n[s]=!0,o.push(s),e.each(r.successors(s),a),e.each(r.predecessors(s),a))}return e.each(r.nodes(),function(s){o=[],a(s),o.length&&i.push(o)}),i}return Tm}var Pm,qN;function D6(){if(qN)return Pm;qN=1;var e=Cn();Pm=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 i=this._keyIndices;if(r=String(r),!e.has(i,r)){var o=this._arr,a=o.length;return i[r]=a,o.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 i=this._keyIndices[r];if(n>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+r+" Old: "+this._arr[i].priority+" New: "+n);this._arr[i].priority=n,this._decrease(i)},t.prototype._heapify=function(r){var n=this._arr,i=2*r,o=i+1,a=r;i<n.length&&(a=n[i].priority<n[a].priority?i:a,o<n.length&&(a=n[o].priority<n[a].priority?o:a),a!==r&&(this._swap(r,a),this._heapify(a)))},t.prototype._decrease=function(r){for(var n=this._arr,i=n[r].priority,o;r!==0&&(o=r>>1,!(n[o].priority<i));)this._swap(r,o),r=o},t.prototype._swap=function(r,n){var i=this._arr,o=this._keyIndices,a=i[r],s=i[n];i[r]=s,i[n]=a,o[s.key]=r,o[a.key]=n},Pm}var Mm,zN;function j6(){if(zN)return Mm;zN=1;var e=Cn(),t=D6();Mm=n;var r=e.constant(1);function n(o,a,s,c){return i(o,String(a),s||r,c||function(d){return o.outEdges(d)})}function i(o,a,s,c){var d={},u=new t,h,p,v=function(y){var m=y.v!==h?y.v:y.w,g=d[m],w=s(y),x=p.distance+w;if(w<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+y+" Weight: "+w);x<g.distance&&(g.distance=x,g.predecessor=h,u.decrease(m,x))};for(o.nodes().forEach(function(y){var m=y===a?0:Number.POSITIVE_INFINITY;d[y]={distance:m},u.add(y,m)});u.size()>0&&(h=u.removeMin(),p=d[h],p.distance!==Number.POSITIVE_INFINITY);)c(h).forEach(v);return d}return Mm}var km,LN;function XJ(){if(LN)return km;LN=1;var e=j6(),t=Cn();km=r;function r(n,i,o){return t.transform(n.nodes(),function(a,s){a[s]=e(n,s,i,o)},{})}return km}var Am,BN;function q6(){if(BN)return Am;BN=1;var e=Cn();Am=t;function t(r){var n=0,i=[],o={},a=[];function s(c){var d=o[c]={onStack:!0,lowlink:n,index:n++};if(i.push(c),r.successors(c).forEach(function(p){e.has(o,p)?o[p].onStack&&(d.lowlink=Math.min(d.lowlink,o[p].index)):(s(p),d.lowlink=Math.min(d.lowlink,o[p].lowlink))}),d.lowlink===d.index){var u=[],h;do h=i.pop(),o[h].onStack=!1,u.push(h);while(c!==h);a.push(u)}}return r.nodes().forEach(function(c){e.has(o,c)||s(c)}),a}return Am}var Dm,FN;function ZJ(){if(FN)return Dm;FN=1;var e=Cn(),t=q6();Dm=r;function r(n){return e.filter(t(n),function(i){return i.length>1||i.length===1&&n.hasEdge(i[0],i[0])})}return Dm}var jm,$N;function JJ(){if($N)return jm;$N=1;var e=Cn();jm=r;var t=e.constant(1);function r(i,o,a){return n(i,o||t,a||function(s){return i.outEdges(s)})}function n(i,o,a){var s={},c=i.nodes();return c.forEach(function(d){s[d]={},s[d][d]={distance:0},c.forEach(function(u){d!==u&&(s[d][u]={distance:Number.POSITIVE_INFINITY})}),a(d).forEach(function(u){var h=u.v===d?u.w:u.v,p=o(u);s[d][h]={distance:p,predecessor:d}})}),c.forEach(function(d){var u=s[d];c.forEach(function(h){var p=s[h];c.forEach(function(v){var y=p[d],m=u[v],g=p[v],w=y.distance+m.distance;w<g.distance&&(g.distance=w,g.predecessor=m.predecessor)})})}),s}return jm}var qm,VN;function z6(){if(VN)return qm;VN=1;var e=Cn();qm=t,t.CycleException=r;function t(n){var i={},o={},a=[];function s(c){if(e.has(o,c))throw new r;e.has(i,c)||(o[c]=!0,i[c]=!0,e.each(n.predecessors(c),s),delete o[c],a.push(c))}if(e.each(n.sinks(),s),e.size(i)!==n.nodeCount())throw new r;return a}function r(){}return r.prototype=new Error,qm}var zm,HN;function QJ(){if(HN)return zm;HN=1;var e=z6();zm=t;function t(r){try{e(r)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return zm}var Lm,WN;function L6(){if(WN)return Lm;WN=1;var e=Cn();Lm=t;function t(n,i,o){e.isArray(i)||(i=[i]);var a=(n.isDirected()?n.successors:n.neighbors).bind(n),s=[],c={};return e.each(i,function(d){if(!n.hasNode(d))throw new Error("Graph does not have node: "+d);r(n,d,o==="post",c,a,s)}),s}function r(n,i,o,a,s,c){e.has(a,i)||(a[i]=!0,o||c.push(i),e.each(s(i),function(d){r(n,d,o,a,s,c)}),o&&c.push(i))}return Lm}var Bm,UN;function eQ(){if(UN)return Bm;UN=1;var e=L6();Bm=t;function t(r,n){return e(r,n,"post")}return Bm}var Fm,GN;function tQ(){if(GN)return Fm;GN=1;var e=L6();Fm=t;function t(r,n){return e(r,n,"pre")}return Fm}var $m,KN;function rQ(){if(KN)return $m;KN=1;var e=Cn(),t=kS(),r=D6();$m=n;function n(i,o){var a=new t,s={},c=new r,d;function u(p){var v=p.v===d?p.w:p.v,y=c.priority(v);if(y!==void 0){var m=o(p);m<y&&(s[v]=d,c.decrease(v,m))}}if(i.nodeCount()===0)return a;e.each(i.nodes(),function(p){c.add(p,Number.POSITIVE_INFINITY),a.setNode(p)}),c.decrease(i.nodes()[0],0);for(var h=!1;c.size()>0;){if(d=c.removeMin(),e.has(s,d))a.setEdge(d,s[d]);else{if(h)throw new Error("Input graph is not connected: "+i);h=!0}i.nodeEdges(d).forEach(u)}return a}return $m}var Vm,YN;function nQ(){return YN||(YN=1,Vm={components:YJ(),dijkstra:j6(),dijkstraAll:XJ(),findCycles:ZJ(),floydWarshall:JJ(),isAcyclic:QJ(),postorder:eQ(),preorder:tQ(),prim:rQ(),tarjan:q6(),topsort:z6()}),Vm}var Hm,XN;function iQ(){if(XN)return Hm;XN=1;var e=GJ();return Hm={Graph:e.Graph,json:KJ(),alg:nQ(),version:e.version},Hm}var Wm,ZN;function $n(){if(ZN)return Wm;ZN=1;var e;if(typeof mS=="function")try{e=iQ()}catch{}return e||(e=window.graphlib),Wm=e,Wm}var Um,JN;function oQ(){if(JN)return Um;JN=1;var e=u6(),t=1,r=4;function n(i){return e(i,t|r)}return Um=n,Um}var Gm,QN;function Vd(){if(QN)return Gm;QN=1;var e=Va(),t=Oi(),r=Ad(),n=On();function i(o,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],o):!1}return Gm=i,Gm}var Km,eT;function aQ(){if(eT)return Km;eT=1;var e=$d(),t=Va(),r=Vd(),n=Do(),i=Object.prototype,o=i.hasOwnProperty,a=e(function(s,c){s=Object(s);var d=-1,u=c.length,h=u>2?c[2]:void 0;for(h&&r(c[0],c[1],h)&&(u=1);++d<u;)for(var p=c[d],v=n(p),y=-1,m=v.length;++y<m;){var g=v[y],w=s[g];(w===void 0||t(w,i[g])&&!o.call(s,g))&&(s[g]=p[g])}return s});return Km=a,Km}var Ym,tT;function sQ(){if(tT)return Ym;tT=1;var e=Ci(),t=Oi(),r=to();function n(i){return function(o,a,s){var c=Object(o);if(!t(o)){var d=e(a,3);o=r(o),a=function(h){return d(c[h],h,c)}}var u=i(o,a,s);return u>-1?c[d?o[u]:u]:void 0}}return Ym=n,Ym}var Xm,rT;function lQ(){if(rT)return Xm;rT=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Xm=t,Xm}var Zm,nT;function cQ(){if(nT)return Zm;nT=1;var e=lQ(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Zm=r,Zm}var Jm,iT;function uQ(){if(iT)return Jm;iT=1;var e=cQ(),t=On(),r=Ga(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt;function c(d){if(typeof d=="number")return d;if(r(d))return n;if(t(d)){var u=typeof d.valueOf=="function"?d.valueOf():d;d=t(u)?u+"":u}if(typeof d!="string")return d===0?d:+d;d=e(d);var h=o.test(d);return h||a.test(d)?s(d.slice(2),h?2:8):i.test(d)?n:+d}return Jm=c,Jm}var Qm,oT;function B6(){if(oT)return Qm;oT=1;var e=uQ(),t=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var o=i<0?-1:1;return o*r}return i===i?i:0}return Qm=n,Qm}var eb,aT;function dQ(){if(aT)return eb;aT=1;var e=B6();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return eb=t,eb}var tb,sT;function fQ(){if(sT)return tb;sT=1;var e=M6(),t=Ci(),r=dQ(),n=Math.max;function i(o,a,s){var c=o==null?0:o.length;if(!c)return-1;var d=s==null?0:r(s);return d<0&&(d=n(c+d,0)),e(o,t(a,3),d)}return tb=i,tb}var rb,lT;function hQ(){if(lT)return rb;lT=1;var e=sQ(),t=fQ(),r=e(t);return rb=r,rb}var nb,cT;function F6(){if(cT)return nb;cT=1;var e=MS();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return nb=t,nb}var ib,uT;function pQ(){if(uT)return ib;uT=1;var e=RS(),t=d6(),r=Do();function n(i,o){return i==null?i:e(i,t(o),r)}return ib=n,ib}var ob,dT;function vQ(){if(dT)return ob;dT=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return ob=e,ob}var ab,fT;function gQ(){if(fT)return ab;fT=1;var e=Md(),t=NS(),r=Ci();function n(i,o){var a={};return o=r(o,3),t(i,function(s,c,d){e(a,c,o(s,c,d))}),a}return ab=n,ab}var sb,hT;function AS(){if(hT)return sb;hT=1;var e=Ga();function t(r,n,i){for(var o=-1,a=r.length;++o<a;){var s=r[o],c=n(s);if(c!=null&&(d===void 0?c===c&&!e(c):i(c,d)))var d=c,u=s}return u}return sb=t,sb}var lb,pT;function mQ(){if(pT)return lb;pT=1;function e(t,r){return t>r}return lb=e,lb}var cb,vT;function bQ(){if(vT)return cb;vT=1;var e=AS(),t=mQ(),r=jo();function n(i){return i&&i.length?e(i,r,t):void 0}return cb=n,cb}var ub,gT;function $6(){if(gT)return ub;gT=1;var e=Md(),t=Va();function r(n,i,o){(o!==void 0&&!t(n[i],o)||o===void 0&&!(i in n))&&e(n,i,o)}return ub=r,ub}var db,mT;function yQ(){if(mT)return db;mT=1;var e=ko(),t=qd(),r=si(),n="[object Object]",i=Function.prototype,o=Object.prototype,a=i.toString,s=o.hasOwnProperty,c=a.call(Object);function d(u){if(!r(u)||e(u)!=n)return!1;var h=t(u);if(h===null)return!0;var p=s.call(h,"constructor")&&h.constructor;return typeof p=="function"&&p instanceof p&&a.call(p)==c}return db=d,db}var fb,bT;function V6(){if(bT)return fb;bT=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return fb=e,fb}var hb,yT;function xQ(){if(yT)return hb;yT=1;var e=Tl(),t=Do();function r(n){return e(n,t(n))}return hb=r,hb}var pb,xT;function wQ(){if(xT)return pb;xT=1;var e=$6(),t=J4(),r=s6(),n=Q4(),i=c6(),o=Pl(),a=Ut(),s=k6(),c=Wa(),d=Nl(),u=On(),h=yQ(),p=Ml(),v=V6(),y=xQ();function m(g,w,x,_,S,E,I){var N=v(g,x),T=v(w,x),M=I.get(T);if(M){e(g,x,M);return}var z=E?E(N,T,x+"",g,w,I):void 0,j=z===void 0;if(j){var W=a(T),U=!W&&c(T),A=!W&&!U&&p(T);z=T,W||U||A?a(N)?z=N:s(N)?z=n(N):U?(j=!1,z=t(T,!0)):A?(j=!1,z=r(T,!0)):z=[]:h(T)||o(T)?(z=N,o(N)?z=y(N):(!u(N)||d(N))&&(z=i(T))):j=!1}j&&(I.set(T,z),S(z,T,_,E,I),I.delete(T)),e(g,x,z)}return pb=m,pb}var vb,wT;function SQ(){if(wT)return vb;wT=1;var e=Pd(),t=$6(),r=RS(),n=wQ(),i=On(),o=Do(),a=V6();function s(c,d,u,h,p){c!==d&&r(d,function(v,y){if(p||(p=new e),i(v))n(c,d,y,u,s,h,p);else{var m=h?h(a(c,y),v,y+"",c,d,p):void 0;m===void 0&&(m=v),t(c,y,m)}},o)}return vb=s,vb}var gb,ST;function EQ(){if(ST)return gb;ST=1;var e=$d(),t=Vd();function r(n){return e(function(i,o){var a=-1,s=o.length,c=s>1?o[s-1]:void 0,d=s>2?o[2]:void 0;for(c=n.length>3&&typeof c=="function"?(s--,c):void 0,d&&t(o[0],o[1],d)&&(c=s<3?void 0:c,s=1),i=Object(i);++a<s;){var u=o[a];u&&n(i,u,a,c)}return i})}return gb=r,gb}var mb,ET;function _Q(){if(ET)return mb;ET=1;var e=SQ(),t=EQ(),r=t(function(n,i,o){e(n,i,o)});return mb=r,mb}var bb,_T;function H6(){if(_T)return bb;_T=1;function e(t,r){return t<r}return bb=e,bb}var yb,OT;function OQ(){if(OT)return yb;OT=1;var e=AS(),t=H6(),r=jo();function n(i){return i&&i.length?e(i,r,t):void 0}return yb=n,yb}var xb,CT;function CQ(){if(CT)return xb;CT=1;var e=AS(),t=Ci(),r=H6();function n(i,o){return i&&i.length?e(i,t(o,2),r):void 0}return xb=n,xb}var wb,IT;function IQ(){if(IT)return wb;IT=1;var e=Vn(),t=function(){return e.Date.now()};return wb=t,wb}var Sb,RT;function RQ(){if(RT)return Sb;RT=1;var e=kd(),t=Bd(),r=Ad(),n=On(),i=kl();function o(a,s,c,d){if(!n(a))return a;s=t(s,a);for(var u=-1,h=s.length,p=h-1,v=a;v!=null&&++u<h;){var y=i(s[u]),m=c;if(y==="__proto__"||y==="constructor"||y==="prototype")return a;if(u!=p){var g=v[y];m=d?d(g,y,v):void 0,m===void 0&&(m=n(g)?g:r(s[u+1])?[]:{})}e(v,y,m),v=v[y]}return a}return Sb=o,Sb}var Eb,NT;function NQ(){if(NT)return Eb;NT=1;var e=Fd(),t=RQ(),r=Bd();function n(i,o,a){for(var s=-1,c=o.length,d={};++s<c;){var u=o[s],h=e(i,u);a(h,u)&&t(d,r(u,i),h)}return d}return Eb=n,Eb}var _b,TT;function TQ(){if(TT)return _b;TT=1;var e=NQ(),t=S6();function r(n,i){return e(n,i,function(o,a){return t(n,a)})}return _b=r,_b}var Ob,PT;function PQ(){if(PT)return Ob;PT=1;var e=F6(),t=T6(),r=P6();function n(i){return r(t(i,void 0,e),i+"")}return Ob=n,Ob}var Cb,MT;function MQ(){if(MT)return Cb;MT=1;var e=TQ(),t=PQ(),r=t(function(n,i){return n==null?{}:e(n,i)});return Cb=r,Cb}var Ib,kT;function kQ(){if(kT)return Ib;kT=1;var e=Math.ceil,t=Math.max;function r(n,i,o,a){for(var s=-1,c=t(e((i-n)/(o||1)),0),d=Array(c);c--;)d[a?c:++s]=n,n+=o;return d}return Ib=r,Ib}var Rb,AT;function AQ(){if(AT)return Rb;AT=1;var e=kQ(),t=Vd(),r=B6();function n(i){return function(o,a,s){return s&&typeof s!="number"&&t(o,a,s)&&(a=s=void 0),o=r(o),a===void 0?(a=o,o=0):a=r(a),s=s===void 0?o<a?1:-1:r(s),e(o,a,s,i)}}return Rb=n,Rb}var Nb,DT;function DQ(){if(DT)return Nb;DT=1;var e=AQ(),t=e();return Nb=t,Nb}var Tb,jT;function jQ(){if(jT)return Tb;jT=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return Tb=e,Tb}var Pb,qT;function qQ(){if(qT)return Pb;qT=1;var e=Ga();function t(r,n){if(r!==n){var i=r!==void 0,o=r===null,a=r===r,s=e(r),c=n!==void 0,d=n===null,u=n===n,h=e(n);if(!d&&!h&&!s&&r>n||s&&c&&u&&!d&&!h||o&&c&&u||!i&&u||!a)return 1;if(!o&&!s&&!h&&r<n||h&&i&&a&&!o&&!s||d&&i&&a||!c&&a||!u)return-1}return 0}return Pb=t,Pb}var Mb,zT;function zQ(){if(zT)return Mb;zT=1;var e=qQ();function t(r,n,i){for(var o=-1,a=r.criteria,s=n.criteria,c=a.length,d=i.length;++o<c;){var u=e(a[o],s[o]);if(u){if(o>=d)return u;var h=i[o];return u*(h=="desc"?-1:1)}}return r.index-n.index}return Mb=t,Mb}var kb,LT;function LQ(){if(LT)return kb;LT=1;var e=Ld(),t=Fd(),r=Ci(),n=I6(),i=jQ(),o=Dd(),a=zQ(),s=jo(),c=Ut();function d(u,h,p){h.length?h=e(h,function(m){return c(m)?function(g){return t(g,m.length===1?m[0]:m)}:m}):h=[s];var v=-1;h=e(h,o(r));var y=n(u,function(m,g,w){var x=e(h,function(_){return _(m)});return{criteria:x,index:++v,value:m}});return i(y,function(m,g){return a(m,g,p)})}return kb=d,kb}var Ab,BT;function BQ(){if(BT)return Ab;BT=1;var e=MS(),t=LQ(),r=$d(),n=Vd(),i=r(function(o,a){if(o==null)return[];var s=a.length;return s>1&&n(o,a[0],a[1])?a=[]:s>2&&n(a[0],a[1],a[2])&&(a=[a[0]]),t(o,e(a,1),[])});return Ab=i,Ab}var Db,FT;function FQ(){if(FT)return Db;FT=1;var e=x6(),t=0;function r(n){var i=++t;return e(n)+i}return Db=r,Db}var jb,$T;function $Q(){if($T)return jb;$T=1;function e(t,r,n){for(var i=-1,o=t.length,a=r.length,s={};++i<o;){var c=i<a?r[i]:void 0;n(s,t[i],c)}return s}return jb=e,jb}var qb,VT;function VQ(){if(VT)return qb;VT=1;var e=kd(),t=$Q();function r(n,i){return t(n||[],i||[],e)}return qb=r,qb}var zb,HT;function It(){if(HT)return zb;HT=1;var e;if(typeof mS=="function")try{e={cloneDeep:oQ(),constant:IS(),defaults:aQ(),each:h6(),filter:_6(),find:hQ(),flatten:F6(),forEach:f6(),forIn:pQ(),has:O6(),isUndefined:C6(),last:vQ(),map:R6(),mapValues:gQ(),max:bQ(),merge:_Q(),min:OQ(),minBy:CQ(),now:IQ(),pick:MQ(),range:DQ(),reduce:N6(),sortBy:BQ(),uniqueId:FQ(),values:A6(),zipObject:VQ()}}catch{}return e||(e=window._),zb=e,zb}var Lb,WT;function HQ(){if(WT)return Lb;WT=1,Lb=e;function e(){var n={};n._next=n._prev=n,this._sentinel=n}e.prototype.dequeue=function(){var n=this._sentinel,i=n._prev;if(i!==n)return t(i),i},e.prototype.enqueue=function(n){var i=this._sentinel;n._prev&&n._next&&t(n),n._next=i._next,i._next._prev=n,i._next=n,n._prev=i},e.prototype.toString=function(){for(var n=[],i=this._sentinel,o=i._prev;o!==i;)n.push(JSON.stringify(o,r)),o=o._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,i){if(n!=="_next"&&n!=="_prev")return i}return Lb}var Bb,UT;function WQ(){if(UT)return Bb;UT=1;var e=It(),t=$n().Graph,r=HQ();Bb=i;var n=e.constant(1);function i(d,u){if(d.nodeCount()<=1)return[];var h=s(d,u||n),p=o(h.graph,h.buckets,h.zeroIdx);return e.flatten(e.map(p,function(v){return d.outEdges(v.v,v.w)}),!0)}function o(d,u,h){for(var p=[],v=u[u.length-1],y=u[0],m;d.nodeCount();){for(;m=y.dequeue();)a(d,u,h,m);for(;m=v.dequeue();)a(d,u,h,m);if(d.nodeCount()){for(var g=u.length-2;g>0;--g)if(m=u[g].dequeue(),m){p=p.concat(a(d,u,h,m,!0));break}}}return p}function a(d,u,h,p,v){var y=v?[]:void 0;return e.forEach(d.inEdges(p.v),function(m){var g=d.edge(m),w=d.node(m.v);v&&y.push({v:m.v,w:m.w}),w.out-=g,c(u,h,w)}),e.forEach(d.outEdges(p.v),function(m){var g=d.edge(m),w=m.w,x=d.node(w);x.in-=g,c(u,h,x)}),d.removeNode(p.v),y}function s(d,u){var h=new t,p=0,v=0;e.forEach(d.nodes(),function(g){h.setNode(g,{v:g,in:0,out:0})}),e.forEach(d.edges(),function(g){var w=h.edge(g.v,g.w)||0,x=u(g),_=w+x;h.setEdge(g.v,g.w,_),v=Math.max(v,h.node(g.v).out+=x),p=Math.max(p,h.node(g.w).in+=x)});var y=e.range(v+p+3).map(function(){return new r}),m=p+1;return e.forEach(h.nodes(),function(g){c(y,m,h.node(g))}),{graph:h,buckets:y,zeroIdx:m}}function c(d,u,h){h.out?h.in?d[h.out-h.in+u].enqueue(h):d[d.length-1].enqueue(h):d[0].enqueue(h)}return Bb}var Fb,GT;function UQ(){if(GT)return Fb;GT=1;var e=It(),t=WQ();Fb={run:r,undo:i};function r(o){var a=o.graph().acyclicer==="greedy"?t(o,s(o)):n(o);e.forEach(a,function(c){var d=o.edge(c);o.removeEdge(c),d.forwardName=c.name,d.reversed=!0,o.setEdge(c.w,c.v,d,e.uniqueId("rev"))});function s(c){return function(d){return c.edge(d).weight}}}function n(o){var a=[],s={},c={};function d(u){e.has(c,u)||(c[u]=!0,s[u]=!0,e.forEach(o.outEdges(u),function(h){e.has(s,h.w)?a.push(h):d(h.w)}),delete s[u])}return e.forEach(o.nodes(),d),a}function i(o){e.forEach(o.edges(),function(a){var s=o.edge(a);if(s.reversed){o.removeEdge(a);var c=s.forwardName;delete s.reversed,delete s.forwardName,o.setEdge(a.w,a.v,s,c)}})}return Fb}var $b,KT;function Hr(){if(KT)return $b;KT=1;var e=It(),t=$n().Graph;$b={addDummyNode:r,simplify:n,asNonCompoundGraph:i,successorWeights:o,predecessorWeights:a,intersectRect:s,buildLayerMatrix:c,normalizeRanks:d,removeEmptyRanks:u,addBorderNode:h,maxRank:p,partition:v,time:y,notime:m};function r(g,w,x,_){var S;do S=e.uniqueId(_);while(g.hasNode(S));return x.dummy=w,g.setNode(S,x),S}function n(g){var w=new t().setGraph(g.graph());return e.forEach(g.nodes(),function(x){w.setNode(x,g.node(x))}),e.forEach(g.edges(),function(x){var _=w.edge(x.v,x.w)||{weight:0,minlen:1},S=g.edge(x);w.setEdge(x.v,x.w,{weight:_.weight+S.weight,minlen:Math.max(_.minlen,S.minlen)})}),w}function i(g){var w=new t({multigraph:g.isMultigraph()}).setGraph(g.graph());return e.forEach(g.nodes(),function(x){g.children(x).length||w.setNode(x,g.node(x))}),e.forEach(g.edges(),function(x){w.setEdge(x,g.edge(x))}),w}function o(g){var w=e.map(g.nodes(),function(x){var _={};return e.forEach(g.outEdges(x),function(S){_[S.w]=(_[S.w]||0)+g.edge(S).weight}),_});return e.zipObject(g.nodes(),w)}function a(g){var w=e.map(g.nodes(),function(x){var _={};return e.forEach(g.inEdges(x),function(S){_[S.v]=(_[S.v]||0)+g.edge(S).weight}),_});return e.zipObject(g.nodes(),w)}function s(g,w){var x=g.x,_=g.y,S=w.x-x,E=w.y-_,I=g.width/2,N=g.height/2;if(!S&&!E)throw new Error("Not possible to find intersection inside of the rectangle");var T,M;return Math.abs(E)*I>Math.abs(S)*N?(E<0&&(N=-N),T=N*S/E,M=N):(S<0&&(I=-I),T=I,M=I*E/S),{x:x+T,y:_+M}}function c(g){var w=e.map(e.range(p(g)+1),function(){return[]});return e.forEach(g.nodes(),function(x){var _=g.node(x),S=_.rank;e.isUndefined(S)||(w[S][_.order]=x)}),w}function d(g){var w=e.min(e.map(g.nodes(),function(x){return g.node(x).rank}));e.forEach(g.nodes(),function(x){var _=g.node(x);e.has(_,"rank")&&(_.rank-=w)})}function u(g){var w=e.min(e.map(g.nodes(),function(E){return g.node(E).rank})),x=[];e.forEach(g.nodes(),function(E){var I=g.node(E).rank-w;x[I]||(x[I]=[]),x[I].push(E)});var _=0,S=g.graph().nodeRankFactor;e.forEach(x,function(E,I){e.isUndefined(E)&&I%S!==0?--_:_&&e.forEach(E,function(N){g.node(N).rank+=_})})}function h(g,w,x,_){var S={width:0,height:0};return arguments.length>=4&&(S.rank=x,S.order=_),r(g,"border",S,w)}function p(g){return e.max(e.map(g.nodes(),function(w){var x=g.node(w).rank;if(!e.isUndefined(x))return x}))}function v(g,w){var x={lhs:[],rhs:[]};return e.forEach(g,function(_){w(_)?x.lhs.push(_):x.rhs.push(_)}),x}function y(g,w){var x=e.now();try{return w()}finally{console.log(g+" time: "+(e.now()-x)+"ms")}}function m(g,w){return w()}return $b}var Vb,YT;function GQ(){if(YT)return Vb;YT=1;var e=It(),t=Hr();Vb={run:r,undo:i};function r(o){o.graph().dummyChains=[],e.forEach(o.edges(),function(a){n(o,a)})}function n(o,a){var s=a.v,c=o.node(s).rank,d=a.w,u=o.node(d).rank,h=a.name,p=o.edge(a),v=p.labelRank;if(u!==c+1){o.removeEdge(a);var y,m,g;for(g=0,++c;c<u;++g,++c)p.points=[],m={width:0,height:0,edgeLabel:p,edgeObj:a,rank:c},y=t.addDummyNode(o,"edge",m,"_d"),c===v&&(m.width=p.width,m.height=p.height,m.dummy="edge-label",m.labelpos=p.labelpos),o.setEdge(s,y,{weight:p.weight},h),g===0&&o.graph().dummyChains.push(y),s=y;o.setEdge(s,d,{weight:p.weight},h)}}function i(o){e.forEach(o.graph().dummyChains,function(a){var s=o.node(a),c=s.edgeLabel,d;for(o.setEdge(s.edgeObj,c);s.dummy;)d=o.successors(a)[0],o.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=d,s=o.node(a)})}return Vb}var Hb,XT;function Xu(){if(XT)return Hb;XT=1;var e=It();Hb={longestPath:t,slack:r};function t(n){var i={};function o(a){var s=n.node(a);if(e.has(i,a))return s.rank;i[a]=!0;var c=e.min(e.map(n.outEdges(a),function(d){return o(d.w)-n.edge(d).minlen}));return(c===Number.POSITIVE_INFINITY||c===void 0||c===null)&&(c=0),s.rank=c}e.forEach(n.sources(),o)}function r(n,i){return n.node(i.w).rank-n.node(i.v).rank-n.edge(i).minlen}return Hb}var Wb,ZT;function W6(){if(ZT)return Wb;ZT=1;var e=It(),t=$n().Graph,r=Xu().slack;Wb=n;function n(s){var c=new t({directed:!1}),d=s.nodes()[0],u=s.nodeCount();c.setNode(d,{});for(var h,p;i(c,s)<u;)h=o(c,s),p=c.hasNode(h.v)?r(s,h):-r(s,h),a(c,s,p);return c}function i(s,c){function d(u){e.forEach(c.nodeEdges(u),function(h){var p=h.v,v=u===p?h.w:p;!s.hasNode(v)&&!r(c,h)&&(s.setNode(v,{}),s.setEdge(u,v,{}),d(v))})}return e.forEach(s.nodes(),d),s.nodeCount()}function o(s,c){return e.minBy(c.edges(),function(d){if(s.hasNode(d.v)!==s.hasNode(d.w))return r(c,d)})}function a(s,c,d){e.forEach(s.nodes(),function(u){c.node(u).rank+=d})}return Wb}var Ub,JT;function KQ(){if(JT)return Ub;JT=1;var e=It(),t=W6(),r=Xu().slack,n=Xu().longestPath,i=$n().alg.preorder,o=$n().alg.postorder,a=Hr().simplify;Ub=s,s.initLowLimValues=h,s.initCutValues=c,s.calcCutValue=u,s.leaveEdge=v,s.enterEdge=y,s.exchangeEdges=m;function s(_){_=a(_),n(_);var S=t(_);h(S),c(S,_);for(var E,I;E=v(S);)I=y(S,_,E),m(S,_,E,I)}function c(_,S){var E=o(_,_.nodes());E=E.slice(0,E.length-1),e.forEach(E,function(I){d(_,S,I)})}function d(_,S,E){var I=_.node(E),N=I.parent;_.edge(E,N).cutvalue=u(_,S,E)}function u(_,S,E){var I=_.node(E),N=I.parent,T=!0,M=S.edge(E,N),z=0;return M||(T=!1,M=S.edge(N,E)),z=M.weight,e.forEach(S.nodeEdges(E),function(j){var W=j.v===E,U=W?j.w:j.v;if(U!==N){var A=W===T,K=S.edge(j).weight;if(z+=A?K:-K,w(_,E,U)){var V=_.edge(E,U).cutvalue;z+=A?-V:V}}}),z}function h(_,S){arguments.length<2&&(S=_.nodes()[0]),p(_,{},1,S)}function p(_,S,E,I,N){var T=E,M=_.node(I);return S[I]=!0,e.forEach(_.neighbors(I),function(z){e.has(S,z)||(E=p(_,S,E,z,I))}),M.low=T,M.lim=E++,N?M.parent=N:delete M.parent,E}function v(_){return e.find(_.edges(),function(S){return _.edge(S).cutvalue<0})}function y(_,S,E){var I=E.v,N=E.w;S.hasEdge(I,N)||(I=E.w,N=E.v);var T=_.node(I),M=_.node(N),z=T,j=!1;T.lim>M.lim&&(z=M,j=!0);var W=e.filter(S.edges(),function(U){return j===x(_,_.node(U.v),z)&&j!==x(_,_.node(U.w),z)});return e.minBy(W,function(U){return r(S,U)})}function m(_,S,E,I){var N=E.v,T=E.w;_.removeEdge(N,T),_.setEdge(I.v,I.w,{}),h(_),c(_,S),g(_,S)}function g(_,S){var E=e.find(_.nodes(),function(N){return!S.node(N).parent}),I=i(_,E);I=I.slice(1),e.forEach(I,function(N){var T=_.node(N).parent,M=S.edge(N,T),z=!1;M||(M=S.edge(T,N),z=!0),S.node(N).rank=S.node(T).rank+(z?M.minlen:-M.minlen)})}function w(_,S,E){return _.hasEdge(S,E)}function x(_,S,E){return E.low<=S.lim&&S.lim<=E.lim}return Ub}var Gb,QT;function YQ(){if(QT)return Gb;QT=1;var e=Xu(),t=e.longestPath,r=W6(),n=KQ();Gb=i;function i(c){switch(c.graph().ranker){case"network-simplex":s(c);break;case"tight-tree":a(c);break;case"longest-path":o(c);break;default:s(c)}}var o=t;function a(c){t(c),r(c)}function s(c){n(c)}return Gb}var Kb,eP;function XQ(){if(eP)return Kb;eP=1;var e=It();Kb=t;function t(i){var o=n(i);e.forEach(i.graph().dummyChains,function(a){for(var s=i.node(a),c=s.edgeObj,d=r(i,o,c.v,c.w),u=d.path,h=d.lca,p=0,v=u[p],y=!0;a!==c.w;){if(s=i.node(a),y){for(;(v=u[p])!==h&&i.node(v).maxRank<s.rank;)p++;v===h&&(y=!1)}if(!y){for(;p<u.length-1&&i.node(v=u[p+1]).minRank<=s.rank;)p++;v=u[p]}i.setParent(a,v),a=i.successors(a)[0]}})}function r(i,o,a,s){var c=[],d=[],u=Math.min(o[a].low,o[s].low),h=Math.max(o[a].lim,o[s].lim),p,v;p=a;do p=i.parent(p),c.push(p);while(p&&(o[p].low>u||h>o[p].lim));for(v=p,p=s;(p=i.parent(p))!==v;)d.push(p);return{path:c.concat(d.reverse()),lca:v}}function n(i){var o={},a=0;function s(c){var d=a;e.forEach(i.children(c),s),o[c]={low:d,lim:a++}}return e.forEach(i.children(),s),o}return Kb}var Yb,tP;function ZQ(){if(tP)return Yb;tP=1;var e=It(),t=Hr();Yb={run:r,cleanup:a};function r(s){var c=t.addDummyNode(s,"root",{},"_root"),d=i(s),u=e.max(e.values(d))-1,h=2*u+1;s.graph().nestingRoot=c,e.forEach(s.edges(),function(v){s.edge(v).minlen*=h});var p=o(s)+1;e.forEach(s.children(),function(v){n(s,c,h,p,u,d,v)}),s.graph().nodeRankFactor=h}function n(s,c,d,u,h,p,v){var y=s.children(v);if(!y.length){v!==c&&s.setEdge(c,v,{weight:0,minlen:d});return}var m=t.addBorderNode(s,"_bt"),g=t.addBorderNode(s,"_bb"),w=s.node(v);s.setParent(m,v),w.borderTop=m,s.setParent(g,v),w.borderBottom=g,e.forEach(y,function(x){n(s,c,d,u,h,p,x);var _=s.node(x),S=_.borderTop?_.borderTop:x,E=_.borderBottom?_.borderBottom:x,I=_.borderTop?u:2*u,N=S!==E?1:h-p[v]+1;s.setEdge(m,S,{weight:I,minlen:N,nestingEdge:!0}),s.setEdge(E,g,{weight:I,minlen:N,nestingEdge:!0})}),s.parent(v)||s.setEdge(c,m,{weight:0,minlen:h+p[v]})}function i(s){var c={};function d(u,h){var p=s.children(u);p&&p.length&&e.forEach(p,function(v){d(v,h+1)}),c[u]=h}return e.forEach(s.children(),function(u){d(u,1)}),c}function o(s){return e.reduce(s.edges(),function(c,d){return c+s.edge(d).weight},0)}function a(s){var c=s.graph();s.removeNode(c.nestingRoot),delete c.nestingRoot,e.forEach(s.edges(),function(d){var u=s.edge(d);u.nestingEdge&&s.removeEdge(d)})}return Yb}var Xb,rP;function JQ(){if(rP)return Xb;rP=1;var e=It(),t=Hr();Xb=r;function r(i){function o(a){var s=i.children(a),c=i.node(a);if(s.length&&e.forEach(s,o),e.has(c,"minRank")){c.borderLeft=[],c.borderRight=[];for(var d=c.minRank,u=c.maxRank+1;d<u;++d)n(i,"borderLeft","_bl",a,c,d),n(i,"borderRight","_br",a,c,d)}}e.forEach(i.children(),o)}function n(i,o,a,s,c,d){var u={width:0,height:0,rank:d,borderType:o},h=c[o][d-1],p=t.addDummyNode(i,"border",u,a);c[o][d]=p,i.setParent(p,s),h&&i.setEdge(h,p,{weight:1})}return Xb}var Zb,nP;function QQ(){if(nP)return Zb;nP=1;var e=It();Zb={adjust:t,undo:r};function t(d){var u=d.graph().rankdir.toLowerCase();(u==="lr"||u==="rl")&&n(d)}function r(d){var u=d.graph().rankdir.toLowerCase();(u==="bt"||u==="rl")&&o(d),(u==="lr"||u==="rl")&&(s(d),n(d))}function n(d){e.forEach(d.nodes(),function(u){i(d.node(u))}),e.forEach(d.edges(),function(u){i(d.edge(u))})}function i(d){var u=d.width;d.width=d.height,d.height=u}function o(d){e.forEach(d.nodes(),function(u){a(d.node(u))}),e.forEach(d.edges(),function(u){var h=d.edge(u);e.forEach(h.points,a),e.has(h,"y")&&a(h)})}function a(d){d.y=-d.y}function s(d){e.forEach(d.nodes(),function(u){c(d.node(u))}),e.forEach(d.edges(),function(u){var h=d.edge(u);e.forEach(h.points,c),e.has(h,"x")&&c(h)})}function c(d){var u=d.x;d.x=d.y,d.y=u}return Zb}var Jb,iP;function eee(){if(iP)return Jb;iP=1;var e=It();Jb=t;function t(r){var n={},i=e.filter(r.nodes(),function(d){return!r.children(d).length}),o=e.max(e.map(i,function(d){return r.node(d).rank})),a=e.map(e.range(o+1),function(){return[]});function s(d){if(!e.has(n,d)){n[d]=!0;var u=r.node(d);a[u.rank].push(d),e.forEach(r.successors(d),s)}}var c=e.sortBy(i,function(d){return r.node(d).rank});return e.forEach(c,s),a}return Jb}var Qb,oP;function tee(){if(oP)return Qb;oP=1;var e=It();Qb=t;function t(n,i){for(var o=0,a=1;a<i.length;++a)o+=r(n,i[a-1],i[a]);return o}function r(n,i,o){for(var a=e.zipObject(o,e.map(o,function(p,v){return v})),s=e.flatten(e.map(i,function(p){return e.sortBy(e.map(n.outEdges(p),function(v){return{pos:a[v.w],weight:n.edge(v).weight}}),"pos")}),!0),c=1;c<o.length;)c<<=1;var d=2*c-1;c-=1;var u=e.map(new Array(d),function(){return 0}),h=0;return e.forEach(s.forEach(function(p){var v=p.pos+c;u[v]+=p.weight;for(var y=0;v>0;)v%2&&(y+=u[v+1]),v=v-1>>1,u[v]+=p.weight;h+=p.weight*y})),h}return Qb}var e0,aP;function ree(){if(aP)return e0;aP=1;var e=It();e0=t;function t(r,n){return e.map(n,function(i){var o=r.inEdges(i);if(o.length){var a=e.reduce(o,function(s,c){var d=r.edge(c),u=r.node(c.v);return{sum:s.sum+d.weight*u.order,weight:s.weight+d.weight}},{sum:0,weight:0});return{v:i,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:i}})}return e0}var t0,sP;function nee(){if(sP)return t0;sP=1;var e=It();t0=t;function t(i,o){var a={};e.forEach(i,function(c,d){var u=a[c.v]={indegree:0,in:[],out:[],vs:[c.v],i:d};e.isUndefined(c.barycenter)||(u.barycenter=c.barycenter,u.weight=c.weight)}),e.forEach(o.edges(),function(c){var d=a[c.v],u=a[c.w];!e.isUndefined(d)&&!e.isUndefined(u)&&(u.indegree++,d.out.push(a[c.w]))});var s=e.filter(a,function(c){return!c.indegree});return r(s)}function r(i){var o=[];function a(d){return function(u){u.merged||(e.isUndefined(u.barycenter)||e.isUndefined(d.barycenter)||u.barycenter>=d.barycenter)&&n(d,u)}}function s(d){return function(u){u.in.push(d),--u.indegree===0&&i.push(u)}}for(;i.length;){var c=i.pop();o.push(c),e.forEach(c.in.reverse(),a(c)),e.forEach(c.out,s(c))}return e.map(e.filter(o,function(d){return!d.merged}),function(d){return e.pick(d,["vs","i","barycenter","weight"])})}function n(i,o){var a=0,s=0;i.weight&&(a+=i.barycenter*i.weight,s+=i.weight),o.weight&&(a+=o.barycenter*o.weight,s+=o.weight),i.vs=o.vs.concat(i.vs),i.barycenter=a/s,i.weight=s,i.i=Math.min(o.i,i.i),o.merged=!0}return t0}var r0,lP;function iee(){if(lP)return r0;lP=1;var e=It(),t=Hr();r0=r;function r(o,a){var s=t.partition(o,function(m){return e.has(m,"barycenter")}),c=s.lhs,d=e.sortBy(s.rhs,function(m){return-m.i}),u=[],h=0,p=0,v=0;c.sort(i(!!a)),v=n(u,d,v),e.forEach(c,function(m){v+=m.vs.length,u.push(m.vs),h+=m.barycenter*m.weight,p+=m.weight,v=n(u,d,v)});var y={vs:e.flatten(u,!0)};return p&&(y.barycenter=h/p,y.weight=p),y}function n(o,a,s){for(var c;a.length&&(c=e.last(a)).i<=s;)a.pop(),o.push(c.vs),s++;return s}function i(o){return function(a,s){return a.barycenter<s.barycenter?-1:a.barycenter>s.barycenter?1:o?s.i-a.i:a.i-s.i}}return r0}var n0,cP;function oee(){if(cP)return n0;cP=1;var e=It(),t=ree(),r=nee(),n=iee();n0=i;function i(s,c,d,u){var h=s.children(c),p=s.node(c),v=p?p.borderLeft:void 0,y=p?p.borderRight:void 0,m={};v&&(h=e.filter(h,function(E){return E!==v&&E!==y}));var g=t(s,h);e.forEach(g,function(E){if(s.children(E.v).length){var I=i(s,E.v,d,u);m[E.v]=I,e.has(I,"barycenter")&&a(E,I)}});var w=r(g,d);o(w,m);var x=n(w,u);if(v&&(x.vs=e.flatten([v,x.vs,y],!0),s.predecessors(v).length)){var _=s.node(s.predecessors(v)[0]),S=s.node(s.predecessors(y)[0]);e.has(x,"barycenter")||(x.barycenter=0,x.weight=0),x.barycenter=(x.barycenter*x.weight+_.order+S.order)/(x.weight+2),x.weight+=2}return x}function o(s,c){e.forEach(s,function(d){d.vs=e.flatten(d.vs.map(function(u){return c[u]?c[u].vs:u}),!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 n0}var i0,uP;function aee(){if(uP)return i0;uP=1;var e=It(),t=$n().Graph;i0=r;function r(i,o,a){var s=n(i),c=new t({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(d){return i.node(d)});return e.forEach(i.nodes(),function(d){var u=i.node(d),h=i.parent(d);(u.rank===o||u.minRank<=o&&o<=u.maxRank)&&(c.setNode(d),c.setParent(d,h||s),e.forEach(i[a](d),function(p){var v=p.v===d?p.w:p.v,y=c.edge(v,d),m=e.isUndefined(y)?0:y.weight;c.setEdge(v,d,{weight:i.edge(p).weight+m})}),e.has(u,"minRank")&&c.setNode(d,{borderLeft:u.borderLeft[o],borderRight:u.borderRight[o]}))}),c}function n(i){for(var o;i.hasNode(o=e.uniqueId("_root")););return o}return i0}var o0,dP;function see(){if(dP)return o0;dP=1;var e=It();o0=t;function t(r,n,i){var o={},a;e.forEach(i,function(s){for(var c=r.parent(s),d,u;c;){if(d=r.parent(c),d?(u=o[d],o[d]=c):(u=a,a=c),u&&u!==c){n.setEdge(u,c);return}c=d}})}return o0}var a0,fP;function lee(){if(fP)return a0;fP=1;var e=It(),t=eee(),r=tee(),n=oee(),i=aee(),o=see(),a=$n().Graph,s=Hr();a0=c;function c(p){var v=s.maxRank(p),y=d(p,e.range(1,v+1),"inEdges"),m=d(p,e.range(v-1,-1,-1),"outEdges"),g=t(p);h(p,g);for(var w=Number.POSITIVE_INFINITY,x,_=0,S=0;S<4;++_,++S){u(_%2?y:m,_%4>=2),g=s.buildLayerMatrix(p);var E=r(p,g);E<w&&(S=0,x=e.cloneDeep(g),w=E)}h(p,x)}function d(p,v,y){return e.map(v,function(m){return i(p,m,y)})}function u(p,v){var y=new a;e.forEach(p,function(m){var g=m.graph().root,w=n(m,g,y,v);e.forEach(w.vs,function(x,_){m.node(x).order=_}),o(m,y,w.vs)})}function h(p,v){e.forEach(v,function(y){e.forEach(y,function(m,g){p.node(m).order=g})})}return a0}var s0,hP;function cee(){if(hP)return s0;hP=1;var e=It(),t=$n().Graph,r=Hr();s0={positionX:y,findType1Conflicts:n,findType2Conflicts:i,addConflict:a,hasConflict:s,verticalAlignment:c,horizontalCompaction:d,alignCoordinates:p,findSmallestWidthAlignment:h,balance:v};function n(w,x){var _={};function S(E,I){var N=0,T=0,M=E.length,z=e.last(I);return e.forEach(I,function(j,W){var U=o(w,j),A=U?w.node(U).order:M;(U||j===z)&&(e.forEach(I.slice(T,W+1),function(K){e.forEach(w.predecessors(K),function(V){var te=w.node(V),G=te.order;(G<N||A<G)&&!(te.dummy&&w.node(K).dummy)&&a(_,V,K)})}),T=W+1,N=A)}),I}return e.reduce(x,S),_}function i(w,x){var _={};function S(I,N,T,M,z){var j;e.forEach(e.range(N,T),function(W){j=I[W],w.node(j).dummy&&e.forEach(w.predecessors(j),function(U){var A=w.node(U);A.dummy&&(A.order<M||A.order>z)&&a(_,U,j)})})}function E(I,N){var T=-1,M,z=0;return e.forEach(N,function(j,W){if(w.node(j).dummy==="border"){var U=w.predecessors(j);U.length&&(M=w.node(U[0]).order,S(N,z,W,T,M),z=W,T=M)}S(N,z,N.length,M,I.length)}),N}return e.reduce(x,E),_}function o(w,x){if(w.node(x).dummy)return e.find(w.predecessors(x),function(_){return w.node(_).dummy})}function a(w,x,_){if(x>_){var S=x;x=_,_=S}var E=w[x];E||(w[x]=E={}),E[_]=!0}function s(w,x,_){if(x>_){var S=x;x=_,_=S}return e.has(w[x],_)}function c(w,x,_,S){var E={},I={},N={};return e.forEach(x,function(T){e.forEach(T,function(M,z){E[M]=M,I[M]=M,N[M]=z})}),e.forEach(x,function(T){var M=-1;e.forEach(T,function(z){var j=S(z);if(j.length){j=e.sortBy(j,function(V){return N[V]});for(var W=(j.length-1)/2,U=Math.floor(W),A=Math.ceil(W);U<=A;++U){var K=j[U];I[z]===z&&M<N[K]&&!s(_,z,K)&&(I[K]=z,I[z]=E[z]=E[K],M=N[K])}}})}),{root:E,align:I}}function d(w,x,_,S,E){var I={},N=u(w,x,_,E),T=E?"borderLeft":"borderRight";function M(W,U){for(var A=N.nodes(),K=A.pop(),V={};K;)V[K]?W(K):(V[K]=!0,A.push(K),A=A.concat(U(K))),K=A.pop()}function z(W){I[W]=N.inEdges(W).reduce(function(U,A){return Math.max(U,I[A.v]+N.edge(A))},0)}function j(W){var U=N.outEdges(W).reduce(function(K,V){return Math.min(K,I[V.w]-N.edge(V))},Number.POSITIVE_INFINITY),A=w.node(W);U!==Number.POSITIVE_INFINITY&&A.borderType!==T&&(I[W]=Math.max(I[W],U))}return M(z,N.predecessors.bind(N)),M(j,N.successors.bind(N)),e.forEach(S,function(W){I[W]=I[_[W]]}),I}function u(w,x,_,S){var E=new t,I=w.graph(),N=m(I.nodesep,I.edgesep,S);return e.forEach(x,function(T){var M;e.forEach(T,function(z){var j=_[z];if(E.setNode(j),M){var W=_[M],U=E.edge(W,j);E.setEdge(W,j,Math.max(N(w,z,M),U||0))}M=z})}),E}function h(w,x){return e.minBy(e.values(x),function(_){var S=Number.NEGATIVE_INFINITY,E=Number.POSITIVE_INFINITY;return e.forIn(_,function(I,N){var T=g(w,N)/2;S=Math.max(I+T,S),E=Math.min(I-T,E)}),S-E})}function p(w,x){var _=e.values(x),S=e.min(_),E=e.max(_);e.forEach(["u","d"],function(I){e.forEach(["l","r"],function(N){var T=I+N,M=w[T],z;if(M!==x){var j=e.values(M);z=N==="l"?S-e.min(j):E-e.max(j),z&&(w[T]=e.mapValues(M,function(W){return W+z}))}})})}function v(w,x){return e.mapValues(w.ul,function(_,S){if(x)return w[x.toLowerCase()][S];var E=e.sortBy(e.map(w,S));return(E[1]+E[2])/2})}function y(w){var x=r.buildLayerMatrix(w),_=e.merge(n(w,x),i(w,x)),S={},E;e.forEach(["u","d"],function(N){E=N==="u"?x:e.values(x).reverse(),e.forEach(["l","r"],function(T){T==="r"&&(E=e.map(E,function(W){return e.values(W).reverse()}));var M=(N==="u"?w.predecessors:w.successors).bind(w),z=c(w,E,_,M),j=d(w,E,z.root,z.align,T==="r");T==="r"&&(j=e.mapValues(j,function(W){return-W})),S[N+T]=j})});var I=h(w,S);return p(S,I),v(S,w.graph().align)}function m(w,x,_){return function(S,E,I){var N=S.node(E),T=S.node(I),M=0,z;if(M+=N.width/2,e.has(N,"labelpos"))switch(N.labelpos.toLowerCase()){case"l":z=-N.width/2;break;case"r":z=N.width/2;break}if(z&&(M+=_?z:-z),z=0,M+=(N.dummy?x:w)/2,M+=(T.dummy?x:w)/2,M+=T.width/2,e.has(T,"labelpos"))switch(T.labelpos.toLowerCase()){case"l":z=T.width/2;break;case"r":z=-T.width/2;break}return z&&(M+=_?z:-z),z=0,M}}function g(w,x){return w.node(x).width}return s0}var l0,pP;function uee(){if(pP)return l0;pP=1;var e=It(),t=Hr(),r=cee().positionX;l0=n;function n(o){o=t.asNonCompoundGraph(o),i(o),e.forEach(r(o),function(a,s){o.node(s).x=a})}function i(o){var a=t.buildLayerMatrix(o),s=o.graph().ranksep,c=0;e.forEach(a,function(d){var u=e.max(e.map(d,function(h){return o.node(h).height}));e.forEach(d,function(h){o.node(h).y=c+u/2}),c+=u+s})}return l0}var c0,vP;function dee(){if(vP)return c0;vP=1;var e=It(),t=UQ(),r=GQ(),n=YQ(),i=Hr().normalizeRanks,o=XQ(),a=Hr().removeEmptyRanks,s=ZQ(),c=JQ(),d=QQ(),u=lee(),h=uee(),p=Hr(),v=$n().Graph;c0=y;function y(D,$){var H=$&&$.debugTiming?p.time:p.notime;H("layout",function(){var q=H(" buildLayoutGraph",function(){return M(D)});H(" runLayout",function(){m(q,H)}),H(" updateInputGraph",function(){g(D,q)})})}function m(D,$){$(" makeSpaceForEdgeLabels",function(){z(D)}),$(" removeSelfEdges",function(){re(D)}),$(" acyclic",function(){t.run(D)}),$(" nestingGraph.run",function(){s.run(D)}),$(" rank",function(){n(p.asNonCompoundGraph(D))}),$(" injectEdgeLabelProxies",function(){j(D)}),$(" removeEmptyRanks",function(){a(D)}),$(" nestingGraph.cleanup",function(){s.cleanup(D)}),$(" normalizeRanks",function(){i(D)}),$(" assignRankMinMax",function(){W(D)}),$(" removeEdgeLabelProxies",function(){U(D)}),$(" normalize.run",function(){r.run(D)}),$(" parentDummyChains",function(){o(D)}),$(" addBorderSegments",function(){c(D)}),$(" order",function(){u(D)}),$(" insertSelfEdges",function(){P(D)}),$(" adjustCoordinateSystem",function(){d.adjust(D)}),$(" position",function(){h(D)}),$(" positionSelfEdges",function(){B(D)}),$(" removeBorderNodes",function(){G(D)}),$(" normalize.undo",function(){r.undo(D)}),$(" fixupEdgeLabelCoords",function(){V(D)}),$(" undoCoordinateSystem",function(){d.undo(D)}),$(" translateGraph",function(){A(D)}),$(" assignNodeIntersects",function(){K(D)}),$(" reversePoints",function(){te(D)}),$(" acyclic.undo",function(){t.undo(D)})}function g(D,$){e.forEach(D.nodes(),function(H){var q=D.node(H),Y=$.node(H);q&&(q.x=Y.x,q.y=Y.y,$.children(H).length&&(q.width=Y.width,q.height=Y.height))}),e.forEach(D.edges(),function(H){var q=D.edge(H),Y=$.edge(H);q.points=Y.points,e.has(Y,"x")&&(q.x=Y.x,q.y=Y.y)}),D.graph().width=$.graph().width,D.graph().height=$.graph().height}var w=["nodesep","edgesep","ranksep","marginx","marginy"],x={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],S=["width","height"],E={width:0,height:0},I=["minlen","weight","width","height","labeloffset"],N={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},T=["labelpos"];function M(D){var $=new v({multigraph:!0,compound:!0}),H=Q(D.graph());return $.setGraph(e.merge({},x,X(H,w),e.pick(H,_))),e.forEach(D.nodes(),function(q){var Y=Q(D.node(q));$.setNode(q,e.defaults(X(Y,S),E)),$.setParent(q,D.parent(q))}),e.forEach(D.edges(),function(q){var Y=Q(D.edge(q));$.setEdge(q,e.merge({},N,X(Y,I),e.pick(Y,T)))}),$}function z(D){var $=D.graph();$.ranksep/=2,e.forEach(D.edges(),function(H){var q=D.edge(H);q.minlen*=2,q.labelpos.toLowerCase()!=="c"&&($.rankdir==="TB"||$.rankdir==="BT"?q.width+=q.labeloffset:q.height+=q.labeloffset)})}function j(D){e.forEach(D.edges(),function($){var H=D.edge($);if(H.width&&H.height){var q=D.node($.v),Y=D.node($.w),ie={rank:(Y.rank-q.rank)/2+q.rank,e:$};p.addDummyNode(D,"edge-proxy",ie,"_ep")}})}function W(D){var $=0;e.forEach(D.nodes(),function(H){var q=D.node(H);q.borderTop&&(q.minRank=D.node(q.borderTop).rank,q.maxRank=D.node(q.borderBottom).rank,$=e.max($,q.maxRank))}),D.graph().maxRank=$}function U(D){e.forEach(D.nodes(),function($){var H=D.node($);H.dummy==="edge-proxy"&&(D.edge(H.e).labelRank=H.rank,D.removeNode($))})}function A(D){var $=Number.POSITIVE_INFINITY,H=0,q=Number.POSITIVE_INFINITY,Y=0,ie=D.graph(),ne=ie.marginx||0,ve=ie.marginy||0;function Z(J){var ae=J.x,he=J.y,ue=J.width,de=J.height;$=Math.min($,ae-ue/2),H=Math.max(H,ae+ue/2),q=Math.min(q,he-de/2),Y=Math.max(Y,he+de/2)}e.forEach(D.nodes(),function(J){Z(D.node(J))}),e.forEach(D.edges(),function(J){var ae=D.edge(J);e.has(ae,"x")&&Z(ae)}),$-=ne,q-=ve,e.forEach(D.nodes(),function(J){var ae=D.node(J);ae.x-=$,ae.y-=q}),e.forEach(D.edges(),function(J){var ae=D.edge(J);e.forEach(ae.points,function(he){he.x-=$,he.y-=q}),e.has(ae,"x")&&(ae.x-=$),e.has(ae,"y")&&(ae.y-=q)}),ie.width=H-$+ne,ie.height=Y-q+ve}function K(D){e.forEach(D.edges(),function($){var H=D.edge($),q=D.node($.v),Y=D.node($.w),ie,ne;H.points?(ie=H.points[0],ne=H.points[H.points.length-1]):(H.points=[],ie=Y,ne=q),H.points.unshift(p.intersectRect(q,ie)),H.points.push(p.intersectRect(Y,ne))})}function V(D){e.forEach(D.edges(),function($){var H=D.edge($);if(e.has(H,"x"))switch((H.labelpos==="l"||H.labelpos==="r")&&(H.width-=H.labeloffset),H.labelpos){case"l":H.x-=H.width/2+H.labeloffset;break;case"r":H.x+=H.width/2+H.labeloffset;break}})}function te(D){e.forEach(D.edges(),function($){var H=D.edge($);H.reversed&&H.points.reverse()})}function G(D){e.forEach(D.nodes(),function($){if(D.children($).length){var H=D.node($),q=D.node(H.borderTop),Y=D.node(H.borderBottom),ie=D.node(e.last(H.borderLeft)),ne=D.node(e.last(H.borderRight));H.width=Math.abs(ne.x-ie.x),H.height=Math.abs(Y.y-q.y),H.x=ie.x+H.width/2,H.y=q.y+H.height/2}}),e.forEach(D.nodes(),function($){D.node($).dummy==="border"&&D.removeNode($)})}function re(D){e.forEach(D.edges(),function($){if($.v===$.w){var H=D.node($.v);H.selfEdges||(H.selfEdges=[]),H.selfEdges.push({e:$,label:D.edge($)}),D.removeEdge($)}})}function P(D){var $=p.buildLayerMatrix(D);e.forEach($,function(H){var q=0;e.forEach(H,function(Y,ie){var ne=D.node(Y);ne.order=ie+q,e.forEach(ne.selfEdges,function(ve){p.addDummyNode(D,"selfedge",{width:ve.label.width,height:ve.label.height,rank:ne.rank,order:ie+ ++q,e:ve.e,label:ve.label},"_se")}),delete ne.selfEdges})})}function B(D){e.forEach(D.nodes(),function($){var H=D.node($);if(H.dummy==="selfedge"){var q=D.node(H.e.v),Y=q.x+q.width/2,ie=q.y,ne=H.x-Y,ve=q.height/2;D.setEdge(H.e,H.label),D.removeNode($),H.label.points=[{x:Y+2*ne/3,y:ie-ve},{x:Y+5*ne/6,y:ie-ve},{x:Y+ne,y:ie},{x:Y+5*ne/6,y:ie+ve},{x:Y+2*ne/3,y:ie+ve}],H.label.x=H.x,H.label.y=H.y}})}function X(D,$){return e.mapValues(e.pick(D,$),Number)}function Q(D){var $={};return e.forEach(D,function(H,q){$[q.toLowerCase()]=H}),$}return c0}var u0,gP;function fee(){if(gP)return u0;gP=1;var e=It(),t=Hr(),r=$n().Graph;u0={debugOrdering:n};function n(i){var o=t.buildLayerMatrix(i),a=new r({compound:!0,multigraph:!0}).setGraph({});return e.forEach(i.nodes(),function(s){a.setNode(s,{label:s}),a.setParent(s,"layer"+i.node(s).rank)}),e.forEach(i.edges(),function(s){a.setEdge(s.v,s.w,{},s.name)}),e.forEach(o,function(s,c){var d="layer"+c;a.setNode(d,{rank:"same"}),e.reduce(s,function(u,h){return a.setEdge(u,h,{style:"invis"}),h})}),a}return u0}var d0,mP;function hee(){return mP||(mP=1,d0="0.8.5"),d0}var f0,bP;function pee(){return bP||(bP=1,f0={graphlib:$n(),layout:dee(),debug:fee(),util:{time:Hr().time,notime:Hr().notime},version:hee()}),f0}var vee=pee();const yP=eo(vee);function gee(e){let t;const r=new Set,n=(d,u)=>{const h=typeof d=="function"?d(t):d;if(h!==t){const p=t;t=u?h:Object.assign({},t,h),r.forEach(v=>v(t,p))}},i=()=>t,o=(d,u=i,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=u(t);function v(){const y=u(t);if(!h(p,y)){const m=p;d(p=y,m)}}return r.add(v),()=>r.delete(v)},c={setState:n,getState:i,subscribe:(d,u,h)=>u||h?o(d,u,h):(r.add(d),()=>r.delete(d)),destroy:()=>r.clear()};return t=e(n,i,c),c}const mee=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),xP=mee?C.useEffect:C.useLayoutEffect;function bee(e){const t=typeof e=="function"?gee(e):e,r=(n=t.getState,i=Object.is)=>{const[,o]=C.useReducer(g=>g+1,0),a=t.getState(),s=C.useRef(a),c=C.useRef(n),d=C.useRef(i),u=C.useRef(!1),h=C.useRef();h.current===void 0&&(h.current=n(a));let p,v=!1;(s.current!==a||c.current!==n||d.current!==i||u.current)&&(p=n(a),v=!i(h.current,p)),xP(()=>{v&&(h.current=p),s.current=a,c.current=n,d.current=i,u.current=!1});const y=C.useRef(a);xP(()=>{const g=()=>{try{const x=t.getState(),_=c.current(x);d.current(h.current,_)||(s.current=x,h.current=_,o())}catch{u.current=!0,o()}},w=t.subscribe(g);return t.getState()!==y.current&&g(),w},[]);const m=v?p:h.current;return C.useDebugValue(m),m};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 i=n.length<=0;return{value:n.shift(),done:i}}}},r}function yee(){const e=C.createContext(void 0);return{Provider:({initialStore:i,createStore:o,children:a})=>{const s=C.useRef();return s.current||(i&&(console.warn("Provider initialStore is deprecated and will be removed in the next version."),o||(o=()=>i)),s.current=o()),C.createElement(e.Provider,{value:s.current},a)},useStore:(i,o=Object.is)=>{const a=C.useContext(e);if(!a)throw new Error("Seems like you have not used zustand provider as an ancestor.");return a(i,o)},useStoreApi:()=>{const i=C.useContext(e);if(!i)throw new Error("Seems like you have not used zustand provider as an ancestor.");return C.useMemo(()=>({getState:i.getState,setState:i.setState,subscribe:i.subscribe,destroy:i.destroy}),[i])}}}var xee={value:()=>{}};function Hd(){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 Eu(r)}function Eu(e){this._=e}function wee(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Eu.prototype=Hd.prototype={constructor:Eu,on:function(e,t){var r=this._,n=wee(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=See(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=n[o]).type)r[i]=wP(r[i],e.name,t);else if(t==null)for(i in r)r[i]=wP(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Eu(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[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],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};function See(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function wP(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=xee,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var Dw="http://www.w3.org/1999/xhtml";const SP={svg:"http://www.w3.org/2000/svg",xhtml:Dw,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Wd(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),SP.hasOwnProperty(t)?{space:SP[t],local:e}:e}function Eee(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Dw&&t.documentElement.namespaceURI===Dw?t.createElement(e):t.createElementNS(r,e)}}function _ee(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function U6(e){var t=Wd(e);return(t.local?_ee:Eee)(t)}function Oee(){}function DS(e){return e==null?Oee:function(){return this.querySelector(e)}}function Cee(e){typeof e!="function"&&(e=DS(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=new Array(a),c,d,u=0;u<a;++u)(c=o[u])&&(d=e.call(c,c.__data__,u,o))&&("__data__"in c&&(d.__data__=c.__data__),s[u]=d);return new ln(n,this._parents)}function Iee(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Ree(){return[]}function G6(e){return e==null?Ree:function(){return this.querySelectorAll(e)}}function Nee(e){return function(){return Iee(e.apply(this,arguments))}}function Tee(e){typeof e=="function"?e=Nee(e):e=G6(e);for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a=t[o],s=a.length,c,d=0;d<s;++d)(c=a[d])&&(n.push(e.call(c,c.__data__,d,a)),i.push(c));return new ln(n,i)}function K6(e){return function(){return this.matches(e)}}function Y6(e){return function(t){return t.matches(e)}}var Pee=Array.prototype.find;function Mee(e){return function(){return Pee.call(this.children,e)}}function kee(){return this.firstElementChild}function Aee(e){return this.select(e==null?kee:Mee(typeof e=="function"?e:Y6(e)))}var Dee=Array.prototype.filter;function jee(){return Array.from(this.children)}function qee(e){return function(){return Dee.call(this.children,e)}}function zee(e){return this.selectAll(e==null?jee:qee(typeof e=="function"?e:Y6(e)))}function Lee(e){typeof e!="function"&&(e=K6(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],c,d=0;d<a;++d)(c=o[d])&&e.call(c,c.__data__,d,o)&&s.push(c);return new ln(n,this._parents)}function X6(e){return new Array(e.length)}function Bee(){return new ln(this._enter||this._groups.map(X6),this._parents)}function Zu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Zu.prototype={constructor:Zu,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 Fee(e){return function(){return e}}function $ee(e,t,r,n,i,o){for(var a=0,s,c=t.length,d=o.length;a<d;++a)(s=t[a])?(s.__data__=o[a],n[a]=s):r[a]=new Zu(e,o[a]);for(;a<c;++a)(s=t[a])&&(i[a]=s)}function Vee(e,t,r,n,i,o,a){var s,c,d=new Map,u=t.length,h=o.length,p=new Array(u),v;for(s=0;s<u;++s)(c=t[s])&&(p[s]=v=a.call(c,c.__data__,s,t)+"",d.has(v)?i[s]=c:d.set(v,c));for(s=0;s<h;++s)v=a.call(e,o[s],s,o)+"",(c=d.get(v))?(n[s]=c,c.__data__=o[s],d.delete(v)):r[s]=new Zu(e,o[s]);for(s=0;s<u;++s)(c=t[s])&&d.get(p[s])===c&&(i[s]=c)}function Hee(e){return e.__data__}function Wee(e,t){if(!arguments.length)return Array.from(this,Hee);var r=t?Vee:$ee,n=this._parents,i=this._groups;typeof e!="function"&&(e=Fee(e));for(var o=i.length,a=new Array(o),s=new Array(o),c=new Array(o),d=0;d<o;++d){var u=n[d],h=i[d],p=h.length,v=Uee(e.call(u,u&&u.__data__,d,n)),y=v.length,m=s[d]=new Array(y),g=a[d]=new Array(y),w=c[d]=new Array(p);r(u,h,m,g,w,v,t);for(var x=0,_=0,S,E;x<y;++x)if(S=m[x]){for(x>=_&&(_=x+1);!(E=g[_])&&++_<y;);S._next=E||null}}return a=new ln(a,n),a._enter=s,a._exit=c,a}function Uee(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Gee(){return new ln(this._exit||this._groups.map(X6),this._parents)}function Kee(e,t,r){var n=this.enter(),i=this,o=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}function Yee(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,i=r.length,o=n.length,a=Math.min(i,o),s=new Array(i),c=0;c<a;++c)for(var d=r[c],u=n[c],h=d.length,p=s[c]=new Array(h),v,y=0;y<h;++y)(v=d[y]||u[y])&&(p[y]=v);for(;c<i;++c)s[c]=r[c];return new ln(s,this._parents)}function Xee(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],a;--i>=0;)(a=n[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function Zee(e){e||(e=Jee);function t(h,p){return h&&p?e(h.__data__,p.__data__):!h-!p}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],s=a.length,c=i[o]=new Array(s),d,u=0;u<s;++u)(d=a[u])&&(c[u]=d);c.sort(t)}return new ln(i,this._parents).order()}function Jee(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Qee(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function ete(){return Array.from(this)}function tte(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null}function rte(){let e=0;for(const t of this)++e;return e}function nte(){return!this.node()}function ite(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}function ote(e){return function(){this.removeAttribute(e)}}function ate(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ste(e,t){return function(){this.setAttribute(e,t)}}function lte(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function cte(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function ute(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 dte(e,t){var r=Wd(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?ate:ote:typeof t=="function"?r.local?ute:cte:r.local?lte:ste)(r,t))}function Z6(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function fte(e){return function(){this.style.removeProperty(e)}}function hte(e,t,r){return function(){this.style.setProperty(e,t,r)}}function pte(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function vte(e,t,r){return arguments.length>1?this.each((t==null?fte:typeof t=="function"?pte:hte)(e,t,r??"")):ka(this.node(),e)}function ka(e,t){return e.style.getPropertyValue(t)||Z6(e).getComputedStyle(e,null).getPropertyValue(t)}function gte(e){return function(){delete this[e]}}function mte(e,t){return function(){this[e]=t}}function bte(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function yte(e,t){return arguments.length>1?this.each((t==null?gte:typeof t=="function"?bte:mte)(e,t)):this.node()[e]}function J6(e){return e.trim().split(/^|\s+/)}function jS(e){return e.classList||new Q6(e)}function Q6(e){this._node=e,this._names=J6(e.getAttribute("class")||"")}Q6.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 eq(e,t){for(var r=jS(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function tq(e,t){for(var r=jS(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function xte(e){return function(){eq(this,e)}}function wte(e){return function(){tq(this,e)}}function Ste(e,t){return function(){(t.apply(this,arguments)?eq:tq)(this,e)}}function Ete(e,t){var r=J6(e+"");if(arguments.length<2){for(var n=jS(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?Ste:t?xte:wte)(r,t))}function _te(){this.textContent=""}function Ote(e){return function(){this.textContent=e}}function Cte(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Ite(e){return arguments.length?this.each(e==null?_te:(typeof e=="function"?Cte:Ote)(e)):this.node().textContent}function Rte(){this.innerHTML=""}function Nte(e){return function(){this.innerHTML=e}}function Tte(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Pte(e){return arguments.length?this.each(e==null?Rte:(typeof e=="function"?Tte:Nte)(e)):this.node().innerHTML}function Mte(){this.nextSibling&&this.parentNode.appendChild(this)}function kte(){return this.each(Mte)}function Ate(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Dte(){return this.each(Ate)}function jte(e){var t=typeof e=="function"?e:U6(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function qte(){return null}function zte(e,t){var r=typeof e=="function"?e:U6(e),n=t==null?qte:typeof t=="function"?t:DS(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function Lte(){var e=this.parentNode;e&&e.removeChild(this)}function Bte(){return this.each(Lte)}function Fte(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $te(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Vte(e){return this.select(e?$te:Fte)}function Hte(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Wte(e){return function(t){e.call(this,t,this.__data__)}}function Ute(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 Gte(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++n]=o;++n?t.length=n:delete this.__on}}}function Kte(e,t,r){return function(){var n=this.__on,i,o=Wte(t);if(n){for(var a=0,s=n.length;a<s;++a)if((i=n[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=r),i.value=t;return}}this.addEventListener(e.type,o,r),i={type:e.type,name:e.name,value:t,listener:o,options:r},n?n.push(i):this.__on=[i]}}function Yte(e,t,r){var n=Ute(e+""),i,o=n.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,d=s.length,u;c<d;++c)for(i=0,u=s[c];i<o;++i)if((a=n[i]).type===u.type&&a.name===u.name)return u.value}return}for(s=t?Kte:Gte,i=0;i<o;++i)this.each(s(n[i],t,r));return this}function rq(e,t,r){var n=Z6(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Xte(e,t){return function(){return rq(this,e,t)}}function Zte(e,t){return function(){return rq(this,e,t.apply(this,arguments))}}function Jte(e,t){return this.each((typeof t=="function"?Zte:Xte)(e,t))}function*Qte(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length,a;i<o;++i)(a=n[i])&&(yield a)}var nq=[null];function ln(e,t){this._groups=e,this._parents=t}function Al(){return new ln([[document.documentElement]],nq)}function ere(){return this}ln.prototype=Al.prototype={constructor:ln,select:Cee,selectAll:Tee,selectChild:Aee,selectChildren:zee,filter:Lee,data:Wee,enter:Bee,exit:Gee,join:Kee,merge:Yee,selection:ere,order:Xee,sort:Zee,call:Qee,nodes:ete,node:tte,size:rte,empty:nte,each:ite,attr:dte,style:vte,property:yte,classed:Ete,text:Ite,html:Pte,raise:kte,lower:Dte,append:jte,insert:zte,remove:Bte,clone:Vte,datum:Hte,on:Yte,dispatch:Jte,[Symbol.iterator]:Qte};function jn(e){return typeof e=="string"?new ln([[document.querySelector(e)]],[document.documentElement]):new ln([[e]],nq)}function tre(e){let t;for(;t=e.sourceEvent;)e=t;return e}function ti(e,t){if(e=tre(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 i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const rre={passive:!1},hl={capture:!0,passive:!1};function h0(e){e.stopImmediatePropagation()}function Sa(e){e.preventDefault(),e.stopImmediatePropagation()}function iq(e){var t=e.document.documentElement,r=jn(e).on("dragstart.drag",Sa,hl);"onselectstart"in t?r.on("selectstart.drag",Sa,hl):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function oq(e,t){var r=e.document.documentElement,n=jn(e).on("dragstart.drag",null);t&&(n.on("click.drag",Sa,hl),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 Gc=e=>()=>e;function jw(e,{sourceEvent:t,subject:r,target:n,identifier:i,active:o,x:a,y:s,dx:c,dy:d,dispatch:u}){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:i,enumerable:!0,configurable:!0},active:{value:o,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:d,enumerable:!0,configurable:!0},_:{value:u}})}jw.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function nre(e){return!e.ctrlKey&&!e.button}function ire(){return this.parentNode}function ore(e,t){return t??{x:e.x,y:e.y}}function are(){return navigator.maxTouchPoints||"ontouchstart"in this}function sre(){var e=nre,t=ire,r=ore,n=are,i={},o=Hd("start","drag","end"),a=0,s,c,d,u,h=0;function p(S){S.on("mousedown.drag",v).filter(n).on("touchstart.drag",g).on("touchmove.drag",w,rre).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(S,E){if(!(u||!e.call(this,S,E))){var I=_(this,t.call(this,S,E),S,E,"mouse");I&&(jn(S.view).on("mousemove.drag",y,hl).on("mouseup.drag",m,hl),iq(S.view),h0(S),d=!1,s=S.clientX,c=S.clientY,I("start",S))}}function y(S){if(Sa(S),!d){var E=S.clientX-s,I=S.clientY-c;d=E*E+I*I>h}i.mouse("drag",S)}function m(S){jn(S.view).on("mousemove.drag mouseup.drag",null),oq(S.view,d),Sa(S),i.mouse("end",S)}function g(S,E){if(e.call(this,S,E)){var I=S.changedTouches,N=t.call(this,S,E),T=I.length,M,z;for(M=0;M<T;++M)(z=_(this,N,S,E,I[M].identifier,I[M]))&&(h0(S),z("start",S,I[M]))}}function w(S){var E=S.changedTouches,I=E.length,N,T;for(N=0;N<I;++N)(T=i[E[N].identifier])&&(Sa(S),T("drag",S,E[N]))}function x(S){var E=S.changedTouches,I=E.length,N,T;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),N=0;N<I;++N)(T=i[E[N].identifier])&&(h0(S),T("end",S,E[N]))}function _(S,E,I,N,T,M){var z=o.copy(),j=ti(M||I,E),W,U,A;if((A=r.call(S,new jw("beforestart",{sourceEvent:I,target:p,identifier:T,active:a,x:j[0],y:j[1],dx:0,dy:0,dispatch:z}),N))!=null)return W=A.x-j[0]||0,U=A.y-j[1]||0,function K(V,te,G){var re=j,P;switch(V){case"start":i[T]=K,P=a++;break;case"end":delete i[T],--a;case"drag":j=ti(G||te,E),P=a;break}z.call(V,S,new jw(V,{sourceEvent:te,subject:A,target:p,identifier:T,active:P,x:j[0]+W,y:j[1]+U,dx:j[0]-re[0],dy:j[1]-re[1],dispatch:z}),N)}}return p.filter=function(S){return arguments.length?(e=typeof S=="function"?S:Gc(!!S),p):e},p.container=function(S){return arguments.length?(t=typeof S=="function"?S:Gc(S),p):t},p.subject=function(S){return arguments.length?(r=typeof S=="function"?S:Gc(S),p):r},p.touchable=function(S){return arguments.length?(n=typeof S=="function"?S:Gc(!!S),p):n},p.on=function(){var S=o.on.apply(o,arguments);return S===o?p:S},p.clickDistance=function(S){return arguments.length?(h=(S=+S)*S,p):Math.sqrt(h)},p}function qS(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function aq(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Dl(){}var pl=.7,Ju=1/pl,Ea="\\s*([+-]?\\d+)\\s*",vl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ii="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",lre=/^#([0-9a-f]{3,8})$/,cre=new RegExp(`^rgb\\(${Ea},${Ea},${Ea}\\)$`),ure=new RegExp(`^rgb\\(${ii},${ii},${ii}\\)$`),dre=new RegExp(`^rgba\\(${Ea},${Ea},${Ea},${vl}\\)$`),fre=new RegExp(`^rgba\\(${ii},${ii},${ii},${vl}\\)$`),hre=new RegExp(`^hsl\\(${vl},${ii},${ii}\\)$`),pre=new RegExp(`^hsla\\(${vl},${ii},${ii},${vl}\\)$`),EP={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};qS(Dl,gl,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_P,formatHex:_P,formatHex8:vre,formatHsl:gre,formatRgb:OP,toString:OP});function _P(){return this.rgb().formatHex()}function vre(){return this.rgb().formatHex8()}function gre(){return sq(this).formatHsl()}function OP(){return this.rgb().formatRgb()}function gl(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=lre.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?CP(t):r===3?new Fr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Kc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Kc(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=cre.exec(e))?new Fr(t[1],t[2],t[3],1):(t=ure.exec(e))?new Fr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=dre.exec(e))?Kc(t[1],t[2],t[3],t[4]):(t=fre.exec(e))?Kc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=hre.exec(e))?NP(t[1],t[2]/100,t[3]/100,1):(t=pre.exec(e))?NP(t[1],t[2]/100,t[3]/100,t[4]):EP.hasOwnProperty(e)?CP(EP[e]):e==="transparent"?new Fr(NaN,NaN,NaN,0):null}function CP(e){return new Fr(e>>16&255,e>>8&255,e&255,1)}function Kc(e,t,r,n){return n<=0&&(e=t=r=NaN),new Fr(e,t,r,n)}function mre(e){return e instanceof Dl||(e=gl(e)),e?(e=e.rgb(),new Fr(e.r,e.g,e.b,e.opacity)):new Fr}function qw(e,t,r,n){return arguments.length===1?mre(e):new Fr(e,t,r,n??1)}function Fr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}qS(Fr,qw,aq(Dl,{brighter(e){return e=e==null?Ju:Math.pow(Ju,e),new Fr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?pl:Math.pow(pl,e),new Fr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Fr(Oo(this.r),Oo(this.g),Oo(this.b),Qu(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:IP,formatHex:IP,formatHex8:bre,formatRgb:RP,toString:RP}));function IP(){return`#${xo(this.r)}${xo(this.g)}${xo(this.b)}`}function bre(){return`#${xo(this.r)}${xo(this.g)}${xo(this.b)}${xo((isNaN(this.opacity)?1:this.opacity)*255)}`}function RP(){const e=Qu(this.opacity);return`${e===1?"rgb(":"rgba("}${Oo(this.r)}, ${Oo(this.g)}, ${Oo(this.b)}${e===1?")":`, ${e})`}`}function Qu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Oo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function xo(e){return e=Oo(e),(e<16?"0":"")+e.toString(16)}function NP(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new qn(e,t,r,n)}function sq(e){if(e instanceof qn)return new qn(e.h,e.s,e.l,e.opacity);if(e instanceof Dl||(e=gl(e)),!e)return new qn;if(e instanceof qn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,c=(o+i)/2;return s?(t===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-t)/s+2:a=(t-r)/s+4,s/=c<.5?o+i:2-o-i,a*=60):s=c>0&&c<1?0:a,new qn(a,s,c,e.opacity)}function yre(e,t,r,n){return arguments.length===1?sq(e):new qn(e,t,r,n??1)}function qn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}qS(qn,yre,aq(Dl,{brighter(e){return e=e==null?Ju:Math.pow(Ju,e),new qn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?pl:Math.pow(pl,e),new qn(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,i=2*r-n;return new Fr(p0(e>=240?e-240:e+120,i,n),p0(e,i,n),p0(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new qn(TP(this.h),Yc(this.s),Yc(this.l),Qu(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=Qu(this.opacity);return`${e===1?"hsl(":"hsla("}${TP(this.h)}, ${Yc(this.s)*100}%, ${Yc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function TP(e){return e=(e||0)%360,e<0?e+360:e}function Yc(e){return Math.max(0,Math.min(1,e||0))}function p0(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 lq=e=>()=>e;function xre(e,t){return function(r){return e+r*t}}function wre(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 Sre(e){return(e=+e)==1?cq:function(t,r){return r-t?wre(t,r,e):lq(isNaN(t)?r:t)}}function cq(e,t){var r=t-e;return r?xre(e,r):lq(isNaN(e)?t:e)}const PP=(function e(t){var r=Sre(t);function n(i,o){var a=r((i=qw(i)).r,(o=qw(o)).r),s=r(i.g,o.g),c=r(i.b,o.b),d=cq(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=c(u),i.opacity=d(u),i+""}}return n.gamma=e,n})(1);function Gi(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var zw=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,v0=new RegExp(zw.source,"g");function Ere(e){return function(){return e}}function _re(e){return function(t){return e(t)+""}}function Ore(e,t){var r=zw.lastIndex=v0.lastIndex=0,n,i,o,a=-1,s=[],c=[];for(e=e+"",t=t+"";(n=zw.exec(e))&&(i=v0.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,c.push({i:a,x:Gi(n,i)})),r=v0.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?c[0]?_re(c[0].x):Ere(t):(t=c.length,function(d){for(var u=0,h;u<t;++u)s[(h=c[u]).i]=h.x(d);return s.join("")})}var MP=180/Math.PI,Lw={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function uq(e,t,r,n,i,o){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:i,translateY:o,rotate:Math.atan2(t,e)*MP,skewX:Math.atan(c)*MP,scaleX:a,scaleY:s}}var Xc;function Cre(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Lw:uq(t.a,t.b,t.c,t.d,t.e,t.f)}function Ire(e){return e==null||(Xc||(Xc=document.createElementNS("http://www.w3.org/2000/svg","g")),Xc.setAttribute("transform",e),!(e=Xc.transform.baseVal.consolidate()))?Lw:(e=e.matrix,uq(e.a,e.b,e.c,e.d,e.e,e.f))}function dq(e,t,r,n){function i(d){return d.length?d.pop()+" ":""}function o(d,u,h,p,v,y){if(d!==h||u!==p){var m=v.push("translate(",null,t,null,r);y.push({i:m-4,x:Gi(d,h)},{i:m-2,x:Gi(u,p)})}else(h||p)&&v.push("translate("+h+t+p+r)}function a(d,u,h,p){d!==u?(d-u>180?u+=360:u-d>180&&(d+=360),p.push({i:h.push(i(h)+"rotate(",null,n)-2,x:Gi(d,u)})):u&&h.push(i(h)+"rotate("+u+n)}function s(d,u,h,p){d!==u?p.push({i:h.push(i(h)+"skewX(",null,n)-2,x:Gi(d,u)}):u&&h.push(i(h)+"skewX("+u+n)}function c(d,u,h,p,v,y){if(d!==h||u!==p){var m=v.push(i(v)+"scale(",null,",",null,")");y.push({i:m-4,x:Gi(d,h)},{i:m-2,x:Gi(u,p)})}else(h!==1||p!==1)&&v.push(i(v)+"scale("+h+","+p+")")}return function(d,u){var h=[],p=[];return d=e(d),u=e(u),o(d.translateX,d.translateY,u.translateX,u.translateY,h,p),a(d.rotate,u.rotate,h,p),s(d.skewX,u.skewX,h,p),c(d.scaleX,d.scaleY,u.scaleX,u.scaleY,h,p),d=u=null,function(v){for(var y=-1,m=p.length,g;++y<m;)h[(g=p[y]).i]=g.x(v);return h.join("")}}}var Rre=dq(Cre,"px, ","px)","deg)"),Nre=dq(Ire,", ",")",")"),Tre=1e-12;function kP(e){return((e=Math.exp(e))+1/e)/2}function Pre(e){return((e=Math.exp(e))-1/e)/2}function Mre(e){return((e=Math.exp(2*e))-1)/(e+1)}const kre=(function e(t,r,n){function i(o,a){var s=o[0],c=o[1],d=o[2],u=a[0],h=a[1],p=a[2],v=u-s,y=h-c,m=v*v+y*y,g,w;if(m<Tre)w=Math.log(p/d)/t,g=function(N){return[s+N*v,c+N*y,d*Math.exp(t*N*w)]};else{var x=Math.sqrt(m),_=(p*p-d*d+n*m)/(2*d*r*x),S=(p*p-d*d-n*m)/(2*p*r*x),E=Math.log(Math.sqrt(_*_+1)-_),I=Math.log(Math.sqrt(S*S+1)-S);w=(I-E)/t,g=function(N){var T=N*w,M=kP(E),z=d/(r*x)*(M*Mre(t*T+E)-Pre(E));return[s+z*v,c+z*y,d*M/kP(t*T+E)]}}return g.duration=w*1e3*t/Math.SQRT2,g}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,c=s*s;return e(a,s,c)},i})(Math.SQRT2,2,4);var Aa=0,Gs=0,_s=0,fq=1e3,ed,Ks,td=0,Po=0,Ud=0,ml=typeof performance=="object"&&performance.now?performance:Date,hq=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function zS(){return Po||(hq(Are),Po=ml.now()+Ud)}function Are(){Po=0}function rd(){this._call=this._time=this._next=null}rd.prototype=pq.prototype={constructor:rd,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?zS():+r)+(t==null?0:+t),!this._next&&Ks!==this&&(Ks?Ks._next=this:ed=this,Ks=this),this._call=e,this._time=r,Bw()},stop:function(){this._call&&(this._call=null,this._time=1/0,Bw())}};function pq(e,t,r){var n=new rd;return n.restart(e,t,r),n}function Dre(){zS(),++Aa;for(var e=ed,t;e;)(t=Po-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Aa}function AP(){Po=(td=ml.now())+Ud,Aa=Gs=0;try{Dre()}finally{Aa=0,qre(),Po=0}}function jre(){var e=ml.now(),t=e-td;t>fq&&(Ud-=t,td=e)}function qre(){for(var e,t=ed,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:ed=r);Ks=e,Bw(n)}function Bw(e){if(!Aa){Gs&&(Gs=clearTimeout(Gs));var t=e-Po;t>24?(e<1/0&&(Gs=setTimeout(AP,e-ml.now()-Ud)),_s&&(_s=clearInterval(_s))):(_s||(td=ml.now(),_s=setInterval(jre,fq)),Aa=1,hq(AP))}}function DP(e,t,r){var n=new rd;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var zre=Hd("start","end","cancel","interrupt"),Lre=[],vq=0,jP=1,Fw=2,_u=3,qP=4,$w=5,Ou=6;function Gd(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;Bre(e,r,{name:t,index:n,group:i,on:zre,tween:Lre,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:vq})}function LS(e,t){var r=Hn(e,t);if(r.state>vq)throw new Error("too late; already scheduled");return r}function li(e,t){var r=Hn(e,t);if(r.state>_u)throw new Error("too late; already running");return r}function Hn(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Bre(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=pq(o,0,r.time);function o(d){r.state=jP,r.timer.restart(a,r.delay,r.time),r.delay<=d&&a(d-r.delay)}function a(d){var u,h,p,v;if(r.state!==jP)return c();for(u in n)if(v=n[u],v.name===r.name){if(v.state===_u)return DP(a);v.state===qP?(v.state=Ou,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete n[u]):+u<t&&(v.state=Ou,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete n[u])}if(DP(function(){r.state===_u&&(r.state=qP,r.timer.restart(s,r.delay,r.time),s(d))}),r.state=Fw,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Fw){for(r.state=_u,i=new Array(p=r.tween.length),u=0,h=-1;u<p;++u)(v=r.tween[u].value.call(e,e.__data__,r.index,r.group))&&(i[++h]=v);i.length=h+1}}function s(d){for(var u=d<r.duration?r.ease.call(null,d/r.duration):(r.timer.restart(c),r.state=$w,1),h=-1,p=i.length;++h<p;)i[h].call(e,u);r.state===$w&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=Ou,r.timer.stop(),delete n[t];for(var d in n)return;delete e.__transition}}function Cu(e,t){var r=e.__transition,n,i,o=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((n=r[a]).name!==t){o=!1;continue}i=n.state>Fw&&n.state<$w,n.state=Ou,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}function Fre(e){return this.each(function(){Cu(this,e)})}function $re(e,t){var r,n;return function(){var i=li(this,e),o=i.tween;if(o!==r){n=r=o;for(var a=0,s=n.length;a<s;++a)if(n[a].name===t){n=n.slice(),n.splice(a,1);break}}i.tween=n}}function Vre(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=li(this,e),a=o.tween;if(a!==n){i=(n=a).slice();for(var s={name:t,value:r},c=0,d=i.length;c<d;++c)if(i[c].name===t){i[c]=s;break}c===d&&i.push(s)}o.tween=i}}function Hre(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=Hn(this.node(),r).tween,i=0,o=n.length,a;i<o;++i)if((a=n[i]).name===e)return a.value;return null}return this.each((t==null?$re:Vre)(r,e,t))}function BS(e,t,r){var n=e._id;return e.each(function(){var i=li(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return Hn(i,n).value[t]}}function gq(e,t){var r;return(typeof t=="number"?Gi:t instanceof gl?PP:(r=gl(t))?(t=r,PP):Ore)(e,t)}function Wre(e){return function(){this.removeAttribute(e)}}function Ure(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Gre(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===n?o:o=t(n=a,r)}}function Kre(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===n?o:o=t(n=a,r)}}function Yre(e,t,r){var n,i,o;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===i?o:(i=c,o=t(n=a,s)))}}function Xre(e,t,r){var n,i,o;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===i?o:(i=c,o=t(n=a,s)))}}function Zre(e,t){var r=Wd(e),n=r==="transform"?Nre:gq;return this.attrTween(e,typeof t=="function"?(r.local?Xre:Yre)(r,n,BS(this,"attr."+e,t)):t==null?(r.local?Ure:Wre)(r):(r.local?Kre:Gre)(r,n,t))}function Jre(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Qre(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function ene(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&Qre(e,o)),r}return i._value=t,i}function tne(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&Jre(e,o)),r}return i._value=t,i}function rne(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=Wd(e);return this.tween(r,(n.local?ene:tne)(n,t))}function nne(e,t){return function(){LS(this,e).delay=+t.apply(this,arguments)}}function ine(e,t){return t=+t,function(){LS(this,e).delay=t}}function one(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?nne:ine)(t,e)):Hn(this.node(),t).delay}function ane(e,t){return function(){li(this,e).duration=+t.apply(this,arguments)}}function sne(e,t){return t=+t,function(){li(this,e).duration=t}}function lne(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ane:sne)(t,e)):Hn(this.node(),t).duration}function cne(e,t){if(typeof t!="function")throw new Error;return function(){li(this,e).ease=t}}function une(e){var t=this._id;return arguments.length?this.each(cne(t,e)):Hn(this.node(),t).ease}function dne(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;li(this,e).ease=r}}function fne(e){if(typeof e!="function")throw new Error;return this.each(dne(this._id,e))}function hne(e){typeof e!="function"&&(e=K6(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],c,d=0;d<a;++d)(c=o[d])&&e.call(c,c.__data__,d,o)&&s.push(c);return new _i(n,this._parents,this._name,this._id)}function pne(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var c=t[s],d=r[s],u=c.length,h=a[s]=new Array(u),p,v=0;v<u;++v)(p=c[v]||d[v])&&(h[v]=p);for(;s<n;++s)a[s]=t[s];return new _i(a,this._parents,this._name,this._id)}function vne(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 gne(e,t,r){var n,i,o=vne(t)?LS:li;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}function mne(e,t){var r=this._id;return arguments.length<2?Hn(this.node(),r).on.on(e):this.each(gne(r,e,t))}function bne(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function yne(){return this.on("end.remove",bne(this._id))}function xne(e){var t=this._name,r=this._id;typeof e!="function"&&(e=DS(e));for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a)for(var s=n[a],c=s.length,d=o[a]=new Array(c),u,h,p=0;p<c;++p)(u=s[p])&&(h=e.call(u,u.__data__,p,s))&&("__data__"in u&&(h.__data__=u.__data__),d[p]=h,Gd(d[p],t,r,p,d,Hn(u,r)));return new _i(o,this._parents,t,r)}function wne(e){var t=this._name,r=this._id;typeof e!="function"&&(e=G6(e));for(var n=this._groups,i=n.length,o=[],a=[],s=0;s<i;++s)for(var c=n[s],d=c.length,u,h=0;h<d;++h)if(u=c[h]){for(var p=e.call(u,u.__data__,h,c),v,y=Hn(u,r),m=0,g=p.length;m<g;++m)(v=p[m])&&Gd(v,t,r,m,p,y);o.push(p),a.push(u)}return new _i(o,a,t,r)}var Sne=Al.prototype.constructor;function Ene(){return new Sne(this._groups,this._parents)}function _ne(e,t){var r,n,i;return function(){var o=ka(this,e),a=(this.style.removeProperty(e),ka(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function mq(e){return function(){this.style.removeProperty(e)}}function One(e,t,r){var n,i=r+"",o;return function(){var a=ka(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function Cne(e,t,r){var n,i,o;return function(){var a=ka(this,e),s=r(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),ka(this,e))),a===c?null:a===n&&c===i?o:(i=c,o=t(n=a,s))}}function Ine(e,t){var r,n,i,o="style."+t,a="end."+o,s;return function(){var c=li(this,e),d=c.on,u=c.value[o]==null?s||(s=mq(t)):void 0;(d!==r||i!==u)&&(n=(r=d).copy()).on(a,i=u),c.on=n}}function Rne(e,t,r){var n=(e+="")=="transform"?Rre:gq;return t==null?this.styleTween(e,_ne(e,n)).on("end.style."+e,mq(e)):typeof t=="function"?this.styleTween(e,Cne(e,n,BS(this,"style."+e,t))).each(Ine(this._id,e)):this.styleTween(e,One(e,n,t),r).on("end.style."+e,null)}function Nne(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function Tne(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&Nne(e,a,r)),n}return o._value=t,o}function Pne(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,Tne(e,t,r??""))}function Mne(e){return function(){this.textContent=e}}function kne(e){return function(){var t=e(this);this.textContent=t??""}}function Ane(e){return this.tween("text",typeof e=="function"?kne(BS(this,"text",e)):Mne(e==null?"":e+""))}function Dne(e){return function(t){this.textContent=e.call(this,t)}}function jne(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&Dne(i)),t}return n._value=e,n}function qne(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,jne(e))}function zne(){for(var e=this._name,t=this._id,r=bq(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,c,d=0;d<s;++d)if(c=a[d]){var u=Hn(c,t);Gd(c,e,r,d,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new _i(n,this._parents,e,r)}function Lne(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(o,a){var s={value:a},c={value:function(){--i===0&&o()}};r.each(function(){var d=li(this,n),u=d.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),d.on=t}),i===0&&o()})}var Bne=0;function _i(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function bq(){return++Bne}var yi=Al.prototype;_i.prototype={constructor:_i,select:xne,selectAll:wne,selectChild:yi.selectChild,selectChildren:yi.selectChildren,filter:hne,merge:pne,selection:Ene,transition:zne,call:yi.call,nodes:yi.nodes,node:yi.node,size:yi.size,empty:yi.empty,each:yi.each,on:mne,attr:Zre,attrTween:rne,style:Rne,styleTween:Pne,text:Ane,textTween:qne,remove:yne,tween:Hre,delay:one,duration:lne,ease:une,easeVarying:fne,end:Lne,[Symbol.iterator]:yi[Symbol.iterator]};function Fne(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var $ne={time:null,delay:0,duration:250,ease:Fne};function Vne(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 Hne(e){var t,r;e instanceof _i?(t=e._id,e=e._name):(t=bq(),(r=$ne).time=zS(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,c,d=0;d<s;++d)(c=a[d])&&Gd(c,e,t,d,a,r||Vne(c,t));return new _i(n,this._parents,e,t)}Al.prototype.interrupt=Fre;Al.prototype.transition=Hne;const Zc=e=>()=>e;function Wne(e,{sourceEvent:t,target:r,transform:n,dispatch:i}){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:i}})}function Si(e,t,r){this.k=e,this.x=t,this.y=r}Si.prototype={constructor:Si,scale:function(e){return e===1?this:new Si(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Si(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 Co=new Si(1,0,0);Si.prototype;function g0(e){e.stopImmediatePropagation()}function Os(e){e.preventDefault(),e.stopImmediatePropagation()}function Une(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Gne(){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 zP(){return this.__zoom||Co}function Kne(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Yne(){return navigator.maxTouchPoints||"ontouchstart"in this}function Xne(e,t,r){var n=e.invertX(t[0][0])-r[0][0],i=e.invertX(t[1][0])-r[1][0],o=e.invertY(t[0][1])-r[0][1],a=e.invertY(t[1][1])-r[1][1];return e.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function Zne(){var e=Une,t=Gne,r=Xne,n=Kne,i=Yne,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,c=kre,d=Hd("start","zoom","end"),u,h,p,v=500,y=150,m=0,g=10;function w(A){A.property("__zoom",zP).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",z).filter(i).on("touchstart.zoom",j).on("touchmove.zoom",W).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(A,K,V,te){var G=A.selection?A.selection():A;G.property("__zoom",zP),A!==G?E(A,K,V,te):G.interrupt().each(function(){I(this,arguments).event(te).start().zoom(null,typeof K=="function"?K.apply(this,arguments):K).end()})},w.scaleBy=function(A,K,V,te){w.scaleTo(A,function(){var G=this.__zoom.k,re=typeof K=="function"?K.apply(this,arguments):K;return G*re},V,te)},w.scaleTo=function(A,K,V,te){w.transform(A,function(){var G=t.apply(this,arguments),re=this.__zoom,P=V==null?S(G):typeof V=="function"?V.apply(this,arguments):V,B=re.invert(P),X=typeof K=="function"?K.apply(this,arguments):K;return r(_(x(re,X),P,B),G,a)},V,te)},w.translateBy=function(A,K,V,te){w.transform(A,function(){return r(this.__zoom.translate(typeof K=="function"?K.apply(this,arguments):K,typeof V=="function"?V.apply(this,arguments):V),t.apply(this,arguments),a)},null,te)},w.translateTo=function(A,K,V,te,G){w.transform(A,function(){var re=t.apply(this,arguments),P=this.__zoom,B=te==null?S(re):typeof te=="function"?te.apply(this,arguments):te;return r(Co.translate(B[0],B[1]).scale(P.k).translate(typeof K=="function"?-K.apply(this,arguments):-K,typeof V=="function"?-V.apply(this,arguments):-V),re,a)},te,G)};function x(A,K){return K=Math.max(o[0],Math.min(o[1],K)),K===A.k?A:new Si(K,A.x,A.y)}function _(A,K,V){var te=K[0]-V[0]*A.k,G=K[1]-V[1]*A.k;return te===A.x&&G===A.y?A:new Si(A.k,te,G)}function S(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function E(A,K,V,te){A.on("start.zoom",function(){I(this,arguments).event(te).start()}).on("interrupt.zoom end.zoom",function(){I(this,arguments).event(te).end()}).tween("zoom",function(){var G=this,re=arguments,P=I(G,re).event(te),B=t.apply(G,re),X=V==null?S(B):typeof V=="function"?V.apply(G,re):V,Q=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),D=G.__zoom,$=typeof K=="function"?K.apply(G,re):K,H=c(D.invert(X).concat(Q/D.k),$.invert(X).concat(Q/$.k));return function(q){if(q===1)q=$;else{var Y=H(q),ie=Q/Y[2];q=new Si(ie,X[0]-Y[0]*ie,X[1]-Y[1]*ie)}P.zoom(null,q)}})}function I(A,K,V){return!V&&A.__zooming||new N(A,K)}function N(A,K){this.that=A,this.args=K,this.active=0,this.sourceEvent=null,this.extent=t.apply(A,K),this.taps=0}N.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,K){return this.mouse&&A!=="mouse"&&(this.mouse[1]=K.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=K.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=K.invert(this.touch1[0])),this.that.__zoom=K,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var K=jn(this.that).datum();d.call(A,this.that,new Wne(A,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:d}),K)}};function T(A,...K){if(!e.apply(this,arguments))return;var V=I(this,K).event(A),te=this.__zoom,G=Math.max(o[0],Math.min(o[1],te.k*Math.pow(2,n.apply(this,arguments)))),re=ti(A);if(V.wheel)(V.mouse[0][0]!==re[0]||V.mouse[0][1]!==re[1])&&(V.mouse[1]=te.invert(V.mouse[0]=re)),clearTimeout(V.wheel);else{if(te.k===G)return;V.mouse=[re,te.invert(re)],Cu(this),V.start()}Os(A),V.wheel=setTimeout(P,y),V.zoom("mouse",r(_(x(te,G),V.mouse[0],V.mouse[1]),V.extent,a));function P(){V.wheel=null,V.end()}}function M(A,...K){if(p||!e.apply(this,arguments))return;var V=A.currentTarget,te=I(this,K,!0).event(A),G=jn(A.view).on("mousemove.zoom",X,!0).on("mouseup.zoom",Q,!0),re=ti(A,V),P=A.clientX,B=A.clientY;iq(A.view),g0(A),te.mouse=[re,this.__zoom.invert(re)],Cu(this),te.start();function X(D){if(Os(D),!te.moved){var $=D.clientX-P,H=D.clientY-B;te.moved=$*$+H*H>m}te.event(D).zoom("mouse",r(_(te.that.__zoom,te.mouse[0]=ti(D,V),te.mouse[1]),te.extent,a))}function Q(D){G.on("mousemove.zoom mouseup.zoom",null),oq(D.view,te.moved),Os(D),te.event(D).end()}}function z(A,...K){if(e.apply(this,arguments)){var V=this.__zoom,te=ti(A.changedTouches?A.changedTouches[0]:A,this),G=V.invert(te),re=V.k*(A.shiftKey?.5:2),P=r(_(x(V,re),te,G),t.apply(this,K),a);Os(A),s>0?jn(this).transition().duration(s).call(E,P,te,A):jn(this).call(w.transform,P,te,A)}}function j(A,...K){if(e.apply(this,arguments)){var V=A.touches,te=V.length,G=I(this,K,A.changedTouches.length===te).event(A),re,P,B,X;for(g0(A),P=0;P<te;++P)B=V[P],X=ti(B,this),X=[X,this.__zoom.invert(X),B.identifier],G.touch0?!G.touch1&&G.touch0[2]!==X[2]&&(G.touch1=X,G.taps=0):(G.touch0=X,re=!0,G.taps=1+!!u);u&&(u=clearTimeout(u)),re&&(G.taps<2&&(h=X[0],u=setTimeout(function(){u=null},v)),Cu(this),G.start())}}function W(A,...K){if(this.__zooming){var V=I(this,K).event(A),te=A.changedTouches,G=te.length,re,P,B,X;for(Os(A),re=0;re<G;++re)P=te[re],B=ti(P,this),V.touch0&&V.touch0[2]===P.identifier?V.touch0[0]=B:V.touch1&&V.touch1[2]===P.identifier&&(V.touch1[0]=B);if(P=V.that.__zoom,V.touch1){var Q=V.touch0[0],D=V.touch0[1],$=V.touch1[0],H=V.touch1[1],q=(q=$[0]-Q[0])*q+(q=$[1]-Q[1])*q,Y=(Y=H[0]-D[0])*Y+(Y=H[1]-D[1])*Y;P=x(P,Math.sqrt(q/Y)),B=[(Q[0]+$[0])/2,(Q[1]+$[1])/2],X=[(D[0]+H[0])/2,(D[1]+H[1])/2]}else if(V.touch0)B=V.touch0[0],X=V.touch0[1];else return;V.zoom("touch",r(_(P,B,X),V.extent,a))}}function U(A,...K){if(this.__zooming){var V=I(this,K).event(A),te=A.changedTouches,G=te.length,re,P;for(g0(A),p&&clearTimeout(p),p=setTimeout(function(){p=null},v),re=0;re<G;++re)P=te[re],V.touch0&&V.touch0[2]===P.identifier?delete V.touch0:V.touch1&&V.touch1[2]===P.identifier&&delete V.touch1;if(V.touch1&&!V.touch0&&(V.touch0=V.touch1,delete V.touch1),V.touch0)V.touch0[1]=this.__zoom.invert(V.touch0[0]);else if(V.end(),V.taps===2&&(P=ti(P,this),Math.hypot(h[0]-P[0],h[1]-P[1])<g)){var B=jn(this).on("dblclick.zoom");B&&B.apply(this,arguments)}}}return w.wheelDelta=function(A){return arguments.length?(n=typeof A=="function"?A:Zc(+A),w):n},w.filter=function(A){return arguments.length?(e=typeof A=="function"?A:Zc(!!A),w):e},w.touchable=function(A){return arguments.length?(i=typeof A=="function"?A:Zc(!!A),w):i},w.extent=function(A){return arguments.length?(t=typeof A=="function"?A:Zc([[+A[0][0],+A[0][1]],[+A[1][0],+A[1][1]]]),w):t},w.scaleExtent=function(A){return arguments.length?(o[0]=+A[0],o[1]=+A[1],w):[o[0],o[1]]},w.translateExtent=function(A){return arguments.length?(a[0][0]=+A[0][0],a[1][0]=+A[1][0],a[0][1]=+A[0][1],a[1][1]=+A[1][1],w):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},w.constrain=function(A){return arguments.length?(r=A,w):r},w.duration=function(A){return arguments.length?(s=+A,w):s},w.interpolate=function(A){return arguments.length?(c=A,w):c},w.on=function(){var A=d.on.apply(d,arguments);return A===d?w:A},w.clickDistance=function(A){return arguments.length?(m=(A=+A)*A,w):Math.sqrt(m)},w.tapDistance=function(A){return arguments.length?(g=+A,w):g},w}function it(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vw(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 yq(e,t){if(e){if(typeof e=="string")return Vw(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 Vw(e,t)}}function Jne(e){if(Array.isArray(e))return e}function Qne(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,s;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(c){o=!0,s=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw s}}return n}}function eie(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
58
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xe(e,t){return Jne(e)||Qne(e,t)||yq(e,t)||eie()}var Da;(function(e){e.Strict="strict",e.Loose="loose"})(Da||(Da={}));var Mo;(function(e){e.Lines="lines",e.Dots="dots"})(Mo||(Mo={}));var _a;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(_a||(_a={}));var Yi;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Yi||(Yi={}));var nd;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(nd||(nd={}));var Oe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Oe||(Oe={}));var FS=function(t){return{width:t.offsetWidth,height:t.offsetHeight}},Oa=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)},xq=function(t,r){return{x:Oa(t.x,r[0][0],r[1][0]),y:Oa(t.y,r[0][1],r[1][1])}},wq=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)},tie=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)}},id=function(t){var r=t.x,n=t.y,i=t.width,o=t.height;return{x:r,y:n,x2:r+i,y2:n+o}},rie=function(t){var r=t.x,n=t.y,i=t.x2,o=t.y2;return{x:r,y:n,width:i-r,height:o-n}},Sq=function(t){return!isNaN(t)&&isFinite(t)},ur=Symbol("internals");function LP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).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?LP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BP(e,t){var r=e.find(function(d){return d.id===t.parentNode});if(r){var n=t.position.x+t.width-r.width,i=t.position.y+t.height-r.height;if(n>0||i>0||t.position.x<0||t.position.y<0){var o,a;if(r.style=Ys({},r.style)||{},r.style.width=(o=r.style.width)!==null&&o!==void 0?o:r.width,r.style.height=(a=r.style.height)!==null&&a!==void 0?a:r.height,n>0&&(r.style.width+=n),i>0&&(r.style.height+=i),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 Eq(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,i){var o=e.find(function(c){return c.id===i.id});if(o)switch(o.type){case"select":return n.push(Ys(Ys({},i),{},{selected:o.selected})),n;case"position":{var a=Ys({},i);return typeof o.position<"u"&&(a.position=o.position),typeof o.positionAbsolute<"u"&&(a.positionAbsolute=o.positionAbsolute),typeof o.dragging<"u"&&(a.dragging=o.dragging),a.expandParent&&BP(n,a),n.push(a),n}case"dimensions":{var s=Ys({},i);return typeof o.dimensions<"u"&&(s.width=o.dimensions.width,s.height=o.dimensions.height),s.expandParent&&BP(n,s),n.push(s),n}case"remove":return n}return n.push(i),n},r)}function _q(e,t){return Eq(e,t)}function nie(e,t){return Eq(e,t)}var Ki=function(t,r){return{id:t,type:"select",selected:r}};function ya(e,t){return e.reduce(function(r,n){var i=t.includes(n.id);return!n.selected&&i?(n.selected=!0,r.push(Ki(n.id,!0))):n.selected&&!i&&(n.selected=!1,r.push(Ki(n.id,!1))),r},[])}function FP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Oq(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var $P=function(t,r,n){var i=r.querySelectorAll(t);if(!i||!i.length)return null;var o=Array.from(i),a=r.getBoundingClientRect();return o.map(function(s){var c=s.getBoundingClientRect();return Oq({id:s.getAttribute("data-handleid"),position:s.getAttribute("data-handlepos"),x:(c.left-a.left)/n,y:(c.top-a.top)/n},FS(s))})};function Cs(e,t,r){return r===void 0?r:function(n){var i=t().nodeInternals.get(e);r(n,Oq({},i))}}function Cq(e){var t=e.id,r=e.store,n=r.getState(),i=n.addSelectedNodes,o=n.unselectNodesAndEdges,a=n.multiSelectionActive,s=n.nodeInternals,c=s.get(t);r.setState({nodesSelectionActive:!1}),c.selected?c.selected&&a&&o({nodes:[c]}):i([t])}function VP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var iie=function(t){return"id"in t&&"source"in t&&"target"in t},oie=function(t){var r=t.source,n=t.sourceHandle,i=t.target,o=t.targetHandle;return"reactflow__edge-".concat(r).concat(n||"","-").concat(i).concat(o||"")},Hw=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(i){return"".concat(i,"=").concat(t[i])}).join("&"))},aie=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)})},sie=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 iie(t)?n=nl({},t):n=nl(nl({},t),{},{id:oie(t)}),aie(n,r)?r:r.concat(n)},Iq=function(t,r,n,i){var o=t.x,a=t.y,s=Xe(r,3),c=s[0],d=s[1],u=s[2],h=Xe(i,2),p=h[0],v=h[1],y={x:(o-c)/u,y:(a-d)/u};return n?{x:p*Math.round(y.x/p),y:v*Math.round(y.y/v)}:y},$S=function(t){if(t.length===0)return{x:0,y:0,width:0,height:0};var r=t.reduce(function(n,i){var o=i.positionAbsolute,a=i.position,s=i.width,c=i.height;return tie(n,id({x:o?o.x:a.x,y:o?o.y:a.y,width:s||0,height:c||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return rie(r)},Rq=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0,1],i=Xe(n,3),o=i[0],a=i[1],s=i[2],c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,u=id({x:(r.x-o)/s,y:(r.y-a)/s,width:r.width/s,height:r.height/s}),h=[];return t.forEach(function(p){var v=p.positionAbsolute,y=p.width,m=p.height,g=p.selectable,w=g===void 0?!0:g;if(d&&!w)return!1;var x=id(nl(nl({},v),{},{width:y||0,height:m||0})),_=Math.max(0,Math.min(u.x2,x.x2)-Math.max(u.x,x.x)),S=Math.max(0,Math.min(u.y2,x.y2)-Math.max(u.y,x.y)),E=Math.ceil(_*S),I=typeof y>"u"||typeof m>"u"||y===null||m===null,N=c&&E>0,T=(y||0)*(m||0),M=I||N||E>=T;M&&h.push(p)}),h},Nq=function(t,r){var n=t.map(function(i){return i.id});return r.filter(function(i){return n.includes(i.source)||n.includes(i.target)})},Tq=function(t,r,n,i,o){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:.1,s=r/(t.width*(1+a)),c=n/(t.height*(1+a)),d=Math.min(s,c),u=Oa(d,i,o),h=t.x+t.width/2,p=t.y+t.height/2,v=r/2-h*u,y=n/2-p*u;return[v,y,u]},mo=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.transition().duration(r)};function HP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pq(e,t,r,n){var i,o,a,s,c,d,u,h,p,v,y,m;if(!e.parentNode)return n;var g=t.get(e.parentNode);return Pq(g,t,r,{x:((i=n.x)!==null&&i!==void 0?i:0)+((o=(a=g.position)===null||a===void 0?void 0:a.x)!==null&&o!==void 0?o:0),y:((s=n.y)!==null&&s!==void 0?s:0)+((c=(d=g.position)===null||d===void 0?void 0:d.y)!==null&&c!==void 0?c:0),z:((u=(h=g[ur])===null||h===void 0?void 0:h.z)!==null&&u!==void 0?u:0)>((p=n.z)!==null&&p!==void 0?p:0)?(v=(y=g[ur])===null||y===void 0?void 0:y.z)!==null&&v!==void 0?v:0:(m=n.z)!==null&&m!==void 0?m:0})}function m0(e,t){var r=new Map,n={};return e.forEach(function(i){var o,a=Sq(i.zIndex)?i.zIndex:i.selected?1e3:0,s=t.get(i.id),c=xa(xa({width:s==null?void 0:s.width,height:s==null?void 0:s.height},i),{},{positionAbsolute:{x:i.position.x,y:i.position.y}});i.parentNode&&(c.parentNode=i.parentNode,n[i.parentNode]=!0),Object.defineProperty(c,ur,{enumerable:!1,value:{handleBounds:s==null||(o=s[ur])===null||o===void 0?void 0:o.handleBounds,z:a}}),r.set(i.id,c)}),r.forEach(function(i){if(i.parentNode&&!r.has(i.parentNode))throw new Error("Parent node ".concat(i.parentNode," not found"));if(i.parentNode||n[i.id]){var o,a,s=Pq(i,r,n,xa(xa({},i.position),{},{z:(o=(a=i[ur])===null||a===void 0?void 0:a.z)!==null&&o!==void 0?o:0})),c=s.x,d=s.y,u=s.z;i.positionAbsolute={x:c,y:d},i[ur].z=u,n[i.id]&&(i[ur].isParent=!0)}}),r}function Mq(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e(),n=r.nodeInternals,i=r.width,o=r.height,a=r.minZoom,s=r.maxZoom,c=r.d3Zoom,d=r.d3Selection,u=r.fitViewOnInitDone,h=r.fitViewOnInit;if((t.initial&&!u&&h||!t.initial)&&c&&d){var p=Array.from(n.values()).filter(function(T){return t.includeHiddenNodes?T.width&&T.height:!T.hidden}),v=p.every(function(T){return T.width&&T.height});if(p.length>0&&v){var y,m,g,w=$S(p),x=Tq(w,i,o,(y=t.minZoom)!==null&&y!==void 0?y:a,(m=t.maxZoom)!==null&&m!==void 0?m:s,(g=t.padding)!==null&&g!==void 0?g:.1),_=Xe(x,3),S=_[0],E=_[1],I=_[2],N=Co.translate(S,E).scale(I);return typeof t.duration=="number"&&t.duration>0?c.transform(mo(d,t.duration),N):c.transform(d,N),!0}}return!1}function lie(e,t){return e.forEach(function(r){var n=t.get(r.id);if(n){var i;t.set(n.id,xa(xa({},n),{},(i={},it(i,ur,n[ur]),it(i,"selected",r.selected),i)))}}),new Map(t)}function cie(e,t){return t.map(function(r){var n=e.find(function(i){return i.id===r.id});return n&&(r.selected=n.selected),r})}function Jc(e){var t=e.changedNodes,r=e.changedEdges,n=e.get,i=e.set,o=n(),a=o.nodeInternals,s=o.edges,c=o.onNodesChange,d=o.onEdgesChange,u=o.hasDefaultNodes,h=o.hasDefaultEdges;t!=null&&t.length&&(u&&i({nodeInternals:lie(t,a)}),c==null||c(t)),r!=null&&r.length&&(h&&i({edges:cie(r,s)}),d==null||d(r))}var Ww=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],WP={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:Ww,nodeExtent:Ww,nodesSelectionActive:!1,userSelectionActive:!1,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionMode:Da.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 UP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Jn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var VS=yee(),uie=VS.Provider,Vt=VS.useStore,Nr=VS.useStoreApi,die=function(){return bee(function(t,r){return Jn(Jn({},WP),{},{setNodes:function(i){t({nodeInternals:m0(i,r().nodeInternals)})},setEdges:function(i){var o=r(),a=o.defaultEdgeOptions,s=a===void 0?{}:a;t({edges:i.map(function(c){return Jn(Jn({},s),c)})})},setDefaultNodesAndEdges:function(i,o){var a=typeof i<"u",s=typeof o<"u",c=a?m0(i,new Map):new Map,d=s?o:[];t({nodeInternals:c,edges:d,hasDefaultNodes:a,hasDefaultEdges:s})},updateNodeDimensions:function(i){var o=r(),a=o.onNodesChange,s=o.nodeInternals,c=o.fitViewOnInit,d=o.fitViewOnInitDone,u=o.fitViewOnInitOptions,h=o.domNode,p=h==null?void 0:h.querySelector(".react-flow__viewport");if(p){var v=window.getComputedStyle(p),y=new window.DOMMatrixReadOnly(v.transform),m=y.m22,g=i.reduce(function(x,_){var S=s.get(_.id);if(S){var E=FS(_.nodeElement),I=!!(E.width&&E.height&&(S.width!==E.width||S.height!==E.height||_.forceUpdate));I&&(s.set(S.id,Jn(Jn({},S),{},it({},ur,Jn(Jn({},S[ur]),{},{handleBounds:{source:$P(".source",_.nodeElement,m),target:$P(".target",_.nodeElement,m)}})),E)),x.push({id:S.id,type:"dimensions",dimensions:E}))}return x},[]),w=d||c&&!d&&Mq(r,Jn({initial:!0},u));t({nodeInternals:new Map(s),fitViewOnInitDone:w}),(g==null?void 0:g.length)>0&&(a==null||a(g))}},updateNodePositions:function(i){var o=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,d=s.nodeInternals,u=s.hasDefaultNodes;if(u||c){var h=i.map(function(y){var m={id:y.id,type:"position",dragging:a};return o&&(m.positionAbsolute=y.positionAbsolute,m.position=y.position),m});if(h!=null&&h.length){if(u){var p=_q(h,Array.from(d.values())),v=m0(p,d);t({nodeInternals:v})}c==null||c(h)}}},addSelectedNodes:function(i){var o=r(),a=o.multiSelectionActive,s=o.nodeInternals,c=o.edges,d,u=null;a?d=i.map(function(h){return Ki(h,!0)}):(d=ya(Array.from(s.values()),i),u=ya(c,[])),Jc({changedNodes:d,changedEdges:u,get:r,set:t})},addSelectedEdges:function(i){var o=r(),a=o.multiSelectionActive,s=o.edges,c=o.nodeInternals,d,u=null;a?d=i.map(function(h){return Ki(h,!0)}):(d=ya(s,i),u=ya(Array.from(c.values()),[])),Jc({changedNodes:u,changedEdges:d,get:r,set:t})},unselectNodesAndEdges:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=i.nodes,a=i.edges,s=r(),c=s.nodeInternals,d=s.edges,u=o||Array.from(c.values()),h=a||d,p=u.map(function(y){return y.selected=!1,Ki(y.id,!1)}),v=h.map(function(y){return Ki(y.id,!1)});Jc({changedNodes:p,changedEdges:v,get:r,set:t})},setMinZoom:function(i){var o=r(),a=o.d3Zoom,s=o.maxZoom;a==null||a.scaleExtent([i,s]),t({minZoom:i})},setMaxZoom:function(i){var o=r(),a=o.d3Zoom,s=o.minZoom;a==null||a.scaleExtent([s,i]),t({maxZoom:i})},setTranslateExtent:function(i){var o=r(),a=o.d3Zoom;a==null||a.translateExtent(i),t({translateExtent:i})},resetSelectedElements:function(){var i=r(),o=i.nodeInternals,a=i.edges,s=Array.from(o.values()),c=s.filter(function(u){return u.selected}).map(function(u){return Ki(u.id,!1)}),d=a.filter(function(u){return u.selected}).map(function(u){return Ki(u.id,!1)});Jc({changedNodes:c,changedEdges:d,get:r,set:t})},setNodeExtent:function(i){var o=r(),a=o.nodeInternals;a.forEach(function(s){s.positionAbsolute=xq(s.position,i)}),t({nodeExtent:i,nodeInternals:new Map(a)})},reset:function(){return t(Jn({},WP))}})})};function cn(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=cn(e[r]))!==""&&(t+=(t&&" ")+n);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}function Wr(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 fie(e){if(Array.isArray(e))return Vw(e)}function hie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pie(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
59
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Io(e){return fie(e)||hie(e)||yq(e)||pie()}var vie={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},gie=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}},mie=function(){var t=Nr(),r=Vt(gie,Wr),n=r.d3Zoom,i=r.d3Selection,o=C.useMemo(function(){return i&&n?{zoomIn:function(s){return n.scaleBy(mo(i,s==null?void 0:s.duration),1.2)},zoomOut:function(s){return n.scaleBy(mo(i,s==null?void 0:s.duration),1/1.2)},zoomTo:function(s,c){return n.scaleTo(mo(i,c==null?void 0:c.duration),s)},getZoom:function(){return t.getState().transform[2]},setViewport:function(s,c){var d,u,h,p=Xe(t.getState().transform,3),v=p[0],y=p[1],m=p[2],g=Co.translate((d=s.x)!==null&&d!==void 0?d:v,(u=s.y)!==null&&u!==void 0?u:y).scale((h=s.zoom)!==null&&h!==void 0?h:m);n.transform(mo(i,c==null?void 0:c.duration),g)},getViewport:function(){var s=Xe(t.getState().transform,3),c=s[0],d=s[1],u=s[2];return{x:c,y:d,zoom:u}},fitView:function(s){return Mq(t.getState,s)},setCenter:function(s,c,d){var u=t.getState(),h=u.width,p=u.height,v=u.maxZoom,y=typeof(d==null?void 0:d.zoom)<"u"?d.zoom:v,m=h/2-s*y,g=p/2-c*y,w=Co.translate(m,g).scale(y);n.transform(mo(i,d==null?void 0:d.duration),w)},fitBounds:function(s,c){var d,u=t.getState(),h=u.width,p=u.height,v=u.minZoom,y=u.maxZoom,m=Tq(s,h,p,v,y,(d=c==null?void 0:c.padding)!==null&&d!==void 0?d:.1),g=Xe(m,3),w=g[0],x=g[1],_=g[2],S=Co.translate(w,x).scale(_);n.transform(mo(i,c==null?void 0:c.duration),S)},project:function(s){var c=t.getState(),d=c.transform,u=c.snapToGrid,h=c.snapGrid;return Iq(s,d,u,h)},viewportInitialized:!0}:vie},[n,i]);return o};function GP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).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?GP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kq(){var e=mie(),t=Nr(),r=C.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=Array.from(p.values());return v.map(function(y){return sa({},y)})},[]),n=C.useCallback(function(h){var p=t.getState(),v=p.nodeInternals;return v.get(h)},[]),i=C.useCallback(function(){var h=t.getState(),p=h.edges,v=p===void 0?[]:p;return v.map(function(y){return sa({},y)})},[]),o=C.useCallback(function(h){var p=t.getState(),v=p.edges,y=v===void 0?[]:v;return y.find(function(m){return m.id===h})},[]),a=C.useCallback(function(h){var p=t.getState(),v=p.nodeInternals,y=p.setNodes,m=p.hasDefaultNodes,g=p.onNodesChange,w=Array.from(v.values()),x=typeof h=="function"?h(w):h;if(m)y(x);else if(g){var _=x.length===0?w.map(function(S){return{type:"remove",id:S.id}}):x.map(function(S){return{item:S,type:"reset"}});g(_)}},[]),s=C.useCallback(function(h){var p=t.getState(),v=p.edges,y=v===void 0?[]:v,m=p.setEdges,g=p.hasDefaultEdges,w=p.onEdgesChange,x=typeof h=="function"?h(y):h;if(g)m(x);else if(w){var _=x.length===0?y.map(function(S){return{type:"remove",id:S.id}}):x.map(function(S){return{item:S,type:"reset"}});w(_)}},[]),c=C.useCallback(function(h){var p=Array.isArray(h)?h:[h],v=t.getState(),y=v.nodeInternals,m=v.setNodes,g=v.hasDefaultNodes,w=v.onNodesChange;if(g){var x=Array.from(y.values()),_=[].concat(x,Io(p));m(_)}else if(w){var S=p.map(function(E){return{item:E,type:"add"}});w(S)}},[]),d=C.useCallback(function(h){var p=Array.isArray(h)?h:[h],v=t.getState(),y=v.edges,m=y===void 0?[]:y,g=v.setEdges,w=v.hasDefaultEdges,x=v.onEdgesChange;if(w)g([].concat(Io(m),Io(p)));else if(x){var _=p.map(function(S){return{item:S,type:"add"}});x(_)}},[]),u=C.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=h.edges,y=v===void 0?[]:v,m=h.transform,g=Array.from(p.values()),w=Xe(m,3),x=w[0],_=w[1],S=w[2];return{nodes:g.map(function(E){return sa({},E)}),edges:y.map(function(E){return sa({},E)}),viewport:{x,y:_,zoom:S}}},[]);return C.useMemo(function(){return sa(sa({},e),{},{getNodes:r,getNode:n,getEdges:i,getEdge:o,setNodes:a,setEdges:s,addNodes:c,addEdges:d,toObject:u})},[e,r,n,i,o,a,s,c,d,u])}function bie(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Kd(e,t){if(e==null)return{};var r=bie(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function yie(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},C.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function xie(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},C.createElement("path",{d:"M0 0h32v4.2H0z"}))}function wie(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},C.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 Sie(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},C.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 Eie(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},C.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 _ie=["children","className"];function KP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Oie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Qc=function(t){var r=t.children,n=t.className,i=Kd(t,_ie);return C.createElement("button",Oie({type:"button",className:cn(["react-flow__controls-button",n])},i),r)},Cie=function(t){return t.nodesDraggable&&t.nodesConnectable&&t.elementsSelectable},Iie=function(t){var r=t.style,n=t.showZoom,i=n===void 0?!0:n,o=t.showFitView,a=o===void 0?!0:o,s=t.showInteractive,c=s===void 0?!0:s,d=t.fitViewOptions,u=t.onZoomIn,h=t.onZoomOut,p=t.onFitView,v=t.onInteractiveChange,y=t.className,m=t.children,g=Nr(),w=C.useState(!1),x=Xe(w,2),_=x[0],S=x[1],E=Vt(Cie),I=kq(),N=I.zoomIn,T=I.zoomOut,M=I.fitView;if(C.useEffect(function(){S(!0)},[]),!_)return null;var z=function(){N==null||N(),u==null||u()},j=function(){T==null||T(),h==null||h()},W=function(){M==null||M(d),p==null||p()},U=function(){g.setState({nodesDraggable:!E,nodesConnectable:!E,elementsSelectable:!E}),v==null||v(!E)};return C.createElement("div",{className:cn(["react-flow__controls",y]),style:r},i&&C.createElement(C.Fragment,null,C.createElement(Qc,{onClick:z,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in"},C.createElement(yie,null)),C.createElement(Qc,{onClick:j,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out"},C.createElement(xie,null))),a&&C.createElement(Qc,{className:"react-flow__controls-fitview",onClick:W,title:"fit view","aria-label":"fit view"},C.createElement(wie,null)),c&&C.createElement(Qc,{className:"react-flow__controls-interactive",onClick:U,title:"toggle interactivity","aria-label":"toggle interactivity"},E?C.createElement(Eie,null):C.createElement(Sie,null)),m)};Iie.displayName="Controls";var Rie=function(t,r,n){return C.createElement("path",{stroke:n,strokeWidth:r,d:"M".concat(t/2," 0 V").concat(t," M0 ").concat(t/2," H").concat(t)})},Nie=function(t,r){return C.createElement("circle",{cx:t,cy:t,r:t,fill:r})},eu;function YP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function XP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Tie=(eu={},it(eu,Mo.Dots,"#81818a"),it(eu,Mo.Lines,"#eee"),eu),Pie=function(t){return t.transform},Aq=function(t){var r=t.variant,n=r===void 0?Mo.Dots:r,i=t.gap,o=i===void 0?15:i,a=t.size,s=a===void 0?.4:a,c=t.color,d=t.style,u=t.className,h=C.useRef(null),p=C.useState(null),v=Xe(p,2),y=v[0],m=v[1],g=Vt(Pie),w=Xe(g,3),x=w[0],_=w[1],S=w[2];C.useEffect(function(){var j=document.querySelectorAll(".react-flow__background"),W=Array.from(j).findIndex(function(U){return U===h.current});m("pattern-".concat(W))},[]);var E=o*S||1,I=x%E,N=_%E,T=n===Mo.Lines,M=c||Tie[n],z=T?Rie(E,s,M):Nie(s*S,M);return C.createElement("svg",{className:cn(["react-flow__background","react-flow__container",u]),style:XP(XP({},d),{},{width:"100%",height:"100%"}),ref:h},y&&C.createElement(C.Fragment,null,C.createElement("pattern",{id:y,x:I,y:N,width:E,height:E,patternUnits:"userSpaceOnUse"},z),C.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#".concat(y,")")})))};Aq.displayName="Background";var Mie=C.memo(Aq),kie=["paid-pro","paid-sponsor","paid-enterprise","paid-custom"];function Aie(e){var t=e.proOptions,r=e.position,n=r===void 0?"bottom-right":r;if(t!=null&&t.account&&kie.includes(t==null?void 0:t.account)&&t!==null&&t!==void 0&&t.hideAttribution)return null;var i="".concat(n).split("-");return C.createElement("div",{className:cn(["react-flow__attribution"].concat(Io(i))),"data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev/pricing"},C.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer"},"React Flow"))}var Die=["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"];function ZP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var qie=function(t){var r=t.x,n=t.y,i=t.label,o=t.labelStyle,a=o===void 0?{}:o,s=t.labelShowBg,c=s===void 0?!0:s,d=t.labelBgStyle,u=d===void 0?{}:d,h=t.labelBgPadding,p=h===void 0?[2,4]:h,v=t.labelBgBorderRadius,y=v===void 0?2:v,m=t.children,g=t.className,w=Kd(t,Die),x=C.useRef(null),_=C.useState({x:0,y:0,width:0,height:0}),S=Xe(_,2),E=S[0],I=S[1],N=cn(["react-flow__edge-textwrapper",g]);return C.useEffect(function(){if(x.current){var T=x.current.getBBox();I({x:T.x,y:T.y,width:T.width,height:T.height})}},[i]),typeof i>"u"||!i?null:C.createElement("g",jie({transform:"translate(".concat(r-E.width/2," ").concat(n-E.height/2,")"),className:N},w),c&&C.createElement("rect",{width:E.width+2*p[0],x:-p[0],y:-p[1],height:E.height+2*p[1],className:"react-flow__edge-textbg",style:u,rx:y,ry:y}),C.createElement("text",{className:"react-flow__edge-text",y:E.height/2,dy:"0.3em",ref:x,style:a},i),m)},zie=C.memo(qie),Yd=(function(e){var t=e.path,r=e.centerX,n=e.centerY,i=e.label,o=e.labelStyle,a=e.labelShowBg,s=e.labelBgStyle,c=e.labelBgPadding,d=e.labelBgBorderRadius,u=e.style,h=e.markerEnd,p=e.markerStart,v=i?C.createElement(zie,{x:r,y:n,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:d}):null;return C.createElement(C.Fragment,null,C.createElement("path",{style:u,d:t,className:"react-flow__edge-path",markerEnd:h,markerStart:p}),v)});function od(e){var t=e.pos,r=e.x1,n=e.y1,i=e.x2,o=e.y2,a,s;switch(t){case Oe.Left:case Oe.Right:a=.5*(r+i),s=n;break;case Oe.Top:case Oe.Bottom:a=r,s=.5*(n+o);break}return[a,s]}function Dq(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Oe.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Oe.Top:s,d=od({pos:i,x1:t,y1:r,x2:o,y2:a}),u=Xe(d,2),h=u[0],p=u[1],v=od({pos:c,x1:o,y1:a,x2:t,y2:r}),y=Xe(v,2),m=y[0],g=y[1];return"M".concat(t,",").concat(r," C").concat(h,",").concat(p," ").concat(m,",").concat(g," ").concat(o,",").concat(a)}function Lie(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Oe.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Oe.Top:s,d=od({pos:i,x1:t,y1:r,x2:o,y2:a}),u=Xe(d,2),h=u[0],p=u[1],v=od({pos:c,x1:o,y1:a,x2:t,y2:r}),y=Xe(v,2),m=y[0],g=y[1],w=t*.125+h*.375+m*.375+o*.125,x=r*.125+p*.375+g*.375+a*.125,_=Math.abs(w-t),S=Math.abs(x-r);return[w,x,_,S]}var jq=C.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?Oe.Bottom:o,s=e.targetPosition,c=s===void 0?Oe.Top:s,d=e.label,u=e.labelStyle,h=e.labelShowBg,p=e.labelBgStyle,v=e.labelBgPadding,y=e.labelBgBorderRadius,m=e.style,g=e.markerEnd,w=e.markerStart,x={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c},_=Dq(x),S=Lie(x),E=Xe(S,2),I=E[0],N=E[1];return C.createElement(Yd,{path:_,centerX:I,centerY:N,label:d,labelStyle:u,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:y,style:m,markerEnd:g,markerStart:w})});function JP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Bie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var QP=[Oe.Left,Oe.Right],qq=function(t){var r=t.sourceX,n=t.sourceY,i=t.targetX,o=t.targetY,a=t.sourcePosition,s=a===void 0?Oe.Bottom:a,c=t.targetPosition,d=c===void 0?Oe.Top:c,u=QP.includes(s),h=QP.includes(d),p=u&&!h||h&&!u;if(p){var v=u?Math.abs(i-r):0,y=r>i?r-v:r+v,m=u?0:Math.abs(o-n),g=n<o?n+m:n-m;return[y,g,v,m]}var w=Math.abs(i-r)/2,x=i<r?i+w:i-w,_=Math.abs(o-n)/2,S=o<n?o+_:o-_;return[x,S,w,_]};function Is(e,t,r){return r===void 0?r:function(n){var i=t().edges.find(function(o){return o.id===e});r(n,Bie({},i))}}var b0=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},y0=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},x0=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},w0=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},S0=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)},E0=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},_0=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},O0=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)};function Uw(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Oe.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Oe.Top:s,d=e.borderRadius,u=d===void 0?5:d,h=e.centerX,p=e.centerY,v=qq({sourceX:t,sourceY:r,targetX:o,targetY:a}),y=Xe(v,4),m=y[0],g=y[1],w=y[2],x=y[3],_=Math.min(u,Math.abs(o-t)),S=Math.min(u,Math.abs(a-r)),E=Math.min(_,S,w,x),I=[Oe.Left,Oe.Right],N=typeof h<"u"?h:m,T=typeof p<"u"?p:g,M=null,z=null;return t<=o?(M=r<=a?b0(t,T,E):E0(t,T,E),z=r<=a?O0(o,T,E):w0(o,T,E)):(M=r<a?x0(t,T,E):_0(t,T,E),z=r<a?S0(o,T,E):y0(o,T,E)),I.includes(i)&&I.includes(c)?t<=o?(M=r<=a?O0(N,r,E):w0(N,r,E),z=r<=a?b0(N,a,E):E0(N,a,E)):(i===Oe.Right&&c===Oe.Left||i===Oe.Left&&c===Oe.Right||i===Oe.Left&&c===Oe.Left)&&(M=r<=a?S0(N,r,E):y0(N,r,E),z=r<=a?x0(N,a,E):_0(N,a,E)):I.includes(i)&&!I.includes(c)?(t<=o?M=r<=a?O0(o,r,E):w0(o,r,E):M=r<=a?S0(o,r,E):y0(o,r,E),z=""):!I.includes(i)&&I.includes(c)&&(t<=o?M=r<=a?b0(t,a,E):E0(t,a,E):M=r<=a?x0(t,a,E):_0(t,a,E),z=""),"M ".concat(t,",").concat(r).concat(M).concat(z,"L ").concat(o,",").concat(a)}var HS=C.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.label,a=e.labelStyle,s=e.labelShowBg,c=e.labelBgStyle,d=e.labelBgPadding,u=e.labelBgBorderRadius,h=e.style,p=e.sourcePosition,v=p===void 0?Oe.Bottom:p,y=e.targetPosition,m=y===void 0?Oe.Top:y,g=e.markerEnd,w=e.markerStart,x=e.borderRadius,_=x===void 0?5:x,S=qq({sourceX:t,sourceY:r,targetX:n,targetY:i,sourcePosition:v,targetPosition:m}),E=Xe(S,2),I=E[0],N=E[1],T=Uw({sourceX:t,sourceY:r,sourcePosition:v,targetX:n,targetY:i,targetPosition:m,borderRadius:_});return C.createElement(Yd,{path:T,centerX:I,centerY:N,label:o,labelStyle:a,labelShowBg:s,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:u,style:h,markerEnd:g,markerStart:w})});function e5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function t5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?e5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var zq=C.memo(function(e){return C.createElement(HS,t5(t5({},e),{},{borderRadius:0}))}),Lq=C.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.label,a=e.labelStyle,s=e.labelShowBg,c=e.labelBgStyle,d=e.labelBgPadding,u=e.labelBgBorderRadius,h=e.style,p=e.markerEnd,v=e.markerStart,y=Math.abs(i-r)/2,m=i<r?i+y:i-y,g=Math.abs(n-t)/2,w=n<t?n+g:n-g,x="M ".concat(t,",").concat(r,"L ").concat(n,",").concat(i);return C.createElement(Yd,{path:x,centerX:w,centerY:m,label:o,labelStyle:a,labelShowBg:s,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:u,style:h,markerEnd:p,markerStart:v})});function tu(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function ad(e){var t=e.pos,r=e.x1,n=e.y1,i=e.x2,o=e.y2,a=e.c,s,c;switch(t){case Oe.Left:s=r-tu(r-i,a),c=n;break;case Oe.Right:s=r+tu(i-r,a),c=n;break;case Oe.Top:s=r,c=n-tu(n-o,a);break;case Oe.Bottom:s=r,c=n+tu(o-n,a);break}return[s,c]}function Xd(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Oe.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Oe.Top:s,d=e.curvature,u=d===void 0?.25:d,h=ad({pos:i,x1:t,y1:r,x2:o,y2:a,c:u}),p=Xe(h,2),v=p[0],y=p[1],m=ad({pos:c,x1:o,y1:a,x2:t,y2:r,c:u}),g=Xe(m,2),w=g[0],x=g[1];return"M".concat(t,",").concat(r," C").concat(v,",").concat(y," ").concat(w,",").concat(x," ").concat(o,",").concat(a)}function Fie(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Oe.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Oe.Top:s,d=e.curvature,u=d===void 0?.25:d,h=ad({pos:i,x1:t,y1:r,x2:o,y2:a,c:u}),p=Xe(h,2),v=p[0],y=p[1],m=ad({pos:c,x1:o,y1:a,x2:t,y2:r,c:u}),g=Xe(m,2),w=g[0],x=g[1],_=t*.125+v*.375+w*.375+o*.125,S=r*.125+y*.375+x*.375+a*.125,E=Math.abs(_-t),I=Math.abs(S-r);return[_,S,E,I]}var Gw=C.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?Oe.Bottom:o,s=e.targetPosition,c=s===void 0?Oe.Top:s,d=e.label,u=e.labelStyle,h=e.labelShowBg,p=e.labelBgStyle,v=e.labelBgPadding,y=e.labelBgBorderRadius,m=e.style,g=e.markerEnd,w=e.markerStart,x=e.curvature,_={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c,curvature:x},S=Xd(_),E=Fie(_),I=Xe(E,2),N=I[0],T=I[1];return C.createElement(Yd,{path:S,centerX:N,centerY:T,label:d,labelStyle:u,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:y,style:m,markerEnd:g,markerStart:w})}),WS=C.createContext(null),$ie=WS.Provider;WS.Consumer;function Kw(e,t,r,n,i,o,a){var s=a.elementFromPoint(e.clientX,e.clientY),c=(s==null?void 0:s.classList.contains("target"))||!1,d=(s==null?void 0:s.classList.contains("source"))||!1,u={elementBelow:s,isValid:!1,connection:{source:null,target:null,sourceHandle:null,targetHandle:null},isHoveringHandle:!1};if(s&&(c||d)){u.isHoveringHandle=!0;var h=s.getAttribute("data-nodeid"),p=s.getAttribute("data-handleid"),v=r?{source:h,sourceHandle:p,target:n,targetHandle:i}:{source:n,sourceHandle:i,target:h,targetHandle:p};u.connection=v;var y=t===Da.Strict?r&&d||!r&&c:!0;y&&(u.isValid=o(v))}return u}function C0(e){e==null||e.classList.remove("react-flow__handle-valid"),e==null||e.classList.remove("react-flow__handle-connecting")}function Bq(e){var t=e.event,r=e.handleId,n=e.nodeId,i=e.onConnect,o=e.isTarget,a=e.getState,s=e.setState,c=e.isValidConnection,d=e.elementEdgeUpdaterType,u=e.onEdgeUpdateEnd,h=t.target.closest(".react-flow"),p=wq(t.target);if(!p)return;var v=p.elementFromPoint(t.clientX,t.clientY),y=v==null?void 0:v.classList.contains("target"),m=v==null?void 0:v.classList.contains("source");if(!h||!y&&!m&&!d)return;var g=a(),w=g.onConnectStart,x=g.connectionMode,_=d||(y?"target":"source"),S=h.getBoundingClientRect(),E;s({connectionPosition:{x:t.clientX-S.left,y:t.clientY-S.top},connectionNodeId:n,connectionHandleId:r,connectionHandleType:_}),w==null||w(t,{nodeId:n,handleId:r,handleType:_});function I(T){s({connectionPosition:{x:T.clientX-S.left,y:T.clientY-S.top}});var M=Kw(T,x,o,n,r,c,p),z=M.connection,j=M.elementBelow,W=M.isValid,U=M.isHoveringHandle;if(!U)return C0(E);z.source!==z.target&&j&&(C0(E),E=j,j.classList.add("react-flow__handle-connecting"),j.classList.toggle("react-flow__handle-valid",W))}function N(T){var M=a(),z=M.onConnectStop,j=M.onConnectEnd,W=Kw(T,x,o,n,r,c,p),U=W.connection,A=W.isValid;z==null||z(T),A&&(i==null||i(U)),j==null||j(T),d&&u&&u(T),C0(E),s({connectionNodeId:null,connectionHandleId:null,connectionHandleType:null}),p.removeEventListener("mousemove",I),p.removeEventListener("mouseup",N)}p.addEventListener("mousemove",I),p.addEventListener("mouseup",N)}var Vie=["type","position","isValidConnection","isConnectable","id","onConnect","children","className","onMouseDown"];function r5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function I0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?r5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):r5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Hie=function(){return!0},Wie=function(t){return{connectionStartHandle:t.connectionStartHandle,connectOnClick:t.connectOnClick}},Fq=C.forwardRef(function(e,t){var r=e.type,n=r===void 0?"source":r,i=e.position,o=i===void 0?Oe.Top:i,a=e.isValidConnection,s=a===void 0?Hie:a,c=e.isConnectable,d=c===void 0?!0:c,u=e.id,h=e.onConnect,p=e.children,v=e.className,y=e.onMouseDown,m=Kd(e,Vie),g=Nr(),w=C.useContext(WS),x=Vt(Wie,Wr),_=x.connectionStartHandle,S=x.connectOnClick,E=u||null,I=n==="target",N=function(j){var W=g.getState(),U=W.defaultEdgeOptions,A=W.onConnect,K=W.hasDefaultEdges,V=I0(I0({},U),j);if(K){var te=g.getState(),G=te.edges;g.setState({edges:sie(V,G)})}A==null||A(V),h==null||h(V)},T=function(j){j.button===0&&Bq({event:j,handleId:E,nodeId:w,onConnect:N,isTarget:I,getState:g.getState,setState:g.setState,isValidConnection:s}),y==null||y(j)},M=function(j){var W=g.getState(),U=W.onClickConnectStart,A=W.onClickConnectStop,K=W.onClickConnectEnd,V=W.connectionMode;if(!_){U==null||U(j,{nodeId:w,handleId:E,handleType:n}),g.setState({connectionStartHandle:{nodeId:w,type:n,handleId:E}});return}var te=wq(j.target),G=Kw(j,V,_.type==="target",_.nodeId,_.handleId||null,s,te),re=G.connection,P=G.isValid;A==null||A(j),P&&N(re),K==null||K(j),g.setState({connectionStartHandle:null})};return C.createElement("div",I0({"data-handleid":E,"data-nodeid":w,"data-handlepos":o,className:cn(["react-flow__handle","react-flow__handle-".concat(o),"nodrag",v,{source:!I,target:I,connectable:d,connecting:(_==null?void 0:_.nodeId)===w&&(_==null?void 0:_.handleId)===E&&(_==null?void 0:_.type)===n}]),onMouseDown:T,onClick:S?M:void 0,ref:t},m),p)});Fq.displayName="Handle";var sd=C.memo(Fq),$q=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?Oe.Top:i,a=t.sourcePosition,s=a===void 0?Oe.Bottom:a;return C.createElement(C.Fragment,null,C.createElement(sd,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label,C.createElement(sd,{type:"source",position:s,isConnectable:n}))};$q.displayName="DefaultNode";var Yw=C.memo($q),Vq=function(t){var r=t.data,n=t.isConnectable,i=t.sourcePosition,o=i===void 0?Oe.Bottom:i;return C.createElement(C.Fragment,null,r==null?void 0:r.label,C.createElement(sd,{type:"source",position:o,isConnectable:n}))};Vq.displayName="InputNode";var Hq=C.memo(Vq),Wq=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?Oe.Top:i;return C.createElement(C.Fragment,null,C.createElement(sd,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label)};Wq.displayName="OutputNode";var Uq=C.memo(Wq),Uie=function(t){return{selectedNodes:Array.from(t.nodeInternals.values()).filter(function(r){return r.selected}),selectedEdges:t.edges.filter(function(r){return r.selected})}},Gie=function(t,r){var n=t.selectedNodes.map(function(s){return s.id}),i=r.selectedNodes.map(function(s){return s.id}),o=t.selectedEdges.map(function(s){return s.id}),a=r.selectedEdges.map(function(s){return s.id});return Wr(n,i)&&Wr(o,a)};function Kie(e){var t=e.onSelectionChange,r=Vt(Uie,Gie),n=r.selectedNodes,i=r.selectedEdges;return C.useEffect(function(){t({nodes:n,edges:i})},[n,i]),null}var Yie=C.memo(Kie),Xie=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 Vi(e,t){C.useEffect(function(){typeof e<"u"&&t(e)},[e])}function bt(e,t,r){C.useEffect(function(){typeof t<"u"&&r(it({},e,t))},[t])}var Zie=function(t){var r=t.nodes,n=t.edges,i=t.defaultNodes,o=t.defaultEdges,a=t.onConnect,s=t.onConnectStart,c=t.onConnectStop,d=t.onConnectEnd,u=t.onClickConnectStart,h=t.onClickConnectStop,p=t.onClickConnectEnd,v=t.nodesDraggable,y=t.nodesConnectable,m=t.minZoom,g=t.maxZoom,w=t.nodeExtent,x=t.onNodesChange,_=t.onEdgesChange,S=t.elementsSelectable,E=t.connectionMode,I=t.snapGrid,N=t.snapToGrid,T=t.translateExtent,M=t.connectOnClick,z=t.defaultEdgeOptions,j=t.fitView,W=t.fitViewOptions,U=t.onNodesDelete,A=t.onEdgesDelete,K=t.onNodeDrag,V=t.onNodeDragStart,te=t.onNodeDragStop,G=t.onSelectionDrag,re=t.onSelectionDragStart,P=t.onSelectionDragStop,B=Vt(Xie,Wr),X=B.setNodes,Q=B.setEdges,D=B.setDefaultNodesAndEdges,$=B.setMinZoom,H=B.setMaxZoom,q=B.setTranslateExtent,Y=B.setNodeExtent,ie=B.reset,ne=Nr();return C.useEffect(function(){return D(i,o),function(){ie()}},[]),bt("defaultEdgeOptions",z,ne.setState),bt("connectionMode",E,ne.setState),bt("onConnect",a,ne.setState),bt("onConnectStart",s,ne.setState),bt("onConnectStop",c,ne.setState),bt("onConnectEnd",d,ne.setState),bt("onClickConnectStart",u,ne.setState),bt("onClickConnectStop",h,ne.setState),bt("onClickConnectEnd",p,ne.setState),bt("nodesDraggable",v,ne.setState),bt("nodesConnectable",y,ne.setState),bt("elementsSelectable",S,ne.setState),bt("snapToGrid",N,ne.setState),bt("snapGrid",I,ne.setState),bt("onNodesChange",x,ne.setState),bt("onEdgesChange",_,ne.setState),bt("connectOnClick",M,ne.setState),bt("fitViewOnInit",j,ne.setState),bt("fitViewOnInitOptions",W,ne.setState),bt("onNodesDelete",U,ne.setState),bt("onEdgesDelete",A,ne.setState),bt("onNodeDrag",K,ne.setState),bt("onNodeDragStart",V,ne.setState),bt("onNodeDragStop",te,ne.setState),bt("onSelectionDrag",G,ne.setState),bt("onSelectionDragStart",re,ne.setState),bt("onSelectionDragStop",P,ne.setState),Vi(r,X),Vi(n,Q),Vi(i,X),Vi(o,Q),Vi(m,$),Vi(g,H),Vi(T,q),Vi(w,Y),null},Jie=".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%)}",Qie=Jie,eoe=".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}",toe=eoe,roe=function(t,r,n){return n===Oe.Left?t-r:n===Oe.Right?t+r:t},noe=function(t,r,n){return n===Oe.Top?t-r:n===Oe.Bottom?t+r:t},n5=function(t){var r=t.className,n=t.position,i=t.centerX,o=t.centerY,a=t.radius,s=a===void 0?10:a;return C.createElement("circle",{className:cn(["react-flow__edgeupdater",r]),cx:roe(i,s,n),cy:noe(o,s,n),r:s,stroke:"transparent",fill:"transparent"})},la=(function(e){var t=function(n){var i=n.id,o=n.className,a=n.type,s=n.data,c=n.onClick,d=n.onEdgeDoubleClick,u=n.selected,h=n.animated,p=n.label,v=n.labelStyle,y=n.labelShowBg,m=n.labelBgStyle,g=n.labelBgPadding,w=n.labelBgBorderRadius,x=n.style,_=n.source,S=n.target,E=n.sourceX,I=n.sourceY,N=n.targetX,T=n.targetY,M=n.sourcePosition,z=n.targetPosition,j=n.elementsSelectable,W=n.hidden,U=n.sourceHandleId,A=n.targetHandleId,K=n.onContextMenu,V=n.onMouseEnter,te=n.onMouseMove,G=n.onMouseLeave,re=n.edgeUpdaterRadius,P=n.onEdgeUpdate,B=n.onEdgeUpdateStart,X=n.onEdgeUpdateEnd,Q=n.markerEnd,D=n.markerStart,$=n.rfId,H=C.useState(!1),q=Xe(H,2),Y=q[0],ie=q[1],ne=Nr(),ve=function(ze){var Je=ne.getState(),rt=Je.edges,Pt=Je.addSelectedEdges,gt=rt.find(function(Rt){return Rt.id===i});j&&(ne.setState({nodesSelectionActive:!1}),Pt([i])),c==null||c(ze,gt)},Z=Is(i,ne.getState,d),J=Is(i,ne.getState,K),ae=Is(i,ne.getState,V),he=Is(i,ne.getState,te),ue=Is(i,ne.getState,G),de=function(ze,Je){var rt=Je?S:_,Pt=(Je?A:U)||null,gt=Je?"target":"source",Rt=function(){return!0},qt=Je,Ot=ne.getState().edges.find(function(ar){return ar.id===i});B==null||B(ze,Ot,gt);var Gr=X?function(ar){return X(ar,Ot,gt)}:void 0,Kr=function(Nn){return P==null?void 0:P(Ot,Nn)};Bq({event:ze,handleId:Pt,nodeId:rt,onConnect:Kr,isTarget:qt,getState:ne.getState,setState:ne.setState,isValidConnection:Rt,elementEdgeUpdaterType:gt,onEdgeUpdateEnd:Gr})},le=function(ze){return de(ze,!0)},xe=function(ze){return de(ze,!1)},Ee=function(){return ie(!0)},Ie=function(){return ie(!1)},Te=C.useMemo(function(){return"url(#".concat(Hw(D,$),")")},[D,$]),Me=C.useMemo(function(){return"url(#".concat(Hw(Q,$),")")},[Q,$]);if(W)return null;var Ze=!j&&!c,tt=typeof P<"u",Fe=cn(["react-flow__edge","react-flow__edge-".concat(a),o,{selected:u,animated:h,inactive:Ze,updating:Y}]);return C.createElement("g",{className:Fe,onClick:ve,onDoubleClick:Z,onContextMenu:J,onMouseEnter:ae,onMouseMove:he,onMouseLeave:ue},C.createElement(e,{id:i,source:_,target:S,selected:u,animated:h,label:p,labelStyle:v,labelShowBg:y,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:w,data:s,style:x,sourceX:E,sourceY:I,targetX:N,targetY:T,sourcePosition:M,targetPosition:z,sourceHandleId:U,targetHandleId:A,markerStart:Te,markerEnd:Me,"data-testid":"rf__edge-".concat(i)}),tt&&C.createElement("g",{onMouseDown:le,onMouseEnter:Ee,onMouseOut:Ie},C.createElement(n5,{position:M,centerX:E,centerY:I,radius:re})),tt&&C.createElement("g",{onMouseDown:xe,onMouseEnter:Ee,onMouseOut:Ie},C.createElement(n5,{position:z,centerX:N,centerY:T,radius:re})))};return t.displayName="EdgeWrapper",C.memo(t)});function i5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function o5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?i5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ioe(e){var t={default:la(e.default||Gw),straight:la(e.bezier||Lq),step:la(e.step||zq),smoothstep:la(e.step||HS),simplebezier:la(e.simplebezier||jq)},r={},n=Object.keys(e).filter(function(i){return!["default","bezier"].includes(i)}).reduce(function(i,o){return i[o]=la(e[o]||Gw),i},r);return o5(o5({},t),n)}function a5(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=((r==null?void 0:r.x)||0)+t.x,i=((r==null?void 0:r.y)||0)+t.y,o=(r==null?void 0:r.width)||t.width,a=(r==null?void 0:r.height)||t.height;switch(e){case Oe.Top:return{x:n+o/2,y:i};case Oe.Right:return{x:n+o,y:i+a/2};case Oe.Bottom:return{x:n+o/2,y:i+a};case Oe.Left:return{x:n,y:i+a/2}}}function s5(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 ooe=function(t,r,n,i,o,a){var s=a5(n,t,r),c=a5(a,i,o);return{sourceX:s.x,sourceY:s.y,targetX:c.x,targetY:c.y}};function aoe(e){var t=e.sourcePos,r=e.targetPos,n=e.sourceWidth,i=e.sourceHeight,o=e.targetWidth,a=e.targetHeight,s=e.width,c=e.height,d=e.transform,u={x:Math.min(t.x,r.x),y:Math.min(t.y,r.y),x2:Math.max(t.x+n,r.x+o),y2:Math.max(t.y+i,r.y+a)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);var h=id({x:(0-d[0])/d[2],y:(0-d[1])/d[2],width:s/d[2],height:c/d[2]}),p=Math.max(0,Math.min(h.x2,u.x2)-Math.max(h.x,u.x)),v=Math.max(0,Math.min(h.y2,u.y2)-Math.max(h.y,u.y)),y=Math.ceil(p*v);return y>0}function l5(e,t){var r,n,i,o,a,s=e.get(t),c=(s==null||(r=s[ur])===null||r===void 0?void 0:r.handleBounds)||null,d=!s||!c||!s.width||!s.height||typeof((n=s.positionAbsolute)===null||n===void 0?void 0:n.x)>"u"||typeof((i=s.positionAbsolute)===null||i===void 0?void 0:i.y)>"u";return[{x:(s==null||(o=s.positionAbsolute)===null||o===void 0?void 0:o.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,!d]}var soe=typeof document<"u"?document:null,ld=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{target:soe},r=C.useState(!1),n=Xe(r,2),i=n[0],o=n[1],a=C.useRef(new Set([])),s=C.useMemo(function(){if(e!==null){var h=Array.isArray(e)?e:[e],p=h.filter(function(y){return typeof y=="string"}).map(function(y){return y.split("+")}),v=p.reduce(function(y,m){return y.concat.apply(y,Io(m))},[]);return[p,v]}return[[],[]]},[e]),c=Xe(s,2),d=c[0],u=c[1];return C.useEffect(function(){if(e!==null){var h,p,v=function(w){if(d5(w))return!1;var x=u5(w.code,u);a.current.add(w[x]),c5(d,a.current,!1)&&(w.preventDefault(),o(!0))},y=function(w){if(d5(w))return!1;var x=u5(w.code,u);c5(d,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(w[x])},m=function(){a.current.clear(),o(!1)};return t==null||(h=t.target)===null||h===void 0||h.addEventListener("keydown",v),t==null||(p=t.target)===null||p===void 0||p.addEventListener("keyup",y),window.addEventListener("blur",m),function(){var g,w;t==null||(g=t.target)===null||g===void 0||g.removeEventListener("keydown",v),t==null||(w=t.target)===null||w===void 0||w.removeEventListener("keyup",y),window.removeEventListener("blur",m)}}},[e,o]),i});function c5(e,t,r){return e.filter(function(n){return r||n.length===t.size}).some(function(n){return n.every(function(i){return t.has(i)})})}function u5(e,t){return t.includes(e)?"code":"key"}function d5(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 loe=function(t){return{onNodesChange:t.onNodesChange,onEdgesChange:t.onEdgesChange}},coe=(function(e){var t=e.deleteKeyCode,r=e.multiSelectionKeyCode,n=Nr(),i=Vt(loe,Wr),o=i.onNodesChange,a=i.onEdgesChange,s=ld(t),c=ld(r);C.useEffect(function(){var d=n.getState(),u=d.nodeInternals,h=d.edges,p=d.hasDefaultNodes,v=d.hasDefaultEdges,y=d.onNodesDelete,m=d.onEdgesDelete,g=Array.from(u.values()),w=g.reduce(function(T,M){return(!M.selected&&M.parentNode&&T.find(function(z){return z.id===M.parentNode})||M.selected)&&T.push(M),T},[]),x=h.filter(function(T){return T.selected});if(s&&(w||x)){var _=Nq(w,h),S=[].concat(Io(x),Io(_)),E=S.reduce(function(T,M){return T.includes(M.id)||T.push(M.id),T},[]);if((v||p)&&(v&&n.setState({edges:h.filter(function(T){return!E.includes(T.id)})}),p&&(w.forEach(function(T){u.delete(T.id)}),n.setState({nodeInternals:new Map(u)}))),E.length>0&&(m==null||m(S),a)){var I=E.map(function(T){return{id:T,type:"remove"}});a(I)}if(w.length>0&&(y==null||y(w),o)){var N=w.map(function(T){return{id:T.id,type:"remove"}});o(N)}n.setState({nodesSelectionActive:!1})}},[s,o,a]),C.useEffect(function(){n.setState({multiSelectionActive:c})},[c])});function uoe(e){var t=Nr();C.useEffect(function(){var r,n=function(){if(e.current){var o=FS(e.current);process.env.NODE_ENV==="development"&&(o.height===0||o.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:o.width||500,height:o.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 doe=function(t,r){return t.x!==r.x||t.y!==r.y||t.zoom!==r.k},R0=function(t){return{x:t.x,y:t.y,zoom:t.k}},ru=function(t,r){return t.target.closest(".".concat(r))},foe=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler}},hoe=function(t){var r=t.onMove,n=t.onMoveStart,i=t.onMoveEnd,o=t.zoomOnScroll,a=o===void 0?!0:o,s=t.zoomOnPinch,c=s===void 0?!0:s,d=t.panOnScroll,u=d===void 0?!1:d,h=t.panOnScrollSpeed,p=h===void 0?.5:h,v=t.panOnScrollMode,y=v===void 0?_a.Free:v,m=t.zoomOnDoubleClick,g=m===void 0?!0:m,w=t.selectionKeyPressed,x=t.elementsSelectable,_=t.panOnDrag,S=_===void 0?!0:_,E=t.translateExtent,I=t.minZoom,N=t.maxZoom,T=t.defaultZoom,M=T===void 0?1:T,z=t.defaultPosition,j=z===void 0?[0,0]:z,W=t.zoomActivationKeyCode,U=t.preventScrolling,A=U===void 0?!0:U,K=t.children,V=t.noWheelClassName,te=t.noPanClassName,G=Nr(),re=C.useRef(!1),P=C.useRef(null),B=C.useRef({x:0,y:0,zoom:0}),X=Vt(foe,Wr),Q=X.d3Zoom,D=X.d3Selection,$=X.d3ZoomHandler,H=ld(W);return uoe(P),C.useEffect(function(){if(P.current){var q,Y=Zne().scaleExtent([I,N]).translateExtent(E),ie=jn(P.current).call(Y),ne=Oa(j[0],E[0][0],E[1][0]),ve=Oa(j[1],E[0][1],E[1][1]),Z=Oa(M,I,N),J=Co.translate(ne,ve).scale(Z);Y.transform(ie,J),G.setState({d3Zoom:Y,d3Selection:ie,d3ZoomHandler:ie.on("wheel.zoom"),transform:[ne,ve,Z],domNode:(q=ie.node())===null||q===void 0?void 0:q.closest(".react-flow")})}},[]),C.useEffect(function(){D&&Q&&(u&&!H?D.on("wheel",function(q){if(ru(q,V))return!1;q.preventDefault(),q.stopImmediatePropagation();var Y=D.property("__zoom").k||1;if(q.ctrlKey&&c){var ie=ti(q),ne=-q.deltaY*(q.deltaMode===1?.05:q.deltaMode?1:.002)*10,ve=Y*Math.pow(2,ne);Q.scaleTo(D,ve,ie);return}var Z=q.deltaMode===1?20:1,J=y===_a.Vertical?0:q.deltaX*Z,ae=y===_a.Horizontal?0:q.deltaY*Z;Q.translateBy(D,-(J/Y)*p,-(ae/Y)*p)}).on("wheel.zoom",null):typeof $<"u"&&D.on("wheel",function(q){if(!A||ru(q,V))return null;q.preventDefault()}).on("wheel.zoom",$))},[u,y,D,Q,$,H,c,A,V]),C.useEffect(function(){Q&&(w&&!re.current?Q.on("zoom",null):w||Q.on("zoom",function(q){if(G.setState({transform:[q.transform.x,q.transform.y,q.transform.k]}),r){var Y=R0(q.transform);r(q.sourceEvent,Y)}}))},[w,Q,r]),C.useEffect(function(){Q&&Q.on("start",function(q){if(re.current=!0,n){var Y=R0(q.transform);B.current=Y,n(q.sourceEvent,Y)}})},[Q,n]),C.useEffect(function(){Q&&Q.on("end",function(q){if(re.current=!1,i&&doe(B.current,q.transform)){var Y=R0(q.transform);B.current=Y,i(q.sourceEvent,Y)}})},[Q,i]),C.useEffect(function(){Q&&Q.filter(function(q){var Y=H||a,ie=c&&q.ctrlKey;return!S&&!Y&&!u&&!g&&!c||w||!g&&q.type==="dblclick"||ru(q,V)&&q.type==="wheel"||ru(q,te)&&q.type!=="wheel"||!c&&q.ctrlKey&&q.type==="wheel"||!Y&&!u&&!ie&&q.type==="wheel"||!S&&(q.type==="mousedown"||q.type==="touchstart")?!1:(!q.ctrlKey||q.type==="wheel")&&!q.button})},[Q,a,c,u,g,S,w,x,H]),C.createElement("div",{className:"react-flow__renderer react-flow__container",ref:P},K)};function f5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function h5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?f5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function p5(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}var poe=function(t){return{userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable}},v5={startX:0,startY:0,x:0,y:0,width:0,height:0,draw:!1},voe=C.memo(function(e){var t=e.selectionKeyPressed,r=Nr(),n=C.useRef(0),i=C.useRef(0),o=C.useRef(),a=C.useState(v5),s=Xe(a,2),c=s[0],d=s[1],u=Vt(poe,Wr),h=u.userSelectionActive,p=u.elementsSelectable,v=h||t;if(!p||!v)return null;var y=function(){d(v5),r.setState({userSelectionActive:!1}),n.current=0,i.current=0},m=function(S){var E=S.target.closest(".react-flow");o.current=E.getBoundingClientRect();var I=p5(S,o.current);d({width:0,height:0,startX:I.x,startY:I.y,x:I.x,y:I.y,draw:!0}),r.setState({userSelectionActive:!0,nodesSelectionActive:!1})},g=function(S){var E,I;if(!(!t||!c.draw||!o.current)){var N=p5(S,o.current),T=(E=c.startX)!==null&&E!==void 0?E:0,M=(I=c.startY)!==null&&I!==void 0?I:0,z=h5(h5({},c),{},{x:N.x<T?N.x:T,y:N.y<M?N.y:M,width:Math.abs(N.x-T),height:Math.abs(N.y-M)}),j=r.getState(),W=j.nodeInternals,U=j.edges,A=j.transform,K=j.onNodesChange,V=j.onEdgesChange,te=Array.from(W.values()),G=Rq(W,z,A,!1,!0),re=Nq(G,U).map(function(Q){return Q.id}),P=G.map(function(Q){return Q.id});if(n.current!==P.length){n.current=P.length;var B=ya(te,P);B.length&&(K==null||K(B))}if(i.current!==re.length){i.current=re.length;var X=ya(U,re);X.length&&(V==null||V(X))}d(z)}},w=function(){r.setState({nodesSelectionActive:n.current>0}),y()},x=function(){r.setState({nodesSelectionActive:!1}),y()};return C.createElement("div",{className:"react-flow__selectionpane react-flow__container",onMouseDown:m,onMouseMove:g,onMouseUp:w,onMouseLeave:x},c.draw&&C.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 g5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function m5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?g5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Gq(e,t){if(!e.parentNode)return!1;var r=t.get(e.parentNode);return r?r.selected?!0:Gq(r,t):!1}function b5(e,t,r){var n=e;do{var i;if((i=n)!==null&&i!==void 0&&i.matches(t))return!0;if(n===r.current)return!1;n=n.parentElement}while(n);return!1}function goe(e,t,r){return Array.from(e.values()).filter(function(n){return(n.selected||n.id===r)&&(!n.parentNode||!Gq(n,e))}).map(function(n){var i,o,a,s;return{id:n.id,position:n.position||{x:0,y:0},positionAbsolute:n.positionAbsolute||{x:0,y:0},distance:{x:t.x-((i=(o=n.positionAbsolute)===null||o===void 0?void 0:o.x)!==null&&i!==void 0?i: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 moe(e,t,r,n,i,o){var a=Xe(n,2),s=a[0],c=a[1],d=e.extent||o,u={x:t.x-e.distance.x,y:t.y-e.distance.y};if(r&&(u.x=s*Math.round(u.x/s),u.y=c*Math.round(u.y/c)),e.extent==="parent")if(e.parentNode&&e.width&&e.height){var h=i.get(e.parentNode);d=h!=null&&h.positionAbsolute&&h!==null&&h!==void 0&&h.width&&h!==null&&h!==void 0&&h.height?[[h.positionAbsolute.x,h.positionAbsolute.y],[h.positionAbsolute.x+h.width-e.width,h.positionAbsolute.y+h.height-e.height]]:d}else process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Only child nodes can use a parent extent. Help: https://reactflow.dev/error#500"),d=o;else if(e.extent&&e.parentNode){var p,v,y,m,g=i.get(e.parentNode),w=(p=g==null||(v=g.positionAbsolute)===null||v===void 0?void 0:v.x)!==null&&p!==void 0?p:0,x=(y=g==null||(m=g.positionAbsolute)===null||m===void 0?void 0:m.y)!==null&&y!==void 0?y:0;d=[[e.extent[0][0]+w,e.extent[0][1]+x],[e.extent[1][0]+w,e.extent[1][1]+x]]}var _={x:0,y:0};if(e.parentNode){var S,E,I,N,T=i.get(e.parentNode);_={x:(S=T==null||(E=T.positionAbsolute)===null||E===void 0?void 0:E.x)!==null&&S!==void 0?S:0,y:(I=T==null||(N=T.positionAbsolute)===null||N===void 0?void 0:N.y)!==null&&I!==void 0?I:0}}return e.positionAbsolute=d?xq(u,d):u,e.position={x:e.positionAbsolute.x-_.x,y:e.positionAbsolute.y-_.y},e}function N0(e){var t=e.nodeId,r=e.dragItems,n=e.nodeInternals,i=r.map(function(o){var a=n.get(o.id);return m5(m5({},a),{},{position:o.position,positionAbsolute:o.positionAbsolute})});return[t?i.find(function(o){return o.id===t}):i[0],i]}function T0(e){return function(t,r,n){return e==null?void 0:e(t,n)}}function Kq(e){var t=e.nodeRef,r=e.disabled,n=r===void 0?!1:r,i=e.noDragClassName,o=e.handleSelector,a=e.nodeId,s=e.isSelectable,c=e.selectNodesOnDrag,d=C.useState(!1),u=Xe(d,2),h=u[0],p=u[1],v=Nr(),y=C.useRef(),m=C.useRef({x:null,y:null}),g=C.useCallback(function(w){var x=w.sourceEvent,_=v.getState(),S=_.transform,E=_.snapGrid,I=_.snapToGrid,N=x.touches?x.touches[0].clientX:x.clientX,T=x.touches?x.touches[0].clientY:x.clientY,M=Iq({x:N,y:T},S,I,E);return M},[]);return C.useEffect(function(){if(t!=null&&t.current){var w=jn(t.current);if(n)w.on(".drag",null);else{var x=sre().on("start",function(_){var S=v.getState(),E=S.nodeInternals,I=S.multiSelectionActive,N=S.unselectNodesAndEdges,T=S.onNodeDragStart,M=S.onSelectionDragStart,z=a?T:T0(M);if(!c&&!I&&a){var j;(j=E.get(a))!==null&&j!==void 0&&j.selected||N()}a&&s&&c&&Cq({id:a,store:v});var W=g(_);if(m.current=W,y.current=goe(E,W,a),z&&y.current){var U=N0({nodeId:a,dragItems:y.current,nodeInternals:E}),A=Xe(U,2),K=A[0],V=A[1];z(_.sourceEvent,K,V)}}).on("drag",function(_){var S=v.getState(),E=S.updateNodePositions,I=S.snapToGrid,N=S.snapGrid,T=S.nodeInternals,M=S.nodeExtent,z=S.onNodeDrag,j=S.onSelectionDrag,W=g(_);if((m.current.x!==W.x||m.current.y!==W.y)&&y.current){m.current=W,y.current=y.current.map(function(G){return moe(G,W,I,N,T,M)});var U=a?z:T0(j);if(E(y.current,!0,!0),p(!0),U){var A=N0({nodeId:a,dragItems:y.current,nodeInternals:T}),K=Xe(A,2),V=K[0],te=K[1];U(_.sourceEvent,V,te)}}_.on("end",function(G){if(p(!1),y.current){var re=v.getState(),P=re.updateNodePositions,B=re.nodeInternals,X=re.onNodeDragStop,Q=re.onSelectionDragStop,D=a?X:T0(Q);if(P(y.current,!1,!1),D){var $=N0({nodeId:a,dragItems:y.current,nodeInternals:B}),H=Xe($,2),q=H[0],Y=H[1];D(G.sourceEvent,q,Y)}}})}).filter(function(_){var S=_.target,E=!_.button&&(!i||!b5(S,".".concat(i),t))&&(!o||b5(S,o,t));return E});return w.call(x),function(){w.on(".drag",null)}}}},[t,n,i,o,s,v,a,c,g]),h}function y5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function boe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?y5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var yoe=function(t){return boe({transformString:"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")"),userSelectionActive:t.userSelectionActive},$S(Array.from(t.nodeInternals.values()).filter(function(r){return r.selected})))},xoe=function(t){var r=Array.from(t.nodeInternals.values()).filter(function(n){return n.selected});return $S(r)};function woe(e){var t=e.onSelectionContextMenu,r=e.noPanClassName,n=Nr(),i=Vt(yoe,Wr),o=i.transformString,a=i.userSelectionActive,s=Vt(xoe,Wr),c=s.width,d=s.height,u=s.x,h=s.y,p=C.useRef(null);if(Kq({nodeRef:p}),a||!c||!d)return null;var v=t?function(y){var m=Array.from(n.getState().nodeInternals.values()).filter(function(g){return g.selected});t(y,m)}:void 0;return C.createElement("div",{className:cn(["react-flow__nodesselection","react-flow__container",r]),style:{transform:o}},C.createElement("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:v,style:{width:c,height:d,top:h,left:u}}))}var Soe=C.memo(woe),Eoe=function(t){return t.nodesSelectionActive},Yq=function(t){var r=t.children,n=t.onPaneClick,i=t.onPaneContextMenu,o=t.onPaneScroll,a=t.deleteKeyCode,s=t.onMove,c=t.onMoveStart,d=t.onMoveEnd,u=t.selectionKeyCode,h=t.multiSelectionKeyCode,p=t.zoomActivationKeyCode,v=t.elementsSelectable,y=t.zoomOnScroll,m=t.zoomOnPinch,g=t.panOnScroll,w=t.panOnScrollSpeed,x=t.panOnScrollMode,_=t.zoomOnDoubleClick,S=t.panOnDrag,E=t.translateExtent,I=t.minZoom,N=t.maxZoom,T=t.defaultZoom,M=t.defaultPosition,z=t.preventScrolling,j=t.onSelectionContextMenu,W=t.noWheelClassName,U=t.noPanClassName,A=Nr(),K=Vt(Eoe),V=ld(u);coe({deleteKeyCode:a,multiSelectionKeyCode:h});var te=function(B){n==null||n(B),A.getState().resetSelectedElements(),A.setState({nodesSelectionActive:!1})},G=i?function(P){return i(P)}:void 0,re=o?function(P){return o(P)}:void 0;return C.createElement(hoe,{onMove:s,onMoveStart:c,onMoveEnd:d,selectionKeyPressed:V,elementsSelectable:v,zoomOnScroll:y,zoomOnPinch:m,panOnScroll:g,panOnScrollSpeed:w,panOnScrollMode:x,zoomOnDoubleClick:_,panOnDrag:S,translateExtent:E,minZoom:I,maxZoom:N,defaultZoom:T,defaultPosition:M,zoomActivationKeyCode:p,preventScrolling:z,noWheelClassName:W,noPanClassName:U},r,C.createElement(voe,{selectionKeyPressed:V}),K&&C.createElement(Soe,{onSelectionContextMenu:j,noPanClassName:U}),C.createElement("div",{className:"react-flow__pane react-flow__container",onClick:te,onContextMenu:G,onWheel:re}))};Yq.displayName="FlowRenderer";var _oe=C.memo(Yq);function Ooe(e){var t=Vt(C.useCallback(function(r){return e?Rq(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):Array.from(r.nodeInternals.values())},[e]));return t}var Coe=function(t){return{nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,updateNodeDimensions:t.updateNodeDimensions}},Xq=function(t){var r=Vt(Coe,Wr),n=r.nodesDraggable,i=r.nodesConnectable,o=r.elementsSelectable,a=r.updateNodeDimensions,s=Ooe(t.onlyRenderVisibleElements),c=C.useRef(),d=C.useMemo(function(){if(typeof ResizeObserver>"u")return null;var u=new ResizeObserver(function(h){var p=h.map(function(v){return{id:v.target.getAttribute("data-id"),nodeElement:v.target,forceUpdate:!0}});a(p)});return c.current=u,u},[]);return C.useEffect(function(){return function(){var u;c==null||(u=c.current)===null||u===void 0||u.disconnect()}},[]),C.createElement("div",{className:"react-flow__nodes react-flow__container"},s.map(function(u){var h,p,v,y,m,g,w,x=u.type||"default";t.nodeTypes[x]||(process.env.NODE_ENV==="development"&&console.warn('[React Flow]: Node type "'.concat(x,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),x="default");var _=t.nodeTypes[x]||t.nodeTypes.default,S=!!(u.draggable||n&&typeof u.draggable>"u"),E=!!(u.selectable||o&&typeof u.selectable>"u"),I=!!(u.connectable||i&&typeof u.connectable>"u");return C.createElement(_,{key:u.id,id:u.id,className:u.className,style:u.style,type:x,data:u.data,sourcePosition:u.sourcePosition||Oe.Bottom,targetPosition:u.targetPosition||Oe.Top,hidden:u.hidden,xPos:(h=(p=u.positionAbsolute)===null||p===void 0?void 0:p.x)!==null&&h!==void 0?h:0,yPos:(v=(y=u.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:!!u.selected,isDraggable:S,isSelectable:E,isConnectable:I,resizeObserver:d,dragHandle:u.dragHandle,zIndex:(m=(g=u[ur])===null||g===void 0?void 0:g.z)!==null&&m!==void 0?m:0,isParent:!!((w=u[ur])!==null&&w!==void 0&&w.isParent),noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,initialized:!!u.width&&!!u.height})}))};Xq.displayName="NodeRenderer";var Ioe=C.memo(Xq),ca;function x5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function w5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?x5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Roe=(ca={},it(ca,Oe.Left,Oe.Right),it(ca,Oe.Right,Oe.Left),it(ca,Oe.Top,Oe.Bottom),it(ca,Oe.Bottom,Oe.Top),ca),Noe=(function(e){var t,r,n,i,o,a=e.connectionNodeId,s=e.connectionHandleType,c=e.connectionLineStyle,d=e.connectionLineType,u=d===void 0?Yi.Bezier:d,h=e.isConnectable,p=e.CustomConnectionLineComponent,v=Vt(C.useCallback(function(re){return{fromNode:re.nodeInternals.get(a),handleId:re.connectionHandleId,toX:(re.connectionPosition.x-re.transform[0])/re.transform[2],toY:(re.connectionPosition.y-re.transform[1])/re.transform[2]}},[a]),Wr),y=v.fromNode,m=v.handleId,g=v.toX,w=v.toY,x=y==null||(t=y[ur])===null||t===void 0?void 0:t.handleBounds;if(!y||!h||!(x!=null&&x[s]))return null;var _=x[s],S=m?_.find(function(re){return re.id===m}):_[0],E=S?S.x+S.width/2:((r=y==null?void 0:y.width)!==null&&r!==void 0?r:0)/2,I=S?S.y+S.height/2:(n=y==null?void 0:y.height)!==null&&n!==void 0?n:0,N=((y==null||(i=y.positionAbsolute)===null||i===void 0?void 0:i.x)||0)+E,T=((y==null||(o=y.positionAbsolute)===null||o===void 0?void 0:o.y)||0)+I,M=S==null?void 0:S.position;if(!M)return null;var z=Roe[M],j,W,U,A,K,V;switch(s){case"source":j=N,W=T,U=M,A=g,K=w,V=z;break;case"target":j=g,W=w,U=z,A=N,K=T,V=M;break}if(p)return C.createElement("g",{className:"react-flow__connection"},C.createElement(p,{connectionLineType:u,connectionLineStyle:c,fromNode:y,fromHandle:S,fromX:N,fromY:T,toX:g,toY:w,fromPosition:M,toPosition:z,sourcePosition:U,targetPosition:V,sourceNode:y,sourceHandle:S,targetX:A,targetY:K,sourceX:j,sourceY:W}));var te="",G={sourceX:j,sourceY:W,sourcePosition:U,targetX:A,targetY:K,targetPosition:V};return u===Yi.Bezier?te=Xd(G):u===Yi.Step?te=Uw(w5(w5({},G),{},{borderRadius:0})):u===Yi.SmoothStep?te=Uw(G):u===Yi.SimpleBezier?te=Dq(G):te="M".concat(j,",").concat(W," ").concat(A,",").concat(K),C.createElement("g",{className:"react-flow__connection"},C.createElement("path",{d:te,className:"react-flow__connection-path",style:c}))});function Xw(e){"@babel/helpers - typeof";return Xw=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},Xw(e)}var nu,Toe=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return C.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:"none",points:"-5,-4 0,0 -5,4"})},Poe=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return C.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:n,points:"-5,-4 0,0 -5,4 -5,-4"})},S5=(nu={},it(nu,nd.Arrow,Toe),it(nu,nd.ArrowClosed,Poe),nu);function Moe(e){var t=C.useMemo(function(){var r=S5.hasOwnProperty(e);return r?S5[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 E5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function koe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?E5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Aoe=function(t){var r=t.id,n=t.type,i=t.color,o=t.width,a=o===void 0?12.5:o,s=t.height,c=s===void 0?12.5:s,d=t.markerUnits,u=d===void 0?"strokeWidth":d,h=t.strokeWidth,p=t.orient,v=p===void 0?"auto":p,y=Moe(n);return C.createElement("marker",{className:"react-flow__arrowhead",id:r,markerWidth:"".concat(a),markerHeight:"".concat(c),viewBox:"-10 -10 20 20",markerUnits:u,orient:v,refX:"0",refY:"0"},C.createElement(y,{color:i,strokeWidth:h}))},Doe=function(t){var r=t.defaultColor,n=t.rfId;return function(i){var o=[];return i.edges.reduce(function(a,s){return[s.markerStart,s.markerEnd].forEach(function(c){if(c&&Xw(c)==="object"){var d=Hw(c,n);o.includes(d)||(a.push(koe({id:d,color:c.color||r},c)),o.push(d))}}),a},[]).sort(function(a,s){return a.id.localeCompare(s.id)})}},Zq=function(t){var r=t.defaultColor,n=t.rfId,i=Vt(C.useCallback(Doe({defaultColor:r,rfId:n}),[r,n]),function(o,a){return!(o.length!==a.length||o.some(function(s,c){return s.id!==a[c].id}))});return C.createElement("defs",null,i.map(function(o){return C.createElement(Aoe,{id:o.id,key:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient})}))};Zq.displayName="MarkerDefinitions";var joe=C.memo(Zq),qoe=[{level:0,isMaxLevel:!0,edges:[]}];function zoe(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=-1,i=e.reduce(function(a,s){var c=Sq(s.zIndex),d=c?s.zIndex:0;if(r){var u,h,p,v;d=c?s.zIndex:Math.max(((u=t.get(s.source))===null||u===void 0||(h=u[ur])===null||h===void 0?void 0:h.z)||0,((p=t.get(s.target))===null||p===void 0||(v=p[ur])===null||v===void 0?void 0:v.z)||0)}return a[d]?a[d].push(s):a[d]=[s],n=d>n?d:n,a},{}),o=Object.entries(i).map(function(a){var s=Xe(a,2),c=s[0],d=s[1],u=+c;return{edges:d,level:u,isMaxLevel:u===n}});return o.length===0?qoe:o}function Loe(e,t,r){var n=Vt(C.useCallback(function(i){return e?i.edges.filter(function(o){var a=t.get(o.source),s=t.get(o.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)&&aoe({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:i.width,height:i.height,transform:i.transform})}):i.edges},[e,t]));return zoe(n,t,r)}var Boe=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}},Jq=function(t){var r=Vt(Boe,Wr),n=r.connectionNodeId,i=r.connectionHandleType,o=r.nodesConnectable,a=r.elementsSelectable,s=r.width,c=r.height,d=r.connectionMode,u=r.nodeInternals,h=Loe(t.onlyRenderVisibleElements,u,t.elevateEdgesOnSelect);if(!s)return null;var p=t.connectionLineType,v=t.defaultMarkerColor,y=t.connectionLineStyle,m=t.connectionLineComponent,g=t.connectionLineContainerStyle,w=n&&i;return C.createElement(C.Fragment,null,h.map(function(x){var _=x.level,S=x.edges,E=x.isMaxLevel;return C.createElement("svg",{key:_,style:{zIndex:_},width:s,height:c,className:"react-flow__edges react-flow__container"},E&&C.createElement(joe,{defaultColor:v,rfId:t.rfId}),C.createElement("g",null,S.map(function(I){var N=l5(u,I.source),T=Xe(N,3),M=T[0],z=T[1],j=T[2],W=l5(u,I.target),U=Xe(W,3),A=U[0],K=U[1],V=U[2];if(!j||!V)return null;var te=I.type||"default";t.edgeTypes[te]||(console.warn('[React Flow]: Edge type "'.concat(te,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),te="default");var G=t.edgeTypes[te]||t.edgeTypes.default,re=d===Da.Strict?K.target:K.target||K.source,P=s5(z.source,I.sourceHandle||null),B=s5(re,I.targetHandle||null),X=(P==null?void 0:P.position)||Oe.Bottom,Q=(B==null?void 0:B.position)||Oe.Top;if(!P)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Couldn't create edge for source handle id: ".concat(I.sourceHandle,"; edge id: ").concat(I.id,". Help: https://reactflow.dev/error#800")),null;if(!B)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Couldn't create edge for target handle id: ".concat(I.targetHandle,"; edge id: ").concat(I.id,". Help: https://reactflow.dev/error#800")),null;var D=ooe(M,P,X,A,B,Q),$=D.sourceX,H=D.sourceY,q=D.targetX,Y=D.targetY;return C.createElement(G,{key:I.id,id:I.id,className:cn([I.className,t.noPanClassName]),type:te,data:I.data,selected:!!I.selected,animated:!!I.animated,hidden:!!I.hidden,label:I.label,labelStyle:I.labelStyle,labelShowBg:I.labelShowBg,labelBgStyle:I.labelBgStyle,labelBgPadding:I.labelBgPadding,labelBgBorderRadius:I.labelBgBorderRadius,style:I.style,source:I.source,target:I.target,sourceHandleId:I.sourceHandle,targetHandleId:I.targetHandle,markerEnd:I.markerEnd,markerStart:I.markerStart,sourceX:$,sourceY:H,targetX:q,targetY:Y,sourcePosition:X,targetPosition:Q,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})})))}),w&&C.createElement("svg",{style:g,width:s,height:c,className:"react-flow__edges react-flow__connectionline react-flow__container"},C.createElement(Noe,{connectionNodeId:n,connectionHandleType:i,connectionLineStyle:y,connectionLineType:p,isConnectable:o,CustomConnectionLineComponent:m})))};Jq.displayName="EdgeRenderer";var Foe=C.memo(Jq),$oe=function(t){return"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")")};function Voe(e){var t=e.children,r=Vt($oe);return C.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:r}},t)}function Hoe(e){var t=kq(),r=C.useRef(!1);C.useEffect(function(){!r.current&&t.viewportInitialized&&e&&(setTimeout(function(){return e(t)},1),r.current=!0)},[e,t.viewportInitialized])}var Qq=function(t){var r=t.nodeTypes,n=t.edgeTypes,i=t.onMove,o=t.onMoveStart,a=t.onMoveEnd,s=t.onInit,c=t.onNodeClick,d=t.onEdgeClick,u=t.onNodeDoubleClick,h=t.onEdgeDoubleClick,p=t.onNodeMouseEnter,v=t.onNodeMouseMove,y=t.onNodeMouseLeave,m=t.onNodeContextMenu,g=t.onSelectionContextMenu,w=t.connectionLineType,x=t.connectionLineStyle,_=t.connectionLineComponent,S=t.connectionLineContainerStyle,E=t.selectionKeyCode,I=t.multiSelectionKeyCode,N=t.zoomActivationKeyCode,T=t.deleteKeyCode,M=t.onlyRenderVisibleElements,z=t.elementsSelectable,j=t.selectNodesOnDrag,W=t.translateExtent,U=t.minZoom,A=t.maxZoom,K=t.defaultZoom,V=t.defaultPosition,te=t.preventScrolling,G=t.defaultMarkerColor,re=t.zoomOnScroll,P=t.zoomOnPinch,B=t.panOnScroll,X=t.panOnScrollSpeed,Q=t.panOnScrollMode,D=t.zoomOnDoubleClick,$=t.panOnDrag,H=t.onPaneClick,q=t.onPaneScroll,Y=t.onPaneContextMenu,ie=t.onEdgeUpdate,ne=t.onEdgeContextMenu,ve=t.onEdgeMouseEnter,Z=t.onEdgeMouseMove,J=t.onEdgeMouseLeave,ae=t.edgeUpdaterRadius,he=t.onEdgeUpdateStart,ue=t.onEdgeUpdateEnd,de=t.noDragClassName,le=t.noWheelClassName,xe=t.noPanClassName,Ee=t.elevateEdgesOnSelect,Ie=t.id;return Hoe(s),C.createElement(_oe,{onPaneClick:H,onPaneContextMenu:Y,onPaneScroll:q,deleteKeyCode:T,selectionKeyCode:E,multiSelectionKeyCode:I,zoomActivationKeyCode:N,elementsSelectable:z,onMove:i,onMoveStart:o,onMoveEnd:a,zoomOnScroll:re,zoomOnPinch:P,zoomOnDoubleClick:D,panOnScroll:B,panOnScrollSpeed:X,panOnScrollMode:Q,panOnDrag:$,translateExtent:W,minZoom:U,maxZoom:A,defaultZoom:K,defaultPosition:V,onSelectionContextMenu:g,preventScrolling:te,noDragClassName:de,noWheelClassName:le,noPanClassName:xe},C.createElement(Voe,null,C.createElement(Foe,{edgeTypes:n,onEdgeClick:d,onEdgeDoubleClick:h,connectionLineType:w,connectionLineStyle:x,connectionLineComponent:_,connectionLineContainerStyle:S,onEdgeUpdate:ie,onlyRenderVisibleElements:M,onEdgeContextMenu:ne,onEdgeMouseEnter:ve,onEdgeMouseMove:Z,onEdgeMouseLeave:J,onEdgeUpdateStart:he,onEdgeUpdateEnd:ue,edgeUpdaterRadius:ae,defaultMarkerColor:G,noPanClassName:xe,elevateEdgesOnSelect:!!Ee,rfId:Ie}),C.createElement(Ioe,{nodeTypes:r,onNodeClick:c,onNodeDoubleClick:u,onNodeMouseEnter:p,onNodeMouseMove:v,onNodeMouseLeave:y,onNodeContextMenu:m,selectNodesOnDrag:j,onlyRenderVisibleElements:M,noPanClassName:xe,noDragClassName:de})))};Qq.displayName="GraphView";var Woe=C.memo(Qq),ez=function(){return null};ez.displayName="GroupNode";function _5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function O5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Rs=(function(e){var t=function(n){var i=n.id,o=n.type,a=n.data,s=n.xPos,c=n.yPos,d=n.selected,u=n.onClick,h=n.onMouseEnter,p=n.onMouseMove,v=n.onMouseLeave,y=n.onContextMenu,m=n.onDoubleClick,g=n.style,w=n.className,x=n.isDraggable,_=n.isSelectable,S=n.isConnectable,E=n.selectNodesOnDrag,I=n.sourcePosition,N=n.targetPosition,T=n.hidden,M=n.resizeObserver,z=n.dragHandle,j=n.zIndex,W=n.isParent,U=n.noPanClassName,A=n.noDragClassName,K=n.initialized,V=Nr(),te=C.useRef(null),G=C.useRef(I),re=C.useRef(N),P=C.useRef(o),B=_||x||u||h||p||v,X=Cs(i,V.getState,h),Q=Cs(i,V.getState,p),D=Cs(i,V.getState,v),$=Cs(i,V.getState,y),H=Cs(i,V.getState,m),q=function(ne){if(_&&(!E||!x)&&Cq({id:i,store:V}),u){var ve=V.getState().nodeInternals.get(i);u(ne,O5({},ve))}};C.useEffect(function(){if(te.current&&!T){var ie=te.current;return M==null||M.observe(ie),function(){return M==null?void 0:M.unobserve(ie)}}},[T]),C.useEffect(function(){var ie=P.current!==o,ne=G.current!==I,ve=re.current!==N;te.current&&(ie||ne||ve)&&(ie&&(P.current=o),ne&&(G.current=I),ve&&(re.current=N),V.getState().updateNodeDimensions([{id:i,nodeElement:te.current,forceUpdate:!0}]))},[i,o,I,N]);var Y=Kq({nodeRef:te,disabled:T||!x,noDragClassName:A,handleSelector:z,nodeId:i,isSelectable:_,selectNodesOnDrag:E});return T?null:C.createElement("div",{className:cn(["react-flow__node","react-flow__node-".concat(o),U,w,{selected:d,selectable:_,parent:W}]),ref:te,style:O5({zIndex:j,transform:"translate(".concat(s,"px,").concat(c,"px)"),pointerEvents:B?"all":"none",visibility:K?"visible":"hidden"},g),onMouseEnter:X,onMouseMove:Q,onMouseLeave:D,onContextMenu:$,onClick:q,onDoubleClick:H,"data-testid":"rf__node-".concat(i),"data-id":i},C.createElement($ie,{value:i},C.createElement(e,{id:i,data:a,type:o,xPos:s,yPos:c,selected:d,isConnectable:S,sourcePosition:I,targetPosition:N,dragging:Y,dragHandle:z,zIndex:j})))};return t.displayName="NodeWrapper",C.memo(t)});function C5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function I5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?C5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Uoe(e){var t={input:Rs(e.input||Hq),default:Rs(e.default||Yw),output:Rs(e.output||Uq),group:Rs(e.group||ez)},r={},n=Object.keys(e).filter(function(i){return!["input","default","output","group"].includes(i)}).reduce(function(i,o){return i[o]=Rs(e[o]||Yw),i},r);return I5(I5({},t),n)}function R5(e,t){var r=C.useRef(null),n=C.useMemo(function(){if(process.env.NODE_ENV==="development"){var i=Object.keys(e);Wr(r.current,i)&&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=i}return t(e)},[e]);return n}function N5(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 tz=function(t){var r=t.children,n=!0;try{Nr()}catch{n=!1}return n?C.createElement(C.Fragment,null,r):C.createElement(uie,{createStore:die},r)};tz.displayName="ReactFlowWrapper";var Goe=["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 T5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function P5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}N5(Qie),N5(toe);var Koe={input:Hq,default:Yw,output:Uq},Yoe={default:Gw,straight:Lq,step:zq,smoothstep:HS,simplebezier:jq},Xoe=[15,15],Zoe=[0,0],rz=C.forwardRef(function(e,t){var r=e.nodes,n=e.edges,i=e.defaultNodes,o=e.defaultEdges,a=e.className,s=e.nodeTypes,c=s===void 0?Koe:s,d=e.edgeTypes,u=d===void 0?Yoe:d,h=e.onNodeClick,p=e.onEdgeClick,v=e.onInit,y=e.onMove,m=e.onMoveStart,g=e.onMoveEnd,w=e.onConnect,x=e.onConnectStart,_=e.onConnectStop,S=e.onConnectEnd,E=e.onClickConnectStart,I=e.onClickConnectStop,N=e.onClickConnectEnd,T=e.onNodeMouseEnter,M=e.onNodeMouseMove,z=e.onNodeMouseLeave,j=e.onNodeContextMenu,W=e.onNodeDoubleClick,U=e.onNodeDragStart,A=e.onNodeDrag,K=e.onNodeDragStop,V=e.onNodesDelete,te=e.onEdgesDelete,G=e.onSelectionChange,re=e.onSelectionDragStart,P=e.onSelectionDrag,B=e.onSelectionDragStop,X=e.onSelectionContextMenu,Q=e.connectionMode,D=Q===void 0?Da.Strict:Q,$=e.connectionLineType,H=$===void 0?Yi.Bezier:$,q=e.connectionLineStyle,Y=e.connectionLineComponent,ie=e.connectionLineContainerStyle,ne=e.deleteKeyCode,ve=ne===void 0?"Backspace":ne,Z=e.selectionKeyCode,J=Z===void 0?"Shift":Z,ae=e.multiSelectionKeyCode,he=ae===void 0?"Meta":ae,ue=e.zoomActivationKeyCode,de=ue===void 0?"Meta":ue,le=e.snapToGrid,xe=le===void 0?!1:le,Ee=e.snapGrid,Ie=Ee===void 0?Xoe:Ee,Te=e.onlyRenderVisibleElements,Me=Te===void 0?!1:Te,Ze=e.selectNodesOnDrag,tt=Ze===void 0?!0:Ze,Fe=e.nodesDraggable,Le=e.nodesConnectable,ze=e.elementsSelectable,Je=e.minZoom,rt=Je===void 0?.5:Je,Pt=e.maxZoom,gt=Pt===void 0?2:Pt,Rt=e.defaultZoom,qt=Rt===void 0?1:Rt,Ot=e.defaultPosition,Gr=Ot===void 0?Zoe:Ot,Kr=e.translateExtent,ar=Kr===void 0?Ww:Kr,Nn=e.preventScrolling,io=Nn===void 0?!0:Nn,zt=e.nodeExtent,Mt=e.defaultMarkerColor,Lt=Mt===void 0?"#b1b1b7":Mt,fr=e.zoomOnScroll,kt=fr===void 0?!0:fr,At=e.zoomOnPinch,hr=At===void 0?!0:At,Mr=e.panOnScroll,Et=Mr===void 0?!1:Mr,Bt=e.panOnScrollSpeed,pr=Bt===void 0?.5:Bt,vr=e.panOnScrollMode,yr=vr===void 0?_a.Free:vr,sr=e.zoomOnDoubleClick,Tn=sr===void 0?!0:sr,Un=e.panOnDrag,Za=Un===void 0?!0:Un,Gn=e.onPaneClick,Ja=e.onPaneScroll,Kn=e.onPaneContextMenu,Ri=e.children,Bo=e.onEdgeUpdate,Fo=e.onEdgeContextMenu,ke=e.onEdgeDoubleClick,$e=e.onEdgeMouseEnter,xr=e.onEdgeMouseMove,Ht=e.onEdgeMouseLeave,wr=e.onEdgeUpdateStart,Sr=e.onEdgeUpdateEnd,tr=e.edgeUpdaterRadius,un=tr===void 0?10:tr,Yr=e.onNodesChange,ci=e.onEdgesChange,Ni=e.noDragClassName,Qa=Ni===void 0?"nodrag":Ni,es=e.noWheelClassName,$l=es===void 0?"nowheel":es,ts=e.noPanClassName,pf=ts===void 0?"nopan":ts,Vl=e.fitView,vf=Vl===void 0?!1:Vl,gf=e.fitViewOptions,rs=e.connectOnClick,Hl=rs===void 0?!0:rs,Wl=e.attributionPosition,ns=e.proOptions,mf=e.defaultEdgeOptions,is=e.elevateEdgesOnSelect,$o=is===void 0?!1:is,oo=Kd(e,Goe),bf=R5(c,Uoe),Ul=R5(u,ioe);return C.createElement("div",P5(P5({},oo),{},{ref:t,className:cn(["react-flow",a])}),C.createElement(tz,null,C.createElement(Woe,{onInit:v,onMove:y,onMoveStart:m,onMoveEnd:g,onNodeClick:h,onEdgeClick:p,onNodeMouseEnter:T,onNodeMouseMove:M,onNodeMouseLeave:z,onNodeContextMenu:j,onNodeDoubleClick:W,nodeTypes:bf,edgeTypes:Ul,connectionLineType:H,connectionLineStyle:q,connectionLineComponent:Y,connectionLineContainerStyle:ie,selectionKeyCode:J,deleteKeyCode:ve,multiSelectionKeyCode:he,zoomActivationKeyCode:de,onlyRenderVisibleElements:Me,selectNodesOnDrag:tt,translateExtent:ar,minZoom:rt,maxZoom:gt,defaultZoom:qt,defaultPosition:Gr,preventScrolling:io,zoomOnScroll:kt,zoomOnPinch:hr,zoomOnDoubleClick:Tn,panOnScroll:Et,panOnScrollSpeed:pr,panOnScrollMode:yr,panOnDrag:Za,onPaneClick:Gn,onPaneScroll:Ja,onPaneContextMenu:Kn,onSelectionContextMenu:X,onEdgeUpdate:Bo,onEdgeContextMenu:Fo,onEdgeDoubleClick:ke,onEdgeMouseEnter:$e,onEdgeMouseMove:xr,onEdgeMouseLeave:Ht,onEdgeUpdateStart:wr,onEdgeUpdateEnd:Sr,edgeUpdaterRadius:un,defaultMarkerColor:Lt,noDragClassName:Qa,noWheelClassName:$l,noPanClassName:pf,elevateEdgesOnSelect:$o,id:oo==null?void 0:oo.id}),C.createElement(Zie,{nodes:r,edges:n,defaultNodes:i,defaultEdges:o,onConnect:w,onConnectStart:x,onConnectStop:_,onConnectEnd:S,onClickConnectStart:E,onClickConnectStop:I,onClickConnectEnd:N,nodesDraggable:Fe,nodesConnectable:Le,elementsSelectable:ze,minZoom:rt,maxZoom:gt,nodeExtent:zt,onNodesChange:Yr,onEdgesChange:ci,snapToGrid:xe,snapGrid:Ie,connectionMode:D,translateExtent:ar,connectOnClick:Hl,defaultEdgeOptions:mf,fitView:vf,fitViewOptions:gf,onNodesDelete:V,onEdgesDelete:te,onNodeDragStart:U,onNodeDrag:A,onNodeDragStop:K,onSelectionDrag:P,onSelectionDragStart:re,onSelectionDragStop:B}),G&&C.createElement(Yie,{onSelectionChange:G}),Ri,C.createElement(Aie,{proOptions:ns,position:Wl})))});rz.displayName="ReactFlow";function nz(e){return function(t){var r=C.useState(t),n=Xe(r,2),i=n[0],o=n[1],a=C.useCallback(function(s){return o(function(c){return e(s,c)})},[]);return[i,o,a]}}var Joe=nz(_q),Qoe=nz(nie);function M5(e,t){const{width:r,height:n,positionAbsolute:i}=e,o=t.positionAbsolute,a=r/2,s=n/2,c=i.x+a,d=i.y+s,u=o.x+a,h=o.y+s,p=(u-c)/(2*a)-(h-d)/(2*s),v=(u-c)/(2*a)+(h-d)/(2*s),y=1/(Math.abs(p)+Math.abs(v)),m=y*p,g=y*v,w=a*(m+g)+c,x=s*(-m+g)+d;return{x:w,y:x}}function k5(e,t){const r={...e.positionAbsolute,...e},n=Math.round(r.x),i=Math.round(r.y),o=Math.round(t.x),a=Math.round(t.y);return o<=n+1?Oe.Left:o>=n+r.width-1?Oe.Right:a<=i+1?Oe.Top:a>=r.y+r.height-1?Oe.Bottom:Oe.Top}function iz(e,t){const r=M5(e,t),n=M5(t,e),i=k5(e,r),o=k5(t,n);return{sx:r.x,sy:r.y,tx:n.x,ty:n.y,sourcePos:i,targetPos:o}}const eae=({targetX:e,targetY:t,sourcePosition:r,targetPosition:n,sourceNode:i})=>{if(!i)return null;const o={id:"connection-target",width:1,height:1,position:{x:e,y:t}},{sx:a,sy:s}=iz(i,o),c=Xd({sourceX:a,sourceY:s,sourcePosition:r,targetPosition:n,targetX:e,targetY:t});return O.jsxs("g",{children:[O.jsx("path",{fill:"none",stroke:"#222",strokeWidth:1.5,className:"animated",d:c}),O.jsx("circle",{cx:e,cy:t,fill:"#fff",r:3,stroke:"#222",strokeWidth:1.5})]})},tae=({id:e,source:t,target:r,markerEnd:n,style:i})=>{const o=Vt(C.useCallback(y=>y.nodeInternals.get(t),[t])),a=Vt(C.useCallback(y=>y.nodeInternals.get(r),[r]));if(!o||!a)return null;const{sx:s,sy:c,tx:d,ty:u,sourcePos:h,targetPos:p}=iz(o,a),v=Xd({sourceX:s,sourceY:c,sourcePosition:h,targetPosition:p,targetX:d,targetY:u});return O.jsx("path",{id:e,className:"react-flow__edge-path",d:v,markerEnd:n,style:i})},A5=172,D5=36,rae={custom:tae},nae=(e,t,r="LR")=>{const n=new yP.graphlib.Graph;n.setDefaultEdgeLabel(()=>({}));const i=r==="LR";return n.setGraph({rankdir:r}),e.forEach(o=>{n.setNode(o.id,{width:A5,height:D5})}),t.forEach(o=>{n.setEdge(o.source,o.target)}),yP.layout(n),e.forEach(o=>{const a=n.node(o.id);return o.targetPosition=i?Oe.Left:Oe.Top,o.sourcePosition=i?Oe.Right:Oe.Bottom,o.position={x:a.x-A5/2,y:a.y-D5/2},o}),{nodes:e,edges:t}},iae=()=>{},oae=({data:e,dict:t,onSelect:r=iae})=>{const{nodes:n,edges:i}=nae(Object.values(t).filter(h=>h.id===e.selected||e.parents.flat().includes(h.id)||e.children.flat().includes(h.id)).map(h=>({id:h.id,type:h.parents.length===0?"input":h.includes.length===0?"output":"default",sourcePosition:Oe.Right,targetPosition:Oe.Left,data:{label:h.privilege},position:{x:0,y:0},className:h.id===e.selected?"highlighted":"",selected:h.id===e.selected})),e.links.map(({source:h,target:p})=>({id:`e${h}-${p}`,source:h,target:p}))),[o,a,s]=Joe(n),[c,d,u]=Qoe(i);return C.useEffect(()=>{a([...n]),d([...i])},[e]),O.jsx(rz,{nodes:o,edges:c,fitView:!0,onNodesChange:s,onEdgesChange:u,onNodeClick:(h,p)=>{r(p.id)},defaultZoom:.5,edgeTypes:rae,connectionLineComponent:eae,children:O.jsx(Mie,{variant:Mo.Dots,color:"#81818140",gap:18,size:1})})};var oz=(e=>(e.method="methods",e.entityCollection="entityselMethod",e.dataClass="dataclassMethod",e.dataStore="dsMethod",e.entity="entityMethod",e.attribute="attributes",e.singletonMethod="singletonMethod",e))(oz||{});const az=e=>{switch(e){case"entityCollection":return pe.ESubPermissionType.ENTITY_SEL_METHOD;case"dataClass":return pe.ESubPermissionType.DATACLASS_METHOD;case"dataStore":return pe.ESubPermissionType.DS_METHOD;case"entity":return pe.ESubPermissionType.ENTITY_METHOD;default:return pe.EPermissionType.METHOD}},j5=(e=[],t,r)=>{var i;const n=[];for(const o of e)(i=o[oz[r]])==null||i.forEach(a=>{if(`${o.name.toLowerCase()}.${a.name.toLowerCase()}`.includes(t)||!t){const c={applyTo:`${o.name}.${a.name}`,type:r};r===pe.EPermissionType.METHOD&&(c.subType=az(a.applyTo)),n.push(c)}});return n},aae=(e=[],t)=>{var n;const r=[];for(const i of e)(n=i.methods)==null||n.forEach(o=>{(`${i.name.toLowerCase()}.${o.name.toLowerCase()}`.includes(t)||!t)&&r.push({applyTo:`${i.name}.${o.name}`,type:pe.EPermissionType.SINGLETON_METHOD})});return r};function US(e,t=[],r=[],n=[]){const i=j5(r,e,pe.EPermissionType.ATTRIBUTE),o=j5(r,e,pe.EPermissionType.METHOD),a=aae(n,e),s=t.filter(h=>!e||`ds.${h.name.toLowerCase()}`.includes(e)).map(h=>({applyTo:`ds.${h.name}`,type:pe.ESubPermissionType.DS_METHOD})),c=[],d=[];return r.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{c.push({applyTo:h.name,type:pe.EPermissionType.DATACLASS})}),n.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{d.push({applyTo:h.name,type:pe.EPermissionType.SINGLETON})}),[...[{applyTo:"ds",type:pe.EPermissionType.DATASTORE}].filter(h=>!e||`ds.${h.applyTo.toLowerCase()}`.includes(e)),...s,...c,...i,...o,...d,...a].reduce((h,p)=>{const v=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],[y,m]=p.applyTo.split("."),g=h.find(w=>w.prefix===y);return g?(g.resources=[...g.resources,p].sort((w,x)=>{const _=v.indexOf(w.type),S=v.indexOf(x.type);return _>S?1:-1}),g.type=m?g.type:p.type,[...h].sort((w,x)=>{const _=v.indexOf(w.type),S=v.indexOf(x.type);return _>S?1:-1})):[...h,{prefix:y,type:m?null:p.type,resources:[p]}]},[]).reduce((h,p)=>[...h,...p.resources],[])}const sae=(e=[],t=[],r=[])=>{const n=US("",e,t,r),i={ds:{applyTo:"ds",type:pe.EPermissionType.DATASTORE,methods:[],dataClasses:[],singletons:[]}},o=(s,c)=>s.applyTo.localeCompare(c.applyTo);n.forEach(s=>{const[c,d]=s.applyTo.split(".");if(d||(s.type===pe.EPermissionType.DATACLASS?i.ds.dataClasses.push({applyTo:c,type:pe.EPermissionType.DATACLASS,methods:[],attributes:[]}):s.type===pe.EPermissionType.SINGLETON&&i.ds.singletons.push({applyTo:c,type:pe.EPermissionType.SINGLETON,methods:[],attributes:[]})),d){const u=(h,p,v)=>{h.forEach(y=>{y.applyTo===c&&y[p].push(v)})};[pe.ESubPermissionType.DS_METHOD,pe.ESubPermissionType.DATACLASS_METHOD,pe.ESubPermissionType.ENTITY_METHOD,pe.ESubPermissionType.ENTITY_SEL_METHOD].includes(s.type)?c==="ds"?i.ds.methods.push(s):u(i.ds.dataClasses,"methods",s):s.type===pe.EPermissionType.ATTRIBUTE?(u(i.ds.dataClasses,"attributes",s),u(i.ds.singletons,"attributes",s)):s.type===pe.EPermissionType.SINGLETON_METHOD&&u(i.ds.singletons,"methods",s)}});const a=s=>{s.forEach(c=>{c.methods&&c.methods.sort(o),c.attributes&&c.attributes.sort(o)})};return i.ds.methods.sort(o),i.ds.dataClasses.sort(o),i.ds.singletons.sort(o),a(i.ds.dataClasses),a(i.ds.singletons),i},sz=(e,t=[])=>{const r={};return Object.entries(e).forEach(([n,i])=>{r[n]={...i,resources:i.resources.map(o=>{var a,s,c;if(o.type===pe.EPermissionType.METHOD&&t.length){const[d,u]=o.resource.split("."),h=d==="ds"?"dataStore":((c=(s=(a=t.find(p=>p.name===d))==null?void 0:a.methods)==null?void 0:s.find(p=>p.name===u))==null?void 0:c.applyTo)||"dataClass";return{...o,type:o.type,subType:az(h)}}return o})}}),r},lz=(e,t)=>Object.entries(e).map(([r,n])=>{const i=n.resources.map(o=>{var d,u,h,p,v,y,m,g;const[a,s]=o.resource.split(".");let c=!0;switch(o.type){case pe.EPermissionType.DATASTORE:c=!!t;break;case pe.EPermissionType.METHOD:a==="ds"?c=!!t.methods.find(w=>w.name===s&&w.applyTo==="dataStore"):c=!!((u=(d=t.dataClasses[a])==null?void 0:d.methods)!=null&&u.find(w=>w.name===s));break;case pe.ESubPermissionType.DS_METHOD:c=!!t.methods.find(w=>w.name===s&&w.applyTo==="dataStore");break;case pe.EPermissionType.DATACLASS:c=!!t.dataClasses[a];break;case pe.EPermissionType.ATTRIBUTE:c=!!((p=(h=t.dataClasses[a])==null?void 0:h.attributes)!=null&&p.find(w=>w.name===s));break;case pe.ESubPermissionType.ENTITY_SEL_METHOD:c=!!((v=t.dataClasses[a])!=null&&v.methods.find(w=>w.name===s&&w.applyTo==="entityCollection"));break;case pe.ESubPermissionType.DATACLASS_METHOD:c=!!((y=t.dataClasses[a])!=null&&y.methods.find(w=>w.name===s&&w.applyTo==="dataClass"));break;case pe.ESubPermissionType.ENTITY_METHOD:c=!!((m=t.dataClasses[a])!=null&&m.methods.find(w=>w.name===s&&w.applyTo==="entity"));break;case pe.EPermissionType.SINGLETON_METHOD:c=!!((g=t.singletons[a])!=null&&g.methods.find(w=>w.name===s));break;case pe.EPermissionType.SINGLETON:c=!!t.singletons[a];break;default:c=!0}return{...o,exists:c}});return{[r]:{...n,resources:i}}}).reduce((r,n)=>({...r,...n}),{});var P0={exports:{}};/*!
|
|
60
60
|
Copyright (c) 2018 Jed Watson.
|
|
61
61
|
Licensed under the MIT License (MIT), see
|
|
62
62
|
http://jedwatson.github.io/classnames
|
|
@@ -67,9 +67,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
67
67
|
* Released under MIT license <https://lodash.com/license>
|
|
68
68
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
69
69
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
70
|
-
*/var uae=Xs.exports,z5;function dae(){return z5||(z5=1,(function(e,t){(function(){var r,n="4.18.1",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",c="Invalid `imports` option passed into `_.template`",u="__lodash_hash_undefined__",d=500,h="__lodash_placeholder__",p=1,v=2,y=4,m=1,g=2,w=1,x=2,_=4,S=8,E=16,I=32,N=64,T=128,M=256,z=512,j=30,W="...",U=800,A=16,K=1,V=2,te=3,G=1/0,re=9007199254740991,P=17976931348623157e292,B=NaN,X=4294967295,Q=X-1,D=X>>>1,$=[["ary",T],["bind",w],["bindKey",x],["curry",S],["curryRight",E],["flip",z],["partial",I],["partialRight",N],["rearg",M]],H="[object Arguments]",q="[object Array]",Y="[object AsyncFunction]",ie="[object Boolean]",ne="[object Date]",ve="[object DOMException]",Z="[object Error]",J="[object Function]",ae="[object GeneratorFunction]",he="[object Map]",ue="[object Number]",de="[object Null]",le="[object Object]",xe="[object Promise]",Ee="[object Proxy]",Ie="[object RegExp]",Te="[object Set]",Me="[object String]",Ze="[object Symbol]",tt="[object Undefined]",Fe="[object WeakMap]",Le="[object WeakSet]",ze="[object ArrayBuffer]",Je="[object DataView]",rt="[object Float32Array]",Pt="[object Float64Array]",gt="[object Int8Array]",Rt="[object Int16Array]",qt="[object Int32Array]",Ot="[object Uint8Array]",Gr="[object Uint8ClampedArray]",Kr="[object Uint16Array]",ar="[object Uint32Array]",Nn=/\b__p \+= '';/g,io=/\b(__p \+=) '' \+/g,zt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Mt=/&(?:amp|lt|gt|quot|#39);/g,Lt=/[&<>"']/g,fr=RegExp(Mt.source),kt=RegExp(Lt.source),At=/<%-([\s\S]+?)%>/g,hr=/<%([\s\S]+?)%>/g,Mr=/<%=([\s\S]+?)%>/g,Et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bt=/^\w*$/,pr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vr=/[\\^$.*+?()[\]{}|]/g,yr=RegExp(vr.source),sr=/^\s+/,Tn=/\s/,Un=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Za=/\{\n\/\* \[wrapped with (.+)\] \*/,Gn=/,? & /,Ja=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Kn=/[()=,{}\[\]\/\s]/,Ri=/\\(\\)?/g,Bo=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Fo=/\w*$/,ke=/^[-+]0x[0-9a-f]+$/i,$e=/^0b[01]+$/i,xr=/^\[object .+?Constructor\]$/,Ht=/^0o[0-7]+$/i,wr=/^(?:0|[1-9]\d*)$/,Sr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tr=/($^)/,un=/['\n\r\u2028\u2029\\]/g,Yr="\\ud800-\\udfff",ci="\\u0300-\\u036f",Ni="\\ufe20-\\ufe2f",Qa="\\u20d0-\\u20ff",es=ci+Ni+Qa,$l="\\u2700-\\u27bf",ts="a-z\\xdf-\\xf6\\xf8-\\xff",pf="\\xac\\xb1\\xd7\\xf7",Vl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",vf="\\u2000-\\u206f",gf=" \\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",rs="A-Z\\xc0-\\xd6\\xd8-\\xde",Hl="\\ufe0e\\ufe0f",Wl=pf+Vl+vf+gf,ns="['’]",mf="["+Yr+"]",is="["+Wl+"]",$o="["+es+"]",oo="\\d+",bf="["+$l+"]",Ul="["+ts+"]",hE="[^"+Yr+Wl+oo+$l+ts+rs+"]",yf="\\ud83c[\\udffb-\\udfff]",yL="(?:"+$o+"|"+yf+")",pE="[^"+Yr+"]",xf="(?:\\ud83c[\\udde6-\\uddff]){2}",wf="[\\ud800-\\udbff][\\udc00-\\udfff]",Vo="["+rs+"]",vE="\\u200d",gE="(?:"+Ul+"|"+hE+")",xL="(?:"+Vo+"|"+hE+")",mE="(?:"+ns+"(?:d|ll|m|re|s|t|ve))?",bE="(?:"+ns+"(?:D|LL|M|RE|S|T|VE))?",yE=yL+"?",xE="["+Hl+"]?",wL="(?:"+vE+"(?:"+[pE,xf,wf].join("|")+")"+xE+yE+")*",SL="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",EL="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",wE=xE+yE+wL,_L="(?:"+[bf,xf,wf].join("|")+")"+wE,OL="(?:"+[pE+$o+"?",$o,xf,wf,mf].join("|")+")",CL=RegExp(ns,"g"),IL=RegExp($o,"g"),Sf=RegExp(yf+"(?="+yf+")|"+OL+wE,"g"),RL=RegExp([Vo+"?"+Ul+"+"+mE+"(?="+[is,Vo,"$"].join("|")+")",xL+"+"+bE+"(?="+[is,Vo+gE,"$"].join("|")+")",Vo+"?"+gE+"+"+mE,Vo+"+"+bE,EL,SL,oo,_L].join("|"),"g"),NL=RegExp("["+vE+Yr+es+Hl+"]"),TL=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,PL=["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"],ML=-1,_t={};_t[rt]=_t[Pt]=_t[gt]=_t[Rt]=_t[qt]=_t[Ot]=_t[Gr]=_t[Kr]=_t[ar]=!0,_t[H]=_t[q]=_t[ze]=_t[ie]=_t[Je]=_t[ne]=_t[Z]=_t[J]=_t[he]=_t[ue]=_t[le]=_t[Ie]=_t[Te]=_t[Me]=_t[Fe]=!1;var xt={};xt[H]=xt[q]=xt[ze]=xt[Je]=xt[ie]=xt[ne]=xt[rt]=xt[Pt]=xt[gt]=xt[Rt]=xt[qt]=xt[he]=xt[ue]=xt[le]=xt[Ie]=xt[Te]=xt[Me]=xt[Ze]=xt[Ot]=xt[Gr]=xt[Kr]=xt[ar]=!0,xt[Z]=xt[J]=xt[Fe]=!1;var kL={À:"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"},AL={"&":"&","<":"<",">":">",'"':""","'":"'"},DL={"&":"&","<":"<",">":">",""":'"',"'":"'"},jL={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},qL=parseFloat,zL=parseInt,SE=typeof jt=="object"&&jt&&jt.Object===Object&&jt,LL=typeof self=="object"&&self&&self.Object===Object&&self,lr=SE||LL||Function("return this")(),Ef=t&&!t.nodeType&&t,ao=Ef&&!0&&e&&!e.nodeType&&e,EE=ao&&ao.exports===Ef,_f=EE&&SE.process,dn=(function(){try{var se=ao&&ao.require&&ao.require("util").types;return se||_f&&_f.binding&&_f.binding("util")}catch{}})(),_E=dn&&dn.isArrayBuffer,OE=dn&&dn.isDate,CE=dn&&dn.isMap,IE=dn&&dn.isRegExp,RE=dn&&dn.isSet,NE=dn&&dn.isTypedArray;function Xr(se,ge,fe){switch(fe.length){case 0:return se.call(ge);case 1:return se.call(ge,fe[0]);case 2:return se.call(ge,fe[0],fe[1]);case 3:return se.call(ge,fe[0],fe[1],fe[2])}return se.apply(ge,fe)}function BL(se,ge,fe,Ce){for(var Be=-1,ot=se==null?0:se.length;++Be<ot;){var Kt=se[Be];ge(Ce,Kt,fe(Kt),se)}return Ce}function Zr(se,ge){for(var fe=-1,Ce=se==null?0:se.length;++fe<Ce&&ge(se[fe],fe,se)!==!1;);return se}function FL(se,ge){for(var fe=se==null?0:se.length;fe--&&ge(se[fe],fe,se)!==!1;);return se}function TE(se,ge){for(var fe=-1,Ce=se==null?0:se.length;++fe<Ce;)if(!ge(se[fe],fe,se))return!1;return!0}function Ti(se,ge){for(var fe=-1,Ce=se==null?0:se.length,Be=0,ot=[];++fe<Ce;){var Kt=se[fe];ge(Kt,fe,se)&&(ot[Be++]=Kt)}return ot}function Gl(se,ge){var fe=se==null?0:se.length;return!!fe&&Ho(se,ge,0)>-1}function Of(se,ge,fe){for(var Ce=-1,Be=se==null?0:se.length;++Ce<Be;)if(fe(ge,se[Ce]))return!0;return!1}function Ct(se,ge){for(var fe=-1,Ce=se==null?0:se.length,Be=Array(Ce);++fe<Ce;)Be[fe]=ge(se[fe],fe,se);return Be}function Pi(se,ge){for(var fe=-1,Ce=ge.length,Be=se.length;++fe<Ce;)se[Be+fe]=ge[fe];return se}function Cf(se,ge,fe,Ce){var Be=-1,ot=se==null?0:se.length;for(Ce&&ot&&(fe=se[++Be]);++Be<ot;)fe=ge(fe,se[Be],Be,se);return fe}function $L(se,ge,fe,Ce){var Be=se==null?0:se.length;for(Ce&&Be&&(fe=se[--Be]);Be--;)fe=ge(fe,se[Be],Be,se);return fe}function If(se,ge){for(var fe=-1,Ce=se==null?0:se.length;++fe<Ce;)if(ge(se[fe],fe,se))return!0;return!1}var VL=Rf("length");function HL(se){return se.split("")}function WL(se){return se.match(Ja)||[]}function PE(se,ge,fe){var Ce;return fe(se,function(Be,ot,Kt){if(ge(Be,ot,Kt))return Ce=ot,!1}),Ce}function Kl(se,ge,fe,Ce){for(var Be=se.length,ot=fe+(Ce?1:-1);Ce?ot--:++ot<Be;)if(ge(se[ot],ot,se))return ot;return-1}function Ho(se,ge,fe){return ge===ge?n7(se,ge,fe):Kl(se,ME,fe)}function UL(se,ge,fe,Ce){for(var Be=fe-1,ot=se.length;++Be<ot;)if(Ce(se[Be],ge))return Be;return-1}function ME(se){return se!==se}function kE(se,ge){var fe=se==null?0:se.length;return fe?Tf(se,ge)/fe:B}function Rf(se){return function(ge){return ge==null?r:ge[se]}}function Nf(se){return function(ge){return se==null?r:se[ge]}}function AE(se,ge,fe,Ce,Be){return Be(se,function(ot,Kt,mt){fe=Ce?(Ce=!1,ot):ge(fe,ot,Kt,mt)}),fe}function GL(se,ge){var fe=se.length;for(se.sort(ge);fe--;)se[fe]=se[fe].value;return se}function Tf(se,ge){for(var fe,Ce=-1,Be=se.length;++Ce<Be;){var ot=ge(se[Ce]);ot!==r&&(fe=fe===r?ot:fe+ot)}return fe}function Pf(se,ge){for(var fe=-1,Ce=Array(se);++fe<se;)Ce[fe]=ge(fe);return Ce}function KL(se,ge){return Ct(ge,function(fe){return[fe,se[fe]]})}function DE(se){return se&&se.slice(0,LE(se)+1).replace(sr,"")}function Jr(se){return function(ge){return se(ge)}}function Mf(se,ge){return Ct(ge,function(fe){return se[fe]})}function os(se,ge){return se.has(ge)}function jE(se,ge){for(var fe=-1,Ce=se.length;++fe<Ce&&Ho(ge,se[fe],0)>-1;);return fe}function qE(se,ge){for(var fe=se.length;fe--&&Ho(ge,se[fe],0)>-1;);return fe}function YL(se,ge){for(var fe=se.length,Ce=0;fe--;)se[fe]===ge&&++Ce;return Ce}var XL=Nf(kL),ZL=Nf(AL);function JL(se){return"\\"+jL[se]}function QL(se,ge){return se==null?r:se[ge]}function Wo(se){return NL.test(se)}function e7(se){return TL.test(se)}function t7(se){for(var ge,fe=[];!(ge=se.next()).done;)fe.push(ge.value);return fe}function kf(se){var ge=-1,fe=Array(se.size);return se.forEach(function(Ce,Be){fe[++ge]=[Be,Ce]}),fe}function zE(se,ge){return function(fe){return se(ge(fe))}}function Mi(se,ge){for(var fe=-1,Ce=se.length,Be=0,ot=[];++fe<Ce;){var Kt=se[fe];(Kt===ge||Kt===h)&&(se[fe]=h,ot[Be++]=fe)}return ot}function Yl(se){var ge=-1,fe=Array(se.size);return se.forEach(function(Ce){fe[++ge]=Ce}),fe}function r7(se){var ge=-1,fe=Array(se.size);return se.forEach(function(Ce){fe[++ge]=[Ce,Ce]}),fe}function n7(se,ge,fe){for(var Ce=fe-1,Be=se.length;++Ce<Be;)if(se[Ce]===ge)return Ce;return-1}function i7(se,ge,fe){for(var Ce=fe+1;Ce--;)if(se[Ce]===ge)return Ce;return Ce}function Uo(se){return Wo(se)?a7(se):VL(se)}function Pn(se){return Wo(se)?s7(se):HL(se)}function LE(se){for(var ge=se.length;ge--&&Tn.test(se.charAt(ge)););return ge}var o7=Nf(DL);function a7(se){for(var ge=Sf.lastIndex=0;Sf.test(se);)++ge;return ge}function s7(se){return se.match(Sf)||[]}function l7(se){return se.match(RL)||[]}var c7=(function se(ge){ge=ge==null?lr:Go.defaults(lr.Object(),ge,Go.pick(lr,PL));var fe=ge.Array,Ce=ge.Date,Be=ge.Error,ot=ge.Function,Kt=ge.Math,mt=ge.Object,Af=ge.RegExp,u7=ge.String,fn=ge.TypeError,Xl=fe.prototype,d7=ot.prototype,Ko=mt.prototype,Zl=ge["__core-js_shared__"],Jl=d7.toString,lt=Ko.hasOwnProperty,f7=0,BE=(function(){var l=/[^.]+$/.exec(Zl&&Zl.keys&&Zl.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),Ql=Ko.toString,h7=Jl.call(mt),p7=lr._,v7=Af("^"+Jl.call(lt).replace(vr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ec=EE?ge.Buffer:r,ki=ge.Symbol,tc=ge.Uint8Array,FE=ec?ec.allocUnsafe:r,rc=zE(mt.getPrototypeOf,mt),$E=mt.create,VE=Ko.propertyIsEnumerable,nc=Xl.splice,HE=ki?ki.isConcatSpreadable:r,as=ki?ki.iterator:r,so=ki?ki.toStringTag:r,ic=(function(){try{var l=ho(mt,"defineProperty");return l({},"",{}),l}catch{}})(),g7=ge.clearTimeout!==lr.clearTimeout&&ge.clearTimeout,m7=Ce&&Ce.now!==lr.Date.now&&Ce.now,b7=ge.setTimeout!==lr.setTimeout&&ge.setTimeout,oc=Kt.ceil,ac=Kt.floor,Df=mt.getOwnPropertySymbols,y7=ec?ec.isBuffer:r,WE=ge.isFinite,x7=Xl.join,w7=zE(mt.keys,mt),Yt=Kt.max,gr=Kt.min,S7=Ce.now,E7=ge.parseInt,UE=Kt.random,_7=Xl.reverse,jf=ho(ge,"DataView"),ss=ho(ge,"Map"),qf=ho(ge,"Promise"),Yo=ho(ge,"Set"),ls=ho(ge,"WeakMap"),cs=ho(mt,"create"),sc=ls&&new ls,Xo={},O7=po(jf),C7=po(ss),I7=po(qf),R7=po(Yo),N7=po(ls),lc=ki?ki.prototype:r,us=lc?lc.valueOf:r,GE=lc?lc.toString:r;function L(l){if(Dt(l)&&!Ve(l)&&!(l instanceof Qe)){if(l instanceof hn)return l;if(lt.call(l,"__wrapped__"))return K_(l)}return new hn(l)}var Zo=(function(){function l(){}return function(f){if(!Nt(f))return{};if($E)return $E(f);l.prototype=f;var b=new l;return l.prototype=r,b}})();function cc(){}function hn(l,f){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=r}L.templateSettings={escape:At,evaluate:hr,interpolate:Mr,variable:"",imports:{_:L}},L.prototype=cc.prototype,L.prototype.constructor=L,hn.prototype=Zo(cc.prototype),hn.prototype.constructor=hn;function Qe(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=X,this.__views__=[]}function T7(){var l=new Qe(this.__wrapped__);return l.__actions__=kr(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=kr(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=kr(this.__views__),l}function P7(){if(this.__filtered__){var l=new Qe(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function M7(){var l=this.__wrapped__.value(),f=this.__dir__,b=Ve(l),R=f<0,k=b?l.length:0,F=H8(0,k,this.__views__),ee=F.start,oe=F.end,ce=oe-ee,me=R?oe:ee-1,be=this.__iteratees__,we=be.length,_e=0,Pe=gr(ce,this.__takeCount__);if(!b||!R&&k==ce&&Pe==ce)return m_(l,this.__actions__);var qe=[];e:for(;ce--&&_e<Pe;){me+=f;for(var We=-1,Ae=l[me];++We<we;){var Ye=be[We],et=Ye.iteratee,tn=Ye.type,Or=et(Ae);if(tn==V)Ae=Or;else if(!Or){if(tn==K)continue e;break e}}qe[_e++]=Ae}return qe}Qe.prototype=Zo(cc.prototype),Qe.prototype.constructor=Qe;function lo(l){var f=-1,b=l==null?0:l.length;for(this.clear();++f<b;){var R=l[f];this.set(R[0],R[1])}}function k7(){this.__data__=cs?cs(null):{},this.size=0}function A7(l){var f=this.has(l)&&delete this.__data__[l];return this.size-=f?1:0,f}function D7(l){var f=this.__data__;if(cs){var b=f[l];return b===u?r:b}return lt.call(f,l)?f[l]:r}function j7(l){var f=this.__data__;return cs?f[l]!==r:lt.call(f,l)}function q7(l,f){var b=this.__data__;return this.size+=this.has(l)?0:1,b[l]=cs&&f===r?u:f,this}lo.prototype.clear=k7,lo.prototype.delete=A7,lo.prototype.get=D7,lo.prototype.has=j7,lo.prototype.set=q7;function ui(l){var f=-1,b=l==null?0:l.length;for(this.clear();++f<b;){var R=l[f];this.set(R[0],R[1])}}function z7(){this.__data__=[],this.size=0}function L7(l){var f=this.__data__,b=uc(f,l);if(b<0)return!1;var R=f.length-1;return b==R?f.pop():nc.call(f,b,1),--this.size,!0}function B7(l){var f=this.__data__,b=uc(f,l);return b<0?r:f[b][1]}function F7(l){return uc(this.__data__,l)>-1}function $7(l,f){var b=this.__data__,R=uc(b,l);return R<0?(++this.size,b.push([l,f])):b[R][1]=f,this}ui.prototype.clear=z7,ui.prototype.delete=L7,ui.prototype.get=B7,ui.prototype.has=F7,ui.prototype.set=$7;function di(l){var f=-1,b=l==null?0:l.length;for(this.clear();++f<b;){var R=l[f];this.set(R[0],R[1])}}function V7(){this.size=0,this.__data__={hash:new lo,map:new(ss||ui),string:new lo}}function H7(l){var f=Sc(this,l).delete(l);return this.size-=f?1:0,f}function W7(l){return Sc(this,l).get(l)}function U7(l){return Sc(this,l).has(l)}function G7(l,f){var b=Sc(this,l),R=b.size;return b.set(l,f),this.size+=b.size==R?0:1,this}di.prototype.clear=V7,di.prototype.delete=H7,di.prototype.get=W7,di.prototype.has=U7,di.prototype.set=G7;function co(l){var f=-1,b=l==null?0:l.length;for(this.__data__=new di;++f<b;)this.add(l[f])}function K7(l){return this.__data__.set(l,u),this}function Y7(l){return this.__data__.has(l)}co.prototype.add=co.prototype.push=K7,co.prototype.has=Y7;function Mn(l){var f=this.__data__=new ui(l);this.size=f.size}function X7(){this.__data__=new ui,this.size=0}function Z7(l){var f=this.__data__,b=f.delete(l);return this.size=f.size,b}function J7(l){return this.__data__.get(l)}function Q7(l){return this.__data__.has(l)}function e8(l,f){var b=this.__data__;if(b instanceof ui){var R=b.__data__;if(!ss||R.length<i-1)return R.push([l,f]),this.size=++b.size,this;b=this.__data__=new di(R)}return b.set(l,f),this.size=b.size,this}Mn.prototype.clear=X7,Mn.prototype.delete=Z7,Mn.prototype.get=J7,Mn.prototype.has=Q7,Mn.prototype.set=e8;function KE(l,f){var b=Ve(l),R=!b&&vo(l),k=!b&&!R&&zi(l),F=!b&&!R&&!k&&ta(l),ee=b||R||k||F,oe=ee?Pf(l.length,u7):[],ce=oe.length;for(var me in l)(f||lt.call(l,me))&&!(ee&&(me=="length"||k&&(me=="offset"||me=="parent")||F&&(me=="buffer"||me=="byteLength"||me=="byteOffset")||pi(me,ce)))&&oe.push(me);return oe}function YE(l){var f=l.length;return f?l[Kf(0,f-1)]:r}function t8(l,f){return Ec(kr(l),uo(f,0,l.length))}function r8(l){return Ec(kr(l))}function zf(l,f,b){(b!==r&&!An(l[f],b)||b===r&&!(f in l))&&Yn(l,f,b)}function ds(l,f,b){var R=l[f];(!(lt.call(l,f)&&An(R,b))||b===r&&!(f in l))&&Yn(l,f,b)}function uc(l,f){for(var b=l.length;b--;)if(An(l[b][0],f))return b;return-1}function n8(l,f,b,R){return Ai(l,function(k,F,ee){f(R,k,b(k),ee)}),R}function XE(l,f){return l&&Zn(f,rr(f),l)}function i8(l,f){return l&&Zn(f,Dr(f),l)}function Yn(l,f,b){f=="__proto__"&&ic?ic(l,f,{configurable:!0,enumerable:!0,value:b,writable:!0}):l[f]=b}function Lf(l,f){for(var b=-1,R=f.length,k=fe(R),F=l==null;++b<R;)k[b]=F?r:xh(l,f[b]);return k}function uo(l,f,b){return l===l&&(b!==r&&(l=l<=b?l:b),f!==r&&(l=l>=f?l:f)),l}function pn(l,f,b,R,k,F){var ee,oe=f&p,ce=f&v,me=f&y;if(b&&(ee=k?b(l,R,k,F):b(l)),ee!==r)return ee;if(!Nt(l))return l;var be=Ve(l);if(be){if(ee=U8(l),!oe)return kr(l,ee)}else{var we=mr(l),_e=we==J||we==ae;if(zi(l))return x_(l,oe);if(we==le||we==H||_e&&!k){if(ee=ce||_e?{}:L_(l),!oe)return ce?D8(l,i8(ee,l)):A8(l,XE(ee,l))}else{if(!xt[we])return k?l:{};ee=G8(l,we,oe)}}F||(F=new Mn);var Pe=F.get(l);if(Pe)return Pe;F.set(l,ee),pO(l)?l.forEach(function(Ae){ee.add(pn(Ae,f,b,Ae,l,F))}):fO(l)&&l.forEach(function(Ae,Ye){ee.set(Ye,pn(Ae,f,b,Ye,l,F))});var qe=me?ce?oh:ih:ce?Dr:rr,We=be?r:qe(l);return Zr(We||l,function(Ae,Ye){We&&(Ye=Ae,Ae=l[Ye]),ds(ee,Ye,pn(Ae,f,b,Ye,l,F))}),ee}function o8(l){var f=rr(l);return function(b){return ZE(b,l,f)}}function ZE(l,f,b){var R=b.length;if(l==null)return!R;for(l=mt(l);R--;){var k=b[R],F=f[k],ee=l[k];if(ee===r&&!(k in l)||!F(ee))return!1}return!0}function JE(l,f,b){if(typeof l!="function")throw new fn(a);return bs(function(){l.apply(r,b)},f)}function fs(l,f,b,R){var k=-1,F=Gl,ee=!0,oe=l.length,ce=[],me=f.length;if(!oe)return ce;b&&(f=Ct(f,Jr(b))),R?(F=Of,ee=!1):f.length>=i&&(F=os,ee=!1,f=new co(f));e:for(;++k<oe;){var be=l[k],we=b==null?be:b(be);if(be=R||be!==0?be:0,ee&&we===we){for(var _e=me;_e--;)if(f[_e]===we)continue e;ce.push(be)}else F(f,we,R)||ce.push(be)}return ce}var Ai=O_(Xn),QE=O_(Ff,!0);function a8(l,f){var b=!0;return Ai(l,function(R,k,F){return b=!!f(R,k,F),b}),b}function dc(l,f,b){for(var R=-1,k=l.length;++R<k;){var F=l[R],ee=f(F);if(ee!=null&&(oe===r?ee===ee&&!en(ee):b(ee,oe)))var oe=ee,ce=F}return ce}function s8(l,f,b,R){var k=l.length;for(b=He(b),b<0&&(b=-b>k?0:k+b),R=R===r||R>k?k:He(R),R<0&&(R+=k),R=b>R?0:gO(R);b<R;)l[b++]=f;return l}function e_(l,f){var b=[];return Ai(l,function(R,k,F){f(R,k,F)&&b.push(R)}),b}function cr(l,f,b,R,k){var F=-1,ee=l.length;for(b||(b=Y8),k||(k=[]);++F<ee;){var oe=l[F];f>0&&b(oe)?f>1?cr(oe,f-1,b,R,k):Pi(k,oe):R||(k[k.length]=oe)}return k}var Bf=C_(),t_=C_(!0);function Xn(l,f){return l&&Bf(l,f,rr)}function Ff(l,f){return l&&t_(l,f,rr)}function fc(l,f){return Ti(f,function(b){return vi(l[b])})}function fo(l,f){f=ji(f,l);for(var b=0,R=f.length;l!=null&&b<R;)l=l[kn(f[b++])];return b&&b==R?l:r}function r_(l,f,b){var R=f(l);return Ve(l)?R:Pi(R,b(l))}function Er(l){return l==null?l===r?tt:de:so&&so in mt(l)?V8(l):rB(l)}function $f(l,f){return l>f}function l8(l,f){return l!=null&<.call(l,f)}function c8(l,f){return l!=null&&f in mt(l)}function u8(l,f,b){return l>=gr(f,b)&&l<Yt(f,b)}function Vf(l,f,b){for(var R=b?Of:Gl,k=l[0].length,F=l.length,ee=F,oe=fe(F),ce=1/0,me=[];ee--;){var be=l[ee];ee&&f&&(be=Ct(be,Jr(f))),ce=gr(be.length,ce),oe[ee]=!b&&(f||k>=120&&be.length>=120)?new co(ee&&be):r}be=l[0];var we=-1,_e=oe[0];e:for(;++we<k&&me.length<ce;){var Pe=be[we],qe=f?f(Pe):Pe;if(Pe=b||Pe!==0?Pe:0,!(_e?os(_e,qe):R(me,qe,b))){for(ee=F;--ee;){var We=oe[ee];if(!(We?os(We,qe):R(l[ee],qe,b)))continue e}_e&&_e.push(qe),me.push(Pe)}}return me}function d8(l,f,b,R){return Xn(l,function(k,F,ee){f(R,b(k),F,ee)}),R}function hs(l,f,b){f=ji(f,l),l=V_(l,f);var R=l==null?l:l[kn(gn(f))];return R==null?r:Xr(R,l,b)}function n_(l){return Dt(l)&&Er(l)==H}function f8(l){return Dt(l)&&Er(l)==ze}function h8(l){return Dt(l)&&Er(l)==ne}function ps(l,f,b,R,k){return l===f?!0:l==null||f==null||!Dt(l)&&!Dt(f)?l!==l&&f!==f:p8(l,f,b,R,ps,k)}function p8(l,f,b,R,k,F){var ee=Ve(l),oe=Ve(f),ce=ee?q:mr(l),me=oe?q:mr(f);ce=ce==H?le:ce,me=me==H?le:me;var be=ce==le,we=me==le,_e=ce==me;if(_e&&zi(l)){if(!zi(f))return!1;ee=!0,be=!1}if(_e&&!be)return F||(F=new Mn),ee||ta(l)?j_(l,f,b,R,k,F):F8(l,f,ce,b,R,k,F);if(!(b&m)){var Pe=be&<.call(l,"__wrapped__"),qe=we&<.call(f,"__wrapped__");if(Pe||qe){var We=Pe?l.value():l,Ae=qe?f.value():f;return F||(F=new Mn),k(We,Ae,b,R,F)}}return _e?(F||(F=new Mn),$8(l,f,b,R,k,F)):!1}function v8(l){return Dt(l)&&mr(l)==he}function Hf(l,f,b,R){var k=b.length,F=k,ee=!R;if(l==null)return!F;for(l=mt(l);k--;){var oe=b[k];if(ee&&oe[2]?oe[1]!==l[oe[0]]:!(oe[0]in l))return!1}for(;++k<F;){oe=b[k];var ce=oe[0],me=l[ce],be=oe[1];if(ee&&oe[2]){if(me===r&&!(ce in l))return!1}else{var we=new Mn;if(R)var _e=R(me,be,ce,l,f,we);if(!(_e===r?ps(be,me,m|g,R,we):_e))return!1}}return!0}function i_(l){if(!Nt(l)||Z8(l))return!1;var f=vi(l)?v7:xr;return f.test(po(l))}function g8(l){return Dt(l)&&Er(l)==Ie}function m8(l){return Dt(l)&&mr(l)==Te}function b8(l){return Dt(l)&&Nc(l.length)&&!!_t[Er(l)]}function o_(l){return typeof l=="function"?l:l==null?jr:typeof l=="object"?Ve(l)?l_(l[0],l[1]):s_(l):RO(l)}function Wf(l){if(!ms(l))return w7(l);var f=[];for(var b in mt(l))lt.call(l,b)&&b!="constructor"&&f.push(b);return f}function y8(l){if(!Nt(l))return tB(l);var f=ms(l),b=[];for(var R in l)R=="constructor"&&(f||!lt.call(l,R))||b.push(R);return b}function Uf(l,f){return l<f}function a_(l,f){var b=-1,R=Ar(l)?fe(l.length):[];return Ai(l,function(k,F,ee){R[++b]=f(k,F,ee)}),R}function s_(l){var f=sh(l);return f.length==1&&f[0][2]?F_(f[0][0],f[0][1]):function(b){return b===l||Hf(b,l,f)}}function l_(l,f){return ch(l)&&B_(f)?F_(kn(l),f):function(b){var R=xh(b,l);return R===r&&R===f?wh(b,l):ps(f,R,m|g)}}function hc(l,f,b,R,k){l!==f&&Bf(f,function(F,ee){if(k||(k=new Mn),Nt(F))x8(l,f,ee,b,hc,R,k);else{var oe=R?R(dh(l,ee),F,ee+"",l,f,k):r;oe===r&&(oe=F),zf(l,ee,oe)}},Dr)}function x8(l,f,b,R,k,F,ee){var oe=dh(l,b),ce=dh(f,b),me=ee.get(ce);if(me){zf(l,b,me);return}var be=F?F(oe,ce,b+"",l,f,ee):r,we=be===r;if(we){var _e=Ve(ce),Pe=!_e&&zi(ce),qe=!_e&&!Pe&&ta(ce);be=ce,_e||Pe||qe?Ve(oe)?be=oe:Ft(oe)?be=kr(oe):Pe?(we=!1,be=x_(ce,!0)):qe?(we=!1,be=w_(ce,!0)):be=[]:ys(ce)||vo(ce)?(be=oe,vo(oe)?be=mO(oe):(!Nt(oe)||vi(oe))&&(be=L_(ce))):we=!1}we&&(ee.set(ce,be),k(be,ce,R,F,ee),ee.delete(ce)),zf(l,b,be)}function c_(l,f){var b=l.length;if(b)return f+=f<0?b:0,pi(f,b)?l[f]:r}function u_(l,f,b){f.length?f=Ct(f,function(F){return Ve(F)?function(ee){return fo(ee,F.length===1?F[0]:F)}:F}):f=[jr];var R=-1;f=Ct(f,Jr(De()));var k=a_(l,function(F,ee,oe){var ce=Ct(f,function(me){return me(F)});return{criteria:ce,index:++R,value:F}});return GL(k,function(F,ee){return k8(F,ee,b)})}function w8(l,f){return d_(l,f,function(b,R){return wh(l,R)})}function d_(l,f,b){for(var R=-1,k=f.length,F={};++R<k;){var ee=f[R],oe=fo(l,ee);b(oe,ee)&&vs(F,ji(ee,l),oe)}return F}function S8(l){return function(f){return fo(f,l)}}function Gf(l,f,b,R){var k=R?UL:Ho,F=-1,ee=f.length,oe=l;for(l===f&&(f=kr(f)),b&&(oe=Ct(l,Jr(b)));++F<ee;)for(var ce=0,me=f[F],be=b?b(me):me;(ce=k(oe,be,ce,R))>-1;)oe!==l&&nc.call(oe,ce,1),nc.call(l,ce,1);return l}function f_(l,f){for(var b=l?f.length:0,R=b-1;b--;){var k=f[b];if(b==R||k!==F){var F=k;pi(k)?nc.call(l,k,1):Zf(l,k)}}return l}function Kf(l,f){return l+ac(UE()*(f-l+1))}function E8(l,f,b,R){for(var k=-1,F=Yt(oc((f-l)/(b||1)),0),ee=fe(F);F--;)ee[R?F:++k]=l,l+=b;return ee}function Yf(l,f){var b="";if(!l||f<1||f>re)return b;do f%2&&(b+=l),f=ac(f/2),f&&(l+=l);while(f);return b}function Ue(l,f){return fh($_(l,f,jr),l+"")}function _8(l){return YE(ra(l))}function O8(l,f){var b=ra(l);return Ec(b,uo(f,0,b.length))}function vs(l,f,b,R){if(!Nt(l))return l;f=ji(f,l);for(var k=-1,F=f.length,ee=F-1,oe=l;oe!=null&&++k<F;){var ce=kn(f[k]),me=b;if(ce==="__proto__"||ce==="constructor"||ce==="prototype")return l;if(k!=ee){var be=oe[ce];me=R?R(be,ce,oe):r,me===r&&(me=Nt(be)?be:pi(f[k+1])?[]:{})}ds(oe,ce,me),oe=oe[ce]}return l}var h_=sc?function(l,f){return sc.set(l,f),l}:jr,C8=ic?function(l,f){return ic(l,"toString",{configurable:!0,enumerable:!1,value:Eh(f),writable:!0})}:jr;function I8(l){return Ec(ra(l))}function vn(l,f,b){var R=-1,k=l.length;f<0&&(f=-f>k?0:k+f),b=b>k?k:b,b<0&&(b+=k),k=f>b?0:b-f>>>0,f>>>=0;for(var F=fe(k);++R<k;)F[R]=l[R+f];return F}function R8(l,f){var b;return Ai(l,function(R,k,F){return b=f(R,k,F),!b}),!!b}function pc(l,f,b){var R=0,k=l==null?R:l.length;if(typeof f=="number"&&f===f&&k<=D){for(;R<k;){var F=R+k>>>1,ee=l[F];ee!==null&&!en(ee)&&(b?ee<=f:ee<f)?R=F+1:k=F}return k}return Xf(l,f,jr,b)}function Xf(l,f,b,R){var k=0,F=l==null?0:l.length;if(F===0)return 0;f=b(f);for(var ee=f!==f,oe=f===null,ce=en(f),me=f===r;k<F;){var be=ac((k+F)/2),we=b(l[be]),_e=we!==r,Pe=we===null,qe=we===we,We=en(we);if(ee)var Ae=R||qe;else me?Ae=qe&&(R||_e):oe?Ae=qe&&_e&&(R||!Pe):ce?Ae=qe&&_e&&!Pe&&(R||!We):Pe||We?Ae=!1:Ae=R?we<=f:we<f;Ae?k=be+1:F=be}return gr(F,Q)}function p_(l,f){for(var b=-1,R=l.length,k=0,F=[];++b<R;){var ee=l[b],oe=f?f(ee):ee;if(!b||!An(oe,ce)){var ce=oe;F[k++]=ee===0?0:ee}}return F}function v_(l){return typeof l=="number"?l:en(l)?B:+l}function Qr(l){if(typeof l=="string")return l;if(Ve(l))return Ct(l,Qr)+"";if(en(l))return GE?GE.call(l):"";var f=l+"";return f=="0"&&1/l==-G?"-0":f}function Di(l,f,b){var R=-1,k=Gl,F=l.length,ee=!0,oe=[],ce=oe;if(b)ee=!1,k=Of;else if(F>=i){var me=f?null:L8(l);if(me)return Yl(me);ee=!1,k=os,ce=new co}else ce=f?[]:oe;e:for(;++R<F;){var be=l[R],we=f?f(be):be;if(be=b||be!==0?be:0,ee&&we===we){for(var _e=ce.length;_e--;)if(ce[_e]===we)continue e;f&&ce.push(we),oe.push(be)}else k(ce,we,b)||(ce!==oe&&ce.push(we),oe.push(be))}return oe}function Zf(l,f){f=ji(f,l);var b=-1,R=f.length;if(!R)return!0;for(;++b<R;){var k=kn(f[b]);if(k==="__proto__"&&!lt.call(l,"__proto__")||(k==="constructor"||k==="prototype")&&b<R-1)return!1}var F=V_(l,f);return F==null||delete F[kn(gn(f))]}function g_(l,f,b,R){return vs(l,f,b(fo(l,f)),R)}function vc(l,f,b,R){for(var k=l.length,F=R?k:-1;(R?F--:++F<k)&&f(l[F],F,l););return b?vn(l,R?0:F,R?F+1:k):vn(l,R?F+1:0,R?k:F)}function m_(l,f){var b=l;return b instanceof Qe&&(b=b.value()),Cf(f,function(R,k){return k.func.apply(k.thisArg,Pi([R],k.args))},b)}function Jf(l,f,b){var R=l.length;if(R<2)return R?Di(l[0]):[];for(var k=-1,F=fe(R);++k<R;)for(var ee=l[k],oe=-1;++oe<R;)oe!=k&&(F[k]=fs(F[k]||ee,l[oe],f,b));return Di(cr(F,1),f,b)}function b_(l,f,b){for(var R=-1,k=l.length,F=f.length,ee={};++R<k;){var oe=R<F?f[R]:r;b(ee,l[R],oe)}return ee}function Qf(l){return Ft(l)?l:[]}function eh(l){return typeof l=="function"?l:jr}function ji(l,f){return Ve(l)?l:ch(l,f)?[l]:G_(ct(l))}var N8=Ue;function qi(l,f,b){var R=l.length;return b=b===r?R:b,!f&&b>=R?l:vn(l,f,b)}var y_=g7||function(l){return lr.clearTimeout(l)};function x_(l,f){if(f)return l.slice();var b=l.length,R=FE?FE(b):new l.constructor(b);return l.copy(R),R}function th(l){var f=new l.constructor(l.byteLength);return new tc(f).set(new tc(l)),f}function T8(l,f){var b=f?th(l.buffer):l.buffer;return new l.constructor(b,l.byteOffset,l.byteLength)}function P8(l){var f=new l.constructor(l.source,Fo.exec(l));return f.lastIndex=l.lastIndex,f}function M8(l){return us?mt(us.call(l)):{}}function w_(l,f){var b=f?th(l.buffer):l.buffer;return new l.constructor(b,l.byteOffset,l.length)}function S_(l,f){if(l!==f){var b=l!==r,R=l===null,k=l===l,F=en(l),ee=f!==r,oe=f===null,ce=f===f,me=en(f);if(!oe&&!me&&!F&&l>f||F&&ee&&ce&&!oe&&!me||R&&ee&&ce||!b&&ce||!k)return 1;if(!R&&!F&&!me&&l<f||me&&b&&k&&!R&&!F||oe&&b&&k||!ee&&k||!ce)return-1}return 0}function k8(l,f,b){for(var R=-1,k=l.criteria,F=f.criteria,ee=k.length,oe=b.length;++R<ee;){var ce=S_(k[R],F[R]);if(ce){if(R>=oe)return ce;var me=b[R];return ce*(me=="desc"?-1:1)}}return l.index-f.index}function E_(l,f,b,R){for(var k=-1,F=l.length,ee=b.length,oe=-1,ce=f.length,me=Yt(F-ee,0),be=fe(ce+me),we=!R;++oe<ce;)be[oe]=f[oe];for(;++k<ee;)(we||k<F)&&(be[b[k]]=l[k]);for(;me--;)be[oe++]=l[k++];return be}function __(l,f,b,R){for(var k=-1,F=l.length,ee=-1,oe=b.length,ce=-1,me=f.length,be=Yt(F-oe,0),we=fe(be+me),_e=!R;++k<be;)we[k]=l[k];for(var Pe=k;++ce<me;)we[Pe+ce]=f[ce];for(;++ee<oe;)(_e||k<F)&&(we[Pe+b[ee]]=l[k++]);return we}function kr(l,f){var b=-1,R=l.length;for(f||(f=fe(R));++b<R;)f[b]=l[b];return f}function Zn(l,f,b,R){var k=!b;b||(b={});for(var F=-1,ee=f.length;++F<ee;){var oe=f[F],ce=R?R(b[oe],l[oe],oe,b,l):r;ce===r&&(ce=l[oe]),k?Yn(b,oe,ce):ds(b,oe,ce)}return b}function A8(l,f){return Zn(l,lh(l),f)}function D8(l,f){return Zn(l,q_(l),f)}function gc(l,f){return function(b,R){var k=Ve(b)?BL:n8,F=f?f():{};return k(b,l,De(R,2),F)}}function Jo(l){return Ue(function(f,b){var R=-1,k=b.length,F=k>1?b[k-1]:r,ee=k>2?b[2]:r;for(F=l.length>3&&typeof F=="function"?(k--,F):r,ee&&_r(b[0],b[1],ee)&&(F=k<3?r:F,k=1),f=mt(f);++R<k;){var oe=b[R];oe&&l(f,oe,R,F)}return f})}function O_(l,f){return function(b,R){if(b==null)return b;if(!Ar(b))return l(b,R);for(var k=b.length,F=f?k:-1,ee=mt(b);(f?F--:++F<k)&&R(ee[F],F,ee)!==!1;);return b}}function C_(l){return function(f,b,R){for(var k=-1,F=mt(f),ee=R(f),oe=ee.length;oe--;){var ce=ee[l?oe:++k];if(b(F[ce],ce,F)===!1)break}return f}}function j8(l,f,b){var R=f&w,k=gs(l);function F(){var ee=this&&this!==lr&&this instanceof F?k:l;return ee.apply(R?b:this,arguments)}return F}function I_(l){return function(f){f=ct(f);var b=Wo(f)?Pn(f):r,R=b?b[0]:f.charAt(0),k=b?qi(b,1).join(""):f.slice(1);return R[l]()+k}}function Qo(l){return function(f){return Cf(CO(OO(f).replace(CL,"")),l,"")}}function gs(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 b=Zo(l.prototype),R=l.apply(b,f);return Nt(R)?R:b}}function q8(l,f,b){var R=gs(l);function k(){for(var F=arguments.length,ee=fe(F),oe=F,ce=ea(k);oe--;)ee[oe]=arguments[oe];var me=F<3&&ee[0]!==ce&&ee[F-1]!==ce?[]:Mi(ee,ce);if(F-=me.length,F<b)return M_(l,f,mc,k.placeholder,r,ee,me,r,r,b-F);var be=this&&this!==lr&&this instanceof k?R:l;return Xr(be,this,ee)}return k}function R_(l){return function(f,b,R){var k=mt(f);if(!Ar(f)){var F=De(b,3);f=rr(f),b=function(oe){return F(k[oe],oe,k)}}var ee=l(f,b,R);return ee>-1?k[F?f[ee]:ee]:r}}function N_(l){return hi(function(f){var b=f.length,R=b,k=hn.prototype.thru;for(l&&f.reverse();R--;){var F=f[R];if(typeof F!="function")throw new fn(a);if(k&&!ee&&wc(F)=="wrapper")var ee=new hn([],!0)}for(R=ee?R:b;++R<b;){F=f[R];var oe=wc(F),ce=oe=="wrapper"?ah(F):r;ce&&uh(ce[0])&&ce[1]==(T|S|I|M)&&!ce[4].length&&ce[9]==1?ee=ee[wc(ce[0])].apply(ee,ce[3]):ee=F.length==1&&uh(F)?ee[oe]():ee.thru(F)}return function(){var me=arguments,be=me[0];if(ee&&me.length==1&&Ve(be))return ee.plant(be).value();for(var we=0,_e=b?f[we].apply(this,me):be;++we<b;)_e=f[we].call(this,_e);return _e}})}function mc(l,f,b,R,k,F,ee,oe,ce,me){var be=f&T,we=f&w,_e=f&x,Pe=f&(S|E),qe=f&z,We=_e?r:gs(l);function Ae(){for(var Ye=arguments.length,et=fe(Ye),tn=Ye;tn--;)et[tn]=arguments[tn];if(Pe)var Or=ea(Ae),rn=YL(et,Or);if(R&&(et=E_(et,R,k,Pe)),F&&(et=__(et,F,ee,Pe)),Ye-=rn,Pe&&Ye<me){var $t=Mi(et,Or);return M_(l,f,mc,Ae.placeholder,b,et,$t,oe,ce,me-Ye)}var Dn=we?b:this,mi=_e?Dn[l]:l;return Ye=et.length,oe?et=nB(et,oe):qe&&Ye>1&&et.reverse(),be&&ce<Ye&&(et.length=ce),this&&this!==lr&&this instanceof Ae&&(mi=We||gs(mi)),mi.apply(Dn,et)}return Ae}function T_(l,f){return function(b,R){return d8(b,l,f(R),{})}}function bc(l,f){return function(b,R){var k;if(b===r&&R===r)return f;if(b!==r&&(k=b),R!==r){if(k===r)return R;typeof b=="string"||typeof R=="string"?(b=Qr(b),R=Qr(R)):(b=v_(b),R=v_(R)),k=l(b,R)}return k}}function rh(l){return hi(function(f){return f=Ct(f,Jr(De())),Ue(function(b){var R=this;return l(f,function(k){return Xr(k,R,b)})})})}function yc(l,f){f=f===r?" ":Qr(f);var b=f.length;if(b<2)return b?Yf(f,l):f;var R=Yf(f,oc(l/Uo(f)));return Wo(f)?qi(Pn(R),0,l).join(""):R.slice(0,l)}function z8(l,f,b,R){var k=f&w,F=gs(l);function ee(){for(var oe=-1,ce=arguments.length,me=-1,be=R.length,we=fe(be+ce),_e=this&&this!==lr&&this instanceof ee?F:l;++me<be;)we[me]=R[me];for(;ce--;)we[me++]=arguments[++oe];return Xr(_e,k?b:this,we)}return ee}function P_(l){return function(f,b,R){return R&&typeof R!="number"&&_r(f,b,R)&&(b=R=r),f=gi(f),b===r?(b=f,f=0):b=gi(b),R=R===r?f<b?1:-1:gi(R),E8(f,b,R,l)}}function xc(l){return function(f,b){return typeof f=="string"&&typeof b=="string"||(f=mn(f),b=mn(b)),l(f,b)}}function M_(l,f,b,R,k,F,ee,oe,ce,me){var be=f&S,we=be?ee:r,_e=be?r:ee,Pe=be?F:r,qe=be?r:F;f|=be?I:N,f&=~(be?N:I),f&_||(f&=-4);var We=[l,f,k,Pe,we,qe,_e,oe,ce,me],Ae=b.apply(r,We);return uh(l)&&H_(Ae,We),Ae.placeholder=R,W_(Ae,l,f)}function nh(l){var f=Kt[l];return function(b,R){if(b=mn(b),R=R==null?0:gr(He(R),292),R&&WE(b)){var k=(ct(b)+"e").split("e"),F=f(k[0]+"e"+(+k[1]+R));return k=(ct(F)+"e").split("e"),+(k[0]+"e"+(+k[1]-R))}return f(b)}}var L8=Yo&&1/Yl(new Yo([,-0]))[1]==G?function(l){return new Yo(l)}:Ch;function k_(l){return function(f){var b=mr(f);return b==he?kf(f):b==Te?r7(f):KL(f,l(f))}}function fi(l,f,b,R,k,F,ee,oe){var ce=f&x;if(!ce&&typeof l!="function")throw new fn(a);var me=R?R.length:0;if(me||(f&=-97,R=k=r),ee=ee===r?ee:Yt(He(ee),0),oe=oe===r?oe:He(oe),me-=k?k.length:0,f&N){var be=R,we=k;R=k=r}var _e=ce?r:ah(l),Pe=[l,f,b,R,k,be,we,F,ee,oe];if(_e&&eB(Pe,_e),l=Pe[0],f=Pe[1],b=Pe[2],R=Pe[3],k=Pe[4],oe=Pe[9]=Pe[9]===r?ce?0:l.length:Yt(Pe[9]-me,0),!oe&&f&(S|E)&&(f&=-25),!f||f==w)var qe=j8(l,f,b);else f==S||f==E?qe=q8(l,f,oe):(f==I||f==(w|I))&&!k.length?qe=z8(l,f,b,R):qe=mc.apply(r,Pe);var We=_e?h_:H_;return W_(We(qe,Pe),l,f)}function A_(l,f,b,R){return l===r||An(l,Ko[b])&&!lt.call(R,b)?f:l}function D_(l,f,b,R,k,F){return Nt(l)&&Nt(f)&&(F.set(f,l),hc(l,f,r,D_,F),F.delete(f)),l}function B8(l){return ys(l)?r:l}function j_(l,f,b,R,k,F){var ee=b&m,oe=l.length,ce=f.length;if(oe!=ce&&!(ee&&ce>oe))return!1;var me=F.get(l),be=F.get(f);if(me&&be)return me==f&&be==l;var we=-1,_e=!0,Pe=b&g?new co:r;for(F.set(l,f),F.set(f,l);++we<oe;){var qe=l[we],We=f[we];if(R)var Ae=ee?R(We,qe,we,f,l,F):R(qe,We,we,l,f,F);if(Ae!==r){if(Ae)continue;_e=!1;break}if(Pe){if(!If(f,function(Ye,et){if(!os(Pe,et)&&(qe===Ye||k(qe,Ye,b,R,F)))return Pe.push(et)})){_e=!1;break}}else if(!(qe===We||k(qe,We,b,R,F))){_e=!1;break}}return F.delete(l),F.delete(f),_e}function F8(l,f,b,R,k,F,ee){switch(b){case Je:if(l.byteLength!=f.byteLength||l.byteOffset!=f.byteOffset)return!1;l=l.buffer,f=f.buffer;case ze:return!(l.byteLength!=f.byteLength||!F(new tc(l),new tc(f)));case ie:case ne:case ue:return An(+l,+f);case Z:return l.name==f.name&&l.message==f.message;case Ie:case Me:return l==f+"";case he:var oe=kf;case Te:var ce=R&m;if(oe||(oe=Yl),l.size!=f.size&&!ce)return!1;var me=ee.get(l);if(me)return me==f;R|=g,ee.set(l,f);var be=j_(oe(l),oe(f),R,k,F,ee);return ee.delete(l),be;case Ze:if(us)return us.call(l)==us.call(f)}return!1}function $8(l,f,b,R,k,F){var ee=b&m,oe=ih(l),ce=oe.length,me=ih(f),be=me.length;if(ce!=be&&!ee)return!1;for(var we=ce;we--;){var _e=oe[we];if(!(ee?_e in f:lt.call(f,_e)))return!1}var Pe=F.get(l),qe=F.get(f);if(Pe&&qe)return Pe==f&&qe==l;var We=!0;F.set(l,f),F.set(f,l);for(var Ae=ee;++we<ce;){_e=oe[we];var Ye=l[_e],et=f[_e];if(R)var tn=ee?R(et,Ye,_e,f,l,F):R(Ye,et,_e,l,f,F);if(!(tn===r?Ye===et||k(Ye,et,b,R,F):tn)){We=!1;break}Ae||(Ae=_e=="constructor")}if(We&&!Ae){var Or=l.constructor,rn=f.constructor;Or!=rn&&"constructor"in l&&"constructor"in f&&!(typeof Or=="function"&&Or instanceof Or&&typeof rn=="function"&&rn instanceof rn)&&(We=!1)}return F.delete(l),F.delete(f),We}function hi(l){return fh($_(l,r,Z_),l+"")}function ih(l){return r_(l,rr,lh)}function oh(l){return r_(l,Dr,q_)}var ah=sc?function(l){return sc.get(l)}:Ch;function wc(l){for(var f=l.name+"",b=Xo[f],R=lt.call(Xo,f)?b.length:0;R--;){var k=b[R],F=k.func;if(F==null||F==l)return k.name}return f}function ea(l){var f=lt.call(L,"placeholder")?L:l;return f.placeholder}function De(){var l=L.iteratee||_h;return l=l===_h?o_:l,arguments.length?l(arguments[0],arguments[1]):l}function Sc(l,f){var b=l.__data__;return X8(f)?b[typeof f=="string"?"string":"hash"]:b.map}function sh(l){for(var f=rr(l),b=f.length;b--;){var R=f[b],k=l[R];f[b]=[R,k,B_(k)]}return f}function ho(l,f){var b=QL(l,f);return i_(b)?b:r}function V8(l){var f=lt.call(l,so),b=l[so];try{l[so]=r;var R=!0}catch{}var k=Ql.call(l);return R&&(f?l[so]=b:delete l[so]),k}var lh=Df?function(l){return l==null?[]:(l=mt(l),Ti(Df(l),function(f){return VE.call(l,f)}))}:Ih,q_=Df?function(l){for(var f=[];l;)Pi(f,lh(l)),l=rc(l);return f}:Ih,mr=Er;(jf&&mr(new jf(new ArrayBuffer(1)))!=Je||ss&&mr(new ss)!=he||qf&&mr(qf.resolve())!=xe||Yo&&mr(new Yo)!=Te||ls&&mr(new ls)!=Fe)&&(mr=function(l){var f=Er(l),b=f==le?l.constructor:r,R=b?po(b):"";if(R)switch(R){case O7:return Je;case C7:return he;case I7:return xe;case R7:return Te;case N7:return Fe}return f});function H8(l,f,b){for(var R=-1,k=b.length;++R<k;){var F=b[R],ee=F.size;switch(F.type){case"drop":l+=ee;break;case"dropRight":f-=ee;break;case"take":f=gr(f,l+ee);break;case"takeRight":l=Yt(l,f-ee);break}}return{start:l,end:f}}function W8(l){var f=l.match(Za);return f?f[1].split(Gn):[]}function z_(l,f,b){f=ji(f,l);for(var R=-1,k=f.length,F=!1;++R<k;){var ee=kn(f[R]);if(!(F=l!=null&&b(l,ee)))break;l=l[ee]}return F||++R!=k?F:(k=l==null?0:l.length,!!k&&Nc(k)&&pi(ee,k)&&(Ve(l)||vo(l)))}function U8(l){var f=l.length,b=new l.constructor(f);return f&&typeof l[0]=="string"&<.call(l,"index")&&(b.index=l.index,b.input=l.input),b}function L_(l){return typeof l.constructor=="function"&&!ms(l)?Zo(rc(l)):{}}function G8(l,f,b){var R=l.constructor;switch(f){case ze:return th(l);case ie:case ne:return new R(+l);case Je:return T8(l,b);case rt:case Pt:case gt:case Rt:case qt:case Ot:case Gr:case Kr:case ar:return w_(l,b);case he:return new R;case ue:case Me:return new R(l);case Ie:return P8(l);case Te:return new R;case Ze:return M8(l)}}function K8(l,f){var b=f.length;if(!b)return l;var R=b-1;return f[R]=(b>1?"& ":"")+f[R],f=f.join(b>2?", ":" "),l.replace(Un,`{
|
|
70
|
+
*/var uae=Xs.exports,z5;function dae(){return z5||(z5=1,(function(e,t){(function(){var r,n="4.18.1",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",c="Invalid `imports` option passed into `_.template`",d="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",p=1,v=2,y=4,m=1,g=2,w=1,x=2,_=4,S=8,E=16,I=32,N=64,T=128,M=256,z=512,j=30,W="...",U=800,A=16,K=1,V=2,te=3,G=1/0,re=9007199254740991,P=17976931348623157e292,B=NaN,X=4294967295,Q=X-1,D=X>>>1,$=[["ary",T],["bind",w],["bindKey",x],["curry",S],["curryRight",E],["flip",z],["partial",I],["partialRight",N],["rearg",M]],H="[object Arguments]",q="[object Array]",Y="[object AsyncFunction]",ie="[object Boolean]",ne="[object Date]",ve="[object DOMException]",Z="[object Error]",J="[object Function]",ae="[object GeneratorFunction]",he="[object Map]",ue="[object Number]",de="[object Null]",le="[object Object]",xe="[object Promise]",Ee="[object Proxy]",Ie="[object RegExp]",Te="[object Set]",Me="[object String]",Ze="[object Symbol]",tt="[object Undefined]",Fe="[object WeakMap]",Le="[object WeakSet]",ze="[object ArrayBuffer]",Je="[object DataView]",rt="[object Float32Array]",Pt="[object Float64Array]",gt="[object Int8Array]",Rt="[object Int16Array]",qt="[object Int32Array]",Ot="[object Uint8Array]",Gr="[object Uint8ClampedArray]",Kr="[object Uint16Array]",ar="[object Uint32Array]",Nn=/\b__p \+= '';/g,io=/\b(__p \+=) '' \+/g,zt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Mt=/&(?:amp|lt|gt|quot|#39);/g,Lt=/[&<>"']/g,fr=RegExp(Mt.source),kt=RegExp(Lt.source),At=/<%-([\s\S]+?)%>/g,hr=/<%([\s\S]+?)%>/g,Mr=/<%=([\s\S]+?)%>/g,Et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bt=/^\w*$/,pr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vr=/[\\^$.*+?()[\]{}|]/g,yr=RegExp(vr.source),sr=/^\s+/,Tn=/\s/,Un=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Za=/\{\n\/\* \[wrapped with (.+)\] \*/,Gn=/,? & /,Ja=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Kn=/[()=,{}\[\]\/\s]/,Ri=/\\(\\)?/g,Bo=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Fo=/\w*$/,ke=/^[-+]0x[0-9a-f]+$/i,$e=/^0b[01]+$/i,xr=/^\[object .+?Constructor\]$/,Ht=/^0o[0-7]+$/i,wr=/^(?:0|[1-9]\d*)$/,Sr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tr=/($^)/,un=/['\n\r\u2028\u2029\\]/g,Yr="\\ud800-\\udfff",ci="\\u0300-\\u036f",Ni="\\ufe20-\\ufe2f",Qa="\\u20d0-\\u20ff",es=ci+Ni+Qa,$l="\\u2700-\\u27bf",ts="a-z\\xdf-\\xf6\\xf8-\\xff",pf="\\xac\\xb1\\xd7\\xf7",Vl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",vf="\\u2000-\\u206f",gf=" \\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",rs="A-Z\\xc0-\\xd6\\xd8-\\xde",Hl="\\ufe0e\\ufe0f",Wl=pf+Vl+vf+gf,ns="['’]",mf="["+Yr+"]",is="["+Wl+"]",$o="["+es+"]",oo="\\d+",bf="["+$l+"]",Ul="["+ts+"]",hE="[^"+Yr+Wl+oo+$l+ts+rs+"]",yf="\\ud83c[\\udffb-\\udfff]",yL="(?:"+$o+"|"+yf+")",pE="[^"+Yr+"]",xf="(?:\\ud83c[\\udde6-\\uddff]){2}",wf="[\\ud800-\\udbff][\\udc00-\\udfff]",Vo="["+rs+"]",vE="\\u200d",gE="(?:"+Ul+"|"+hE+")",xL="(?:"+Vo+"|"+hE+")",mE="(?:"+ns+"(?:d|ll|m|re|s|t|ve))?",bE="(?:"+ns+"(?:D|LL|M|RE|S|T|VE))?",yE=yL+"?",xE="["+Hl+"]?",wL="(?:"+vE+"(?:"+[pE,xf,wf].join("|")+")"+xE+yE+")*",SL="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",EL="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",wE=xE+yE+wL,_L="(?:"+[bf,xf,wf].join("|")+")"+wE,OL="(?:"+[pE+$o+"?",$o,xf,wf,mf].join("|")+")",CL=RegExp(ns,"g"),IL=RegExp($o,"g"),Sf=RegExp(yf+"(?="+yf+")|"+OL+wE,"g"),RL=RegExp([Vo+"?"+Ul+"+"+mE+"(?="+[is,Vo,"$"].join("|")+")",xL+"+"+bE+"(?="+[is,Vo+gE,"$"].join("|")+")",Vo+"?"+gE+"+"+mE,Vo+"+"+bE,EL,SL,oo,_L].join("|"),"g"),NL=RegExp("["+vE+Yr+es+Hl+"]"),TL=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,PL=["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"],ML=-1,_t={};_t[rt]=_t[Pt]=_t[gt]=_t[Rt]=_t[qt]=_t[Ot]=_t[Gr]=_t[Kr]=_t[ar]=!0,_t[H]=_t[q]=_t[ze]=_t[ie]=_t[Je]=_t[ne]=_t[Z]=_t[J]=_t[he]=_t[ue]=_t[le]=_t[Ie]=_t[Te]=_t[Me]=_t[Fe]=!1;var xt={};xt[H]=xt[q]=xt[ze]=xt[Je]=xt[ie]=xt[ne]=xt[rt]=xt[Pt]=xt[gt]=xt[Rt]=xt[qt]=xt[he]=xt[ue]=xt[le]=xt[Ie]=xt[Te]=xt[Me]=xt[Ze]=xt[Ot]=xt[Gr]=xt[Kr]=xt[ar]=!0,xt[Z]=xt[J]=xt[Fe]=!1;var kL={À:"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"},AL={"&":"&","<":"<",">":">",'"':""","'":"'"},DL={"&":"&","<":"<",">":">",""":'"',"'":"'"},jL={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},qL=parseFloat,zL=parseInt,SE=typeof jt=="object"&&jt&&jt.Object===Object&&jt,LL=typeof self=="object"&&self&&self.Object===Object&&self,lr=SE||LL||Function("return this")(),Ef=t&&!t.nodeType&&t,ao=Ef&&!0&&e&&!e.nodeType&&e,EE=ao&&ao.exports===Ef,_f=EE&&SE.process,dn=(function(){try{var se=ao&&ao.require&&ao.require("util").types;return se||_f&&_f.binding&&_f.binding("util")}catch{}})(),_E=dn&&dn.isArrayBuffer,OE=dn&&dn.isDate,CE=dn&&dn.isMap,IE=dn&&dn.isRegExp,RE=dn&&dn.isSet,NE=dn&&dn.isTypedArray;function Xr(se,ge,fe){switch(fe.length){case 0:return se.call(ge);case 1:return se.call(ge,fe[0]);case 2:return se.call(ge,fe[0],fe[1]);case 3:return se.call(ge,fe[0],fe[1],fe[2])}return se.apply(ge,fe)}function BL(se,ge,fe,Ce){for(var Be=-1,ot=se==null?0:se.length;++Be<ot;){var Kt=se[Be];ge(Ce,Kt,fe(Kt),se)}return Ce}function Zr(se,ge){for(var fe=-1,Ce=se==null?0:se.length;++fe<Ce&&ge(se[fe],fe,se)!==!1;);return se}function FL(se,ge){for(var fe=se==null?0:se.length;fe--&&ge(se[fe],fe,se)!==!1;);return se}function TE(se,ge){for(var fe=-1,Ce=se==null?0:se.length;++fe<Ce;)if(!ge(se[fe],fe,se))return!1;return!0}function Ti(se,ge){for(var fe=-1,Ce=se==null?0:se.length,Be=0,ot=[];++fe<Ce;){var Kt=se[fe];ge(Kt,fe,se)&&(ot[Be++]=Kt)}return ot}function Gl(se,ge){var fe=se==null?0:se.length;return!!fe&&Ho(se,ge,0)>-1}function Of(se,ge,fe){for(var Ce=-1,Be=se==null?0:se.length;++Ce<Be;)if(fe(ge,se[Ce]))return!0;return!1}function Ct(se,ge){for(var fe=-1,Ce=se==null?0:se.length,Be=Array(Ce);++fe<Ce;)Be[fe]=ge(se[fe],fe,se);return Be}function Pi(se,ge){for(var fe=-1,Ce=ge.length,Be=se.length;++fe<Ce;)se[Be+fe]=ge[fe];return se}function Cf(se,ge,fe,Ce){var Be=-1,ot=se==null?0:se.length;for(Ce&&ot&&(fe=se[++Be]);++Be<ot;)fe=ge(fe,se[Be],Be,se);return fe}function $L(se,ge,fe,Ce){var Be=se==null?0:se.length;for(Ce&&Be&&(fe=se[--Be]);Be--;)fe=ge(fe,se[Be],Be,se);return fe}function If(se,ge){for(var fe=-1,Ce=se==null?0:se.length;++fe<Ce;)if(ge(se[fe],fe,se))return!0;return!1}var VL=Rf("length");function HL(se){return se.split("")}function WL(se){return se.match(Ja)||[]}function PE(se,ge,fe){var Ce;return fe(se,function(Be,ot,Kt){if(ge(Be,ot,Kt))return Ce=ot,!1}),Ce}function Kl(se,ge,fe,Ce){for(var Be=se.length,ot=fe+(Ce?1:-1);Ce?ot--:++ot<Be;)if(ge(se[ot],ot,se))return ot;return-1}function Ho(se,ge,fe){return ge===ge?n7(se,ge,fe):Kl(se,ME,fe)}function UL(se,ge,fe,Ce){for(var Be=fe-1,ot=se.length;++Be<ot;)if(Ce(se[Be],ge))return Be;return-1}function ME(se){return se!==se}function kE(se,ge){var fe=se==null?0:se.length;return fe?Tf(se,ge)/fe:B}function Rf(se){return function(ge){return ge==null?r:ge[se]}}function Nf(se){return function(ge){return se==null?r:se[ge]}}function AE(se,ge,fe,Ce,Be){return Be(se,function(ot,Kt,mt){fe=Ce?(Ce=!1,ot):ge(fe,ot,Kt,mt)}),fe}function GL(se,ge){var fe=se.length;for(se.sort(ge);fe--;)se[fe]=se[fe].value;return se}function Tf(se,ge){for(var fe,Ce=-1,Be=se.length;++Ce<Be;){var ot=ge(se[Ce]);ot!==r&&(fe=fe===r?ot:fe+ot)}return fe}function Pf(se,ge){for(var fe=-1,Ce=Array(se);++fe<se;)Ce[fe]=ge(fe);return Ce}function KL(se,ge){return Ct(ge,function(fe){return[fe,se[fe]]})}function DE(se){return se&&se.slice(0,LE(se)+1).replace(sr,"")}function Jr(se){return function(ge){return se(ge)}}function Mf(se,ge){return Ct(ge,function(fe){return se[fe]})}function os(se,ge){return se.has(ge)}function jE(se,ge){for(var fe=-1,Ce=se.length;++fe<Ce&&Ho(ge,se[fe],0)>-1;);return fe}function qE(se,ge){for(var fe=se.length;fe--&&Ho(ge,se[fe],0)>-1;);return fe}function YL(se,ge){for(var fe=se.length,Ce=0;fe--;)se[fe]===ge&&++Ce;return Ce}var XL=Nf(kL),ZL=Nf(AL);function JL(se){return"\\"+jL[se]}function QL(se,ge){return se==null?r:se[ge]}function Wo(se){return NL.test(se)}function e7(se){return TL.test(se)}function t7(se){for(var ge,fe=[];!(ge=se.next()).done;)fe.push(ge.value);return fe}function kf(se){var ge=-1,fe=Array(se.size);return se.forEach(function(Ce,Be){fe[++ge]=[Be,Ce]}),fe}function zE(se,ge){return function(fe){return se(ge(fe))}}function Mi(se,ge){for(var fe=-1,Ce=se.length,Be=0,ot=[];++fe<Ce;){var Kt=se[fe];(Kt===ge||Kt===h)&&(se[fe]=h,ot[Be++]=fe)}return ot}function Yl(se){var ge=-1,fe=Array(se.size);return se.forEach(function(Ce){fe[++ge]=Ce}),fe}function r7(se){var ge=-1,fe=Array(se.size);return se.forEach(function(Ce){fe[++ge]=[Ce,Ce]}),fe}function n7(se,ge,fe){for(var Ce=fe-1,Be=se.length;++Ce<Be;)if(se[Ce]===ge)return Ce;return-1}function i7(se,ge,fe){for(var Ce=fe+1;Ce--;)if(se[Ce]===ge)return Ce;return Ce}function Uo(se){return Wo(se)?a7(se):VL(se)}function Pn(se){return Wo(se)?s7(se):HL(se)}function LE(se){for(var ge=se.length;ge--&&Tn.test(se.charAt(ge)););return ge}var o7=Nf(DL);function a7(se){for(var ge=Sf.lastIndex=0;Sf.test(se);)++ge;return ge}function s7(se){return se.match(Sf)||[]}function l7(se){return se.match(RL)||[]}var c7=(function se(ge){ge=ge==null?lr:Go.defaults(lr.Object(),ge,Go.pick(lr,PL));var fe=ge.Array,Ce=ge.Date,Be=ge.Error,ot=ge.Function,Kt=ge.Math,mt=ge.Object,Af=ge.RegExp,u7=ge.String,fn=ge.TypeError,Xl=fe.prototype,d7=ot.prototype,Ko=mt.prototype,Zl=ge["__core-js_shared__"],Jl=d7.toString,lt=Ko.hasOwnProperty,f7=0,BE=(function(){var l=/[^.]+$/.exec(Zl&&Zl.keys&&Zl.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),Ql=Ko.toString,h7=Jl.call(mt),p7=lr._,v7=Af("^"+Jl.call(lt).replace(vr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ec=EE?ge.Buffer:r,ki=ge.Symbol,tc=ge.Uint8Array,FE=ec?ec.allocUnsafe:r,rc=zE(mt.getPrototypeOf,mt),$E=mt.create,VE=Ko.propertyIsEnumerable,nc=Xl.splice,HE=ki?ki.isConcatSpreadable:r,as=ki?ki.iterator:r,so=ki?ki.toStringTag:r,ic=(function(){try{var l=ho(mt,"defineProperty");return l({},"",{}),l}catch{}})(),g7=ge.clearTimeout!==lr.clearTimeout&&ge.clearTimeout,m7=Ce&&Ce.now!==lr.Date.now&&Ce.now,b7=ge.setTimeout!==lr.setTimeout&&ge.setTimeout,oc=Kt.ceil,ac=Kt.floor,Df=mt.getOwnPropertySymbols,y7=ec?ec.isBuffer:r,WE=ge.isFinite,x7=Xl.join,w7=zE(mt.keys,mt),Yt=Kt.max,gr=Kt.min,S7=Ce.now,E7=ge.parseInt,UE=Kt.random,_7=Xl.reverse,jf=ho(ge,"DataView"),ss=ho(ge,"Map"),qf=ho(ge,"Promise"),Yo=ho(ge,"Set"),ls=ho(ge,"WeakMap"),cs=ho(mt,"create"),sc=ls&&new ls,Xo={},O7=po(jf),C7=po(ss),I7=po(qf),R7=po(Yo),N7=po(ls),lc=ki?ki.prototype:r,us=lc?lc.valueOf:r,GE=lc?lc.toString:r;function L(l){if(Dt(l)&&!Ve(l)&&!(l instanceof Qe)){if(l instanceof hn)return l;if(lt.call(l,"__wrapped__"))return K_(l)}return new hn(l)}var Zo=(function(){function l(){}return function(f){if(!Nt(f))return{};if($E)return $E(f);l.prototype=f;var b=new l;return l.prototype=r,b}})();function cc(){}function hn(l,f){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=r}L.templateSettings={escape:At,evaluate:hr,interpolate:Mr,variable:"",imports:{_:L}},L.prototype=cc.prototype,L.prototype.constructor=L,hn.prototype=Zo(cc.prototype),hn.prototype.constructor=hn;function Qe(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=X,this.__views__=[]}function T7(){var l=new Qe(this.__wrapped__);return l.__actions__=kr(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=kr(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=kr(this.__views__),l}function P7(){if(this.__filtered__){var l=new Qe(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function M7(){var l=this.__wrapped__.value(),f=this.__dir__,b=Ve(l),R=f<0,k=b?l.length:0,F=H8(0,k,this.__views__),ee=F.start,oe=F.end,ce=oe-ee,me=R?oe:ee-1,be=this.__iteratees__,we=be.length,_e=0,Pe=gr(ce,this.__takeCount__);if(!b||!R&&k==ce&&Pe==ce)return m_(l,this.__actions__);var qe=[];e:for(;ce--&&_e<Pe;){me+=f;for(var We=-1,Ae=l[me];++We<we;){var Ye=be[We],et=Ye.iteratee,tn=Ye.type,Or=et(Ae);if(tn==V)Ae=Or;else if(!Or){if(tn==K)continue e;break e}}qe[_e++]=Ae}return qe}Qe.prototype=Zo(cc.prototype),Qe.prototype.constructor=Qe;function lo(l){var f=-1,b=l==null?0:l.length;for(this.clear();++f<b;){var R=l[f];this.set(R[0],R[1])}}function k7(){this.__data__=cs?cs(null):{},this.size=0}function A7(l){var f=this.has(l)&&delete this.__data__[l];return this.size-=f?1:0,f}function D7(l){var f=this.__data__;if(cs){var b=f[l];return b===d?r:b}return lt.call(f,l)?f[l]:r}function j7(l){var f=this.__data__;return cs?f[l]!==r:lt.call(f,l)}function q7(l,f){var b=this.__data__;return this.size+=this.has(l)?0:1,b[l]=cs&&f===r?d:f,this}lo.prototype.clear=k7,lo.prototype.delete=A7,lo.prototype.get=D7,lo.prototype.has=j7,lo.prototype.set=q7;function ui(l){var f=-1,b=l==null?0:l.length;for(this.clear();++f<b;){var R=l[f];this.set(R[0],R[1])}}function z7(){this.__data__=[],this.size=0}function L7(l){var f=this.__data__,b=uc(f,l);if(b<0)return!1;var R=f.length-1;return b==R?f.pop():nc.call(f,b,1),--this.size,!0}function B7(l){var f=this.__data__,b=uc(f,l);return b<0?r:f[b][1]}function F7(l){return uc(this.__data__,l)>-1}function $7(l,f){var b=this.__data__,R=uc(b,l);return R<0?(++this.size,b.push([l,f])):b[R][1]=f,this}ui.prototype.clear=z7,ui.prototype.delete=L7,ui.prototype.get=B7,ui.prototype.has=F7,ui.prototype.set=$7;function di(l){var f=-1,b=l==null?0:l.length;for(this.clear();++f<b;){var R=l[f];this.set(R[0],R[1])}}function V7(){this.size=0,this.__data__={hash:new lo,map:new(ss||ui),string:new lo}}function H7(l){var f=Sc(this,l).delete(l);return this.size-=f?1:0,f}function W7(l){return Sc(this,l).get(l)}function U7(l){return Sc(this,l).has(l)}function G7(l,f){var b=Sc(this,l),R=b.size;return b.set(l,f),this.size+=b.size==R?0:1,this}di.prototype.clear=V7,di.prototype.delete=H7,di.prototype.get=W7,di.prototype.has=U7,di.prototype.set=G7;function co(l){var f=-1,b=l==null?0:l.length;for(this.__data__=new di;++f<b;)this.add(l[f])}function K7(l){return this.__data__.set(l,d),this}function Y7(l){return this.__data__.has(l)}co.prototype.add=co.prototype.push=K7,co.prototype.has=Y7;function Mn(l){var f=this.__data__=new ui(l);this.size=f.size}function X7(){this.__data__=new ui,this.size=0}function Z7(l){var f=this.__data__,b=f.delete(l);return this.size=f.size,b}function J7(l){return this.__data__.get(l)}function Q7(l){return this.__data__.has(l)}function e8(l,f){var b=this.__data__;if(b instanceof ui){var R=b.__data__;if(!ss||R.length<i-1)return R.push([l,f]),this.size=++b.size,this;b=this.__data__=new di(R)}return b.set(l,f),this.size=b.size,this}Mn.prototype.clear=X7,Mn.prototype.delete=Z7,Mn.prototype.get=J7,Mn.prototype.has=Q7,Mn.prototype.set=e8;function KE(l,f){var b=Ve(l),R=!b&&vo(l),k=!b&&!R&&zi(l),F=!b&&!R&&!k&&ta(l),ee=b||R||k||F,oe=ee?Pf(l.length,u7):[],ce=oe.length;for(var me in l)(f||lt.call(l,me))&&!(ee&&(me=="length"||k&&(me=="offset"||me=="parent")||F&&(me=="buffer"||me=="byteLength"||me=="byteOffset")||pi(me,ce)))&&oe.push(me);return oe}function YE(l){var f=l.length;return f?l[Kf(0,f-1)]:r}function t8(l,f){return Ec(kr(l),uo(f,0,l.length))}function r8(l){return Ec(kr(l))}function zf(l,f,b){(b!==r&&!An(l[f],b)||b===r&&!(f in l))&&Yn(l,f,b)}function ds(l,f,b){var R=l[f];(!(lt.call(l,f)&&An(R,b))||b===r&&!(f in l))&&Yn(l,f,b)}function uc(l,f){for(var b=l.length;b--;)if(An(l[b][0],f))return b;return-1}function n8(l,f,b,R){return Ai(l,function(k,F,ee){f(R,k,b(k),ee)}),R}function XE(l,f){return l&&Zn(f,rr(f),l)}function i8(l,f){return l&&Zn(f,Dr(f),l)}function Yn(l,f,b){f=="__proto__"&&ic?ic(l,f,{configurable:!0,enumerable:!0,value:b,writable:!0}):l[f]=b}function Lf(l,f){for(var b=-1,R=f.length,k=fe(R),F=l==null;++b<R;)k[b]=F?r:xh(l,f[b]);return k}function uo(l,f,b){return l===l&&(b!==r&&(l=l<=b?l:b),f!==r&&(l=l>=f?l:f)),l}function pn(l,f,b,R,k,F){var ee,oe=f&p,ce=f&v,me=f&y;if(b&&(ee=k?b(l,R,k,F):b(l)),ee!==r)return ee;if(!Nt(l))return l;var be=Ve(l);if(be){if(ee=U8(l),!oe)return kr(l,ee)}else{var we=mr(l),_e=we==J||we==ae;if(zi(l))return x_(l,oe);if(we==le||we==H||_e&&!k){if(ee=ce||_e?{}:L_(l),!oe)return ce?D8(l,i8(ee,l)):A8(l,XE(ee,l))}else{if(!xt[we])return k?l:{};ee=G8(l,we,oe)}}F||(F=new Mn);var Pe=F.get(l);if(Pe)return Pe;F.set(l,ee),pO(l)?l.forEach(function(Ae){ee.add(pn(Ae,f,b,Ae,l,F))}):fO(l)&&l.forEach(function(Ae,Ye){ee.set(Ye,pn(Ae,f,b,Ye,l,F))});var qe=me?ce?oh:ih:ce?Dr:rr,We=be?r:qe(l);return Zr(We||l,function(Ae,Ye){We&&(Ye=Ae,Ae=l[Ye]),ds(ee,Ye,pn(Ae,f,b,Ye,l,F))}),ee}function o8(l){var f=rr(l);return function(b){return ZE(b,l,f)}}function ZE(l,f,b){var R=b.length;if(l==null)return!R;for(l=mt(l);R--;){var k=b[R],F=f[k],ee=l[k];if(ee===r&&!(k in l)||!F(ee))return!1}return!0}function JE(l,f,b){if(typeof l!="function")throw new fn(a);return bs(function(){l.apply(r,b)},f)}function fs(l,f,b,R){var k=-1,F=Gl,ee=!0,oe=l.length,ce=[],me=f.length;if(!oe)return ce;b&&(f=Ct(f,Jr(b))),R?(F=Of,ee=!1):f.length>=i&&(F=os,ee=!1,f=new co(f));e:for(;++k<oe;){var be=l[k],we=b==null?be:b(be);if(be=R||be!==0?be:0,ee&&we===we){for(var _e=me;_e--;)if(f[_e]===we)continue e;ce.push(be)}else F(f,we,R)||ce.push(be)}return ce}var Ai=O_(Xn),QE=O_(Ff,!0);function a8(l,f){var b=!0;return Ai(l,function(R,k,F){return b=!!f(R,k,F),b}),b}function dc(l,f,b){for(var R=-1,k=l.length;++R<k;){var F=l[R],ee=f(F);if(ee!=null&&(oe===r?ee===ee&&!en(ee):b(ee,oe)))var oe=ee,ce=F}return ce}function s8(l,f,b,R){var k=l.length;for(b=He(b),b<0&&(b=-b>k?0:k+b),R=R===r||R>k?k:He(R),R<0&&(R+=k),R=b>R?0:gO(R);b<R;)l[b++]=f;return l}function e_(l,f){var b=[];return Ai(l,function(R,k,F){f(R,k,F)&&b.push(R)}),b}function cr(l,f,b,R,k){var F=-1,ee=l.length;for(b||(b=Y8),k||(k=[]);++F<ee;){var oe=l[F];f>0&&b(oe)?f>1?cr(oe,f-1,b,R,k):Pi(k,oe):R||(k[k.length]=oe)}return k}var Bf=C_(),t_=C_(!0);function Xn(l,f){return l&&Bf(l,f,rr)}function Ff(l,f){return l&&t_(l,f,rr)}function fc(l,f){return Ti(f,function(b){return vi(l[b])})}function fo(l,f){f=ji(f,l);for(var b=0,R=f.length;l!=null&&b<R;)l=l[kn(f[b++])];return b&&b==R?l:r}function r_(l,f,b){var R=f(l);return Ve(l)?R:Pi(R,b(l))}function Er(l){return l==null?l===r?tt:de:so&&so in mt(l)?V8(l):rB(l)}function $f(l,f){return l>f}function l8(l,f){return l!=null&<.call(l,f)}function c8(l,f){return l!=null&&f in mt(l)}function u8(l,f,b){return l>=gr(f,b)&&l<Yt(f,b)}function Vf(l,f,b){for(var R=b?Of:Gl,k=l[0].length,F=l.length,ee=F,oe=fe(F),ce=1/0,me=[];ee--;){var be=l[ee];ee&&f&&(be=Ct(be,Jr(f))),ce=gr(be.length,ce),oe[ee]=!b&&(f||k>=120&&be.length>=120)?new co(ee&&be):r}be=l[0];var we=-1,_e=oe[0];e:for(;++we<k&&me.length<ce;){var Pe=be[we],qe=f?f(Pe):Pe;if(Pe=b||Pe!==0?Pe:0,!(_e?os(_e,qe):R(me,qe,b))){for(ee=F;--ee;){var We=oe[ee];if(!(We?os(We,qe):R(l[ee],qe,b)))continue e}_e&&_e.push(qe),me.push(Pe)}}return me}function d8(l,f,b,R){return Xn(l,function(k,F,ee){f(R,b(k),F,ee)}),R}function hs(l,f,b){f=ji(f,l),l=V_(l,f);var R=l==null?l:l[kn(gn(f))];return R==null?r:Xr(R,l,b)}function n_(l){return Dt(l)&&Er(l)==H}function f8(l){return Dt(l)&&Er(l)==ze}function h8(l){return Dt(l)&&Er(l)==ne}function ps(l,f,b,R,k){return l===f?!0:l==null||f==null||!Dt(l)&&!Dt(f)?l!==l&&f!==f:p8(l,f,b,R,ps,k)}function p8(l,f,b,R,k,F){var ee=Ve(l),oe=Ve(f),ce=ee?q:mr(l),me=oe?q:mr(f);ce=ce==H?le:ce,me=me==H?le:me;var be=ce==le,we=me==le,_e=ce==me;if(_e&&zi(l)){if(!zi(f))return!1;ee=!0,be=!1}if(_e&&!be)return F||(F=new Mn),ee||ta(l)?j_(l,f,b,R,k,F):F8(l,f,ce,b,R,k,F);if(!(b&m)){var Pe=be&<.call(l,"__wrapped__"),qe=we&<.call(f,"__wrapped__");if(Pe||qe){var We=Pe?l.value():l,Ae=qe?f.value():f;return F||(F=new Mn),k(We,Ae,b,R,F)}}return _e?(F||(F=new Mn),$8(l,f,b,R,k,F)):!1}function v8(l){return Dt(l)&&mr(l)==he}function Hf(l,f,b,R){var k=b.length,F=k,ee=!R;if(l==null)return!F;for(l=mt(l);k--;){var oe=b[k];if(ee&&oe[2]?oe[1]!==l[oe[0]]:!(oe[0]in l))return!1}for(;++k<F;){oe=b[k];var ce=oe[0],me=l[ce],be=oe[1];if(ee&&oe[2]){if(me===r&&!(ce in l))return!1}else{var we=new Mn;if(R)var _e=R(me,be,ce,l,f,we);if(!(_e===r?ps(be,me,m|g,R,we):_e))return!1}}return!0}function i_(l){if(!Nt(l)||Z8(l))return!1;var f=vi(l)?v7:xr;return f.test(po(l))}function g8(l){return Dt(l)&&Er(l)==Ie}function m8(l){return Dt(l)&&mr(l)==Te}function b8(l){return Dt(l)&&Nc(l.length)&&!!_t[Er(l)]}function o_(l){return typeof l=="function"?l:l==null?jr:typeof l=="object"?Ve(l)?l_(l[0],l[1]):s_(l):RO(l)}function Wf(l){if(!ms(l))return w7(l);var f=[];for(var b in mt(l))lt.call(l,b)&&b!="constructor"&&f.push(b);return f}function y8(l){if(!Nt(l))return tB(l);var f=ms(l),b=[];for(var R in l)R=="constructor"&&(f||!lt.call(l,R))||b.push(R);return b}function Uf(l,f){return l<f}function a_(l,f){var b=-1,R=Ar(l)?fe(l.length):[];return Ai(l,function(k,F,ee){R[++b]=f(k,F,ee)}),R}function s_(l){var f=sh(l);return f.length==1&&f[0][2]?F_(f[0][0],f[0][1]):function(b){return b===l||Hf(b,l,f)}}function l_(l,f){return ch(l)&&B_(f)?F_(kn(l),f):function(b){var R=xh(b,l);return R===r&&R===f?wh(b,l):ps(f,R,m|g)}}function hc(l,f,b,R,k){l!==f&&Bf(f,function(F,ee){if(k||(k=new Mn),Nt(F))x8(l,f,ee,b,hc,R,k);else{var oe=R?R(dh(l,ee),F,ee+"",l,f,k):r;oe===r&&(oe=F),zf(l,ee,oe)}},Dr)}function x8(l,f,b,R,k,F,ee){var oe=dh(l,b),ce=dh(f,b),me=ee.get(ce);if(me){zf(l,b,me);return}var be=F?F(oe,ce,b+"",l,f,ee):r,we=be===r;if(we){var _e=Ve(ce),Pe=!_e&&zi(ce),qe=!_e&&!Pe&&ta(ce);be=ce,_e||Pe||qe?Ve(oe)?be=oe:Ft(oe)?be=kr(oe):Pe?(we=!1,be=x_(ce,!0)):qe?(we=!1,be=w_(ce,!0)):be=[]:ys(ce)||vo(ce)?(be=oe,vo(oe)?be=mO(oe):(!Nt(oe)||vi(oe))&&(be=L_(ce))):we=!1}we&&(ee.set(ce,be),k(be,ce,R,F,ee),ee.delete(ce)),zf(l,b,be)}function c_(l,f){var b=l.length;if(b)return f+=f<0?b:0,pi(f,b)?l[f]:r}function u_(l,f,b){f.length?f=Ct(f,function(F){return Ve(F)?function(ee){return fo(ee,F.length===1?F[0]:F)}:F}):f=[jr];var R=-1;f=Ct(f,Jr(De()));var k=a_(l,function(F,ee,oe){var ce=Ct(f,function(me){return me(F)});return{criteria:ce,index:++R,value:F}});return GL(k,function(F,ee){return k8(F,ee,b)})}function w8(l,f){return d_(l,f,function(b,R){return wh(l,R)})}function d_(l,f,b){for(var R=-1,k=f.length,F={};++R<k;){var ee=f[R],oe=fo(l,ee);b(oe,ee)&&vs(F,ji(ee,l),oe)}return F}function S8(l){return function(f){return fo(f,l)}}function Gf(l,f,b,R){var k=R?UL:Ho,F=-1,ee=f.length,oe=l;for(l===f&&(f=kr(f)),b&&(oe=Ct(l,Jr(b)));++F<ee;)for(var ce=0,me=f[F],be=b?b(me):me;(ce=k(oe,be,ce,R))>-1;)oe!==l&&nc.call(oe,ce,1),nc.call(l,ce,1);return l}function f_(l,f){for(var b=l?f.length:0,R=b-1;b--;){var k=f[b];if(b==R||k!==F){var F=k;pi(k)?nc.call(l,k,1):Zf(l,k)}}return l}function Kf(l,f){return l+ac(UE()*(f-l+1))}function E8(l,f,b,R){for(var k=-1,F=Yt(oc((f-l)/(b||1)),0),ee=fe(F);F--;)ee[R?F:++k]=l,l+=b;return ee}function Yf(l,f){var b="";if(!l||f<1||f>re)return b;do f%2&&(b+=l),f=ac(f/2),f&&(l+=l);while(f);return b}function Ue(l,f){return fh($_(l,f,jr),l+"")}function _8(l){return YE(ra(l))}function O8(l,f){var b=ra(l);return Ec(b,uo(f,0,b.length))}function vs(l,f,b,R){if(!Nt(l))return l;f=ji(f,l);for(var k=-1,F=f.length,ee=F-1,oe=l;oe!=null&&++k<F;){var ce=kn(f[k]),me=b;if(ce==="__proto__"||ce==="constructor"||ce==="prototype")return l;if(k!=ee){var be=oe[ce];me=R?R(be,ce,oe):r,me===r&&(me=Nt(be)?be:pi(f[k+1])?[]:{})}ds(oe,ce,me),oe=oe[ce]}return l}var h_=sc?function(l,f){return sc.set(l,f),l}:jr,C8=ic?function(l,f){return ic(l,"toString",{configurable:!0,enumerable:!1,value:Eh(f),writable:!0})}:jr;function I8(l){return Ec(ra(l))}function vn(l,f,b){var R=-1,k=l.length;f<0&&(f=-f>k?0:k+f),b=b>k?k:b,b<0&&(b+=k),k=f>b?0:b-f>>>0,f>>>=0;for(var F=fe(k);++R<k;)F[R]=l[R+f];return F}function R8(l,f){var b;return Ai(l,function(R,k,F){return b=f(R,k,F),!b}),!!b}function pc(l,f,b){var R=0,k=l==null?R:l.length;if(typeof f=="number"&&f===f&&k<=D){for(;R<k;){var F=R+k>>>1,ee=l[F];ee!==null&&!en(ee)&&(b?ee<=f:ee<f)?R=F+1:k=F}return k}return Xf(l,f,jr,b)}function Xf(l,f,b,R){var k=0,F=l==null?0:l.length;if(F===0)return 0;f=b(f);for(var ee=f!==f,oe=f===null,ce=en(f),me=f===r;k<F;){var be=ac((k+F)/2),we=b(l[be]),_e=we!==r,Pe=we===null,qe=we===we,We=en(we);if(ee)var Ae=R||qe;else me?Ae=qe&&(R||_e):oe?Ae=qe&&_e&&(R||!Pe):ce?Ae=qe&&_e&&!Pe&&(R||!We):Pe||We?Ae=!1:Ae=R?we<=f:we<f;Ae?k=be+1:F=be}return gr(F,Q)}function p_(l,f){for(var b=-1,R=l.length,k=0,F=[];++b<R;){var ee=l[b],oe=f?f(ee):ee;if(!b||!An(oe,ce)){var ce=oe;F[k++]=ee===0?0:ee}}return F}function v_(l){return typeof l=="number"?l:en(l)?B:+l}function Qr(l){if(typeof l=="string")return l;if(Ve(l))return Ct(l,Qr)+"";if(en(l))return GE?GE.call(l):"";var f=l+"";return f=="0"&&1/l==-G?"-0":f}function Di(l,f,b){var R=-1,k=Gl,F=l.length,ee=!0,oe=[],ce=oe;if(b)ee=!1,k=Of;else if(F>=i){var me=f?null:L8(l);if(me)return Yl(me);ee=!1,k=os,ce=new co}else ce=f?[]:oe;e:for(;++R<F;){var be=l[R],we=f?f(be):be;if(be=b||be!==0?be:0,ee&&we===we){for(var _e=ce.length;_e--;)if(ce[_e]===we)continue e;f&&ce.push(we),oe.push(be)}else k(ce,we,b)||(ce!==oe&&ce.push(we),oe.push(be))}return oe}function Zf(l,f){f=ji(f,l);var b=-1,R=f.length;if(!R)return!0;for(;++b<R;){var k=kn(f[b]);if(k==="__proto__"&&!lt.call(l,"__proto__")||(k==="constructor"||k==="prototype")&&b<R-1)return!1}var F=V_(l,f);return F==null||delete F[kn(gn(f))]}function g_(l,f,b,R){return vs(l,f,b(fo(l,f)),R)}function vc(l,f,b,R){for(var k=l.length,F=R?k:-1;(R?F--:++F<k)&&f(l[F],F,l););return b?vn(l,R?0:F,R?F+1:k):vn(l,R?F+1:0,R?k:F)}function m_(l,f){var b=l;return b instanceof Qe&&(b=b.value()),Cf(f,function(R,k){return k.func.apply(k.thisArg,Pi([R],k.args))},b)}function Jf(l,f,b){var R=l.length;if(R<2)return R?Di(l[0]):[];for(var k=-1,F=fe(R);++k<R;)for(var ee=l[k],oe=-1;++oe<R;)oe!=k&&(F[k]=fs(F[k]||ee,l[oe],f,b));return Di(cr(F,1),f,b)}function b_(l,f,b){for(var R=-1,k=l.length,F=f.length,ee={};++R<k;){var oe=R<F?f[R]:r;b(ee,l[R],oe)}return ee}function Qf(l){return Ft(l)?l:[]}function eh(l){return typeof l=="function"?l:jr}function ji(l,f){return Ve(l)?l:ch(l,f)?[l]:G_(ct(l))}var N8=Ue;function qi(l,f,b){var R=l.length;return b=b===r?R:b,!f&&b>=R?l:vn(l,f,b)}var y_=g7||function(l){return lr.clearTimeout(l)};function x_(l,f){if(f)return l.slice();var b=l.length,R=FE?FE(b):new l.constructor(b);return l.copy(R),R}function th(l){var f=new l.constructor(l.byteLength);return new tc(f).set(new tc(l)),f}function T8(l,f){var b=f?th(l.buffer):l.buffer;return new l.constructor(b,l.byteOffset,l.byteLength)}function P8(l){var f=new l.constructor(l.source,Fo.exec(l));return f.lastIndex=l.lastIndex,f}function M8(l){return us?mt(us.call(l)):{}}function w_(l,f){var b=f?th(l.buffer):l.buffer;return new l.constructor(b,l.byteOffset,l.length)}function S_(l,f){if(l!==f){var b=l!==r,R=l===null,k=l===l,F=en(l),ee=f!==r,oe=f===null,ce=f===f,me=en(f);if(!oe&&!me&&!F&&l>f||F&&ee&&ce&&!oe&&!me||R&&ee&&ce||!b&&ce||!k)return 1;if(!R&&!F&&!me&&l<f||me&&b&&k&&!R&&!F||oe&&b&&k||!ee&&k||!ce)return-1}return 0}function k8(l,f,b){for(var R=-1,k=l.criteria,F=f.criteria,ee=k.length,oe=b.length;++R<ee;){var ce=S_(k[R],F[R]);if(ce){if(R>=oe)return ce;var me=b[R];return ce*(me=="desc"?-1:1)}}return l.index-f.index}function E_(l,f,b,R){for(var k=-1,F=l.length,ee=b.length,oe=-1,ce=f.length,me=Yt(F-ee,0),be=fe(ce+me),we=!R;++oe<ce;)be[oe]=f[oe];for(;++k<ee;)(we||k<F)&&(be[b[k]]=l[k]);for(;me--;)be[oe++]=l[k++];return be}function __(l,f,b,R){for(var k=-1,F=l.length,ee=-1,oe=b.length,ce=-1,me=f.length,be=Yt(F-oe,0),we=fe(be+me),_e=!R;++k<be;)we[k]=l[k];for(var Pe=k;++ce<me;)we[Pe+ce]=f[ce];for(;++ee<oe;)(_e||k<F)&&(we[Pe+b[ee]]=l[k++]);return we}function kr(l,f){var b=-1,R=l.length;for(f||(f=fe(R));++b<R;)f[b]=l[b];return f}function Zn(l,f,b,R){var k=!b;b||(b={});for(var F=-1,ee=f.length;++F<ee;){var oe=f[F],ce=R?R(b[oe],l[oe],oe,b,l):r;ce===r&&(ce=l[oe]),k?Yn(b,oe,ce):ds(b,oe,ce)}return b}function A8(l,f){return Zn(l,lh(l),f)}function D8(l,f){return Zn(l,q_(l),f)}function gc(l,f){return function(b,R){var k=Ve(b)?BL:n8,F=f?f():{};return k(b,l,De(R,2),F)}}function Jo(l){return Ue(function(f,b){var R=-1,k=b.length,F=k>1?b[k-1]:r,ee=k>2?b[2]:r;for(F=l.length>3&&typeof F=="function"?(k--,F):r,ee&&_r(b[0],b[1],ee)&&(F=k<3?r:F,k=1),f=mt(f);++R<k;){var oe=b[R];oe&&l(f,oe,R,F)}return f})}function O_(l,f){return function(b,R){if(b==null)return b;if(!Ar(b))return l(b,R);for(var k=b.length,F=f?k:-1,ee=mt(b);(f?F--:++F<k)&&R(ee[F],F,ee)!==!1;);return b}}function C_(l){return function(f,b,R){for(var k=-1,F=mt(f),ee=R(f),oe=ee.length;oe--;){var ce=ee[l?oe:++k];if(b(F[ce],ce,F)===!1)break}return f}}function j8(l,f,b){var R=f&w,k=gs(l);function F(){var ee=this&&this!==lr&&this instanceof F?k:l;return ee.apply(R?b:this,arguments)}return F}function I_(l){return function(f){f=ct(f);var b=Wo(f)?Pn(f):r,R=b?b[0]:f.charAt(0),k=b?qi(b,1).join(""):f.slice(1);return R[l]()+k}}function Qo(l){return function(f){return Cf(CO(OO(f).replace(CL,"")),l,"")}}function gs(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 b=Zo(l.prototype),R=l.apply(b,f);return Nt(R)?R:b}}function q8(l,f,b){var R=gs(l);function k(){for(var F=arguments.length,ee=fe(F),oe=F,ce=ea(k);oe--;)ee[oe]=arguments[oe];var me=F<3&&ee[0]!==ce&&ee[F-1]!==ce?[]:Mi(ee,ce);if(F-=me.length,F<b)return M_(l,f,mc,k.placeholder,r,ee,me,r,r,b-F);var be=this&&this!==lr&&this instanceof k?R:l;return Xr(be,this,ee)}return k}function R_(l){return function(f,b,R){var k=mt(f);if(!Ar(f)){var F=De(b,3);f=rr(f),b=function(oe){return F(k[oe],oe,k)}}var ee=l(f,b,R);return ee>-1?k[F?f[ee]:ee]:r}}function N_(l){return hi(function(f){var b=f.length,R=b,k=hn.prototype.thru;for(l&&f.reverse();R--;){var F=f[R];if(typeof F!="function")throw new fn(a);if(k&&!ee&&wc(F)=="wrapper")var ee=new hn([],!0)}for(R=ee?R:b;++R<b;){F=f[R];var oe=wc(F),ce=oe=="wrapper"?ah(F):r;ce&&uh(ce[0])&&ce[1]==(T|S|I|M)&&!ce[4].length&&ce[9]==1?ee=ee[wc(ce[0])].apply(ee,ce[3]):ee=F.length==1&&uh(F)?ee[oe]():ee.thru(F)}return function(){var me=arguments,be=me[0];if(ee&&me.length==1&&Ve(be))return ee.plant(be).value();for(var we=0,_e=b?f[we].apply(this,me):be;++we<b;)_e=f[we].call(this,_e);return _e}})}function mc(l,f,b,R,k,F,ee,oe,ce,me){var be=f&T,we=f&w,_e=f&x,Pe=f&(S|E),qe=f&z,We=_e?r:gs(l);function Ae(){for(var Ye=arguments.length,et=fe(Ye),tn=Ye;tn--;)et[tn]=arguments[tn];if(Pe)var Or=ea(Ae),rn=YL(et,Or);if(R&&(et=E_(et,R,k,Pe)),F&&(et=__(et,F,ee,Pe)),Ye-=rn,Pe&&Ye<me){var $t=Mi(et,Or);return M_(l,f,mc,Ae.placeholder,b,et,$t,oe,ce,me-Ye)}var Dn=we?b:this,mi=_e?Dn[l]:l;return Ye=et.length,oe?et=nB(et,oe):qe&&Ye>1&&et.reverse(),be&&ce<Ye&&(et.length=ce),this&&this!==lr&&this instanceof Ae&&(mi=We||gs(mi)),mi.apply(Dn,et)}return Ae}function T_(l,f){return function(b,R){return d8(b,l,f(R),{})}}function bc(l,f){return function(b,R){var k;if(b===r&&R===r)return f;if(b!==r&&(k=b),R!==r){if(k===r)return R;typeof b=="string"||typeof R=="string"?(b=Qr(b),R=Qr(R)):(b=v_(b),R=v_(R)),k=l(b,R)}return k}}function rh(l){return hi(function(f){return f=Ct(f,Jr(De())),Ue(function(b){var R=this;return l(f,function(k){return Xr(k,R,b)})})})}function yc(l,f){f=f===r?" ":Qr(f);var b=f.length;if(b<2)return b?Yf(f,l):f;var R=Yf(f,oc(l/Uo(f)));return Wo(f)?qi(Pn(R),0,l).join(""):R.slice(0,l)}function z8(l,f,b,R){var k=f&w,F=gs(l);function ee(){for(var oe=-1,ce=arguments.length,me=-1,be=R.length,we=fe(be+ce),_e=this&&this!==lr&&this instanceof ee?F:l;++me<be;)we[me]=R[me];for(;ce--;)we[me++]=arguments[++oe];return Xr(_e,k?b:this,we)}return ee}function P_(l){return function(f,b,R){return R&&typeof R!="number"&&_r(f,b,R)&&(b=R=r),f=gi(f),b===r?(b=f,f=0):b=gi(b),R=R===r?f<b?1:-1:gi(R),E8(f,b,R,l)}}function xc(l){return function(f,b){return typeof f=="string"&&typeof b=="string"||(f=mn(f),b=mn(b)),l(f,b)}}function M_(l,f,b,R,k,F,ee,oe,ce,me){var be=f&S,we=be?ee:r,_e=be?r:ee,Pe=be?F:r,qe=be?r:F;f|=be?I:N,f&=~(be?N:I),f&_||(f&=-4);var We=[l,f,k,Pe,we,qe,_e,oe,ce,me],Ae=b.apply(r,We);return uh(l)&&H_(Ae,We),Ae.placeholder=R,W_(Ae,l,f)}function nh(l){var f=Kt[l];return function(b,R){if(b=mn(b),R=R==null?0:gr(He(R),292),R&&WE(b)){var k=(ct(b)+"e").split("e"),F=f(k[0]+"e"+(+k[1]+R));return k=(ct(F)+"e").split("e"),+(k[0]+"e"+(+k[1]-R))}return f(b)}}var L8=Yo&&1/Yl(new Yo([,-0]))[1]==G?function(l){return new Yo(l)}:Ch;function k_(l){return function(f){var b=mr(f);return b==he?kf(f):b==Te?r7(f):KL(f,l(f))}}function fi(l,f,b,R,k,F,ee,oe){var ce=f&x;if(!ce&&typeof l!="function")throw new fn(a);var me=R?R.length:0;if(me||(f&=-97,R=k=r),ee=ee===r?ee:Yt(He(ee),0),oe=oe===r?oe:He(oe),me-=k?k.length:0,f&N){var be=R,we=k;R=k=r}var _e=ce?r:ah(l),Pe=[l,f,b,R,k,be,we,F,ee,oe];if(_e&&eB(Pe,_e),l=Pe[0],f=Pe[1],b=Pe[2],R=Pe[3],k=Pe[4],oe=Pe[9]=Pe[9]===r?ce?0:l.length:Yt(Pe[9]-me,0),!oe&&f&(S|E)&&(f&=-25),!f||f==w)var qe=j8(l,f,b);else f==S||f==E?qe=q8(l,f,oe):(f==I||f==(w|I))&&!k.length?qe=z8(l,f,b,R):qe=mc.apply(r,Pe);var We=_e?h_:H_;return W_(We(qe,Pe),l,f)}function A_(l,f,b,R){return l===r||An(l,Ko[b])&&!lt.call(R,b)?f:l}function D_(l,f,b,R,k,F){return Nt(l)&&Nt(f)&&(F.set(f,l),hc(l,f,r,D_,F),F.delete(f)),l}function B8(l){return ys(l)?r:l}function j_(l,f,b,R,k,F){var ee=b&m,oe=l.length,ce=f.length;if(oe!=ce&&!(ee&&ce>oe))return!1;var me=F.get(l),be=F.get(f);if(me&&be)return me==f&&be==l;var we=-1,_e=!0,Pe=b&g?new co:r;for(F.set(l,f),F.set(f,l);++we<oe;){var qe=l[we],We=f[we];if(R)var Ae=ee?R(We,qe,we,f,l,F):R(qe,We,we,l,f,F);if(Ae!==r){if(Ae)continue;_e=!1;break}if(Pe){if(!If(f,function(Ye,et){if(!os(Pe,et)&&(qe===Ye||k(qe,Ye,b,R,F)))return Pe.push(et)})){_e=!1;break}}else if(!(qe===We||k(qe,We,b,R,F))){_e=!1;break}}return F.delete(l),F.delete(f),_e}function F8(l,f,b,R,k,F,ee){switch(b){case Je:if(l.byteLength!=f.byteLength||l.byteOffset!=f.byteOffset)return!1;l=l.buffer,f=f.buffer;case ze:return!(l.byteLength!=f.byteLength||!F(new tc(l),new tc(f)));case ie:case ne:case ue:return An(+l,+f);case Z:return l.name==f.name&&l.message==f.message;case Ie:case Me:return l==f+"";case he:var oe=kf;case Te:var ce=R&m;if(oe||(oe=Yl),l.size!=f.size&&!ce)return!1;var me=ee.get(l);if(me)return me==f;R|=g,ee.set(l,f);var be=j_(oe(l),oe(f),R,k,F,ee);return ee.delete(l),be;case Ze:if(us)return us.call(l)==us.call(f)}return!1}function $8(l,f,b,R,k,F){var ee=b&m,oe=ih(l),ce=oe.length,me=ih(f),be=me.length;if(ce!=be&&!ee)return!1;for(var we=ce;we--;){var _e=oe[we];if(!(ee?_e in f:lt.call(f,_e)))return!1}var Pe=F.get(l),qe=F.get(f);if(Pe&&qe)return Pe==f&&qe==l;var We=!0;F.set(l,f),F.set(f,l);for(var Ae=ee;++we<ce;){_e=oe[we];var Ye=l[_e],et=f[_e];if(R)var tn=ee?R(et,Ye,_e,f,l,F):R(Ye,et,_e,l,f,F);if(!(tn===r?Ye===et||k(Ye,et,b,R,F):tn)){We=!1;break}Ae||(Ae=_e=="constructor")}if(We&&!Ae){var Or=l.constructor,rn=f.constructor;Or!=rn&&"constructor"in l&&"constructor"in f&&!(typeof Or=="function"&&Or instanceof Or&&typeof rn=="function"&&rn instanceof rn)&&(We=!1)}return F.delete(l),F.delete(f),We}function hi(l){return fh($_(l,r,Z_),l+"")}function ih(l){return r_(l,rr,lh)}function oh(l){return r_(l,Dr,q_)}var ah=sc?function(l){return sc.get(l)}:Ch;function wc(l){for(var f=l.name+"",b=Xo[f],R=lt.call(Xo,f)?b.length:0;R--;){var k=b[R],F=k.func;if(F==null||F==l)return k.name}return f}function ea(l){var f=lt.call(L,"placeholder")?L:l;return f.placeholder}function De(){var l=L.iteratee||_h;return l=l===_h?o_:l,arguments.length?l(arguments[0],arguments[1]):l}function Sc(l,f){var b=l.__data__;return X8(f)?b[typeof f=="string"?"string":"hash"]:b.map}function sh(l){for(var f=rr(l),b=f.length;b--;){var R=f[b],k=l[R];f[b]=[R,k,B_(k)]}return f}function ho(l,f){var b=QL(l,f);return i_(b)?b:r}function V8(l){var f=lt.call(l,so),b=l[so];try{l[so]=r;var R=!0}catch{}var k=Ql.call(l);return R&&(f?l[so]=b:delete l[so]),k}var lh=Df?function(l){return l==null?[]:(l=mt(l),Ti(Df(l),function(f){return VE.call(l,f)}))}:Ih,q_=Df?function(l){for(var f=[];l;)Pi(f,lh(l)),l=rc(l);return f}:Ih,mr=Er;(jf&&mr(new jf(new ArrayBuffer(1)))!=Je||ss&&mr(new ss)!=he||qf&&mr(qf.resolve())!=xe||Yo&&mr(new Yo)!=Te||ls&&mr(new ls)!=Fe)&&(mr=function(l){var f=Er(l),b=f==le?l.constructor:r,R=b?po(b):"";if(R)switch(R){case O7:return Je;case C7:return he;case I7:return xe;case R7:return Te;case N7:return Fe}return f});function H8(l,f,b){for(var R=-1,k=b.length;++R<k;){var F=b[R],ee=F.size;switch(F.type){case"drop":l+=ee;break;case"dropRight":f-=ee;break;case"take":f=gr(f,l+ee);break;case"takeRight":l=Yt(l,f-ee);break}}return{start:l,end:f}}function W8(l){var f=l.match(Za);return f?f[1].split(Gn):[]}function z_(l,f,b){f=ji(f,l);for(var R=-1,k=f.length,F=!1;++R<k;){var ee=kn(f[R]);if(!(F=l!=null&&b(l,ee)))break;l=l[ee]}return F||++R!=k?F:(k=l==null?0:l.length,!!k&&Nc(k)&&pi(ee,k)&&(Ve(l)||vo(l)))}function U8(l){var f=l.length,b=new l.constructor(f);return f&&typeof l[0]=="string"&<.call(l,"index")&&(b.index=l.index,b.input=l.input),b}function L_(l){return typeof l.constructor=="function"&&!ms(l)?Zo(rc(l)):{}}function G8(l,f,b){var R=l.constructor;switch(f){case ze:return th(l);case ie:case ne:return new R(+l);case Je:return T8(l,b);case rt:case Pt:case gt:case Rt:case qt:case Ot:case Gr:case Kr:case ar:return w_(l,b);case he:return new R;case ue:case Me:return new R(l);case Ie:return P8(l);case Te:return new R;case Ze:return M8(l)}}function K8(l,f){var b=f.length;if(!b)return l;var R=b-1;return f[R]=(b>1?"& ":"")+f[R],f=f.join(b>2?", ":" "),l.replace(Un,`{
|
|
71
71
|
/* [wrapped with `+f+`] */
|
|
72
|
-
`)}function Y8(l){return Ve(l)||vo(l)||!!(HE&&l&&l[HE])}function pi(l,f){var b=typeof l;return f=f??re,!!f&&(b=="number"||b!="symbol"&&wr.test(l))&&l>-1&&l%1==0&&l<f}function _r(l,f,b){if(!Nt(b))return!1;var R=typeof f;return(R=="number"?Ar(b)&&pi(f,b.length):R=="string"&&f in b)?An(b[f],l):!1}function ch(l,f){if(Ve(l))return!1;var b=typeof l;return b=="number"||b=="symbol"||b=="boolean"||l==null||en(l)?!0:Bt.test(l)||!Et.test(l)||f!=null&&l in mt(f)}function X8(l){var f=typeof l;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?l!=="__proto__":l===null}function uh(l){var f=wc(l),b=L[f];if(typeof b!="function"||!(f in Qe.prototype))return!1;if(l===b)return!0;var R=ah(b);return!!R&&l===R[0]}function Z8(l){return!!BE&&BE in l}var J8=Zl?vi:Rh;function ms(l){var f=l&&l.constructor,b=typeof f=="function"&&f.prototype||Ko;return l===b}function B_(l){return l===l&&!Nt(l)}function F_(l,f){return function(b){return b==null?!1:b[l]===f&&(f!==r||l in mt(b))}}function Q8(l){var f=Ic(l,function(R){return b.size===d&&b.clear(),R}),b=f.cache;return f}function eB(l,f){var b=l[1],R=f[1],k=b|R,F=k<(w|x|T),ee=R==T&&b==S||R==T&&b==M&&l[7].length<=f[8]||R==(T|M)&&f[7].length<=f[8]&&b==S;if(!(F||ee))return l;R&w&&(l[2]=f[2],k|=b&w?0:_);var oe=f[3];if(oe){var ce=l[3];l[3]=ce?E_(ce,oe,f[4]):oe,l[4]=ce?Mi(l[3],h):f[4]}return oe=f[5],oe&&(ce=l[5],l[5]=ce?__(ce,oe,f[6]):oe,l[6]=ce?Mi(l[5],h):f[6]),oe=f[7],oe&&(l[7]=oe),R&T&&(l[8]=l[8]==null?f[8]:gr(l[8],f[8])),l[9]==null&&(l[9]=f[9]),l[0]=f[0],l[1]=k,l}function tB(l){var f=[];if(l!=null)for(var b in mt(l))f.push(b);return f}function rB(l){return Ql.call(l)}function $_(l,f,b){return f=Yt(f===r?l.length-1:f,0),function(){for(var R=arguments,k=-1,F=Yt(R.length-f,0),ee=fe(F);++k<F;)ee[k]=R[f+k];k=-1;for(var oe=fe(f+1);++k<f;)oe[k]=R[k];return oe[f]=b(ee),Xr(l,this,oe)}}function V_(l,f){return f.length<2?l:fo(l,vn(f,0,-1))}function nB(l,f){for(var b=l.length,R=gr(f.length,b),k=kr(l);R--;){var F=f[R];l[R]=pi(F,b)?k[F]:r}return l}function dh(l,f){if(!(f==="constructor"&&typeof l[f]=="function")&&f!="__proto__")return l[f]}var H_=U_(h_),bs=b7||function(l,f){return lr.setTimeout(l,f)},fh=U_(C8);function W_(l,f,b){var R=f+"";return fh(l,K8(R,iB(W8(R),b)))}function U_(l){var f=0,b=0;return function(){var R=S7(),k=A-(R-b);if(b=R,k>0){if(++f>=U)return arguments[0]}else f=0;return l.apply(r,arguments)}}function Ec(l,f){var b=-1,R=l.length,k=R-1;for(f=f===r?R:f;++b<f;){var F=Kf(b,k),ee=l[F];l[F]=l[b],l[b]=ee}return l.length=f,l}var G_=Q8(function(l){var f=[];return l.charCodeAt(0)===46&&f.push(""),l.replace(pr,function(b,R,k,F){f.push(k?F.replace(Ri,"$1"):R||b)}),f});function kn(l){if(typeof l=="string"||en(l))return l;var f=l+"";return f=="0"&&1/l==-G?"-0":f}function po(l){if(l!=null){try{return Jl.call(l)}catch{}try{return l+""}catch{}}return""}function iB(l,f){return Zr($,function(b){var R="_."+b[0];f&b[1]&&!Gl(l,R)&&l.push(R)}),l.sort()}function K_(l){if(l instanceof Qe)return l.clone();var f=new hn(l.__wrapped__,l.__chain__);return f.__actions__=kr(l.__actions__),f.__index__=l.__index__,f.__values__=l.__values__,f}function oB(l,f,b){(b?_r(l,f,b):f===r)?f=1:f=Yt(He(f),0);var R=l==null?0:l.length;if(!R||f<1)return[];for(var k=0,F=0,ee=fe(oc(R/f));k<R;)ee[F++]=vn(l,k,k+=f);return ee}function aB(l){for(var f=-1,b=l==null?0:l.length,R=0,k=[];++f<b;){var F=l[f];F&&(k[R++]=F)}return k}function sB(){var l=arguments.length;if(!l)return[];for(var f=fe(l-1),b=arguments[0],R=l;R--;)f[R-1]=arguments[R];return Pi(Ve(b)?kr(b):[b],cr(f,1))}var lB=Ue(function(l,f){return Ft(l)?fs(l,cr(f,1,Ft,!0)):[]}),cB=Ue(function(l,f){var b=gn(f);return Ft(b)&&(b=r),Ft(l)?fs(l,cr(f,1,Ft,!0),De(b,2)):[]}),uB=Ue(function(l,f){var b=gn(f);return Ft(b)&&(b=r),Ft(l)?fs(l,cr(f,1,Ft,!0),r,b):[]});function dB(l,f,b){var R=l==null?0:l.length;return R?(f=b||f===r?1:He(f),vn(l,f<0?0:f,R)):[]}function fB(l,f,b){var R=l==null?0:l.length;return R?(f=b||f===r?1:He(f),f=R-f,vn(l,0,f<0?0:f)):[]}function hB(l,f){return l&&l.length?vc(l,De(f,3),!0,!0):[]}function pB(l,f){return l&&l.length?vc(l,De(f,3),!0):[]}function vB(l,f,b,R){var k=l==null?0:l.length;return k?(b&&typeof b!="number"&&_r(l,f,b)&&(b=0,R=k),s8(l,f,b,R)):[]}function Y_(l,f,b){var R=l==null?0:l.length;if(!R)return-1;var k=b==null?0:He(b);return k<0&&(k=Yt(R+k,0)),Kl(l,De(f,3),k)}function X_(l,f,b){var R=l==null?0:l.length;if(!R)return-1;var k=R-1;return b!==r&&(k=He(b),k=b<0?Yt(R+k,0):gr(k,R-1)),Kl(l,De(f,3),k,!0)}function Z_(l){var f=l==null?0:l.length;return f?cr(l,1):[]}function gB(l){var f=l==null?0:l.length;return f?cr(l,G):[]}function mB(l,f){var b=l==null?0:l.length;return b?(f=f===r?1:He(f),cr(l,f)):[]}function bB(l){for(var f=-1,b=l==null?0:l.length,R={};++f<b;){var k=l[f];Yn(R,k[0],k[1])}return R}function J_(l){return l&&l.length?l[0]:r}function yB(l,f,b){var R=l==null?0:l.length;if(!R)return-1;var k=b==null?0:He(b);return k<0&&(k=Yt(R+k,0)),Ho(l,f,k)}function xB(l){var f=l==null?0:l.length;return f?vn(l,0,-1):[]}var wB=Ue(function(l){var f=Ct(l,Qf);return f.length&&f[0]===l[0]?Vf(f):[]}),SB=Ue(function(l){var f=gn(l),b=Ct(l,Qf);return f===gn(b)?f=r:b.pop(),b.length&&b[0]===l[0]?Vf(b,De(f,2)):[]}),EB=Ue(function(l){var f=gn(l),b=Ct(l,Qf);return f=typeof f=="function"?f:r,f&&b.pop(),b.length&&b[0]===l[0]?Vf(b,r,f):[]});function _B(l,f){return l==null?"":x7.call(l,f)}function gn(l){var f=l==null?0:l.length;return f?l[f-1]:r}function OB(l,f,b){var R=l==null?0:l.length;if(!R)return-1;var k=R;return b!==r&&(k=He(b),k=k<0?Yt(R+k,0):gr(k,R-1)),f===f?i7(l,f,k):Kl(l,ME,k,!0)}function CB(l,f){return l&&l.length?c_(l,He(f)):r}var IB=Ue(Q_);function Q_(l,f){return l&&l.length&&f&&f.length?Gf(l,f):l}function RB(l,f,b){return l&&l.length&&f&&f.length?Gf(l,f,De(b,2)):l}function NB(l,f,b){return l&&l.length&&f&&f.length?Gf(l,f,r,b):l}var TB=hi(function(l,f){var b=l==null?0:l.length,R=Lf(l,f);return f_(l,Ct(f,function(k){return pi(k,b)?+k:k}).sort(S_)),R});function PB(l,f){var b=[];if(!(l&&l.length))return b;var R=-1,k=[],F=l.length;for(f=De(f,3);++R<F;){var ee=l[R];f(ee,R,l)&&(b.push(ee),k.push(R))}return f_(l,k),b}function hh(l){return l==null?l:_7.call(l)}function MB(l,f,b){var R=l==null?0:l.length;return R?(b&&typeof b!="number"&&_r(l,f,b)?(f=0,b=R):(f=f==null?0:He(f),b=b===r?R:He(b)),vn(l,f,b)):[]}function kB(l,f){return pc(l,f)}function AB(l,f,b){return Xf(l,f,De(b,2))}function DB(l,f){var b=l==null?0:l.length;if(b){var R=pc(l,f);if(R<b&&An(l[R],f))return R}return-1}function jB(l,f){return pc(l,f,!0)}function qB(l,f,b){return Xf(l,f,De(b,2),!0)}function zB(l,f){var b=l==null?0:l.length;if(b){var R=pc(l,f,!0)-1;if(An(l[R],f))return R}return-1}function LB(l){return l&&l.length?p_(l):[]}function BB(l,f){return l&&l.length?p_(l,De(f,2)):[]}function FB(l){var f=l==null?0:l.length;return f?vn(l,1,f):[]}function $B(l,f,b){return l&&l.length?(f=b||f===r?1:He(f),vn(l,0,f<0?0:f)):[]}function VB(l,f,b){var R=l==null?0:l.length;return R?(f=b||f===r?1:He(f),f=R-f,vn(l,f<0?0:f,R)):[]}function HB(l,f){return l&&l.length?vc(l,De(f,3),!1,!0):[]}function WB(l,f){return l&&l.length?vc(l,De(f,3)):[]}var UB=Ue(function(l){return Di(cr(l,1,Ft,!0))}),GB=Ue(function(l){var f=gn(l);return Ft(f)&&(f=r),Di(cr(l,1,Ft,!0),De(f,2))}),KB=Ue(function(l){var f=gn(l);return f=typeof f=="function"?f:r,Di(cr(l,1,Ft,!0),r,f)});function YB(l){return l&&l.length?Di(l):[]}function XB(l,f){return l&&l.length?Di(l,De(f,2)):[]}function ZB(l,f){return f=typeof f=="function"?f:r,l&&l.length?Di(l,r,f):[]}function ph(l){if(!(l&&l.length))return[];var f=0;return l=Ti(l,function(b){if(Ft(b))return f=Yt(b.length,f),!0}),Pf(f,function(b){return Ct(l,Rf(b))})}function eO(l,f){if(!(l&&l.length))return[];var b=ph(l);return f==null?b:Ct(b,function(R){return Xr(f,r,R)})}var JB=Ue(function(l,f){return Ft(l)?fs(l,f):[]}),QB=Ue(function(l){return Jf(Ti(l,Ft))}),eF=Ue(function(l){var f=gn(l);return Ft(f)&&(f=r),Jf(Ti(l,Ft),De(f,2))}),tF=Ue(function(l){var f=gn(l);return f=typeof f=="function"?f:r,Jf(Ti(l,Ft),r,f)}),rF=Ue(ph);function nF(l,f){return b_(l||[],f||[],ds)}function iF(l,f){return b_(l||[],f||[],vs)}var oF=Ue(function(l){var f=l.length,b=f>1?l[f-1]:r;return b=typeof b=="function"?(l.pop(),b):r,eO(l,b)});function tO(l){var f=L(l);return f.__chain__=!0,f}function aF(l,f){return f(l),l}function _c(l,f){return f(l)}var sF=hi(function(l){var f=l.length,b=f?l[0]:0,R=this.__wrapped__,k=function(F){return Lf(F,l)};return f>1||this.__actions__.length||!(R instanceof Qe)||!pi(b)?this.thru(k):(R=R.slice(b,+b+(f?1:0)),R.__actions__.push({func:_c,args:[k],thisArg:r}),new hn(R,this.__chain__).thru(function(F){return f&&!F.length&&F.push(r),F}))});function lF(){return tO(this)}function cF(){return new hn(this.value(),this.__chain__)}function uF(){this.__values__===r&&(this.__values__=vO(this.value()));var l=this.__index__>=this.__values__.length,f=l?r:this.__values__[this.__index__++];return{done:l,value:f}}function dF(){return this}function fF(l){for(var f,b=this;b instanceof cc;){var R=K_(b);R.__index__=0,R.__values__=r,f?k.__wrapped__=R:f=R;var k=R;b=b.__wrapped__}return k.__wrapped__=l,f}function hF(){var l=this.__wrapped__;if(l instanceof Qe){var f=l;return this.__actions__.length&&(f=new Qe(this)),f=f.reverse(),f.__actions__.push({func:_c,args:[hh],thisArg:r}),new hn(f,this.__chain__)}return this.thru(hh)}function pF(){return m_(this.__wrapped__,this.__actions__)}var vF=gc(function(l,f,b){lt.call(l,b)?++l[b]:Yn(l,b,1)});function gF(l,f,b){var R=Ve(l)?TE:a8;return b&&_r(l,f,b)&&(f=r),R(l,De(f,3))}function mF(l,f){var b=Ve(l)?Ti:e_;return b(l,De(f,3))}var bF=R_(Y_),yF=R_(X_);function xF(l,f){return cr(Oc(l,f),1)}function wF(l,f){return cr(Oc(l,f),G)}function SF(l,f,b){return b=b===r?1:He(b),cr(Oc(l,f),b)}function rO(l,f){var b=Ve(l)?Zr:Ai;return b(l,De(f,3))}function nO(l,f){var b=Ve(l)?FL:QE;return b(l,De(f,3))}var EF=gc(function(l,f,b){lt.call(l,b)?l[b].push(f):Yn(l,b,[f])});function _F(l,f,b,R){l=Ar(l)?l:ra(l),b=b&&!R?He(b):0;var k=l.length;return b<0&&(b=Yt(k+b,0)),Tc(l)?b<=k&&l.indexOf(f,b)>-1:!!k&&Ho(l,f,b)>-1}var OF=Ue(function(l,f,b){var R=-1,k=typeof f=="function",F=Ar(l)?fe(l.length):[];return Ai(l,function(ee){F[++R]=k?Xr(f,ee,b):hs(ee,f,b)}),F}),CF=gc(function(l,f,b){Yn(l,b,f)});function Oc(l,f){var b=Ve(l)?Ct:a_;return b(l,De(f,3))}function IF(l,f,b,R){return l==null?[]:(Ve(f)||(f=f==null?[]:[f]),b=R?r:b,Ve(b)||(b=b==null?[]:[b]),u_(l,f,b))}var RF=gc(function(l,f,b){l[b?0:1].push(f)},function(){return[[],[]]});function NF(l,f,b){var R=Ve(l)?Cf:AE,k=arguments.length<3;return R(l,De(f,4),b,k,Ai)}function TF(l,f,b){var R=Ve(l)?$L:AE,k=arguments.length<3;return R(l,De(f,4),b,k,QE)}function PF(l,f){var b=Ve(l)?Ti:e_;return b(l,Rc(De(f,3)))}function MF(l){var f=Ve(l)?YE:_8;return f(l)}function kF(l,f,b){(b?_r(l,f,b):f===r)?f=1:f=He(f);var R=Ve(l)?t8:O8;return R(l,f)}function AF(l){var f=Ve(l)?r8:I8;return f(l)}function DF(l){if(l==null)return 0;if(Ar(l))return Tc(l)?Uo(l):l.length;var f=mr(l);return f==he||f==Te?l.size:Wf(l).length}function jF(l,f,b){var R=Ve(l)?If:R8;return b&&_r(l,f,b)&&(f=r),R(l,De(f,3))}var qF=Ue(function(l,f){if(l==null)return[];var b=f.length;return b>1&&_r(l,f[0],f[1])?f=[]:b>2&&_r(f[0],f[1],f[2])&&(f=[f[0]]),u_(l,cr(f,1),[])}),Cc=m7||function(){return lr.Date.now()};function zF(l,f){if(typeof f!="function")throw new fn(a);return l=He(l),function(){if(--l<1)return f.apply(this,arguments)}}function iO(l,f,b){return f=b?r:f,f=l&&f==null?l.length:f,fi(l,T,r,r,r,r,f)}function oO(l,f){var b;if(typeof f!="function")throw new fn(a);return l=He(l),function(){return--l>0&&(b=f.apply(this,arguments)),l<=1&&(f=r),b}}var vh=Ue(function(l,f,b){var R=w;if(b.length){var k=Mi(b,ea(vh));R|=I}return fi(l,R,f,b,k)}),aO=Ue(function(l,f,b){var R=w|x;if(b.length){var k=Mi(b,ea(aO));R|=I}return fi(f,R,l,b,k)});function sO(l,f,b){f=b?r:f;var R=fi(l,S,r,r,r,r,r,f);return R.placeholder=sO.placeholder,R}function lO(l,f,b){f=b?r:f;var R=fi(l,E,r,r,r,r,r,f);return R.placeholder=lO.placeholder,R}function cO(l,f,b){var R,k,F,ee,oe,ce,me=0,be=!1,we=!1,_e=!0;if(typeof l!="function")throw new fn(a);f=mn(f)||0,Nt(b)&&(be=!!b.leading,we="maxWait"in b,F=we?Yt(mn(b.maxWait)||0,f):F,_e="trailing"in b?!!b.trailing:_e);function Pe($t){var Dn=R,mi=k;return R=k=r,me=$t,ee=l.apply(mi,Dn),ee}function qe($t){return me=$t,oe=bs(Ye,f),be?Pe($t):ee}function We($t){var Dn=$t-ce,mi=$t-me,NO=f-Dn;return we?gr(NO,F-mi):NO}function Ae($t){var Dn=$t-ce,mi=$t-me;return ce===r||Dn>=f||Dn<0||we&&mi>=F}function Ye(){var $t=Cc();if(Ae($t))return et($t);oe=bs(Ye,We($t))}function et($t){return oe=r,_e&&R?Pe($t):(R=k=r,ee)}function tn(){oe!==r&&y_(oe),me=0,R=ce=k=oe=r}function Or(){return oe===r?ee:et(Cc())}function rn(){var $t=Cc(),Dn=Ae($t);if(R=arguments,k=this,ce=$t,Dn){if(oe===r)return qe(ce);if(we)return y_(oe),oe=bs(Ye,f),Pe(ce)}return oe===r&&(oe=bs(Ye,f)),ee}return rn.cancel=tn,rn.flush=Or,rn}var LF=Ue(function(l,f){return JE(l,1,f)}),BF=Ue(function(l,f,b){return JE(l,mn(f)||0,b)});function FF(l){return fi(l,z)}function Ic(l,f){if(typeof l!="function"||f!=null&&typeof f!="function")throw new fn(a);var b=function(){var R=arguments,k=f?f.apply(this,R):R[0],F=b.cache;if(F.has(k))return F.get(k);var ee=l.apply(this,R);return b.cache=F.set(k,ee)||F,ee};return b.cache=new(Ic.Cache||di),b}Ic.Cache=di;function Rc(l){if(typeof l!="function")throw new fn(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 $F(l){return oO(2,l)}var VF=N8(function(l,f){f=f.length==1&&Ve(f[0])?Ct(f[0],Jr(De())):Ct(cr(f,1),Jr(De()));var b=f.length;return Ue(function(R){for(var k=-1,F=gr(R.length,b);++k<F;)R[k]=f[k].call(this,R[k]);return Xr(l,this,R)})}),gh=Ue(function(l,f){var b=Mi(f,ea(gh));return fi(l,I,r,f,b)}),uO=Ue(function(l,f){var b=Mi(f,ea(uO));return fi(l,N,r,f,b)}),HF=hi(function(l,f){return fi(l,M,r,r,r,f)});function WF(l,f){if(typeof l!="function")throw new fn(a);return f=f===r?f:He(f),Ue(l,f)}function UF(l,f){if(typeof l!="function")throw new fn(a);return f=f==null?0:Yt(He(f),0),Ue(function(b){var R=b[f],k=qi(b,0,f);return R&&Pi(k,R),Xr(l,this,k)})}function GF(l,f,b){var R=!0,k=!0;if(typeof l!="function")throw new fn(a);return Nt(b)&&(R="leading"in b?!!b.leading:R,k="trailing"in b?!!b.trailing:k),cO(l,f,{leading:R,maxWait:f,trailing:k})}function KF(l){return iO(l,1)}function YF(l,f){return gh(eh(f),l)}function XF(){if(!arguments.length)return[];var l=arguments[0];return Ve(l)?l:[l]}function ZF(l){return pn(l,y)}function JF(l,f){return f=typeof f=="function"?f:r,pn(l,y,f)}function QF(l){return pn(l,p|y)}function e9(l,f){return f=typeof f=="function"?f:r,pn(l,p|y,f)}function t9(l,f){return f==null||ZE(l,f,rr(f))}function An(l,f){return l===f||l!==l&&f!==f}var r9=xc($f),n9=xc(function(l,f){return l>=f}),vo=n_((function(){return arguments})())?n_:function(l){return Dt(l)&<.call(l,"callee")&&!VE.call(l,"callee")},Ve=fe.isArray,i9=_E?Jr(_E):f8;function Ar(l){return l!=null&&Nc(l.length)&&!vi(l)}function Ft(l){return Dt(l)&&Ar(l)}function o9(l){return l===!0||l===!1||Dt(l)&&Er(l)==ie}var zi=y7||Rh,a9=OE?Jr(OE):h8;function s9(l){return Dt(l)&&l.nodeType===1&&!ys(l)}function l9(l){if(l==null)return!0;if(Ar(l)&&(Ve(l)||typeof l=="string"||typeof l.splice=="function"||zi(l)||ta(l)||vo(l)))return!l.length;var f=mr(l);if(f==he||f==Te)return!l.size;if(ms(l))return!Wf(l).length;for(var b in l)if(lt.call(l,b))return!1;return!0}function c9(l,f){return ps(l,f)}function u9(l,f,b){b=typeof b=="function"?b:r;var R=b?b(l,f):r;return R===r?ps(l,f,r,b):!!R}function mh(l){if(!Dt(l))return!1;var f=Er(l);return f==Z||f==ve||typeof l.message=="string"&&typeof l.name=="string"&&!ys(l)}function d9(l){return typeof l=="number"&&WE(l)}function vi(l){if(!Nt(l))return!1;var f=Er(l);return f==J||f==ae||f==Y||f==Ee}function dO(l){return typeof l=="number"&&l==He(l)}function Nc(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=re}function Nt(l){var f=typeof l;return l!=null&&(f=="object"||f=="function")}function Dt(l){return l!=null&&typeof l=="object"}var fO=CE?Jr(CE):v8;function f9(l,f){return l===f||Hf(l,f,sh(f))}function h9(l,f,b){return b=typeof b=="function"?b:r,Hf(l,f,sh(f),b)}function p9(l){return hO(l)&&l!=+l}function v9(l){if(J8(l))throw new Be(o);return i_(l)}function g9(l){return l===null}function m9(l){return l==null}function hO(l){return typeof l=="number"||Dt(l)&&Er(l)==ue}function ys(l){if(!Dt(l)||Er(l)!=le)return!1;var f=rc(l);if(f===null)return!0;var b=lt.call(f,"constructor")&&f.constructor;return typeof b=="function"&&b instanceof b&&Jl.call(b)==h7}var bh=IE?Jr(IE):g8;function b9(l){return dO(l)&&l>=-re&&l<=re}var pO=RE?Jr(RE):m8;function Tc(l){return typeof l=="string"||!Ve(l)&&Dt(l)&&Er(l)==Me}function en(l){return typeof l=="symbol"||Dt(l)&&Er(l)==Ze}var ta=NE?Jr(NE):b8;function y9(l){return l===r}function x9(l){return Dt(l)&&mr(l)==Fe}function w9(l){return Dt(l)&&Er(l)==Le}var S9=xc(Uf),E9=xc(function(l,f){return l<=f});function vO(l){if(!l)return[];if(Ar(l))return Tc(l)?Pn(l):kr(l);if(as&&l[as])return t7(l[as]());var f=mr(l),b=f==he?kf:f==Te?Yl:ra;return b(l)}function gi(l){if(!l)return l===0?l:0;if(l=mn(l),l===G||l===-G){var f=l<0?-1:1;return f*P}return l===l?l:0}function He(l){var f=gi(l),b=f%1;return f===f?b?f-b:f:0}function gO(l){return l?uo(He(l),0,X):0}function mn(l){if(typeof l=="number")return l;if(en(l))return B;if(Nt(l)){var f=typeof l.valueOf=="function"?l.valueOf():l;l=Nt(f)?f+"":f}if(typeof l!="string")return l===0?l:+l;l=DE(l);var b=$e.test(l);return b||Ht.test(l)?zL(l.slice(2),b?2:8):ke.test(l)?B:+l}function mO(l){return Zn(l,Dr(l))}function _9(l){return l?uo(He(l),-re,re):l===0?l:0}function ct(l){return l==null?"":Qr(l)}var O9=Jo(function(l,f){if(ms(f)||Ar(f)){Zn(f,rr(f),l);return}for(var b in f)lt.call(f,b)&&ds(l,b,f[b])}),bO=Jo(function(l,f){Zn(f,Dr(f),l)}),yO=Jo(function(l,f,b,R){Zn(f,Dr(f),l,R)}),yh=Jo(function(l,f,b,R){Zn(f,rr(f),l,R)}),C9=hi(Lf);function I9(l,f){var b=Zo(l);return f==null?b:XE(b,f)}var R9=Ue(function(l,f){l=mt(l);var b=-1,R=f.length,k=R>2?f[2]:r;for(k&&_r(f[0],f[1],k)&&(R=1);++b<R;)for(var F=f[b],ee=Dr(F),oe=-1,ce=ee.length;++oe<ce;){var me=ee[oe],be=l[me];(be===r||An(be,Ko[me])&&!lt.call(l,me))&&(l[me]=F[me])}return l}),N9=Ue(function(l){return l.push(r,D_),Xr(xO,r,l)});function T9(l,f){return PE(l,De(f,3),Xn)}function P9(l,f){return PE(l,De(f,3),Ff)}function M9(l,f){return l==null?l:Bf(l,De(f,3),Dr)}function k9(l,f){return l==null?l:t_(l,De(f,3),Dr)}function A9(l,f){return l&&Xn(l,De(f,3))}function D9(l,f){return l&&Ff(l,De(f,3))}function j9(l){return l==null?[]:fc(l,rr(l))}function q9(l){return l==null?[]:fc(l,Dr(l))}function xh(l,f,b){var R=l==null?r:fo(l,f);return R===r?b:R}function z9(l,f){return l!=null&&z_(l,f,l8)}function wh(l,f){return l!=null&&z_(l,f,c8)}var L9=T_(function(l,f,b){f!=null&&typeof f.toString!="function"&&(f=Ql.call(f)),l[f]=b},Eh(jr)),B9=T_(function(l,f,b){f!=null&&typeof f.toString!="function"&&(f=Ql.call(f)),lt.call(l,f)?l[f].push(b):l[f]=[b]},De),F9=Ue(hs);function rr(l){return Ar(l)?KE(l):Wf(l)}function Dr(l){return Ar(l)?KE(l,!0):y8(l)}function $9(l,f){var b={};return f=De(f,3),Xn(l,function(R,k,F){Yn(b,f(R,k,F),R)}),b}function V9(l,f){var b={};return f=De(f,3),Xn(l,function(R,k,F){Yn(b,k,f(R,k,F))}),b}var H9=Jo(function(l,f,b){hc(l,f,b)}),xO=Jo(function(l,f,b,R){hc(l,f,b,R)}),W9=hi(function(l,f){var b={};if(l==null)return b;var R=!1;f=Ct(f,function(F){return F=ji(F,l),R||(R=F.length>1),F}),Zn(l,oh(l),b),R&&(b=pn(b,p|v|y,B8));for(var k=f.length;k--;)Zf(b,f[k]);return b});function U9(l,f){return wO(l,Rc(De(f)))}var G9=hi(function(l,f){return l==null?{}:w8(l,f)});function wO(l,f){if(l==null)return{};var b=Ct(oh(l),function(R){return[R]});return f=De(f),d_(l,b,function(R,k){return f(R,k[0])})}function K9(l,f,b){f=ji(f,l);var R=-1,k=f.length;for(k||(k=1,l=r);++R<k;){var F=l==null?r:l[kn(f[R])];F===r&&(R=k,F=b),l=vi(F)?F.call(l):F}return l}function Y9(l,f,b){return l==null?l:vs(l,f,b)}function X9(l,f,b,R){return R=typeof R=="function"?R:r,l==null?l:vs(l,f,b,R)}var SO=k_(rr),EO=k_(Dr);function Z9(l,f,b){var R=Ve(l),k=R||zi(l)||ta(l);if(f=De(f,4),b==null){var F=l&&l.constructor;k?b=R?new F:[]:Nt(l)?b=vi(F)?Zo(rc(l)):{}:b={}}return(k?Zr:Xn)(l,function(ee,oe,ce){return f(b,ee,oe,ce)}),b}function J9(l,f){return l==null?!0:Zf(l,f)}function Q9(l,f,b){return l==null?l:g_(l,f,eh(b))}function e$(l,f,b,R){return R=typeof R=="function"?R:r,l==null?l:g_(l,f,eh(b),R)}function ra(l){return l==null?[]:Mf(l,rr(l))}function t$(l){return l==null?[]:Mf(l,Dr(l))}function r$(l,f,b){return b===r&&(b=f,f=r),b!==r&&(b=mn(b),b=b===b?b:0),f!==r&&(f=mn(f),f=f===f?f:0),uo(mn(l),f,b)}function n$(l,f,b){return f=gi(f),b===r?(b=f,f=0):b=gi(b),l=mn(l),u8(l,f,b)}function i$(l,f,b){if(b&&typeof b!="boolean"&&_r(l,f,b)&&(f=b=r),b===r&&(typeof f=="boolean"?(b=f,f=r):typeof l=="boolean"&&(b=l,l=r)),l===r&&f===r?(l=0,f=1):(l=gi(l),f===r?(f=l,l=0):f=gi(f)),l>f){var R=l;l=f,f=R}if(b||l%1||f%1){var k=UE();return gr(l+k*(f-l+qL("1e-"+((k+"").length-1))),f)}return Kf(l,f)}var o$=Qo(function(l,f,b){return f=f.toLowerCase(),l+(b?_O(f):f)});function _O(l){return Sh(ct(l).toLowerCase())}function OO(l){return l=ct(l),l&&l.replace(Sr,XL).replace(IL,"")}function a$(l,f,b){l=ct(l),f=Qr(f);var R=l.length;b=b===r?R:uo(He(b),0,R);var k=b;return b-=f.length,b>=0&&l.slice(b,k)==f}function s$(l){return l=ct(l),l&&kt.test(l)?l.replace(Lt,ZL):l}function l$(l){return l=ct(l),l&&yr.test(l)?l.replace(vr,"\\$&"):l}var c$=Qo(function(l,f,b){return l+(b?"-":"")+f.toLowerCase()}),u$=Qo(function(l,f,b){return l+(b?" ":"")+f.toLowerCase()}),d$=I_("toLowerCase");function f$(l,f,b){l=ct(l),f=He(f);var R=f?Uo(l):0;if(!f||R>=f)return l;var k=(f-R)/2;return yc(ac(k),b)+l+yc(oc(k),b)}function h$(l,f,b){l=ct(l),f=He(f);var R=f?Uo(l):0;return f&&R<f?l+yc(f-R,b):l}function p$(l,f,b){l=ct(l),f=He(f);var R=f?Uo(l):0;return f&&R<f?yc(f-R,b)+l:l}function v$(l,f,b){return b||f==null?f=0:f&&(f=+f),E7(ct(l).replace(sr,""),f||0)}function g$(l,f,b){return(b?_r(l,f,b):f===r)?f=1:f=He(f),Yf(ct(l),f)}function m$(){var l=arguments,f=ct(l[0]);return l.length<3?f:f.replace(l[1],l[2])}var b$=Qo(function(l,f,b){return l+(b?"_":"")+f.toLowerCase()});function y$(l,f,b){return b&&typeof b!="number"&&_r(l,f,b)&&(f=b=r),b=b===r?X:b>>>0,b?(l=ct(l),l&&(typeof f=="string"||f!=null&&!bh(f))&&(f=Qr(f),!f&&Wo(l))?qi(Pn(l),0,b):l.split(f,b)):[]}var x$=Qo(function(l,f,b){return l+(b?" ":"")+Sh(f)});function w$(l,f,b){return l=ct(l),b=b==null?0:uo(He(b),0,l.length),f=Qr(f),l.slice(b,b+f.length)==f}function S$(l,f,b){var R=L.templateSettings;b&&_r(l,f,b)&&(f=r),l=ct(l),f=yh({},f,R,A_);var k=yh({},f.imports,R.imports,A_),F=rr(k),ee=Mf(k,F);Zr(F,function(Ae){if(Kn.test(Ae))throw new Be(c)});var oe,ce,me=0,be=f.interpolate||tr,we="__p += '",_e=Af((f.escape||tr).source+"|"+be.source+"|"+(be===Mr?Bo:tr).source+"|"+(f.evaluate||tr).source+"|$","g"),Pe="//# sourceURL="+(lt.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ML+"]")+`
|
|
72
|
+
`)}function Y8(l){return Ve(l)||vo(l)||!!(HE&&l&&l[HE])}function pi(l,f){var b=typeof l;return f=f??re,!!f&&(b=="number"||b!="symbol"&&wr.test(l))&&l>-1&&l%1==0&&l<f}function _r(l,f,b){if(!Nt(b))return!1;var R=typeof f;return(R=="number"?Ar(b)&&pi(f,b.length):R=="string"&&f in b)?An(b[f],l):!1}function ch(l,f){if(Ve(l))return!1;var b=typeof l;return b=="number"||b=="symbol"||b=="boolean"||l==null||en(l)?!0:Bt.test(l)||!Et.test(l)||f!=null&&l in mt(f)}function X8(l){var f=typeof l;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?l!=="__proto__":l===null}function uh(l){var f=wc(l),b=L[f];if(typeof b!="function"||!(f in Qe.prototype))return!1;if(l===b)return!0;var R=ah(b);return!!R&&l===R[0]}function Z8(l){return!!BE&&BE in l}var J8=Zl?vi:Rh;function ms(l){var f=l&&l.constructor,b=typeof f=="function"&&f.prototype||Ko;return l===b}function B_(l){return l===l&&!Nt(l)}function F_(l,f){return function(b){return b==null?!1:b[l]===f&&(f!==r||l in mt(b))}}function Q8(l){var f=Ic(l,function(R){return b.size===u&&b.clear(),R}),b=f.cache;return f}function eB(l,f){var b=l[1],R=f[1],k=b|R,F=k<(w|x|T),ee=R==T&&b==S||R==T&&b==M&&l[7].length<=f[8]||R==(T|M)&&f[7].length<=f[8]&&b==S;if(!(F||ee))return l;R&w&&(l[2]=f[2],k|=b&w?0:_);var oe=f[3];if(oe){var ce=l[3];l[3]=ce?E_(ce,oe,f[4]):oe,l[4]=ce?Mi(l[3],h):f[4]}return oe=f[5],oe&&(ce=l[5],l[5]=ce?__(ce,oe,f[6]):oe,l[6]=ce?Mi(l[5],h):f[6]),oe=f[7],oe&&(l[7]=oe),R&T&&(l[8]=l[8]==null?f[8]:gr(l[8],f[8])),l[9]==null&&(l[9]=f[9]),l[0]=f[0],l[1]=k,l}function tB(l){var f=[];if(l!=null)for(var b in mt(l))f.push(b);return f}function rB(l){return Ql.call(l)}function $_(l,f,b){return f=Yt(f===r?l.length-1:f,0),function(){for(var R=arguments,k=-1,F=Yt(R.length-f,0),ee=fe(F);++k<F;)ee[k]=R[f+k];k=-1;for(var oe=fe(f+1);++k<f;)oe[k]=R[k];return oe[f]=b(ee),Xr(l,this,oe)}}function V_(l,f){return f.length<2?l:fo(l,vn(f,0,-1))}function nB(l,f){for(var b=l.length,R=gr(f.length,b),k=kr(l);R--;){var F=f[R];l[R]=pi(F,b)?k[F]:r}return l}function dh(l,f){if(!(f==="constructor"&&typeof l[f]=="function")&&f!="__proto__")return l[f]}var H_=U_(h_),bs=b7||function(l,f){return lr.setTimeout(l,f)},fh=U_(C8);function W_(l,f,b){var R=f+"";return fh(l,K8(R,iB(W8(R),b)))}function U_(l){var f=0,b=0;return function(){var R=S7(),k=A-(R-b);if(b=R,k>0){if(++f>=U)return arguments[0]}else f=0;return l.apply(r,arguments)}}function Ec(l,f){var b=-1,R=l.length,k=R-1;for(f=f===r?R:f;++b<f;){var F=Kf(b,k),ee=l[F];l[F]=l[b],l[b]=ee}return l.length=f,l}var G_=Q8(function(l){var f=[];return l.charCodeAt(0)===46&&f.push(""),l.replace(pr,function(b,R,k,F){f.push(k?F.replace(Ri,"$1"):R||b)}),f});function kn(l){if(typeof l=="string"||en(l))return l;var f=l+"";return f=="0"&&1/l==-G?"-0":f}function po(l){if(l!=null){try{return Jl.call(l)}catch{}try{return l+""}catch{}}return""}function iB(l,f){return Zr($,function(b){var R="_."+b[0];f&b[1]&&!Gl(l,R)&&l.push(R)}),l.sort()}function K_(l){if(l instanceof Qe)return l.clone();var f=new hn(l.__wrapped__,l.__chain__);return f.__actions__=kr(l.__actions__),f.__index__=l.__index__,f.__values__=l.__values__,f}function oB(l,f,b){(b?_r(l,f,b):f===r)?f=1:f=Yt(He(f),0);var R=l==null?0:l.length;if(!R||f<1)return[];for(var k=0,F=0,ee=fe(oc(R/f));k<R;)ee[F++]=vn(l,k,k+=f);return ee}function aB(l){for(var f=-1,b=l==null?0:l.length,R=0,k=[];++f<b;){var F=l[f];F&&(k[R++]=F)}return k}function sB(){var l=arguments.length;if(!l)return[];for(var f=fe(l-1),b=arguments[0],R=l;R--;)f[R-1]=arguments[R];return Pi(Ve(b)?kr(b):[b],cr(f,1))}var lB=Ue(function(l,f){return Ft(l)?fs(l,cr(f,1,Ft,!0)):[]}),cB=Ue(function(l,f){var b=gn(f);return Ft(b)&&(b=r),Ft(l)?fs(l,cr(f,1,Ft,!0),De(b,2)):[]}),uB=Ue(function(l,f){var b=gn(f);return Ft(b)&&(b=r),Ft(l)?fs(l,cr(f,1,Ft,!0),r,b):[]});function dB(l,f,b){var R=l==null?0:l.length;return R?(f=b||f===r?1:He(f),vn(l,f<0?0:f,R)):[]}function fB(l,f,b){var R=l==null?0:l.length;return R?(f=b||f===r?1:He(f),f=R-f,vn(l,0,f<0?0:f)):[]}function hB(l,f){return l&&l.length?vc(l,De(f,3),!0,!0):[]}function pB(l,f){return l&&l.length?vc(l,De(f,3),!0):[]}function vB(l,f,b,R){var k=l==null?0:l.length;return k?(b&&typeof b!="number"&&_r(l,f,b)&&(b=0,R=k),s8(l,f,b,R)):[]}function Y_(l,f,b){var R=l==null?0:l.length;if(!R)return-1;var k=b==null?0:He(b);return k<0&&(k=Yt(R+k,0)),Kl(l,De(f,3),k)}function X_(l,f,b){var R=l==null?0:l.length;if(!R)return-1;var k=R-1;return b!==r&&(k=He(b),k=b<0?Yt(R+k,0):gr(k,R-1)),Kl(l,De(f,3),k,!0)}function Z_(l){var f=l==null?0:l.length;return f?cr(l,1):[]}function gB(l){var f=l==null?0:l.length;return f?cr(l,G):[]}function mB(l,f){var b=l==null?0:l.length;return b?(f=f===r?1:He(f),cr(l,f)):[]}function bB(l){for(var f=-1,b=l==null?0:l.length,R={};++f<b;){var k=l[f];Yn(R,k[0],k[1])}return R}function J_(l){return l&&l.length?l[0]:r}function yB(l,f,b){var R=l==null?0:l.length;if(!R)return-1;var k=b==null?0:He(b);return k<0&&(k=Yt(R+k,0)),Ho(l,f,k)}function xB(l){var f=l==null?0:l.length;return f?vn(l,0,-1):[]}var wB=Ue(function(l){var f=Ct(l,Qf);return f.length&&f[0]===l[0]?Vf(f):[]}),SB=Ue(function(l){var f=gn(l),b=Ct(l,Qf);return f===gn(b)?f=r:b.pop(),b.length&&b[0]===l[0]?Vf(b,De(f,2)):[]}),EB=Ue(function(l){var f=gn(l),b=Ct(l,Qf);return f=typeof f=="function"?f:r,f&&b.pop(),b.length&&b[0]===l[0]?Vf(b,r,f):[]});function _B(l,f){return l==null?"":x7.call(l,f)}function gn(l){var f=l==null?0:l.length;return f?l[f-1]:r}function OB(l,f,b){var R=l==null?0:l.length;if(!R)return-1;var k=R;return b!==r&&(k=He(b),k=k<0?Yt(R+k,0):gr(k,R-1)),f===f?i7(l,f,k):Kl(l,ME,k,!0)}function CB(l,f){return l&&l.length?c_(l,He(f)):r}var IB=Ue(Q_);function Q_(l,f){return l&&l.length&&f&&f.length?Gf(l,f):l}function RB(l,f,b){return l&&l.length&&f&&f.length?Gf(l,f,De(b,2)):l}function NB(l,f,b){return l&&l.length&&f&&f.length?Gf(l,f,r,b):l}var TB=hi(function(l,f){var b=l==null?0:l.length,R=Lf(l,f);return f_(l,Ct(f,function(k){return pi(k,b)?+k:k}).sort(S_)),R});function PB(l,f){var b=[];if(!(l&&l.length))return b;var R=-1,k=[],F=l.length;for(f=De(f,3);++R<F;){var ee=l[R];f(ee,R,l)&&(b.push(ee),k.push(R))}return f_(l,k),b}function hh(l){return l==null?l:_7.call(l)}function MB(l,f,b){var R=l==null?0:l.length;return R?(b&&typeof b!="number"&&_r(l,f,b)?(f=0,b=R):(f=f==null?0:He(f),b=b===r?R:He(b)),vn(l,f,b)):[]}function kB(l,f){return pc(l,f)}function AB(l,f,b){return Xf(l,f,De(b,2))}function DB(l,f){var b=l==null?0:l.length;if(b){var R=pc(l,f);if(R<b&&An(l[R],f))return R}return-1}function jB(l,f){return pc(l,f,!0)}function qB(l,f,b){return Xf(l,f,De(b,2),!0)}function zB(l,f){var b=l==null?0:l.length;if(b){var R=pc(l,f,!0)-1;if(An(l[R],f))return R}return-1}function LB(l){return l&&l.length?p_(l):[]}function BB(l,f){return l&&l.length?p_(l,De(f,2)):[]}function FB(l){var f=l==null?0:l.length;return f?vn(l,1,f):[]}function $B(l,f,b){return l&&l.length?(f=b||f===r?1:He(f),vn(l,0,f<0?0:f)):[]}function VB(l,f,b){var R=l==null?0:l.length;return R?(f=b||f===r?1:He(f),f=R-f,vn(l,f<0?0:f,R)):[]}function HB(l,f){return l&&l.length?vc(l,De(f,3),!1,!0):[]}function WB(l,f){return l&&l.length?vc(l,De(f,3)):[]}var UB=Ue(function(l){return Di(cr(l,1,Ft,!0))}),GB=Ue(function(l){var f=gn(l);return Ft(f)&&(f=r),Di(cr(l,1,Ft,!0),De(f,2))}),KB=Ue(function(l){var f=gn(l);return f=typeof f=="function"?f:r,Di(cr(l,1,Ft,!0),r,f)});function YB(l){return l&&l.length?Di(l):[]}function XB(l,f){return l&&l.length?Di(l,De(f,2)):[]}function ZB(l,f){return f=typeof f=="function"?f:r,l&&l.length?Di(l,r,f):[]}function ph(l){if(!(l&&l.length))return[];var f=0;return l=Ti(l,function(b){if(Ft(b))return f=Yt(b.length,f),!0}),Pf(f,function(b){return Ct(l,Rf(b))})}function eO(l,f){if(!(l&&l.length))return[];var b=ph(l);return f==null?b:Ct(b,function(R){return Xr(f,r,R)})}var JB=Ue(function(l,f){return Ft(l)?fs(l,f):[]}),QB=Ue(function(l){return Jf(Ti(l,Ft))}),eF=Ue(function(l){var f=gn(l);return Ft(f)&&(f=r),Jf(Ti(l,Ft),De(f,2))}),tF=Ue(function(l){var f=gn(l);return f=typeof f=="function"?f:r,Jf(Ti(l,Ft),r,f)}),rF=Ue(ph);function nF(l,f){return b_(l||[],f||[],ds)}function iF(l,f){return b_(l||[],f||[],vs)}var oF=Ue(function(l){var f=l.length,b=f>1?l[f-1]:r;return b=typeof b=="function"?(l.pop(),b):r,eO(l,b)});function tO(l){var f=L(l);return f.__chain__=!0,f}function aF(l,f){return f(l),l}function _c(l,f){return f(l)}var sF=hi(function(l){var f=l.length,b=f?l[0]:0,R=this.__wrapped__,k=function(F){return Lf(F,l)};return f>1||this.__actions__.length||!(R instanceof Qe)||!pi(b)?this.thru(k):(R=R.slice(b,+b+(f?1:0)),R.__actions__.push({func:_c,args:[k],thisArg:r}),new hn(R,this.__chain__).thru(function(F){return f&&!F.length&&F.push(r),F}))});function lF(){return tO(this)}function cF(){return new hn(this.value(),this.__chain__)}function uF(){this.__values__===r&&(this.__values__=vO(this.value()));var l=this.__index__>=this.__values__.length,f=l?r:this.__values__[this.__index__++];return{done:l,value:f}}function dF(){return this}function fF(l){for(var f,b=this;b instanceof cc;){var R=K_(b);R.__index__=0,R.__values__=r,f?k.__wrapped__=R:f=R;var k=R;b=b.__wrapped__}return k.__wrapped__=l,f}function hF(){var l=this.__wrapped__;if(l instanceof Qe){var f=l;return this.__actions__.length&&(f=new Qe(this)),f=f.reverse(),f.__actions__.push({func:_c,args:[hh],thisArg:r}),new hn(f,this.__chain__)}return this.thru(hh)}function pF(){return m_(this.__wrapped__,this.__actions__)}var vF=gc(function(l,f,b){lt.call(l,b)?++l[b]:Yn(l,b,1)});function gF(l,f,b){var R=Ve(l)?TE:a8;return b&&_r(l,f,b)&&(f=r),R(l,De(f,3))}function mF(l,f){var b=Ve(l)?Ti:e_;return b(l,De(f,3))}var bF=R_(Y_),yF=R_(X_);function xF(l,f){return cr(Oc(l,f),1)}function wF(l,f){return cr(Oc(l,f),G)}function SF(l,f,b){return b=b===r?1:He(b),cr(Oc(l,f),b)}function rO(l,f){var b=Ve(l)?Zr:Ai;return b(l,De(f,3))}function nO(l,f){var b=Ve(l)?FL:QE;return b(l,De(f,3))}var EF=gc(function(l,f,b){lt.call(l,b)?l[b].push(f):Yn(l,b,[f])});function _F(l,f,b,R){l=Ar(l)?l:ra(l),b=b&&!R?He(b):0;var k=l.length;return b<0&&(b=Yt(k+b,0)),Tc(l)?b<=k&&l.indexOf(f,b)>-1:!!k&&Ho(l,f,b)>-1}var OF=Ue(function(l,f,b){var R=-1,k=typeof f=="function",F=Ar(l)?fe(l.length):[];return Ai(l,function(ee){F[++R]=k?Xr(f,ee,b):hs(ee,f,b)}),F}),CF=gc(function(l,f,b){Yn(l,b,f)});function Oc(l,f){var b=Ve(l)?Ct:a_;return b(l,De(f,3))}function IF(l,f,b,R){return l==null?[]:(Ve(f)||(f=f==null?[]:[f]),b=R?r:b,Ve(b)||(b=b==null?[]:[b]),u_(l,f,b))}var RF=gc(function(l,f,b){l[b?0:1].push(f)},function(){return[[],[]]});function NF(l,f,b){var R=Ve(l)?Cf:AE,k=arguments.length<3;return R(l,De(f,4),b,k,Ai)}function TF(l,f,b){var R=Ve(l)?$L:AE,k=arguments.length<3;return R(l,De(f,4),b,k,QE)}function PF(l,f){var b=Ve(l)?Ti:e_;return b(l,Rc(De(f,3)))}function MF(l){var f=Ve(l)?YE:_8;return f(l)}function kF(l,f,b){(b?_r(l,f,b):f===r)?f=1:f=He(f);var R=Ve(l)?t8:O8;return R(l,f)}function AF(l){var f=Ve(l)?r8:I8;return f(l)}function DF(l){if(l==null)return 0;if(Ar(l))return Tc(l)?Uo(l):l.length;var f=mr(l);return f==he||f==Te?l.size:Wf(l).length}function jF(l,f,b){var R=Ve(l)?If:R8;return b&&_r(l,f,b)&&(f=r),R(l,De(f,3))}var qF=Ue(function(l,f){if(l==null)return[];var b=f.length;return b>1&&_r(l,f[0],f[1])?f=[]:b>2&&_r(f[0],f[1],f[2])&&(f=[f[0]]),u_(l,cr(f,1),[])}),Cc=m7||function(){return lr.Date.now()};function zF(l,f){if(typeof f!="function")throw new fn(a);return l=He(l),function(){if(--l<1)return f.apply(this,arguments)}}function iO(l,f,b){return f=b?r:f,f=l&&f==null?l.length:f,fi(l,T,r,r,r,r,f)}function oO(l,f){var b;if(typeof f!="function")throw new fn(a);return l=He(l),function(){return--l>0&&(b=f.apply(this,arguments)),l<=1&&(f=r),b}}var vh=Ue(function(l,f,b){var R=w;if(b.length){var k=Mi(b,ea(vh));R|=I}return fi(l,R,f,b,k)}),aO=Ue(function(l,f,b){var R=w|x;if(b.length){var k=Mi(b,ea(aO));R|=I}return fi(f,R,l,b,k)});function sO(l,f,b){f=b?r:f;var R=fi(l,S,r,r,r,r,r,f);return R.placeholder=sO.placeholder,R}function lO(l,f,b){f=b?r:f;var R=fi(l,E,r,r,r,r,r,f);return R.placeholder=lO.placeholder,R}function cO(l,f,b){var R,k,F,ee,oe,ce,me=0,be=!1,we=!1,_e=!0;if(typeof l!="function")throw new fn(a);f=mn(f)||0,Nt(b)&&(be=!!b.leading,we="maxWait"in b,F=we?Yt(mn(b.maxWait)||0,f):F,_e="trailing"in b?!!b.trailing:_e);function Pe($t){var Dn=R,mi=k;return R=k=r,me=$t,ee=l.apply(mi,Dn),ee}function qe($t){return me=$t,oe=bs(Ye,f),be?Pe($t):ee}function We($t){var Dn=$t-ce,mi=$t-me,NO=f-Dn;return we?gr(NO,F-mi):NO}function Ae($t){var Dn=$t-ce,mi=$t-me;return ce===r||Dn>=f||Dn<0||we&&mi>=F}function Ye(){var $t=Cc();if(Ae($t))return et($t);oe=bs(Ye,We($t))}function et($t){return oe=r,_e&&R?Pe($t):(R=k=r,ee)}function tn(){oe!==r&&y_(oe),me=0,R=ce=k=oe=r}function Or(){return oe===r?ee:et(Cc())}function rn(){var $t=Cc(),Dn=Ae($t);if(R=arguments,k=this,ce=$t,Dn){if(oe===r)return qe(ce);if(we)return y_(oe),oe=bs(Ye,f),Pe(ce)}return oe===r&&(oe=bs(Ye,f)),ee}return rn.cancel=tn,rn.flush=Or,rn}var LF=Ue(function(l,f){return JE(l,1,f)}),BF=Ue(function(l,f,b){return JE(l,mn(f)||0,b)});function FF(l){return fi(l,z)}function Ic(l,f){if(typeof l!="function"||f!=null&&typeof f!="function")throw new fn(a);var b=function(){var R=arguments,k=f?f.apply(this,R):R[0],F=b.cache;if(F.has(k))return F.get(k);var ee=l.apply(this,R);return b.cache=F.set(k,ee)||F,ee};return b.cache=new(Ic.Cache||di),b}Ic.Cache=di;function Rc(l){if(typeof l!="function")throw new fn(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 $F(l){return oO(2,l)}var VF=N8(function(l,f){f=f.length==1&&Ve(f[0])?Ct(f[0],Jr(De())):Ct(cr(f,1),Jr(De()));var b=f.length;return Ue(function(R){for(var k=-1,F=gr(R.length,b);++k<F;)R[k]=f[k].call(this,R[k]);return Xr(l,this,R)})}),gh=Ue(function(l,f){var b=Mi(f,ea(gh));return fi(l,I,r,f,b)}),uO=Ue(function(l,f){var b=Mi(f,ea(uO));return fi(l,N,r,f,b)}),HF=hi(function(l,f){return fi(l,M,r,r,r,f)});function WF(l,f){if(typeof l!="function")throw new fn(a);return f=f===r?f:He(f),Ue(l,f)}function UF(l,f){if(typeof l!="function")throw new fn(a);return f=f==null?0:Yt(He(f),0),Ue(function(b){var R=b[f],k=qi(b,0,f);return R&&Pi(k,R),Xr(l,this,k)})}function GF(l,f,b){var R=!0,k=!0;if(typeof l!="function")throw new fn(a);return Nt(b)&&(R="leading"in b?!!b.leading:R,k="trailing"in b?!!b.trailing:k),cO(l,f,{leading:R,maxWait:f,trailing:k})}function KF(l){return iO(l,1)}function YF(l,f){return gh(eh(f),l)}function XF(){if(!arguments.length)return[];var l=arguments[0];return Ve(l)?l:[l]}function ZF(l){return pn(l,y)}function JF(l,f){return f=typeof f=="function"?f:r,pn(l,y,f)}function QF(l){return pn(l,p|y)}function e9(l,f){return f=typeof f=="function"?f:r,pn(l,p|y,f)}function t9(l,f){return f==null||ZE(l,f,rr(f))}function An(l,f){return l===f||l!==l&&f!==f}var r9=xc($f),n9=xc(function(l,f){return l>=f}),vo=n_((function(){return arguments})())?n_:function(l){return Dt(l)&<.call(l,"callee")&&!VE.call(l,"callee")},Ve=fe.isArray,i9=_E?Jr(_E):f8;function Ar(l){return l!=null&&Nc(l.length)&&!vi(l)}function Ft(l){return Dt(l)&&Ar(l)}function o9(l){return l===!0||l===!1||Dt(l)&&Er(l)==ie}var zi=y7||Rh,a9=OE?Jr(OE):h8;function s9(l){return Dt(l)&&l.nodeType===1&&!ys(l)}function l9(l){if(l==null)return!0;if(Ar(l)&&(Ve(l)||typeof l=="string"||typeof l.splice=="function"||zi(l)||ta(l)||vo(l)))return!l.length;var f=mr(l);if(f==he||f==Te)return!l.size;if(ms(l))return!Wf(l).length;for(var b in l)if(lt.call(l,b))return!1;return!0}function c9(l,f){return ps(l,f)}function u9(l,f,b){b=typeof b=="function"?b:r;var R=b?b(l,f):r;return R===r?ps(l,f,r,b):!!R}function mh(l){if(!Dt(l))return!1;var f=Er(l);return f==Z||f==ve||typeof l.message=="string"&&typeof l.name=="string"&&!ys(l)}function d9(l){return typeof l=="number"&&WE(l)}function vi(l){if(!Nt(l))return!1;var f=Er(l);return f==J||f==ae||f==Y||f==Ee}function dO(l){return typeof l=="number"&&l==He(l)}function Nc(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=re}function Nt(l){var f=typeof l;return l!=null&&(f=="object"||f=="function")}function Dt(l){return l!=null&&typeof l=="object"}var fO=CE?Jr(CE):v8;function f9(l,f){return l===f||Hf(l,f,sh(f))}function h9(l,f,b){return b=typeof b=="function"?b:r,Hf(l,f,sh(f),b)}function p9(l){return hO(l)&&l!=+l}function v9(l){if(J8(l))throw new Be(o);return i_(l)}function g9(l){return l===null}function m9(l){return l==null}function hO(l){return typeof l=="number"||Dt(l)&&Er(l)==ue}function ys(l){if(!Dt(l)||Er(l)!=le)return!1;var f=rc(l);if(f===null)return!0;var b=lt.call(f,"constructor")&&f.constructor;return typeof b=="function"&&b instanceof b&&Jl.call(b)==h7}var bh=IE?Jr(IE):g8;function b9(l){return dO(l)&&l>=-re&&l<=re}var pO=RE?Jr(RE):m8;function Tc(l){return typeof l=="string"||!Ve(l)&&Dt(l)&&Er(l)==Me}function en(l){return typeof l=="symbol"||Dt(l)&&Er(l)==Ze}var ta=NE?Jr(NE):b8;function y9(l){return l===r}function x9(l){return Dt(l)&&mr(l)==Fe}function w9(l){return Dt(l)&&Er(l)==Le}var S9=xc(Uf),E9=xc(function(l,f){return l<=f});function vO(l){if(!l)return[];if(Ar(l))return Tc(l)?Pn(l):kr(l);if(as&&l[as])return t7(l[as]());var f=mr(l),b=f==he?kf:f==Te?Yl:ra;return b(l)}function gi(l){if(!l)return l===0?l:0;if(l=mn(l),l===G||l===-G){var f=l<0?-1:1;return f*P}return l===l?l:0}function He(l){var f=gi(l),b=f%1;return f===f?b?f-b:f:0}function gO(l){return l?uo(He(l),0,X):0}function mn(l){if(typeof l=="number")return l;if(en(l))return B;if(Nt(l)){var f=typeof l.valueOf=="function"?l.valueOf():l;l=Nt(f)?f+"":f}if(typeof l!="string")return l===0?l:+l;l=DE(l);var b=$e.test(l);return b||Ht.test(l)?zL(l.slice(2),b?2:8):ke.test(l)?B:+l}function mO(l){return Zn(l,Dr(l))}function _9(l){return l?uo(He(l),-re,re):l===0?l:0}function ct(l){return l==null?"":Qr(l)}var O9=Jo(function(l,f){if(ms(f)||Ar(f)){Zn(f,rr(f),l);return}for(var b in f)lt.call(f,b)&&ds(l,b,f[b])}),bO=Jo(function(l,f){Zn(f,Dr(f),l)}),yO=Jo(function(l,f,b,R){Zn(f,Dr(f),l,R)}),yh=Jo(function(l,f,b,R){Zn(f,rr(f),l,R)}),C9=hi(Lf);function I9(l,f){var b=Zo(l);return f==null?b:XE(b,f)}var R9=Ue(function(l,f){l=mt(l);var b=-1,R=f.length,k=R>2?f[2]:r;for(k&&_r(f[0],f[1],k)&&(R=1);++b<R;)for(var F=f[b],ee=Dr(F),oe=-1,ce=ee.length;++oe<ce;){var me=ee[oe],be=l[me];(be===r||An(be,Ko[me])&&!lt.call(l,me))&&(l[me]=F[me])}return l}),N9=Ue(function(l){return l.push(r,D_),Xr(xO,r,l)});function T9(l,f){return PE(l,De(f,3),Xn)}function P9(l,f){return PE(l,De(f,3),Ff)}function M9(l,f){return l==null?l:Bf(l,De(f,3),Dr)}function k9(l,f){return l==null?l:t_(l,De(f,3),Dr)}function A9(l,f){return l&&Xn(l,De(f,3))}function D9(l,f){return l&&Ff(l,De(f,3))}function j9(l){return l==null?[]:fc(l,rr(l))}function q9(l){return l==null?[]:fc(l,Dr(l))}function xh(l,f,b){var R=l==null?r:fo(l,f);return R===r?b:R}function z9(l,f){return l!=null&&z_(l,f,l8)}function wh(l,f){return l!=null&&z_(l,f,c8)}var L9=T_(function(l,f,b){f!=null&&typeof f.toString!="function"&&(f=Ql.call(f)),l[f]=b},Eh(jr)),B9=T_(function(l,f,b){f!=null&&typeof f.toString!="function"&&(f=Ql.call(f)),lt.call(l,f)?l[f].push(b):l[f]=[b]},De),F9=Ue(hs);function rr(l){return Ar(l)?KE(l):Wf(l)}function Dr(l){return Ar(l)?KE(l,!0):y8(l)}function $9(l,f){var b={};return f=De(f,3),Xn(l,function(R,k,F){Yn(b,f(R,k,F),R)}),b}function V9(l,f){var b={};return f=De(f,3),Xn(l,function(R,k,F){Yn(b,k,f(R,k,F))}),b}var H9=Jo(function(l,f,b){hc(l,f,b)}),xO=Jo(function(l,f,b,R){hc(l,f,b,R)}),W9=hi(function(l,f){var b={};if(l==null)return b;var R=!1;f=Ct(f,function(F){return F=ji(F,l),R||(R=F.length>1),F}),Zn(l,oh(l),b),R&&(b=pn(b,p|v|y,B8));for(var k=f.length;k--;)Zf(b,f[k]);return b});function U9(l,f){return wO(l,Rc(De(f)))}var G9=hi(function(l,f){return l==null?{}:w8(l,f)});function wO(l,f){if(l==null)return{};var b=Ct(oh(l),function(R){return[R]});return f=De(f),d_(l,b,function(R,k){return f(R,k[0])})}function K9(l,f,b){f=ji(f,l);var R=-1,k=f.length;for(k||(k=1,l=r);++R<k;){var F=l==null?r:l[kn(f[R])];F===r&&(R=k,F=b),l=vi(F)?F.call(l):F}return l}function Y9(l,f,b){return l==null?l:vs(l,f,b)}function X9(l,f,b,R){return R=typeof R=="function"?R:r,l==null?l:vs(l,f,b,R)}var SO=k_(rr),EO=k_(Dr);function Z9(l,f,b){var R=Ve(l),k=R||zi(l)||ta(l);if(f=De(f,4),b==null){var F=l&&l.constructor;k?b=R?new F:[]:Nt(l)?b=vi(F)?Zo(rc(l)):{}:b={}}return(k?Zr:Xn)(l,function(ee,oe,ce){return f(b,ee,oe,ce)}),b}function J9(l,f){return l==null?!0:Zf(l,f)}function Q9(l,f,b){return l==null?l:g_(l,f,eh(b))}function e$(l,f,b,R){return R=typeof R=="function"?R:r,l==null?l:g_(l,f,eh(b),R)}function ra(l){return l==null?[]:Mf(l,rr(l))}function t$(l){return l==null?[]:Mf(l,Dr(l))}function r$(l,f,b){return b===r&&(b=f,f=r),b!==r&&(b=mn(b),b=b===b?b:0),f!==r&&(f=mn(f),f=f===f?f:0),uo(mn(l),f,b)}function n$(l,f,b){return f=gi(f),b===r?(b=f,f=0):b=gi(b),l=mn(l),u8(l,f,b)}function i$(l,f,b){if(b&&typeof b!="boolean"&&_r(l,f,b)&&(f=b=r),b===r&&(typeof f=="boolean"?(b=f,f=r):typeof l=="boolean"&&(b=l,l=r)),l===r&&f===r?(l=0,f=1):(l=gi(l),f===r?(f=l,l=0):f=gi(f)),l>f){var R=l;l=f,f=R}if(b||l%1||f%1){var k=UE();return gr(l+k*(f-l+qL("1e-"+((k+"").length-1))),f)}return Kf(l,f)}var o$=Qo(function(l,f,b){return f=f.toLowerCase(),l+(b?_O(f):f)});function _O(l){return Sh(ct(l).toLowerCase())}function OO(l){return l=ct(l),l&&l.replace(Sr,XL).replace(IL,"")}function a$(l,f,b){l=ct(l),f=Qr(f);var R=l.length;b=b===r?R:uo(He(b),0,R);var k=b;return b-=f.length,b>=0&&l.slice(b,k)==f}function s$(l){return l=ct(l),l&&kt.test(l)?l.replace(Lt,ZL):l}function l$(l){return l=ct(l),l&&yr.test(l)?l.replace(vr,"\\$&"):l}var c$=Qo(function(l,f,b){return l+(b?"-":"")+f.toLowerCase()}),u$=Qo(function(l,f,b){return l+(b?" ":"")+f.toLowerCase()}),d$=I_("toLowerCase");function f$(l,f,b){l=ct(l),f=He(f);var R=f?Uo(l):0;if(!f||R>=f)return l;var k=(f-R)/2;return yc(ac(k),b)+l+yc(oc(k),b)}function h$(l,f,b){l=ct(l),f=He(f);var R=f?Uo(l):0;return f&&R<f?l+yc(f-R,b):l}function p$(l,f,b){l=ct(l),f=He(f);var R=f?Uo(l):0;return f&&R<f?yc(f-R,b)+l:l}function v$(l,f,b){return b||f==null?f=0:f&&(f=+f),E7(ct(l).replace(sr,""),f||0)}function g$(l,f,b){return(b?_r(l,f,b):f===r)?f=1:f=He(f),Yf(ct(l),f)}function m$(){var l=arguments,f=ct(l[0]);return l.length<3?f:f.replace(l[1],l[2])}var b$=Qo(function(l,f,b){return l+(b?"_":"")+f.toLowerCase()});function y$(l,f,b){return b&&typeof b!="number"&&_r(l,f,b)&&(f=b=r),b=b===r?X:b>>>0,b?(l=ct(l),l&&(typeof f=="string"||f!=null&&!bh(f))&&(f=Qr(f),!f&&Wo(l))?qi(Pn(l),0,b):l.split(f,b)):[]}var x$=Qo(function(l,f,b){return l+(b?" ":"")+Sh(f)});function w$(l,f,b){return l=ct(l),b=b==null?0:uo(He(b),0,l.length),f=Qr(f),l.slice(b,b+f.length)==f}function S$(l,f,b){var R=L.templateSettings;b&&_r(l,f,b)&&(f=r),l=ct(l),f=yh({},f,R,A_);var k=yh({},f.imports,R.imports,A_),F=rr(k),ee=Mf(k,F);Zr(F,function(Ae){if(Kn.test(Ae))throw new Be(c)});var oe,ce,me=0,be=f.interpolate||tr,we="__p += '",_e=Af((f.escape||tr).source+"|"+be.source+"|"+(be===Mr?Bo:tr).source+"|"+(f.evaluate||tr).source+"|$","g"),Pe="//# sourceURL="+(lt.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ML+"]")+`
|
|
73
73
|
`;l.replace(_e,function(Ae,Ye,et,tn,Or,rn){return et||(et=tn),we+=l.slice(me,rn).replace(un,JL),Ye&&(oe=!0,we+=`' +
|
|
74
74
|
__e(`+Ye+`) +
|
|
75
75
|
'`),Or&&(ce=!0,we+=`';
|
|
@@ -86,35 +86,35 @@ __p += '`),et&&(we+=`' +
|
|
|
86
86
|
function print() { __p += __j.call(arguments, '') }
|
|
87
87
|
`:`;
|
|
88
88
|
`)+we+`return __p
|
|
89
|
-
}`;var We=IO(function(){return ot(F,Pe+"return "+we).apply(r,ee)});if(We.source=we,mh(We))throw We;return We}function E$(l){return ct(l).toLowerCase()}function _$(l){return ct(l).toUpperCase()}function O$(l,f,b){if(l=ct(l),l&&(b||f===r))return DE(l);if(!l||!(f=Qr(f)))return l;var R=Pn(l),k=Pn(f),F=jE(R,k),ee=qE(R,k)+1;return qi(R,F,ee).join("")}function C$(l,f,b){if(l=ct(l),l&&(b||f===r))return l.slice(0,LE(l)+1);if(!l||!(f=Qr(f)))return l;var R=Pn(l),k=qE(R,Pn(f))+1;return qi(R,0,k).join("")}function I$(l,f,b){if(l=ct(l),l&&(b||f===r))return l.replace(sr,"");if(!l||!(f=Qr(f)))return l;var R=Pn(l),k=jE(R,Pn(f));return qi(R,k).join("")}function R$(l,f){var b=j,R=W;if(Nt(f)){var k="separator"in f?f.separator:k;b="length"in f?He(f.length):b,R="omission"in f?Qr(f.omission):R}l=ct(l);var F=l.length;if(Wo(l)){var ee=Pn(l);F=ee.length}if(b>=F)return l;var oe=b-Uo(R);if(oe<1)return R;var ce=ee?qi(ee,0,oe).join(""):l.slice(0,oe);if(k===r)return ce+R;if(ee&&(oe+=ce.length-oe),bh(k)){if(l.slice(oe).search(k)){var me,be=ce;for(k.global||(k=Af(k.source,ct(Fo.exec(k))+"g")),k.lastIndex=0;me=k.exec(be);)var we=me.index;ce=ce.slice(0,we===r?oe:we)}}else if(l.indexOf(Qr(k),oe)!=oe){var _e=ce.lastIndexOf(k);_e>-1&&(ce=ce.slice(0,_e))}return ce+R}function N$(l){return l=ct(l),l&&fr.test(l)?l.replace(Mt,o7):l}var T$=Qo(function(l,f,b){return l+(b?" ":"")+f.toUpperCase()}),Sh=I_("toUpperCase");function CO(l,f,b){return l=ct(l),f=b?r:f,f===r?e7(l)?l7(l):WL(l):l.match(f)||[]}var IO=Ue(function(l,f){try{return Xr(l,r,f)}catch(b){return mh(b)?b:new Be(b)}}),P$=hi(function(l,f){return Zr(f,function(b){b=kn(b),Yn(l,b,vh(l[b],l))}),l});function M$(l){var f=l==null?0:l.length,b=De();return l=f?Ct(l,function(R){if(typeof R[1]!="function")throw new fn(a);return[b(R[0]),R[1]]}):[],Ue(function(R){for(var k=-1;++k<f;){var F=l[k];if(Xr(F[0],this,R))return Xr(F[1],this,R)}})}function k$(l){return o8(pn(l,p))}function Eh(l){return function(){return l}}function A$(l,f){return l==null||l!==l?f:l}var D$=N_(),j$=N_(!0);function jr(l){return l}function _h(l){return o_(typeof l=="function"?l:pn(l,p))}function q$(l){return s_(pn(l,p))}function z$(l,f){return l_(l,pn(f,p))}var L$=Ue(function(l,f){return function(b){return hs(b,l,f)}}),B$=Ue(function(l,f){return function(b){return hs(l,b,f)}});function Oh(l,f,b){var R=rr(f),k=fc(f,R);b==null&&!(Nt(f)&&(k.length||!R.length))&&(b=f,f=l,l=this,k=fc(f,rr(f)));var F=!(Nt(b)&&"chain"in b)||!!b.chain,ee=vi(l);return Zr(k,function(oe){var ce=f[oe];l[oe]=ce,ee&&(l.prototype[oe]=function(){var me=this.__chain__;if(F||me){var be=l(this.__wrapped__),we=be.__actions__=kr(this.__actions__);return we.push({func:ce,args:arguments,thisArg:l}),be.__chain__=me,be}return ce.apply(l,Pi([this.value()],arguments))})}),l}function F$(){return lr._===this&&(lr._=p7),this}function Ch(){}function $$(l){return l=He(l),Ue(function(f){return c_(f,l)})}var V$=rh(Ct),H$=rh(TE),W$=rh(If);function RO(l){return ch(l)?Rf(kn(l)):S8(l)}function U$(l){return function(f){return l==null?r:fo(l,f)}}var G$=P_(),K$=P_(!0);function Ih(){return[]}function Rh(){return!1}function Y$(){return{}}function X$(){return""}function Z$(){return!0}function J$(l,f){if(l=He(l),l<1||l>re)return[];var b=X,R=gr(l,X);f=De(f),l-=X;for(var k=Pf(R,f);++b<l;)f(b);return k}function Q$(l){return Ve(l)?Ct(l,kn):en(l)?[l]:kr(G_(ct(l)))}function eV(l){var f=++f7;return ct(l)+f}var tV=bc(function(l,f){return l+f},0),rV=nh("ceil"),nV=bc(function(l,f){return l/f},1),iV=nh("floor");function oV(l){return l&&l.length?dc(l,jr,$f):r}function aV(l,f){return l&&l.length?dc(l,De(f,2),$f):r}function sV(l){return kE(l,jr)}function lV(l,f){return kE(l,De(f,2))}function cV(l){return l&&l.length?dc(l,jr,Uf):r}function uV(l,f){return l&&l.length?dc(l,De(f,2),Uf):r}var dV=bc(function(l,f){return l*f},1),fV=nh("round"),hV=bc(function(l,f){return l-f},0);function pV(l){return l&&l.length?Tf(l,jr):0}function vV(l,f){return l&&l.length?Tf(l,De(f,2)):0}return L.after=zF,L.ary=iO,L.assign=O9,L.assignIn=bO,L.assignInWith=yO,L.assignWith=yh,L.at=C9,L.before=oO,L.bind=vh,L.bindAll=P$,L.bindKey=aO,L.castArray=XF,L.chain=tO,L.chunk=oB,L.compact=aB,L.concat=sB,L.cond=M$,L.conforms=k$,L.constant=Eh,L.countBy=vF,L.create=I9,L.curry=sO,L.curryRight=lO,L.debounce=cO,L.defaults=R9,L.defaultsDeep=N9,L.defer=LF,L.delay=BF,L.difference=lB,L.differenceBy=cB,L.differenceWith=uB,L.drop=dB,L.dropRight=fB,L.dropRightWhile=hB,L.dropWhile=pB,L.fill=vB,L.filter=mF,L.flatMap=xF,L.flatMapDeep=wF,L.flatMapDepth=SF,L.flatten=Z_,L.flattenDeep=gB,L.flattenDepth=mB,L.flip=FF,L.flow=D$,L.flowRight=j$,L.fromPairs=bB,L.functions=j9,L.functionsIn=q9,L.groupBy=EF,L.initial=xB,L.intersection=wB,L.intersectionBy=SB,L.intersectionWith=EB,L.invert=L9,L.invertBy=B9,L.invokeMap=OF,L.iteratee=_h,L.keyBy=CF,L.keys=rr,L.keysIn=Dr,L.map=Oc,L.mapKeys=$9,L.mapValues=V9,L.matches=q$,L.matchesProperty=z$,L.memoize=Ic,L.merge=H9,L.mergeWith=xO,L.method=L$,L.methodOf=B$,L.mixin=Oh,L.negate=Rc,L.nthArg=$$,L.omit=W9,L.omitBy=U9,L.once=$F,L.orderBy=IF,L.over=V$,L.overArgs=VF,L.overEvery=H$,L.overSome=W$,L.partial=gh,L.partialRight=uO,L.partition=RF,L.pick=G9,L.pickBy=wO,L.property=RO,L.propertyOf=U$,L.pull=IB,L.pullAll=Q_,L.pullAllBy=RB,L.pullAllWith=NB,L.pullAt=TB,L.range=G$,L.rangeRight=K$,L.rearg=HF,L.reject=PF,L.remove=PB,L.rest=WF,L.reverse=hh,L.sampleSize=kF,L.set=Y9,L.setWith=X9,L.shuffle=AF,L.slice=MB,L.sortBy=qF,L.sortedUniq=LB,L.sortedUniqBy=BB,L.split=y$,L.spread=UF,L.tail=FB,L.take=$B,L.takeRight=VB,L.takeRightWhile=HB,L.takeWhile=WB,L.tap=aF,L.throttle=GF,L.thru=_c,L.toArray=vO,L.toPairs=SO,L.toPairsIn=EO,L.toPath=Q$,L.toPlainObject=mO,L.transform=Z9,L.unary=KF,L.union=UB,L.unionBy=GB,L.unionWith=KB,L.uniq=YB,L.uniqBy=XB,L.uniqWith=ZB,L.unset=J9,L.unzip=ph,L.unzipWith=eO,L.update=Q9,L.updateWith=e$,L.values=ra,L.valuesIn=t$,L.without=JB,L.words=CO,L.wrap=YF,L.xor=QB,L.xorBy=eF,L.xorWith=tF,L.zip=rF,L.zipObject=nF,L.zipObjectDeep=iF,L.zipWith=oF,L.entries=SO,L.entriesIn=EO,L.extend=bO,L.extendWith=yO,Oh(L,L),L.add=tV,L.attempt=IO,L.camelCase=o$,L.capitalize=_O,L.ceil=rV,L.clamp=r$,L.clone=ZF,L.cloneDeep=QF,L.cloneDeepWith=e9,L.cloneWith=JF,L.conformsTo=t9,L.deburr=OO,L.defaultTo=A$,L.divide=nV,L.endsWith=a$,L.eq=An,L.escape=s$,L.escapeRegExp=l$,L.every=gF,L.find=bF,L.findIndex=Y_,L.findKey=T9,L.findLast=yF,L.findLastIndex=X_,L.findLastKey=P9,L.floor=iV,L.forEach=rO,L.forEachRight=nO,L.forIn=M9,L.forInRight=k9,L.forOwn=A9,L.forOwnRight=D9,L.get=xh,L.gt=r9,L.gte=n9,L.has=z9,L.hasIn=wh,L.head=J_,L.identity=jr,L.includes=_F,L.indexOf=yB,L.inRange=n$,L.invoke=F9,L.isArguments=vo,L.isArray=Ve,L.isArrayBuffer=i9,L.isArrayLike=Ar,L.isArrayLikeObject=Ft,L.isBoolean=o9,L.isBuffer=zi,L.isDate=a9,L.isElement=s9,L.isEmpty=l9,L.isEqual=c9,L.isEqualWith=u9,L.isError=mh,L.isFinite=d9,L.isFunction=vi,L.isInteger=dO,L.isLength=Nc,L.isMap=fO,L.isMatch=f9,L.isMatchWith=h9,L.isNaN=p9,L.isNative=v9,L.isNil=m9,L.isNull=g9,L.isNumber=hO,L.isObject=Nt,L.isObjectLike=Dt,L.isPlainObject=ys,L.isRegExp=bh,L.isSafeInteger=b9,L.isSet=pO,L.isString=Tc,L.isSymbol=en,L.isTypedArray=ta,L.isUndefined=y9,L.isWeakMap=x9,L.isWeakSet=w9,L.join=_B,L.kebabCase=c$,L.last=gn,L.lastIndexOf=OB,L.lowerCase=u$,L.lowerFirst=d$,L.lt=S9,L.lte=E9,L.max=oV,L.maxBy=aV,L.mean=sV,L.meanBy=lV,L.min=cV,L.minBy=uV,L.stubArray=Ih,L.stubFalse=Rh,L.stubObject=Y$,L.stubString=X$,L.stubTrue=Z$,L.multiply=dV,L.nth=CB,L.noConflict=F$,L.noop=Ch,L.now=Cc,L.pad=f$,L.padEnd=h$,L.padStart=p$,L.parseInt=v$,L.random=i$,L.reduce=NF,L.reduceRight=TF,L.repeat=g$,L.replace=m$,L.result=K9,L.round=fV,L.runInContext=se,L.sample=MF,L.size=DF,L.snakeCase=b$,L.some=jF,L.sortedIndex=kB,L.sortedIndexBy=AB,L.sortedIndexOf=DB,L.sortedLastIndex=jB,L.sortedLastIndexBy=qB,L.sortedLastIndexOf=zB,L.startCase=x$,L.startsWith=w$,L.subtract=hV,L.sum=pV,L.sumBy=vV,L.template=S$,L.times=J$,L.toFinite=gi,L.toInteger=He,L.toLength=gO,L.toLower=E$,L.toNumber=mn,L.toSafeInteger=_9,L.toString=ct,L.toUpper=_$,L.trim=O$,L.trimEnd=C$,L.trimStart=I$,L.truncate=R$,L.unescape=N$,L.uniqueId=eV,L.upperCase=T$,L.upperFirst=Sh,L.each=rO,L.eachRight=nO,L.first=J_,Oh(L,(function(){var l={};return Xn(L,function(f,b){lt.call(L.prototype,b)||(l[b]=f)}),l})(),{chain:!1}),L.VERSION=n,Zr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){L[l].placeholder=L}),Zr(["drop","take"],function(l,f){Qe.prototype[l]=function(b){b=b===r?1:Yt(He(b),0);var R=this.__filtered__&&!f?new Qe(this):this.clone();return R.__filtered__?R.__takeCount__=gr(b,R.__takeCount__):R.__views__.push({size:gr(b,X),type:l+(R.__dir__<0?"Right":"")}),R},Qe.prototype[l+"Right"]=function(b){return this.reverse()[l](b).reverse()}}),Zr(["filter","map","takeWhile"],function(l,f){var b=f+1,R=b==K||b==te;Qe.prototype[l]=function(k){var F=this.clone();return F.__iteratees__.push({iteratee:De(k,3),type:b}),F.__filtered__=F.__filtered__||R,F}}),Zr(["head","last"],function(l,f){var b="take"+(f?"Right":"");Qe.prototype[l]=function(){return this[b](1).value()[0]}}),Zr(["initial","tail"],function(l,f){var b="drop"+(f?"":"Right");Qe.prototype[l]=function(){return this.__filtered__?new Qe(this):this[b](1)}}),Qe.prototype.compact=function(){return this.filter(jr)},Qe.prototype.find=function(l){return this.filter(l).head()},Qe.prototype.findLast=function(l){return this.reverse().find(l)},Qe.prototype.invokeMap=Ue(function(l,f){return typeof l=="function"?new Qe(this):this.map(function(b){return hs(b,l,f)})}),Qe.prototype.reject=function(l){return this.filter(Rc(De(l)))},Qe.prototype.slice=function(l,f){l=He(l);var b=this;return b.__filtered__&&(l>0||f<0)?new Qe(b):(l<0?b=b.takeRight(-l):l&&(b=b.drop(l)),f!==r&&(f=He(f),b=f<0?b.dropRight(-f):b.take(f-l)),b)},Qe.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},Qe.prototype.toArray=function(){return this.take(X)},Xn(Qe.prototype,function(l,f){var b=/^(?:filter|find|map|reject)|While$/.test(f),R=/^(?:head|last)$/.test(f),k=L[R?"take"+(f=="last"?"Right":""):f],F=R||/^find/.test(f);k&&(L.prototype[f]=function(){var ee=this.__wrapped__,oe=R?[1]:arguments,ce=ee instanceof Qe,me=oe[0],be=ce||Ve(ee),we=function(Ye){var et=k.apply(L,Pi([Ye],oe));return R&&_e?et[0]:et};be&&b&&typeof me=="function"&&me.length!=1&&(ce=be=!1);var _e=this.__chain__,Pe=!!this.__actions__.length,qe=F&&!_e,We=ce&&!Pe;if(!F&&be){ee=We?ee:new Qe(this);var Ae=l.apply(ee,oe);return Ae.__actions__.push({func:_c,args:[we],thisArg:r}),new hn(Ae,_e)}return qe&&We?l.apply(this,oe):(Ae=this.thru(we),qe?R?Ae.value()[0]:Ae.value():Ae)})}),Zr(["pop","push","shift","sort","splice","unshift"],function(l){var f=Xl[l],b=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",R=/^(?:pop|shift)$/.test(l);L.prototype[l]=function(){var k=arguments;if(R&&!this.__chain__){var F=this.value();return f.apply(Ve(F)?F:[],k)}return this[b](function(ee){return f.apply(Ve(ee)?ee:[],k)})}}),Xn(Qe.prototype,function(l,f){var b=L[f];if(b){var R=b.name+"";lt.call(Xo,R)||(Xo[R]=[]),Xo[R].push({name:f,func:b})}}),Xo[mc(r,x).name]=[{name:"wrapper",func:r}],Qe.prototype.clone=T7,Qe.prototype.reverse=P7,Qe.prototype.value=M7,L.prototype.at=sF,L.prototype.chain=lF,L.prototype.commit=cF,L.prototype.next=uF,L.prototype.plant=fF,L.prototype.reverse=hF,L.prototype.toJSON=L.prototype.valueOf=L.prototype.value=pF,L.prototype.first=L.prototype.head,as&&(L.prototype[as]=dF),L}),Go=c7();ao?((ao.exports=Go)._=Go,Ef._=Go):lr._=Go}).call(uae)})(Xs,Xs.exports)),Xs.exports}var Xi=dae();function cz(e,t){const r=C.useRef([e]),n=C.useRef(0),i=C.useRef(!1),o=C.useRef(!1),[,a]=C.useReducer(d=>d+1,0);C.useEffect(()=>{if(i.current){i.current=!1;return}const d=n.current;if(Xi.isEqual(r.current[d],e)){o.current=!1;return}if(!o.current){r.current=[e],n.current=0,a();return}o.current=!1;const h=[...r.current.slice(0,d+1),e];r.current=h,n.current=h.length-1,a()},[e]);const s=C.useCallback(()=>{n.current<=0||(n.current-=1,i.current=!0,t(r.current[n.current]),a())},[t]),c=C.useCallback(()=>{n.current>=r.current.length-1||(n.current+=1,i.current=!0,t(r.current[n.current]),a())},[t]),u=C.useCallback(()=>{o.current=!0},[]);return{canUndo:n.current>0,canRedo:n.current<r.current.length-1,undo:s,redo:c,markEdit:u}}function fae(){const e=Ke.useAppDispatch(),t=Ke.useAppSelector(Ke.selectRoles),r=Ke.useAppSelector(Ke.selectPrivileges),n=Ke.useAppSelector(Ke.selectRolesFlags),i=Ke.useAppSelector(Ke.selectRolesAndPrivileges,(g,w)=>Xi.isEqual(g,w)),o=Ke.useAppSelector(Ke.selectCatalog),a=Ke.useAppSelector(Ke.selectQodly),s=Ke.useAppSelector(Ke.selectSelectedTab),c=Ke.useAppSelector(Ke.selectForceLogin),u=Ke.useAppSelector(Ke.selectRestrictedByDefault),d=Ke.useAppSelector(Ke.selectGuestPrivilege),h=Ke.useAppSelector(Ke.selectCatalogMethods),p=Ke.useAppSelector(Ke.selectDataclasses),v=Ke.useAppSelector(Ke.selectSingletons),y=C.useCallback(g=>{const{roles:w,privileges:x,forceLogin:_,restrictedByDefault:S}=pe.sanitizeRoles(g);e(Ke.updateRolesAndPrivileges({roles:w,privileges:x})),e(Ke.toggleForceLogin(_??!1)),e(Ke.toggleRestrictedByDefault(S??!1))},[e]),m=cz(i,y);return{getRoles:()=>t,getPrivileges:()=>r,getRolesFlags:()=>n,getRolesAndPrivileges:()=>i,getCatalog:()=>o,getQodly:()=>a,getSelectedTab:()=>s,getForceLogin:()=>c??!1,getRestrictedByDefault:()=>u??!1,getGuestPrivilege:()=>d??null,getCatalogMethods:()=>h,getDataclasses:()=>p,getSingletons:()=>v,getHost:()=>"web",getHistory:()=>({canUndo:m.canUndo,canRedo:m.canRedo}),actions:{updateRoles:g=>{m.markEdit(),e(Ke.updateRoles(g))},updatePrivileges:g=>{m.markEdit(),e(Ke.updatePrivileges(g))},setRolesContent:g=>{e(Ke.setRolesContent(g))},toggleTab:g=>{e(Ke.toggleTab(g))},toggleForceLogin:g=>{m.markEdit(),e(Ke.toggleForceLogin(g))},toggleRestrictedByDefault:g=>{m.markEdit(),e(Ke.toggleRestrictedByDefault(g))},setTabFlags:(g,w)=>{e(Ke.setTabFlags({path:g,flags:w}))},openModal:async g=>await e(Ke.openModal(g)).unwrap(),undo:m.undo,redo:m.redo}}}const uz=C.createContext(null),dz=({children:e,adapter:t})=>O.jsx(uz.Provider,{value:t,children:e}),Tr=()=>{const e=C.useContext(uz);if(!e)throw new Error("useEditorStateAdapter must be used within an EditorStateAdapterProvider");return e};var Zw=function(e,t){return Zw=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Zw(e,t)};function jl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Zw(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function Jw(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 Qw(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function e1(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function oi(e){return typeof e=="function"}function fz(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 M0=fz(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
89
|
+
}`;var We=IO(function(){return ot(F,Pe+"return "+we).apply(r,ee)});if(We.source=we,mh(We))throw We;return We}function E$(l){return ct(l).toLowerCase()}function _$(l){return ct(l).toUpperCase()}function O$(l,f,b){if(l=ct(l),l&&(b||f===r))return DE(l);if(!l||!(f=Qr(f)))return l;var R=Pn(l),k=Pn(f),F=jE(R,k),ee=qE(R,k)+1;return qi(R,F,ee).join("")}function C$(l,f,b){if(l=ct(l),l&&(b||f===r))return l.slice(0,LE(l)+1);if(!l||!(f=Qr(f)))return l;var R=Pn(l),k=qE(R,Pn(f))+1;return qi(R,0,k).join("")}function I$(l,f,b){if(l=ct(l),l&&(b||f===r))return l.replace(sr,"");if(!l||!(f=Qr(f)))return l;var R=Pn(l),k=jE(R,Pn(f));return qi(R,k).join("")}function R$(l,f){var b=j,R=W;if(Nt(f)){var k="separator"in f?f.separator:k;b="length"in f?He(f.length):b,R="omission"in f?Qr(f.omission):R}l=ct(l);var F=l.length;if(Wo(l)){var ee=Pn(l);F=ee.length}if(b>=F)return l;var oe=b-Uo(R);if(oe<1)return R;var ce=ee?qi(ee,0,oe).join(""):l.slice(0,oe);if(k===r)return ce+R;if(ee&&(oe+=ce.length-oe),bh(k)){if(l.slice(oe).search(k)){var me,be=ce;for(k.global||(k=Af(k.source,ct(Fo.exec(k))+"g")),k.lastIndex=0;me=k.exec(be);)var we=me.index;ce=ce.slice(0,we===r?oe:we)}}else if(l.indexOf(Qr(k),oe)!=oe){var _e=ce.lastIndexOf(k);_e>-1&&(ce=ce.slice(0,_e))}return ce+R}function N$(l){return l=ct(l),l&&fr.test(l)?l.replace(Mt,o7):l}var T$=Qo(function(l,f,b){return l+(b?" ":"")+f.toUpperCase()}),Sh=I_("toUpperCase");function CO(l,f,b){return l=ct(l),f=b?r:f,f===r?e7(l)?l7(l):WL(l):l.match(f)||[]}var IO=Ue(function(l,f){try{return Xr(l,r,f)}catch(b){return mh(b)?b:new Be(b)}}),P$=hi(function(l,f){return Zr(f,function(b){b=kn(b),Yn(l,b,vh(l[b],l))}),l});function M$(l){var f=l==null?0:l.length,b=De();return l=f?Ct(l,function(R){if(typeof R[1]!="function")throw new fn(a);return[b(R[0]),R[1]]}):[],Ue(function(R){for(var k=-1;++k<f;){var F=l[k];if(Xr(F[0],this,R))return Xr(F[1],this,R)}})}function k$(l){return o8(pn(l,p))}function Eh(l){return function(){return l}}function A$(l,f){return l==null||l!==l?f:l}var D$=N_(),j$=N_(!0);function jr(l){return l}function _h(l){return o_(typeof l=="function"?l:pn(l,p))}function q$(l){return s_(pn(l,p))}function z$(l,f){return l_(l,pn(f,p))}var L$=Ue(function(l,f){return function(b){return hs(b,l,f)}}),B$=Ue(function(l,f){return function(b){return hs(l,b,f)}});function Oh(l,f,b){var R=rr(f),k=fc(f,R);b==null&&!(Nt(f)&&(k.length||!R.length))&&(b=f,f=l,l=this,k=fc(f,rr(f)));var F=!(Nt(b)&&"chain"in b)||!!b.chain,ee=vi(l);return Zr(k,function(oe){var ce=f[oe];l[oe]=ce,ee&&(l.prototype[oe]=function(){var me=this.__chain__;if(F||me){var be=l(this.__wrapped__),we=be.__actions__=kr(this.__actions__);return we.push({func:ce,args:arguments,thisArg:l}),be.__chain__=me,be}return ce.apply(l,Pi([this.value()],arguments))})}),l}function F$(){return lr._===this&&(lr._=p7),this}function Ch(){}function $$(l){return l=He(l),Ue(function(f){return c_(f,l)})}var V$=rh(Ct),H$=rh(TE),W$=rh(If);function RO(l){return ch(l)?Rf(kn(l)):S8(l)}function U$(l){return function(f){return l==null?r:fo(l,f)}}var G$=P_(),K$=P_(!0);function Ih(){return[]}function Rh(){return!1}function Y$(){return{}}function X$(){return""}function Z$(){return!0}function J$(l,f){if(l=He(l),l<1||l>re)return[];var b=X,R=gr(l,X);f=De(f),l-=X;for(var k=Pf(R,f);++b<l;)f(b);return k}function Q$(l){return Ve(l)?Ct(l,kn):en(l)?[l]:kr(G_(ct(l)))}function eV(l){var f=++f7;return ct(l)+f}var tV=bc(function(l,f){return l+f},0),rV=nh("ceil"),nV=bc(function(l,f){return l/f},1),iV=nh("floor");function oV(l){return l&&l.length?dc(l,jr,$f):r}function aV(l,f){return l&&l.length?dc(l,De(f,2),$f):r}function sV(l){return kE(l,jr)}function lV(l,f){return kE(l,De(f,2))}function cV(l){return l&&l.length?dc(l,jr,Uf):r}function uV(l,f){return l&&l.length?dc(l,De(f,2),Uf):r}var dV=bc(function(l,f){return l*f},1),fV=nh("round"),hV=bc(function(l,f){return l-f},0);function pV(l){return l&&l.length?Tf(l,jr):0}function vV(l,f){return l&&l.length?Tf(l,De(f,2)):0}return L.after=zF,L.ary=iO,L.assign=O9,L.assignIn=bO,L.assignInWith=yO,L.assignWith=yh,L.at=C9,L.before=oO,L.bind=vh,L.bindAll=P$,L.bindKey=aO,L.castArray=XF,L.chain=tO,L.chunk=oB,L.compact=aB,L.concat=sB,L.cond=M$,L.conforms=k$,L.constant=Eh,L.countBy=vF,L.create=I9,L.curry=sO,L.curryRight=lO,L.debounce=cO,L.defaults=R9,L.defaultsDeep=N9,L.defer=LF,L.delay=BF,L.difference=lB,L.differenceBy=cB,L.differenceWith=uB,L.drop=dB,L.dropRight=fB,L.dropRightWhile=hB,L.dropWhile=pB,L.fill=vB,L.filter=mF,L.flatMap=xF,L.flatMapDeep=wF,L.flatMapDepth=SF,L.flatten=Z_,L.flattenDeep=gB,L.flattenDepth=mB,L.flip=FF,L.flow=D$,L.flowRight=j$,L.fromPairs=bB,L.functions=j9,L.functionsIn=q9,L.groupBy=EF,L.initial=xB,L.intersection=wB,L.intersectionBy=SB,L.intersectionWith=EB,L.invert=L9,L.invertBy=B9,L.invokeMap=OF,L.iteratee=_h,L.keyBy=CF,L.keys=rr,L.keysIn=Dr,L.map=Oc,L.mapKeys=$9,L.mapValues=V9,L.matches=q$,L.matchesProperty=z$,L.memoize=Ic,L.merge=H9,L.mergeWith=xO,L.method=L$,L.methodOf=B$,L.mixin=Oh,L.negate=Rc,L.nthArg=$$,L.omit=W9,L.omitBy=U9,L.once=$F,L.orderBy=IF,L.over=V$,L.overArgs=VF,L.overEvery=H$,L.overSome=W$,L.partial=gh,L.partialRight=uO,L.partition=RF,L.pick=G9,L.pickBy=wO,L.property=RO,L.propertyOf=U$,L.pull=IB,L.pullAll=Q_,L.pullAllBy=RB,L.pullAllWith=NB,L.pullAt=TB,L.range=G$,L.rangeRight=K$,L.rearg=HF,L.reject=PF,L.remove=PB,L.rest=WF,L.reverse=hh,L.sampleSize=kF,L.set=Y9,L.setWith=X9,L.shuffle=AF,L.slice=MB,L.sortBy=qF,L.sortedUniq=LB,L.sortedUniqBy=BB,L.split=y$,L.spread=UF,L.tail=FB,L.take=$B,L.takeRight=VB,L.takeRightWhile=HB,L.takeWhile=WB,L.tap=aF,L.throttle=GF,L.thru=_c,L.toArray=vO,L.toPairs=SO,L.toPairsIn=EO,L.toPath=Q$,L.toPlainObject=mO,L.transform=Z9,L.unary=KF,L.union=UB,L.unionBy=GB,L.unionWith=KB,L.uniq=YB,L.uniqBy=XB,L.uniqWith=ZB,L.unset=J9,L.unzip=ph,L.unzipWith=eO,L.update=Q9,L.updateWith=e$,L.values=ra,L.valuesIn=t$,L.without=JB,L.words=CO,L.wrap=YF,L.xor=QB,L.xorBy=eF,L.xorWith=tF,L.zip=rF,L.zipObject=nF,L.zipObjectDeep=iF,L.zipWith=oF,L.entries=SO,L.entriesIn=EO,L.extend=bO,L.extendWith=yO,Oh(L,L),L.add=tV,L.attempt=IO,L.camelCase=o$,L.capitalize=_O,L.ceil=rV,L.clamp=r$,L.clone=ZF,L.cloneDeep=QF,L.cloneDeepWith=e9,L.cloneWith=JF,L.conformsTo=t9,L.deburr=OO,L.defaultTo=A$,L.divide=nV,L.endsWith=a$,L.eq=An,L.escape=s$,L.escapeRegExp=l$,L.every=gF,L.find=bF,L.findIndex=Y_,L.findKey=T9,L.findLast=yF,L.findLastIndex=X_,L.findLastKey=P9,L.floor=iV,L.forEach=rO,L.forEachRight=nO,L.forIn=M9,L.forInRight=k9,L.forOwn=A9,L.forOwnRight=D9,L.get=xh,L.gt=r9,L.gte=n9,L.has=z9,L.hasIn=wh,L.head=J_,L.identity=jr,L.includes=_F,L.indexOf=yB,L.inRange=n$,L.invoke=F9,L.isArguments=vo,L.isArray=Ve,L.isArrayBuffer=i9,L.isArrayLike=Ar,L.isArrayLikeObject=Ft,L.isBoolean=o9,L.isBuffer=zi,L.isDate=a9,L.isElement=s9,L.isEmpty=l9,L.isEqual=c9,L.isEqualWith=u9,L.isError=mh,L.isFinite=d9,L.isFunction=vi,L.isInteger=dO,L.isLength=Nc,L.isMap=fO,L.isMatch=f9,L.isMatchWith=h9,L.isNaN=p9,L.isNative=v9,L.isNil=m9,L.isNull=g9,L.isNumber=hO,L.isObject=Nt,L.isObjectLike=Dt,L.isPlainObject=ys,L.isRegExp=bh,L.isSafeInteger=b9,L.isSet=pO,L.isString=Tc,L.isSymbol=en,L.isTypedArray=ta,L.isUndefined=y9,L.isWeakMap=x9,L.isWeakSet=w9,L.join=_B,L.kebabCase=c$,L.last=gn,L.lastIndexOf=OB,L.lowerCase=u$,L.lowerFirst=d$,L.lt=S9,L.lte=E9,L.max=oV,L.maxBy=aV,L.mean=sV,L.meanBy=lV,L.min=cV,L.minBy=uV,L.stubArray=Ih,L.stubFalse=Rh,L.stubObject=Y$,L.stubString=X$,L.stubTrue=Z$,L.multiply=dV,L.nth=CB,L.noConflict=F$,L.noop=Ch,L.now=Cc,L.pad=f$,L.padEnd=h$,L.padStart=p$,L.parseInt=v$,L.random=i$,L.reduce=NF,L.reduceRight=TF,L.repeat=g$,L.replace=m$,L.result=K9,L.round=fV,L.runInContext=se,L.sample=MF,L.size=DF,L.snakeCase=b$,L.some=jF,L.sortedIndex=kB,L.sortedIndexBy=AB,L.sortedIndexOf=DB,L.sortedLastIndex=jB,L.sortedLastIndexBy=qB,L.sortedLastIndexOf=zB,L.startCase=x$,L.startsWith=w$,L.subtract=hV,L.sum=pV,L.sumBy=vV,L.template=S$,L.times=J$,L.toFinite=gi,L.toInteger=He,L.toLength=gO,L.toLower=E$,L.toNumber=mn,L.toSafeInteger=_9,L.toString=ct,L.toUpper=_$,L.trim=O$,L.trimEnd=C$,L.trimStart=I$,L.truncate=R$,L.unescape=N$,L.uniqueId=eV,L.upperCase=T$,L.upperFirst=Sh,L.each=rO,L.eachRight=nO,L.first=J_,Oh(L,(function(){var l={};return Xn(L,function(f,b){lt.call(L.prototype,b)||(l[b]=f)}),l})(),{chain:!1}),L.VERSION=n,Zr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){L[l].placeholder=L}),Zr(["drop","take"],function(l,f){Qe.prototype[l]=function(b){b=b===r?1:Yt(He(b),0);var R=this.__filtered__&&!f?new Qe(this):this.clone();return R.__filtered__?R.__takeCount__=gr(b,R.__takeCount__):R.__views__.push({size:gr(b,X),type:l+(R.__dir__<0?"Right":"")}),R},Qe.prototype[l+"Right"]=function(b){return this.reverse()[l](b).reverse()}}),Zr(["filter","map","takeWhile"],function(l,f){var b=f+1,R=b==K||b==te;Qe.prototype[l]=function(k){var F=this.clone();return F.__iteratees__.push({iteratee:De(k,3),type:b}),F.__filtered__=F.__filtered__||R,F}}),Zr(["head","last"],function(l,f){var b="take"+(f?"Right":"");Qe.prototype[l]=function(){return this[b](1).value()[0]}}),Zr(["initial","tail"],function(l,f){var b="drop"+(f?"":"Right");Qe.prototype[l]=function(){return this.__filtered__?new Qe(this):this[b](1)}}),Qe.prototype.compact=function(){return this.filter(jr)},Qe.prototype.find=function(l){return this.filter(l).head()},Qe.prototype.findLast=function(l){return this.reverse().find(l)},Qe.prototype.invokeMap=Ue(function(l,f){return typeof l=="function"?new Qe(this):this.map(function(b){return hs(b,l,f)})}),Qe.prototype.reject=function(l){return this.filter(Rc(De(l)))},Qe.prototype.slice=function(l,f){l=He(l);var b=this;return b.__filtered__&&(l>0||f<0)?new Qe(b):(l<0?b=b.takeRight(-l):l&&(b=b.drop(l)),f!==r&&(f=He(f),b=f<0?b.dropRight(-f):b.take(f-l)),b)},Qe.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},Qe.prototype.toArray=function(){return this.take(X)},Xn(Qe.prototype,function(l,f){var b=/^(?:filter|find|map|reject)|While$/.test(f),R=/^(?:head|last)$/.test(f),k=L[R?"take"+(f=="last"?"Right":""):f],F=R||/^find/.test(f);k&&(L.prototype[f]=function(){var ee=this.__wrapped__,oe=R?[1]:arguments,ce=ee instanceof Qe,me=oe[0],be=ce||Ve(ee),we=function(Ye){var et=k.apply(L,Pi([Ye],oe));return R&&_e?et[0]:et};be&&b&&typeof me=="function"&&me.length!=1&&(ce=be=!1);var _e=this.__chain__,Pe=!!this.__actions__.length,qe=F&&!_e,We=ce&&!Pe;if(!F&&be){ee=We?ee:new Qe(this);var Ae=l.apply(ee,oe);return Ae.__actions__.push({func:_c,args:[we],thisArg:r}),new hn(Ae,_e)}return qe&&We?l.apply(this,oe):(Ae=this.thru(we),qe?R?Ae.value()[0]:Ae.value():Ae)})}),Zr(["pop","push","shift","sort","splice","unshift"],function(l){var f=Xl[l],b=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",R=/^(?:pop|shift)$/.test(l);L.prototype[l]=function(){var k=arguments;if(R&&!this.__chain__){var F=this.value();return f.apply(Ve(F)?F:[],k)}return this[b](function(ee){return f.apply(Ve(ee)?ee:[],k)})}}),Xn(Qe.prototype,function(l,f){var b=L[f];if(b){var R=b.name+"";lt.call(Xo,R)||(Xo[R]=[]),Xo[R].push({name:f,func:b})}}),Xo[mc(r,x).name]=[{name:"wrapper",func:r}],Qe.prototype.clone=T7,Qe.prototype.reverse=P7,Qe.prototype.value=M7,L.prototype.at=sF,L.prototype.chain=lF,L.prototype.commit=cF,L.prototype.next=uF,L.prototype.plant=fF,L.prototype.reverse=hF,L.prototype.toJSON=L.prototype.valueOf=L.prototype.value=pF,L.prototype.first=L.prototype.head,as&&(L.prototype[as]=dF),L}),Go=c7();ao?((ao.exports=Go)._=Go,Ef._=Go):lr._=Go}).call(uae)})(Xs,Xs.exports)),Xs.exports}var Xi=dae();function cz(e,t){const r=C.useRef([e]),n=C.useRef(0),i=C.useRef(!1),o=C.useRef(!1),[,a]=C.useReducer(u=>u+1,0);C.useEffect(()=>{if(i.current){i.current=!1;return}const u=n.current;if(Xi.isEqual(r.current[u],e)){o.current=!1;return}if(!o.current){r.current=[e],n.current=0,a();return}o.current=!1;const h=[...r.current.slice(0,u+1),e];r.current=h,n.current=h.length-1,a()},[e]);const s=C.useCallback(()=>{n.current<=0||(n.current-=1,i.current=!0,t(r.current[n.current]),a())},[t]),c=C.useCallback(()=>{n.current>=r.current.length-1||(n.current+=1,i.current=!0,t(r.current[n.current]),a())},[t]),d=C.useCallback(()=>{o.current=!0},[]);return{canUndo:n.current>0,canRedo:n.current<r.current.length-1,undo:s,redo:c,markEdit:d}}function fae(){const e=Ke.useAppDispatch(),t=Ke.useAppSelector(Ke.selectRoles),r=Ke.useAppSelector(Ke.selectPrivileges),n=Ke.useAppSelector(Ke.selectRolesFlags),i=Ke.useAppSelector(Ke.selectRolesAndPrivileges,(g,w)=>Xi.isEqual(g,w)),o=Ke.useAppSelector(Ke.selectCatalog),a=Ke.useAppSelector(Ke.selectQodly),s=Ke.useAppSelector(Ke.selectSelectedTab),c=Ke.useAppSelector(Ke.selectForceLogin),d=Ke.useAppSelector(Ke.selectRestrictedByDefault),u=Ke.useAppSelector(Ke.selectGuestPrivilege),h=Ke.useAppSelector(Ke.selectCatalogMethods),p=Ke.useAppSelector(Ke.selectDataclasses),v=Ke.useAppSelector(Ke.selectSingletons),y=C.useCallback(g=>{const{roles:w,privileges:x,forceLogin:_,restrictedByDefault:S}=pe.sanitizeRoles(g);e(Ke.updateRolesAndPrivileges({roles:w,privileges:x})),e(Ke.toggleForceLogin(_??!1)),e(Ke.toggleRestrictedByDefault(S??!1))},[e]),m=cz(i,y);return{getRoles:()=>t,getPrivileges:()=>r,getRolesFlags:()=>n,getRolesAndPrivileges:()=>i,getCatalog:()=>o,getQodly:()=>a,getSelectedTab:()=>s,getForceLogin:()=>c??!1,getRestrictedByDefault:()=>d??!1,getGuestPrivilege:()=>u??null,getCatalogMethods:()=>h,getDataclasses:()=>p,getSingletons:()=>v,getHost:()=>"web",getHistory:()=>({canUndo:m.canUndo,canRedo:m.canRedo}),actions:{updateRoles:g=>{m.markEdit(),e(Ke.updateRoles(g))},updatePrivileges:g=>{m.markEdit(),e(Ke.updatePrivileges(g))},setRolesContent:g=>{e(Ke.setRolesContent(g))},toggleTab:g=>{e(Ke.toggleTab(g))},toggleForceLogin:g=>{m.markEdit(),e(Ke.toggleForceLogin(g))},toggleRestrictedByDefault:g=>{m.markEdit(),e(Ke.toggleRestrictedByDefault(g))},setTabFlags:(g,w)=>{e(Ke.setTabFlags({path:g,flags:w}))},openModal:async g=>await e(Ke.openModal(g)).unwrap(),undo:m.undo,redo:m.redo}}}const uz=C.createContext(null),dz=({children:e,adapter:t})=>O.jsx(uz.Provider,{value:t,children:e}),Tr=()=>{const e=C.useContext(uz);if(!e)throw new Error("useEditorStateAdapter must be used within an EditorStateAdapterProvider");return e};var Zw=function(e,t){return Zw=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Zw(e,t)};function jl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Zw(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function Jw(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 Qw(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function e1(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function oi(e){return typeof e=="function"}function fz(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 M0=fz(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
90
90
|
`+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
|
|
91
|
-
`):"",this.name="UnsubscriptionError",this.errors=r}});function t1(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Zd=(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,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=Jw(a),c=s.next();!c.done;c=s.next()){var u=c.value;u.remove(this)}}catch(m){t={error:m}}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(oi(d))try{d()}catch(m){o=m instanceof M0?m.errors:[m]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var p=Jw(h),v=p.next();!v.done;v=p.next()){var y=v.value;try{L5(y)}catch(m){o=o??[],m instanceof M0?o=e1(e1([],Qw(o)),Qw(m.errors)):o.push(m)}}}catch(m){n={error:m}}finally{try{v&&!v.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}}if(o)throw new M0(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)L5(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)&&t1(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&t1(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),hz=Zd.EMPTY;function pz(e){return e instanceof Zd||e&&"closed"in e&&oi(e.remove)&&oi(e.add)&&oi(e.unsubscribe)}function L5(e){oi(e)?e():e.unsubscribe()}var hae={Promise:void 0},pae={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,e1([e,t],Qw(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function vae(e){pae.setTimeout(function(){throw e})}function B5(){}function Iu(e){e()}var GS=(function(e){jl(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,pz(r)&&r.add(n)):n.destination=bae,n}return t.create=function(r,n,i){return new r1(r,n,i)},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})(Zd),gae=(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){iu(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){iu(n)}else iu(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){iu(r)}},e})(),r1=(function(e){jl(t,e);function t(r,n,i){var o=e.call(this)||this,a;return oi(r)||!r?a={next:r??void 0,error:n??void 0,complete:i??void 0}:a=r,o.destination=new gae(a),o}return t})(GS);function iu(e){vae(e)}function mae(e){throw e}var bae={closed:!0,next:B5,error:mae,complete:B5},yae=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function xae(e){return e}function wae(e){return e.length===0?xae:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}var F5=(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 i=this,o=Eae(t)?t:new r1(t,r,n);return Iu(function(){var a=i,s=a.operator,c=a.source;o.add(s?s.call(o,c):c?i._subscribe(o):i._trySubscribe(o))}),o},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=$5(r),new r(function(i,o){var a=new r1({next:function(s){try{t(s)}catch(c){o(c),a.unsubscribe()}},error:o,complete:i});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[yae]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return wae(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=$5(t),new t(function(n,i){var o;r.subscribe(function(a){return o=a},function(a){return i(a)},function(){return n(o)})})},e.create=function(t){return new e(t)},e})();function $5(e){var t;return(t=e??hae.Promise)!==null&&t!==void 0?t:Promise}function Sae(e){return e&&oi(e.next)&&oi(e.error)&&oi(e.complete)}function Eae(e){return e&&e instanceof GS||Sae(e)&&pz(e)}function _ae(e){return oi(e==null?void 0:e.lift)}function Oae(e){return function(t){if(_ae(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 Cae(e,t,r,n,i){return new Iae(e,t,r,n,i)}var Iae=(function(e){jl(t,e);function t(r,n,i,o,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=o?function(u){try{o(u)}catch(d){r.error(d)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=i?function(){try{i()}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})(GS),Rae=fz(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),vz=(function(e){jl(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 V5(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new Rae},t.prototype.next=function(r){var n=this;Iu(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=Jw(n.currentObservers),s=a.next();!s.done;s=a.next()){var c=s.value;c.next(r)}}catch(u){i={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},t.prototype.error=function(r){var n=this;Iu(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var i=n.observers;i.length;)i.shift().error(r)}})},t.prototype.complete=function(){var r=this;Iu(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,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?hz:(this.currentObservers=null,s.push(r),new Zd(function(){n.currentObservers=null,t1(s,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,o=n.thrownError,a=n.isStopped;i?r.error(o):a&&r.complete()},t.prototype.asObservable=function(){var r=new F5;return r.source=this,r},t.create=function(r,n){return new V5(r,n)},t})(F5),V5=(function(e){jl(t,e);function t(r,n){var i=e.call(this)||this;return i.destination=r,i.source=n,i}return t.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},t.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.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,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:hz},t})(vz);function Nae(e,t){return Oae(function(r,n){var i=0;r.subscribe(Cae(n,function(o){return e.call(t,o,i++)&&n.next(o)}))})}var k0={},Ns={},ou={},H5;function gz(){if(H5)return ou;H5=1,Object.defineProperty(ou,"__esModule",{value:!0}),ou.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 ou}var ua={},Ts={},Ps={},W5;function Tae(){if(W5)return Ps;W5=1,Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.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 Ps.default=e,Ps}var U5;function Jd(){if(U5)return Ts;U5=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.default=void 0;var e=t(Tae());function t(i){return i&&i.__esModule?i:{default:i}}function r(i){return typeof i=="string"&&e.default.test(i)}var n=r;return Ts.default=n,Ts}var G5;function Qd(){if(G5)return ua;G5=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.default=void 0,ua.unsafeStringify=n;var e=t(Jd());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 i(a,s=0){const c=n(a,s);if(!(0,e.default)(c))throw TypeError("Stringified UUID is invalid");return c}var o=i;return ua.default=o,ua}var K5;function Pae(){if(K5)return Ns;K5=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.default=void 0;var e=r(gz()),t=Qd();function r(u){return u&&u.__esModule?u:{default:u}}let n,i,o=0,a=0;function s(u,d,h){let p=d&&h||0;const v=d||new Array(16);u=u||{};let y=u.node||n,m=u.clockseq!==void 0?u.clockseq:i;if(y==null||m==null){const E=u.random||(u.rng||e.default)();y==null&&(y=n=[E[0]|1,E[1],E[2],E[3],E[4],E[5]]),m==null&&(m=i=(E[6]<<8|E[7])&16383)}let g=u.msecs!==void 0?u.msecs:Date.now(),w=u.nsecs!==void 0?u.nsecs:a+1;const x=g-o+(w-a)/1e4;if(x<0&&u.clockseq===void 0&&(m=m+1&16383),(x<0||g>o)&&u.nsecs===void 0&&(w=0),w>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");o=g,a=w,i=m,g+=122192928e5;const _=((g&268435455)*1e4+w)%4294967296;v[p++]=_>>>24&255,v[p++]=_>>>16&255,v[p++]=_>>>8&255,v[p++]=_&255;const S=g/4294967296*1e4&268435455;v[p++]=S>>>8&255,v[p++]=S&255,v[p++]=S>>>24&15|16,v[p++]=S>>>16&255,v[p++]=m>>>8|128,v[p++]=m&255;for(let E=0;E<6;++E)v[p+E]=y[E];return d||(0,t.unsafeStringify)(v)}var c=s;return Ns.default=c,Ns}var Ms={},Hi={},ks={},Y5;function mz(){if(Y5)return ks;Y5=1,Object.defineProperty(ks,"__esModule",{value:!0}),ks.default=void 0;var e=t(Jd());function t(i){return i&&i.__esModule?i:{default:i}}function r(i){if(!(0,e.default)(i))throw TypeError("Invalid UUID");let o;const a=new Uint8Array(16);return a[0]=(o=parseInt(i.slice(0,8),16))>>>24,a[1]=o>>>16&255,a[2]=o>>>8&255,a[3]=o&255,a[4]=(o=parseInt(i.slice(9,13),16))>>>8,a[5]=o&255,a[6]=(o=parseInt(i.slice(14,18),16))>>>8,a[7]=o&255,a[8]=(o=parseInt(i.slice(19,23),16))>>>8,a[9]=o&255,a[10]=(o=parseInt(i.slice(24,36),16))/1099511627776&255,a[11]=o/4294967296&255,a[12]=o>>>24&255,a[13]=o>>>16&255,a[14]=o>>>8&255,a[15]=o&255,a}var n=r;return ks.default=n,ks}var X5;function bz(){if(X5)return Hi;X5=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.URL=Hi.DNS=void 0,Hi.default=a;var e=Qd(),t=r(mz());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 i="6ba7b810-9dad-11d1-80b4-00c04fd430c8";Hi.DNS=i;const o="6ba7b811-9dad-11d1-80b4-00c04fd430c8";Hi.URL=o;function a(s,c,u){function d(h,p,v,y){var m;if(typeof h=="string"&&(h=n(h)),typeof p=="string"&&(p=(0,t.default)(p)),((m=p)===null||m===void 0?void 0:m.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let g=new Uint8Array(16+h.length);if(g.set(p),g.set(h,p.length),g=u(g),g[6]=g[6]&15|c,g[8]=g[8]&63|128,v){y=y||0;for(let w=0;w<16;++w)v[y+w]=g[w];return v}return(0,e.unsafeStringify)(g)}try{d.name=s}catch{}return d.DNS=i,d.URL=o,d}return Hi}var As={},Z5;function Mae(){if(Z5)return As;Z5=1,Object.defineProperty(As,"__esModule",{value:!0}),As.default=void 0;function e(v){if(typeof v=="string"){const y=unescape(encodeURIComponent(v));v=new Uint8Array(y.length);for(let m=0;m<y.length;++m)v[m]=y.charCodeAt(m)}return t(n(i(v),v.length*8))}function t(v){const y=[],m=v.length*32,g="0123456789abcdef";for(let w=0;w<m;w+=8){const x=v[w>>5]>>>w%32&255,_=parseInt(g.charAt(x>>>4&15)+g.charAt(x&15),16);y.push(_)}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 m=1732584193,g=-271733879,w=-1732584194,x=271733878;for(let _=0;_<v.length;_+=16){const S=m,E=g,I=w,N=x;m=c(m,g,w,x,v[_],7,-680876936),x=c(x,m,g,w,v[_+1],12,-389564586),w=c(w,x,m,g,v[_+2],17,606105819),g=c(g,w,x,m,v[_+3],22,-1044525330),m=c(m,g,w,x,v[_+4],7,-176418897),x=c(x,m,g,w,v[_+5],12,1200080426),w=c(w,x,m,g,v[_+6],17,-1473231341),g=c(g,w,x,m,v[_+7],22,-45705983),m=c(m,g,w,x,v[_+8],7,1770035416),x=c(x,m,g,w,v[_+9],12,-1958414417),w=c(w,x,m,g,v[_+10],17,-42063),g=c(g,w,x,m,v[_+11],22,-1990404162),m=c(m,g,w,x,v[_+12],7,1804603682),x=c(x,m,g,w,v[_+13],12,-40341101),w=c(w,x,m,g,v[_+14],17,-1502002290),g=c(g,w,x,m,v[_+15],22,1236535329),m=u(m,g,w,x,v[_+1],5,-165796510),x=u(x,m,g,w,v[_+6],9,-1069501632),w=u(w,x,m,g,v[_+11],14,643717713),g=u(g,w,x,m,v[_],20,-373897302),m=u(m,g,w,x,v[_+5],5,-701558691),x=u(x,m,g,w,v[_+10],9,38016083),w=u(w,x,m,g,v[_+15],14,-660478335),g=u(g,w,x,m,v[_+4],20,-405537848),m=u(m,g,w,x,v[_+9],5,568446438),x=u(x,m,g,w,v[_+14],9,-1019803690),w=u(w,x,m,g,v[_+3],14,-187363961),g=u(g,w,x,m,v[_+8],20,1163531501),m=u(m,g,w,x,v[_+13],5,-1444681467),x=u(x,m,g,w,v[_+2],9,-51403784),w=u(w,x,m,g,v[_+7],14,1735328473),g=u(g,w,x,m,v[_+12],20,-1926607734),m=d(m,g,w,x,v[_+5],4,-378558),x=d(x,m,g,w,v[_+8],11,-2022574463),w=d(w,x,m,g,v[_+11],16,1839030562),g=d(g,w,x,m,v[_+14],23,-35309556),m=d(m,g,w,x,v[_+1],4,-1530992060),x=d(x,m,g,w,v[_+4],11,1272893353),w=d(w,x,m,g,v[_+7],16,-155497632),g=d(g,w,x,m,v[_+10],23,-1094730640),m=d(m,g,w,x,v[_+13],4,681279174),x=d(x,m,g,w,v[_],11,-358537222),w=d(w,x,m,g,v[_+3],16,-722521979),g=d(g,w,x,m,v[_+6],23,76029189),m=d(m,g,w,x,v[_+9],4,-640364487),x=d(x,m,g,w,v[_+12],11,-421815835),w=d(w,x,m,g,v[_+15],16,530742520),g=d(g,w,x,m,v[_+2],23,-995338651),m=h(m,g,w,x,v[_],6,-198630844),x=h(x,m,g,w,v[_+7],10,1126891415),w=h(w,x,m,g,v[_+14],15,-1416354905),g=h(g,w,x,m,v[_+5],21,-57434055),m=h(m,g,w,x,v[_+12],6,1700485571),x=h(x,m,g,w,v[_+3],10,-1894986606),w=h(w,x,m,g,v[_+10],15,-1051523),g=h(g,w,x,m,v[_+1],21,-2054922799),m=h(m,g,w,x,v[_+8],6,1873313359),x=h(x,m,g,w,v[_+15],10,-30611744),w=h(w,x,m,g,v[_+6],15,-1560198380),g=h(g,w,x,m,v[_+13],21,1309151649),m=h(m,g,w,x,v[_+4],6,-145523070),x=h(x,m,g,w,v[_+11],10,-1120210379),w=h(w,x,m,g,v[_+2],15,718787259),g=h(g,w,x,m,v[_+9],21,-343485551),m=o(m,S),g=o(g,E),w=o(w,I),x=o(x,N)}return[m,g,w,x]}function i(v){if(v.length===0)return[];const y=v.length*8,m=new Uint32Array(r(y));for(let g=0;g<y;g+=8)m[g>>5]|=(v[g/8]&255)<<g%32;return m}function o(v,y){const m=(v&65535)+(y&65535);return(v>>16)+(y>>16)+(m>>16)<<16|m&65535}function a(v,y){return v<<y|v>>>32-y}function s(v,y,m,g,w,x){return o(a(o(o(y,v),o(g,x)),w),m)}function c(v,y,m,g,w,x,_){return s(y&m|~y&g,v,y,w,x,_)}function u(v,y,m,g,w,x,_){return s(y&g|m&~g,v,y,w,x,_)}function d(v,y,m,g,w,x,_){return s(y^m^g,v,y,w,x,_)}function h(v,y,m,g,w,x,_){return s(m^(y|~g),v,y,w,x,_)}var p=e;return As.default=p,As}var J5;function kae(){if(J5)return Ms;J5=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.default=void 0;var e=r(bz()),t=r(Mae());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v3",48,t.default);return Ms.default=i,Ms}var Ds={},js={},Q5;function Aae(){if(Q5)return js;Q5=1,Object.defineProperty(js,"__esModule",{value:!0}),js.default=void 0;var t={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};return js.default=t,js}var eM;function Dae(){if(eM)return Ds;eM=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.default=void 0;var e=n(Aae()),t=n(gz()),r=Qd();function n(a){return a&&a.__esModule?a:{default:a}}function i(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 o=i;return Ds.default=o,Ds}var qs={},zs={},tM;function jae(){if(tM)return zs;tM=1,Object.defineProperty(zs,"__esModule",{value:!0}),zs.default=void 0;function e(i,o,a,s){switch(i){case 0:return o&a^~o&s;case 1:return o^a^s;case 2:return o&a^o&s^a&s;case 3:return o^a^s}}function t(i,o){return i<<o|i>>>32-o}function r(i){const o=[1518500249,1859775393,2400959708,3395469782],a=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof i=="string"){const d=unescape(encodeURIComponent(i));i=[];for(let h=0;h<d.length;++h)i.push(d.charCodeAt(h))}else Array.isArray(i)||(i=Array.prototype.slice.call(i));i.push(128);const s=i.length/4+2,c=Math.ceil(s/16),u=new Array(c);for(let d=0;d<c;++d){const h=new Uint32Array(16);for(let p=0;p<16;++p)h[p]=i[d*64+p*4]<<24|i[d*64+p*4+1]<<16|i[d*64+p*4+2]<<8|i[d*64+p*4+3];u[d]=h}u[c-1][14]=(i.length-1)*8/Math.pow(2,32),u[c-1][14]=Math.floor(u[c-1][14]),u[c-1][15]=(i.length-1)*8&4294967295;for(let d=0;d<c;++d){const h=new Uint32Array(80);for(let w=0;w<16;++w)h[w]=u[d][w];for(let w=16;w<80;++w)h[w]=t(h[w-3]^h[w-8]^h[w-14]^h[w-16],1);let p=a[0],v=a[1],y=a[2],m=a[3],g=a[4];for(let w=0;w<80;++w){const x=Math.floor(w/20),_=t(p,5)+e(x,v,y,m)+g+o[x]+h[w]>>>0;g=m,m=y,y=t(v,30)>>>0,v=p,p=_}a[0]=a[0]+p>>>0,a[1]=a[1]+v>>>0,a[2]=a[2]+y>>>0,a[3]=a[3]+m>>>0,a[4]=a[4]+g>>>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 zs.default=n,zs}var rM;function qae(){if(rM)return qs;rM=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.default=void 0;var e=r(bz()),t=r(jae());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v5",80,t.default);return qs.default=i,qs}var Ls={},nM;function zae(){if(nM)return Ls;nM=1,Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.default=void 0;var e="00000000-0000-0000-0000-000000000000";return Ls.default=e,Ls}var Bs={},iM;function Lae(){if(iM)return Bs;iM=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.default=void 0;var e=t(Jd());function t(i){return i&&i.__esModule?i:{default:i}}function r(i){if(!(0,e.default)(i))throw TypeError("Invalid UUID");return parseInt(i.slice(14,15),16)}var n=r;return Bs.default=n,Bs}var oM;function Bae(){return oM||(oM=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NIL",{enumerable:!0,get:function(){return o.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 i.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(Pae()),r=d(kae()),n=d(Dae()),i=d(qae()),o=d(zae()),a=d(Lae()),s=d(Jd()),c=d(Qd()),u=d(mz());function d(h){return h&&h.__esModule?h:{default:h}}})(k0)),k0}var A0,aM;function Fae(){if(aM)return A0;aM=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,i,o={},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++)o[r]=this.srcAlphabet.indexOf(t[r]);do{for(n=0,i=0,r=0;r<c;r++)n=n*a+o[r],n>=s?(o[i++]=parseInt(n/s,10),n=n%s):i>0&&(o[i++]=0);c=i,u=this.dstAlphabet.slice(n,n+1).concat(u)}while(i!==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},A0=e,A0}var D0,sM;function $ae(){if(sM)return D0;sM=1;var e=Fae();function t(r,n){var i=new e(r,n);return function(o){return i.convert(o)}}return t.BIN="01",t.OCT="01234567",t.DEC="0123456789",t.HEX="0123456789abcdef",D0=t,D0}var j0,lM;function Vae(){if(lM)return j0;lM=1;const{v4:e,validate:t}=Bae(),r=$ae(),n={cookieBase90:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",flickrBase58:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",uuid25Base36:"0123456789abcdefghijklmnopqrstuvwxyz"},i={consistentLength:!0};let o;const a=(u,d,h)=>{const p=d(u.toLowerCase().replace(/-/g,""));return!h||!h.consistentLength?p:p.padStart(h.shortIdLength,h.paddingChar)},s=(u,d)=>{const p=d(u).padStart(32,"0").match(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);return[p[1],p[2],p[3],p[4],p[5]].join("-")},c=u=>Math.ceil(Math.log(2**128)/Math.log(u));return j0=(()=>{const u=(d,h)=>{const p=d||n.flickrBase58,v={...i,...h};if([...new Set(Array.from(p))].length!==p.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const y=c(p.length),m={shortIdLength:y,consistentLength:v.consistentLength,paddingChar:p[0]},g=r(r.HEX,p),w=r(p,r.HEX),x=()=>a(e(),g,m),S={alphabet:p,fromUUID:E=>a(E,g,m),maxLength:y,generate:x,new:x,toUUID:E=>s(E,w),uuid:e,validate:(E,I=!1)=>{if(!E||typeof E!="string")return!1;const N=v.consistentLength?E.length===y:E.length<=y,T=E.split("").every(M=>p.includes(M));return I===!1?N&&T:N&&T&&t(s(E,w))}};return Object.freeze(S),S};return u.constants=n,u.uuid=e,u.generate=()=>(o||(o=u(n.flickrBase58).generate),o()),u})(),j0}var yz=Vae();const xz=new vz;function Hae(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={},...i}=t.payload,o=pe.sanitizeRoles(r),a={...e.flags,...n};return{...e,...o,...i,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 i;if(n)if(e.modals.list.find(a=>a.id===r))i={...e,modals:{...e.modals,list:e.modals.list.map(a=>a.id===r?{...a,closeReason:n,isOpen:!1}:a)}};else return e;else i={...e,modals:{...e.modals,list:e.modals.list.filter(o=>o.id!==r)}};return xz.next(i.modals),i}case"EDIT_MODAL":{const{id:r,...n}=t.payload;return e.modals.list.find(o=>o.id===r)?{...e,modals:{...e.modals,list:e.modals.list.map(o=>o.id===r?{...o,...n}:o)}}:e}default:return e}}const KS=C.createContext(null),Wae=()=>({roles:{},privileges:{},flags:{touched:!1},date:void 0,selectedTab:"roles",forceLogin:!1,restrictedByDefault:!1,modals:{list:[]}}),Uae=({children:e,catalog:t=null,qodly:r=!1,host:n,onSetTabFlags:i,initialState:o})=>{const[a,s]=C.useReducer(Hae,{...Wae(),...o}),c=C.useMemo(()=>t?pe.parseCatalog(t):null,[t]),u=C.useMemo(()=>({catalog:c,qodly:r,host:n,onSetTabFlags:i}),[c,r,n,i]);return O.jsx(KS.Provider,{value:{state:a,dispatch:s,external:u},children:e})};function Gae(){const e=C.useContext(KS);if(!e)throw new Error("useReducerAdapter must be used within a ReducerAdapterProvider");const{state:t,dispatch:r,external:n}=e,i=C.useMemo(()=>pe.rolesToAPI({roles:t.roles,privileges:t.privileges,forceLogin:t.forceLogin,restrictedByDefault:t.restrictedByDefault}),[t.roles,t.privileges,t.forceLogin,t.restrictedByDefault]),o=C.useCallback(s=>{const{roles:c,privileges:u,forceLogin:d,restrictedByDefault:h}=pe.sanitizeRoles(s);r({type:"UPDATE_ROLES",payload:c}),r({type:"UPDATE_PRIVILEGES",payload:u}),r({type:"TOGGLE_FORCE_LOGIN",payload:d??!1}),r({type:"TOGGLE_RESTRICTED_BY_DEFAULT",payload:h??!1})},[r]),a=cz(i,o);return{getRoles:C.useCallback(()=>t.roles,[t.roles]),getPrivileges:C.useCallback(()=>t.privileges,[t.privileges]),getRolesFlags:C.useCallback(()=>t.flags,[t.flags]),getRolesAndPrivileges:C.useCallback(()=>i,[i]),getCatalog:C.useCallback(()=>n.catalog??null,[n.catalog]),getQodly:C.useCallback(()=>n.qodly??!1,[n.qodly]),getSelectedTab:C.useCallback(()=>t.selectedTab,[t.selectedTab]),getForceLogin:C.useCallback(()=>t.forceLogin??!1,[t.forceLogin]),getRestrictedByDefault:C.useCallback(()=>t.restrictedByDefault??!1,[t.restrictedByDefault]),getGuestPrivilege:C.useCallback(()=>Object.values(t.privileges).find(({privilege:s})=>s==="guest")??null,[t.privileges]),getCatalogMethods:C.useCallback(()=>{var s;return((s=n.catalog)==null?void 0:s.methods)??[]},[n.catalog]),getDataclasses:C.useCallback(()=>{var s;return((s=n.catalog)==null?void 0:s.dataClasses)??{}},[n.catalog]),getSingletons:C.useCallback(()=>{var s;return((s=n.catalog)==null?void 0:s.singletons)??{}},[n.catalog]),getHost:C.useCallback(()=>n.host??"web",[n.host]),getHistory:C.useCallback(()=>({canUndo:a.canUndo,canRedo:a.canRedo}),[a.canUndo,a.canRedo]),actions:{updateRoles:C.useCallback(s=>{a.markEdit(),r({type:"UPDATE_ROLES",payload:s})},[a.markEdit]),updatePrivileges:C.useCallback(s=>{a.markEdit(),r({type:"UPDATE_PRIVILEGES",payload:s})},[a.markEdit]),setRolesContent:C.useCallback(s=>{r({type:"SET_ROLES_CONTENT",payload:s})},[]),toggleTab:C.useCallback(s=>{r({type:"TOGGLE_TAB",payload:s})},[]),toggleForceLogin:C.useCallback(s=>{a.markEdit(),r({type:"TOGGLE_FORCE_LOGIN",payload:s})},[a.markEdit]),toggleRestrictedByDefault:C.useCallback(s=>{a.markEdit(),r({type:"TOGGLE_RESTRICTED_BY_DEFAULT",payload:s})},[a.markEdit]),setTabFlags:C.useCallback((s,c)=>{n.onSetTabFlags&&n.onSetTabFlags(s,c)},[n.onSetTabFlags]),openModal:C.useCallback(async s=>{const{type:c=pe.ModalType.ALERT}=s,u=yz.generate();return r({type:"CREATE_MODAL",payload:{id:u,type:c,isOpen:!0,...s}}),c===pe.ModalType.CONFIRM?new Promise(d=>{const h=xz.pipe(Nae(p=>{const v=p.list.find(y=>y.id===u);return v!==void 0&&!v.isOpen})).subscribe(p=>{var y;const v=p.list.find(m=>m.id===u);if(v){const m=v.closeReason===pe.ModalCloseReason.CONFIRMED,g=Xi.entries(((y=v.views)==null?void 0:y.toggles)||{}).reduce((w,x)=>({...w,[x[0]]:x[1].value}),{});r({type:"REMOVE_MODAL",payload:u}),h.unsubscribe(),d({confirmed:m,options:g})}})}):{confirmed:!1}},[r]),undo:a.undo,redo:a.redo}}}function Kae(){const e=C.useContext(KS);if(!e)throw new Error("useModals must be used within a ReducerAdapterProvider");const{state:t,dispatch:r}=e;return{modals:t.modals.list,closeModal:C.useCallback(n=>{r({type:"CLOSE_MODAL",payload:n})},[r]),editModal:C.useCallback(n=>{r({type:"EDIT_MODAL",payload:n})},[r]),removeModal:C.useCallback(n=>{r({type:"REMOVE_MODAL",payload:n})},[r])}}const q0=({child:e,parent:t,status:r})=>{const n=Tr(),i=n.getPrivileges();function o(){const s=pe.addPrivilegeIn(t.id,e.id,i);n.actions.updatePrivileges(s)}function a(){const s=pe.removePrivilegeFrom(t.id,e.id,i);n.actions.updatePrivileges(s)}return O.jsxs(vu,{color:r==="included"?"primary":"dark",onClick:r==="included"?a:o,disabled:r==="disabled",children:[e.privilege,O.jsx(ja,{className:an("transform transition-transform",{"rotate-45":r==="included"})})]})},Yae=({selectedPrivilege:e,privileges:t,onSelect:r,setShowIncluded:n,showIncluded:i})=>{const o=Object.values(t),a=pe.getPrivilegeById(e.id,t);let s=a?pe.populateShallow(a.includes,t):[],c=a?pe.populateShallow(pe.parents(a.id,t),t):[],u=a?pe.populateShallow(pe.allowed(a.id,t),t):[];return[s,c,u]=[s,c,u].map(d=>d.filter(h=>(h==null?void 0:h.privilege)!=="guest")),o.length<2&&s.length+c.length+u.length===0?null:O.jsxs(br,{depth:1,className:"w-full border-b p-4",children:[O.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[" ",o.length>2?O.jsx("h4",{className:"text-[13px] font-semibold",children:"Include a privilege"}):O.jsx("div",{}),O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(Fu,{onChange:()=>n(!i),checked:i}),O.jsx("label",{className:"text-xs",children:" Show inherited permissions"})]})]}),O.jsxs("div",{className:"flex flex-wrap items-start justify-start gap-1",children:[s.map(d=>O.jsx(q0,{child:d,parent:e,status:"included",onSelect:r,currentPrivilegeId:d.id},d.id)),u.map(d=>O.jsx(q0,{child:d,parent:e,status:"available",onSelect:r,currentPrivilegeId:d.id},d.id)),c.map(d=>O.jsx(q0,{child:d,parent:e,status:"disabled",onSelect:r,currentPrivilegeId:d.id},d.id))]})]})};function da(e,t,r){let n=r.initialDeps??[],i,o=!0;function a(){var s,c,u;let d;r.key&&((s=r.debug)!=null&&s.call(r))&&(d=Date.now());const h=e();if(!(h.length!==n.length||h.some((y,m)=>n[m]!==y)))return i;n=h;let v;if(r.key&&((c=r.debug)!=null&&c.call(r))&&(v=Date.now()),i=t(...h),r.key&&((u=r.debug)!=null&&u.call(r))){const y=Math.round((Date.now()-d)*100)/100,m=Math.round((Date.now()-v)*100)/100,g=m/16,w=(x,_)=>{for(x=String(x);x.length<_;)x=" "+x;return x};console.info(`%c⏱ ${w(m,5)} /${w(y,5)} ms`,`
|
|
91
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}});function t1(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Zd=(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,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=Jw(a),c=s.next();!c.done;c=s.next()){var d=c.value;d.remove(this)}}catch(m){t={error:m}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}else a.remove(this);var u=this.initialTeardown;if(oi(u))try{u()}catch(m){o=m instanceof M0?m.errors:[m]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var p=Jw(h),v=p.next();!v.done;v=p.next()){var y=v.value;try{L5(y)}catch(m){o=o??[],m instanceof M0?o=e1(e1([],Qw(o)),Qw(m.errors)):o.push(m)}}}catch(m){n={error:m}}finally{try{v&&!v.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}}if(o)throw new M0(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)L5(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)&&t1(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&t1(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),hz=Zd.EMPTY;function pz(e){return e instanceof Zd||e&&"closed"in e&&oi(e.remove)&&oi(e.add)&&oi(e.unsubscribe)}function L5(e){oi(e)?e():e.unsubscribe()}var hae={Promise:void 0},pae={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,e1([e,t],Qw(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function vae(e){pae.setTimeout(function(){throw e})}function B5(){}function Iu(e){e()}var GS=(function(e){jl(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,pz(r)&&r.add(n)):n.destination=bae,n}return t.create=function(r,n,i){return new r1(r,n,i)},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})(Zd),gae=(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){iu(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){iu(n)}else iu(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){iu(r)}},e})(),r1=(function(e){jl(t,e);function t(r,n,i){var o=e.call(this)||this,a;return oi(r)||!r?a={next:r??void 0,error:n??void 0,complete:i??void 0}:a=r,o.destination=new gae(a),o}return t})(GS);function iu(e){vae(e)}function mae(e){throw e}var bae={closed:!0,next:B5,error:mae,complete:B5},yae=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function xae(e){return e}function wae(e){return e.length===0?xae:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}var F5=(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 i=this,o=Eae(t)?t:new r1(t,r,n);return Iu(function(){var a=i,s=a.operator,c=a.source;o.add(s?s.call(o,c):c?i._subscribe(o):i._trySubscribe(o))}),o},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=$5(r),new r(function(i,o){var a=new r1({next:function(s){try{t(s)}catch(c){o(c),a.unsubscribe()}},error:o,complete:i});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[yae]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return wae(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=$5(t),new t(function(n,i){var o;r.subscribe(function(a){return o=a},function(a){return i(a)},function(){return n(o)})})},e.create=function(t){return new e(t)},e})();function $5(e){var t;return(t=e??hae.Promise)!==null&&t!==void 0?t:Promise}function Sae(e){return e&&oi(e.next)&&oi(e.error)&&oi(e.complete)}function Eae(e){return e&&e instanceof GS||Sae(e)&&pz(e)}function _ae(e){return oi(e==null?void 0:e.lift)}function Oae(e){return function(t){if(_ae(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 Cae(e,t,r,n,i){return new Iae(e,t,r,n,i)}var Iae=(function(e){jl(t,e);function t(r,n,i,o,a,s){var c=e.call(this,r)||this;return c.onFinalize=a,c.shouldUnsubscribe=s,c._next=n?function(d){try{n(d)}catch(u){r.error(u)}}:e.prototype._next,c._error=o?function(d){try{o(d)}catch(u){r.error(u)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=i?function(){try{i()}catch(d){r.error(d)}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})(GS),Rae=fz(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),vz=(function(e){jl(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 V5(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new Rae},t.prototype.next=function(r){var n=this;Iu(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=Jw(n.currentObservers),s=a.next();!s.done;s=a.next()){var c=s.value;c.next(r)}}catch(d){i={error:d}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},t.prototype.error=function(r){var n=this;Iu(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var i=n.observers;i.length;)i.shift().error(r)}})},t.prototype.complete=function(){var r=this;Iu(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,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?hz:(this.currentObservers=null,s.push(r),new Zd(function(){n.currentObservers=null,t1(s,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,o=n.thrownError,a=n.isStopped;i?r.error(o):a&&r.complete()},t.prototype.asObservable=function(){var r=new F5;return r.source=this,r},t.create=function(r,n){return new V5(r,n)},t})(F5),V5=(function(e){jl(t,e);function t(r,n){var i=e.call(this)||this;return i.destination=r,i.source=n,i}return t.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},t.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.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,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:hz},t})(vz);function Nae(e,t){return Oae(function(r,n){var i=0;r.subscribe(Cae(n,function(o){return e.call(t,o,i++)&&n.next(o)}))})}var k0={},Ns={},ou={},H5;function gz(){if(H5)return ou;H5=1,Object.defineProperty(ou,"__esModule",{value:!0}),ou.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 ou}var ua={},Ts={},Ps={},W5;function Tae(){if(W5)return Ps;W5=1,Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.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 Ps.default=e,Ps}var U5;function Jd(){if(U5)return Ts;U5=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.default=void 0;var e=t(Tae());function t(i){return i&&i.__esModule?i:{default:i}}function r(i){return typeof i=="string"&&e.default.test(i)}var n=r;return Ts.default=n,Ts}var G5;function Qd(){if(G5)return ua;G5=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.default=void 0,ua.unsafeStringify=n;var e=t(Jd());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 i(a,s=0){const c=n(a,s);if(!(0,e.default)(c))throw TypeError("Stringified UUID is invalid");return c}var o=i;return ua.default=o,ua}var K5;function Pae(){if(K5)return Ns;K5=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.default=void 0;var e=r(gz()),t=Qd();function r(d){return d&&d.__esModule?d:{default:d}}let n,i,o=0,a=0;function s(d,u,h){let p=u&&h||0;const v=u||new Array(16);d=d||{};let y=d.node||n,m=d.clockseq!==void 0?d.clockseq:i;if(y==null||m==null){const E=d.random||(d.rng||e.default)();y==null&&(y=n=[E[0]|1,E[1],E[2],E[3],E[4],E[5]]),m==null&&(m=i=(E[6]<<8|E[7])&16383)}let g=d.msecs!==void 0?d.msecs:Date.now(),w=d.nsecs!==void 0?d.nsecs:a+1;const x=g-o+(w-a)/1e4;if(x<0&&d.clockseq===void 0&&(m=m+1&16383),(x<0||g>o)&&d.nsecs===void 0&&(w=0),w>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");o=g,a=w,i=m,g+=122192928e5;const _=((g&268435455)*1e4+w)%4294967296;v[p++]=_>>>24&255,v[p++]=_>>>16&255,v[p++]=_>>>8&255,v[p++]=_&255;const S=g/4294967296*1e4&268435455;v[p++]=S>>>8&255,v[p++]=S&255,v[p++]=S>>>24&15|16,v[p++]=S>>>16&255,v[p++]=m>>>8|128,v[p++]=m&255;for(let E=0;E<6;++E)v[p+E]=y[E];return u||(0,t.unsafeStringify)(v)}var c=s;return Ns.default=c,Ns}var Ms={},Hi={},ks={},Y5;function mz(){if(Y5)return ks;Y5=1,Object.defineProperty(ks,"__esModule",{value:!0}),ks.default=void 0;var e=t(Jd());function t(i){return i&&i.__esModule?i:{default:i}}function r(i){if(!(0,e.default)(i))throw TypeError("Invalid UUID");let o;const a=new Uint8Array(16);return a[0]=(o=parseInt(i.slice(0,8),16))>>>24,a[1]=o>>>16&255,a[2]=o>>>8&255,a[3]=o&255,a[4]=(o=parseInt(i.slice(9,13),16))>>>8,a[5]=o&255,a[6]=(o=parseInt(i.slice(14,18),16))>>>8,a[7]=o&255,a[8]=(o=parseInt(i.slice(19,23),16))>>>8,a[9]=o&255,a[10]=(o=parseInt(i.slice(24,36),16))/1099511627776&255,a[11]=o/4294967296&255,a[12]=o>>>24&255,a[13]=o>>>16&255,a[14]=o>>>8&255,a[15]=o&255,a}var n=r;return ks.default=n,ks}var X5;function bz(){if(X5)return Hi;X5=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.URL=Hi.DNS=void 0,Hi.default=a;var e=Qd(),t=r(mz());function r(s){return s&&s.__esModule?s:{default:s}}function n(s){s=unescape(encodeURIComponent(s));const c=[];for(let d=0;d<s.length;++d)c.push(s.charCodeAt(d));return c}const i="6ba7b810-9dad-11d1-80b4-00c04fd430c8";Hi.DNS=i;const o="6ba7b811-9dad-11d1-80b4-00c04fd430c8";Hi.URL=o;function a(s,c,d){function u(h,p,v,y){var m;if(typeof h=="string"&&(h=n(h)),typeof p=="string"&&(p=(0,t.default)(p)),((m=p)===null||m===void 0?void 0:m.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let g=new Uint8Array(16+h.length);if(g.set(p),g.set(h,p.length),g=d(g),g[6]=g[6]&15|c,g[8]=g[8]&63|128,v){y=y||0;for(let w=0;w<16;++w)v[y+w]=g[w];return v}return(0,e.unsafeStringify)(g)}try{u.name=s}catch{}return u.DNS=i,u.URL=o,u}return Hi}var As={},Z5;function Mae(){if(Z5)return As;Z5=1,Object.defineProperty(As,"__esModule",{value:!0}),As.default=void 0;function e(v){if(typeof v=="string"){const y=unescape(encodeURIComponent(v));v=new Uint8Array(y.length);for(let m=0;m<y.length;++m)v[m]=y.charCodeAt(m)}return t(n(i(v),v.length*8))}function t(v){const y=[],m=v.length*32,g="0123456789abcdef";for(let w=0;w<m;w+=8){const x=v[w>>5]>>>w%32&255,_=parseInt(g.charAt(x>>>4&15)+g.charAt(x&15),16);y.push(_)}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 m=1732584193,g=-271733879,w=-1732584194,x=271733878;for(let _=0;_<v.length;_+=16){const S=m,E=g,I=w,N=x;m=c(m,g,w,x,v[_],7,-680876936),x=c(x,m,g,w,v[_+1],12,-389564586),w=c(w,x,m,g,v[_+2],17,606105819),g=c(g,w,x,m,v[_+3],22,-1044525330),m=c(m,g,w,x,v[_+4],7,-176418897),x=c(x,m,g,w,v[_+5],12,1200080426),w=c(w,x,m,g,v[_+6],17,-1473231341),g=c(g,w,x,m,v[_+7],22,-45705983),m=c(m,g,w,x,v[_+8],7,1770035416),x=c(x,m,g,w,v[_+9],12,-1958414417),w=c(w,x,m,g,v[_+10],17,-42063),g=c(g,w,x,m,v[_+11],22,-1990404162),m=c(m,g,w,x,v[_+12],7,1804603682),x=c(x,m,g,w,v[_+13],12,-40341101),w=c(w,x,m,g,v[_+14],17,-1502002290),g=c(g,w,x,m,v[_+15],22,1236535329),m=d(m,g,w,x,v[_+1],5,-165796510),x=d(x,m,g,w,v[_+6],9,-1069501632),w=d(w,x,m,g,v[_+11],14,643717713),g=d(g,w,x,m,v[_],20,-373897302),m=d(m,g,w,x,v[_+5],5,-701558691),x=d(x,m,g,w,v[_+10],9,38016083),w=d(w,x,m,g,v[_+15],14,-660478335),g=d(g,w,x,m,v[_+4],20,-405537848),m=d(m,g,w,x,v[_+9],5,568446438),x=d(x,m,g,w,v[_+14],9,-1019803690),w=d(w,x,m,g,v[_+3],14,-187363961),g=d(g,w,x,m,v[_+8],20,1163531501),m=d(m,g,w,x,v[_+13],5,-1444681467),x=d(x,m,g,w,v[_+2],9,-51403784),w=d(w,x,m,g,v[_+7],14,1735328473),g=d(g,w,x,m,v[_+12],20,-1926607734),m=u(m,g,w,x,v[_+5],4,-378558),x=u(x,m,g,w,v[_+8],11,-2022574463),w=u(w,x,m,g,v[_+11],16,1839030562),g=u(g,w,x,m,v[_+14],23,-35309556),m=u(m,g,w,x,v[_+1],4,-1530992060),x=u(x,m,g,w,v[_+4],11,1272893353),w=u(w,x,m,g,v[_+7],16,-155497632),g=u(g,w,x,m,v[_+10],23,-1094730640),m=u(m,g,w,x,v[_+13],4,681279174),x=u(x,m,g,w,v[_],11,-358537222),w=u(w,x,m,g,v[_+3],16,-722521979),g=u(g,w,x,m,v[_+6],23,76029189),m=u(m,g,w,x,v[_+9],4,-640364487),x=u(x,m,g,w,v[_+12],11,-421815835),w=u(w,x,m,g,v[_+15],16,530742520),g=u(g,w,x,m,v[_+2],23,-995338651),m=h(m,g,w,x,v[_],6,-198630844),x=h(x,m,g,w,v[_+7],10,1126891415),w=h(w,x,m,g,v[_+14],15,-1416354905),g=h(g,w,x,m,v[_+5],21,-57434055),m=h(m,g,w,x,v[_+12],6,1700485571),x=h(x,m,g,w,v[_+3],10,-1894986606),w=h(w,x,m,g,v[_+10],15,-1051523),g=h(g,w,x,m,v[_+1],21,-2054922799),m=h(m,g,w,x,v[_+8],6,1873313359),x=h(x,m,g,w,v[_+15],10,-30611744),w=h(w,x,m,g,v[_+6],15,-1560198380),g=h(g,w,x,m,v[_+13],21,1309151649),m=h(m,g,w,x,v[_+4],6,-145523070),x=h(x,m,g,w,v[_+11],10,-1120210379),w=h(w,x,m,g,v[_+2],15,718787259),g=h(g,w,x,m,v[_+9],21,-343485551),m=o(m,S),g=o(g,E),w=o(w,I),x=o(x,N)}return[m,g,w,x]}function i(v){if(v.length===0)return[];const y=v.length*8,m=new Uint32Array(r(y));for(let g=0;g<y;g+=8)m[g>>5]|=(v[g/8]&255)<<g%32;return m}function o(v,y){const m=(v&65535)+(y&65535);return(v>>16)+(y>>16)+(m>>16)<<16|m&65535}function a(v,y){return v<<y|v>>>32-y}function s(v,y,m,g,w,x){return o(a(o(o(y,v),o(g,x)),w),m)}function c(v,y,m,g,w,x,_){return s(y&m|~y&g,v,y,w,x,_)}function d(v,y,m,g,w,x,_){return s(y&g|m&~g,v,y,w,x,_)}function u(v,y,m,g,w,x,_){return s(y^m^g,v,y,w,x,_)}function h(v,y,m,g,w,x,_){return s(m^(y|~g),v,y,w,x,_)}var p=e;return As.default=p,As}var J5;function kae(){if(J5)return Ms;J5=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.default=void 0;var e=r(bz()),t=r(Mae());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v3",48,t.default);return Ms.default=i,Ms}var Ds={},js={},Q5;function Aae(){if(Q5)return js;Q5=1,Object.defineProperty(js,"__esModule",{value:!0}),js.default=void 0;var t={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};return js.default=t,js}var eM;function Dae(){if(eM)return Ds;eM=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.default=void 0;var e=n(Aae()),t=n(gz()),r=Qd();function n(a){return a&&a.__esModule?a:{default:a}}function i(a,s,c){if(e.default.randomUUID&&!s&&!a)return e.default.randomUUID();a=a||{};const d=a.random||(a.rng||t.default)();if(d[6]=d[6]&15|64,d[8]=d[8]&63|128,s){c=c||0;for(let u=0;u<16;++u)s[c+u]=d[u];return s}return(0,r.unsafeStringify)(d)}var o=i;return Ds.default=o,Ds}var qs={},zs={},tM;function jae(){if(tM)return zs;tM=1,Object.defineProperty(zs,"__esModule",{value:!0}),zs.default=void 0;function e(i,o,a,s){switch(i){case 0:return o&a^~o&s;case 1:return o^a^s;case 2:return o&a^o&s^a&s;case 3:return o^a^s}}function t(i,o){return i<<o|i>>>32-o}function r(i){const o=[1518500249,1859775393,2400959708,3395469782],a=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof i=="string"){const u=unescape(encodeURIComponent(i));i=[];for(let h=0;h<u.length;++h)i.push(u.charCodeAt(h))}else Array.isArray(i)||(i=Array.prototype.slice.call(i));i.push(128);const s=i.length/4+2,c=Math.ceil(s/16),d=new Array(c);for(let u=0;u<c;++u){const h=new Uint32Array(16);for(let p=0;p<16;++p)h[p]=i[u*64+p*4]<<24|i[u*64+p*4+1]<<16|i[u*64+p*4+2]<<8|i[u*64+p*4+3];d[u]=h}d[c-1][14]=(i.length-1)*8/Math.pow(2,32),d[c-1][14]=Math.floor(d[c-1][14]),d[c-1][15]=(i.length-1)*8&4294967295;for(let u=0;u<c;++u){const h=new Uint32Array(80);for(let w=0;w<16;++w)h[w]=d[u][w];for(let w=16;w<80;++w)h[w]=t(h[w-3]^h[w-8]^h[w-14]^h[w-16],1);let p=a[0],v=a[1],y=a[2],m=a[3],g=a[4];for(let w=0;w<80;++w){const x=Math.floor(w/20),_=t(p,5)+e(x,v,y,m)+g+o[x]+h[w]>>>0;g=m,m=y,y=t(v,30)>>>0,v=p,p=_}a[0]=a[0]+p>>>0,a[1]=a[1]+v>>>0,a[2]=a[2]+y>>>0,a[3]=a[3]+m>>>0,a[4]=a[4]+g>>>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 zs.default=n,zs}var rM;function qae(){if(rM)return qs;rM=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.default=void 0;var e=r(bz()),t=r(jae());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v5",80,t.default);return qs.default=i,qs}var Ls={},nM;function zae(){if(nM)return Ls;nM=1,Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.default=void 0;var e="00000000-0000-0000-0000-000000000000";return Ls.default=e,Ls}var Bs={},iM;function Lae(){if(iM)return Bs;iM=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.default=void 0;var e=t(Jd());function t(i){return i&&i.__esModule?i:{default:i}}function r(i){if(!(0,e.default)(i))throw TypeError("Invalid UUID");return parseInt(i.slice(14,15),16)}var n=r;return Bs.default=n,Bs}var oM;function Bae(){return oM||(oM=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NIL",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return d.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 i.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=u(Pae()),r=u(kae()),n=u(Dae()),i=u(qae()),o=u(zae()),a=u(Lae()),s=u(Jd()),c=u(Qd()),d=u(mz());function u(h){return h&&h.__esModule?h:{default:h}}})(k0)),k0}var A0,aM;function Fae(){if(aM)return A0;aM=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,i,o={},a=this.srcAlphabet.length,s=this.dstAlphabet.length,c=t.length,d=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++)o[r]=this.srcAlphabet.indexOf(t[r]);do{for(n=0,i=0,r=0;r<c;r++)n=n*a+o[r],n>=s?(o[i++]=parseInt(n/s,10),n=n%s):i>0&&(o[i++]=0);c=i,d=this.dstAlphabet.slice(n,n+1).concat(d)}while(i!==0);return d},e.prototype.isValid=function(t){for(var r=0;r<t.length;++r)if(this.srcAlphabet.indexOf(t[r])===-1)return!1;return!0},A0=e,A0}var D0,sM;function $ae(){if(sM)return D0;sM=1;var e=Fae();function t(r,n){var i=new e(r,n);return function(o){return i.convert(o)}}return t.BIN="01",t.OCT="01234567",t.DEC="0123456789",t.HEX="0123456789abcdef",D0=t,D0}var j0,lM;function Vae(){if(lM)return j0;lM=1;const{v4:e,validate:t}=Bae(),r=$ae(),n={cookieBase90:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",flickrBase58:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",uuid25Base36:"0123456789abcdefghijklmnopqrstuvwxyz"},i={consistentLength:!0};let o;const a=(d,u,h)=>{const p=u(d.toLowerCase().replace(/-/g,""));return!h||!h.consistentLength?p:p.padStart(h.shortIdLength,h.paddingChar)},s=(d,u)=>{const p=u(d).padStart(32,"0").match(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);return[p[1],p[2],p[3],p[4],p[5]].join("-")},c=d=>Math.ceil(Math.log(2**128)/Math.log(d));return j0=(()=>{const d=(u,h)=>{const p=u||n.flickrBase58,v={...i,...h};if([...new Set(Array.from(p))].length!==p.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const y=c(p.length),m={shortIdLength:y,consistentLength:v.consistentLength,paddingChar:p[0]},g=r(r.HEX,p),w=r(p,r.HEX),x=()=>a(e(),g,m),S={alphabet:p,fromUUID:E=>a(E,g,m),maxLength:y,generate:x,new:x,toUUID:E=>s(E,w),uuid:e,validate:(E,I=!1)=>{if(!E||typeof E!="string")return!1;const N=v.consistentLength?E.length===y:E.length<=y,T=E.split("").every(M=>p.includes(M));return I===!1?N&&T:N&&T&&t(s(E,w))}};return Object.freeze(S),S};return d.constants=n,d.uuid=e,d.generate=()=>(o||(o=d(n.flickrBase58).generate),o()),d})(),j0}var yz=Vae();const xz=new vz;function Hae(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={},...i}=t.payload,o=pe.sanitizeRoles(r),a={...e.flags,...n};return{...e,...o,...i,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 i;if(n)if(e.modals.list.find(a=>a.id===r))i={...e,modals:{...e.modals,list:e.modals.list.map(a=>a.id===r?{...a,closeReason:n,isOpen:!1}:a)}};else return e;else i={...e,modals:{...e.modals,list:e.modals.list.filter(o=>o.id!==r)}};return xz.next(i.modals),i}case"EDIT_MODAL":{const{id:r,...n}=t.payload;return e.modals.list.find(o=>o.id===r)?{...e,modals:{...e.modals,list:e.modals.list.map(o=>o.id===r?{...o,...n}:o)}}:e}default:return e}}const KS=C.createContext(null),Wae=()=>({roles:{},privileges:{},flags:{touched:!1},date:void 0,selectedTab:"roles",forceLogin:!1,restrictedByDefault:!1,modals:{list:[]}}),Uae=({children:e,catalog:t=null,qodly:r=!1,host:n,onSetTabFlags:i,history:o,initialState:a})=>{const[s,c]=C.useReducer(Hae,{...Wae(),...a}),d=C.useMemo(()=>t?pe.parseCatalog(t):null,[t]),u=C.useMemo(()=>({catalog:d,qodly:r,host:n,onSetTabFlags:i,history:o}),[d,r,n,i,o]);return O.jsx(KS.Provider,{value:{state:s,dispatch:c,external:u},children:e})};function Gae(){var s,c,d,u;const e=C.useContext(KS);if(!e)throw new Error("useReducerAdapter must be used within a ReducerAdapterProvider");const{state:t,dispatch:r,external:n}=e,i=C.useMemo(()=>pe.rolesToAPI({roles:t.roles,privileges:t.privileges,forceLogin:t.forceLogin,restrictedByDefault:t.restrictedByDefault}),[t.roles,t.privileges,t.forceLogin,t.restrictedByDefault]),o=C.useCallback(h=>{const{roles:p,privileges:v,forceLogin:y,restrictedByDefault:m}=pe.sanitizeRoles(h);r({type:"UPDATE_ROLES",payload:p}),r({type:"UPDATE_PRIVILEGES",payload:v}),r({type:"TOGGLE_FORCE_LOGIN",payload:y??!1}),r({type:"TOGGLE_RESTRICTED_BY_DEFAULT",payload:m??!1})},[r]),a=cz(i,o);return{getRoles:C.useCallback(()=>t.roles,[t.roles]),getPrivileges:C.useCallback(()=>t.privileges,[t.privileges]),getRolesFlags:C.useCallback(()=>t.flags,[t.flags]),getRolesAndPrivileges:C.useCallback(()=>i,[i]),getCatalog:C.useCallback(()=>n.catalog??null,[n.catalog]),getQodly:C.useCallback(()=>n.qodly??!1,[n.qodly]),getSelectedTab:C.useCallback(()=>t.selectedTab,[t.selectedTab]),getForceLogin:C.useCallback(()=>t.forceLogin??!1,[t.forceLogin]),getRestrictedByDefault:C.useCallback(()=>t.restrictedByDefault??!1,[t.restrictedByDefault]),getGuestPrivilege:C.useCallback(()=>Object.values(t.privileges).find(({privilege:h})=>h==="guest")??null,[t.privileges]),getCatalogMethods:C.useCallback(()=>{var h;return((h=n.catalog)==null?void 0:h.methods)??[]},[n.catalog]),getDataclasses:C.useCallback(()=>{var h;return((h=n.catalog)==null?void 0:h.dataClasses)??{}},[n.catalog]),getSingletons:C.useCallback(()=>{var h;return((h=n.catalog)==null?void 0:h.singletons)??{}},[n.catalog]),getHost:C.useCallback(()=>n.host??"web",[n.host]),getHistory:C.useCallback(()=>{var h,p;return{canUndo:((h=n.history)==null?void 0:h.canUndo)??a.canUndo,canRedo:((p=n.history)==null?void 0:p.canRedo)??a.canRedo}},[a.canUndo,a.canRedo,(s=n.history)==null?void 0:s.canUndo,(c=n.history)==null?void 0:c.canRedo]),actions:{updateRoles:C.useCallback(h=>{a.markEdit(),r({type:"UPDATE_ROLES",payload:h})},[a.markEdit]),updatePrivileges:C.useCallback(h=>{a.markEdit(),r({type:"UPDATE_PRIVILEGES",payload:h})},[a.markEdit]),setRolesContent:C.useCallback(h=>{r({type:"SET_ROLES_CONTENT",payload:h})},[]),toggleTab:C.useCallback(h=>{r({type:"TOGGLE_TAB",payload:h})},[]),toggleForceLogin:C.useCallback(h=>{a.markEdit(),r({type:"TOGGLE_FORCE_LOGIN",payload:h})},[a.markEdit]),toggleRestrictedByDefault:C.useCallback(h=>{a.markEdit(),r({type:"TOGGLE_RESTRICTED_BY_DEFAULT",payload:h})},[a.markEdit]),setTabFlags:C.useCallback((h,p)=>{n.onSetTabFlags&&n.onSetTabFlags(h,p)},[n.onSetTabFlags]),openModal:C.useCallback(async h=>{const{type:p=pe.ModalType.ALERT}=h,v=yz.generate();return r({type:"CREATE_MODAL",payload:{id:v,type:p,isOpen:!0,...h}}),p===pe.ModalType.CONFIRM?new Promise(y=>{const m=xz.pipe(Nae(g=>{const w=g.list.find(x=>x.id===v);return w!==void 0&&!w.isOpen})).subscribe(g=>{var x;const w=g.list.find(_=>_.id===v);if(w){const _=w.closeReason===pe.ModalCloseReason.CONFIRMED,S=Xi.entries(((x=w.views)==null?void 0:x.toggles)||{}).reduce((E,I)=>({...E,[I[0]]:I[1].value}),{});r({type:"REMOVE_MODAL",payload:v}),m.unsubscribe(),y({confirmed:_,options:S})}})}):{confirmed:!1}},[r]),undo:C.useCallback(()=>{var h;if((h=n.history)!=null&&h.onUndo){n.history.onUndo();return}a.undo()},[(d=n.history)==null?void 0:d.onUndo,a.undo]),redo:C.useCallback(()=>{var h;if((h=n.history)!=null&&h.onRedo){n.history.onRedo();return}a.redo()},[(u=n.history)==null?void 0:u.onRedo,a.redo])}}}function Kae(){const e=C.useContext(KS);if(!e)throw new Error("useModals must be used within a ReducerAdapterProvider");const{state:t,dispatch:r}=e;return{modals:t.modals.list,closeModal:C.useCallback(n=>{r({type:"CLOSE_MODAL",payload:n})},[r]),editModal:C.useCallback(n=>{r({type:"EDIT_MODAL",payload:n})},[r]),removeModal:C.useCallback(n=>{r({type:"REMOVE_MODAL",payload:n})},[r])}}const q0=({child:e,parent:t,status:r})=>{const n=Tr(),i=n.getPrivileges();function o(){const s=pe.addPrivilegeIn(t.id,e.id,i);n.actions.updatePrivileges(s)}function a(){const s=pe.removePrivilegeFrom(t.id,e.id,i);n.actions.updatePrivileges(s)}return O.jsxs(vu,{color:r==="included"?"primary":"dark",onClick:r==="included"?a:o,disabled:r==="disabled",children:[e.privilege,O.jsx(ja,{className:an("transform transition-transform",{"rotate-45":r==="included"})})]})},Yae=({selectedPrivilege:e,privileges:t,onSelect:r,setShowIncluded:n,showIncluded:i})=>{const o=Object.values(t),a=pe.getPrivilegeById(e.id,t);let s=a?pe.populateShallow(a.includes,t):[],c=a?pe.populateShallow(pe.parents(a.id,t),t):[],d=a?pe.populateShallow(pe.allowed(a.id,t),t):[];return[s,c,d]=[s,c,d].map(u=>u.filter(h=>(h==null?void 0:h.privilege)!=="guest")),o.length<2&&s.length+c.length+d.length===0?null:O.jsxs(br,{depth:1,className:"w-full border-b p-4",children:[O.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[" ",o.length>2?O.jsx("h4",{className:"text-[13px] font-semibold",children:"Include a privilege"}):O.jsx("div",{}),O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(Fu,{onChange:()=>n(!i),checked:i}),O.jsx("label",{className:"text-xs",children:" Show inherited permissions"})]})]}),O.jsxs("div",{className:"flex flex-wrap items-start justify-start gap-1",children:[s.map(u=>O.jsx(q0,{child:u,parent:e,status:"included",onSelect:r,currentPrivilegeId:u.id},u.id)),d.map(u=>O.jsx(q0,{child:u,parent:e,status:"available",onSelect:r,currentPrivilegeId:u.id},u.id)),c.map(u=>O.jsx(q0,{child:u,parent:e,status:"disabled",onSelect:r,currentPrivilegeId:u.id},u.id))]})]})};function da(e,t,r){let n=r.initialDeps??[],i,o=!0;function a(){var s,c,d;let u;r.key&&((s=r.debug)!=null&&s.call(r))&&(u=Date.now());const h=e();if(!(h.length!==n.length||h.some((y,m)=>n[m]!==y)))return i;n=h;let v;if(r.key&&((c=r.debug)!=null&&c.call(r))&&(v=Date.now()),i=t(...h),r.key&&((d=r.debug)!=null&&d.call(r))){const y=Math.round((Date.now()-u)*100)/100,m=Math.round((Date.now()-v)*100)/100,g=m/16,w=(x,_)=>{for(x=String(x);x.length<_;)x=" "+x;return x};console.info(`%c⏱ ${w(m,5)} /${w(y,5)} ms`,`
|
|
92
92
|
font-size: .6rem;
|
|
93
93
|
font-weight: bold;
|
|
94
|
-
color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,r==null?void 0:r.key)}return r!=null&&r.onChange&&!(o&&r.skipInitialOnChange)&&r.onChange(i),o=!1,i}return a.updateDeps=s=>{n=s},a}function cM(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Xae=(e,t)=>Math.abs(e-t)<1.01,Zae=(e,t,r)=>{let n;return function(...i){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,i),r)}},uM=e=>{const{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},Jae=e=>e,Qae=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let i=t;i<=r;i++)n.push(i);return n},ese=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;const i=a=>{const{width:s,height:c}=a;t({width:Math.round(s),height:Math.round(c)})};if(i(uM(r)),!n.ResizeObserver)return()=>{};const o=new n.ResizeObserver(a=>{const s=()=>{const c=a[0];if(c!=null&&c.borderBoxSize){const u=c.borderBoxSize[0];if(u){i({width:u.inlineSize,height:u.blockSize});return}}i(uM(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return o.observe(r,{box:"border-box"}),()=>{o.unobserve(r)}},dM={passive:!0},fM=typeof window>"u"?!0:"onscrollend"in window,tse=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let i=0;const o=e.options.useScrollendEvent&&fM?()=>{}:Zae(n,()=>{t(i,!1)},e.options.isScrollingResetDelay),a=d=>()=>{const{horizontal:h,isRtl:p}=e.options;i=h?r.scrollLeft*(p&&-1||1):r.scrollTop,o(),t(i,d)},s=a(!0),c=a(!1);r.addEventListener("scroll",s,dM);const u=e.options.useScrollendEvent&&fM;return u&&r.addEventListener("scrollend",c,dM),()=>{r.removeEventListener("scroll",s),u&&r.removeEventListener("scrollend",c)}},rse=(e,t,r)=>{if(t!=null&&t.borderBoxSize){const n=t.borderBoxSize[0];if(n)return Math.round(n[r.options.horizontal?"inlineSize":"blockSize"])}return e[r.options.horizontal?"offsetWidth":"offsetHeight"]},nse=(e,{adjustments:t=0,behavior:r},n)=>{var i,o;const a=e+t;(o=(i=n.scrollElement)==null?void 0:i.scrollTo)==null||o.call(i,{[n.options.horizontal?"left":"top"]:a,behavior:r})};class ise{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var r,n,i;return((i=(n=(r=this.targetWindow)==null?void 0:r.performance)==null?void 0:n.now)==null?void 0:i.call(n))??Date.now()},this.observer=(()=>{let r=null;const n=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(i=>{i.forEach(o=>{const a=()=>{const s=o.target,c=this.indexFromElement(s);if(!s.isConnected){this.observer.unobserve(s);return}this.shouldMeasureDuringScroll(c)&&this.resizeItem(c,this.options.measureElement(s,o,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var i;(i=n())==null||i.disconnect(),r=null},observe:i=>{var o;return(o=n())==null?void 0:o.observe(i,{box:"border-box"})},unobserve:i=>{var o;return(o=n())==null?void 0:o.unobserve(i)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([n,i])=>{typeof i>"u"&&delete r[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Jae,rangeExtractor:Qae,onChange:()=>{},measureElement:rse,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...r}},this.notify=r=>{var n,i;(i=(n=this.options).onChange)==null||i.call(n,this,r)},this.maybeNotify=da(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=o,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(r,n)=>{const i=new Map,o=new Map;for(let a=n-1;a>=0;a--){const s=r[a];if(i.has(s.lane))continue;const c=o.get(s.lane);if(c==null||s.end>c.end?o.set(s.lane,s):s.end<c.end&&i.set(s.lane,!0),i.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((a,s)=>a.end===s.end?a.index-s.index:a.end-s.end)[0]:void 0},this.getMeasurementOptions=da(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(r,n,i,o,a,s)=>(this.prevLanes!==void 0&&this.prevLanes!==s&&(this.lanesChangedFlag=!0),this.prevLanes=s,this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:n,scrollMargin:i,getItemKey:o,enabled:a,lanes:s}),{key:!1}),this.getMeasurements=da(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:n,scrollMargin:i,getItemKey:o,enabled:a,lanes:s},c)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>r)for(const p of this.laneAssignments.keys())p>=r&&this.laneAssignments.delete(p);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(p=>{this.itemSizeCache.set(p.key,p.size)}));const u=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===r&&(this.lanesSettling=!1);const d=this.measurementsCache.slice(0,u),h=new Array(s).fill(void 0);for(let p=0;p<u;p++){const v=d[p];v&&(h[v.lane]=p)}for(let p=u;p<r;p++){const v=o(p),y=this.laneAssignments.get(p);let m,g;if(y!==void 0&&this.options.lanes>1){m=y;const S=h[m],E=S!==void 0?d[S]:void 0;g=E?E.end+this.options.gap:n+i}else{const S=this.options.lanes===1?d[p-1]:this.getFurthestMeasurement(d,p);g=S?S.end+this.options.gap:n+i,m=S?S.lane:p%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(p,m)}const w=c.get(v),x=typeof w=="number"?w:this.options.estimateSize(p),_=g+x;d[p]={index:p,start:g,size:x,end:_,key:v,lane:m},h[m]=p}return this.measurementsCache=d,d},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=da(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,n,i,o)=>this.range=r.length>0&&n>0?ose({measurements:r,outerSize:n,scrollOffset:i,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=da(()=>{let r=null,n=null;const i=this.calculateRange();return i&&(r=i.startIndex,n=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,r,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,r,n]},(r,n,i,o,a)=>o===null||a===null?[]:r({startIndex:o,endIndex:a,overscan:n,count:i}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=r=>{const n=this.options.indexAttribute,i=r.getAttribute(n);return i?parseInt(i,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=r=>{var n;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const i=this.scrollState.index??((n=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:n.index);if(i!==void 0&&this.range){const o=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,i-o),s=Math.min(this.options.count-1,i+o);return r>=a&&r<=s}return!0},this.measureElement=r=>{if(!r){this.elementsCache.forEach((a,s)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(s))});return}const n=this.indexFromElement(r),i=this.options.getItemKey(n),o=this.elementsCache.get(i);o!==r&&(o&&this.observer.unobserve(o),this.observer.observe(r),this.elementsCache.set(i,r)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(r,void 0,this))},this.resizeItem=(r,n)=>{var i;const o=this.measurementsCache[r];if(!o)return;const a=this.itemSizeCache.get(o.key)??o.size,s=n-a;s!==0&&(((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,s,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",s),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,n)),this.notify(!1))},this.getVirtualItems=da(()=>[this.getVirtualIndexes(),this.getMeasurements()],(r,n)=>{const i=[];for(let o=0,a=r.length;o<a;o++){const s=r[o],c=n[s];i.push(c)}return i},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const n=this.getMeasurements();if(n.length!==0)return cM(n[wz(0,n.length-1,i=>cM(n[i]).start,r)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const r=this.scrollElement.document.documentElement;return this.options.horizontal?r.scrollWidth-this.scrollElement.innerWidth:r.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(r,n,i=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),a=this.getScrollOffset();n==="auto"&&(n=r>=a+o?"end":"start"),n==="center"?r+=(i-o)/2:n==="end"&&(r-=o);const s=this.getMaxScrollOffset();return Math.max(Math.min(s,r),0)},this.getOffsetForIndex=(r,n="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const i=this.getSize(),o=this.getScrollOffset(),a=this.measurementsCache[r];if(!a)return;if(n==="auto")if(a.end>=o+i-this.options.scrollPaddingEnd)n="end";else if(a.start<=o+this.options.scrollPaddingStart)n="start";else return[o,n];if(n==="end"&&r===this.options.count-1)return[this.getMaxScrollOffset(),n];const s=n==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,n,a.size),n]},this.scrollToOffset=(r,{align:n="start",behavior:i="auto"}={})=>{const o=this.getOffsetForAlignment(r,n),a=this.now();this.scrollState={index:null,align:n,behavior:i,startedAt:a,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToIndex=(r,{align:n="auto",behavior:i="auto"}={})=>{r=Math.max(0,Math.min(r,this.options.count-1));const o=this.getOffsetForIndex(r,n);if(!o)return;const[a,s]=o,c=this.now();this.scrollState={index:r,align:s,behavior:i,startedAt:c,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollBy=(r,{behavior:n="auto"}={})=>{const i=this.getScrollOffset()+r,o=this.now();this.scrollState={index:null,align:"start",behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var r;const n=this.getMeasurements();let i;if(n.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((r=n[n.length-1])==null?void 0:r.end)??0;else{const o=Array(this.options.lanes).fill(null);let a=n.length-1;for(;a>=0&&o.some(s=>s===null);){const s=n[a];o[s.lane]===null&&(o[s.lane]=s.end),a--}i=Math.max(...o.filter(s=>s!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(r,{adjustments:n,behavior:i})=>{this.options.scrollToFn(r,{behavior:i,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const n=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,i=n?n[0]:this.scrollState.lastTargetOffset,o=1,a=i!==this.scrollState.lastTargetOffset;if(!a&&Xae(i,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=o){this.scrollState=null;return}}else this.scrollState.stableFrames=0,a&&(this.scrollState.lastTargetOffset=i,this.scrollState.behavior="auto",this._scrollToOffset(i,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}const wz=(e,t,r,n)=>{for(;e<=t;){const i=(e+t)/2|0,o=r(i);if(o<n)e=i+1;else if(o>n)t=i-1;else return i}return e>0?e-1:0};function ose({measurements:e,outerSize:t,scrollOffset:r,lanes:n}){const i=e.length-1,o=c=>e[c].start;if(e.length<=n)return{startIndex:0,endIndex:i};let a=wz(0,i,o,r),s=a;if(n===1)for(;s<i&&e[s].end<r+t;)s++;else if(n>1){const c=Array(n).fill(0);for(;s<i&&c.some(d=>d<r+t);){const d=e[s];c[d.lane]=d.end,s++}const u=Array(n).fill(r+t);for(;a>=0&&u.some(d=>d>=r);){const d=e[a];u[d.lane]=d.start,a--}a=Math.max(0,a-a%n),s=Math.min(i,s+(n-1-s%n))}return{startIndex:a,endIndex:s}}const hM=typeof document<"u"?nt.useLayoutEffect:nt.useEffect;function ase({useFlushSync:e=!0,...t}){const r=nt.useReducer(()=>({}),{})[1],n={...t,onChange:(o,a)=>{var s;e&&a?xn.flushSync(r):r(),(s=t.onChange)==null||s.call(t,o,a)}},[i]=nt.useState(()=>new ise(n));return i.setOptions(n),hM(()=>i._didMount(),[]),hM(()=>i._willUpdate()),i}function cd(e){return ase({observeElementRect:ese,observeElementOffset:tse,scrollToFn:nse,...e})}const sse=({item:e,depth:t})=>{const r=Tr(),[n,i]=C.useState(!1),o=r.getPrivileges(),a=pe.populateShallow(e.includes,o);return O.jsxs("div",{className:"py-1 text-xs text-body",children:[O.jsxs("div",{className:"flex items-center",children:[O.jsx("button",{className:"-ml-1",onClick:s=>{s.stopPropagation(),i(!n)},children:O.jsx(uj,{className:an("h-4 w-4",{"tranform rotate-90":n})})})," ",O.jsx("div",{children:e.privilege})]}),O.jsx("div",{className:"border-l pl-2",style:{marginLeft:t?t*4:3},children:n&&O.jsx(Sz,{depth:t+1,data:a})})]})},Sz=({data:e,depth:t=0})=>e.map(r=>r.includes.length?O.jsx(sse,{item:r,depth:t},r.id):O.jsx("div",{className:an("py-1 text-xs",{}),children:r.privilege},r.id)),Br=()=>document.querySelector(`.${XD.ROLES_EDITOR_SCOPE_CLASS}`)||document.body,ef=({container:e,...t})=>O.jsx(pe.Portal,{...t,container:e||Br()}),pM=C.memo(function({privilege:t,selectedPrivilege:r,onSelect:n,isGuest:i=!1}){const o=Tr(),a=o.getPrivileges(),s=pe.populateShallow(t.includes,a),[c,u]=C.useState(!1),[d,h]=C.useState(t.privilege),[p,v]=C.useState(null),y=pe.useOutsideClick(()=>{c&&w()});pe.useDidMountEffect(()=>{t.privilege!==d&&h(t.privilege)},[t.privilege]);function m(){u(!0),v(null)}function g(){u(!1),h(t.privilege)}function w(){v(null);try{pe.validateName(d);const S=pe.renamePrivilege(d,t.id,a);o.actions.updatePrivileges(S),u(!1)}catch(S){v(S.message)}}const x=async S=>{S.stopPropagation();const{confirmed:E}=await o.actions.openModal({title:"Delete Privilege",type:pe.ModalType.CONFIRM,color:pe.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"});if(E){const I=pe.removePrivilege(t.id,a);if((r==null?void 0:r.id)!==t.id){o.actions.updatePrivileges(I);return}const N=Object.keys(I).filter(T=>I[T].privilege!=="guest");if(N.length===0)n(null);else{const T=Object.keys(a).filter(W=>a[W].privilege!=="guest"),M=T.indexOf(t.id),z=Math.max(0,M-1),j=T[z];M===0?n(I[N[0]]):I[j]?n(I[j]):n(I[N[0]])}o.actions.updatePrivileges(I)}},_=C.useMemo(()=>t.resources.some(S=>S.exists===!1),[t]);return O.jsx(Lr,{container:Br(),color:"negative",icon:O.jsx(wi,{}),label:"This privilege uses non-existing resources",isHidden:!_,className:"w-full",usePortal:!0,children:O.jsxs(br,{depth:4,borderType:(r==null?void 0:r.id)===t.id?"primary":_?"negative":"light",className:an("w-full rounded border p-2"),role:"button","data-cy":"privilegeCard",onClick:()=>{n(t)},ref:y,children:[O.jsxs("div",{className:"flex items-center justify-between",children:[O.jsxs("div",{className:"flex flex-1 items-center",children:[O.jsx("span",{className:"mr-4",children:i?O.jsx(wV,{className:"h-6 w-6"}):O.jsx(pd,{className:"h-6 w-6"})}),c?O.jsxs(wt.Root,{color:p?"negative":"primary",className:"flex-1 mr-2",children:[O.jsx(wt.Group,{className:"border-input-focus-border",children:O.jsx(wt.Field,{autoFocus:!0,value:d,onChange:S=>h(S.target.value),onKeyDown:S=>{S.key==="Enter"&&w(),S.key==="Escape"&&g()},type:"text"})}),p&&O.jsx(wt.Message,{children:p})]}):O.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",children:d})]}),i?O.jsx("div",{className:"flex items-center justify-center",children:O.jsx(Lr,{icon:O.jsx(wi,{}),label:O.jsx("div",{className:"max-w-xs flex-1 min-w-0 wrap-break-word whitespace-normal py-1",children:"Guest privileges are used to indicate resources accessible without any permission required (e.g. an authenticate function)"}),usePortal:!0,children:O.jsx(on,{className:"h-4 w-4"})})}):O.jsx("div",{className:"flex items-center gap-x-2",children:c?O.jsxs(O.Fragment,{children:[O.jsx(Jt,{variant:"ghost",color:"white",onClick:g,children:O.jsx("span",{children:O.jsx(ej,{className:"h-4 w-4"})})}),O.jsx(Jt,{variant:"ghost",color:"white",onClick:w,children:O.jsx("span",{children:O.jsx(mV,{className:"h-4 w-4"})})})]}):O.jsxs(O.Fragment,{children:[O.jsx(Jt,{variant:"ghost",color:"white",onClick:m,children:O.jsx(cj,{className:"h-4 w-4"})}),O.jsx(Jt,{variant:"ghost",color:"white",onClick:x,children:O.jsx(pj,{className:"h-4 w-4"})})]})})]}),s.length?O.jsx("div",{className:"ml-10.75",children:O.jsx(Sz,{data:s})}):null]})})}),lse=({privileges:e,selectPrivilege:t,selectedPrivilege:r})=>{const n=Tr(),i=n.getGuestPrivilege(),o=n.getCatalog(),a=C.useMemo(()=>{if(o===null||!i)return i;const d=sz({guest:i},Object.values((o==null?void 0:o.dataClasses)??{}));return lz(d,o).guest},[e,o]),s=C.useMemo(()=>Object.entries(e).filter(([,d])=>d.privilege!=="guest").sort(([,d],[,h])=>pe.localeCompare(d.privilege,h.privilege)),[e]),c=C.useRef(null),u=cd({count:s.length,getScrollElement:()=>c.current,estimateSize:()=>72,overscan:5});return O.jsxs("div",{ref:c,className:"flex flex-1 flex-col overflow-auto p-4 pb-10 pt-1",children:[a?O.jsx("div",{className:"mb-4",children:O.jsx(pM,{privilege:a,onSelect:t,selectedPrivilege:r,privileges:e,isGuest:!0})}):null,s.length?O.jsx("div",{style:{position:"relative",height:`${u.getTotalSize()}px`},children:u.getVirtualItems().map(d=>{const[h,p]=s[d.index];return O.jsx("div",{ref:u.measureElement,"data-index":d.index,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${d.start}px)`,paddingBottom:"16px"},children:O.jsx(pM,{privilege:p,onSelect:t,selectedPrivilege:r,privileges:e})},h)})}):O.jsx("div",{className:"flex h-full items-center justify-center",children:O.jsx("div",{className:"flex flex-1 items-center justify-center",children:O.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-4 text-inactive-text",children:[O.jsx(on,{className:"h-10 w-10"}),O.jsx("div",{className:"font-semibold",children:"There are no privileges"}),O.jsxs("div",{className:"flex items-center text-sm",children:["Create a new Privilege by clicking on the"," ",O.jsx(ja,{className:"ml-2 inline h-4 w-4"})]})]})})})]})};var au={exports:{}},su={exports:{}},ft={};/** @license React v16.13.1
|
|
94
|
+
color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,r==null?void 0:r.key)}return r!=null&&r.onChange&&!(o&&r.skipInitialOnChange)&&r.onChange(i),o=!1,i}return a.updateDeps=s=>{n=s},a}function cM(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Xae=(e,t)=>Math.abs(e-t)<1.01,Zae=(e,t,r)=>{let n;return function(...i){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,i),r)}},uM=e=>{const{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},Jae=e=>e,Qae=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let i=t;i<=r;i++)n.push(i);return n},ese=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;const i=a=>{const{width:s,height:c}=a;t({width:Math.round(s),height:Math.round(c)})};if(i(uM(r)),!n.ResizeObserver)return()=>{};const o=new n.ResizeObserver(a=>{const s=()=>{const c=a[0];if(c!=null&&c.borderBoxSize){const d=c.borderBoxSize[0];if(d){i({width:d.inlineSize,height:d.blockSize});return}}i(uM(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return o.observe(r,{box:"border-box"}),()=>{o.unobserve(r)}},dM={passive:!0},fM=typeof window>"u"?!0:"onscrollend"in window,tse=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let i=0;const o=e.options.useScrollendEvent&&fM?()=>{}:Zae(n,()=>{t(i,!1)},e.options.isScrollingResetDelay),a=u=>()=>{const{horizontal:h,isRtl:p}=e.options;i=h?r.scrollLeft*(p&&-1||1):r.scrollTop,o(),t(i,u)},s=a(!0),c=a(!1);r.addEventListener("scroll",s,dM);const d=e.options.useScrollendEvent&&fM;return d&&r.addEventListener("scrollend",c,dM),()=>{r.removeEventListener("scroll",s),d&&r.removeEventListener("scrollend",c)}},rse=(e,t,r)=>{if(t!=null&&t.borderBoxSize){const n=t.borderBoxSize[0];if(n)return Math.round(n[r.options.horizontal?"inlineSize":"blockSize"])}return e[r.options.horizontal?"offsetWidth":"offsetHeight"]},nse=(e,{adjustments:t=0,behavior:r},n)=>{var i,o;const a=e+t;(o=(i=n.scrollElement)==null?void 0:i.scrollTo)==null||o.call(i,{[n.options.horizontal?"left":"top"]:a,behavior:r})};class ise{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var r,n,i;return((i=(n=(r=this.targetWindow)==null?void 0:r.performance)==null?void 0:n.now)==null?void 0:i.call(n))??Date.now()},this.observer=(()=>{let r=null;const n=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(i=>{i.forEach(o=>{const a=()=>{const s=o.target,c=this.indexFromElement(s);if(!s.isConnected){this.observer.unobserve(s);return}this.shouldMeasureDuringScroll(c)&&this.resizeItem(c,this.options.measureElement(s,o,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var i;(i=n())==null||i.disconnect(),r=null},observe:i=>{var o;return(o=n())==null?void 0:o.observe(i,{box:"border-box"})},unobserve:i=>{var o;return(o=n())==null?void 0:o.unobserve(i)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([n,i])=>{typeof i>"u"&&delete r[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Jae,rangeExtractor:Qae,onChange:()=>{},measureElement:rse,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...r}},this.notify=r=>{var n,i;(i=(n=this.options).onChange)==null||i.call(n,this,r)},this.maybeNotify=da(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=o,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(r,n)=>{const i=new Map,o=new Map;for(let a=n-1;a>=0;a--){const s=r[a];if(i.has(s.lane))continue;const c=o.get(s.lane);if(c==null||s.end>c.end?o.set(s.lane,s):s.end<c.end&&i.set(s.lane,!0),i.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((a,s)=>a.end===s.end?a.index-s.index:a.end-s.end)[0]:void 0},this.getMeasurementOptions=da(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(r,n,i,o,a,s)=>(this.prevLanes!==void 0&&this.prevLanes!==s&&(this.lanesChangedFlag=!0),this.prevLanes=s,this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:n,scrollMargin:i,getItemKey:o,enabled:a,lanes:s}),{key:!1}),this.getMeasurements=da(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:n,scrollMargin:i,getItemKey:o,enabled:a,lanes:s},c)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>r)for(const p of this.laneAssignments.keys())p>=r&&this.laneAssignments.delete(p);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(p=>{this.itemSizeCache.set(p.key,p.size)}));const d=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===r&&(this.lanesSettling=!1);const u=this.measurementsCache.slice(0,d),h=new Array(s).fill(void 0);for(let p=0;p<d;p++){const v=u[p];v&&(h[v.lane]=p)}for(let p=d;p<r;p++){const v=o(p),y=this.laneAssignments.get(p);let m,g;if(y!==void 0&&this.options.lanes>1){m=y;const S=h[m],E=S!==void 0?u[S]:void 0;g=E?E.end+this.options.gap:n+i}else{const S=this.options.lanes===1?u[p-1]:this.getFurthestMeasurement(u,p);g=S?S.end+this.options.gap:n+i,m=S?S.lane:p%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(p,m)}const w=c.get(v),x=typeof w=="number"?w:this.options.estimateSize(p),_=g+x;u[p]={index:p,start:g,size:x,end:_,key:v,lane:m},h[m]=p}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=da(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,n,i,o)=>this.range=r.length>0&&n>0?ose({measurements:r,outerSize:n,scrollOffset:i,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=da(()=>{let r=null,n=null;const i=this.calculateRange();return i&&(r=i.startIndex,n=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,r,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,r,n]},(r,n,i,o,a)=>o===null||a===null?[]:r({startIndex:o,endIndex:a,overscan:n,count:i}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=r=>{const n=this.options.indexAttribute,i=r.getAttribute(n);return i?parseInt(i,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=r=>{var n;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const i=this.scrollState.index??((n=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:n.index);if(i!==void 0&&this.range){const o=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,i-o),s=Math.min(this.options.count-1,i+o);return r>=a&&r<=s}return!0},this.measureElement=r=>{if(!r){this.elementsCache.forEach((a,s)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(s))});return}const n=this.indexFromElement(r),i=this.options.getItemKey(n),o=this.elementsCache.get(i);o!==r&&(o&&this.observer.unobserve(o),this.observer.observe(r),this.elementsCache.set(i,r)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(r,void 0,this))},this.resizeItem=(r,n)=>{var i;const o=this.measurementsCache[r];if(!o)return;const a=this.itemSizeCache.get(o.key)??o.size,s=n-a;s!==0&&(((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,s,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",s),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,n)),this.notify(!1))},this.getVirtualItems=da(()=>[this.getVirtualIndexes(),this.getMeasurements()],(r,n)=>{const i=[];for(let o=0,a=r.length;o<a;o++){const s=r[o],c=n[s];i.push(c)}return i},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const n=this.getMeasurements();if(n.length!==0)return cM(n[wz(0,n.length-1,i=>cM(n[i]).start,r)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const r=this.scrollElement.document.documentElement;return this.options.horizontal?r.scrollWidth-this.scrollElement.innerWidth:r.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(r,n,i=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),a=this.getScrollOffset();n==="auto"&&(n=r>=a+o?"end":"start"),n==="center"?r+=(i-o)/2:n==="end"&&(r-=o);const s=this.getMaxScrollOffset();return Math.max(Math.min(s,r),0)},this.getOffsetForIndex=(r,n="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const i=this.getSize(),o=this.getScrollOffset(),a=this.measurementsCache[r];if(!a)return;if(n==="auto")if(a.end>=o+i-this.options.scrollPaddingEnd)n="end";else if(a.start<=o+this.options.scrollPaddingStart)n="start";else return[o,n];if(n==="end"&&r===this.options.count-1)return[this.getMaxScrollOffset(),n];const s=n==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,n,a.size),n]},this.scrollToOffset=(r,{align:n="start",behavior:i="auto"}={})=>{const o=this.getOffsetForAlignment(r,n),a=this.now();this.scrollState={index:null,align:n,behavior:i,startedAt:a,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToIndex=(r,{align:n="auto",behavior:i="auto"}={})=>{r=Math.max(0,Math.min(r,this.options.count-1));const o=this.getOffsetForIndex(r,n);if(!o)return;const[a,s]=o,c=this.now();this.scrollState={index:r,align:s,behavior:i,startedAt:c,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollBy=(r,{behavior:n="auto"}={})=>{const i=this.getScrollOffset()+r,o=this.now();this.scrollState={index:null,align:"start",behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var r;const n=this.getMeasurements();let i;if(n.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((r=n[n.length-1])==null?void 0:r.end)??0;else{const o=Array(this.options.lanes).fill(null);let a=n.length-1;for(;a>=0&&o.some(s=>s===null);){const s=n[a];o[s.lane]===null&&(o[s.lane]=s.end),a--}i=Math.max(...o.filter(s=>s!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(r,{adjustments:n,behavior:i})=>{this.options.scrollToFn(r,{behavior:i,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const n=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,i=n?n[0]:this.scrollState.lastTargetOffset,o=1,a=i!==this.scrollState.lastTargetOffset;if(!a&&Xae(i,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=o){this.scrollState=null;return}}else this.scrollState.stableFrames=0,a&&(this.scrollState.lastTargetOffset=i,this.scrollState.behavior="auto",this._scrollToOffset(i,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}const wz=(e,t,r,n)=>{for(;e<=t;){const i=(e+t)/2|0,o=r(i);if(o<n)e=i+1;else if(o>n)t=i-1;else return i}return e>0?e-1:0};function ose({measurements:e,outerSize:t,scrollOffset:r,lanes:n}){const i=e.length-1,o=c=>e[c].start;if(e.length<=n)return{startIndex:0,endIndex:i};let a=wz(0,i,o,r),s=a;if(n===1)for(;s<i&&e[s].end<r+t;)s++;else if(n>1){const c=Array(n).fill(0);for(;s<i&&c.some(u=>u<r+t);){const u=e[s];c[u.lane]=u.end,s++}const d=Array(n).fill(r+t);for(;a>=0&&d.some(u=>u>=r);){const u=e[a];d[u.lane]=u.start,a--}a=Math.max(0,a-a%n),s=Math.min(i,s+(n-1-s%n))}return{startIndex:a,endIndex:s}}const hM=typeof document<"u"?nt.useLayoutEffect:nt.useEffect;function ase({useFlushSync:e=!0,...t}){const r=nt.useReducer(()=>({}),{})[1],n={...t,onChange:(o,a)=>{var s;e&&a?xn.flushSync(r):r(),(s=t.onChange)==null||s.call(t,o,a)}},[i]=nt.useState(()=>new ise(n));return i.setOptions(n),hM(()=>i._didMount(),[]),hM(()=>i._willUpdate()),i}function cd(e){return ase({observeElementRect:ese,observeElementOffset:tse,scrollToFn:nse,...e})}const sse=({item:e,depth:t})=>{const r=Tr(),[n,i]=C.useState(!1),o=r.getPrivileges(),a=pe.populateShallow(e.includes,o);return O.jsxs("div",{className:"py-1 text-xs text-body",children:[O.jsxs("div",{className:"flex items-center",children:[O.jsx("button",{className:"-ml-1",onClick:s=>{s.stopPropagation(),i(!n)},children:O.jsx(uj,{className:an("h-4 w-4",{"tranform rotate-90":n})})})," ",O.jsx("div",{children:e.privilege})]}),O.jsx("div",{className:"border-l pl-2",style:{marginLeft:t?t*4:3},children:n&&O.jsx(Sz,{depth:t+1,data:a})})]})},Sz=({data:e,depth:t=0})=>e.map(r=>r.includes.length?O.jsx(sse,{item:r,depth:t},r.id):O.jsx("div",{className:an("py-1 text-xs",{}),children:r.privilege},r.id)),Br=()=>document.querySelector(`.${XD.ROLES_EDITOR_SCOPE_CLASS}`)||document.body,ef=({container:e,...t})=>O.jsx(pe.Portal,{...t,container:e||Br()}),pM=C.memo(function({privilege:t,selectedPrivilege:r,onSelect:n,isGuest:i=!1}){const o=Tr(),a=o.getPrivileges(),s=pe.populateShallow(t.includes,a),[c,d]=C.useState(!1),[u,h]=C.useState(t.privilege),[p,v]=C.useState(null),y=pe.useOutsideClick(()=>{c&&w()});pe.useDidMountEffect(()=>{t.privilege!==u&&h(t.privilege)},[t.privilege]);function m(){d(!0),v(null)}function g(){d(!1),h(t.privilege)}function w(){v(null);try{pe.validateName(u);const S=pe.renamePrivilege(u,t.id,a);o.actions.updatePrivileges(S),d(!1)}catch(S){v(S.message)}}const x=async S=>{S.stopPropagation();const{confirmed:E}=await o.actions.openModal({title:"Delete Privilege",type:pe.ModalType.CONFIRM,color:pe.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"});if(E){const I=pe.removePrivilege(t.id,a);if((r==null?void 0:r.id)!==t.id){o.actions.updatePrivileges(I);return}const N=Object.keys(I).filter(T=>I[T].privilege!=="guest");if(N.length===0)n(null);else{const T=Object.keys(a).filter(W=>a[W].privilege!=="guest"),M=T.indexOf(t.id),z=Math.max(0,M-1),j=T[z];M===0?n(I[N[0]]):I[j]?n(I[j]):n(I[N[0]])}o.actions.updatePrivileges(I)}},_=C.useMemo(()=>t.resources.some(S=>S.exists===!1),[t]);return O.jsx(Lr,{container:Br(),color:"negative",icon:O.jsx(wi,{}),label:"This privilege uses non-existing resources",isHidden:!_,className:"w-full",usePortal:!0,children:O.jsxs(br,{depth:4,borderType:(r==null?void 0:r.id)===t.id?"primary":_?"negative":"light",className:an("w-full rounded border p-2"),role:"button","data-cy":"privilegeCard",onClick:()=>{n(t)},ref:y,children:[O.jsxs("div",{className:"flex items-center justify-between",children:[O.jsxs("div",{className:"flex flex-1 items-center",children:[O.jsx("span",{className:"mr-4",children:i?O.jsx(wV,{className:"h-6 w-6"}):O.jsx(pd,{className:"h-6 w-6"})}),c?O.jsxs(wt.Root,{color:p?"negative":"primary",className:"flex-1 mr-2",children:[O.jsx(wt.Group,{className:"border-input-focus-border",children:O.jsx(wt.Field,{autoFocus:!0,value:u,onChange:S=>h(S.target.value),onKeyDown:S=>{S.key==="Enter"&&w(),S.key==="Escape"&&g()},type:"text"})}),p&&O.jsx(wt.Message,{children:p})]}):O.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",children:u})]}),i?O.jsx("div",{className:"flex items-center justify-center",children:O.jsx(Lr,{icon:O.jsx(wi,{}),label:O.jsx("div",{className:"max-w-xs flex-1 min-w-0 wrap-break-word whitespace-normal py-1",children:"Guest privileges are used to indicate resources accessible without any permission required (e.g. an authenticate function)"}),usePortal:!0,children:O.jsx(on,{className:"h-4 w-4"})})}):O.jsx("div",{className:"flex items-center gap-x-2",children:c?O.jsxs(O.Fragment,{children:[O.jsx(Jt,{variant:"ghost",color:"white",onClick:g,children:O.jsx("span",{children:O.jsx(ej,{className:"h-4 w-4"})})}),O.jsx(Jt,{variant:"ghost",color:"white",onClick:w,children:O.jsx("span",{children:O.jsx(mV,{className:"h-4 w-4"})})})]}):O.jsxs(O.Fragment,{children:[O.jsx(Jt,{variant:"ghost",color:"white",onClick:m,children:O.jsx(cj,{className:"h-4 w-4"})}),O.jsx(Jt,{variant:"ghost",color:"white",onClick:x,children:O.jsx(pj,{className:"h-4 w-4"})})]})})]}),s.length?O.jsx("div",{className:"ml-10.75",children:O.jsx(Sz,{data:s})}):null]})})}),lse=({privileges:e,selectPrivilege:t,selectedPrivilege:r})=>{const n=Tr(),i=n.getGuestPrivilege(),o=n.getCatalog(),a=C.useMemo(()=>{if(o===null||!i)return i;const u=sz({guest:i},Object.values((o==null?void 0:o.dataClasses)??{}));return lz(u,o).guest},[e,o]),s=C.useMemo(()=>Object.entries(e).filter(([,u])=>u.privilege!=="guest").sort(([,u],[,h])=>pe.localeCompare(u.privilege,h.privilege)),[e]),c=C.useRef(null),d=cd({count:s.length,getScrollElement:()=>c.current,estimateSize:()=>72,overscan:5});return O.jsxs("div",{ref:c,className:"flex flex-1 flex-col overflow-auto p-4 pb-10 pt-1",children:[a?O.jsx("div",{className:"mb-4",children:O.jsx(pM,{privilege:a,onSelect:t,selectedPrivilege:r,privileges:e,isGuest:!0})}):null,s.length?O.jsx("div",{style:{position:"relative",height:`${d.getTotalSize()}px`},children:d.getVirtualItems().map(u=>{const[h,p]=s[u.index];return O.jsx("div",{ref:d.measureElement,"data-index":u.index,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${u.start}px)`,paddingBottom:"16px"},children:O.jsx(pM,{privilege:p,onSelect:t,selectedPrivilege:r,privileges:e})},h)})}):O.jsx("div",{className:"flex h-full items-center justify-center",children:O.jsx("div",{className:"flex flex-1 items-center justify-center",children:O.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-4 text-inactive-text",children:[O.jsx(on,{className:"h-10 w-10"}),O.jsx("div",{className:"font-semibold",children:"There are no privileges"}),O.jsxs("div",{className:"flex items-center text-sm",children:["Create a new Privilege by clicking on the"," ",O.jsx(ja,{className:"ml-2 inline h-4 w-4"})]})]})})})]})};var au={exports:{}},su={exports:{}},ft={};/** @license React v16.13.1
|
|
95
95
|
* react-is.production.min.js
|
|
96
96
|
*
|
|
97
97
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
98
98
|
*
|
|
99
99
|
* This source code is licensed under the MIT license found in the
|
|
100
100
|
* LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/var vM;function cse(){if(vM)return ft;vM=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,
|
|
101
|
+
*/var vM;function cse(){if(vM)return ft;vM=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function _(E){if(typeof E=="object"&&E!==null){var I=E.$$typeof;switch(I){case t:switch(E=E.type,E){case c:case d:case n:case o:case i:case h:return E;default:switch(E=E&&E.$$typeof,E){case s:case u:case y:case v:case a:return E;default:return I}}case r:return I}}}function S(E){return _(E)===d}return ft.AsyncMode=c,ft.ConcurrentMode=d,ft.ContextConsumer=s,ft.ContextProvider=a,ft.Element=t,ft.ForwardRef=u,ft.Fragment=n,ft.Lazy=y,ft.Memo=v,ft.Portal=r,ft.Profiler=o,ft.StrictMode=i,ft.Suspense=h,ft.isAsyncMode=function(E){return S(E)||_(E)===c},ft.isConcurrentMode=S,ft.isContextConsumer=function(E){return _(E)===s},ft.isContextProvider=function(E){return _(E)===a},ft.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},ft.isForwardRef=function(E){return _(E)===u},ft.isFragment=function(E){return _(E)===n},ft.isLazy=function(E){return _(E)===y},ft.isMemo=function(E){return _(E)===v},ft.isPortal=function(E){return _(E)===r},ft.isProfiler=function(E){return _(E)===o},ft.isStrictMode=function(E){return _(E)===i},ft.isSuspense=function(E){return _(E)===h},ft.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===n||E===d||E===o||E===i||E===h||E===p||typeof E=="object"&&E!==null&&(E.$$typeof===y||E.$$typeof===v||E.$$typeof===a||E.$$typeof===s||E.$$typeof===u||E.$$typeof===g||E.$$typeof===w||E.$$typeof===x||E.$$typeof===m)},ft.typeOf=_,ft}var ht={};/** @license React v16.13.1
|
|
102
102
|
* react-is.development.js
|
|
103
103
|
*
|
|
104
104
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
105
105
|
*
|
|
106
106
|
* This source code is licensed under the MIT license found in the
|
|
107
107
|
* LICENSE file in the root directory of this source tree.
|
|
108
|
-
*/var gM;function use(){return gM||(gM=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,
|
|
108
|
+
*/var gM;function use(){return gM||(gM=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function _(Z){return typeof Z=="string"||typeof Z=="function"||Z===n||Z===d||Z===o||Z===i||Z===h||Z===p||typeof Z=="object"&&Z!==null&&(Z.$$typeof===y||Z.$$typeof===v||Z.$$typeof===a||Z.$$typeof===s||Z.$$typeof===u||Z.$$typeof===g||Z.$$typeof===w||Z.$$typeof===x||Z.$$typeof===m)}function S(Z){if(typeof Z=="object"&&Z!==null){var J=Z.$$typeof;switch(J){case t:var ae=Z.type;switch(ae){case c:case d:case n:case o:case i:case h:return ae;default:var he=ae&&ae.$$typeof;switch(he){case s:case u:case y:case v:case a:return he;default:return J}}case r:return J}}}var E=c,I=d,N=s,T=a,M=t,z=u,j=n,W=y,U=v,A=r,K=o,V=i,te=h,G=!1;function re(Z){return G||(G=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),P(Z)||S(Z)===c}function P(Z){return S(Z)===d}function B(Z){return S(Z)===s}function X(Z){return S(Z)===a}function Q(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t}function D(Z){return S(Z)===u}function $(Z){return S(Z)===n}function H(Z){return S(Z)===y}function q(Z){return S(Z)===v}function Y(Z){return S(Z)===r}function ie(Z){return S(Z)===o}function ne(Z){return S(Z)===i}function ve(Z){return S(Z)===h}ht.AsyncMode=E,ht.ConcurrentMode=I,ht.ContextConsumer=N,ht.ContextProvider=T,ht.Element=M,ht.ForwardRef=z,ht.Fragment=j,ht.Lazy=W,ht.Memo=U,ht.Portal=A,ht.Profiler=K,ht.StrictMode=V,ht.Suspense=te,ht.isAsyncMode=re,ht.isConcurrentMode=P,ht.isContextConsumer=B,ht.isContextProvider=X,ht.isElement=Q,ht.isForwardRef=D,ht.isFragment=$,ht.isLazy=H,ht.isMemo=q,ht.isPortal=Y,ht.isProfiler=ie,ht.isStrictMode=ne,ht.isSuspense=ve,ht.isValidElementType=_,ht.typeOf=S})()),ht}var mM;function Ez(){return mM||(mM=1,process.env.NODE_ENV==="production"?su.exports=cse():su.exports=use()),su.exports}/*
|
|
109
109
|
object-assign
|
|
110
110
|
(c) Sindre Sorhus
|
|
111
111
|
@license MIT
|
|
112
|
-
*/var z0,bM;function dse(){if(bM)return z0;bM=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(a).map(function(
|
|
113
|
-
Valid keys: `+JSON.stringify(Object.keys(P),null," "));var Z=ve(q,ne,D,$,H+"."+ne,r);if(Z)return Z}return null}return g(B)}function A(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every(A);if(P===null||s(P))return!0;var B=h(P);if(B){var X=B.call(P),Q;if(B!==P.entries){for(;!(Q=X.next()).done;)if(!A(Q.value))return!1}else for(;!(Q=X.next()).done;){var D=Q.value;if(D&&!A(D[1]))return!1}}else return!1;return!0;default:return!1}}function K(P,B){return P==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function V(P){var B=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":K(B,P)?"symbol":B}function te(P){if(typeof P>"u"||P===null)return""+P;var B=V(P);if(B==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return B}function G(P){var B=te(P);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function re(P){return!P.constructor||!P.constructor.name?p:P.constructor.name}return v.checkPropTypes=i,v.resetWarningCache=i.resetWarningCache,v.PropTypes=v,v},$0}var V0,EM;function pse(){if(EM)return V0;EM=1;var e=YS();function t(){}function r(){}return r.resetWarningCache=t,V0=function(){function n(a,s,c,u,d,h){if(h!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}n.isRequired=n;function i(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return o.PropTypes=o,o},V0}var _M;function vse(){if(_M)return au.exports;if(_M=1,process.env.NODE_ENV!=="production"){var e=Ez(),t=!0;au.exports=hse()(e.isElement,t)}else au.exports=pse()();return au.exports}var gse=vse();const Fs=eo(gse);var OM={},$s,CM;function Gt(){if(CM)return $s;CM=1;var e=function(t){return t&&t.Math===Math&&t};return $s=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof jt=="object"&&jt)||e(typeof $s=="object"&&$s)||(function(){return this})()||Function("return this")(),$s}var H0={},W0,IM;function St(){return IM||(IM=1,W0=function(e){try{return!!e()}catch{return!0}}),W0}var U0,RM;function Wn(){if(RM)return U0;RM=1;var e=St();return U0=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),U0}var G0,NM;function tf(){if(NM)return G0;NM=1;var e=St();return G0=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),G0}var K0,TM;function Ur(){if(TM)return K0;TM=1;var e=tf(),t=Function.prototype.call;return K0=e?t.bind(t):function(){return t.apply(t,arguments)},K0}var Y0={},PM;function Oz(){if(PM)return Y0;PM=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return Y0.f=r?function(i){var o=t(this,i);return!!o&&o.enumerable}:e,Y0}var X0,MM;function XS(){return MM||(MM=1,X0=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),X0}var Z0,kM;function yt(){if(kM)return Z0;kM=1;var e=tf(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return Z0=e?n:function(i){return function(){return r.apply(i,arguments)}},Z0}var J0,AM;function ro(){if(AM)return J0;AM=1;var e=yt(),t=e({}.toString),r=e("".slice);return J0=function(n){return r(t(n),8,-1)},J0}var Q0,DM;function rf(){if(DM)return Q0;DM=1;var e=yt(),t=St(),r=ro(),n=Object,i=e("".split);return Q0=t(function(){return!n("z").propertyIsEnumerable(0)})?function(o){return r(o)==="String"?i(o,""):n(o)}:n,Q0}var ey,jM;function ql(){return jM||(jM=1,ey=function(e){return e==null}),ey}var ty,qM;function qo(){if(qM)return ty;qM=1;var e=ql(),t=TypeError;return ty=function(r){if(e(r))throw new t("Can't call method on "+r);return r},ty}var ry,zM;function Ka(){if(zM)return ry;zM=1;var e=rf(),t=qo();return ry=function(r){return e(t(r))},ry}var ny,LM;function er(){if(LM)return ny;LM=1;var e=typeof document=="object"&&document.all;return ny=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},ny}var iy,BM;function dr(){if(BM)return iy;BM=1;var e=er();return iy=function(t){return typeof t=="object"?t!==null:e(t)},iy}var oy,FM;function nf(){if(FM)return oy;FM=1;var e=Gt(),t=er(),r=function(n){return t(n)?n:void 0};return oy=function(n,i){return arguments.length<2?r(e[n]):e[n]&&e[n][i]},oy}var ay,$M;function of(){if($M)return ay;$M=1;var e=yt();return ay=e({}.isPrototypeOf),ay}var sy,VM;function Cz(){if(VM)return sy;VM=1;var e=Gt(),t=e.navigator,r=t&&t.userAgent;return sy=r?String(r):"",sy}var ly,HM;function ZS(){if(HM)return ly;HM=1;var e=Gt(),t=Cz(),r=e.process,n=e.Deno,i=r&&r.versions||n&&n.version,o=i&&i.v8,a,s;return o&&(a=o.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]))),ly=s,ly}var cy,WM;function Iz(){if(WM)return cy;WM=1;var e=ZS(),t=St(),r=Gt(),n=r.String;return cy=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),cy}var uy,UM;function Rz(){if(UM)return uy;UM=1;var e=Iz();return uy=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",uy}var dy,GM;function Nz(){if(GM)return dy;GM=1;var e=nf(),t=er(),r=of(),n=Rz(),i=Object;return dy=n?function(o){return typeof o=="symbol"}:function(o){var a=e("Symbol");return t(a)&&r(a.prototype,i(o))},dy}var fy,KM;function JS(){if(KM)return fy;KM=1;var e=String;return fy=function(t){try{return e(t)}catch{return"Object"}},fy}var hy,YM;function zl(){if(YM)return hy;YM=1;var e=er(),t=JS(),r=TypeError;return hy=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},hy}var py,XM;function Ll(){if(XM)return py;XM=1;var e=zl(),t=ql();return py=function(r,n){var i=r[n];return t(i)?void 0:e(i)},py}var vy,ZM;function mse(){if(ZM)return vy;ZM=1;var e=Ur(),t=er(),r=dr(),n=TypeError;return vy=function(i,o){var a,s;if(o==="string"&&t(a=i.toString)&&!r(s=e(a,i))||t(a=i.valueOf)&&!r(s=e(a,i))||o!=="string"&&t(a=i.toString)&&!r(s=e(a,i)))return s;throw new n("Can't convert object to primitive value")},vy}var gy={exports:{}},my,JM;function af(){return JM||(JM=1,my=!1),my}var by,QM;function QS(){if(QM)return by;QM=1;var e=Gt(),t=Object.defineProperty;return by=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},by}var ek;function eE(){if(ek)return gy.exports;ek=1;var e=af(),t=Gt(),r=QS(),n="__core-js_shared__",i=gy.exports=t[n]||r(n,{});return(i.versions||(i.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"}),gy.exports}var yy,tk;function tE(){if(tk)return yy;tk=1;var e=eE();return yy=function(t,r){return e[t]||(e[t]=r||{})},yy}var xy,rk;function Ya(){if(rk)return xy;rk=1;var e=qo(),t=Object;return xy=function(r){return t(e(r))},xy}var wy,nk;function In(){if(nk)return wy;nk=1;var e=yt(),t=Ya(),r=e({}.hasOwnProperty);return wy=Object.hasOwn||function(i,o){return r(t(i),o)},wy}var Sy,ik;function rE(){if(ik)return Sy;ik=1;var e=yt(),t=0,r=Math.random(),n=e(1.1.toString);return Sy=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},Sy}var Ey,ok;function Pr(){if(ok)return Ey;ok=1;var e=Gt(),t=tE(),r=In(),n=rE(),i=Iz(),o=Rz(),a=e.Symbol,s=t("wks"),c=o?a.for||a:a&&a.withoutSetter||n;return Ey=function(u){return r(s,u)||(s[u]=i&&r(a,u)?a[u]:c("Symbol."+u)),s[u]},Ey}var _y,ak;function bse(){if(ak)return _y;ak=1;var e=Ur(),t=dr(),r=Nz(),n=Ll(),i=mse(),o=Pr(),a=TypeError,s=o("toPrimitive");return _y=function(c,u){if(!t(c)||r(c))return c;var d=n(c,s),h;if(d){if(u===void 0&&(u="default"),h=e(d,c,u),!t(h)||r(h))return h;throw new a("Can't convert object to primitive value")}return u===void 0&&(u="number"),i(c,u)},_y}var Oy,sk;function Tz(){if(sk)return Oy;sk=1;var e=bse(),t=Nz();return Oy=function(r){var n=e(r,"string");return t(n)?n:n+""},Oy}var Cy,lk;function nE(){if(lk)return Cy;lk=1;var e=Gt(),t=dr(),r=e.document,n=t(r)&&t(r.createElement);return Cy=function(i){return n?r.createElement(i):{}},Cy}var Iy,ck;function Pz(){if(ck)return Iy;ck=1;var e=Wn(),t=St(),r=nE();return Iy=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),Iy}var uk;function Mz(){if(uk)return H0;uk=1;var e=Wn(),t=Ur(),r=Oz(),n=XS(),i=Ka(),o=Tz(),a=In(),s=Pz(),c=Object.getOwnPropertyDescriptor;return H0.f=e?c:function(d,h){if(d=i(d),h=o(h),s)try{return c(d,h)}catch{}if(a(d,h))return n(!t(r.f,d,h),d[h])},H0}var Ry={},Ny,dk;function kz(){if(dk)return Ny;dk=1;var e=Wn(),t=St();return Ny=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Ny}var Ty,fk;function Rn(){if(fk)return Ty;fk=1;var e=dr(),t=String,r=TypeError;return Ty=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},Ty}var hk;function Ii(){if(hk)return Ry;hk=1;var e=Wn(),t=Pz(),r=kz(),n=Rn(),i=Tz(),o=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c="enumerable",u="configurable",d="writable";return Ry.f=e?r?function(p,v,y){if(n(p),v=i(v),n(y),typeof p=="function"&&v==="prototype"&&"value"in y&&d in y&&!y[d]){var m=s(p,v);m&&m[d]&&(p[v]=y.value,y={configurable:u in y?y[u]:m[u],enumerable:c in y?y[c]:m[c],writable:!1})}return a(p,v,y)}:a:function(p,v,y){if(n(p),v=i(v),n(y),t)try{return a(p,v,y)}catch{}if("get"in y||"set"in y)throw new o("Accessors not supported");return"value"in y&&(p[v]=y.value),p},Ry}var Py,pk;function Bl(){if(pk)return Py;pk=1;var e=Wn(),t=Ii(),r=XS();return Py=e?function(n,i,o){return t.f(n,i,r(1,o))}:function(n,i,o){return n[i]=o,n},Py}var My={exports:{}},ky,vk;function iE(){if(vk)return ky;vk=1;var e=Wn(),t=In(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,i=t(r,"name"),o=i&&(function(){}).name==="something",a=i&&(!e||e&&n(r,"name").configurable);return ky={EXISTS:i,PROPER:o,CONFIGURABLE:a},ky}var Ay,gk;function Az(){if(gk)return Ay;gk=1;var e=yt(),t=er(),r=eE(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(i){return n(i)}),Ay=r.inspectSource,Ay}var Dy,mk;function Dz(){if(mk)return Dy;mk=1;var e=Gt(),t=er(),r=e.WeakMap;return Dy=t(r)&&/native code/.test(String(r)),Dy}var jy,bk;function oE(){if(bk)return jy;bk=1;var e=tE(),t=rE(),r=e("keys");return jy=function(n){return r[n]||(r[n]=t(n))},jy}var qy,yk;function sf(){return yk||(yk=1,qy={}),qy}var zy,xk;function Xa(){if(xk)return zy;xk=1;var e=Dz(),t=Gt(),r=dr(),n=Bl(),i=In(),o=eE(),a=oE(),s=sf(),c="Object already initialized",u=t.TypeError,d=t.WeakMap,h,p,v,y=function(x){return v(x)?p(x):h(x,{})},m=function(x){return function(_){var S;if(!r(_)||(S=p(_)).type!==x)throw new u("Incompatible receiver, "+x+" required");return S}};if(e||o.state){var g=o.state||(o.state=new d);g.get=g.get,g.has=g.has,g.set=g.set,h=function(x,_){if(g.has(x))throw new u(c);return _.facade=x,g.set(x,_),_},p=function(x){return g.get(x)||{}},v=function(x){return g.has(x)}}else{var w=a("state");s[w]=!0,h=function(x,_){if(i(x,w))throw new u(c);return _.facade=x,n(x,w,_),_},p=function(x){return i(x,w)?x[w]:{}},v=function(x){return i(x,w)}}return zy={set:h,get:p,has:v,enforce:y,getterFor:m},zy}var wk;function jz(){if(wk)return My.exports;wk=1;var e=yt(),t=St(),r=er(),n=In(),i=Wn(),o=iE().CONFIGURABLE,a=Az(),s=Xa(),c=s.enforce,u=s.get,d=String,h=Object.defineProperty,p=e("".slice),v=e("".replace),y=e([].join),m=i&&!t(function(){return h(function(){},"length",{value:8}).length!==8}),g=String(String).split("String"),w=My.exports=function(x,_,S){p(d(_),0,7)==="Symbol("&&(_="["+v(d(_),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),S&&S.getter&&(_="get "+_),S&&S.setter&&(_="set "+_),(!n(x,"name")||o&&x.name!==_)&&(i?h(x,"name",{value:_,configurable:!0}):x.name=_),m&&S&&n(S,"arity")&&x.length!==S.arity&&h(x,"length",{value:S.arity});try{S&&n(S,"constructor")&&S.constructor?i&&h(x,"prototype",{writable:!1}):x.prototype&&(x.prototype=void 0)}catch{}var E=c(x);return n(E,"source")||(E.source=y(g,typeof _=="string"?_:"")),x};return Function.prototype.toString=w(function(){return r(this)&&u(this).source||a(this)},"toString"),My.exports}var Ly,Sk;function zo(){if(Sk)return Ly;Sk=1;var e=er(),t=Ii(),r=jz(),n=QS();return Ly=function(i,o,a,s){s||(s={});var c=s.enumerable,u=s.name!==void 0?s.name:o;if(e(a)&&r(a,u,s),s.global)c?i[o]=a:n(o,a);else{try{s.unsafe?i[o]&&(c=!0):delete i[o]}catch{}c?i[o]=a:t.f(i,o,{value:a,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return i},Ly}var By={},Fy,Ek;function yse(){if(Ek)return Fy;Ek=1;var e=Math.ceil,t=Math.floor;return Fy=Math.trunc||function(n){var i=+n;return(i>0?t:e)(i)},Fy}var $y,_k;function lf(){if(_k)return $y;_k=1;var e=yse();return $y=function(t){var r=+t;return r!==r||r===0?0:e(r)},$y}var Vy,Ok;function xse(){if(Ok)return Vy;Ok=1;var e=lf(),t=Math.max,r=Math.min;return Vy=function(n,i){var o=e(n);return o<0?t(o+i,0):r(o,i)},Vy}var Hy,Ck;function aE(){if(Ck)return Hy;Ck=1;var e=lf(),t=Math.min;return Hy=function(r){var n=e(r);return n>0?t(n,9007199254740991):0},Hy}var Wy,Ik;function cf(){if(Ik)return Wy;Ik=1;var e=aE();return Wy=function(t){return e(t.length)},Wy}var Uy,Rk;function wse(){if(Rk)return Uy;Rk=1;var e=Ka(),t=xse(),r=cf(),n=function(i){return function(o,a,s){var c=e(o),u=r(c);if(u===0)return!i&&-1;var d=t(s,u),h;if(i&&a!==a){for(;u>d;)if(h=c[d++],h!==h)return!0}else for(;u>d;d++)if((i||d in c)&&c[d]===a)return i||d||0;return!i&&-1}};return Uy={includes:n(!0),indexOf:n(!1)},Uy}var Gy,Nk;function qz(){if(Nk)return Gy;Nk=1;var e=yt(),t=In(),r=Ka(),n=wse().indexOf,i=sf(),o=e([].push);return Gy=function(a,s){var c=r(a),u=0,d=[],h;for(h in c)!t(i,h)&&t(c,h)&&o(d,h);for(;s.length>u;)t(c,h=s[u++])&&(~n(d,h)||o(d,h));return d},Gy}var Ky,Tk;function sE(){return Tk||(Tk=1,Ky=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Ky}var Pk;function lE(){if(Pk)return By;Pk=1;var e=qz(),t=sE(),r=t.concat("length","prototype");return By.f=Object.getOwnPropertyNames||function(i){return e(i,r)},By}var Yy={},Mk;function zz(){return Mk||(Mk=1,Yy.f=Object.getOwnPropertySymbols),Yy}var Xy,kk;function Sse(){if(kk)return Xy;kk=1;var e=nf(),t=yt(),r=lE(),n=zz(),i=Rn(),o=t([].concat);return Xy=e("Reflect","ownKeys")||function(s){var c=r.f(i(s)),u=n.f;return u?o(c,u(s)):c},Xy}var Zy,Ak;function Ese(){if(Ak)return Zy;Ak=1;var e=In(),t=Sse(),r=Mz(),n=Ii();return Zy=function(i,o,a){for(var s=t(o),c=n.f,u=r.f,d=0;d<s.length;d++){var h=s[d];!e(i,h)&&!(a&&e(a,h))&&c(i,h,u(o,h))}},Zy}var Jy,Dk;function Lz(){if(Dk)return Jy;Dk=1;var e=St(),t=er(),r=/#|\.prototype\./,n=function(c,u){var d=o[i(c)];return d===s?!0:d===a?!1:t(u)?e(u):!!u},i=n.normalize=function(c){return String(c).replace(r,".").toLowerCase()},o=n.data={},a=n.NATIVE="N",s=n.POLYFILL="P";return Jy=n,Jy}var Qy,jk;function no(){if(jk)return Qy;jk=1;var e=Gt(),t=Mz().f,r=Bl(),n=zo(),i=QS(),o=Ese(),a=Lz();return Qy=function(s,c){var u=s.target,d=s.global,h=s.stat,p,v,y,m,g,w;if(d?v=e:h?v=e[u]||i(u,{}):v=e[u]&&e[u].prototype,v)for(y in c){if(g=c[y],s.dontCallGetSet?(w=t(v,y),m=w&&w.value):m=v[y],p=a(d?y:u+(h?".":"#")+y,s.forced),!p&&m!==void 0){if(typeof g==typeof m)continue;o(g,m)}(s.sham||m&&m.sham)&&r(g,"sham",!0),n(v,y,g,s)}},Qy}var ex,qk;function cE(){if(qk)return ex;qk=1;var e=Pr(),t=e("toStringTag"),r={};return r[t]="z",ex=String(r)==="[object z]",ex}var tx,zk;function uf(){if(zk)return tx;zk=1;var e=cE(),t=er(),r=ro(),n=Pr(),i=n("toStringTag"),o=Object,a=r((function(){return arguments})())==="Arguments",s=function(c,u){try{return c[u]}catch{}};return tx=e?r:function(c){var u,d,h;return c===void 0?"Undefined":c===null?"Null":typeof(d=s(u=o(c),i))=="string"?d:a?r(u):(h=r(u))==="Object"&&t(u.callee)?"Arguments":h},tx}var rx,Lk;function Lo(){if(Lk)return rx;Lk=1;var e=uf(),t=String;return rx=function(r){if(e(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return t(r)},rx}var nx,Bk;function Bz(){return Bk||(Bk=1,nx=`
|
|
114
|
-
\v\f\r \u2028\u2029\uFEFF`),nx}var ix,Fk;function _se(){if(Fk)return ix;Fk=1;var e=yt(),t=qo(),r=Lo(),n=Bz(),i=e("".replace),o=RegExp("^["+n+"]+"),a=RegExp("(^|[^"+n+"])["+n+"]+$"),s=function(c){return function(u){var d=r(t(u));return c&1&&(d=i(d,o,"")),c&2&&(d=i(d,a,"$1")),d}};return ix={start:s(1),end:s(2),trim:s(3)},ix}var ox,$k;function Ose(){if($k)return ox;$k=1;var e=Gt(),t=St(),r=yt(),n=Lo(),i=_se().trim,o=Bz(),a=e.parseInt,s=e.Symbol,c=s&&s.iterator,u=/^[+-]?0x/i,d=r(u.exec),h=a(o+"08")!==8||a(o+"0x16")!==22||c&&!t(function(){a(Object(c))});return ox=h?function(v,y){var m=i(n(v));return a(m,y>>>0||(d(u,m)?16:10))}:a,ox}var Vk;function Cse(){if(Vk)return OM;Vk=1;var e=no(),t=Ose();return e({global:!0,forced:parseInt!==t},{parseInt:t}),OM}Cse();var Hk={},ax,Wk;function Fz(){if(Wk)return ax;Wk=1;var e=qz(),t=sE();return ax=Object.keys||function(n){return e(n,t)},ax}var sx,Uk;function Ise(){if(Uk)return sx;Uk=1;var e=Wn(),t=yt(),r=Ur(),n=St(),i=Fz(),o=zz(),a=Oz(),s=Ya(),c=rf(),u=Object.assign,d=Object.defineProperty,h=t([].concat);return sx=!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 p={},v={},y=Symbol("assign detection"),m="abcdefghijklmnopqrst";return p[y]=7,m.split("").forEach(function(g){v[g]=g}),u({},p)[y]!==7||i(u({},v)).join("")!==m})?function(v,y){for(var m=s(v),g=arguments.length,w=1,x=o.f,_=a.f;g>w;)for(var S=c(arguments[w++]),E=x?h(i(S),x(S)):i(S),I=E.length,N=0,T;I>N;)T=E[N++],(!e||r(_,S,T))&&(m[T]=S[T]);return m}:u,sx}var Gk;function Rse(){if(Gk)return Hk;Gk=1;var e=no(),t=Ise();return e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),Hk}Rse();var Kk={},lx,Yk;function Nse(){if(Yk)return lx;Yk=1;var e=ro(),t=yt();return lx=function(r){if(e(r)==="Function")return t(r)},lx}var cx,Xk;function $z(){if(Xk)return cx;Xk=1;var e=Nse(),t=zl(),r=tf(),n=e(e.bind);return cx=function(i,o){return t(i),o===void 0?i:r?n(i,o):function(){return i.apply(o,arguments)}},cx}var ux,Zk;function Tse(){if(Zk)return ux;Zk=1;var e=ro();return ux=Array.isArray||function(r){return e(r)==="Array"},ux}var dx,Jk;function Pse(){if(Jk)return dx;Jk=1;var e=yt(),t=St(),r=er(),n=uf(),i=nf(),o=Az(),a=function(){},s=i("Reflect","construct"),c=/^\s*(?:class|function)\b/,u=e(c.exec),d=!c.test(a),h=function(y){if(!r(y))return!1;try{return s(a,[],y),!0}catch{return!1}},p=function(y){if(!r(y))return!1;switch(n(y)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!u(c,o(y))}catch{return!0}};return p.sham=!0,dx=!s||t(function(){var v;return h(h.call)||!h(Object)||!h(function(){v=!0})||v})?p:h,dx}var fx,Qk;function Mse(){if(Qk)return fx;Qk=1;var e=Tse(),t=Pse(),r=dr(),n=Pr(),i=n("species"),o=Array;return fx=function(a){var s;return e(a)&&(s=a.constructor,t(s)&&(s===o||e(s.prototype))?s=void 0:r(s)&&(s=s[i],s===null&&(s=void 0))),s===void 0?o:s},fx}var hx,eA;function kse(){if(eA)return hx;eA=1;var e=Mse();return hx=function(t,r){return new(e(t))(r===0?0:r)},hx}var px,tA;function Vz(){if(tA)return px;tA=1;var e=$z(),t=yt(),r=rf(),n=Ya(),i=cf(),o=kse(),a=t([].push),s=function(c){var u=c===1,d=c===2,h=c===3,p=c===4,v=c===6,y=c===7,m=c===5||v;return function(g,w,x,_){for(var S=n(g),E=r(S),I=i(E),N=e(w,x),T=0,M=_||o,z=u?M(g,I):d||y?M(g,0):void 0,j,W;I>T;T++)if((m||T in E)&&(j=E[T],W=N(j,T,S),c))if(u)z[T]=W;else if(W)switch(c){case 3:return!0;case 5:return j;case 6:return T;case 2:a(z,j)}else switch(c){case 4:return!1;case 7:a(z,j)}return v?-1:h||p?p:z}};return px={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)},px}var vx,rA;function Ase(){if(rA)return vx;rA=1;var e=St(),t=Pr(),r=ZS(),n=t("species");return vx=function(i){return r>=51||!e(function(){var o=[],a=o.constructor={};return a[n]=function(){return{foo:1}},o[i](Boolean).foo!==1})},vx}var nA;function Dse(){if(nA)return Kk;nA=1;var e=no(),t=Vz().filter,r=Ase(),n=r("filter");return e({target:"Array",proto:!0,forced:!n},{filter:function(o){return t(this,o,arguments.length>1?arguments[1]:void 0)}}),Kk}Dse();var iA={},gx,oA;function jse(){if(oA)return gx;oA=1;var e=cE(),t=uf();return gx=e?{}.toString:function(){return"[object "+t(this)+"]"},gx}var aA;function qse(){if(aA)return iA;aA=1;var e=cE(),t=zo(),r=jse();return e||t(Object.prototype,"toString",r,{unsafe:!0}),iA}qse();var mx={},sA;function zse(){if(sA)return mx;sA=1;var e=Wn(),t=kz(),r=Ii(),n=Rn(),i=Ka(),o=Fz();return mx.f=e&&!t?Object.defineProperties:function(s,c){n(s);for(var u=i(c),d=o(c),h=d.length,p=0,v;h>p;)r.f(s,v=d[p++],u[v]);return s},mx}var bx,lA;function Lse(){if(lA)return bx;lA=1;var e=nf();return bx=e("document","documentElement"),bx}var yx,cA;function df(){if(cA)return yx;cA=1;var e=Rn(),t=zse(),r=sE(),n=sf(),i=Lse(),o=nE(),a=oE(),s=">",c="<",u="prototype",d="script",h=a("IE_PROTO"),p=function(){},v=function(x){return c+d+s+x+c+"/"+d+s},y=function(x){x.write(v("")),x.close();var _=x.parentWindow.Object;return x=null,_},m=function(){var x=o("iframe"),_="java"+d+":",S;return x.style.display="none",i.appendChild(x),x.src=String(_),S=x.contentWindow.document,S.open(),S.write(v("document.F=Object")),S.close(),S.F},g,w=function(){try{g=new ActiveXObject("htmlfile")}catch{}w=typeof document<"u"?document.domain&&g?y(g):m():y(g);for(var x=r.length;x--;)delete w[u][r[x]];return w()};return n[h]=!0,yx=Object.create||function(_,S){var E;return _!==null?(p[u]=e(_),E=new p,p[u]=null,E[h]=_):E=w(),S===void 0?E:t.f(E,S)},yx}var xx,uA;function Bse(){if(uA)return xx;uA=1;var e=Pr(),t=df(),r=Ii().f,n=e("unscopables"),i=Array.prototype;return i[n]===void 0&&r(i,n,{configurable:!0,value:t(null)}),xx=function(o){i[n][o]=!0},xx}var wx,dA;function Fl(){return dA||(dA=1,wx={}),wx}var Sx,fA;function Fse(){if(fA)return Sx;fA=1;var e=St();return Sx=!e(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),Sx}var Ex,hA;function Hz(){if(hA)return Ex;hA=1;var e=In(),t=er(),r=Ya(),n=oE(),i=Fse(),o=n("IE_PROTO"),a=Object,s=a.prototype;return Ex=i?a.getPrototypeOf:function(c){var u=r(c);if(e(u,o))return u[o];var d=u.constructor;return t(d)&&u instanceof d?d.prototype:u instanceof a?s:null},Ex}var _x,pA;function Wz(){if(pA)return _x;pA=1;var e=St(),t=er(),r=dr(),n=df(),i=Hz(),o=zo(),a=Pr(),s=af(),c=a("iterator"),u=!1,d,h,p;[].keys&&(p=[].keys(),"next"in p?(h=i(i(p)),h!==Object.prototype&&(d=h)):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])||o(d,c,function(){return this}),_x={IteratorPrototype:d,BUGGY_SAFARI_ITERATORS:u},_x}var Ox,vA;function ff(){if(vA)return Ox;vA=1;var e=Ii().f,t=In(),r=Pr(),n=r("toStringTag");return Ox=function(i,o,a){i&&!a&&(i=i.prototype),i&&!t(i,n)&&e(i,n,{configurable:!0,value:o})},Ox}var Cx,gA;function $se(){if(gA)return Cx;gA=1;var e=Wz().IteratorPrototype,t=df(),r=XS(),n=ff(),i=Fl(),o=function(){return this};return Cx=function(a,s,c,u){var d=s+" Iterator";return a.prototype=t(e,{next:r(+!u,c)}),n(a,d,!1,!0),i[d]=o,a},Cx}var Ix,mA;function Vse(){if(mA)return Ix;mA=1;var e=yt(),t=zl();return Ix=function(r,n,i){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[i]))}catch{}},Ix}var Rx,bA;function Hse(){if(bA)return Rx;bA=1;var e=dr();return Rx=function(t){return e(t)||t===null},Rx}var Nx,yA;function Wse(){if(yA)return Nx;yA=1;var e=Hse(),t=String,r=TypeError;return Nx=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")},Nx}var Tx,xA;function Uz(){if(xA)return Tx;xA=1;var e=Vse(),t=dr(),r=qo(),n=Wse();return Tx=Object.setPrototypeOf||("__proto__"in{}?(function(){var i=!1,o={},a;try{a=e(Object.prototype,"__proto__","set"),a(o,[]),i=o instanceof Array}catch{}return function(c,u){return r(c),n(u),t(c)&&(i?a(c,u):c.__proto__=u),c}})():void 0),Tx}var Px,wA;function Gz(){if(wA)return Px;wA=1;var e=no(),t=Ur(),r=af(),n=iE(),i=er(),o=$se(),a=Hz(),s=Uz(),c=ff(),u=Bl(),d=zo(),h=Pr(),p=Fl(),v=Wz(),y=n.PROPER,m=n.CONFIGURABLE,g=v.IteratorPrototype,w=v.BUGGY_SAFARI_ITERATORS,x=h("iterator"),_="keys",S="values",E="entries",I=function(){return this};return Px=function(N,T,M,z,j,W,U){o(M,T,z);var A=function(D){if(D===j&&re)return re;if(!w&&D&&D in te)return te[D];switch(D){case _:return function(){return new M(this,D)};case S:return function(){return new M(this,D)};case E:return function(){return new M(this,D)}}return function(){return new M(this)}},K=T+" Iterator",V=!1,te=N.prototype,G=te[x]||te["@@iterator"]||j&&te[j],re=!w&&G||A(j),P=T==="Array"&&te.entries||G,B,X,Q;if(P&&(B=a(P.call(new N)),B!==Object.prototype&&B.next&&(!r&&a(B)!==g&&(s?s(B,g):i(B[x])||d(B,x,I)),c(B,K,!0,!0),r&&(p[K]=I))),y&&j===S&&G&&G.name!==S&&(!r&&m?u(te,"name",S):(V=!0,re=function(){return t(G,this)})),j)if(X={values:A(S),keys:W?re:A(_),entries:A(E)},U)for(Q in X)(w||V||!(Q in te))&&d(te,Q,X[Q]);else e({target:T,proto:!0,forced:w||V},X);return(!r||U)&&te[x]!==re&&d(te,x,re,{name:j}),p[T]=re,X},Px}var Mx,SA;function Kz(){return SA||(SA=1,Mx=function(e,t){return{value:e,done:t}}),Mx}var kx,EA;function Yz(){if(EA)return kx;EA=1;var e=Ka(),t=Bse(),r=Fl(),n=Xa(),i=Ii().f,o=Gz(),a=Kz(),s=af(),c=Wn(),u="Array Iterator",d=n.set,h=n.getterFor(u);kx=o(Array,"Array",function(v,y){d(this,{type:u,target:e(v),index:0,kind:y})},function(){var v=h(this),y=v.target,m=v.index++;if(!y||m>=y.length)return v.target=null,a(void 0,!0);switch(v.kind){case"keys":return a(m,!1);case"values":return a(y[m],!1)}return a([m,y[m]],!1)},"values");var p=r.Arguments=r.Array;if(t("keys"),t("values"),t("entries"),!s&&c&&p.name!=="values")try{i(p,"name",{value:"values"})}catch{}return kx}Yz();var _A={},Ax,OA;function Xz(){if(OA)return Ax;OA=1;var e=yt(),t=lf(),r=Lo(),n=qo(),i=e("".charAt),o=e("".charCodeAt),a=e("".slice),s=function(c){return function(u,d){var h=r(n(u)),p=t(d),v=h.length,y,m;return p<0||p>=v?c?"":void 0:(y=o(h,p),y<55296||y>56319||p+1===v||(m=o(h,p+1))<56320||m>57343?c?i(h,p):y:c?a(h,p,p+2):(y-55296<<10)+(m-56320)+65536)}};return Ax={codeAt:s(!1),charAt:s(!0)},Ax}var CA;function Use(){if(CA)return _A;CA=1;var e=Xz().charAt,t=Lo(),r=Xa(),n=Gz(),i=Kz(),o="String Iterator",a=r.set,s=r.getterFor(o);return n(String,"String",function(c){a(this,{type:o,string:t(c),index:0})},function(){var u=s(this),d=u.string,h=u.index,p;return h>=d.length?i(void 0,!0):(p=e(d,h),u.index+=p.length,i(p,!1))}),_A}Use();var IA={},RA={},Dx,NA;function Zz(){if(NA)return Dx;NA=1;var e=St();return Dx=!e(function(){return Object.isExtensible(Object.preventExtensions({}))}),Dx}var jx,TA;function Jz(){if(TA)return jx;TA=1;var e=zo();return jx=function(t,r,n){for(var i in r)e(t,i,r[i],n);return t},jx}var qx={exports:{}},zx={},Lx,PA;function Gse(){if(PA)return Lx;PA=1;var e=yt();return Lx=e([].slice),Lx}var MA;function Kse(){if(MA)return zx;MA=1;var e=ro(),t=Ka(),r=lE().f,n=Gse(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(a){try{return r(a)}catch{return n(i)}};return zx.f=function(s){return i&&e(s)==="Window"?o(s):r(t(s))},zx}var Bx,kA;function Yse(){if(kA)return Bx;kA=1;var e=St();return Bx=e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),Bx}var Fx,AA;function Xse(){if(AA)return Fx;AA=1;var e=St(),t=dr(),r=ro(),n=Yse(),i=Object.isExtensible,o=e(function(){});return Fx=o||n?function(s){return!t(s)||n&&r(s)==="ArrayBuffer"?!1:i?i(s):!0}:i,Fx}var DA;function uE(){if(DA)return qx.exports;DA=1;var e=no(),t=yt(),r=sf(),n=dr(),i=In(),o=Ii().f,a=lE(),s=Kse(),c=Xse(),u=rE(),d=Zz(),h=!1,p=u("meta"),v=0,y=function(S){o(S,p,{value:{objectID:"O"+v++,weakData:{}}})},m=function(S,E){if(!n(S))return typeof S=="symbol"?S:(typeof S=="string"?"S":"P")+S;if(!i(S,p)){if(!c(S))return"F";if(!E)return"E";y(S)}return S[p].objectID},g=function(S,E){if(!i(S,p)){if(!c(S))return!0;if(!E)return!1;y(S)}return S[p].weakData},w=function(S){return d&&h&&c(S)&&!i(S,p)&&y(S),S},x=function(){_.enable=function(){},h=!0;var S=a.f,E=t([].splice),I={};I[p]=1,S(I).length&&(a.f=function(N){for(var T=S(N),M=0,z=T.length;M<z;M++)if(T[M]===p){E(T,M,1);break}return T},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},_=qx.exports={enable:x,fastKey:m,getWeakData:g,onFreeze:w};return r[p]=!0,qx.exports}var $x,jA;function Zse(){if(jA)return $x;jA=1;var e=Pr(),t=Fl(),r=e("iterator"),n=Array.prototype;return $x=function(i){return i!==void 0&&(t.Array===i||n[r]===i)},$x}var Vx,qA;function Qz(){if(qA)return Vx;qA=1;var e=uf(),t=Ll(),r=ql(),n=Fl(),i=Pr(),o=i("iterator");return Vx=function(a){if(!r(a))return t(a,o)||t(a,"@@iterator")||n[e(a)]},Vx}var Hx,zA;function Jse(){if(zA)return Hx;zA=1;var e=Ur(),t=zl(),r=Rn(),n=JS(),i=Qz(),o=TypeError;return Hx=function(a,s){var c=arguments.length<2?i(a):s;if(t(c))return r(e(c,a));throw new o(n(a)+" is not iterable")},Hx}var Wx,LA;function Qse(){if(LA)return Wx;LA=1;var e=Ur(),t=Rn(),r=Ll();return Wx=function(n,i,o){var a,s;t(n);try{if(a=r(n,"return"),!a){if(i==="throw")throw o;return o}a=e(a,n)}catch(c){s=!0,a=c}if(i==="throw")throw o;if(s)throw a;return t(a),o},Wx}var Ux,BA;function eL(){if(BA)return Ux;BA=1;var e=$z(),t=Ur(),r=Rn(),n=JS(),i=Zse(),o=cf(),a=of(),s=Jse(),c=Qz(),u=Qse(),d=TypeError,h=function(v,y){this.stopped=v,this.result=y},p=h.prototype;return Ux=function(v,y,m){var g=m&&m.that,w=!!(m&&m.AS_ENTRIES),x=!!(m&&m.IS_RECORD),_=!!(m&&m.IS_ITERATOR),S=!!(m&&m.INTERRUPTED),E=e(y,g),I,N,T,M,z,j,W,U=function(K){return I&&u(I,"normal"),new h(!0,K)},A=function(K){return w?(r(K),S?E(K[0],K[1],U):E(K[0],K[1])):S?E(K,U):E(K)};if(x)I=v.iterator;else if(_)I=v;else{if(N=c(v),!N)throw new d(n(v)+" is not iterable");if(i(N)){for(T=0,M=o(v);M>T;T++)if(z=A(v[T]),z&&a(p,z))return z;return new h(!1)}I=s(v,N)}for(j=x?v.next:I.next;!(W=t(j,I)).done;){try{z=A(W.value)}catch(K){u(I,"throw",K)}if(typeof z=="object"&&z&&a(p,z))return z}return new h(!1)},Ux}var Gx,FA;function tL(){if(FA)return Gx;FA=1;var e=of(),t=TypeError;return Gx=function(r,n){if(e(n,r))return r;throw new t("Incorrect invocation")},Gx}var Kx,$A;function ele(){if($A)return Kx;$A=1;var e=Pr(),t=e("iterator"),r=!1;try{var n=0,i={next:function(){return{done:!!n++}},return:function(){r=!0}};i[t]=function(){return this},Array.from(i,function(){throw 2})}catch{}return Kx=function(o,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}}}},o(c)}catch{}return s},Kx}var Yx,VA;function tle(){if(VA)return Yx;VA=1;var e=er(),t=dr(),r=Uz();return Yx=function(n,i,o){var a,s;return r&&e(a=i.constructor)&&a!==o&&t(s=a.prototype)&&s!==o.prototype&&r(n,s),n},Yx}var Xx,HA;function rle(){if(HA)return Xx;HA=1;var e=no(),t=Gt(),r=yt(),n=Lz(),i=zo(),o=uE(),a=eL(),s=tL(),c=er(),u=ql(),d=dr(),h=St(),p=ele(),v=ff(),y=tle();return Xx=function(m,g,w){var x=m.indexOf("Map")!==-1,_=m.indexOf("Weak")!==-1,S=x?"set":"add",E=t[m],I=E&&E.prototype,N=E,T={},M=function(V){var te=r(I[V]);i(I,V,V==="add"?function(re){return te(this,re===0?0:re),this}:V==="delete"?function(G){return _&&!d(G)?!1:te(this,G===0?0:G)}:V==="get"?function(re){return _&&!d(re)?void 0:te(this,re===0?0:re)}:V==="has"?function(re){return _&&!d(re)?!1:te(this,re===0?0:re)}:function(re,P){return te(this,re===0?0:re,P),this})},z=n(m,!c(E)||!(_||I.forEach&&!h(function(){new E().entries().next()})));if(z)N=w.getConstructor(g,m,x,S),o.enable();else if(n(m,!0)){var j=new N,W=j[S](_?{}:-0,1)!==j,U=h(function(){j.has(1)}),A=p(function(V){new E(V)}),K=!_&&h(function(){for(var V=new E,te=5;te--;)V[S](te,te);return!V.has(-0)});A||(N=g(function(V,te){s(V,I);var G=y(new E,V,N);return u(te)||a(te,G[S],{that:G,AS_ENTRIES:x}),G}),N.prototype=I,I.constructor=N),(U||K)&&(M("delete"),M("has"),x&&M("get")),(K||W)&&M(S),_&&I.clear&&delete I.clear}return T[m]=N,e({global:!0,constructor:!0,forced:N!==E},T),v(N,m),_||w.setStrong(N,m,x),N},Xx}var Zx,WA;function nle(){if(WA)return Zx;WA=1;var e=yt(),t=Jz(),r=uE().getWeakData,n=tL(),i=Rn(),o=ql(),a=dr(),s=eL(),c=Vz(),u=In(),d=Xa(),h=d.set,p=d.getterFor,v=c.find,y=c.findIndex,m=e([].splice),g=0,w=function(S){return S.frozen||(S.frozen=new x)},x=function(){this.entries=[]},_=function(S,E){return v(S.entries,function(I){return I[0]===E})};return x.prototype={get:function(S){var E=_(this,S);if(E)return E[1]},has:function(S){return!!_(this,S)},set:function(S,E){var I=_(this,S);I?I[1]=E:this.entries.push([S,E])},delete:function(S){var E=y(this.entries,function(I){return I[0]===S});return~E&&m(this.entries,E,1),!!~E}},Zx={getConstructor:function(S,E,I,N){var T=S(function(W,U){n(W,M),h(W,{type:E,id:g++,frozen:null}),o(U)||s(U,W[N],{that:W,AS_ENTRIES:I})}),M=T.prototype,z=p(E),j=function(W,U,A){var K=z(W),V=r(i(U),!0);return V===!0?w(K).set(U,A):V[K.id]=A,W};return t(M,{delete:function(W){var U=z(this);if(!a(W))return!1;var A=r(W);return A===!0?w(U).delete(W):A&&u(A,U.id)&&delete A[U.id]},has:function(U){var A=z(this);if(!a(U))return!1;var K=r(U);return K===!0?w(A).has(U):K&&u(K,A.id)}}),t(M,I?{get:function(U){var A=z(this);if(a(U)){var K=r(U);if(K===!0)return w(A).get(U);if(K)return K[A.id]}},set:function(U,A){return j(this,U,A)}}:{add:function(U){return j(this,U,!0)}}),T}},Zx}var UA;function ile(){if(UA)return RA;UA=1;var e=Zz(),t=Gt(),r=yt(),n=Jz(),i=uE(),o=rle(),a=nle(),s=dr(),c=Xa().enforce,u=St(),d=Dz(),h=Object,p=Array.isArray,v=h.isExtensible,y=h.isFrozen,m=h.isSealed,g=h.freeze,w=h.seal,x=!t.ActiveXObject&&"ActiveXObject"in t,_,S=function(W){return function(){return W(this,arguments.length?arguments[0]:void 0)}},E=o("WeakMap",S,a),I=E.prototype,N=r(I.set),T=function(){return e&&u(function(){var W=g([]);return N(new E,W,1),!y(W)})};if(d)if(x){_=a.getConstructor(S,"WeakMap",!0),i.enable();var M=r(I.delete),z=r(I.has),j=r(I.get);n(I,{delete:function(W){if(s(W)&&!v(W)){var U=c(this);return U.frozen||(U.frozen=new _),M(this,W)||U.frozen.delete(W)}return M(this,W)},has:function(U){if(s(U)&&!v(U)){var A=c(this);return A.frozen||(A.frozen=new _),z(this,U)||A.frozen.has(U)}return z(this,U)},get:function(U){if(s(U)&&!v(U)){var A=c(this);return A.frozen||(A.frozen=new _),z(this,U)?j(this,U):A.frozen.get(U)}return j(this,U)},set:function(U,A){if(s(U)&&!v(U)){var K=c(this);K.frozen||(K.frozen=new _),z(this,U)?N(this,U,A):K.frozen.set(U,A)}else N(this,U,A);return this}})}else T()&&n(I,{set:function(U,A){var K;return p(U)&&(y(U)?K=g:m(U)&&(K=w)),N(this,U,A),K&&K(U),this}});return RA}var GA;function ole(){return GA||(GA=1,ile()),IA}ole();var KA={},Jx,YA;function ale(){return YA||(YA=1,Jx={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}),Jx}var Qx,XA;function sle(){if(XA)return Qx;XA=1;var e=nE(),t=e("span").classList,r=t&&t.constructor&&t.constructor.prototype;return Qx=r===Object.prototype?void 0:r,Qx}var ZA;function lle(){if(ZA)return KA;ZA=1;var e=Gt(),t=ale(),r=sle(),n=Yz(),i=Bl(),o=ff(),a=Pr(),s=a("iterator"),c=n.values,u=function(h,p){if(h){if(h[s]!==c)try{i(h,s,c)}catch{h[s]=c}if(o(h,p,!0),t[p]){for(var v in n)if(h[v]!==n[v])try{i(h,v,n[v])}catch{h[v]=n[v]}}}};for(var d in t)u(e[d]&&e[d].prototype,d);return u(r,"DOMTokenList"),KA}lle();var ew,JA;function cle(){if(JA)return ew;JA=1;var e="Expected a function",t=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,c=typeof jt=="object"&&jt&&jt.Object===Object&&jt,u=typeof self=="object"&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),h=Object.prototype,p=h.toString,v=Math.max,y=Math.min,m=function(){return d.Date.now()};function g(I,N,T){var M,z,j,W,U,A,K=0,V=!1,te=!1,G=!0;if(typeof I!="function")throw new TypeError(e);N=E(N)||0,x(T)&&(V=!!T.leading,te="maxWait"in T,j=te?v(E(T.maxWait)||0,N):j,G="trailing"in T?!!T.trailing:G);function re(Y){var ie=M,ne=z;return M=z=void 0,K=Y,W=I.apply(ne,ie),W}function P(Y){return K=Y,U=setTimeout(Q,N),V?re(Y):W}function B(Y){var ie=Y-A,ne=Y-K,ve=N-ie;return te?y(ve,j-ne):ve}function X(Y){var ie=Y-A,ne=Y-K;return A===void 0||ie>=N||ie<0||te&&ne>=j}function Q(){var Y=m();if(X(Y))return D(Y);U=setTimeout(Q,B(Y))}function D(Y){return U=void 0,G&&M?re(Y):(M=z=void 0,W)}function $(){U!==void 0&&clearTimeout(U),K=0,M=A=z=U=void 0}function H(){return U===void 0?W:D(m())}function q(){var Y=m(),ie=X(Y);if(M=arguments,z=this,A=Y,ie){if(U===void 0)return P(A);if(te)return U=setTimeout(Q,N),re(A)}return U===void 0&&(U=setTimeout(Q,N)),W}return q.cancel=$,q.flush=H,q}function w(I,N,T){var M=!0,z=!0;if(typeof I!="function")throw new TypeError(e);return x(T)&&(M="leading"in T?!!T.leading:M,z="trailing"in T?!!T.trailing:z),g(I,N,{leading:M,maxWait:N,trailing:z})}function x(I){var N=typeof I;return!!I&&(N=="object"||N=="function")}function _(I){return!!I&&typeof I=="object"}function S(I){return typeof I=="symbol"||_(I)&&p.call(I)==r}function E(I){if(typeof I=="number")return I;if(S(I))return t;if(x(I)){var N=typeof I.valueOf=="function"?I.valueOf():I;I=x(N)?N+"":N}if(typeof I!="string")return I===0?I:+I;I=I.replace(n,"");var T=o.test(I);return T||a.test(I)?s(I.slice(2),T?2:8):i.test(I)?t:+I}return ew=w,ew}var ule=cle();const QA=eo(ule);var tw,eD;function dle(){if(eD)return tw;eD=1;var e="Expected a function",t=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,c=typeof jt=="object"&&jt&&jt.Object===Object&&jt,u=typeof self=="object"&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),h=Object.prototype,p=h.toString,v=Math.max,y=Math.min,m=function(){return d.Date.now()};function g(E,I,N){var T,M,z,j,W,U,A=0,K=!1,V=!1,te=!0;if(typeof E!="function")throw new TypeError(e);I=S(I)||0,w(N)&&(K=!!N.leading,V="maxWait"in N,z=V?v(S(N.maxWait)||0,I):z,te="trailing"in N?!!N.trailing:te);function G(q){var Y=T,ie=M;return T=M=void 0,A=q,j=E.apply(ie,Y),j}function re(q){return A=q,W=setTimeout(X,I),K?G(q):j}function P(q){var Y=q-U,ie=q-A,ne=I-Y;return V?y(ne,z-ie):ne}function B(q){var Y=q-U,ie=q-A;return U===void 0||Y>=I||Y<0||V&&ie>=z}function X(){var q=m();if(B(q))return Q(q);W=setTimeout(X,P(q))}function Q(q){return W=void 0,te&&T?G(q):(T=M=void 0,j)}function D(){W!==void 0&&clearTimeout(W),A=0,T=U=M=W=void 0}function $(){return W===void 0?j:Q(m())}function H(){var q=m(),Y=B(q);if(T=arguments,M=this,U=q,Y){if(W===void 0)return re(U);if(V)return W=setTimeout(X,I),G(U)}return W===void 0&&(W=setTimeout(X,I)),j}return H.cancel=D,H.flush=$,H}function w(E){var I=typeof E;return!!E&&(I=="object"||I=="function")}function x(E){return!!E&&typeof E=="object"}function _(E){return typeof E=="symbol"||x(E)&&p.call(E)==r}function S(E){if(typeof E=="number")return E;if(_(E))return t;if(w(E)){var I=typeof E.valueOf=="function"?E.valueOf():E;E=w(I)?I+"":I}if(typeof E!="string")return E===0?E:+E;E=E.replace(n,"");var N=o.test(E);return N||a.test(E)?s(E.slice(2),N?2:8):i.test(E)?t:+E}return tw=g,tw}var fle=dle();const tD=eo(fle);var rw,rD;function hle(){if(rD)return rw;rD=1;var e="Expected a function",t="__lodash_hash_undefined__",r="[object Function]",n="[object GeneratorFunction]",i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=typeof jt=="object"&&jt&&jt.Object===Object&&jt,s=typeof self=="object"&&self&&self.Object===Object&&self,c=a||s||Function("return this")();function u(ue,de){return ue==null?void 0:ue[de]}function d(ue){var de=!1;if(ue!=null&&typeof ue.toString!="function")try{de=!!(ue+"")}catch{}return de}var h=Array.prototype,p=Function.prototype,v=Object.prototype,y=c["__core-js_shared__"],m=(function(){var ue=/[^.]+$/.exec(y&&y.keys&&y.keys.IE_PROTO||"");return ue?"Symbol(src)_1."+ue:""})(),g=p.toString,w=v.hasOwnProperty,x=v.toString,_=RegExp("^"+g.call(w).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=h.splice,E=Y(c,"Map"),I=Y(Object,"create");function N(ue){var de=-1,le=ue?ue.length:0;for(this.clear();++de<le;){var xe=ue[de];this.set(xe[0],xe[1])}}function T(){this.__data__=I?I(null):{}}function M(ue){return this.has(ue)&&delete this.__data__[ue]}function z(ue){var de=this.__data__;if(I){var le=de[ue];return le===t?void 0:le}return w.call(de,ue)?de[ue]:void 0}function j(ue){var de=this.__data__;return I?de[ue]!==void 0:w.call(de,ue)}function W(ue,de){var le=this.__data__;return le[ue]=I&&de===void 0?t:de,this}N.prototype.clear=T,N.prototype.delete=M,N.prototype.get=z,N.prototype.has=j,N.prototype.set=W;function U(ue){var de=-1,le=ue?ue.length:0;for(this.clear();++de<le;){var xe=ue[de];this.set(xe[0],xe[1])}}function A(){this.__data__=[]}function K(ue){var de=this.__data__,le=$(de,ue);if(le<0)return!1;var xe=de.length-1;return le==xe?de.pop():S.call(de,le,1),!0}function V(ue){var de=this.__data__,le=$(de,ue);return le<0?void 0:de[le][1]}function te(ue){return $(this.__data__,ue)>-1}function G(ue,de){var le=this.__data__,xe=$(le,ue);return xe<0?le.push([ue,de]):le[xe][1]=de,this}U.prototype.clear=A,U.prototype.delete=K,U.prototype.get=V,U.prototype.has=te,U.prototype.set=G;function re(ue){var de=-1,le=ue?ue.length:0;for(this.clear();++de<le;){var xe=ue[de];this.set(xe[0],xe[1])}}function P(){this.__data__={hash:new N,map:new(E||U),string:new N}}function B(ue){return q(this,ue).delete(ue)}function X(ue){return q(this,ue).get(ue)}function Q(ue){return q(this,ue).has(ue)}function D(ue,de){return q(this,ue).set(ue,de),this}re.prototype.clear=P,re.prototype.delete=B,re.prototype.get=X,re.prototype.has=Q,re.prototype.set=D;function $(ue,de){for(var le=ue.length;le--;)if(J(ue[le][0],de))return le;return-1}function H(ue){if(!he(ue)||ne(ue))return!1;var de=ae(ue)||d(ue)?_:o;return de.test(ve(ue))}function q(ue,de){var le=ue.__data__;return ie(de)?le[typeof de=="string"?"string":"hash"]:le.map}function Y(ue,de){var le=u(ue,de);return H(le)?le:void 0}function ie(ue){var de=typeof ue;return de=="string"||de=="number"||de=="symbol"||de=="boolean"?ue!=="__proto__":ue===null}function ne(ue){return!!m&&m in ue}function ve(ue){if(ue!=null){try{return g.call(ue)}catch{}try{return ue+""}catch{}}return""}function Z(ue,de){if(typeof ue!="function"||de&&typeof de!="function")throw new TypeError(e);var le=function(){var xe=arguments,Ee=de?de.apply(this,xe):xe[0],Ie=le.cache;if(Ie.has(Ee))return Ie.get(Ee);var Te=ue.apply(this,xe);return le.cache=Ie.set(Ee,Te),Te};return le.cache=new(Z.Cache||re),le}Z.Cache=re;function J(ue,de){return ue===de||ue!==ue&&de!==de}function ae(ue){var de=he(ue)?x.call(ue):"";return de==r||de==n}function he(ue){var de=typeof ue;return!!ue&&(de=="object"||de=="function")}return rw=Z,rw}var ple=hle();const vle=eo(ple);var Ro=[],gle=function(){return Ro.some(function(e){return e.activeTargets.length>0})},mle=function(){return Ro.some(function(e){return e.skippedTargets.length>0})},nD="ResizeObserver loop completed with undelivered notifications.",ble=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:nD}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=nD),window.dispatchEvent(e)},bl;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(bl||(bl={}));var No=function(e){return Object.freeze(e)},yle=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,No(this)}return e})(),rL=(function(){function e(t,r,n,i){return this.x=t,this.y=r,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,No(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,i=t.top,o=t.right,a=t.bottom,s=t.left,c=t.width,u=t.height;return{x:r,y:n,top:i,right:o,bottom:a,left:s,width:c,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),dE=function(e){return e instanceof SVGElement&&"getBBox"in e},nL=function(e){if(dE(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},iD=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)},xle=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},il=typeof window<"u"?window:{},lu=new WeakMap,oD=/auto|scroll/,wle=/^tb|vertical/,Sle=/msie|trident/i.test(il.navigator&&il.navigator.userAgent),Qn=function(e){return parseFloat(e||"0")},Ca=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new yle((r?t:e)||0,(r?e:t)||0)},aD=No({devicePixelContentBoxSize:Ca(),borderBoxSize:Ca(),contentBoxSize:Ca(),contentRect:new rL(0,0,0,0)}),iL=function(e,t){if(t===void 0&&(t=!1),lu.has(e)&&!t)return lu.get(e);if(nL(e))return lu.set(e,aD),aD;var r=getComputedStyle(e),n=dE(e)&&e.ownerSVGElement&&e.getBBox(),i=!Sle&&r.boxSizing==="border-box",o=wle.test(r.writingMode||""),a=!n&&oD.test(r.overflowY||""),s=!n&&oD.test(r.overflowX||""),c=n?0:Qn(r.paddingTop),u=n?0:Qn(r.paddingRight),d=n?0:Qn(r.paddingBottom),h=n?0:Qn(r.paddingLeft),p=n?0:Qn(r.borderTopWidth),v=n?0:Qn(r.borderRightWidth),y=n?0:Qn(r.borderBottomWidth),m=n?0:Qn(r.borderLeftWidth),g=h+u,w=c+d,x=m+v,_=p+y,S=s?e.offsetHeight-_-e.clientHeight:0,E=a?e.offsetWidth-x-e.clientWidth:0,I=i?g+x:0,N=i?w+_:0,T=n?n.width:Qn(r.width)-I-E,M=n?n.height:Qn(r.height)-N-S,z=T+g+E+x,j=M+w+S+_,W=No({devicePixelContentBoxSize:Ca(Math.round(T*devicePixelRatio),Math.round(M*devicePixelRatio),o),borderBoxSize:Ca(z,j,o),contentBoxSize:Ca(T,M,o),contentRect:new rL(h,c,T,M)});return lu.set(e,W),W},oL=function(e,t,r){var n=iL(e,r),i=n.borderBoxSize,o=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case bl.DEVICE_PIXEL_CONTENT_BOX:return a;case bl.BORDER_BOX:return i;default:return o}},Ele=(function(){function e(t){var r=iL(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=No([r.borderBoxSize]),this.contentBoxSize=No([r.contentBoxSize]),this.devicePixelContentBoxSize=No([r.devicePixelContentBoxSize])}return e})(),aL=function(e){if(nL(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},_le=function(){var e=1/0,t=[];Ro.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var d=new Ele(u.target),h=aL(u.target);s.push(d),u.lastReportedSize=oL(u.target,u.observedBox),h<e&&(e=h)}),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 i=n[r];i()}return e},sD=function(e){Ro.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(aL(i.target)>e?r.activeTargets.push(i):r.skippedTargets.push(i))})})},Ole=function(){var e=0;for(sD(e);gle();)e=_le(),sD(e);return mle()&&ble(),e>0},nw,sL=[],Cle=function(){return sL.splice(0).forEach(function(e){return e()})},Ile=function(e){if(!nw){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return Cle()}).observe(r,n),nw=function(){r.textContent="".concat(t?t--:t++)}}sL.push(e),nw()},Rle=function(e){Ile(function(){requestAnimationFrame(e)})},Ru=0,Nle=function(){return!!Ru},Tle=250,Ple={attributes:!0,characterData:!0,childList:!0,subtree:!0},lD=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],cD=function(e){return e===void 0&&(e=0),Date.now()+e},iw=!1,Mle=(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=Tle),!iw){iw=!0;var n=cD(t);Rle(function(){var i=!1;try{i=Ole()}finally{if(iw=!1,t=n-cD(),!Nle())return;i?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,Ple)};document.body?r():il.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),lD.forEach(function(r){return il.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),lD.forEach(function(r){return il.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),n1=new Mle,uD=function(e){!Ru&&e>0&&n1.start(),Ru+=e,!Ru&&n1.stop()},kle=function(e){return!dE(e)&&!xle(e)&&getComputedStyle(e).display==="inline"},Ale=(function(){function e(t,r){this.target=t,this.observedBox=r||bl.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=oL(this.target,this.observedBox,!0);return kle(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),Dle=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),cu=new WeakMap,dD=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},uu=(function(){function e(){}return e.connect=function(t,r){var n=new Dle(t,r);cu.set(t,n)},e.observe=function(t,r,n){var i=cu.get(t),o=i.observationTargets.length===0;dD(i.observationTargets,r)<0&&(o&&Ro.push(i),i.observationTargets.push(new Ale(r,n&&n.box)),uD(1),n1.schedule())},e.unobserve=function(t,r){var n=cu.get(t),i=dD(n.observationTargets,r),o=n.observationTargets.length===1;i>=0&&(o&&Ro.splice(Ro.indexOf(n),1),n.observationTargets.splice(i,1),uD(-1))},e.disconnect=function(t){var r=this,n=cu.get(t);n.observationTargets.slice().forEach(function(i){return r.unobserve(t,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),jle=(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.");uu.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(!iD(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");uu.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(!iD(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");uu.unobserve(this,t)},e.prototype.disconnect=function(){uu.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),ow,fD;function qle(){if(fD)return ow;fD=1;var e=!!(typeof window<"u"&&window.document&&window.document.createElement);return ow=e,ow}var zle=qle();const lL=eo(zle);var hD={},aw,pD;function Lle(){if(pD)return aw;pD=1;var e=zl(),t=Ya(),r=rf(),n=cf(),i=TypeError,o="Reduce of empty array with no initial value",a=function(s){return function(c,u,d,h){var p=t(c),v=r(p),y=n(p);if(e(u),y===0&&d<2)throw new i(o);var m=s?y-1:0,g=s?-1:1;if(d<2)for(;;){if(m in v){h=v[m],m+=g;break}if(m+=g,s?m<0:y<=m)throw new i(o)}for(;s?m>=0:y>m;m+=g)m in v&&(h=u(h,v[m],m,p));return h}};return aw={left:a(!1),right:a(!0)},aw}var sw,vD;function Ble(){if(vD)return sw;vD=1;var e=St();return sw=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})},sw}var lw,gD;function Fle(){if(gD)return lw;gD=1;var e=Gt(),t=Cz(),r=ro(),n=function(i){return t.slice(0,i.length)===i};return lw=(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"})(),lw}var cw,mD;function $le(){if(mD)return cw;mD=1;var e=Fle();return cw=e==="NODE",cw}var bD;function Vle(){if(bD)return hD;bD=1;var e=no(),t=Lle().left,r=Ble(),n=ZS(),i=$le(),o=!i&&n>79&&n<83,a=o||!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)}}),hD}Vle();var yD={},uw,xD;function cL(){if(xD)return uw;xD=1;var e=Rn();return uw=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},uw}var dw,wD;function Hle(){if(wD)return dw;wD=1;var e=St(),t=Gt(),r=t.RegExp,n=e(function(){var a=r("a","y");return a.lastIndex=2,a.exec("abcd")!==null}),i=n||e(function(){return!r("a","y").sticky}),o=n||e(function(){var a=r("^r","gy");return a.lastIndex=2,a.exec("str")!==null});return dw={BROKEN_CARET:o,MISSED_STICKY:i,UNSUPPORTED_Y:n},dw}var fw,SD;function Wle(){if(SD)return fw;SD=1;var e=St(),t=Gt(),r=t.RegExp;return fw=e(function(){var n=r(".","s");return!(n.dotAll&&n.test(`
|
|
115
|
-
`)&&n.flags==="s")}),fw}var hw,ED;function Ule(){if(ED)return hw;ED=1;var e=St(),t=Gt(),r=t.RegExp;return hw=e(function(){var n=r("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"}),hw}var pw,_D;function fE(){if(_D)return pw;_D=1;var e=Ur(),t=yt(),r=Lo(),n=cL(),i=Hle(),o=tE(),a=df(),s=Xa().get,c=Wle(),
|
|
116
|
-
`)&&(B="(?: "+B+")",Q=" "+Q,X++),W=new RegExp("^(?:"+B+")",P)),_&&(W=new RegExp("^"+B+"$(?!\\s)",P)),w&&(U=N.lastIndex),A=e(h,re?W:N,Q),re?A?(A.input=g(A.input,X),A[0]=g(A[0],X),A.index=N.lastIndex,N.lastIndex+=A[0].length):N.lastIndex=0:w&&A&&(N.lastIndex=N.global?A.index+A[0].length:U),_&&A&&A.length>1&&e(d,A[0],W,function(){for(K=1;K<arguments.length-2;K++)arguments[K]===void 0&&(A[K]=void 0)}),A&&G)for(A.groups=V=a(null),K=0;K<G.length;K++)te=G[K],V[te[0]]=A[te[1]];return A}),pw=p,pw}var OD;function uL(){if(OD)return yD;OD=1;var e=no(),t=fE();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),yD}uL();var CD={},vw,ID;function dL(){if(ID)return vw;ID=1,uL();var e=Ur(),t=zo(),r=fE(),n=St(),i=Pr(),o=Bl(),a=i("species"),s=RegExp.prototype;return vw=function(c,u,d,h){var p=i(c),v=!n(function(){var w={};return w[p]=function(){return 7},""[c](w)!==7}),y=v&&!n(function(){var w=!1,x=/a/;return c==="split"&&(x={},x.constructor={},x.constructor[a]=function(){return x},x.flags="",x[p]=/./[p]),x.exec=function(){return w=!0,null},x[p](""),!w});if(!v||!y||d){var m=/./[p],g=u(p,""[c],function(w,x,_,S,E){var I=x.exec;return I===r||I===s.exec?v&&!E?{done:!0,value:e(m,x,_,S)}:{done:!0,value:e(w,_,x,S)}:{done:!1}});t(String.prototype,c,g[0]),t(s,p,g[1])}h&&o(s[p],"sham",!0)},vw}var gw,RD;function fL(){if(RD)return gw;RD=1;var e=Xz().charAt;return gw=function(t,r,n){return r+(n?e(t,r).length:1)},gw}var mw,ND;function Gle(){if(ND)return mw;ND=1;var e=Gt(),t=St(),r=e.RegExp,n=!t(function(){var i=!0;try{r(".","d")}catch{i=!1}var o={},a="",s=i?"dgimsy":"gimsy",c=function(p,v){Object.defineProperty(o,p,{get:function(){return a+=v,!0}})},u={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};i&&(u.hasIndices="d");for(var d in u)c(d,u[d]);var h=Object.getOwnPropertyDescriptor(r.prototype,"flags").get.call(o);return h!==s||a!==s});return mw={correct:n},mw}var bw,TD;function hL(){if(TD)return bw;TD=1;var e=Ur(),t=In(),r=of(),n=Gle(),i=cL(),o=RegExp.prototype;return bw=n.correct?function(a){return a.flags}:function(a){return!n.correct&&r(o,a)&&!t(a,"flags")?e(i,a):a.flags},bw}var yw,PD;function pL(){if(PD)return yw;PD=1;var e=Ur(),t=Rn(),r=er(),n=ro(),i=fE(),o=TypeError;return yw=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(i,a,s);throw new o("RegExp#exec called on incompatible receiver")},yw}var MD;function Kle(){if(MD)return CD;MD=1;var e=Ur(),t=yt(),r=dL(),n=Rn(),i=dr(),o=aE(),a=Lo(),s=qo(),c=Ll(),u=fL(),d=hL(),h=pL(),p=t("".indexOf);return r("match",function(v,y,m){return[function(w){var x=s(this),_=i(w)?c(w,v):void 0;return _?e(_,w,x):new RegExp(w)[v](a(x))},function(g){var w=n(this),x=a(g),_=m(y,w,x);if(_.done)return _.value;var S=a(d(w));if(p(S,"g")===-1)return h(w,x);var E=p(S,"u")!==-1;w.lastIndex=0;for(var I=[],N=0,T;(T=h(w,x))!==null;){var M=a(T[0]);I[N]=M,M===""&&(w.lastIndex=u(x,o(w.lastIndex),E)),N++}return N===0?null:I}]}),CD}Kle();var kD={},xw,AD;function Yle(){if(AD)return xw;AD=1;var e=jz(),t=Ii();return xw=function(r,n,i){return i.get&&e(i.get,n,{getter:!0}),i.set&&e(i.set,n,{setter:!0}),t.f(r,n,i)},xw}var DD;function Xle(){if(DD)return kD;DD=1;var e=Wn(),t=iE().EXISTS,r=yt(),n=Yle(),i=Function.prototype,o=r(i.toString),a=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,s=r(a.exec),c="name";return e&&!t&&n(i,c,{configurable:!0,get:function(){try{return s(a,o(this))[1]}catch{return""}}}),kD}Xle();var jD={},ww,qD;function Zle(){if(qD)return ww;qD=1;var e=tf(),t=Function.prototype,r=t.apply,n=t.call;return ww=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),ww}var Sw,zD;function Jle(){if(zD)return Sw;zD=1;var e=yt(),t=Ya(),r=Math.floor,n=e("".charAt),i=e("".replace),o=e("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;return Sw=function(c,u,d,h,p,v){var y=d+c.length,m=h.length,g=s;return p!==void 0&&(p=t(p),g=a),i(v,g,function(w,x){var _;switch(n(x,0)){case"$":return"$";case"&":return c;case"`":return o(u,0,d);case"'":return o(u,y);case"<":_=p[o(x,1,-1)];break;default:var S=+x;if(S===0)return w;if(S>m){var E=r(S/10);return E===0?w:E<=m?h[E-1]===void 0?n(x,1):h[E-1]+n(x,1):w}_=h[S-1]}return _===void 0?"":_})},Sw}var LD;function Qle(){if(LD)return jD;LD=1;var e=Zle(),t=Ur(),r=yt(),n=dL(),i=St(),o=Rn(),a=er(),s=dr(),c=lf(),u=aE(),d=Lo(),h=qo(),p=fL(),v=Ll(),y=Jle(),m=hL(),g=pL(),w=Pr(),x=w("replace"),_=Math.max,S=Math.min,E=r([].concat),I=r([].push),N=r("".indexOf),T=r("".slice),M=function(U){return U===void 0?U:String(U)},z=(function(){return"a".replace(/./,"$0")==="$0"})(),j=(function(){return/./[x]?/./[x]("a","$0")==="":!1})(),W=!i(function(){var U=/./;return U.exec=function(){var A=[];return A.groups={a:"7"},A},"".replace(U,"$<a>")!=="7"});return n("replace",function(U,A,K){var V=j?"$":"$0";return[function(G,re){var P=h(this),B=s(G)?v(G,x):void 0;return B?t(B,G,P,re):t(A,d(P),G,re)},function(te,G){var re=o(this),P=d(te);if(typeof G=="string"&&N(G,V)===-1&&N(G,"$<")===-1){var B=K(A,re,P,G);if(B.done)return B.value}var X=a(G);X||(G=d(G));var Q=d(m(re)),D=N(Q,"g")!==-1,$;D&&($=N(Q,"u")!==-1,re.lastIndex=0);for(var H=[],q;q=g(re,P),!(q===null||(I(H,q),!D));){var Y=d(q[0]);Y===""&&(re.lastIndex=p(P,u(re.lastIndex),$))}for(var ie="",ne=0,ve=0;ve<H.length;ve++){q=H[ve];for(var Z=d(q[0]),J=_(S(c(q.index),P.length),0),ae=[],he,ue=1;ue<q.length;ue++)I(ae,M(q[ue]));var de=q.groups;if(X){var le=E([Z],ae,J,P);de!==void 0&&I(le,de),he=d(e(G,void 0,le))}else he=y(Z,P,J,ae,de,G);J>=ne&&(ie+=T(P,ne,J)+he,ne=J+Z.length)}return ie+T(P,ne)}]},!W||!z||j),jD}Qle();function Wi(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function Nu(e){return!e||!e.ownerDocument?document:e.ownerDocument}var ma=null,BD=null;lL&&window.addEventListener("resize",function(){BD!==window.devicePixelRatio&&(BD=window.devicePixelRatio,ma=null)});function FD(e){if(ma===null){var t=Nu(e);if(typeof t>"u")return ma=0,ma;var r=t.body,n=t.createElement("div");n.classList.add("simplebar-hide-scrollbar"),r.appendChild(n);var i=n.getBoundingClientRect().right;r.removeChild(n),ma=i}return ma}var ud=(function(){function e(r,n){var i=this;this.onScroll=function(){var o=Wi(i.el);i.scrollXTicking||(o.requestAnimationFrame(i.scrollX),i.scrollXTicking=!0),i.scrollYTicking||(o.requestAnimationFrame(i.scrollY),i.scrollYTicking=!0)},this.scrollX=function(){i.axis.x.isOverflowing&&(i.showScrollbar("x"),i.positionScrollbar("x")),i.scrollXTicking=!1},this.scrollY=function(){i.axis.y.isOverflowing&&(i.showScrollbar("y"),i.positionScrollbar("y")),i.scrollYTicking=!1},this.onMouseEnter=function(){i.showScrollbar("x"),i.showScrollbar("y")},this.onMouseMove=function(o){i.mouseX=o.clientX,i.mouseY=o.clientY,(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseMoveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseMoveForAxis("y")},this.onMouseLeave=function(){i.onMouseMove.cancel(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseLeaveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseLeaveForAxis("y"),i.mouseX=-1,i.mouseY=-1},this.onWindowResize=function(){i.scrollbarWidth=i.getScrollbarWidth(),i.hideNativeScrollbar()},this.hideScrollbars=function(){i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.track.rect)||(i.axis.y.scrollbar.el.classList.remove(i.classNames.visible),i.axis.y.isVisible=!1),i.isWithinBounds(i.axis.x.track.rect)||(i.axis.x.scrollbar.el.classList.remove(i.classNames.visible),i.axis.x.isVisible=!1)},this.onPointerEvent=function(o){var a,s;i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&(a=i.isWithinBounds(i.axis.x.track.rect)),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&(s=i.isWithinBounds(i.axis.y.track.rect)),(a||s)&&(o.preventDefault(),o.stopPropagation(),o.type==="mousedown"&&(a&&(i.axis.x.scrollbar.rect=i.axis.x.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.x.scrollbar.rect)?i.onDragStart(o,"x"):i.onTrackClick(o,"x")),s&&(i.axis.y.scrollbar.rect=i.axis.y.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.scrollbar.rect)?i.onDragStart(o,"y"):i.onTrackClick(o,"y"))))},this.drag=function(o){var a,s=i.axis[i.draggedAxis].track,c=s.rect[i.axis[i.draggedAxis].sizeAttr],u=i.axis[i.draggedAxis].scrollbar,d=i.contentWrapperEl[i.axis[i.draggedAxis].scrollSizeAttr],h=parseInt(i.elStyles[i.axis[i.draggedAxis].sizeAttr],10);o.preventDefault(),o.stopPropagation(),i.draggedAxis==="y"?a=o.pageY:a=o.pageX;var p=a-s.rect[i.axis[i.draggedAxis].offsetAttr]-i.axis[i.draggedAxis].dragOffset,v=p/(c-u.size),y=v*(d-h);i.draggedAxis==="x"&&(y=i.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?y-(c+u.size):y,y=i.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-y:y),i.contentWrapperEl[i.axis[i.draggedAxis].scrollOffsetAttr]=y},this.onEndDrag=function(o){var a=Nu(i.el),s=Wi(i.el);o.preventDefault(),o.stopPropagation(),i.el.classList.remove(i.classNames.dragging),a.removeEventListener("mousemove",i.drag,!0),a.removeEventListener("mouseup",i.onEndDrag,!0),i.removePreventClickId=s.setTimeout(function(){a.removeEventListener("click",i.preventClick,!0),a.removeEventListener("dblclick",i.preventClick,!0),i.removePreventClickId=null})},this.preventClick=function(o){o.preventDefault(),o.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=QA(this.recalculate.bind(this),64),this.onMouseMove=QA(this.onMouseMove.bind(this),64),this.hideScrollbars=tD(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=tD(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=vle(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 i=n.firstElementChild;document.body.appendChild(i);var o=i.firstElementChild;i.scrollLeft=0;var a=e.getOffset(i),s=e.getOffset(o);i.scrollLeft=999;var c=e.getOffset(o);return{isRtlScrollingInverted:a.left!==s.left&&s.left-c.left!==0,isRtlScrollbarInverted:a.left!==s.left}},e.getOffset=function(n){var i=n.getBoundingClientRect(),o=Nu(n),a=Wi(n);return{top:i.top+(a.pageYOffset||o.documentElement.scrollTop),left:i.left+(a.pageXOffset||o.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),lL&&(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 i=document.createElement("div"),o=document.createElement("div");i.classList.add(this.classNames.track),o.classList.add(this.classNames.scrollbar),i.appendChild(o),this.axis.x.track.el=i.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=i.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,i=Wi(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),i.addEventListener("resize",this.onWindowResize);var o=!1,a=null,s=i.ResizeObserver||jle;this.resizeObserver=new s(function(){!o||a!==null||(a=i.requestAnimationFrame(function(){n.recalculate(),a=null}))}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),i.requestAnimationFrame(function(){o=!0}),this.mutationObserver=new i.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var n=Wi(this.el);this.elStyles=n.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var i=this.heightAutoObserverEl.offsetHeight<=1,o=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,h=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=i?"auto":"100%",this.placeholderEl.style.width=o?a+"px":"auto",this.placeholderEl.style.height=d+"px";var p=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=h>a,this.axis.y.isOverflowing=d>p,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&&h>s-y,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&d>p-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 i=this.contentEl[this.axis[n].scrollSizeAttr],o=this.axis[n].track.el[this.axis[n].offsetSizeAttr],a,s=o/i;return a=Math.max(~~(s*o),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 i=this.contentWrapperEl[this.axis[n].scrollSizeAttr],o=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/(i-a),d=~~((o-s.size)*u);d=n==="x"&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?d+(o-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 i=this.axis[n].track.el,o=this.axis[n].scrollbar.el;this.axis[n].isOverflowing||this.axis[n].forceVisible?(i.style.visibility="visible",this.contentWrapperEl.style[this.axis[n].overflowAttr]="scroll"):(i.style.visibility="hidden",this.contentWrapperEl.style[this.axis[n].overflowAttr]="hidden"),this.axis[n].isOverflowing?o.style.display="block":o.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 i=this.isWithinBounds(this.axis[n].scrollbar.rect);i?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 i=this.axis[n].scrollbar.el;this.axis[n].isVisible||(i.classList.add(this.classNames.visible),this.axis[n].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(n,i){i===void 0&&(i="y");var o=Nu(this.el),a=Wi(this.el),s=this.axis[i].scrollbar,c=i==="y"?n.pageY:n.pageX;this.axis[i].dragOffset=c-s.rect[this.axis[i].offsetAttr],this.draggedAxis=i,this.el.classList.add(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)):(a.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(n,i){var o=this;if(i===void 0&&(i="y"),!!this.options.clickOnTrack){var a=Wi(this.el);this.axis[i].scrollbar.rect=this.axis[i].scrollbar.el.getBoundingClientRect();var s=this.axis[i].scrollbar,c=s.rect[this.axis[i].offsetAttr],u=parseInt(this.elStyles[this.axis[i].sizeAttr],10),d=this.contentWrapperEl[this.axis[i].scrollOffsetAttr],h=i==="y"?this.mouseY-c:this.mouseX-c,p=h<0?-1:1,v=p===-1?d-u:d+u,y=function m(){if(p===-1){if(d>v){var g;d-=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((g={},g[o.axis[i].offsetAttr]=d,g)),a.requestAnimationFrame(m)}}else if(d<v){var w;d+=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((w={},w[o.axis[i].offsetAttr]=d,w)),a.requestAnimationFrame(m)}};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:FD(this.el)}catch{return FD(this.el)}},t.removeListeners=function(){var n=this,i=Wi(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(function(o){n.el.removeEventListener(o,n.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(function(o){n.el.removeEventListener(o,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),i.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,i){var o=n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector;return Array.prototype.filter.call(n.children,function(a){return o.call(a,i)})[0]},e})();ud.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};ud.instances=new WeakMap;function $D(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function du(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$D(Object(r),!0).forEach(function(n){ece(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$D(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ece(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dd(){return dd=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},dd.apply(this,arguments)}function tce(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function rce(e,t){if(e==null)return{};var r=tce(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var nce=["children","scrollableNodeProps","tag"],ice=function(t){var r=Array.prototype.reduce.call(t,function(n,i){var o=i.name.match(/data-simplebar-(.+)/);if(o){var a=o[1].replace(/\W+(.)/g,function(s,c){return c.toUpperCase()});switch(i.value){case"true":n[a]=!0;break;case"false":n[a]=!1;break;case void 0:n[a]=!0;break;default:n[a]=i.value}}return n},{});return r},hf=C.forwardRef(function(e,t){var r=e.children,n=e.scrollableNodeProps,i=n===void 0?{}:n,o=e.tag,a=o===void 0?"div":o,s=rce(e,nce),c=a,u,d=C.useRef(),h=C.useRef(),p=C.useRef(),v={},y={},m=[];return Object.keys(s).forEach(function(g){Object.prototype.hasOwnProperty.call(ud.defaultOptions,g)?v[g]=s[g]:g.match(/data-simplebar-(.+)/)&&g!=="data-simplebar-direction"?m.push({name:g,value:s[g]}):y[g]=s[g]}),m.length&&console.warn(`simplebar-react: this way of passing options is deprecated. Pass it like normal props instead:
|
|
112
|
+
*/var z0,bM;function dse(){if(bM)return z0;bM=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(c.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(u){d[u]=u}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return z0=i()?Object.assign:function(o,a){for(var s,c=n(o),d,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var h in s)t.call(s,h)&&(c[h]=s[h]);if(e){d=e(s);for(var p=0;p<d.length;p++)r.call(s,d[p])&&(c[d[p]]=s[d[p]])}}return c},z0}var L0,yM;function YS(){if(yM)return L0;yM=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return L0=e,L0}var B0,xM;function _z(){return xM||(xM=1,B0=Function.call.bind(Object.prototype.hasOwnProperty)),B0}var F0,wM;function fse(){if(wM)return F0;wM=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=YS(),r={},n=_z();e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,s,c,d){if(process.env.NODE_ENV!=="production"){for(var u in o)if(n(o,u)){var h;try{if(typeof o[u]!="function"){var p=Error((c||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}h=o[u](a,u,c,s,null,t)}catch(y){h=y}if(h&&!(h instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in r)){r[h.message]=!0;var v=d?d():"";e("Failed "+s+" type: "+h.message+(v??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},F0=i,F0}var $0,SM;function hse(){if(SM)return $0;SM=1;var e=Ez(),t=dse(),r=YS(),n=_z(),i=fse(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return $0=function(s,c){var d=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function h(P){var B=P&&(d&&P[d]||P[u]);if(typeof B=="function")return B}var p="<<anonymous>>",v={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:x(),arrayOf:_,element:S(),elementType:E(),instanceOf:I,node:z(),objectOf:T,oneOf:N,oneOfType:M,shape:W,exact:U};function y(P,B){return P===B?P!==0||1/P===1/B:P!==P&&B!==B}function m(P,B){this.message=P,this.data=B&&typeof B=="object"?B:{},this.stack=""}m.prototype=Error.prototype;function g(P){if(process.env.NODE_ENV!=="production")var B={},X=0;function Q($,H,q,Y,ie,ne,ve){if(Y=Y||p,ne=ne||q,ve!==r){if(c){var Z=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Z.name="Invariant Violation",Z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var J=Y+":"+q;!B[J]&&X<3&&(o("You are manually calling a React.PropTypes validation function for the `"+ne+"` prop on `"+Y+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),B[J]=!0,X++)}}return H[q]==null?$?H[q]===null?new m("The "+ie+" `"+ne+"` is marked as required "+("in `"+Y+"`, but its value is `null`.")):new m("The "+ie+" `"+ne+"` is marked as required in "+("`"+Y+"`, but its value is `undefined`.")):null:P(H,q,Y,ie,ne)}var D=Q.bind(null,!1);return D.isRequired=Q.bind(null,!0),D}function w(P){function B(X,Q,D,$,H,q){var Y=X[Q],ie=V(Y);if(ie!==P){var ne=te(Y);return new m("Invalid "+$+" `"+H+"` of type "+("`"+ne+"` supplied to `"+D+"`, expected ")+("`"+P+"`."),{expectedType:P})}return null}return g(B)}function x(){return g(a)}function _(P){function B(X,Q,D,$,H){if(typeof P!="function")return new m("Property `"+H+"` of component `"+D+"` has invalid PropType notation inside arrayOf.");var q=X[Q];if(!Array.isArray(q)){var Y=V(q);return new m("Invalid "+$+" `"+H+"` of type "+("`"+Y+"` supplied to `"+D+"`, expected an array."))}for(var ie=0;ie<q.length;ie++){var ne=P(q,ie,D,$,H+"["+ie+"]",r);if(ne instanceof Error)return ne}return null}return g(B)}function S(){function P(B,X,Q,D,$){var H=B[X];if(!s(H)){var q=V(H);return new m("Invalid "+D+" `"+$+"` of type "+("`"+q+"` supplied to `"+Q+"`, expected a single ReactElement."))}return null}return g(P)}function E(){function P(B,X,Q,D,$){var H=B[X];if(!e.isValidElementType(H)){var q=V(H);return new m("Invalid "+D+" `"+$+"` of type "+("`"+q+"` supplied to `"+Q+"`, expected a single ReactElement type."))}return null}return g(P)}function I(P){function B(X,Q,D,$,H){if(!(X[Q]instanceof P)){var q=P.name||p,Y=re(X[Q]);return new m("Invalid "+$+" `"+H+"` of type "+("`"+Y+"` supplied to `"+D+"`, expected ")+("instance of `"+q+"`."))}return null}return g(B)}function N(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function B(X,Q,D,$,H){for(var q=X[Q],Y=0;Y<P.length;Y++)if(y(q,P[Y]))return null;var ie=JSON.stringify(P,function(ve,Z){var J=te(Z);return J==="symbol"?String(Z):Z});return new m("Invalid "+$+" `"+H+"` of value `"+String(q)+"` "+("supplied to `"+D+"`, expected one of "+ie+"."))}return g(B)}function T(P){function B(X,Q,D,$,H){if(typeof P!="function")return new m("Property `"+H+"` of component `"+D+"` has invalid PropType notation inside objectOf.");var q=X[Q],Y=V(q);if(Y!=="object")return new m("Invalid "+$+" `"+H+"` of type "+("`"+Y+"` supplied to `"+D+"`, expected an object."));for(var ie in q)if(n(q,ie)){var ne=P(q,ie,D,$,H+"."+ie,r);if(ne instanceof Error)return ne}return null}return g(B)}function M(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<P.length;B++){var X=P[B];if(typeof X!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G(X)+" at index "+B+"."),a}function Q(D,$,H,q,Y){for(var ie=[],ne=0;ne<P.length;ne++){var ve=P[ne],Z=ve(D,$,H,q,Y,r);if(Z==null)return null;Z.data&&n(Z.data,"expectedType")&&ie.push(Z.data.expectedType)}var J=ie.length>0?", expected one of type ["+ie.join(", ")+"]":"";return new m("Invalid "+q+" `"+Y+"` supplied to "+("`"+H+"`"+J+"."))}return g(Q)}function z(){function P(B,X,Q,D,$){return A(B[X])?null:new m("Invalid "+D+" `"+$+"` supplied to "+("`"+Q+"`, expected a ReactNode."))}return g(P)}function j(P,B,X,Q,D){return new m((P||"React class")+": "+B+" type `"+X+"."+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+D+"`.")}function W(P){function B(X,Q,D,$,H){var q=X[Q],Y=V(q);if(Y!=="object")return new m("Invalid "+$+" `"+H+"` of type `"+Y+"` "+("supplied to `"+D+"`, expected `object`."));for(var ie in P){var ne=P[ie];if(typeof ne!="function")return j(D,$,H,ie,te(ne));var ve=ne(q,ie,D,$,H+"."+ie,r);if(ve)return ve}return null}return g(B)}function U(P){function B(X,Q,D,$,H){var q=X[Q],Y=V(q);if(Y!=="object")return new m("Invalid "+$+" `"+H+"` of type `"+Y+"` "+("supplied to `"+D+"`, expected `object`."));var ie=t({},X[Q],P);for(var ne in ie){var ve=P[ne];if(n(P,ne)&&typeof ve!="function")return j(D,$,H,ne,te(ve));if(!ve)return new m("Invalid "+$+" `"+H+"` key `"+ne+"` supplied to `"+D+"`.\nBad object: "+JSON.stringify(X[Q],null," ")+`
|
|
113
|
+
Valid keys: `+JSON.stringify(Object.keys(P),null," "));var Z=ve(q,ne,D,$,H+"."+ne,r);if(Z)return Z}return null}return g(B)}function A(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every(A);if(P===null||s(P))return!0;var B=h(P);if(B){var X=B.call(P),Q;if(B!==P.entries){for(;!(Q=X.next()).done;)if(!A(Q.value))return!1}else for(;!(Q=X.next()).done;){var D=Q.value;if(D&&!A(D[1]))return!1}}else return!1;return!0;default:return!1}}function K(P,B){return P==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function V(P){var B=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":K(B,P)?"symbol":B}function te(P){if(typeof P>"u"||P===null)return""+P;var B=V(P);if(B==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return B}function G(P){var B=te(P);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function re(P){return!P.constructor||!P.constructor.name?p:P.constructor.name}return v.checkPropTypes=i,v.resetWarningCache=i.resetWarningCache,v.PropTypes=v,v},$0}var V0,EM;function pse(){if(EM)return V0;EM=1;var e=YS();function t(){}function r(){}return r.resetWarningCache=t,V0=function(){function n(a,s,c,d,u,h){if(h!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}n.isRequired=n;function i(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return o.PropTypes=o,o},V0}var _M;function vse(){if(_M)return au.exports;if(_M=1,process.env.NODE_ENV!=="production"){var e=Ez(),t=!0;au.exports=hse()(e.isElement,t)}else au.exports=pse()();return au.exports}var gse=vse();const Fs=eo(gse);var OM={},$s,CM;function Gt(){if(CM)return $s;CM=1;var e=function(t){return t&&t.Math===Math&&t};return $s=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof jt=="object"&&jt)||e(typeof $s=="object"&&$s)||(function(){return this})()||Function("return this")(),$s}var H0={},W0,IM;function St(){return IM||(IM=1,W0=function(e){try{return!!e()}catch{return!0}}),W0}var U0,RM;function Wn(){if(RM)return U0;RM=1;var e=St();return U0=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),U0}var G0,NM;function tf(){if(NM)return G0;NM=1;var e=St();return G0=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),G0}var K0,TM;function Ur(){if(TM)return K0;TM=1;var e=tf(),t=Function.prototype.call;return K0=e?t.bind(t):function(){return t.apply(t,arguments)},K0}var Y0={},PM;function Oz(){if(PM)return Y0;PM=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return Y0.f=r?function(i){var o=t(this,i);return!!o&&o.enumerable}:e,Y0}var X0,MM;function XS(){return MM||(MM=1,X0=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),X0}var Z0,kM;function yt(){if(kM)return Z0;kM=1;var e=tf(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return Z0=e?n:function(i){return function(){return r.apply(i,arguments)}},Z0}var J0,AM;function ro(){if(AM)return J0;AM=1;var e=yt(),t=e({}.toString),r=e("".slice);return J0=function(n){return r(t(n),8,-1)},J0}var Q0,DM;function rf(){if(DM)return Q0;DM=1;var e=yt(),t=St(),r=ro(),n=Object,i=e("".split);return Q0=t(function(){return!n("z").propertyIsEnumerable(0)})?function(o){return r(o)==="String"?i(o,""):n(o)}:n,Q0}var ey,jM;function ql(){return jM||(jM=1,ey=function(e){return e==null}),ey}var ty,qM;function qo(){if(qM)return ty;qM=1;var e=ql(),t=TypeError;return ty=function(r){if(e(r))throw new t("Can't call method on "+r);return r},ty}var ry,zM;function Ka(){if(zM)return ry;zM=1;var e=rf(),t=qo();return ry=function(r){return e(t(r))},ry}var ny,LM;function er(){if(LM)return ny;LM=1;var e=typeof document=="object"&&document.all;return ny=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},ny}var iy,BM;function dr(){if(BM)return iy;BM=1;var e=er();return iy=function(t){return typeof t=="object"?t!==null:e(t)},iy}var oy,FM;function nf(){if(FM)return oy;FM=1;var e=Gt(),t=er(),r=function(n){return t(n)?n:void 0};return oy=function(n,i){return arguments.length<2?r(e[n]):e[n]&&e[n][i]},oy}var ay,$M;function of(){if($M)return ay;$M=1;var e=yt();return ay=e({}.isPrototypeOf),ay}var sy,VM;function Cz(){if(VM)return sy;VM=1;var e=Gt(),t=e.navigator,r=t&&t.userAgent;return sy=r?String(r):"",sy}var ly,HM;function ZS(){if(HM)return ly;HM=1;var e=Gt(),t=Cz(),r=e.process,n=e.Deno,i=r&&r.versions||n&&n.version,o=i&&i.v8,a,s;return o&&(a=o.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]))),ly=s,ly}var cy,WM;function Iz(){if(WM)return cy;WM=1;var e=ZS(),t=St(),r=Gt(),n=r.String;return cy=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),cy}var uy,UM;function Rz(){if(UM)return uy;UM=1;var e=Iz();return uy=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",uy}var dy,GM;function Nz(){if(GM)return dy;GM=1;var e=nf(),t=er(),r=of(),n=Rz(),i=Object;return dy=n?function(o){return typeof o=="symbol"}:function(o){var a=e("Symbol");return t(a)&&r(a.prototype,i(o))},dy}var fy,KM;function JS(){if(KM)return fy;KM=1;var e=String;return fy=function(t){try{return e(t)}catch{return"Object"}},fy}var hy,YM;function zl(){if(YM)return hy;YM=1;var e=er(),t=JS(),r=TypeError;return hy=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},hy}var py,XM;function Ll(){if(XM)return py;XM=1;var e=zl(),t=ql();return py=function(r,n){var i=r[n];return t(i)?void 0:e(i)},py}var vy,ZM;function mse(){if(ZM)return vy;ZM=1;var e=Ur(),t=er(),r=dr(),n=TypeError;return vy=function(i,o){var a,s;if(o==="string"&&t(a=i.toString)&&!r(s=e(a,i))||t(a=i.valueOf)&&!r(s=e(a,i))||o!=="string"&&t(a=i.toString)&&!r(s=e(a,i)))return s;throw new n("Can't convert object to primitive value")},vy}var gy={exports:{}},my,JM;function af(){return JM||(JM=1,my=!1),my}var by,QM;function QS(){if(QM)return by;QM=1;var e=Gt(),t=Object.defineProperty;return by=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},by}var ek;function eE(){if(ek)return gy.exports;ek=1;var e=af(),t=Gt(),r=QS(),n="__core-js_shared__",i=gy.exports=t[n]||r(n,{});return(i.versions||(i.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"}),gy.exports}var yy,tk;function tE(){if(tk)return yy;tk=1;var e=eE();return yy=function(t,r){return e[t]||(e[t]=r||{})},yy}var xy,rk;function Ya(){if(rk)return xy;rk=1;var e=qo(),t=Object;return xy=function(r){return t(e(r))},xy}var wy,nk;function In(){if(nk)return wy;nk=1;var e=yt(),t=Ya(),r=e({}.hasOwnProperty);return wy=Object.hasOwn||function(i,o){return r(t(i),o)},wy}var Sy,ik;function rE(){if(ik)return Sy;ik=1;var e=yt(),t=0,r=Math.random(),n=e(1.1.toString);return Sy=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},Sy}var Ey,ok;function Pr(){if(ok)return Ey;ok=1;var e=Gt(),t=tE(),r=In(),n=rE(),i=Iz(),o=Rz(),a=e.Symbol,s=t("wks"),c=o?a.for||a:a&&a.withoutSetter||n;return Ey=function(d){return r(s,d)||(s[d]=i&&r(a,d)?a[d]:c("Symbol."+d)),s[d]},Ey}var _y,ak;function bse(){if(ak)return _y;ak=1;var e=Ur(),t=dr(),r=Nz(),n=Ll(),i=mse(),o=Pr(),a=TypeError,s=o("toPrimitive");return _y=function(c,d){if(!t(c)||r(c))return c;var u=n(c,s),h;if(u){if(d===void 0&&(d="default"),h=e(u,c,d),!t(h)||r(h))return h;throw new a("Can't convert object to primitive value")}return d===void 0&&(d="number"),i(c,d)},_y}var Oy,sk;function Tz(){if(sk)return Oy;sk=1;var e=bse(),t=Nz();return Oy=function(r){var n=e(r,"string");return t(n)?n:n+""},Oy}var Cy,lk;function nE(){if(lk)return Cy;lk=1;var e=Gt(),t=dr(),r=e.document,n=t(r)&&t(r.createElement);return Cy=function(i){return n?r.createElement(i):{}},Cy}var Iy,ck;function Pz(){if(ck)return Iy;ck=1;var e=Wn(),t=St(),r=nE();return Iy=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),Iy}var uk;function Mz(){if(uk)return H0;uk=1;var e=Wn(),t=Ur(),r=Oz(),n=XS(),i=Ka(),o=Tz(),a=In(),s=Pz(),c=Object.getOwnPropertyDescriptor;return H0.f=e?c:function(u,h){if(u=i(u),h=o(h),s)try{return c(u,h)}catch{}if(a(u,h))return n(!t(r.f,u,h),u[h])},H0}var Ry={},Ny,dk;function kz(){if(dk)return Ny;dk=1;var e=Wn(),t=St();return Ny=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Ny}var Ty,fk;function Rn(){if(fk)return Ty;fk=1;var e=dr(),t=String,r=TypeError;return Ty=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},Ty}var hk;function Ii(){if(hk)return Ry;hk=1;var e=Wn(),t=Pz(),r=kz(),n=Rn(),i=Tz(),o=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c="enumerable",d="configurable",u="writable";return Ry.f=e?r?function(p,v,y){if(n(p),v=i(v),n(y),typeof p=="function"&&v==="prototype"&&"value"in y&&u in y&&!y[u]){var m=s(p,v);m&&m[u]&&(p[v]=y.value,y={configurable:d in y?y[d]:m[d],enumerable:c in y?y[c]:m[c],writable:!1})}return a(p,v,y)}:a:function(p,v,y){if(n(p),v=i(v),n(y),t)try{return a(p,v,y)}catch{}if("get"in y||"set"in y)throw new o("Accessors not supported");return"value"in y&&(p[v]=y.value),p},Ry}var Py,pk;function Bl(){if(pk)return Py;pk=1;var e=Wn(),t=Ii(),r=XS();return Py=e?function(n,i,o){return t.f(n,i,r(1,o))}:function(n,i,o){return n[i]=o,n},Py}var My={exports:{}},ky,vk;function iE(){if(vk)return ky;vk=1;var e=Wn(),t=In(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,i=t(r,"name"),o=i&&(function(){}).name==="something",a=i&&(!e||e&&n(r,"name").configurable);return ky={EXISTS:i,PROPER:o,CONFIGURABLE:a},ky}var Ay,gk;function Az(){if(gk)return Ay;gk=1;var e=yt(),t=er(),r=eE(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(i){return n(i)}),Ay=r.inspectSource,Ay}var Dy,mk;function Dz(){if(mk)return Dy;mk=1;var e=Gt(),t=er(),r=e.WeakMap;return Dy=t(r)&&/native code/.test(String(r)),Dy}var jy,bk;function oE(){if(bk)return jy;bk=1;var e=tE(),t=rE(),r=e("keys");return jy=function(n){return r[n]||(r[n]=t(n))},jy}var qy,yk;function sf(){return yk||(yk=1,qy={}),qy}var zy,xk;function Xa(){if(xk)return zy;xk=1;var e=Dz(),t=Gt(),r=dr(),n=Bl(),i=In(),o=eE(),a=oE(),s=sf(),c="Object already initialized",d=t.TypeError,u=t.WeakMap,h,p,v,y=function(x){return v(x)?p(x):h(x,{})},m=function(x){return function(_){var S;if(!r(_)||(S=p(_)).type!==x)throw new d("Incompatible receiver, "+x+" required");return S}};if(e||o.state){var g=o.state||(o.state=new u);g.get=g.get,g.has=g.has,g.set=g.set,h=function(x,_){if(g.has(x))throw new d(c);return _.facade=x,g.set(x,_),_},p=function(x){return g.get(x)||{}},v=function(x){return g.has(x)}}else{var w=a("state");s[w]=!0,h=function(x,_){if(i(x,w))throw new d(c);return _.facade=x,n(x,w,_),_},p=function(x){return i(x,w)?x[w]:{}},v=function(x){return i(x,w)}}return zy={set:h,get:p,has:v,enforce:y,getterFor:m},zy}var wk;function jz(){if(wk)return My.exports;wk=1;var e=yt(),t=St(),r=er(),n=In(),i=Wn(),o=iE().CONFIGURABLE,a=Az(),s=Xa(),c=s.enforce,d=s.get,u=String,h=Object.defineProperty,p=e("".slice),v=e("".replace),y=e([].join),m=i&&!t(function(){return h(function(){},"length",{value:8}).length!==8}),g=String(String).split("String"),w=My.exports=function(x,_,S){p(u(_),0,7)==="Symbol("&&(_="["+v(u(_),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),S&&S.getter&&(_="get "+_),S&&S.setter&&(_="set "+_),(!n(x,"name")||o&&x.name!==_)&&(i?h(x,"name",{value:_,configurable:!0}):x.name=_),m&&S&&n(S,"arity")&&x.length!==S.arity&&h(x,"length",{value:S.arity});try{S&&n(S,"constructor")&&S.constructor?i&&h(x,"prototype",{writable:!1}):x.prototype&&(x.prototype=void 0)}catch{}var E=c(x);return n(E,"source")||(E.source=y(g,typeof _=="string"?_:"")),x};return Function.prototype.toString=w(function(){return r(this)&&d(this).source||a(this)},"toString"),My.exports}var Ly,Sk;function zo(){if(Sk)return Ly;Sk=1;var e=er(),t=Ii(),r=jz(),n=QS();return Ly=function(i,o,a,s){s||(s={});var c=s.enumerable,d=s.name!==void 0?s.name:o;if(e(a)&&r(a,d,s),s.global)c?i[o]=a:n(o,a);else{try{s.unsafe?i[o]&&(c=!0):delete i[o]}catch{}c?i[o]=a:t.f(i,o,{value:a,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return i},Ly}var By={},Fy,Ek;function yse(){if(Ek)return Fy;Ek=1;var e=Math.ceil,t=Math.floor;return Fy=Math.trunc||function(n){var i=+n;return(i>0?t:e)(i)},Fy}var $y,_k;function lf(){if(_k)return $y;_k=1;var e=yse();return $y=function(t){var r=+t;return r!==r||r===0?0:e(r)},$y}var Vy,Ok;function xse(){if(Ok)return Vy;Ok=1;var e=lf(),t=Math.max,r=Math.min;return Vy=function(n,i){var o=e(n);return o<0?t(o+i,0):r(o,i)},Vy}var Hy,Ck;function aE(){if(Ck)return Hy;Ck=1;var e=lf(),t=Math.min;return Hy=function(r){var n=e(r);return n>0?t(n,9007199254740991):0},Hy}var Wy,Ik;function cf(){if(Ik)return Wy;Ik=1;var e=aE();return Wy=function(t){return e(t.length)},Wy}var Uy,Rk;function wse(){if(Rk)return Uy;Rk=1;var e=Ka(),t=xse(),r=cf(),n=function(i){return function(o,a,s){var c=e(o),d=r(c);if(d===0)return!i&&-1;var u=t(s,d),h;if(i&&a!==a){for(;d>u;)if(h=c[u++],h!==h)return!0}else for(;d>u;u++)if((i||u in c)&&c[u]===a)return i||u||0;return!i&&-1}};return Uy={includes:n(!0),indexOf:n(!1)},Uy}var Gy,Nk;function qz(){if(Nk)return Gy;Nk=1;var e=yt(),t=In(),r=Ka(),n=wse().indexOf,i=sf(),o=e([].push);return Gy=function(a,s){var c=r(a),d=0,u=[],h;for(h in c)!t(i,h)&&t(c,h)&&o(u,h);for(;s.length>d;)t(c,h=s[d++])&&(~n(u,h)||o(u,h));return u},Gy}var Ky,Tk;function sE(){return Tk||(Tk=1,Ky=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Ky}var Pk;function lE(){if(Pk)return By;Pk=1;var e=qz(),t=sE(),r=t.concat("length","prototype");return By.f=Object.getOwnPropertyNames||function(i){return e(i,r)},By}var Yy={},Mk;function zz(){return Mk||(Mk=1,Yy.f=Object.getOwnPropertySymbols),Yy}var Xy,kk;function Sse(){if(kk)return Xy;kk=1;var e=nf(),t=yt(),r=lE(),n=zz(),i=Rn(),o=t([].concat);return Xy=e("Reflect","ownKeys")||function(s){var c=r.f(i(s)),d=n.f;return d?o(c,d(s)):c},Xy}var Zy,Ak;function Ese(){if(Ak)return Zy;Ak=1;var e=In(),t=Sse(),r=Mz(),n=Ii();return Zy=function(i,o,a){for(var s=t(o),c=n.f,d=r.f,u=0;u<s.length;u++){var h=s[u];!e(i,h)&&!(a&&e(a,h))&&c(i,h,d(o,h))}},Zy}var Jy,Dk;function Lz(){if(Dk)return Jy;Dk=1;var e=St(),t=er(),r=/#|\.prototype\./,n=function(c,d){var u=o[i(c)];return u===s?!0:u===a?!1:t(d)?e(d):!!d},i=n.normalize=function(c){return String(c).replace(r,".").toLowerCase()},o=n.data={},a=n.NATIVE="N",s=n.POLYFILL="P";return Jy=n,Jy}var Qy,jk;function no(){if(jk)return Qy;jk=1;var e=Gt(),t=Mz().f,r=Bl(),n=zo(),i=QS(),o=Ese(),a=Lz();return Qy=function(s,c){var d=s.target,u=s.global,h=s.stat,p,v,y,m,g,w;if(u?v=e:h?v=e[d]||i(d,{}):v=e[d]&&e[d].prototype,v)for(y in c){if(g=c[y],s.dontCallGetSet?(w=t(v,y),m=w&&w.value):m=v[y],p=a(u?y:d+(h?".":"#")+y,s.forced),!p&&m!==void 0){if(typeof g==typeof m)continue;o(g,m)}(s.sham||m&&m.sham)&&r(g,"sham",!0),n(v,y,g,s)}},Qy}var ex,qk;function cE(){if(qk)return ex;qk=1;var e=Pr(),t=e("toStringTag"),r={};return r[t]="z",ex=String(r)==="[object z]",ex}var tx,zk;function uf(){if(zk)return tx;zk=1;var e=cE(),t=er(),r=ro(),n=Pr(),i=n("toStringTag"),o=Object,a=r((function(){return arguments})())==="Arguments",s=function(c,d){try{return c[d]}catch{}};return tx=e?r:function(c){var d,u,h;return c===void 0?"Undefined":c===null?"Null":typeof(u=s(d=o(c),i))=="string"?u:a?r(d):(h=r(d))==="Object"&&t(d.callee)?"Arguments":h},tx}var rx,Lk;function Lo(){if(Lk)return rx;Lk=1;var e=uf(),t=String;return rx=function(r){if(e(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return t(r)},rx}var nx,Bk;function Bz(){return Bk||(Bk=1,nx=`
|
|
114
|
+
\v\f\r \u2028\u2029\uFEFF`),nx}var ix,Fk;function _se(){if(Fk)return ix;Fk=1;var e=yt(),t=qo(),r=Lo(),n=Bz(),i=e("".replace),o=RegExp("^["+n+"]+"),a=RegExp("(^|[^"+n+"])["+n+"]+$"),s=function(c){return function(d){var u=r(t(d));return c&1&&(u=i(u,o,"")),c&2&&(u=i(u,a,"$1")),u}};return ix={start:s(1),end:s(2),trim:s(3)},ix}var ox,$k;function Ose(){if($k)return ox;$k=1;var e=Gt(),t=St(),r=yt(),n=Lo(),i=_se().trim,o=Bz(),a=e.parseInt,s=e.Symbol,c=s&&s.iterator,d=/^[+-]?0x/i,u=r(d.exec),h=a(o+"08")!==8||a(o+"0x16")!==22||c&&!t(function(){a(Object(c))});return ox=h?function(v,y){var m=i(n(v));return a(m,y>>>0||(u(d,m)?16:10))}:a,ox}var Vk;function Cse(){if(Vk)return OM;Vk=1;var e=no(),t=Ose();return e({global:!0,forced:parseInt!==t},{parseInt:t}),OM}Cse();var Hk={},ax,Wk;function Fz(){if(Wk)return ax;Wk=1;var e=qz(),t=sE();return ax=Object.keys||function(n){return e(n,t)},ax}var sx,Uk;function Ise(){if(Uk)return sx;Uk=1;var e=Wn(),t=yt(),r=Ur(),n=St(),i=Fz(),o=zz(),a=Oz(),s=Ya(),c=rf(),d=Object.assign,u=Object.defineProperty,h=t([].concat);return sx=!d||n(function(){if(e&&d({b:1},d(u({},"a",{enumerable:!0,get:function(){u(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var p={},v={},y=Symbol("assign detection"),m="abcdefghijklmnopqrst";return p[y]=7,m.split("").forEach(function(g){v[g]=g}),d({},p)[y]!==7||i(d({},v)).join("")!==m})?function(v,y){for(var m=s(v),g=arguments.length,w=1,x=o.f,_=a.f;g>w;)for(var S=c(arguments[w++]),E=x?h(i(S),x(S)):i(S),I=E.length,N=0,T;I>N;)T=E[N++],(!e||r(_,S,T))&&(m[T]=S[T]);return m}:d,sx}var Gk;function Rse(){if(Gk)return Hk;Gk=1;var e=no(),t=Ise();return e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),Hk}Rse();var Kk={},lx,Yk;function Nse(){if(Yk)return lx;Yk=1;var e=ro(),t=yt();return lx=function(r){if(e(r)==="Function")return t(r)},lx}var cx,Xk;function $z(){if(Xk)return cx;Xk=1;var e=Nse(),t=zl(),r=tf(),n=e(e.bind);return cx=function(i,o){return t(i),o===void 0?i:r?n(i,o):function(){return i.apply(o,arguments)}},cx}var ux,Zk;function Tse(){if(Zk)return ux;Zk=1;var e=ro();return ux=Array.isArray||function(r){return e(r)==="Array"},ux}var dx,Jk;function Pse(){if(Jk)return dx;Jk=1;var e=yt(),t=St(),r=er(),n=uf(),i=nf(),o=Az(),a=function(){},s=i("Reflect","construct"),c=/^\s*(?:class|function)\b/,d=e(c.exec),u=!c.test(a),h=function(y){if(!r(y))return!1;try{return s(a,[],y),!0}catch{return!1}},p=function(y){if(!r(y))return!1;switch(n(y)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return u||!!d(c,o(y))}catch{return!0}};return p.sham=!0,dx=!s||t(function(){var v;return h(h.call)||!h(Object)||!h(function(){v=!0})||v})?p:h,dx}var fx,Qk;function Mse(){if(Qk)return fx;Qk=1;var e=Tse(),t=Pse(),r=dr(),n=Pr(),i=n("species"),o=Array;return fx=function(a){var s;return e(a)&&(s=a.constructor,t(s)&&(s===o||e(s.prototype))?s=void 0:r(s)&&(s=s[i],s===null&&(s=void 0))),s===void 0?o:s},fx}var hx,eA;function kse(){if(eA)return hx;eA=1;var e=Mse();return hx=function(t,r){return new(e(t))(r===0?0:r)},hx}var px,tA;function Vz(){if(tA)return px;tA=1;var e=$z(),t=yt(),r=rf(),n=Ya(),i=cf(),o=kse(),a=t([].push),s=function(c){var d=c===1,u=c===2,h=c===3,p=c===4,v=c===6,y=c===7,m=c===5||v;return function(g,w,x,_){for(var S=n(g),E=r(S),I=i(E),N=e(w,x),T=0,M=_||o,z=d?M(g,I):u||y?M(g,0):void 0,j,W;I>T;T++)if((m||T in E)&&(j=E[T],W=N(j,T,S),c))if(d)z[T]=W;else if(W)switch(c){case 3:return!0;case 5:return j;case 6:return T;case 2:a(z,j)}else switch(c){case 4:return!1;case 7:a(z,j)}return v?-1:h||p?p:z}};return px={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)},px}var vx,rA;function Ase(){if(rA)return vx;rA=1;var e=St(),t=Pr(),r=ZS(),n=t("species");return vx=function(i){return r>=51||!e(function(){var o=[],a=o.constructor={};return a[n]=function(){return{foo:1}},o[i](Boolean).foo!==1})},vx}var nA;function Dse(){if(nA)return Kk;nA=1;var e=no(),t=Vz().filter,r=Ase(),n=r("filter");return e({target:"Array",proto:!0,forced:!n},{filter:function(o){return t(this,o,arguments.length>1?arguments[1]:void 0)}}),Kk}Dse();var iA={},gx,oA;function jse(){if(oA)return gx;oA=1;var e=cE(),t=uf();return gx=e?{}.toString:function(){return"[object "+t(this)+"]"},gx}var aA;function qse(){if(aA)return iA;aA=1;var e=cE(),t=zo(),r=jse();return e||t(Object.prototype,"toString",r,{unsafe:!0}),iA}qse();var mx={},sA;function zse(){if(sA)return mx;sA=1;var e=Wn(),t=kz(),r=Ii(),n=Rn(),i=Ka(),o=Fz();return mx.f=e&&!t?Object.defineProperties:function(s,c){n(s);for(var d=i(c),u=o(c),h=u.length,p=0,v;h>p;)r.f(s,v=u[p++],d[v]);return s},mx}var bx,lA;function Lse(){if(lA)return bx;lA=1;var e=nf();return bx=e("document","documentElement"),bx}var yx,cA;function df(){if(cA)return yx;cA=1;var e=Rn(),t=zse(),r=sE(),n=sf(),i=Lse(),o=nE(),a=oE(),s=">",c="<",d="prototype",u="script",h=a("IE_PROTO"),p=function(){},v=function(x){return c+u+s+x+c+"/"+u+s},y=function(x){x.write(v("")),x.close();var _=x.parentWindow.Object;return x=null,_},m=function(){var x=o("iframe"),_="java"+u+":",S;return x.style.display="none",i.appendChild(x),x.src=String(_),S=x.contentWindow.document,S.open(),S.write(v("document.F=Object")),S.close(),S.F},g,w=function(){try{g=new ActiveXObject("htmlfile")}catch{}w=typeof document<"u"?document.domain&&g?y(g):m():y(g);for(var x=r.length;x--;)delete w[d][r[x]];return w()};return n[h]=!0,yx=Object.create||function(_,S){var E;return _!==null?(p[d]=e(_),E=new p,p[d]=null,E[h]=_):E=w(),S===void 0?E:t.f(E,S)},yx}var xx,uA;function Bse(){if(uA)return xx;uA=1;var e=Pr(),t=df(),r=Ii().f,n=e("unscopables"),i=Array.prototype;return i[n]===void 0&&r(i,n,{configurable:!0,value:t(null)}),xx=function(o){i[n][o]=!0},xx}var wx,dA;function Fl(){return dA||(dA=1,wx={}),wx}var Sx,fA;function Fse(){if(fA)return Sx;fA=1;var e=St();return Sx=!e(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),Sx}var Ex,hA;function Hz(){if(hA)return Ex;hA=1;var e=In(),t=er(),r=Ya(),n=oE(),i=Fse(),o=n("IE_PROTO"),a=Object,s=a.prototype;return Ex=i?a.getPrototypeOf:function(c){var d=r(c);if(e(d,o))return d[o];var u=d.constructor;return t(u)&&d instanceof u?u.prototype:d instanceof a?s:null},Ex}var _x,pA;function Wz(){if(pA)return _x;pA=1;var e=St(),t=er(),r=dr(),n=df(),i=Hz(),o=zo(),a=Pr(),s=af(),c=a("iterator"),d=!1,u,h,p;[].keys&&(p=[].keys(),"next"in p?(h=i(i(p)),h!==Object.prototype&&(u=h)):d=!0);var v=!r(u)||e(function(){var y={};return u[c].call(y)!==y});return v?u={}:s&&(u=n(u)),t(u[c])||o(u,c,function(){return this}),_x={IteratorPrototype:u,BUGGY_SAFARI_ITERATORS:d},_x}var Ox,vA;function ff(){if(vA)return Ox;vA=1;var e=Ii().f,t=In(),r=Pr(),n=r("toStringTag");return Ox=function(i,o,a){i&&!a&&(i=i.prototype),i&&!t(i,n)&&e(i,n,{configurable:!0,value:o})},Ox}var Cx,gA;function $se(){if(gA)return Cx;gA=1;var e=Wz().IteratorPrototype,t=df(),r=XS(),n=ff(),i=Fl(),o=function(){return this};return Cx=function(a,s,c,d){var u=s+" Iterator";return a.prototype=t(e,{next:r(+!d,c)}),n(a,u,!1,!0),i[u]=o,a},Cx}var Ix,mA;function Vse(){if(mA)return Ix;mA=1;var e=yt(),t=zl();return Ix=function(r,n,i){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[i]))}catch{}},Ix}var Rx,bA;function Hse(){if(bA)return Rx;bA=1;var e=dr();return Rx=function(t){return e(t)||t===null},Rx}var Nx,yA;function Wse(){if(yA)return Nx;yA=1;var e=Hse(),t=String,r=TypeError;return Nx=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")},Nx}var Tx,xA;function Uz(){if(xA)return Tx;xA=1;var e=Vse(),t=dr(),r=qo(),n=Wse();return Tx=Object.setPrototypeOf||("__proto__"in{}?(function(){var i=!1,o={},a;try{a=e(Object.prototype,"__proto__","set"),a(o,[]),i=o instanceof Array}catch{}return function(c,d){return r(c),n(d),t(c)&&(i?a(c,d):c.__proto__=d),c}})():void 0),Tx}var Px,wA;function Gz(){if(wA)return Px;wA=1;var e=no(),t=Ur(),r=af(),n=iE(),i=er(),o=$se(),a=Hz(),s=Uz(),c=ff(),d=Bl(),u=zo(),h=Pr(),p=Fl(),v=Wz(),y=n.PROPER,m=n.CONFIGURABLE,g=v.IteratorPrototype,w=v.BUGGY_SAFARI_ITERATORS,x=h("iterator"),_="keys",S="values",E="entries",I=function(){return this};return Px=function(N,T,M,z,j,W,U){o(M,T,z);var A=function(D){if(D===j&&re)return re;if(!w&&D&&D in te)return te[D];switch(D){case _:return function(){return new M(this,D)};case S:return function(){return new M(this,D)};case E:return function(){return new M(this,D)}}return function(){return new M(this)}},K=T+" Iterator",V=!1,te=N.prototype,G=te[x]||te["@@iterator"]||j&&te[j],re=!w&&G||A(j),P=T==="Array"&&te.entries||G,B,X,Q;if(P&&(B=a(P.call(new N)),B!==Object.prototype&&B.next&&(!r&&a(B)!==g&&(s?s(B,g):i(B[x])||u(B,x,I)),c(B,K,!0,!0),r&&(p[K]=I))),y&&j===S&&G&&G.name!==S&&(!r&&m?d(te,"name",S):(V=!0,re=function(){return t(G,this)})),j)if(X={values:A(S),keys:W?re:A(_),entries:A(E)},U)for(Q in X)(w||V||!(Q in te))&&u(te,Q,X[Q]);else e({target:T,proto:!0,forced:w||V},X);return(!r||U)&&te[x]!==re&&u(te,x,re,{name:j}),p[T]=re,X},Px}var Mx,SA;function Kz(){return SA||(SA=1,Mx=function(e,t){return{value:e,done:t}}),Mx}var kx,EA;function Yz(){if(EA)return kx;EA=1;var e=Ka(),t=Bse(),r=Fl(),n=Xa(),i=Ii().f,o=Gz(),a=Kz(),s=af(),c=Wn(),d="Array Iterator",u=n.set,h=n.getterFor(d);kx=o(Array,"Array",function(v,y){u(this,{type:d,target:e(v),index:0,kind:y})},function(){var v=h(this),y=v.target,m=v.index++;if(!y||m>=y.length)return v.target=null,a(void 0,!0);switch(v.kind){case"keys":return a(m,!1);case"values":return a(y[m],!1)}return a([m,y[m]],!1)},"values");var p=r.Arguments=r.Array;if(t("keys"),t("values"),t("entries"),!s&&c&&p.name!=="values")try{i(p,"name",{value:"values"})}catch{}return kx}Yz();var _A={},Ax,OA;function Xz(){if(OA)return Ax;OA=1;var e=yt(),t=lf(),r=Lo(),n=qo(),i=e("".charAt),o=e("".charCodeAt),a=e("".slice),s=function(c){return function(d,u){var h=r(n(d)),p=t(u),v=h.length,y,m;return p<0||p>=v?c?"":void 0:(y=o(h,p),y<55296||y>56319||p+1===v||(m=o(h,p+1))<56320||m>57343?c?i(h,p):y:c?a(h,p,p+2):(y-55296<<10)+(m-56320)+65536)}};return Ax={codeAt:s(!1),charAt:s(!0)},Ax}var CA;function Use(){if(CA)return _A;CA=1;var e=Xz().charAt,t=Lo(),r=Xa(),n=Gz(),i=Kz(),o="String Iterator",a=r.set,s=r.getterFor(o);return n(String,"String",function(c){a(this,{type:o,string:t(c),index:0})},function(){var d=s(this),u=d.string,h=d.index,p;return h>=u.length?i(void 0,!0):(p=e(u,h),d.index+=p.length,i(p,!1))}),_A}Use();var IA={},RA={},Dx,NA;function Zz(){if(NA)return Dx;NA=1;var e=St();return Dx=!e(function(){return Object.isExtensible(Object.preventExtensions({}))}),Dx}var jx,TA;function Jz(){if(TA)return jx;TA=1;var e=zo();return jx=function(t,r,n){for(var i in r)e(t,i,r[i],n);return t},jx}var qx={exports:{}},zx={},Lx,PA;function Gse(){if(PA)return Lx;PA=1;var e=yt();return Lx=e([].slice),Lx}var MA;function Kse(){if(MA)return zx;MA=1;var e=ro(),t=Ka(),r=lE().f,n=Gse(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(a){try{return r(a)}catch{return n(i)}};return zx.f=function(s){return i&&e(s)==="Window"?o(s):r(t(s))},zx}var Bx,kA;function Yse(){if(kA)return Bx;kA=1;var e=St();return Bx=e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),Bx}var Fx,AA;function Xse(){if(AA)return Fx;AA=1;var e=St(),t=dr(),r=ro(),n=Yse(),i=Object.isExtensible,o=e(function(){});return Fx=o||n?function(s){return!t(s)||n&&r(s)==="ArrayBuffer"?!1:i?i(s):!0}:i,Fx}var DA;function uE(){if(DA)return qx.exports;DA=1;var e=no(),t=yt(),r=sf(),n=dr(),i=In(),o=Ii().f,a=lE(),s=Kse(),c=Xse(),d=rE(),u=Zz(),h=!1,p=d("meta"),v=0,y=function(S){o(S,p,{value:{objectID:"O"+v++,weakData:{}}})},m=function(S,E){if(!n(S))return typeof S=="symbol"?S:(typeof S=="string"?"S":"P")+S;if(!i(S,p)){if(!c(S))return"F";if(!E)return"E";y(S)}return S[p].objectID},g=function(S,E){if(!i(S,p)){if(!c(S))return!0;if(!E)return!1;y(S)}return S[p].weakData},w=function(S){return u&&h&&c(S)&&!i(S,p)&&y(S),S},x=function(){_.enable=function(){},h=!0;var S=a.f,E=t([].splice),I={};I[p]=1,S(I).length&&(a.f=function(N){for(var T=S(N),M=0,z=T.length;M<z;M++)if(T[M]===p){E(T,M,1);break}return T},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},_=qx.exports={enable:x,fastKey:m,getWeakData:g,onFreeze:w};return r[p]=!0,qx.exports}var $x,jA;function Zse(){if(jA)return $x;jA=1;var e=Pr(),t=Fl(),r=e("iterator"),n=Array.prototype;return $x=function(i){return i!==void 0&&(t.Array===i||n[r]===i)},$x}var Vx,qA;function Qz(){if(qA)return Vx;qA=1;var e=uf(),t=Ll(),r=ql(),n=Fl(),i=Pr(),o=i("iterator");return Vx=function(a){if(!r(a))return t(a,o)||t(a,"@@iterator")||n[e(a)]},Vx}var Hx,zA;function Jse(){if(zA)return Hx;zA=1;var e=Ur(),t=zl(),r=Rn(),n=JS(),i=Qz(),o=TypeError;return Hx=function(a,s){var c=arguments.length<2?i(a):s;if(t(c))return r(e(c,a));throw new o(n(a)+" is not iterable")},Hx}var Wx,LA;function Qse(){if(LA)return Wx;LA=1;var e=Ur(),t=Rn(),r=Ll();return Wx=function(n,i,o){var a,s;t(n);try{if(a=r(n,"return"),!a){if(i==="throw")throw o;return o}a=e(a,n)}catch(c){s=!0,a=c}if(i==="throw")throw o;if(s)throw a;return t(a),o},Wx}var Ux,BA;function eL(){if(BA)return Ux;BA=1;var e=$z(),t=Ur(),r=Rn(),n=JS(),i=Zse(),o=cf(),a=of(),s=Jse(),c=Qz(),d=Qse(),u=TypeError,h=function(v,y){this.stopped=v,this.result=y},p=h.prototype;return Ux=function(v,y,m){var g=m&&m.that,w=!!(m&&m.AS_ENTRIES),x=!!(m&&m.IS_RECORD),_=!!(m&&m.IS_ITERATOR),S=!!(m&&m.INTERRUPTED),E=e(y,g),I,N,T,M,z,j,W,U=function(K){return I&&d(I,"normal"),new h(!0,K)},A=function(K){return w?(r(K),S?E(K[0],K[1],U):E(K[0],K[1])):S?E(K,U):E(K)};if(x)I=v.iterator;else if(_)I=v;else{if(N=c(v),!N)throw new u(n(v)+" is not iterable");if(i(N)){for(T=0,M=o(v);M>T;T++)if(z=A(v[T]),z&&a(p,z))return z;return new h(!1)}I=s(v,N)}for(j=x?v.next:I.next;!(W=t(j,I)).done;){try{z=A(W.value)}catch(K){d(I,"throw",K)}if(typeof z=="object"&&z&&a(p,z))return z}return new h(!1)},Ux}var Gx,FA;function tL(){if(FA)return Gx;FA=1;var e=of(),t=TypeError;return Gx=function(r,n){if(e(n,r))return r;throw new t("Incorrect invocation")},Gx}var Kx,$A;function ele(){if($A)return Kx;$A=1;var e=Pr(),t=e("iterator"),r=!1;try{var n=0,i={next:function(){return{done:!!n++}},return:function(){r=!0}};i[t]=function(){return this},Array.from(i,function(){throw 2})}catch{}return Kx=function(o,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}}}},o(c)}catch{}return s},Kx}var Yx,VA;function tle(){if(VA)return Yx;VA=1;var e=er(),t=dr(),r=Uz();return Yx=function(n,i,o){var a,s;return r&&e(a=i.constructor)&&a!==o&&t(s=a.prototype)&&s!==o.prototype&&r(n,s),n},Yx}var Xx,HA;function rle(){if(HA)return Xx;HA=1;var e=no(),t=Gt(),r=yt(),n=Lz(),i=zo(),o=uE(),a=eL(),s=tL(),c=er(),d=ql(),u=dr(),h=St(),p=ele(),v=ff(),y=tle();return Xx=function(m,g,w){var x=m.indexOf("Map")!==-1,_=m.indexOf("Weak")!==-1,S=x?"set":"add",E=t[m],I=E&&E.prototype,N=E,T={},M=function(V){var te=r(I[V]);i(I,V,V==="add"?function(re){return te(this,re===0?0:re),this}:V==="delete"?function(G){return _&&!u(G)?!1:te(this,G===0?0:G)}:V==="get"?function(re){return _&&!u(re)?void 0:te(this,re===0?0:re)}:V==="has"?function(re){return _&&!u(re)?!1:te(this,re===0?0:re)}:function(re,P){return te(this,re===0?0:re,P),this})},z=n(m,!c(E)||!(_||I.forEach&&!h(function(){new E().entries().next()})));if(z)N=w.getConstructor(g,m,x,S),o.enable();else if(n(m,!0)){var j=new N,W=j[S](_?{}:-0,1)!==j,U=h(function(){j.has(1)}),A=p(function(V){new E(V)}),K=!_&&h(function(){for(var V=new E,te=5;te--;)V[S](te,te);return!V.has(-0)});A||(N=g(function(V,te){s(V,I);var G=y(new E,V,N);return d(te)||a(te,G[S],{that:G,AS_ENTRIES:x}),G}),N.prototype=I,I.constructor=N),(U||K)&&(M("delete"),M("has"),x&&M("get")),(K||W)&&M(S),_&&I.clear&&delete I.clear}return T[m]=N,e({global:!0,constructor:!0,forced:N!==E},T),v(N,m),_||w.setStrong(N,m,x),N},Xx}var Zx,WA;function nle(){if(WA)return Zx;WA=1;var e=yt(),t=Jz(),r=uE().getWeakData,n=tL(),i=Rn(),o=ql(),a=dr(),s=eL(),c=Vz(),d=In(),u=Xa(),h=u.set,p=u.getterFor,v=c.find,y=c.findIndex,m=e([].splice),g=0,w=function(S){return S.frozen||(S.frozen=new x)},x=function(){this.entries=[]},_=function(S,E){return v(S.entries,function(I){return I[0]===E})};return x.prototype={get:function(S){var E=_(this,S);if(E)return E[1]},has:function(S){return!!_(this,S)},set:function(S,E){var I=_(this,S);I?I[1]=E:this.entries.push([S,E])},delete:function(S){var E=y(this.entries,function(I){return I[0]===S});return~E&&m(this.entries,E,1),!!~E}},Zx={getConstructor:function(S,E,I,N){var T=S(function(W,U){n(W,M),h(W,{type:E,id:g++,frozen:null}),o(U)||s(U,W[N],{that:W,AS_ENTRIES:I})}),M=T.prototype,z=p(E),j=function(W,U,A){var K=z(W),V=r(i(U),!0);return V===!0?w(K).set(U,A):V[K.id]=A,W};return t(M,{delete:function(W){var U=z(this);if(!a(W))return!1;var A=r(W);return A===!0?w(U).delete(W):A&&d(A,U.id)&&delete A[U.id]},has:function(U){var A=z(this);if(!a(U))return!1;var K=r(U);return K===!0?w(A).has(U):K&&d(K,A.id)}}),t(M,I?{get:function(U){var A=z(this);if(a(U)){var K=r(U);if(K===!0)return w(A).get(U);if(K)return K[A.id]}},set:function(U,A){return j(this,U,A)}}:{add:function(U){return j(this,U,!0)}}),T}},Zx}var UA;function ile(){if(UA)return RA;UA=1;var e=Zz(),t=Gt(),r=yt(),n=Jz(),i=uE(),o=rle(),a=nle(),s=dr(),c=Xa().enforce,d=St(),u=Dz(),h=Object,p=Array.isArray,v=h.isExtensible,y=h.isFrozen,m=h.isSealed,g=h.freeze,w=h.seal,x=!t.ActiveXObject&&"ActiveXObject"in t,_,S=function(W){return function(){return W(this,arguments.length?arguments[0]:void 0)}},E=o("WeakMap",S,a),I=E.prototype,N=r(I.set),T=function(){return e&&d(function(){var W=g([]);return N(new E,W,1),!y(W)})};if(u)if(x){_=a.getConstructor(S,"WeakMap",!0),i.enable();var M=r(I.delete),z=r(I.has),j=r(I.get);n(I,{delete:function(W){if(s(W)&&!v(W)){var U=c(this);return U.frozen||(U.frozen=new _),M(this,W)||U.frozen.delete(W)}return M(this,W)},has:function(U){if(s(U)&&!v(U)){var A=c(this);return A.frozen||(A.frozen=new _),z(this,U)||A.frozen.has(U)}return z(this,U)},get:function(U){if(s(U)&&!v(U)){var A=c(this);return A.frozen||(A.frozen=new _),z(this,U)?j(this,U):A.frozen.get(U)}return j(this,U)},set:function(U,A){if(s(U)&&!v(U)){var K=c(this);K.frozen||(K.frozen=new _),z(this,U)?N(this,U,A):K.frozen.set(U,A)}else N(this,U,A);return this}})}else T()&&n(I,{set:function(U,A){var K;return p(U)&&(y(U)?K=g:m(U)&&(K=w)),N(this,U,A),K&&K(U),this}});return RA}var GA;function ole(){return GA||(GA=1,ile()),IA}ole();var KA={},Jx,YA;function ale(){return YA||(YA=1,Jx={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}),Jx}var Qx,XA;function sle(){if(XA)return Qx;XA=1;var e=nE(),t=e("span").classList,r=t&&t.constructor&&t.constructor.prototype;return Qx=r===Object.prototype?void 0:r,Qx}var ZA;function lle(){if(ZA)return KA;ZA=1;var e=Gt(),t=ale(),r=sle(),n=Yz(),i=Bl(),o=ff(),a=Pr(),s=a("iterator"),c=n.values,d=function(h,p){if(h){if(h[s]!==c)try{i(h,s,c)}catch{h[s]=c}if(o(h,p,!0),t[p]){for(var v in n)if(h[v]!==n[v])try{i(h,v,n[v])}catch{h[v]=n[v]}}}};for(var u in t)d(e[u]&&e[u].prototype,u);return d(r,"DOMTokenList"),KA}lle();var ew,JA;function cle(){if(JA)return ew;JA=1;var e="Expected a function",t=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,c=typeof jt=="object"&&jt&&jt.Object===Object&&jt,d=typeof self=="object"&&self&&self.Object===Object&&self,u=c||d||Function("return this")(),h=Object.prototype,p=h.toString,v=Math.max,y=Math.min,m=function(){return u.Date.now()};function g(I,N,T){var M,z,j,W,U,A,K=0,V=!1,te=!1,G=!0;if(typeof I!="function")throw new TypeError(e);N=E(N)||0,x(T)&&(V=!!T.leading,te="maxWait"in T,j=te?v(E(T.maxWait)||0,N):j,G="trailing"in T?!!T.trailing:G);function re(Y){var ie=M,ne=z;return M=z=void 0,K=Y,W=I.apply(ne,ie),W}function P(Y){return K=Y,U=setTimeout(Q,N),V?re(Y):W}function B(Y){var ie=Y-A,ne=Y-K,ve=N-ie;return te?y(ve,j-ne):ve}function X(Y){var ie=Y-A,ne=Y-K;return A===void 0||ie>=N||ie<0||te&&ne>=j}function Q(){var Y=m();if(X(Y))return D(Y);U=setTimeout(Q,B(Y))}function D(Y){return U=void 0,G&&M?re(Y):(M=z=void 0,W)}function $(){U!==void 0&&clearTimeout(U),K=0,M=A=z=U=void 0}function H(){return U===void 0?W:D(m())}function q(){var Y=m(),ie=X(Y);if(M=arguments,z=this,A=Y,ie){if(U===void 0)return P(A);if(te)return U=setTimeout(Q,N),re(A)}return U===void 0&&(U=setTimeout(Q,N)),W}return q.cancel=$,q.flush=H,q}function w(I,N,T){var M=!0,z=!0;if(typeof I!="function")throw new TypeError(e);return x(T)&&(M="leading"in T?!!T.leading:M,z="trailing"in T?!!T.trailing:z),g(I,N,{leading:M,maxWait:N,trailing:z})}function x(I){var N=typeof I;return!!I&&(N=="object"||N=="function")}function _(I){return!!I&&typeof I=="object"}function S(I){return typeof I=="symbol"||_(I)&&p.call(I)==r}function E(I){if(typeof I=="number")return I;if(S(I))return t;if(x(I)){var N=typeof I.valueOf=="function"?I.valueOf():I;I=x(N)?N+"":N}if(typeof I!="string")return I===0?I:+I;I=I.replace(n,"");var T=o.test(I);return T||a.test(I)?s(I.slice(2),T?2:8):i.test(I)?t:+I}return ew=w,ew}var ule=cle();const QA=eo(ule);var tw,eD;function dle(){if(eD)return tw;eD=1;var e="Expected a function",t=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,c=typeof jt=="object"&&jt&&jt.Object===Object&&jt,d=typeof self=="object"&&self&&self.Object===Object&&self,u=c||d||Function("return this")(),h=Object.prototype,p=h.toString,v=Math.max,y=Math.min,m=function(){return u.Date.now()};function g(E,I,N){var T,M,z,j,W,U,A=0,K=!1,V=!1,te=!0;if(typeof E!="function")throw new TypeError(e);I=S(I)||0,w(N)&&(K=!!N.leading,V="maxWait"in N,z=V?v(S(N.maxWait)||0,I):z,te="trailing"in N?!!N.trailing:te);function G(q){var Y=T,ie=M;return T=M=void 0,A=q,j=E.apply(ie,Y),j}function re(q){return A=q,W=setTimeout(X,I),K?G(q):j}function P(q){var Y=q-U,ie=q-A,ne=I-Y;return V?y(ne,z-ie):ne}function B(q){var Y=q-U,ie=q-A;return U===void 0||Y>=I||Y<0||V&&ie>=z}function X(){var q=m();if(B(q))return Q(q);W=setTimeout(X,P(q))}function Q(q){return W=void 0,te&&T?G(q):(T=M=void 0,j)}function D(){W!==void 0&&clearTimeout(W),A=0,T=U=M=W=void 0}function $(){return W===void 0?j:Q(m())}function H(){var q=m(),Y=B(q);if(T=arguments,M=this,U=q,Y){if(W===void 0)return re(U);if(V)return W=setTimeout(X,I),G(U)}return W===void 0&&(W=setTimeout(X,I)),j}return H.cancel=D,H.flush=$,H}function w(E){var I=typeof E;return!!E&&(I=="object"||I=="function")}function x(E){return!!E&&typeof E=="object"}function _(E){return typeof E=="symbol"||x(E)&&p.call(E)==r}function S(E){if(typeof E=="number")return E;if(_(E))return t;if(w(E)){var I=typeof E.valueOf=="function"?E.valueOf():E;E=w(I)?I+"":I}if(typeof E!="string")return E===0?E:+E;E=E.replace(n,"");var N=o.test(E);return N||a.test(E)?s(E.slice(2),N?2:8):i.test(E)?t:+E}return tw=g,tw}var fle=dle();const tD=eo(fle);var rw,rD;function hle(){if(rD)return rw;rD=1;var e="Expected a function",t="__lodash_hash_undefined__",r="[object Function]",n="[object GeneratorFunction]",i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=typeof jt=="object"&&jt&&jt.Object===Object&&jt,s=typeof self=="object"&&self&&self.Object===Object&&self,c=a||s||Function("return this")();function d(ue,de){return ue==null?void 0:ue[de]}function u(ue){var de=!1;if(ue!=null&&typeof ue.toString!="function")try{de=!!(ue+"")}catch{}return de}var h=Array.prototype,p=Function.prototype,v=Object.prototype,y=c["__core-js_shared__"],m=(function(){var ue=/[^.]+$/.exec(y&&y.keys&&y.keys.IE_PROTO||"");return ue?"Symbol(src)_1."+ue:""})(),g=p.toString,w=v.hasOwnProperty,x=v.toString,_=RegExp("^"+g.call(w).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=h.splice,E=Y(c,"Map"),I=Y(Object,"create");function N(ue){var de=-1,le=ue?ue.length:0;for(this.clear();++de<le;){var xe=ue[de];this.set(xe[0],xe[1])}}function T(){this.__data__=I?I(null):{}}function M(ue){return this.has(ue)&&delete this.__data__[ue]}function z(ue){var de=this.__data__;if(I){var le=de[ue];return le===t?void 0:le}return w.call(de,ue)?de[ue]:void 0}function j(ue){var de=this.__data__;return I?de[ue]!==void 0:w.call(de,ue)}function W(ue,de){var le=this.__data__;return le[ue]=I&&de===void 0?t:de,this}N.prototype.clear=T,N.prototype.delete=M,N.prototype.get=z,N.prototype.has=j,N.prototype.set=W;function U(ue){var de=-1,le=ue?ue.length:0;for(this.clear();++de<le;){var xe=ue[de];this.set(xe[0],xe[1])}}function A(){this.__data__=[]}function K(ue){var de=this.__data__,le=$(de,ue);if(le<0)return!1;var xe=de.length-1;return le==xe?de.pop():S.call(de,le,1),!0}function V(ue){var de=this.__data__,le=$(de,ue);return le<0?void 0:de[le][1]}function te(ue){return $(this.__data__,ue)>-1}function G(ue,de){var le=this.__data__,xe=$(le,ue);return xe<0?le.push([ue,de]):le[xe][1]=de,this}U.prototype.clear=A,U.prototype.delete=K,U.prototype.get=V,U.prototype.has=te,U.prototype.set=G;function re(ue){var de=-1,le=ue?ue.length:0;for(this.clear();++de<le;){var xe=ue[de];this.set(xe[0],xe[1])}}function P(){this.__data__={hash:new N,map:new(E||U),string:new N}}function B(ue){return q(this,ue).delete(ue)}function X(ue){return q(this,ue).get(ue)}function Q(ue){return q(this,ue).has(ue)}function D(ue,de){return q(this,ue).set(ue,de),this}re.prototype.clear=P,re.prototype.delete=B,re.prototype.get=X,re.prototype.has=Q,re.prototype.set=D;function $(ue,de){for(var le=ue.length;le--;)if(J(ue[le][0],de))return le;return-1}function H(ue){if(!he(ue)||ne(ue))return!1;var de=ae(ue)||u(ue)?_:o;return de.test(ve(ue))}function q(ue,de){var le=ue.__data__;return ie(de)?le[typeof de=="string"?"string":"hash"]:le.map}function Y(ue,de){var le=d(ue,de);return H(le)?le:void 0}function ie(ue){var de=typeof ue;return de=="string"||de=="number"||de=="symbol"||de=="boolean"?ue!=="__proto__":ue===null}function ne(ue){return!!m&&m in ue}function ve(ue){if(ue!=null){try{return g.call(ue)}catch{}try{return ue+""}catch{}}return""}function Z(ue,de){if(typeof ue!="function"||de&&typeof de!="function")throw new TypeError(e);var le=function(){var xe=arguments,Ee=de?de.apply(this,xe):xe[0],Ie=le.cache;if(Ie.has(Ee))return Ie.get(Ee);var Te=ue.apply(this,xe);return le.cache=Ie.set(Ee,Te),Te};return le.cache=new(Z.Cache||re),le}Z.Cache=re;function J(ue,de){return ue===de||ue!==ue&&de!==de}function ae(ue){var de=he(ue)?x.call(ue):"";return de==r||de==n}function he(ue){var de=typeof ue;return!!ue&&(de=="object"||de=="function")}return rw=Z,rw}var ple=hle();const vle=eo(ple);var Ro=[],gle=function(){return Ro.some(function(e){return e.activeTargets.length>0})},mle=function(){return Ro.some(function(e){return e.skippedTargets.length>0})},nD="ResizeObserver loop completed with undelivered notifications.",ble=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:nD}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=nD),window.dispatchEvent(e)},bl;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(bl||(bl={}));var No=function(e){return Object.freeze(e)},yle=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,No(this)}return e})(),rL=(function(){function e(t,r,n,i){return this.x=t,this.y=r,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,No(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,i=t.top,o=t.right,a=t.bottom,s=t.left,c=t.width,d=t.height;return{x:r,y:n,top:i,right:o,bottom:a,left:s,width:c,height:d}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),dE=function(e){return e instanceof SVGElement&&"getBBox"in e},nL=function(e){if(dE(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},iD=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)},xle=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},il=typeof window<"u"?window:{},lu=new WeakMap,oD=/auto|scroll/,wle=/^tb|vertical/,Sle=/msie|trident/i.test(il.navigator&&il.navigator.userAgent),Qn=function(e){return parseFloat(e||"0")},Ca=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new yle((r?t:e)||0,(r?e:t)||0)},aD=No({devicePixelContentBoxSize:Ca(),borderBoxSize:Ca(),contentBoxSize:Ca(),contentRect:new rL(0,0,0,0)}),iL=function(e,t){if(t===void 0&&(t=!1),lu.has(e)&&!t)return lu.get(e);if(nL(e))return lu.set(e,aD),aD;var r=getComputedStyle(e),n=dE(e)&&e.ownerSVGElement&&e.getBBox(),i=!Sle&&r.boxSizing==="border-box",o=wle.test(r.writingMode||""),a=!n&&oD.test(r.overflowY||""),s=!n&&oD.test(r.overflowX||""),c=n?0:Qn(r.paddingTop),d=n?0:Qn(r.paddingRight),u=n?0:Qn(r.paddingBottom),h=n?0:Qn(r.paddingLeft),p=n?0:Qn(r.borderTopWidth),v=n?0:Qn(r.borderRightWidth),y=n?0:Qn(r.borderBottomWidth),m=n?0:Qn(r.borderLeftWidth),g=h+d,w=c+u,x=m+v,_=p+y,S=s?e.offsetHeight-_-e.clientHeight:0,E=a?e.offsetWidth-x-e.clientWidth:0,I=i?g+x:0,N=i?w+_:0,T=n?n.width:Qn(r.width)-I-E,M=n?n.height:Qn(r.height)-N-S,z=T+g+E+x,j=M+w+S+_,W=No({devicePixelContentBoxSize:Ca(Math.round(T*devicePixelRatio),Math.round(M*devicePixelRatio),o),borderBoxSize:Ca(z,j,o),contentBoxSize:Ca(T,M,o),contentRect:new rL(h,c,T,M)});return lu.set(e,W),W},oL=function(e,t,r){var n=iL(e,r),i=n.borderBoxSize,o=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case bl.DEVICE_PIXEL_CONTENT_BOX:return a;case bl.BORDER_BOX:return i;default:return o}},Ele=(function(){function e(t){var r=iL(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=No([r.borderBoxSize]),this.contentBoxSize=No([r.contentBoxSize]),this.devicePixelContentBoxSize=No([r.devicePixelContentBoxSize])}return e})(),aL=function(e){if(nL(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},_le=function(){var e=1/0,t=[];Ro.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(d){var u=new Ele(d.target),h=aL(d.target);s.push(u),d.lastReportedSize=oL(d.target,d.observedBox),h<e&&(e=h)}),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 i=n[r];i()}return e},sD=function(e){Ro.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(aL(i.target)>e?r.activeTargets.push(i):r.skippedTargets.push(i))})})},Ole=function(){var e=0;for(sD(e);gle();)e=_le(),sD(e);return mle()&&ble(),e>0},nw,sL=[],Cle=function(){return sL.splice(0).forEach(function(e){return e()})},Ile=function(e){if(!nw){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return Cle()}).observe(r,n),nw=function(){r.textContent="".concat(t?t--:t++)}}sL.push(e),nw()},Rle=function(e){Ile(function(){requestAnimationFrame(e)})},Ru=0,Nle=function(){return!!Ru},Tle=250,Ple={attributes:!0,characterData:!0,childList:!0,subtree:!0},lD=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],cD=function(e){return e===void 0&&(e=0),Date.now()+e},iw=!1,Mle=(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=Tle),!iw){iw=!0;var n=cD(t);Rle(function(){var i=!1;try{i=Ole()}finally{if(iw=!1,t=n-cD(),!Nle())return;i?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,Ple)};document.body?r():il.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),lD.forEach(function(r){return il.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),lD.forEach(function(r){return il.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),n1=new Mle,uD=function(e){!Ru&&e>0&&n1.start(),Ru+=e,!Ru&&n1.stop()},kle=function(e){return!dE(e)&&!xle(e)&&getComputedStyle(e).display==="inline"},Ale=(function(){function e(t,r){this.target=t,this.observedBox=r||bl.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=oL(this.target,this.observedBox,!0);return kle(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),Dle=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),cu=new WeakMap,dD=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},uu=(function(){function e(){}return e.connect=function(t,r){var n=new Dle(t,r);cu.set(t,n)},e.observe=function(t,r,n){var i=cu.get(t),o=i.observationTargets.length===0;dD(i.observationTargets,r)<0&&(o&&Ro.push(i),i.observationTargets.push(new Ale(r,n&&n.box)),uD(1),n1.schedule())},e.unobserve=function(t,r){var n=cu.get(t),i=dD(n.observationTargets,r),o=n.observationTargets.length===1;i>=0&&(o&&Ro.splice(Ro.indexOf(n),1),n.observationTargets.splice(i,1),uD(-1))},e.disconnect=function(t){var r=this,n=cu.get(t);n.observationTargets.slice().forEach(function(i){return r.unobserve(t,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),jle=(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.");uu.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(!iD(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");uu.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(!iD(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");uu.unobserve(this,t)},e.prototype.disconnect=function(){uu.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),ow,fD;function qle(){if(fD)return ow;fD=1;var e=!!(typeof window<"u"&&window.document&&window.document.createElement);return ow=e,ow}var zle=qle();const lL=eo(zle);var hD={},aw,pD;function Lle(){if(pD)return aw;pD=1;var e=zl(),t=Ya(),r=rf(),n=cf(),i=TypeError,o="Reduce of empty array with no initial value",a=function(s){return function(c,d,u,h){var p=t(c),v=r(p),y=n(p);if(e(d),y===0&&u<2)throw new i(o);var m=s?y-1:0,g=s?-1:1;if(u<2)for(;;){if(m in v){h=v[m],m+=g;break}if(m+=g,s?m<0:y<=m)throw new i(o)}for(;s?m>=0:y>m;m+=g)m in v&&(h=d(h,v[m],m,p));return h}};return aw={left:a(!1),right:a(!0)},aw}var sw,vD;function Ble(){if(vD)return sw;vD=1;var e=St();return sw=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})},sw}var lw,gD;function Fle(){if(gD)return lw;gD=1;var e=Gt(),t=Cz(),r=ro(),n=function(i){return t.slice(0,i.length)===i};return lw=(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"})(),lw}var cw,mD;function $le(){if(mD)return cw;mD=1;var e=Fle();return cw=e==="NODE",cw}var bD;function Vle(){if(bD)return hD;bD=1;var e=no(),t=Lle().left,r=Ble(),n=ZS(),i=$le(),o=!i&&n>79&&n<83,a=o||!r("reduce");return e({target:"Array",proto:!0,forced:a},{reduce:function(c){var d=arguments.length;return t(this,c,d,d>1?arguments[1]:void 0)}}),hD}Vle();var yD={},uw,xD;function cL(){if(xD)return uw;xD=1;var e=Rn();return uw=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},uw}var dw,wD;function Hle(){if(wD)return dw;wD=1;var e=St(),t=Gt(),r=t.RegExp,n=e(function(){var a=r("a","y");return a.lastIndex=2,a.exec("abcd")!==null}),i=n||e(function(){return!r("a","y").sticky}),o=n||e(function(){var a=r("^r","gy");return a.lastIndex=2,a.exec("str")!==null});return dw={BROKEN_CARET:o,MISSED_STICKY:i,UNSUPPORTED_Y:n},dw}var fw,SD;function Wle(){if(SD)return fw;SD=1;var e=St(),t=Gt(),r=t.RegExp;return fw=e(function(){var n=r(".","s");return!(n.dotAll&&n.test(`
|
|
115
|
+
`)&&n.flags==="s")}),fw}var hw,ED;function Ule(){if(ED)return hw;ED=1;var e=St(),t=Gt(),r=t.RegExp;return hw=e(function(){var n=r("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"}),hw}var pw,_D;function fE(){if(_D)return pw;_D=1;var e=Ur(),t=yt(),r=Lo(),n=cL(),i=Hle(),o=tE(),a=df(),s=Xa().get,c=Wle(),d=Ule(),u=o("native-string-replace",String.prototype.replace),h=RegExp.prototype.exec,p=h,v=t("".charAt),y=t("".indexOf),m=t("".replace),g=t("".slice),w=(function(){var E=/a/,I=/b*/g;return e(h,E,"a"),e(h,I,"a"),E.lastIndex!==0||I.lastIndex!==0})(),x=i.BROKEN_CARET,_=/()??/.exec("")[1]!==void 0,S=w||_||x||c||d;return S&&(p=function(I){var N=this,T=s(N),M=r(I),z=T.raw,j,W,U,A,K,V,te;if(z)return z.lastIndex=N.lastIndex,j=e(p,z,M),N.lastIndex=z.lastIndex,j;var G=T.groups,re=x&&N.sticky,P=e(n,N),B=N.source,X=0,Q=M;if(re&&(P=m(P,"y",""),y(P,"g")===-1&&(P+="g"),Q=g(M,N.lastIndex),N.lastIndex>0&&(!N.multiline||N.multiline&&v(M,N.lastIndex-1)!==`
|
|
116
|
+
`)&&(B="(?: "+B+")",Q=" "+Q,X++),W=new RegExp("^(?:"+B+")",P)),_&&(W=new RegExp("^"+B+"$(?!\\s)",P)),w&&(U=N.lastIndex),A=e(h,re?W:N,Q),re?A?(A.input=g(A.input,X),A[0]=g(A[0],X),A.index=N.lastIndex,N.lastIndex+=A[0].length):N.lastIndex=0:w&&A&&(N.lastIndex=N.global?A.index+A[0].length:U),_&&A&&A.length>1&&e(u,A[0],W,function(){for(K=1;K<arguments.length-2;K++)arguments[K]===void 0&&(A[K]=void 0)}),A&&G)for(A.groups=V=a(null),K=0;K<G.length;K++)te=G[K],V[te[0]]=A[te[1]];return A}),pw=p,pw}var OD;function uL(){if(OD)return yD;OD=1;var e=no(),t=fE();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),yD}uL();var CD={},vw,ID;function dL(){if(ID)return vw;ID=1,uL();var e=Ur(),t=zo(),r=fE(),n=St(),i=Pr(),o=Bl(),a=i("species"),s=RegExp.prototype;return vw=function(c,d,u,h){var p=i(c),v=!n(function(){var w={};return w[p]=function(){return 7},""[c](w)!==7}),y=v&&!n(function(){var w=!1,x=/a/;return c==="split"&&(x={},x.constructor={},x.constructor[a]=function(){return x},x.flags="",x[p]=/./[p]),x.exec=function(){return w=!0,null},x[p](""),!w});if(!v||!y||u){var m=/./[p],g=d(p,""[c],function(w,x,_,S,E){var I=x.exec;return I===r||I===s.exec?v&&!E?{done:!0,value:e(m,x,_,S)}:{done:!0,value:e(w,_,x,S)}:{done:!1}});t(String.prototype,c,g[0]),t(s,p,g[1])}h&&o(s[p],"sham",!0)},vw}var gw,RD;function fL(){if(RD)return gw;RD=1;var e=Xz().charAt;return gw=function(t,r,n){return r+(n?e(t,r).length:1)},gw}var mw,ND;function Gle(){if(ND)return mw;ND=1;var e=Gt(),t=St(),r=e.RegExp,n=!t(function(){var i=!0;try{r(".","d")}catch{i=!1}var o={},a="",s=i?"dgimsy":"gimsy",c=function(p,v){Object.defineProperty(o,p,{get:function(){return a+=v,!0}})},d={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};i&&(d.hasIndices="d");for(var u in d)c(u,d[u]);var h=Object.getOwnPropertyDescriptor(r.prototype,"flags").get.call(o);return h!==s||a!==s});return mw={correct:n},mw}var bw,TD;function hL(){if(TD)return bw;TD=1;var e=Ur(),t=In(),r=of(),n=Gle(),i=cL(),o=RegExp.prototype;return bw=n.correct?function(a){return a.flags}:function(a){return!n.correct&&r(o,a)&&!t(a,"flags")?e(i,a):a.flags},bw}var yw,PD;function pL(){if(PD)return yw;PD=1;var e=Ur(),t=Rn(),r=er(),n=ro(),i=fE(),o=TypeError;return yw=function(a,s){var c=a.exec;if(r(c)){var d=e(c,a,s);return d!==null&&t(d),d}if(n(a)==="RegExp")return e(i,a,s);throw new o("RegExp#exec called on incompatible receiver")},yw}var MD;function Kle(){if(MD)return CD;MD=1;var e=Ur(),t=yt(),r=dL(),n=Rn(),i=dr(),o=aE(),a=Lo(),s=qo(),c=Ll(),d=fL(),u=hL(),h=pL(),p=t("".indexOf);return r("match",function(v,y,m){return[function(w){var x=s(this),_=i(w)?c(w,v):void 0;return _?e(_,w,x):new RegExp(w)[v](a(x))},function(g){var w=n(this),x=a(g),_=m(y,w,x);if(_.done)return _.value;var S=a(u(w));if(p(S,"g")===-1)return h(w,x);var E=p(S,"u")!==-1;w.lastIndex=0;for(var I=[],N=0,T;(T=h(w,x))!==null;){var M=a(T[0]);I[N]=M,M===""&&(w.lastIndex=d(x,o(w.lastIndex),E)),N++}return N===0?null:I}]}),CD}Kle();var kD={},xw,AD;function Yle(){if(AD)return xw;AD=1;var e=jz(),t=Ii();return xw=function(r,n,i){return i.get&&e(i.get,n,{getter:!0}),i.set&&e(i.set,n,{setter:!0}),t.f(r,n,i)},xw}var DD;function Xle(){if(DD)return kD;DD=1;var e=Wn(),t=iE().EXISTS,r=yt(),n=Yle(),i=Function.prototype,o=r(i.toString),a=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,s=r(a.exec),c="name";return e&&!t&&n(i,c,{configurable:!0,get:function(){try{return s(a,o(this))[1]}catch{return""}}}),kD}Xle();var jD={},ww,qD;function Zle(){if(qD)return ww;qD=1;var e=tf(),t=Function.prototype,r=t.apply,n=t.call;return ww=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),ww}var Sw,zD;function Jle(){if(zD)return Sw;zD=1;var e=yt(),t=Ya(),r=Math.floor,n=e("".charAt),i=e("".replace),o=e("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;return Sw=function(c,d,u,h,p,v){var y=u+c.length,m=h.length,g=s;return p!==void 0&&(p=t(p),g=a),i(v,g,function(w,x){var _;switch(n(x,0)){case"$":return"$";case"&":return c;case"`":return o(d,0,u);case"'":return o(d,y);case"<":_=p[o(x,1,-1)];break;default:var S=+x;if(S===0)return w;if(S>m){var E=r(S/10);return E===0?w:E<=m?h[E-1]===void 0?n(x,1):h[E-1]+n(x,1):w}_=h[S-1]}return _===void 0?"":_})},Sw}var LD;function Qle(){if(LD)return jD;LD=1;var e=Zle(),t=Ur(),r=yt(),n=dL(),i=St(),o=Rn(),a=er(),s=dr(),c=lf(),d=aE(),u=Lo(),h=qo(),p=fL(),v=Ll(),y=Jle(),m=hL(),g=pL(),w=Pr(),x=w("replace"),_=Math.max,S=Math.min,E=r([].concat),I=r([].push),N=r("".indexOf),T=r("".slice),M=function(U){return U===void 0?U:String(U)},z=(function(){return"a".replace(/./,"$0")==="$0"})(),j=(function(){return/./[x]?/./[x]("a","$0")==="":!1})(),W=!i(function(){var U=/./;return U.exec=function(){var A=[];return A.groups={a:"7"},A},"".replace(U,"$<a>")!=="7"});return n("replace",function(U,A,K){var V=j?"$":"$0";return[function(G,re){var P=h(this),B=s(G)?v(G,x):void 0;return B?t(B,G,P,re):t(A,u(P),G,re)},function(te,G){var re=o(this),P=u(te);if(typeof G=="string"&&N(G,V)===-1&&N(G,"$<")===-1){var B=K(A,re,P,G);if(B.done)return B.value}var X=a(G);X||(G=u(G));var Q=u(m(re)),D=N(Q,"g")!==-1,$;D&&($=N(Q,"u")!==-1,re.lastIndex=0);for(var H=[],q;q=g(re,P),!(q===null||(I(H,q),!D));){var Y=u(q[0]);Y===""&&(re.lastIndex=p(P,d(re.lastIndex),$))}for(var ie="",ne=0,ve=0;ve<H.length;ve++){q=H[ve];for(var Z=u(q[0]),J=_(S(c(q.index),P.length),0),ae=[],he,ue=1;ue<q.length;ue++)I(ae,M(q[ue]));var de=q.groups;if(X){var le=E([Z],ae,J,P);de!==void 0&&I(le,de),he=u(e(G,void 0,le))}else he=y(Z,P,J,ae,de,G);J>=ne&&(ie+=T(P,ne,J)+he,ne=J+Z.length)}return ie+T(P,ne)}]},!W||!z||j),jD}Qle();function Wi(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function Nu(e){return!e||!e.ownerDocument?document:e.ownerDocument}var ma=null,BD=null;lL&&window.addEventListener("resize",function(){BD!==window.devicePixelRatio&&(BD=window.devicePixelRatio,ma=null)});function FD(e){if(ma===null){var t=Nu(e);if(typeof t>"u")return ma=0,ma;var r=t.body,n=t.createElement("div");n.classList.add("simplebar-hide-scrollbar"),r.appendChild(n);var i=n.getBoundingClientRect().right;r.removeChild(n),ma=i}return ma}var ud=(function(){function e(r,n){var i=this;this.onScroll=function(){var o=Wi(i.el);i.scrollXTicking||(o.requestAnimationFrame(i.scrollX),i.scrollXTicking=!0),i.scrollYTicking||(o.requestAnimationFrame(i.scrollY),i.scrollYTicking=!0)},this.scrollX=function(){i.axis.x.isOverflowing&&(i.showScrollbar("x"),i.positionScrollbar("x")),i.scrollXTicking=!1},this.scrollY=function(){i.axis.y.isOverflowing&&(i.showScrollbar("y"),i.positionScrollbar("y")),i.scrollYTicking=!1},this.onMouseEnter=function(){i.showScrollbar("x"),i.showScrollbar("y")},this.onMouseMove=function(o){i.mouseX=o.clientX,i.mouseY=o.clientY,(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseMoveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseMoveForAxis("y")},this.onMouseLeave=function(){i.onMouseMove.cancel(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseLeaveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseLeaveForAxis("y"),i.mouseX=-1,i.mouseY=-1},this.onWindowResize=function(){i.scrollbarWidth=i.getScrollbarWidth(),i.hideNativeScrollbar()},this.hideScrollbars=function(){i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.track.rect)||(i.axis.y.scrollbar.el.classList.remove(i.classNames.visible),i.axis.y.isVisible=!1),i.isWithinBounds(i.axis.x.track.rect)||(i.axis.x.scrollbar.el.classList.remove(i.classNames.visible),i.axis.x.isVisible=!1)},this.onPointerEvent=function(o){var a,s;i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&(a=i.isWithinBounds(i.axis.x.track.rect)),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&(s=i.isWithinBounds(i.axis.y.track.rect)),(a||s)&&(o.preventDefault(),o.stopPropagation(),o.type==="mousedown"&&(a&&(i.axis.x.scrollbar.rect=i.axis.x.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.x.scrollbar.rect)?i.onDragStart(o,"x"):i.onTrackClick(o,"x")),s&&(i.axis.y.scrollbar.rect=i.axis.y.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.scrollbar.rect)?i.onDragStart(o,"y"):i.onTrackClick(o,"y"))))},this.drag=function(o){var a,s=i.axis[i.draggedAxis].track,c=s.rect[i.axis[i.draggedAxis].sizeAttr],d=i.axis[i.draggedAxis].scrollbar,u=i.contentWrapperEl[i.axis[i.draggedAxis].scrollSizeAttr],h=parseInt(i.elStyles[i.axis[i.draggedAxis].sizeAttr],10);o.preventDefault(),o.stopPropagation(),i.draggedAxis==="y"?a=o.pageY:a=o.pageX;var p=a-s.rect[i.axis[i.draggedAxis].offsetAttr]-i.axis[i.draggedAxis].dragOffset,v=p/(c-d.size),y=v*(u-h);i.draggedAxis==="x"&&(y=i.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?y-(c+d.size):y,y=i.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-y:y),i.contentWrapperEl[i.axis[i.draggedAxis].scrollOffsetAttr]=y},this.onEndDrag=function(o){var a=Nu(i.el),s=Wi(i.el);o.preventDefault(),o.stopPropagation(),i.el.classList.remove(i.classNames.dragging),a.removeEventListener("mousemove",i.drag,!0),a.removeEventListener("mouseup",i.onEndDrag,!0),i.removePreventClickId=s.setTimeout(function(){a.removeEventListener("click",i.preventClick,!0),a.removeEventListener("dblclick",i.preventClick,!0),i.removePreventClickId=null})},this.preventClick=function(o){o.preventDefault(),o.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=QA(this.recalculate.bind(this),64),this.onMouseMove=QA(this.onMouseMove.bind(this),64),this.hideScrollbars=tD(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=tD(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=vle(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 i=n.firstElementChild;document.body.appendChild(i);var o=i.firstElementChild;i.scrollLeft=0;var a=e.getOffset(i),s=e.getOffset(o);i.scrollLeft=999;var c=e.getOffset(o);return{isRtlScrollingInverted:a.left!==s.left&&s.left-c.left!==0,isRtlScrollbarInverted:a.left!==s.left}},e.getOffset=function(n){var i=n.getBoundingClientRect(),o=Nu(n),a=Wi(n);return{top:i.top+(a.pageYOffset||o.documentElement.scrollTop),left:i.left+(a.pageXOffset||o.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),lL&&(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 i=document.createElement("div"),o=document.createElement("div");i.classList.add(this.classNames.track),o.classList.add(this.classNames.scrollbar),i.appendChild(o),this.axis.x.track.el=i.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=i.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,i=Wi(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),i.addEventListener("resize",this.onWindowResize);var o=!1,a=null,s=i.ResizeObserver||jle;this.resizeObserver=new s(function(){!o||a!==null||(a=i.requestAnimationFrame(function(){n.recalculate(),a=null}))}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),i.requestAnimationFrame(function(){o=!0}),this.mutationObserver=new i.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var n=Wi(this.el);this.elStyles=n.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var i=this.heightAutoObserverEl.offsetHeight<=1,o=this.heightAutoObserverEl.offsetWidth<=1,a=this.contentEl.offsetWidth,s=this.contentWrapperEl.offsetWidth,c=this.elStyles.overflowX,d=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 u=this.contentEl.scrollHeight,h=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=i?"auto":"100%",this.placeholderEl.style.width=o?a+"px":"auto",this.placeholderEl.style.height=u+"px";var p=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=h>a,this.axis.y.isOverflowing=u>p,this.axis.x.isOverflowing=c==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=d==="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&&h>s-y,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&u>p-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 i=this.contentEl[this.axis[n].scrollSizeAttr],o=this.axis[n].track.el[this.axis[n].offsetSizeAttr],a,s=o/i;return a=Math.max(~~(s*o),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 i=this.contentWrapperEl[this.axis[n].scrollSizeAttr],o=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 d=c/(i-a),u=~~((o-s.size)*d);u=n==="x"&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u+(o-s.size):u,s.el.style.transform=n==="x"?"translate3d("+u+"px, 0, 0)":"translate3d(0, "+u+"px, 0)"}},t.toggleTrackVisibility=function(n){n===void 0&&(n="y");var i=this.axis[n].track.el,o=this.axis[n].scrollbar.el;this.axis[n].isOverflowing||this.axis[n].forceVisible?(i.style.visibility="visible",this.contentWrapperEl.style[this.axis[n].overflowAttr]="scroll"):(i.style.visibility="hidden",this.contentWrapperEl.style[this.axis[n].overflowAttr]="hidden"),this.axis[n].isOverflowing?o.style.display="block":o.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 i=this.isWithinBounds(this.axis[n].scrollbar.rect);i?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 i=this.axis[n].scrollbar.el;this.axis[n].isVisible||(i.classList.add(this.classNames.visible),this.axis[n].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(n,i){i===void 0&&(i="y");var o=Nu(this.el),a=Wi(this.el),s=this.axis[i].scrollbar,c=i==="y"?n.pageY:n.pageX;this.axis[i].dragOffset=c-s.rect[this.axis[i].offsetAttr],this.draggedAxis=i,this.el.classList.add(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)):(a.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(n,i){var o=this;if(i===void 0&&(i="y"),!!this.options.clickOnTrack){var a=Wi(this.el);this.axis[i].scrollbar.rect=this.axis[i].scrollbar.el.getBoundingClientRect();var s=this.axis[i].scrollbar,c=s.rect[this.axis[i].offsetAttr],d=parseInt(this.elStyles[this.axis[i].sizeAttr],10),u=this.contentWrapperEl[this.axis[i].scrollOffsetAttr],h=i==="y"?this.mouseY-c:this.mouseX-c,p=h<0?-1:1,v=p===-1?u-d:u+d,y=function m(){if(p===-1){if(u>v){var g;u-=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((g={},g[o.axis[i].offsetAttr]=u,g)),a.requestAnimationFrame(m)}}else if(u<v){var w;u+=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((w={},w[o.axis[i].offsetAttr]=u,w)),a.requestAnimationFrame(m)}};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:FD(this.el)}catch{return FD(this.el)}},t.removeListeners=function(){var n=this,i=Wi(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(function(o){n.el.removeEventListener(o,n.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(function(o){n.el.removeEventListener(o,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),i.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,i){var o=n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector;return Array.prototype.filter.call(n.children,function(a){return o.call(a,i)})[0]},e})();ud.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};ud.instances=new WeakMap;function $D(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function du(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$D(Object(r),!0).forEach(function(n){ece(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$D(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ece(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dd(){return dd=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},dd.apply(this,arguments)}function tce(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function rce(e,t){if(e==null)return{};var r=tce(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var nce=["children","scrollableNodeProps","tag"],ice=function(t){var r=Array.prototype.reduce.call(t,function(n,i){var o=i.name.match(/data-simplebar-(.+)/);if(o){var a=o[1].replace(/\W+(.)/g,function(s,c){return c.toUpperCase()});switch(i.value){case"true":n[a]=!0;break;case"false":n[a]=!1;break;case void 0:n[a]=!0;break;default:n[a]=i.value}}return n},{});return r},hf=C.forwardRef(function(e,t){var r=e.children,n=e.scrollableNodeProps,i=n===void 0?{}:n,o=e.tag,a=o===void 0?"div":o,s=rce(e,nce),c=a,d,u=C.useRef(),h=C.useRef(),p=C.useRef(),v={},y={},m=[];return Object.keys(s).forEach(function(g){Object.prototype.hasOwnProperty.call(ud.defaultOptions,g)?v[g]=s[g]:g.match(/data-simplebar-(.+)/)&&g!=="data-simplebar-direction"?m.push({name:g,value:s[g]}):y[g]=s[g]}),m.length&&console.warn(`simplebar-react: this way of passing options is deprecated. Pass it like normal props instead:
|
|
117
117
|
'data-simplebar-auto-hide="false"' —> 'autoHide="false"'
|
|
118
|
-
`),C.useEffect(function(){return d=i.ref||d,h.current&&(u=new ud(h.current,du(du(du(du({},ice(m)),v),d&&{scrollableNode:d.current}),p.current&&{contentNode:p.current})),typeof t=="function"?t(u):t&&(t.current=u)),function(){u.unMount(),u=null,typeof t=="function"&&t(null)}},[]),C.createElement(c,dd({ref:h,"data-simplebar":!0},y),C.createElement("div",{className:"simplebar-wrapper"},C.createElement("div",{className:"simplebar-height-auto-observer-wrapper"},C.createElement("div",{className:"simplebar-height-auto-observer"})),C.createElement("div",{className:"simplebar-mask"},C.createElement("div",{className:"simplebar-offset"},typeof r=="function"?r({scrollableNodeRef:d,contentNodeRef:p}):C.createElement("div",dd({},i,{className:"simplebar-content-wrapper".concat(i.className?" ".concat(i.className):"")}),C.createElement("div",{className:"simplebar-content"},r)))),C.createElement("div",{className:"simplebar-placeholder"})),C.createElement("div",{className:"simplebar-track simplebar-horizontal"},C.createElement("div",{className:"simplebar-scrollbar"})),C.createElement("div",{className:"simplebar-track simplebar-vertical"},C.createElement("div",{className:"simplebar-scrollbar"})))});hf.displayName="SimpleBar";hf.propTypes={children:Fs.oneOfType([Fs.node,Fs.func]),scrollableNodeProps:Fs.object,tag:Fs.string};const vL=e=>{switch(e){case pe.EPermissionType.DATACLASS:return O.jsx(Pu,{className:"h-6 w-6"});case pe.EPermissionType.SINGLETON:return O.jsx(fj,{className:"h-6 w-6"});case pe.EPermissionType.DATASTORE:return O.jsx(lj,{className:"h-6 w-6"});case pe.EPermissionType.ATTRIBUTE:return O.jsx(hj,{className:"h-6 w-6"});case pe.EPermissionType.METHOD:return O.jsx(tj,{className:"h-6 w-6"});case pe.EPermissionType.SINGLETON_METHOD:return O.jsx(sj,{className:"h-6 w-6"});case pe.ESubPermissionType.ENTITY_SEL_METHOD:return O.jsx(aj,{className:"h-6 w-6"});case pe.ESubPermissionType.ENTITY_METHOD:return O.jsx(oj,{className:"h-6 w-6"});case pe.ESubPermissionType.DS_METHOD:return O.jsx(ij,{className:"h-6 w-6"});case pe.ESubPermissionType.DATACLASS_METHOD:return O.jsx(nj,{className:"h-6 w-6"});default:return O.jsx(Pu,{className:"h-6 w-6"})}},VD=({children:e})=>O.jsx("div",{className:"h-full w-full",children:O.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center",children:O.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-4 py-4 text-inactive-text",children:[O.jsx(on,{className:"h-10 w-10"}),O.jsx("div",{className:"text-center text-sm",children:e})]})})}),fa=({permissions:e,label:t,onToggle:r,onSelect:n,promoted:i,privileges:o,exists:a,optimisticChecked:s})=>{const c=e.find(d=>d.name===t);if(!c)return null;const u=s!==void 0?s:c.checked;return O.jsxs("div",{className:"relative mx-auto flex w-fit items-center",children:[O.jsx(ir,{value:u||c.from.length===0||t==="promote"?u:null,onChange:()=>r&&r(c),isInvalid:a===!1}),O.jsxs("div",{className:"absolute left-full translate-x-1/4 inset-y-0 flex cursor-pointer items-center gap-x-1",children:[t!=="promote"&&(c.checked&&(c.info||c.from.length>0)||!c.checked&&c.from.length>0)&&O.jsx(O.Fragment,{children:O.jsx(Lr,{container:Br(),delay:100,label:O.jsxs("div",{className:"max-w-xs h-fit flex flex-col gap-y-3 p-1.5 text-sm font-semibold",children:[c.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(wi,{className:"mr-2 mt-0.5 h-4 w-4 shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:c.from.map(d=>O.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(o[d].id),children:o[d].privilege}))})]})]}):null,c.info&&O.jsxs("div",{className:"flex items-start",children:[O.jsx(Ew,{className:"mr-2 mt-0.5 h-4 w-4 shrink-0"})," ",O.jsx("span",{className:"flex-1 min-w-0 wrap-break-word whitespace-normal text-left",children:c.info})]})]}),children:O.jsx(on,{className:"h-4 w-4 "})})}),(c.checked||c.from.length>0)&&["execute"].includes(t)&&!!(i!=null&&i.length)&&O.jsx(Lr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:O.jsxs("div",{className:"flex items-start text-s",children:[O.jsx(Ew,{className:"mr-2 mt-0.5 h-4 w-4 shrink-0"}),O.jsxs("p",{children:[O.jsx("span",{className:"mr-1",children:"Function is promoted with: "}),i==null?void 0:i.map(d=>O.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(o[d].id),children:o[d].privilege}))]})]})}),children:O.jsx(xV,{className:"h-3 w-3 "})})]})]})},oce=({privilegeId:e,privileges:t})=>{const r=Tr(),n=r.getCatalogMethods(),i=r.getDataclasses(),o=r.getSingletons(),[a,s]=C.useState([]),[c,u]=C.useState("");C.useEffect(()=>{u("")},[e]),C.useEffect(()=>{const p=pe.getInheritedResources(e,t).map(({resource:y,type:m,subType:g})=>({applyTo:y,type:m,subType:g})),v=US(c.toLowerCase(),n,Object.values(i),Object.values(o));s(v.filter(({applyTo:y,type:m,subType:g})=>!Xi.find(p,{applyTo:y,type:m,subType:g})))},[c,e,t,n,i,o]);const[d,h]=C.useState(!1);return O.jsx(Kh.Root,{className:"w-56",onInputChange:p=>u(p||""),onOpenChange:h,isOpen:d,isSearchable:!0,options:a,getOptionLabel:p=>p?p.applyTo:"",getOptionValue:p=>p?p.applyTo:"",value:null,clearSearchOnSelect:!0,closeMenuOnSelect:!1,onChange:p=>{if(!p)return;const v=pe.addPermission(e,p,t);r.actions.updatePrivileges(v),u("")},children:O.jsx(Kh.Group,{children:O.jsx(Kh.Field,{controlShouldRenderValue:!0,renderOption:({data:p})=>O.jsxs("div",{className:"flex items-center gap-x-2",children:[vL(p.type),O.jsx("span",{children:p.applyTo})]}),placeholder:"Create a permission",hideNoOptions:!0})})})};function ace(e){const t=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],r=e.reduce((n,i)=>{const[o]=i.resource.split("."),a=n.find(s=>s.prefix===o.toLowerCase());return a?(a.resources.push(i),n):[...n,{prefix:o.toLowerCase(),type:i.type,resources:[i]}]},[]);return r.sort((n,i)=>n.prefix==="ds"?-1:i.prefix==="ds"||n.prefix>i.prefix?1:-1),r.map(n=>({...n,resources:n.resources.sort((i,o)=>{const a=t.indexOf(i.type),s=t.indexOf(o.type);return a!==s?a-s:i.resource.toLowerCase()>o.resource.toLowerCase()?1:-1})})).reduce((n,i)=>[...n,...i.resources],[])}const bo={datastore:["datastore"],dataclass:["dataclass"],singleton:["singleton"],functions:["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"],attribute:["attribute"]},HD=Object.values(bo).flat();function ha(e,t){return t.length>0&&t.every(r=>e.includes(r))}function sce(e,t){return t.some(r=>e.includes(r))}function lce(e,t){return Array.from(new Set([...e,...t]))}function cce(e,t){return e.filter(r=>!t.includes(r))}const uce=({selectedPrivilege:e,onSelect:t,showIncluded:r,privileges:n,rawPrivileges:i})=>{var ne,ve;const[o,a]=C.useState(null),[s,c]=C.useState(null),{styles:u,attributes:d}=Cd(o,s,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),h=Tr(),[p,v]=C.useState([]),[y,m]=C.useState([]),[g,w]=C.useState(""),[x,_]=C.useState(""),[S,E]=C.useState({}),I=i??n;C.useEffect(()=>{const Z=setTimeout(()=>m(p),0);return()=>clearTimeout(Z)},[p]),C.useEffect(()=>{E({})},[I]);const{id:N}=e,T=C.useMemo(()=>pe.getInheritedResources(N,I),[N,(ne=I[N])==null?void 0:ne.includes,(ve=I[N])==null?void 0:ve.resources]),M=C.useMemo(()=>pe.getPromotions(N,I),[I[N]]),z=Z=>{v([...Z])},j=Z=>{v(J=>ha(J,Z)?cce(J,Z):lce(J,Z))},W=Z=>{j(bo[Z])},U=ha(p,HD),A=p.length>0&&!U,K=ha(p,bo.functions),V=!K&&sce(p,bo.functions),te=()=>z(HD),G=()=>z([]),re=async Z=>{if(h.getHost()==="vscode"){const ae=pe.removePermission(e.id,Z,n);h.actions.updatePrivileges(ae);return}const{confirmed:J}=await h.actions.openModal({title:"Delete Privilege",type:pe.ModalType.CONFIRM,color:pe.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"});if(J){const ae=pe.removePermission(e.id,Z,n);h.actions.updatePrivileges(ae)}},P=async()=>{const{confirmed:Z}=await h.actions.openModal({title:"Reset Permissions",type:pe.ModalType.CONFIRM,color:pe.ModalColor.DANGER,message:"Are you sure you want to reset permissions for this Privilege?",icon:"FdWarningDanger"});if(Z){const J=pe.resetResources(e.id,n);h.actions.updatePrivileges(J)}},B=C.useMemo(()=>y.length>0?T.filter(Z=>y.includes(Z.type)):T,[T,y]),X=C.useMemo(()=>B.filter(({resource:Z})=>x?new RegExp(Xi.escapeRegExp(x),"i").test(Z):!0),[B,x]),Q=C.useMemo(()=>ace(X),[X]),D=C.useMemo(()=>Q.filter(Z=>{const J=Z.permissions.every(ae=>!ae.checked)&&Z.permissions.some(ae=>ae.from.length>0);return r||!J}),[Q,r]),$=(Z,J)=>{const ae=`${Z.resource}|${Z.type}|${J.name}`;E(he=>({...he,[ae]:!J.checked})),setTimeout(()=>{const he=pe.togglePermission(e.id,Z,J,n);h.actions.updatePrivileges(he)},0)},H=C.useMemo(()=>D.some(Z=>Z.exists===!1),[D]),q=async()=>{const{confirmed:Z}=await h.actions.openModal({title:"Delete Privilege",type:pe.ModalType.CONFIRM,color:pe.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"}),J=Object.entries(I).map(([ae,he])=>{const ue=he.resources.filter(de=>!de.exists);return{[ae]:ue.map(de=>({applyTo:de.resource,type:de.type}))}}).reduce((ae,he)=>({...ae,...he}),{});if(Z){const ae=pe.removeMultiplePermissions(J,n);h.actions.updatePrivileges(ae)}},Y=C.useRef(null),ie=cd({count:D.length,getScrollElement:()=>{var Z;return((Z=Y.current)==null?void 0:Z.getScrollElement())??null},estimateSize:()=>36,overscan:5});return C.useEffect(()=>{var Z,J;(J=(Z=Y.current)==null?void 0:Z.getScrollElement())==null||J.scrollTo({top:0})},[N]),O.jsxs(hf,{ref:Y,className:"z-20 h-full flex-1 overflow-auto p-3.75 pt-0",style:{maxHeight:"calc(100vh - 5.5rem - 85px - 20px)"},children:[O.jsxs("table",{className:"relative h-full w-full border-collapse",children:[O.jsx("thead",{className:"sticky top-0 z-20 bg-panel-1",children:O.jsxs("tr",{className:"border-b border-panel-border-subtle",children:[O.jsx("td",{className:"py-2",children:O.jsxs("div",{className:"flex items-center gap-x-2",children:[O.jsx(wt.Root,{className:"relative w-56",children:O.jsxs(wt.Group,{children:[O.jsx(wt.Icon,{children:O.jsx(dj,{})}),O.jsx(wt.Field,{type:"text",placeholder:"Search available permissions",value:g,onChange:Z=>{const J=Z.target.value;w(J),setTimeout(()=>_(J),0)}}),O.jsx(wn.Popover,{className:"flex items-center",children:({open:Z})=>O.jsxs(O.Fragment,{children:[O.jsx(wn.Popover.Button,{ref:a,children:O.jsx(wt.Icon,{isAction:!0,children:O.jsx(JD,{})})}),Z&&O.jsx(ef,{children:O.jsx(wn.Popover.Panel,{ref:c,style:u.popper,...d.popper,className:"z-50",static:!0,children:O.jsxs(br,{depth:3,borderType:"light",className:"rounded-md border px-4 py-2.5",children:[O.jsxs("label",{className:"mb-2 flex cursor-pointer items-center gap-2",children:[O.jsx(ir,{size:"sm",value:A?null:U,onChange:()=>U?G():te()}),O.jsx("h5",{className:"text-sm font-semibold",children:"Filter"})]}),O.jsxs("div",{className:"space-y-2 text-s",children:[O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:ha(p,bo.dataclass),onChange:()=>W("dataclass"),label:"Dataclass"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:ha(p,bo.singleton),onChange:()=>W("singleton"),label:"Singleton"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:V?null:K,onChange:()=>W("functions"),label:"Functions"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:ha(p,bo.attribute),onChange:()=>W("attribute"),label:"Attribute"})})]})]})})})]})})]})}),O.jsx(oce,{privilegeId:N,privileges:I}),O.jsx("div",{children:O.jsx(Lr,{label:`Resetting the privilege will remove all configured\r
|
|
119
|
-
ressources`,container:Br(),children:O.jsx(Jt,{color:"white",variant:"ghost",onClick:P,children:O.jsx(SV,{})})})}),O.jsx(Lr,{icon:O.jsx(wi,{}),label:"Delete all the non existing resources from privileges",container:Br(),children:O.jsx(Jt,{color:"white",variant:"ghost",onClick:q,disabled:!H,children:O.jsx(QD,{className:"h-4 w-4"})})})]})}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Read"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Create"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Update"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Delete"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Execute"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Promote"})]})}),D.length?O.jsxs("tbody",{children:[ie.getVirtualItems().length>0?O.jsx("tr",{style:{height:`${ie.getVirtualItems()[0].start}px`},children:O.jsx("td",{colSpan:7})}):null,ie.getVirtualItems().map(Z=>{const J=D[Z.index],ae=J.permissions.some(he=>he.from.length>0);return O.jsxs("tr",{className:an("group even:bg-white/5 hover:bg-input-bg",{"opacity-60":J.exists===!1}),children:[O.jsxs("td",{className:an("group flex items-center gap-3 py-2 text-xs group-hover:rounded-l group-hover:bg-input-bg ",J.exists===!1?"text-negative-text":""),children:[vL(J.type),J.resource,O.jsx(Lr,{label:"Remove Permission",container:Br(),children:O.jsx(Jt,{color:"white",variant:"ghost",disabled:ae,onClick:()=>{ae?pe.toastSubject.next({kind:"info",markdown:!0,message:"**Info:** Inherited permissions can't be removed",customIcon:on}):re({applyTo:J.resource,type:J.type})},className:"opacity-0 group-hover:opacity-100",children:O.jsx(ja,{className:"h-4 w-4 rotate-45 transform"})})})]}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:O.jsx(fa,{permissions:J.permissions,showIncluded:r,label:"read",onToggle:he=>$(J,he),onSelect:t,privileges:n,exists:J.exists,optimisticChecked:S[`${J.resource}|${J.type}|read`]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:O.jsx(fa,{permissions:J.permissions,showIncluded:r,label:"create",onToggle:he=>$(J,he),onSelect:t,privileges:n,exists:J.exists,optimisticChecked:S[`${J.resource}|${J.type}|create`]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:O.jsx(fa,{permissions:J.permissions,showIncluded:r,label:"update",onToggle:he=>$(J,he),onSelect:t,privileges:n,exists:J.exists,optimisticChecked:S[`${J.resource}|${J.type}|update`]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:O.jsx(fa,{permissions:J.permissions,showIncluded:r,label:"drop",onToggle:he=>$(J,he),onSelect:t,privileges:n,exists:J.exists,optimisticChecked:S[`${J.resource}|${J.type}|drop`]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:O.jsx(fa,{promoted:M[J.resource],permissions:J.permissions,showIncluded:r,label:"execute",onToggle:he=>$(J,he),onSelect:t,privileges:n,exists:J.exists,optimisticChecked:S[`${J.resource}|${J.type}|execute`]})}),O.jsx("td",{className:"py-2 text-center group-hover:rounded-r group-hover:bg-input-bg",children:O.jsx(fa,{permissions:J.permissions,showIncluded:r,label:"promote",onToggle:he=>$(J,he),onSelect:t,privileges:n,exists:J.exists,optimisticChecked:S[`${J.resource}|${J.type}|promote`]})})]},`${J.resource}-${Z.index}`)}),(()=>{const Z=ie.getVirtualItems();if(!Z.length)return null;const J=ie.getTotalSize()-Z[Z.length-1].end;return J>0?O.jsx("tr",{style:{height:`${J}px`},children:O.jsx("td",{colSpan:7})}):null})()]}):null]}),!Q.length&&x?O.jsx(VD,{children:"The Permission you're looking for can't be found "}):null,!Q.length&&!x?O.jsxs(VD,{children:["This Privilege has no Permissions configured yet ",O.jsx("br",{}),'Add a new permission by using the "Create a permission" input above']}):null]})},dce=({onCreate:e})=>{const t=Tr(),r=t.getPrivileges(),[n,i]=C.useState(null),[o,a]=C.useState(null),[s,c]=C.useState(""),[u,d]=C.useState(null),{styles:h,attributes:p}=Cd(n,o,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});C.useEffect(()=>{c(""),d(null)},[o]);const v=(y=()=>{})=>{d(null);try{const m=pe.createPrivilege(s,r),g=Object.values(m).find(w=>w.privilege===s);t.actions.updatePrivileges(m),g&&e(g),setTimeout(()=>{y()},0)}catch(m){d(m.message)}};return O.jsx(wn.Popover,{children:({open:y,close:m})=>O.jsxs(O.Fragment,{children:[O.jsx(wn.Popover.Button,{className:"rounded","data-cy":"New-priv-btn",as:"div",ref:i,children:O.jsx(Jt,{variant:"ghost",color:"white",children:O.jsx(ja,{className:"h-4 w-4"})})}),y&&O.jsx(ef,{children:O.jsx(wn.Popover.Panel,{ref:a,style:h.popper,...p.popper,"data-cy":"New-priv-pop-up",className:"z-50",static:!0,children:O.jsxs(br,{className:"min-w-[256px] border rounded px-4 py-2 text-xs shadow-md",depth:3,borderType:"light",children:[O.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Privilege"}),O.jsx("div",{className:"mt-2",children:O.jsxs("label",{className:"flex items-center gap-x-4",children:[O.jsx("span",{children:"Name"}),O.jsx(wt.Root,{className:"w-full",color:u?"negative":"primary",children:O.jsxs(wt.Group,{children:[u&&O.jsx(wt.Message,{children:u}),O.jsx(wt.Field,{autoFocus:!0,value:s,onChange:g=>c(g.target.value),onKeyDown:g=>{g.key==="Enter"&&v()},type:"text"})]})})]})}),O.jsxs("div",{className:"mt-4 flex items-center justify-center gap-x-2",children:[O.jsx(Jt,{onClick:()=>v(m),children:"Create"}),O.jsx(Jt,{color:"white",variant:"outline",onClick:()=>m(),children:"Cancel"})]})]})})})]})})},fce=()=>{const e=Tr(),t=e.getCatalog(),r=e.getPrivileges(),[n,i]=C.useState(r);C.useEffect(()=>{const y=setTimeout(()=>i(r),0);return()=>clearTimeout(y)},[r]);const o=C.useMemo(()=>{if(t===null)return n;const y=sz(n,Object.values((t==null?void 0:t.dataClasses)??{}));return lz(y,t)},[n,t]),[a,s]=C.useState(null),[c,u]=C.useState(null),d=y=>{s(y),setTimeout(()=>u(y),0)},h=C.useMemo(()=>Object.keys(o),[o]);C.useEffect(()=>{if(a&&o[a.id]||!h.length)return;const y=o[h[0]];s(y),u(y)},[o]),C.useEffect(()=>{h.length<2&&v(!0)},[h.length]);const[p,v]=C.useState(!0);return O.jsxs("div",{className:"flex h-full min-h-0 min-w-0 flex-1",children:[O.jsxs(br,{depth:1,className:"flex h-full w-89 shrink-0 flex-col border-r",children:[O.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between px-3.5 py-2.5",children:[O.jsxs("div",{className:"flex items-center gap-x-1",children:[O.jsx("span",{children:O.jsx(pd,{className:"h-3.5 w-3.5"})}),O.jsx("span",{className:"text-[11px] font-semibold",children:"Privileges"})]}),O.jsx(dce,{onCreate:y=>{s(y),u(y)}})]}),O.jsx(lse,{privileges:o,selectedPrivilege:a,selectPrivilege:d})]}),a&&o[a.id]?O.jsxs(br,{depth:1,className:"privileges-container relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden border-l-[0.5px]",children:[O.jsxs("div",{className:"mb-1 flex min-h-0 min-w-0 flex-1 h-full w-full flex-col items-stretch overflow-auto",children:[(c??a).privilege!=="guest"?O.jsx(Yae,{privileges:o,selectedPrivilege:c??a,onSelect:y=>s(r[y]),setShowIncluded:v,showIncluded:p}):null,O.jsx(uce,{privileges:o,rawPrivileges:r,selectedPrivilege:c??a,onSelect:y=>s(r[y]),showIncluded:p})]}),O.jsx("div",{className:"mt-auto flex-shrink-0",children:O.jsx(hce,{privileges:o,selectedPrivilege:c??a,setSelectedPrivilege:s})})]}):O.jsx(U4,{tab:"Privilege"})]})},hce=({privileges:e,selectedPrivilege:t,setSelectedPrivilege:r})=>{const[n,i]=C.useState(!1);return O.jsx(pe.Panel,{path:pe.ROLES_TAB_PATH,isOpen:n,onOpen:()=>i(!0),onClose:()=>i(!1),children:O.jsx("div",{className:"flex h-full w-full min-h-0 px-3 pb-3",children:O.jsx(br,{depth:2,className:"h-full w-full overflow-hidden rounded",children:O.jsx(oae,{dict:e,data:pe.getGraphData(t.id,e),onSelect:o=>r(e[o])})})})})},pce=C.memo(({role:e})=>{var E;const t=Tr(),[r,n]=C.useState(e),[i,o]=C.useState(e.role),[a,s]=C.useState(null),c=t.getPrivileges(),u=((E=r.privileges)==null?void 0:E.filter(I=>c[I]&&c[I].privilege!=="guest").length)||0,d=t.getRoles(),{selectedRole:h,selectRole:p}=cS(),[v,y]=C.useState(!1),m=pe.useOutsideClick(()=>{v&&w()});pe.useDidMountEffect(()=>{i!==e.role&&o(e.role)},[e.role]),C.useEffect(()=>{e.role||y(!0)},[]),C.useEffect(()=>{n(e)},[e]);const g=()=>{s(null),y(!0)},w=()=>{s(null),e.role&&e.role===i&&y(!1);try{const I=pe.saveRole({...r,role:i},d);t.actions.updateRoles(I),y(!1)}catch(I){s(I.message)}},x=async I=>{if(I.stopPropagation(),t.getHost()==="vscode"){_();return}const{confirmed:N}=await t.actions.openModal({title:"Delete Role",type:pe.ModalType.CONFIRM,color:pe.ModalColor.DANGER,message:"Are you sure you want to remove this Role?",icon:"FdWarningDanger"});N&&_()},_=()=>{const I=pe.removeRole(r.id,d),N=Object.keys(I);if(h!==r.id){t.actions.updateRoles(I);return}if(N.length===0)p(null);else{const T=Object.keys(d),M=T.indexOf(r.id),z=Math.max(0,M-1),j=T[z];M===0?p(N[0]):I[j]?p(j):p(N[0])}t.actions.updateRoles(I)},S=(I=null)=>{if(I&&I.stopPropagation(),!e.role){_();return}y(!1),o(e.role)};return O.jsx(O.Fragment,{children:O.jsxs(br,{depth:4,borderType:h===r.id?"primary":h!==r.id?"light":"default",className:an("rounded border p-2"),role:"button","data-cy":"privilegeCard",onClick:()=>{p(r.id)},ref:m,children:[O.jsx("div",{className:"flex items-center justify-between",children:O.jsxs("div",{className:"flex flex-1 items-center",children:[O.jsx("span",{className:"mr-4",children:O.jsx(pd,{className:"h-6 w-6"})}),v?O.jsxs(wt.Root,{color:a?"negative":"primary",className:"flex-1 mr-2",children:[O.jsx(wt.Group,{className:"border-input-focus-border",children:O.jsx(wt.Field,{type:"text",value:i,onChange:({target:{value:I}})=>{o(I)},onKeyDown:I=>{I.key==="Enter"&&w(),I.key==="Escape"&&S()},placeholder:"role",autoComplete:"off",autoFocus:!0})}),a&&O.jsx(wt.Message,{children:a})]}):O.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",title:i,children:r.role}),O.jsx("div",{className:an("justify-between ml-auto flex w-fit items-center gap-x-2"),children:v?O.jsxs(O.Fragment,{children:[O.jsx(Jt,{color:"white",variant:"ghost",onClick:w,children:O.jsx(_V,{className:"h-4 w-4"})}),O.jsx(Jt,{color:"white",variant:"ghost",onClick:S,children:O.jsx(ej,{className:"h-4 w-4"})})]}):O.jsxs(O.Fragment,{children:[O.jsx(Jt,{color:"white",variant:"ghost",onClick:g,children:O.jsx(cj,{className:"h-4 w-4"})}),O.jsx(Jt,{color:"white",variant:"ghost",onClick:I=>x(I),children:O.jsx(pj,{className:"h-4 w-4"})})]})})]})}),O.jsxs("span",{className:an("ml-10.75 py-1 text-xs"),children:[u," Privilege",u>1?"s":""]})]})})}),gL=(e,t)=>e?t[e]:null,WD=(e,t,r)=>{const n=gL(e,r);return n?Object.values(r).reduce((i,o)=>o.id===e?n.privileges.includes(t)?{...i,[n.id]:{...n,privileges:n.privileges.filter(a=>a!==t)}}:{...i,[n.id]:{...n,privileges:[...n.privileges,t]}}:{...i,[o.id]:o},{}):r},vce=()=>{const e=Tr(),t=e.getPrivileges(),r=e.getRoles(),{selectedRole:n}=cS(),i=gL(n,r),o=(c,u)=>u&&u.privileges.includes(c.id),a=C.useMemo(()=>Object.values(t).filter(c=>o(c,i)&&c.privilege!=="guest"),[t,i]),s=C.useMemo(()=>Object.values(t).filter(c=>!o(c,i)&&c.privilege!=="guest"),[t,i]);return O.jsxs(br,{depth:1,className:"w-full border-b p-4 ",children:[O.jsx("div",{className:"mb-4 flex items-center gap-x-5",children:O.jsx("h4",{className:"text-[13px] font-semibold ",children:"Privileges"})}),O.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[O.jsx(vu,{"data-cy":"item=>Permisions",className:"italic opacity-90",children:"guest"}),a.map((c,u)=>O.jsxs(vu,{"data-cy":"item=>Permisions",color:"primary",onClick:()=>{const d=WD(i.id,c.id,r);e.actions.updateRoles(d)},children:[c.privilege,O.jsx(Tu.FdPlus,{className:"rotate-45 transform"})]},u)),s.map((c,u)=>O.jsxs(vu,{"data-cy":"item=>Permisions",color:"dark",onClick:()=>{const d=WD(i.id,c.id,r);e.actions.updateRoles(d)},children:[c.privilege,O.jsx(Tu.FdPlus,{})]},u))]})]})},fd=(e,t,r,n=!1)=>{const i=e.applyTo,o=e.type===pe.EPermissionType.DATACLASS?"ds":i.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=h=>{h.forEach(p=>{a[p]&&(a[p].resources.forEach(v=>{if(v.resource===i||v.resource===o){const y=fd(e,t,{[p]:a[p]},n);Object.values(v.permissions).forEach(m=>{c[m.name].explicitly||(!c[m.name].from.includes(a[p].privilege)&&m.checked&&c[m.name].from.push(a[p].privilege),c[m.name].inherited=c[m.name].inherited||y[m.name].value||y[m.name].inherited)})}}),a[p].includes.length>0&&u(a[p].includes))})};if(Object.values(r).forEach(h=>{h.resources.forEach(p=>{p.resource===i&&Object.values(p.permissions).forEach(v=>{v.checked&&(c[v.name].explicitly=!0,n&&(c[v.name].value=!0))})}),(h.includes.length>0||h.privilege==="guest")&&u(h.includes)}),Object.values(t).forEach(h=>{h.resources.forEach(p=>{p.resource===i&&(h.privilege==="guest"?Object.values(p.permissions).forEach(v=>{v.checked&&(c[v.name].explicitly=!0,n&&(c[v.name].value=!0))}):Object.values(p.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(([h,p])=>h!=="promote"&&!p.value&&!p.explicitly):Object.entries(c).some(([h,p])=>h!=="promote"&&p.value&&!p.explicitly))&&![pe.EPermissionType.DATASTORE,pe.EPermissionType.SINGLETON].includes(e.type)){const h={applyTo:o,type:e.type===pe.EPermissionType.DATACLASS?pe.EPermissionType.DATASTORE:e.type===pe.EPermissionType.SINGLETON_METHOD?pe.EPermissionType.SINGLETON:pe.EPermissionType.DATACLASS},p=fd(h,t,r,n),v=y=>{let m=c[y].value;return n?!c[y].value&&!c[y].explicitly&&(m=p[y].value):c[y].value&&!c[y].explicitly&&(m=p[y].value),{value:m,inherited:c[y].inherited||p[y].inherited,from:c[y].from.length>0?c[y].from:p[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}},gce=({children:e})=>O.jsx("div",{className:"h-full w-full",children:O.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center",children:O.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-4 py-4 text-inactive-text",children:[O.jsx(on,{className:"absolute -right-full h-10 w-10 translate-x-1"}),O.jsx("div",{className:"text-center text-sm",children:e})]})})}),mce=e=>{switch(e){case"dataclass":return O.jsx(Pu,{className:"h-6 w-6"});case"singleton":return O.jsx(fj,{className:"h-6 w-6"});case"datastore":return O.jsx(lj,{className:"h-6 w-6"});case"attribute":return O.jsx(hj,{className:"h-6 w-6"});case"method":return O.jsx(tj,{className:"h-6 w-6"});case"singletonMethod":return O.jsx(sj,{className:"h-6 w-6"});case"entityselMethod":return O.jsx(aj,{className:"h-6 w-6"});case"entityMethod":return O.jsx(oj,{className:"h-6 w-6"});case"dsMethod":return O.jsx(ij,{className:"h-6 w-6"});case"dataclassMethod":return O.jsx(nj,{className:"h-6 w-6"});default:return O.jsx(Pu,{className:"h-6 w-6"})}},UD=({privileges:e,permission:t,hasChild:r,depth:n,isChild:i=!1,className:o,inSearch:a,toggleCollapse:s,collapsed:c,isRestrictedByDefault:u,toastMessageCallback:d,computedInherited:h})=>{const[p,v]=t.applyTo.split("."),y=C.useMemo(()=>h||fd(t,e.otherPrivs,e.rolePrivs,u),[h,e,t,u]);return O.jsxs("tr",{className:an("group even:bg-white/5 hover:bg-input-bg",o),children:[O.jsxs("td",{className:an("flex h-full w-full items-stretch gap-3 p-0 text-xs group-hover:rounded-l group-hover:bg-input-bg",{"px-1":a}),children:[Array(n).fill("").map((m,g)=>O.jsx("div",{className:an("ml-1.5 mr-1 w-[2px] bg-muted",{"mr-0.5":i})},g)),O.jsxs("div",{className:"flex items-center gap-3 py-2",children:[r&&O.jsx("button",{onClick:s,className:"w-3",children:c?O.jsx(uj,{className:"inline h-4 w-4"}):O.jsx(rj,{className:"inline h-4 w-4"})}),mce(t.type),a?t.applyTo:v||p]})]}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:[pe.EPermissionType.ATTRIBUTE,pe.EPermissionType.DATASTORE,pe.EPermissionType.DATACLASS].includes(t.type)&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",onClick:d,children:[O.jsx(ir,{value:y.read.value||y.read.inherited,isDisabled:!0}),O.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!y.read.value&&y.read.inherited?O.jsx(Lr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:y.read.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(wi,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:y.read.from.map((m,g)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},g))})]})]}):null}),children:O.jsx(on,{className:"h-4 w-4"})}):""})]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:[pe.EPermissionType.ATTRIBUTE,pe.EPermissionType.DATASTORE,pe.EPermissionType.DATACLASS].includes(t.type)&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",onClick:d,children:[O.jsx(ir,{value:y.create.value||y.create.inherited,isDisabled:!0}),O.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!y.create.value&&y.create.inherited?O.jsx(Lr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:y.read.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(wi,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:y.read.from.map((m,g)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},g))})]})]}):null}),children:O.jsx(on,{className:"h-4 w-4"})}):""})]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:[pe.EPermissionType.ATTRIBUTE,pe.EPermissionType.DATASTORE,pe.EPermissionType.DATACLASS].includes(t.type)&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",onClick:d,children:[O.jsx(ir,{value:y.update.value||y.update.inherited,isDisabled:!0}),O.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!y.update.value&&y.update.inherited?O.jsx(Lr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:y.update.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(wi,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:y.update.from.map((m,g)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},g))})]})]}):null}),children:O.jsx(on,{className:"h-4 w-4"})}):""})]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:[pe.EPermissionType.ATTRIBUTE,pe.EPermissionType.DATASTORE,pe.EPermissionType.DATACLASS].includes(t.type)&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",onClick:d,children:[O.jsx(ir,{value:y.drop.value||y.drop.inherited,isDisabled:!0}),O.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!y.drop.value&&y.drop.inherited?O.jsx(Lr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:y.drop.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(wi,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:y.drop.from.map((m,g)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},g))})]})]}):null}),children:O.jsx(on,{className:"h-4 w-4"})}):""})]})}),O.jsx("td",{className:"py-2 text-center group-hover:rounded-r group-hover:bg-input-bg",children:t.type!=="attribute"&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",onClick:d,children:[O.jsx(ir,{value:y.execute.value||y.execute.inherited,isDisabled:!0}),O.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!y.execute.value&&y.execute.inherited?O.jsx(Lr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:y.execute.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(wi,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:y.execute.from.map((m,g)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},g))})]})]}):null}),children:O.jsx(on,{className:"h-4 w-4"})}):""})]})})]})};function GD(e,t,r){const n=[],i=(a,s,c)=>n.push({id:a,permission:s,depth:c,hasChild:!1,isChild:!1}),o=(a,s,c,u,d,h)=>{n.push({id:a,permission:s,depth:c,hasChild:!0,isChild:u,toggleId:a,isCollapsed:d}),d||h()};for(const a of Object.values(e)){o("ds-group",{applyTo:a.applyTo,type:a.type},0,!1,t,()=>{for(const s of a.methods)i(`dsm-${s.applyTo}`,s,1);for(const s of a.dataClasses){const c=`dc-${s.applyTo}`;o(c,{applyTo:s.applyTo,type:s.type},1,!0,r[c]??!1,()=>{for(const u of s.attributes)i(`dca-${u.applyTo}`,u,2);for(const u of s.methods)i(`dcm-${u.applyTo}`,u,2)})}});for(const s of a.singletons){const c=`sing-${s.applyTo}`;o(c,{applyTo:s.applyTo,type:s.type},0,!0,r[c]??!1,()=>{for(const u of s.attributes)i(`singa-${u.applyTo}`,u,1);for(const u of s.methods)i(`singm-${u.applyTo}`,u,1)})}}return n}const KD=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],yo={datastore:["datastore"],dataclass:["dataclass"],singleton:["singleton"],functions:["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"],attribute:["attribute"]},YD=Object.values(yo).flat();function pa(e,t){return t.length>0&&t.every(r=>e.includes(r))}function bce(e,t){return Array.from(new Set([...e,...t]))}function yce(e,t){return e.filter(r=>!t.includes(r))}const xce=({selectedRole:e})=>{const[t,r]=C.useState(null),[n,i]=C.useState(null),{styles:o,attributes:a}=Cd(t,n,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),s=Tr(),c=s.getRestrictedByDefault(),u=s.getPrivileges(),[d,h]=C.useState([]),[p,v]=C.useState([]),[y,m]=C.useState(""),[g,w]=C.useState("");C.useEffect(()=>{const J=setTimeout(()=>v(d),0);return()=>clearTimeout(J)},[d]);const x=s.getCatalogMethods(),_=s.getDataclasses(),S=s.getSingletons(),E=C.useMemo(()=>sae(x,Object.values(_),Object.values(S)),[x,_,S]),I=C.useMemo(()=>!p.length&&!g?[]:[...US(g,x,Object.values(_),Object.values(S))].filter(J=>p.length?p.includes(J.type):!0).sort((J,ae)=>{const he=KD.indexOf(J.type),ue=KD.indexOf(ae.type);return he!==ue?he-ue:J.applyTo.toLowerCase()>ae.applyTo.toLowerCase()?1:-1}),[g,p,x,_,S]),N=J=>h([...J]),T=J=>{h(ae=>pa(ae,J)?yce(ae,J):bce(ae,J))},M=J=>T(yo[J]),z=YD.every(J=>d.includes(J)),j=d.length>0&&!z,W=pa(d,yo.functions),U=()=>N(YD),A=()=>N([]),K=s.getRoles(),[V,te]=C.useState(K);C.useEffect(()=>{const J=setTimeout(()=>te(K),0);return()=>clearTimeout(J)},[K]);const G=C.useRef(null);C.useEffect(()=>{var J,ae;(ae=(J=G.current)==null?void 0:J.getScrollElement())==null||ae.scrollTo({top:0})},[e]);const re=cd({count:I.length,getScrollElement:()=>{var J;return((J=G.current)==null?void 0:J.getScrollElement())??null},estimateSize:()=>36,overscan:5,paddingEnd:40}),P=C.useMemo(()=>{const J=Object.values(u).find(le=>le.privilege==="guest"),ae=V[e],he=ae?Object.fromEntries(ae.privileges.map(le=>[le,u[le]]).filter(([,le])=>!!le)):{};if(c)return{rolePrivs:he,otherPrivs:J?{[J.id]:J}:{}};const ue=J?{[J.id]:{...J,active:!0}}:{},de=Object.fromEntries(Object.entries(u).filter(([le])=>le!==(J==null?void 0:J.id)&&!(ae!=null&&ae.privileges.includes(le))).map(([le,xe])=>[le,{...xe,active:!1}]));return{rolePrivs:he,otherPrivs:{...ue,...de}}},[u,V,e,c]),[B,X]=C.useState(!1),[Q,D]=C.useState({}),$=C.useMemo(()=>{const J=[];for(const ae of Object.values(E)){for(const he of ae.dataClasses)J.push(`dc-${he.applyTo}`);for(const he of ae.singletons)J.push(`sing-${he.applyTo}`)}return J},[E]),H=$.length>0&&$.every(J=>Q[J]===!0),q=C.useCallback(()=>{const J={};for(const ae of $)J[ae]=!0;D(J)},[$]),Y=C.useCallback(J=>{J==="ds-group"?X(ae=>!ae):D(ae=>({...ae,[J]:!ae[J]}))},[]),ie=C.useMemo(()=>{const J=new Map;for(const{permission:ae}of GD(E,!1,{}))J.set(`${ae.applyTo}|${ae.type}`,fd(ae,P.otherPrivs,P.rolePrivs,c));return J},[P,c,E]),ne=C.useMemo(()=>GD(E,B,Q),[E,B,Q]),ve=cd({count:ne.length,getScrollElement:()=>{var J;return((J=G.current)==null?void 0:J.getScrollElement())??null},estimateSize:()=>36,overscan:8,paddingEnd:15}),Z=C.useCallback(()=>{pe.toastSubject.next({kind:"info",markdown:!0,message:"**Info:** You can add or modify permissions only in the Privilege section.",customIcon:Ew})},[]);return O.jsxs(hf,{ref:G,className:"z-20 h-full flex-1 overflow-auto p-3.75 pt-0",style:{maxHeight:"calc(100vh - 5.5rem - 85px - 20px)"},children:[O.jsxs("table",{className:"relative h-full w-full border-collapse",children:[O.jsx("thead",{className:"sticky top-0 z-20 bg-panel-1",children:O.jsxs("tr",{className:"border-b border-grey-100",children:[O.jsx("td",{className:"py-2",children:O.jsxs("div",{className:"flex items-center gap-x-2",children:[O.jsx(Lr,{label:"Collapse All",position:"up",container:Br(),children:O.jsx(Jt,{color:"white",variant:"ghost",disabled:B&&H,onClick:()=>{H?(q(),X(!0)):q()},children:O.jsx(yV,{})})}),O.jsx(wt.Root,{className:"w-56",children:O.jsxs(wt.Group,{children:[O.jsx(wt.Icon,{children:O.jsx(dj,{})}),O.jsx(wt.Field,{type:"text",placeholder:"Search",value:y,onChange:J=>{const ae=J.target.value;m(ae),setTimeout(()=>w(ae),0)}}),O.jsx(wn.Popover,{className:"flex items-center",children:({open:J})=>O.jsxs(O.Fragment,{children:[O.jsx(wn.Popover.Button,{ref:r,children:O.jsx(wt.Icon,{isAction:!0,children:O.jsx(JD,{})})}),J&&O.jsx(ef,{children:O.jsx(wn.Popover.Panel,{ref:i,style:o.popper,...a.popper,className:"z-50",static:!0,children:O.jsxs(br,{depth:3,borderType:"light",className:"rounded-md border px-4 py-2.5 text-xs",children:[O.jsxs("label",{className:"mb-2 flex cursor-pointer items-center gap-2",children:[O.jsx(ir,{size:"sm",value:j?null:z,onChange:()=>z?A():U()}),O.jsx("h5",{className:"text-sm font-semibold",children:"Filter"})]}),O.jsxs("div",{className:"space-y-2 text-s",children:[O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:pa(d,yo.datastore),onChange:()=>M("datastore"),label:"Datastore"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:pa(d,yo.dataclass),onChange:()=>M("dataclass"),label:"Dataclass"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:pa(d,yo.singleton),onChange:()=>M("singleton"),label:"Singleton"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:W,onChange:()=>M("functions"),label:"Functions"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:pa(d,yo.attribute),onChange:()=>M("attribute"),label:"Attribute"})})]})]})})})]})})]})})]})}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"read"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Create"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Update"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Delete"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Execute"})]})}),O.jsx("tbody",{className:"relative",children:p.length||g?O.jsxs(O.Fragment,{children:[re.getVirtualItems().length>0?O.jsx("tr",{style:{height:`${re.getVirtualItems()[0].start}px`},children:O.jsx("td",{colSpan:6})}):null,re.getVirtualItems().map(J=>{const ae=I[J.index];return O.jsx(UD,{privileges:P,permission:ae,depth:0,inSearch:!0,isRestrictedByDefault:c,allPrivileges:u,toastMessageCallback:Z,computedInherited:ie.get(`${ae.applyTo}|${ae.type}`)},`${ae.type}-${J.index}`)}),(()=>{const J=re.getVirtualItems();if(!J.length)return null;const ae=re.getTotalSize()-J[J.length-1].end;return ae>0?O.jsx("tr",{style:{height:`${ae}px`},children:O.jsx("td",{colSpan:6})}):null})()]}):O.jsxs(O.Fragment,{children:[ve.getVirtualItems().length>0?O.jsx("tr",{style:{height:`${ve.getVirtualItems()[0].start}px`},children:O.jsx("td",{colSpan:6})}):null,ve.getVirtualItems().map(J=>{const ae=ne[J.index];return O.jsx(UD,{privileges:P,permission:ae.permission,depth:ae.depth,hasChild:ae.hasChild,isChild:ae.isChild,collapsed:ae.isCollapsed,toggleCollapse:ae.toggleId?()=>Y(ae.toggleId):void 0,isRestrictedByDefault:c,allPrivileges:u,toastMessageCallback:Z,computedInherited:ie.get(`${ae.permission.applyTo}|${ae.permission.type}`)},ae.id)}),(()=>{const J=ve.getVirtualItems();if(!J.length)return null;const ae=ve.getTotalSize()-J[J.length-1].end;return ae>0?O.jsx("tr",{style:{height:`${ae}px`},children:O.jsx("td",{colSpan:6})}):null})()]})})]}),(g||p.length)&&!I.length?O.jsx(gce,{children:"The Permission you're looking for can't be found "}):null]})},wce=()=>O.jsx("div",{className:"flex flex-1 items-center justify-center",children:O.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-grey-200 border-t-primary-dark"})}),Sce=()=>{const e=Tr(),t=e.getRoles(),[r,n]=C.useState(null),[i,o]=C.useState(null),[a,s]=C.useState(""),[c,u]=C.useState(null),{styles:d,attributes:h}=Cd(r,i,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});C.useEffect(()=>{s(""),u(null)},[i]);const p=()=>{if(!a)throw new Error("Please enter a valid name");if(Object.values(t).find(g=>g.role.toLowerCase()===a.toLowerCase()))throw new Error(`A role with the name ${a} already exists`);const y=yz.generate(),m=pe.createRole(y,a,t);e.actions.updateRoles(m)};return O.jsx(wn.Popover,{children:({open:v,close:y})=>{const m=()=>{u(null);try{pe.validateName(a),p(),y()}catch(g){u(g.message)}};return O.jsxs(O.Fragment,{children:[O.jsx(wn.Popover.Button,{className:"rounded","data-cy":"New-priv-btn",as:"div",ref:n,children:O.jsx(Jt,{variant:"ghost",color:"white",children:O.jsx(ja,{className:"h-4 w-4"})})}),v&&O.jsx(ef,{children:O.jsx(wn.Popover.Panel,{ref:o,style:d.popper,...h.popper,"data-cy":"New-priv-pop-up",className:"z-50",static:!0,children:O.jsxs(br,{className:"min-w-[256px] border rounded px-4 py-2 text-xs shadow-md",depth:3,borderType:"light",children:[O.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Role"}),O.jsx("div",{className:"mt-2",children:O.jsxs("label",{className:"flex items-center gap-x-4",children:[O.jsx("span",{children:"Name"}),O.jsx(wt.Root,{color:c?"negative":"primary",className:"w-full",children:O.jsxs(wt.Group,{children:[c&&O.jsx(wt.Message,{children:c}),O.jsx(wt.Field,{autoFocus:!0,value:a,onChange:g=>s(g.target.value),onKeyDown:g=>{g.key==="Enter"&&m()},type:"text"})]})})]})}),O.jsxs("div",{className:"mt-4 flex items-center justify-center gap-x-2",children:[O.jsx(Jt,{onClick:()=>{m()},children:"Create"}),O.jsx(Jt,{color:"white",variant:"outline",onClick:()=>y(),children:"Cancel"})]})]})})})]})}})},Ece=()=>{const e=Tr(),t=e.getRoles(),r=e.getPrivileges(),{selectedRole:n,deferredSelectedRole:i}=cS(),o=C.useMemo(()=>Object.values(t).sort((a,s)=>pe.localeCompare(a.role,s.role)),[t]);return O.jsxs("div",{className:"flex flex-1 h-full",children:[O.jsxs(br,{depth:1,className:"flex h-full w-89 flex-col border-r",children:[O.jsxs("div",{className:"flex shrink-0 items-center justify-between px-3.5 py-2.5",children:[O.jsxs("div",{className:"flex items-center gap-x-1",children:[O.jsx("span",{children:O.jsx(pd,{className:"h-3.5 w-3.5"})}),O.jsx("span",{className:"text-[11px] font-semibold",children:"Roles"})]}),O.jsx(Sce,{})]}),O.jsx("div",{className:"flex-1 overflow-auto p-4 pb-10 pt-1",children:o.length>0?O.jsx("div",{className:"flex flex-col gap-4",children:o.map(a=>O.jsx(pce,{role:a,privileges:r},a.id))}):O.jsx("div",{className:"flex h-full items-center justify-center",children:O.jsx("div",{className:"flex flex-1 items-center justify-center text-inactive-text",children:O.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[O.jsx(on,{className:"h-10 w-10"}),O.jsx("div",{className:"font-semibold",children:"There are no roles"}),O.jsxs("div",{className:"flex items-center text-sm",children:["Create a new role by clicking on the"," ",O.jsx(ja,{className:"ml-2 inline h-4 w-4"})]})]})})})})]}),O.jsx(br,{depth:1,className:an("relative flex h-full w-full flex-1 flex-col items-stretch overflow-x-auto",{"border-l-[0.5px]":n}),children:O.jsx("div",{className:"flex h-full w-full select-none flex-col",children:n?O.jsxs(O.Fragment,{children:[O.jsx(vce,{}),i?O.jsx(xce,{selectedRole:i}):O.jsx(wce,{})]}):O.jsx(U4,{tab:"Role"})})})]})},mL=()=>{const e=Tr(),t=e.getQodly(),r=e.getSelectedTab(),n=e.getForceLogin(),i=e.getRestrictedByDefault(),{canUndo:o,canRedo:a}=e.getHistory(),s=C.useRef();return O.jsx("div",{className:"absolute inset-0 flex flex-1 overflow-hidden",children:O.jsx("div",{className:"relative flex flex-1 overflow-hidden","data-cy":"Roles&Privileges-editor-cy",ref:c=>s.current=c,children:O.jsxs("div",{className:"flex min-h-0 w-full flex-1 flex-col",children:[O.jsx($Y,{activeTab:r,forceLogin:n,restrictedByDefault:i,canUndo:o,canRedo:a,onUndo:e.actions.undo,onRedo:e.actions.redo,onTabChange:c=>{e.actions.toggleTab(c)},onForceLoginChange:c=>{e.actions.toggleForceLogin(c)},onRestrictedByDefaultChange:c=>{e.actions.toggleRestrictedByDefault(c)},qodly:t}),O.jsx("div",{className:r==="roles"?"flex flex-1 overflow-hidden":"hidden",children:O.jsx(VY,{children:O.jsx(Ece,{})})}),O.jsx("div",{className:r==="privileges"?"flex flex-1 overflow-hidden":"hidden",children:O.jsx(fce,{})})]})})})},_ce="object",Oce={forceLogin:{type:"boolean"},restrictedByDefault:{type:"boolean"},privileges:{type:"array",items:{$ref:"#/definitions/Privilege"}},roles:{type:"array",items:{$ref:"#/definitions/Role"}},permissions:{type:"object",properties:{allowed:{type:"array",items:{$ref:"#/definitions/Permission"}}}}},Cce={Privilege:{type:"object",properties:{id:{type:"string"},privilege:{type:"string"},includes:{type:"array",items:{type:"string"}}},required:["privilege"]},Role:{type:"object",properties:{id:{type:"string"},role:{type:"string"},privileges:{type:"array",items:{type:"string"}}},required:["role"]},PermissionEntry:{type:"array",items:{type:"string"}},Permission:{type:"object",properties:{applyTo:{type:"string"},type:{enum:["dataclass","method","attribute","datastore","singleton","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"]},subType:{enum:["dsMethod","dataclassMethod","entityMethod","entityselMethod"]},read:{$ref:"#/definitions/PermissionEntry"},create:{$ref:"#/definitions/PermissionEntry"},update:{$ref:"#/definitions/PermissionEntry"},drop:{$ref:"#/definitions/PermissionEntry"},execute:{$ref:"#/definitions/PermissionEntry"},promote:{$ref:"#/definitions/PermissionEntry"}},required:["applyTo","type"]}},Ice={type:_ce,properties:Oce,definitions:Cce},Rce=()=>{const{modals:e,closeModal:t,editModal:r}=Kae();return O.jsx(O.Fragment,{children:e.map((n,i)=>O.jsx(pe.Modal,{hasOverlay:i===0,...n,onClose:t,onEdit:r,container:Br()},n.id))})},bL=e=>{if(!e)return pe.rolesToAPI(pe.sanitizeRoles({}));try{return pe.rolesToAPI(pe.sanitizeRoles(JSON.parse(e)))}catch{return pe.rolesToAPI(pe.sanitizeRoles({}))}},Nce=({initialValue:e,onChange:t,...r})=>{const n=Tr(),i=n.getRolesFlags(),o=n.getRolesAndPrivileges(),a=C.useMemo(()=>bL(e),[e]),s=C.useRef(o),c=C.useRef(a),u=C.useRef(a);return C.useEffect(()=>{s.current=o},[o]),C.useEffect(()=>{Xi.isEqual(a,u.current)||(u.current=a,c.current=a,!Xi.isEqual(a,s.current)&&n.actions.setRolesContent({content:a,flags:{touched:!1}}))},[n,a]),pe.useDidMountEffect(()=>{if(!(!t||!i.touched)&&!Xi.isEqual(o,c.current))try{const d=JSON.stringify(o,null,2);t(d),c.current=o}catch(d){console.error("[Roles Editor Standalone] Error on value stringify:",d)}},[o,i.touched,t]),O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"relative h-screen z-10 overflow-hidden",children:O.jsx(mL,{...r})}),O.jsx(Rce,{})]})},Tce=e=>{const t=Gae();return O.jsx(dz,{adapter:t,children:O.jsx(pe.TipsProvider,{children:O.jsx(Nce,{...e})})})},Pce=({initialValue:e,catalog:t,...r})=>{const n=C.useMemo(()=>({...pe.sanitizeRoles(bL(e)),flags:{touched:!1}}),[e]);return O.jsx(Uae,{initialState:n,catalog:t,children:O.jsx(Tce,{initialValue:e,...r})})};exports.ROLES_EDITOR_SCOPE_CLASS=XD.ROLES_EDITOR_SCOPE_CLASS;exports.EditorStateAdapterProvider=dz;exports.Roles=mL;exports.Standalone=Pce;exports.jsonSchema=Ice;exports.useReduxAdapter=fae;
|
|
118
|
+
`),C.useEffect(function(){return u=i.ref||u,h.current&&(d=new ud(h.current,du(du(du(du({},ice(m)),v),u&&{scrollableNode:u.current}),p.current&&{contentNode:p.current})),typeof t=="function"?t(d):t&&(t.current=d)),function(){d.unMount(),d=null,typeof t=="function"&&t(null)}},[]),C.createElement(c,dd({ref:h,"data-simplebar":!0},y),C.createElement("div",{className:"simplebar-wrapper"},C.createElement("div",{className:"simplebar-height-auto-observer-wrapper"},C.createElement("div",{className:"simplebar-height-auto-observer"})),C.createElement("div",{className:"simplebar-mask"},C.createElement("div",{className:"simplebar-offset"},typeof r=="function"?r({scrollableNodeRef:u,contentNodeRef:p}):C.createElement("div",dd({},i,{className:"simplebar-content-wrapper".concat(i.className?" ".concat(i.className):"")}),C.createElement("div",{className:"simplebar-content"},r)))),C.createElement("div",{className:"simplebar-placeholder"})),C.createElement("div",{className:"simplebar-track simplebar-horizontal"},C.createElement("div",{className:"simplebar-scrollbar"})),C.createElement("div",{className:"simplebar-track simplebar-vertical"},C.createElement("div",{className:"simplebar-scrollbar"})))});hf.displayName="SimpleBar";hf.propTypes={children:Fs.oneOfType([Fs.node,Fs.func]),scrollableNodeProps:Fs.object,tag:Fs.string};const vL=e=>{switch(e){case pe.EPermissionType.DATACLASS:return O.jsx(Pu,{className:"h-6 w-6"});case pe.EPermissionType.SINGLETON:return O.jsx(fj,{className:"h-6 w-6"});case pe.EPermissionType.DATASTORE:return O.jsx(lj,{className:"h-6 w-6"});case pe.EPermissionType.ATTRIBUTE:return O.jsx(hj,{className:"h-6 w-6"});case pe.EPermissionType.METHOD:return O.jsx(tj,{className:"h-6 w-6"});case pe.EPermissionType.SINGLETON_METHOD:return O.jsx(sj,{className:"h-6 w-6"});case pe.ESubPermissionType.ENTITY_SEL_METHOD:return O.jsx(aj,{className:"h-6 w-6"});case pe.ESubPermissionType.ENTITY_METHOD:return O.jsx(oj,{className:"h-6 w-6"});case pe.ESubPermissionType.DS_METHOD:return O.jsx(ij,{className:"h-6 w-6"});case pe.ESubPermissionType.DATACLASS_METHOD:return O.jsx(nj,{className:"h-6 w-6"});default:return O.jsx(Pu,{className:"h-6 w-6"})}},VD=({children:e})=>O.jsx("div",{className:"h-full w-full",children:O.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center",children:O.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-4 py-4 text-inactive-text",children:[O.jsx(on,{className:"h-10 w-10"}),O.jsx("div",{className:"text-center text-sm",children:e})]})})}),fa=({permissions:e,label:t,onToggle:r,onSelect:n,promoted:i,privileges:o,exists:a,optimisticChecked:s})=>{const c=e.find(u=>u.name===t);if(!c)return null;const d=s!==void 0?s:c.checked;return O.jsxs("div",{className:"relative mx-auto flex w-fit items-center",children:[O.jsx(ir,{value:d||c.from.length===0||t==="promote"?d:null,onChange:()=>r&&r(c),isInvalid:a===!1}),O.jsxs("div",{className:"absolute left-full translate-x-1/4 inset-y-0 flex cursor-pointer items-center gap-x-1",children:[t!=="promote"&&(c.checked&&(c.info||c.from.length>0)||!c.checked&&c.from.length>0)&&O.jsx(O.Fragment,{children:O.jsx(Lr,{container:Br(),delay:100,label:O.jsxs("div",{className:"max-w-xs h-fit flex flex-col gap-y-3 p-1.5 text-sm font-semibold",children:[c.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(wi,{className:"mr-2 mt-0.5 h-4 w-4 shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:c.from.map(u=>O.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(o[u].id),children:o[u].privilege}))})]})]}):null,c.info&&O.jsxs("div",{className:"flex items-start",children:[O.jsx(Ew,{className:"mr-2 mt-0.5 h-4 w-4 shrink-0"})," ",O.jsx("span",{className:"flex-1 min-w-0 wrap-break-word whitespace-normal text-left",children:c.info})]})]}),children:O.jsx(on,{className:"h-4 w-4 "})})}),(c.checked||c.from.length>0)&&["execute"].includes(t)&&!!(i!=null&&i.length)&&O.jsx(Lr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:O.jsxs("div",{className:"flex items-start text-s",children:[O.jsx(Ew,{className:"mr-2 mt-0.5 h-4 w-4 shrink-0"}),O.jsxs("p",{children:[O.jsx("span",{className:"mr-1",children:"Function is promoted with: "}),i==null?void 0:i.map(u=>O.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(o[u].id),children:o[u].privilege}))]})]})}),children:O.jsx(xV,{className:"h-3 w-3 "})})]})]})},oce=({privilegeId:e,privileges:t})=>{const r=Tr(),n=r.getCatalogMethods(),i=r.getDataclasses(),o=r.getSingletons(),[a,s]=C.useState([]),[c,d]=C.useState("");C.useEffect(()=>{d("")},[e]),C.useEffect(()=>{const p=pe.getInheritedResources(e,t).map(({resource:y,type:m,subType:g})=>({applyTo:y,type:m,subType:g})),v=US(c.toLowerCase(),n,Object.values(i),Object.values(o));s(v.filter(({applyTo:y,type:m,subType:g})=>!Xi.find(p,{applyTo:y,type:m,subType:g})))},[c,e,t,n,i,o]);const[u,h]=C.useState(!1);return O.jsx(Kh.Root,{className:"w-56",onInputChange:p=>d(p||""),onOpenChange:h,isOpen:u,isSearchable:!0,options:a,getOptionLabel:p=>p?p.applyTo:"",getOptionValue:p=>p?p.applyTo:"",value:null,clearSearchOnSelect:!0,closeMenuOnSelect:!1,onChange:p=>{if(!p)return;const v=pe.addPermission(e,p,t);r.actions.updatePrivileges(v),d("")},children:O.jsx(Kh.Group,{children:O.jsx(Kh.Field,{controlShouldRenderValue:!0,renderOption:({data:p})=>O.jsxs("div",{className:"flex items-center gap-x-2",children:[vL(p.type),O.jsx("span",{children:p.applyTo})]}),placeholder:"Create a permission",hideNoOptions:!0})})})};function ace(e){const t=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],r=e.reduce((n,i)=>{const[o]=i.resource.split("."),a=n.find(s=>s.prefix===o.toLowerCase());return a?(a.resources.push(i),n):[...n,{prefix:o.toLowerCase(),type:i.type,resources:[i]}]},[]);return r.sort((n,i)=>n.prefix==="ds"?-1:i.prefix==="ds"||n.prefix>i.prefix?1:-1),r.map(n=>({...n,resources:n.resources.sort((i,o)=>{const a=t.indexOf(i.type),s=t.indexOf(o.type);return a!==s?a-s:i.resource.toLowerCase()>o.resource.toLowerCase()?1:-1})})).reduce((n,i)=>[...n,...i.resources],[])}const bo={datastore:["datastore"],dataclass:["dataclass"],singleton:["singleton"],functions:["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"],attribute:["attribute"]},HD=Object.values(bo).flat();function ha(e,t){return t.length>0&&t.every(r=>e.includes(r))}function sce(e,t){return t.some(r=>e.includes(r))}function lce(e,t){return Array.from(new Set([...e,...t]))}function cce(e,t){return e.filter(r=>!t.includes(r))}const uce=({selectedPrivilege:e,onSelect:t,showIncluded:r,privileges:n,rawPrivileges:i})=>{var ne,ve;const[o,a]=C.useState(null),[s,c]=C.useState(null),{styles:d,attributes:u}=Cd(o,s,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),h=Tr(),[p,v]=C.useState([]),[y,m]=C.useState([]),[g,w]=C.useState(""),[x,_]=C.useState(""),[S,E]=C.useState({}),I=i??n;C.useEffect(()=>{const Z=setTimeout(()=>m(p),0);return()=>clearTimeout(Z)},[p]),C.useEffect(()=>{E({})},[I]);const{id:N}=e,T=C.useMemo(()=>pe.getInheritedResources(N,I),[N,(ne=I[N])==null?void 0:ne.includes,(ve=I[N])==null?void 0:ve.resources]),M=C.useMemo(()=>pe.getPromotions(N,I),[I[N]]),z=Z=>{v([...Z])},j=Z=>{v(J=>ha(J,Z)?cce(J,Z):lce(J,Z))},W=Z=>{j(bo[Z])},U=ha(p,HD),A=p.length>0&&!U,K=ha(p,bo.functions),V=!K&&sce(p,bo.functions),te=()=>z(HD),G=()=>z([]),re=async Z=>{if(h.getHost()==="vscode"){const ae=pe.removePermission(e.id,Z,n);h.actions.updatePrivileges(ae);return}const{confirmed:J}=await h.actions.openModal({title:"Delete Privilege",type:pe.ModalType.CONFIRM,color:pe.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"});if(J){const ae=pe.removePermission(e.id,Z,n);h.actions.updatePrivileges(ae)}},P=async()=>{const{confirmed:Z}=await h.actions.openModal({title:"Reset Permissions",type:pe.ModalType.CONFIRM,color:pe.ModalColor.DANGER,message:"Are you sure you want to reset permissions for this Privilege?",icon:"FdWarningDanger"});if(Z){const J=pe.resetResources(e.id,n);h.actions.updatePrivileges(J)}},B=C.useMemo(()=>y.length>0?T.filter(Z=>y.includes(Z.type)):T,[T,y]),X=C.useMemo(()=>B.filter(({resource:Z})=>x?new RegExp(Xi.escapeRegExp(x),"i").test(Z):!0),[B,x]),Q=C.useMemo(()=>ace(X),[X]),D=C.useMemo(()=>Q.filter(Z=>{const J=Z.permissions.every(ae=>!ae.checked)&&Z.permissions.some(ae=>ae.from.length>0);return r||!J}),[Q,r]),$=(Z,J)=>{const ae=`${Z.resource}|${Z.type}|${J.name}`;E(he=>({...he,[ae]:!J.checked})),setTimeout(()=>{const he=pe.togglePermission(e.id,Z,J,n);h.actions.updatePrivileges(he)},0)},H=C.useMemo(()=>D.some(Z=>Z.exists===!1),[D]),q=async()=>{const{confirmed:Z}=await h.actions.openModal({title:"Delete Privilege",type:pe.ModalType.CONFIRM,color:pe.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"}),J=Object.entries(I).map(([ae,he])=>{const ue=he.resources.filter(de=>!de.exists);return{[ae]:ue.map(de=>({applyTo:de.resource,type:de.type}))}}).reduce((ae,he)=>({...ae,...he}),{});if(Z){const ae=pe.removeMultiplePermissions(J,n);h.actions.updatePrivileges(ae)}},Y=C.useRef(null),ie=cd({count:D.length,getScrollElement:()=>{var Z;return((Z=Y.current)==null?void 0:Z.getScrollElement())??null},estimateSize:()=>36,overscan:5});return C.useEffect(()=>{var Z,J;(J=(Z=Y.current)==null?void 0:Z.getScrollElement())==null||J.scrollTo({top:0})},[N]),O.jsxs(hf,{ref:Y,className:"z-20 h-full flex-1 overflow-auto p-3.75 pt-0",style:{maxHeight:"calc(100vh - 5.5rem - 85px - 20px)"},children:[O.jsxs("table",{className:"relative h-full w-full border-collapse",children:[O.jsx("thead",{className:"sticky top-0 z-20 bg-panel-1",children:O.jsxs("tr",{className:"border-b border-panel-border-subtle",children:[O.jsx("td",{className:"py-2",children:O.jsxs("div",{className:"flex items-center gap-x-2",children:[O.jsx(wt.Root,{className:"relative w-56",children:O.jsxs(wt.Group,{children:[O.jsx(wt.Icon,{children:O.jsx(dj,{})}),O.jsx(wt.Field,{type:"text",placeholder:"Search available permissions",value:g,onChange:Z=>{const J=Z.target.value;w(J),setTimeout(()=>_(J),0)}}),O.jsx(wn.Popover,{className:"flex items-center",children:({open:Z})=>O.jsxs(O.Fragment,{children:[O.jsx(wn.Popover.Button,{ref:a,children:O.jsx(wt.Icon,{isAction:!0,children:O.jsx(JD,{})})}),Z&&O.jsx(ef,{children:O.jsx(wn.Popover.Panel,{ref:c,style:d.popper,...u.popper,className:"z-50",static:!0,children:O.jsxs(br,{depth:3,borderType:"light",className:"rounded-md border px-4 py-2.5",children:[O.jsxs("label",{className:"mb-2 flex cursor-pointer items-center gap-2",children:[O.jsx(ir,{size:"sm",value:A?null:U,onChange:()=>U?G():te()}),O.jsx("h5",{className:"text-sm font-semibold",children:"Filter"})]}),O.jsxs("div",{className:"space-y-2 text-s",children:[O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:ha(p,bo.dataclass),onChange:()=>W("dataclass"),label:"Dataclass"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:ha(p,bo.singleton),onChange:()=>W("singleton"),label:"Singleton"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:V?null:K,onChange:()=>W("functions"),label:"Functions"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:ha(p,bo.attribute),onChange:()=>W("attribute"),label:"Attribute"})})]})]})})})]})})]})}),O.jsx(oce,{privilegeId:N,privileges:I}),O.jsx("div",{children:O.jsx(Lr,{label:`Resetting the privilege will remove all configured\r
|
|
119
|
+
ressources`,container:Br(),children:O.jsx(Jt,{color:"white",variant:"ghost",onClick:P,children:O.jsx(SV,{})})})}),O.jsx(Lr,{icon:O.jsx(wi,{}),label:"Delete all the non existing resources from privileges",container:Br(),children:O.jsx(Jt,{color:"white",variant:"ghost",onClick:q,disabled:!H,children:O.jsx(QD,{className:"h-4 w-4"})})})]})}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Read"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Create"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Update"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Delete"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Execute"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Promote"})]})}),D.length?O.jsxs("tbody",{children:[ie.getVirtualItems().length>0?O.jsx("tr",{style:{height:`${ie.getVirtualItems()[0].start}px`},children:O.jsx("td",{colSpan:7})}):null,ie.getVirtualItems().map(Z=>{const J=D[Z.index],ae=J.permissions.some(he=>he.from.length>0);return O.jsxs("tr",{className:an("group even:bg-white/5 hover:bg-input-bg",{"opacity-60":J.exists===!1}),children:[O.jsxs("td",{className:an("group flex items-center gap-3 py-2 text-xs group-hover:rounded-l group-hover:bg-input-bg ",J.exists===!1?"text-negative-text":""),children:[vL(J.type),J.resource,O.jsx(Lr,{label:"Remove Permission",container:Br(),children:O.jsx(Jt,{color:"white",variant:"ghost",disabled:ae,onClick:()=>{ae?pe.toastSubject.next({kind:"info",markdown:!0,message:"**Info:** Inherited permissions can't be removed",customIcon:on}):re({applyTo:J.resource,type:J.type})},className:"opacity-0 group-hover:opacity-100",children:O.jsx(ja,{className:"h-4 w-4 rotate-45 transform"})})})]}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:O.jsx(fa,{permissions:J.permissions,showIncluded:r,label:"read",onToggle:he=>$(J,he),onSelect:t,privileges:n,exists:J.exists,optimisticChecked:S[`${J.resource}|${J.type}|read`]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:O.jsx(fa,{permissions:J.permissions,showIncluded:r,label:"create",onToggle:he=>$(J,he),onSelect:t,privileges:n,exists:J.exists,optimisticChecked:S[`${J.resource}|${J.type}|create`]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:O.jsx(fa,{permissions:J.permissions,showIncluded:r,label:"update",onToggle:he=>$(J,he),onSelect:t,privileges:n,exists:J.exists,optimisticChecked:S[`${J.resource}|${J.type}|update`]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:O.jsx(fa,{permissions:J.permissions,showIncluded:r,label:"drop",onToggle:he=>$(J,he),onSelect:t,privileges:n,exists:J.exists,optimisticChecked:S[`${J.resource}|${J.type}|drop`]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:O.jsx(fa,{promoted:M[J.resource],permissions:J.permissions,showIncluded:r,label:"execute",onToggle:he=>$(J,he),onSelect:t,privileges:n,exists:J.exists,optimisticChecked:S[`${J.resource}|${J.type}|execute`]})}),O.jsx("td",{className:"py-2 text-center group-hover:rounded-r group-hover:bg-input-bg",children:O.jsx(fa,{permissions:J.permissions,showIncluded:r,label:"promote",onToggle:he=>$(J,he),onSelect:t,privileges:n,exists:J.exists,optimisticChecked:S[`${J.resource}|${J.type}|promote`]})})]},`${J.resource}-${Z.index}`)}),(()=>{const Z=ie.getVirtualItems();if(!Z.length)return null;const J=ie.getTotalSize()-Z[Z.length-1].end;return J>0?O.jsx("tr",{style:{height:`${J}px`},children:O.jsx("td",{colSpan:7})}):null})()]}):null]}),!Q.length&&x?O.jsx(VD,{children:"The Permission you're looking for can't be found "}):null,!Q.length&&!x?O.jsxs(VD,{children:["This Privilege has no Permissions configured yet ",O.jsx("br",{}),'Add a new permission by using the "Create a permission" input above']}):null]})},dce=({onCreate:e})=>{const t=Tr(),r=t.getPrivileges(),[n,i]=C.useState(null),[o,a]=C.useState(null),[s,c]=C.useState(""),[d,u]=C.useState(null),{styles:h,attributes:p}=Cd(n,o,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});C.useEffect(()=>{c(""),u(null)},[o]);const v=(y=()=>{})=>{u(null);try{const m=pe.createPrivilege(s,r),g=Object.values(m).find(w=>w.privilege===s);t.actions.updatePrivileges(m),g&&e(g),setTimeout(()=>{y()},0)}catch(m){u(m.message)}};return O.jsx(wn.Popover,{children:({open:y,close:m})=>O.jsxs(O.Fragment,{children:[O.jsx(wn.Popover.Button,{className:"rounded","data-cy":"New-priv-btn",as:"div",ref:i,children:O.jsx(Jt,{variant:"ghost",color:"white",children:O.jsx(ja,{className:"h-4 w-4"})})}),y&&O.jsx(ef,{children:O.jsx(wn.Popover.Panel,{ref:a,style:h.popper,...p.popper,"data-cy":"New-priv-pop-up",className:"z-50",static:!0,children:O.jsxs(br,{className:"min-w-[256px] border rounded px-4 py-2 text-xs shadow-md",depth:3,borderType:"light",children:[O.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Privilege"}),O.jsx("div",{className:"mt-2",children:O.jsxs("label",{className:"flex items-center gap-x-4",children:[O.jsx("span",{children:"Name"}),O.jsx(wt.Root,{className:"w-full",color:d?"negative":"primary",children:O.jsxs(wt.Group,{children:[d&&O.jsx(wt.Message,{children:d}),O.jsx(wt.Field,{autoFocus:!0,value:s,onChange:g=>c(g.target.value),onKeyDown:g=>{g.key==="Enter"&&v()},type:"text"})]})})]})}),O.jsxs("div",{className:"mt-4 flex items-center justify-center gap-x-2",children:[O.jsx(Jt,{onClick:()=>v(m),children:"Create"}),O.jsx(Jt,{color:"white",variant:"outline",onClick:()=>m(),children:"Cancel"})]})]})})})]})})},fce=()=>{const e=Tr(),t=e.getCatalog(),r=e.getPrivileges(),[n,i]=C.useState(r);C.useEffect(()=>{const y=setTimeout(()=>i(r),0);return()=>clearTimeout(y)},[r]);const o=C.useMemo(()=>{if(t===null)return n;const y=sz(n,Object.values((t==null?void 0:t.dataClasses)??{}));return lz(y,t)},[n,t]),[a,s]=C.useState(null),[c,d]=C.useState(null),u=y=>{s(y),setTimeout(()=>d(y),0)},h=C.useMemo(()=>Object.keys(o),[o]);C.useEffect(()=>{if(a&&o[a.id]||!h.length)return;const y=o[h[0]];s(y),d(y)},[o]),C.useEffect(()=>{h.length<2&&v(!0)},[h.length]);const[p,v]=C.useState(!0);return O.jsxs("div",{className:"flex h-full min-h-0 min-w-0 flex-1",children:[O.jsxs(br,{depth:1,className:"flex h-full w-89 shrink-0 flex-col border-r",children:[O.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between px-3.5 py-2.5",children:[O.jsxs("div",{className:"flex items-center gap-x-1",children:[O.jsx("span",{children:O.jsx(pd,{className:"h-3.5 w-3.5"})}),O.jsx("span",{className:"text-[11px] font-semibold",children:"Privileges"})]}),O.jsx(dce,{onCreate:y=>{s(y),d(y)}})]}),O.jsx(lse,{privileges:o,selectedPrivilege:a,selectPrivilege:u})]}),a&&o[a.id]?O.jsxs(br,{depth:1,className:"privileges-container relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden border-l-[0.5px]",children:[O.jsxs("div",{className:"mb-1 flex min-h-0 min-w-0 flex-1 h-full w-full flex-col items-stretch overflow-auto",children:[(c??a).privilege!=="guest"?O.jsx(Yae,{privileges:o,selectedPrivilege:c??a,onSelect:y=>s(r[y]),setShowIncluded:v,showIncluded:p}):null,O.jsx(uce,{privileges:o,rawPrivileges:r,selectedPrivilege:c??a,onSelect:y=>s(r[y]),showIncluded:p})]}),O.jsx("div",{className:"mt-auto flex-shrink-0",children:O.jsx(hce,{privileges:o,selectedPrivilege:c??a,setSelectedPrivilege:s})})]}):O.jsx(U4,{tab:"Privilege"})]})},hce=({privileges:e,selectedPrivilege:t,setSelectedPrivilege:r})=>{const[n,i]=C.useState(!1);return O.jsx(pe.Panel,{path:pe.ROLES_TAB_PATH,isOpen:n,onOpen:()=>i(!0),onClose:()=>i(!1),children:O.jsx("div",{className:"flex h-full w-full min-h-0 px-3 pb-3",children:O.jsx(br,{depth:2,className:"h-full w-full overflow-hidden rounded",children:O.jsx(oae,{dict:e,data:pe.getGraphData(t.id,e),onSelect:o=>r(e[o])})})})})},pce=C.memo(({role:e})=>{var E;const t=Tr(),[r,n]=C.useState(e),[i,o]=C.useState(e.role),[a,s]=C.useState(null),c=t.getPrivileges(),d=((E=r.privileges)==null?void 0:E.filter(I=>c[I]&&c[I].privilege!=="guest").length)||0,u=t.getRoles(),{selectedRole:h,selectRole:p}=cS(),[v,y]=C.useState(!1),m=pe.useOutsideClick(()=>{v&&w()});pe.useDidMountEffect(()=>{i!==e.role&&o(e.role)},[e.role]),C.useEffect(()=>{e.role||y(!0)},[]),C.useEffect(()=>{n(e)},[e]);const g=()=>{s(null),y(!0)},w=()=>{s(null),e.role&&e.role===i&&y(!1);try{const I=pe.saveRole({...r,role:i},u);t.actions.updateRoles(I),y(!1)}catch(I){s(I.message)}},x=async I=>{if(I.stopPropagation(),t.getHost()==="vscode"){_();return}const{confirmed:N}=await t.actions.openModal({title:"Delete Role",type:pe.ModalType.CONFIRM,color:pe.ModalColor.DANGER,message:"Are you sure you want to remove this Role?",icon:"FdWarningDanger"});N&&_()},_=()=>{const I=pe.removeRole(r.id,u),N=Object.keys(I);if(h!==r.id){t.actions.updateRoles(I);return}if(N.length===0)p(null);else{const T=Object.keys(u),M=T.indexOf(r.id),z=Math.max(0,M-1),j=T[z];M===0?p(N[0]):I[j]?p(j):p(N[0])}t.actions.updateRoles(I)},S=(I=null)=>{if(I&&I.stopPropagation(),!e.role){_();return}y(!1),o(e.role)};return O.jsx(O.Fragment,{children:O.jsxs(br,{depth:4,borderType:h===r.id?"primary":h!==r.id?"light":"default",className:an("rounded border p-2"),role:"button","data-cy":"privilegeCard",onClick:()=>{p(r.id)},ref:m,children:[O.jsx("div",{className:"flex items-center justify-between",children:O.jsxs("div",{className:"flex flex-1 items-center",children:[O.jsx("span",{className:"mr-4",children:O.jsx(pd,{className:"h-6 w-6"})}),v?O.jsxs(wt.Root,{color:a?"negative":"primary",className:"flex-1 mr-2",children:[O.jsx(wt.Group,{className:"border-input-focus-border",children:O.jsx(wt.Field,{type:"text",value:i,onChange:({target:{value:I}})=>{o(I)},onKeyDown:I=>{I.key==="Enter"&&w(),I.key==="Escape"&&S()},placeholder:"role",autoComplete:"off",autoFocus:!0})}),a&&O.jsx(wt.Message,{children:a})]}):O.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",title:i,children:r.role}),O.jsx("div",{className:an("justify-between ml-auto flex w-fit items-center gap-x-2"),children:v?O.jsxs(O.Fragment,{children:[O.jsx(Jt,{color:"white",variant:"ghost",onClick:w,children:O.jsx(_V,{className:"h-4 w-4"})}),O.jsx(Jt,{color:"white",variant:"ghost",onClick:S,children:O.jsx(ej,{className:"h-4 w-4"})})]}):O.jsxs(O.Fragment,{children:[O.jsx(Jt,{color:"white",variant:"ghost",onClick:g,children:O.jsx(cj,{className:"h-4 w-4"})}),O.jsx(Jt,{color:"white",variant:"ghost",onClick:I=>x(I),children:O.jsx(pj,{className:"h-4 w-4"})})]})})]})}),O.jsxs("span",{className:an("ml-10.75 py-1 text-xs"),children:[d," Privilege",d>1?"s":""]})]})})}),gL=(e,t)=>e?t[e]:null,WD=(e,t,r)=>{const n=gL(e,r);return n?Object.values(r).reduce((i,o)=>o.id===e?n.privileges.includes(t)?{...i,[n.id]:{...n,privileges:n.privileges.filter(a=>a!==t)}}:{...i,[n.id]:{...n,privileges:[...n.privileges,t]}}:{...i,[o.id]:o},{}):r},vce=()=>{const e=Tr(),t=e.getPrivileges(),r=e.getRoles(),{selectedRole:n}=cS(),i=gL(n,r),o=(c,d)=>d&&d.privileges.includes(c.id),a=C.useMemo(()=>Object.values(t).filter(c=>o(c,i)&&c.privilege!=="guest"),[t,i]),s=C.useMemo(()=>Object.values(t).filter(c=>!o(c,i)&&c.privilege!=="guest"),[t,i]);return O.jsxs(br,{depth:1,className:"w-full border-b p-4 ",children:[O.jsx("div",{className:"mb-4 flex items-center gap-x-5",children:O.jsx("h4",{className:"text-[13px] font-semibold ",children:"Privileges"})}),O.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[O.jsx(vu,{"data-cy":"item=>Permisions",className:"italic opacity-90",children:"guest"}),a.map((c,d)=>O.jsxs(vu,{"data-cy":"item=>Permisions",color:"primary",onClick:()=>{const u=WD(i.id,c.id,r);e.actions.updateRoles(u)},children:[c.privilege,O.jsx(Tu.FdPlus,{className:"rotate-45 transform"})]},d)),s.map((c,d)=>O.jsxs(vu,{"data-cy":"item=>Permisions",color:"dark",onClick:()=>{const u=WD(i.id,c.id,r);e.actions.updateRoles(u)},children:[c.privilege,O.jsx(Tu.FdPlus,{})]},d))]})]})},fd=(e,t,r,n=!1)=>{const i=e.applyTo,o=e.type===pe.EPermissionType.DATACLASS?"ds":i.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()},d=h=>{h.forEach(p=>{a[p]&&(a[p].resources.forEach(v=>{if(v.resource===i||v.resource===o){const y=fd(e,t,{[p]:a[p]},n);Object.values(v.permissions).forEach(m=>{c[m.name].explicitly||(!c[m.name].from.includes(a[p].privilege)&&m.checked&&c[m.name].from.push(a[p].privilege),c[m.name].inherited=c[m.name].inherited||y[m.name].value||y[m.name].inherited)})}}),a[p].includes.length>0&&d(a[p].includes))})};if(Object.values(r).forEach(h=>{h.resources.forEach(p=>{p.resource===i&&Object.values(p.permissions).forEach(v=>{v.checked&&(c[v.name].explicitly=!0,n&&(c[v.name].value=!0))})}),(h.includes.length>0||h.privilege==="guest")&&d(h.includes)}),Object.values(t).forEach(h=>{h.resources.forEach(p=>{p.resource===i&&(h.privilege==="guest"?Object.values(p.permissions).forEach(v=>{v.checked&&(c[v.name].explicitly=!0,n&&(c[v.name].value=!0))}):Object.values(p.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(([h,p])=>h!=="promote"&&!p.value&&!p.explicitly):Object.entries(c).some(([h,p])=>h!=="promote"&&p.value&&!p.explicitly))&&![pe.EPermissionType.DATASTORE,pe.EPermissionType.SINGLETON].includes(e.type)){const h={applyTo:o,type:e.type===pe.EPermissionType.DATACLASS?pe.EPermissionType.DATASTORE:e.type===pe.EPermissionType.SINGLETON_METHOD?pe.EPermissionType.SINGLETON:pe.EPermissionType.DATACLASS},p=fd(h,t,r,n),v=y=>{let m=c[y].value;return n?!c[y].value&&!c[y].explicitly&&(m=p[y].value):c[y].value&&!c[y].explicitly&&(m=p[y].value),{value:m,inherited:c[y].inherited||p[y].inherited,from:c[y].from.length>0?c[y].from:p[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}},gce=({children:e})=>O.jsx("div",{className:"h-full w-full",children:O.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center",children:O.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-4 py-4 text-inactive-text",children:[O.jsx(on,{className:"absolute -right-full h-10 w-10 translate-x-1"}),O.jsx("div",{className:"text-center text-sm",children:e})]})})}),mce=e=>{switch(e){case"dataclass":return O.jsx(Pu,{className:"h-6 w-6"});case"singleton":return O.jsx(fj,{className:"h-6 w-6"});case"datastore":return O.jsx(lj,{className:"h-6 w-6"});case"attribute":return O.jsx(hj,{className:"h-6 w-6"});case"method":return O.jsx(tj,{className:"h-6 w-6"});case"singletonMethod":return O.jsx(sj,{className:"h-6 w-6"});case"entityselMethod":return O.jsx(aj,{className:"h-6 w-6"});case"entityMethod":return O.jsx(oj,{className:"h-6 w-6"});case"dsMethod":return O.jsx(ij,{className:"h-6 w-6"});case"dataclassMethod":return O.jsx(nj,{className:"h-6 w-6"});default:return O.jsx(Pu,{className:"h-6 w-6"})}},UD=({privileges:e,permission:t,hasChild:r,depth:n,isChild:i=!1,className:o,inSearch:a,toggleCollapse:s,collapsed:c,isRestrictedByDefault:d,toastMessageCallback:u,computedInherited:h})=>{const[p,v]=t.applyTo.split("."),y=C.useMemo(()=>h||fd(t,e.otherPrivs,e.rolePrivs,d),[h,e,t,d]);return O.jsxs("tr",{className:an("group even:bg-white/5 hover:bg-input-bg",o),children:[O.jsxs("td",{className:an("flex h-full w-full items-stretch gap-3 p-0 text-xs group-hover:rounded-l group-hover:bg-input-bg",{"px-1":a}),children:[Array(n).fill("").map((m,g)=>O.jsx("div",{className:an("ml-1.5 mr-1 w-[2px] bg-muted",{"mr-0.5":i})},g)),O.jsxs("div",{className:"flex items-center gap-3 py-2",children:[r&&O.jsx("button",{onClick:s,className:"w-3",children:c?O.jsx(uj,{className:"inline h-4 w-4"}):O.jsx(rj,{className:"inline h-4 w-4"})}),mce(t.type),a?t.applyTo:v||p]})]}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:[pe.EPermissionType.ATTRIBUTE,pe.EPermissionType.DATASTORE,pe.EPermissionType.DATACLASS].includes(t.type)&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",onClick:u,children:[O.jsx(ir,{value:y.read.value||y.read.inherited,isDisabled:!0}),O.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!y.read.value&&y.read.inherited?O.jsx(Lr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:y.read.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(wi,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:y.read.from.map((m,g)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},g))})]})]}):null}),children:O.jsx(on,{className:"h-4 w-4"})}):""})]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:[pe.EPermissionType.ATTRIBUTE,pe.EPermissionType.DATASTORE,pe.EPermissionType.DATACLASS].includes(t.type)&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",onClick:u,children:[O.jsx(ir,{value:y.create.value||y.create.inherited,isDisabled:!0}),O.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!y.create.value&&y.create.inherited?O.jsx(Lr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:y.read.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(wi,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:y.read.from.map((m,g)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},g))})]})]}):null}),children:O.jsx(on,{className:"h-4 w-4"})}):""})]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:[pe.EPermissionType.ATTRIBUTE,pe.EPermissionType.DATASTORE,pe.EPermissionType.DATACLASS].includes(t.type)&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",onClick:u,children:[O.jsx(ir,{value:y.update.value||y.update.inherited,isDisabled:!0}),O.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!y.update.value&&y.update.inherited?O.jsx(Lr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:y.update.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(wi,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:y.update.from.map((m,g)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},g))})]})]}):null}),children:O.jsx(on,{className:"h-4 w-4"})}):""})]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:[pe.EPermissionType.ATTRIBUTE,pe.EPermissionType.DATASTORE,pe.EPermissionType.DATACLASS].includes(t.type)&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",onClick:u,children:[O.jsx(ir,{value:y.drop.value||y.drop.inherited,isDisabled:!0}),O.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!y.drop.value&&y.drop.inherited?O.jsx(Lr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:y.drop.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(wi,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:y.drop.from.map((m,g)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},g))})]})]}):null}),children:O.jsx(on,{className:"h-4 w-4"})}):""})]})}),O.jsx("td",{className:"py-2 text-center group-hover:rounded-r group-hover:bg-input-bg",children:t.type!=="attribute"&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",onClick:u,children:[O.jsx(ir,{value:y.execute.value||y.execute.inherited,isDisabled:!0}),O.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!y.execute.value&&y.execute.inherited?O.jsx(Lr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:y.execute.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(wi,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:y.execute.from.map((m,g)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},g))})]})]}):null}),children:O.jsx(on,{className:"h-4 w-4"})}):""})]})})]})};function GD(e,t,r){const n=[],i=(a,s,c)=>n.push({id:a,permission:s,depth:c,hasChild:!1,isChild:!1}),o=(a,s,c,d,u,h)=>{n.push({id:a,permission:s,depth:c,hasChild:!0,isChild:d,toggleId:a,isCollapsed:u}),u||h()};for(const a of Object.values(e)){o("ds-group",{applyTo:a.applyTo,type:a.type},0,!1,t,()=>{for(const s of a.methods)i(`dsm-${s.applyTo}`,s,1);for(const s of a.dataClasses){const c=`dc-${s.applyTo}`;o(c,{applyTo:s.applyTo,type:s.type},1,!0,r[c]??!1,()=>{for(const d of s.attributes)i(`dca-${d.applyTo}`,d,2);for(const d of s.methods)i(`dcm-${d.applyTo}`,d,2)})}});for(const s of a.singletons){const c=`sing-${s.applyTo}`;o(c,{applyTo:s.applyTo,type:s.type},0,!0,r[c]??!1,()=>{for(const d of s.attributes)i(`singa-${d.applyTo}`,d,1);for(const d of s.methods)i(`singm-${d.applyTo}`,d,1)})}}return n}const KD=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],yo={datastore:["datastore"],dataclass:["dataclass"],singleton:["singleton"],functions:["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"],attribute:["attribute"]},YD=Object.values(yo).flat();function pa(e,t){return t.length>0&&t.every(r=>e.includes(r))}function bce(e,t){return Array.from(new Set([...e,...t]))}function yce(e,t){return e.filter(r=>!t.includes(r))}const xce=({selectedRole:e})=>{const[t,r]=C.useState(null),[n,i]=C.useState(null),{styles:o,attributes:a}=Cd(t,n,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),s=Tr(),c=s.getRestrictedByDefault(),d=s.getPrivileges(),[u,h]=C.useState([]),[p,v]=C.useState([]),[y,m]=C.useState(""),[g,w]=C.useState("");C.useEffect(()=>{const J=setTimeout(()=>v(u),0);return()=>clearTimeout(J)},[u]);const x=s.getCatalogMethods(),_=s.getDataclasses(),S=s.getSingletons(),E=C.useMemo(()=>sae(x,Object.values(_),Object.values(S)),[x,_,S]),I=C.useMemo(()=>!p.length&&!g?[]:[...US(g,x,Object.values(_),Object.values(S))].filter(J=>p.length?p.includes(J.type):!0).sort((J,ae)=>{const he=KD.indexOf(J.type),ue=KD.indexOf(ae.type);return he!==ue?he-ue:J.applyTo.toLowerCase()>ae.applyTo.toLowerCase()?1:-1}),[g,p,x,_,S]),N=J=>h([...J]),T=J=>{h(ae=>pa(ae,J)?yce(ae,J):bce(ae,J))},M=J=>T(yo[J]),z=YD.every(J=>u.includes(J)),j=u.length>0&&!z,W=pa(u,yo.functions),U=()=>N(YD),A=()=>N([]),K=s.getRoles(),[V,te]=C.useState(K);C.useEffect(()=>{const J=setTimeout(()=>te(K),0);return()=>clearTimeout(J)},[K]);const G=C.useRef(null);C.useEffect(()=>{var J,ae;(ae=(J=G.current)==null?void 0:J.getScrollElement())==null||ae.scrollTo({top:0})},[e]);const re=cd({count:I.length,getScrollElement:()=>{var J;return((J=G.current)==null?void 0:J.getScrollElement())??null},estimateSize:()=>36,overscan:5,paddingEnd:40}),P=C.useMemo(()=>{const J=Object.values(d).find(le=>le.privilege==="guest"),ae=V[e],he=ae?Object.fromEntries(ae.privileges.map(le=>[le,d[le]]).filter(([,le])=>!!le)):{};if(c)return{rolePrivs:he,otherPrivs:J?{[J.id]:J}:{}};const ue=J?{[J.id]:{...J,active:!0}}:{},de=Object.fromEntries(Object.entries(d).filter(([le])=>le!==(J==null?void 0:J.id)&&!(ae!=null&&ae.privileges.includes(le))).map(([le,xe])=>[le,{...xe,active:!1}]));return{rolePrivs:he,otherPrivs:{...ue,...de}}},[d,V,e,c]),[B,X]=C.useState(!1),[Q,D]=C.useState({}),$=C.useMemo(()=>{const J=[];for(const ae of Object.values(E)){for(const he of ae.dataClasses)J.push(`dc-${he.applyTo}`);for(const he of ae.singletons)J.push(`sing-${he.applyTo}`)}return J},[E]),H=$.length>0&&$.every(J=>Q[J]===!0),q=C.useCallback(()=>{const J={};for(const ae of $)J[ae]=!0;D(J)},[$]),Y=C.useCallback(J=>{J==="ds-group"?X(ae=>!ae):D(ae=>({...ae,[J]:!ae[J]}))},[]),ie=C.useMemo(()=>{const J=new Map;for(const{permission:ae}of GD(E,!1,{}))J.set(`${ae.applyTo}|${ae.type}`,fd(ae,P.otherPrivs,P.rolePrivs,c));return J},[P,c,E]),ne=C.useMemo(()=>GD(E,B,Q),[E,B,Q]),ve=cd({count:ne.length,getScrollElement:()=>{var J;return((J=G.current)==null?void 0:J.getScrollElement())??null},estimateSize:()=>36,overscan:8,paddingEnd:15}),Z=C.useCallback(()=>{pe.toastSubject.next({kind:"info",markdown:!0,message:"**Info:** You can add or modify permissions only in the Privilege section.",customIcon:Ew})},[]);return O.jsxs(hf,{ref:G,className:"z-20 h-full flex-1 overflow-auto p-3.75 pt-0",style:{maxHeight:"calc(100vh - 5.5rem - 85px - 20px)"},children:[O.jsxs("table",{className:"relative h-full w-full border-collapse",children:[O.jsx("thead",{className:"sticky top-0 z-20 bg-panel-1",children:O.jsxs("tr",{className:"border-b border-grey-100",children:[O.jsx("td",{className:"py-2",children:O.jsxs("div",{className:"flex items-center gap-x-2",children:[O.jsx(Lr,{label:"Collapse All",position:"up",container:Br(),children:O.jsx(Jt,{color:"white",variant:"ghost",disabled:B&&H,onClick:()=>{H?(q(),X(!0)):q()},children:O.jsx(yV,{})})}),O.jsx(wt.Root,{className:"w-56",children:O.jsxs(wt.Group,{children:[O.jsx(wt.Icon,{children:O.jsx(dj,{})}),O.jsx(wt.Field,{type:"text",placeholder:"Search",value:y,onChange:J=>{const ae=J.target.value;m(ae),setTimeout(()=>w(ae),0)}}),O.jsx(wn.Popover,{className:"flex items-center",children:({open:J})=>O.jsxs(O.Fragment,{children:[O.jsx(wn.Popover.Button,{ref:r,children:O.jsx(wt.Icon,{isAction:!0,children:O.jsx(JD,{})})}),J&&O.jsx(ef,{children:O.jsx(wn.Popover.Panel,{ref:i,style:o.popper,...a.popper,className:"z-50",static:!0,children:O.jsxs(br,{depth:3,borderType:"light",className:"rounded-md border px-4 py-2.5 text-xs",children:[O.jsxs("label",{className:"mb-2 flex cursor-pointer items-center gap-2",children:[O.jsx(ir,{size:"sm",value:j?null:z,onChange:()=>z?A():U()}),O.jsx("h5",{className:"text-sm font-semibold",children:"Filter"})]}),O.jsxs("div",{className:"space-y-2 text-s",children:[O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:pa(u,yo.datastore),onChange:()=>M("datastore"),label:"Datastore"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:pa(u,yo.dataclass),onChange:()=>M("dataclass"),label:"Dataclass"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:pa(u,yo.singleton),onChange:()=>M("singleton"),label:"Singleton"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:W,onChange:()=>M("functions"),label:"Functions"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:pa(u,yo.attribute),onChange:()=>M("attribute"),label:"Attribute"})})]})]})})})]})})]})})]})}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"read"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Create"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Update"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Delete"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Execute"})]})}),O.jsx("tbody",{className:"relative",children:p.length||g?O.jsxs(O.Fragment,{children:[re.getVirtualItems().length>0?O.jsx("tr",{style:{height:`${re.getVirtualItems()[0].start}px`},children:O.jsx("td",{colSpan:6})}):null,re.getVirtualItems().map(J=>{const ae=I[J.index];return O.jsx(UD,{privileges:P,permission:ae,depth:0,inSearch:!0,isRestrictedByDefault:c,allPrivileges:d,toastMessageCallback:Z,computedInherited:ie.get(`${ae.applyTo}|${ae.type}`)},`${ae.type}-${J.index}`)}),(()=>{const J=re.getVirtualItems();if(!J.length)return null;const ae=re.getTotalSize()-J[J.length-1].end;return ae>0?O.jsx("tr",{style:{height:`${ae}px`},children:O.jsx("td",{colSpan:6})}):null})()]}):O.jsxs(O.Fragment,{children:[ve.getVirtualItems().length>0?O.jsx("tr",{style:{height:`${ve.getVirtualItems()[0].start}px`},children:O.jsx("td",{colSpan:6})}):null,ve.getVirtualItems().map(J=>{const ae=ne[J.index];return O.jsx(UD,{privileges:P,permission:ae.permission,depth:ae.depth,hasChild:ae.hasChild,isChild:ae.isChild,collapsed:ae.isCollapsed,toggleCollapse:ae.toggleId?()=>Y(ae.toggleId):void 0,isRestrictedByDefault:c,allPrivileges:d,toastMessageCallback:Z,computedInherited:ie.get(`${ae.permission.applyTo}|${ae.permission.type}`)},ae.id)}),(()=>{const J=ve.getVirtualItems();if(!J.length)return null;const ae=ve.getTotalSize()-J[J.length-1].end;return ae>0?O.jsx("tr",{style:{height:`${ae}px`},children:O.jsx("td",{colSpan:6})}):null})()]})})]}),(g||p.length)&&!I.length?O.jsx(gce,{children:"The Permission you're looking for can't be found "}):null]})},wce=()=>O.jsx("div",{className:"flex flex-1 items-center justify-center",children:O.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-grey-200 border-t-primary-dark"})}),Sce=()=>{const e=Tr(),t=e.getRoles(),[r,n]=C.useState(null),[i,o]=C.useState(null),[a,s]=C.useState(""),[c,d]=C.useState(null),{styles:u,attributes:h}=Cd(r,i,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});C.useEffect(()=>{s(""),d(null)},[i]);const p=()=>{if(!a)throw new Error("Please enter a valid name");if(Object.values(t).find(g=>g.role.toLowerCase()===a.toLowerCase()))throw new Error(`A role with the name ${a} already exists`);const y=yz.generate(),m=pe.createRole(y,a,t);e.actions.updateRoles(m)};return O.jsx(wn.Popover,{children:({open:v,close:y})=>{const m=()=>{d(null);try{pe.validateName(a),p(),y()}catch(g){d(g.message)}};return O.jsxs(O.Fragment,{children:[O.jsx(wn.Popover.Button,{className:"rounded","data-cy":"New-priv-btn",as:"div",ref:n,children:O.jsx(Jt,{variant:"ghost",color:"white",children:O.jsx(ja,{className:"h-4 w-4"})})}),v&&O.jsx(ef,{children:O.jsx(wn.Popover.Panel,{ref:o,style:u.popper,...h.popper,"data-cy":"New-priv-pop-up",className:"z-50",static:!0,children:O.jsxs(br,{className:"min-w-[256px] border rounded px-4 py-2 text-xs shadow-md",depth:3,borderType:"light",children:[O.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Role"}),O.jsx("div",{className:"mt-2",children:O.jsxs("label",{className:"flex items-center gap-x-4",children:[O.jsx("span",{children:"Name"}),O.jsx(wt.Root,{color:c?"negative":"primary",className:"w-full",children:O.jsxs(wt.Group,{children:[c&&O.jsx(wt.Message,{children:c}),O.jsx(wt.Field,{autoFocus:!0,value:a,onChange:g=>s(g.target.value),onKeyDown:g=>{g.key==="Enter"&&m()},type:"text"})]})})]})}),O.jsxs("div",{className:"mt-4 flex items-center justify-center gap-x-2",children:[O.jsx(Jt,{onClick:()=>{m()},children:"Create"}),O.jsx(Jt,{color:"white",variant:"outline",onClick:()=>y(),children:"Cancel"})]})]})})})]})}})},Ece=()=>{const e=Tr(),t=e.getRoles(),r=e.getPrivileges(),{selectedRole:n,deferredSelectedRole:i}=cS(),o=C.useMemo(()=>Object.values(t).sort((a,s)=>pe.localeCompare(a.role,s.role)),[t]);return O.jsxs("div",{className:"flex flex-1 h-full",children:[O.jsxs(br,{depth:1,className:"flex h-full w-89 flex-col border-r",children:[O.jsxs("div",{className:"flex shrink-0 items-center justify-between px-3.5 py-2.5",children:[O.jsxs("div",{className:"flex items-center gap-x-1",children:[O.jsx("span",{children:O.jsx(pd,{className:"h-3.5 w-3.5"})}),O.jsx("span",{className:"text-[11px] font-semibold",children:"Roles"})]}),O.jsx(Sce,{})]}),O.jsx("div",{className:"flex-1 overflow-auto p-4 pb-10 pt-1",children:o.length>0?O.jsx("div",{className:"flex flex-col gap-4",children:o.map(a=>O.jsx(pce,{role:a,privileges:r},a.id))}):O.jsx("div",{className:"flex h-full items-center justify-center",children:O.jsx("div",{className:"flex flex-1 items-center justify-center text-inactive-text",children:O.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[O.jsx(on,{className:"h-10 w-10"}),O.jsx("div",{className:"font-semibold",children:"There are no roles"}),O.jsxs("div",{className:"flex items-center text-sm",children:["Create a new role by clicking on the"," ",O.jsx(ja,{className:"ml-2 inline h-4 w-4"})]})]})})})})]}),O.jsx(br,{depth:1,className:an("relative flex h-full w-full flex-1 flex-col items-stretch overflow-x-auto",{"border-l-[0.5px]":n}),children:O.jsx("div",{className:"flex h-full w-full select-none flex-col",children:n?O.jsxs(O.Fragment,{children:[O.jsx(vce,{}),i?O.jsx(xce,{selectedRole:i}):O.jsx(wce,{})]}):O.jsx(U4,{tab:"Role"})})})]})},mL=()=>{const e=Tr(),t=e.getQodly(),r=e.getSelectedTab(),n=e.getForceLogin(),i=e.getRestrictedByDefault(),{canUndo:o,canRedo:a}=e.getHistory(),s=C.useRef();return O.jsx("div",{className:"absolute inset-0 flex flex-1 overflow-hidden",children:O.jsx("div",{className:"relative flex flex-1 overflow-hidden","data-cy":"Roles&Privileges-editor-cy",ref:c=>s.current=c,children:O.jsxs("div",{className:"flex min-h-0 w-full flex-1 flex-col",children:[O.jsx($Y,{activeTab:r,forceLogin:n,restrictedByDefault:i,canUndo:o,canRedo:a,onUndo:e.actions.undo,onRedo:e.actions.redo,onTabChange:c=>{e.actions.toggleTab(c)},onForceLoginChange:c=>{e.actions.toggleForceLogin(c)},onRestrictedByDefaultChange:c=>{e.actions.toggleRestrictedByDefault(c)},qodly:t}),O.jsx("div",{className:r==="roles"?"flex flex-1 overflow-hidden":"hidden",children:O.jsx(VY,{children:O.jsx(Ece,{})})}),O.jsx("div",{className:r==="privileges"?"flex flex-1 overflow-hidden":"hidden",children:O.jsx(fce,{})})]})})})},_ce="object",Oce={forceLogin:{type:"boolean"},restrictedByDefault:{type:"boolean"},privileges:{type:"array",items:{$ref:"#/definitions/Privilege"}},roles:{type:"array",items:{$ref:"#/definitions/Role"}},permissions:{type:"object",properties:{allowed:{type:"array",items:{$ref:"#/definitions/Permission"}}}}},Cce={Privilege:{type:"object",properties:{id:{type:"string"},privilege:{type:"string"},includes:{type:"array",items:{type:"string"}}},required:["privilege"]},Role:{type:"object",properties:{id:{type:"string"},role:{type:"string"},privileges:{type:"array",items:{type:"string"}}},required:["role"]},PermissionEntry:{type:"array",items:{type:"string"}},Permission:{type:"object",properties:{applyTo:{type:"string"},type:{enum:["dataclass","method","attribute","datastore","singleton","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"]},subType:{enum:["dsMethod","dataclassMethod","entityMethod","entityselMethod"]},read:{$ref:"#/definitions/PermissionEntry"},create:{$ref:"#/definitions/PermissionEntry"},update:{$ref:"#/definitions/PermissionEntry"},drop:{$ref:"#/definitions/PermissionEntry"},execute:{$ref:"#/definitions/PermissionEntry"},promote:{$ref:"#/definitions/PermissionEntry"}},required:["applyTo","type"]}},Ice={type:_ce,properties:Oce,definitions:Cce},Rce=()=>{const{modals:e,closeModal:t,editModal:r}=Kae();return O.jsx(O.Fragment,{children:e.map((n,i)=>O.jsx(pe.Modal,{hasOverlay:i===0,...n,onClose:t,onEdit:r,container:Br()},n.id))})},bL=e=>{if(!e)return pe.rolesToAPI(pe.sanitizeRoles({}));try{return pe.rolesToAPI(pe.sanitizeRoles(JSON.parse(e)))}catch{return pe.rolesToAPI(pe.sanitizeRoles({}))}},Nce=({initialValue:e,onChange:t,...r})=>{const n=Tr(),i=n.getRolesFlags(),o=n.getRolesAndPrivileges(),a=C.useMemo(()=>bL(e),[e]),s=C.useRef(o),c=C.useRef(a),d=C.useRef(a);return C.useEffect(()=>{s.current=o},[o]),C.useEffect(()=>{Xi.isEqual(a,d.current)||(d.current=a,c.current=a,!Xi.isEqual(a,s.current)&&n.actions.setRolesContent({content:a,flags:{touched:!1}}))},[n,a]),pe.useDidMountEffect(()=>{if(!(!t||!i.touched)&&!Xi.isEqual(o,c.current))try{const u=JSON.stringify(o,null,2);t(u),c.current=o}catch(u){console.error("[Roles Editor Standalone] Error on value stringify:",u)}},[o,i.touched,t]),O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"relative h-screen z-10 overflow-hidden",children:O.jsx(mL,{...r})}),O.jsx(Rce,{})]})},Tce=e=>{const t=Gae();return O.jsx(dz,{adapter:t,children:O.jsx(pe.TipsProvider,{children:O.jsx(Nce,{...e})})})},Pce=({initialValue:e,catalog:t,history:r,...n})=>{const i=C.useMemo(()=>({...pe.sanitizeRoles(bL(e)),flags:{touched:!1}}),[e]);return O.jsx(Uae,{initialState:i,catalog:t,history:r,children:O.jsx(Tce,{initialValue:e,...n})})};exports.ROLES_EDITOR_SCOPE_CLASS=XD.ROLES_EDITOR_SCOPE_CLASS;exports.EditorStateAdapterProvider=dz;exports.Roles=mL;exports.Standalone=Pce;exports.jsonSchema=Ice;exports.useReduxAdapter=fae;
|
|
120
120
|
//# sourceMappingURL=index.cjs.js.map
|