@flarehr/tfn-declaration-app 2.40.48 → 2.42.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see tfn-declaration-web-component.js.LICENSE.txt */
2
- (()=>{"use strict";var e={725:(e,t,n)=>{n.d(t,{A:()=>w});var r=n(601),o=n.n(r),i=n(314),s=n.n(i),a=n(417),l=n.n(a),u=new URL(n(354),n.b),c=new URL(n(764),n.b),d=new URL(n(945),n.b),f=new URL(n(608),n.b),p=s()(o()),h=l()(u),m=l()(c),$=l()(d),g=l()(f);p.push([e.id,`*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.14 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],input:where(:not([type])),select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem;--tw-shadow:0 0 #0000}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,input:where(:not([type])):focus,select:focus,textarea:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);border-color:#2563eb;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-bottom:0;padding-top:0}select{background-image:url(${h});background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;background-origin:border-box;border-color:#6b7280;border-width:1px;color:#2563eb;display:inline-block;flex-shrink:0;height:1rem;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1rem;--tw-shadow:0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}[type=checkbox]:checked{background-image:url(${m})}@media (forced-colors:active) {[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url(${$})}@media (forced-colors:active) {[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{background-color:currentColor;border-color:transparent}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url(${g});background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}@media (forced-colors:active) {[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:transparent}[type=file]{background:unset;border-color:inherit;border-radius:0;border-width:0;font-size:unset;line-height:inherit;padding:0}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-y-0{bottom:0;top:0}.right-0{right:0}.z-10{z-index:10}.z-50{z-index:50}.-mx-1\\.5{margin-left:-.375rem;margin-right:-.375rem}.-my-1\\.5{margin-bottom:-.375rem;margin-top:-.375rem}.mx-auto{margin-left:auto;margin-right:auto}.my-3{margin-bottom:.75rem;margin-top:.75rem}.my-4{margin-bottom:1rem;margin-top:1rem}.my-8{margin-bottom:2rem;margin-top:2rem}.-ml-px{margin-left:-1px}.mb-0\\.5{margin-bottom:.125rem}.mb-10{margin-bottom:2.5rem}.mb-8{margin-bottom:2rem}.ml-3{margin-left:.75rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-7{margin-top:1.75rem}.mt-8{margin-top:2rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.max-h-60{max-height:15rem}.w-1\\/2{width:50%}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-auto{width:auto}.w-full{width:100%}.max-w-320{max-width:320px}.max-w-560{max-width:560px}.flex-none{flex:none}.flex-grow{flex-grow:1}.cursor-default{cursor:default}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.space-x-0\\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.125rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.125rem*var(--tw-space-x-reverse))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden,.truncate{overflow:hidden}.truncate{text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-l-md{border-bottom-left-radius:.375rem;border-top-left-radius:.375rem}.rounded-r-md{border-bottom-right-radius:.375rem;border-top-right-radius:.375rem}.border{border-width:1px}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity))}.bg-primary-base{background-color:var(--fl-color-primary)}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.p-0\\.5{padding:.125rem}.p-1\\.5{padding:.375rem}.p-4{padding:1rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-3{padding-top:.75rem}.pb-3,.py-3{padding-bottom:.75rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-inter{font-family:Inter,sans-serif}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.leading-3{line-height:.75rem}.leading-5{line-height:1.25rem}.text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity))}.text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity))}.text-primary-base{color:var(--fl-color-primary)}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity))}.text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.placeholder-red-300::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(252 165 165/var(--tw-placeholder-opacity))}.placeholder-red-300::placeholder{--tw-placeholder-opacity:1;color:rgb(252 165 165/var(--tw-placeholder-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.shadow-none,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-black{--tw-ring-opacity:1;--tw-ring-color:rgb(0 0 0/var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity:0.05}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.hover\\:bg-blue-100:hover{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity))}.hover\\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\\:bg-green-100:hover{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity))}.hover\\:bg-primary-hover:hover{background-color:var(--fl-color-primary-hover)}.hover\\:bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity))}.focus\\:z-10:focus{z-index:10}.focus\\:z-20:focus{z-index:20}.focus\\:border-primary-focus:focus{border-color:var(--fl-color-primary-focus)}.focus\\:border-red-500:focus{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\\:ring-0:focus,.focus\\:ring-1:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-inset:focus{--tw-ring-inset:inset}.focus\\:ring-blue-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(37 99 235/var(--tw-ring-opacity))}.focus\\:ring-green-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(22 163 74/var(--tw-ring-opacity))}.focus\\:ring-primary-focus:focus{--tw-ring-color:var(--fl-color-primary-focus)}.focus\\:ring-red-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity))}.focus\\:ring-red-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(220 38 38/var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus\\:ring-offset-blue-50:focus{--tw-ring-offset-color:#eff6ff}.focus\\:ring-offset-green-50:focus{--tw-ring-offset-color:#f0fdf4}.focus\\:ring-offset-red-50:focus{--tw-ring-offset-color:#fef2f2}.focus-visible\\:outline-primary-hover:focus-visible{outline-color:var(--fl-color-primary-hover)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:border-gray-300:disabled{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.disabled\\:text-gray-400:disabled{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.group:hover .group-hover\\:text-primary-hover{color:var(--fl-color-primary-hover)}@media (min-width:640px){.sm\\:mb-12{margin-bottom:3rem}.sm\\:py-2{padding-bottom:.5rem;padding-top:.5rem}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}`,""]);const w=p},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(s[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);r&&s[c[0]]||(void 0!==i&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},417:e=>{e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},601:e=>{e.exports=function(e){return e[1]}},299:(e,t,n)=>{n.r(t),n.d(t,{Children:()=>z,Component:()=>a.uA,Fragment:()=>a.FK,PureComponent:()=>L,StrictMode:()=>Ae,Suspense:()=>q,SuspenseList:()=>X,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>ye,cloneElement:()=>Ce,createContext:()=>a.q6,createElement:()=>a.n,createFactory:()=>xe,createPortal:()=>ne,createRef:()=>a._3,default:()=>Be,findDOMNode:()=>ke,flushSync:()=>Me,forwardRef:()=>G,hydrate:()=>ce,isElement:()=>De,isFragment:()=>Se,isMemo:()=>Ee,isValidElement:()=>_e,lazy:()=>J,memo:()=>B,render:()=>ue,startTransition:()=>Re,unmountComponentAtNode:()=>Te,unstable_batchedUpdates:()=>Ie,useCallback:()=>E,useContext:()=>C,useDebugValue:()=>T,useDeferredValue:()=>Oe,useEffect:()=>y,useErrorBoundary:()=>k,useId:()=>I,useImperativeHandle:()=>_,useInsertionEffect:()=>Ne,useLayoutEffect:()=>b,useMemo:()=>S,useReducer:()=>v,useRef:()=>x,useState:()=>w,useSyncExternalStore:()=>Fe,useTransition:()=>Pe,version:()=>be});var r,o,i,s,a=n(172),l=0,u=[],c=a.fF,d=c.__b,f=c.__r,p=c.diffed,h=c.__c,m=c.unmount,$=c.__;function g(e,t){c.__h&&c.__h(o,e,l||t),l=0;var n=o.__H||(o.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function w(e){return l=1,v(D,e)}function v(e,t,n){var i=g(r++,2);if(i.t=e,!i.__c&&(i.__=[n?n(t):D(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],n=i.t(t,e);t!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=o,!o.u)){var s=function(e,t,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!a||a.call(this,e,t,n);var o=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}})),!(!o&&i.__c.props===e)&&(!a||a.call(this,e,t,n))};o.u=!0;var a=o.shouldComponentUpdate,l=o.componentWillUpdate;o.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,s(e,t,n),a=r}l&&l.call(this,e,t,n)},o.shouldComponentUpdate=s}return i.__N||i.__}function y(e,t){var n=g(r++,3);!c.__s&&N(n.__H,t)&&(n.__=e,n.i=t,o.__H.__h.push(n))}function b(e,t){var n=g(r++,4);!c.__s&&N(n.__H,t)&&(n.__=e,n.i=t,o.__h.push(n))}function x(e){return l=5,S((function(){return{current:e}}),[])}function _(e,t,n){l=6,b((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function S(e,t){var n=g(r++,7);return N(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function E(e,t){return l=8,S((function(){return e}),t)}function C(e){var t=o.context[e.__c],n=g(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(o)),t.props.value):e.__}function T(e,t){c.useDebugValue&&c.useDebugValue(t?t(e):e)}function k(e){var t=g(r++,10),n=w();return t.__=e,o.componentDidCatch||(o.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function I(){var e=g(r++,11);if(!e.__){for(var t=o.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function M(){for(var e;e=u.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(O),e.__H.__h.forEach(P),e.__H.__h=[]}catch(t){e.__H.__h=[],c.__e(t,e.__v)}}c.__b=function(e){o=null,d&&d(e)},c.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),$&&$(e,t)},c.__r=function(e){f&&f(e),r=0;var t=(o=e.__c).__H;t&&(i===o?(t.__h=[],o.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(O),t.__h.forEach(P),t.__h=[],r=0)),i=o},c.diffed=function(e){p&&p(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==u.push(t)&&s===c.requestAnimationFrame||((s=c.requestAnimationFrame)||R)(M)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),i=o=null},c.__c=function(e,t){t.some((function(e){try{e.__h.forEach(O),e.__h=e.__h.filter((function(e){return!e.__||P(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],c.__e(n,e.__v)}})),h&&h(e,t)},c.unmount=function(e){m&&m(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{O(e)}catch(e){t=e}})),n.__H=void 0,t&&c.__e(t,n.__v))};var A="function"==typeof requestAnimationFrame;function R(e){var t,n=function(){clearTimeout(r),A&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);A&&(t=requestAnimationFrame(n))}function O(e){var t=o,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),o=t}function P(e){var t=o;e.__c=e.__(),o=t}function N(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function D(e,t){return"function"==typeof t?t(e):t}function F(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function L(e,t){this.props=e,this.context=t}function B(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:F(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,a.n)(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(L.prototype=new a.uA).isPureReactComponent=!0,L.prototype.shouldComponentUpdate=function(e,t){return F(this.props,e)||F(this.state,t)};var H=a.fF.__b;a.fF.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),H&&H(e)};var V="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function G(e){function t(t){if(!("ref"in t))return e(t,null);var n=t.ref;delete t.ref;var r=e(t,n);return t.ref=n,r}return t.$$typeof=V,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var U=function(e,t){return null==e?null:(0,a.v2)((0,a.v2)(e).map(t))},z={map:U,forEach:U,count:function(e){return e?(0,a.v2)(e).length:0},only:function(e){var t=(0,a.v2)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:a.v2},j=a.fF.__e;a.fF.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);j(e,t,n,r)};var W=a.fF.unmount;function Y(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Y(e,t,n)}))),e}function K(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return K(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function q(){this.__u=0,this.t=null,this.__b=null}function Z(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function J(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,a.n)(n,o)}return o.displayName="Lazy",o.__f=!0,o}function X(){this.u=null,this.o=null}a.fF.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),W&&W(e)},(q.prototype=new a.uA).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=Z(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(a):a())};n.__R=s;var a=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=K(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},q.prototype.componentWillUnmount=function(){this.t=[]},q.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Y(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&(0,a.n)(a.FK,null,e.fallback);return o&&(o.__u&=-33),[(0,a.n)(a.FK,null,t.__a?null:e.children),o]};var Q=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function ee(e){return this.getChildContext=function(){return e.context},e.children}function te(e){var t=this,n=e.i;t.componentWillUnmount=function(){(0,a.XX)(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),(0,a.XX)((0,a.n)(ee,{context:t.context},e.__v),t.l)}function ne(e,t){var n=(0,a.n)(te,{__v:e,i:t});return n.containerInfo=t,n}(X.prototype=new a.uA).__a=function(e){var t=this,n=Z(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Q(t,e,r)):o()};n?n(i):i()}},X.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,a.v2)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},X.prototype.componentDidUpdate=X.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Q(e,n,t)}))};var re="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,oe=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ie=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,se=/[A-Z0-9]/g,ae="undefined"!=typeof document,le=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function ue(e,t,n){return null==t.__k&&(t.textContent=""),(0,a.XX)(e,t),"function"==typeof n&&n(),e?e.__c:null}function ce(e,t,n){return(0,a.Qv)(e,t),"function"==typeof n&&n(),e?e.__c:null}a.uA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(a.uA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var de=a.fF.event;function fe(){}function pe(){return this.cancelBubble}function he(){return this.defaultPrevented}a.fF.event=function(e){return de&&(e=de(e)),e.persist=fe,e.isPropagationStopped=pe,e.isDefaultPrevented=he,e.nativeEvent=e};var me,$e={enumerable:!1,configurable:!0,get:function(){return this.class}},ge=a.fF.vnode;a.fF.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},o=-1===n.indexOf("-");for(var i in t){var s=t[i];if(!("value"===i&&"defaultValue"in t&&null==s||ae&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var l=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===s?s="":"translate"===l&&"no"===s?s=!1:"o"===l[0]&&"n"===l[1]?"ondoubleclick"===l?i="ondblclick":"onchange"!==l||"input"!==n&&"textarea"!==n||le(t.type)?"onfocus"===l?i="onfocusin":"onblur"===l?i="onfocusout":ie.test(i)&&(i=l):l=i="oninput":o&&oe.test(i)?i=i.replace(se,"-$&").toLowerCase():null===s&&(s=void 0),"oninput"===l&&r[i=l]&&(i="oninputCapture"),r[i]=s}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,a.v2)(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=(0,a.v2)(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",$e)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=re,ge&&ge(e)};var we=a.fF.__r;a.fF.__r=function(e){we&&we(e),me=e.__c};var ve=a.fF.diffed;a.fF.diffed=function(e){ve&&ve(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),me=null};var ye={ReactCurrentDispatcher:{current:{readContext:function(e){return me.__n[e.__c].props.value},useCallback:E,useContext:C,useDebugValue:T,useDeferredValue:Oe,useEffect:y,useId:I,useImperativeHandle:_,useInsertionEffect:Ne,useLayoutEffect:b,useMemo:S,useReducer:v,useRef:x,useState:w,useSyncExternalStore:Fe,useTransition:Pe}}},be="18.3.1";function xe(e){return a.n.bind(null,e)}function _e(e){return!!e&&e.$$typeof===re}function Se(e){return _e(e)&&e.type===a.FK}function Ee(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Ce(e){return _e(e)?a.Ob.apply(null,arguments):e}function Te(e){return!!e.__k&&((0,a.XX)(null,e),!0)}function ke(e){return e&&(e.base||1===e.nodeType&&e)||null}var Ie=function(e,t){return e(t)},Me=function(e,t){return e(t)},Ae=a.FK;function Re(e){e()}function Oe(e){return e}function Pe(){return[!1,Re]}var Ne=b,De=_e;function Fe(e,t){var n=t(),r=w({h:{__:n,v:t}}),o=r[0].h,i=r[1];return b((function(){o.__=n,o.v=t,Le(o)&&i({h:o})}),[e,n,t]),y((function(){return Le(o)&&i({h:o}),e((function(){Le(o)&&i({h:o})}))}),[e]),n}function Le(e){var t,n,r=e.v,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}var Be={useState:w,useId:I,useReducer:v,useEffect:y,useLayoutEffect:b,useInsertionEffect:Ne,useTransition:Pe,useDeferredValue:Oe,useSyncExternalStore:Fe,startTransition:Re,useRef:x,useImperativeHandle:_,useMemo:S,useCallback:E,useContext:C,useDebugValue:T,version:"18.3.1",Children:z,render:ue,hydrate:ce,unmountComponentAtNode:Te,createPortal:ne,createElement:a.n,createContext:a.q6,createFactory:xe,cloneElement:Ce,createRef:a._3,Fragment:a.FK,isValidElement:_e,isElement:De,isFragment:Se,isMemo:Ee,findDOMNode:ke,Component:a.uA,PureComponent:L,memo:B,forwardRef:G,flushSync:Me,unstable_batchedUpdates:Ie,StrictMode:Ae,Suspense:q,SuspenseList:X,lazy:J,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ye}},172:(e,t,n)=>{n.d(t,{FK:()=>_,Ob:()=>j,Qv:()=>z,XX:()=>U,_3:()=>x,fF:()=>o,h:()=>y,n:()=>y,q6:()=>W,uA:()=>S,v2:()=>R});var r,o,i,s,a,l,u,c,d,f,p,h={},m=[],$=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function w(e,t){for(var n in t)e[n]=t[n];return e}function v(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function y(e,t,n){var o,i,s,a={};for(s in t)"key"==s?o=t[s]:"ref"==s?i=t[s]:a[s]=t[s];if(arguments.length>2&&(a.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===a[s]&&(a[s]=e.defaultProps[s]);return b(e,a,o,i,null)}function b(e,t,n,r,s){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==s?++i:s,__i:-1,__u:0};return null==s&&null!=o.vnode&&o.vnode(a),a}function x(){return{current:null}}function _(e){return e.children}function S(e,t){this.props=e,this.context=t}function E(e,t){if(null==t)return e.__?E(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?E(e):null}function C(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return C(e)}}function T(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!k.__r++||a!==o.debounceRendering)&&((a=o.debounceRendering)||l)(k)}function k(){var e,t,n,r,i,a,l,c;for(s.sort(u);e=s.shift();)e.__d&&(t=s.length,r=void 0,a=(i=(n=e).__v).__e,l=[],c=[],n.__P&&((r=w({},i)).__v=i.__v+1,o.vnode&&o.vnode(r),F(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[a]:null,l,null==a?E(i):a,!!(32&i.__u),c),r.__v=i.__v,r.__.__k[r.__i]=r,L(l,r,c),r.__e!=a&&C(r)),s.length>t&&s.sort(u));k.__r=0}function I(e,t,n,r,o,i,s,a,l,u,c){var d,f,p,$,g,w=r&&r.__k||m,v=t.length;for(n.__d=l,M(n,t,w),l=n.__d,d=0;d<v;d++)null!=(p=n.__k[d])&&(f=-1===p.__i?h:w[p.__i]||h,p.__i=d,F(e,p,f,o,i,s,a,l,u,c),$=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&H(f.ref,null,p),c.push(p.ref,p.__c||$,p)),null==g&&null!=$&&(g=$),65536&p.__u||f.__k===p.__k?l=A(p,l,e):"function"==typeof p.type&&void 0!==p.__d?l=p.__d:$&&(l=$.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=l,n.__e=g}function M(e,t,n){var r,o,i,s,a,l=t.length,u=n.length,c=u,d=0;for(e.__k=[],r=0;r<l;r++)null!=(o=t[r])&&"boolean"!=typeof o&&"function"!=typeof o?(s=r+d,(o=e.__k[r]="string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?b(null,o,null,null,null):g(o)?b(_,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?b(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,i=null,-1!==(a=o.__i=O(o,n,s,c))&&(c--,(i=n[a])&&(i.__u|=131072)),null==i||null===i.__v?(-1==a&&d--,"function"!=typeof o.type&&(o.__u|=65536)):a!==s&&(a==s-1?d--:a==s+1?d++:(a>s?d--:d++,o.__u|=65536))):o=e.__k[r]=null;if(c)for(r=0;r<u;r++)null!=(i=n[r])&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=E(i)),V(i,i))}function A(e,t,n){var r,o;if("function"==typeof e.type){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=A(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=E(e)),n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function R(e,t){return t=t||[],null==e||"boolean"==typeof e||(g(e)?e.some((function(e){R(e,t)})):t.push(e)),t}function O(e,t,n,r){var o=e.key,i=e.type,s=n-1,a=n+1,l=t[n];if(null===l||l&&o==l.key&&i===l.type&&!(131072&l.__u))return n;if(r>(null==l||131072&l.__u?0:1))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&!(131072&l.__u)&&o==l.key&&i===l.type)return s;s--}if(a<t.length){if((l=t[a])&&!(131072&l.__u)&&o==l.key&&i===l.type)return a;a++}}return-1}function P(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||$.test(t)?n:n+"px"}function N(e,t,n,r,o){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||P(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||P(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=c,e.addEventListener(t,i?f:d,i)):e.removeEventListener(t,i?f:d,i);else{if("http://www.w3.org/2000/svg"==o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function D(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=c++;else if(t.t<n.u)return;return n(o.event?o.event(t):t)}}}function F(e,t,n,r,i,s,a,l,u,c){var d,f,p,h,m,$,v,y,b,x,E,C,T,k,M,A,R=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(u=!!(32&n.__u),s=[l=t.__e=n.__e]),(d=o.__b)&&d(t);e:if("function"==typeof R)try{if(y=t.props,b="prototype"in R&&R.prototype.render,x=(d=R.contextType)&&r[d.__c],E=d?x?x.props.value:d.__:r,n.__c?v=(f=t.__c=n.__c).__=f.__E:(b?t.__c=f=new R(y,E):(t.__c=f=new S(y,E),f.constructor=R,f.render=G),x&&x.sub(f),f.props=y,f.state||(f.state={}),f.context=E,f.__n=r,p=f.__d=!0,f.__h=[],f._sb=[]),b&&null==f.__s&&(f.__s=f.state),b&&null!=R.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=w({},f.__s)),w(f.__s,R.getDerivedStateFromProps(y,f.__s))),h=f.props,m=f.state,f.__v=t,p)b&&null==R.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),b&&null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(b&&null==R.getDerivedStateFromProps&&y!==h&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(y,E),!f.__e&&(null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(y,f.__s,E)||t.__v===n.__v)){for(t.__v!==n.__v&&(f.props=y,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some((function(e){e&&(e.__=t)})),C=0;C<f._sb.length;C++)f.__h.push(f._sb[C]);f._sb=[],f.__h.length&&a.push(f);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(y,f.__s,E),b&&null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(h,m,$)}))}if(f.context=E,f.props=y,f.__P=e,f.__e=!1,T=o.__r,k=0,b){for(f.state=f.__s,f.__d=!1,T&&T(t),d=f.render(f.props,f.state,f.context),M=0;M<f._sb.length;M++)f.__h.push(f._sb[M]);f._sb=[]}else do{f.__d=!1,T&&T(t),d=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++k<25);f.state=f.__s,null!=f.getChildContext&&(r=w(w({},r),f.getChildContext())),b&&!p&&null!=f.getSnapshotBeforeUpdate&&($=f.getSnapshotBeforeUpdate(h,m)),I(e,g(A=null!=d&&d.type===_&&null==d.key?d.props.children:d)?A:[A],t,n,r,i,s,a,l,u,c),f.base=t.__e,t.__u&=-161,f.__h.length&&a.push(f),v&&(f.__E=f.__=null)}catch(e){if(t.__v=null,u||null!=s){for(t.__u|=u?160:128;l&&8===l.nodeType&&l.nextSibling;)l=l.nextSibling;s[s.indexOf(l)]=null,t.__e=l}else t.__e=n.__e,t.__k=n.__k;o.__e(e,t,n)}else null==s&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=B(n.__e,t,n,r,i,s,a,u,c);(d=o.diffed)&&d(t)}function L(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)H(n[r],n[++r],n[++r]);o.__c&&o.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){o.__e(e,t.__v)}}))}function B(e,t,n,i,s,a,l,u,c){var d,f,p,m,$,w,y,b=n.props,x=t.props,_=t.type;if("svg"===_?s="http://www.w3.org/2000/svg":"math"===_?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),null!=a)for(d=0;d<a.length;d++)if(($=a[d])&&"setAttribute"in $==!!_&&(_?$.localName===_:3===$.nodeType)){e=$,a[d]=null;break}if(null==e){if(null===_)return document.createTextNode(x);e=document.createElementNS(s,_,x.is&&x),u&&(o.__m&&o.__m(t,a),u=!1),a=null}if(null===_)b===x||u&&e.data===x||(e.data=x);else{if(a=a&&r.call(e.childNodes),b=n.props||h,!u&&null!=a)for(b={},d=0;d<e.attributes.length;d++)b[($=e.attributes[d]).name]=$.value;for(d in b)if($=b[d],"children"==d);else if("dangerouslySetInnerHTML"==d)p=$;else if(!(d in x)){if("value"==d&&"defaultValue"in x||"checked"==d&&"defaultChecked"in x)continue;N(e,d,null,$,s)}for(d in x)$=x[d],"children"==d?m=$:"dangerouslySetInnerHTML"==d?f=$:"value"==d?w=$:"checked"==d?y=$:u&&"function"!=typeof $||b[d]===$||N(e,d,$,b[d],s);if(f)u||p&&(f.__html===p.__html||f.__html===e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(p&&(e.innerHTML=""),I(e,g(m)?m:[m],t,n,i,"foreignObject"===_?"http://www.w3.org/1999/xhtml":s,a,l,a?a[0]:n.__k&&E(n,0),u,c),null!=a)for(d=a.length;d--;)v(a[d]);u||(d="value","progress"===_&&null==w?e.removeAttribute("value"):void 0!==w&&(w!==e[d]||"progress"===_&&!w||"option"===_&&w!==b[d])&&N(e,d,w,b[d],s),d="checked",void 0!==y&&y!==e[d]&&N(e,d,y,b[d],s))}return e}function H(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){o.__e(e,n)}}function V(e,t,n){var r,i;if(o.unmount&&o.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||H(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){o.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&V(r[i],t,n||"function"!=typeof e.type);n||v(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function G(e,t,n){return this.constructor(e,n)}function U(e,t,n){var i,s,a,l;o.__&&o.__(e,t),s=(i="function"==typeof n)?null:n&&n.__k||t.__k,a=[],l=[],F(t,e=(!i&&n||t).__k=y(_,null,[e]),s||h,h,t.namespaceURI,!i&&n?[n]:s?null:t.firstChild?r.call(t.childNodes):null,a,!i&&n?n:s?s.__e:t.firstChild,i,l),L(a,e,l)}function z(e,t){U(e,t,z)}function j(e,t,n){var o,i,s,a,l=w({},e.props);for(s in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==s?o=t[s]:"ref"==s?i=t[s]:l[s]=void 0===t[s]&&void 0!==a?a[s]:t[s];return arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):n),b(e.type,l,o||e.key,i||e.ref,null)}function W(e,t){var n={__c:t="__cC"+p++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.forEach((function(e){e.__e=!0,T(e)}))},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=m.slice,o={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(t){e=t}throw e}},i=0,S.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=w({},this.state),"function"==typeof e&&(e=e(w({},n),this.props)),e&&w(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),T(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),T(this))},S.prototype.render=_,s=[],l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=function(e,t){return e.__v.__b-t.__v.__b},k.__r=0,c=0,d=D(!1),f=D(!0),p=0},63:(e,t,n)=>{var r=n(299),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,s=r.useEffect,a=r.useLayoutEffect,l=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,c=r[1];return a((function(){o.value=n,o.getSnapshot=t,u(o)&&c({inst:o})}),[e,n,t]),s((function(){return u(o)&&c({inst:o}),e((function(){u(o)&&c({inst:o})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},888:(e,t,n)=>{e.exports=n(63)},919:(e,t,n)=>{var r=n(299);function o(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function i(e){return null!=e&&"function"==typeof e.Dispose}function s(e){i(e)&&e.Dispose()}function a(e,t){return Object.getPrototypeOf(e)?.constructor===Object.getPrototypeOf(t)?.constructor}Symbol.iterator;class l{constructor(e){this.iter=e,this.current=null}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const e=this.iter.next();return this.current=e.value,!e.done}"System.Collections.IEnumerator.Reset"(){throw new Error("JS iterators cannot be reset")}Dispose(){}}function u(e){return function(e){return null!=e&&"function"==typeof e.GetEnumerator}(e)?e.GetEnumerator():new l(e[Symbol.iterator]())}function c(e){return{next(){const t=e["System.Collections.IEnumerator.MoveNext"]();return{done:!t,value:t?e["System.Collections.Generic.IEnumerator`1.get_Current"]():void 0}}}}class d{constructor(e){this.factory=e,this.isValueCreated=!1}get Value(){return this.isValueCreated||(this.createdValue=this.factory(),this.isValueCreated=!0),this.createdValue}get IsValueCreated(){return this.isValueCreated}}function f(e,t){return e.toString(10).padStart(t,"0")}function p(e){const t=e;return"number"==typeof t.offset?t.offset:1===e.kind?0:-6e4*e.getTimezoneOffset()}function h(e,t){return(e=e<0&&null!=t&&10!==t?65535+e+1:e).toString(t)}function m(e,t){return(e=e<0&&null!=t&&10!==t?4294967295+e+1:e).toString(t)}class ${static id(e){return $.idMap.has(e)||$.idMap.set(e,++$.count),$.idMap.get(e)}}function g(e){let t=0,n=5381;const r=e.length;for(;t<r;)n=33*n^e.charCodeAt(t++);return n}function w(e){return 2654435761*e|0}function v(e){let t=0;const n=e.length;for(let r=0;r<n;r++)t=(t<<5)+t^e[r];return t}function y(e){if(null==e)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return w(e);case"bigint":return function(e){return g(e.toString(32))}(e);case"string":return g(e);default:if(function(e){return null!=e&&"function"==typeof e.GetHashCode}(e))return e.GetHashCode();if(o(e))return function(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r++)n[r]=y(e[r]);return v(n)}(e);if(e instanceof Date)return function(e){return e.getTime()}(e);if(Object.getPrototypeOf(e)?.constructor===Object){const t=Object.values(e).map((e=>y(e)));return v(t)}return w($.id(e))}}function b(e,t,n){if(null==e)return null==t;if(null==t)return!1;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function x(e,t){return b(e,t,_)}function _(e,t){return e===t||(null==e?null==t:null!=t&&(function(e){return null!=e&&"function"==typeof e.Equals}(e)?e.Equals(t):o(e)?o(t)&&x(e,t):"object"==typeof e&&(e instanceof Date?t instanceof Date&&0===S(e,t):Object.getPrototypeOf(e)?.constructor===Object&&function(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;n.sort(),r.sort();for(let o=0;o<n.length;o++)if(n[o]!==r[o]||!_(e[n[o]],t[r[o]]))return!1;return!0}(e,t))))}function S(e,t){let n,r;return"offset"in e&&"offset"in t?(n=e.getTime(),r=t.getTime()):(n=e.getTime()+p(e),r=t.getTime()+p(t)),n===r?0:n<r?-1:1}function E(e,t){return e===t?0:e<t?-1:1}function C(e,t){return function(e,t,n){if(null==e)return null==t?0:1;if(null==t)return-1;if(e.length!==t.length)return e.length<t.length?-1:1;for(let r=0,o=0;r<e.length;r++)if(o=n(e[r],t[r]),0!==o)return o;return 0}(e,t,T)}function T(e,t){return e===t?0:null==e?null==t?0:-1:null==t?1:function(e){return null!=e&&"function"==typeof e.CompareTo}(e)?e.CompareTo(t):o(e)?o(t)?C(e,t):-1:"object"!=typeof e?e<t?-1:1:e instanceof Date?t instanceof Date?S(e,t):-1:Object.getPrototypeOf(e)?.constructor===Object?function(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return n.length<r.length?-1:1;n.sort(),r.sort();for(let o=0,i=0;o<n.length;o++){const s=n[o];if(s!==r[o])return s<r[o]?-1:1;if(i=T(e[s],t[s]),0!==i)return i}return 0}(e,t):-1}function k(e){const t={};for(const n of e)t[n[0]]=n[1];return t}$.idMap=new WeakMap,$.count=0;const I=new WeakMap;function M(e){if(null==e)return null;const t=(t,n)=>e(t)(n);return I.set(t,e),t}function A(e){return I.get(e)??(t=>n=>e(t,n))}function R(e){if(null==e)return null;const t=(t,n,r)=>e(t)(n)(r);return I.set(t,e),t}function O(e){return I.get(e)??(t=>n=>r=>e(t,n,r))}const P=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],N=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],D=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],F=["January","February","March","April","May","June","July","August","September","October","November","December"];function L(e,t,n){let r=0,o=t;for(;o<e.length&&e[o]===n;)o++,r++;return r}function B(e,t){return t>=e.length-1?-1:e.charCodeAt(t+1)}function H(e,t){let n=t;const r=e[t];let o="",i=!1;for(;t<e.length;){const n=e[++t];if(n===r){i=!0;break}if("\\"===n){if(!(t<e.length))throw new Error("Invalid string format");o+=e[++t]}else o+=n}if(!i)throw new Error(`Invalid string format could not find matching quote for ${r}`);return[o,t-n+1]}function V(e,t,n){let r=0,o=0,i="";const s=n?W(e.getTime(),1):e;for(;r<t.length;){const e=t[r];switch(e){case"d":switch(o=L(t,r,"d"),r+=o,o){case 1:i+=Z(s);break;case 2:i+=f(Z(s),2);break;case 3:i+=P[ne(s)];break;case 4:i+=N[ne(s)]}break;case"f":if(o=L(t,r,"f"),r+=o,o<=3){const e=10**(3-o);i+=f(Math.floor(X(s)/e),o)}else o<=7&&(i+=(""+X(s)).padEnd(o,"0"));break;case"F":if(o=L(t,r,"F"),r+=o,o<=3){const e=10**(3-o),t=Math.floor(X(s)/e);0!=t&&(i+=f(t,o))}else if(o<=7){const e=X(s);0!=e&&(i+=f(e,3))}break;case"g":o=L(t,r,"g"),r+=o,o<=2&&(i+="A.D.");break;case"h":switch(o=L(t,r,"h"),r+=o,o){case 1:i+=J(s)%12;break;case 2:i+=f(J(s)%12,2)}break;case"H":switch(o=L(t,r,"H"),r+=o,o){case 1:i+=J(s);break;case 2:i+=f(J(s),2)}break;case"K":if(o=L(t,r,"K"),r+=o,1===o)switch(G(s)){case 1:i+="Z";break;case 2:i+=U(-6e4*s.getTimezoneOffset())}break;case"m":switch(o=L(t,r,"m"),r+=o,o){case 1:i+=Q(s);break;case 2:i+=f(Q(s),2)}break;case"M":switch(o=L(t,r,"M"),r+=o,o){case 1:i+=ee(s);break;case 2:i+=f(ee(s),2);break;case 3:i+=D[ee(s)-1];break;case 4:i+=F[ee(s)-1]}break;case"s":switch(o=L(t,r,"s"),r+=o,o){case 1:i+=te(s);break;case 2:i+=f(te(s),2)}break;case"t":switch(o=L(t,r,"t"),r+=o,o){case 1:i+=s.getHours()<12?"A":"P";break;case 2:i+=s.getHours()<12?"AM":"PM"}break;case"y":switch(o=L(t,r,"y"),r+=o,o){case 1:i+=s.getFullYear()%100;break;case 2:i+=f(s.getFullYear()%100,2);break;case 3:i+=f(s.getFullYear(),3);break;case 4:i+=f(s.getFullYear(),4);break;case 5:i+=f(s.getFullYear(),5)}break;case"z":o=L(t,r,"z"),r+=o;let a="";switch(G(s)){case 1:a="+00:00";break;case 2:a=U(-6e4*s.getTimezoneOffset());break;case 0:a=U(-6e4*q(s).getTimezoneOffset())}const l="-"===a[0]?"-":"+",u=parseInt(a.substring(1,3),10),c=parseInt(a.substring(4,6),10);switch(o){case 1:i+=`${l}${u}`;break;case 2:i+=`${l}${f(u,2)}`;break;default:i+=`${l}${f(u,2)}:${f(c,2)}`}break;case":":i+=":",r++;break;case"/":i+="/",r++;break;case"'":case'"':const[d,p]=H(t,r);i+=d,r+=p;break;case"%":const h=B(t,r);if(!(h>=0&&h!=="%".charCodeAt(0)))throw new Error("Invalid format string");r+=2,i+=V(s,String.fromCharCode(h),n);break;case"\\":const m=B(t,r);if(!(m>=0))throw new Error("Invalid format string");r+=2,i+=String.fromCharCode(m);break;default:r++,i+=e}}return i}function G(e){return e.kind||0}function U(e){const t=e<0,n=(e=Math.abs(e))%36e5/6e4;return(t?"-":"+")+f(~~(e/36e5),2)+":"+f(n,2)}function z(e,t){const n=e.toISOString();return"first"===t?n.substring(0,n.indexOf("T")):n.substring(n.indexOf("T")+1,n.length-1)}function j(e,t,n){return null!=e.offset?function(e,t){const n=new Date(e.getTime()+(e.offset??0));if("string"!=typeof t)return n.toISOString().replace(/\.\d+/,"").replace(/[A-Z]|\.\d+/g," ")+U(e.offset??0);if(1!==t.length)return V(n,t,!0);switch(t){case"D":case"d":return z(n,"first");case"T":case"t":return z(n,"second");case"O":case"o":return function(e,t){const n=e.toISOString();return n.substring(0,n.length-1)+U(t)}(n,e.offset??0);default:throw new Error("Unrecognized Date print format")}}(e,t):function(e,t){const n=1===e.kind;if("string"!=typeof t)return n?e.toUTCString():e.toLocaleString();if(1!==t.length)return V(e,t,n);switch(t){case"D":case"d":return n?z(e,"first"):e.toLocaleDateString();case"T":case"t":return n?z(e,"second"):e.toLocaleTimeString();case"O":case"o":return function(e,t){if(t)return e.toISOString();{const t=null==e.kind||2===e.kind;return f(e.getFullYear(),4)+"-"+f(e.getMonth()+1,2)+"-"+f(e.getDate(),2)+"T"+f(e.getHours(),2)+":"+f(e.getMinutes(),2)+":"+f(e.getSeconds(),2)+"."+f(e.getMilliseconds(),3)+(t?U(-6e4*e.getTimezoneOffset()):"")}}(e,n);default:throw new Error("Unrecognized Date print format")}}(e,t)}function W(e,t){const n=new Date(e);return n.kind=0|(null==t?0:t),n}function Y(e){function t(){throw new Error(`The string is not a valid Date: ${e}`)}null!=e&&""!==e.trim()||t(),10===e.length&&"-"===e[4]&&"-"===e[7]&&(e+="T00:00:00");let n=new Date(e),r=null;if(isNaN(n.getTime())){const o=/^\s*(\d+[^\w\s:]\d+[^\w\s:]\d+)?\s*(\d+:\d+(?::\d+(?:\.\d+)?)?)?\s*([AaPp][Mm])?\s*(Z|[+-]([01]?\d):?([0-5]?\d)?)?\s*$/.exec(e);if(null!=o){let e,t=0;if(null!=o[2]){const e=o[2].split(":"),n=parseInt(e[0],10);t=3600*n+60*parseInt(e[1]||"0",10)+parseFloat(e[2]||"0"),null!=o[3]&&"PM"===o[3].toUpperCase()&&n<12&&(t+=720)}if(null!=o[4]){if(null!=o[1])e=new Date(o[1]+" UTC");else{const t=new Date;e=new Date(t.getUTCFullYear()+"/"+(t.getUTCMonth()+1)+"/"+t.getUTCDate())}if("Z"===o[4])r="Z";else{let e=60*parseInt(o[5],10)+parseInt(o[6]||"0",10);"-"===o[4][0]&&(e*=-1),r=e,t-=60*e}}else if(null!=o[1])e=new Date(o[1]);else{const t=new Date;e=new Date(t.getFullYear()+"/"+(t.getMonth()+1)+"/"+t.getDate())}n=new Date(e.getTime()+1e3*t),n=new Date(n.getTime()+6e4*(n.getTimezoneOffset()-e.getTimezoneOffset()))}else t();isNaN(n.getTime())&&t()}return[n,r]}function K(e,t){try{return t.contents=function(e,t=!1){const[n,r]=Y(e),o=null!=r?t&&"Z"===r?1:2:0;return W(n.getTime(),o)}(e),!0}catch(e){return!1}}function q(e){return 2===e.kind?e:W(e.getTime(),2)}function Z(e){return 1===e.kind?e.getUTCDate():e.getDate()}function J(e){return 1===e.kind?e.getUTCHours():e.getHours()}function X(e){return 1===e.kind?e.getUTCMilliseconds():e.getMilliseconds()}function Q(e){return 1===e.kind?e.getUTCMinutes():e.getMinutes()}function ee(e){return(1===e.kind?e.getUTCMonth():e.getMonth())+1}function te(e){return 1===e.kind?e.getUTCSeconds():e.getSeconds()}function ne(e){return 1===e.kind?e.getUTCDay():e.getDay()}const re=Symbol("numeric");function oe(e){return"number"==typeof e||"bigint"==typeof e||e?.[re]}function ie(e,t){return"number"==typeof e?e*t:"bigint"==typeof e?e*BigInt(t):e[re]().multiply(t)}function se(e,t){return"number"==typeof e?e.toFixed(t):"bigint"==typeof e?e:e[re]().toFixed(t)}function ae(e,t){return"number"==typeof e?e.toPrecision(t):"bigint"==typeof e?e:e[re]().toPrecision(t)}function le(e,t){return"number"==typeof e?e.toExponential(t):"bigint"==typeof e?e:e[re]().toExponential(t)}function ue(e){return"number"==typeof e?(Number(e)>>>0).toString(16):"bigint"==typeof e?BigInt.asUintN(64,e).toString(16):e[re]().toHex()}function ce(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function de(e,t,n=0){if(null==t)throw new Error("Input cannot ve null");if(!e.global)throw new Error("Non-global RegExp");e.lastIndex=n;const r=[];let o,i=-1;for(;null!=(o=e.exec(t));)o.index===i?e.lastIndex++:(i=o.index,r.push(o));return r}function fe(e,t=0){if(null!=e&&"object"==typeof e){if("function"==typeof e.toString)return e.toString();if(Symbol.iterator in e)return function(e){let t=0,n="[";for(const r of e){if(0===t)n+=fe(r);else{if(100===t){n+="; ...";break}n+="; "+fe(r)}t++}return n+"]"}(e);{const n=Object.getPrototypeOf(e)?.constructor;return n===Object&&t<10?"{ "+Object.entries(e).map((([e,n])=>e+" = "+fe(n,t+1))).join("\n ")+" }":n?.name??""}}return String(e)}class pe{get name(){return this.cases()[this.tag]}toJSON(){return 0===this.fields.length?this.name:[this.name].concat(this.fields)}toString(){return function(e,t){if(0===t.length)return e;{let n,r=!0;return 1===t.length?(n=fe(t[0]),r=n.indexOf(" ")>=0):n=t.map((e=>fe(e))).join(", "),e+(r?" (":" ")+n+(r?")":"")}}(this.name,this.fields)}GetHashCode(){const e=this.fields.map((e=>y(e)));return e.splice(0,0,w(this.tag)),v(e)}Equals(e){return this===e||!!a(this,e)&&this.tag===e.tag&&x(this.fields,e.fields)}CompareTo(e){return this===e?0:a(this,e)?this.tag===e.tag?C(this.fields,e.fields):this.tag<e.tag?-1:1:-1}}class he{toJSON(){return function(e){const t={},n=Object.keys(e);for(let r=0;r<n.length;r++)t[n[r]]=e[n[r]];return t}(this)}toString(){return function(e){return"{ "+Object.entries(e).map((([e,t])=>e+" = "+fe(t))).join("\n ")+" }"}(this)}GetHashCode(){return function(e){const t=Object.values(e).map((e=>y(e)));return v(t)}(this)}Equals(e){return function(e,t){if(e===t)return!0;if(a(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++)if(!_(e[n[r]],t[n[r]]))return!1;return!0}return!1}(this,e)}CompareTo(e){return function(e,t){if(e===t)return 0;if(a(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=T(e[n[r]],t[n[r]]);if(0!==o)return o}return 0}return-1}(this,e)}}class me{get contents(){return this.getter()}set contents(e){this.setter(e)}constructor(e,t){"function"==typeof t?(this.getter=e,this.setter=t):(this.getter=()=>e,this.setter=t=>{e=t})}}class $e{constructor(e){this.message=e}}function ge(e){return function(e){return e instanceof $e||e instanceof Error}(e)||function(e){return e instanceof Promise}(e)?e:new Error(String(e))}const we=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,ve=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function ye(e,t){return function(e,t){return"number"==typeof e||"bigint"==typeof e?e<t?-1:e>t?1:0:e.CompareTo(t)}(e,t)<0}function be(e){return{input:e,cont:(t=e,e=>{we.lastIndex=0;const n=[],r=[];let o=0,i=we.exec(t);for(;i;){const e=i.index+(i[1]||"").length;n.push(t.substring(o,e).replace(/%%/g,"%")),r.push(i),o=we.lastIndex,we.lastIndex-=1,i=we.exec(t)}return 0===n.length?e(t.replace(/%%/g,"%")):(n.push(t.substring(o).replace(/%%/g,"%")),Ce(e,n,r))})};var t}function xe(e,t){return"string"==typeof t?e(t):t.cont(e)}function _e(e){return xe((e=>e),e)}function Se(e){return xe((e=>{throw new Error(e)}),e)}function Ee(e,t,n,r,o){let i="";if(t=t||"",o=o||"",oe(e))switch("x"!==o.toLowerCase()&&(ye(e,0)?(e=ie(e,-1),i="-"):t.indexOf(" ")>=0?i=" ":t.indexOf("+")>=0&&(i="+")),r=null==r?null:parseInt(r,10),o){case"f":case"F":e=se(e,r=null!=r?r:6);break;case"g":case"G":e=null!=r?ae(e,r):ae(e);break;case"e":case"E":e=null!=r?le(e,r):le(e);break;case"x":e=ue(e);break;case"X":e=ue(e).toUpperCase();break;default:e=String(e)}else e=e instanceof Date?j(e):fe(e);if(n="number"==typeof n?n:parseInt(n,10),isNaN(n))e=i+e;else{const r=t.indexOf("0")>=0,o=t.indexOf("-")>=0,s=o||!r?" ":"0";e="0"===s?i+(e=ke(e,n-i.length,s,o)):ke(i+e,n,s,o)}return e}function Ce(e,t,n,r="",o=-1){return(...i)=>{let s=r;const a=t.slice(),l=n.slice();for(const e of i){const[,,t,n,r,i]=l[0];let u=n;if(o>=0)u=o,o=-1;else if("*"===u){if(e<0)throw new Error("Non-negative number required");o=e;continue}s+=a[0],s+=Ee(e,t,u,r,i),a.splice(0,1),l.splice(0,1)}return 0===l.length?(s+=a[0],e(s)):Ce(e,a,l,s,o)}}function Te(e,t){return Array.isArray(t)?t.join(e):Array.from(t).join(e)}function ke(e,t,n,r){n=n||" ",t-=e.length;for(let o=0;o<t;o++)e=r?e+n:n+e;return e}function Ie(e,t,n){return ke(e,t,n)}function Me(e,t,n,r){if(r="number"==typeof r?r:0,(n="number"==typeof n?n:void 0)&&n<0)throw new Error("Count cannot be less than zero");if(0===n)return[];const o=!(1&~r),i=!(2&~r);t=(t=t||[]).filter((e=>e)).map(ce),t=t.length>0?t:["\\s"];const s=[],a=new RegExp(t.join("|"),"g");let l=!0,u=0;do{const t=a.exec(e);if(null===t){const t=i?e.substring(u).trim():e.substring(u);(!o||t.length>0)&&s.push(t),l=!1}else{const r=i?e.substring(u,t.index).trim():e.substring(u,t.index);(!o||r.length>0)&&(null!=n&&s.length+1===n?(s.push(i?e.substring(u).trim():e.substring(u)),l=!1):s.push(r)),u=a.lastIndex}}while(l);return s}function Ae(e,t){return t.split("").filter((t=>e(t))).join("")}var Re=n(725);class Oe{constructor(e){this.value=e}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return y(this.value)}Equals(e){return null!=e&&_(this.value,e instanceof Oe?e.value:e)}CompareTo(e){return null==e?1:T(this.value,e instanceof Oe?e.value:e)}}function Pe(e){if(null==e)throw new Error("Option has no value");return e instanceof Oe?e.value:e}function Ne(e){return e instanceof Oe?e.value:e}function De(e){return null==e||e instanceof Oe?new Oe(e):e}function Fe(e){return null==e?void 0:e}function Le(e){return null==e?null:Pe(e)}function Be(e){return null==e?[]:[Pe(e)]}function He(e,t){return null!=e?Pe(e):t}function Ve(e,t){return null!=t?De(e(Pe(t))):void 0}const Ge="Collection was empty.";function Ue(e,t){return"function"==typeof e?new e(t):new Array(t)}function ze(e,t,n,r){const o=0|t;return e.fill(r,o,o+n)}function je(e,t,n){const r=0|t.length,o=Ue(n,r);for(let n=0;n<=r-1;n++)qe(o,n,e(Ke(n,t)));return o}function We(e,t,n){return function(e,t,n,r,o){const i=0|He(n,0),s=0|He(Ve((e=>i+e),r),e.length);return 0|(n=>{for(;;){const r=n;if(r>=s)return-1;if(o.Equals(t,Ke(r,e)))return 0|r;n=r+1}})(i)}(t,e,void 0,void 0,n)>=0}function Ye(e,t,n){const r=e;return n.reduce(r,t)}function Ke(e,t){if(e<0||e>=t.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");return t[e]}function qe(e,t,n){if(t<0||t>=e.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");e[t]=n}function Ze(e,t,n){return t.reduceRight(((t,n)=>e(n,t)),n)}class Je extends he{constructor(e,t){super(),this.head=e,this.tail=t}toString(){return"["+Te("; ",this)+"]"}Equals(e){return this===e||((e,t)=>{e:for(;;){const n=e,r=t,o=n.tail,i=r.tail;if(null!=o){if(null!=i){const s=Pe(o),a=Pe(i);if(_(n.head,r.head)){e=s,t=a;continue e}return!1}return!1}return null==i}})(this,e)}GetHashCode(){return 0|((e,t,n)=>{for(;;){const r=e,o=t,i=n,s=i.tail;if(null==s)return 0|o;{const a=Pe(s);if(r>18)return 0|o;e=r+1,t=(o<<1)+y(i.head)+631*r,n=a}}})(0,0,this)}toJSON(){return Array.from(this)}CompareTo(e){return 0|((e,t)=>{e:for(;;){const n=e,r=t,o=n.tail,i=r.tail;if(null!=o){if(null!=i){const s=Pe(o),a=Pe(i),l=0|T(n.head,r.head);if(0===l){e=s,t=a;continue e}return 0|l}return 1}return null!=i?-1:0}})(this,e)}GetEnumerator(){return new Xe(this)}[Symbol.iterator](){return c(u(this))}"System.Collections.IEnumerable.GetEnumerator"(){return u(this)}}class Xe{constructor(e){this.xs=e,this.it=this.xs,this.current=null}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const e=this,t=e.it.tail;if(null!=t){const n=Pe(t);return e.current=e.it.head,e.it=n,!0}return!1}"System.Collections.IEnumerator.Reset"(){const e=this;e.it=e.xs,e.current=null}Dispose(){}}function Qe(){return new Je(null,void 0)}function et(e,t){return new Je(e,t)}function tt(e){return null==e.tail}function nt(e){return 0|((e,t)=>{for(;;){const n=e,r=t.tail;if(null==r)return 0|n;e=n+1,t=Pe(r)}})(0,e)}function rt(e){if(null!=e.tail)return e.head;throw new Error(Ge+"\\nParameter name: list")}function ot(e){const t=e.tail;if(null!=t)return Pe(t);throw new Error(Ge+"\\nParameter name: list")}function it(){return Qe()}function st(e,t){return et(e,t)}function at(e){return et(e,Qe())}function lt(e){return tt(e)}function ut(e){return rt(e)}function ct(e){return ot(e)}function dt(e){const t=0|nt(e),n=ze(new Array(t),0,t,null);return((e,t)=>{for(;;){const r=e,o=t;if(tt(o))break;qe(n,r,rt(o)),e=r+1,t=ot(o)}})(0,e),n}function ft(e,t,n){let r=t,o=n;for(;!tt(o);)r=e(r,ut(o)),o=ot(o);return r}function pt(e){return ft(((e,t)=>et(t,e)),Qe(),e)}function ht(e,t){ft(((t,n)=>{e(n)}),void 0,t)}function mt(e,t){let n=t;for(let t=e.length-1;t>=0;t--)n=et(Ke(t,e),n);return n}function $t(e){return mt(e,Qe())}function gt(e,t){return ft(((e,t)=>et(t,e)),t,pt(e))}function wt(e,t){const n=Qe(),r=ft(((t,n)=>{const r=new Je(e(n),void 0);return t.tail=r,r}),n,t),o=Qe();return r.tail=o,ot(n)}function vt(e,t){const n=Qe(),r=ft(((t,n)=>{if(e(n)){const e=new Je(n,void 0);return t.tail=e,e}return t}),n,t),o=Qe();return r.tail=o,ot(n)}function yt(e,t){const n=Qe(),r=ft(((t,n)=>{const r=e(n);if(null==r)return t;{const e=new Je(Pe(r),void 0);return t.tail=e,e}}),n,t),o=Qe();return r.tail=o,ot(n)}const bt=r.default,xt=fe(Re.A),_t=(0,r.createElement)("svg",k($t([["className",Te(" ",["h-5","w-5","text-gray-400"])],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],["fill","currentColor"],(()=>{let e;const t=at((0,r.createElement)("path",k(at((e="M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z",["d","M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"])))));return["children",bt.Children.toArray(Array.from(t))]})()]))),St=(0,r.createElement)("svg",k($t([["className",Te(" ",["h-5","w-5","text-gray-400"])],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],["fill","currentColor"],(()=>{let e;const t=at((0,r.createElement)("path",k($t([(e="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",["d","M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"]),["fill-rule","evenodd"],["clipRule","evenodd"]]))));return["children",bt.Children.toArray(Array.from(t))]})()]))),Et=(0,r.createElement)("svg",k($t([["className",Te(" ",["h-6","w-6","text-gray-400","group-hover:text-primary-hover"])],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],["fill","none"],["stroke","currentColor"],["strokeWidth",2],(()=>{const e=at((0,r.createElement)("path",{d:"M18 12H6",strokeLinejoin:"round",strokeLinecap:"round"}));return["children",bt.Children.toArray(Array.from(e))]})()]))),Ct=(0,r.createElement)("svg",k($t([["className",Te(" ",["h-6","w-6","text-gray-400","group-hover:text-primary-hover"])],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],["fill","none"],["stroke","currentColor"],["strokeWidth",2],(()=>{const e=at((0,r.createElement)("path",{d:"M12 6v6m0 0v6m0-6h6m-6 0H6",strokeLinejoin:"round",strokeLinecap:"round"}));return["children",bt.Children.toArray(Array.from(e))]})()]))),Tt=(0,r.createElement)("svg",k($t([["className",Te(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=at((0,r.createElement)("path",k($t([["fill-rule","evenodd"],(e="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",["d","M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"]),["clipRule","evenodd"]]))));return["children",bt.Children.toArray(Array.from(t))]})()]))),kt=(0,r.createElement)("svg",k($t([["className",Te(" ",["h-5","w-5","text-gray-400"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=at((0,r.createElement)("path",k($t([["fill-rule","evenodd"],(e="M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",["d","M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z"]),["clipRule","evenodd"]]))));return["children",bt.Children.toArray(Array.from(t))]})()]))),It=(0,r.createElement)("svg",k($t([["className",Te(" ",["h-5","w-5","text-amber-400","flex-none"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=at((0,r.createElement)("path",k($t([["fill-rule","evenodd"],(e="M8.25706 3.09858C9.02167 1.73928 10.9788 1.73928 11.7434 3.09858L17.3237 13.0191C18.0736 14.3523 17.1102 15.9996 15.5805 15.9996H4.4199C2.89025 15.9996 1.92682 14.3523 2.67675 13.0191L8.25706 3.09858ZM11.0001 12.9998C11.0001 13.552 10.5524 13.9998 10.0001 13.9998C9.44784 13.9998 9.00012 13.552 9.00012 12.9998C9.00012 12.4475 9.44784 11.9998 10.0001 11.9998C10.5524 11.9998 11.0001 12.4475 11.0001 12.9998ZM10.0001 4.99976C9.44784 4.99976 9.00012 5.44747 9.00012 5.99976V8.99976C9.00012 9.55204 9.44784 9.99976 10.0001 9.99976C10.5524 9.99976 11.0001 9.55204 11.0001 8.99976V5.99976C11.0001 5.44747 10.5524 4.99976 10.0001 4.99976Z",["d","M8.25706 3.09858C9.02167 1.73928 10.9788 1.73928 11.7434 3.09858L17.3237 13.0191C18.0736 14.3523 17.1102 15.9996 15.5805 15.9996H4.4199C2.89025 15.9996 1.92682 14.3523 2.67675 13.0191L8.25706 3.09858ZM11.0001 12.9998C11.0001 13.552 10.5524 13.9998 10.0001 13.9998C9.44784 13.9998 9.00012 13.552 9.00012 12.9998C9.00012 12.4475 9.44784 11.9998 10.0001 11.9998C10.5524 11.9998 11.0001 12.4475 11.0001 12.9998ZM10.0001 4.99976C9.44784 4.99976 9.00012 5.44747 9.00012 5.99976V8.99976C9.00012 9.55204 9.44784 9.99976 10.0001 9.99976C10.5524 9.99976 11.0001 9.55204 11.0001 8.99976V5.99976C11.0001 5.44747 10.5524 4.99976 10.0001 4.99976Z"]),["clipRule","evenodd"]]))));return["children",bt.Children.toArray(Array.from(t))]})()]))),Mt=$t(["flex","flex-col","align-center"]),At="The input sequence has an insufficient number of elements.";function Rt(){throw new Error("Enumeration has not started. Call MoveNext.")}function Ot(){throw new Error("Enumeration already finished.")}class Pt{constructor(e){this.f=e}toString(){let e=0,t="seq [";const n=u(this);try{for(;e<4&&n["System.Collections.IEnumerator.MoveNext"]();)e>0&&(t+="; "),t+=fe(n["System.Collections.Generic.IEnumerator`1.get_Current"]()),e=e+1|0;return 4===e&&(t+="; ..."),t+"]"}finally{s(n)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return c(u(this))}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}class Nt{constructor(e,t,n){this.current=e,this.next=t,this.dispose=n}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current()}"System.Collections.IEnumerator.get_Current"(){return this.current()}"System.Collections.IEnumerator.MoveNext"(){return this.next()}"System.Collections.IEnumerator.Reset"(){!function(){throw new Error("Reset is not supported on this enumerator.")}()}Dispose(){this.dispose()}}function Dt(e,t,n){return new Nt(e,t,n)}function Ft(e,t,n){let r,o=!1,i=De(e());const s=()=>{if(null!=i){const e=Pe(i);try{n(e)}finally{i=void 0}}},a=()=>{try{s()}finally{r=void 0}};return Dt((()=>(o||Rt(),null!=r?Pe(r):Ot())),(()=>{if(o||(o=!0),null!=i){const e=Pe(i);let n;try{n=t(e)}catch(e){throw a(),e}return null!=n?(r=n,!0):(a(),!1)}return!1}),s)}function Lt(e){return function(e){return new Pt(e)}(e)}function Bt(e){return t="source",null==e&&function(e){throw new Error(e)}(t),u(e);var t}function Ht(e){return Lt((()=>u(e())))}function Vt(e){return Lt((()=>function(e){let t,n,r,o=!1,i=!1;const a=()=>{if(i=!0,null!=n){const e=Pe(n);try{s(e)}finally{n=void 0}}if(null!=t){const e=Pe(t);try{s(e)}finally{t=void 0}}};return Dt((()=>(o?i&&Ot():Rt(),null!=r?Pe(r):Ot())),(()=>{let l;if(o||(o=!0),i)return!1;{let o;for(;null==o;){const i=t;if(null!=i)if(null!=n){const e=Pe(n);if(e["System.Collections.IEnumerator.MoveNext"]())r=De(e["System.Collections.Generic.IEnumerator`1.get_Current"]()),o=!0;else try{s(e)}finally{n=void 0}}else{const e=Pe(i);e["System.Collections.IEnumerator.MoveNext"]()?(l=e["System.Collections.Generic.IEnumerator`1.get_Current"](),n=u(l)):(a(),o=!1)}else t=u(e)}return Pe(o)}}),(()=>{i||a()}))}(e)))}function Gt(){return Ht((()=>new Array(0)))}function Ut(e){return Ht((()=>function(e){const t=Ue(void 0,1);return qe(t,0,e),t}(e)))}function zt(e){return e instanceof Je?dt(e):Array.from(e)}function jt(e){return o(e)?$t(e):e instanceof Je?e:function(e){let t,n;if(o(e))return $t(e);if(e instanceof Je)return e;{const r=Qe();let o=r;const i=u(e);try{for(;i["System.Collections.IEnumerator.MoveNext"]();){const e=i["System.Collections.Generic.IEnumerator`1.get_Current"]();t=o,n=new Je(e,void 0),t.tail=n,o=n}}finally{s(i)}const a=o,l=Qe();return a.tail=l,ot(r)}}(e)}function Wt(e,t,n){return Lt((()=>Ft(e,t,n)))}function Yt(e,t,n){return Lt((()=>{let r=-1;return Ft(e,(e=>(r=r+1|0,t(r,e))),n)}))}function Kt(e,t){return Vt([e,t])}function qt(e,t,n){const r=Bt(t);try{let t=!1;for(;!t&&r["System.Collections.IEnumerator.MoveNext"]();)t=n.Equals(e,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return t}finally{s(r)}}function Zt(e,t){return function(e,t){return Wt((()=>Bt(t)),(t=>{let n;for(;null==n&&t["System.Collections.IEnumerator.MoveNext"]();)n=e(t["System.Collections.Generic.IEnumerator`1.get_Current"]());return n}),(e=>{s(e)}))}((t=>e(t)?De(t):void 0),t)}function Jt(e,t,n){const r=Bt(n);try{let n=t;for(;r["System.Collections.IEnumerator.MoveNext"]();)n=e(n,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return n}finally{s(r)}}function Xt(e,t){Jt(((t,n)=>{e(n)}),void 0,t)}function Qt(e,t){return Wt((()=>Bt(t)),(t=>t["System.Collections.IEnumerator.MoveNext"]()?De(e(t["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0),(e=>{s(e)}))}function en(e){return Ht((()=>function(e){return e.slice().reverse()}(zt(e))))}function tn(e,t){return Lt((()=>{const n=Bt(t);try{for(let t=1;t<=e;t++)if(!n["System.Collections.IEnumerator.MoveNext"]())throw new Error(At+"\\nParameter name: source");return function(e,t){return Dt((()=>t["System.Collections.Generic.IEnumerator`1.get_Current"]()),(()=>t["System.Collections.IEnumerator.MoveNext"]()),(()=>{try{s(t)}finally{e()}}))}((()=>{}),n)}catch(e){throw s(n),e}}))}function nn(e,t){return Ht((()=>Vt(Qt(e,t))))}function rn(e){return{Dispose(){e()}}}Symbol.iterator;class on{constructor(e=!1){this._id=0,this._cancelled=e,this._listeners=new Map}get isCancelled(){return this._cancelled}cancel(){if(!this._cancelled){this._cancelled=!0;for(const[,e]of this._listeners)e()}}addListener(e){const t=this._id;return this._listeners.set(this._id++,e),t}removeListener(e){return this._listeners.delete(e)}register(e,t){const n=this,r=this.addListener(null==t?e:()=>e(t));return{Dispose(){n.removeListener(r)}}}Dispose(){}}class sn extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,sn.prototype)}}class an{static get maxTrampolineCallCount(){return 2e3}constructor(){this.callCount=0}incrementAndCheck(){return this.callCount++>an.maxTrampolineCallCount}hijack(e){this.callCount=0,setTimeout(e,0)}}function ln(e){return t=>{if(t.cancelToken.isCancelled)t.onCancel(new sn);else if(t.trampoline.incrementAndCheck())t.trampoline.hijack((()=>{try{e(t)}catch(e){t.onError(ge(e))}}));else try{e(t)}catch(e){t.onError(ge(e))}}}const un=new class{Bind(e,t){return function(e,t){return ln((n=>{e({onSuccess:e=>{try{t(e)(n)}catch(e){n.onError(ge(e))}},onError:n.onError,onCancel:n.onCancel,cancelToken:n.cancelToken,trampoline:n.trampoline})}))}(e,t)}Combine(e,t){return this.Bind(e,(()=>t))}Delay(e){return ln((t=>e()(t)))}For(e,t){const n=e[Symbol.iterator]();let r=n.next();return this.While((()=>!r.done),this.Delay((()=>{const e=t(r.value);return r=n.next(),e})))}Return(e){return function(e){return ln((t=>t.onSuccess(e)))}(e)}ReturnFrom(e){return e}TryFinally(e,t){return ln((n=>{e({onSuccess:e=>{t(),n.onSuccess(e)},onError:e=>{t(),n.onError(e)},onCancel:e=>{t(),n.onCancel(e)},cancelToken:n.cancelToken,trampoline:n.trampoline})}))}TryWith(e,t){return ln((n=>{e({onSuccess:n.onSuccess,onCancel:n.onCancel,cancelToken:n.cancelToken,trampoline:n.trampoline,onError:e=>{try{t(e)(n)}catch(e){n.onError(ge(e))}}})}))}Using(e,t){return this.TryFinally(t(e),(()=>e.Dispose()))}While(e,t){return e()?this.Bind(t,(()=>this.While(e,t))):this.Return(void 0)}Zero(){return ln((e=>e.onSuccess(void 0)))}};function cn(e){}function dn(e){const t=new on("boolean"==typeof e&&e);return"number"==typeof e&&setTimeout((()=>{t.cancel()}),e),t}function fn(e){e.cancel()}const pn=new on;function hn(e){return ln((t=>{let n;const r=setTimeout((()=>{t.cancelToken.removeListener(n),t.onSuccess(void 0)}),e);n=t.cancelToken.addListener((()=>{clearTimeout(r),t.onCancel(new sn)}))}))}function mn(e,t){return function(e,t){return function(e,t,n,r,o){"function"!=typeof t&&(o=t,t=void 0);const i=new an;e({onSuccess:t||cn,onError:n||cn,onCancel:r||cn,cancelToken:o||pn,trampoline:i})}(e,t)}(e,t)}class $n extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function gn(e,t){let n;const o=dn();return n=bt.useRef(o),function(e){const t=bt.useRef(void 0),n=bt.useRef(!1),o=bt.useRef(!1);var i,a;n.current&&(o.current=!0),i=()=>{return r=n.current?void 0:(n.current=!0,t.current=De(e()),o.current?t.current:void 0),{Dispose(){Xt((e=>{s(e)}),Be(r))}};var r},a=[],(0,r.useEffect)((()=>{const e=i();return()=>{e.Dispose()}}),a)}((()=>rn((()=>{fn(n.current)})))),function(e){const t=bt.useRef(e),n=bt.useCallback((e=>t.current(e)),[]);var o;return o=n=>(t.current=e,rn((()=>{}))),(0,r.useLayoutEffect)((()=>{const e=o();return()=>{e.Dispose()}})),n}((r=>{var o;null!=(o=n.current)&&o.isCancelled||mn(un.Delay((()=>un.TryWith(un.Delay((()=>(t(new $n(1,[])),un.Bind(e(r),(e=>(t(new $n(2,[e])),un.Zero())))))),(e=>(t(new $n(3,[e])),un.Zero()))))),n.current)}))}class wn extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class vn extends pe{constructor(e,t){super(),this.tag=0,this.fields=[e,t]}cases(){return["Header"]}}class yn extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Empty","Text","Binary","Form"]}}class bn extends he{constructor(e,t,n,r,o,i,s,a){super(),this.url=e,this.method=t,this.headers=n,this.withCredentials=r,this.overridenMimeType=o,this.overridenResponseType=i,this.timeout=s,this.content=a}}class xn extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class _n extends he{constructor(e,t,n,r,o,i){super(),this.statusCode=0|e,this.responseText=t,this.responseType=n,this.responseUrl=r,this.responseHeaders=o,this.content=i}}class Sn{constructor(e,t){this.k=e,this.v=t}}function En(e,t){return new Sn(e,t)}function Cn(e){return e.k}function Tn(e){return e.v}class kn extends Sn{constructor(e,t,n,r,o){super(e,t),this.left=n,this.right=r,this.h=0|o}}function In(e,t,n,r,o){return new kn(e,t,n,r,o)}function Mn(e){return e.left}function An(e){return e.right}function Rn(e){return e.h}function On(e,t){e:for(;;){const n=e;if(null!=t){const r=Pe(t);if(r instanceof kn){const o=r;e=On(n+1,Mn(o)),t=An(o);continue e}return n+1|0}return 0|n}}function Pn(e){return On(0,e)}function Nn(e,t,n,r){let o,i,s,a;if(null!=e){const t=Pe(e);s=t instanceof kn?(o=t,Rn(o)):1}else s=0;if(null!=r){const e=Pe(r);a=e instanceof kn?(i=e,Rn(i)):1}else a=0;const l=0|(s<a?a:s);return 0===l?En(t,n):In(t,n,e,r,l+1)}function Dn(e,t,n,r){let o,i,s,a,l,u,c,d,f,p;if(null!=e){const t=Pe(e);f=t instanceof kn?(o=t,Rn(o)):1}else f=0;if(null!=r){const e=Pe(r);p=e instanceof kn?(i=e,Rn(i)):1}else p=0;if(p>f+2){const o=Pe(r);if(o instanceof kn){const r=o;if(s=Mn(r),(null!=s?(a=Pe(s),a instanceof kn?(l=a,Rn(l)):1):0)>f+1){const o=Pe(Mn(r));if(o instanceof kn){const i=o;return Nn(Nn(e,t,n,Mn(i)),Cn(i),Tn(i),Nn(An(i),Cn(r),Tn(r),An(r)))}throw new Error("internal error: Map.rebalance")}return Nn(Nn(e,t,n,Mn(r)),Cn(r),Tn(r),An(r))}throw new Error("internal error: Map.rebalance")}if(f>p+2){const o=Pe(e);if(o instanceof kn){const e=o;if(u=An(e),(null!=u?(c=Pe(u),c instanceof kn?(d=c,Rn(d)):1):0)>p+1){const o=Pe(An(e));if(o instanceof kn){const i=o;return Nn(Nn(Mn(e),Cn(e),Tn(e),Mn(i)),Cn(i),Tn(i),Nn(An(i),t,n,r))}throw new Error("internal error: Map.rebalance")}return Nn(Mn(e),Cn(e),Tn(e),Nn(An(e),t,n,r))}throw new Error("internal error: Map.rebalance")}return Nn(e,t,n,r)}function Fn(e,t,n,r){if(null!=r){const o=Pe(r),i=0|e.Compare(t,Cn(o));if(o instanceof kn){const r=o;return i<0?Dn(Fn(e,t,n,Mn(r)),Cn(r),Tn(r),An(r)):0===i?In(t,n,Mn(r),An(r),Rn(r)):Dn(Mn(r),Cn(r),Tn(r),Fn(e,t,n,An(r)))}return i<0?In(t,n,void 0,r,2):0===i?En(t,n):In(t,n,r,void 0,2)}return En(t,n)}function Ln(e,t,n){e:for(;;){const r=e,o=t;if(null!=n){const i=Pe(n),s=0|r.Compare(o,Cn(i));if(0===s)return De(Tn(i));if(i instanceof kn){const a=i;e=r,t=o,n=s<0?Mn(a):An(a);continue e}return}return}}function Bn(e,t,n,r,o){return t(n,r)?Fn(e,n,r,o):o}function Hn(e,t,n,r){e:for(;;){const o=e,i=t,s=r;if(null!=n){const a=Pe(n);if(a instanceof kn){const l=a,u=Hn(o,i,Mn(l),s),c=Bn(o,i,Cn(l),Tn(l),u);e=o,t=i,n=An(l),r=c;continue e}return Bn(o,i,Cn(a),Tn(a),s)}return s}}function Vn(e,t,n){return Hn(e,t,n,void 0)}function Gn(e,t){e:for(;;){const n=e;if(null!=t){const r=Pe(t);if(r instanceof kn){const o=r;Gn(n,Mn(o)),n(Cn(o),Tn(o)),e=n,t=An(o);continue e}n(Cn(r),Tn(r))}break}}function Un(e,t){Gn(e,t)}function zn(e,t){if(null!=t){const n=Pe(t);if(n instanceof kn){const t=n,r=zn(e,Mn(t)),o=e(Cn(t),Tn(t)),i=zn(e,An(t));return In(Cn(t),o,r,i,Rn(t))}return En(Cn(n),e(Cn(n),Tn(n)))}}function jn(e,t){return zn(e,t)}function Wn(e,t){if(o(t))return function(e,t){let n;for(let r=0;r<=t.length-1;r++){const o=Ke(r,t);n=Fn(e,o[0],o[1],n)}return n}(e,t);if(t instanceof Je)return function(e,t){return ft(((t,n)=>Fn(e,n[0],n[1],t)),void 0,t)}(e,t);{const n=u(t);try{return function(e,t,n){for(;;){const r=e,o=t,i=n;if(!i["System.Collections.IEnumerator.MoveNext"]())return o;{const s=i["System.Collections.Generic.IEnumerator`1.get_Current"]();e=r,t=Fn(r,s[0],s[1],o),n=i}}}(e,void 0,n)}finally{s(n)}}}class Yn extends he{constructor(e,t){super(),this.stack=e,this.started=t}}function Kn(e){e:for(;;){const t=e;if(lt(t))return it();{const n=ct(t),r=ut(t);if(null!=r){const o=Pe(r);if(o instanceof kn){const t=o;e=mt([Mn(t),En(Cn(t),Tn(t)),An(t)],n);continue e}return t}e=n;continue e}}}function qn(e){return new Yn(Kn(at(e)),!1)}function Zn(e){if(e.started){const t=e.stack;if(lt(t))return function(){throw new Error("enumeration already finished")}();if(null!=ut(t)){const e=Pe(ut(t));if(e instanceof kn)throw new Error("Please report error: Map iterator, unexpected stack for current");return[Cn(e),Tn(e)]}throw new Error("Please report error: Map iterator, unexpected stack for current")}return function(){throw new Error("enumeration not started")}()}function Jn(e){let t=qn(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>Zn(t),"System.Collections.IEnumerator.get_Current":()=>Zn(t),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const t=e.stack;if(lt(t))return!1;if(null!=ut(t)){if(Pe(ut(t))instanceof kn)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=Kn(ct(t)),!lt(e.stack)}throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}return e.started=!0,!lt(e.stack)}(t),"System.Collections.IEnumerator.Reset"(){t=qn(e)},Dispose(){}}}class Xn{constructor(e,t){this.comparer=e,this.tree=t}GetHashCode(){return 0|function(e){const t=(e,t)=>(e<<1)+t+631;let n=0;const r=u(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n=0|t(n,y(e[0])),n=0|t(n,y(e[1]))}}finally{s(r)}return 0|n}(this)}Equals(e){if(!(e instanceof Xn))return!1;{const t=e,n=u(this);try{const e=u(t);try{const t=()=>{const r=n["System.Collections.IEnumerator.MoveNext"]();if(r===e["System.Collections.IEnumerator.MoveNext"]()){if(r){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"](),o=e["System.Collections.Generic.IEnumerator`1.get_Current"]();return!(!_(r[0],o[0])||!_(r[1],o[1]))&&t()}return!0}return!1};return t()}finally{s(e)}}finally{s(n)}}}toString(){return"map ["+Te("; ",Qt((e=>function(e,...t){let n;return"object"==typeof e?(n=String(t[0]),t.shift()):n=e,n.replace(ve,((e,n,r,o,i,s)=>{if(n<0||n>=t.length)throw new Error("Index must be greater or equal to zero and less than the arguments' length.");let a=t[n];if(oe(a))switch(i=null==i?null:parseInt(i,10),o){case"f":case"F":a=se(a,i=null!=i?i:2);break;case"g":case"G":a=null!=i?ae(a,i):ae(a);break;case"e":case"E":a=null!=i?le(a,i):le(a);break;case"p":case"P":i=null!=i?i:2,a=se(ie(a,100),i)+" %";break;case"d":case"D":a=null!=i?Ie(String(a),i,"0"):String(a);break;case"x":case"X":a=null!=i?Ie(ue(a),i,"0"):ue(a),"X"===o&&(a=a.toUpperCase());break;default:if(s){let e="";a=s.replace(/([0#,]+)(\.[0#]+)?/,((t,n,r)=>{ye(a,0)&&(a=ie(a,-1),e="-"),r=null==r?"":r.substring(1),a=se(a,Math.max(r.length,0));let[o,i]=a.split(".");i||(i=""),o=Ie(o,n.replace(/,/g,"").replace(/^#+/,"").length,"0");const s=r.replace(/#+$/,"").length;if(s>i.length?i=function(e,t){return ke(e,t,"0",!0)}(i,s):s<i.length&&(i=i.substring(0,s)+i.substring(s).replace(/0+$/,"")),n.indexOf(",")>0){const e=o.length%3,t=Math.floor(o.length/3);let n=e>0?o.substr(0,e)+(t>0?",":""):"";for(let r=0;r<t;r++)n+=o.substr(e+3*r,3)+(r<t-1?",":"");o=n}return i.length>0?o+"."+i:o})),a=e+a}}else a=a instanceof Date?j(a,s||o):fe(a);return r=parseInt((r||" ").substring(1),10),isNaN(r)||(a=ke(String(a),Math.abs(r)," ",r<0)),a}))}("({0}, {1})",e[0],e[1])),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}toJSON(){return Array.from(this)}GetEnumerator(){return Jn(this.tree)}[Symbol.iterator](){return c(u(this))}"System.Collections.IEnumerable.GetEnumerator"(){return Jn(this.tree)}CompareTo(e){const t=this;if(e instanceof Xn)return 0|function(e,t,n){const r=Bt(t);try{const t=Bt(n);try{let n=0,o=r["System.Collections.IEnumerator.MoveNext"](),i=t["System.Collections.IEnumerator.MoveNext"]();for(;0===n&&o&&i;)n=0|e(r["System.Collections.Generic.IEnumerator`1.get_Current"](),t["System.Collections.Generic.IEnumerator`1.get_Current"]()),0===n&&(o=r["System.Collections.IEnumerator.MoveNext"](),i=t["System.Collections.IEnumerator.MoveNext"]());return 0|(0!==n?n:o?1:i?-1:0)}finally{s(t)}}finally{s(r)}}(((e,n)=>{const r=0|t.comparer.Compare(e[0],n[0]);return 0|(0!==r?r:T(e[1],n[1]))}),t,e);throw new Error("not comparable\\nParameter name: obj")}"System.Collections.Generic.ICollection`1.Add2B595"(e){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Remove2B595"(e){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return nr(this,e[0])&&_(er(this,e[0]),e[1])}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(e,t){!function(e,t,n){let r=n;Un(((e,n)=>{qe(t,r,[e,n]),r=r+1|0}),e)}(this.tree,e,t)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|tr(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|tr(this)}get size(){return 0|tr(this)}clear(){throw new Error("Map cannot be mutated")}delete(e){throw new Error("Map cannot be mutated")}entries(){return Qt((e=>[e[0],e[1]]),this)}get(e){return er(this,e)}has(e){return nr(this,e)}keys(){return Qt((e=>e[0]),this)}set(e,t){throw new Error("Map cannot be mutated")}values(){return Qt((e=>e[1]),this)}forEach(e,t){const n=this;Xt((t=>{e(t[1],t[0],n)}),n)}}function Qn(e,t){return new Xn(e,t)}function er(e,t){return function(e,t,n){const r=Ln(e,t,n);if(null==r)throw new Error;return Pe(r)}(e.comparer,t,e.tree)}function tr(e){return Pn(e.tree)}function nr(e,t){return function(e,t,n){e:for(;;){const r=e,o=t;if(null!=n){const i=Pe(n),s=0|r.Compare(o,Cn(i));if(i instanceof kn){const a=i;if(s<0){e=r,t=o,n=Mn(a);continue e}if(0===s)return!0;e=r,t=o,n=An(a);continue e}return 0===s}return!1}}(e.comparer,t,e.tree)}function rr(e,t,n){return function(e,t,n){return Qn(e.comparer,Fn(e.comparer,t,n,e.tree))}(n,e,t)}function or(e,t){return function(e,t){return Ln(e.comparer,t,e.tree)}(t,e)}function ir(e,t){return r=e,Qn((n=t).comparer,jn(r,n.tree));var n,r}function sr(e,t){return Qn(t,Wn(t,e))}function ar(e){return function(e){return Qn(e,void 0)}(e)}const lr=new bn("",new wn(0,[]),it(),!1,void 0,void 0,void 0,new yn(0,[]));function ur(e,t){return"string"!=typeof(n=t)||0===n.length?new Array(0):Me(t,[e],void 0,0);var n}function cr(e){return new bn(e,lr.method,lr.headers,lr.withCredentials,lr.overridenMimeType,lr.overridenResponseType,lr.timeout,lr.content)}function dr(e,t){return new bn(t.url,e,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function fr(e,t){return new bn(t.url,t.method,gt(t.headers,at(e)),t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function pr(e){return t=t=>{const n=new XMLHttpRequest;n.open(function(e){switch(e.tag){case 1:return"POST";case 3:return"PATCH";case 2:return"PUT";case 4:return"DELETE";case 6:return"OPTIONS";case 5:return"HEAD";default:return"GET"}}(e.method),e.url),n.onreadystatechange=()=>{let e,r,o,i,s,a,l;var u,c;4===n.readyState&&t[0]((r=n.responseType,e=""===r||"text"===r?n.responseText:"",o=0|n.status,i=n.responseType,a=n.responseType,s=""===a||"text"===a?new xn(0,[n.responseText]):new xn("arraybuffer"===a?2:"blob"===a?1:3,[n.response]),u=function(e,t,n){const r=[];for(let n=0;n<=t.length-1;n++){const o=e(Ke(n,t));if(null!=o){const e=Pe(o);r.push(e)}}return _(n,null)?r:je((e=>e),r,n)}((e=>{const t=$t(ur(":",e));return lt(t)?void 0:[ut(t).toLocaleLowerCase(),Te(":",ct(t)).trim()]}),ur("\r\n",n.getAllResponseHeaders())),l=Qn(c={Compare:E},Wn(c,u)),new _n(o,e,i,n.responseURL,l,s)))};const r=u(e.headers);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n.setRequestHeader(e.fields[0],e.fields[1])}}finally{s(r)}n.withCredentials=e.withCredentials;const o=e.overridenMimeType;if(null==o);else{const e=o;n.overrideMimeType(e)}const i=e.overridenResponseType;if(null==i);else switch(i.tag){case 1:n.responseType="blob";break;case 2:n.responseType="arraybuffer";break;default:n.responseType="text"}const a=e.timeout;if(null==a);else{const e=0|a;n.timeout=0|e}const l=e.content;switch(l.tag){case 1:case 3:case 2:n.send(De(l.fields[0]));break;default:n.send()}},ln((e=>t([e.onSuccess,e.onError,e.onCancel])));var t}function hr(e){return new mr(1,[e])}new _n(0,"","","",ar({Compare:E}),new xn(0,[""]));class mr extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Ok","Error"]}}function $r(e,t){return 0===t.tag?(n=e(t.fields[0]),new mr(0,[n])):hr(t.fields[0]);var n}class gr extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class wr extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["PascalCase","CamelCase","SnakeCase"]}}class vr{constructor(){this.cache=new Map([])}}function yr(){return new vr}function br(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function xr(e,t){switch(e.tag){case 2:return function(e,t,n,r,o=0){if("string"==typeof e){const n=e;e=function(e,t=0){if(-284&t)throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Compiled, Singleline and ECMAScript");let n="gu";return n+=1&t?"i":"",n+=2&t?"m":"",n+=16&t?"s":"",new RegExp(e,n)}(t,r??0),t=n,r=void 0}if("function"==typeof n)return r=null==r?-1:r,t.substring(0,o)+t.substring(o).replace(e,(function(){let e=arguments[0];if(r){r--;const t=[],o=arguments.length,i="string"!=typeof arguments[o-1];let s=i?o-3:o-2;for(let e=0;e<s;e++)t.push(arguments[e]);t.index=arguments[s++],t.input=arguments[s++],i&&(t.groups=arguments[s]),e=n(t)}return e}));if(n=n.replace(/\$0/g,(e=>"$&")).replace(/\${([^}]+)}/g,"$<$1>"),null!=r){let i;const s=t.substring(o),a=de(e,s),l=de.length>r?(i=a[r-1],s.substring(0,i.index+i[0].length)):s;return t.substring(0,o)+l.replace(e,n)+t.substring(o+l.length)}return t.replace(e,n)}(br(t),"[A-Z]","_$0").toLowerCase();case 0:return t;default:return br(t)}}yr(),yr();const _r=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,Sr=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,Er=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function Cr(e,t){try{return t.contents=function(e){function t(e){return e.replace(Sr,"$1-$2-$3-$4-$5")}const n=e.trim().toLowerCase();if(_r.test(n))return function(e,...t){if(0===t.length)return e.trim();const n="["+ce(t.join(""))+"]+";return e.replace(new RegExp("^"+n),"").replace(new RegExp(n+"$"),"")}(n,"{","}","(",")");if(Sr.test(n))return t(n);if(Er.test(n))return t(n.replace(/[\{\},]|0x/g,""));throw new Error("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")}(e),!0}catch{return!1}}var Tr;function kr(e,t){switch(t){case 8:return e?[0,255]:[-128,127];case 16:return e?[0,65535]:[-32768,32767];case 32:return e?[0,4294967295]:[-2147483648,2147483647];default:throw new Error("Invalid bit size.")}}function Ir(e,t,n,r,o){const i=function(e,t,n){const r=/^\s*([\+\-])?(0[xXoObB])?([0-9a-fA-F]+)\s*$/.exec(e.replace(/_/g,""));if(null!=r){const[,,e,o]=r;n=n||function(e,t){if(t&Tr.AllowHexSpecifier)return 16;switch(e){case"0b":case"0B":return 2;case"0o":case"0O":return 8;case"0x":case"0X":return 16;default:return 10}}(e,t);const i=function(e){switch(e){case 2:return/[^0-1]/;case 8:return/[^0-7]/;case 10:return/[^0-9]/;case 16:return/[^0-9a-fA-F]/;default:throw new Error("Invalid Base.")}}(n);if(!i.test(o))return function(e,t){const[,n,r,o]=e;return{sign:n||"",prefix:r||"",digits:o,radix:t}}(r,n)}return null}(e,t,o);if(null!=i){let e=Number.parseInt(i.sign+i.digits,i.radix);if(!Number.isNaN(e)){const[t,o]=kr(!0,r);!n&&10!==i.radix&&e>=t&&e<=o&&(e=e<<32-r>>32-r);const[s,a]=kr(n,r);if(e>=s&&e<=a)return e}}throw new Error(`The input string ${e} was not in a correct format.`)}function Mr(e,t,n,r,o){try{return o.contents=Ir(e,t,n,r),!0}catch{return!1}}function Ar(e,t){!function(e){if(null!=e&&0!==e){if(e%6e4!=0)throw new Error("Offset must be specified in whole minutes.");if(Math.abs(e/36e5)>14)throw new Error("Offset must be within plus or minus 14 hours.")}}(t);const n=new Date(e);return n.offset=null!=t?t:-6e4*(new Date).getTimezoneOffset(),n}function Rr(e,t){try{return t.contents=function(e){const[t,n]=Y(e),r=null==n?-6e4*t.getTimezoneOffset():"Z"===n?0:6e4*n;return Ar(t.getTime(),r)}(e),!0}catch(e){return!1}}function Or(e){return e<0?Math.ceil(e):Math.floor(e)}function Pr(e=0,t=0,n=0,r=0,o=0){switch(arguments.length){case 1:return Number(BigInt(arguments[0])/10000n);case 3:e=0,t=arguments[0],n=arguments[1],r=arguments[2],o=0}return 864e5*e+36e5*t+6e4*n+1e3*r+o}function Nr(e,t){try{return t.contents=function(e){const t=e.search("\\."),n=e.search("\\:");if(-1===t&&-1===n){const t=parseInt(e,0);if(isNaN(t))throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`);return Pr(t,0,0,0,0)}if(n>0){const t=/^(-?)((\d+)\.)?(?:0*)([0-9]|0[0-9]|1[0-9]|2[0-3]):(?:0*)([0-5][0-9]|[0-9])(:(?:0*)([0-5][0-9]|[0-9]))?\.?(\d+)?$/.exec(e);if(null!=t&&null!=t[4]&&null!=t[5]){let n=0,r=0,o=0;const i=null!=t[1]&&"-"===t[1]?-1:1,s=+t[4],a=+t[5];if(null!=t[3]&&(n=+t[3]),null!=t[7]&&(o=+t[7]),null!=t[8])switch(t[8].length){case 1:r=100*+t[8];break;case 2:r=10*+t[8];break;case 3:r=+t[8];break;case 4:r=+t[8]/10;break;case 5:r=+t[8]/100;break;case 6:r=+t[8]/1e3;break;case 7:r=+t[8]/1e4;break;default:throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}return i*Pr(n,s,a,o,r)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}(e),!0}catch{return!1}}!function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"}(Tr||(Tr={}));class Dr{constructor(e,t,n,r){this.declaringType=e,this.tag=t,this.name=n,this.fields=r}}class Fr{constructor(e,t,n,r,o,i,s){this.fullname=e,this.generics=t,this.construct=n,this.parent=r,this.fields=o,this.cases=i,this.enumCases=s}toString(){return Xr(this)}GetHashCode(){return Br(this)}Equals(e){return Hr(this,e)}}function Lr(e){return null!=e.generics?e.generics:[]}function Br(e){return v([g(e.fullname),...Lr(e).map(Br)])}function Hr(e,t){return""===e.fullname?""===t.fullname&&b(lo(e),lo(t),(([e,t],[n,r])=>e===n&&Hr(t,r))):e.fullname===t.fullname&&b(Lr(e),Lr(t),Hr)}function Vr(e,t,n,r){return new Fr(e,t,n,void 0,r)}function Gr(...e){return new Fr("",void 0,void 0,void 0,(()=>e))}function Ur(e,t,n,r){const o=new Fr(e,t,n,void 0,void 0,(()=>{const e=n.prototype.cases();return r().map(((t,n)=>new Dr(o,n,e[n],t)))}));return o}function zr(e){return new Fr("Microsoft.FSharp.Core.FSharpOption`1",[e])}function jr(e){return new Fr("Microsoft.FSharp.Collections.FSharpList`1",[e])}function Wr(e,t,n){return new Fr(e,[t],void 0,void 0,void 0,void 0,n)}const Yr=new Fr("System.Object"),Kr=(new Fr("Microsoft.FSharp.Core.Unit"),new Fr("System.Char"),new Fr("System.String")),qr=new Fr("System.Boolean"),Zr=(new Fr("System.SByte"),new Fr("System.Byte"),new Fr("System.Int16"),new Fr("System.UInt16"),new Fr("System.Int32"));function Jr(e){if(Array.isArray(e))return e[0];if(e instanceof Fr){const t=eo(e);if(null!=t)return Jr(t)+"[]";{const t=e.fullname.lastIndexOf(".");return-1===t?e.fullname:e.fullname.substr(t+1)}}return e.name}function Xr(e){const t=eo(e);return null!=t?Xr(t)+"[]":null==e.generics||0===e.generics.length?e.fullname:e.fullname+"["+e.generics.map((e=>Xr(e))).join(",")+"]"}function Qr(e){return null!=eo(e)}function eo(e){return"[]"===e.fullname&&1===e.generics?.length?e.generics[0]:void 0}function to(e){return null!=e.generics&&e.generics.length>0}function no(e){return null!=e.enumCases&&e.enumCases.length>0}function ro(e){return null==e.generics?e:new Fr(e.fullname,e.generics.map((()=>Yr)))}function oo(e){return e.generics?.[0]}function io(e){if(no(e)&&null!=e.enumCases)return e.enumCases.map((e=>e[1]));throw new Error(`${e.fullname} is not an enum type`)}function so(e,t){const n=parseInt(t,10);return function(e,t){if(null!=e.enumCases){if("string"==typeof t){for(const n of e.enumCases)if(n[0]===t)return n;throw new Error(`'${t}' was not found in ${e.fullname}`)}for(const n of e.enumCases)if(n[1]===t)return n;return["",t]}throw new Error(`${e.fullname} is not an enum type`)}(e,isNaN(n)?t:n)[1]}function ao(e){if(null!=e.cases)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}function lo(e){if(null!=e.fields)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function uo(e){if(po(e)&&null!=e.generics)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}function co(e){return e instanceof Fr?null!=e.cases:e instanceof pe}function fo(e){return e instanceof Fr?null!=e.fields:e instanceof he}function po(e){return e.fullname.startsWith("System.Tuple")}function ho(e){return null==e.fields?[]:e.fields}new Fr("System.UInt32"),new Fr("System.Int64"),new Fr("System.UInt64"),new Fr("System.Int128"),new Fr("System.UInt128"),new Fr("System.IntPtr"),new Fr("System.UIntPtr"),new Fr("System.Half"),new Fr("System.Single"),new Fr("System.Double"),new Fr("System.Decimal"),new Fr("System.Numerics.BigInteger");class mo{constructor(e){this.k=e}}function $o(e){return new mo(e)}function go(e){return e.k}class wo extends mo{constructor(e,t,n,r){super(e),this.left=t,this.right=n,this.h=0|r}}function vo(e,t,n,r){return new wo(e,t,n,r)}function yo(e){return e.left}function bo(e){return e.right}function xo(e){return e.h}function _o(e,t){e:for(;;){const n=t;if(null!=e){const r=Pe(e);if(r instanceof wo){const o=r;e=yo(o),t=_o(bo(o),n+1);continue e}return n+1|0}return 0|n}}function So(e){return _o(e,0)}function Eo(e,t,n){let r,o,i,s;if(null!=e){const t=Pe(e);i=t instanceof wo?(r=t,xo(r)):1}else i=0;if(null!=n){const e=Pe(n);s=e instanceof wo?(o=e,xo(o)):1}else s=0;const a=0|(i<s?s:i);return 0===a?$o(t):vo(t,e,n,a+1)}function Co(e,t,n){let r,o,i,s,a,l,u,c,d,f;if(null!=e){const t=Pe(e);d=t instanceof wo?(r=t,xo(r)):1}else d=0;if(null!=n){const e=Pe(n);f=e instanceof wo?(o=e,xo(o)):1}else f=0;if(f>d+2){const r=Pe(n);if(r instanceof wo){const n=r;if(i=yo(n),(null!=i?(s=Pe(i),s instanceof wo?(a=s,xo(a)):1):0)>d+1){const r=Pe(yo(n));if(r instanceof wo){const o=r;return Eo(Eo(e,t,yo(o)),go(o),Eo(bo(o),go(n),bo(n)))}throw new Error("internal error: Set.rebalance")}return Eo(Eo(e,t,yo(n)),go(n),bo(n))}throw new Error("internal error: Set.rebalance")}if(d>f+2){const r=Pe(e);if(r instanceof wo){const e=r;if(l=bo(e),(null!=l?(u=Pe(l),u instanceof wo?(c=u,xo(c)):1):0)>f+1){const r=Pe(bo(e));if(r instanceof wo){const o=r;return Eo(Eo(yo(e),go(e),yo(o)),go(o),Eo(bo(o),t,n))}throw new Error("internal error: Set.rebalance")}return Eo(yo(e),go(e),Eo(bo(e),t,n))}throw new Error("internal error: Set.rebalance")}return Eo(e,t,n)}function To(e,t,n){if(null!=n){const r=Pe(n),o=0|e.Compare(t,go(r));if(r instanceof wo){const i=r;return o<0?Co(To(e,t,yo(i)),go(i),bo(i)):0===o?n:Co(yo(i),go(i),To(e,t,bo(i)))}{const o=0|e.Compare(t,go(r));return o<0?vo(t,void 0,n,2):0===o?n:vo(t,n,void 0,2)}}return $o(t)}function ko(e,t,n){e:for(;;){const r=e,o=t;if(null!=n){const i=Pe(n),s=0|r.Compare(o,go(i));if(i instanceof wo){const a=i;if(s<0){e=r,t=o,n=yo(a);continue e}if(0===s)return!0;e=r,t=o,n=bo(a);continue e}return 0===s}return!1}}function Io(e,t){e:for(;;){const n=e;if(null!=t){const r=Pe(t);if(r instanceof wo){const o=r;Io(n,yo(o)),n(go(o)),e=n,t=bo(o);continue e}n(go(r))}break}}class Mo extends he{constructor(e,t){super(),this.stack=e,this.started=t}}function Ao(e){e:for(;;){const t=e;if(lt(t))return it();{const n=ut(t),r=ct(t);if(null!=n){const o=Pe(n);if(o instanceof wo){const t=o;e=mt([yo(t),$o(go(t)),bo(t)],r);continue e}return t}e=r;continue e}}}function Ro(e){return new Mo(Ao(at(e)),!1)}function Oo(e){if(e.started){const t=e.stack;if(lt(t))return function(){throw new Error("Enumeration already started")}();if(null!=ut(t))return go(Pe(ut(t)));throw new Error("Please report error: Set iterator, unexpected stack for current")}return function(){throw new Error("Enumeration not started")}()}function Po(e){let t=Ro(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>Oo(t),"System.Collections.IEnumerator.get_Current":()=>Oo(t),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const t=e.stack;if(lt(t))return!1;if(null!=ut(t)){if(Pe(ut(t))instanceof wo)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=Ao(ct(t)),!lt(e.stack)}throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}return e.started=!0,!lt(e.stack)}(t),"System.Collections.IEnumerator.Reset"(){t=Ro(e)},Dispose(){}}}function No(e,t,n){return null==t?null==n?0:-1:null==n?1:0|function(e,t,n){e:for(;;){const r=e,o=t,i=n;if(lt(o))return lt(i)?0:-1;if(lt(i))return 1;if(null!=ut(i))if(null!=ut(o)){const s=Pe(ut(o)),a=Pe(ut(i));if(s instanceof wo){const l=s;if(null==yo(l)){if(!(a instanceof wo)){const s=0|r.Compare(go(l),go(a));if(0!==s)return 0|s;e=r,t=st(bo(l),ct(o)),n=st(void 0,ct(i));continue e}{const s=a;if(null==yo(s)){const a=0|r.Compare(go(l),go(s));if(0!==a)return 0|a;e=r,t=st(bo(l),ct(o)),n=st(bo(s),ct(i));continue e}{let s,a,l,u,c;switch(lt(o)?lt(i)?s=2:null!=ut(i)?(s=1,u=ct(i),c=Pe(ut(i))):s=2:null!=ut(o)?(s=0,a=ct(o),l=Pe(ut(o))):lt(i)?s=2:null!=ut(i)?(s=1,u=ct(i),c=Pe(ut(i))):s=2,s){case 0:if(l instanceof wo){const o=l;e=r,t=mt([yo(o),vo(go(o),void 0,bo(o),0)],a),n=i;continue e}e=r,t=mt([void 0,$o(go(l))],a),n=i;continue e;case 1:if(c instanceof wo){const i=c;e=r,t=o,n=mt([yo(i),vo(go(i),void 0,bo(i),0)],u);continue e}e=r,t=o,n=mt([void 0,$o(go(c))],u);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}}}else{let s,a,l,u,c;switch(lt(o)?lt(i)?s=2:null!=ut(i)?(s=1,u=ct(i),c=Pe(ut(i))):s=2:null!=ut(o)?(s=0,a=ct(o),l=Pe(ut(o))):lt(i)?s=2:null!=ut(i)?(s=1,u=ct(i),c=Pe(ut(i))):s=2,s){case 0:if(l instanceof wo){const o=l;e=r,t=mt([yo(o),vo(go(o),void 0,bo(o),0)],a),n=i;continue e}e=r,t=mt([void 0,$o(go(l))],a),n=i;continue e;case 1:if(c instanceof wo){const i=c;e=r,t=o,n=mt([yo(i),vo(go(i),void 0,bo(i),0)],u);continue e}e=r,t=o,n=mt([void 0,$o(go(c))],u);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{if(!(a instanceof wo)){const l=0|r.Compare(go(s),go(a));if(0!==l)return 0|l;e=r,t=ct(o),n=ct(i);continue e}{const l=a;if(null==yo(l)){const a=0|r.Compare(go(s),go(l));if(0!==a)return 0|a;e=r,t=st(void 0,ct(o)),n=st(bo(l),ct(i));continue e}{let s,a,l,u,c;switch(lt(o)?lt(i)?s=2:null!=ut(i)?(s=1,u=ct(i),c=Pe(ut(i))):s=2:null!=ut(o)?(s=0,a=ct(o),l=Pe(ut(o))):lt(i)?s=2:null!=ut(i)?(s=1,u=ct(i),c=Pe(ut(i))):s=2,s){case 0:if(l instanceof wo){const o=l;e=r,t=mt([yo(o),vo(go(o),void 0,bo(o),0)],a),n=i;continue e}e=r,t=mt([void 0,$o(go(l))],a),n=i;continue e;case 1:if(c instanceof wo){const i=c;e=r,t=o,n=mt([yo(i),vo(go(i),void 0,bo(i),0)],u);continue e}e=r,t=o,n=mt([void 0,$o(go(c))],u);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}}}}else{let s,a,l,u,c;switch(Pe(ut(i)),lt(o)?lt(i)?s=2:null!=ut(i)?(s=1,u=ct(i),c=Pe(ut(i))):s=2:null!=ut(o)?(s=0,a=ct(o),l=Pe(ut(o))):lt(i)?s=2:null!=ut(i)?(s=1,u=ct(i),c=Pe(ut(i))):s=2,s){case 0:if(l instanceof wo){const o=l;e=r,t=mt([yo(o),vo(go(o),void 0,bo(o),0)],a),n=i;continue e}e=r,t=mt([void 0,$o(go(l))],a),n=i;continue e;case 1:if(c instanceof wo){const i=c;e=r,t=o,n=mt([yo(i),vo(go(i),void 0,bo(i),0)],u);continue e}e=r,t=o,n=mt([void 0,$o(go(c))],u);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(null==ut(o)){e=r,t=ct(o),n=ct(i);continue e}{let s,a,l,u,c;switch(Pe(ut(o)),lt(o)?lt(i)?s=2:null!=ut(i)?(s=1,u=ct(i),c=Pe(ut(i))):s=2:null!=ut(o)?(s=0,a=ct(o),l=Pe(ut(o))):lt(i)?s=2:null!=ut(i)?(s=1,u=ct(i),c=Pe(ut(i))):s=2,s){case 0:if(l instanceof wo){const o=l;e=r,t=mt([yo(o),vo(go(o),void 0,bo(o),0)],a),n=i;continue e}e=r,t=mt([void 0,$o(go(l))],a),n=i;continue e;case 1:if(c instanceof wo){const i=c;e=r,t=o,n=mt([yo(i),vo(go(i),void 0,bo(i),0)],u);continue e}e=r,t=o,n=mt([void 0,$o(go(c))],u);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}}break}}(e,at(t),at(n))}function Do(e,t,n){let r=n;Io((e=>{qe(t,r,e),r=r+1|0}),e)}function Fo(e,t){if(o(t))return function(e,t){return Ye(((t,n)=>To(e,n,t)),void 0,t)}(e,t);if(t instanceof Je)return function(e,t){return ft(((t,n)=>To(e,n,t)),void 0,t)}(e,t);{const n=u(t);try{return function(e,t,n){for(;;){const r=e,o=t,i=n;if(!i["System.Collections.IEnumerator.MoveNext"]())return o;e=r,t=To(r,i["System.Collections.Generic.IEnumerator`1.get_Current"](),o),n=i}}(e,void 0,n)}finally{s(n)}}}class Lo{constructor(e,t){this.comparer=e,this.tree=t}GetHashCode(){return 0|function(e){let t=0;const n=u(e);try{for(;n["System.Collections.IEnumerator.MoveNext"]();)t=(t<<1)+y(n["System.Collections.Generic.IEnumerator`1.get_Current"]())+631|0}finally{s(n)}return 0|Math.abs(t)}(this)}Equals(e){let t;return e instanceof Lo&&(t=e,0===No(Ho(this),Vo(this),Vo(t)))}toString(){return"set ["+Te("; ",Qt((e=>fe(e)),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(){return Array.from(this)}CompareTo(e){return 0|No(Ho(this),Vo(this),Vo(e))}"System.Collections.Generic.ICollection`1.Add2B595"(e){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Remove2B595"(e){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return ko(Ho(this),e,Vo(this))}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(e,t){Do(Vo(this),e,t)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|Uo(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|Uo(this)}GetEnumerator(){return Po(Vo(this))}[Symbol.iterator](){return c(u(this))}"System.Collections.IEnumerable.GetEnumerator"(){return Po(Vo(this))}get size(){return 0|Uo(this)}add(e){throw new Error("Set cannot be mutated")}clear(){throw new Error("Set cannot be mutated")}delete(e){throw new Error("Set cannot be mutated")}has(e){return zo(this,e)}keys(){return Qt((e=>e),this)}values(){return Qt((e=>e),this)}entries(){return Qt((e=>[e,e]),this)}forEach(e,t){const n=this;Xt((t=>{e(t,t,n)}),n)}}function Bo(e,t){return new Lo(e,t)}function Ho(e){return e.comparer}function Vo(e){return e.tree}function Go(e){return Bo(e,void 0)}function Uo(e){return So(Vo(e))}function zo(e,t){return ko(Ho(e),t,Vo(e))}function jo(e,t){return zo(t,e)}function Wo(e,t){return function(e,t){return Bo(Ho(e),To(Ho(e),t,Vo(e)))}(t,e)}function Yo(e,t,n){try{return"Expecting "+e+" but instead got:"+(n?"\n":" ")+JSON.stringify(t,null,4)}catch(t){return"Expecting "+e+" but decoder failed. Couldn't report given value due to circular structure."+(n?"\n":" ")}}function Ko(e,t){const n=2===t.tag?Yo(t.fields[0],t.fields[1],!0):1===t.tag?Yo(t.fields[0],t.fields[1],!1)+"\nReason: "+t.fields[2]:3===t.tag?Yo(t.fields[0],t.fields[1],!0):4===t.tag?Yo(t.fields[0],t.fields[1],!0)+"\nNode `"+t.fields[2]+"` is unkown.":5===t.tag?"Expecting "+t.fields[0]+".\n"+JSON.stringify(t.fields[1],null,4):7===t.tag?"The following errors were found:\n\n"+Te("\n\n",t.fields[0]):6===t.tag?"The following `failure` occurred with the decoder: "+t.fields[0]:Yo(t.fields[0],t.fields[1],!1);return 7===t.tag?n:"Error at: `"+e+"`\n"+n}function qo(e,t,n){const r=t(e,n);if(1===r.tag){const e=r.fields[0];return new mr(1,[Ko(e[0],e[1])])}return new mr(0,[r.fields[0]])}function Zo(e,t){try{return qo("$",e,JSON.parse(t))}catch(e){if(e instanceof SyntaxError)return new mr(1,["Given an invalid JSON: "+e.message]);throw e}}function Jo(e,t){return"string"==typeof t?new mr(0,[t]):new mr(1,[[e,new gr(0,["a string",t])]])}const Xo=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?-128<=e&&e<=127?new mr(0,[(e+128&255)-128]):new mr(1,[[n,new gr(1,["a sbyte",e,"Value was either too large or too small for a sbyte"])]]):new mr(1,[[n,new gr(1,["a sbyte",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Mr(r,511,!1,8,new me((()=>t),(e=>{t=0|e}))),t],e[0]?new mr(0,[e[1]]):new mr(1,[[n,new gr(0,["a sbyte",r])]])}return new mr(1,[[n,new gr(0,["a sbyte",r])]])},Qo=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=255?new mr(0,[255&e]):new mr(1,[[n,new gr(1,["a byte",e,"Value was either too large or too small for a byte"])]]):new mr(1,[[n,new gr(1,["a byte",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Mr(r,511,!0,8,new me((()=>t),(e=>{t=e}))),t],e[0]?new mr(0,[e[1]]):new mr(1,[[n,new gr(0,["a byte",r])]])}return new mr(1,[[n,new gr(0,["a byte",r])]])},ei=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?-32768<=e&&e<=32767?new mr(0,[(e+32768&65535)-32768]):new mr(1,[[n,new gr(1,["an int16",e,"Value was either too large or too small for an int16"])]]):new mr(1,[[n,new gr(1,["an int16",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Mr(r,511,!1,16,new me((()=>t),(e=>{t=0|e}))),t],e[0]?new mr(0,[e[1]]):new mr(1,[[n,new gr(0,["an int16",r])]])}return new mr(1,[[n,new gr(0,["an int16",r])]])},ti=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=65535?new mr(0,[65535&e]):new mr(1,[[n,new gr(1,["an uint16",e,"Value was either too large or too small for an uint16"])]]):new mr(1,[[n,new gr(1,["an uint16",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Mr(r,511,!0,16,new me((()=>t),(e=>{t=e}))),t],e[0]?new mr(0,[e[1]]):new mr(1,[[n,new gr(0,["an uint16",r])]])}return new mr(1,[[n,new gr(0,["an uint16",r])]])},ni=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?-2147483648<=e&&e<=2147483647?new mr(0,[~~e]):new mr(1,[[n,new gr(1,["an int",e,"Value was either too large or too small for an int"])]]):new mr(1,[[n,new gr(1,["an int",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Mr(r,511,!1,32,new me((()=>t),(e=>{t=0|e}))),t],e[0]?new mr(0,[e[1]]):new mr(1,[[n,new gr(0,["an int",r])]])}return new mr(1,[[n,new gr(0,["an int",r])]])},ri=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=4294967295?new mr(0,[e>>>0]):new mr(1,[[n,new gr(1,["an uint32",e,"Value was either too large or too small for an uint32"])]]):new mr(1,[[n,new gr(1,["an uint32",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Mr(r,511,!0,32,new me((()=>t),(e=>{t=e}))),t],e[0]?new mr(0,[e[1]]):new mr(1,[[n,new gr(0,["an uint32",r])]])}return new mr(1,[[n,new gr(0,["an uint32",r])]])};function oi(e,t,n,r){let o;const i=n+".["+m(e)+"]";if(Array.isArray(r)){const n=r;return e<n.length?t(i,Ke(e,n)):new mr(1,[[i,new gr(5,["a longer array. Need index `"+m(e)+"` but there are only `"+(o=n.length,m(o)+"` entries"),r])]])}return new mr(1,[[i,new gr(0,["an array",r])]])}function ii(e,t,n){if(Array.isArray(n)){let r=-1;return $r(pt,Ye(((n,o)=>{if(r=r+1|0,0===n.tag){const i=e(t+".["+m(r)+"]",o);return 0===i.tag?new mr(0,[st(i.fields[0],n.fields[0])]):new mr(1,[i.fields[0]])}return n}),new mr(0,[it()]),n))}return new mr(1,[[t,new gr(0,["a list",n])]])}function si(e,t,n){if(Array.isArray(n)){let r=-1;const o=n;return Ye(((n,o)=>{if(r=r+1|0,0===n.tag){const i=n.fields[0],s=e(t+".["+m(r)+"]",o);return 0===s.tag?(qe(i,r,s.fields[0]),new mr(0,[i])):new mr(1,[s.fields[0]])}return n}),new mr(0,[ze(new Array(o.length),0,o.length,null)]),o)}return new mr(1,[[t,new gr(0,["an array",n])]])}function ai(e,t,n,r){const o=t(n,r);return 0===o.tag?e(o.fields[0],n,r):new mr(1,[o.fields[0]])}function li(e,t){let n;const r=e;return n=e=>t=>oi(0,r,e,t),e=>r=>ai(R((e=>{let n;const r=t;return n=e=>t=>oi(1,r,e,t),t=>r=>ai(((t,n,r)=>new mr(0,[[e,t]])),M(n),t,r)})),M(n),e,r)}function ui(e){return sr(e,{Compare:T})}function ci(e,t,n,r){let o;const i=t.length+e|0;if(i!==r.length)return new mr(1,[[n,new gr(6,[(o=0|r.length,_e(be("Expected array of length %i but got %i"))(i)(o))])]]);{let o=new mr(0,[it()]);for(let i=e;i<=r.length-1;i++)if(0===o.tag){const s=o.fields[0],a=_e(be("%s[%i]"))(n)(i),l=Ke(i-e,t),u=Ke(i,r);o=$r((e=>st(e,s)),l(a)(u))}return $r(pt,o)}}function di(e,t,n,r,o,i){const s=function(e,t){return t.find((e=>Jr(e)===r))}(0,ao(n));if(null!=s){const n=s,r=je((n=>pi(e,t,!1,n[1])),ho(n));return $r((e=>function(e,t){const n=(e.fields||[]).length;if(t.length!==n)throw new Error(`Expected an array of length ${n} but got ${t.length}`);const r=e.declaringType.construct;return null==r?{}:e.declaringType.cases&&1==e.declaringType.cases().length?new r(...t):new r(e.tag,t)}(n,dt(e))),0===r.length&&i.length<=1?new mr(0,[it()]):ci(1,r,o,i))}return new mr(1,[[o,new gr(6,["Cannot find case "+r+" in "+Xr(n)])]])}function fi(e,t,n,r){let o;const i=new me(null);let s;const a=Xr(r);let l;if(s=""===a?e:rr(a,i,e),fo(r)){const e=je((e=>[xr(t,Jr(e)),pi(s,t,!1,e[1])]),lo(r));l=t=>n=>$r((e=>function(e,t){const n=lo(e);if(n.length!==t.length)throw new Error(`Expected an array of length ${n.length} but got ${t.length}`);return null!=e.construct?new e.construct(...t):n.reduce(((e,[n,r],o)=>(e[n]=t[o],e)),{})}(r,dt(e))),function(e,t,n){return null===n||Object.getPrototypeOf(n||!1)!==Object.prototype?new mr(1,[[t,new gr(0,["an object",n])]]):Ze(((e,r)=>{const o=e[0];return 0===r.tag?$r((e=>st(e,r.fields[0])),e[1](t+"."+o)(n[o])):r}),e,new mr(0,[it()]))}(e,t,n))}else if(co(r))l=e=>n=>{if("string"==typeof n)return di(s,t,r,n,e,[]);if(Array.isArray(n)){const a=n;return o=n=>di(s,t,r,n,e,a),0===(i=Jo(e+"[0]",Ke(0,a))).tag?o(i.fields[0]):hr(i.fields[0])}return new mr(1,[[e,new gr(0,["a string or array",n])]]);var o,i};else{if(!n)throw new Error((o=Xr(r),_e(be("Cannot generate auto decoder for %s. Please pass an extra decoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders"))(o)));l=e=>t=>new mr(1,[[e,new gr(2,["an extra coder for "+Xr(r),t])]])}return i.contents=l,l}function pi(e,t,n,r){let o,i,s,a;const l=Xr(r),u=or(l,e);if(null!=u){const e=u;return t=>n=>e.contents(t)(n)}if(Qr(r)){const n=pi(e,t,!1,eo(r));return e=>t=>si(M(n),e,t)}if(no(r))switch(Xr(oo(r))){case"System.SByte":return e=>t=>{const n=r,o=e,i=t,s=Xo(o)(i);if(1===s.tag)return new mr(1,[s.fields[0]]);{const e=0|s.fields[0];return qt(e,io(n),{Equals:(e,t)=>e===t,GetHashCode:w})?new mr(0,[so(n,e.toString())]):new mr(1,[[o,new gr(1,[Xr(n),i,"Unkown value provided for the enum"])]])}};case"System.Byte":return e=>t=>{const n=r,o=e,i=t,s=Qo(o)(i);if(1===s.tag)return new mr(1,[s.fields[0]]);{const e=s.fields[0];return qt(e,io(n),{Equals:(e,t)=>e===t,GetHashCode:w})?new mr(0,[so(n,e.toString())]):new mr(1,[[o,new gr(1,[Xr(n),i,"Unkown value provided for the enum"])]])}};case"System.Int16":return e=>t=>{const n=r,o=e,i=t,s=ei(o)(i);if(1===s.tag)return new mr(1,[s.fields[0]]);{const e=0|s.fields[0];return qt(e,io(n),{Equals:(e,t)=>e===t,GetHashCode:w})?new mr(0,[so(n,h(e))]):new mr(1,[[o,new gr(1,[Xr(n),i,"Unkown value provided for the enum"])]])}};case"System.UInt16":return e=>t=>{const n=r,o=e,i=t,s=ti(o)(i);if(1===s.tag)return new mr(1,[s.fields[0]]);{const e=s.fields[0];return qt(e,io(n),{Equals:(e,t)=>e===t,GetHashCode:w})?new mr(0,[so(n,e.toString())]):new mr(1,[[o,new gr(1,[Xr(n),i,"Unkown value provided for the enum"])]])}};case"System.Int32":return e=>t=>{const n=r,o=e,i=t,s=ni(o)(i);if(1===s.tag)return new mr(1,[s.fields[0]]);{const e=0|s.fields[0];return qt(e,io(n),{Equals:(e,t)=>e===t,GetHashCode:w})?new mr(0,[so(n,m(e))]):new mr(1,[[o,new gr(1,[Xr(n),i,"Unkown value provided for the enum"])]])}};case"System.UInt32":return e=>t=>{const n=r,o=e,i=t,s=ri(o)(i);if(1===s.tag)return new mr(1,[s.fields[0]]);{const e=s.fields[0];return qt(e,io(n),{Equals:(e,t)=>e===t,GetHashCode:w})?new mr(0,[so(n,e.toString())]):new mr(1,[[o,new gr(1,[Xr(n),i,"Unkown value provided for the enum"])]])}};default:{const e=Xr(r),t=Se(be("Cannot generate auto decoder for %s.\nThoth.Json.Net only support the following enum types:\n- sbyte\n- byte\n- int16\n- uint16\n- int\n- uint32\nIf you can't use one of these types, please pass an extra decoder.\n "))(e);return e=>t(e)}}else if(to(r)){if(po(r)){const n=je((n=>pi(e,t,!1,n)),uo(r));return e=>t=>Array.isArray(t)?$r((e=>dt(e)),ci(0,n,e,t)):new mr(1,[[e,new gr(0,["an array",t])]])}switch(Xr(ro(r))){case"Microsoft.FSharp.Core.FSharpOption`1[System.Object]":return o=pi(e,t,!0,Ke(0,Lr(r))),e=>t=>{return n=M(o),r=e,null==(i=t)?new mr(0,[void 0]):$r(De,n(r,i));var n,r,i};case"Microsoft.FSharp.Collections.FSharpList`1[System.Object]":return i=pi(e,t,!1,Ke(0,Lr(r))),e=>t=>ii(M(i),e,t);case"System.Collections.Generic.IEnumerable`1[System.Object]":return s=pi(e,t,!1,Ke(0,Lr(r))),e=>t=>function(e,t,n){if(Array.isArray(n)){let r=-1;return $r(en,Ye(((n,o)=>{if(r=r+1|0,0===n.tag){const i=e(t+".["+m(r)+"]",o);return 0===i.tag?new mr(0,[Kt([i.fields[0]],n.fields[0])]):new mr(1,[i.fields[0]])}return n}),new mr(0,[[]]),n))}return new mr(1,[[t,new gr(0,["a seq",n])]])}(M(s),e,t);case"Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]":{const n=pi(e,t,!1,Ke(0,Lr(r))),o=pi(e,t,!1,Ke(1,Lr(r)));let i;const s=$t([e=>t=>function(e,t,n,r){return null===r||Object.getPrototypeOf(r||!1)!==Object.prototype?new mr(1,[[n,new gr(0,["an object",r])]]):Jt(((o,i)=>{if(0===o.tag){const s=e(n,i);if(0===s.tag){const e=t(n+"."+i,r[i]);return 0===e.tag?new mr(0,[st([s.fields[0],e.fields[0]],o.fields[0])]):new mr(1,[e.fields[0]])}return new mr(1,[s.fields[0]])}return o}),new mr(0,[it()]),Object.keys(r))}(M(n),M(o),e,t),(a=li(M(n),M(o)),e=>t=>ii(M(a),e,t))]);return i=e=>t=>{return n=e,r=t,((e,t)=>{e:for(;;){const o=e,i=t;if(lt(o))return new mr(1,[[n,new gr(7,[i])]]);{const s=qo(n,M(ut(o)),r);if(1===s.tag){e=ct(o),t=gt(i,at(s.fields[0]));continue e}return new mr(0,[s.fields[0]])}}})(s,it());var n,r},e=>t=>function(e,t,n,r){const o=t(n,r);return 1===o.tag?new mr(1,[o.fields[0]]):new mr(0,[e(o.fields[0])])}(ui,M(i),e,t)}case"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]":{const n=pi(e,t,!1,Ke(0,Lr(r)));return e=>t=>{const r=si(M(n),e,t);return 0===r.tag?new mr(0,[(o=r.fields[0],Bo(i={Compare:T},Fo(i,o)))]):new mr(1,[r.fields[0]]);var o,i}}default:return fi(e,t,n,r)}}else switch(l){case"System.Boolean":return e=>t=>{return n=e,"boolean"==typeof(r=t)?new mr(0,[r]):new mr(1,[[n,new gr(0,["a boolean",r])]]);var n,r};case"Microsoft.FSharp.Core.Unit":return e=>t=>{return n=e,null==(r=t)?new mr(0,[void 0]):new mr(1,[[n,new gr(0,["null",r])]]);var n,r};case"System.String":return e=>t=>Jo(e,t);case"System.Char":return e=>t=>function(e,t){if("string"==typeof t){const n=t;return 1===n.length?new mr(0,[n[0]]):new mr(1,[[e,new gr(0,["a single character string",t])]])}return new mr(1,[[e,new gr(0,["a char",t])]])}(e,t);case"System.SByte":return Xo;case"System.Byte":return Qo;case"System.Int16":return ei;case"System.UInt16":return ti;case"System.Int32":return ni;case"System.UInt32":return ri;case"System.Double":return e=>t=>{return n=e,"number"==typeof(r=t)?new mr(0,[r]):new mr(1,[[n,new gr(0,["a float",r])]]);var n,r};case"System.Single":return e=>t=>{return n=e,"number"==typeof(r=t)?new mr(0,[r]):new mr(1,[[n,new gr(0,["a float32",r])]]);var n,r};case"System.DateTime":return e=>t=>function(e,t){if("string"==typeof t){let r,o=W(-621355968e5,1);return r=[K(t,new me((()=>o),(e=>{o=e}))),o],r[0]?new mr(0,[(n=r[1],1===n.kind?n:W(n.getTime(),1))]):new mr(1,[[e,new gr(0,["a datetime",t])]])}var n;return new mr(1,[[e,new gr(0,["a datetime",t])]])}(e,t);case"System.DateTimeOffset":return e=>t=>function(e,t){if("string"==typeof t){let n,r=Ar(-621355968e5,0);return n=[Rr(t,new me((()=>r),(e=>{r=e}))),r],n[0]?new mr(0,[n[1]]):new mr(1,[[e,new gr(0,["a datetimeoffset",t])]])}return new mr(1,[[e,new gr(0,["a datetime",t])]])}(e,t);case"System.TimeSpan":return e=>t=>function(e,t){if("string"==typeof t){let n,r=0;return n=[Nr(t,new me((()=>r),(e=>{r=e}))),r],n[0]?new mr(0,[n[1]]):new mr(1,[[e,new gr(0,["a timespan",t])]])}return new mr(1,[[e,new gr(0,["a timespan",t])]])}(e,t);case"System.Guid":return e=>t=>function(e,t){if("string"==typeof t){let n,r="00000000-0000-0000-0000-000000000000";return n=[Cr(t,new me((()=>r),(e=>{r=e}))),r],n[0]?new mr(0,[n[1]]):new mr(1,[[e,new gr(0,["a guid",t])]])}return new mr(1,[[e,new gr(0,["a guid",t])]])}(e,t);case"System.Object":return e=>e=>new mr(0,[e]);default:return fi(e,t,n,r)}}function hi(e,t,n){const r=He(t,new wr(0,[]));return pi(function(e){return null!=e?ir(((e,t)=>new me(t[1])),e.Coders):ar({Compare:E})}(n),r,!1,e)}const mi=function(){const e=[..."#C$&$&$$$$$$%-%&%=$$$$$$=$$$$D$$'$$$$$$$$$$$$%$$%$$$$&$:$*;$+$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$&%$$$%$&%'$%$&&%$%$$$$$%$$%$$%$&$$$%%$$&'$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$%$$$$$&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*%$%%$$'$$$$$$$$h$>5'/1(*$$$4“$$$$$$$$%$&$$'%$$&$$$%$4$,F$%&&$$$$$$$$$$$$$$$$$$$$$$$($$$$$%%VS$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$(%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$I%$)L$$%%$$P$$$%$%$$+>''%.)&%$%%.$$$%C$-8-'%$†$$*$$)%%$'%-&%$1$$$$A>%|.$1-D,%$&$%$%9'$,$&$(%2$<&%$$.X8$5.2$C$Y$$$$&+'$%$*-%%-$$2$%$+%%%9$*$$&'%$$&'%%%%$$+$'%$&%%-%%)$$$$$%%$$)'%%9$*$%$%$%%$$&%'%%&&$*'$$*-%&$$-%$$,$&$9$*$%$(%$$&($%$$%$%$2%%%-$$*$)$$%$+%%%9$*$%$(%$$$$$'%%%%$*%$'%$&%%-$$)-$$$)&&$'&%$$$%&%&&&/'%$%&&$&$%$)$1-&)$$($&$+$&$:$3&$&'$&$'*%$&(%%%-*$*$$$%$+$&$:$-$(%$$$$($$%$%%*%*$$%%%-$%0%%,$&$L%$&'$&$&$$$'&$*&%%-,$)$$%$5&;$,$$%*&$'&&$$$+)-%%$/S$%*'$)$+$-%H%$$$($;$$$-$%,$%($$$)%-%'C$&2$$&%)--$$$$$$$$$$%+$G'1$($%(.$G$+$)$%('%HN%'$)$%%%$-))%%'&$&%*&'0$%%)$$$-&$%I$$($%N$$&Ŭ$'%*$$$'%L$'%D$'%*$$$'%2$\\$'%f%&,7&3-)y%)%$ʏ$$4$=$$&n&&+*0$'&.5&%,5%/0$&$%/W%$*+$%.&$&$$$%-)-))$'&$$-)F$X*(%E$$(i-B$&'%&'%$)&'$&%-A%(.O'=)-$&E:%%$%%X$$$*$$$$%+)-%$-)-)*$)%1$%b'$R$$($$($%*'-*-,,&%$A$'%%$&%-O$$%&$$&%+'G++%%&(-&&-A)%,*N%&++&$0$*'$)$%$%$(Ob0$EH]$($$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,+)%)%++++)%)%+$$$$$$$$++1%++++++($%'$$$&&$%'$&'%%'$&+(&%&$%'$%$.()%$$$%$$$+$$($,$$'%&$$$.$$$-$($-$$%)&$$$-&$$$0&C30'$&/2%$'$%$&%&$$$%$()$$$$$$'$$'$'$%%%($'$$%$$3F$$'$%'((%'$%$%$*$B%%$$$Bį+$$$$7%*$$t$A<K)h<.8_q9Ú$,$Y+’$ě$$$$$$$$$$$$$$AO($$B$$$$$$$$$$3ģ¦$$$$$$$$$$$$$$$$$$$$$$b$$$$C$$ĥS8%)J%C$ŒR$R$$$&%$$$$$$'$$%$)%&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%)$$$$&$$('$%I$$($%[*$$1$:,*$*$*$*$*$*$*$*$C%$$$$&$$$$$,$%$$$$%$$$$$$$$$$($-%'$$$0%$P=$|/ù=/'$&$$$$$$$$$$$$$$%$$$$$$$$$$%$,'%$(%&$$$%$y%%%%$$}$&$(N$$%'-CG/3B$-A+$2C-J2ţ᧣c删&8$Қ&Z,K)%į$&3-%7$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$&$-$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%i-%)+:,%$$$$$$$$$$$$$&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$+$$$$%$$$$$$$$$$%$$$$$$$$&$$$$$$$$$$$$$$$$$$$$($($$$$$$$$$$$%$$'$$$M$$$%$*$&$'$:%%$'$&)%$$)W'+%U3%+%-)5)&$$%$-?+%:.%.$@&&$R$%'%%&0$$-'%($$,-($L)%%%%,&$+$$%-%'3$)&$$$$U$$&%%(%$$$;%$%.$%%%$%$$-)%)%),*$*$N$',$%'sF%$%$%$$$%-)⯇/:'T'ࠣᤣƑ%I*/(($$-$0$($$$%$%$34Ǝ$$3c%YK/$$%3*$$$)3$%%$$$$$$$$$$$$$$$$%$$'&&$'$$$$$$$&$$&$$$%'($ª%$$&$&$$$$$$%-%&%=$$$$$$=$$$$$$$$$%-$P%B&)%)%)%&&%$$$%$$'%-&%%/$=$6$%$2%1Ež(&'P&,X'4%&$0&$RP$¥@&T2$>'C',7$+$(I((A$$G'+$(MKKq%-)G'G'K+W.$³Ś,9-+»)%$$O$%&$%:$$+:%*B+,S6$%((9)&$=($c['%%3%Q$&$%(''$&$@%&'$,*,*@%$@&C+$?%'(*,Y&*9%+6(+5*'/*slZV0V*)G'+-ʼnB$M$%$%%q@-$+9.'(y8*7:,$$$X2*'7-2&$P&'%%%$'.$%<*-)&G($+$-'$%$+F$%$,%$S&,%'''$$$-$$$&$7.5$<&&%$$%)$d*$$$'$2$-$)R$&+(-)%%$+%%%9$*$%$($%$%$'%%%&%$)$((%%*&(®X&+%&$$'(-%$$$&AS&)$$'%$%%$$+-ÉR&'%'%$%:'%ES&+%$$%&$.-)06N$$$%)$$$*-Y>%&%'$('-%&$ãO&,$%$‡CC-,/+%$%+$%$;)$%%%$$$$$$$&,-i+%J&'%%'$$$$$>$-K)$$'+$+$)%&Q0$%&$(@\\Ī,$H$*$)$$$(--6&%A%9$$*$%$%l*$%$I)&$$%$*$$+-))$%$C($%$%$$$$*-ř6%%%Ú$28+'40$ν‰’$(.ç૟ђ$,࿪ɪ⇜ɜ*B$-'%ƒA%($-S*(''$$--$*$8(6˓CC:'ˆn'$$Z*'0c%$$$.%1᠛+ӹM,⌚łT&4'+ƯधŽ(0&,*-%$%$'፿ę-J%_%&&)++%*A'^:e&$½7/z,<ª===*$5==$$%%$%%%'$+'$$$*$.==%$'%+$*$=%$'$($$&*$============?%<$<$)<$<$)<$<$)<$<$)<$<$)$$%UȣZ'U+$1$%(2($2ճ*$4%*$%$(øP&**%-'$$ƓO'-($ԣè%,*LEE*$'-'%̴^$&$'oP$2å'$>$%$$%$$-$'$$$$)$'$$$$$$&$%$$%$$$$$$$$$$%$$%'$*$'$'$$$-$4(&$($4W%ıO'‡/2%2$2$H-0Ä[@0O',*%1)½Ğ(˻+0&0&—/|*/7/'[+-)K+A%%qœ$u$ª/1%(&&(*,<**,&0*L¶$ZH-Щ꜁Eၘ.ā%ᚥ1ᵔూɁ؅፮򮳙$Aƒ£ē︳𐀡%𐀡"].map((e=>(e.codePointAt(0)??0)-35)),t=[..."1.;=;78;<;6;+;<;#7;8>5>$7<8<1.;=?;>?'9<2?>?<->$;>-':-;#<#$<$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'#$'#%$#%$#%$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#%$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'$&>&>&>&>&>(#$#$&>#$@&$;#@>#;#@#@#$#@#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$<#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$?(*#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#@&;$;6@?=@(6(;(;(;(@'@';@2<;=;?(;2@;'&'(+;'(';'(2?(&(?('+'?';@2'('(@'('@+'(&?;&@(='(&(&(&(@;@'(@;@'@'@'@(2()'()(')()()'('(;+;&'()@'@'@'@'@'@'@(')(@)@)('@)@'@'(@+'=-?=';(@()@'@'@'@'@'@'@'@(@)(@(@(@(@'@'@+('(;@()@'@'@'@'@'@'@(')(@()@)(@'@'(@+;=@'(@()@'@'@'@'@'@'@(')()(@)@)(@()@'@'(@+?'-@('@'@'@'@'@'@'@'@'@'@)()@)@)(@'@)@+-?=?@()('@'@'@'@'()@(@(@(@'@'(@+@;-?'();'@'@'@'@'@(')()@()@)(@)@'@'(@+@'@()'@'@'(')(@)@)('?@')-'(@+-?'@()@'@'@'@'@'@(@)(@(@)@+@);@'('(@='&(;+;@'@'@'@'@'@'('('@'@&@(@+@'@'?;?;?(?+-?(?(?(7878)'@'@()(;('(@(@?(?@?;?;@')()()()('+;')('(')')'('()()(')+)(?#@#@#@$;&$'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@(;-@'?@#@$@6'?;'.'78@';,'@'@'(@'(;@'(@'@'@(@'()()()(;&;='(@+@-@;6;(2@+@'&'@'('('@'@'@()()@)()(@?@;+'@'@'@'@+-@?'()(@;')()(@()()()(@(+@+@;&;@(*(@()'()()()()'@+;?(?@()')()()('+'()()()()@;')()(@;+@'+'&;$@#@#;@(;()('('(')('@$&$&$&(@(#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#@$#$#$@#@$@#@#@#@#$#$@$%$%$%$@$#%>$>$@$#%>$@$#@>$#>@$@$#%>@.26;9:79:79;/02.;9:;5;<78;<;5;.2@2-&@-<78&-<78@&@=@(*(*(@?#?#?$#$#$?#?<#?#?#?#?#?$#$'$?$#<#$?<?$?-,#$,-?@<?<?<?<?<?<?<?<?<?<?7878?<?78?<?<?<?@?@-?-?<?<?<?<?78787878787878-?<78<7878787878<?<7878787878787878787878<7878<78<?<?<?@?@?#@$@#$#$#$#$#$#$#$#$&#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$?#$#$(#$@;-;$@$@$@'@&;@('@'@'@'@'@'@'@'@'@(;9:9:;9:;9:;6;6;9:;9:78787878;&;6;6;7;?;@?@?@?@?@.;?&',7878787878?78787878678?,()6&?,&';?@'@(>&'6';&'@'@'@?-?'?@'?@-?-?-?-?-?'?'@'&'@?@'&;'&;'+'@#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'(*;(;&#$#$#$#$#$#$#$#$#$#$#$#$#$#$&(',(;@>&>#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$&$#$#$#$#$#$#$#$&>#$#$'#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#$#$#$@#$'&$'('('(')()?(@-?=?@';@)')(@;+@(';';'(+'(;'()@;'@()'()()();@&+@;'(&'+'@'()()(@'('()@+@;'&'?')()'('('('('('@'&;')();'&)(@'@'@'@'@'@$>&$&>@$')()();)(@+@'@'@'@34'@'@$@$@'('<'@'@'@'@'@'>@'87@'@'@'=?@(;78;@(;657878787878787878;78;5;@;6787878;<6<@;=;@'@'@2@;=;78;<;6;+;<;#7;8>5>$7<8<78;78;'&'&'@'@'@'@'@=<>?=@?<?@2?@'@'@'@'@'@'@'@;@-@?,-?-?@?@?@?(@'@'@(-@'-@',',@'(@'@;'@';,@#$'@+@#@$@'@'@;@'@'@'@'@'@'@'@'@'@;-'?-'@-@'@'@-'-@;'@;@'@-'-@-'(@(@('@'@'@(@(-@;@'-;'-@'?'(@-;@'@;'@-'@-'@;@-@'@#@$@-'(@+@-@'@(6@'@'-'@'(-;@'-@'@)()'(;@-+@()')()(;2;@2@'@+@('()(@+;')'@'(;'@()')()';(;)(+';';@-@'@')()()(;(@'@'@'@'@';@'()(@+@()@'@'@'@'@'@'@(')()@)@)@'@)@')@(@(@')()()(';+;@;('@')()()()(';'@+@')(@)()(;'(@')()()(;'@+@;@'()()()('@+@'@()()(@+-;?@')()(;@#$+-@'@'@'@'@')@)@()(')')(;@+@'@')(@()(';')@'('()'(;(@'()('()(;';@'@'@')(@()(';@+-@;'@(@)()()(@'@'@'(@(@(@('(@+@'@'@')@(@)()('@+@'();@'@-?=?@;'@,@;@'@'@2@'@'@'@+@;@'@(;@'(;?&;?@+@-@'@'@#$-;@'@(')@(&@&;&(@)@'@'@'@'@'@'@'@'@'@'@'@?(;2@?@?@?)(?)2(?(?(?@?(?@-@?@-@#$#$@$#$#@#@#@#@#@#$@$@$@$#$#@#@#@#@$#@#@#@#@#@$#$#$#$#$#$#$@#<$<$#<$<$#<$<$#<$<$#<$<$#$@+?(?(?(?(?;@(@(@(@(@(@(@(@'@(&@+@'?@'(+@=@'@-(@#$(&@+@;@-?-=-@-?-@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@<@?@?@?@?@?@?@-?@?@?@?@?@?@?>?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@+@'@'@'@'@'@'@'@2@2@(@4@4@"].map((e=>(e.codePointAt(0)??0)-35)),n=new Uint32Array(e),r=new Uint8Array(t);for(let e=1;e<n.length;++e)n[e]+=n[e-1];return e=>{let t=n.length,o=0;for(;t-o>1;){const r=Math.floor((t+o)/2),i=n[r];if(e<i)t=r;else{if(e===i){t=o=r;break}i<e&&(o=r)}}return r[o]}}();const $i=e=>function(e){const t=1<<function(e,t){const n=function(e,t){if(t>=0&&t<e.length)return e.charCodeAt(t);throw new Error("Index out of range.")}(e,t);return mi(n)}(e,0);return!!(256&t)}(e);function gi(e,t){return e.replace(/[a-z]?[A-Z]/g,(e=>1===e.length?e.toLowerCase():e.charAt(0)+t+e.charAt(1).toLowerCase()))}function wi(e,t=0){const n={},r=t;function o(e){throw new Error("Cannot infer key and value of "+String(e))}function i(e,t,r){e=function(e,t){switch(t){case 1:return e.charAt(0).toLowerCase()+e.slice(1);case 2:return gi(e,"_");case 3:return gi(e,"_").toUpperCase();case 4:return gi(e,"-");default:return e}}(e,t),n[e]=r}for(let t of e){let e=0;if(null==t&&o(t),t instanceof pe){const n=t.cases()[t.tag];t=0===t.fields.length?n:[n].concat(t.fields),e=r}if(Array.isArray(t))switch(t.length){case 0:o(t);break;case 1:i(t[0],e,!0);break;case 2:const n=t[1];i(t[0],e,n);break;default:i(t[0],e,t.slice(1))}else"string"==typeof t?i(t,e,!0):o(t)}return n}function vi(e,t){return!t.has(e)&&(t.add(e),!0)}function yi(e,t){if(e.has(t))return e.get(t);throw new Error(`The given key '${t}' was not present in the dictionary.`)}class bi{constructor(e,t){const n=new me(null);this.comparer=t,n.contents=this,this.hashMap=new Map([]),this["init@9"]=1;const r=u(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();Ei(n.contents,e)}}finally{s(r)}}get[Symbol.toStringTag](){return"HashSet"}toJSON(){return Array.from(this)}"System.Collections.IEnumerable.GetEnumerator"(){return u(this)}GetEnumerator(){return u(Vt(this.hashMap.values()))}[Symbol.iterator](){return c(u(this))}"System.Collections.Generic.ICollection`1.Add2B595"(e){Ei(this,e)}"System.Collections.Generic.ICollection`1.Clear"(){_i(this)}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return Ci(this,e)}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(e,t){var n;n=(n,r)=>{qe(e,t+n,r)},Jt(((e,t)=>(n(e,t),e+1|0)),0,this)}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|Si(this)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!1}"System.Collections.Generic.ICollection`1.Remove2B595"(e){return Ti(this,e)}get size(){return 0|Si(this)}add(e){return Ei(this,e),this}clear(){_i(this)}delete(e){return Ti(this,e)}has(e){return Ci(this,e)}keys(){return Qt((e=>e),this)}values(){return Qt((e=>e),this)}entries(){return Qt((e=>[e,e]),this)}forEach(e,t){const n=this;Xt((t=>{e(t,t,n)}),n)}}function xi(e,t){const n=0|e.comparer.GetHashCode(t);let r,o=null;return r=[(i=e.hashMap,s=n,a=new me((()=>o),(e=>{o=e})),!!i.has(s)&&(a.contents=i.get(s),!0)),o],r[0]?[!0,n,r[1].findIndex((n=>e.comparer.Equals(t,n)))]:[!1,n,-1];var i,s,a}function _i(e){e.hashMap.clear()}function Si(e){let t=0,n=u(e.hashMap.values());try{for(;n["System.Collections.IEnumerator.MoveNext"]();)t=t+n["System.Collections.Generic.IEnumerator`1.get_Current"]().length|0}finally{s(n)}return 0|t}function Ei(e,t){const n=xi(e,t);return n[0]?!(n[2]>-1)&&(yi(e.hashMap,n[1]).push(t),!0):(e.hashMap.set(n[1],[t]),!0)}function Ci(e,t){const n=xi(e,t);let r;return r=n[0]&&n[2]>-1?0:1,0===r}function Ti(e,t){const n=xi(e,t);let r;return r=n[0]&&n[2]>-1?0:1,0===r&&(yi(e.hashMap,n[1]).splice(n[2],1),!0)}class ki extends he{constructor(e,t){super(),this.Code=e,this.Name=t}}const Ii=sr([["AFG","Afghanistan"],["ALA","Aland Islands"],["ALB","Albania"],["DZA","Algeria"],["ASM","American Samoa"],["AND","Andorra"],["AGO","Angola"],["AIA","Anguilla"],["ATA","Antarctica"],["ATG","Antigua and Barbuda"],["ARG","Argentina"],["ARM","Armenia"],["ABW","Aruba"],["AUT","Austria"],["AZE","Azerbaijan"],["BHS","Bahamas"],["BHR","Bahrain"],["BGD","Bangladesh"],["BRB","Barbados"],["BLR","Belarus"],["BEL","Belgium"],["BLZ","Belize"],["BEN","Benin"],["BMU","Bermuda"],["BTN","Bhutan"],["BOL","Bolivia"],["BES","Bonaire Saint Eustatius, and Saba Islands"],["BIH","Bosnia and Herzegovina"],["BWA","Botswana"],["BVT","Bouvet Island"],["BRA","Brazil"],["IOT","British Indian Ocean Territory"],["VGB","British Virgin Islands"],["BRN","Brunei Darussalam"],["BGR","Bulgaria"],["BFA","Burkina Faso"],["BDI","Burundi"],["KHM","Cambodia"],["CMR","Cameroon"],["CAN","Canada"],["CPV","Cabo Verde"],["CYM","Cayman Islands"],["CAF","Central African Republic"],["TCD","Chad"],["CHL","Chile"],["CHN","China"],["CXR","Christmas Island"],["CCK","Cocos (Keeling) Islands"],["COL","Colombia"],["COM","Comoros"],["COD","Congo, Democratic Republic of (was Zaire)"],["COG","Congo, Republic of"],["COK","Cook Islands"],["CRI","Costa Rica"],["CIV","Cote D'Ivoire (Ivory Coast)"],["HRV","Croatia (Hrvatska)"],["CUB","Cuba"],["CUW","Curacao"],["CYP","Cyprus"],["CZE","Czech Republic"],["DNK","Denmark"],["DJI","Djibouti"],["DMA","Dominica"],["DOM","Dominican Republic"],["ECU","Ecuador"],["EGY","Egypt"],["SLV","El Salvador"],["GNQ","Equatorial Guinea"],["ERI","Eritrea"],["EST","Estonia"],["SWZ","eSwatini"],["ETH","Ethiopia"],["FLK","Falkland Islands (Malvinas)"],["FRO","Faroe Islands"],["FJI","Fiji"],["FIN","Finland"],["FRA","France"],["GUF","French Guiana"],["PYF","French Polynesia"],["ATF","French Southern Territories"],["GAB","Gabon"],["GMB","Gambia"],["GEO","Georgia"],["DEU","Germany"],["GHA","Ghana"],["GIB","Gibraltar"],["GRC","Greece"],["GRL","Greenland"],["GRD","Grenada"],["GLP","Guadeloupe"],["GUM","Guam"],["GTM","Guatemala"],["GGY","Guernsey"],["GIN","Guinea"],["GNB","Guinea-Bissau"],["GUY","Guyana"],["HTI","Haiti"],["HMD","Heard and McDonald Islands"],["VAT","Holy See (Vatican City State)"],["HND","Honduras"],["HKG","Hong Kong"],["HRV","Hrvatska (Croatia)"],["HUN","Hungary"],["ISL","Iceland"],["IND","India"],["IDN","Indonesia"],["IRN","Iran"],["IRQ","Iraq"],["IRL","Ireland"],["IMN","Isle of Man, The"],["ISR","Israel"],["ITA","Italy"],["CIV","Ivory Coast (Cote D'Ivoire)"],["JAM","Jamaica"],["JPN","Japan"],["JEY","Jersey"],["JOR","Jordan"],["KAZ","Kazakhstan"],["KEN","Kenya"],["KIR","Kiribati"],["PRK","Korea, Democratic People's Republic of (North Korea)"],["KOR","Korea, Republic of (South Korea)"],["KWT","Kuwait"],["KGZ","Kyrgyzstan"],["LAO","Laos"],["LVA","Latvia"],["LBN","Lebanon"],["LSO","Lesotho"],["LBR","Liberia"],["LBY","Libya"],["LIE","Liechtenstein"],["LTU","Lithuania"],["LUX","Luxembourg"],["MAC","Macau"],["MKD","North Macedonia, Republic of"],["MDG","Madagascar"],["MWI","Malawi"],["MYS","Malaysia"],["MDV","Maldives"],["MLI","Mali"],["MLT","Malta"],["MHL","Marshall Islands"],["MTQ","Martinique"],["MRT","Mauritania"],["MUS","Mauritius"],["MYT","Mayotte"],["MEX","Mexico"],["FSM","Micronesia, Federated States of"],["MDA","Moldova"],["MCO","Monaco"],["MNG","Mongolia"],["MNE","Montenegro"],["MSR","Montserrat"],["MAR","Morocco"],["MOZ","Mozambique"],["MMR","Myanmar (was Burma)"],["NAM","Namibia"],["NRU","Nauru"],["NPL","Nepal"],["NLD","Netherlands"],["NCL","New Caledonia"],["NZL","New Zealand"],["NIC","Nicaragua"],["NER","Niger"],["NGA","Nigeria"],["NIU","Niue"],["NFK","Norfolk Island"],["MNP","Northern Mariana Islands"],["PRK","North Korea (Korea, Democratic People's Republic of)"],["NOR","Norway"],["OMN","Oman"],["PAK","Pakistan"],["PLW","Palau"],["PSE","Palestinian Territories"],["PAN","Panama"],["PNG","Papua New Guinea"],["PRY","Paraguay"],["PER","Peru"],["PHL","Philippines"],["PCN","Pitcairn Island"],["POL","Poland"],["PRT","Portugal"],["PRI","Puerto Rico"],["QAT","Qatar"],["REU","Reunion"],["ROU","Romania"],["RUS","Russian Federation"],["RWA","Rwanda"],["BLM","Saint Barthelemy"],["SHN","Saint Helena"],["KNA","Saint Kitts and Nevis"],["LCA","Saint Lucia"],["SXM","Saint Maarten (Dutch part)"],["MAF","Saint Martin (French part)"],["SPM","Saint Pierre and Miquelon"],["VCT","Saint Vincent and the Grenadines"],["WSM","Samoa"],["SMR","San Marino"],["STP","Sao Tome and Principe"],["SAU","Saudi Arabia"],["SEN","Senegal"],["SRB","Serbia"],["SYC","Seychelles"],["SLE","Sierra Leone"],["SGP","Singapore"],["SVK","Slovakia (Slovak Republic)"],["SVN","Slovenia"],["SLB","Solomon Islands"],["SOM","Somalia"],["ZAF","South Africa"],["SGS","South Georgia and the South Sandwich Islands"],["KOR","South Korea (Korea, Republic of)"],["SSD","South Sudan"],["ESP","Spain"],["LKA","Sri Lanka"],["SDN","Sudan"],["SUR","Suriname"],["SJM","Svalbard and Jan Mayen Islands"],["SWE","Sweden"],["CHE","Switzerland"],["SYR","Syria"],["TWN","Taiwan"],["TJK","Tajikistan"],["TZA","Tanzania"],["THA","Thailand"],["TLS","Timor-Leste"],["TGO","Togo"],["TKL","Tokelau"],["TON","Tonga"],["TTO","Trinidad and Tobago"],["TUN","Tunisia"],["TUR","Turkey"],["TKM","Turkmenistan"],["TCA","Turks and Caicos Islands"],["TUV","Tuvalu"],["UGA","Uganda"],["UKR","Ukraine"],["ARE","United Arab Emirates"],["GBR","United Kingdom"],["USA","United States"],["UMI","United States Minor Outlying Islands"],["VIR","United States Virgin Islands"],["URY","Uruguay"],["UZB","Uzbekistan"],["VUT","Vanuatu"],["VAT","Vatican City State (Holy See)"],["VEN","Venezuela"],["VNM","Vietnam"],["WLF","Wallis and Futuna"],["ESH","Western Sahara"],["YEM","Yemen"],["ZMB","Zambia"],["ZWE","Zimbabwe"]],{Compare:E});class Mi extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["HELP","VETStudentLoan","FinancialSupplement","StudentStartUpLoan","TradeSupportLoan"]}}class Ai extends he{constructor(e,t){super(),this.Code=e,this.Name=t}}function Ri(e){let t;const n=function(e){const t=function(e){const t=or(e,Ii);return null==t?void 0:new ki(e,t)}(e),n=_e(be("Country code:%A is not accepted"))(e),r=t;return null==r?new mr(1,[n]):new mr(0,[r])}(e);return 1===n.tag?new mr(1,[n.fields[0]]):new mr(0,[(t=n.fields[0],new Ai(t.Code,t.Name))])}class Oi extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["AustralianResidentForTaxPurposes","ForeignResidentForTaxPurposes","WorkingHolidayMaker"]}}const Pi=new Oi(2,[{}]);function Ni(e){return new Oi(2,[{HomeCountry:e}])}class Di extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["FullTime","PartTime","LabourHire","SuperIncomeStream","Casual"]}}class Fi extends pe{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["Tfn"]}}class Li extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Under18AndBelowTaxThreshold","Pending","Pensioner"]}}class Bi extends pe{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["PreviousSurname"]}}function Hi(e){return e.fields[0]}function Vi(e){const t=function(e){const t=Ae($i,e),n=t===e?new mr(0,[void 0]):new mr(1,["TFN must contain digits only"]);if(1===n.tag)return new mr(1,[n.fields[0]]);{const e=9===t.length?new mr(0,[void 0]):new mr(1,["TFN must be 9 digits"]);if(1===e.tag)return new mr(1,[e.fields[0]]);{const e=function(e,t){let n=t.GetZero();for(let r=0;r<=e.length-1;r++)n=t.Add(n,Ke(r,e));return n}(function(e,t,n,r){if(t.length!==n.length)throw new Error("Arrays had different lengths");const o=Ue(r,t.length);for(let r=0;r<=t.length-1;r++)qe(o,r,e(Ke(r,t),Ke(r,n)));return o}(((e,t)=>e*t),je((e=>Ir(e,511,!1,32)),t.split(""),Int32Array),new Int32Array([1,4,3,7,5,8,6,9,10]),Int32Array),{GetZero:()=>0,Add:(e,t)=>e+t})%11==0?new mr(0,[void 0]):new mr(1,["TFN is not valid"]);return 1===e.tag?new mr(1,[e.fields[0]]):new mr(0,[t])}}}(e);if(1===t.tag)return new mr(1,[t.fields[0]]);{const e=t.fields[0],r=function(e){if(o(e))return 0===e.length;if(e instanceof Je)return lt(e);{const t=Bt(e);try{return!t["System.Collections.IEnumerator.MoveNext"]()}finally{s(t)}}}((n={Equals:(e,t)=>e===t,GetHashCode:g},zt(function(e,t,n){return Ht((()=>{const r=new bi(e,n);return Zt((e=>vi(e,r)),t)}))}(["0"],e.split(""),n))))?new mr(1,["TFN must not contain all zeros"]):new mr(0,[void 0]);return 1===r.tag?new mr(1,[r.fields[0]]):new mr(0,[e])}var n}class Gi extends he{constructor(e,t){super(),this.Code=e,this.Name=t}}new class extends he{constructor(e){super(),this.Unused=e}}(void 0);class Ui extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["AustralianResidentForTaxPurposes","ForeignResidentForTaxPurposes","WorkingHolidayMaker"]}}function zi(){return Ur("Dto.Dto.ResidencyStatusV2Dto",[],Ui,(()=>[[],[],[["Item",Gr(["HomeCountry",zr(Vr("Dto.Dto.CountryDto",[],Gi,(()=>[["Code",Kr],["Name",Kr]])))])]]]))}function ji(e){let t,n;switch(e.tag){case 1:return new mr(0,[new Oi(1,[])]);case 2:return He((t=e.fields[0].HomeCountry,null==t?void 0:(n=Ri(t.Code),1===n.tag?new mr(1,[n.fields[0]]):new mr(0,[Ni(n.fields[0])]))),new mr(0,[Pi]));default:return new mr(0,[new Oi(0,[])])}}function Wi(e){switch(e){case 0:return new mr(0,[new Di(0,[])]);case 1:return new mr(0,[new Di(1,[])]);case 2:return new mr(0,[new Di(2,[])]);case 3:return new mr(0,[new Di(3,[])]);case 4:return new mr(0,[new Di(4,[])]);default:return new mr(1,["Invalid EmploymentBasis"])}}function Yi(e){switch(e){case 0:return new mr(0,[new Mi(0,[])]);case 1:return new mr(0,[new Mi(1,[])]);case 2:return new mr(0,[new Mi(2,[])]);case 3:return new mr(0,[new Mi(3,[])]);case 4:return new mr(0,[new Mi(4,[])]);default:return new mr(1,["Invalid DebtSupport"])}}function Ki(e){switch(e.tag){case 1:return 1;case 2:return 2;case 3:return 3;case 4:return 4;default:return 0}}const qi=e=>{return t=Yi,r={Equals:(e,t)=>e===t,GetHashCode:w},n=jt(function(e,t){return Ht((()=>{const n=new bi([],t);return Zt((e=>vi(e,n)),e)}))}(e,r)),function(e,t,n){e:for(;;){const r=e,o=t,i=n;if(lt(i)){const e=r;return 1===e.tag?new mr(1,[e.fields[0]]):new mr(0,[pt(e.fields[0])])}{let s;const a=o(ut(i));if(1===a.tag)s=new mr(1,[a.fields[0]]);else{const e=r;s=1===e.tag?new mr(1,[e.fields[0]]):new mr(0,[st(a.fields[0],e.fields[0])])}if(1===s.tag)return s;e=s,t=o,n=ct(i);continue e}}}(new mr(0,[it()]),t,n);var t,n,r};function Zi(e){switch(e.tag){case 1:return 1;case 2:return 2;default:return 0}}class Ji extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Tfn","Exempted"]}}function Xi(){return Ur("Dto.Dto.ProvidedTfnInformationDto",[],Ji,(()=>[[["Item",Kr]],[["Item",Wr("Dto.Dto.ExemptionReasonDto",Zr,[["Under18AndBelowTaxThreshold",0],["Pending",1],["Pensioner",2]])]]]))}class Qi extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["TfnTruncated","Exempted"]}}class es extends he{constructor(e,t,n,r,o,i,s){super(),this.TfnInformation=e,this.PreviousSurname=t,this.ResidencyStatus=0|n,this.ResidencyStatusV2=r,this.EmploymentBasis=0|o,this.IsTaxFreeThresholdClaimed=i,this.HasDebtSupport=s}}class ts extends he{constructor(e,t){super(),this.ResidencyStatusV2=e,this.EmploymentBasis=0|t}}class ns extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["TfnInfo","EmploymentInfo"]}}class rs extends he{constructor(e,t){super(),this.Meta=e,this.Info=t}}class os extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["AustralianResidentForTaxPurposes","ForeignResidentForTaxPurposes","WorkingHolidayMaker"]}}function is(){return Ur("Dto.Commands.ResidencyStatusV2Dto",[],os,(()=>[[],[],[["Item",Vr("Dto.Commands.WorkingHolidayPayload",[],ss,(()=>[["HomeCountry",Vr("Dto.Commands.CountryCode",[],as,(()=>[["Code",Kr]]))]]))]]]))}class ss extends he{constructor(e){super(),this.HomeCountry=e}}class as extends he{constructor(e){super(),this.Code=e}}class ls extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["CreateOrUpdate","Update","ProvideFullTfnDeclaration"]}}class us extends he{constructor(e,t,n,r,o,i,s){super(),this.AccountId=e,this.TfnInformation=t,this.PreviousSurname=n,this.ResidencyStatus=r,this.EmploymentBasis=0|o,this.IsTaxFreeThresholdClaimed=i,this.HasDebtSupport=s}}class cs extends he{constructor(e,t,n,r,o,i,s){super(),this.AccountId=e,this.TfnInformation=t,this.PreviousSurname=n,this.ResidencyStatus=r,this.EmploymentBasis=0|o,this.IsTaxFreeThresholdClaimed=i,this.HasDebtSupport=s}}class ds extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Tfn","Exempted","Truncated"]}}function fs(e){return e}function ps(e){return Array.from(e)}function hs(e){return j(e,"O")}function ms(e){return function(e,t="c"){if(-1===["c","g","G"].indexOf(t))throw new Error("Custom formats are not supported");const n=Math.abs(function(e){return Or(e/864e5)}(e)),r=Math.abs(function(e){return Or(e%864e5/36e5)}(e)),o=Math.abs(function(e){return Or(e%36e5/6e4)}(e)),i=Math.abs(function(e){return Or(e%6e4/1e3)}(e)),s=Math.abs(function(e){return Or(e%1e3)}(e));return`${e<0?"-":""}${0!==n||"c"!==t&&"g"!==t?"c"===t?n+".":n+":":""}${"g"===t?r:f(r,2)}:${f(o,2)}:${f(i,2)}${0!==s||"c"!==t&&"g"!==t?"g"===t?"."+f(s,3):"."+function(e){return e.toString(10).padStart(3,"0").padEnd(7,"0")}(s):""}`}(e)}function $s(){return null}function gs(e){return j(e,"O")}function ws(e,t){return JSON.stringify(t,void 0,De(e))}function vs(e,t,n,r){let o;const i=new me(null);let s;const a=Xr(r);let l;if(s=""===a?e:rr(a,i,e),fo(r)){const e=je((e=>{const r=xr(t,Jr(e)),o=ys(s,t,n,e[1]);return t=>i=>{const s=function(e,t){return e[t[0]]}(t,e);return(!n||n&&null!=s)&&(i[r]=o(s)),i}}),lo(r));l=t=>Jt(((e,n)=>n(t)(e)),{},e)}else{if(!co(r))throw new Error((o=Xr(r),_e(be("Cannot generate auto encoder for %s. Please pass an extra encoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders"))(o)));l=e=>{const o=function(e,t){const n=ao(t)[e.tag];if(null==n)throw new Error(`Cannot find case ${e.name} in union type`);return[n,e.fields]}(e,r),i=o[0],a=o[1],l=0|a.length;if(0===l)return Jr(i);{const e=0|l,r=ho(i),o=ze(new Array(e+1),0,e+1,null);qe(o,0,Jr(i));for(let i=1;i<=e;i++)qe(o,i,ys(s,t,n,Ke(i-1,r)[1])(Ke(i-1,a)));return o}}}return i.contents=l,l}function ys(e,t,n,r){const o=Xr(r),i=or(o,e);if(null!=i){const e=i;return t=>e.contents(t)}if(Qr(r)){const o=ys(e,t,n,eo(r));return e=>ps(Qt(o,e))}if(no(r))switch(Xr(oo(r))){case"System.SByte":return e=>e;case"System.Byte":return e=>e;case"System.Int16":return e=>e;case"System.UInt16":return e=>e;case"System.Int32":return e=>e;case"System.UInt32":return e=>e;default:{const e=Xr(r);return Se(be("Cannot generate auto encoder for %s.\nThoth.Json.Net only support the following enum types:\n- sbyte\n- byte\n- int16\n- uint16\n- int\n- uint32\n\nIf you can't use one of these types, please pass an extra encoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders\n "))(e)}}else{if(to(r)){if(po(r)){const o=je((r=>ys(e,t,n,r)),uo(r));return e=>{return ps((t=(e,t)=>Ke(e,o)(t),n=e,Yt((()=>Bt(n)),((e,n)=>n["System.Collections.IEnumerator.MoveNext"]()?De(t(e,n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0),(e=>{s(e)}))));var t,n}}{const o=Xr(ro(r));if("Microsoft.FSharp.Core.FSharpOption`1[System.Object]"===o){const o=new d((()=>{return o=ys(e,t,n,Ke(0,Lr(r))),e=>{return null!=(t=Ve(o,e))?Pe(t):null;var t};var o}));return e=>null==e?null:o.Value(e)}if("Microsoft.FSharp.Collections.FSharpList`1[System.Object]"===o||"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"===o||"System.Collections.Generic.IEnumerable`1[System.Object]"===o){const o=ys(e,t,n,Ke(0,Lr(r)));return e=>ps(Qt(o,e))}if("Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"===o){const o=Ke(0,Lr(r)),i=ys(e,t,n,Ke(1,Lr(r)));if("System.String"===Xr(o)||"System.Guid"===Xr(o))return e=>Jt(((e,t)=>{const n=t;return e[n[0]]=i(n[1]),e}),{},e);{let r;const s=ys(e,t,n,o);return r=s,e=>ps(Qt((e=>{const t=e;return[r(t[0]),i(t[1])]}),e))}}return vs(e,t,n,r)}}switch(o){case"System.Boolean":return e=>e;case"Microsoft.FSharp.Core.Unit":return $s;case"System.String":return e=>e;case"System.Char":return e=>e;case"System.SByte":return e=>e;case"System.Byte":return e=>e;case"System.Int16":return e=>e;case"System.UInt16":return e=>e;case"System.Int32":return e=>e;case"System.UInt32":return e=>e;case"System.Double":return e=>e;case"System.Single":return e=>e;case"System.DateTime":return gs;case"System.DateTimeOffset":return hs;case"System.TimeSpan":return ms;case"System.Guid":return fs;case"System.Object":return e=>e;default:return vs(e,t,n,r)}}}function bs(e,t,n,r){const o=He(t,new wr(0,[])),i=He(r,!0);return ys(function(e){return null!=e?ir(((e,t)=>new me(t[0])),e.Coders):ar({Compare:E})}(n),o,i,e)}function xs(e){return _e(be("%s/tfn-declaration/backend"))(e)}function _s(e,t){return un.Delay((()=>{const n=fr(function(e){return new vn("Authorization",e)}(_e(be("Bearer %s"))(e)),t);let r;const o=pr(n);return r=un.Bind(o,(e=>un.Return(new mr(0,[e])))),un.Bind(r,(e=>{const t=e;if(1===t.tag)return un.Return(new mr(1,[t.fields[0]]));{const e=t.fields[0];if(429===e.statusCode||e.statusCode>=500){const e=pr(n);return un.Bind(e,(e=>un.Return(new mr(0,[e]))))}return un.Return(new mr(0,[e]))}}))}))}const Ss=e=>Zo(M(hi(Vr("Dto.BackendApiModels.Read.TfnDeclarationDetailsWithMeta",[],rs,(()=>[["Meta",Gr(["AccountId",Kr])],["Info",zr(Ur("Dto.BackendApiModels.Read.Information",[],ns,(()=>[[["Item",Vr("Dto.BackendApiModels.Read.TfnDeclarationDetails",[],es,(()=>[["TfnInformation",Ur("Dto.BackendApiModels.Read.TfnInformation",[],Qi,(()=>[[["Item",Kr]],[["Item",Wr("Dto.Dto.ExemptionReasonDto",Zr,[["Under18AndBelowTaxThreshold",0],["Pending",1],["Pensioner",2]])]]]))],["PreviousSurname",zr(Kr)],["ResidencyStatus",Wr("Dto.Dto.ResidencyStatusDto",Zr,[["AustralianResidentForTaxPurposes",0],["ForeignResidentForTaxPurposes",1],["WorkingHolidayMaker",2]])],["ResidencyStatusV2",zi()],["EmploymentBasis",Wr("Dto.Dto.EmploymentBasisDto",Zr,[["FullTime",0],["PartTime",1],["LabourHire",2],["SuperIncomeStream",3],["Casual",4]])],["IsTaxFreeThresholdClaimed",qr],["HasDebtSupport",jr(Wr("Dto.Dto.DebtSupportDto",Zr,[["HELP",0],["VETStudentLoan",1],["FinancialSupplement",2],["StudentStartUpLoan",3],["TradeSupportLoan",4]]))]]))]],[["Item",Vr("Dto.BackendApiModels.Read.EmploymentInfo",[],ts,(()=>[["ResidencyStatusV2",zr(zi())],["EmploymentBasis",Wr("Dto.Dto.EmploymentBasisDto",Zr,[["FullTime",0],["PartTime",1],["LabourHire",2],["SuperIncomeStream",3],["Casual",4]])]]))]]])))]])),new wr(1,[]),void 0)),e);class Es extends he{constructor(e){super(),this.Message=e}}function Cs(e,t){return un.Delay((()=>{const n=_s(e,dr(new wn(0,[]),cr(xs(t))));return un.Bind(n,(e=>{const t=e;if(1===t.tag)return un.Return(new mr(1,[t.fields[0]]));{const e=t.fields[0];if(200===e.statusCode){const t=Ss(e.responseText);return un.Return(t)}return un.Return(new mr(1,["Unexpected response from backend"]))}}))}))}function Ts(e,t){let n,r,o;const i=e.TfnInformation.Value;if(o=null==i?new mr(1,["missing TFN info"]):new mr(0,[i]),1===o.tag)return new mr(1,[o.fields[0]]);{const i=o.fields[0];let s;const a=e.PreviousSurname.Value;let l,u;s=null==a?void 0:Hi(a);const c=e.ResidencyStatus.Value;if(null==c)u=void 0;else{const e=function(e){switch(e.tag){case 1:return new mr(0,[new os(1,[])]);case 2:{let t;const n=e.fields[0].HomeCountry;return t=null==n?new mr(1,["Home country should be specified for WorkingHolidayMaker"]):new mr(0,[n]),1===t.tag?new mr(1,[t.fields[0]]):new mr(0,[new os(2,[new ss(new as(t.fields[0].Code))])])}default:return new mr(0,[new os(0,[])])}}(c);u=1===e.tag?void 0:e.fields[0]}if(l=null==u?new mr(1,["missing residency status"]):new mr(0,[u]),1===l.tag)return new mr(1,[l.fields[0]]);{const o=l.fields[0];let a,u;const c=e.EmploymentBasisRadioButtonGroup.Value;if(u=null==c?void 0:function(e){switch(e.tag){case 1:return 1;case 2:return 2;case 3:return 3;case 4:return 4;default:return 0}}(c),a=null==u?new mr(1,["missing employment basis"]):new mr(0,[u]),1===a.tag)return new mr(1,[a.fields[0]]);{const l=0|a.fields[0];let u,c;const d=e.ClaimTaxFreeThreshold.Selected;if(c=null==d?void 0:(n=d,!(1===n.tag)),u=null==c?new mr(1,["missing is tax-free threshold claimed"]):new mr(0,[c]),1===u.tag)return new mr(1,[u.fields[0]]);{const n=u.fields[0],a=He((r=e.DebtSupportCheckboxGroup.Value,null==r?void 0:(e=>wt(Ki,e))(r)),it()),c=()=>0===i.tag?new mr(1,["New TFN declaration cannot have a truncated TFN"]):1===i.fields[0].tag?new mr(0,[new Ji(1,[Zi(i.fields[0].fields[0])])]):new mr(0,[new Ji(0,[i.fields[0].fields[0].fields[0]])]),d=t.Info;if(null!=d){if(0===d.tag)return new mr(0,[at(new ls(1,[new cs(t.Meta.AccountId,0===i.tag?new ds(2,[i.fields[0]]):1===i.fields[0].tag?new ds(1,[Zi(i.fields[0].fields[0])]):new ds(0,[i.fields[0].fields[0].fields[0]]),s,o,l,n,a)]))]);{const e=c();return 1===e.tag?new mr(1,[e.fields[0]]):new mr(0,[at(new ls(2,[{EmploymentBasis:l,HasDebtSupport:a,IsTaxFreeThresholdClaimed:n,PreviousSurname:Ne(s),ResidencyStatus:o,TfnInformation:e.fields[0]}]))])}}{const e=c();return 1===e.tag?new mr(1,[e.fields[0]]):new mr(0,[at(new ls(0,[new us(t.Meta.AccountId,e.fields[0],s,o,l,n,a)]))])}}}}}}class ks extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["BadRequest","Other"]}}function Is(e,t,n){return un.Delay((()=>{let r;const o=e.PreExistingTfnDec;let i,s;if(2===o.tag&&0===o.fields[0].tag?(i=0,s=o.fields[0].fields[0]):i=1,0===i)r=un.Delay((()=>un.Return(new mr(0,[s]))));else{const e=Cs(t,n);r=un.Bind(e,(e=>{let t;const n=e;return t=1===n.tag?new mr(1,[new ks(1,[n.fields[0]])]):new mr(0,[n.fields[0]]),un.Return(t)}))}return un.Bind(r,(r=>{const o=r;if(1===o.tag)return un.Return(new mr(1,[o.fields[0]]));{const r=o.fields[0];let i,s;const a=Ts(e,r);return s=1===a.tag?new mr(1,[new ks(1,[a.fields[0]])]):new mr(0,[a.fields[0]]),i=un.Return(s),un.Bind(i,(e=>{let o;const i=e;if(1===i.tag)return un.Return(new mr(1,[i.fields[0]]));{const e=i.fields[0];if(lt(e))return un.Return(new mr(0,[r]));{const r=_s(t,(s=new yn(1,[ws(0,bs(jr(Ur("Dto.Commands.TfnDeclarationCommandDto",[],ls,(()=>[[["Item",Vr("Dto.Commands.TfnDeclarationDetailsDto",[],us,(()=>[["AccountId",Kr],["TfnInformation",Xi()],["PreviousSurname",zr(Kr)],["ResidencyStatus",is()],["EmploymentBasis",Wr("Dto.Dto.EmploymentBasisDto",Zr,[["FullTime",0],["PartTime",1],["LabourHire",2],["SuperIncomeStream",3],["Casual",4]])],["IsTaxFreeThresholdClaimed",qr],["HasDebtSupport",jr(Wr("Dto.Dto.DebtSupportDto",Zr,[["HELP",0],["VETStudentLoan",1],["FinancialSupplement",2],["StudentStartUpLoan",3],["TradeSupportLoan",4]]))]]))]],[["Item",Vr("Dto.Commands.UpdateTfnDeclarationDetailsDto",[],cs,(()=>[["AccountId",Kr],["TfnInformation",Ur("Dto.Commands.UpdateProvidedTfnInformationDto",[],ds,(()=>[[["Item",Kr]],[["Item",Wr("Dto.Dto.ExemptionReasonDto",Zr,[["Under18AndBelowTaxThreshold",0],["Pending",1],["Pensioner",2]])]],[["Item",Kr]]]))],["PreviousSurname",zr(Kr)],["ResidencyStatus",is()],["EmploymentBasis",Wr("Dto.Dto.EmploymentBasisDto",Zr,[["FullTime",0],["PartTime",1],["LabourHire",2],["SuperIncomeStream",3],["Casual",4]])],["IsTaxFreeThresholdClaimed",qr],["HasDebtSupport",jr(Wr("Dto.Dto.DebtSupportDto",Zr,[["HELP",0],["VETStudentLoan",1],["FinancialSupplement",2],["StudentStartUpLoan",3],["TradeSupportLoan",4]]))]]))]],[["Item",Gr(["EmploymentBasis",Wr("Dto.Dto.EmploymentBasisDto",Zr,[["FullTime",0],["PartTime",1],["LabourHire",2],["SuperIncomeStream",3],["Casual",4]])],["HasDebtSupport",jr(Wr("Dto.Dto.DebtSupportDto",Zr,[["HELP",0],["VETStudentLoan",1],["FinancialSupplement",2],["StudentStartUpLoan",3],["TradeSupportLoan",4]]))],["IsTaxFreeThresholdClaimed",qr],["PreviousSurname",zr(Kr)],["ResidencyStatus",is()],["TfnInformation",Xi()])]]]))),new wr(1,[]),void 0,void 0)(e))]),a=dr(new wn(2,[]),cr(xs(n))),o=new bn(a.url,a.method,a.headers,a.withCredentials,a.overridenMimeType,a.overridenResponseType,a.timeout,s),fr(new vn("Content-Type","application/json"),o)));return un.Bind(r,(e=>{const t=e;if(1===t.tag)return un.Return(new mr(1,[t.fields[0]]));{const e=t.fields[0];let r;switch(0|e.statusCode){case 200:{const t=Ss(e.responseText);r=1===t.tag?new mr(1,[new ks(1,[t.fields[0]])]):new mr(0,[t.fields[0]]);break}case 400:{let t;const o=(n=e.responseText,Zo(M(hi(Vr("Service.BadRequestErrorDetails",[],Es,(()=>[["Message",Kr]])),new wr(1,[]),void 0)),n));t=1===o.tag?new mr(1,[new ks(1,[o.fields[0]])]):new mr(0,[o.fields[0]]),r=1===t.tag?new mr(1,[t.fields[0]]):new mr(1,[new ks(0,[t.fields[0].Message])]);break}default:r=new mr(1,[new ks(1,["Unexpected response from backend"])])}return un.Return(r)}var n}))}}var s,a}))}}))}))}class Ms extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Success","Failure","Info"]}}function As(e){switch(e.tag){case 0:return"text-green-700";case 2:return"text-blue-700";default:return"text-red-700"}}function Rs(e){switch(e.tag){case 0:return"bg-green-50";case 2:return"bg-blue-50";default:return"bg-red-50"}}function Os(e){return e.tag,e.fields[0]}function Ps(e){let t,n,o,i;const s=e.hideAlert,a=e.alert,l=dn();return function(){const e=bt.useRef(!1);bt.useEffect((()=>{e.current||(e.current=!0,function(e,t){mn(un.Delay((()=>un.Bind(hn(5e3),(()=>(e(),un.Zero()))))),t)}(s,l))}),[])}(),(0,r.createElement)("div",k($t([["className",Te(" ",["rounded-md","p-4","my-4",Rs(a)])],["data-testid","alert"],(t=[(0,r.createElement)("div",k($t([["className",Te(" ",["flex"])],(n=[(0,r.createElement)("p",{className:Te(" ",["text-sm","pr-2",As(a)]),children:Os(a)}),(0,r.createElement)("div",k($t([["className",Te(" ",["ml-auto"])],(o=[(0,r.createElement)("div",k($t([["className",Te(" ",["-mx-1.5","-my-1.5"])],(i=[(0,r.createElement)("button",{type:"button",className:Te(" ",jt(Ht((()=>Kt(Ut("inline-flex"),Ht((()=>Kt(Ut("rounded-md"),Ht((()=>Kt(Ut("p-1.5"),Ht((()=>Kt(Ut("focus:outline-none"),Ht((()=>Kt(Ut("focus:ring-2"),Ht((()=>Kt(Ut("focus:ring-offset-2"),Ht((()=>function(e){switch(e.tag){case 0:return $t(["bg-green-50","text-green-500","hover:bg-green-100","focus:ring-offset-green-50","focus:ring-green-600"]);case 2:return $t(["bg-blue-50","text-blue-500","hover:bg-blue-100","focus:ring-offset-blue-50","focus:ring-blue-600"]);default:return $t(["bg-red-50","text-red-500","hover:bg-red-100","focus:ring-offset-red-50","focus:ring-red-600"])}}(a))))))))))))))))))))))),children:bt.Children.toArray([Tt]),onClick:e=>{fn(l),s()}})],["children",bt.Children.toArray(Array.from(i))])])))],["children",bt.Children.toArray(Array.from(o))])])))],["children",bt.Children.toArray(Array.from(n))])])))],["children",bt.Children.toArray(Array.from(t))])])))}class Ns extends he{constructor(e,t){super(),this.Value=e,this.Meta=t}}function Ds(){return new Ns(void 0,{Valid:!1})}function Fs(e){return new Ns(e,{Valid:!0})}function Ls(e){return new Ns(e,{Valid:!1})}function Bs(e){switch(e.tag){case 1:return"ForeignResidentForTaxPurposes";case 2:return"WorkingHolidayMaker";default:return"AustralianResidentForTaxPurposes"}}function Hs(e){switch(e){case"HELP":return new Mi(0,[]);case"VETStudentLoan":return new Mi(1,[]);case"FinancialSupplement":return new Mi(2,[]);case"StudentStartUpLoan":return new Mi(3,[]);case"TradeSupportLoan":return new Mi(4,[]);default:return}}function Vs(e){switch(e){case"FullTime":return new Di(0,[]);case"PartTime":return new Di(1,[]);case"LabourHire":return new Di(2,[]);case"SuperIncomeStream":return new Di(3,[]);case"Casual":return new Di(4,[]);default:return}}function Gs(e){return(0,r.createElement)("p",{className:Te(" ",["block","text-sm","font-medium","text-gray-700","leading-5"]),children:e})}function Us(e){let t;return(0,r.createElement)("div",k($t([["className","flex items-start p-4 space-x-3 bg-amber-50 rounded-md mt-4"],(t=[It,(0,r.createElement)("span",{className:"text-sm leading-5 font-normal text-amber-700",children:e})],["children",bt.Children.toArray(Array.from(t))])])))}class zs extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Yes","No"]}}class js extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Select","SelectInternal"]}}class Ws extends he{constructor(e,t){super(),this.Selected=e,this.Meta=t}}function Ys(e){return new Ws(e,{Touched:!1})}function Ks(e,t){return 1===e.tag?e.fields[1]||!t.Meta.Touched?new Ws(e.fields[0],t.Meta):t:new Ws(e.fields[0],{Touched:!0})}function qs(e){const t=_(e.Parent.State.Selected,e.Selection)?jt(Ht((()=>Kt(null!=e.Parent.Disable?Ut("bg-gray-50"):Ut("bg-white"),Ht((()=>Kt(Ut("border-gray-200"),Ht((()=>Kt(Ut("shadow-sm"),Ht((()=>null!=e.Parent.Disable?Ut("text-gray-400"):Ut("text-gray-900"))))))))))))):jt(Ht((()=>Kt(Ut("shadow-none"),Ht((()=>null!=e.Parent.Disable?Ut("text-gray-400"):Ut("text-gray-700")))))));return(0,r.createElement)("button",{className:Te(" ",jt(Ht((()=>Kt(Ut("relative"),Ht((()=>Kt(Ut("w-1/2"),Ht((()=>Kt(Ut("border-gray-200"),Ht((()=>Kt(Ut("rounded-md"),Ht((()=>Kt(Ut("shadow-sm"),Ht((()=>Kt(Ut("py-2"),Ht((()=>Kt(Ut("text-sm"),Ht((()=>Kt(Ut("font-medium"),Ht((()=>Kt(Ut("whitespace-nowrap"),Ht((()=>Kt(Ut("focus:outline-none"),Ht((()=>Kt(Ut("focus:ring-inset"),Ht((()=>Kt(Ut("focus:ring-1"),Ht((()=>Kt(Ut("focus:ring-primary-focus"),Ht((()=>Kt(Ut("focus:z-10"),Ht((()=>Kt(Ut("w-auto"),Ht((()=>Kt(Ut("px-8"),Ht((()=>Kt(_(e.Parent.Disable,e.Selection)?Ut("disabled:cursor-not-allowed"):Gt(),Ht((()=>t))))))))))))))))))))))))))))))))))))))))))))))))))))))),type:"button",name:"yesNoButtonGroup",onClick:t=>{e.Parent.Dispatch(new js(0,[e.Selection]))},disabled:_(e.Parent.Disable,e.Selection),children:fe(e.Selection)})}function Zs(e){let t;return(0,r.createElement)("div",k($t([["className",Te(" ",["relative","self-start","bg-gray-100","rounded-lg","p-0.5","flex","mt-2","space-x-0.5"])],(t=[qs({Parent:e,Selection:new zs(0,[])}),qs({Parent:e,Selection:new zs(1,[])})],["children",bt.Children.toArray(Array.from(t))])])))}function Js(e,t,n){ht((n=>{try{n(t)}catch(t){e(t)}}),n)}function Xs(){return it()}function Qs(e){return Te("/",e)}function ea(e,t,n){try{s(n)}catch(n){e(["Error stopping subscription: "+Qs(t),n])}}function ta(e,t){ht((t=>{ea(e,t[0],t[1])}),t)}function na(e,t,n,r,o,i){return ht((t=>{!function(e,t){const n=new Error("Duplicate SubId");e(["Duplicate SubId: "+Qs(t),n])}(e,t)}),n),ht((t=>{ea(e,t[0],t[1])}),r),gt(o,yt((n=>function(e,t,n,r){try{return[n,r(t)]}catch(t){return void e(["Error starting subscription: "+Qs(n),t])}}(e,t,n[0],n[1])),i))}function ra(e){return t=(e,t)=>{return n=e[0],r=e[1],o=t[0],i=t[1],s=t[2],jo(n,i)?[st(n,o),i,s]:[o,Wo(n,i),st([n,r],s)];var n,r,o,i,s},n=e,r=[it(),(o={Compare:T},Go(o)),it()],Ze(t,dt(n),r);var t,n,r,o}const oa=it();function ia(e,t){const n=Bo(r={Compare:T},Fo(r,wt((e=>e[0]),e)));var r;const o=ra(t),i=o[1],s=o[0];if(n.Equals(i))return[s,it(),e,it()];{const t=function(e,t){const n=Qe(),r=Qe(),o=n,s=ft(((e,t)=>{let n,r;const o=e[0],s=e[1];return(e=>jo(e[0],i))(t)?[(n=new Je(t,void 0),o.tail=n,n),s]:[o,(r=new Je(t,void 0),s.tail=r,r)]}),[o,r],t),a=Qe();s[0].tail=a;const l=Qe();return s[1].tail=l,[ot(o),ot(r)]}(0,e);return[s,t[1],t[0],vt((e=>!jo(e[0],n)),o[2])]}}function sa(e,t){return e>t?e:t}function aa(e,t,n,r,o){const i=function(e,t,n,r){const o=0|T(e,n);if(0===o)throw new Error("The step of a range cannot be zero");const i=o>0;return n=>{const o=0|T(n,t);return i&&o<=0||!i&&o>=0?[n,r(n,e)]:void 0}}(t,n,r,o);return Ht((()=>{return t=i,n=e,Lt((()=>function(e,t){let n,r=t;return Dt((()=>{if(null!=n){const e=Pe(n)[0];return Pe(n)[1],e}return Rt()}),(()=>{if(n=e(r),null!=n){Pe(n)[0];const e=Pe(n)[1];return r=e,!0}return!1}),(()=>{}))}(t,n)));var t,n}))}class la extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Writable","ReadWritable"]}}class ua{constructor(e){this.state=new la(0,[ze(new Array(sa(e,10)),0,sa(e,10),null),0])}}function ca(e){const t=e.state;if(1===t.tag){const n=0|t.fields[1],r=0|t.fields[2],o=t.fields[0],i=(r+1)%o.length|0;return e.state=i===n?new la(0,[o,n]):new la(1,[o,n,i]),De(Ke(r,o))}}class da extends he{constructor(e,t,n,r,o,i,s){super(),this.init=e,this.update=t,this.subscribe=n,this.view=r,this.setState=o,this.onError=i,this.termination=s}}function fa(e,t,n){return new da(e,t,(e=>it()),n,M((e=>{const t=A(n)(e);return e=>{t(e)}})),(e=>{var t,n;t=e[0],n=e[1],console.error(De(t),n)}),[e=>!1,e=>{}])}function pa(e,t,n){let r;const o=n.init(t),i=o[0],a=n.subscribe(i),l=n.termination,u=new ua(10);let c=!1,d=i,f=oa,p=!1;const h=A(e)((e=>{p||(function(e,t){const n=e.state;if(1===n.tag){const i=0|n.fields[1],a=0|n.fields[2],l=n.fields[0];qe(l,i,t);const u=(i+1)%l.length|0;e.state=new la(1,u===a?[(r=a,o=l,Array.from(Ht((()=>Kt(tn(r,o),Ht((()=>{return Kt((e=r,t=o,Yt((()=>Bt(t)),((t,n)=>{if(t<e){if(n["System.Collections.IEnumerator.MoveNext"]())return De(n["System.Collections.Generic.IEnumerator`1.get_Current"]());throw new Error(At+"\\nParameter name: source")}}),(e=>{s(e)}))),Ht((()=>nn((e=>Ut(null)),aa(0,1,o.length,0,((e,t)=>e+t))))));var e,t}))))))),l.length,0]:[l,u,a])}else{const r=0|n.fields[1],o=n.fields[0];qe(o,r,t);const i=(r+1)%o.length|0;e.state=new la(1,[o,i,r])}var r,o}(u,e),c||(c=!0,m(),c=!1))})),m=()=>{let e,t=ca(u);for(;!p&&null!=t;){const r=Pe(t);if(l[0](r))ta(n.onError,f),l[1](d),p=!0;else{const o=n.update(r,d),i=o[0],s=n.subscribe(i);n.setState(i,h),Js((e=>{n.onError([_e(be("Error handling the message: %A"))(r),e])}),h,o[1]),d=i,e=ia(f,s),f=na(n.onError,h,e[0],e[1],e[2],e[3]),t=ca(u)}}};c=!0,n.setState(i,h),Js((e=>{n.onError([_e(be("Error intitializing:")),e])}),h,o[1]),r=ia(f,a),f=na(n.onError,h,r[0],r[1],r[2],r[3]),m(),c=!1}var ha=n(888);class ma{constructor(e,t,n){this.arg=t,this.dependencies=n;const r=e(),o=[];let a;this.finalDispatch=void 0;const l=function(e){return e.init}(r)(this.arg);let u=l[0],c=l[1];a=[[u,e=>{const t=this.finalDispatch;null==t?o.push(e):t(e)},!1,o],c],this.state=a[0],this.cmd=a[1],this.subscribe=e=>{let t=!1;const n=i(this.state[0]);return function(e,t){pa(M((e=>e)),e,t)}(this.arg,function(e,t){return new da(t.init,t.update,t.subscribe,t.view,e,t.onError,t.termination)}(((t,n)=>{const r=this.state;this.finalDispatch=n,this.state=[t,r[1],!0,o],t!==r[0]&&e()}),function(e,r,o,a,l,u,c){const d=A(e)(c.init),f=O(r)(A(c.update)),p=O(o)(A(c.view)),h=O(a)(A(c.setState));return new da(d,M(f),A(l)(c.subscribe),M(p),M(h),c.onError,(m=c.termination,[e=>!!m[0](e)||n&&t,e=>{const t=e;i(t)?s(t):m[1](e)}]));var m}(((e,t)=>{const n=this.cmd;return this.cmd=Xs(),[this.state[0],n]}),((e,t,n)=>e(t)(this.state[0])),R((e=>e)),R((e=>e)),M((e=>e)),0,r))),()=>{t=!0}}}}function $a(e,t,n){return new ma(e,t,n)}function ga(e,t,n){const i=(0,r.useState)((()=>$a(e,t,n))),a=i[0];(function(e,t,n){return!_(e.arg,t)||!_(e.dependencies,n)})(a,t,n)&&i[1]($a(e,t,n));const l=(0,ha.useSyncExternalStore)(function(e){return e.subscribe}(a),(()=>function(e){return e.state}(a))),c=l[2],d=l[3],f=l[1];return(0,r.useEffect)((()=>{if(c&&d.length>0){let t=u(d);try{for(;t["System.Collections.IEnumerator.MoveNext"]();){const e=t["System.Collections.Generic.IEnumerator`1.get_Current"]();setTimeout((()=>{f(e)}))}}finally{s(t)}o(e=d)?e.splice(0):e.clear()}var e}),[c,d]),[l[0],f]}class wa extends pe{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["Select"]}}class va extends he{constructor(e){super(),this.Selected=e}}function ya(e){let t,n;const o=(i=e.InitialValue,[new va(i),Xs()]);var i;return n=ga((()=>fa((()=>o),((t,n)=>function(e,t){const n=function(e){return new va(e.fields[0])}(t);return e(new Ns(n.Selected,{Valid:null!=n.Selected})),[n,Xs()]}(e.OnUpdate,t)),((e,t)=>{}))),void 0,void 0),(0,r.createElement)("div",k($t([["className",Te(" ",["space-y-2","mt-2"])],(t=jt(Ht((()=>nn((t=>{let o,i;const s=t[0];return Ut((0,r.createElement)("label",k($t([["className",Te(" ",["flex","items-start"])],(o=[(0,r.createElement)("input",{className:Te(" ",["focus:ring-primary-focus","block","mt-0.5","mb-0.5","h-4","w-4","text-primary-base","border-gray-300"]),type:"radio",name:e.Name,id:s,checked:Le(n[0].Selected)===s,onChange:e=>{e.target.checked,n[1](new wa(s))}}),(0,r.createElement)("label",k($t([["className",Te(" ",["ml-3","block","text-sm"])],["for",s],(i=jt(Ht((()=>Kt(Ut((0,r.createElement)("span",{className:Te(" ",["block","text-gray-900"]),children:t[1]})),Ht((()=>{const e=t[2];if(null==e)return Ut(null);{const t=e;return Ut((0,r.createElement)("span",{className:Te(" ",["block","text-gray-500"]),children:t}))}})))))),["children",bt.Children.toArray(Array.from(i))])])))],["children",bt.Children.toArray(Array.from(o))])]))))}),e.ValueLabelPairs)))),["children",bt.Children.toArray(Array.from(t))])])))}class ba extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["YesNoButtonGroupMsg","SetTfnInput","SetTfnTouched","SetTfnExemptionReason","SwitchEditingState","HideAlert"]}}class xa extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Tfn","Exempted"]}}class _a extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["TfnTruncated","TfnValue"]}}class Sa extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Truncated","Editing"]}}class Ea extends he{constructor(e,t,n,r,o){super(),this.YesNoButtonGroup=e,this.TruncatedTfn=t,this.CurrentAlert=n,this.EditingState=r,this.TfnInputTouched=o}}function Ca(e){let t;const n=e.EditingState;if(1===n.tag){const e=n.fields[0];return new Ns((t=e.Value,null==t?void 0:new _a(1,[t])),e.Meta)}return new Ns(new _a(0,[Le(e.TruncatedTfn)]),{Valid:!0})}const Ta=e=>!(1===Vi(e).tag);function ka(e){const t=e.EditingState;if(1===t.tag){const n=t.fields[0],r=n.Value;if(null==r)return new Ea(e.YesNoButtonGroup,e.TruncatedTfn,e.CurrentAlert,new Sa(1,[new Ns(n.Value,{Valid:!1})]),e.TfnInputTouched);if(1===r.tag)return new Ea(e.YesNoButtonGroup,e.TruncatedTfn,e.CurrentAlert,new Sa(1,[new Ns(n.Value,{Valid:!0})]),e.TfnInputTouched);{const t=r.fields[0].fields[0];return new Ea(e.YesNoButtonGroup,e.TruncatedTfn,e.CurrentAlert,new Sa(1,[new Ns(n.Value,{Valid:Ta(t)})]),e.TfnInputTouched)}}return e}function Ia(e){const t=e.EditingState;if(1===t.tag){const e=t.fields[0].Value;let n,r;return null!=e&&0===e.tag?(n=0,r=e.fields[0]):n=1,0===n?r.fields[0]:""}return""}function Ma(e){if(e.TfnInputTouched){const t=e.EditingState;return 1===t.tag&&!t.fields[0].Meta.Valid}return!1}function Aa(e){let t,n,o,i,s;const a=function(e){let t,n,r;return[ka(new Ea(Ys(null!=e&&1===e.tag&&1===e.fields[0].tag?new zs(1,[]):new zs(0,[])),(t=e,null!=t&&0===t.tag?(n=t.fields[0],n):void 0),void 0,null==e?new Sa(1,[Ds()]):1===e.tag?(r=e.fields[0],new Sa(1,[new Ns(r,{Valid:!1})])):new Sa(0,[]),!1)),Xs()]}(e.InitialValue);s=ga((()=>fa((()=>a),((t,n)=>function(e,t,n){const r=function(e,t){switch(e.tag){case 2:return new Ea(t.YesNoButtonGroup,t.TruncatedTfn,t.CurrentAlert,t.EditingState,!0);case 1:{const n=e.fields[0],r=new xa(0,[new Fi(n)]),o=Ta(n);return t.EditingState.tag,new Ea(t.YesNoButtonGroup,t.TruncatedTfn,t.CurrentAlert,new Sa(1,[new Ns(r,{Valid:o})]),t.TfnInputTouched)}case 3:{const n=e.fields[0];let r,o;const i=n.Value;return o=null==i?void 0:function(e){switch(e){case"Under18AndBelowTaxThreshold":return new Li(0,[]);case"Pending":return new Li(1,[]);case"Pensioner":return new Li(2,[]);default:return}}(i),r=null==o?void 0:new xa(1,[o]),t.EditingState.tag,new Ea(t.YesNoButtonGroup,t.TruncatedTfn,t.CurrentAlert,new Sa(1,[new Ns(r,n.Meta)]),t.TfnInputTouched)}case 4:return 1===t.EditingState.tag?new Ea(t.YesNoButtonGroup,t.TruncatedTfn,t.CurrentAlert,new Sa(0,[]),t.TfnInputTouched):new Ea(t.YesNoButtonGroup,t.TruncatedTfn,new Ms(2,["Please click the continue button at the end of\n this form to save the changes to your TFN."]),new Sa(1,[Ds()]),!1);case 5:return ka(new Ea(t.YesNoButtonGroup,t.TruncatedTfn,void 0,t.EditingState,t.TfnInputTouched));default:{const n=e.fields[0];let r,o;n.tag,o=n.fields[0];const i=t.EditingState;if(1===o.tag)if(1===i.tag){const e=i.fields[0].Value;let n;n=null!=e&&1===e.tag?0:1,r=0===n?t.EditingState:new Sa(1,[Ds()])}else r=new Sa(1,[Ds()]);else if(1===i.tag){const e=i.fields[0].Value,n=t.TruncatedTfn;let o,s;switch(null!=e&&0===e.tag?o=0:null!=n?(o=1,s=n):o=2,o){case 0:r=t.EditingState;break;case 1:r=new Sa(0,[]);break;default:r=new Sa(1,[Ds()])}}else r=new Sa(0,[]);return new Ea(Ks(n,t.YesNoButtonGroup),t.TruncatedTfn,t.CurrentAlert,r,t.TfnInputTouched)}}}(t,n);return e(Ca(r)),[r,Xs()]}(e.OnUpdate,t,n)),((e,t)=>{}))),void 0,void 0);const l=s[0],u=s[1],c=null==l.TruncatedTfn?null:(0,r.createElement)("div",k(at((t=[(0,r.createElement)("button",k($t([["className",Te(" ",["relative","inline-flex","items-center","space-x-2","px-3","sm:py-2","py-3","border","border-gray-300","text-sm","font-medium","rounded-r-md","text-gray-700","bg-gray-50","hover:bg-gray-100","focus:outline-none","focus:ring-1","focus:ring-primary-focus","focus:border-primary-focus","focus:z-20","-ml-px"])],["type","button"],(n=jt(Ht((()=>_(l.EditingState,new Sa(0,[]))?Kt(Ut(_t),Ht((()=>Ut((0,r.createElement)("span",{children:["Edit"]}))))):Kt(Ut(St),Ht((()=>Ut((0,r.createElement)("span",{children:["Cancel"]})))))))),["children",bt.Children.toArray(Array.from(n))]),["onClick",e=>{u(new ba(4,[]))}]])))],["children",bt.Children.toArray(Array.from(t))]))));return(0,r.createElement)("div",k($t([["className",Te(" ",Mt)],(o=[Gs("Do you have your Tax File Number (TFN)?"),(0,r.createElement)(Zs,{Dispatch:e=>{u(new ba(0,[e]))},State:l.YesNoButtonGroup}),(0,r.createElement)("div",k($t([["className",Te(" ",["mt-4"])],(i=jt(Ht((()=>{let e,t,n,o,i,s;return Kt((e=l.YesNoButtonGroup.Selected,null!=e?1===e.tag?Ut((0,r.createElement)(ya,(t=wt((e=>[fe(e[0]),e[1],e[2]]),$t([[new Li(1,[]),"My TFN is pending",void 0],[new Li(0,[]),"I'm under 18 and don't have a TFN",void 0],[new Li(2,[]),"I have an exemption from quoting a TFN","E.g. receiving a social security or service pension"]])),{InitialValue:Ne((n=Ca(l).Value,null!=n&&1===n.tag&&1===n.fields[0].tag?(o=n.fields[0].fields[0],fe(o)):void 0)),Name:"TfnExemption",OnUpdate:e=>{u(new ba(3,[e]))},ValueLabelPairs:t}))):(i=l.TruncatedTfn,null!=i&&0===l.EditingState.tag?(s=i,Kt(Ut(Gs("Enter your TFN")),Ht((()=>{let e,t,n;return Ut((0,r.createElement)("div",k($t([["className",Te(" ",["mt-1","flex","rounded-md","shadow-sm"])],(e=[(0,r.createElement)("div",k($t([["className","relative flex items-stretch flex-grow"],(t=[(0,r.createElement)("input",k($t([["className",Te(" ",["focus:ring-primary-focus","focus:border-primary-focus","bg-gray-50","focus:z-20","relative","block","w-full","rounded-none","rounded-l-md","pl-3","sm:text-sm","text-base","border","border-gray-300","text-gray-500"])],["disabled",!0],(n=`*** *** *${s}`,["ref",e=>{null==e||_(e.value,n)||(e.value=n)}])])))],["children",bt.Children.toArray(Array.from(t))])]))),c],["children",bt.Children.toArray(Array.from(e))])]))))})))):Kt(Ut(Gs("Enter your TFN")),Ht((()=>{let e;return Ut((0,r.createElement)("div",k($t([["className",Te(" ",["mt-1"])],(e=jt(Ht((()=>{let e,t;return Kt(Ut((0,r.createElement)("div",k($t([["className",Te(" ",["relative","flex","items-stretch","flex-grow"])],(e=[(0,r.createElement)("input",k($t([["className",Te(" ",jt(Ht((()=>Kt(Ut("block"),Ht((()=>Kt(Ut("w-full"),Ht((()=>Kt(Ut("focus:outline-none"),Ht((()=>Kt(Ut("text-base"),Ht((()=>Kt(Ut("focus:z-20"),Ht((()=>Kt(Ut("relative"),Ht((()=>Kt(Ut("sm:text-sm"),Ht((()=>Kt(Ut("rounded-md"),Ht((()=>Kt(Ut("border-gray-300"),Ht((()=>Kt(Ut("focus:ring-primary-focus"),Ht((()=>Kt(Ut("focus:border-primary-focus"),Ht((()=>Kt(Ut("block"),Ht((()=>Kt(Ut("w-full"),Ht((()=>Kt(null==l.TruncatedTfn?Ut("rounded-md"):Ut("rounded-none rounded-l-md"),Ht((()=>Ma(l)?["border-red-300","text-red-900","placeholder-red-300","focus:ring-red-500","focus:border-red-500"]:Gt()))))))))))))))))))))))))))))))))))))))))))))))],["type","text"],["onChange",e=>{u(new ba(1,[Ae($i,e.target.value)]))}],(t=Ia(l),["ref",e=>{null==e||_(e.value,t)||(e.value=t)}]),["onBlur",e=>{u(new ba(2,[]))}],["inputMode","numeric"],["data-testid","tfn-input"]]))),c],["children",bt.Children.toArray(Array.from(e))])])))),Ht((()=>Ma(l)?Ut((0,r.createElement)("div",{className:Te(" ",["mt-1","text-sm","text-red-600"]),children:"That isn’t a valid Tax File Number"})):Gt())))}))),["children",bt.Children.toArray(Array.from(e))])]))))})))):Ut(null)),Ht((()=>{let e;return Ut((e=jt(Ht((()=>{const e=l.CurrentAlert;if(null==e)return Ut(null);{const t=e;return Ut((0,r.createElement)(Ps,{alert:t,hideAlert:()=>{u(new ba(5,[]))}}))}}))),(0,r.createElement)("div",{children:bt.Children.toArray(Array.from(e))})))})))}))),["children",bt.Children.toArray(Array.from(i))])])))],["children",bt.Children.toArray(Array.from(o))])])))}function Ra(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent))}function Oa(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Pa(e){let t=null;return()=>(null==t&&(t=e()),t)}const Na=Pa((function(){return Oa(/^Mac/i)})),Da=Pa((function(){return Oa(/^iPhone/i)})),Fa=Pa((function(){return Oa(/^iPad/i)||Na()&&navigator.maxTouchPoints>1})),La=Pa((function(){return Da()||Fa()})),Ba=(Pa((function(){return Na()||La()})),Pa((function(){return Ra(/AppleWebKit/i)&&!Ba()})),Pa((function(){return Ra(/Chrome/i)}))),Ha=Pa((function(){return Ra(/Android/i)}));Pa((function(){return Ra(/Firefox/i)}));const Va=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},Ga=e=>e&&"window"in e&&e.window===e?e:Va(e).defaultView||window;let Ua=null,za=new Set,ja=new Map,Wa=!1,Ya=!1;const Ka={Tab:!0,Escape:!0};function qa(e,t){for(let n of za)n(e,t)}function Za(e){Wa=!0,function(e){return!(e.metaKey||!Na()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(Ua="keyboard",qa("keyboard",e))}function Ja(e){Ua="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(Wa=!0,qa("pointer",e))}function Xa(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||(Ha()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType))&&(Wa=!0,Ua="virtual")}function Qa(e){e.target!==window&&e.target!==document&&(Wa||Ya||(Ua="virtual",qa("virtual",e)),Wa=!1,Ya=!1)}function el(){Wa=!1,Ya=!0}function tl(e){if("undefined"==typeof window||ja.get(Ga(e)))return;const t=Ga(e),n=Va(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Wa=!0,r.apply(this,arguments)},n.addEventListener("keydown",Za,!0),n.addEventListener("keyup",Za,!0),n.addEventListener("click",Xa,!0),t.addEventListener("focus",Qa,!0),t.addEventListener("blur",el,!1),"undefined"!=typeof PointerEvent?(n.addEventListener("pointerdown",Ja,!0),n.addEventListener("pointermove",Ja,!0),n.addEventListener("pointerup",Ja,!0)):(n.addEventListener("mousedown",Ja,!0),n.addEventListener("mousemove",Ja,!0),n.addEventListener("mouseup",Ja,!0)),t.addEventListener("beforeunload",(()=>{nl(e)}),{once:!0}),ja.set(t,{focus:r})}const nl=(e,t)=>{const n=Ga(e),r=Va(e);t&&r.removeEventListener("DOMContentLoaded",t),ja.has(n)&&(n.HTMLElement.prototype.focus=ja.get(n).focus,r.removeEventListener("keydown",Za,!0),r.removeEventListener("keyup",Za,!0),r.removeEventListener("click",Xa,!0),n.removeEventListener("focus",Qa,!0),n.removeEventListener("blur",el,!1),"undefined"!=typeof PointerEvent?(r.removeEventListener("pointerdown",Ja,!0),r.removeEventListener("pointermove",Ja,!0),r.removeEventListener("pointerup",Ja,!0)):(r.removeEventListener("mousedown",Ja,!0),r.removeEventListener("mousemove",Ja,!0),r.removeEventListener("mouseup",Ja,!0)),ja.delete(n))};function rl(){return"pointer"!==Ua}"undefined"!=typeof document&&function(e){const t=Va(e);let n;"loading"!==t.readyState?tl(e):(n=()=>{tl(e)},t.addEventListener("DOMContentLoaded",n))}();const ol=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);const il="undefined"!=typeof document?r.default.useLayoutEffect:()=>{};class sl{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function al(e){let t=(0,r.useRef)({isFocused:!1,observer:null});il((()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]);let n=function(e){const t=(0,r.useRef)(null);return il((()=>{t.current=e}),[e]),(0,r.useCallback)(((...e)=>{const n=t.current;return null==n?void 0:n(...e)}),[])}((t=>{null==e||e(t)}));return(0,r.useCallback)((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target,o=e=>{t.current.isFocused=!1,r.disabled&&n(new sl("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver((()=>{if(t.current.isFocused&&r.disabled){var e;null===(e=t.current.observer)||void 0===e||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}})),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}}),[n])}function ll(e={}){let{autoFocus:t=!1,isTextInput:n,within:o}=e,i=(0,r.useRef)({isFocused:!1,isFocusVisible:t||rl()}),[s,a]=(0,r.useState)(!1),[l,u]=(0,r.useState)((()=>i.current.isFocused&&i.current.isFocusVisible)),c=(0,r.useCallback)((()=>u(i.current.isFocused&&i.current.isFocusVisible)),[]),d=(0,r.useCallback)((e=>{i.current.isFocused=e,a(e),c()}),[c]);var f,p,h;f=e=>{i.current.isFocusVisible=e,c()},p=[],h={isTextInput:n},tl(),(0,r.useEffect)((()=>{let e=(e,t)=>{(function(e,t,n){var r;const o="undefined"!=typeof window?Ga(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,i="undefined"!=typeof window?Ga(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s="undefined"!=typeof window?Ga(null==n?void 0:n.target).HTMLElement:HTMLElement,a="undefined"!=typeof window?Ga(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent;return!((e=e||(null==n?void 0:n.target)instanceof o&&!ol.has(null==n||null===(r=n.target)||void 0===r?void 0:r.type)||(null==n?void 0:n.target)instanceof i||(null==n?void 0:n.target)instanceof s&&(null==n?void 0:n.target.isContentEditable))&&"keyboard"===t&&n instanceof a&&!Ka[n.key])})(!!(null==h?void 0:h.isTextInput),e,t)&&f(rl())};return za.add(e),()=>{za.delete(e)}}),p);let{focusProps:m}=function(e){let{isDisabled:t,onFocus:n,onBlur:o,onFocusChange:i}=e;const s=(0,r.useCallback)((e=>{if(e.target===e.currentTarget)return o&&o(e),i&&i(!1),!0}),[o,i]),a=al(s),l=(0,r.useCallback)((e=>{const t=Va(e.target);e.target===e.currentTarget&&t.activeElement===e.target&&(n&&n(e),i&&i(!0),a(e))}),[i,n,a]);return{focusProps:{onFocus:!t&&(n||i||o)?l:void 0,onBlur:t||!o&&!i?void 0:s}}}({isDisabled:o,onFocusChange:d}),{focusWithinProps:$}=function(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:o,onFocusWithinChange:i}=e,s=(0,r.useRef)({isFocusWithin:!1}),a=(0,r.useCallback)((e=>{s.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(s.current.isFocusWithin=!1,n&&n(e),i&&i(!1))}),[n,i,s]),l=al(a),u=(0,r.useCallback)((e=>{s.current.isFocusWithin||document.activeElement!==e.target||(o&&o(e),i&&i(!0),s.current.isFocusWithin=!0,l(e))}),[o,i,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:a}}}({isDisabled:!o,onFocusWithinChange:d});return{isFocused:s,isFocusVisible:l,focusProps:o?$:m}}let ul=!1,cl=0;function dl(){ul=!0,setTimeout((()=>{ul=!1}),50)}function fl(e){"touch"===e.pointerType&&dl()}function pl(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",fl):document.addEventListener("touchend",dl),cl++,()=>{cl--,cl>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",fl):document.removeEventListener("touchend",dl))}}function hl(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:o,isDisabled:i}=e,[s,a]=(0,r.useState)(!1),l=(0,r.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,r.useEffect)(pl,[]);let{hoverProps:u,triggerHoverEnd:c}=(0,r.useMemo)((()=>{let e=(e,r)=>{if(l.pointerType=r,i||"touch"===r||l.isHovered||!e.currentTarget.contains(e.target))return;l.isHovered=!0;let o=e.currentTarget;l.target=o,t&&t({type:"hoverstart",target:o,pointerType:r}),n&&n(!0),a(!0)},r=(e,t)=>{if(l.pointerType="",l.target=null,"touch"===t||!l.isHovered)return;l.isHovered=!1;let r=e.currentTarget;o&&o({type:"hoverend",target:r,pointerType:t}),n&&n(!1),a(!1)},s={};return"undefined"!=typeof PointerEvent?(s.onPointerEnter=t=>{ul&&"mouse"===t.pointerType||e(t,t.pointerType)},s.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&r(e,e.pointerType)}):(s.onTouchStart=()=>{l.ignoreEmulatedMouseEvents=!0},s.onMouseEnter=t=>{l.ignoreEmulatedMouseEvents||ul||e(t,"mouse"),l.ignoreEmulatedMouseEvents=!1},s.onMouseLeave=e=>{!i&&e.currentTarget.contains(e.target)&&r(e,"mouse")}),{hoverProps:s,triggerHoverEnd:r}}),[t,n,o,i,l]);return(0,r.useEffect)((()=>{i&&c({currentTarget:l.target},l.pointerType)}),[i]),{hoverProps:u,isHovered:s}}function ml(e,t,n){let r,o=n.initialDeps??[];return()=>{var i,s,a,l;let u;n.key&&(null==(i=n.debug)?void 0:i.call(n))&&(u=Date.now());const c=e(),d=c.length!==o.length||c.some(((e,t)=>o[t]!==e));if(!d)return r;let f;if(o=c,n.key&&(null==(s=n.debug)?void 0:s.call(n))&&(f=Date.now()),r=t(...c),n.key&&(null==(a=n.debug)?void 0:a.call(n))){const e=Math.round(100*(Date.now()-u))/100,t=Math.round(100*(Date.now()-f))/100,r=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${o(t,5)} /${o(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return null==(l=null==n?void 0:n.onChange)||l.call(n,r),r}}function $l(e,t){if(void 0===e)throw new Error("Unexpected undefined"+(t?`: ${t}`:""));return e}const gl=(e,t,n)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout((()=>t.apply(this,o)),n)}},wl=e=>e,vl=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},yl=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const o=e=>{const{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(o(n.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver((e=>{const t=e[0];if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e)return void o({width:e.inlineSize,height:e.blockSize})}o(n.getBoundingClientRect())}));return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},bl={passive:!0},xl="undefined"==typeof window||"onscrollend"in window,_l=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let o=0;const i=e.options.useScrollendEvent&&xl?()=>{}:gl(r,(()=>{t(o,!1)}),e.options.isScrollingResetDelay),s=r=>()=>{const{horizontal:s,isRtl:a}=e.options;o=s?n.scrollLeft*(a?-1:1):n.scrollTop,i(),t(o,r)},a=s(!0),l=s(!1);return l(),n.addEventListener("scroll",a,bl),n.addEventListener("scrollend",l,bl),()=>{n.removeEventListener("scroll",a),n.removeEventListener("scrollend",l)}},Sl=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},El=(e,{adjustments:t=0,behavior:n},r)=>{var o,i;const s=e+t;null==(i=null==(o=r.scrollElement)?void 0:o.scrollTo)||i.call(o,{[r.options.horizontal?"left":"top"]:s,behavior:n})};class Cl{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver((e=>{e.forEach((e=>{this._measureElement(e.target,e)}))})):null);return{disconnect:()=>{var n;null==(n=t())||n.disconnect(),e=null},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach((([t,n])=>{void 0===n&&delete e[t]})),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:wl,rangeExtractor:vl,onChange:()=>{},measureElement:Sl,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=ml((()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null])),(e=>{this.notify(e)}),{key:!1,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((e=>e())),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach((e=>{this.observer.observe(e)})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,(e=>{this.scrollRect=e,this.maybeNotify()}))),this.unsubs.push(this.options.observeElementOffset(this,((e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.maybeNotify()})))}},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??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const n=new Map,r=new Map;for(let o=t-1;o>=0;o--){const t=e[o];if(n.has(t.lane))continue;const i=r.get(t.lane);if(null==i||t.end>i.end?r.set(t.lane,t):t.end<i.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort(((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end))[0]:void 0},this.getMeasurementOptions=ml((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled]),((e,t,n,r,o)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:o})),{key:!1}),this.getMeasurements=ml((()=>[this.getMeasurementOptions(),this.itemSizeCache]),(({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:o},i)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];0===this.measurementsCache.length&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach((e=>{this.itemSizeCache.set(e.key,e.size)})));const s=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const a=this.measurementsCache.slice(0,s);for(let o=s;o<e;o++){const e=r(o),s=1===this.options.lanes?a[o-1]:this.getFurthestMeasurement(a,o),l=s?s.end+this.options.gap:t+n,u=i.get(e),c="number"==typeof u?u:this.options.estimateSize(o),d=l+c,f=s?s.lane:o%this.options.lanes;a[o]={index:o,start:l,size:c,end:d,key:e,lane:f}}return this.measurementsCache=a,a}),{key:!1,debug:()=>this.options.debug}),this.calculateRange=ml((()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()]),((e,t,n)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,o=Tl(0,r,(t=>e[t].start),n);let i=o;for(;i<r&&e[i].end<n+t;)i++;return{startIndex:o,endIndex:i}}({measurements:e,outerSize:t,scrollOffset:n}):null),{key:!1,debug:()=>this.options.debug}),this.getIndexes=ml((()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count]),((e,t,n,r)=>null===t?[]:e({startIndex:t.startIndex,endIndex:t.endIndex,overscan:n,count:r})),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const n=this.indexFromElement(e),r=this.measurementsCache[n];if(!r)return;const o=r.key,i=this.elementsCache.get(o);i!==e&&(i&&this.observer.unobserve(i),this.observer.observe(e),this.elementsCache.set(o,e)),e.isConnected&&this.resizeItem(n,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{const n=this.measurementsCache[e];if(!n)return;const r=t-(this.itemSizeCache.get(n.key)??n.size);0!==r&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(n,r,this):n.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,t)),this.notify(!1))},this.measureElement=e=>{e?this._measureElement(e,void 0):this.elementsCache.forEach(((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))}))},this.getVirtualItems=ml((()=>[this.getIndexes(),this.getMeasurements()]),((e,t)=>{const n=[];for(let r=0,o=e.length;r<o;r++){const o=t[e[r]];n.push(o)}return n}),{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(0!==t.length)return $l(t[Tl(0,t.length-1,(e=>$l(t[e]).start),e)])},this.getOffsetForAlignment=(e,t)=>{const n=this.getSize(),r=this.getScrollOffset();"auto"===t&&(t=e<=r?"start":e>=r+n?"end":"start"),"start"===t||("end"===t?e-=n:"center"===t&&(e-=n/2));const o=this.options.horizontal?"scrollWidth":"scrollHeight",i=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[o]:this.scrollElement[o]:0)-n;return Math.max(Math.min(i,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const n=this.measurementsCache[e];if(!n)return;const r=this.getSize(),o=this.getScrollOffset();if("auto"===t)if(n.end>=o+r-this.options.scrollPaddingEnd)t="end";else{if(!(n.start<=o+this.options.scrollPaddingStart))return[o,t];t="start"}const i="end"===t?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,t),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{null!==this.scrollToIndexTimeoutId&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:t="start",behavior:n}={})=>{this.cancelScrollToIndex(),"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:t="auto",behavior:n}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const r=this.getOffsetForIndex(e,t);if(!r)return;const[o,i]=r;this._scrollToOffset(o,{adjustments:void 0,behavior:n}),"smooth"!==n&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout((()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){const[t]=$l(this.getOffsetForIndex(e,i));((e,t)=>Math.abs(e-t)<1)(t,this.getScrollOffset())||this.scrollToIndex(e,{align:i,behavior:n})}else this.scrollToIndex(e,{align:i,behavior:n})})))},this.scrollBy=(e,{behavior:t}={})=>{this.cancelScrollToIndex(),"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let n;return n=0===t.length?this.options.paddingStart:1===this.options.lanes?(null==(e=t[t.length-1])?void 0:e.end)??0:Math.max(...t.slice(-this.options.lanes).map((e=>e.end))),Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const Tl=(e,t,n,r)=>{for(;e<=t;){const o=(e+t)/2|0,i=n(o);if(i<r)e=o+1;else{if(!(i>r))return o;t=o-1}}return e>0?e-1:0},kl="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;var Il=Object.defineProperty,Ml=(e,t,n)=>(((e,t,n)=>{t in e?Il(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let Al=new class{constructor(){Ml(this,"current",this.detect()),Ml(this,"handoffState","pending"),Ml(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}};function Rl(e){return Al.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function Ol(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function Pl(){let e=[],t={addEventListener:(e,n,r,o)=>(e.addEventListener(n,r,o),t.add((()=>e.removeEventListener(n,r,o)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return Ol((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=Pl();return e(t),this.add((()=>t.dispose()))},add:t=>(e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function Nl(){let[e]=(0,r.useState)(Pl);return(0,r.useEffect)((()=>()=>e.dispose()),[e]),e}let Dl=(e,t)=>{Al.isServer?(0,r.useEffect)(e,t):(0,r.useLayoutEffect)(e,t)};function Fl(e){let t=(0,r.useRef)(e);return Dl((()=>{t.current=e}),[e]),t}let Ll=function(e){let t=Fl(e);return r.default.useCallback(((...e)=>t.current(...e)),[t])};function Bl(e,t){return null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t&&"id"in e&&"id"in t?e.id===t.id:e===t}function Hl(e,t=!1){let[n,o]=(0,r.useReducer)((()=>({})),{}),i=(0,r.useMemo)((()=>function(e){if(null===e)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}(e)),[e,n]);return Dl((()=>{if(!e)return;let t=new ResizeObserver(o);return t.observe(e),()=>{t.disconnect()}}),[e]),t?{width:`${i.width}px`,height:`${i.height}px`}:i}class Vl extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}}function Gl(e,t){let n=e(),r=new Set;return{getSnapshot:()=>n,subscribe:e=>(r.add(e),()=>r.delete(e)),dispatch(e,...o){let i=t[e].call(n,...o);i&&(n=i,r.forEach((e=>e())))}}}function Ul(e){return(0,r.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot)}let zl=new Vl((()=>Gl((()=>[]),{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(-1===t)return this;let n=this.slice();return n.splice(t,1),n}})));function jl(e,t){let n=zl.get(t),o=(0,r.useId)(),i=Ul(n);if(Dl((()=>{if(e)return n.dispatch("ADD",o),()=>n.dispatch("REMOVE",o)}),[n,e]),!e)return!1;let s=i.indexOf(o),a=i.length;return-1===s&&(s=a,a+=1),s===a-1}let Wl=new Map,Yl=new Map;function Kl(e){var t;let n=null!=(t=Yl.get(e))?t:0;return Yl.set(e,n+1),0!==n||(Wl.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>function(e){var t;let n=null!=(t=Yl.get(e))?t:1;if(1===n?Yl.delete(e):Yl.set(e,n-1),1!==n)return;let r=Wl.get(e);r&&(null===r["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,Wl.delete(e))}(e)}function ql(e,{allowed:t,disallowed:n}={}){let r=jl(e,"inert-others");Dl((()=>{var e,o;if(!r)return;let i=Pl();for(let t of null!=(e=null==n?void 0:n())?e:[])t&&i.add(Kl(t));let s=null!=(o=null==t?void 0:t())?o:[];for(let e of s){if(!e)continue;let t=Rl(e);if(!t)continue;let n=e.parentElement;for(;n&&n!==t.body;){for(let e of n.children)s.some((t=>e.contains(t)))||i.add(Kl(e));n=n.parentElement}}return i.dispose}),[r,t,n])}function Zl(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Zl),r}let Jl=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");["[data-autofocus]"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var Xl,Ql,eu,tu=((eu=tu||{})[eu.First=1]="First",eu[eu.Previous=2]="Previous",eu[eu.Next=4]="Next",eu[eu.Last=8]="Last",eu[eu.WrapAround=16]="WrapAround",eu[eu.NoScroll=32]="NoScroll",eu[eu.AutoFocus=64]="AutoFocus",eu),nu=((Ql=nu||{})[Ql.Error=0]="Error",Ql[Ql.Overflow=1]="Overflow",Ql[Ql.Success=2]="Success",Ql[Ql.Underflow=3]="Underflow",Ql),ru=((Xl=ru||{})[Xl.Previous=-1]="Previous",Xl[Xl.Next=1]="Next",Xl),ou=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(ou||{});var iu=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(iu||{});function su(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function au(){return su()||/Android/gi.test(window.navigator.userAgent)}function lu(e,t,n,o){let i=Fl(n);(0,r.useEffect)((()=>{if(e)return document.addEventListener(t,n,o),()=>document.removeEventListener(t,n,o);function n(e){i.current(e)}}),[e,t,o])}function uu(e,t,n){let o=jl(e,"outside-click"),i=Fl(n),s=(0,r.useCallback)((function(e,n){if(e.defaultPrevented)return;let r=n(e);if(null===r||!r.getRootNode().contains(r)||!r.isConnected)return;let o=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of o)if(null!==t&&(t.contains(r)||e.composed&&e.composedPath().includes(t)))return;return!function(e,t=0){var n;return e!==(null==(n=Rl(e))?void 0:n.body)&&Zl(t,{0:()=>e.matches(Jl),1(){let t=e;for(;null!==t;){if(t.matches(Jl))return!0;t=t.parentElement}return!1}})}(r,ou.Loose)&&-1!==r.tabIndex&&e.preventDefault(),i.current(e,r)}),[i,t]),a=(0,r.useRef)(null);lu(o,"pointerdown",(e=>{var t,n;a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),lu(o,"mousedown",(e=>{var t,n;a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),lu(o,"click",(e=>{au()||a.current&&(s(e,(()=>a.current)),a.current=null)}),!0);let l=(0,r.useRef)({x:0,y:0});lu(o,"touchstart",(e=>{l.current.x=e.touches[0].clientX,l.current.y=e.touches[0].clientY}),!0),lu(o,"touchend",(e=>{let t=e.changedTouches[0].clientX,n=e.changedTouches[0].clientY;if(!(Math.abs(t-l.current.x)>=30||Math.abs(n-l.current.y)>=30))return s(e,(()=>e.target instanceof HTMLElement?e.target:null))}),!0),function(e,t,n,o){let i=Fl((e=>s(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))));(0,r.useEffect)((()=>{if(e)return window.addEventListener(t,n,o),()=>window.removeEventListener(t,n,o);function n(e){i.current(e)}}),[e,t,o])}(o,"blur",0,!0)}function cu(...e){return(0,r.useMemo)((()=>Rl(...e)),[...e])}function du(e){let t=(0,r.useRef)({value:"",selectionStart:null,selectionEnd:null});return function(e,t,n,o){let i=Fl(n);(0,r.useEffect)((()=>{function n(e){i.current(e)}return(e=null!=e?e:window).addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}),[e,t,o])}(e,"blur",(e=>{let n=e.target;n instanceof HTMLInputElement&&(t.current={value:n.value,selectionStart:n.selectionStart,selectionEnd:n.selectionEnd})})),Ll((()=>{if(document.activeElement!==e&&e instanceof HTMLInputElement&&e.isConnected){if(e.focus({preventScroll:!0}),e.value!==t.current.value)e.setSelectionRange(e.value.length,e.value.length);else{let{selectionStart:n,selectionEnd:r}=t.current;null!==n&&null!==r&&e.setSelectionRange(n,r)}t.current={value:"",selectionStart:null,selectionEnd:null}}}))}function fu(e,t){return(0,r.useMemo)((()=>{var n;if(e.type)return e.type;let r=null!=(n=e.as)?n:"button";return"string"==typeof r&&"button"===r.toLowerCase()||"BUTTON"===(null==t?void 0:t.tagName)&&!t.hasAttribute("type")?"button":void 0}),[e.type,e.as,t])}function pu(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=null!=(n=t.defaultView)?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),i=Math.max(0,e-o);n.style(r,"paddingRight",`${i}px`)}}}function hu(e){let t={};for(let n of e)Object.assign(t,n(t));return t}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0)),["textarea","input"].join(",");let mu=Gl((()=>new Map),{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:Pl(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:hu(n)},o=[su()?{before({doc:e,d:t,meta:n}){function r(e){return n.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=Pl();n.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>n.dispose()))))}let o=null!=(n=window.scrollY)?n:window.pageYOffset,i=null;t.addEventListener(e,"click",(t=>{if(t.target instanceof HTMLElement)try{let n=t.target.closest("a");if(!n)return;let{hash:o}=new URL(n.href),s=e.querySelector(o);s&&!r(s)&&(i=s)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let n=e.target;for(;n.parentElement&&r(n.parentElement);)n=n.parentElement;t.style(n,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement){if("INPUT"===e.target.tagName)return;if(r(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;o!==t&&window.scrollTo(0,o),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)}))}))}}:{},pu(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];o.forEach((({before:e})=>null==e?void 0:e(r))),o.forEach((({after:e})=>null==e?void 0:e(r)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function $u(e,t,n=()=>[document.body]){!function(e,t,n=()=>({containers:[]})){let r=Ul(mu),o=t?r.get(t):void 0;!!o&&o.count;Dl((()=>{if(t&&e)return mu.dispatch("PUSH",t,n),()=>mu.dispatch("POP",t,n)}),[e,t])}(jl(e,"scroll-lock"),t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}}))}mu.subscribe((()=>{let e=mu.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&mu.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&mu.dispatch("TEARDOWN",n)}}));let gu=Symbol();function wu(...e){let t=(0,r.useRef)(e);(0,r.useEffect)((()=>{t.current=e}),[e]);let n=Ll((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[gu])))?void 0:n}function vu(e){return[e.screenX,e.screenY]}var yu,bu;"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&"test"===(null==(yu=null==process?void 0:process.env)?void 0:yu.NODE_ENV)&&void 0===(null==(bu=null==Element?void 0:Element.prototype)?void 0:bu.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join("\n")),[]});var xu,_u=((xu=_u||{})[xu.None=0]="None",xu[xu.Closed=1]="Closed",xu[xu.Enter=2]="Enter",xu[xu.Leave=4]="Leave",xu);function Su(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t}function Eu(e,t){let n=(0,r.useRef)([]),o=Ll(e);(0,r.useEffect)((()=>{let e=[...n.current];for(let[r,i]of t.entries())if(n.current[r]!==i){let r=o(t,e);return n.current=t,r}}),[o,...t])}let Cu=(0,r.createContext)(void 0);function Tu(){return(0,r.useContext)(Cu)}const ku=Math.min,Iu=Math.max,Mu=Math.round,Au=Math.floor,Ru=e=>({x:e,y:e}),Ou={left:"right",right:"left",bottom:"top",top:"bottom"},Pu={start:"end",end:"start"};function Nu(e,t,n){return Iu(e,ku(t,n))}function Du(e,t){return"function"==typeof e?e(t):e}function Fu(e){return e.split("-")[0]}function Lu(e){return e.split("-")[1]}function Bu(e){return"x"===e?"y":"x"}function Hu(e){return"y"===e?"height":"width"}function Vu(e){return["top","bottom"].includes(Fu(e))?"y":"x"}function Gu(e){return Bu(Vu(e))}function Uu(e){return e.replace(/start|end/g,(e=>Pu[e]))}function zu(e){return e.replace(/left|right|bottom|top/g,(e=>Ou[e]))}function ju(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Wu(){return"undefined"!=typeof window}function Yu(e){return Zu(e)?(e.nodeName||"").toLowerCase():"#document"}function Ku(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function qu(e){var t;return null==(t=(Zu(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Zu(e){return!!Wu()&&(e instanceof Node||e instanceof Ku(e).Node)}function Ju(e){return!!Wu()&&(e instanceof Element||e instanceof Ku(e).Element)}function Xu(e){return!!Wu()&&(e instanceof HTMLElement||e instanceof Ku(e).HTMLElement)}function Qu(e){return!(!Wu()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ku(e).ShadowRoot)}function ec(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=sc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function tc(e){return["table","td","th"].includes(Yu(e))}function nc(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function rc(e){const t=oc(),n=Ju(e)?sc(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function oc(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function ic(e){return["html","body","#document"].includes(Yu(e))}function sc(e){return Ku(e).getComputedStyle(e)}function ac(e){return Ju(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function lc(e){if("html"===Yu(e))return e;const t=e.assignedSlot||e.parentNode||Qu(e)&&e.host||qu(e);return Qu(t)?t.host:t}function uc(e){const t=lc(e);return ic(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xu(t)&&ec(t)?t:uc(t)}function cc(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=uc(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=Ku(o);if(i){const e=dc(s);return t.concat(s,s.visualViewport||[],ec(o)?o:[],e&&n?cc(e):[])}return t.concat(o,cc(o,[],n))}function dc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function fc(e,t,n){let{reference:r,floating:o}=e;const i=Vu(t),s=Gu(t),a=Hu(s),l=Fu(t),u="y"===i,c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Lu(t)){case"start":p[s]-=f*(n&&u?-1:1);break;case"end":p[s]+=f*(n&&u?-1:1)}return p}async function pc(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Du(t,e),h=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(p),m=a[f?"floating"===d?"reference":"floating":d],$=ju(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),g="floating"===d?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),v=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},y=ju(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:w,strategy:l}):g);return{top:($.top-y.top+h.top)/v.y,bottom:(y.bottom-$.bottom+h.bottom)/v.y,left:($.left-y.left+h.left)/v.x,right:(y.right-$.right+h.right)/v.x}}function hc(e){const t=sc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Xu(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Mu(n)!==i||Mu(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function mc(e){return Ju(e)?e:e.contextElement}function $c(e){const t=mc(e);if(!Xu(t))return Ru(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=hc(t);let s=(i?Mu(n.width):n.width)/r,a=(i?Mu(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const gc=Ru(0);function wc(e){const t=Ku(e);return oc()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:gc}function vc(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=mc(e);let s=Ru(1);t&&(r?Ju(r)&&(s=$c(r)):s=$c(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ku(e))&&t}(i,n,r)?wc(i):Ru(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,c=o.width/s.x,d=o.height/s.y;if(i){const e=Ku(i),t=r&&Ju(r)?Ku(r):r;let n=e,o=dc(n);for(;o&&r&&t!==n;){const e=$c(o),t=o.getBoundingClientRect(),r=sc(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,u*=e.y,c*=e.x,d*=e.y,l+=i,u+=s,n=Ku(o),o=dc(n)}}return ju({width:c,height:d,x:l,y:u})}function yc(e,t){const n=ac(e).scrollLeft;return t?t.left+n:vc(qu(e)).left+n}function bc(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:yc(e,r)),y:r.top+t.scrollTop}}function xc(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Ku(e),r=qu(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=oc();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=qu(e),n=ac(e),r=e.ownerDocument.body,o=Iu(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Iu(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+yc(e);const a=-n.scrollTop;return"rtl"===sc(r).direction&&(s+=Iu(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(qu(e));else if(Ju(t))r=function(e,t){const n=vc(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Xu(e)?$c(e):Ru(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=wc(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ju(r)}function _c(e,t){const n=lc(e);return!(n===t||!Ju(n)||ic(n))&&("fixed"===sc(n).position||_c(n,t))}function Sc(e,t,n){const r=Xu(t),o=qu(t),i="fixed"===n,s=vc(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Ru(0);if(r||!r&&!i)if(("body"!==Yu(t)||ec(o))&&(a=ac(t)),r){const e=vc(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=yc(o));const u=!o||r||i?Ru(0):bc(o,a);return{x:s.left+a.scrollLeft-l.x-u.x,y:s.top+a.scrollTop-l.y-u.y,width:s.width,height:s.height}}function Ec(e){return"static"===sc(e).position}function Cc(e,t){if(!Xu(e)||"fixed"===sc(e).position)return null;if(t)return t(e);let n=e.offsetParent;return qu(e)===n&&(n=n.ownerDocument.body),n}function Tc(e,t){const n=Ku(e);if(nc(e))return n;if(!Xu(e)){let t=lc(e);for(;t&&!ic(t);){if(Ju(t)&&!Ec(t))return t;t=lc(t)}return n}let r=Cc(e,t);for(;r&&tc(r)&&Ec(r);)r=Cc(r,t);return r&&ic(r)&&Ec(r)&&!rc(r)?n:r||function(e){let t=lc(e);for(;Xu(t)&&!ic(t);){if(rc(t))return t;if(nc(t))return null;t=lc(t)}return null}(e)||n}const kc={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=qu(r),a=!!t&&nc(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=Ru(1);const c=Ru(0),d=Xu(r);if((d||!d&&!i)&&(("body"!==Yu(r)||ec(s))&&(l=ac(r)),Xu(r))){const e=vc(r);u=$c(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}const f=!s||d||i?Ru(0):bc(s,l,!0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}},getDocumentElement:qu,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?nc(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=cc(e,[],!1).filter((e=>Ju(e)&&"body"!==Yu(e))),o=null;const i="fixed"===sc(e).position;let s=i?lc(e):e;for(;Ju(s)&&!ic(s);){const t=sc(s),n=rc(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||ec(s)&&!n&&_c(e,s))?r=r.filter((e=>e!==s)):o=t,s=lc(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],a=i.reduce(((e,n)=>{const r=xc(t,n,o);return e.top=Iu(r.top,e.top),e.right=ku(r.right,e.right),e.bottom=ku(r.bottom,e.bottom),e.left=Iu(r.left,e.left),e}),xc(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Tc,getElementRects:async function(e){const t=this.getOffsetParent||Tc,n=this.getDimensions,r=await n(e.floating);return{reference:Sc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=hc(e);return{width:t,height:n}},getScale:$c,isElement:Ju,isRTL:function(e){return"rtl"===sc(e).direction}};function Ic(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,u=mc(e),c=o||i?[...u?cc(u):[],...cc(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=u&&a?function(e,t){let n,r=null;const o=qu(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const p={rootMargin:-Au(c)+"px "+-Au(o.clientWidth-(u+d))+"px "+-Au(o.clientHeight-(c+f))+"px "+-Au(u)+"px",threshold:Iu(0,ku(1,l))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}h=!1}try{r=new IntersectionObserver(m,{...p,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(m,p)}r.observe(e)}(!0),i}(u,n):null;let f,p=-1,h=null;s&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),u&&!l&&h.observe(u),h.observe(t));let m=l?vc(e):null;return l&&function t(){const r=vc(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n(),m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const Mc=pc,Ac=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=Fu(n),a=Lu(n),l="y"===Vu(n),u=["left","top"].includes(s)?-1:1,c=i&&l?-1:1,d=Du(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof h&&(p="end"===a?-1*h:h),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Rc=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Du(e,t),u={x:n,y:r},c=await pc(t,l),d=Vu(Fu(o)),f=Bu(d);let p=u[f],h=u[d];if(i){const e="y"===f?"bottom":"right";p=Nu(p+c["y"===f?"top":"left"],p,p-c[e])}if(s){const e="y"===d?"bottom":"right";h=Nu(h+c["y"===d?"top":"left"],h,h-c[e])}const m=a.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:s}}}}}},Oc=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...$}=Du(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=Fu(o),w=Vu(a),v=Fu(a)===a,y=await(null==l.isRTL?void 0:l.isRTL(u.floating)),b=f||(v||!m?[zu(a)]:function(e){const t=zu(e);return[Uu(e),t,Uu(t)]}(a)),x="none"!==h;!f&&x&&b.push(...function(e,t,n,r){const o=Lu(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}(Fu(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(Uu)))),i}(a,m,h,y));const _=[a,...b],S=await pc(t,$),E=[];let C=(null==(r=i.flip)?void 0:r.overflows)||[];if(c&&E.push(S[g]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Lu(e),o=Gu(e),i=Hu(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=zu(s)),[s,zu(s)]}(o,s,y);E.push(S[e[0]],S[e[1]])}if(C=[...C,{placement:o,overflows:E}],!E.every((e=>e<=0))){var T,k;const e=((null==(T=i.flip)?void 0:T.index)||0)+1,t=_[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(k=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:k.placement;if(!n)switch(p){case"bestFit":{var I;const e=null==(I=C.filter((e=>{if(x){const t=Vu(e.placement);return t===w||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:I[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},Pc=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=Du(e,t),c=await pc(t,u),d=Fu(o),f=Lu(o),p="y"===Vu(o),{width:h,height:m}=i.floating;let $,g;"top"===d||"bottom"===d?($=d,g=f===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,$="end"===f?"top":"bottom");const w=m-c.top-c.bottom,v=h-c.left-c.right,y=ku(m-c[$],w),b=ku(h-c[g],v),x=!t.middlewareData.shift;let _=y,S=b;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=v),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(_=w),x&&!f){const e=Iu(c.left,0),t=Iu(c.right,0),n=Iu(c.top,0),r=Iu(c.bottom,0);p?S=h-2*(0!==e||0!==t?e+t:Iu(c.left,c.right)):_=m-2*(0!==n||0!==r?n+r:Iu(c.top,c.bottom))}await l({...t,availableWidth:S,availableHeight:_});const E=await s.getDimensions(a.floating);return h!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}},Nc=(e,t,n)=>{const r=new Map,o={platform:kc,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=fc(u,r,l),f=r,p={},h=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:$,y:g,data:w,reset:v}=await m({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});c=null!=$?$:c,d=null!=g?g:d,p={...p,[i]:{...p[i],...w}},v&&h<=50&&(h++,"object"==typeof v&&(v.placement&&(f=v.placement),v.rects&&(u=!0===v.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):v.rects),({x:c,y:d}=fc(u,f,l))),n=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Dc="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;function Fc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Fc(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Fc(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Lc(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Bc(e,t){const n=Lc(e);return Math.round(t*n)/n}function Hc(e){const t=r.useRef(e);return Dc((()=>{t.current=e})),t}const Vc=(e,t)=>({...Ac(e),options:[e,t]}),Gc=(e,t)=>({...Oc(e),options:[e,t]}),Uc=(e,t)=>({...Pc(e),options:[e,t]}),zc={...r},jc=zc.useInsertionEffect||(e=>e());function Wc(e){const t=r.useRef((()=>{}));return jc((()=>{t.current=e})),r.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}var Yc="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;let Kc=!1,qc=0;const Zc=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+qc++,Jc=zc.useId||function(){const[e,t]=r.useState((()=>Kc?Zc():void 0));return Yc((()=>{null==e&&t(Zc())}),[]),r.useEffect((()=>{Kc=!0}),[]),e};const Xc=r.createContext(null),Qc=r.createContext(null),ed="data-floating-ui-focusable";function td(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:o}=e,i=Jc(),s=r.useRef({}),[a]=r.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),l=null!=((null==(h=r.useContext(Xc))?void 0:h.id)||null),[u,c]=r.useState(o.reference),d=Wc(((e,t,r)=>{s.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)})),f=r.useMemo((()=>({setPositionReference:c})),[]),p=r.useMemo((()=>({reference:u||o.reference||null,floating:o.floating||null,domReference:o.reference})),[u,o.reference,o.floating]);var h;return r.useMemo((()=>({dataRef:s,open:t,onOpenChange:d,elements:p,events:a,floatingId:i,refs:f})),[t,d,p,a,i,f])}({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,i=o.elements,[s,a]=r.useState(null),[l,u]=r.useState(null),c=(null==i?void 0:i.domReference)||s,d=r.useRef(null),f=r.useContext(Qc);Yc((()=>{c&&(d.current=c)}),[c]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:a}={},transform:l=!0,whileElementsMounted:u,open:c}=e,[d,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=r.useState(o);Fc(p,o)||h(o);const[m,$]=r.useState(null),[g,w]=r.useState(null),v=r.useCallback((e=>{e!==_.current&&(_.current=e,$(e))}),[]),y=r.useCallback((e=>{e!==S.current&&(S.current=e,w(e))}),[]),b=s||m,x=a||g,_=r.useRef(null),S=r.useRef(null),E=r.useRef(d),C=null!=u,T=Hc(u),k=Hc(i),I=Hc(c),M=r.useCallback((()=>{if(!_.current||!S.current)return;const e={placement:t,strategy:n,middleware:p};k.current&&(e.platform=k.current),Nc(_.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==I.current};A.current&&!Fc(E.current,t)&&(E.current=t,r.flushSync((()=>{f(t)})))}))}),[p,t,n,k,I]);Dc((()=>{!1===c&&E.current.isPositioned&&(E.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[c]);const A=r.useRef(!1);Dc((()=>(A.current=!0,()=>{A.current=!1})),[]),Dc((()=>{if(b&&(_.current=b),x&&(S.current=x),b&&x){if(T.current)return T.current(b,x,M);M()}}),[b,x,M,T,C]);const R=r.useMemo((()=>({reference:_,floating:S,setReference:v,setFloating:y})),[v,y]),O=r.useMemo((()=>({reference:b,floating:x})),[b,x]),P=r.useMemo((()=>{const e={position:n,left:0,top:0};if(!O.floating)return e;const t=Bc(O.floating,d.x),r=Bc(O.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Lc(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,O.floating,d.x,d.y]);return r.useMemo((()=>({...d,update:M,refs:R,elements:O,floatingStyles:P})),[d,M,R,O,P])}({...e,elements:{...i,...l&&{reference:l}}}),h=r.useCallback((e=>{const t=Ju(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;u(t),p.refs.setReference(t)}),[p.refs]),m=r.useCallback((e=>{(Ju(e)||null===e)&&(d.current=e,a(e)),(Ju(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!Ju(e))&&p.refs.setReference(e)}),[p.refs]),$=r.useMemo((()=>({...p.refs,setReference:m,setPositionReference:h,domReference:d})),[p.refs,m,h]),g=r.useMemo((()=>({...p.elements,domReference:c})),[p.elements,c]),w=r.useMemo((()=>({...p,...o,refs:$,elements:g,nodeId:t})),[p,$,g,t,o]);return Yc((()=>{o.dataRef.current.floatingContext=w;const e=null==f?void 0:f.nodesRef.current.find((e=>e.id===t));e&&(e.context=w)})),r.useMemo((()=>({...p,context:w,refs:$,elements:g})),[p,$,g,w])}const nd="active",rd="selected";function od(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[nd]:t,[rd]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[ed]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var s;o&&[nd,rd].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(s=r.get(n))||s.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}function id(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}let sd=(0,r.createContext)({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});sd.displayName="FloatingContext";let ad=(0,r.createContext)(null);function ld({children:e,enabled:t=!0}){let[n,o]=(0,r.useState)(null),[i,s]=(0,r.useState)(0),a=(0,r.useRef)(null),[l,u]=(0,r.useState)(null);!function(e){Dl((()=>{if(!e)return;let t=new MutationObserver((()=>{let t=window.getComputedStyle(e).maxHeight,n=parseFloat(t);if(isNaN(n))return;let r=parseInt(t);isNaN(r)||n!==r&&(e.style.maxHeight=`${Math.ceil(n)}px`)}));return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}}),[e])}(l);let c=t&&null!==n&&null!==l,{to:d="bottom",gap:f=0,offset:p=0,padding:h=0,inner:m}=function(e,t){var n,r,o;let i=ud(null!=(n=null==e?void 0:e.gap)?n:"var(--anchor-gap, 0)",t),s=ud(null!=(r=null==e?void 0:e.offset)?r:"var(--anchor-offset, 0)",t),a=ud(null!=(o=null==e?void 0:e.padding)?o:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:s,padding:a}}(n,l),[$,g="center"]=d.split(" ");Dl((()=>{c&&s(0)}),[c]);let{refs:w,floatingStyles:v,context:y}=td({open:c,placement:"selection"===$?"center"===g?"bottom":`bottom-${g}`:"center"===g?`${$}`:`${$}-${g}`,strategy:"absolute",transform:!1,middleware:[Vc({mainAxis:"selection"===$?0:f,crossAxis:p}),(_={padding:h},{...Rc(_),options:[_,S]}),"selection"!==$&&Gc({padding:h}),"selection"===$&&m?(E={...m,padding:h,overflowRef:a,offset:i,minItemsVisible:4,referenceOverflowThreshold:h,onFallbackChange(e){var t,n;if(!e)return;let r=y.elements.floating;if(!r)return;let o=parseFloat(getComputedStyle(r).scrollPaddingBottom)||0,i=Math.min(4,r.childElementCount),a=0,l=0;for(let e of null!=(n=null==(t=y.elements.floating)?void 0:t.childNodes)?n:[])if(e instanceof HTMLElement){let t=e.offsetTop,n=t+e.clientHeight+o,s=r.scrollTop,u=s+r.clientHeight;if(!(t>=s&&n<=u)){l=Math.max(0,Math.min(n,u)-Math.max(t,s)),a=e.clientHeight;break}i--}i>=1&&s((e=>{let t=a*i-l+o;return e>=t?e:t}))}},{name:"inner",options:E,async fn(e){const{listRef:t,overflowRef:n,onFallbackChange:o,offset:i=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=Du(E,e),{rects:d,elements:{floating:f}}=e,p=t.current[s],h=(null==u?void 0:u.current)||f,m=f.clientTop||h.clientTop,$=0!==f.clientTop,g=0!==h.clientTop,w=f===h;if(!p)return{};const v={...e,...await Vc(-p.offsetTop-f.clientTop-d.reference.height/2-p.offsetHeight/2-i).fn(e)},y=await Mc(id(v,h.scrollHeight+m+f.clientTop),c),b=await Mc(v,{...c,elementContext:"reference"}),x=Iu(0,y.top),_=v.y+x,S=h.scrollHeight>h.clientHeight?e=>e:Mu,C=S(Iu(0,h.scrollHeight+($&&w||g?2*m:0)-x-Iu(0,y.bottom)));if(h.style.maxHeight=C+"px",h.scrollTop=x,o){const e=h.offsetHeight<p.offsetHeight*ku(a,t.current.length)-1||b.top>=-l||b.bottom>=-l;r.flushSync((()=>o(e)))}return n&&(n.current=await Mc(id({...v,y:_},h.offsetHeight+m+f.clientTop),c)),{y:_}}}):null,Uc({padding:h,apply({availableWidth:e,availableHeight:t,elements:n}){Object.assign(n.floating.style,{overflow:"auto",maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:Ic}),[b=$,x=g]=y.placement.split("-");var _,S,E;"selection"===$&&(b="selection");let C=(0,r.useMemo)((()=>({anchor:[b,x].filter(Boolean).join(" ")})),[b,x]),T=function(e,t){const{open:n,elements:o}=e,{enabled:i=!0,overflowRef:s,scrollRef:a,onChange:l}=t,u=Wc(l),c=r.useRef(!1),d=r.useRef(null),f=r.useRef(null);r.useEffect((()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||null==s.current)return;const n=e.deltaY,o=s.current.top>=-.5,i=s.current.bottom>=-.5,a=t.scrollHeight-t.clientHeight,l=n<0?-1:1,c=n<0?"max":"min";t.scrollHeight<=t.clientHeight||(!o&&n>0||!i&&n<0?(e.preventDefault(),r.flushSync((()=>{u((e=>e+Math[c](n,a*l)))}))):/firefox/i.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}())&&(t.scrollTop+=n))}const t=(null==a?void 0:a.current)||o.floating;return n&&t?(t.addEventListener("wheel",e),requestAnimationFrame((()=>{d.current=t.scrollTop,null!=s.current&&(f.current={...s.current})})),()=>{d.current=null,f.current=null,t.removeEventListener("wheel",e)}):void 0}),[i,n,o.floating,s,a,u]);const p=r.useMemo((()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const e=(null==a?void 0:a.current)||o.floating;if(s.current&&e&&c.current){if(null!==d.current){const t=e.scrollTop-d.current;(s.current.bottom<-.5&&t<-1||s.current.top<-.5&&t>1)&&r.flushSync((()=>u((e=>e+t))))}requestAnimationFrame((()=>{d.current=e.scrollTop}))}}})),[o.floating,u,s,a]);return r.useMemo((()=>i?{floating:p}:{}),[i,p])}(y,{overflowRef:a,onChange:s}),{getReferenceProps:k,getFloatingProps:I}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),o=e.map((e=>null==e?void 0:e.item)),i=r.useCallback((t=>od(t,e,"reference")),t),s=r.useCallback((t=>od(t,e,"floating")),n),a=r.useCallback((t=>od(t,e,"item")),o);return r.useMemo((()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:a})),[i,s,a])}([T]),M=Ll((e=>{u(e),w.setFloating(e)}));return r.createElement(ad.Provider,{value:o},r.createElement(sd.Provider,{value:{setFloating:M,setReference:w.setReference,styles:v,getReferenceProps:k,getFloatingProps:I,slot:C}},e))}function ud(e,t,n=void 0){let o=Nl(),i=Ll(((e,t)=>{if(null==e)return[n,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[n,null];let r=dd(e,t);return[r,n=>{let i=cd(e);{let s=i.map((e=>window.getComputedStyle(t).getPropertyValue(e)));o.requestAnimationFrame((function a(){o.nextFrame(a);let l=!1;for(let[e,n]of i.entries()){let r=window.getComputedStyle(t).getPropertyValue(n);if(s[e]!==r){s[e]=r,l=!0;break}}if(!l)return;let u=dd(e,t);r!==u&&(n(u),r=u)}))}return o.dispose}]}return[n,null]})),s=(0,r.useMemo)((()=>i(e,t)[0]),[e,t]),[a=s,l]=(0,r.useState)();return Dl((()=>{let[n,r]=i(e,t);if(l(n),r)return r(l)}),[e,t]),a}function cd(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(",");if(-1===e)return[t[1]];let n=t[1].slice(0,e).trim(),r=t[1].slice(e+1).trim();return r?[n,...cd(r)]:[n]}return[]}function dd(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}function fd(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))hd(n,pd(t,r),o);return n}function pd(e,t){return e?e+"["+t+"]":t}function hd(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())hd(e,pd(t,r.toString()),o);else n instanceof Date?e.push([t,n.toISOString()]):"boolean"==typeof n?e.push([t,n?"1":"0"]):"string"==typeof n?e.push([t,n]):"number"==typeof n?e.push([t,`${n}`]):null==n?e.push([t,""]):fd(n,t,e)}function md(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}ad.displayName="PlacementContext";var $d=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))($d||{}),gd=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(gd||{});function wd(){let e=function(){let e=(0,r.useRef)([]),t=(0,r.useCallback)((t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)}),[]);return(...n)=>{if(!n.every((e=>null==e)))return e.current=n,t}}();return(0,r.useCallback)((t=>function({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:s,mergeRefs:a}){a=null!=a?a:yd;let l=bd(t,e);if(i)return vd(l,n,r,s,a);let u=null!=o?o:0;if(2&u){let{static:e=!1,...t}=l;if(e)return vd(t,n,r,s,a)}if(1&u){let{unmount:e=!0,...t}=l;return Zl(e?0:1,{0:()=>null,1:()=>vd({...t,hidden:!0,style:{display:"none"}},n,r,s,a)})}return vd(l,n,r,s,a)}({mergeRefs:e,...t})),[e])}function vd(e,t={},n,o,i){let{as:s=n,children:a,refName:l="ref",...u}=Ed(e,["unmount","static"]),c=void 0!==e.ref?{[l]:e.ref}:{},d="function"==typeof a?a(t):a;"className"in u&&u.className&&"function"==typeof u.className&&(u.className=u.className(t)),u["aria-labelledby"]&&u["aria-labelledby"]===u.id&&(u["aria-labelledby"]=void 0);let f={};if(t){let e=!1,n=[];for(let[r,o]of Object.entries(t))"boolean"==typeof o&&(e=!0),!0===o&&n.push(r.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`)));if(e){f["data-headlessui-state"]=n.join(" ");for(let e of n)f[`data-${e}`]=""}}if(s===r.Fragment&&(Object.keys(Sd(u)).length>0||Object.keys(Sd(f)).length>0)){if((0,r.isValidElement)(d)&&!(Array.isArray(d)&&d.length>1)){let e=d.props,t=null==e?void 0:e.className,n="function"==typeof t?(...e)=>md(t(...e),u.className):md(t,u.className),o=n?{className:n}:{},s=bd(d.props,Sd(Ed(u,["ref"])));for(let e in f)e in s&&delete f[e];return(0,r.cloneElement)(d,Object.assign({},s,f,c,{ref:i(Cd(d),c.ref)},o))}if(Object.keys(Sd(u)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${o} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Sd(u)).concat(Object.keys(Sd(f))).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"))}return(0,r.createElement)(s,Object.assign({},Ed(u,["ref"]),s!==r.Fragment&&c,s!==r.Fragment&&f),d)}function yd(...e){return e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function bd(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])for(let e in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(n[e]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let e in n)Object.assign(t,{[e](t,...r){let o=n[e];for(let e of o){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function xd(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];for(let e in n)Object.assign(t,{[e](...t){let r=n[e];for(let e of r)null==e||e(...t)}});return t}function _d(e){var t;return Object.assign((0,r.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Sd(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function Ed(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function Cd(e){return r.default.version.split(".")[0]>="19"?e.props.ref:e.ref}var Td=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Td||{});let kd=_d((function(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":!(2&~r)||(null!=(n=o["aria-hidden"])?n:void 0),hidden:!(4&~r)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...!(4&~r)&&!!(2&~r)&&{display:"none"}}};return wd()({ourProps:i,theirProps:o,slot:{},defaultTag:"span",name:"Hidden"})})),Id=(0,r.createContext)(null);function Md({children:e}){let t=(0,r.useContext)(Id);if(!t)return r.default.createElement(r.default.Fragment,null,e);let{target:n}=t;return n?(0,r.createPortal)(r.default.createElement(r.default.Fragment,null,e),n):null}function Ad({data:e,form:t,disabled:n,onReset:o,overrides:i}){let[s,a]=(0,r.useState)(null),l=Nl();return(0,r.useEffect)((()=>{if(o&&s)return l.addEventListener(s,"reset",o)}),[s,t,o]),r.default.createElement(Md,null,r.default.createElement(Rd,{setForm:a,formId:t}),fd(e).map((([e,o])=>r.default.createElement(kd,{features:Td.Hidden,...Sd({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:e,value:o,...i})}))))}function Rd({setForm:e,formId:t}){return(0,r.useEffect)((()=>{if(t){let n=document.getElementById(t);n&&e(n)}}),[e,t]),t?null:r.default.createElement(kd,{features:Td.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest("form");n&&e(n)}})}function Od({children:e,freeze:t}){let n=Pd(t,e);return r.default.createElement(r.default.Fragment,null,n)}function Pd(e,t){let[n,o]=(0,r.useState)(t);return!e&&n!==t&&o(t),e?n:t}let Nd=(0,r.createContext)(void 0);function Dd(){return(0,r.useContext)(Nd)}let Fd=(0,r.createContext)(null);Fd.displayName="OpenClosedContext";var Ld=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ld||{});function Bd({value:e,children:t}){return r.default.createElement(Fd.Provider,{value:e},t)}let Hd=[];!function(){function e(){"loading"!==document.readyState&&((()=>{function e(e){if(!(e.target instanceof HTMLElement)||e.target===document.body||Hd[0]===e.target)return;let t=e.target;t=t.closest(Jl),Hd.unshift(null!=t?t:e.target),Hd=Hd.filter((e=>null!=e&&e.isConnected)),Hd.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})})(),document.removeEventListener("DOMContentLoaded",e))}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",e),e())}();var Vd=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Vd||{});function Gd(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=null!=r?r:-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:-1===o&&(o=n.length);for(let e=o-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=o+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}let Ud=(0,r.createContext)(null);function zd(){let e=(0,r.useContext)(Ud);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,zd),e}return e}Ud.displayName="DescriptionContext";let jd=_d((function(e,t){let n=(0,r.useId)(),o=Tu(),{id:i=`headlessui-description-${n}`,...s}=e,a=zd(),l=wu(t);Dl((()=>a.register(i)),[i,a.register]);let u=o||!1,c=(0,r.useMemo)((()=>({...a.slot,disabled:u})),[a.slot,u]),d={ref:l,...a.props,id:i};return wd()({ourProps:d,theirProps:s,slot:c,defaultTag:"p",name:a.name||"Description"})}));Object.assign(jd,{});var Wd=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Wd||{});let Yd=(0,r.createContext)(null);function Kd(){let e=(0,r.useContext)(Yd);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Kd),e}return e}function qd(e){var t,n,o;let i=null!=(n=null==(t=(0,r.useContext)(Yd))?void 0:t.value)?n:void 0;return(null!=(o=null==e?void 0:e.length)?o:0)>0?[i,...e].filter(Boolean).join(" "):i}Yd.displayName="LabelContext";let Zd=_d((function(e,t){var n;let o=(0,r.useId)(),i=Kd(),s=Dd(),a=Tu(),{id:l=`headlessui-label-${o}`,htmlFor:u=(null!=s?s:null==(n=i.props)?void 0:n.htmlFor),passive:c=!1,...d}=e,f=wu(t);Dl((()=>i.register(l)),[l,i.register]);let p=Ll((e=>{let t=e.currentTarget;if(t instanceof HTMLLabelElement&&e.preventDefault(),i.props&&"onClick"in i.props&&"function"==typeof i.props.onClick&&i.props.onClick(e),t instanceof HTMLLabelElement){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let n=e.getAttribute("aria-disabled");if("true"===n||""===n)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}})),h=a||!1,m=(0,r.useMemo)((()=>({...i.slot,disabled:h})),[i.slot,h]),$={ref:f,...i.props,id:l,htmlFor:u,onClick:p};return c&&("onClick"in $&&(delete $.htmlFor,delete $.onClick),"onClick"in d&&delete d.onClick),wd()({ourProps:$,theirProps:d,slot:m,defaultTag:u?"label":"div",name:i.name||"Label"})})),Jd=Object.assign(Zd,{});var Xd,Qd=((Xd=Qd||{})[Xd.Left=0]="Left",Xd[Xd.Right=2]="Right",Xd);let ef=(0,r.createContext)(!1);let tf=r.Fragment,nf=_d((function(e,t){let n=e,o=(0,r.useRef)(null),i=wu(function(e,t=!0){return Object.assign(e,{[gu]:t})}((e=>{o.current=e})),t),s=cu(o),a=function(e){let t=(0,r.useContext)(ef),n=(0,r.useContext)(of),o=cu(e),[i,s]=(0,r.useState)((()=>{var e;if(!t&&null!==n)return null!=(e=n.current)?e:null;if(Al.isServer)return null;let r=null==o?void 0:o.getElementById("headlessui-portal-root");if(r)return r;if(null===o)return null;let i=o.createElement("div");return i.setAttribute("id","headlessui-portal-root"),o.body.appendChild(i)}));return(0,r.useEffect)((()=>{null!==i&&(null!=o&&o.body.contains(i)||null==o||o.body.appendChild(i))}),[i,o]),(0,r.useEffect)((()=>{t||null!==n&&s(n.current)}),[n,s,t]),i}(o),[l]=(0,r.useState)((()=>{var e;return Al.isServer?null:null!=(e=null==s?void 0:s.createElement("div"))?e:null})),u=(0,r.useContext)(sf),c=function(){let e=function(){let e="undefined"==typeof document;return(e=>e.useSyncExternalStore)(r)((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=r.useState(Al.isHandoffComplete);return t&&!1===Al.isHandoffComplete&&n(!1),r.useEffect((()=>{!0!==t&&n(!0)}),[t]),r.useEffect((()=>Al.handoff()),[]),!e&&t}();Dl((()=>{!a||!l||a.contains(l)||(l.setAttribute("data-headlessui-portal",""),a.appendChild(l))}),[a,l]),Dl((()=>{if(l&&u)return u.register(l)}),[u,l]),function(e){let t=Ll(e),n=(0,r.useRef)(!1);(0,r.useEffect)((()=>(n.current=!1,()=>{n.current=!0,Ol((()=>{n.current&&t()}))})),[t])}((()=>{var e;!a||!l||(l instanceof Node&&a.contains(l)&&a.removeChild(l),a.childNodes.length<=0&&(null==(e=a.parentElement)||e.removeChild(a)))}));let d=wd();return c&&a&&l?(0,r.createPortal)(d({ourProps:{ref:i},theirProps:n,slot:{},defaultTag:tf,name:"Portal"}),l):null})),rf=r.Fragment,of=(0,r.createContext)(null),sf=(0,r.createContext)(null),af=_d((function(e,t){let n=wu(t),{enabled:o=!0,...i}=e,s=wd();return o?r.default.createElement(nf,{...i,ref:n}):s({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:tf,name:"Portal"})})),lf=_d((function(e,t){let{target:n,...o}=e,i={ref:wu(t)},s=wd();return r.default.createElement(of.Provider,{value:n},s({ourProps:i,theirProps:o,defaultTag:rf,name:"Popover.Group"}))})),uf=Object.assign(af,{Group:lf});var cf,df=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(df||{}),ff=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(ff||{}),pf=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(pf||{}),hf=((cf=hf||{})[cf.OpenCombobox=0]="OpenCombobox",cf[cf.CloseCombobox=1]="CloseCombobox",cf[cf.GoToOption=2]="GoToOption",cf[cf.SetTyping=3]="SetTyping",cf[cf.RegisterOption=4]="RegisterOption",cf[cf.UnregisterOption=5]="UnregisterOption",cf[cf.SetActivationTrigger=6]="SetActivationTrigger",cf[cf.UpdateVirtualConfiguration=7]="UpdateVirtualConfiguration",cf[cf.SetInputElement=8]="SetInputElement",cf[cf.SetButtonElement=9]="SetButtonElement",cf[cf.SetOptionsElement=10]="SetOptionsElement",cf);function mf(e,t=e=>e){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=t(e.options.slice()),o=r.length>0&&null!==r[0].dataRef.current.order?r.sort(((e,t)=>e.dataRef.current.order-t.dataRef.current.order)):function(e,t=e=>e){return e.slice().sort(((e,n)=>{let r=t(e),o=t(n);if(null===r||null===o)return 0;let i=r.compareDocumentPosition(o);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}(r,(e=>e.dataRef.current.domRef.current)),i=n?o.indexOf(n):null;return-1===i&&(i=null),{options:o,activeOptionIndex:i}}let $f={1(e){var t;return null!=(t=e.dataRef.current)&&t.disabled||1===e.comboboxState?e:{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,__demoMode:!1}},0(e){var t,n;if(null!=(t=e.dataRef.current)&&t.disabled||0===e.comboboxState)return e;if(null!=(n=e.dataRef.current)&&n.value){let t=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(-1!==t)return{...e,activeOptionIndex:t,comboboxState:0,__demoMode:!1}}return{...e,comboboxState:0,__demoMode:!1}},3:(e,t)=>e.isTyping===t.isTyping?e:{...e,isTyping:t.isTyping},2(e,t){var n,r,o,i;if(null!=(n=e.dataRef.current)&&n.disabled||e.optionsElement&&(null==(r=e.dataRef.current)||!r.optionsPropsRef.current.static)&&1===e.comboboxState)return e;if(e.virtual){let{options:n,disabled:r}=e.virtual,i=t.focus===Vd.Specific?t.idx:Gd(t,{resolveItems:()=>n,resolveActiveIndex:()=>{var t,o;return null!=(o=null!=(t=e.activeOptionIndex)?t:n.findIndex((e=>!r(e))))?o:null},resolveDisabled:r,resolveId(){throw new Error("Function not implemented.")}}),s=null!=(o=t.trigger)?o:2;return e.activeOptionIndex===i&&e.activationTrigger===s?e:{...e,activeOptionIndex:i,activationTrigger:s,isTyping:!1,__demoMode:!1}}let s=mf(e);if(null===s.activeOptionIndex){let e=s.options.findIndex((e=>!e.dataRef.current.disabled));-1!==e&&(s.activeOptionIndex=e)}let a=t.focus===Vd.Specific?t.idx:Gd(t,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled}),l=null!=(i=t.trigger)?i:2;return e.activeOptionIndex===a&&e.activationTrigger===l?e:{...e,...s,isTyping:!1,activeOptionIndex:a,activationTrigger:l,__demoMode:!1}},4:(e,t)=>{var n,r,o;if(null!=(n=e.dataRef.current)&&n.virtual)return{...e,options:[...e.options,t.payload]};let i=t.payload,s=mf(e,(e=>(e.push(i),e)));null===e.activeOptionIndex&&null!=(r=e.dataRef.current)&&r.isSelected(t.payload.dataRef.current.value)&&(s.activeOptionIndex=s.options.indexOf(i));let a={...e,...s,activationTrigger:2};return null!=(o=e.dataRef.current)&&o.__demoMode&&void 0===e.dataRef.current.value&&(a.activeOptionIndex=0),a},5:(e,t)=>{var n;if(null!=(n=e.dataRef.current)&&n.virtual)return{...e,options:e.options.filter((e=>e.id!==t.id))};let r=mf(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...r,activationTrigger:2}},6:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},7:(e,t)=>{var n,r;if(null===e.virtual)return{...e,virtual:{options:t.options,disabled:null!=(n=t.disabled)?n:()=>!1}};if(e.virtual.options===t.options&&e.virtual.disabled===t.disabled)return e;let o=e.activeOptionIndex;if(null!==e.activeOptionIndex){let n=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);o=-1!==n?n:null}return{...e,activeOptionIndex:o,virtual:{options:t.options,disabled:null!=(r=t.disabled)?r:()=>!1}}},8:(e,t)=>e.inputElement===t.element?e:{...e,inputElement:t.element},9:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},10:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},gf=(0,r.createContext)(null);function wf(e){let t=(0,r.useContext)(gf);if(null===t){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,wf),t}return t}gf.displayName="ComboboxActionsContext";let vf=(0,r.createContext)(null);function yf(e){let t=xf("VirtualProvider"),{options:n}=t.virtual,[o,i]=(0,r.useMemo)((()=>{let e=t.optionsElement;if(!e)return[0,0];let n=window.getComputedStyle(e);return[parseFloat(n.paddingBlockStart||n.paddingTop),parseFloat(n.paddingBlockEnd||n.paddingBottom)]}),[t.optionsElement]),s=(u={enabled:0!==n.length,scrollPaddingStart:o,scrollPaddingEnd:i,count:n.length,estimateSize:()=>40,getScrollElement:()=>t.optionsElement,overscan:12},function(e){const t=r.useReducer((()=>({})),{})[1],n={...e,onChange:(n,o)=>{var i;o?(0,r.flushSync)(t):t(),null==(i=e.onChange)||i.call(e,n,o)}},[o]=r.useState((()=>new Cl(n)));return o.setOptions(n),r.useEffect((()=>o._didMount()),[]),kl((()=>o._willUpdate())),o}({observeElementRect:yl,observeElementOffset:_l,scrollToFn:El,...u})),[a,l]=(0,r.useState)(0);var u;Dl((()=>{l((e=>e+1))}),[n]);let c=s.getVirtualItems();return 0===c.length?null:r.default.createElement(vf.Provider,{value:s},r.default.createElement("div",{style:{position:"relative",width:"100%",height:`${s.getTotalSize()}px`},ref:e=>{e&&0!==t.activationTrigger&&null!==t.activeOptionIndex&&n.length>t.activeOptionIndex&&s.scrollToIndex(t.activeOptionIndex)}},c.map((t=>{var o;return r.default.createElement(r.Fragment,{key:t.key},r.default.cloneElement(null==(o=e.children)?void 0:o.call(e,{...e.slot,option:n[t.index]}),{key:`${a}-${t.key}`,"data-index":t.index,"aria-setsize":n.length,"aria-posinset":t.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${t.start}px)`,overflowAnchor:"none"}}))}))))}let bf=(0,r.createContext)(null);function xf(e){let t=(0,r.useContext)(bf);if(null===t){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,xf),t}return t}function _f(e,t){return Zl(t.type,$f,e,t)}bf.displayName="ComboboxDataContext";let Sf=r.Fragment,Ef=$d.RenderStrategy|$d.Static,Cf=_d((function(e,t){var n,o;let i=Tu(),{value:s,defaultValue:a,onChange:l,form:u,name:c,by:d,disabled:f=i||!1,onClose:p,__demoMode:h=!1,multiple:m=!1,immediate:$=!1,virtual:g=null,nullable:w,...v}=e,y=function(e){let[t]=(0,r.useState)(e);return t}(a),[b=(m?[]:void 0),x]=function(e,t,n){let[o,i]=(0,r.useState)(n),s=void 0!==e,a=(0,r.useRef)(s),l=(0,r.useRef)(!1),u=(0,r.useRef)(!1);return!s||a.current||l.current?!s&&a.current&&!u.current&&(u.current=!0,a.current=s,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(l.current=!0,a.current=s,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[s?e:o,Ll((e=>(s||i(e),null==t?void 0:t(e))))]}(s,l,y),[_,S]=(0,r.useReducer)(_f,{dataRef:(0,r.createRef)(),comboboxState:h?0:1,isTyping:!1,options:[],virtual:g?{options:g.options,disabled:null!=(n=g.disabled)?n:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:h}),E=(0,r.useRef)(!1),C=(0,r.useRef)({static:!1,hold:!1}),T=function(e=Bl){return(0,r.useCallback)(((t,n)=>{if("string"==typeof e){let r=e;return(null==t?void 0:t[r])===(null==n?void 0:n[r])}return e(t,n)}),[e])}(d),k=Ll((e=>g?null===d?g.options.indexOf(e):g.options.findIndex((t=>T(t,e))):_.options.findIndex((t=>T(t.dataRef.current.value,e))))),I=(0,r.useCallback)((e=>Zl(A.mode,{1:()=>b.some((t=>T(t,e))),0:()=>T(b,e)})),[b]),M=Ll((e=>_.activeOptionIndex===k(e))),A=(0,r.useMemo)((()=>({..._,immediate:$,optionsPropsRef:C,value:b,defaultValue:y,disabled:f,mode:m?1:0,virtual:g?_.virtual:null,get activeOptionIndex(){if(E.current&&null===_.activeOptionIndex&&(g?g.options.length>0:_.options.length>0)){if(g){let e=g.options.findIndex((e=>{var t,n;return!(null!=(n=null==(t=g.disabled)?void 0:t.call(g,e))&&n)}));if(-1!==e)return e}let e=_.options.findIndex((e=>!e.dataRef.current.disabled));if(-1!==e)return e}return _.activeOptionIndex},calculateIndex:k,compare:T,isSelected:I,isActive:M})),[b,y,f,m,h,_,g]);Dl((()=>{var e;g&&S({type:7,options:g.options,disabled:null!=(e=g.disabled)?e:null})}),[g,null==g?void 0:g.options,null==g?void 0:g.disabled]),Dl((()=>{_.dataRef.current=A}),[A]),uu(0===A.comboboxState,[A.buttonElement,A.inputElement,A.optionsElement],(()=>z.closeCombobox()));let R=(0,r.useMemo)((()=>{var e,t,n;return{open:0===A.comboboxState,disabled:f,activeIndex:A.activeOptionIndex,activeOption:null===A.activeOptionIndex?null:A.virtual?A.virtual.options[null!=(e=A.activeOptionIndex)?e:0]:null!=(n=null==(t=A.options[A.activeOptionIndex])?void 0:t.dataRef.current.value)?n:null,value:b}}),[A,f,b]),O=Ll((()=>{if(null!==A.activeOptionIndex){if(z.setIsTyping(!1),A.virtual)B(A.virtual.options[A.activeOptionIndex]);else{let{dataRef:e}=A.options[A.activeOptionIndex];B(e.current.value)}z.goToOption(Vd.Specific,A.activeOptionIndex)}})),P=Ll((()=>{S({type:0}),E.current=!0})),N=Ll((()=>{S({type:1}),E.current=!1,null==p||p()})),D=Ll((e=>{S({type:3,isTyping:e})})),F=Ll(((e,t,n)=>(E.current=!1,e===Vd.Specific?S({type:2,focus:Vd.Specific,idx:t,trigger:n}):S({type:2,focus:e,trigger:n})))),L=Ll(((e,t)=>(S({type:4,payload:{id:e,dataRef:t}}),()=>{A.isActive(t.current.value)&&(E.current=!0),S({type:5,id:e})}))),B=Ll((e=>Zl(A.mode,{0:()=>null==x?void 0:x(e),1(){let t=A.value.slice(),n=t.findIndex((t=>T(t,e)));return-1===n?t.push(e):t.splice(n,1),null==x?void 0:x(t)}}))),H=Ll((e=>{S({type:6,trigger:e})})),V=Ll((e=>{S({type:8,element:e})})),G=Ll((e=>{S({type:9,element:e})})),U=Ll((e=>{S({type:10,element:e})})),z=(0,r.useMemo)((()=>({onChange:B,registerOption:L,goToOption:F,setIsTyping:D,closeCombobox:N,openCombobox:P,setActivationTrigger:H,selectActiveOption:O,setInputElement:V,setButtonElement:G,setOptionsElement:U})),[]),[j,W]=function({inherit:e=!1}={}){let t=qd(),[n,o]=(0,r.useState)([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,(0,r.useMemo)((()=>function(e){let t=Ll((e=>(o((t=>[...t,e])),()=>o((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),n=(0,r.useMemo)((()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value})),[t,e.slot,e.name,e.props,e.value]);return r.default.createElement(Yd.Provider,{value:n},e.children)}),[o])]}(),Y=null===t?{}:{ref:t},K=(0,r.useCallback)((()=>{if(void 0!==y)return null==x?void 0:x(y)}),[x,y]),q=wd();return r.default.createElement(W,{value:j,props:{htmlFor:null==(o=A.inputElement)?void 0:o.id},slot:{open:0===A.comboboxState,disabled:f}},r.default.createElement(ld,null,r.default.createElement(gf.Provider,{value:z},r.default.createElement(bf.Provider,{value:A},r.default.createElement(Bd,{value:Zl(A.comboboxState,{0:Ld.Open,1:Ld.Closed})},null!=c&&r.default.createElement(Ad,{disabled:f,data:null!=b?{[c]:b}:{},form:u,onReset:K}),q({ourProps:Y,theirProps:v,slot:R,defaultTag:Sf,name:"Combobox"}))))))})),Tf=_d((function(e,t){var n;let o=xf("Combobox.Button"),i=wf("Combobox.Button"),s=wu(t,i.setButtonElement),a=(0,r.useId)(),{id:l=`headlessui-combobox-button-${a}`,disabled:u=o.disabled||!1,autoFocus:c=!1,...d}=e,f=du(o.inputElement),p=Ll((e=>{switch(e.key){case Wd.Space:case Wd.Enter:return e.preventDefault(),e.stopPropagation(),1===o.comboboxState&&(0,r.flushSync)((()=>i.openCombobox())),void f();case Wd.ArrowDown:return e.preventDefault(),e.stopPropagation(),1===o.comboboxState&&((0,r.flushSync)((()=>i.openCombobox())),o.value||i.goToOption(Vd.First)),void f();case Wd.ArrowUp:return e.preventDefault(),e.stopPropagation(),1===o.comboboxState&&((0,r.flushSync)((()=>i.openCombobox())),o.value||i.goToOption(Vd.Last)),void f();case Wd.Escape:if(0!==o.comboboxState)return;return e.preventDefault(),o.optionsElement&&!o.optionsPropsRef.current.static&&e.stopPropagation(),(0,r.flushSync)((()=>i.closeCombobox())),void f();default:return}})),h=Ll((e=>{e.preventDefault(),!function(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}(e.currentTarget)&&(e.button===Qd.Left&&(0===o.comboboxState?i.closeCombobox():i.openCombobox()),f())})),m=qd([l]),{isFocusVisible:$,focusProps:g}=ll({autoFocus:c}),{isHovered:w,hoverProps:v}=hl({isDisabled:u}),{pressed:y,pressProps:b}=function({disabled:e=!1}={}){let t=(0,r.useRef)(null),[n,o]=(0,r.useState)(!1),i=Nl(),s=Ll((()=>{t.current=null,o(!1),i.dispose()})),a=Ll((e=>{if(i.dispose(),null===t.current){t.current=e.currentTarget,o(!0);{let n=Rl(e.currentTarget);i.addEventListener(n,"pointerup",s,!1),i.addEventListener(n,"pointermove",(e=>{if(t.current){let n=function(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}(e);o(function(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}(n,t.current.getBoundingClientRect()))}}),!1),i.addEventListener(n,"pointercancel",s,!1)}}}));return{pressed:n,pressProps:e?{}:{onPointerDown:a,onPointerUp:s,onClick:s}}}({disabled:u}),x=(0,r.useMemo)((()=>({open:0===o.comboboxState,active:y||0===o.comboboxState,disabled:u,value:o.value,hover:w,focus:$})),[o,w,$,y,u]),_=xd({ref:s,id:l,type:fu(e,o.buttonElement),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":null==(n=o.optionsElement)?void 0:n.id,"aria-expanded":0===o.comboboxState,"aria-labelledby":m,disabled:u||void 0,autoFocus:c,onMouseDown:h,onKeyDown:p},g,v,b);return wd()({ourProps:_,theirProps:d,slot:x,defaultTag:"button",name:"Combobox.Button"})})),kf=_d((function(e,t){var n,o,i,s,a;let l=xf("Combobox.Input"),u=wf("Combobox.Input"),c=(0,r.useId)(),d=Dd(),{id:f=d||`headlessui-combobox-input-${c}`,onChange:p,displayValue:h,disabled:m=l.disabled||!1,autoFocus:$=!1,type:g="text",...w}=e,v=(0,r.useRef)(null),y=wu(v,t,(0,r.useContext)(sd).setReference,u.setInputElement),b=cu(l.inputElement),x=Nl(),_=Ll((()=>{u.onChange(null),l.optionsElement&&(l.optionsElement.scrollTop=0),u.goToOption(Vd.Nothing)})),S=(0,r.useMemo)((()=>{var e;return"function"==typeof h&&void 0!==l.value?null!=(e=h(l.value))?e:"":"string"==typeof l.value?l.value:""}),[l.value,h]);Eu((([e,t],[n,r])=>{if(l.isTyping)return;let o=v.current;o&&((0===r&&1===t||e!==n)&&(o.value=e),requestAnimationFrame((()=>{if(l.isTyping||!o||(null==b?void 0:b.activeElement)!==o)return;let{selectionStart:e,selectionEnd:t}=o;0===Math.abs((null!=t?t:0)-(null!=e?e:0))&&0===e&&o.setSelectionRange(o.value.length,o.value.length)})))}),[S,l.comboboxState,b,l.isTyping]),Eu((([e],[t])=>{if(0===e&&1===t){if(l.isTyping)return;let e=v.current;if(!e)return;let t=e.value,{selectionStart:n,selectionEnd:r,selectionDirection:o}=e;e.value="",e.value=t,null!==o?e.setSelectionRange(n,r,o):e.setSelectionRange(n,r)}}),[l.comboboxState]);let E=(0,r.useRef)(!1),C=Ll((()=>{E.current=!0})),T=Ll((()=>{x.nextFrame((()=>{E.current=!1}))})),k=Ll((e=>{switch(u.setIsTyping(!0),e.key){case Wd.Enter:if(0!==l.comboboxState||E.current)return;if(e.preventDefault(),e.stopPropagation(),null===l.activeOptionIndex)return void u.closeCombobox();u.selectActiveOption(),0===l.mode&&u.closeCombobox();break;case Wd.ArrowDown:return e.preventDefault(),e.stopPropagation(),Zl(l.comboboxState,{0:()=>u.goToOption(Vd.Next),1:()=>u.openCombobox()});case Wd.ArrowUp:return e.preventDefault(),e.stopPropagation(),Zl(l.comboboxState,{0:()=>u.goToOption(Vd.Previous),1:()=>{(0,r.flushSync)((()=>u.openCombobox())),l.value||u.goToOption(Vd.Last)}});case Wd.Home:if(e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),u.goToOption(Vd.First);case Wd.PageUp:return e.preventDefault(),e.stopPropagation(),u.goToOption(Vd.First);case Wd.End:if(e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),u.goToOption(Vd.Last);case Wd.PageDown:return e.preventDefault(),e.stopPropagation(),u.goToOption(Vd.Last);case Wd.Escape:return 0!==l.comboboxState?void 0:(e.preventDefault(),l.optionsElement&&!l.optionsPropsRef.current.static&&e.stopPropagation(),0===l.mode&&null===l.value&&_(),u.closeCombobox());case Wd.Tab:if(0!==l.comboboxState)return;0===l.mode&&1!==l.activationTrigger&&u.selectActiveOption(),u.closeCombobox()}})),I=Ll((e=>{null==p||p(e),0===l.mode&&""===e.target.value&&_(),u.openCombobox()})),M=Ll((e=>{var t,n,r;let o=null!=(t=e.relatedTarget)?t:Hd.find((t=>t!==e.currentTarget));if(!(null!=(n=l.optionsElement)&&n.contains(o)||null!=(r=l.buttonElement)&&r.contains(o)||0!==l.comboboxState))return e.preventDefault(),0===l.mode&&null===l.value&&_(),u.closeCombobox()})),A=Ll((e=>{var t,n,o;let i=null!=(t=e.relatedTarget)?t:Hd.find((t=>t!==e.currentTarget));null!=(n=l.buttonElement)&&n.contains(i)||null!=(o=l.optionsElement)&&o.contains(i)||l.disabled||l.immediate&&0!==l.comboboxState&&x.microTask((()=>{(0,r.flushSync)((()=>u.openCombobox())),u.setActivationTrigger(1)}))})),R=qd(),O=function(){var e,t;return null!=(t=null==(e=(0,r.useContext)(Ud))?void 0:e.value)?t:void 0}(),{isFocused:P,focusProps:N}=ll({autoFocus:$}),{isHovered:D,hoverProps:F}=hl({isDisabled:m}),L=(0,r.useMemo)((()=>({open:0===l.comboboxState,disabled:m,hover:D,focus:P,autofocus:$})),[l,D,P,$,m]),B=xd({ref:y,id:f,role:"combobox",type:g,"aria-controls":null==(n=l.optionsElement)?void 0:n.id,"aria-expanded":0===l.comboboxState,"aria-activedescendant":null===l.activeOptionIndex?void 0:l.virtual?null==(o=l.options.find((e=>!e.dataRef.current.disabled&&l.compare(e.dataRef.current.value,l.virtual.options[l.activeOptionIndex]))))?void 0:o.id:null==(i=l.options[l.activeOptionIndex])?void 0:i.id,"aria-labelledby":R,"aria-describedby":O,"aria-autocomplete":"list",defaultValue:null!=(a=null!=(s=e.defaultValue)?s:void 0!==l.defaultValue?null==h?void 0:h(l.defaultValue):null)?a:l.defaultValue,disabled:m||void 0,autoFocus:$,onCompositionStart:C,onCompositionEnd:T,onKeyDown:k,onChange:I,onFocus:A,onBlur:M},N,F);return wd()({ourProps:B,theirProps:w,slot:L,defaultTag:"input",name:"Combobox.Input"})})),If=Jd,Mf=_d((function(e,t){var n,o,i;let s=(0,r.useId)(),{id:a=`headlessui-combobox-options-${s}`,hold:l=!1,anchor:u,portal:c=!1,modal:d=!0,transition:f=!1,...p}=e,h=xf("Combobox.Options"),m=wf("Combobox.Options"),$=function(e){return(0,r.useMemo)((()=>e?"string"==typeof e?{to:e}:e:null),[e])}(u);$&&(c=!0);let[g,w]=function(e=null){!1===e&&(e=null),"string"==typeof e&&(e={to:e});let t=(0,r.useContext)(ad),n=(0,r.useMemo)((()=>e),[JSON.stringify(e,((e,t)=>{var n;return null!=(n=null==t?void 0:t.outerHTML)?n:t}))]);Dl((()=>{null==t||t(null!=n?n:null)}),[t,n]);let o=(0,r.useContext)(sd);return(0,r.useMemo)((()=>[o.setFloating,e?o.styles:{}]),[o.setFloating,e,o.styles])}($),[v,y]=(0,r.useState)(null),b=function(){let{getFloatingProps:e,slot:t}=(0,r.useContext)(sd);return(0,r.useCallback)(((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor})),[e,t])}(),x=wu(t,$?g:null,m.setOptionsElement,y),_=cu(h.optionsElement),S=(0,r.useContext)(Fd),[E,C]=function(e,t,n,o){let[i,s]=(0,r.useState)(n),{hasFlag:a,addFlag:l,removeFlag:u}=function(e=0){let[t,n]=(0,r.useState)(e),o=(0,r.useCallback)((e=>n(e)),[t]),i=(0,r.useCallback)((e=>n((t=>t|e))),[t]),s=(0,r.useCallback)((e=>(t&e)===e),[t]),a=(0,r.useCallback)((e=>n((t=>t&~e))),[n]),l=(0,r.useCallback)((e=>n((t=>t^e))),[n]);return{flags:t,setFlag:o,addFlag:i,hasFlag:s,removeFlag:a,toggleFlag:l}}(e&&i?3:0),c=(0,r.useRef)(!1),d=(0,r.useRef)(!1),f=Nl();return Dl((()=>{var r;if(e)return n&&s(!0),t?(null==(r=null==o?void 0:o.start)||r.call(o,n),function(e,{prepare:t,run:n,done:r,inFlight:o}){let i=Pl();return function(e,{inFlight:t,prepare:n}){if(null!=t&&t.current)return void n();let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}(e,{prepare:t,inFlight:o}),i.nextFrame((()=>{n(),i.requestAnimationFrame((()=>{i.add(function(e,t){var n,r;let o=Pl();if(!e)return o.dispose;let i=!1;o.add((()=>{i=!0}));let s=null!=(r=null==(n=e.getAnimations)?void 0:n.call(e).filter((e=>e instanceof CSSTransition)))?r:[];return 0===s.length?(t(),o.dispose):(Promise.allSettled(s.map((e=>e.finished))).then((()=>{i||t()})),o.dispose)}(e,r))}))})),i.dispose}(t,{inFlight:c,prepare(){d.current?d.current=!1:d.current=c.current,c.current=!0,!d.current&&(n?(l(3),u(4)):(l(4),u(2)))},run(){d.current?n?(u(3),l(4)):(u(4),l(3)):n?u(1):l(1)},done(){var e;d.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(c.current=!1,u(7),n||s(!1),null==(e=null==o?void 0:o.end)||e.call(o,n))}})):void(n&&l(3))}),[e,n,t,f]),e?[i,{closed:a(1),enter:a(2),leave:a(4),transition:a(2)||a(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}(f,v,null!==S?(S&Ld.Open)===Ld.Open:0===h.comboboxState);!function(e,t,n){let o=Fl((e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&n()}));(0,r.useEffect)((()=>{if(!e)return;let n=null===t?null:t instanceof HTMLElement?t:t.current;if(!n)return;let r=Pl();if("undefined"!=typeof ResizeObserver){let e=new ResizeObserver((()=>o.current(n)));e.observe(n),r.add((()=>e.disconnect()))}if("undefined"!=typeof IntersectionObserver){let e=new IntersectionObserver((()=>o.current(n)));e.observe(n),r.add((()=>e.disconnect()))}return()=>r.dispose()}),[t,o,e])}(E,h.inputElement,m.closeCombobox),$u(!h.__demoMode&&d&&0===h.comboboxState,_),ql(!h.__demoMode&&d&&0===h.comboboxState,{allowed:(0,r.useCallback)((()=>[h.inputElement,h.buttonElement,h.optionsElement]),[h.inputElement,h.buttonElement,h.optionsElement])}),Dl((()=>{var t;h.optionsPropsRef.current.static=null!=(t=e.static)&&t}),[h.optionsPropsRef,e.static]),Dl((()=>{h.optionsPropsRef.current.hold=l}),[h.optionsPropsRef,l]),function(e,{container:t,accept:n,walk:o}){let i=(0,r.useRef)(n),s=(0,r.useRef)(o);(0,r.useEffect)((()=>{i.current=n,s.current=o}),[n,o]),Dl((()=>{if(!t||!e)return;let n=Rl(t);if(!n)return;let r=i.current,o=s.current,a=Object.assign((e=>r(e)),{acceptNode:r}),l=n.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,a,!1);for(;l.nextNode();)o(l.currentNode)}),[t,e,i,s])}(0===h.comboboxState,{container:h.optionsElement,accept:e=>"option"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let T=qd([null==(n=h.buttonElement)?void 0:n.id]),k=(0,r.useMemo)((()=>({open:0===h.comboboxState,option:void 0})),[h.comboboxState]),I=Ll((()=>{m.setActivationTrigger(0)})),M=Ll((e=>{e.preventDefault(),m.setActivationTrigger(0)})),A=xd($?b():{},{"aria-labelledby":T,role:"listbox","aria-multiselectable":1===h.mode||void 0,id:a,ref:x,style:{...p.style,...w,"--input-width":Hl(h.inputElement,!0).width,"--button-width":Hl(h.buttonElement,!0).width},onWheel:0===h.activationTrigger?void 0:I,onMouseDown:M,...Su(C)}),R=E&&1===h.comboboxState,O=Pd(R,null==(o=h.virtual)?void 0:o.options),P=Pd(R,h.value),N=Ll((e=>h.compare(P,e)));if(h.virtual){if(void 0===O)throw new Error("Missing `options` in virtual mode");Object.assign(p,{children:r.default.createElement(bf.Provider,{value:O!==h.virtual.options?{...h,virtual:{...h.virtual,options:O}}:h},r.default.createElement(yf,{slot:k},p.children))})}let D=wd();return r.default.createElement(uf,{enabled:!!c&&(e.static||E)},r.default.createElement(bf.Provider,{value:1===h.mode?h:{...h,isSelected:N}},D({ourProps:A,theirProps:{...p,children:r.default.createElement(Od,{freeze:R},"function"==typeof p.children?null==(i=p.children)?void 0:i.call(p,k):p.children)},slot:k,defaultTag:"div",features:Ef,visible:E,name:"Combobox.Options"})))})),Af=_d((function(e,t){var n,o,i,s;let a=xf("Combobox.Option"),l=wf("Combobox.Option"),u=(0,r.useId)(),{id:c=`headlessui-combobox-option-${u}`,value:d,disabled:f=null!=(i=null==(o=null==(n=a.virtual)?void 0:n.disabled)?void 0:o.call(n,d))&&i,order:p=null,...h}=e,m=du(a.inputElement),$=a.virtual?a.activeOptionIndex===a.calculateIndex(d):null!==a.activeOptionIndex&&(null==(s=a.options[a.activeOptionIndex])?void 0:s.id)===c,g=a.isSelected(d),w=(0,r.useRef)(null),v=Fl({disabled:f,value:d,domRef:w,order:p}),y=(0,r.useContext)(vf),b=wu(t,w,y?y.measureElement:null),x=Ll((()=>{l.setIsTyping(!1),l.onChange(d)}));Dl((()=>l.registerOption(c,v)),[v,c]);let _=(0,r.useRef)(!(a.virtual||a.__demoMode));Dl((()=>{if(!a.virtual&&!a.__demoMode)return Pl().requestAnimationFrame((()=>{_.current=!0}))}),[a.virtual,a.__demoMode]),Dl((()=>{if(_.current&&0===a.comboboxState&&$&&0!==a.activationTrigger)return Pl().requestAnimationFrame((()=>{var e,t;null==(t=null==(e=w.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}))}),[w,$,a.comboboxState,a.activationTrigger,a.activeOptionIndex]);let S=Ll((e=>{e.preventDefault(),e.button===Qd.Left&&(f||(x(),au()||requestAnimationFrame((()=>m())),0===a.mode&&l.closeCombobox()))})),E=Ll((()=>{if(f)return l.goToOption(Vd.Nothing);let e=a.calculateIndex(d);l.goToOption(Vd.Specific,e)})),C=function(){let e=(0,r.useRef)([-1,-1]);return{wasMoved(t){let n=vu(t);return(e.current[0]!==n[0]||e.current[1]!==n[1])&&(e.current=n,!0)},update(t){e.current=vu(t)}}}(),T=Ll((e=>C.update(e))),k=Ll((e=>{if(!C.wasMoved(e)||f||$)return;let t=a.calculateIndex(d);l.goToOption(Vd.Specific,t,0)})),I=Ll((e=>{C.wasMoved(e)&&(f||$&&(a.optionsPropsRef.current.hold||l.goToOption(Vd.Nothing)))})),M=(0,r.useMemo)((()=>({active:$,focus:$,selected:g,disabled:f})),[$,g,f]),A={id:c,ref:b,role:"option",tabIndex:!0===f?void 0:-1,"aria-disabled":!0===f||void 0,"aria-selected":g,disabled:void 0,onMouseDown:S,onFocus:E,onPointerEnter:T,onMouseEnter:T,onPointerMove:k,onMouseMove:k,onPointerLeave:I,onMouseLeave:I};return wd()({ourProps:A,theirProps:h,slot:M,defaultTag:"div",name:"Combobox.Option"})})),Rf=Object.assign(Cf,{Input:kf,Button:Tf,Label:If,Options:Mf,Option:Af});class Of extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Value","OnChange","Children"]}}class Pf extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["DisplayValue","OnChange","ClassName","AutoComplete"]}}function Nf(e){const t=wi(e,1);return r.createElement(Rf.Input,t)}class Df extends pe{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["ClassName"]}}function Ff(e,t){const n=wi(e,1);return r.createElement(Rf.Options,n,...t)}class Lf extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["ClassName","Children"]}}function Bf(e){const t=wi(e,1);return r.createElement(Rf.Button,t)}class Hf extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Key","Value","ClassName","Children"]}}class Vf extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["SetResidencyStatusRadioBox","SetCountry"]}}class Gf extends he{constructor(e){super(),this.ResidencyStatus=e}}function Uf(e){return function(e){let t,n;switch(null==e?t=2:2===e.tag?(t=1,n=e.fields[0]):t=0,t){case 0:return!0;case 1:return null!=n.HomeCountry;default:return!1}}(e)?Fs(e):Ls(e)}function zf(e){return new Gf(Uf(e.ResidencyStatus.Value))}function jf(e,t,n){let o,i;const s=bt.useState(""),a=e=>{let t,n;return He((n=Ri(e),t=1===n.tag?void 0:n.fields[0],null==t?void 0:t.Name),"")};let l;const u=Fe(s[0]);let c,d;return null!=u?""===u?c=0:(c=1,d=u):c=0,0===c?l=t:l=function(e,t){return Qn(e.comparer,Vn(e.comparer,t,e.tree))}(t,((e,t)=>{const n=e=>{return(t=e,t.replace(new RegExp(ce(" "),"g"),"")).toLocaleLowerCase();var t},r=n(t),o=n(d);return r.indexOf(o)>=0})),function(e){const t=wi(e,1);return r.createElement(Rf,t)}($t([new Of(0,[a(e)]),new Of(1,[n]),new Of(2,[[(0,r.createElement)("div",k($t([["className","relative mt-1"],(o=[(0,r.createElement)("div",k($t([["className","relative w-full cursor-default overflow-hidden focus:outline-none focus:border-primary-focus"],(i=[Nf($t([new Pf(0,[a(e)]),new Pf(2,["block w-full pr-10 focus:outline-none text-base sm:text-sm rounded-md border-gray-300 focus:border-primary-focus shadow-none focus:ring-0"]),new Pf(1,[e=>{s[1](e.target.value)}]),new Pf(3,["off"])])),Bf($t([new Lf(0,["absolute inset-y-0 right-0 flex items-center pr-2"]),new Lf(1,[[kt]])]))],["children",bt.Children.toArray(Array.from(i))])]))),Ff(at(new Df("absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-sm shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm z-50")),jt(Ht((()=>Kt(0===tr(l)?Ut((0,r.createElement)("div",{className:"relative cursor-default select-none py-2 px-4 text-gray-700",children:bt.Children.toArray(["Nothing found"])})):Gt(),Ht((()=>nn((e=>{const t=e,n=t[0];return Ut(function(e){const t=wi(e,1);return r.createElement(Rf.Option,t)}($t([new Hf(0,[n]),new Hf(1,[n]),new Hf(2,["relative cursor-default select-none"]),new Hf(3,[e=>[(0,r.createElement)("span",{className:"py-2 pl-2 pr-4 block truncate "+(e.active||e.selected?"bg-primary-base":"bg-white text-black"),children:t[1]})]])])))}),l))))))))],["children",bt.Children.toArray(Array.from(o))])])))]])]))}function Wf(e){let t,n;const o=(i=e.InitialValue,[zf(new Gf(Ls(i))),Xs()]);var i;n=ga((()=>fa((()=>o),((t,n)=>function(e,t){const n=function(e){let t;if(1===e.tag){let t;const n=Ri(He(e.fields[0].Value,""));return t=1===n.tag?void 0:n.fields[0],zf(new Gf(Ls(null==t?Pi:Ni(t))))}return zf(new Gf(Ls((t=e.fields[0].Value,null==t?void 0:function(e){switch(e){case"AustralianResidentForTaxPurposes":return new Oi(0,[]);case"ForeignResidentForTaxPurposes":return new Oi(1,[]);case"WorkingHolidayMaker":return Pi;default:return}}(t)))))}(t);return e(n.ResidencyStatus),[n,Xs()]}(e.OnUpdate,t)),((e,t)=>{}))),void 0,void 0);const s=n[0],a=n[1];return(0,r.createElement)("div",k(at((t=jt(Ht((()=>Kt(Ut(Gs("Are you an Australian resident for tax purposes or a working holiday maker?")),Ht((()=>{let e,t;return Kt(Ut((0,r.createElement)(ya,(e=wt((e=>[Bs(e[0]),e[1],e[2]]),$t([[new Oi(0,[]),"Australian resident for tax purposes",void 0],[new Oi(1,[]),"Foreign resident",void 0],[new Oi(2,[{}]),"Working holiday maker",void 0]])),{InitialValue:Ne((t=s.ResidencyStatus.Value,null==t?void 0:Bs(t))),Name:"ResidencyStatus",OnUpdate:e=>{a(new Vf(0,[e]))},ValueLabelPairs:e}))),Ht((()=>{let e,t;const n=s.ResidencyStatus.Value;let o,i;return null!=n&&2===n.tag?(o=0,i=n.fields[0]):o=1,Ut(0===o?(0,r.createElement)("div",k($t([["className",Te(" ",["mt-4"])],(e=[Gs("Your home country where your visa was issued"),jf(He((t=i.HomeCountry,null==t?void 0:t.Code),""),Ii,(e=>{a(new Vf(1,[Fs(e)]))}))],["children",bt.Children.toArray(Array.from(e))])]))):null)})))})))))),["children",bt.Children.toArray(Array.from(t))]))))}class Yf extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["SetTfnInformation","SetPreviousSurname","SetResidencyStatus","SetClaimTaxFreeThreshold","SetDebtSupport","SetEmploymentBasis","GetData","ShowAlert","HideAlert","Saved","AppReady"]}}class Kf extends he{constructor(e,t,n,r,o,i,s,a){super(),this.PreExistingTfnDec=e,this.CurrentAlert=t,this.TfnInformation=n,this.PreviousSurname=r,this.ResidencyStatus=o,this.ClaimTaxFreeThreshold=i,this.DebtSupportCheckboxGroup=s,this.EmploymentBasisRadioButtonGroup=a}}function qf(e){return 3===e.tag?Ds():Fs(e)}class Zf extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Web","ReactNative","WebComponent"]}}function Jf(){const e=Me(document.URL,["/"],void 0,0),t=We("web",e,{Equals:(e,t)=>e===t,GetHashCode:g}),n=We("react-native",e,{Equals:(e,t)=>e===t,GetHashCode:g}),r=Fe(document.querySelector("tax-component"));let o;switch(o=null==r?t?n?3:1:n?2:3:0,o){case 0:return new mr(0,[new Zf(2,[r])]);case 1:return new mr(0,[new Zf(0,[])]);case 2:return new mr(0,[new Zf(1,[])]);default:return new mr(1,["Could not determine the embed mode"])}}class Xf extends pe{constructor(){super(),this.tag=0,this.fields=[]}cases(){return["SuccessRedirectionUrl"]}}function Qf(){let e;const t=Jf();if(0===t.tag)switch(t.fields[0].tag){case 0:Xt((e=>{window.parent.location.href=e}),Be((n=new Xf,Fe(sessionStorage.getItem(function(e){return fe(e)}(n))))));break;case 1:Xt((e=>{let t;t=JSON.stringify({stepStatus:"completed"}),e.postMessage(t)}),Be(window.ReactNativeWebView));break;default:e=new CustomEvent("step-completion",{bubbles:!0,detail:"tax"}),t.fields[0].fields[0].dispatchEvent(e)}var n}function ep(){return[new Kf(new $n(0,[]),void 0,Ds(),Fs(void 0),Fs(new Oi(0,[])),Ys(new zs(0,[])),Fs(void 0),Fs(new Di(0,[]))),Xs()]}function tp(e,t){let n;switch(e.tag){case 1:return[new Kf(t.PreExistingTfnDec,t.CurrentAlert,t.TfnInformation,e.fields[0],t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),Xs()];case 2:{const r=e.fields[0];return[new Kf(t.PreExistingTfnDec,t.CurrentAlert,t.TfnInformation,t.PreviousSurname,r,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),(n=r.Value,null==n?Xs():1===n.tag?at((e=>{e(new Yf(3,[new js(1,[new zs(1,[]),!1])]))})):2===n.tag?at((e=>{e(new Yf(3,[new js(1,[new zs(1,[]),!0])]))})):at((e=>{e(new Yf(3,[new js(1,[new zs(0,[]),!1])]))})))]}case 3:return[new Kf(t.PreExistingTfnDec,t.CurrentAlert,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,Ks(e.fields[0],t.ClaimTaxFreeThreshold),t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),Xs()];case 4:return[new Kf(t.PreExistingTfnDec,t.CurrentAlert,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,e.fields[0],t.EmploymentBasisRadioButtonGroup),Xs()];case 5:{const n=(r=Vs,null!=(o=e.fields[0].Value)?r(Pe(o)):void 0);return[new Kf(t.PreExistingTfnDec,t.CurrentAlert,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,new Ns(n,{Valid:null!=n})),Xs()]}case 6:{const n=e.fields[0],r=new Kf(n,t.CurrentAlert,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),o=at((e=>{e(new Yf(7,[new Ms(1,["There was an error loading your tax declaration. Please try refreshing this page."])]))}));!function(){let e,t;const n=Fe(document.getElementById("external-loading-page-container"));Xt((t=document.body,e=e=>t.removeChild(e),t=>{e(t)}),Be(n))}();const i=at((e=>{e(new Yf(10,[]))}));switch(n.tag){case 2:if(1===n.fields[0].tag)return[r,o];{const e=Ve((e=>function(e,t){let n;if(0===t.tag){const o=t.fields[0];let i;const s=o.TfnInformation;if(1===s.tag){const e=function(e){switch(e){case 0:return new mr(0,[new Li(0,[])]);case 1:return new mr(0,[new Li(1,[])]);case 2:return new mr(0,[new Li(2,[])]);default:return new mr(1,["Invalid ExemptionReason"])}}(s.fields[0]);i=1===e.tag?new mr(1,[e.fields[0]]):new mr(0,[new _a(1,[new xa(1,[e.fields[0]])])])}else i=new mr(0,[new _a(0,[s.fields[0]])]);if(1===i.tag)return new mr(1,[i.fields[0]]);{const t=ji(o.ResidencyStatusV2);if(1===t.tag)return new mr(1,[t.fields[0]]);{const s=t.fields[0],a=1===s.tag||2===s.tag?new zs(1,[]):o.IsTaxFreeThresholdClaimed?new zs(0,[]):new zs(1,[]),l=qi(o.HasDebtSupport);if(1===l.tag)return new mr(1,[l.fields[0]]);{const t=l.fields[0],u=Wi(o.EmploymentBasis);return 1===u.tag?new mr(1,[u.fields[0]]):new mr(0,[new Kf(e.PreExistingTfnDec,e.CurrentAlert,Fs(i.fields[0]),Fs((n=o.PreviousSurname,null==n?void 0:(r=n,new Bi(r)))),Uf(s),Ys(a),lt(t)?Fs(void 0):Fs(t),qf(u.fields[0]))])}}}}{const n=t.fields[0];let r,o;const i=n.ResidencyStatusV2;if(o=null==i?void 0:ji(i),null!=o){const e=o;r=1===e.tag?new mr(1,[e.fields[0]]):new mr(0,[e.fields[0]])}else r=new mr(0,[void 0]);if(1===r.tag)return new mr(1,[r.fields[0]]);{const t=Wi(n.EmploymentBasis);return 1===t.tag?new mr(1,[t.fields[0]]):new mr(0,[new Kf(e.PreExistingTfnDec,e.CurrentAlert,e.TfnInformation,e.PreviousSurname,Uf(r.fields[0]),e.ClaimTaxFreeThreshold,e.DebtSupportCheckboxGroup,qf(t.fields[0]))])}}var r}(r,e)),n.fields[0].fields[0].Info);if(null==e)return[r,i];{const t=e;return 0===t.tag?[t.fields[0],i]:[r,o]}}case 3:return[r,o];default:return[r,i]}}case 7:return[new Kf(t.PreExistingTfnDec,e.fields[0],t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),Xs()];case 8:return[new Kf(t.PreExistingTfnDec,void 0,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),Xs()];case 9:return[new Kf(new $n(2,[new mr(0,[e.fields[0]])]),t.CurrentAlert,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),Xs()];case 10:return function(){const e=Jf();let t;if(0===e.tag)switch(e.fields[0].tag){case 0:case 1:t=0;break;default:t=1}else t=1;0===t&&window.parent.postMessage({sender:"flare",type:"appReady"},"*",De(it()))}(),[t,Xs()];default:return[new Kf(t.PreExistingTfnDec,t.CurrentAlert,e.fields[0],t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),Xs()]}var r,o}class np extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["SetText","SetTouched"]}}class rp extends he{constructor(e,t){super(),this.Text=e,this.Meta=t}}class op extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Number","Text"]}}function ip(e){let t,n;const o=function(e,t){const n=He(e,"");return[new rp(n,{Touched:!1,Valid:t(n)}),Xs()]}(e.InitialValue,e.Validator);n=ga((()=>fa((()=>o),((t,n)=>function(e,t,n,r){const o=function(e,t,n){if(1===t.tag)return new rp(n.Text,{Touched:!0,Valid:n.Meta.Valid});{const r=t.fields[0];return new rp(r,{Touched:n.Meta.Touched,Valid:e(r)})}}(t,n,r);return e(new Ns(o.Text,{Valid:o.Meta.Valid})),[o,Xs()]}(e.OnUpdate,e.Validator,t,n)),((e,t)=>{}))),void 0,void 0);const i=n[0],s=n[1];return(0,r.createElement)("div",k($t([["className",Te(" ",gt(e.AdditionalWrapperClasses,at("z-10")))],(t=jt(Ht((()=>Kt(Ut((0,r.createElement)("input",k(jt(Ht((()=>Kt(Ut(["className",Te(" ",gt(e.AdditionalInputClasses,gt($t(["block","w-full","pr-10","focus:outline-none","text-base","sm:text-sm","rounded-md","border-gray-300"]),jt(Ht((()=>!i.Meta.Valid&&i.Meta.Touched?["border-red-300","text-red-900","placeholder-red-300","focus:ring-red-500","focus:border-red-500"]:Gt()))))))]),Ht((()=>Kt(Ut(["type","text"]),Ht((()=>Kt(Ut(["onChange",t=>{const n=t.target.value;s(new np(0,[1===e.InputType.tag?n:Ae($i,n)]))}]),Ht((()=>{let t;return Kt(Ut((t=i.Text,["ref",e=>{null==e||_(e.value,t)||(e.value=t)}])),Ht((()=>Kt(Ut(["onBlur",e=>{s(new np(1,[]))}]),Ht((()=>Kt(_(e.InputType,new op(0,[]))?Ut(["inputMode","numeric"]):Gt(),Ht((()=>Ut(["data-testid",e.TestId]))))))))))}))))))))))))))),Ht((()=>!i.Meta.Valid&&i.Meta.Touched?Ut((0,r.createElement)("div",{className:Te(" ",["mt-1","text-sm","text-red-600"]),children:e.InvalidFeedback})):Gt())))))),["children",bt.Children.toArray(Array.from(t))])])))}class sp extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["YesNoButtonGroupMsg","SetPreviousSurname"]}}class ap extends he{constructor(e,t){super(),this.YesNoButtonGroup=e,this.Data=t}}function lp(e){return 1!==function(e){const t="string"!=typeof(r=n=e)||/^\s*$/.test(r)?new mr(1,["Previous Surname cannot be null, empty or white spaces"]):new mr(0,[n]);var n,r;return 1===t.tag?new mr(1,[t.fields[0]]):function(e,t,n){return n.length<=59?new mr(0,[n]):new mr(1,["Previous Surname must be no more than 59 characters long."])}(0,0,t.fields[0])}(e).tag}function up(e){const t=e.YesNoButtonGroup.Selected;return null==t?new ap(e.YesNoButtonGroup,new Ns(e.Data.Value,{Valid:!1})):1===t.tag?new ap(e.YesNoButtonGroup,new Ns(e.Data.Value,{Valid:!0})):new ap(e.YesNoButtonGroup,new Ns(e.Data.Value,{Valid:He(Ve((e=>lp(e.fields[0])),e.Data.Value),!1)}))}function cp(e){let t,n;const o=(i=e.InitialValue,[up(new ap(Ys(new zs(null==i?1:0,[])),new Ns(i,{Valid:!1}))),Xs()]);var i;n=ga((()=>fa((()=>o),((t,n)=>function(e,t,n){const r=function(e,t){let n,r,o;return up(1===e.tag?(n=e.fields[0],new ap(t.YesNoButtonGroup,new Ns(Ve((e=>new Bi(e)),n.Value),{Valid:n.Meta.Valid}))):(r=e.fields[0],r.tag,o=1===r.fields[0].tag?new Ns(void 0,t.Data.Meta):t.Data,new ap(Ks(r,t.YesNoButtonGroup),o)))}(t,n);return e(r.Data),[r,Xs()]}(e.OnUpdate,t,n)),((e,t)=>{}))),void 0,void 0);const s=n[0],a=n[1];return(0,r.createElement)("div",k($t([["className",Te(" ",Mt)],(t=jt(Ht((()=>Kt(Ut(Gs("Have you changed your surname since you last dealt with the Australian Tax Office (ATO)?")),Ht((()=>Kt(Ut((0,r.createElement)(Zs,{Dispatch:e=>{a(new sp(0,[e]))},State:s.YesNoButtonGroup})),Ht((()=>{let e;const t=s.YesNoButtonGroup.Selected;let n;return n=null!=t&&0===t.tag?0:1,Ut(0===n?(0,r.createElement)("div",k($t([["className",Te(" ",["mt-4"])],(e=[Gs("Enter your previous surname"),(0,r.createElement)(ip,{AdditionalInputClasses:$t(["focus:ring-primary-focus","focus:border-primary-focus"]),AdditionalWrapperClasses:at("mt-1"),InitialValue:Ne(Ve(Hi,s.Data.Value)),InputType:new op(1,[]),InvalidFeedback:"Please enter your previous surname with a maximum length of 59 characters",OnUpdate:e=>{a(new sp(1,[e]))},TestId:"surname-input",Validator:lp})],["children",bt.Children.toArray(Array.from(e))])]))):null)}))))))))),["children",bt.Children.toArray(Array.from(t))])])))}const dp=$t(["mt-7","bg-white","px-4","border","border-gray-200","rounded-lg","shadow-sm"]),fp=$t(["group","relative","w-full","my-3","focus-visible:outline-primary-hover","flex","justify-between","items-center","text-left"]),pp=$t(["text-sm","text-primary-base","leading-3","font-medium"]),hp=$t(["ml-6","flex","items-center"]),mp=$t(["pt-1","pb-3","prose","prose-sm","text-gray-500","text-sm"]);function $p(e){let t,n,o,i;const s=e.content,a=e.title,l=bt.useState(!0),u=l[0];return(0,r.createElement)("div",k($t([["className",Te(" ",dp)],(t=[(n=at((0,r.createElement)("button",k($t([["type","button"],["className",Te(" ",fp)],["aria-expanded",u],["onClick",e=>{l[1](!u)}],(o=[(0,r.createElement)("span",{className:Te(" ",pp),children:a}),(0,r.createElement)("span",k($t([["className",Te(" ",hp)],(i=jt(Ht((()=>Ut(u?Ct:Et)))),["children",bt.Children.toArray(Array.from(i))])])))],["children",bt.Children.toArray(Array.from(o))])])))),(0,r.createElement)("h3",{children:bt.Children.toArray(Array.from(n))})),(0,r.createElement)("div",{className:Te(" ",gt(mp,jt(Ht((()=>u?Ut("hidden"):Gt()))))),children:bt.Children.toArray([s])})],["children",bt.Children.toArray(Array.from(t))])])))}class gp extends pe{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["Select"]}}class wp extends he{constructor(e){super(),this.Selected=e}}function vp(e,t){return null!=function(e,t){return((t,n)=>{for(;;){const r=t,o=n;if(tt(o))return;if(e(rt(o)))return r;t=r+1,n=ot(o)}})(0,t)}((t=>e===t),t.Selected)}function yp(e){let t,n;const o=(i=e.InitialValue,[new wp(i),Xs()]);var i;return n=ga((()=>fa((()=>o),((t,n)=>function(e,t,n){const r=function(e,t){const n=e.fields[0];return vp(n,t)?new wp(vt((e=>n!==e),t.Selected)):new wp(gt(at(n),t.Selected))}(t,n);return e(r.Selected),[r,Xs()]}(e.OnUpdate,t,n)),((e,t)=>{}))),void 0,void 0),(0,r.createElement)("fieldset",k($t([["className",Te(" ",["space-y-2","mt-2"])],(t=jt(Ht((()=>nn((e=>{let t,o,i;const s=e[0];return Ut((0,r.createElement)("div",k($t([["className",Te(" ",["relative","flex","items-start"])],["onChange",e=>{e.target.checked,n[1](new gp(s))}],(t=[(0,r.createElement)("div",k($t([["className",Te(" ",["flex","items-center","h-5"])],(o=[(0,r.createElement)("input",{className:Te(" ",["focus:ring-primary-focus","h-4","w-4","text-primary-base","border-gray-300","rounded"]),type:"checkbox",id:s,checked:vp(s,n[0])})],["children",bt.Children.toArray(Array.from(o))])]))),(0,r.createElement)("div",k($t([["className",Te(" ",["ml-3","text-sm"])],(i=[(0,r.createElement)("label",{className:Te(" ",["font-normal","text-gray-700"]),for:s,children:e[1]})],["children",bt.Children.toArray(Array.from(i))])])))],["children",bt.Children.toArray(Array.from(t))])]))))}),e.ValueLabelPairs)))),["children",bt.Children.toArray(Array.from(t))])])))}class bp extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["YesNoButtonGroupMsg","SetDebtSupport"]}}class xp extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["ForeignResident","WorkingHolidayMaker"]}}class _p extends he{constructor(e,t,n){super(),this.YesNoButtonGroup=e,this.Data=t,this.DisableReason=n}}function Sp(e){let t,n;const r=e.YesNoButtonGroup.Selected;return null==r?new _p(e.YesNoButtonGroup,new Ns(e.Data.Value,{Valid:!1}),e.DisableReason):1===r.tag?new _p(e.YesNoButtonGroup,new Ns(e.Data.Value,{Valid:!0}),e.DisableReason):new _p(e.YesNoButtonGroup,new Ns(e.Data.Value,{Valid:(t=e.Data.Value,null!=t&&(o=t,nt(o)>0&&(n=t,!0)))}),e.DisableReason);var o}function Ep(e){let t,n;const o=function(e,t,n){let r,o;const i=e.Value;let s;s=null==i||lt(i)?0:1,o=new zs(0===s?1:0,[]);const a=null!=t?null!=n?1===n.tag?function(e){let t;return t=1===e.tag&&1===e.fields[0].tag?1:0,0===t}(t)?void 0:(r=t,new xp(0,[])):2===n.tag?new xp(1,[]):void 0:void 0:null!=n?1===n.tag?new xp(0,[]):2===n.tag?new xp(1,[]):void 0:void 0,l=null==a?Xs():at((e=>{e(new bp(0,[new js(1,[new zs(1,[]),!0])]))}));return[Sp(new _p(Ys(o),e,a)),l]}(e.InitialValue,e.TfnInfo,e.ResidencyStatus);n=ga((()=>fa((()=>o),((t,n)=>function(e,t,n){const r=function(e,t){let n,r;return Sp(1===e.tag?new _p(t.YesNoButtonGroup,Fs(e.fields[0]),t.DisableReason):(n=e.fields[0],n.tag,r=1===n.fields[0].tag?Fs(void 0):t.Data,new _p(Ks(n,t.YesNoButtonGroup),r,t.DisableReason)))}(t,n);return e(r.Data),[r,Xs()]}(e.OnUpdate,t,n)),((e,t)=>{}))),void 0,[e.TfnInfo,e.ResidencyStatus]);const i=n[0],s=n[1];return(0,r.createElement)("div",k($t([["className",Te(" ",Mt)],(t=jt(Ht((()=>Kt(Ut(Gs("Do you have any outstanding study and training support loans?")),Ht((()=>Kt(Ut((0,r.createElement)(Zs,{Disable:Ne(Ve((e=>new zs(0,[])),i.DisableReason)),Dispatch:e=>{s(new bp(0,[e]))},State:i.YesNoButtonGroup})),Ht((()=>{let t;return Kt((t=i.DisableReason,null!=t?1===t.tag?Ut(Us("Working holiday makers are ineligible for study and training support loans.")):Ut(Us("You must provide your TFN to declare any outstanding study and training support loans.")):Ut(null)),Ht((()=>{let t,n;const o=i.YesNoButtonGroup.Selected;let a;return a=null!=o&&0===o.tag?0:1,Ut(0===a?(0,r.createElement)("div",k($t([["className",Te(" ",["mt-4"])],(t=[(0,r.createElement)(yp,(n=wt((e=>[fe(e[0]),e[1]]),$t([[new Mi(0,[]),"Higher Education Loan Program (HELP)"],[new Mi(1,[]),"VET Student Loan (VSL)"],[new Mi(2,[]),"Financial Supplement (FS)"],[new Mi(3,[]),"Student Start-up Loan (SSL)"],[new Mi(4,[]),"Trade Support Loan (TSL)"]])),{InitialValue:He(Ve((e=>wt(fe,e)),e.InitialValue.Value),it()),OnUpdate:e=>{s(new bp(1,[yt(Hs,e)]))},ValueLabelPairs:n}))],["children",bt.Children.toArray(Array.from(t))])]))):null)})))}))))))))),["children",bt.Children.toArray(Array.from(t))])])))}function Cp(e,t){return!!(e.TfnInformation.Meta.Valid&&e.PreviousSurname.Meta.Valid&&e.ResidencyStatus.Meta.Valid&&null!=e.ClaimTaxFreeThreshold.Selected&&e.EmploymentBasisRadioButtonGroup.Meta.Valid&&e.DebtSupportCheckboxGroup.Meta.Valid)&&!_(t,new $n(1,[]))}function Tp(){return(0,r.createElement)("hr",{className:Te(" ",["my-8"])})}const kp=(0,r.createElement)("div",k($t([["className",Te(" ",["space-y-2"])],(()=>{let e,t,n;const o=[(e="You are considered to be an Australian resident for tax purposes if you live here permanently, or studying for a period in excess of 6 months.",(0,r.createElement)("p",{children:["You are considered to be an Australian resident for tax purposes if you live here permanently, or studying for a period in excess of 6 months."]})),(t="Select working holiday maker if you are in Australia on a working holiday visa (subclass 417) or a work and holiday visa (subclass 462). Special rates of tax apply for working holiday makers.",(0,r.createElement)("p",{children:["Select working holiday maker if you are in Australia on a working holiday visa (subclass 417) or a work and holiday visa (subclass 462). Special rates of tax apply for working holiday makers."]})),(n="If none of the above applies, select foreign resident unless you are in receipt of an Australian Government pension or allowance. Foreign resident tax rates are different.",(0,r.createElement)("p",{children:["If none of the above applies, select foreign resident unless you are in receipt of an Australian Government pension or allowance. Foreign resident tax rates are different."]}))];return["children",bt.Children.toArray(Array.from(o))]})()]))),Ip=(0,r.createElement)("div",k($t([["className",Te(" ",["space-y-2"])],(()=>{let e,t;const n=[(e="If you are an Australian resident for tax purposes and this is your main job, you can claim the tax-free threshold. This means that you pay no tax on the first $18,200 of your income.",(0,r.createElement)("p",{children:["If you are an Australian resident for tax purposes and this is your main job, you can claim the tax-free threshold. This means that you pay no tax on the first $18,200 of your income."]})),(t="You are also eligible to claim the threshold if you are a foreign resident in receipt of an Australian Government pension or allowance. This is classified as an Australian resident for tax purposes.",(0,r.createElement)("p",{children:["You are also eligible to claim the threshold if you are a foreign resident in receipt of an Australian Government pension or allowance. This is classified as an Australian resident for tax purposes."]})),(0,r.createElement)("p",{children:["Foreign residents and working holiday makers are ineligible to claim the threshold."]})];return["children",bt.Children.toArray(Array.from(n))]})()])));function Mp(e){const t=e.backendUrl,n=e.accessToken;let o;const i=ep();o=ga((()=>fa((()=>i),tp,((e,t)=>{}))),void 0,void 0);const s=o[0],a=o[1],l=gn((()=>Cs(n,t)),(e=>{a(new Yf(6,[e]))}));bt.useEffect(l,[]);const u=bt.useState(new $n(0,[])),c=u[0],d=gn((()=>function(e,t,n,r){let o;const i=Is(e,t,n);return o=un.Bind(i,(e=>{let t;const n=e;return 1===n.tag||r(new Ms(0,["Your tax declaration has been saved."])),t=n,un.Return(t)})),un.Bind(o,(e=>{let t;const n=e;if(1===n.tag){const e=n.fields[0];1===e.tag?r(new Ms(1,["There was an error saving your tax declaration. Please try saving again."])):r(new Ms(1,[`There was an error saving your tax declaration. ${e.fields[0]}`]))}return t=n,un.Return(t)}))}(s,n,t,(e=>{a(new Yf(7,[e]))}))),(e=>{let t,n;u[1](e),2===e.tag&&0===e.fields[0].tag?(t=0,n=e.fields[0].fields[0]):t=1,0===t&&(mn(un.Delay((()=>un.Bind(hn(400),(()=>(Qf(),un.Zero())))))),a(new Yf(9,[n])))}));switch(s.PreExistingTfnDec.tag){case 0:case 1:return(0,r.createElement)("div",{children:["Please wait..."]});default:{const e=jt(Ht((()=>{let e,t;return Kt((e=s.CurrentAlert,null==e?Ut(null):(t=e,Ut((0,r.createElement)(Ps,{alert:t,hideAlert:()=>{a(new Yf(8,[]))}})))),Ht((()=>Kt(Ut((0,r.createElement)("h3",{className:Te(" ",["text-3xl","font-bold","text-center","mb-8","sm:mb-12"]),children:"Tax Declaration"})),Ht((()=>Kt(Ut((0,r.createElement)(Aa,{InitialValue:Ne(s.TfnInformation.Value),OnUpdate:e=>{a(new Yf(0,[e]))}})),Ht((()=>Kt(Ut(Tp()),Ht((()=>Kt(Ut((0,r.createElement)(cp,{InitialValue:Ne(s.PreviousSurname.Value),OnUpdate:e=>{a(new Yf(1,[e]))}})),Ht((()=>Kt(Ut(Tp()),Ht((()=>Kt(Ut((0,r.createElement)(Wf,{InitialValue:Ne(s.ResidencyStatus.Value),OnUpdate:e=>{a(new Yf(2,[e]))}})),Ht((()=>Kt(Ut((0,r.createElement)($p,{title:"About residency",content:kp})),Ht((()=>Kt(Ut(Tp()),Ht((()=>{let e,t;return Kt(Ut((0,r.createElement)("div",k($t([["className",Te(" ",Mt)],(e=[Gs("Would you like to claim the tax-free threshold from this employer?"),(0,r.createElement)(Zs,{Disable:Ne((t=s.ResidencyStatus.Value,null==t||2!==t.tag&&1!==t.tag?void 0:new zs(0,[]))),Dispatch:e=>{a(new Yf(3,[e]))},State:s.ClaimTaxFreeThreshold})],["children",bt.Children.toArray(Array.from(e))])])))),Ht((()=>{let e;return Kt((e=s.ResidencyStatus.Value,null!=e?2===e.tag?Ut(Us("Working holiday makers are ineligible to claim the tax-free threshold.")):1===e.tag?Ut(Us("Foreign residents are ineligible to claim the tax-free threshold.")):Ut(null):Ut(null)),Ht((()=>Kt(Ut((0,r.createElement)($p,{title:"About the tax-free threshold",content:Ip})),Ht((()=>Kt(Ut(Tp()),Ht((()=>Kt(Ut((0,r.createElement)(Ep,{InitialValue:s.DebtSupportCheckboxGroup,OnUpdate:e=>{a(new Yf(4,[e]))},ResidencyStatus:Ne(s.ResidencyStatus.Value),TfnInfo:Ne(s.TfnInformation.Value)})),Ht((()=>Kt(Ut(Tp()),Ht((()=>Kt(Ut(Gs("On what basis are you paid?")),Ht((()=>Kt(Ut((0,r.createElement)("p",{className:"text-sm leading-5 font-normal text-gray-500",children:"Check with your employer if you’re unsure."})),Ht((()=>{let e,t;return Kt(Ut((0,r.createElement)(ya,(e=wt((e=>[fe(e[0]),e[1],e[2]]),$t([[new Di(0,[]),"Full-time",void 0],[new Di(1,[]),"Part-time",void 0],[new Di(2,[]),"Labour Hire",void 0],[new Di(4,[]),"Casual",void 0]])),{InitialValue:Ne((t=s.EmploymentBasisRadioButtonGroup.Value,null==t?void 0:fe(t))),Name:"EmploymentBasis",OnUpdate:e=>{a(new Yf(5,[e]))},ValueLabelPairs:e}))),Ht((()=>Kt(Ut(Tp()),Ht((()=>{let e;return Kt(Ut((0,r.createElement)("p",k($t([["className","text-sm leading-5 font-normal text-gray-500"],(e="By clicking ‘Save and continue’ you declare that the information you have provided is true and correct.",["children","By clicking ‘Save and continue’ you declare that the information you have provided is true and correct."])])))),Ht((()=>{let e;return Ut((0,r.createElement)("div",k($t([["className",Te(" ",["text-center"])],(e=[(0,r.createElement)("button",{className:Te(" ",["w-full","max-w-320","px-10","py-2","mt-8","mb-10","border","border-transparent","text-sm","font-medium","rounded-md","shadow-sm","text-white","bg-primary-base","hover:bg-primary-hover","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-primary-focus","disabled:bg-gray-100","disabled:text-gray-400","disabled:border-gray-300","disabled:cursor-not-allowed"]),type:"button",disabled:!Cp(s,c),onClick:e=>{Cp(s,c)&&d()},children:"Save and continue","data-testid":"continue-button"})],["children",bt.Children.toArray(Array.from(e))])]))))})))}))))))})))))))))))))))))))))})))})))))))))))))))))))))))))))})));return(0,r.createElement)("form",{children:bt.Children.toArray(Array.from(e))})}}}var Ap=n(172);function Rp(){return(Rp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Op=["context","children"];function Pp(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}(e,Op);return(0,Ap.Ob)(t,n)}function Np(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=(0,Ap.h)(Pp,Rp({},this._props,{context:e.detail.context}),function e(t,n){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var r=[],o={},i=0,s=t.attributes,a=t.childNodes;for(i=s.length;i--;)"slot"!==s[i].name&&(o[s[i].name]=s[i].value,o[Dp(s[i].name)]=s[i].value);for(i=a.length;i--;){var l=e(a[i],null),u=a[i].slot;u?o[u]=(0,Ap.h)(Bp,{name:u},l):r[i]=l}var c=n?(0,Ap.h)(Bp,null,r):r;return(0,Ap.h)(n||t.nodeName.toLowerCase(),o,c)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Ap.Qv:Ap.XX)(this._vdom,this._root)}function Dp(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function Fp(e,t,n){if(this._vdom){var r={};r[e]=n=null==n?void 0:n,r[Dp(e)]=n,this._vdom=(0,Ap.Ob)(this._vdom,r),(0,Ap.XX)(this._vdom,this._root)}}function Lp(){(0,Ap.XX)(this._vdom=null,this._root)}function Bp(e,t){var n=this;return(0,Ap.h)("slot",Rp({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function Hp(e){let t;return(0,r.createElement)("div",k($t([["className",Te(" ",["font-inter","max-w-560","mx-auto"])],(t=[(0,r.createElement)("style",{children:[xt]}),(0,r.createElement)(Mp,{accessToken:e.accessToken,backendUrl:e.backendUrl})],["children",bt.Children.toArray(Array.from(t))])])))}!function(e,t,n,r){function o(){var t=Reflect.construct(HTMLElement,[],o);return t._vdomComponent=e,t._root=r&&r.shadow?t.attachShadow({mode:r.mode||"open"}):t,t}(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=Np,o.prototype.attributeChangedCallback=Fp,o.prototype.disconnectedCallback=Lp,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach((function(e){Object.defineProperty(o.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})})),customElements.define("tax-component",o)}((e=>(0,r.createElement)(Hp,e)),0,void 0,{shadow:!0})},945:e=>{e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23fff%27 viewBox=%270 0 16 16%27%3E%3Ccircle cx=%278%27 cy=%278%27 r=%273%27/%3E%3C/svg%3E"},764:e=>{e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23fff%27 viewBox=%270 0 16 16%27%3E%3Cpath d=%27M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0%27/%3E%3C/svg%3E"},608:e=>{e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 16 16%27%3E%3Cpath stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27M4 8h8%27/%3E%3C/svg%3E"},354:e=>{e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 20 20%27%3E%3Cpath stroke=%27%236b7280%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%271.5%27 d=%27m6 8 4 4 4-4%27/%3E%3C/svg%3E"}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,exports:{}};return e[r](i,i.exports,n),i.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.b=document.baseURI||self.location.href,n(919),n(725)})();
2
+ (()=>{"use strict";var e={725:(e,t,n)=>{n.d(t,{A:()=>w});var r=n(601),o=n.n(r),i=n(314),s=n.n(i),a=n(417),l=n.n(a),u=new URL(n(354),n.b),c=new URL(n(764),n.b),d=new URL(n(945),n.b),f=new URL(n(608),n.b),p=s()(o()),h=l()(u),m=l()(c),$=l()(d),g=l()(f);p.push([e.id,`*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.14 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],input:where(:not([type])),select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem;--tw-shadow:0 0 #0000}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,input:where(:not([type])):focus,select:focus,textarea:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);border-color:#2563eb;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-bottom:0;padding-top:0}select{background-image:url(${h});background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;background-origin:border-box;border-color:#6b7280;border-width:1px;color:#2563eb;display:inline-block;flex-shrink:0;height:1rem;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1rem;--tw-shadow:0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}[type=checkbox]:checked{background-image:url(${m})}@media (forced-colors:active) {[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url(${$})}@media (forced-colors:active) {[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{background-color:currentColor;border-color:transparent}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url(${g});background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}@media (forced-colors:active) {[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:transparent}[type=file]{background:unset;border-color:inherit;border-radius:0;border-width:0;font-size:unset;line-height:inherit;padding:0}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-y-0{bottom:0;top:0}.right-0{right:0}.z-10{z-index:10}.z-50{z-index:50}.-mx-1\\.5{margin-left:-.375rem;margin-right:-.375rem}.-my-1\\.5{margin-bottom:-.375rem;margin-top:-.375rem}.mx-auto{margin-left:auto;margin-right:auto}.my-3{margin-bottom:.75rem;margin-top:.75rem}.my-4{margin-bottom:1rem;margin-top:1rem}.my-8{margin-bottom:2rem;margin-top:2rem}.-ml-px{margin-left:-1px}.mb-0\\.5{margin-bottom:.125rem}.mb-10{margin-bottom:2.5rem}.mb-8{margin-bottom:2rem}.ml-3{margin-left:.75rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-7{margin-top:1.75rem}.mt-8{margin-top:2rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.max-h-60{max-height:15rem}.w-1\\/2{width:50%}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-auto{width:auto}.w-full{width:100%}.max-w-320{max-width:320px}.max-w-560{max-width:560px}.flex-none{flex:none}.flex-grow{flex-grow:1}.cursor-default{cursor:default}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.space-x-0\\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.125rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.125rem*var(--tw-space-x-reverse))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden,.truncate{overflow:hidden}.truncate{text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-l-md{border-bottom-left-radius:.375rem;border-top-left-radius:.375rem}.rounded-r-md{border-bottom-right-radius:.375rem;border-top-right-radius:.375rem}.border{border-width:1px}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity))}.bg-primary-base{background-color:var(--fl-color-primary)}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.p-0\\.5{padding:.125rem}.p-1\\.5{padding:.375rem}.p-4{padding:1rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-3{padding-top:.75rem}.pb-3,.py-3{padding-bottom:.75rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-inter{font-family:Inter,sans-serif}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.leading-3{line-height:.75rem}.leading-5{line-height:1.25rem}.text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity))}.text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity))}.text-primary-base{color:var(--fl-color-primary)}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity))}.text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.placeholder-red-300::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(252 165 165/var(--tw-placeholder-opacity))}.placeholder-red-300::placeholder{--tw-placeholder-opacity:1;color:rgb(252 165 165/var(--tw-placeholder-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.shadow-none,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-black{--tw-ring-opacity:1;--tw-ring-color:rgb(0 0 0/var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity:0.05}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.hover\\:bg-blue-100:hover{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity))}.hover\\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\\:bg-green-100:hover{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity))}.hover\\:bg-primary-hover:hover{background-color:var(--fl-color-primary-hover)}.hover\\:bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity))}.focus\\:z-10:focus{z-index:10}.focus\\:z-20:focus{z-index:20}.focus\\:border-primary-focus:focus{border-color:var(--fl-color-primary-focus)}.focus\\:border-red-500:focus{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\\:ring-0:focus,.focus\\:ring-1:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-inset:focus{--tw-ring-inset:inset}.focus\\:ring-blue-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(37 99 235/var(--tw-ring-opacity))}.focus\\:ring-green-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(22 163 74/var(--tw-ring-opacity))}.focus\\:ring-primary-focus:focus{--tw-ring-color:var(--fl-color-primary-focus)}.focus\\:ring-red-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity))}.focus\\:ring-red-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(220 38 38/var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus\\:ring-offset-blue-50:focus{--tw-ring-offset-color:#eff6ff}.focus\\:ring-offset-green-50:focus{--tw-ring-offset-color:#f0fdf4}.focus\\:ring-offset-red-50:focus{--tw-ring-offset-color:#fef2f2}.focus-visible\\:outline-primary-hover:focus-visible{outline-color:var(--fl-color-primary-hover)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:border-gray-300:disabled{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.disabled\\:text-gray-400:disabled{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.group:hover .group-hover\\:text-primary-hover{color:var(--fl-color-primary-hover)}@media (min-width:640px){.sm\\:mb-12{margin-bottom:3rem}.sm\\:py-2{padding-bottom:.5rem;padding-top:.5rem}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}`,""]);const w=p},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(s[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);r&&s[c[0]]||(void 0!==i&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},417:e=>{e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},601:e=>{e.exports=function(e){return e[1]}},299:(e,t,n)=>{n.r(t),n.d(t,{Children:()=>z,Component:()=>a.uA,Fragment:()=>a.FK,PureComponent:()=>L,StrictMode:()=>Ae,Suspense:()=>q,SuspenseList:()=>X,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>ye,cloneElement:()=>Ce,createContext:()=>a.q6,createElement:()=>a.n,createFactory:()=>xe,createPortal:()=>ne,createRef:()=>a._3,default:()=>Be,findDOMNode:()=>ke,flushSync:()=>Me,forwardRef:()=>G,hydrate:()=>ce,isElement:()=>Ne,isFragment:()=>Se,isMemo:()=>Ee,isValidElement:()=>_e,lazy:()=>J,memo:()=>B,render:()=>ue,startTransition:()=>Re,unmountComponentAtNode:()=>Te,unstable_batchedUpdates:()=>Ie,useCallback:()=>E,useContext:()=>C,useDebugValue:()=>T,useDeferredValue:()=>Oe,useEffect:()=>y,useErrorBoundary:()=>k,useId:()=>I,useImperativeHandle:()=>_,useInsertionEffect:()=>De,useLayoutEffect:()=>b,useMemo:()=>S,useReducer:()=>v,useRef:()=>x,useState:()=>w,useSyncExternalStore:()=>Fe,useTransition:()=>Pe,version:()=>be});var r,o,i,s,a=n(172),l=0,u=[],c=a.fF,d=c.__b,f=c.__r,p=c.diffed,h=c.__c,m=c.unmount,$=c.__;function g(e,t){c.__h&&c.__h(o,e,l||t),l=0;var n=o.__H||(o.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function w(e){return l=1,v(N,e)}function v(e,t,n){var i=g(r++,2);if(i.t=e,!i.__c&&(i.__=[n?n(t):N(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],n=i.t(t,e);t!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=o,!o.u)){var s=function(e,t,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!a||a.call(this,e,t,n);var o=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}})),!(!o&&i.__c.props===e)&&(!a||a.call(this,e,t,n))};o.u=!0;var a=o.shouldComponentUpdate,l=o.componentWillUpdate;o.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,s(e,t,n),a=r}l&&l.call(this,e,t,n)},o.shouldComponentUpdate=s}return i.__N||i.__}function y(e,t){var n=g(r++,3);!c.__s&&D(n.__H,t)&&(n.__=e,n.i=t,o.__H.__h.push(n))}function b(e,t){var n=g(r++,4);!c.__s&&D(n.__H,t)&&(n.__=e,n.i=t,o.__h.push(n))}function x(e){return l=5,S((function(){return{current:e}}),[])}function _(e,t,n){l=6,b((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function S(e,t){var n=g(r++,7);return D(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function E(e,t){return l=8,S((function(){return e}),t)}function C(e){var t=o.context[e.__c],n=g(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(o)),t.props.value):e.__}function T(e,t){c.useDebugValue&&c.useDebugValue(t?t(e):e)}function k(e){var t=g(r++,10),n=w();return t.__=e,o.componentDidCatch||(o.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function I(){var e=g(r++,11);if(!e.__){for(var t=o.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function M(){for(var e;e=u.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(O),e.__H.__h.forEach(P),e.__H.__h=[]}catch(t){e.__H.__h=[],c.__e(t,e.__v)}}c.__b=function(e){o=null,d&&d(e)},c.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),$&&$(e,t)},c.__r=function(e){f&&f(e),r=0;var t=(o=e.__c).__H;t&&(i===o?(t.__h=[],o.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(O),t.__h.forEach(P),t.__h=[],r=0)),i=o},c.diffed=function(e){p&&p(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==u.push(t)&&s===c.requestAnimationFrame||((s=c.requestAnimationFrame)||R)(M)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),i=o=null},c.__c=function(e,t){t.some((function(e){try{e.__h.forEach(O),e.__h=e.__h.filter((function(e){return!e.__||P(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],c.__e(n,e.__v)}})),h&&h(e,t)},c.unmount=function(e){m&&m(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{O(e)}catch(e){t=e}})),n.__H=void 0,t&&c.__e(t,n.__v))};var A="function"==typeof requestAnimationFrame;function R(e){var t,n=function(){clearTimeout(r),A&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);A&&(t=requestAnimationFrame(n))}function O(e){var t=o,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),o=t}function P(e){var t=o;e.__c=e.__(),o=t}function D(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function N(e,t){return"function"==typeof t?t(e):t}function F(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function L(e,t){this.props=e,this.context=t}function B(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:F(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,a.n)(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(L.prototype=new a.uA).isPureReactComponent=!0,L.prototype.shouldComponentUpdate=function(e,t){return F(this.props,e)||F(this.state,t)};var H=a.fF.__b;a.fF.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),H&&H(e)};var V="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function G(e){function t(t){if(!("ref"in t))return e(t,null);var n=t.ref;delete t.ref;var r=e(t,n);return t.ref=n,r}return t.$$typeof=V,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var U=function(e,t){return null==e?null:(0,a.v2)((0,a.v2)(e).map(t))},z={map:U,forEach:U,count:function(e){return e?(0,a.v2)(e).length:0},only:function(e){var t=(0,a.v2)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:a.v2},j=a.fF.__e;a.fF.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);j(e,t,n,r)};var W=a.fF.unmount;function Y(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Y(e,t,n)}))),e}function K(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return K(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function q(){this.__u=0,this.t=null,this.__b=null}function Z(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function J(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,a.n)(n,o)}return o.displayName="Lazy",o.__f=!0,o}function X(){this.u=null,this.o=null}a.fF.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),W&&W(e)},(q.prototype=new a.uA).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=Z(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(a):a())};n.__R=s;var a=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=K(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},q.prototype.componentWillUnmount=function(){this.t=[]},q.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Y(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&(0,a.n)(a.FK,null,e.fallback);return o&&(o.__u&=-33),[(0,a.n)(a.FK,null,t.__a?null:e.children),o]};var Q=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function ee(e){return this.getChildContext=function(){return e.context},e.children}function te(e){var t=this,n=e.i;t.componentWillUnmount=function(){(0,a.XX)(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),(0,a.XX)((0,a.n)(ee,{context:t.context},e.__v),t.l)}function ne(e,t){var n=(0,a.n)(te,{__v:e,i:t});return n.containerInfo=t,n}(X.prototype=new a.uA).__a=function(e){var t=this,n=Z(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Q(t,e,r)):o()};n?n(i):i()}},X.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,a.v2)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},X.prototype.componentDidUpdate=X.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Q(e,n,t)}))};var re="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,oe=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ie=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,se=/[A-Z0-9]/g,ae="undefined"!=typeof document,le=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function ue(e,t,n){return null==t.__k&&(t.textContent=""),(0,a.XX)(e,t),"function"==typeof n&&n(),e?e.__c:null}function ce(e,t,n){return(0,a.Qv)(e,t),"function"==typeof n&&n(),e?e.__c:null}a.uA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(a.uA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var de=a.fF.event;function fe(){}function pe(){return this.cancelBubble}function he(){return this.defaultPrevented}a.fF.event=function(e){return de&&(e=de(e)),e.persist=fe,e.isPropagationStopped=pe,e.isDefaultPrevented=he,e.nativeEvent=e};var me,$e={enumerable:!1,configurable:!0,get:function(){return this.class}},ge=a.fF.vnode;a.fF.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},o=-1===n.indexOf("-");for(var i in t){var s=t[i];if(!("value"===i&&"defaultValue"in t&&null==s||ae&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var l=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===s?s="":"translate"===l&&"no"===s?s=!1:"o"===l[0]&&"n"===l[1]?"ondoubleclick"===l?i="ondblclick":"onchange"!==l||"input"!==n&&"textarea"!==n||le(t.type)?"onfocus"===l?i="onfocusin":"onblur"===l?i="onfocusout":ie.test(i)&&(i=l):l=i="oninput":o&&oe.test(i)?i=i.replace(se,"-$&").toLowerCase():null===s&&(s=void 0),"oninput"===l&&r[i=l]&&(i="oninputCapture"),r[i]=s}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,a.v2)(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=(0,a.v2)(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",$e)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=re,ge&&ge(e)};var we=a.fF.__r;a.fF.__r=function(e){we&&we(e),me=e.__c};var ve=a.fF.diffed;a.fF.diffed=function(e){ve&&ve(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),me=null};var ye={ReactCurrentDispatcher:{current:{readContext:function(e){return me.__n[e.__c].props.value},useCallback:E,useContext:C,useDebugValue:T,useDeferredValue:Oe,useEffect:y,useId:I,useImperativeHandle:_,useInsertionEffect:De,useLayoutEffect:b,useMemo:S,useReducer:v,useRef:x,useState:w,useSyncExternalStore:Fe,useTransition:Pe}}},be="18.3.1";function xe(e){return a.n.bind(null,e)}function _e(e){return!!e&&e.$$typeof===re}function Se(e){return _e(e)&&e.type===a.FK}function Ee(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Ce(e){return _e(e)?a.Ob.apply(null,arguments):e}function Te(e){return!!e.__k&&((0,a.XX)(null,e),!0)}function ke(e){return e&&(e.base||1===e.nodeType&&e)||null}var Ie=function(e,t){return e(t)},Me=function(e,t){return e(t)},Ae=a.FK;function Re(e){e()}function Oe(e){return e}function Pe(){return[!1,Re]}var De=b,Ne=_e;function Fe(e,t){var n=t(),r=w({h:{__:n,v:t}}),o=r[0].h,i=r[1];return b((function(){o.__=n,o.v=t,Le(o)&&i({h:o})}),[e,n,t]),y((function(){return Le(o)&&i({h:o}),e((function(){Le(o)&&i({h:o})}))}),[e]),n}function Le(e){var t,n,r=e.v,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}var Be={useState:w,useId:I,useReducer:v,useEffect:y,useLayoutEffect:b,useInsertionEffect:De,useTransition:Pe,useDeferredValue:Oe,useSyncExternalStore:Fe,startTransition:Re,useRef:x,useImperativeHandle:_,useMemo:S,useCallback:E,useContext:C,useDebugValue:T,version:"18.3.1",Children:z,render:ue,hydrate:ce,unmountComponentAtNode:Te,createPortal:ne,createElement:a.n,createContext:a.q6,createFactory:xe,cloneElement:Ce,createRef:a._3,Fragment:a.FK,isValidElement:_e,isElement:Ne,isFragment:Se,isMemo:Ee,findDOMNode:ke,Component:a.uA,PureComponent:L,memo:B,forwardRef:G,flushSync:Me,unstable_batchedUpdates:Ie,StrictMode:Ae,Suspense:q,SuspenseList:X,lazy:J,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ye}},172:(e,t,n)=>{n.d(t,{FK:()=>_,Ob:()=>j,Qv:()=>z,XX:()=>U,_3:()=>x,fF:()=>o,h:()=>y,n:()=>y,q6:()=>W,uA:()=>S,v2:()=>R});var r,o,i,s,a,l,u,c,d,f,p,h={},m=[],$=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function w(e,t){for(var n in t)e[n]=t[n];return e}function v(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function y(e,t,n){var o,i,s,a={};for(s in t)"key"==s?o=t[s]:"ref"==s?i=t[s]:a[s]=t[s];if(arguments.length>2&&(a.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===a[s]&&(a[s]=e.defaultProps[s]);return b(e,a,o,i,null)}function b(e,t,n,r,s){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==s?++i:s,__i:-1,__u:0};return null==s&&null!=o.vnode&&o.vnode(a),a}function x(){return{current:null}}function _(e){return e.children}function S(e,t){this.props=e,this.context=t}function E(e,t){if(null==t)return e.__?E(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?E(e):null}function C(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return C(e)}}function T(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!k.__r++||a!==o.debounceRendering)&&((a=o.debounceRendering)||l)(k)}function k(){var e,t,n,r,i,a,l,c;for(s.sort(u);e=s.shift();)e.__d&&(t=s.length,r=void 0,a=(i=(n=e).__v).__e,l=[],c=[],n.__P&&((r=w({},i)).__v=i.__v+1,o.vnode&&o.vnode(r),F(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[a]:null,l,null==a?E(i):a,!!(32&i.__u),c),r.__v=i.__v,r.__.__k[r.__i]=r,L(l,r,c),r.__e!=a&&C(r)),s.length>t&&s.sort(u));k.__r=0}function I(e,t,n,r,o,i,s,a,l,u,c){var d,f,p,$,g,w=r&&r.__k||m,v=t.length;for(n.__d=l,M(n,t,w),l=n.__d,d=0;d<v;d++)null!=(p=n.__k[d])&&(f=-1===p.__i?h:w[p.__i]||h,p.__i=d,F(e,p,f,o,i,s,a,l,u,c),$=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&H(f.ref,null,p),c.push(p.ref,p.__c||$,p)),null==g&&null!=$&&(g=$),65536&p.__u||f.__k===p.__k?l=A(p,l,e):"function"==typeof p.type&&void 0!==p.__d?l=p.__d:$&&(l=$.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=l,n.__e=g}function M(e,t,n){var r,o,i,s,a,l=t.length,u=n.length,c=u,d=0;for(e.__k=[],r=0;r<l;r++)null!=(o=t[r])&&"boolean"!=typeof o&&"function"!=typeof o?(s=r+d,(o=e.__k[r]="string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?b(null,o,null,null,null):g(o)?b(_,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?b(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,i=null,-1!==(a=o.__i=O(o,n,s,c))&&(c--,(i=n[a])&&(i.__u|=131072)),null==i||null===i.__v?(-1==a&&d--,"function"!=typeof o.type&&(o.__u|=65536)):a!==s&&(a==s-1?d--:a==s+1?d++:(a>s?d--:d++,o.__u|=65536))):o=e.__k[r]=null;if(c)for(r=0;r<u;r++)null!=(i=n[r])&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=E(i)),V(i,i))}function A(e,t,n){var r,o;if("function"==typeof e.type){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=A(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=E(e)),n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function R(e,t){return t=t||[],null==e||"boolean"==typeof e||(g(e)?e.some((function(e){R(e,t)})):t.push(e)),t}function O(e,t,n,r){var o=e.key,i=e.type,s=n-1,a=n+1,l=t[n];if(null===l||l&&o==l.key&&i===l.type&&!(131072&l.__u))return n;if(r>(null==l||131072&l.__u?0:1))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&!(131072&l.__u)&&o==l.key&&i===l.type)return s;s--}if(a<t.length){if((l=t[a])&&!(131072&l.__u)&&o==l.key&&i===l.type)return a;a++}}return-1}function P(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||$.test(t)?n:n+"px"}function D(e,t,n,r,o){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||P(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||P(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=c,e.addEventListener(t,i?f:d,i)):e.removeEventListener(t,i?f:d,i);else{if("http://www.w3.org/2000/svg"==o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function N(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=c++;else if(t.t<n.u)return;return n(o.event?o.event(t):t)}}}function F(e,t,n,r,i,s,a,l,u,c){var d,f,p,h,m,$,v,y,b,x,E,C,T,k,M,A,R=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(u=!!(32&n.__u),s=[l=t.__e=n.__e]),(d=o.__b)&&d(t);e:if("function"==typeof R)try{if(y=t.props,b="prototype"in R&&R.prototype.render,x=(d=R.contextType)&&r[d.__c],E=d?x?x.props.value:d.__:r,n.__c?v=(f=t.__c=n.__c).__=f.__E:(b?t.__c=f=new R(y,E):(t.__c=f=new S(y,E),f.constructor=R,f.render=G),x&&x.sub(f),f.props=y,f.state||(f.state={}),f.context=E,f.__n=r,p=f.__d=!0,f.__h=[],f._sb=[]),b&&null==f.__s&&(f.__s=f.state),b&&null!=R.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=w({},f.__s)),w(f.__s,R.getDerivedStateFromProps(y,f.__s))),h=f.props,m=f.state,f.__v=t,p)b&&null==R.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),b&&null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(b&&null==R.getDerivedStateFromProps&&y!==h&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(y,E),!f.__e&&(null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(y,f.__s,E)||t.__v===n.__v)){for(t.__v!==n.__v&&(f.props=y,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some((function(e){e&&(e.__=t)})),C=0;C<f._sb.length;C++)f.__h.push(f._sb[C]);f._sb=[],f.__h.length&&a.push(f);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(y,f.__s,E),b&&null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(h,m,$)}))}if(f.context=E,f.props=y,f.__P=e,f.__e=!1,T=o.__r,k=0,b){for(f.state=f.__s,f.__d=!1,T&&T(t),d=f.render(f.props,f.state,f.context),M=0;M<f._sb.length;M++)f.__h.push(f._sb[M]);f._sb=[]}else do{f.__d=!1,T&&T(t),d=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++k<25);f.state=f.__s,null!=f.getChildContext&&(r=w(w({},r),f.getChildContext())),b&&!p&&null!=f.getSnapshotBeforeUpdate&&($=f.getSnapshotBeforeUpdate(h,m)),I(e,g(A=null!=d&&d.type===_&&null==d.key?d.props.children:d)?A:[A],t,n,r,i,s,a,l,u,c),f.base=t.__e,t.__u&=-161,f.__h.length&&a.push(f),v&&(f.__E=f.__=null)}catch(e){if(t.__v=null,u||null!=s){for(t.__u|=u?160:128;l&&8===l.nodeType&&l.nextSibling;)l=l.nextSibling;s[s.indexOf(l)]=null,t.__e=l}else t.__e=n.__e,t.__k=n.__k;o.__e(e,t,n)}else null==s&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=B(n.__e,t,n,r,i,s,a,u,c);(d=o.diffed)&&d(t)}function L(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)H(n[r],n[++r],n[++r]);o.__c&&o.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){o.__e(e,t.__v)}}))}function B(e,t,n,i,s,a,l,u,c){var d,f,p,m,$,w,y,b=n.props,x=t.props,_=t.type;if("svg"===_?s="http://www.w3.org/2000/svg":"math"===_?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),null!=a)for(d=0;d<a.length;d++)if(($=a[d])&&"setAttribute"in $==!!_&&(_?$.localName===_:3===$.nodeType)){e=$,a[d]=null;break}if(null==e){if(null===_)return document.createTextNode(x);e=document.createElementNS(s,_,x.is&&x),u&&(o.__m&&o.__m(t,a),u=!1),a=null}if(null===_)b===x||u&&e.data===x||(e.data=x);else{if(a=a&&r.call(e.childNodes),b=n.props||h,!u&&null!=a)for(b={},d=0;d<e.attributes.length;d++)b[($=e.attributes[d]).name]=$.value;for(d in b)if($=b[d],"children"==d);else if("dangerouslySetInnerHTML"==d)p=$;else if(!(d in x)){if("value"==d&&"defaultValue"in x||"checked"==d&&"defaultChecked"in x)continue;D(e,d,null,$,s)}for(d in x)$=x[d],"children"==d?m=$:"dangerouslySetInnerHTML"==d?f=$:"value"==d?w=$:"checked"==d?y=$:u&&"function"!=typeof $||b[d]===$||D(e,d,$,b[d],s);if(f)u||p&&(f.__html===p.__html||f.__html===e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(p&&(e.innerHTML=""),I(e,g(m)?m:[m],t,n,i,"foreignObject"===_?"http://www.w3.org/1999/xhtml":s,a,l,a?a[0]:n.__k&&E(n,0),u,c),null!=a)for(d=a.length;d--;)v(a[d]);u||(d="value","progress"===_&&null==w?e.removeAttribute("value"):void 0!==w&&(w!==e[d]||"progress"===_&&!w||"option"===_&&w!==b[d])&&D(e,d,w,b[d],s),d="checked",void 0!==y&&y!==e[d]&&D(e,d,y,b[d],s))}return e}function H(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){o.__e(e,n)}}function V(e,t,n){var r,i;if(o.unmount&&o.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||H(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){o.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&V(r[i],t,n||"function"!=typeof e.type);n||v(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function G(e,t,n){return this.constructor(e,n)}function U(e,t,n){var i,s,a,l;o.__&&o.__(e,t),s=(i="function"==typeof n)?null:n&&n.__k||t.__k,a=[],l=[],F(t,e=(!i&&n||t).__k=y(_,null,[e]),s||h,h,t.namespaceURI,!i&&n?[n]:s?null:t.firstChild?r.call(t.childNodes):null,a,!i&&n?n:s?s.__e:t.firstChild,i,l),L(a,e,l)}function z(e,t){U(e,t,z)}function j(e,t,n){var o,i,s,a,l=w({},e.props);for(s in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==s?o=t[s]:"ref"==s?i=t[s]:l[s]=void 0===t[s]&&void 0!==a?a[s]:t[s];return arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):n),b(e.type,l,o||e.key,i||e.ref,null)}function W(e,t){var n={__c:t="__cC"+p++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.forEach((function(e){e.__e=!0,T(e)}))},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=m.slice,o={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(t){e=t}throw e}},i=0,S.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=w({},this.state),"function"==typeof e&&(e=e(w({},n),this.props)),e&&w(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),T(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),T(this))},S.prototype.render=_,s=[],l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=function(e,t){return e.__v.__b-t.__v.__b},k.__r=0,c=0,d=N(!1),f=N(!0),p=0},63:(e,t,n)=>{var r=n(299),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,s=r.useEffect,a=r.useLayoutEffect,l=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,c=r[1];return a((function(){o.value=n,o.getSnapshot=t,u(o)&&c({inst:o})}),[e,n,t]),s((function(){return u(o)&&c({inst:o}),e((function(){u(o)&&c({inst:o})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},888:(e,t,n)=>{e.exports=n(63)},919:(e,t,n)=>{var r=n(299);function o(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function i(e){return null!=e&&"function"==typeof e.Dispose}function s(e){i(e)&&e.Dispose()}function a(e,t){return Object.getPrototypeOf(e)?.constructor===Object.getPrototypeOf(t)?.constructor}Symbol.iterator;class l{constructor(e){this.iter=e,this.current=null}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const e=this.iter.next();return this.current=e.value,!e.done}"System.Collections.IEnumerator.Reset"(){throw new Error("JS iterators cannot be reset")}Dispose(){}}function u(e){return function(e){return null!=e&&"function"==typeof e.GetEnumerator}(e)?e.GetEnumerator():new l(e[Symbol.iterator]())}function c(e){return{next(){const t=e["System.Collections.IEnumerator.MoveNext"]();return{done:!t,value:t?e["System.Collections.Generic.IEnumerator`1.get_Current"]():void 0}}}}class d{constructor(e){this.factory=e,this.isValueCreated=!1}get Value(){return this.isValueCreated||(this.createdValue=this.factory(),this.isValueCreated=!0),this.createdValue}get IsValueCreated(){return this.isValueCreated}}function f(e,t){return e.toString(10).padStart(t,"0")}function p(e){const t=e;return"number"==typeof t.offset?t.offset:1===e.kind?0:-6e4*e.getTimezoneOffset()}function h(e,t){return(e=e<0&&null!=t&&10!==t?65535+e+1:e).toString(t)}function m(e,t){return(e=e<0&&null!=t&&10!==t?4294967295+e+1:e).toString(t)}class ${static id(e){return $.idMap.has(e)||$.idMap.set(e,++$.count),$.idMap.get(e)}}function g(e){let t=0,n=5381;const r=e.length;for(;t<r;)n=33*n^e.charCodeAt(t++);return n}function w(e){return 2654435761*e|0}function v(e){let t=0;const n=e.length;for(let r=0;r<n;r++)t=(t<<5)+t^e[r];return t}function y(e){if(null==e)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return w(e);case"bigint":return function(e){return g(e.toString(32))}(e);case"string":return g(e);default:if(function(e){return null!=e&&"function"==typeof e.GetHashCode}(e))return e.GetHashCode();if(o(e))return function(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r++)n[r]=y(e[r]);return v(n)}(e);if(e instanceof Date)return function(e){return e.getTime()}(e);if(Object.getPrototypeOf(e)?.constructor===Object){const t=Object.values(e).map((e=>y(e)));return v(t)}return w($.id(e))}}function b(e,t,n){if(null==e)return null==t;if(null==t)return!1;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function x(e,t){return b(e,t,_)}function _(e,t){return e===t||(null==e?null==t:null!=t&&(function(e){return null!=e&&"function"==typeof e.Equals}(e)?e.Equals(t):o(e)?o(t)&&x(e,t):"object"==typeof e&&(e instanceof Date?t instanceof Date&&0===S(e,t):Object.getPrototypeOf(e)?.constructor===Object&&function(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;n.sort(),r.sort();for(let o=0;o<n.length;o++)if(n[o]!==r[o]||!_(e[n[o]],t[r[o]]))return!1;return!0}(e,t))))}function S(e,t){let n,r;return"offset"in e&&"offset"in t?(n=e.getTime(),r=t.getTime()):(n=e.getTime()+p(e),r=t.getTime()+p(t)),n===r?0:n<r?-1:1}function E(e,t){return e===t?0:e<t?-1:1}function C(e,t){return function(e,t,n){if(null==e)return null==t?0:1;if(null==t)return-1;if(e.length!==t.length)return e.length<t.length?-1:1;for(let r=0,o=0;r<e.length;r++)if(o=n(e[r],t[r]),0!==o)return o;return 0}(e,t,T)}function T(e,t){return e===t?0:null==e?null==t?0:-1:null==t?1:function(e){return null!=e&&"function"==typeof e.CompareTo}(e)?e.CompareTo(t):o(e)?o(t)?C(e,t):-1:"object"!=typeof e?e<t?-1:1:e instanceof Date?t instanceof Date?S(e,t):-1:Object.getPrototypeOf(e)?.constructor===Object?function(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return n.length<r.length?-1:1;n.sort(),r.sort();for(let o=0,i=0;o<n.length;o++){const s=n[o];if(s!==r[o])return s<r[o]?-1:1;if(i=T(e[s],t[s]),0!==i)return i}return 0}(e,t):-1}function k(e){const t={};for(const n of e)t[n[0]]=n[1];return t}$.idMap=new WeakMap,$.count=0;const I=new WeakMap;function M(e){if(null==e)return null;const t=(t,n)=>e(t)(n);return I.set(t,e),t}function A(e){return I.get(e)??(t=>n=>e(t,n))}function R(e){if(null==e)return null;const t=(t,n,r)=>e(t)(n)(r);return I.set(t,e),t}function O(e){return I.get(e)??(t=>n=>r=>e(t,n,r))}const P=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],D=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],F=["January","February","March","April","May","June","July","August","September","October","November","December"];function L(e,t,n){let r=0,o=t;for(;o<e.length&&e[o]===n;)o++,r++;return r}function B(e,t){return t>=e.length-1?-1:e.charCodeAt(t+1)}function H(e,t){let n=t;const r=e[t];let o="",i=!1;for(;t<e.length;){const n=e[++t];if(n===r){i=!0;break}if("\\"===n){if(!(t<e.length))throw new Error("Invalid string format");o+=e[++t]}else o+=n}if(!i)throw new Error(`Invalid string format could not find matching quote for ${r}`);return[o,t-n+1]}function V(e,t,n){let r=0,o=0,i="";const s=n?W(e.getTime(),1):e;for(;r<t.length;){const e=t[r];switch(e){case"d":switch(o=L(t,r,"d"),r+=o,o){case 1:i+=Z(s);break;case 2:i+=f(Z(s),2);break;case 3:i+=P[ne(s)];break;case 4:i+=D[ne(s)]}break;case"f":if(o=L(t,r,"f"),r+=o,o<=3){const e=10**(3-o);i+=f(Math.floor(X(s)/e),o)}else o<=7&&(i+=(""+X(s)).padEnd(o,"0"));break;case"F":if(o=L(t,r,"F"),r+=o,o<=3){const e=10**(3-o),t=Math.floor(X(s)/e);0!=t&&(i+=f(t,o))}else if(o<=7){const e=X(s);0!=e&&(i+=f(e,3))}break;case"g":o=L(t,r,"g"),r+=o,o<=2&&(i+="A.D.");break;case"h":switch(o=L(t,r,"h"),r+=o,o){case 1:i+=J(s)%12;break;case 2:i+=f(J(s)%12,2)}break;case"H":switch(o=L(t,r,"H"),r+=o,o){case 1:i+=J(s);break;case 2:i+=f(J(s),2)}break;case"K":if(o=L(t,r,"K"),r+=o,1===o)switch(G(s)){case 1:i+="Z";break;case 2:i+=U(-6e4*s.getTimezoneOffset())}break;case"m":switch(o=L(t,r,"m"),r+=o,o){case 1:i+=Q(s);break;case 2:i+=f(Q(s),2)}break;case"M":switch(o=L(t,r,"M"),r+=o,o){case 1:i+=ee(s);break;case 2:i+=f(ee(s),2);break;case 3:i+=N[ee(s)-1];break;case 4:i+=F[ee(s)-1]}break;case"s":switch(o=L(t,r,"s"),r+=o,o){case 1:i+=te(s);break;case 2:i+=f(te(s),2)}break;case"t":switch(o=L(t,r,"t"),r+=o,o){case 1:i+=s.getHours()<12?"A":"P";break;case 2:i+=s.getHours()<12?"AM":"PM"}break;case"y":switch(o=L(t,r,"y"),r+=o,o){case 1:i+=s.getFullYear()%100;break;case 2:i+=f(s.getFullYear()%100,2);break;case 3:i+=f(s.getFullYear(),3);break;case 4:i+=f(s.getFullYear(),4);break;case 5:i+=f(s.getFullYear(),5)}break;case"z":o=L(t,r,"z"),r+=o;let a="";switch(G(s)){case 1:a="+00:00";break;case 2:a=U(-6e4*s.getTimezoneOffset());break;case 0:a=U(-6e4*q(s).getTimezoneOffset())}const l="-"===a[0]?"-":"+",u=parseInt(a.substring(1,3),10),c=parseInt(a.substring(4,6),10);switch(o){case 1:i+=`${l}${u}`;break;case 2:i+=`${l}${f(u,2)}`;break;default:i+=`${l}${f(u,2)}:${f(c,2)}`}break;case":":i+=":",r++;break;case"/":i+="/",r++;break;case"'":case'"':const[d,p]=H(t,r);i+=d,r+=p;break;case"%":const h=B(t,r);if(!(h>=0&&h!=="%".charCodeAt(0)))throw new Error("Invalid format string");r+=2,i+=V(s,String.fromCharCode(h),n);break;case"\\":const m=B(t,r);if(!(m>=0))throw new Error("Invalid format string");r+=2,i+=String.fromCharCode(m);break;default:r++,i+=e}}return i}function G(e){return e.kind||0}function U(e){const t=e<0,n=(e=Math.abs(e))%36e5/6e4;return(t?"-":"+")+f(~~(e/36e5),2)+":"+f(n,2)}function z(e,t){const n=e.toISOString();return"first"===t?n.substring(0,n.indexOf("T")):n.substring(n.indexOf("T")+1,n.length-1)}function j(e,t,n){return null!=e.offset?function(e,t){const n=new Date(e.getTime()+(e.offset??0));if("string"!=typeof t)return n.toISOString().replace(/\.\d+/,"").replace(/[A-Z]|\.\d+/g," ")+U(e.offset??0);if(1!==t.length)return V(n,t,!0);switch(t){case"D":case"d":return z(n,"first");case"T":case"t":return z(n,"second");case"O":case"o":return function(e,t){const n=e.toISOString();return n.substring(0,n.length-1)+U(t)}(n,e.offset??0);default:throw new Error("Unrecognized Date print format")}}(e,t):function(e,t){const n=1===e.kind;if("string"!=typeof t)return n?e.toUTCString():e.toLocaleString();if(1!==t.length)return V(e,t,n);switch(t){case"D":case"d":return n?z(e,"first"):e.toLocaleDateString();case"T":case"t":return n?z(e,"second"):e.toLocaleTimeString();case"O":case"o":return function(e,t){if(t)return e.toISOString();{const t=null==e.kind||2===e.kind;return f(e.getFullYear(),4)+"-"+f(e.getMonth()+1,2)+"-"+f(e.getDate(),2)+"T"+f(e.getHours(),2)+":"+f(e.getMinutes(),2)+":"+f(e.getSeconds(),2)+"."+f(e.getMilliseconds(),3)+(t?U(-6e4*e.getTimezoneOffset()):"")}}(e,n);default:throw new Error("Unrecognized Date print format")}}(e,t)}function W(e,t){const n=new Date(e);return n.kind=0|(null==t?0:t),n}function Y(e){function t(){throw new Error(`The string is not a valid Date: ${e}`)}null!=e&&""!==e.trim()||t(),10===e.length&&"-"===e[4]&&"-"===e[7]&&(e+="T00:00:00");let n=new Date(e),r=null;if(isNaN(n.getTime())){const o=/^\s*(\d+[^\w\s:]\d+[^\w\s:]\d+)?\s*(\d+:\d+(?::\d+(?:\.\d+)?)?)?\s*([AaPp][Mm])?\s*(Z|[+-]([01]?\d):?([0-5]?\d)?)?\s*$/.exec(e);if(null!=o){let e,t=0;if(null!=o[2]){const e=o[2].split(":"),n=parseInt(e[0],10);t=3600*n+60*parseInt(e[1]||"0",10)+parseFloat(e[2]||"0"),null!=o[3]&&"PM"===o[3].toUpperCase()&&n<12&&(t+=720)}if(null!=o[4]){if(null!=o[1])e=new Date(o[1]+" UTC");else{const t=new Date;e=new Date(t.getUTCFullYear()+"/"+(t.getUTCMonth()+1)+"/"+t.getUTCDate())}if("Z"===o[4])r="Z";else{let e=60*parseInt(o[5],10)+parseInt(o[6]||"0",10);"-"===o[4][0]&&(e*=-1),r=e,t-=60*e}}else if(null!=o[1])e=new Date(o[1]);else{const t=new Date;e=new Date(t.getFullYear()+"/"+(t.getMonth()+1)+"/"+t.getDate())}n=new Date(e.getTime()+1e3*t),n=new Date(n.getTime()+6e4*(n.getTimezoneOffset()-e.getTimezoneOffset()))}else t();isNaN(n.getTime())&&t()}return[n,r]}function K(e,t){try{return t.contents=function(e,t=!1){const[n,r]=Y(e),o=null!=r?t&&"Z"===r?1:2:0;return W(n.getTime(),o)}(e),!0}catch(e){return!1}}function q(e){return 2===e.kind?e:W(e.getTime(),2)}function Z(e){return 1===e.kind?e.getUTCDate():e.getDate()}function J(e){return 1===e.kind?e.getUTCHours():e.getHours()}function X(e){return 1===e.kind?e.getUTCMilliseconds():e.getMilliseconds()}function Q(e){return 1===e.kind?e.getUTCMinutes():e.getMinutes()}function ee(e){return(1===e.kind?e.getUTCMonth():e.getMonth())+1}function te(e){return 1===e.kind?e.getUTCSeconds():e.getSeconds()}function ne(e){return 1===e.kind?e.getUTCDay():e.getDay()}const re=Symbol("numeric");function oe(e){return"number"==typeof e||"bigint"==typeof e||e?.[re]}function ie(e,t){return"number"==typeof e?e*t:"bigint"==typeof e?e*BigInt(t):e[re]().multiply(t)}function se(e,t){return"number"==typeof e?e.toFixed(t):"bigint"==typeof e?e:e[re]().toFixed(t)}function ae(e,t){return"number"==typeof e?e.toPrecision(t):"bigint"==typeof e?e:e[re]().toPrecision(t)}function le(e,t){return"number"==typeof e?e.toExponential(t):"bigint"==typeof e?e:e[re]().toExponential(t)}function ue(e){return"number"==typeof e?(Number(e)>>>0).toString(16):"bigint"==typeof e?BigInt.asUintN(64,e).toString(16):e[re]().toHex()}function ce(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function de(e,t,n=0){if(null==t)throw new Error("Input cannot ve null");if(!e.global)throw new Error("Non-global RegExp");e.lastIndex=n;const r=[];let o,i=-1;for(;null!=(o=e.exec(t));)o.index===i?e.lastIndex++:(i=o.index,r.push(o));return r}function fe(e,t=0){if(null!=e&&"object"==typeof e){if("function"==typeof e.toString)return e.toString();if(Symbol.iterator in e)return function(e){let t=0,n="[";for(const r of e){if(0===t)n+=fe(r);else{if(100===t){n+="; ...";break}n+="; "+fe(r)}t++}return n+"]"}(e);{const n=Object.getPrototypeOf(e)?.constructor;return n===Object&&t<10?"{ "+Object.entries(e).map((([e,n])=>e+" = "+fe(n,t+1))).join("\n ")+" }":n?.name??""}}return String(e)}class pe{get name(){return this.cases()[this.tag]}toJSON(){return 0===this.fields.length?this.name:[this.name].concat(this.fields)}toString(){return function(e,t){if(0===t.length)return e;{let n,r=!0;return 1===t.length?(n=fe(t[0]),r=n.indexOf(" ")>=0):n=t.map((e=>fe(e))).join(", "),e+(r?" (":" ")+n+(r?")":"")}}(this.name,this.fields)}GetHashCode(){const e=this.fields.map((e=>y(e)));return e.splice(0,0,w(this.tag)),v(e)}Equals(e){return this===e||!!a(this,e)&&this.tag===e.tag&&x(this.fields,e.fields)}CompareTo(e){return this===e?0:a(this,e)?this.tag===e.tag?C(this.fields,e.fields):this.tag<e.tag?-1:1:-1}}class he{toJSON(){return function(e){const t={},n=Object.keys(e);for(let r=0;r<n.length;r++)t[n[r]]=e[n[r]];return t}(this)}toString(){return function(e){return"{ "+Object.entries(e).map((([e,t])=>e+" = "+fe(t))).join("\n ")+" }"}(this)}GetHashCode(){return function(e){const t=Object.values(e).map((e=>y(e)));return v(t)}(this)}Equals(e){return function(e,t){if(e===t)return!0;if(a(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++)if(!_(e[n[r]],t[n[r]]))return!1;return!0}return!1}(this,e)}CompareTo(e){return function(e,t){if(e===t)return 0;if(a(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=T(e[n[r]],t[n[r]]);if(0!==o)return o}return 0}return-1}(this,e)}}class me{get contents(){return this.getter()}set contents(e){this.setter(e)}constructor(e,t){"function"==typeof t?(this.getter=e,this.setter=t):(this.getter=()=>e,this.setter=t=>{e=t})}}class $e{constructor(e){this.message=e}}function ge(e){return function(e){return e instanceof $e||e instanceof Error}(e)||function(e){return e instanceof Promise}(e)?e:new Error(String(e))}const we=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,ve=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function ye(e,t){return function(e,t){return"number"==typeof e||"bigint"==typeof e?e<t?-1:e>t?1:0:e.CompareTo(t)}(e,t)<0}function be(e){return{input:e,cont:(t=e,e=>{we.lastIndex=0;const n=[],r=[];let o=0,i=we.exec(t);for(;i;){const e=i.index+(i[1]||"").length;n.push(t.substring(o,e).replace(/%%/g,"%")),r.push(i),o=we.lastIndex,we.lastIndex-=1,i=we.exec(t)}return 0===n.length?e(t.replace(/%%/g,"%")):(n.push(t.substring(o).replace(/%%/g,"%")),Ce(e,n,r))})};var t}function xe(e,t){return"string"==typeof t?e(t):t.cont(e)}function _e(e){return xe((e=>e),e)}function Se(e){return xe((e=>{throw new Error(e)}),e)}function Ee(e,t,n,r,o){let i="";if(t=t||"",o=o||"",oe(e))switch("x"!==o.toLowerCase()&&(ye(e,0)?(e=ie(e,-1),i="-"):t.indexOf(" ")>=0?i=" ":t.indexOf("+")>=0&&(i="+")),r=null==r?null:parseInt(r,10),o){case"f":case"F":e=se(e,r=null!=r?r:6);break;case"g":case"G":e=null!=r?ae(e,r):ae(e);break;case"e":case"E":e=null!=r?le(e,r):le(e);break;case"x":e=ue(e);break;case"X":e=ue(e).toUpperCase();break;default:e=String(e)}else e=e instanceof Date?j(e):fe(e);if(n="number"==typeof n?n:parseInt(n,10),isNaN(n))e=i+e;else{const r=t.indexOf("0")>=0,o=t.indexOf("-")>=0,s=o||!r?" ":"0";e="0"===s?i+(e=ke(e,n-i.length,s,o)):ke(i+e,n,s,o)}return e}function Ce(e,t,n,r="",o=-1){return(...i)=>{let s=r;const a=t.slice(),l=n.slice();for(const e of i){const[,,t,n,r,i]=l[0];let u=n;if(o>=0)u=o,o=-1;else if("*"===u){if(e<0)throw new Error("Non-negative number required");o=e;continue}s+=a[0],s+=Ee(e,t,u,r,i),a.splice(0,1),l.splice(0,1)}return 0===l.length?(s+=a[0],e(s)):Ce(e,a,l,s,o)}}function Te(e,t){return Array.isArray(t)?t.join(e):Array.from(t).join(e)}function ke(e,t,n,r){n=n||" ",t-=e.length;for(let o=0;o<t;o++)e=r?e+n:n+e;return e}function Ie(e,t,n){return ke(e,t,n)}function Me(e,t,n,r){if(r="number"==typeof r?r:0,(n="number"==typeof n?n:void 0)&&n<0)throw new Error("Count cannot be less than zero");if(0===n)return[];const o=!(1&~r),i=!(2&~r);t=(t=t||[]).filter((e=>e)).map(ce),t=t.length>0?t:["\\s"];const s=[],a=new RegExp(t.join("|"),"g");let l=!0,u=0;do{const t=a.exec(e);if(null===t){const t=i?e.substring(u).trim():e.substring(u);(!o||t.length>0)&&s.push(t),l=!1}else{const r=i?e.substring(u,t.index).trim():e.substring(u,t.index);(!o||r.length>0)&&(null!=n&&s.length+1===n?(s.push(i?e.substring(u).trim():e.substring(u)),l=!1):s.push(r)),u=a.lastIndex}}while(l);return s}function Ae(e,t){return t.split("").filter((t=>e(t))).join("")}var Re=n(725);class Oe{constructor(e){this.value=e}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return y(this.value)}Equals(e){return null!=e&&_(this.value,e instanceof Oe?e.value:e)}CompareTo(e){return null==e?1:T(this.value,e instanceof Oe?e.value:e)}}function Pe(e){if(null==e)throw new Error("Option has no value");return e instanceof Oe?e.value:e}function De(e){return e instanceof Oe?e.value:e}function Ne(e){return null==e||e instanceof Oe?new Oe(e):e}function Fe(e){return null==e?void 0:e}function Le(e){return null==e?null:Pe(e)}function Be(e){return null==e?[]:[Pe(e)]}function He(e,t){return null!=e?Pe(e):t}function Ve(e,t){return null!=t?Ne(e(Pe(t))):void 0}const Ge="Collection was empty.";function Ue(e,t){return"function"==typeof e?new e(t):new Array(t)}function ze(e,t,n,r){const o=0|t;return e.fill(r,o,o+n)}function je(e,t,n){const r=0|t.length,o=Ue(n,r);for(let n=0;n<=r-1;n++)Ke(o,n,e(Ye(n,t)));return o}function We(e,t,n){const r=e;return n.reduce(r,t)}function Ye(e,t){if(e<0||e>=t.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");return t[e]}function Ke(e,t,n){if(t<0||t>=e.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");e[t]=n}function qe(e,t,n){return t.reduceRight(((t,n)=>e(n,t)),n)}class Ze extends he{constructor(e,t){super(),this.head=e,this.tail=t}toString(){return"["+Te("; ",this)+"]"}Equals(e){return this===e||((e,t)=>{e:for(;;){const n=e,r=t,o=n.tail,i=r.tail;if(null!=o){if(null!=i){const s=Pe(o),a=Pe(i);if(_(n.head,r.head)){e=s,t=a;continue e}return!1}return!1}return null==i}})(this,e)}GetHashCode(){return 0|((e,t,n)=>{for(;;){const r=e,o=t,i=n,s=i.tail;if(null==s)return 0|o;{const a=Pe(s);if(r>18)return 0|o;e=r+1,t=(o<<1)+y(i.head)+631*r,n=a}}})(0,0,this)}toJSON(){return Array.from(this)}CompareTo(e){return 0|((e,t)=>{e:for(;;){const n=e,r=t,o=n.tail,i=r.tail;if(null!=o){if(null!=i){const s=Pe(o),a=Pe(i),l=0|T(n.head,r.head);if(0===l){e=s,t=a;continue e}return 0|l}return 1}return null!=i?-1:0}})(this,e)}GetEnumerator(){return new Je(this)}[Symbol.iterator](){return c(u(this))}"System.Collections.IEnumerable.GetEnumerator"(){return u(this)}}class Je{constructor(e){this.xs=e,this.it=this.xs,this.current=null}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const e=this,t=e.it.tail;if(null!=t){const n=Pe(t);return e.current=e.it.head,e.it=n,!0}return!1}"System.Collections.IEnumerator.Reset"(){const e=this;e.it=e.xs,e.current=null}Dispose(){}}function Xe(){return new Ze(null,void 0)}function Qe(e,t){return new Ze(e,t)}function et(e){return null==e.tail}function tt(e){return 0|((e,t)=>{for(;;){const n=e,r=t.tail;if(null==r)return 0|n;e=n+1,t=Pe(r)}})(0,e)}function nt(e){if(null!=e.tail)return e.head;throw new Error(Ge+"\\nParameter name: list")}function rt(e){const t=e.tail;if(null!=t)return Pe(t);throw new Error(Ge+"\\nParameter name: list")}function ot(){return Xe()}function it(e,t){return Qe(e,t)}function st(e){return Qe(e,Xe())}function at(e){return et(e)}function lt(e){return nt(e)}function ut(e){return rt(e)}function ct(e){const t=0|tt(e),n=ze(new Array(t),0,t,null);return((e,t)=>{for(;;){const r=e,o=t;if(et(o))break;Ke(n,r,nt(o)),e=r+1,t=rt(o)}})(0,e),n}function dt(e,t,n){let r=t,o=n;for(;!et(o);)r=e(r,lt(o)),o=rt(o);return r}function ft(e){return dt(((e,t)=>Qe(t,e)),Xe(),e)}function pt(e,t){dt(((t,n)=>{e(n)}),void 0,t)}function ht(e,t){let n=t;for(let t=e.length-1;t>=0;t--)n=Qe(Ye(t,e),n);return n}function mt(e){return ht(e,Xe())}function $t(e,t){return dt(((e,t)=>Qe(t,e)),t,ft(e))}function gt(e,t){const n=Xe(),r=dt(((t,n)=>{const r=new Ze(e(n),void 0);return t.tail=r,r}),n,t),o=Xe();return r.tail=o,rt(n)}function wt(e,t){const n=Xe(),r=dt(((t,n)=>{if(e(n)){const e=new Ze(n,void 0);return t.tail=e,e}return t}),n,t),o=Xe();return r.tail=o,rt(n)}function vt(e,t){const n=Xe(),r=dt(((t,n)=>{const r=e(n);if(null==r)return t;{const e=new Ze(Pe(r),void 0);return t.tail=e,e}}),n,t),o=Xe();return r.tail=o,rt(n)}const yt=r.default,bt=fe(Re.A),xt=(0,r.createElement)("svg",k(mt([["className",Te(" ",["h-5","w-5","text-gray-400"])],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],["fill","currentColor"],(()=>{let e;const t=st((0,r.createElement)("path",k(st((e="M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z",["d","M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"])))));return["children",yt.Children.toArray(Array.from(t))]})()]))),_t=(0,r.createElement)("svg",k(mt([["className",Te(" ",["h-5","w-5","text-gray-400"])],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],["fill","currentColor"],(()=>{let e;const t=st((0,r.createElement)("path",k(mt([(e="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",["d","M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"]),["fill-rule","evenodd"],["clipRule","evenodd"]]))));return["children",yt.Children.toArray(Array.from(t))]})()]))),St=(0,r.createElement)("svg",k(mt([["className",Te(" ",["h-6","w-6","text-gray-400","group-hover:text-primary-hover"])],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],["fill","none"],["stroke","currentColor"],["strokeWidth",2],(()=>{const e=st((0,r.createElement)("path",{d:"M18 12H6",strokeLinejoin:"round",strokeLinecap:"round"}));return["children",yt.Children.toArray(Array.from(e))]})()]))),Et=(0,r.createElement)("svg",k(mt([["className",Te(" ",["h-6","w-6","text-gray-400","group-hover:text-primary-hover"])],["viewBox","0 0 24 24"],["xmlns","http://www.w3.org/2000/svg"],["fill","none"],["stroke","currentColor"],["strokeWidth",2],(()=>{const e=st((0,r.createElement)("path",{d:"M12 6v6m0 0v6m0-6h6m-6 0H6",strokeLinejoin:"round",strokeLinecap:"round"}));return["children",yt.Children.toArray(Array.from(e))]})()]))),Ct=(0,r.createElement)("svg",k(mt([["className",Te(" ",["h-5","w-5"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=st((0,r.createElement)("path",k(mt([["fill-rule","evenodd"],(e="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",["d","M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"]),["clipRule","evenodd"]]))));return["children",yt.Children.toArray(Array.from(t))]})()]))),Tt=(0,r.createElement)("svg",k(mt([["className",Te(" ",["h-5","w-5","text-gray-400"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=st((0,r.createElement)("path",k(mt([["fill-rule","evenodd"],(e="M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",["d","M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z"]),["clipRule","evenodd"]]))));return["children",yt.Children.toArray(Array.from(t))]})()]))),kt=(0,r.createElement)("svg",k(mt([["className",Te(" ",["h-5","w-5","text-amber-400","flex-none"])],["fill","currentColor"],["viewBox","0 0 20 20"],["xmlns","http://www.w3.org/2000/svg"],(()=>{let e;const t=st((0,r.createElement)("path",k(mt([["fill-rule","evenodd"],(e="M8.25706 3.09858C9.02167 1.73928 10.9788 1.73928 11.7434 3.09858L17.3237 13.0191C18.0736 14.3523 17.1102 15.9996 15.5805 15.9996H4.4199C2.89025 15.9996 1.92682 14.3523 2.67675 13.0191L8.25706 3.09858ZM11.0001 12.9998C11.0001 13.552 10.5524 13.9998 10.0001 13.9998C9.44784 13.9998 9.00012 13.552 9.00012 12.9998C9.00012 12.4475 9.44784 11.9998 10.0001 11.9998C10.5524 11.9998 11.0001 12.4475 11.0001 12.9998ZM10.0001 4.99976C9.44784 4.99976 9.00012 5.44747 9.00012 5.99976V8.99976C9.00012 9.55204 9.44784 9.99976 10.0001 9.99976C10.5524 9.99976 11.0001 9.55204 11.0001 8.99976V5.99976C11.0001 5.44747 10.5524 4.99976 10.0001 4.99976Z",["d","M8.25706 3.09858C9.02167 1.73928 10.9788 1.73928 11.7434 3.09858L17.3237 13.0191C18.0736 14.3523 17.1102 15.9996 15.5805 15.9996H4.4199C2.89025 15.9996 1.92682 14.3523 2.67675 13.0191L8.25706 3.09858ZM11.0001 12.9998C11.0001 13.552 10.5524 13.9998 10.0001 13.9998C9.44784 13.9998 9.00012 13.552 9.00012 12.9998C9.00012 12.4475 9.44784 11.9998 10.0001 11.9998C10.5524 11.9998 11.0001 12.4475 11.0001 12.9998ZM10.0001 4.99976C9.44784 4.99976 9.00012 5.44747 9.00012 5.99976V8.99976C9.00012 9.55204 9.44784 9.99976 10.0001 9.99976C10.5524 9.99976 11.0001 9.55204 11.0001 8.99976V5.99976C11.0001 5.44747 10.5524 4.99976 10.0001 4.99976Z"]),["clipRule","evenodd"]]))));return["children",yt.Children.toArray(Array.from(t))]})()]))),It=mt(["flex","flex-col","align-center"]),Mt="The input sequence has an insufficient number of elements.";function At(){throw new Error("Enumeration has not started. Call MoveNext.")}function Rt(){throw new Error("Enumeration already finished.")}class Ot{constructor(e){this.f=e}toString(){let e=0,t="seq [";const n=u(this);try{for(;e<4&&n["System.Collections.IEnumerator.MoveNext"]();)e>0&&(t+="; "),t+=fe(n["System.Collections.Generic.IEnumerator`1.get_Current"]()),e=e+1|0;return 4===e&&(t+="; ..."),t+"]"}finally{s(n)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return c(u(this))}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}class Pt{constructor(e,t,n){this.current=e,this.next=t,this.dispose=n}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current()}"System.Collections.IEnumerator.get_Current"(){return this.current()}"System.Collections.IEnumerator.MoveNext"(){return this.next()}"System.Collections.IEnumerator.Reset"(){!function(){throw new Error("Reset is not supported on this enumerator.")}()}Dispose(){this.dispose()}}function Dt(e,t,n){return new Pt(e,t,n)}function Nt(e,t,n){let r,o=!1,i=Ne(e());const s=()=>{if(null!=i){const e=Pe(i);try{n(e)}finally{i=void 0}}},a=()=>{try{s()}finally{r=void 0}};return Dt((()=>(o||At(),null!=r?Pe(r):Rt())),(()=>{if(o||(o=!0),null!=i){const e=Pe(i);let n;try{n=t(e)}catch(e){throw a(),e}return null!=n?(r=n,!0):(a(),!1)}return!1}),s)}function Ft(e){return function(e){return new Ot(e)}(e)}function Lt(e){return t="source",null==e&&function(e){throw new Error(e)}(t),u(e);var t}function Bt(e){return Ft((()=>u(e())))}function Ht(e){return Ft((()=>function(e){let t,n,r,o=!1,i=!1;const a=()=>{if(i=!0,null!=n){const e=Pe(n);try{s(e)}finally{n=void 0}}if(null!=t){const e=Pe(t);try{s(e)}finally{t=void 0}}};return Dt((()=>(o?i&&Rt():At(),null!=r?Pe(r):Rt())),(()=>{let l;if(o||(o=!0),i)return!1;{let o;for(;null==o;){const i=t;if(null!=i)if(null!=n){const e=Pe(n);if(e["System.Collections.IEnumerator.MoveNext"]())r=Ne(e["System.Collections.Generic.IEnumerator`1.get_Current"]()),o=!0;else try{s(e)}finally{n=void 0}}else{const e=Pe(i);e["System.Collections.IEnumerator.MoveNext"]()?(l=e["System.Collections.Generic.IEnumerator`1.get_Current"](),n=u(l)):(a(),o=!1)}else t=u(e)}return Pe(o)}}),(()=>{i||a()}))}(e)))}function Vt(){return Bt((()=>new Array(0)))}function Gt(e){return Bt((()=>function(e){const t=Ue(void 0,1);return Ke(t,0,e),t}(e)))}function Ut(e){return e instanceof Ze?ct(e):Array.from(e)}function zt(e){return o(e)?mt(e):e instanceof Ze?e:function(e){let t,n;if(o(e))return mt(e);if(e instanceof Ze)return e;{const r=Xe();let o=r;const i=u(e);try{for(;i["System.Collections.IEnumerator.MoveNext"]();){const e=i["System.Collections.Generic.IEnumerator`1.get_Current"]();t=o,n=new Ze(e,void 0),t.tail=n,o=n}}finally{s(i)}const a=o,l=Xe();return a.tail=l,rt(r)}}(e)}function jt(e,t,n){return Ft((()=>Nt(e,t,n)))}function Wt(e,t,n){return Ft((()=>{let r=-1;return Nt(e,(e=>(r=r+1|0,t(r,e))),n)}))}function Yt(e,t){return Ht([e,t])}function Kt(e,t,n){const r=Lt(t);try{let t=!1;for(;!t&&r["System.Collections.IEnumerator.MoveNext"]();)t=n.Equals(e,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return t}finally{s(r)}}function qt(e,t){return function(e,t){return jt((()=>Lt(t)),(t=>{let n;for(;null==n&&t["System.Collections.IEnumerator.MoveNext"]();)n=e(t["System.Collections.Generic.IEnumerator`1.get_Current"]());return n}),(e=>{s(e)}))}((t=>e(t)?Ne(t):void 0),t)}function Zt(e,t,n){const r=Lt(n);try{let n=t;for(;r["System.Collections.IEnumerator.MoveNext"]();)n=e(n,r["System.Collections.Generic.IEnumerator`1.get_Current"]());return n}finally{s(r)}}function Jt(e,t){Zt(((t,n)=>{e(n)}),void 0,t)}function Xt(e,t){return jt((()=>Lt(t)),(t=>t["System.Collections.IEnumerator.MoveNext"]()?Ne(e(t["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0),(e=>{s(e)}))}function Qt(e){return Bt((()=>function(e){return e.slice().reverse()}(Ut(e))))}function en(e,t){return Ft((()=>{const n=Lt(t);try{for(let t=1;t<=e;t++)if(!n["System.Collections.IEnumerator.MoveNext"]())throw new Error(Mt+"\\nParameter name: source");return function(e,t){return Dt((()=>t["System.Collections.Generic.IEnumerator`1.get_Current"]()),(()=>t["System.Collections.IEnumerator.MoveNext"]()),(()=>{try{s(t)}finally{e()}}))}((()=>{}),n)}catch(e){throw s(n),e}}))}function tn(e,t){return Bt((()=>Ht(Xt(e,t))))}function nn(e){return{Dispose(){e()}}}Symbol.iterator;class rn{constructor(e=!1){this._id=0,this._cancelled=e,this._listeners=new Map}get isCancelled(){return this._cancelled}cancel(){if(!this._cancelled){this._cancelled=!0;for(const[,e]of this._listeners)e()}}addListener(e){const t=this._id;return this._listeners.set(this._id++,e),t}removeListener(e){return this._listeners.delete(e)}register(e,t){const n=this,r=this.addListener(null==t?e:()=>e(t));return{Dispose(){n.removeListener(r)}}}Dispose(){}}class on extends Error{constructor(){super("The operation was canceled"),Object.setPrototypeOf(this,on.prototype)}}class sn{static get maxTrampolineCallCount(){return 2e3}constructor(){this.callCount=0}incrementAndCheck(){return this.callCount++>sn.maxTrampolineCallCount}hijack(e){this.callCount=0,setTimeout(e,0)}}function an(e){return t=>{if(t.cancelToken.isCancelled)t.onCancel(new on);else if(t.trampoline.incrementAndCheck())t.trampoline.hijack((()=>{try{e(t)}catch(e){t.onError(ge(e))}}));else try{e(t)}catch(e){t.onError(ge(e))}}}const ln=new class{Bind(e,t){return function(e,t){return an((n=>{e({onSuccess:e=>{try{t(e)(n)}catch(e){n.onError(ge(e))}},onError:n.onError,onCancel:n.onCancel,cancelToken:n.cancelToken,trampoline:n.trampoline})}))}(e,t)}Combine(e,t){return this.Bind(e,(()=>t))}Delay(e){return an((t=>e()(t)))}For(e,t){const n=e[Symbol.iterator]();let r=n.next();return this.While((()=>!r.done),this.Delay((()=>{const e=t(r.value);return r=n.next(),e})))}Return(e){return function(e){return an((t=>t.onSuccess(e)))}(e)}ReturnFrom(e){return e}TryFinally(e,t){return an((n=>{e({onSuccess:e=>{t(),n.onSuccess(e)},onError:e=>{t(),n.onError(e)},onCancel:e=>{t(),n.onCancel(e)},cancelToken:n.cancelToken,trampoline:n.trampoline})}))}TryWith(e,t){return an((n=>{e({onSuccess:n.onSuccess,onCancel:n.onCancel,cancelToken:n.cancelToken,trampoline:n.trampoline,onError:e=>{try{t(e)(n)}catch(e){n.onError(ge(e))}}})}))}Using(e,t){return this.TryFinally(t(e),(()=>e.Dispose()))}While(e,t){return e()?this.Bind(t,(()=>this.While(e,t))):this.Return(void 0)}Zero(){return an((e=>e.onSuccess(void 0)))}};function un(e){}function cn(e){const t=new rn("boolean"==typeof e&&e);return"number"==typeof e&&setTimeout((()=>{t.cancel()}),e),t}function dn(e){e.cancel()}const fn=new rn;function pn(e){return an((t=>{let n;const r=setTimeout((()=>{t.cancelToken.removeListener(n),t.onSuccess(void 0)}),e);n=t.cancelToken.addListener((()=>{clearTimeout(r),t.onCancel(new on)}))}))}function hn(e,t){return function(e,t){return function(e,t,n,r,o){"function"!=typeof t&&(o=t,t=void 0);const i=new sn;e({onSuccess:t||un,onError:n||un,onCancel:r||un,cancelToken:o||fn,trampoline:i})}(e,t)}(e,t)}class mn extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["HasNotStartedYet","InProgress","Resolved","Failed"]}}function $n(e,t){let n;const o=cn();return n=yt.useRef(o),function(e){const t=yt.useRef(void 0),n=yt.useRef(!1),o=yt.useRef(!1);var i,a;n.current&&(o.current=!0),i=()=>{return r=n.current?void 0:(n.current=!0,t.current=Ne(e()),o.current?t.current:void 0),{Dispose(){Jt((e=>{s(e)}),Be(r))}};var r},a=[],(0,r.useEffect)((()=>{const e=i();return()=>{e.Dispose()}}),a)}((()=>nn((()=>{dn(n.current)})))),function(e){const t=yt.useRef(e),n=yt.useCallback((e=>t.current(e)),[]);var o;return o=n=>(t.current=e,nn((()=>{}))),(0,r.useLayoutEffect)((()=>{const e=o();return()=>{e.Dispose()}})),n}((r=>{var o;null!=(o=n.current)&&o.isCancelled||hn(ln.Delay((()=>ln.TryWith(ln.Delay((()=>(t(new mn(1,[])),ln.Bind(e(r),(e=>(t(new mn(2,[e])),ln.Zero())))))),(e=>(t(new mn(3,[e])),ln.Zero()))))),n.current)}))}class gn extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]}}class wn extends pe{constructor(e,t){super(),this.tag=0,this.fields=[e,t]}cases(){return["Header"]}}class vn extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Empty","Text","Binary","Form"]}}class yn extends he{constructor(e,t,n,r,o,i,s,a){super(),this.url=e,this.method=t,this.headers=n,this.withCredentials=r,this.overridenMimeType=o,this.overridenResponseType=i,this.timeout=s,this.content=a}}class bn extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Text","Blob","ArrayBuffer","Unknown"]}}class xn extends he{constructor(e,t,n,r,o,i){super(),this.statusCode=0|e,this.responseText=t,this.responseType=n,this.responseUrl=r,this.responseHeaders=o,this.content=i}}class _n{constructor(e,t){this.k=e,this.v=t}}function Sn(e,t){return new _n(e,t)}function En(e){return e.k}function Cn(e){return e.v}class Tn extends _n{constructor(e,t,n,r,o){super(e,t),this.left=n,this.right=r,this.h=0|o}}function kn(e,t,n,r,o){return new Tn(e,t,n,r,o)}function In(e){return e.left}function Mn(e){return e.right}function An(e){return e.h}function Rn(e,t){e:for(;;){const n=e;if(null!=t){const r=Pe(t);if(r instanceof Tn){const o=r;e=Rn(n+1,In(o)),t=Mn(o);continue e}return n+1|0}return 0|n}}function On(e){return Rn(0,e)}function Pn(e,t,n,r){let o,i,s,a;if(null!=e){const t=Pe(e);s=t instanceof Tn?(o=t,An(o)):1}else s=0;if(null!=r){const e=Pe(r);a=e instanceof Tn?(i=e,An(i)):1}else a=0;const l=0|(s<a?a:s);return 0===l?Sn(t,n):kn(t,n,e,r,l+1)}function Dn(e,t,n,r){let o,i,s,a,l,u,c,d,f,p;if(null!=e){const t=Pe(e);f=t instanceof Tn?(o=t,An(o)):1}else f=0;if(null!=r){const e=Pe(r);p=e instanceof Tn?(i=e,An(i)):1}else p=0;if(p>f+2){const o=Pe(r);if(o instanceof Tn){const r=o;if(s=In(r),(null!=s?(a=Pe(s),a instanceof Tn?(l=a,An(l)):1):0)>f+1){const o=Pe(In(r));if(o instanceof Tn){const i=o;return Pn(Pn(e,t,n,In(i)),En(i),Cn(i),Pn(Mn(i),En(r),Cn(r),Mn(r)))}throw new Error("internal error: Map.rebalance")}return Pn(Pn(e,t,n,In(r)),En(r),Cn(r),Mn(r))}throw new Error("internal error: Map.rebalance")}if(f>p+2){const o=Pe(e);if(o instanceof Tn){const e=o;if(u=Mn(e),(null!=u?(c=Pe(u),c instanceof Tn?(d=c,An(d)):1):0)>p+1){const o=Pe(Mn(e));if(o instanceof Tn){const i=o;return Pn(Pn(In(e),En(e),Cn(e),In(i)),En(i),Cn(i),Pn(Mn(i),t,n,r))}throw new Error("internal error: Map.rebalance")}return Pn(In(e),En(e),Cn(e),Pn(Mn(e),t,n,r))}throw new Error("internal error: Map.rebalance")}return Pn(e,t,n,r)}function Nn(e,t,n,r){if(null!=r){const o=Pe(r),i=0|e.Compare(t,En(o));if(o instanceof Tn){const r=o;return i<0?Dn(Nn(e,t,n,In(r)),En(r),Cn(r),Mn(r)):0===i?kn(t,n,In(r),Mn(r),An(r)):Dn(In(r),En(r),Cn(r),Nn(e,t,n,Mn(r)))}return i<0?kn(t,n,void 0,r,2):0===i?Sn(t,n):kn(t,n,r,void 0,2)}return Sn(t,n)}function Fn(e,t,n){e:for(;;){const r=e,o=t;if(null!=n){const i=Pe(n),s=0|r.Compare(o,En(i));if(0===s)return Ne(Cn(i));if(i instanceof Tn){const a=i;e=r,t=o,n=s<0?In(a):Mn(a);continue e}return}return}}function Ln(e,t,n,r,o){return t(n,r)?Nn(e,n,r,o):o}function Bn(e,t,n,r){e:for(;;){const o=e,i=t,s=r;if(null!=n){const a=Pe(n);if(a instanceof Tn){const l=a,u=Bn(o,i,In(l),s),c=Ln(o,i,En(l),Cn(l),u);e=o,t=i,n=Mn(l),r=c;continue e}return Ln(o,i,En(a),Cn(a),s)}return s}}function Hn(e,t,n){return Bn(e,t,n,void 0)}function Vn(e,t){e:for(;;){const n=e;if(null!=t){const r=Pe(t);if(r instanceof Tn){const o=r;Vn(n,In(o)),n(En(o),Cn(o)),e=n,t=Mn(o);continue e}n(En(r),Cn(r))}break}}function Gn(e,t){Vn(e,t)}function Un(e,t){if(null!=t){const n=Pe(t);if(n instanceof Tn){const t=n,r=Un(e,In(t)),o=e(En(t),Cn(t)),i=Un(e,Mn(t));return kn(En(t),o,r,i,An(t))}return Sn(En(n),e(En(n),Cn(n)))}}function zn(e,t){return Un(e,t)}function jn(e,t){if(o(t))return function(e,t){let n;for(let r=0;r<=t.length-1;r++){const o=Ye(r,t);n=Nn(e,o[0],o[1],n)}return n}(e,t);if(t instanceof Ze)return function(e,t){return dt(((t,n)=>Nn(e,n[0],n[1],t)),void 0,t)}(e,t);{const n=u(t);try{return function(e,t,n){for(;;){const r=e,o=t,i=n;if(!i["System.Collections.IEnumerator.MoveNext"]())return o;{const s=i["System.Collections.Generic.IEnumerator`1.get_Current"]();e=r,t=Nn(r,s[0],s[1],o),n=i}}}(e,void 0,n)}finally{s(n)}}}class Wn extends he{constructor(e,t){super(),this.stack=e,this.started=t}}function Yn(e){e:for(;;){const t=e;if(at(t))return ot();{const n=ut(t),r=lt(t);if(null!=r){const o=Pe(r);if(o instanceof Tn){const t=o;e=ht([In(t),Sn(En(t),Cn(t)),Mn(t)],n);continue e}return t}e=n;continue e}}}function Kn(e){return new Wn(Yn(st(e)),!1)}function qn(e){if(e.started){const t=e.stack;if(at(t))return function(){throw new Error("enumeration already finished")}();if(null!=lt(t)){const e=Pe(lt(t));if(e instanceof Tn)throw new Error("Please report error: Map iterator, unexpected stack for current");return[En(e),Cn(e)]}throw new Error("Please report error: Map iterator, unexpected stack for current")}return function(){throw new Error("enumeration not started")}()}function Zn(e){let t=Kn(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>qn(t),"System.Collections.IEnumerator.get_Current":()=>qn(t),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const t=e.stack;if(at(t))return!1;if(null!=lt(t)){if(Pe(lt(t))instanceof Tn)throw new Error("Please report error: Map iterator, unexpected stack for moveNext");return e.stack=Yn(ut(t)),!at(e.stack)}throw new Error("Please report error: Map iterator, unexpected stack for moveNext")}return e.started=!0,!at(e.stack)}(t),"System.Collections.IEnumerator.Reset"(){t=Kn(e)},Dispose(){}}}class Jn{constructor(e,t){this.comparer=e,this.tree=t}GetHashCode(){return 0|function(e){const t=(e,t)=>(e<<1)+t+631;let n=0;const r=u(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n=0|t(n,y(e[0])),n=0|t(n,y(e[1]))}}finally{s(r)}return 0|n}(this)}Equals(e){if(!(e instanceof Jn))return!1;{const t=e,n=u(this);try{const e=u(t);try{const t=()=>{const r=n["System.Collections.IEnumerator.MoveNext"]();if(r===e["System.Collections.IEnumerator.MoveNext"]()){if(r){const r=n["System.Collections.Generic.IEnumerator`1.get_Current"](),o=e["System.Collections.Generic.IEnumerator`1.get_Current"]();return!(!_(r[0],o[0])||!_(r[1],o[1]))&&t()}return!0}return!1};return t()}finally{s(e)}}finally{s(n)}}}toString(){return"map ["+Te("; ",Xt((e=>function(e,...t){let n;return"object"==typeof e?(n=String(t[0]),t.shift()):n=e,n.replace(ve,((e,n,r,o,i,s)=>{if(n<0||n>=t.length)throw new Error("Index must be greater or equal to zero and less than the arguments' length.");let a=t[n];if(oe(a))switch(i=null==i?null:parseInt(i,10),o){case"f":case"F":a=se(a,i=null!=i?i:2);break;case"g":case"G":a=null!=i?ae(a,i):ae(a);break;case"e":case"E":a=null!=i?le(a,i):le(a);break;case"p":case"P":i=null!=i?i:2,a=se(ie(a,100),i)+" %";break;case"d":case"D":a=null!=i?Ie(String(a),i,"0"):String(a);break;case"x":case"X":a=null!=i?Ie(ue(a),i,"0"):ue(a),"X"===o&&(a=a.toUpperCase());break;default:if(s){let e="";a=s.replace(/([0#,]+)(\.[0#]+)?/,((t,n,r)=>{ye(a,0)&&(a=ie(a,-1),e="-"),r=null==r?"":r.substring(1),a=se(a,Math.max(r.length,0));let[o,i]=a.split(".");i||(i=""),o=Ie(o,n.replace(/,/g,"").replace(/^#+/,"").length,"0");const s=r.replace(/#+$/,"").length;if(s>i.length?i=function(e,t){return ke(e,t,"0",!0)}(i,s):s<i.length&&(i=i.substring(0,s)+i.substring(s).replace(/0+$/,"")),n.indexOf(",")>0){const e=o.length%3,t=Math.floor(o.length/3);let n=e>0?o.substr(0,e)+(t>0?",":""):"";for(let r=0;r<t;r++)n+=o.substr(e+3*r,3)+(r<t-1?",":"");o=n}return i.length>0?o+"."+i:o})),a=e+a}}else a=a instanceof Date?j(a,s||o):fe(a);return r=parseInt((r||" ").substring(1),10),isNaN(r)||(a=ke(String(a),Math.abs(r)," ",r<0)),a}))}("({0}, {1})",e[0],e[1])),this))+"]"}get[Symbol.toStringTag](){return"FSharpMap"}toJSON(){return Array.from(this)}GetEnumerator(){return Zn(this.tree)}[Symbol.iterator](){return c(u(this))}"System.Collections.IEnumerable.GetEnumerator"(){return Zn(this.tree)}CompareTo(e){const t=this;if(e instanceof Jn)return 0|function(e,t,n){const r=Lt(t);try{const t=Lt(n);try{let n=0,o=r["System.Collections.IEnumerator.MoveNext"](),i=t["System.Collections.IEnumerator.MoveNext"]();for(;0===n&&o&&i;)n=0|e(r["System.Collections.Generic.IEnumerator`1.get_Current"](),t["System.Collections.Generic.IEnumerator`1.get_Current"]()),0===n&&(o=r["System.Collections.IEnumerator.MoveNext"](),i=t["System.Collections.IEnumerator.MoveNext"]());return 0|(0!==n?n:o?1:i?-1:0)}finally{s(t)}}finally{s(r)}}(((e,n)=>{const r=0|t.comparer.Compare(e[0],n[0]);return 0|(0!==r?r:T(e[1],n[1]))}),t,e);throw new Error("not comparable\\nParameter name: obj")}"System.Collections.Generic.ICollection`1.Add2B595"(e){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Remove2B595"(e){throw new Error("Map cannot be mutated")}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return tr(this,e[0])&&_(Qn(this,e[0]),e[1])}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(e,t){!function(e,t,n){let r=n;Gn(((e,n)=>{Ke(t,r,[e,n]),r=r+1|0}),e)}(this.tree,e,t)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|er(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|er(this)}get size(){return 0|er(this)}clear(){throw new Error("Map cannot be mutated")}delete(e){throw new Error("Map cannot be mutated")}entries(){return Xt((e=>[e[0],e[1]]),this)}get(e){return Qn(this,e)}has(e){return tr(this,e)}keys(){return Xt((e=>e[0]),this)}set(e,t){throw new Error("Map cannot be mutated")}values(){return Xt((e=>e[1]),this)}forEach(e,t){const n=this;Jt((t=>{e(t[1],t[0],n)}),n)}}function Xn(e,t){return new Jn(e,t)}function Qn(e,t){return function(e,t,n){const r=Fn(e,t,n);if(null==r)throw new Error;return Pe(r)}(e.comparer,t,e.tree)}function er(e){return On(e.tree)}function tr(e,t){return function(e,t,n){e:for(;;){const r=e,o=t;if(null!=n){const i=Pe(n),s=0|r.Compare(o,En(i));if(i instanceof Tn){const a=i;if(s<0){e=r,t=o,n=In(a);continue e}if(0===s)return!0;e=r,t=o,n=Mn(a);continue e}return 0===s}return!1}}(e.comparer,t,e.tree)}function nr(e,t,n){return function(e,t,n){return Xn(e.comparer,Nn(e.comparer,t,n,e.tree))}(n,e,t)}function rr(e,t){return function(e,t){return Fn(e.comparer,t,e.tree)}(t,e)}function or(e,t){return r=e,Xn((n=t).comparer,zn(r,n.tree));var n,r}function ir(e,t){return Xn(t,jn(t,e))}function sr(e){return function(e){return Xn(e,void 0)}(e)}const ar=new yn("",new gn(0,[]),ot(),!1,void 0,void 0,void 0,new vn(0,[]));function lr(e,t){return"string"!=typeof(n=t)||0===n.length?new Array(0):Me(t,[e],void 0,0);var n}function ur(e){return new yn(e,ar.method,ar.headers,ar.withCredentials,ar.overridenMimeType,ar.overridenResponseType,ar.timeout,ar.content)}function cr(e,t){return new yn(t.url,e,t.headers,t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function dr(e,t){return new yn(t.url,t.method,$t(t.headers,st(e)),t.withCredentials,t.overridenMimeType,t.overridenResponseType,t.timeout,t.content)}function fr(e){return t=t=>{const n=new XMLHttpRequest;n.open(function(e){switch(e.tag){case 1:return"POST";case 3:return"PATCH";case 2:return"PUT";case 4:return"DELETE";case 6:return"OPTIONS";case 5:return"HEAD";default:return"GET"}}(e.method),e.url),n.onreadystatechange=()=>{let e,r,o,i,s,a,l;var u,c;4===n.readyState&&t[0]((r=n.responseType,e=""===r||"text"===r?n.responseText:"",o=0|n.status,i=n.responseType,a=n.responseType,s=""===a||"text"===a?new bn(0,[n.responseText]):new bn("arraybuffer"===a?2:"blob"===a?1:3,[n.response]),u=function(e,t,n){const r=[];for(let n=0;n<=t.length-1;n++){const o=e(Ye(n,t));if(null!=o){const e=Pe(o);r.push(e)}}return _(n,null)?r:je((e=>e),r,n)}((e=>{const t=mt(lr(":",e));return at(t)?void 0:[lt(t).toLocaleLowerCase(),Te(":",ut(t)).trim()]}),lr("\r\n",n.getAllResponseHeaders())),l=Xn(c={Compare:E},jn(c,u)),new xn(o,e,i,n.responseURL,l,s)))};const r=u(e.headers);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();n.setRequestHeader(e.fields[0],e.fields[1])}}finally{s(r)}n.withCredentials=e.withCredentials;const o=e.overridenMimeType;if(null==o);else{const e=o;n.overrideMimeType(e)}const i=e.overridenResponseType;if(null==i);else switch(i.tag){case 1:n.responseType="blob";break;case 2:n.responseType="arraybuffer";break;default:n.responseType="text"}const a=e.timeout;if(null==a);else{const e=0|a;n.timeout=0|e}const l=e.content;switch(l.tag){case 1:case 3:case 2:n.send(Ne(l.fields[0]));break;default:n.send()}},an((e=>t([e.onSuccess,e.onError,e.onCancel])));var t}function pr(e){return new hr(1,[e])}new xn(0,"","","",sr({Compare:E}),new bn(0,[""]));class hr extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Ok","Error"]}}function mr(e,t){return 0===t.tag?(n=e(t.fields[0]),new hr(0,[n])):pr(t.fields[0]);var n}class $r extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["BadPrimitive","BadPrimitiveExtra","BadType","BadField","BadPath","TooSmallArray","FailMessage","BadOneOf"]}}class gr extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["PascalCase","CamelCase","SnakeCase"]}}class wr{constructor(){this.cache=new Map([])}}function vr(){return new wr}function yr(e){return e.slice(void 0,1).toLowerCase()+e.slice(1,e.length)}function br(e,t){switch(e.tag){case 2:return function(e,t,n,r,o=0){if("string"==typeof e){const n=e;e=function(e,t=0){if(-284&t)throw new Error("RegexOptions only supports: IgnoreCase, Multiline, Compiled, Singleline and ECMAScript");let n="gu";return n+=1&t?"i":"",n+=2&t?"m":"",n+=16&t?"s":"",new RegExp(e,n)}(t,r??0),t=n,r=void 0}if("function"==typeof n)return r=null==r?-1:r,t.substring(0,o)+t.substring(o).replace(e,(function(){let e=arguments[0];if(r){r--;const t=[],o=arguments.length,i="string"!=typeof arguments[o-1];let s=i?o-3:o-2;for(let e=0;e<s;e++)t.push(arguments[e]);t.index=arguments[s++],t.input=arguments[s++],i&&(t.groups=arguments[s]),e=n(t)}return e}));if(n=n.replace(/\$0/g,(e=>"$&")).replace(/\${([^}]+)}/g,"$<$1>"),null!=r){let i;const s=t.substring(o),a=de(e,s),l=de.length>r?(i=a[r-1],s.substring(0,i.index+i[0].length)):s;return t.substring(0,o)+l.replace(e,n)+t.substring(o+l.length)}return t.replace(e,n)}(yr(t),"[A-Z]","_$0").toLowerCase();case 0:return t;default:return yr(t)}}vr(),vr();const xr=/^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/,_r=/^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/,Sr=/^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;function Er(e,t){try{return t.contents=function(e){function t(e){return e.replace(_r,"$1-$2-$3-$4-$5")}const n=e.trim().toLowerCase();if(xr.test(n))return function(e,...t){if(0===t.length)return e.trim();const n="["+ce(t.join(""))+"]+";return e.replace(new RegExp("^"+n),"").replace(new RegExp(n+"$"),"")}(n,"{","}","(",")");if(_r.test(n))return t(n);if(Sr.test(n))return t(n.replace(/[\{\},]|0x/g,""));throw new Error("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")}(e),!0}catch{return!1}}var Cr;function Tr(e,t){switch(t){case 8:return e?[0,255]:[-128,127];case 16:return e?[0,65535]:[-32768,32767];case 32:return e?[0,4294967295]:[-2147483648,2147483647];default:throw new Error("Invalid bit size.")}}function kr(e,t,n,r,o){const i=function(e,t,n){const r=/^\s*([\+\-])?(0[xXoObB])?([0-9a-fA-F]+)\s*$/.exec(e.replace(/_/g,""));if(null!=r){const[,,e,o]=r;n=n||function(e,t){if(t&Cr.AllowHexSpecifier)return 16;switch(e){case"0b":case"0B":return 2;case"0o":case"0O":return 8;case"0x":case"0X":return 16;default:return 10}}(e,t);const i=function(e){switch(e){case 2:return/[^0-1]/;case 8:return/[^0-7]/;case 10:return/[^0-9]/;case 16:return/[^0-9a-fA-F]/;default:throw new Error("Invalid Base.")}}(n);if(!i.test(o))return function(e,t){const[,n,r,o]=e;return{sign:n||"",prefix:r||"",digits:o,radix:t}}(r,n)}return null}(e,t,o);if(null!=i){let e=Number.parseInt(i.sign+i.digits,i.radix);if(!Number.isNaN(e)){const[t,o]=Tr(!0,r);!n&&10!==i.radix&&e>=t&&e<=o&&(e=e<<32-r>>32-r);const[s,a]=Tr(n,r);if(e>=s&&e<=a)return e}}throw new Error(`The input string ${e} was not in a correct format.`)}function Ir(e,t,n,r,o){try{return o.contents=kr(e,t,n,r),!0}catch{return!1}}function Mr(e,t){!function(e){if(null!=e&&0!==e){if(e%6e4!=0)throw new Error("Offset must be specified in whole minutes.");if(Math.abs(e/36e5)>14)throw new Error("Offset must be within plus or minus 14 hours.")}}(t);const n=new Date(e);return n.offset=null!=t?t:-6e4*(new Date).getTimezoneOffset(),n}function Ar(e,t){try{return t.contents=function(e){const[t,n]=Y(e),r=null==n?-6e4*t.getTimezoneOffset():"Z"===n?0:6e4*n;return Mr(t.getTime(),r)}(e),!0}catch(e){return!1}}function Rr(e){return e<0?Math.ceil(e):Math.floor(e)}function Or(e=0,t=0,n=0,r=0,o=0){switch(arguments.length){case 1:return Number(BigInt(arguments[0])/10000n);case 3:e=0,t=arguments[0],n=arguments[1],r=arguments[2],o=0}return 864e5*e+36e5*t+6e4*n+1e3*r+o}function Pr(e,t){try{return t.contents=function(e){const t=e.search("\\."),n=e.search("\\:");if(-1===t&&-1===n){const t=parseInt(e,0);if(isNaN(t))throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`);return Or(t,0,0,0,0)}if(n>0){const t=/^(-?)((\d+)\.)?(?:0*)([0-9]|0[0-9]|1[0-9]|2[0-3]):(?:0*)([0-5][0-9]|[0-9])(:(?:0*)([0-5][0-9]|[0-9]))?\.?(\d+)?$/.exec(e);if(null!=t&&null!=t[4]&&null!=t[5]){let n=0,r=0,o=0;const i=null!=t[1]&&"-"===t[1]?-1:1,s=+t[4],a=+t[5];if(null!=t[3]&&(n=+t[3]),null!=t[7]&&(o=+t[7]),null!=t[8])switch(t[8].length){case 1:r=100*+t[8];break;case 2:r=10*+t[8];break;case 3:r=+t[8];break;case 4:r=+t[8]/10;break;case 5:r=+t[8]/100;break;case 6:r=+t[8]/1e3;break;case 7:r=+t[8]/1e4;break;default:throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}return i*Or(n,s,a,o,r)}}throw new Error(`String '${e}' was not recognized as a valid TimeSpan.`)}(e),!0}catch{return!1}}!function(e){e[e.AllowHexSpecifier=512]="AllowHexSpecifier"}(Cr||(Cr={}));class Dr{constructor(e,t,n,r){this.declaringType=e,this.tag=t,this.name=n,this.fields=r}}class Nr{constructor(e,t,n,r,o,i,s){this.fullname=e,this.generics=t,this.construct=n,this.parent=r,this.fields=o,this.cases=i,this.enumCases=s}toString(){return Jr(this)}GetHashCode(){return Lr(this)}Equals(e){return Br(this,e)}}function Fr(e){return null!=e.generics?e.generics:[]}function Lr(e){return v([g(e.fullname),...Fr(e).map(Lr)])}function Br(e,t){return""===e.fullname?""===t.fullname&&b(ao(e),ao(t),(([e,t],[n,r])=>e===n&&Br(t,r))):e.fullname===t.fullname&&b(Fr(e),Fr(t),Br)}function Hr(e,t,n,r){return new Nr(e,t,n,void 0,r)}function Vr(...e){return new Nr("",void 0,void 0,void 0,(()=>e))}function Gr(e,t,n,r){const o=new Nr(e,t,n,void 0,void 0,(()=>{const e=n.prototype.cases();return r().map(((t,n)=>new Dr(o,n,e[n],t)))}));return o}function Ur(e){return new Nr("Microsoft.FSharp.Core.FSharpOption`1",[e])}function zr(e){return new Nr("Microsoft.FSharp.Collections.FSharpList`1",[e])}function jr(e,t,n){return new Nr(e,[t],void 0,void 0,void 0,void 0,n)}const Wr=new Nr("System.Object"),Yr=(new Nr("Microsoft.FSharp.Core.Unit"),new Nr("System.Char"),new Nr("System.String")),Kr=new Nr("System.Boolean"),qr=(new Nr("System.SByte"),new Nr("System.Byte"),new Nr("System.Int16"),new Nr("System.UInt16"),new Nr("System.Int32"));function Zr(e){if(Array.isArray(e))return e[0];if(e instanceof Nr){const t=Qr(e);if(null!=t)return Zr(t)+"[]";{const t=e.fullname.lastIndexOf(".");return-1===t?e.fullname:e.fullname.substr(t+1)}}return e.name}function Jr(e){const t=Qr(e);return null!=t?Jr(t)+"[]":null==e.generics||0===e.generics.length?e.fullname:e.fullname+"["+e.generics.map((e=>Jr(e))).join(",")+"]"}function Xr(e){return null!=Qr(e)}function Qr(e){return"[]"===e.fullname&&1===e.generics?.length?e.generics[0]:void 0}function eo(e){return null!=e.generics&&e.generics.length>0}function to(e){return null!=e.enumCases&&e.enumCases.length>0}function no(e){return null==e.generics?e:new Nr(e.fullname,e.generics.map((()=>Wr)))}function ro(e){return e.generics?.[0]}function oo(e){if(to(e)&&null!=e.enumCases)return e.enumCases.map((e=>e[1]));throw new Error(`${e.fullname} is not an enum type`)}function io(e,t){const n=parseInt(t,10);return function(e,t){if(null!=e.enumCases){if("string"==typeof t){for(const n of e.enumCases)if(n[0]===t)return n;throw new Error(`'${t}' was not found in ${e.fullname}`)}for(const n of e.enumCases)if(n[1]===t)return n;return["",t]}throw new Error(`${e.fullname} is not an enum type`)}(e,isNaN(n)?t:n)[1]}function so(e){if(null!=e.cases)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}function ao(e){if(null!=e.fields)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function lo(e){if(fo(e)&&null!=e.generics)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}function uo(e){return e instanceof Nr?null!=e.cases:e instanceof pe}function co(e){return e instanceof Nr?null!=e.fields:e instanceof he}function fo(e){return e.fullname.startsWith("System.Tuple")}function po(e){return null==e.fields?[]:e.fields}new Nr("System.UInt32"),new Nr("System.Int64"),new Nr("System.UInt64"),new Nr("System.Int128"),new Nr("System.UInt128"),new Nr("System.IntPtr"),new Nr("System.UIntPtr"),new Nr("System.Half"),new Nr("System.Single"),new Nr("System.Double"),new Nr("System.Decimal"),new Nr("System.Numerics.BigInteger");class ho{constructor(e){this.k=e}}function mo(e){return new ho(e)}function $o(e){return e.k}class go extends ho{constructor(e,t,n,r){super(e),this.left=t,this.right=n,this.h=0|r}}function wo(e,t,n,r){return new go(e,t,n,r)}function vo(e){return e.left}function yo(e){return e.right}function bo(e){return e.h}function xo(e,t){e:for(;;){const n=t;if(null!=e){const r=Pe(e);if(r instanceof go){const o=r;e=vo(o),t=xo(yo(o),n+1);continue e}return n+1|0}return 0|n}}function _o(e){return xo(e,0)}function So(e,t,n){let r,o,i,s;if(null!=e){const t=Pe(e);i=t instanceof go?(r=t,bo(r)):1}else i=0;if(null!=n){const e=Pe(n);s=e instanceof go?(o=e,bo(o)):1}else s=0;const a=0|(i<s?s:i);return 0===a?mo(t):wo(t,e,n,a+1)}function Eo(e,t,n){let r,o,i,s,a,l,u,c,d,f;if(null!=e){const t=Pe(e);d=t instanceof go?(r=t,bo(r)):1}else d=0;if(null!=n){const e=Pe(n);f=e instanceof go?(o=e,bo(o)):1}else f=0;if(f>d+2){const r=Pe(n);if(r instanceof go){const n=r;if(i=vo(n),(null!=i?(s=Pe(i),s instanceof go?(a=s,bo(a)):1):0)>d+1){const r=Pe(vo(n));if(r instanceof go){const o=r;return So(So(e,t,vo(o)),$o(o),So(yo(o),$o(n),yo(n)))}throw new Error("internal error: Set.rebalance")}return So(So(e,t,vo(n)),$o(n),yo(n))}throw new Error("internal error: Set.rebalance")}if(d>f+2){const r=Pe(e);if(r instanceof go){const e=r;if(l=yo(e),(null!=l?(u=Pe(l),u instanceof go?(c=u,bo(c)):1):0)>f+1){const r=Pe(yo(e));if(r instanceof go){const o=r;return So(So(vo(e),$o(e),vo(o)),$o(o),So(yo(o),t,n))}throw new Error("internal error: Set.rebalance")}return So(vo(e),$o(e),So(yo(e),t,n))}throw new Error("internal error: Set.rebalance")}return So(e,t,n)}function Co(e,t,n){if(null!=n){const r=Pe(n),o=0|e.Compare(t,$o(r));if(r instanceof go){const i=r;return o<0?Eo(Co(e,t,vo(i)),$o(i),yo(i)):0===o?n:Eo(vo(i),$o(i),Co(e,t,yo(i)))}{const o=0|e.Compare(t,$o(r));return o<0?wo(t,void 0,n,2):0===o?n:wo(t,n,void 0,2)}}return mo(t)}function To(e,t,n){e:for(;;){const r=e,o=t;if(null!=n){const i=Pe(n),s=0|r.Compare(o,$o(i));if(i instanceof go){const a=i;if(s<0){e=r,t=o,n=vo(a);continue e}if(0===s)return!0;e=r,t=o,n=yo(a);continue e}return 0===s}return!1}}function ko(e,t){e:for(;;){const n=e;if(null!=t){const r=Pe(t);if(r instanceof go){const o=r;ko(n,vo(o)),n($o(o)),e=n,t=yo(o);continue e}n($o(r))}break}}class Io extends he{constructor(e,t){super(),this.stack=e,this.started=t}}function Mo(e){e:for(;;){const t=e;if(at(t))return ot();{const n=lt(t),r=ut(t);if(null!=n){const o=Pe(n);if(o instanceof go){const t=o;e=ht([vo(t),mo($o(t)),yo(t)],r);continue e}return t}e=r;continue e}}}function Ao(e){return new Io(Mo(st(e)),!1)}function Ro(e){if(e.started){const t=e.stack;if(at(t))return function(){throw new Error("Enumeration already started")}();if(null!=lt(t))return $o(Pe(lt(t)));throw new Error("Please report error: Set iterator, unexpected stack for current")}return function(){throw new Error("Enumeration not started")}()}function Oo(e){let t=Ao(e);return{"System.Collections.Generic.IEnumerator`1.get_Current":()=>Ro(t),"System.Collections.IEnumerator.get_Current":()=>Ro(t),"System.Collections.IEnumerator.MoveNext":()=>function(e){if(e.started){const t=e.stack;if(at(t))return!1;if(null!=lt(t)){if(Pe(lt(t))instanceof go)throw new Error("Please report error: Set iterator, unexpected stack for moveNext");return e.stack=Mo(ut(t)),!at(e.stack)}throw new Error("Please report error: Set iterator, unexpected stack for moveNext")}return e.started=!0,!at(e.stack)}(t),"System.Collections.IEnumerator.Reset"(){t=Ao(e)},Dispose(){}}}function Po(e,t,n){return null==t?null==n?0:-1:null==n?1:0|function(e,t,n){e:for(;;){const r=e,o=t,i=n;if(at(o))return at(i)?0:-1;if(at(i))return 1;if(null!=lt(i))if(null!=lt(o)){const s=Pe(lt(o)),a=Pe(lt(i));if(s instanceof go){const l=s;if(null==vo(l)){if(!(a instanceof go)){const s=0|r.Compare($o(l),$o(a));if(0!==s)return 0|s;e=r,t=it(yo(l),ut(o)),n=it(void 0,ut(i));continue e}{const s=a;if(null==vo(s)){const a=0|r.Compare($o(l),$o(s));if(0!==a)return 0|a;e=r,t=it(yo(l),ut(o)),n=it(yo(s),ut(i));continue e}{let s,a,l,u,c;switch(at(o)?at(i)?s=2:null!=lt(i)?(s=1,u=ut(i),c=Pe(lt(i))):s=2:null!=lt(o)?(s=0,a=ut(o),l=Pe(lt(o))):at(i)?s=2:null!=lt(i)?(s=1,u=ut(i),c=Pe(lt(i))):s=2,s){case 0:if(l instanceof go){const o=l;e=r,t=ht([vo(o),wo($o(o),void 0,yo(o),0)],a),n=i;continue e}e=r,t=ht([void 0,mo($o(l))],a),n=i;continue e;case 1:if(c instanceof go){const i=c;e=r,t=o,n=ht([vo(i),wo($o(i),void 0,yo(i),0)],u);continue e}e=r,t=o,n=ht([void 0,mo($o(c))],u);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}}}else{let s,a,l,u,c;switch(at(o)?at(i)?s=2:null!=lt(i)?(s=1,u=ut(i),c=Pe(lt(i))):s=2:null!=lt(o)?(s=0,a=ut(o),l=Pe(lt(o))):at(i)?s=2:null!=lt(i)?(s=1,u=ut(i),c=Pe(lt(i))):s=2,s){case 0:if(l instanceof go){const o=l;e=r,t=ht([vo(o),wo($o(o),void 0,yo(o),0)],a),n=i;continue e}e=r,t=ht([void 0,mo($o(l))],a),n=i;continue e;case 1:if(c instanceof go){const i=c;e=r,t=o,n=ht([vo(i),wo($o(i),void 0,yo(i),0)],u);continue e}e=r,t=o,n=ht([void 0,mo($o(c))],u);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}}else{if(!(a instanceof go)){const l=0|r.Compare($o(s),$o(a));if(0!==l)return 0|l;e=r,t=ut(o),n=ut(i);continue e}{const l=a;if(null==vo(l)){const a=0|r.Compare($o(s),$o(l));if(0!==a)return 0|a;e=r,t=it(void 0,ut(o)),n=it(yo(l),ut(i));continue e}{let s,a,l,u,c;switch(at(o)?at(i)?s=2:null!=lt(i)?(s=1,u=ut(i),c=Pe(lt(i))):s=2:null!=lt(o)?(s=0,a=ut(o),l=Pe(lt(o))):at(i)?s=2:null!=lt(i)?(s=1,u=ut(i),c=Pe(lt(i))):s=2,s){case 0:if(l instanceof go){const o=l;e=r,t=ht([vo(o),wo($o(o),void 0,yo(o),0)],a),n=i;continue e}e=r,t=ht([void 0,mo($o(l))],a),n=i;continue e;case 1:if(c instanceof go){const i=c;e=r,t=o,n=ht([vo(i),wo($o(i),void 0,yo(i),0)],u);continue e}e=r,t=o,n=ht([void 0,mo($o(c))],u);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}}}}else{let s,a,l,u,c;switch(Pe(lt(i)),at(o)?at(i)?s=2:null!=lt(i)?(s=1,u=ut(i),c=Pe(lt(i))):s=2:null!=lt(o)?(s=0,a=ut(o),l=Pe(lt(o))):at(i)?s=2:null!=lt(i)?(s=1,u=ut(i),c=Pe(lt(i))):s=2,s){case 0:if(l instanceof go){const o=l;e=r,t=ht([vo(o),wo($o(o),void 0,yo(o),0)],a),n=i;continue e}e=r,t=ht([void 0,mo($o(l))],a),n=i;continue e;case 1:if(c instanceof go){const i=c;e=r,t=o,n=ht([vo(i),wo($o(i),void 0,yo(i),0)],u);continue e}e=r,t=o,n=ht([void 0,mo($o(c))],u);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}else{if(null==lt(o)){e=r,t=ut(o),n=ut(i);continue e}{let s,a,l,u,c;switch(Pe(lt(o)),at(o)?at(i)?s=2:null!=lt(i)?(s=1,u=ut(i),c=Pe(lt(i))):s=2:null!=lt(o)?(s=0,a=ut(o),l=Pe(lt(o))):at(i)?s=2:null!=lt(i)?(s=1,u=ut(i),c=Pe(lt(i))):s=2,s){case 0:if(l instanceof go){const o=l;e=r,t=ht([vo(o),wo($o(o),void 0,yo(o),0)],a),n=i;continue e}e=r,t=ht([void 0,mo($o(l))],a),n=i;continue e;case 1:if(c instanceof go){const i=c;e=r,t=o,n=ht([vo(i),wo($o(i),void 0,yo(i),0)],u);continue e}e=r,t=o,n=ht([void 0,mo($o(c))],u);continue e;default:throw new Error("unexpected state in SetTree.compareStacks")}}}break}}(e,st(t),st(n))}function Do(e,t,n){let r=n;ko((e=>{Ke(t,r,e),r=r+1|0}),e)}function No(e,t){if(o(t))return function(e,t){return We(((t,n)=>Co(e,n,t)),void 0,t)}(e,t);if(t instanceof Ze)return function(e,t){return dt(((t,n)=>Co(e,n,t)),void 0,t)}(e,t);{const n=u(t);try{return function(e,t,n){for(;;){const r=e,o=t,i=n;if(!i["System.Collections.IEnumerator.MoveNext"]())return o;e=r,t=Co(r,i["System.Collections.Generic.IEnumerator`1.get_Current"](),o),n=i}}(e,void 0,n)}finally{s(n)}}}class Fo{constructor(e,t){this.comparer=e,this.tree=t}GetHashCode(){return 0|function(e){let t=0;const n=u(e);try{for(;n["System.Collections.IEnumerator.MoveNext"]();)t=(t<<1)+y(n["System.Collections.Generic.IEnumerator`1.get_Current"]())+631|0}finally{s(n)}return 0|Math.abs(t)}(this)}Equals(e){let t;return e instanceof Fo&&(t=e,0===Po(Bo(this),Ho(this),Ho(t)))}toString(){return"set ["+Te("; ",Xt((e=>fe(e)),this))+"]"}get[Symbol.toStringTag](){return"FSharpSet"}toJSON(){return Array.from(this)}CompareTo(e){return 0|Po(Bo(this),Ho(this),Ho(e))}"System.Collections.Generic.ICollection`1.Add2B595"(e){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Clear"(){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Remove2B595"(e){throw new Error("ReadOnlyCollection")}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return To(Bo(this),e,Ho(this))}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(e,t){Do(Ho(this),e,t)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!0}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|Go(this)}"System.Collections.Generic.IReadOnlyCollection`1.get_Count"(){return 0|Go(this)}GetEnumerator(){return Oo(Ho(this))}[Symbol.iterator](){return c(u(this))}"System.Collections.IEnumerable.GetEnumerator"(){return Oo(Ho(this))}get size(){return 0|Go(this)}add(e){throw new Error("Set cannot be mutated")}clear(){throw new Error("Set cannot be mutated")}delete(e){throw new Error("Set cannot be mutated")}has(e){return Uo(this,e)}keys(){return Xt((e=>e),this)}values(){return Xt((e=>e),this)}entries(){return Xt((e=>[e,e]),this)}forEach(e,t){const n=this;Jt((t=>{e(t,t,n)}),n)}}function Lo(e,t){return new Fo(e,t)}function Bo(e){return e.comparer}function Ho(e){return e.tree}function Vo(e){return Lo(e,void 0)}function Go(e){return _o(Ho(e))}function Uo(e,t){return To(Bo(e),t,Ho(e))}function zo(e,t){return Uo(t,e)}function jo(e,t){return function(e,t){return Lo(Bo(e),Co(Bo(e),t,Ho(e)))}(t,e)}function Wo(e,t,n){try{return"Expecting "+e+" but instead got:"+(n?"\n":" ")+JSON.stringify(t,null,4)}catch(t){return"Expecting "+e+" but decoder failed. Couldn't report given value due to circular structure."+(n?"\n":" ")}}function Yo(e,t){const n=2===t.tag?Wo(t.fields[0],t.fields[1],!0):1===t.tag?Wo(t.fields[0],t.fields[1],!1)+"\nReason: "+t.fields[2]:3===t.tag?Wo(t.fields[0],t.fields[1],!0):4===t.tag?Wo(t.fields[0],t.fields[1],!0)+"\nNode `"+t.fields[2]+"` is unkown.":5===t.tag?"Expecting "+t.fields[0]+".\n"+JSON.stringify(t.fields[1],null,4):7===t.tag?"The following errors were found:\n\n"+Te("\n\n",t.fields[0]):6===t.tag?"The following `failure` occurred with the decoder: "+t.fields[0]:Wo(t.fields[0],t.fields[1],!1);return 7===t.tag?n:"Error at: `"+e+"`\n"+n}function Ko(e,t,n){const r=t(e,n);if(1===r.tag){const e=r.fields[0];return new hr(1,[Yo(e[0],e[1])])}return new hr(0,[r.fields[0]])}function qo(e,t){try{return Ko("$",e,JSON.parse(t))}catch(e){if(e instanceof SyntaxError)return new hr(1,["Given an invalid JSON: "+e.message]);throw e}}function Zo(e,t){return"string"==typeof t?new hr(0,[t]):new hr(1,[[e,new $r(0,["a string",t])]])}const Jo=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?-128<=e&&e<=127?new hr(0,[(e+128&255)-128]):new hr(1,[[n,new $r(1,["a sbyte",e,"Value was either too large or too small for a sbyte"])]]):new hr(1,[[n,new $r(1,["a sbyte",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Ir(r,511,!1,8,new me((()=>t),(e=>{t=0|e}))),t],e[0]?new hr(0,[e[1]]):new hr(1,[[n,new $r(0,["a sbyte",r])]])}return new hr(1,[[n,new $r(0,["a sbyte",r])]])},Xo=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=255?new hr(0,[255&e]):new hr(1,[[n,new $r(1,["a byte",e,"Value was either too large or too small for a byte"])]]):new hr(1,[[n,new $r(1,["a byte",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Ir(r,511,!0,8,new me((()=>t),(e=>{t=e}))),t],e[0]?new hr(0,[e[1]]):new hr(1,[[n,new $r(0,["a byte",r])]])}return new hr(1,[[n,new $r(0,["a byte",r])]])},Qo=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?-32768<=e&&e<=32767?new hr(0,[(e+32768&65535)-32768]):new hr(1,[[n,new $r(1,["an int16",e,"Value was either too large or too small for an int16"])]]):new hr(1,[[n,new $r(1,["an int16",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Ir(r,511,!1,16,new me((()=>t),(e=>{t=0|e}))),t],e[0]?new hr(0,[e[1]]):new hr(1,[[n,new $r(0,["an int16",r])]])}return new hr(1,[[n,new $r(0,["an int16",r])]])},ei=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=65535?new hr(0,[65535&e]):new hr(1,[[n,new $r(1,["an uint16",e,"Value was either too large or too small for an uint16"])]]):new hr(1,[[n,new $r(1,["an uint16",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Ir(r,511,!0,16,new me((()=>t),(e=>{t=e}))),t],e[0]?new hr(0,[e[1]]):new hr(1,[[n,new $r(0,["an uint16",r])]])}return new hr(1,[[n,new $r(0,["an uint16",r])]])},ti=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?-2147483648<=e&&e<=2147483647?new hr(0,[~~e]):new hr(1,[[n,new $r(1,["an int",e,"Value was either too large or too small for an int"])]]):new hr(1,[[n,new $r(1,["an int",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Ir(r,511,!1,32,new me((()=>t),(e=>{t=0|e}))),t],e[0]?new hr(0,[e[1]]):new hr(1,[[n,new $r(0,["an int",r])]])}return new hr(1,[[n,new $r(0,["an int",r])]])},ni=e=>t=>{const n=e,r=t;if("number"==typeof r){const e=r;return isFinite(e)&&Math.floor(e)===e?0<=e&&e<=4294967295?new hr(0,[e>>>0]):new hr(1,[[n,new $r(1,["an uint32",e,"Value was either too large or too small for an uint32"])]]):new hr(1,[[n,new $r(1,["an uint32",e,"Value is not an integral value"])]])}if("string"==typeof r){let e,t=0;return e=[Ir(r,511,!0,32,new me((()=>t),(e=>{t=e}))),t],e[0]?new hr(0,[e[1]]):new hr(1,[[n,new $r(0,["an uint32",r])]])}return new hr(1,[[n,new $r(0,["an uint32",r])]])};function ri(e,t,n,r){let o;const i=n+".["+m(e)+"]";if(Array.isArray(r)){const n=r;return e<n.length?t(i,Ye(e,n)):new hr(1,[[i,new $r(5,["a longer array. Need index `"+m(e)+"` but there are only `"+(o=n.length,m(o)+"` entries"),r])]])}return new hr(1,[[i,new $r(0,["an array",r])]])}function oi(e,t,n){if(Array.isArray(n)){let r=-1;return mr(ft,We(((n,o)=>{if(r=r+1|0,0===n.tag){const i=e(t+".["+m(r)+"]",o);return 0===i.tag?new hr(0,[it(i.fields[0],n.fields[0])]):new hr(1,[i.fields[0]])}return n}),new hr(0,[ot()]),n))}return new hr(1,[[t,new $r(0,["a list",n])]])}function ii(e,t,n){if(Array.isArray(n)){let r=-1;const o=n;return We(((n,o)=>{if(r=r+1|0,0===n.tag){const i=n.fields[0],s=e(t+".["+m(r)+"]",o);return 0===s.tag?(Ke(i,r,s.fields[0]),new hr(0,[i])):new hr(1,[s.fields[0]])}return n}),new hr(0,[ze(new Array(o.length),0,o.length,null)]),o)}return new hr(1,[[t,new $r(0,["an array",n])]])}function si(e,t,n,r){const o=t(n,r);return 0===o.tag?e(o.fields[0],n,r):new hr(1,[o.fields[0]])}function ai(e,t){let n;const r=e;return n=e=>t=>ri(0,r,e,t),e=>r=>si(R((e=>{let n;const r=t;return n=e=>t=>ri(1,r,e,t),t=>r=>si(((t,n,r)=>new hr(0,[[e,t]])),M(n),t,r)})),M(n),e,r)}function li(e){return ir(e,{Compare:T})}function ui(e,t,n,r){let o;const i=t.length+e|0;if(i!==r.length)return new hr(1,[[n,new $r(6,[(o=0|r.length,_e(be("Expected array of length %i but got %i"))(i)(o))])]]);{let o=new hr(0,[ot()]);for(let i=e;i<=r.length-1;i++)if(0===o.tag){const s=o.fields[0],a=_e(be("%s[%i]"))(n)(i),l=Ye(i-e,t),u=Ye(i,r);o=mr((e=>it(e,s)),l(a)(u))}return mr(ft,o)}}function ci(e,t,n,r,o,i){const s=function(e,t){return t.find((e=>Zr(e)===r))}(0,so(n));if(null!=s){const n=s,r=je((n=>fi(e,t,!1,n[1])),po(n));return mr((e=>function(e,t){const n=(e.fields||[]).length;if(t.length!==n)throw new Error(`Expected an array of length ${n} but got ${t.length}`);const r=e.declaringType.construct;return null==r?{}:e.declaringType.cases&&1==e.declaringType.cases().length?new r(...t):new r(e.tag,t)}(n,ct(e))),0===r.length&&i.length<=1?new hr(0,[ot()]):ui(1,r,o,i))}return new hr(1,[[o,new $r(6,["Cannot find case "+r+" in "+Jr(n)])]])}function di(e,t,n,r){let o;const i=new me(null);let s;const a=Jr(r);let l;if(s=""===a?e:nr(a,i,e),co(r)){const e=je((e=>[br(t,Zr(e)),fi(s,t,!1,e[1])]),ao(r));l=t=>n=>mr((e=>function(e,t){const n=ao(e);if(n.length!==t.length)throw new Error(`Expected an array of length ${n.length} but got ${t.length}`);return null!=e.construct?new e.construct(...t):n.reduce(((e,[n,r],o)=>(e[n]=t[o],e)),{})}(r,ct(e))),function(e,t,n){return null===n||Object.getPrototypeOf(n||!1)!==Object.prototype?new hr(1,[[t,new $r(0,["an object",n])]]):qe(((e,r)=>{const o=e[0];return 0===r.tag?mr((e=>it(e,r.fields[0])),e[1](t+"."+o)(n[o])):r}),e,new hr(0,[ot()]))}(e,t,n))}else if(uo(r))l=e=>n=>{if("string"==typeof n)return ci(s,t,r,n,e,[]);if(Array.isArray(n)){const a=n;return o=n=>ci(s,t,r,n,e,a),0===(i=Zo(e+"[0]",Ye(0,a))).tag?o(i.fields[0]):pr(i.fields[0])}return new hr(1,[[e,new $r(0,["a string or array",n])]]);var o,i};else{if(!n)throw new Error((o=Jr(r),_e(be("Cannot generate auto decoder for %s. Please pass an extra decoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders"))(o)));l=e=>t=>new hr(1,[[e,new $r(2,["an extra coder for "+Jr(r),t])]])}return i.contents=l,l}function fi(e,t,n,r){let o,i,s,a;const l=Jr(r),u=rr(l,e);if(null!=u){const e=u;return t=>n=>e.contents(t)(n)}if(Xr(r)){const n=fi(e,t,!1,Qr(r));return e=>t=>ii(M(n),e,t)}if(to(r))switch(Jr(ro(r))){case"System.SByte":return e=>t=>{const n=r,o=e,i=t,s=Jo(o)(i);if(1===s.tag)return new hr(1,[s.fields[0]]);{const e=0|s.fields[0];return Kt(e,oo(n),{Equals:(e,t)=>e===t,GetHashCode:w})?new hr(0,[io(n,e.toString())]):new hr(1,[[o,new $r(1,[Jr(n),i,"Unkown value provided for the enum"])]])}};case"System.Byte":return e=>t=>{const n=r,o=e,i=t,s=Xo(o)(i);if(1===s.tag)return new hr(1,[s.fields[0]]);{const e=s.fields[0];return Kt(e,oo(n),{Equals:(e,t)=>e===t,GetHashCode:w})?new hr(0,[io(n,e.toString())]):new hr(1,[[o,new $r(1,[Jr(n),i,"Unkown value provided for the enum"])]])}};case"System.Int16":return e=>t=>{const n=r,o=e,i=t,s=Qo(o)(i);if(1===s.tag)return new hr(1,[s.fields[0]]);{const e=0|s.fields[0];return Kt(e,oo(n),{Equals:(e,t)=>e===t,GetHashCode:w})?new hr(0,[io(n,h(e))]):new hr(1,[[o,new $r(1,[Jr(n),i,"Unkown value provided for the enum"])]])}};case"System.UInt16":return e=>t=>{const n=r,o=e,i=t,s=ei(o)(i);if(1===s.tag)return new hr(1,[s.fields[0]]);{const e=s.fields[0];return Kt(e,oo(n),{Equals:(e,t)=>e===t,GetHashCode:w})?new hr(0,[io(n,e.toString())]):new hr(1,[[o,new $r(1,[Jr(n),i,"Unkown value provided for the enum"])]])}};case"System.Int32":return e=>t=>{const n=r,o=e,i=t,s=ti(o)(i);if(1===s.tag)return new hr(1,[s.fields[0]]);{const e=0|s.fields[0];return Kt(e,oo(n),{Equals:(e,t)=>e===t,GetHashCode:w})?new hr(0,[io(n,m(e))]):new hr(1,[[o,new $r(1,[Jr(n),i,"Unkown value provided for the enum"])]])}};case"System.UInt32":return e=>t=>{const n=r,o=e,i=t,s=ni(o)(i);if(1===s.tag)return new hr(1,[s.fields[0]]);{const e=s.fields[0];return Kt(e,oo(n),{Equals:(e,t)=>e===t,GetHashCode:w})?new hr(0,[io(n,e.toString())]):new hr(1,[[o,new $r(1,[Jr(n),i,"Unkown value provided for the enum"])]])}};default:{const e=Jr(r),t=Se(be("Cannot generate auto decoder for %s.\nThoth.Json.Net only support the following enum types:\n- sbyte\n- byte\n- int16\n- uint16\n- int\n- uint32\nIf you can't use one of these types, please pass an extra decoder.\n "))(e);return e=>t(e)}}else if(eo(r)){if(fo(r)){const n=je((n=>fi(e,t,!1,n)),lo(r));return e=>t=>Array.isArray(t)?mr((e=>ct(e)),ui(0,n,e,t)):new hr(1,[[e,new $r(0,["an array",t])]])}switch(Jr(no(r))){case"Microsoft.FSharp.Core.FSharpOption`1[System.Object]":return o=fi(e,t,!0,Ye(0,Fr(r))),e=>t=>{return n=M(o),r=e,null==(i=t)?new hr(0,[void 0]):mr(Ne,n(r,i));var n,r,i};case"Microsoft.FSharp.Collections.FSharpList`1[System.Object]":return i=fi(e,t,!1,Ye(0,Fr(r))),e=>t=>oi(M(i),e,t);case"System.Collections.Generic.IEnumerable`1[System.Object]":return s=fi(e,t,!1,Ye(0,Fr(r))),e=>t=>function(e,t,n){if(Array.isArray(n)){let r=-1;return mr(Qt,We(((n,o)=>{if(r=r+1|0,0===n.tag){const i=e(t+".["+m(r)+"]",o);return 0===i.tag?new hr(0,[Yt([i.fields[0]],n.fields[0])]):new hr(1,[i.fields[0]])}return n}),new hr(0,[[]]),n))}return new hr(1,[[t,new $r(0,["a seq",n])]])}(M(s),e,t);case"Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]":{const n=fi(e,t,!1,Ye(0,Fr(r))),o=fi(e,t,!1,Ye(1,Fr(r)));let i;const s=mt([e=>t=>function(e,t,n,r){return null===r||Object.getPrototypeOf(r||!1)!==Object.prototype?new hr(1,[[n,new $r(0,["an object",r])]]):Zt(((o,i)=>{if(0===o.tag){const s=e(n,i);if(0===s.tag){const e=t(n+"."+i,r[i]);return 0===e.tag?new hr(0,[it([s.fields[0],e.fields[0]],o.fields[0])]):new hr(1,[e.fields[0]])}return new hr(1,[s.fields[0]])}return o}),new hr(0,[ot()]),Object.keys(r))}(M(n),M(o),e,t),(a=ai(M(n),M(o)),e=>t=>oi(M(a),e,t))]);return i=e=>t=>{return n=e,r=t,((e,t)=>{e:for(;;){const o=e,i=t;if(at(o))return new hr(1,[[n,new $r(7,[i])]]);{const s=Ko(n,M(lt(o)),r);if(1===s.tag){e=ut(o),t=$t(i,st(s.fields[0]));continue e}return new hr(0,[s.fields[0]])}}})(s,ot());var n,r},e=>t=>function(e,t,n,r){const o=t(n,r);return 1===o.tag?new hr(1,[o.fields[0]]):new hr(0,[e(o.fields[0])])}(li,M(i),e,t)}case"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]":{const n=fi(e,t,!1,Ye(0,Fr(r)));return e=>t=>{const r=ii(M(n),e,t);return 0===r.tag?new hr(0,[(o=r.fields[0],Lo(i={Compare:T},No(i,o)))]):new hr(1,[r.fields[0]]);var o,i}}default:return di(e,t,n,r)}}else switch(l){case"System.Boolean":return e=>t=>{return n=e,"boolean"==typeof(r=t)?new hr(0,[r]):new hr(1,[[n,new $r(0,["a boolean",r])]]);var n,r};case"Microsoft.FSharp.Core.Unit":return e=>t=>{return n=e,null==(r=t)?new hr(0,[void 0]):new hr(1,[[n,new $r(0,["null",r])]]);var n,r};case"System.String":return e=>t=>Zo(e,t);case"System.Char":return e=>t=>function(e,t){if("string"==typeof t){const n=t;return 1===n.length?new hr(0,[n[0]]):new hr(1,[[e,new $r(0,["a single character string",t])]])}return new hr(1,[[e,new $r(0,["a char",t])]])}(e,t);case"System.SByte":return Jo;case"System.Byte":return Xo;case"System.Int16":return Qo;case"System.UInt16":return ei;case"System.Int32":return ti;case"System.UInt32":return ni;case"System.Double":return e=>t=>{return n=e,"number"==typeof(r=t)?new hr(0,[r]):new hr(1,[[n,new $r(0,["a float",r])]]);var n,r};case"System.Single":return e=>t=>{return n=e,"number"==typeof(r=t)?new hr(0,[r]):new hr(1,[[n,new $r(0,["a float32",r])]]);var n,r};case"System.DateTime":return e=>t=>function(e,t){if("string"==typeof t){let r,o=W(-621355968e5,1);return r=[K(t,new me((()=>o),(e=>{o=e}))),o],r[0]?new hr(0,[(n=r[1],1===n.kind?n:W(n.getTime(),1))]):new hr(1,[[e,new $r(0,["a datetime",t])]])}var n;return new hr(1,[[e,new $r(0,["a datetime",t])]])}(e,t);case"System.DateTimeOffset":return e=>t=>function(e,t){if("string"==typeof t){let n,r=Mr(-621355968e5,0);return n=[Ar(t,new me((()=>r),(e=>{r=e}))),r],n[0]?new hr(0,[n[1]]):new hr(1,[[e,new $r(0,["a datetimeoffset",t])]])}return new hr(1,[[e,new $r(0,["a datetime",t])]])}(e,t);case"System.TimeSpan":return e=>t=>function(e,t){if("string"==typeof t){let n,r=0;return n=[Pr(t,new me((()=>r),(e=>{r=e}))),r],n[0]?new hr(0,[n[1]]):new hr(1,[[e,new $r(0,["a timespan",t])]])}return new hr(1,[[e,new $r(0,["a timespan",t])]])}(e,t);case"System.Guid":return e=>t=>function(e,t){if("string"==typeof t){let n,r="00000000-0000-0000-0000-000000000000";return n=[Er(t,new me((()=>r),(e=>{r=e}))),r],n[0]?new hr(0,[n[1]]):new hr(1,[[e,new $r(0,["a guid",t])]])}return new hr(1,[[e,new $r(0,["a guid",t])]])}(e,t);case"System.Object":return e=>e=>new hr(0,[e]);default:return di(e,t,n,r)}}function pi(e,t,n){const r=He(t,new gr(0,[]));return fi(function(e){return null!=e?or(((e,t)=>new me(t[1])),e.Coders):sr({Compare:E})}(n),r,!1,e)}const hi=function(){const e=[..."#C$&$&$$$$$$%-%&%=$$$$$$=$$$$D$$'$$$$$$$$$$$$%$$%$$$$&$:$*;$+$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$&%$$$%$&%'$%$&&%$%$$$$$%$$%$$%$&$$$%%$$&'$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$%$$$$$&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*%$%%$$'$$$$$$$$h$>5'/1(*$$$4“$$$$$$$$%$&$$'%$$&$$$%$4$,F$%&&$$$$$$$$$$$$$$$$$$$$$$$($$$$$%%VS$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$(%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$I%$)L$$%%$$P$$$%$%$$+>''%.)&%$%%.$$$%C$-8-'%$†$$*$$)%%$'%-&%$1$$$$A>%|.$1-D,%$&$%$%9'$,$&$(%2$<&%$$.X8$5.2$C$Y$$$$&+'$%$*-%%-$$2$%$+%%%9$*$$&'%$$&'%%%%$$+$'%$&%%-%%)$$$$$%%$$)'%%9$*$%$%$%%$$&%'%%&&$*'$$*-%&$$-%$$,$&$9$*$%$(%$$&($%$$%$%$2%%%-$$*$)$$%$+%%%9$*$%$(%$$$$$'%%%%$*%$'%$&%%-$$)-$$$)&&$'&%$$$%&%&&&/'%$%&&$&$%$)$1-&)$$($&$+$&$:$3&$&'$&$'*%$&(%%%-*$*$$$%$+$&$:$-$(%$$$$($$%$%%*%*$$%%%-$%0%%,$&$L%$&'$&$&$$$'&$*&%%-,$)$$%$5&;$,$$%*&$'&&$$$+)-%%$/S$%*'$)$+$-%H%$$$($;$$$-$%,$%($$$)%-%'C$&2$$&%)--$$$$$$$$$$%+$G'1$($%(.$G$+$)$%('%HN%'$)$%%%$-))%%'&$&%*&'0$%%)$$$-&$%I$$($%N$$&Ŭ$'%*$$$'%L$'%D$'%*$$$'%2$\\$'%f%&,7&3-)y%)%$ʏ$$4$=$$&n&&+*0$'&.5&%,5%/0$&$%/W%$*+$%.&$&$$$%-)-))$'&$$-)F$X*(%E$$(i-B$&'%&'%$)&'$&%-A%(.O'=)-$&E:%%$%%X$$$*$$$$%+)-%$-)-)*$)%1$%b'$R$$($$($%*'-*-,,&%$A$'%%$&%-O$$%&$$&%+'G++%%&(-&&-A)%,*N%&++&$0$*'$)$%$%$(Ob0$EH]$($$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$,+)%)%++++)%)%+$$$$$$$$++1%++++++($%'$$$&&$%'$&'%%'$&+(&%&$%'$%$.()%$$$%$$$+$$($,$$'%&$$$.$$$-$($-$$%)&$$$-&$$$0&C30'$&/2%$'$%$&%&$$$%$()$$$$$$'$$'$'$%%%($'$$%$$3F$$'$%'((%'$%$%$*$B%%$$$Bį+$$$$7%*$$t$A<K)h<.8_q9Ú$,$Y+’$ě$$$$$$$$$$$$$$AO($$B$$$$$$$$$$3ģ¦$$$$$$$$$$$$$$$$$$$$$$b$$$$C$$ĥS8%)J%C$ŒR$R$$$&%$$$$$$'$$%$)%&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%)$$$$&$$('$%I$$($%[*$$1$:,*$*$*$*$*$*$*$*$C%$$$$&$$$$$,$%$$$$%$$$$$$$$$$($-%'$$$0%$P=$|/ù=/'$&$$$$$$$$$$$$$$%$$$$$$$$$$%$,'%$(%&$$$%$y%%%%$$}$&$(N$$%'-CG/3B$-A+$2C-J2ţ᧣c删&8$Қ&Z,K)%į$&3-%7$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$&$-$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%%i-%)+:,%$$$$$$$$$$$$$&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$+$$$$%$$$$$$$$$$%$$$$$$$$&$$$$$$$$$$$$$$$$$$$$($($$$$$$$$$$$%$$'$$$M$$$%$*$&$'$:%%$'$&)%$$)W'+%U3%+%-)5)&$$%$-?+%:.%.$@&&$R$%'%%&0$$-'%($$,-($L)%%%%,&$+$$%-%'3$)&$$$$U$$&%%(%$$$;%$%.$%%%$%$$-)%)%),*$*$N$',$%'sF%$%$%$$$%-)⯇/:'T'ࠣᤣƑ%I*/(($$-$0$($$$%$%$34Ǝ$$3c%YK/$$%3*$$$)3$%%$$$$$$$$$$$$$$$$%$$'&&$'$$$$$$$&$$&$$$%'($ª%$$&$&$$$$$$%-%&%=$$$$$$=$$$$$$$$$%-$P%B&)%)%)%&&%$$$%$$'%-&%%/$=$6$%$2%1Ež(&'P&,X'4%&$0&$RP$¥@&T2$>'C',7$+$(I((A$$G'+$(MKKq%-)G'G'K+W.$³Ś,9-+»)%$$O$%&$%:$$+:%*B+,S6$%((9)&$=($c['%%3%Q$&$%(''$&$@%&'$,*,*@%$@&C+$?%'(*,Y&*9%+6(+5*'/*slZV0V*)G'+-ʼnB$M$%$%%q@-$+9.'(y8*7:,$$$X2*'7-2&$P&'%%%$'.$%<*-)&G($+$-'$%$+F$%$,%$S&,%'''$$$-$$$&$7.5$<&&%$$%)$d*$$$'$2$-$)R$&+(-)%%$+%%%9$*$%$($%$%$'%%%&%$)$((%%*&(®X&+%&$$'(-%$$$&AS&)$$'%$%%$$+-ÉR&'%'%$%:'%ES&+%$$%&$.-)06N$$$%)$$$*-Y>%&%'$('-%&$ãO&,$%$‡CC-,/+%$%+$%$;)$%%%$$$$$$$&,-i+%J&'%%'$$$$$>$-K)$$'+$+$)%&Q0$%&$(@\\Ī,$H$*$)$$$(--6&%A%9$$*$%$%l*$%$I)&$$%$*$$+-))$%$C($%$%$$$$*-ř6%%%Ú$28+'40$ν‰’$(.ç૟ђ$,࿪ɪ⇜ɜ*B$-'%ƒA%($-S*(''$$--$*$8(6˓CC:'ˆn'$$Z*'0c%$$$.%1᠛+ӹM,⌚łT&4'+ƯधŽ(0&,*-%$%$'፿ę-J%_%&&)++%*A'^:e&$½7/z,<ª===*$5==$$%%$%%%'$+'$$$*$.==%$'%+$*$=%$'$($$&*$============?%<$<$)<$<$)<$<$)<$<$)<$<$)$$%UȣZ'U+$1$%(2($2ճ*$4%*$%$(øP&**%-'$$ƓO'-($ԣè%,*LEE*$'-'%̴^$&$'oP$2å'$>$%$$%$$-$'$$$$)$'$$$$$$&$%$$%$$$$$$$$$$%$$%'$*$'$'$$$-$4(&$($4W%ıO'‡/2%2$2$H-0Ä[@0O',*%1)½Ğ(˻+0&0&—/|*/7/'[+-)K+A%%qœ$u$ª/1%(&&(*,<**,&0*L¶$ZH-Щ꜁Eၘ.ā%ᚥ1ᵔూɁ؅፮򮳙$Aƒ£ē︳𐀡%𐀡"].map((e=>(e.codePointAt(0)??0)-35)),t=[..."1.;=;78;<;6;+;<;#7;8>5>$7<8<1.;=?;>?'9<2?>?<->$;>-':-;#<#$<$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'#$'#%$#%$#%$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#%$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'$&>&>&>&>&>(#$#$&>#$@&$;#@>#;#@#@#$#@#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$<#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$?(*#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#@&;$;6@?=@(6(;(;(;(@'@';@2<;=;?(;2@;'&'(+;'(';'(2?(&(?('+'?';@2'('(@'('@+'(&?;&@(='(&(&(&(@;@'(@;@'@'@'@(2()'()(')()()'('(;+;&'()@'@'@'@'@'@'@(')(@)@)('@)@'@'(@+'=-?=';(@()@'@'@'@'@'@'@'@(@)(@(@(@(@'@'@+('(;@()@'@'@'@'@'@'@(')(@()@)(@'@'(@+;=@'(@()@'@'@'@'@'@'@(')()(@)@)(@()@'@'(@+?'-@('@'@'@'@'@'@'@'@'@'@)()@)@)(@'@)@+-?=?@()('@'@'@'@'()@(@(@(@'@'(@+@;-?'();'@'@'@'@'@(')()@()@)(@)@'@'(@+@'@()'@'@'(')(@)@)('?@')-'(@+-?'@()@'@'@'@'@'@(@)(@(@)@+@);@'('(@='&(;+;@'@'@'@'@'@'('('@'@&@(@+@'@'?;?;?(?+-?(?(?(7878)'@'@()(;('(@(@?(?@?;?;@')()()()('+;')('(')')'('()()(')+)(?#@#@#@$;&$'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@(;-@'?@#@$@6'?;'.'78@';,'@'@'(@'(;@'(@'@'@(@'()()()(;&;='(@+@-@;6;(2@+@'&'@'('('@'@'@()()@)()(@?@;+'@'@'@'@+-@?'()(@;')()(@()()()(@(+@+@;&;@(*(@()'()()()()'@+;?(?@()')()()('+'()()()()@;')()(@;+@'+'&;$@#@#;@(;()('('(')('@$&$&$&(@(#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#@$#$#$@#@$@#@#@#@#$#$@$%$%$%$@$#%>$>$@$#%>$@$#@>$#>@$@$#%>@.26;9:79:79;/02.;9:;5;<78;<;5;.2@2-&@-<78&-<78@&@=@(*(*(@?#?#?$#$#$?#?<#?#?#?#?#?$#$'$?$#<#$?<?$?-,#$,-?@<?<?<?<?<?<?<?<?<?<?7878?<?78?<?<?<?@?@-?-?<?<?<?<?78787878787878-?<78<7878787878<?<7878787878787878787878<7878<78<?<?<?@?@?#@$@#$#$#$#$#$#$#$#$&#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$?#$#$(#$@;-;$@$@$@'@&;@('@'@'@'@'@'@'@'@'@(;9:9:;9:;9:;6;6;9:;9:78787878;&;6;6;7;?;@?@?@?@?@.;?&',7878787878?78787878678?,()6&?,&';?@'@(>&'6';&'@'@'@?-?'?@'?@-?-?-?-?-?'?'@'&'@?@'&;'&;'+'@#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$'(*;(;&#$#$#$#$#$#$#$#$#$#$#$#$#$#$&(',(;@>&>#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$&$#$#$#$#$#$#$#$&>#$#$'#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$@#$#$#$@#$'&$'('('(')()?(@-?=?@';@)')(@;+@(';';'(+'(;'()@;'@()'()()();@&+@;'(&'+'@'()()(@'('()@+@;'&'?')()'('('('('('@'&;')();'&)(@'@'@'@'@'@$>&$&>@$')()();)(@+@'@'@'@34'@'@$@$@'('<'@'@'@'@'@'>@'87@'@'@'=?@(;78;@(;657878787878787878;78;5;@;6787878;<6<@;=;@'@'@2@;=;78;<;6;+;<;#7;8>5>$7<8<78;78;'&'&'@'@'@'@'@=<>?=@?<?@2?@'@'@'@'@'@'@'@;@-@?,-?-?@?@?@?(@'@'@(-@'-@',',@'(@'@;'@';,@#$'@+@#@$@'@'@;@'@'@'@'@'@'@'@'@'@;-'?-'@-@'@'@-'-@;'@;@'@-'-@-'(@(@('@'@'@(@(-@;@'-;'-@'?'(@-;@'@;'@-'@-'@;@-@'@#@$@-'(@+@-@'@(6@'@'-'@'(-;@'-@'@)()'(;@-+@()')()(;2;@2@'@+@('()(@+;')'@'(;'@()')()';(;)(+';';@-@'@')()()(;(@'@'@'@'@';@'()(@+@()@'@'@'@'@'@'@(')()@)@)@'@)@')@(@(@')()()(';+;@;('@')()()()(';'@+@')(@)()(;'(@')()()(;'@+@;@'()()()('@+@'@()()(@+-;?@')()(;@#$+-@'@'@'@'@')@)@()(')')(;@+@'@')(@()(';')@'('()'(;(@'()('()(;';@'@'@')(@()(';@+-@;'@(@)()()(@'@'@'(@(@(@('(@+@'@'@')@(@)()('@+@'();@'@-?=?@;'@,@;@'@'@2@'@'@'@+@;@'@(;@'(;?&;?@+@-@'@'@#$-;@'@(')@(&@&;&(@)@'@'@'@'@'@'@'@'@'@'@'@?(;2@?@?@?)(?)2(?(?(?@?(?@-@?@-@#$#$@$#$#@#@#@#@#@#$@$@$@$#$#@#@#@#@$#@#@#@#@#@$#$#$#$#$#$#$@#<$<$#<$<$#<$<$#<$<$#<$<$#$@+?(?(?(?(?;@(@(@(@(@(@(@(@'@(&@+@'?@'(+@=@'@-(@#$(&@+@;@-?-=-@-?-@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@'@<@?@?@?@?@?@?@-?@?@?@?@?@?@?>?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@+@'@'@'@'@'@'@'@2@2@(@4@4@"].map((e=>(e.codePointAt(0)??0)-35)),n=new Uint32Array(e),r=new Uint8Array(t);for(let e=1;e<n.length;++e)n[e]+=n[e-1];return e=>{let t=n.length,o=0;for(;t-o>1;){const r=Math.floor((t+o)/2),i=n[r];if(e<i)t=r;else{if(e===i){t=o=r;break}i<e&&(o=r)}}return r[o]}}();const mi=e=>function(e){const t=1<<function(e,t){const n=function(e,t){if(t>=0&&t<e.length)return e.charCodeAt(t);throw new Error("Index out of range.")}(e,t);return hi(n)}(e,0);return!!(256&t)}(e);function $i(e,t){return e.replace(/[a-z]?[A-Z]/g,(e=>1===e.length?e.toLowerCase():e.charAt(0)+t+e.charAt(1).toLowerCase()))}function gi(e,t=0){const n={},r=t;function o(e){throw new Error("Cannot infer key and value of "+String(e))}function i(e,t,r){e=function(e,t){switch(t){case 1:return e.charAt(0).toLowerCase()+e.slice(1);case 2:return $i(e,"_");case 3:return $i(e,"_").toUpperCase();case 4:return $i(e,"-");default:return e}}(e,t),n[e]=r}for(let t of e){let e=0;if(null==t&&o(t),t instanceof pe){const n=t.cases()[t.tag];t=0===t.fields.length?n:[n].concat(t.fields),e=r}if(Array.isArray(t))switch(t.length){case 0:o(t);break;case 1:i(t[0],e,!0);break;case 2:const n=t[1];i(t[0],e,n);break;default:i(t[0],e,t.slice(1))}else"string"==typeof t?i(t,e,!0):o(t)}return n}function wi(e,t){return!t.has(e)&&(t.add(e),!0)}function vi(e,t){if(e.has(t))return e.get(t);throw new Error(`The given key '${t}' was not present in the dictionary.`)}class yi{constructor(e,t){const n=new me(null);this.comparer=t,n.contents=this,this.hashMap=new Map([]),this["init@9"]=1;const r=u(e);try{for(;r["System.Collections.IEnumerator.MoveNext"]();){const e=r["System.Collections.Generic.IEnumerator`1.get_Current"]();Si(n.contents,e)}}finally{s(r)}}get[Symbol.toStringTag](){return"HashSet"}toJSON(){return Array.from(this)}"System.Collections.IEnumerable.GetEnumerator"(){return u(this)}GetEnumerator(){return u(Ht(this.hashMap.values()))}[Symbol.iterator](){return c(u(this))}"System.Collections.Generic.ICollection`1.Add2B595"(e){Si(this,e)}"System.Collections.Generic.ICollection`1.Clear"(){xi(this)}"System.Collections.Generic.ICollection`1.Contains2B595"(e){return Ei(this,e)}"System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"(e,t){var n;n=(n,r)=>{Ke(e,t+n,r)},Zt(((e,t)=>(n(e,t),e+1|0)),0,this)}"System.Collections.Generic.ICollection`1.get_Count"(){return 0|_i(this)}"System.Collections.Generic.ICollection`1.get_IsReadOnly"(){return!1}"System.Collections.Generic.ICollection`1.Remove2B595"(e){return Ci(this,e)}get size(){return 0|_i(this)}add(e){return Si(this,e),this}clear(){xi(this)}delete(e){return Ci(this,e)}has(e){return Ei(this,e)}keys(){return Xt((e=>e),this)}values(){return Xt((e=>e),this)}entries(){return Xt((e=>[e,e]),this)}forEach(e,t){const n=this;Jt((t=>{e(t,t,n)}),n)}}function bi(e,t){const n=0|e.comparer.GetHashCode(t);let r,o=null;return r=[(i=e.hashMap,s=n,a=new me((()=>o),(e=>{o=e})),!!i.has(s)&&(a.contents=i.get(s),!0)),o],r[0]?[!0,n,r[1].findIndex((n=>e.comparer.Equals(t,n)))]:[!1,n,-1];var i,s,a}function xi(e){e.hashMap.clear()}function _i(e){let t=0,n=u(e.hashMap.values());try{for(;n["System.Collections.IEnumerator.MoveNext"]();)t=t+n["System.Collections.Generic.IEnumerator`1.get_Current"]().length|0}finally{s(n)}return 0|t}function Si(e,t){const n=bi(e,t);return n[0]?!(n[2]>-1)&&(vi(e.hashMap,n[1]).push(t),!0):(e.hashMap.set(n[1],[t]),!0)}function Ei(e,t){const n=bi(e,t);let r;return r=n[0]&&n[2]>-1?0:1,0===r}function Ci(e,t){const n=bi(e,t);let r;return r=n[0]&&n[2]>-1?0:1,0===r&&(vi(e.hashMap,n[1]).splice(n[2],1),!0)}class Ti extends he{constructor(e,t){super(),this.Code=e,this.Name=t}}const ki=ir([["AFG","Afghanistan"],["ALA","Aland Islands"],["ALB","Albania"],["DZA","Algeria"],["ASM","American Samoa"],["AND","Andorra"],["AGO","Angola"],["AIA","Anguilla"],["ATA","Antarctica"],["ATG","Antigua and Barbuda"],["ARG","Argentina"],["ARM","Armenia"],["ABW","Aruba"],["AUT","Austria"],["AZE","Azerbaijan"],["BHS","Bahamas"],["BHR","Bahrain"],["BGD","Bangladesh"],["BRB","Barbados"],["BLR","Belarus"],["BEL","Belgium"],["BLZ","Belize"],["BEN","Benin"],["BMU","Bermuda"],["BTN","Bhutan"],["BOL","Bolivia"],["BES","Bonaire Saint Eustatius, and Saba Islands"],["BIH","Bosnia and Herzegovina"],["BWA","Botswana"],["BVT","Bouvet Island"],["BRA","Brazil"],["IOT","British Indian Ocean Territory"],["VGB","British Virgin Islands"],["BRN","Brunei Darussalam"],["BGR","Bulgaria"],["BFA","Burkina Faso"],["BDI","Burundi"],["KHM","Cambodia"],["CMR","Cameroon"],["CAN","Canada"],["CPV","Cabo Verde"],["CYM","Cayman Islands"],["CAF","Central African Republic"],["TCD","Chad"],["CHL","Chile"],["CHN","China"],["CXR","Christmas Island"],["CCK","Cocos (Keeling) Islands"],["COL","Colombia"],["COM","Comoros"],["COD","Congo, Democratic Republic of (was Zaire)"],["COG","Congo, Republic of"],["COK","Cook Islands"],["CRI","Costa Rica"],["CIV","Cote D'Ivoire (Ivory Coast)"],["HRV","Croatia (Hrvatska)"],["CUB","Cuba"],["CUW","Curacao"],["CYP","Cyprus"],["CZE","Czech Republic"],["DNK","Denmark"],["DJI","Djibouti"],["DMA","Dominica"],["DOM","Dominican Republic"],["ECU","Ecuador"],["EGY","Egypt"],["SLV","El Salvador"],["GNQ","Equatorial Guinea"],["ERI","Eritrea"],["EST","Estonia"],["SWZ","eSwatini"],["ETH","Ethiopia"],["FLK","Falkland Islands (Malvinas)"],["FRO","Faroe Islands"],["FJI","Fiji"],["FIN","Finland"],["FRA","France"],["GUF","French Guiana"],["PYF","French Polynesia"],["ATF","French Southern Territories"],["GAB","Gabon"],["GMB","Gambia"],["GEO","Georgia"],["DEU","Germany"],["GHA","Ghana"],["GIB","Gibraltar"],["GRC","Greece"],["GRL","Greenland"],["GRD","Grenada"],["GLP","Guadeloupe"],["GUM","Guam"],["GTM","Guatemala"],["GGY","Guernsey"],["GIN","Guinea"],["GNB","Guinea-Bissau"],["GUY","Guyana"],["HTI","Haiti"],["HMD","Heard and McDonald Islands"],["VAT","Holy See (Vatican City State)"],["HND","Honduras"],["HKG","Hong Kong"],["HRV","Hrvatska (Croatia)"],["HUN","Hungary"],["ISL","Iceland"],["IND","India"],["IDN","Indonesia"],["IRN","Iran"],["IRQ","Iraq"],["IRL","Ireland"],["IMN","Isle of Man, The"],["ISR","Israel"],["ITA","Italy"],["CIV","Ivory Coast (Cote D'Ivoire)"],["JAM","Jamaica"],["JPN","Japan"],["JEY","Jersey"],["JOR","Jordan"],["KAZ","Kazakhstan"],["KEN","Kenya"],["KIR","Kiribati"],["PRK","Korea, Democratic People's Republic of (North Korea)"],["KOR","Korea, Republic of (South Korea)"],["KWT","Kuwait"],["KGZ","Kyrgyzstan"],["LAO","Laos"],["LVA","Latvia"],["LBN","Lebanon"],["LSO","Lesotho"],["LBR","Liberia"],["LBY","Libya"],["LIE","Liechtenstein"],["LTU","Lithuania"],["LUX","Luxembourg"],["MAC","Macau"],["MKD","North Macedonia, Republic of"],["MDG","Madagascar"],["MWI","Malawi"],["MYS","Malaysia"],["MDV","Maldives"],["MLI","Mali"],["MLT","Malta"],["MHL","Marshall Islands"],["MTQ","Martinique"],["MRT","Mauritania"],["MUS","Mauritius"],["MYT","Mayotte"],["MEX","Mexico"],["FSM","Micronesia, Federated States of"],["MDA","Moldova"],["MCO","Monaco"],["MNG","Mongolia"],["MNE","Montenegro"],["MSR","Montserrat"],["MAR","Morocco"],["MOZ","Mozambique"],["MMR","Myanmar (was Burma)"],["NAM","Namibia"],["NRU","Nauru"],["NPL","Nepal"],["NLD","Netherlands"],["NCL","New Caledonia"],["NZL","New Zealand"],["NIC","Nicaragua"],["NER","Niger"],["NGA","Nigeria"],["NIU","Niue"],["NFK","Norfolk Island"],["MNP","Northern Mariana Islands"],["PRK","North Korea (Korea, Democratic People's Republic of)"],["NOR","Norway"],["OMN","Oman"],["PAK","Pakistan"],["PLW","Palau"],["PSE","Palestinian Territories"],["PAN","Panama"],["PNG","Papua New Guinea"],["PRY","Paraguay"],["PER","Peru"],["PHL","Philippines"],["PCN","Pitcairn Island"],["POL","Poland"],["PRT","Portugal"],["PRI","Puerto Rico"],["QAT","Qatar"],["REU","Reunion"],["ROU","Romania"],["RUS","Russian Federation"],["RWA","Rwanda"],["BLM","Saint Barthelemy"],["SHN","Saint Helena"],["KNA","Saint Kitts and Nevis"],["LCA","Saint Lucia"],["SXM","Saint Maarten (Dutch part)"],["MAF","Saint Martin (French part)"],["SPM","Saint Pierre and Miquelon"],["VCT","Saint Vincent and the Grenadines"],["WSM","Samoa"],["SMR","San Marino"],["STP","Sao Tome and Principe"],["SAU","Saudi Arabia"],["SEN","Senegal"],["SRB","Serbia"],["SYC","Seychelles"],["SLE","Sierra Leone"],["SGP","Singapore"],["SVK","Slovakia (Slovak Republic)"],["SVN","Slovenia"],["SLB","Solomon Islands"],["SOM","Somalia"],["ZAF","South Africa"],["SGS","South Georgia and the South Sandwich Islands"],["KOR","South Korea (Korea, Republic of)"],["SSD","South Sudan"],["ESP","Spain"],["LKA","Sri Lanka"],["SDN","Sudan"],["SUR","Suriname"],["SJM","Svalbard and Jan Mayen Islands"],["SWE","Sweden"],["CHE","Switzerland"],["SYR","Syria"],["TWN","Taiwan"],["TJK","Tajikistan"],["TZA","Tanzania"],["THA","Thailand"],["TLS","Timor-Leste"],["TGO","Togo"],["TKL","Tokelau"],["TON","Tonga"],["TTO","Trinidad and Tobago"],["TUN","Tunisia"],["TUR","Turkey"],["TKM","Turkmenistan"],["TCA","Turks and Caicos Islands"],["TUV","Tuvalu"],["UGA","Uganda"],["UKR","Ukraine"],["ARE","United Arab Emirates"],["GBR","United Kingdom"],["USA","United States"],["UMI","United States Minor Outlying Islands"],["VIR","United States Virgin Islands"],["URY","Uruguay"],["UZB","Uzbekistan"],["VUT","Vanuatu"],["VAT","Vatican City State (Holy See)"],["VEN","Venezuela"],["VNM","Vietnam"],["WLF","Wallis and Futuna"],["ESH","Western Sahara"],["YEM","Yemen"],["ZMB","Zambia"],["ZWE","Zimbabwe"]],{Compare:E});class Ii extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["HELP","VETStudentLoan","FinancialSupplement","StudentStartUpLoan","TradeSupportLoan"]}}class Mi extends he{constructor(e,t){super(),this.Code=e,this.Name=t}}function Ai(e){let t;const n=function(e){const t=function(e){const t=rr(e,ki);return null==t?void 0:new Ti(e,t)}(e),n=_e(be("Country code:%A is not accepted"))(e),r=t;return null==r?new hr(1,[n]):new hr(0,[r])}(e);return 1===n.tag?new hr(1,[n.fields[0]]):new hr(0,[(t=n.fields[0],new Mi(t.Code,t.Name))])}class Ri extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["AustralianResidentForTaxPurposes","ForeignResidentForTaxPurposes","WorkingHolidayMaker"]}}const Oi=new Ri(2,[{}]);function Pi(e){return new Ri(2,[{HomeCountry:e}])}class Di extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["FullTime","PartTime","LabourHire","SuperIncomeStream","Casual"]}}class Ni extends pe{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["Tfn"]}}class Fi extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Under18AndBelowTaxThreshold","Pending","Pensioner"]}}class Li extends pe{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["PreviousSurname"]}}function Bi(e){return e.fields[0]}function Hi(e){const t=function(e){const t=Ae(mi,e),n=t===e?new hr(0,[void 0]):new hr(1,["TFN must contain digits only"]);if(1===n.tag)return new hr(1,[n.fields[0]]);{const e=9===t.length?new hr(0,[void 0]):new hr(1,["TFN must be 9 digits"]);if(1===e.tag)return new hr(1,[e.fields[0]]);{const e=function(e,t){let n=t.GetZero();for(let r=0;r<=e.length-1;r++)n=t.Add(n,Ye(r,e));return n}(function(e,t,n,r){if(t.length!==n.length)throw new Error("Arrays had different lengths");const o=Ue(r,t.length);for(let r=0;r<=t.length-1;r++)Ke(o,r,e(Ye(r,t),Ye(r,n)));return o}(((e,t)=>e*t),je((e=>kr(e,511,!1,32)),t.split(""),Int32Array),new Int32Array([1,4,3,7,5,8,6,9,10]),Int32Array),{GetZero:()=>0,Add:(e,t)=>e+t})%11==0?new hr(0,[void 0]):new hr(1,["TFN is not valid"]);return 1===e.tag?new hr(1,[e.fields[0]]):new hr(0,[t])}}}(e);if(1===t.tag)return new hr(1,[t.fields[0]]);{const e=t.fields[0],r=function(e){if(o(e))return 0===e.length;if(e instanceof Ze)return at(e);{const t=Lt(e);try{return!t["System.Collections.IEnumerator.MoveNext"]()}finally{s(t)}}}((n={Equals:(e,t)=>e===t,GetHashCode:g},Ut(function(e,t,n){return Bt((()=>{const r=new yi(e,n);return qt((e=>wi(e,r)),t)}))}(["0"],e.split(""),n))))?new hr(1,["TFN must not contain all zeros"]):new hr(0,[void 0]);return 1===r.tag?new hr(1,[r.fields[0]]):new hr(0,[e])}var n}class Vi extends he{constructor(e,t){super(),this.Code=e,this.Name=t}}new class extends he{constructor(e){super(),this.Unused=e}}(void 0);class Gi extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["AustralianResidentForTaxPurposes","ForeignResidentForTaxPurposes","WorkingHolidayMaker"]}}function Ui(){return Gr("Dto.Dto.ResidencyStatusV2Dto",[],Gi,(()=>[[],[],[["Item",Vr(["HomeCountry",Ur(Hr("Dto.Dto.CountryDto",[],Vi,(()=>[["Code",Yr],["Name",Yr]])))])]]]))}function zi(e){let t,n;switch(e.tag){case 1:return new hr(0,[new Ri(1,[])]);case 2:return He((t=e.fields[0].HomeCountry,null==t?void 0:(n=Ai(t.Code),1===n.tag?new hr(1,[n.fields[0]]):new hr(0,[Pi(n.fields[0])]))),new hr(0,[Oi]));default:return new hr(0,[new Ri(0,[])])}}function ji(e){switch(e){case 0:return new hr(0,[new Di(0,[])]);case 1:return new hr(0,[new Di(1,[])]);case 2:return new hr(0,[new Di(2,[])]);case 3:return new hr(0,[new Di(3,[])]);case 4:return new hr(0,[new Di(4,[])]);default:return new hr(1,["Invalid EmploymentBasis"])}}function Wi(e){switch(e){case 0:return new hr(0,[new Ii(0,[])]);case 1:return new hr(0,[new Ii(1,[])]);case 2:return new hr(0,[new Ii(2,[])]);case 3:return new hr(0,[new Ii(3,[])]);case 4:return new hr(0,[new Ii(4,[])]);default:return new hr(1,["Invalid DebtSupport"])}}function Yi(e){switch(e.tag){case 1:return 1;case 2:return 2;case 3:return 3;case 4:return 4;default:return 0}}const Ki=e=>{return t=Wi,r={Equals:(e,t)=>e===t,GetHashCode:w},n=zt(function(e,t){return Bt((()=>{const n=new yi([],t);return qt((e=>wi(e,n)),e)}))}(e,r)),function(e,t,n){e:for(;;){const r=e,o=t,i=n;if(at(i)){const e=r;return 1===e.tag?new hr(1,[e.fields[0]]):new hr(0,[ft(e.fields[0])])}{let s;const a=o(lt(i));if(1===a.tag)s=new hr(1,[a.fields[0]]);else{const e=r;s=1===e.tag?new hr(1,[e.fields[0]]):new hr(0,[it(a.fields[0],e.fields[0])])}if(1===s.tag)return s;e=s,t=o,n=ut(i);continue e}}}(new hr(0,[ot()]),t,n);var t,n,r};function qi(e){switch(e.tag){case 1:return 1;case 2:return 2;default:return 0}}class Zi extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Tfn","Exempted"]}}function Ji(){return Gr("Dto.Dto.ProvidedTfnInformationDto",[],Zi,(()=>[[["Item",Yr]],[["Item",jr("Dto.Dto.ExemptionReasonDto",qr,[["Under18AndBelowTaxThreshold",0],["Pending",1],["Pensioner",2]])]]]))}class Xi extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["TfnTruncated","Exempted"]}}class Qi extends he{constructor(e,t,n,r,o,i,s){super(),this.TfnInformation=e,this.PreviousSurname=t,this.ResidencyStatus=0|n,this.ResidencyStatusV2=r,this.EmploymentBasis=0|o,this.IsTaxFreeThresholdClaimed=i,this.HasDebtSupport=s}}class es extends he{constructor(e,t){super(),this.ResidencyStatusV2=e,this.EmploymentBasis=0|t}}class ts extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["TfnInfo","EmploymentInfo"]}}class ns extends he{constructor(e,t){super(),this.Meta=e,this.Info=t}}class rs extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["AustralianResidentForTaxPurposes","ForeignResidentForTaxPurposes","WorkingHolidayMaker"]}}function os(){return Gr("Dto.Commands.ResidencyStatusV2Dto",[],rs,(()=>[[],[],[["Item",Hr("Dto.Commands.WorkingHolidayPayload",[],is,(()=>[["HomeCountry",Hr("Dto.Commands.CountryCode",[],ss,(()=>[["Code",Yr]]))]]))]]]))}class is extends he{constructor(e){super(),this.HomeCountry=e}}class ss extends he{constructor(e){super(),this.Code=e}}class as extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["CreateOrUpdate","Update","ProvideFullTfnDeclaration"]}}class ls extends he{constructor(e,t,n,r,o,i,s){super(),this.AccountId=e,this.TfnInformation=t,this.PreviousSurname=n,this.ResidencyStatus=r,this.EmploymentBasis=0|o,this.IsTaxFreeThresholdClaimed=i,this.HasDebtSupport=s}}class us extends he{constructor(e,t,n,r,o,i,s){super(),this.AccountId=e,this.TfnInformation=t,this.PreviousSurname=n,this.ResidencyStatus=r,this.EmploymentBasis=0|o,this.IsTaxFreeThresholdClaimed=i,this.HasDebtSupport=s}}class cs extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Tfn","Exempted","Truncated"]}}function ds(e){return e}function fs(e){return Array.from(e)}function ps(e){return j(e,"O")}function hs(e){return function(e,t="c"){if(-1===["c","g","G"].indexOf(t))throw new Error("Custom formats are not supported");const n=Math.abs(function(e){return Rr(e/864e5)}(e)),r=Math.abs(function(e){return Rr(e%864e5/36e5)}(e)),o=Math.abs(function(e){return Rr(e%36e5/6e4)}(e)),i=Math.abs(function(e){return Rr(e%6e4/1e3)}(e)),s=Math.abs(function(e){return Rr(e%1e3)}(e));return`${e<0?"-":""}${0!==n||"c"!==t&&"g"!==t?"c"===t?n+".":n+":":""}${"g"===t?r:f(r,2)}:${f(o,2)}:${f(i,2)}${0!==s||"c"!==t&&"g"!==t?"g"===t?"."+f(s,3):"."+function(e){return e.toString(10).padStart(3,"0").padEnd(7,"0")}(s):""}`}(e)}function ms(){return null}function $s(e){return j(e,"O")}function gs(e,t){return JSON.stringify(t,void 0,Ne(e))}function ws(e,t,n,r){let o;const i=new me(null);let s;const a=Jr(r);let l;if(s=""===a?e:nr(a,i,e),co(r)){const e=je((e=>{const r=br(t,Zr(e)),o=vs(s,t,n,e[1]);return t=>i=>{const s=function(e,t){return e[t[0]]}(t,e);return(!n||n&&null!=s)&&(i[r]=o(s)),i}}),ao(r));l=t=>Zt(((e,n)=>n(t)(e)),{},e)}else{if(!uo(r))throw new Error((o=Jr(r),_e(be("Cannot generate auto encoder for %s. Please pass an extra encoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders"))(o)));l=e=>{const o=function(e,t){const n=so(t)[e.tag];if(null==n)throw new Error(`Cannot find case ${e.name} in union type`);return[n,e.fields]}(e,r),i=o[0],a=o[1],l=0|a.length;if(0===l)return Zr(i);{const e=0|l,r=po(i),o=ze(new Array(e+1),0,e+1,null);Ke(o,0,Zr(i));for(let i=1;i<=e;i++)Ke(o,i,vs(s,t,n,Ye(i-1,r)[1])(Ye(i-1,a)));return o}}}return i.contents=l,l}function vs(e,t,n,r){const o=Jr(r),i=rr(o,e);if(null!=i){const e=i;return t=>e.contents(t)}if(Xr(r)){const o=vs(e,t,n,Qr(r));return e=>fs(Xt(o,e))}if(to(r))switch(Jr(ro(r))){case"System.SByte":return e=>e;case"System.Byte":return e=>e;case"System.Int16":return e=>e;case"System.UInt16":return e=>e;case"System.Int32":return e=>e;case"System.UInt32":return e=>e;default:{const e=Jr(r);return Se(be("Cannot generate auto encoder for %s.\nThoth.Json.Net only support the following enum types:\n- sbyte\n- byte\n- int16\n- uint16\n- int\n- uint32\n\nIf you can't use one of these types, please pass an extra encoder.\n\nDocumentation available at: https://thoth-org.github.io/Thoth.Json/documentation/auto/extra-coders.html#ready-to-use-extra-coders\n "))(e)}}else{if(eo(r)){if(fo(r)){const o=je((r=>vs(e,t,n,r)),lo(r));return e=>{return fs((t=(e,t)=>Ye(e,o)(t),n=e,Wt((()=>Lt(n)),((e,n)=>n["System.Collections.IEnumerator.MoveNext"]()?Ne(t(e,n["System.Collections.Generic.IEnumerator`1.get_Current"]())):void 0),(e=>{s(e)}))));var t,n}}{const o=Jr(no(r));if("Microsoft.FSharp.Core.FSharpOption`1[System.Object]"===o){const o=new d((()=>{return o=vs(e,t,n,Ye(0,Fr(r))),e=>{return null!=(t=Ve(o,e))?Pe(t):null;var t};var o}));return e=>null==e?null:o.Value(e)}if("Microsoft.FSharp.Collections.FSharpList`1[System.Object]"===o||"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]"===o||"System.Collections.Generic.IEnumerable`1[System.Object]"===o){const o=vs(e,t,n,Ye(0,Fr(r)));return e=>fs(Xt(o,e))}if("Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]"===o){const o=Ye(0,Fr(r)),i=vs(e,t,n,Ye(1,Fr(r)));if("System.String"===Jr(o)||"System.Guid"===Jr(o))return e=>Zt(((e,t)=>{const n=t;return e[n[0]]=i(n[1]),e}),{},e);{let r;const s=vs(e,t,n,o);return r=s,e=>fs(Xt((e=>{const t=e;return[r(t[0]),i(t[1])]}),e))}}return ws(e,t,n,r)}}switch(o){case"System.Boolean":return e=>e;case"Microsoft.FSharp.Core.Unit":return ms;case"System.String":return e=>e;case"System.Char":return e=>e;case"System.SByte":return e=>e;case"System.Byte":return e=>e;case"System.Int16":return e=>e;case"System.UInt16":return e=>e;case"System.Int32":return e=>e;case"System.UInt32":return e=>e;case"System.Double":return e=>e;case"System.Single":return e=>e;case"System.DateTime":return $s;case"System.DateTimeOffset":return ps;case"System.TimeSpan":return hs;case"System.Guid":return ds;case"System.Object":return e=>e;default:return ws(e,t,n,r)}}}function ys(e,t,n,r){const o=He(t,new gr(0,[])),i=He(r,!0);return vs(function(e){return null!=e?or(((e,t)=>new me(t[0])),e.Coders):sr({Compare:E})}(n),o,i,e)}function bs(e){return _e(be("%s/tfn-declaration/backend"))(e)}function xs(e,t){return ln.Delay((()=>{const n=dr(function(e){return new wn("Authorization",e)}(_e(be("Bearer %s"))(e)),t);let r;const o=fr(n);return r=ln.Bind(o,(e=>ln.Return(new hr(0,[e])))),ln.Bind(r,(e=>{const t=e;if(1===t.tag)return ln.Return(new hr(1,[t.fields[0]]));{const e=t.fields[0];if(429===e.statusCode||e.statusCode>=500){const e=fr(n);return ln.Bind(e,(e=>ln.Return(new hr(0,[e]))))}return ln.Return(new hr(0,[e]))}}))}))}const _s=e=>qo(M(pi(Hr("Dto.BackendApiModels.Read.TfnDeclarationDetailsWithMeta",[],ns,(()=>[["Meta",Vr(["AccountId",Yr])],["Info",Ur(Gr("Dto.BackendApiModels.Read.Information",[],ts,(()=>[[["Item",Hr("Dto.BackendApiModels.Read.TfnDeclarationDetails",[],Qi,(()=>[["TfnInformation",Gr("Dto.BackendApiModels.Read.TfnInformation",[],Xi,(()=>[[["Item",Yr]],[["Item",jr("Dto.Dto.ExemptionReasonDto",qr,[["Under18AndBelowTaxThreshold",0],["Pending",1],["Pensioner",2]])]]]))],["PreviousSurname",Ur(Yr)],["ResidencyStatus",jr("Dto.Dto.ResidencyStatusDto",qr,[["AustralianResidentForTaxPurposes",0],["ForeignResidentForTaxPurposes",1],["WorkingHolidayMaker",2]])],["ResidencyStatusV2",Ui()],["EmploymentBasis",jr("Dto.Dto.EmploymentBasisDto",qr,[["FullTime",0],["PartTime",1],["LabourHire",2],["SuperIncomeStream",3],["Casual",4]])],["IsTaxFreeThresholdClaimed",Kr],["HasDebtSupport",zr(jr("Dto.Dto.DebtSupportDto",qr,[["HELP",0],["VETStudentLoan",1],["FinancialSupplement",2],["StudentStartUpLoan",3],["TradeSupportLoan",4]]))]]))]],[["Item",Hr("Dto.BackendApiModels.Read.EmploymentInfo",[],es,(()=>[["ResidencyStatusV2",Ur(Ui())],["EmploymentBasis",jr("Dto.Dto.EmploymentBasisDto",qr,[["FullTime",0],["PartTime",1],["LabourHire",2],["SuperIncomeStream",3],["Casual",4]])]]))]]])))]])),new gr(1,[]),void 0)),e);class Ss extends he{constructor(e){super(),this.Message=e}}function Es(e,t){return ln.Delay((()=>{const n=xs(e,cr(new gn(0,[]),ur(bs(t))));return ln.Bind(n,(e=>{const t=e;if(1===t.tag)return ln.Return(new hr(1,[t.fields[0]]));{const e=t.fields[0];if(200===e.statusCode){const t=_s(e.responseText);return ln.Return(t)}return ln.Return(new hr(1,["Unexpected response from backend"]))}}))}))}function Cs(e,t){let n,r,o;const i=e.TfnInformation.Value;if(o=null==i?new hr(1,["missing TFN info"]):new hr(0,[i]),1===o.tag)return new hr(1,[o.fields[0]]);{const i=o.fields[0];let s;const a=e.PreviousSurname.Value;let l,u;s=null==a?void 0:Bi(a);const c=e.ResidencyStatus.Value;if(null==c)u=void 0;else{const e=function(e){switch(e.tag){case 1:return new hr(0,[new rs(1,[])]);case 2:{let t;const n=e.fields[0].HomeCountry;return t=null==n?new hr(1,["Home country should be specified for WorkingHolidayMaker"]):new hr(0,[n]),1===t.tag?new hr(1,[t.fields[0]]):new hr(0,[new rs(2,[new is(new ss(t.fields[0].Code))])])}default:return new hr(0,[new rs(0,[])])}}(c);u=1===e.tag?void 0:e.fields[0]}if(l=null==u?new hr(1,["missing residency status"]):new hr(0,[u]),1===l.tag)return new hr(1,[l.fields[0]]);{const o=l.fields[0];let a,u;const c=e.EmploymentBasisRadioButtonGroup.Value;if(u=null==c?void 0:function(e){switch(e.tag){case 1:return 1;case 2:return 2;case 3:return 3;case 4:return 4;default:return 0}}(c),a=null==u?new hr(1,["missing employment basis"]):new hr(0,[u]),1===a.tag)return new hr(1,[a.fields[0]]);{const l=0|a.fields[0];let u,c;const d=e.ClaimTaxFreeThreshold.Selected;if(c=null==d?void 0:(n=d,!(1===n.tag)),u=null==c?new hr(1,["missing is tax-free threshold claimed"]):new hr(0,[c]),1===u.tag)return new hr(1,[u.fields[0]]);{const n=u.fields[0],a=He((r=e.DebtSupportCheckboxGroup.Value,null==r?void 0:(e=>gt(Yi,e))(r)),ot()),c=()=>0===i.tag?new hr(1,["New TFN declaration cannot have a truncated TFN"]):1===i.fields[0].tag?new hr(0,[new Zi(1,[qi(i.fields[0].fields[0])])]):new hr(0,[new Zi(0,[i.fields[0].fields[0].fields[0]])]),d=t.Info;if(null!=d){if(0===d.tag)return new hr(0,[st(new as(1,[new us(t.Meta.AccountId,0===i.tag?new cs(2,[i.fields[0]]):1===i.fields[0].tag?new cs(1,[qi(i.fields[0].fields[0])]):new cs(0,[i.fields[0].fields[0].fields[0]]),s,o,l,n,a)]))]);{const e=c();return 1===e.tag?new hr(1,[e.fields[0]]):new hr(0,[st(new as(2,[{EmploymentBasis:l,HasDebtSupport:a,IsTaxFreeThresholdClaimed:n,PreviousSurname:De(s),ResidencyStatus:o,TfnInformation:e.fields[0]}]))])}}{const e=c();return 1===e.tag?new hr(1,[e.fields[0]]):new hr(0,[st(new as(0,[new ls(t.Meta.AccountId,e.fields[0],s,o,l,n,a)]))])}}}}}}class Ts extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["BadRequest","Other"]}}function ks(e,t,n){return ln.Delay((()=>{let r;const o=e.PreExistingTfnDec;let i,s;if(2===o.tag&&0===o.fields[0].tag?(i=0,s=o.fields[0].fields[0]):i=1,0===i)r=ln.Delay((()=>ln.Return(new hr(0,[s]))));else{const e=Es(t,n);r=ln.Bind(e,(e=>{let t;const n=e;return t=1===n.tag?new hr(1,[new Ts(1,[n.fields[0]])]):new hr(0,[n.fields[0]]),ln.Return(t)}))}return ln.Bind(r,(r=>{const o=r;if(1===o.tag)return ln.Return(new hr(1,[o.fields[0]]));{const r=o.fields[0];let i,s;const a=Cs(e,r);return s=1===a.tag?new hr(1,[new Ts(1,[a.fields[0]])]):new hr(0,[a.fields[0]]),i=ln.Return(s),ln.Bind(i,(e=>{let o;const i=e;if(1===i.tag)return ln.Return(new hr(1,[i.fields[0]]));{const e=i.fields[0];if(at(e))return ln.Return(new hr(0,[r]));{const r=xs(t,(s=new vn(1,[gs(0,ys(zr(Gr("Dto.Commands.TfnDeclarationCommandDto",[],as,(()=>[[["Item",Hr("Dto.Commands.TfnDeclarationDetailsDto",[],ls,(()=>[["AccountId",Yr],["TfnInformation",Ji()],["PreviousSurname",Ur(Yr)],["ResidencyStatus",os()],["EmploymentBasis",jr("Dto.Dto.EmploymentBasisDto",qr,[["FullTime",0],["PartTime",1],["LabourHire",2],["SuperIncomeStream",3],["Casual",4]])],["IsTaxFreeThresholdClaimed",Kr],["HasDebtSupport",zr(jr("Dto.Dto.DebtSupportDto",qr,[["HELP",0],["VETStudentLoan",1],["FinancialSupplement",2],["StudentStartUpLoan",3],["TradeSupportLoan",4]]))]]))]],[["Item",Hr("Dto.Commands.UpdateTfnDeclarationDetailsDto",[],us,(()=>[["AccountId",Yr],["TfnInformation",Gr("Dto.Commands.UpdateProvidedTfnInformationDto",[],cs,(()=>[[["Item",Yr]],[["Item",jr("Dto.Dto.ExemptionReasonDto",qr,[["Under18AndBelowTaxThreshold",0],["Pending",1],["Pensioner",2]])]],[["Item",Yr]]]))],["PreviousSurname",Ur(Yr)],["ResidencyStatus",os()],["EmploymentBasis",jr("Dto.Dto.EmploymentBasisDto",qr,[["FullTime",0],["PartTime",1],["LabourHire",2],["SuperIncomeStream",3],["Casual",4]])],["IsTaxFreeThresholdClaimed",Kr],["HasDebtSupport",zr(jr("Dto.Dto.DebtSupportDto",qr,[["HELP",0],["VETStudentLoan",1],["FinancialSupplement",2],["StudentStartUpLoan",3],["TradeSupportLoan",4]]))]]))]],[["Item",Vr(["EmploymentBasis",jr("Dto.Dto.EmploymentBasisDto",qr,[["FullTime",0],["PartTime",1],["LabourHire",2],["SuperIncomeStream",3],["Casual",4]])],["HasDebtSupport",zr(jr("Dto.Dto.DebtSupportDto",qr,[["HELP",0],["VETStudentLoan",1],["FinancialSupplement",2],["StudentStartUpLoan",3],["TradeSupportLoan",4]]))],["IsTaxFreeThresholdClaimed",Kr],["PreviousSurname",Ur(Yr)],["ResidencyStatus",os()],["TfnInformation",Ji()])]]]))),new gr(1,[]),void 0,void 0)(e))]),a=cr(new gn(2,[]),ur(bs(n))),o=new yn(a.url,a.method,a.headers,a.withCredentials,a.overridenMimeType,a.overridenResponseType,a.timeout,s),dr(new wn("Content-Type","application/json"),o)));return ln.Bind(r,(e=>{const t=e;if(1===t.tag)return ln.Return(new hr(1,[t.fields[0]]));{const e=t.fields[0];let r;switch(0|e.statusCode){case 200:{const t=_s(e.responseText);r=1===t.tag?new hr(1,[new Ts(1,[t.fields[0]])]):new hr(0,[t.fields[0]]);break}case 400:{let t;const o=(n=e.responseText,qo(M(pi(Hr("Service.BadRequestErrorDetails",[],Ss,(()=>[["Message",Yr]])),new gr(1,[]),void 0)),n));t=1===o.tag?new hr(1,[new Ts(1,[o.fields[0]])]):new hr(0,[o.fields[0]]),r=1===t.tag?new hr(1,[t.fields[0]]):new hr(1,[new Ts(0,[t.fields[0].Message])]);break}default:r=new hr(1,[new Ts(1,["Unexpected response from backend"])])}return ln.Return(r)}var n}))}}var s,a}))}}))}))}class Is extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Success","Failure","Info"]}}function Ms(e){switch(e.tag){case 0:return"text-green-700";case 2:return"text-blue-700";default:return"text-red-700"}}function As(e){switch(e.tag){case 0:return"bg-green-50";case 2:return"bg-blue-50";default:return"bg-red-50"}}function Rs(e){return e.tag,e.fields[0]}function Os(e){let t,n,o,i;const s=e.hideAlert,a=e.alert,l=cn();return function(){const e=yt.useRef(!1);yt.useEffect((()=>{e.current||(e.current=!0,function(e,t){hn(ln.Delay((()=>ln.Bind(pn(5e3),(()=>(e(),ln.Zero()))))),t)}(s,l))}),[])}(),(0,r.createElement)("div",k(mt([["className",Te(" ",["rounded-md","p-4","my-4",As(a)])],["data-testid","alert"],(t=[(0,r.createElement)("div",k(mt([["className",Te(" ",["flex"])],(n=[(0,r.createElement)("p",{className:Te(" ",["text-sm","pr-2",Ms(a)]),children:Rs(a)}),(0,r.createElement)("div",k(mt([["className",Te(" ",["ml-auto"])],(o=[(0,r.createElement)("div",k(mt([["className",Te(" ",["-mx-1.5","-my-1.5"])],(i=[(0,r.createElement)("button",{type:"button",className:Te(" ",zt(Bt((()=>Yt(Gt("inline-flex"),Bt((()=>Yt(Gt("rounded-md"),Bt((()=>Yt(Gt("p-1.5"),Bt((()=>Yt(Gt("focus:outline-none"),Bt((()=>Yt(Gt("focus:ring-2"),Bt((()=>Yt(Gt("focus:ring-offset-2"),Bt((()=>function(e){switch(e.tag){case 0:return mt(["bg-green-50","text-green-500","hover:bg-green-100","focus:ring-offset-green-50","focus:ring-green-600"]);case 2:return mt(["bg-blue-50","text-blue-500","hover:bg-blue-100","focus:ring-offset-blue-50","focus:ring-blue-600"]);default:return mt(["bg-red-50","text-red-500","hover:bg-red-100","focus:ring-offset-red-50","focus:ring-red-600"])}}(a))))))))))))))))))))))),children:yt.Children.toArray([Ct]),onClick:e=>{dn(l),s()}})],["children",yt.Children.toArray(Array.from(i))])])))],["children",yt.Children.toArray(Array.from(o))])])))],["children",yt.Children.toArray(Array.from(n))])])))],["children",yt.Children.toArray(Array.from(t))])])))}class Ps extends he{constructor(e,t){super(),this.Value=e,this.Meta=t}}function Ds(){return new Ps(void 0,{Valid:!1})}function Ns(e){return new Ps(e,{Valid:!0})}function Fs(e){return new Ps(e,{Valid:!1})}function Ls(e){switch(e.tag){case 1:return"ForeignResidentForTaxPurposes";case 2:return"WorkingHolidayMaker";default:return"AustralianResidentForTaxPurposes"}}function Bs(e){switch(e){case"HELP":return new Ii(0,[]);case"VETStudentLoan":return new Ii(1,[]);case"FinancialSupplement":return new Ii(2,[]);case"StudentStartUpLoan":return new Ii(3,[]);case"TradeSupportLoan":return new Ii(4,[]);default:return}}function Hs(e){switch(e){case"FullTime":return new Di(0,[]);case"PartTime":return new Di(1,[]);case"LabourHire":return new Di(2,[]);case"SuperIncomeStream":return new Di(3,[]);case"Casual":return new Di(4,[]);default:return}}function Vs(e){return(0,r.createElement)("p",{className:Te(" ",["block","text-sm","font-medium","text-gray-700","leading-5"]),children:e})}function Gs(e){let t;return(0,r.createElement)("div",k(mt([["className","flex items-start p-4 space-x-3 bg-amber-50 rounded-md mt-4"],(t=[kt,(0,r.createElement)("span",{className:"text-sm leading-5 font-normal text-amber-700",children:e})],["children",yt.Children.toArray(Array.from(t))])])))}class Us extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Yes","No"]}}class zs extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Select","SelectInternal"]}}class js extends he{constructor(e,t){super(),this.Selected=e,this.Meta=t}}function Ws(e){return new js(e,{Touched:!1})}function Ys(e,t){return 1===e.tag?e.fields[1]||!t.Meta.Touched?new js(e.fields[0],t.Meta):t:new js(e.fields[0],{Touched:!0})}function Ks(e){const t=_(e.Parent.State.Selected,e.Selection)?zt(Bt((()=>Yt(null!=e.Parent.Disable?Gt("bg-gray-50"):Gt("bg-white"),Bt((()=>Yt(Gt("border-gray-200"),Bt((()=>Yt(Gt("shadow-sm"),Bt((()=>null!=e.Parent.Disable?Gt("text-gray-400"):Gt("text-gray-900"))))))))))))):zt(Bt((()=>Yt(Gt("shadow-none"),Bt((()=>null!=e.Parent.Disable?Gt("text-gray-400"):Gt("text-gray-700")))))));return(0,r.createElement)("button",{className:Te(" ",zt(Bt((()=>Yt(Gt("relative"),Bt((()=>Yt(Gt("w-1/2"),Bt((()=>Yt(Gt("border-gray-200"),Bt((()=>Yt(Gt("rounded-md"),Bt((()=>Yt(Gt("shadow-sm"),Bt((()=>Yt(Gt("py-2"),Bt((()=>Yt(Gt("text-sm"),Bt((()=>Yt(Gt("font-medium"),Bt((()=>Yt(Gt("whitespace-nowrap"),Bt((()=>Yt(Gt("focus:outline-none"),Bt((()=>Yt(Gt("focus:ring-inset"),Bt((()=>Yt(Gt("focus:ring-1"),Bt((()=>Yt(Gt("focus:ring-primary-focus"),Bt((()=>Yt(Gt("focus:z-10"),Bt((()=>Yt(Gt("w-auto"),Bt((()=>Yt(Gt("px-8"),Bt((()=>Yt(_(e.Parent.Disable,e.Selection)?Gt("disabled:cursor-not-allowed"):Vt(),Bt((()=>t))))))))))))))))))))))))))))))))))))))))))))))))))))))),type:"button",name:"yesNoButtonGroup",onClick:t=>{e.Parent.Dispatch(new zs(0,[e.Selection]))},disabled:_(e.Parent.Disable,e.Selection),children:fe(e.Selection)})}function qs(e){let t;return(0,r.createElement)("div",k(mt([["className",Te(" ",["relative","self-start","bg-gray-100","rounded-lg","p-0.5","flex","mt-2","space-x-0.5"])],(t=[Ks({Parent:e,Selection:new Us(0,[])}),Ks({Parent:e,Selection:new Us(1,[])})],["children",yt.Children.toArray(Array.from(t))])])))}function Zs(e,t,n){pt((n=>{try{n(t)}catch(t){e(t)}}),n)}function Js(){return ot()}function Xs(e){return Te("/",e)}function Qs(e,t,n){try{s(n)}catch(n){e(["Error stopping subscription: "+Xs(t),n])}}function ea(e,t){pt((t=>{Qs(e,t[0],t[1])}),t)}function ta(e,t,n,r,o,i){return pt((t=>{!function(e,t){const n=new Error("Duplicate SubId");e(["Duplicate SubId: "+Xs(t),n])}(e,t)}),n),pt((t=>{Qs(e,t[0],t[1])}),r),$t(o,vt((n=>function(e,t,n,r){try{return[n,r(t)]}catch(t){return void e(["Error starting subscription: "+Xs(n),t])}}(e,t,n[0],n[1])),i))}function na(e){return t=(e,t)=>{return n=e[0],r=e[1],o=t[0],i=t[1],s=t[2],zo(n,i)?[it(n,o),i,s]:[o,jo(n,i),it([n,r],s)];var n,r,o,i,s},n=e,r=[ot(),(o={Compare:T},Vo(o)),ot()],qe(t,ct(n),r);var t,n,r,o}const ra=ot();function oa(e,t){const n=Lo(r={Compare:T},No(r,gt((e=>e[0]),e)));var r;const o=na(t),i=o[1],s=o[0];if(n.Equals(i))return[s,ot(),e,ot()];{const t=function(e,t){const n=Xe(),r=Xe(),o=n,s=dt(((e,t)=>{let n,r;const o=e[0],s=e[1];return(e=>zo(e[0],i))(t)?[(n=new Ze(t,void 0),o.tail=n,n),s]:[o,(r=new Ze(t,void 0),s.tail=r,r)]}),[o,r],t),a=Xe();s[0].tail=a;const l=Xe();return s[1].tail=l,[rt(o),rt(r)]}(0,e);return[s,t[1],t[0],wt((e=>!zo(e[0],n)),o[2])]}}function ia(e,t){return e>t?e:t}function sa(e,t,n,r,o){const i=function(e,t,n,r){const o=0|T(e,n);if(0===o)throw new Error("The step of a range cannot be zero");const i=o>0;return n=>{const o=0|T(n,t);return i&&o<=0||!i&&o>=0?[n,r(n,e)]:void 0}}(t,n,r,o);return Bt((()=>{return t=i,n=e,Ft((()=>function(e,t){let n,r=t;return Dt((()=>{if(null!=n){const e=Pe(n)[0];return Pe(n)[1],e}return At()}),(()=>{if(n=e(r),null!=n){Pe(n)[0];const e=Pe(n)[1];return r=e,!0}return!1}),(()=>{}))}(t,n)));var t,n}))}class aa extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Writable","ReadWritable"]}}class la{constructor(e){this.state=new aa(0,[ze(new Array(ia(e,10)),0,ia(e,10),null),0])}}function ua(e){const t=e.state;if(1===t.tag){const n=0|t.fields[1],r=0|t.fields[2],o=t.fields[0],i=(r+1)%o.length|0;return e.state=i===n?new aa(0,[o,n]):new aa(1,[o,n,i]),Ne(Ye(r,o))}}class ca extends he{constructor(e,t,n,r,o,i,s){super(),this.init=e,this.update=t,this.subscribe=n,this.view=r,this.setState=o,this.onError=i,this.termination=s}}function da(e,t,n){return new ca(e,t,(e=>ot()),n,M((e=>{const t=A(n)(e);return e=>{t(e)}})),(e=>{var t,n;t=e[0],n=e[1],console.error(Ne(t),n)}),[e=>!1,e=>{}])}function fa(e,t,n){let r;const o=n.init(t),i=o[0],a=n.subscribe(i),l=n.termination,u=new la(10);let c=!1,d=i,f=ra,p=!1;const h=A(e)((e=>{p||(function(e,t){const n=e.state;if(1===n.tag){const i=0|n.fields[1],a=0|n.fields[2],l=n.fields[0];Ke(l,i,t);const u=(i+1)%l.length|0;e.state=new aa(1,u===a?[(r=a,o=l,Array.from(Bt((()=>Yt(en(r,o),Bt((()=>{return Yt((e=r,t=o,Wt((()=>Lt(t)),((t,n)=>{if(t<e){if(n["System.Collections.IEnumerator.MoveNext"]())return Ne(n["System.Collections.Generic.IEnumerator`1.get_Current"]());throw new Error(Mt+"\\nParameter name: source")}}),(e=>{s(e)}))),Bt((()=>tn((e=>Gt(null)),sa(0,1,o.length,0,((e,t)=>e+t))))));var e,t}))))))),l.length,0]:[l,u,a])}else{const r=0|n.fields[1],o=n.fields[0];Ke(o,r,t);const i=(r+1)%o.length|0;e.state=new aa(1,[o,i,r])}var r,o}(u,e),c||(c=!0,m(),c=!1))})),m=()=>{let e,t=ua(u);for(;!p&&null!=t;){const r=Pe(t);if(l[0](r))ea(n.onError,f),l[1](d),p=!0;else{const o=n.update(r,d),i=o[0],s=n.subscribe(i);n.setState(i,h),Zs((e=>{n.onError([_e(be("Error handling the message: %A"))(r),e])}),h,o[1]),d=i,e=oa(f,s),f=ta(n.onError,h,e[0],e[1],e[2],e[3]),t=ua(u)}}};c=!0,n.setState(i,h),Zs((e=>{n.onError([_e(be("Error intitializing:")),e])}),h,o[1]),r=oa(f,a),f=ta(n.onError,h,r[0],r[1],r[2],r[3]),m(),c=!1}var pa=n(888);class ha{constructor(e,t,n){this.arg=t,this.dependencies=n;const r=e(),o=[];let a;this.finalDispatch=void 0;const l=function(e){return e.init}(r)(this.arg);let u=l[0],c=l[1];a=[[u,e=>{const t=this.finalDispatch;null==t?o.push(e):t(e)},!1,o],c],this.state=a[0],this.cmd=a[1],this.subscribe=e=>{let t=!1;const n=i(this.state[0]);return function(e,t){fa(M((e=>e)),e,t)}(this.arg,function(e,t){return new ca(t.init,t.update,t.subscribe,t.view,e,t.onError,t.termination)}(((t,n)=>{const r=this.state;this.finalDispatch=n,this.state=[t,r[1],!0,o],t!==r[0]&&e()}),function(e,r,o,a,l,u,c){const d=A(e)(c.init),f=O(r)(A(c.update)),p=O(o)(A(c.view)),h=O(a)(A(c.setState));return new ca(d,M(f),A(l)(c.subscribe),M(p),M(h),c.onError,(m=c.termination,[e=>!!m[0](e)||n&&t,e=>{const t=e;i(t)?s(t):m[1](e)}]));var m}(((e,t)=>{const n=this.cmd;return this.cmd=Js(),[this.state[0],n]}),((e,t,n)=>e(t)(this.state[0])),R((e=>e)),R((e=>e)),M((e=>e)),0,r))),()=>{t=!0}}}}function ma(e,t,n){return new ha(e,t,n)}function $a(e,t,n){const i=(0,r.useState)((()=>ma(e,t,n))),a=i[0];(function(e,t,n){return!_(e.arg,t)||!_(e.dependencies,n)})(a,t,n)&&i[1](ma(e,t,n));const l=(0,pa.useSyncExternalStore)(function(e){return e.subscribe}(a),(()=>function(e){return e.state}(a))),c=l[2],d=l[3],f=l[1];return(0,r.useEffect)((()=>{if(c&&d.length>0){let t=u(d);try{for(;t["System.Collections.IEnumerator.MoveNext"]();){const e=t["System.Collections.Generic.IEnumerator`1.get_Current"]();setTimeout((()=>{f(e)}))}}finally{s(t)}o(e=d)?e.splice(0):e.clear()}var e}),[c,d]),[l[0],f]}class ga extends pe{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["Select"]}}class wa extends he{constructor(e){super(),this.Selected=e}}function va(e){let t,n;const o=(i=e.InitialValue,[new wa(i),Js()]);var i;return n=$a((()=>da((()=>o),((t,n)=>function(e,t){const n=function(e){return new wa(e.fields[0])}(t);return e(new Ps(n.Selected,{Valid:null!=n.Selected})),[n,Js()]}(e.OnUpdate,t)),((e,t)=>{}))),void 0,void 0),(0,r.createElement)("div",k(mt([["className",Te(" ",["space-y-2","mt-2"])],(t=zt(Bt((()=>tn((t=>{let o,i;const s=t[0];return Gt((0,r.createElement)("label",k(mt([["className",Te(" ",["flex","items-start"])],(o=[(0,r.createElement)("input",{className:Te(" ",["focus:ring-primary-focus","block","mt-0.5","mb-0.5","h-4","w-4","text-primary-base","border-gray-300"]),type:"radio",name:e.Name,id:s,checked:Le(n[0].Selected)===s,onChange:e=>{e.target.checked,n[1](new ga(s))}}),(0,r.createElement)("label",k(mt([["className",Te(" ",["ml-3","block","text-sm"])],["for",s],(i=zt(Bt((()=>Yt(Gt((0,r.createElement)("span",{className:Te(" ",["block","text-gray-900"]),children:t[1]})),Bt((()=>{const e=t[2];if(null==e)return Gt(null);{const t=e;return Gt((0,r.createElement)("span",{className:Te(" ",["block","text-gray-500"]),children:t}))}})))))),["children",yt.Children.toArray(Array.from(i))])])))],["children",yt.Children.toArray(Array.from(o))])]))))}),e.ValueLabelPairs)))),["children",yt.Children.toArray(Array.from(t))])])))}class ya extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["YesNoButtonGroupMsg","SetTfnInput","SetTfnTouched","SetTfnExemptionReason","SwitchEditingState","HideAlert"]}}class ba extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Tfn","Exempted"]}}class xa extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["TfnTruncated","TfnValue"]}}class _a extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Truncated","Editing"]}}class Sa extends he{constructor(e,t,n,r,o){super(),this.YesNoButtonGroup=e,this.TruncatedTfn=t,this.CurrentAlert=n,this.EditingState=r,this.TfnInputTouched=o}}function Ea(e){let t;const n=e.EditingState;if(1===n.tag){const e=n.fields[0];return new Ps((t=e.Value,null==t?void 0:new xa(1,[t])),e.Meta)}return new Ps(new xa(0,[Le(e.TruncatedTfn)]),{Valid:!0})}const Ca=e=>!(1===Hi(e).tag);function Ta(e){const t=e.EditingState;if(1===t.tag){const n=t.fields[0],r=n.Value;if(null==r)return new Sa(e.YesNoButtonGroup,e.TruncatedTfn,e.CurrentAlert,new _a(1,[new Ps(n.Value,{Valid:!1})]),e.TfnInputTouched);if(1===r.tag)return new Sa(e.YesNoButtonGroup,e.TruncatedTfn,e.CurrentAlert,new _a(1,[new Ps(n.Value,{Valid:!0})]),e.TfnInputTouched);{const t=r.fields[0].fields[0];return new Sa(e.YesNoButtonGroup,e.TruncatedTfn,e.CurrentAlert,new _a(1,[new Ps(n.Value,{Valid:Ca(t)})]),e.TfnInputTouched)}}return e}function ka(e){const t=e.EditingState;if(1===t.tag){const e=t.fields[0].Value;let n,r;return null!=e&&0===e.tag?(n=0,r=e.fields[0]):n=1,0===n?r.fields[0]:""}return""}function Ia(e){if(e.TfnInputTouched){const t=e.EditingState;return 1===t.tag&&!t.fields[0].Meta.Valid}return!1}function Ma(e){let t,n,o,i,s;const a=function(e){let t,n,r;return[Ta(new Sa(Ws(null!=e&&1===e.tag&&1===e.fields[0].tag?new Us(1,[]):new Us(0,[])),(t=e,null!=t&&0===t.tag?(n=t.fields[0],n):void 0),void 0,null==e?new _a(1,[Ds()]):1===e.tag?(r=e.fields[0],new _a(1,[new Ps(r,{Valid:!1})])):new _a(0,[]),!1)),Js()]}(e.InitialValue);s=$a((()=>da((()=>a),((t,n)=>function(e,t,n){const r=function(e,t){switch(e.tag){case 2:return new Sa(t.YesNoButtonGroup,t.TruncatedTfn,t.CurrentAlert,t.EditingState,!0);case 1:{const n=e.fields[0],r=new ba(0,[new Ni(n)]),o=Ca(n);return t.EditingState.tag,new Sa(t.YesNoButtonGroup,t.TruncatedTfn,t.CurrentAlert,new _a(1,[new Ps(r,{Valid:o})]),t.TfnInputTouched)}case 3:{const n=e.fields[0];let r,o;const i=n.Value;return o=null==i?void 0:function(e){switch(e){case"Under18AndBelowTaxThreshold":return new Fi(0,[]);case"Pending":return new Fi(1,[]);case"Pensioner":return new Fi(2,[]);default:return}}(i),r=null==o?void 0:new ba(1,[o]),t.EditingState.tag,new Sa(t.YesNoButtonGroup,t.TruncatedTfn,t.CurrentAlert,new _a(1,[new Ps(r,n.Meta)]),t.TfnInputTouched)}case 4:return 1===t.EditingState.tag?new Sa(t.YesNoButtonGroup,t.TruncatedTfn,t.CurrentAlert,new _a(0,[]),t.TfnInputTouched):new Sa(t.YesNoButtonGroup,t.TruncatedTfn,new Is(2,["Please click the continue button at the end of\n this form to save the changes to your TFN."]),new _a(1,[Ds()]),!1);case 5:return Ta(new Sa(t.YesNoButtonGroup,t.TruncatedTfn,void 0,t.EditingState,t.TfnInputTouched));default:{const n=e.fields[0];let r,o;n.tag,o=n.fields[0];const i=t.EditingState;if(1===o.tag)if(1===i.tag){const e=i.fields[0].Value;let n;n=null!=e&&1===e.tag?0:1,r=0===n?t.EditingState:new _a(1,[Ds()])}else r=new _a(1,[Ds()]);else if(1===i.tag){const e=i.fields[0].Value,n=t.TruncatedTfn;let o,s;switch(null!=e&&0===e.tag?o=0:null!=n?(o=1,s=n):o=2,o){case 0:r=t.EditingState;break;case 1:r=new _a(0,[]);break;default:r=new _a(1,[Ds()])}}else r=new _a(0,[]);return new Sa(Ys(n,t.YesNoButtonGroup),t.TruncatedTfn,t.CurrentAlert,r,t.TfnInputTouched)}}}(t,n);return e(Ea(r)),[r,Js()]}(e.OnUpdate,t,n)),((e,t)=>{}))),void 0,void 0);const l=s[0],u=s[1],c=null==l.TruncatedTfn?null:(0,r.createElement)("div",k(st((t=[(0,r.createElement)("button",k(mt([["className",Te(" ",["relative","inline-flex","items-center","space-x-2","px-3","sm:py-2","py-3","border","border-gray-300","text-sm","font-medium","rounded-r-md","text-gray-700","bg-gray-50","hover:bg-gray-100","focus:outline-none","focus:ring-1","focus:ring-primary-focus","focus:border-primary-focus","focus:z-20","-ml-px"])],["type","button"],(n=zt(Bt((()=>_(l.EditingState,new _a(0,[]))?Yt(Gt(xt),Bt((()=>Gt((0,r.createElement)("span",{children:["Edit"]}))))):Yt(Gt(_t),Bt((()=>Gt((0,r.createElement)("span",{children:["Cancel"]})))))))),["children",yt.Children.toArray(Array.from(n))]),["onClick",e=>{u(new ya(4,[]))}]])))],["children",yt.Children.toArray(Array.from(t))]))));return(0,r.createElement)("div",k(mt([["className",Te(" ",It)],(o=[Vs("Do you have your Tax File Number (TFN)?"),(0,r.createElement)(qs,{Dispatch:e=>{u(new ya(0,[e]))},State:l.YesNoButtonGroup}),(0,r.createElement)("div",k(mt([["className",Te(" ",["mt-4"])],(i=zt(Bt((()=>{let e,t,n,o,i,s;return Yt((e=l.YesNoButtonGroup.Selected,null!=e?1===e.tag?Gt((0,r.createElement)(va,(t=gt((e=>[fe(e[0]),e[1],e[2]]),mt([[new Fi(1,[]),"My TFN is pending",void 0],[new Fi(0,[]),"I'm under 18 and don't have a TFN",void 0],[new Fi(2,[]),"I have an exemption from quoting a TFN","E.g. receiving a social security or service pension"]])),{InitialValue:De((n=Ea(l).Value,null!=n&&1===n.tag&&1===n.fields[0].tag?(o=n.fields[0].fields[0],fe(o)):void 0)),Name:"TfnExemption",OnUpdate:e=>{u(new ya(3,[e]))},ValueLabelPairs:t}))):(i=l.TruncatedTfn,null!=i&&0===l.EditingState.tag?(s=i,Yt(Gt(Vs("Enter your TFN")),Bt((()=>{let e,t,n;return Gt((0,r.createElement)("div",k(mt([["className",Te(" ",["mt-1","flex","rounded-md","shadow-sm"])],(e=[(0,r.createElement)("div",k(mt([["className","relative flex items-stretch flex-grow"],(t=[(0,r.createElement)("input",k(mt([["className",Te(" ",["focus:ring-primary-focus","focus:border-primary-focus","bg-gray-50","focus:z-20","relative","block","w-full","rounded-none","rounded-l-md","pl-3","sm:text-sm","text-base","border","border-gray-300","text-gray-500"])],["disabled",!0],(n=`*** *** *${s}`,["ref",e=>{null==e||_(e.value,n)||(e.value=n)}])])))],["children",yt.Children.toArray(Array.from(t))])]))),c],["children",yt.Children.toArray(Array.from(e))])]))))})))):Yt(Gt(Vs("Enter your TFN")),Bt((()=>{let e;return Gt((0,r.createElement)("div",k(mt([["className",Te(" ",["mt-1"])],(e=zt(Bt((()=>{let e,t;return Yt(Gt((0,r.createElement)("div",k(mt([["className",Te(" ",["relative","flex","items-stretch","flex-grow"])],(e=[(0,r.createElement)("input",k(mt([["className",Te(" ",zt(Bt((()=>Yt(Gt("block"),Bt((()=>Yt(Gt("w-full"),Bt((()=>Yt(Gt("focus:outline-none"),Bt((()=>Yt(Gt("text-base"),Bt((()=>Yt(Gt("focus:z-20"),Bt((()=>Yt(Gt("relative"),Bt((()=>Yt(Gt("sm:text-sm"),Bt((()=>Yt(Gt("rounded-md"),Bt((()=>Yt(Gt("border-gray-300"),Bt((()=>Yt(Gt("focus:ring-primary-focus"),Bt((()=>Yt(Gt("focus:border-primary-focus"),Bt((()=>Yt(Gt("block"),Bt((()=>Yt(Gt("w-full"),Bt((()=>Yt(null==l.TruncatedTfn?Gt("rounded-md"):Gt("rounded-none rounded-l-md"),Bt((()=>Ia(l)?["border-red-300","text-red-900","placeholder-red-300","focus:ring-red-500","focus:border-red-500"]:Vt()))))))))))))))))))))))))))))))))))))))))))))))],["type","text"],["onChange",e=>{u(new ya(1,[Ae(mi,e.target.value)]))}],(t=ka(l),["ref",e=>{null==e||_(e.value,t)||(e.value=t)}]),["onBlur",e=>{u(new ya(2,[]))}],["inputMode","numeric"],["data-testid","tfn-input"]]))),c],["children",yt.Children.toArray(Array.from(e))])])))),Bt((()=>Ia(l)?Gt((0,r.createElement)("div",{className:Te(" ",["mt-1","text-sm","text-red-600"]),children:"That isn’t a valid Tax File Number"})):Vt())))}))),["children",yt.Children.toArray(Array.from(e))])]))))})))):Gt(null)),Bt((()=>{let e;return Gt((e=zt(Bt((()=>{const e=l.CurrentAlert;if(null==e)return Gt(null);{const t=e;return Gt((0,r.createElement)(Os,{alert:t,hideAlert:()=>{u(new ya(5,[]))}}))}}))),(0,r.createElement)("div",{children:yt.Children.toArray(Array.from(e))})))})))}))),["children",yt.Children.toArray(Array.from(i))])])))],["children",yt.Children.toArray(Array.from(o))])])))}function Aa(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent))}function Ra(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Oa(e){let t=null;return()=>(null==t&&(t=e()),t)}const Pa=Oa((function(){return Ra(/^Mac/i)})),Da=Oa((function(){return Ra(/^iPhone/i)})),Na=Oa((function(){return Ra(/^iPad/i)||Pa()&&navigator.maxTouchPoints>1})),Fa=Oa((function(){return Da()||Na()})),La=(Oa((function(){return Pa()||Fa()})),Oa((function(){return Aa(/AppleWebKit/i)&&!La()})),Oa((function(){return Aa(/Chrome/i)}))),Ba=Oa((function(){return Aa(/Android/i)}));Oa((function(){return Aa(/Firefox/i)}));const Ha=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},Va=e=>e&&"window"in e&&e.window===e?e:Ha(e).defaultView||window;let Ga=null,Ua=new Set,za=new Map,ja=!1,Wa=!1;const Ya={Tab:!0,Escape:!0};function Ka(e,t){for(let n of Ua)n(e,t)}function qa(e){ja=!0,function(e){return!(e.metaKey||!Pa()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(Ga="keyboard",Ka("keyboard",e))}function Za(e){Ga="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(ja=!0,Ka("pointer",e))}function Ja(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||(Ba()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType))&&(ja=!0,Ga="virtual")}function Xa(e){e.target!==window&&e.target!==document&&(ja||Wa||(Ga="virtual",Ka("virtual",e)),ja=!1,Wa=!1)}function Qa(){ja=!1,Wa=!0}function el(e){if("undefined"==typeof window||za.get(Va(e)))return;const t=Va(e),n=Ha(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){ja=!0,r.apply(this,arguments)},n.addEventListener("keydown",qa,!0),n.addEventListener("keyup",qa,!0),n.addEventListener("click",Ja,!0),t.addEventListener("focus",Xa,!0),t.addEventListener("blur",Qa,!1),"undefined"!=typeof PointerEvent?(n.addEventListener("pointerdown",Za,!0),n.addEventListener("pointermove",Za,!0),n.addEventListener("pointerup",Za,!0)):(n.addEventListener("mousedown",Za,!0),n.addEventListener("mousemove",Za,!0),n.addEventListener("mouseup",Za,!0)),t.addEventListener("beforeunload",(()=>{tl(e)}),{once:!0}),za.set(t,{focus:r})}const tl=(e,t)=>{const n=Va(e),r=Ha(e);t&&r.removeEventListener("DOMContentLoaded",t),za.has(n)&&(n.HTMLElement.prototype.focus=za.get(n).focus,r.removeEventListener("keydown",qa,!0),r.removeEventListener("keyup",qa,!0),r.removeEventListener("click",Ja,!0),n.removeEventListener("focus",Xa,!0),n.removeEventListener("blur",Qa,!1),"undefined"!=typeof PointerEvent?(r.removeEventListener("pointerdown",Za,!0),r.removeEventListener("pointermove",Za,!0),r.removeEventListener("pointerup",Za,!0)):(r.removeEventListener("mousedown",Za,!0),r.removeEventListener("mousemove",Za,!0),r.removeEventListener("mouseup",Za,!0)),za.delete(n))};function nl(){return"pointer"!==Ga}"undefined"!=typeof document&&function(e){const t=Ha(e);let n;"loading"!==t.readyState?el(e):(n=()=>{el(e)},t.addEventListener("DOMContentLoaded",n))}();const rl=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);const ol="undefined"!=typeof document?r.default.useLayoutEffect:()=>{};class il{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function sl(e){let t=(0,r.useRef)({isFocused:!1,observer:null});ol((()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]);let n=function(e){const t=(0,r.useRef)(null);return ol((()=>{t.current=e}),[e]),(0,r.useCallback)(((...e)=>{const n=t.current;return null==n?void 0:n(...e)}),[])}((t=>{null==e||e(t)}));return(0,r.useCallback)((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target,o=e=>{t.current.isFocused=!1,r.disabled&&n(new il("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver((()=>{if(t.current.isFocused&&r.disabled){var e;null===(e=t.current.observer)||void 0===e||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}})),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}}),[n])}function al(e={}){let{autoFocus:t=!1,isTextInput:n,within:o}=e,i=(0,r.useRef)({isFocused:!1,isFocusVisible:t||nl()}),[s,a]=(0,r.useState)(!1),[l,u]=(0,r.useState)((()=>i.current.isFocused&&i.current.isFocusVisible)),c=(0,r.useCallback)((()=>u(i.current.isFocused&&i.current.isFocusVisible)),[]),d=(0,r.useCallback)((e=>{i.current.isFocused=e,a(e),c()}),[c]);var f,p,h;f=e=>{i.current.isFocusVisible=e,c()},p=[],h={isTextInput:n},el(),(0,r.useEffect)((()=>{let e=(e,t)=>{(function(e,t,n){var r;const o="undefined"!=typeof window?Va(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,i="undefined"!=typeof window?Va(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s="undefined"!=typeof window?Va(null==n?void 0:n.target).HTMLElement:HTMLElement,a="undefined"!=typeof window?Va(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent;return!((e=e||(null==n?void 0:n.target)instanceof o&&!rl.has(null==n||null===(r=n.target)||void 0===r?void 0:r.type)||(null==n?void 0:n.target)instanceof i||(null==n?void 0:n.target)instanceof s&&(null==n?void 0:n.target.isContentEditable))&&"keyboard"===t&&n instanceof a&&!Ya[n.key])})(!!(null==h?void 0:h.isTextInput),e,t)&&f(nl())};return Ua.add(e),()=>{Ua.delete(e)}}),p);let{focusProps:m}=function(e){let{isDisabled:t,onFocus:n,onBlur:o,onFocusChange:i}=e;const s=(0,r.useCallback)((e=>{if(e.target===e.currentTarget)return o&&o(e),i&&i(!1),!0}),[o,i]),a=sl(s),l=(0,r.useCallback)((e=>{const t=Ha(e.target);e.target===e.currentTarget&&t.activeElement===e.target&&(n&&n(e),i&&i(!0),a(e))}),[i,n,a]);return{focusProps:{onFocus:!t&&(n||i||o)?l:void 0,onBlur:t||!o&&!i?void 0:s}}}({isDisabled:o,onFocusChange:d}),{focusWithinProps:$}=function(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:o,onFocusWithinChange:i}=e,s=(0,r.useRef)({isFocusWithin:!1}),a=(0,r.useCallback)((e=>{s.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(s.current.isFocusWithin=!1,n&&n(e),i&&i(!1))}),[n,i,s]),l=sl(a),u=(0,r.useCallback)((e=>{s.current.isFocusWithin||document.activeElement!==e.target||(o&&o(e),i&&i(!0),s.current.isFocusWithin=!0,l(e))}),[o,i,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:a}}}({isDisabled:!o,onFocusWithinChange:d});return{isFocused:s,isFocusVisible:l,focusProps:o?$:m}}let ll=!1,ul=0;function cl(){ll=!0,setTimeout((()=>{ll=!1}),50)}function dl(e){"touch"===e.pointerType&&cl()}function fl(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",dl):document.addEventListener("touchend",cl),ul++,()=>{ul--,ul>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",dl):document.removeEventListener("touchend",cl))}}function pl(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:o,isDisabled:i}=e,[s,a]=(0,r.useState)(!1),l=(0,r.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,r.useEffect)(fl,[]);let{hoverProps:u,triggerHoverEnd:c}=(0,r.useMemo)((()=>{let e=(e,r)=>{if(l.pointerType=r,i||"touch"===r||l.isHovered||!e.currentTarget.contains(e.target))return;l.isHovered=!0;let o=e.currentTarget;l.target=o,t&&t({type:"hoverstart",target:o,pointerType:r}),n&&n(!0),a(!0)},r=(e,t)=>{if(l.pointerType="",l.target=null,"touch"===t||!l.isHovered)return;l.isHovered=!1;let r=e.currentTarget;o&&o({type:"hoverend",target:r,pointerType:t}),n&&n(!1),a(!1)},s={};return"undefined"!=typeof PointerEvent?(s.onPointerEnter=t=>{ll&&"mouse"===t.pointerType||e(t,t.pointerType)},s.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&r(e,e.pointerType)}):(s.onTouchStart=()=>{l.ignoreEmulatedMouseEvents=!0},s.onMouseEnter=t=>{l.ignoreEmulatedMouseEvents||ll||e(t,"mouse"),l.ignoreEmulatedMouseEvents=!1},s.onMouseLeave=e=>{!i&&e.currentTarget.contains(e.target)&&r(e,"mouse")}),{hoverProps:s,triggerHoverEnd:r}}),[t,n,o,i,l]);return(0,r.useEffect)((()=>{i&&c({currentTarget:l.target},l.pointerType)}),[i]),{hoverProps:u,isHovered:s}}function hl(e,t,n){let r,o=n.initialDeps??[];return()=>{var i,s,a,l;let u;n.key&&(null==(i=n.debug)?void 0:i.call(n))&&(u=Date.now());const c=e(),d=c.length!==o.length||c.some(((e,t)=>o[t]!==e));if(!d)return r;let f;if(o=c,n.key&&(null==(s=n.debug)?void 0:s.call(n))&&(f=Date.now()),r=t(...c),n.key&&(null==(a=n.debug)?void 0:a.call(n))){const e=Math.round(100*(Date.now()-u))/100,t=Math.round(100*(Date.now()-f))/100,r=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${o(t,5)} /${o(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return null==(l=null==n?void 0:n.onChange)||l.call(n,r),r}}function ml(e,t){if(void 0===e)throw new Error("Unexpected undefined"+(t?`: ${t}`:""));return e}const $l=(e,t,n)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout((()=>t.apply(this,o)),n)}},gl=e=>e,wl=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},vl=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const o=e=>{const{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(o(n.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver((e=>{const t=e[0];if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e)return void o({width:e.inlineSize,height:e.blockSize})}o(n.getBoundingClientRect())}));return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},yl={passive:!0},bl="undefined"==typeof window||"onscrollend"in window,xl=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let o=0;const i=e.options.useScrollendEvent&&bl?()=>{}:$l(r,(()=>{t(o,!1)}),e.options.isScrollingResetDelay),s=r=>()=>{const{horizontal:s,isRtl:a}=e.options;o=s?n.scrollLeft*(a?-1:1):n.scrollTop,i(),t(o,r)},a=s(!0),l=s(!1);return l(),n.addEventListener("scroll",a,yl),n.addEventListener("scrollend",l,yl),()=>{n.removeEventListener("scroll",a),n.removeEventListener("scrollend",l)}},_l=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},Sl=(e,{adjustments:t=0,behavior:n},r)=>{var o,i;const s=e+t;null==(i=null==(o=r.scrollElement)?void 0:o.scrollTo)||i.call(o,{[r.options.horizontal?"left":"top"]:s,behavior:n})};class El{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver((e=>{e.forEach((e=>{this._measureElement(e.target,e)}))})):null);return{disconnect:()=>{var n;null==(n=t())||n.disconnect(),e=null},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach((([t,n])=>{void 0===n&&delete e[t]})),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:gl,rangeExtractor:wl,onChange:()=>{},measureElement:_l,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=hl((()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null])),(e=>{this.notify(e)}),{key:!1,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((e=>e())),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach((e=>{this.observer.observe(e)})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,(e=>{this.scrollRect=e,this.maybeNotify()}))),this.unsubs.push(this.options.observeElementOffset(this,((e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.maybeNotify()})))}},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??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const n=new Map,r=new Map;for(let o=t-1;o>=0;o--){const t=e[o];if(n.has(t.lane))continue;const i=r.get(t.lane);if(null==i||t.end>i.end?r.set(t.lane,t):t.end<i.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort(((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end))[0]:void 0},this.getMeasurementOptions=hl((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled]),((e,t,n,r,o)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:o})),{key:!1}),this.getMeasurements=hl((()=>[this.getMeasurementOptions(),this.itemSizeCache]),(({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:o},i)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];0===this.measurementsCache.length&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach((e=>{this.itemSizeCache.set(e.key,e.size)})));const s=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const a=this.measurementsCache.slice(0,s);for(let o=s;o<e;o++){const e=r(o),s=1===this.options.lanes?a[o-1]:this.getFurthestMeasurement(a,o),l=s?s.end+this.options.gap:t+n,u=i.get(e),c="number"==typeof u?u:this.options.estimateSize(o),d=l+c,f=s?s.lane:o%this.options.lanes;a[o]={index:o,start:l,size:c,end:d,key:e,lane:f}}return this.measurementsCache=a,a}),{key:!1,debug:()=>this.options.debug}),this.calculateRange=hl((()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()]),((e,t,n)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,o=Cl(0,r,(t=>e[t].start),n);let i=o;for(;i<r&&e[i].end<n+t;)i++;return{startIndex:o,endIndex:i}}({measurements:e,outerSize:t,scrollOffset:n}):null),{key:!1,debug:()=>this.options.debug}),this.getIndexes=hl((()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count]),((e,t,n,r)=>null===t?[]:e({startIndex:t.startIndex,endIndex:t.endIndex,overscan:n,count:r})),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const n=this.indexFromElement(e),r=this.measurementsCache[n];if(!r)return;const o=r.key,i=this.elementsCache.get(o);i!==e&&(i&&this.observer.unobserve(i),this.observer.observe(e),this.elementsCache.set(o,e)),e.isConnected&&this.resizeItem(n,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{const n=this.measurementsCache[e];if(!n)return;const r=t-(this.itemSizeCache.get(n.key)??n.size);0!==r&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(n,r,this):n.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,t)),this.notify(!1))},this.measureElement=e=>{e?this._measureElement(e,void 0):this.elementsCache.forEach(((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))}))},this.getVirtualItems=hl((()=>[this.getIndexes(),this.getMeasurements()]),((e,t)=>{const n=[];for(let r=0,o=e.length;r<o;r++){const o=t[e[r]];n.push(o)}return n}),{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(0!==t.length)return ml(t[Cl(0,t.length-1,(e=>ml(t[e]).start),e)])},this.getOffsetForAlignment=(e,t)=>{const n=this.getSize(),r=this.getScrollOffset();"auto"===t&&(t=e<=r?"start":e>=r+n?"end":"start"),"start"===t||("end"===t?e-=n:"center"===t&&(e-=n/2));const o=this.options.horizontal?"scrollWidth":"scrollHeight",i=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[o]:this.scrollElement[o]:0)-n;return Math.max(Math.min(i,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const n=this.measurementsCache[e];if(!n)return;const r=this.getSize(),o=this.getScrollOffset();if("auto"===t)if(n.end>=o+r-this.options.scrollPaddingEnd)t="end";else{if(!(n.start<=o+this.options.scrollPaddingStart))return[o,t];t="start"}const i="end"===t?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,t),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{null!==this.scrollToIndexTimeoutId&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:t="start",behavior:n}={})=>{this.cancelScrollToIndex(),"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:t="auto",behavior:n}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const r=this.getOffsetForIndex(e,t);if(!r)return;const[o,i]=r;this._scrollToOffset(o,{adjustments:void 0,behavior:n}),"smooth"!==n&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout((()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){const[t]=ml(this.getOffsetForIndex(e,i));((e,t)=>Math.abs(e-t)<1)(t,this.getScrollOffset())||this.scrollToIndex(e,{align:i,behavior:n})}else this.scrollToIndex(e,{align:i,behavior:n})})))},this.scrollBy=(e,{behavior:t}={})=>{this.cancelScrollToIndex(),"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let n;return n=0===t.length?this.options.paddingStart:1===this.options.lanes?(null==(e=t[t.length-1])?void 0:e.end)??0:Math.max(...t.slice(-this.options.lanes).map((e=>e.end))),Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const Cl=(e,t,n,r)=>{for(;e<=t;){const o=(e+t)/2|0,i=n(o);if(i<r)e=o+1;else{if(!(i>r))return o;t=o-1}}return e>0?e-1:0},Tl="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;var kl=Object.defineProperty,Il=(e,t,n)=>(((e,t,n)=>{t in e?kl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let Ml=new class{constructor(){Il(this,"current",this.detect()),Il(this,"handoffState","pending"),Il(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}};function Al(e){return Ml.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function Rl(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function Ol(){let e=[],t={addEventListener:(e,n,r,o)=>(e.addEventListener(n,r,o),t.add((()=>e.removeEventListener(n,r,o)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return Rl((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=Ol();return e(t),this.add((()=>t.dispose()))},add:t=>(e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function Pl(){let[e]=(0,r.useState)(Ol);return(0,r.useEffect)((()=>()=>e.dispose()),[e]),e}let Dl=(e,t)=>{Ml.isServer?(0,r.useEffect)(e,t):(0,r.useLayoutEffect)(e,t)};function Nl(e){let t=(0,r.useRef)(e);return Dl((()=>{t.current=e}),[e]),t}let Fl=function(e){let t=Nl(e);return r.default.useCallback(((...e)=>t.current(...e)),[t])};function Ll(e,t){return null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t&&"id"in e&&"id"in t?e.id===t.id:e===t}function Bl(e,t=!1){let[n,o]=(0,r.useReducer)((()=>({})),{}),i=(0,r.useMemo)((()=>function(e){if(null===e)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}(e)),[e,n]);return Dl((()=>{if(!e)return;let t=new ResizeObserver(o);return t.observe(e),()=>{t.disconnect()}}),[e]),t?{width:`${i.width}px`,height:`${i.height}px`}:i}class Hl extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}}function Vl(e,t){let n=e(),r=new Set;return{getSnapshot:()=>n,subscribe:e=>(r.add(e),()=>r.delete(e)),dispatch(e,...o){let i=t[e].call(n,...o);i&&(n=i,r.forEach((e=>e())))}}}function Gl(e){return(0,r.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot)}let Ul=new Hl((()=>Vl((()=>[]),{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(-1===t)return this;let n=this.slice();return n.splice(t,1),n}})));function zl(e,t){let n=Ul.get(t),o=(0,r.useId)(),i=Gl(n);if(Dl((()=>{if(e)return n.dispatch("ADD",o),()=>n.dispatch("REMOVE",o)}),[n,e]),!e)return!1;let s=i.indexOf(o),a=i.length;return-1===s&&(s=a,a+=1),s===a-1}let jl=new Map,Wl=new Map;function Yl(e){var t;let n=null!=(t=Wl.get(e))?t:0;return Wl.set(e,n+1),0!==n||(jl.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>function(e){var t;let n=null!=(t=Wl.get(e))?t:1;if(1===n?Wl.delete(e):Wl.set(e,n-1),1!==n)return;let r=jl.get(e);r&&(null===r["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,jl.delete(e))}(e)}function Kl(e,{allowed:t,disallowed:n}={}){let r=zl(e,"inert-others");Dl((()=>{var e,o;if(!r)return;let i=Ol();for(let t of null!=(e=null==n?void 0:n())?e:[])t&&i.add(Yl(t));let s=null!=(o=null==t?void 0:t())?o:[];for(let e of s){if(!e)continue;let t=Al(e);if(!t)continue;let n=e.parentElement;for(;n&&n!==t.body;){for(let e of n.children)s.some((t=>e.contains(t)))||i.add(Yl(e));n=n.parentElement}}return i.dispose}),[r,t,n])}function ql(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ql),r}let Zl=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");["[data-autofocus]"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var Jl,Xl,Ql,eu=((Ql=eu||{})[Ql.First=1]="First",Ql[Ql.Previous=2]="Previous",Ql[Ql.Next=4]="Next",Ql[Ql.Last=8]="Last",Ql[Ql.WrapAround=16]="WrapAround",Ql[Ql.NoScroll=32]="NoScroll",Ql[Ql.AutoFocus=64]="AutoFocus",Ql),tu=((Xl=tu||{})[Xl.Error=0]="Error",Xl[Xl.Overflow=1]="Overflow",Xl[Xl.Success=2]="Success",Xl[Xl.Underflow=3]="Underflow",Xl),nu=((Jl=nu||{})[Jl.Previous=-1]="Previous",Jl[Jl.Next=1]="Next",Jl),ru=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(ru||{});var ou=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(ou||{});function iu(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function su(){return iu()||/Android/gi.test(window.navigator.userAgent)}function au(e,t,n,o){let i=Nl(n);(0,r.useEffect)((()=>{if(e)return document.addEventListener(t,n,o),()=>document.removeEventListener(t,n,o);function n(e){i.current(e)}}),[e,t,o])}function lu(e,t,n){let o=zl(e,"outside-click"),i=Nl(n),s=(0,r.useCallback)((function(e,n){if(e.defaultPrevented)return;let r=n(e);if(null===r||!r.getRootNode().contains(r)||!r.isConnected)return;let o=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of o)if(null!==t&&(t.contains(r)||e.composed&&e.composedPath().includes(t)))return;return!function(e,t=0){var n;return e!==(null==(n=Al(e))?void 0:n.body)&&ql(t,{0:()=>e.matches(Zl),1(){let t=e;for(;null!==t;){if(t.matches(Zl))return!0;t=t.parentElement}return!1}})}(r,ru.Loose)&&-1!==r.tabIndex&&e.preventDefault(),i.current(e,r)}),[i,t]),a=(0,r.useRef)(null);au(o,"pointerdown",(e=>{var t,n;a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),au(o,"mousedown",(e=>{var t,n;a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),au(o,"click",(e=>{su()||a.current&&(s(e,(()=>a.current)),a.current=null)}),!0);let l=(0,r.useRef)({x:0,y:0});au(o,"touchstart",(e=>{l.current.x=e.touches[0].clientX,l.current.y=e.touches[0].clientY}),!0),au(o,"touchend",(e=>{let t=e.changedTouches[0].clientX,n=e.changedTouches[0].clientY;if(!(Math.abs(t-l.current.x)>=30||Math.abs(n-l.current.y)>=30))return s(e,(()=>e.target instanceof HTMLElement?e.target:null))}),!0),function(e,t,n,o){let i=Nl((e=>s(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))));(0,r.useEffect)((()=>{if(e)return window.addEventListener(t,n,o),()=>window.removeEventListener(t,n,o);function n(e){i.current(e)}}),[e,t,o])}(o,"blur",0,!0)}function uu(...e){return(0,r.useMemo)((()=>Al(...e)),[...e])}function cu(e){let t=(0,r.useRef)({value:"",selectionStart:null,selectionEnd:null});return function(e,t,n,o){let i=Nl(n);(0,r.useEffect)((()=>{function n(e){i.current(e)}return(e=null!=e?e:window).addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}),[e,t,o])}(e,"blur",(e=>{let n=e.target;n instanceof HTMLInputElement&&(t.current={value:n.value,selectionStart:n.selectionStart,selectionEnd:n.selectionEnd})})),Fl((()=>{if(document.activeElement!==e&&e instanceof HTMLInputElement&&e.isConnected){if(e.focus({preventScroll:!0}),e.value!==t.current.value)e.setSelectionRange(e.value.length,e.value.length);else{let{selectionStart:n,selectionEnd:r}=t.current;null!==n&&null!==r&&e.setSelectionRange(n,r)}t.current={value:"",selectionStart:null,selectionEnd:null}}}))}function du(e,t){return(0,r.useMemo)((()=>{var n;if(e.type)return e.type;let r=null!=(n=e.as)?n:"button";return"string"==typeof r&&"button"===r.toLowerCase()||"BUTTON"===(null==t?void 0:t.tagName)&&!t.hasAttribute("type")?"button":void 0}),[e.type,e.as,t])}function fu(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=null!=(n=t.defaultView)?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),i=Math.max(0,e-o);n.style(r,"paddingRight",`${i}px`)}}}function pu(e){let t={};for(let n of e)Object.assign(t,n(t));return t}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0)),["textarea","input"].join(",");let hu=Vl((()=>new Map),{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:Ol(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:pu(n)},o=[iu()?{before({doc:e,d:t,meta:n}){function r(e){return n.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=Ol();n.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>n.dispose()))))}let o=null!=(n=window.scrollY)?n:window.pageYOffset,i=null;t.addEventListener(e,"click",(t=>{if(t.target instanceof HTMLElement)try{let n=t.target.closest("a");if(!n)return;let{hash:o}=new URL(n.href),s=e.querySelector(o);s&&!r(s)&&(i=s)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let n=e.target;for(;n.parentElement&&r(n.parentElement);)n=n.parentElement;t.style(n,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement){if("INPUT"===e.target.tagName)return;if(r(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;o!==t&&window.scrollTo(0,o),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)}))}))}}:{},fu(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];o.forEach((({before:e})=>null==e?void 0:e(r))),o.forEach((({after:e})=>null==e?void 0:e(r)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function mu(e,t,n=()=>[document.body]){!function(e,t,n=()=>({containers:[]})){let r=Gl(hu),o=t?r.get(t):void 0;!!o&&o.count;Dl((()=>{if(t&&e)return hu.dispatch("PUSH",t,n),()=>hu.dispatch("POP",t,n)}),[e,t])}(zl(e,"scroll-lock"),t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}}))}hu.subscribe((()=>{let e=hu.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&hu.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&hu.dispatch("TEARDOWN",n)}}));let $u=Symbol();function gu(...e){let t=(0,r.useRef)(e);(0,r.useEffect)((()=>{t.current=e}),[e]);let n=Fl((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[$u])))?void 0:n}function wu(e){return[e.screenX,e.screenY]}var vu,yu;"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&"test"===(null==(vu=null==process?void 0:process.env)?void 0:vu.NODE_ENV)&&void 0===(null==(yu=null==Element?void 0:Element.prototype)?void 0:yu.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join("\n")),[]});var bu,xu=((bu=xu||{})[bu.None=0]="None",bu[bu.Closed=1]="Closed",bu[bu.Enter=2]="Enter",bu[bu.Leave=4]="Leave",bu);function _u(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t}function Su(e,t){let n=(0,r.useRef)([]),o=Fl(e);(0,r.useEffect)((()=>{let e=[...n.current];for(let[r,i]of t.entries())if(n.current[r]!==i){let r=o(t,e);return n.current=t,r}}),[o,...t])}let Eu=(0,r.createContext)(void 0);function Cu(){return(0,r.useContext)(Eu)}const Tu=Math.min,ku=Math.max,Iu=Math.round,Mu=Math.floor,Au=e=>({x:e,y:e}),Ru={left:"right",right:"left",bottom:"top",top:"bottom"},Ou={start:"end",end:"start"};function Pu(e,t,n){return ku(e,Tu(t,n))}function Du(e,t){return"function"==typeof e?e(t):e}function Nu(e){return e.split("-")[0]}function Fu(e){return e.split("-")[1]}function Lu(e){return"x"===e?"y":"x"}function Bu(e){return"y"===e?"height":"width"}function Hu(e){return["top","bottom"].includes(Nu(e))?"y":"x"}function Vu(e){return Lu(Hu(e))}function Gu(e){return e.replace(/start|end/g,(e=>Ou[e]))}function Uu(e){return e.replace(/left|right|bottom|top/g,(e=>Ru[e]))}function zu(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ju(){return"undefined"!=typeof window}function Wu(e){return qu(e)?(e.nodeName||"").toLowerCase():"#document"}function Yu(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ku(e){var t;return null==(t=(qu(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function qu(e){return!!ju()&&(e instanceof Node||e instanceof Yu(e).Node)}function Zu(e){return!!ju()&&(e instanceof Element||e instanceof Yu(e).Element)}function Ju(e){return!!ju()&&(e instanceof HTMLElement||e instanceof Yu(e).HTMLElement)}function Xu(e){return!(!ju()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Yu(e).ShadowRoot)}function Qu(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ic(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ec(e){return["table","td","th"].includes(Wu(e))}function tc(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function nc(e){const t=rc(),n=Zu(e)?ic(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function rc(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function oc(e){return["html","body","#document"].includes(Wu(e))}function ic(e){return Yu(e).getComputedStyle(e)}function sc(e){return Zu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ac(e){if("html"===Wu(e))return e;const t=e.assignedSlot||e.parentNode||Xu(e)&&e.host||Ku(e);return Xu(t)?t.host:t}function lc(e){const t=ac(e);return oc(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ju(t)&&Qu(t)?t:lc(t)}function uc(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=lc(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=Yu(o);if(i){const e=cc(s);return t.concat(s,s.visualViewport||[],Qu(o)?o:[],e&&n?uc(e):[])}return t.concat(o,uc(o,[],n))}function cc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function dc(e,t,n){let{reference:r,floating:o}=e;const i=Hu(t),s=Vu(t),a=Bu(s),l=Nu(t),u="y"===i,c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Fu(t)){case"start":p[s]-=f*(n&&u?-1:1);break;case"end":p[s]+=f*(n&&u?-1:1)}return p}async function fc(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Du(t,e),h=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(p),m=a[f?"floating"===d?"reference":"floating":d],$=zu(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),g="floating"===d?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),v=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},y=zu(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:w,strategy:l}):g);return{top:($.top-y.top+h.top)/v.y,bottom:(y.bottom-$.bottom+h.bottom)/v.y,left:($.left-y.left+h.left)/v.x,right:(y.right-$.right+h.right)/v.x}}function pc(e){const t=ic(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ju(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Iu(n)!==i||Iu(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function hc(e){return Zu(e)?e:e.contextElement}function mc(e){const t=hc(e);if(!Ju(t))return Au(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=pc(t);let s=(i?Iu(n.width):n.width)/r,a=(i?Iu(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const $c=Au(0);function gc(e){const t=Yu(e);return rc()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:$c}function wc(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=hc(e);let s=Au(1);t&&(r?Zu(r)&&(s=mc(r)):s=mc(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Yu(e))&&t}(i,n,r)?gc(i):Au(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,c=o.width/s.x,d=o.height/s.y;if(i){const e=Yu(i),t=r&&Zu(r)?Yu(r):r;let n=e,o=cc(n);for(;o&&r&&t!==n;){const e=mc(o),t=o.getBoundingClientRect(),r=ic(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,u*=e.y,c*=e.x,d*=e.y,l+=i,u+=s,n=Yu(o),o=cc(n)}}return zu({width:c,height:d,x:l,y:u})}function vc(e,t){const n=sc(e).scrollLeft;return t?t.left+n:wc(Ku(e)).left+n}function yc(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:vc(e,r)),y:r.top+t.scrollTop}}function bc(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Yu(e),r=Ku(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=rc();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=Ku(e),n=sc(e),r=e.ownerDocument.body,o=ku(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ku(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+vc(e);const a=-n.scrollTop;return"rtl"===ic(r).direction&&(s+=ku(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(Ku(e));else if(Zu(t))r=function(e,t){const n=wc(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ju(e)?mc(e):Au(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=gc(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return zu(r)}function xc(e,t){const n=ac(e);return!(n===t||!Zu(n)||oc(n))&&("fixed"===ic(n).position||xc(n,t))}function _c(e,t,n){const r=Ju(t),o=Ku(t),i="fixed"===n,s=wc(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Au(0);if(r||!r&&!i)if(("body"!==Wu(t)||Qu(o))&&(a=sc(t)),r){const e=wc(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=vc(o));const u=!o||r||i?Au(0):yc(o,a);return{x:s.left+a.scrollLeft-l.x-u.x,y:s.top+a.scrollTop-l.y-u.y,width:s.width,height:s.height}}function Sc(e){return"static"===ic(e).position}function Ec(e,t){if(!Ju(e)||"fixed"===ic(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Ku(e)===n&&(n=n.ownerDocument.body),n}function Cc(e,t){const n=Yu(e);if(tc(e))return n;if(!Ju(e)){let t=ac(e);for(;t&&!oc(t);){if(Zu(t)&&!Sc(t))return t;t=ac(t)}return n}let r=Ec(e,t);for(;r&&ec(r)&&Sc(r);)r=Ec(r,t);return r&&oc(r)&&Sc(r)&&!nc(r)?n:r||function(e){let t=ac(e);for(;Ju(t)&&!oc(t);){if(nc(t))return t;if(tc(t))return null;t=ac(t)}return null}(e)||n}const Tc={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=Ku(r),a=!!t&&tc(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=Au(1);const c=Au(0),d=Ju(r);if((d||!d&&!i)&&(("body"!==Wu(r)||Qu(s))&&(l=sc(r)),Ju(r))){const e=wc(r);u=mc(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}const f=!s||d||i?Au(0):yc(s,l,!0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}},getDocumentElement:Ku,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?tc(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=uc(e,[],!1).filter((e=>Zu(e)&&"body"!==Wu(e))),o=null;const i="fixed"===ic(e).position;let s=i?ac(e):e;for(;Zu(s)&&!oc(s);){const t=ic(s),n=nc(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Qu(s)&&!n&&xc(e,s))?r=r.filter((e=>e!==s)):o=t,s=ac(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],a=i.reduce(((e,n)=>{const r=bc(t,n,o);return e.top=ku(r.top,e.top),e.right=Tu(r.right,e.right),e.bottom=Tu(r.bottom,e.bottom),e.left=ku(r.left,e.left),e}),bc(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Cc,getElementRects:async function(e){const t=this.getOffsetParent||Cc,n=this.getDimensions,r=await n(e.floating);return{reference:_c(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=pc(e);return{width:t,height:n}},getScale:mc,isElement:Zu,isRTL:function(e){return"rtl"===ic(e).direction}};function kc(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,u=hc(e),c=o||i?[...u?uc(u):[],...uc(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=u&&a?function(e,t){let n,r=null;const o=Ku(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const p={rootMargin:-Mu(c)+"px "+-Mu(o.clientWidth-(u+d))+"px "+-Mu(o.clientHeight-(c+f))+"px "+-Mu(u)+"px",threshold:ku(0,Tu(1,l))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}h=!1}try{r=new IntersectionObserver(m,{...p,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(m,p)}r.observe(e)}(!0),i}(u,n):null;let f,p=-1,h=null;s&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),u&&!l&&h.observe(u),h.observe(t));let m=l?wc(e):null;return l&&function t(){const r=wc(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n(),m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const Ic=fc,Mc=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=Nu(n),a=Fu(n),l="y"===Hu(n),u=["left","top"].includes(s)?-1:1,c=i&&l?-1:1,d=Du(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof h&&(p="end"===a?-1*h:h),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Ac=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Du(e,t),u={x:n,y:r},c=await fc(t,l),d=Hu(Nu(o)),f=Lu(d);let p=u[f],h=u[d];if(i){const e="y"===f?"bottom":"right";p=Pu(p+c["y"===f?"top":"left"],p,p-c[e])}if(s){const e="y"===d?"bottom":"right";h=Pu(h+c["y"===d?"top":"left"],h,h-c[e])}const m=a.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:s}}}}}},Rc=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...$}=Du(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=Nu(o),w=Hu(a),v=Nu(a)===a,y=await(null==l.isRTL?void 0:l.isRTL(u.floating)),b=f||(v||!m?[Uu(a)]:function(e){const t=Uu(e);return[Gu(e),t,Gu(t)]}(a)),x="none"!==h;!f&&x&&b.push(...function(e,t,n,r){const o=Fu(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}(Nu(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(Gu)))),i}(a,m,h,y));const _=[a,...b],S=await fc(t,$),E=[];let C=(null==(r=i.flip)?void 0:r.overflows)||[];if(c&&E.push(S[g]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Fu(e),o=Vu(e),i=Bu(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Uu(s)),[s,Uu(s)]}(o,s,y);E.push(S[e[0]],S[e[1]])}if(C=[...C,{placement:o,overflows:E}],!E.every((e=>e<=0))){var T,k;const e=((null==(T=i.flip)?void 0:T.index)||0)+1,t=_[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(k=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:k.placement;if(!n)switch(p){case"bestFit":{var I;const e=null==(I=C.filter((e=>{if(x){const t=Hu(e.placement);return t===w||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:I[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},Oc=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=Du(e,t),c=await fc(t,u),d=Nu(o),f=Fu(o),p="y"===Hu(o),{width:h,height:m}=i.floating;let $,g;"top"===d||"bottom"===d?($=d,g=f===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,$="end"===f?"top":"bottom");const w=m-c.top-c.bottom,v=h-c.left-c.right,y=Tu(m-c[$],w),b=Tu(h-c[g],v),x=!t.middlewareData.shift;let _=y,S=b;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=v),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(_=w),x&&!f){const e=ku(c.left,0),t=ku(c.right,0),n=ku(c.top,0),r=ku(c.bottom,0);p?S=h-2*(0!==e||0!==t?e+t:ku(c.left,c.right)):_=m-2*(0!==n||0!==r?n+r:ku(c.top,c.bottom))}await l({...t,availableWidth:S,availableHeight:_});const E=await s.getDimensions(a.floating);return h!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}},Pc=(e,t,n)=>{const r=new Map,o={platform:Tc,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=dc(u,r,l),f=r,p={},h=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:$,y:g,data:w,reset:v}=await m({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});c=null!=$?$:c,d=null!=g?g:d,p={...p,[i]:{...p[i],...w}},v&&h<=50&&(h++,"object"==typeof v&&(v.placement&&(f=v.placement),v.rects&&(u=!0===v.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):v.rects),({x:c,y:d}=dc(u,f,l))),n=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Dc="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;function Nc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Nc(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Nc(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Fc(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Lc(e,t){const n=Fc(e);return Math.round(t*n)/n}function Bc(e){const t=r.useRef(e);return Dc((()=>{t.current=e})),t}const Hc=(e,t)=>({...Mc(e),options:[e,t]}),Vc=(e,t)=>({...Rc(e),options:[e,t]}),Gc=(e,t)=>({...Oc(e),options:[e,t]}),Uc={...r},zc=Uc.useInsertionEffect||(e=>e());function jc(e){const t=r.useRef((()=>{}));return zc((()=>{t.current=e})),r.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}var Wc="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;let Yc=!1,Kc=0;const qc=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Kc++,Zc=Uc.useId||function(){const[e,t]=r.useState((()=>Yc?qc():void 0));return Wc((()=>{null==e&&t(qc())}),[]),r.useEffect((()=>{Yc=!0}),[]),e};const Jc=r.createContext(null),Xc=r.createContext(null),Qc="data-floating-ui-focusable";function ed(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:o}=e,i=Zc(),s=r.useRef({}),[a]=r.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),l=null!=((null==(h=r.useContext(Jc))?void 0:h.id)||null),[u,c]=r.useState(o.reference),d=jc(((e,t,r)=>{s.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)})),f=r.useMemo((()=>({setPositionReference:c})),[]),p=r.useMemo((()=>({reference:u||o.reference||null,floating:o.floating||null,domReference:o.reference})),[u,o.reference,o.floating]);var h;return r.useMemo((()=>({dataRef:s,open:t,onOpenChange:d,elements:p,events:a,floatingId:i,refs:f})),[t,d,p,a,i,f])}({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,i=o.elements,[s,a]=r.useState(null),[l,u]=r.useState(null),c=(null==i?void 0:i.domReference)||s,d=r.useRef(null),f=r.useContext(Xc);Wc((()=>{c&&(d.current=c)}),[c]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:a}={},transform:l=!0,whileElementsMounted:u,open:c}=e,[d,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=r.useState(o);Nc(p,o)||h(o);const[m,$]=r.useState(null),[g,w]=r.useState(null),v=r.useCallback((e=>{e!==_.current&&(_.current=e,$(e))}),[]),y=r.useCallback((e=>{e!==S.current&&(S.current=e,w(e))}),[]),b=s||m,x=a||g,_=r.useRef(null),S=r.useRef(null),E=r.useRef(d),C=null!=u,T=Bc(u),k=Bc(i),I=Bc(c),M=r.useCallback((()=>{if(!_.current||!S.current)return;const e={placement:t,strategy:n,middleware:p};k.current&&(e.platform=k.current),Pc(_.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==I.current};A.current&&!Nc(E.current,t)&&(E.current=t,r.flushSync((()=>{f(t)})))}))}),[p,t,n,k,I]);Dc((()=>{!1===c&&E.current.isPositioned&&(E.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[c]);const A=r.useRef(!1);Dc((()=>(A.current=!0,()=>{A.current=!1})),[]),Dc((()=>{if(b&&(_.current=b),x&&(S.current=x),b&&x){if(T.current)return T.current(b,x,M);M()}}),[b,x,M,T,C]);const R=r.useMemo((()=>({reference:_,floating:S,setReference:v,setFloating:y})),[v,y]),O=r.useMemo((()=>({reference:b,floating:x})),[b,x]),P=r.useMemo((()=>{const e={position:n,left:0,top:0};if(!O.floating)return e;const t=Lc(O.floating,d.x),r=Lc(O.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Fc(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,O.floating,d.x,d.y]);return r.useMemo((()=>({...d,update:M,refs:R,elements:O,floatingStyles:P})),[d,M,R,O,P])}({...e,elements:{...i,...l&&{reference:l}}}),h=r.useCallback((e=>{const t=Zu(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;u(t),p.refs.setReference(t)}),[p.refs]),m=r.useCallback((e=>{(Zu(e)||null===e)&&(d.current=e,a(e)),(Zu(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!Zu(e))&&p.refs.setReference(e)}),[p.refs]),$=r.useMemo((()=>({...p.refs,setReference:m,setPositionReference:h,domReference:d})),[p.refs,m,h]),g=r.useMemo((()=>({...p.elements,domReference:c})),[p.elements,c]),w=r.useMemo((()=>({...p,...o,refs:$,elements:g,nodeId:t})),[p,$,g,t,o]);return Wc((()=>{o.dataRef.current.floatingContext=w;const e=null==f?void 0:f.nodesRef.current.find((e=>e.id===t));e&&(e.context=w)})),r.useMemo((()=>({...p,context:w,refs:$,elements:g})),[p,$,g,w])}const td="active",nd="selected";function rd(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[td]:t,[nd]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[Qc]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var s;o&&[td,nd].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(s=r.get(n))||s.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}function od(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}let id=(0,r.createContext)({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});id.displayName="FloatingContext";let sd=(0,r.createContext)(null);function ad({children:e,enabled:t=!0}){let[n,o]=(0,r.useState)(null),[i,s]=(0,r.useState)(0),a=(0,r.useRef)(null),[l,u]=(0,r.useState)(null);!function(e){Dl((()=>{if(!e)return;let t=new MutationObserver((()=>{let t=window.getComputedStyle(e).maxHeight,n=parseFloat(t);if(isNaN(n))return;let r=parseInt(t);isNaN(r)||n!==r&&(e.style.maxHeight=`${Math.ceil(n)}px`)}));return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}}),[e])}(l);let c=t&&null!==n&&null!==l,{to:d="bottom",gap:f=0,offset:p=0,padding:h=0,inner:m}=function(e,t){var n,r,o;let i=ld(null!=(n=null==e?void 0:e.gap)?n:"var(--anchor-gap, 0)",t),s=ld(null!=(r=null==e?void 0:e.offset)?r:"var(--anchor-offset, 0)",t),a=ld(null!=(o=null==e?void 0:e.padding)?o:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:s,padding:a}}(n,l),[$,g="center"]=d.split(" ");Dl((()=>{c&&s(0)}),[c]);let{refs:w,floatingStyles:v,context:y}=ed({open:c,placement:"selection"===$?"center"===g?"bottom":`bottom-${g}`:"center"===g?`${$}`:`${$}-${g}`,strategy:"absolute",transform:!1,middleware:[Hc({mainAxis:"selection"===$?0:f,crossAxis:p}),(_={padding:h},{...Ac(_),options:[_,S]}),"selection"!==$&&Vc({padding:h}),"selection"===$&&m?(E={...m,padding:h,overflowRef:a,offset:i,minItemsVisible:4,referenceOverflowThreshold:h,onFallbackChange(e){var t,n;if(!e)return;let r=y.elements.floating;if(!r)return;let o=parseFloat(getComputedStyle(r).scrollPaddingBottom)||0,i=Math.min(4,r.childElementCount),a=0,l=0;for(let e of null!=(n=null==(t=y.elements.floating)?void 0:t.childNodes)?n:[])if(e instanceof HTMLElement){let t=e.offsetTop,n=t+e.clientHeight+o,s=r.scrollTop,u=s+r.clientHeight;if(!(t>=s&&n<=u)){l=Math.max(0,Math.min(n,u)-Math.max(t,s)),a=e.clientHeight;break}i--}i>=1&&s((e=>{let t=a*i-l+o;return e>=t?e:t}))}},{name:"inner",options:E,async fn(e){const{listRef:t,overflowRef:n,onFallbackChange:o,offset:i=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=Du(E,e),{rects:d,elements:{floating:f}}=e,p=t.current[s],h=(null==u?void 0:u.current)||f,m=f.clientTop||h.clientTop,$=0!==f.clientTop,g=0!==h.clientTop,w=f===h;if(!p)return{};const v={...e,...await Hc(-p.offsetTop-f.clientTop-d.reference.height/2-p.offsetHeight/2-i).fn(e)},y=await Ic(od(v,h.scrollHeight+m+f.clientTop),c),b=await Ic(v,{...c,elementContext:"reference"}),x=ku(0,y.top),_=v.y+x,S=h.scrollHeight>h.clientHeight?e=>e:Iu,C=S(ku(0,h.scrollHeight+($&&w||g?2*m:0)-x-ku(0,y.bottom)));if(h.style.maxHeight=C+"px",h.scrollTop=x,o){const e=h.offsetHeight<p.offsetHeight*Tu(a,t.current.length)-1||b.top>=-l||b.bottom>=-l;r.flushSync((()=>o(e)))}return n&&(n.current=await Ic(od({...v,y:_},h.offsetHeight+m+f.clientTop),c)),{y:_}}}):null,Gc({padding:h,apply({availableWidth:e,availableHeight:t,elements:n}){Object.assign(n.floating.style,{overflow:"auto",maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:kc}),[b=$,x=g]=y.placement.split("-");var _,S,E;"selection"===$&&(b="selection");let C=(0,r.useMemo)((()=>({anchor:[b,x].filter(Boolean).join(" ")})),[b,x]),T=function(e,t){const{open:n,elements:o}=e,{enabled:i=!0,overflowRef:s,scrollRef:a,onChange:l}=t,u=jc(l),c=r.useRef(!1),d=r.useRef(null),f=r.useRef(null);r.useEffect((()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||null==s.current)return;const n=e.deltaY,o=s.current.top>=-.5,i=s.current.bottom>=-.5,a=t.scrollHeight-t.clientHeight,l=n<0?-1:1,c=n<0?"max":"min";t.scrollHeight<=t.clientHeight||(!o&&n>0||!i&&n<0?(e.preventDefault(),r.flushSync((()=>{u((e=>e+Math[c](n,a*l)))}))):/firefox/i.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}())&&(t.scrollTop+=n))}const t=(null==a?void 0:a.current)||o.floating;return n&&t?(t.addEventListener("wheel",e),requestAnimationFrame((()=>{d.current=t.scrollTop,null!=s.current&&(f.current={...s.current})})),()=>{d.current=null,f.current=null,t.removeEventListener("wheel",e)}):void 0}),[i,n,o.floating,s,a,u]);const p=r.useMemo((()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const e=(null==a?void 0:a.current)||o.floating;if(s.current&&e&&c.current){if(null!==d.current){const t=e.scrollTop-d.current;(s.current.bottom<-.5&&t<-1||s.current.top<-.5&&t>1)&&r.flushSync((()=>u((e=>e+t))))}requestAnimationFrame((()=>{d.current=e.scrollTop}))}}})),[o.floating,u,s,a]);return r.useMemo((()=>i?{floating:p}:{}),[i,p])}(y,{overflowRef:a,onChange:s}),{getReferenceProps:k,getFloatingProps:I}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),o=e.map((e=>null==e?void 0:e.item)),i=r.useCallback((t=>rd(t,e,"reference")),t),s=r.useCallback((t=>rd(t,e,"floating")),n),a=r.useCallback((t=>rd(t,e,"item")),o);return r.useMemo((()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:a})),[i,s,a])}([T]),M=Fl((e=>{u(e),w.setFloating(e)}));return r.createElement(sd.Provider,{value:o},r.createElement(id.Provider,{value:{setFloating:M,setReference:w.setReference,styles:v,getReferenceProps:k,getFloatingProps:I,slot:C}},e))}function ld(e,t,n=void 0){let o=Pl(),i=Fl(((e,t)=>{if(null==e)return[n,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[n,null];let r=cd(e,t);return[r,n=>{let i=ud(e);{let s=i.map((e=>window.getComputedStyle(t).getPropertyValue(e)));o.requestAnimationFrame((function a(){o.nextFrame(a);let l=!1;for(let[e,n]of i.entries()){let r=window.getComputedStyle(t).getPropertyValue(n);if(s[e]!==r){s[e]=r,l=!0;break}}if(!l)return;let u=cd(e,t);r!==u&&(n(u),r=u)}))}return o.dispose}]}return[n,null]})),s=(0,r.useMemo)((()=>i(e,t)[0]),[e,t]),[a=s,l]=(0,r.useState)();return Dl((()=>{let[n,r]=i(e,t);if(l(n),r)return r(l)}),[e,t]),a}function ud(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(",");if(-1===e)return[t[1]];let n=t[1].slice(0,e).trim(),r=t[1].slice(e+1).trim();return r?[n,...ud(r)]:[n]}return[]}function cd(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}function dd(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))pd(n,fd(t,r),o);return n}function fd(e,t){return e?e+"["+t+"]":t}function pd(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())pd(e,fd(t,r.toString()),o);else n instanceof Date?e.push([t,n.toISOString()]):"boolean"==typeof n?e.push([t,n?"1":"0"]):"string"==typeof n?e.push([t,n]):"number"==typeof n?e.push([t,`${n}`]):null==n?e.push([t,""]):dd(n,t,e)}function hd(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}sd.displayName="PlacementContext";var md=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(md||{}),$d=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))($d||{});function gd(){let e=function(){let e=(0,r.useRef)([]),t=(0,r.useCallback)((t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)}),[]);return(...n)=>{if(!n.every((e=>null==e)))return e.current=n,t}}();return(0,r.useCallback)((t=>function({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:s,mergeRefs:a}){a=null!=a?a:vd;let l=yd(t,e);if(i)return wd(l,n,r,s,a);let u=null!=o?o:0;if(2&u){let{static:e=!1,...t}=l;if(e)return wd(t,n,r,s,a)}if(1&u){let{unmount:e=!0,...t}=l;return ql(e?0:1,{0:()=>null,1:()=>wd({...t,hidden:!0,style:{display:"none"}},n,r,s,a)})}return wd(l,n,r,s,a)}({mergeRefs:e,...t})),[e])}function wd(e,t={},n,o,i){let{as:s=n,children:a,refName:l="ref",...u}=Sd(e,["unmount","static"]),c=void 0!==e.ref?{[l]:e.ref}:{},d="function"==typeof a?a(t):a;"className"in u&&u.className&&"function"==typeof u.className&&(u.className=u.className(t)),u["aria-labelledby"]&&u["aria-labelledby"]===u.id&&(u["aria-labelledby"]=void 0);let f={};if(t){let e=!1,n=[];for(let[r,o]of Object.entries(t))"boolean"==typeof o&&(e=!0),!0===o&&n.push(r.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`)));if(e){f["data-headlessui-state"]=n.join(" ");for(let e of n)f[`data-${e}`]=""}}if(s===r.Fragment&&(Object.keys(_d(u)).length>0||Object.keys(_d(f)).length>0)){if((0,r.isValidElement)(d)&&!(Array.isArray(d)&&d.length>1)){let e=d.props,t=null==e?void 0:e.className,n="function"==typeof t?(...e)=>hd(t(...e),u.className):hd(t,u.className),o=n?{className:n}:{},s=yd(d.props,_d(Sd(u,["ref"])));for(let e in f)e in s&&delete f[e];return(0,r.cloneElement)(d,Object.assign({},s,f,c,{ref:i(Ed(d),c.ref)},o))}if(Object.keys(_d(u)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${o} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(_d(u)).concat(Object.keys(_d(f))).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"))}return(0,r.createElement)(s,Object.assign({},Sd(u,["ref"]),s!==r.Fragment&&c,s!==r.Fragment&&f),d)}function vd(...e){return e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function yd(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])for(let e in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(n[e]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let e in n)Object.assign(t,{[e](t,...r){let o=n[e];for(let e of o){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function bd(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];for(let e in n)Object.assign(t,{[e](...t){let r=n[e];for(let e of r)null==e||e(...t)}});return t}function xd(e){var t;return Object.assign((0,r.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function _d(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function Sd(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function Ed(e){return r.default.version.split(".")[0]>="19"?e.props.ref:e.ref}var Cd=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Cd||{});let Td=xd((function(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":!(2&~r)||(null!=(n=o["aria-hidden"])?n:void 0),hidden:!(4&~r)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...!(4&~r)&&!!(2&~r)&&{display:"none"}}};return gd()({ourProps:i,theirProps:o,slot:{},defaultTag:"span",name:"Hidden"})})),kd=(0,r.createContext)(null);function Id({children:e}){let t=(0,r.useContext)(kd);if(!t)return r.default.createElement(r.default.Fragment,null,e);let{target:n}=t;return n?(0,r.createPortal)(r.default.createElement(r.default.Fragment,null,e),n):null}function Md({data:e,form:t,disabled:n,onReset:o,overrides:i}){let[s,a]=(0,r.useState)(null),l=Pl();return(0,r.useEffect)((()=>{if(o&&s)return l.addEventListener(s,"reset",o)}),[s,t,o]),r.default.createElement(Id,null,r.default.createElement(Ad,{setForm:a,formId:t}),dd(e).map((([e,o])=>r.default.createElement(Td,{features:Cd.Hidden,..._d({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:e,value:o,...i})}))))}function Ad({setForm:e,formId:t}){return(0,r.useEffect)((()=>{if(t){let n=document.getElementById(t);n&&e(n)}}),[e,t]),t?null:r.default.createElement(Td,{features:Cd.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest("form");n&&e(n)}})}function Rd({children:e,freeze:t}){let n=Od(t,e);return r.default.createElement(r.default.Fragment,null,n)}function Od(e,t){let[n,o]=(0,r.useState)(t);return!e&&n!==t&&o(t),e?n:t}let Pd=(0,r.createContext)(void 0);function Dd(){return(0,r.useContext)(Pd)}let Nd=(0,r.createContext)(null);Nd.displayName="OpenClosedContext";var Fd=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Fd||{});function Ld({value:e,children:t}){return r.default.createElement(Nd.Provider,{value:e},t)}let Bd=[];!function(){function e(){"loading"!==document.readyState&&((()=>{function e(e){if(!(e.target instanceof HTMLElement)||e.target===document.body||Bd[0]===e.target)return;let t=e.target;t=t.closest(Zl),Bd.unshift(null!=t?t:e.target),Bd=Bd.filter((e=>null!=e&&e.isConnected)),Bd.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})})(),document.removeEventListener("DOMContentLoaded",e))}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",e),e())}();var Hd=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Hd||{});function Vd(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=null!=r?r:-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:-1===o&&(o=n.length);for(let e=o-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=o+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}let Gd=(0,r.createContext)(null);function Ud(){let e=(0,r.useContext)(Gd);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Ud),e}return e}Gd.displayName="DescriptionContext";let zd=xd((function(e,t){let n=(0,r.useId)(),o=Cu(),{id:i=`headlessui-description-${n}`,...s}=e,a=Ud(),l=gu(t);Dl((()=>a.register(i)),[i,a.register]);let u=o||!1,c=(0,r.useMemo)((()=>({...a.slot,disabled:u})),[a.slot,u]),d={ref:l,...a.props,id:i};return gd()({ourProps:d,theirProps:s,slot:c,defaultTag:"p",name:a.name||"Description"})}));Object.assign(zd,{});var jd=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(jd||{});let Wd=(0,r.createContext)(null);function Yd(){let e=(0,r.useContext)(Wd);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Yd),e}return e}function Kd(e){var t,n,o;let i=null!=(n=null==(t=(0,r.useContext)(Wd))?void 0:t.value)?n:void 0;return(null!=(o=null==e?void 0:e.length)?o:0)>0?[i,...e].filter(Boolean).join(" "):i}Wd.displayName="LabelContext";let qd=xd((function(e,t){var n;let o=(0,r.useId)(),i=Yd(),s=Dd(),a=Cu(),{id:l=`headlessui-label-${o}`,htmlFor:u=(null!=s?s:null==(n=i.props)?void 0:n.htmlFor),passive:c=!1,...d}=e,f=gu(t);Dl((()=>i.register(l)),[l,i.register]);let p=Fl((e=>{let t=e.currentTarget;if(t instanceof HTMLLabelElement&&e.preventDefault(),i.props&&"onClick"in i.props&&"function"==typeof i.props.onClick&&i.props.onClick(e),t instanceof HTMLLabelElement){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let n=e.getAttribute("aria-disabled");if("true"===n||""===n)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}})),h=a||!1,m=(0,r.useMemo)((()=>({...i.slot,disabled:h})),[i.slot,h]),$={ref:f,...i.props,id:l,htmlFor:u,onClick:p};return c&&("onClick"in $&&(delete $.htmlFor,delete $.onClick),"onClick"in d&&delete d.onClick),gd()({ourProps:$,theirProps:d,slot:m,defaultTag:u?"label":"div",name:i.name||"Label"})})),Zd=Object.assign(qd,{});var Jd,Xd=((Jd=Xd||{})[Jd.Left=0]="Left",Jd[Jd.Right=2]="Right",Jd);let Qd=(0,r.createContext)(!1);let ef=r.Fragment,tf=xd((function(e,t){let n=e,o=(0,r.useRef)(null),i=gu(function(e,t=!0){return Object.assign(e,{[$u]:t})}((e=>{o.current=e})),t),s=uu(o),a=function(e){let t=(0,r.useContext)(Qd),n=(0,r.useContext)(rf),o=uu(e),[i,s]=(0,r.useState)((()=>{var e;if(!t&&null!==n)return null!=(e=n.current)?e:null;if(Ml.isServer)return null;let r=null==o?void 0:o.getElementById("headlessui-portal-root");if(r)return r;if(null===o)return null;let i=o.createElement("div");return i.setAttribute("id","headlessui-portal-root"),o.body.appendChild(i)}));return(0,r.useEffect)((()=>{null!==i&&(null!=o&&o.body.contains(i)||null==o||o.body.appendChild(i))}),[i,o]),(0,r.useEffect)((()=>{t||null!==n&&s(n.current)}),[n,s,t]),i}(o),[l]=(0,r.useState)((()=>{var e;return Ml.isServer?null:null!=(e=null==s?void 0:s.createElement("div"))?e:null})),u=(0,r.useContext)(of),c=function(){let e=function(){let e="undefined"==typeof document;return(e=>e.useSyncExternalStore)(r)((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=r.useState(Ml.isHandoffComplete);return t&&!1===Ml.isHandoffComplete&&n(!1),r.useEffect((()=>{!0!==t&&n(!0)}),[t]),r.useEffect((()=>Ml.handoff()),[]),!e&&t}();Dl((()=>{!a||!l||a.contains(l)||(l.setAttribute("data-headlessui-portal",""),a.appendChild(l))}),[a,l]),Dl((()=>{if(l&&u)return u.register(l)}),[u,l]),function(e){let t=Fl(e),n=(0,r.useRef)(!1);(0,r.useEffect)((()=>(n.current=!1,()=>{n.current=!0,Rl((()=>{n.current&&t()}))})),[t])}((()=>{var e;!a||!l||(l instanceof Node&&a.contains(l)&&a.removeChild(l),a.childNodes.length<=0&&(null==(e=a.parentElement)||e.removeChild(a)))}));let d=gd();return c&&a&&l?(0,r.createPortal)(d({ourProps:{ref:i},theirProps:n,slot:{},defaultTag:ef,name:"Portal"}),l):null})),nf=r.Fragment,rf=(0,r.createContext)(null),of=(0,r.createContext)(null),sf=xd((function(e,t){let n=gu(t),{enabled:o=!0,...i}=e,s=gd();return o?r.default.createElement(tf,{...i,ref:n}):s({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:ef,name:"Portal"})})),af=xd((function(e,t){let{target:n,...o}=e,i={ref:gu(t)},s=gd();return r.default.createElement(rf.Provider,{value:n},s({ourProps:i,theirProps:o,defaultTag:nf,name:"Popover.Group"}))})),lf=Object.assign(sf,{Group:af});var uf,cf=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(cf||{}),df=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(df||{}),ff=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(ff||{}),pf=((uf=pf||{})[uf.OpenCombobox=0]="OpenCombobox",uf[uf.CloseCombobox=1]="CloseCombobox",uf[uf.GoToOption=2]="GoToOption",uf[uf.SetTyping=3]="SetTyping",uf[uf.RegisterOption=4]="RegisterOption",uf[uf.UnregisterOption=5]="UnregisterOption",uf[uf.SetActivationTrigger=6]="SetActivationTrigger",uf[uf.UpdateVirtualConfiguration=7]="UpdateVirtualConfiguration",uf[uf.SetInputElement=8]="SetInputElement",uf[uf.SetButtonElement=9]="SetButtonElement",uf[uf.SetOptionsElement=10]="SetOptionsElement",uf);function hf(e,t=e=>e){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=t(e.options.slice()),o=r.length>0&&null!==r[0].dataRef.current.order?r.sort(((e,t)=>e.dataRef.current.order-t.dataRef.current.order)):function(e,t=e=>e){return e.slice().sort(((e,n)=>{let r=t(e),o=t(n);if(null===r||null===o)return 0;let i=r.compareDocumentPosition(o);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}(r,(e=>e.dataRef.current.domRef.current)),i=n?o.indexOf(n):null;return-1===i&&(i=null),{options:o,activeOptionIndex:i}}let mf={1(e){var t;return null!=(t=e.dataRef.current)&&t.disabled||1===e.comboboxState?e:{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,__demoMode:!1}},0(e){var t,n;if(null!=(t=e.dataRef.current)&&t.disabled||0===e.comboboxState)return e;if(null!=(n=e.dataRef.current)&&n.value){let t=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(-1!==t)return{...e,activeOptionIndex:t,comboboxState:0,__demoMode:!1}}return{...e,comboboxState:0,__demoMode:!1}},3:(e,t)=>e.isTyping===t.isTyping?e:{...e,isTyping:t.isTyping},2(e,t){var n,r,o,i;if(null!=(n=e.dataRef.current)&&n.disabled||e.optionsElement&&(null==(r=e.dataRef.current)||!r.optionsPropsRef.current.static)&&1===e.comboboxState)return e;if(e.virtual){let{options:n,disabled:r}=e.virtual,i=t.focus===Hd.Specific?t.idx:Vd(t,{resolveItems:()=>n,resolveActiveIndex:()=>{var t,o;return null!=(o=null!=(t=e.activeOptionIndex)?t:n.findIndex((e=>!r(e))))?o:null},resolveDisabled:r,resolveId(){throw new Error("Function not implemented.")}}),s=null!=(o=t.trigger)?o:2;return e.activeOptionIndex===i&&e.activationTrigger===s?e:{...e,activeOptionIndex:i,activationTrigger:s,isTyping:!1,__demoMode:!1}}let s=hf(e);if(null===s.activeOptionIndex){let e=s.options.findIndex((e=>!e.dataRef.current.disabled));-1!==e&&(s.activeOptionIndex=e)}let a=t.focus===Hd.Specific?t.idx:Vd(t,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled}),l=null!=(i=t.trigger)?i:2;return e.activeOptionIndex===a&&e.activationTrigger===l?e:{...e,...s,isTyping:!1,activeOptionIndex:a,activationTrigger:l,__demoMode:!1}},4:(e,t)=>{var n,r,o;if(null!=(n=e.dataRef.current)&&n.virtual)return{...e,options:[...e.options,t.payload]};let i=t.payload,s=hf(e,(e=>(e.push(i),e)));null===e.activeOptionIndex&&null!=(r=e.dataRef.current)&&r.isSelected(t.payload.dataRef.current.value)&&(s.activeOptionIndex=s.options.indexOf(i));let a={...e,...s,activationTrigger:2};return null!=(o=e.dataRef.current)&&o.__demoMode&&void 0===e.dataRef.current.value&&(a.activeOptionIndex=0),a},5:(e,t)=>{var n;if(null!=(n=e.dataRef.current)&&n.virtual)return{...e,options:e.options.filter((e=>e.id!==t.id))};let r=hf(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...r,activationTrigger:2}},6:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},7:(e,t)=>{var n,r;if(null===e.virtual)return{...e,virtual:{options:t.options,disabled:null!=(n=t.disabled)?n:()=>!1}};if(e.virtual.options===t.options&&e.virtual.disabled===t.disabled)return e;let o=e.activeOptionIndex;if(null!==e.activeOptionIndex){let n=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);o=-1!==n?n:null}return{...e,activeOptionIndex:o,virtual:{options:t.options,disabled:null!=(r=t.disabled)?r:()=>!1}}},8:(e,t)=>e.inputElement===t.element?e:{...e,inputElement:t.element},9:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},10:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},$f=(0,r.createContext)(null);function gf(e){let t=(0,r.useContext)($f);if(null===t){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,gf),t}return t}$f.displayName="ComboboxActionsContext";let wf=(0,r.createContext)(null);function vf(e){let t=bf("VirtualProvider"),{options:n}=t.virtual,[o,i]=(0,r.useMemo)((()=>{let e=t.optionsElement;if(!e)return[0,0];let n=window.getComputedStyle(e);return[parseFloat(n.paddingBlockStart||n.paddingTop),parseFloat(n.paddingBlockEnd||n.paddingBottom)]}),[t.optionsElement]),s=(u={enabled:0!==n.length,scrollPaddingStart:o,scrollPaddingEnd:i,count:n.length,estimateSize:()=>40,getScrollElement:()=>t.optionsElement,overscan:12},function(e){const t=r.useReducer((()=>({})),{})[1],n={...e,onChange:(n,o)=>{var i;o?(0,r.flushSync)(t):t(),null==(i=e.onChange)||i.call(e,n,o)}},[o]=r.useState((()=>new El(n)));return o.setOptions(n),r.useEffect((()=>o._didMount()),[]),Tl((()=>o._willUpdate())),o}({observeElementRect:vl,observeElementOffset:xl,scrollToFn:Sl,...u})),[a,l]=(0,r.useState)(0);var u;Dl((()=>{l((e=>e+1))}),[n]);let c=s.getVirtualItems();return 0===c.length?null:r.default.createElement(wf.Provider,{value:s},r.default.createElement("div",{style:{position:"relative",width:"100%",height:`${s.getTotalSize()}px`},ref:e=>{e&&0!==t.activationTrigger&&null!==t.activeOptionIndex&&n.length>t.activeOptionIndex&&s.scrollToIndex(t.activeOptionIndex)}},c.map((t=>{var o;return r.default.createElement(r.Fragment,{key:t.key},r.default.cloneElement(null==(o=e.children)?void 0:o.call(e,{...e.slot,option:n[t.index]}),{key:`${a}-${t.key}`,"data-index":t.index,"aria-setsize":n.length,"aria-posinset":t.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${t.start}px)`,overflowAnchor:"none"}}))}))))}let yf=(0,r.createContext)(null);function bf(e){let t=(0,r.useContext)(yf);if(null===t){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,bf),t}return t}function xf(e,t){return ql(t.type,mf,e,t)}yf.displayName="ComboboxDataContext";let _f=r.Fragment,Sf=md.RenderStrategy|md.Static,Ef=xd((function(e,t){var n,o;let i=Cu(),{value:s,defaultValue:a,onChange:l,form:u,name:c,by:d,disabled:f=i||!1,onClose:p,__demoMode:h=!1,multiple:m=!1,immediate:$=!1,virtual:g=null,nullable:w,...v}=e,y=function(e){let[t]=(0,r.useState)(e);return t}(a),[b=(m?[]:void 0),x]=function(e,t,n){let[o,i]=(0,r.useState)(n),s=void 0!==e,a=(0,r.useRef)(s),l=(0,r.useRef)(!1),u=(0,r.useRef)(!1);return!s||a.current||l.current?!s&&a.current&&!u.current&&(u.current=!0,a.current=s,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(l.current=!0,a.current=s,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[s?e:o,Fl((e=>(s||i(e),null==t?void 0:t(e))))]}(s,l,y),[_,S]=(0,r.useReducer)(xf,{dataRef:(0,r.createRef)(),comboboxState:h?0:1,isTyping:!1,options:[],virtual:g?{options:g.options,disabled:null!=(n=g.disabled)?n:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:h}),E=(0,r.useRef)(!1),C=(0,r.useRef)({static:!1,hold:!1}),T=function(e=Ll){return(0,r.useCallback)(((t,n)=>{if("string"==typeof e){let r=e;return(null==t?void 0:t[r])===(null==n?void 0:n[r])}return e(t,n)}),[e])}(d),k=Fl((e=>g?null===d?g.options.indexOf(e):g.options.findIndex((t=>T(t,e))):_.options.findIndex((t=>T(t.dataRef.current.value,e))))),I=(0,r.useCallback)((e=>ql(A.mode,{1:()=>b.some((t=>T(t,e))),0:()=>T(b,e)})),[b]),M=Fl((e=>_.activeOptionIndex===k(e))),A=(0,r.useMemo)((()=>({..._,immediate:$,optionsPropsRef:C,value:b,defaultValue:y,disabled:f,mode:m?1:0,virtual:g?_.virtual:null,get activeOptionIndex(){if(E.current&&null===_.activeOptionIndex&&(g?g.options.length>0:_.options.length>0)){if(g){let e=g.options.findIndex((e=>{var t,n;return!(null!=(n=null==(t=g.disabled)?void 0:t.call(g,e))&&n)}));if(-1!==e)return e}let e=_.options.findIndex((e=>!e.dataRef.current.disabled));if(-1!==e)return e}return _.activeOptionIndex},calculateIndex:k,compare:T,isSelected:I,isActive:M})),[b,y,f,m,h,_,g]);Dl((()=>{var e;g&&S({type:7,options:g.options,disabled:null!=(e=g.disabled)?e:null})}),[g,null==g?void 0:g.options,null==g?void 0:g.disabled]),Dl((()=>{_.dataRef.current=A}),[A]),lu(0===A.comboboxState,[A.buttonElement,A.inputElement,A.optionsElement],(()=>z.closeCombobox()));let R=(0,r.useMemo)((()=>{var e,t,n;return{open:0===A.comboboxState,disabled:f,activeIndex:A.activeOptionIndex,activeOption:null===A.activeOptionIndex?null:A.virtual?A.virtual.options[null!=(e=A.activeOptionIndex)?e:0]:null!=(n=null==(t=A.options[A.activeOptionIndex])?void 0:t.dataRef.current.value)?n:null,value:b}}),[A,f,b]),O=Fl((()=>{if(null!==A.activeOptionIndex){if(z.setIsTyping(!1),A.virtual)B(A.virtual.options[A.activeOptionIndex]);else{let{dataRef:e}=A.options[A.activeOptionIndex];B(e.current.value)}z.goToOption(Hd.Specific,A.activeOptionIndex)}})),P=Fl((()=>{S({type:0}),E.current=!0})),D=Fl((()=>{S({type:1}),E.current=!1,null==p||p()})),N=Fl((e=>{S({type:3,isTyping:e})})),F=Fl(((e,t,n)=>(E.current=!1,e===Hd.Specific?S({type:2,focus:Hd.Specific,idx:t,trigger:n}):S({type:2,focus:e,trigger:n})))),L=Fl(((e,t)=>(S({type:4,payload:{id:e,dataRef:t}}),()=>{A.isActive(t.current.value)&&(E.current=!0),S({type:5,id:e})}))),B=Fl((e=>ql(A.mode,{0:()=>null==x?void 0:x(e),1(){let t=A.value.slice(),n=t.findIndex((t=>T(t,e)));return-1===n?t.push(e):t.splice(n,1),null==x?void 0:x(t)}}))),H=Fl((e=>{S({type:6,trigger:e})})),V=Fl((e=>{S({type:8,element:e})})),G=Fl((e=>{S({type:9,element:e})})),U=Fl((e=>{S({type:10,element:e})})),z=(0,r.useMemo)((()=>({onChange:B,registerOption:L,goToOption:F,setIsTyping:N,closeCombobox:D,openCombobox:P,setActivationTrigger:H,selectActiveOption:O,setInputElement:V,setButtonElement:G,setOptionsElement:U})),[]),[j,W]=function({inherit:e=!1}={}){let t=Kd(),[n,o]=(0,r.useState)([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,(0,r.useMemo)((()=>function(e){let t=Fl((e=>(o((t=>[...t,e])),()=>o((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),n=(0,r.useMemo)((()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value})),[t,e.slot,e.name,e.props,e.value]);return r.default.createElement(Wd.Provider,{value:n},e.children)}),[o])]}(),Y=null===t?{}:{ref:t},K=(0,r.useCallback)((()=>{if(void 0!==y)return null==x?void 0:x(y)}),[x,y]),q=gd();return r.default.createElement(W,{value:j,props:{htmlFor:null==(o=A.inputElement)?void 0:o.id},slot:{open:0===A.comboboxState,disabled:f}},r.default.createElement(ad,null,r.default.createElement($f.Provider,{value:z},r.default.createElement(yf.Provider,{value:A},r.default.createElement(Ld,{value:ql(A.comboboxState,{0:Fd.Open,1:Fd.Closed})},null!=c&&r.default.createElement(Md,{disabled:f,data:null!=b?{[c]:b}:{},form:u,onReset:K}),q({ourProps:Y,theirProps:v,slot:R,defaultTag:_f,name:"Combobox"}))))))})),Cf=xd((function(e,t){var n;let o=bf("Combobox.Button"),i=gf("Combobox.Button"),s=gu(t,i.setButtonElement),a=(0,r.useId)(),{id:l=`headlessui-combobox-button-${a}`,disabled:u=o.disabled||!1,autoFocus:c=!1,...d}=e,f=cu(o.inputElement),p=Fl((e=>{switch(e.key){case jd.Space:case jd.Enter:return e.preventDefault(),e.stopPropagation(),1===o.comboboxState&&(0,r.flushSync)((()=>i.openCombobox())),void f();case jd.ArrowDown:return e.preventDefault(),e.stopPropagation(),1===o.comboboxState&&((0,r.flushSync)((()=>i.openCombobox())),o.value||i.goToOption(Hd.First)),void f();case jd.ArrowUp:return e.preventDefault(),e.stopPropagation(),1===o.comboboxState&&((0,r.flushSync)((()=>i.openCombobox())),o.value||i.goToOption(Hd.Last)),void f();case jd.Escape:if(0!==o.comboboxState)return;return e.preventDefault(),o.optionsElement&&!o.optionsPropsRef.current.static&&e.stopPropagation(),(0,r.flushSync)((()=>i.closeCombobox())),void f();default:return}})),h=Fl((e=>{e.preventDefault(),!function(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}(e.currentTarget)&&(e.button===Xd.Left&&(0===o.comboboxState?i.closeCombobox():i.openCombobox()),f())})),m=Kd([l]),{isFocusVisible:$,focusProps:g}=al({autoFocus:c}),{isHovered:w,hoverProps:v}=pl({isDisabled:u}),{pressed:y,pressProps:b}=function({disabled:e=!1}={}){let t=(0,r.useRef)(null),[n,o]=(0,r.useState)(!1),i=Pl(),s=Fl((()=>{t.current=null,o(!1),i.dispose()})),a=Fl((e=>{if(i.dispose(),null===t.current){t.current=e.currentTarget,o(!0);{let n=Al(e.currentTarget);i.addEventListener(n,"pointerup",s,!1),i.addEventListener(n,"pointermove",(e=>{if(t.current){let n=function(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}(e);o(function(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}(n,t.current.getBoundingClientRect()))}}),!1),i.addEventListener(n,"pointercancel",s,!1)}}}));return{pressed:n,pressProps:e?{}:{onPointerDown:a,onPointerUp:s,onClick:s}}}({disabled:u}),x=(0,r.useMemo)((()=>({open:0===o.comboboxState,active:y||0===o.comboboxState,disabled:u,value:o.value,hover:w,focus:$})),[o,w,$,y,u]),_=bd({ref:s,id:l,type:du(e,o.buttonElement),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":null==(n=o.optionsElement)?void 0:n.id,"aria-expanded":0===o.comboboxState,"aria-labelledby":m,disabled:u||void 0,autoFocus:c,onMouseDown:h,onKeyDown:p},g,v,b);return gd()({ourProps:_,theirProps:d,slot:x,defaultTag:"button",name:"Combobox.Button"})})),Tf=xd((function(e,t){var n,o,i,s,a;let l=bf("Combobox.Input"),u=gf("Combobox.Input"),c=(0,r.useId)(),d=Dd(),{id:f=d||`headlessui-combobox-input-${c}`,onChange:p,displayValue:h,disabled:m=l.disabled||!1,autoFocus:$=!1,type:g="text",...w}=e,v=(0,r.useRef)(null),y=gu(v,t,(0,r.useContext)(id).setReference,u.setInputElement),b=uu(l.inputElement),x=Pl(),_=Fl((()=>{u.onChange(null),l.optionsElement&&(l.optionsElement.scrollTop=0),u.goToOption(Hd.Nothing)})),S=(0,r.useMemo)((()=>{var e;return"function"==typeof h&&void 0!==l.value?null!=(e=h(l.value))?e:"":"string"==typeof l.value?l.value:""}),[l.value,h]);Su((([e,t],[n,r])=>{if(l.isTyping)return;let o=v.current;o&&((0===r&&1===t||e!==n)&&(o.value=e),requestAnimationFrame((()=>{if(l.isTyping||!o||(null==b?void 0:b.activeElement)!==o)return;let{selectionStart:e,selectionEnd:t}=o;0===Math.abs((null!=t?t:0)-(null!=e?e:0))&&0===e&&o.setSelectionRange(o.value.length,o.value.length)})))}),[S,l.comboboxState,b,l.isTyping]),Su((([e],[t])=>{if(0===e&&1===t){if(l.isTyping)return;let e=v.current;if(!e)return;let t=e.value,{selectionStart:n,selectionEnd:r,selectionDirection:o}=e;e.value="",e.value=t,null!==o?e.setSelectionRange(n,r,o):e.setSelectionRange(n,r)}}),[l.comboboxState]);let E=(0,r.useRef)(!1),C=Fl((()=>{E.current=!0})),T=Fl((()=>{x.nextFrame((()=>{E.current=!1}))})),k=Fl((e=>{switch(u.setIsTyping(!0),e.key){case jd.Enter:if(0!==l.comboboxState||E.current)return;if(e.preventDefault(),e.stopPropagation(),null===l.activeOptionIndex)return void u.closeCombobox();u.selectActiveOption(),0===l.mode&&u.closeCombobox();break;case jd.ArrowDown:return e.preventDefault(),e.stopPropagation(),ql(l.comboboxState,{0:()=>u.goToOption(Hd.Next),1:()=>u.openCombobox()});case jd.ArrowUp:return e.preventDefault(),e.stopPropagation(),ql(l.comboboxState,{0:()=>u.goToOption(Hd.Previous),1:()=>{(0,r.flushSync)((()=>u.openCombobox())),l.value||u.goToOption(Hd.Last)}});case jd.Home:if(e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),u.goToOption(Hd.First);case jd.PageUp:return e.preventDefault(),e.stopPropagation(),u.goToOption(Hd.First);case jd.End:if(e.shiftKey)break;return e.preventDefault(),e.stopPropagation(),u.goToOption(Hd.Last);case jd.PageDown:return e.preventDefault(),e.stopPropagation(),u.goToOption(Hd.Last);case jd.Escape:return 0!==l.comboboxState?void 0:(e.preventDefault(),l.optionsElement&&!l.optionsPropsRef.current.static&&e.stopPropagation(),0===l.mode&&null===l.value&&_(),u.closeCombobox());case jd.Tab:if(0!==l.comboboxState)return;0===l.mode&&1!==l.activationTrigger&&u.selectActiveOption(),u.closeCombobox()}})),I=Fl((e=>{null==p||p(e),0===l.mode&&""===e.target.value&&_(),u.openCombobox()})),M=Fl((e=>{var t,n,r;let o=null!=(t=e.relatedTarget)?t:Bd.find((t=>t!==e.currentTarget));if(!(null!=(n=l.optionsElement)&&n.contains(o)||null!=(r=l.buttonElement)&&r.contains(o)||0!==l.comboboxState))return e.preventDefault(),0===l.mode&&null===l.value&&_(),u.closeCombobox()})),A=Fl((e=>{var t,n,o;let i=null!=(t=e.relatedTarget)?t:Bd.find((t=>t!==e.currentTarget));null!=(n=l.buttonElement)&&n.contains(i)||null!=(o=l.optionsElement)&&o.contains(i)||l.disabled||l.immediate&&0!==l.comboboxState&&x.microTask((()=>{(0,r.flushSync)((()=>u.openCombobox())),u.setActivationTrigger(1)}))})),R=Kd(),O=function(){var e,t;return null!=(t=null==(e=(0,r.useContext)(Gd))?void 0:e.value)?t:void 0}(),{isFocused:P,focusProps:D}=al({autoFocus:$}),{isHovered:N,hoverProps:F}=pl({isDisabled:m}),L=(0,r.useMemo)((()=>({open:0===l.comboboxState,disabled:m,hover:N,focus:P,autofocus:$})),[l,N,P,$,m]),B=bd({ref:y,id:f,role:"combobox",type:g,"aria-controls":null==(n=l.optionsElement)?void 0:n.id,"aria-expanded":0===l.comboboxState,"aria-activedescendant":null===l.activeOptionIndex?void 0:l.virtual?null==(o=l.options.find((e=>!e.dataRef.current.disabled&&l.compare(e.dataRef.current.value,l.virtual.options[l.activeOptionIndex]))))?void 0:o.id:null==(i=l.options[l.activeOptionIndex])?void 0:i.id,"aria-labelledby":R,"aria-describedby":O,"aria-autocomplete":"list",defaultValue:null!=(a=null!=(s=e.defaultValue)?s:void 0!==l.defaultValue?null==h?void 0:h(l.defaultValue):null)?a:l.defaultValue,disabled:m||void 0,autoFocus:$,onCompositionStart:C,onCompositionEnd:T,onKeyDown:k,onChange:I,onFocus:A,onBlur:M},D,F);return gd()({ourProps:B,theirProps:w,slot:L,defaultTag:"input",name:"Combobox.Input"})})),kf=Zd,If=xd((function(e,t){var n,o,i;let s=(0,r.useId)(),{id:a=`headlessui-combobox-options-${s}`,hold:l=!1,anchor:u,portal:c=!1,modal:d=!0,transition:f=!1,...p}=e,h=bf("Combobox.Options"),m=gf("Combobox.Options"),$=function(e){return(0,r.useMemo)((()=>e?"string"==typeof e?{to:e}:e:null),[e])}(u);$&&(c=!0);let[g,w]=function(e=null){!1===e&&(e=null),"string"==typeof e&&(e={to:e});let t=(0,r.useContext)(sd),n=(0,r.useMemo)((()=>e),[JSON.stringify(e,((e,t)=>{var n;return null!=(n=null==t?void 0:t.outerHTML)?n:t}))]);Dl((()=>{null==t||t(null!=n?n:null)}),[t,n]);let o=(0,r.useContext)(id);return(0,r.useMemo)((()=>[o.setFloating,e?o.styles:{}]),[o.setFloating,e,o.styles])}($),[v,y]=(0,r.useState)(null),b=function(){let{getFloatingProps:e,slot:t}=(0,r.useContext)(id);return(0,r.useCallback)(((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor})),[e,t])}(),x=gu(t,$?g:null,m.setOptionsElement,y),_=uu(h.optionsElement),S=(0,r.useContext)(Nd),[E,C]=function(e,t,n,o){let[i,s]=(0,r.useState)(n),{hasFlag:a,addFlag:l,removeFlag:u}=function(e=0){let[t,n]=(0,r.useState)(e),o=(0,r.useCallback)((e=>n(e)),[t]),i=(0,r.useCallback)((e=>n((t=>t|e))),[t]),s=(0,r.useCallback)((e=>(t&e)===e),[t]),a=(0,r.useCallback)((e=>n((t=>t&~e))),[n]),l=(0,r.useCallback)((e=>n((t=>t^e))),[n]);return{flags:t,setFlag:o,addFlag:i,hasFlag:s,removeFlag:a,toggleFlag:l}}(e&&i?3:0),c=(0,r.useRef)(!1),d=(0,r.useRef)(!1),f=Pl();return Dl((()=>{var r;if(e)return n&&s(!0),t?(null==(r=null==o?void 0:o.start)||r.call(o,n),function(e,{prepare:t,run:n,done:r,inFlight:o}){let i=Ol();return function(e,{inFlight:t,prepare:n}){if(null!=t&&t.current)return void n();let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}(e,{prepare:t,inFlight:o}),i.nextFrame((()=>{n(),i.requestAnimationFrame((()=>{i.add(function(e,t){var n,r;let o=Ol();if(!e)return o.dispose;let i=!1;o.add((()=>{i=!0}));let s=null!=(r=null==(n=e.getAnimations)?void 0:n.call(e).filter((e=>e instanceof CSSTransition)))?r:[];return 0===s.length?(t(),o.dispose):(Promise.allSettled(s.map((e=>e.finished))).then((()=>{i||t()})),o.dispose)}(e,r))}))})),i.dispose}(t,{inFlight:c,prepare(){d.current?d.current=!1:d.current=c.current,c.current=!0,!d.current&&(n?(l(3),u(4)):(l(4),u(2)))},run(){d.current?n?(u(3),l(4)):(u(4),l(3)):n?u(1):l(1)},done(){var e;d.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(c.current=!1,u(7),n||s(!1),null==(e=null==o?void 0:o.end)||e.call(o,n))}})):void(n&&l(3))}),[e,n,t,f]),e?[i,{closed:a(1),enter:a(2),leave:a(4),transition:a(2)||a(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}(f,v,null!==S?(S&Fd.Open)===Fd.Open:0===h.comboboxState);!function(e,t,n){let o=Nl((e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&n()}));(0,r.useEffect)((()=>{if(!e)return;let n=null===t?null:t instanceof HTMLElement?t:t.current;if(!n)return;let r=Ol();if("undefined"!=typeof ResizeObserver){let e=new ResizeObserver((()=>o.current(n)));e.observe(n),r.add((()=>e.disconnect()))}if("undefined"!=typeof IntersectionObserver){let e=new IntersectionObserver((()=>o.current(n)));e.observe(n),r.add((()=>e.disconnect()))}return()=>r.dispose()}),[t,o,e])}(E,h.inputElement,m.closeCombobox),mu(!h.__demoMode&&d&&0===h.comboboxState,_),Kl(!h.__demoMode&&d&&0===h.comboboxState,{allowed:(0,r.useCallback)((()=>[h.inputElement,h.buttonElement,h.optionsElement]),[h.inputElement,h.buttonElement,h.optionsElement])}),Dl((()=>{var t;h.optionsPropsRef.current.static=null!=(t=e.static)&&t}),[h.optionsPropsRef,e.static]),Dl((()=>{h.optionsPropsRef.current.hold=l}),[h.optionsPropsRef,l]),function(e,{container:t,accept:n,walk:o}){let i=(0,r.useRef)(n),s=(0,r.useRef)(o);(0,r.useEffect)((()=>{i.current=n,s.current=o}),[n,o]),Dl((()=>{if(!t||!e)return;let n=Al(t);if(!n)return;let r=i.current,o=s.current,a=Object.assign((e=>r(e)),{acceptNode:r}),l=n.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,a,!1);for(;l.nextNode();)o(l.currentNode)}),[t,e,i,s])}(0===h.comboboxState,{container:h.optionsElement,accept:e=>"option"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let T=Kd([null==(n=h.buttonElement)?void 0:n.id]),k=(0,r.useMemo)((()=>({open:0===h.comboboxState,option:void 0})),[h.comboboxState]),I=Fl((()=>{m.setActivationTrigger(0)})),M=Fl((e=>{e.preventDefault(),m.setActivationTrigger(0)})),A=bd($?b():{},{"aria-labelledby":T,role:"listbox","aria-multiselectable":1===h.mode||void 0,id:a,ref:x,style:{...p.style,...w,"--input-width":Bl(h.inputElement,!0).width,"--button-width":Bl(h.buttonElement,!0).width},onWheel:0===h.activationTrigger?void 0:I,onMouseDown:M,..._u(C)}),R=E&&1===h.comboboxState,O=Od(R,null==(o=h.virtual)?void 0:o.options),P=Od(R,h.value),D=Fl((e=>h.compare(P,e)));if(h.virtual){if(void 0===O)throw new Error("Missing `options` in virtual mode");Object.assign(p,{children:r.default.createElement(yf.Provider,{value:O!==h.virtual.options?{...h,virtual:{...h.virtual,options:O}}:h},r.default.createElement(vf,{slot:k},p.children))})}let N=gd();return r.default.createElement(lf,{enabled:!!c&&(e.static||E)},r.default.createElement(yf.Provider,{value:1===h.mode?h:{...h,isSelected:D}},N({ourProps:A,theirProps:{...p,children:r.default.createElement(Rd,{freeze:R},"function"==typeof p.children?null==(i=p.children)?void 0:i.call(p,k):p.children)},slot:k,defaultTag:"div",features:Sf,visible:E,name:"Combobox.Options"})))})),Mf=xd((function(e,t){var n,o,i,s;let a=bf("Combobox.Option"),l=gf("Combobox.Option"),u=(0,r.useId)(),{id:c=`headlessui-combobox-option-${u}`,value:d,disabled:f=null!=(i=null==(o=null==(n=a.virtual)?void 0:n.disabled)?void 0:o.call(n,d))&&i,order:p=null,...h}=e,m=cu(a.inputElement),$=a.virtual?a.activeOptionIndex===a.calculateIndex(d):null!==a.activeOptionIndex&&(null==(s=a.options[a.activeOptionIndex])?void 0:s.id)===c,g=a.isSelected(d),w=(0,r.useRef)(null),v=Nl({disabled:f,value:d,domRef:w,order:p}),y=(0,r.useContext)(wf),b=gu(t,w,y?y.measureElement:null),x=Fl((()=>{l.setIsTyping(!1),l.onChange(d)}));Dl((()=>l.registerOption(c,v)),[v,c]);let _=(0,r.useRef)(!(a.virtual||a.__demoMode));Dl((()=>{if(!a.virtual&&!a.__demoMode)return Ol().requestAnimationFrame((()=>{_.current=!0}))}),[a.virtual,a.__demoMode]),Dl((()=>{if(_.current&&0===a.comboboxState&&$&&0!==a.activationTrigger)return Ol().requestAnimationFrame((()=>{var e,t;null==(t=null==(e=w.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}))}),[w,$,a.comboboxState,a.activationTrigger,a.activeOptionIndex]);let S=Fl((e=>{e.preventDefault(),e.button===Xd.Left&&(f||(x(),su()||requestAnimationFrame((()=>m())),0===a.mode&&l.closeCombobox()))})),E=Fl((()=>{if(f)return l.goToOption(Hd.Nothing);let e=a.calculateIndex(d);l.goToOption(Hd.Specific,e)})),C=function(){let e=(0,r.useRef)([-1,-1]);return{wasMoved(t){let n=wu(t);return(e.current[0]!==n[0]||e.current[1]!==n[1])&&(e.current=n,!0)},update(t){e.current=wu(t)}}}(),T=Fl((e=>C.update(e))),k=Fl((e=>{if(!C.wasMoved(e)||f||$)return;let t=a.calculateIndex(d);l.goToOption(Hd.Specific,t,0)})),I=Fl((e=>{C.wasMoved(e)&&(f||$&&(a.optionsPropsRef.current.hold||l.goToOption(Hd.Nothing)))})),M=(0,r.useMemo)((()=>({active:$,focus:$,selected:g,disabled:f})),[$,g,f]),A={id:c,ref:b,role:"option",tabIndex:!0===f?void 0:-1,"aria-disabled":!0===f||void 0,"aria-selected":g,disabled:void 0,onMouseDown:S,onFocus:E,onPointerEnter:T,onMouseEnter:T,onPointerMove:k,onMouseMove:k,onPointerLeave:I,onMouseLeave:I};return gd()({ourProps:A,theirProps:h,slot:M,defaultTag:"div",name:"Combobox.Option"})})),Af=Object.assign(Ef,{Input:Tf,Button:Cf,Label:kf,Options:If,Option:Mf});class Rf extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Value","OnChange","Children"]}}class Of extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["DisplayValue","OnChange","ClassName","AutoComplete"]}}function Pf(e){const t=gi(e,1);return r.createElement(Af.Input,t)}class Df extends pe{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["ClassName"]}}function Nf(e,t){const n=gi(e,1);return r.createElement(Af.Options,n,...t)}class Ff extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["ClassName","Children"]}}function Lf(e){const t=gi(e,1);return r.createElement(Af.Button,t)}class Bf extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Key","Value","ClassName","Children"]}}class Hf extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["SetResidencyStatusRadioBox","SetCountry"]}}class Vf extends he{constructor(e){super(),this.ResidencyStatus=e}}function Gf(e){return function(e){let t,n;switch(null==e?t=2:2===e.tag?(t=1,n=e.fields[0]):t=0,t){case 0:return!0;case 1:return null!=n.HomeCountry;default:return!1}}(e)?Ns(e):Fs(e)}function Uf(e){return new Vf(Gf(e.ResidencyStatus.Value))}function zf(e,t,n){let o,i;const s=yt.useState(""),a=e=>{let t,n;return He((n=Ai(e),t=1===n.tag?void 0:n.fields[0],null==t?void 0:t.Name),"")};let l;const u=Fe(s[0]);let c,d;return null!=u?""===u?c=0:(c=1,d=u):c=0,0===c?l=t:l=function(e,t){return Xn(e.comparer,Hn(e.comparer,t,e.tree))}(t,((e,t)=>{const n=e=>{return(t=e,t.replace(new RegExp(ce(" "),"g"),"")).toLocaleLowerCase();var t},r=n(t),o=n(d);return r.indexOf(o)>=0})),function(e){const t=gi(e,1);return r.createElement(Af,t)}(mt([new Rf(0,[a(e)]),new Rf(1,[n]),new Rf(2,[[(0,r.createElement)("div",k(mt([["className","relative mt-1"],(o=[(0,r.createElement)("div",k(mt([["className","relative w-full cursor-default overflow-hidden focus:outline-none focus:border-primary-focus"],(i=[Pf(mt([new Of(0,[a(e)]),new Of(2,["block w-full pr-10 focus:outline-none text-base sm:text-sm rounded-md border-gray-300 focus:border-primary-focus shadow-none focus:ring-0"]),new Of(1,[e=>{s[1](e.target.value)}]),new Of(3,["off"])])),Lf(mt([new Ff(0,["absolute inset-y-0 right-0 flex items-center pr-2"]),new Ff(1,[[Tt]])]))],["children",yt.Children.toArray(Array.from(i))])]))),Nf(st(new Df("absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-sm shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm z-50")),zt(Bt((()=>Yt(0===er(l)?Gt((0,r.createElement)("div",{className:"relative cursor-default select-none py-2 px-4 text-gray-700",children:yt.Children.toArray(["Nothing found"])})):Vt(),Bt((()=>tn((e=>{const t=e,n=t[0];return Gt(function(e){const t=gi(e,1);return r.createElement(Af.Option,t)}(mt([new Bf(0,[n]),new Bf(1,[n]),new Bf(2,["relative cursor-default select-none"]),new Bf(3,[e=>[(0,r.createElement)("span",{className:"py-2 pl-2 pr-4 block truncate "+(e.active||e.selected?"bg-primary-base":"bg-white text-black"),children:t[1]})]])])))}),l))))))))],["children",yt.Children.toArray(Array.from(o))])])))]])]))}function jf(e){let t,n;const o=(i=e.InitialValue,[Uf(new Vf(Fs(i))),Js()]);var i;n=$a((()=>da((()=>o),((t,n)=>function(e,t){const n=function(e){let t;if(1===e.tag){let t;const n=Ai(He(e.fields[0].Value,""));return t=1===n.tag?void 0:n.fields[0],Uf(new Vf(Fs(null==t?Oi:Pi(t))))}return Uf(new Vf(Fs((t=e.fields[0].Value,null==t?void 0:function(e){switch(e){case"AustralianResidentForTaxPurposes":return new Ri(0,[]);case"ForeignResidentForTaxPurposes":return new Ri(1,[]);case"WorkingHolidayMaker":return Oi;default:return}}(t)))))}(t);return e(n.ResidencyStatus),[n,Js()]}(e.OnUpdate,t)),((e,t)=>{}))),void 0,void 0);const s=n[0],a=n[1];return(0,r.createElement)("div",k(st((t=zt(Bt((()=>Yt(Gt(Vs("Are you an Australian resident for tax purposes or a working holiday maker?")),Bt((()=>{let e,t;return Yt(Gt((0,r.createElement)(va,(e=gt((e=>[Ls(e[0]),e[1],e[2]]),mt([[new Ri(0,[]),"Australian resident for tax purposes",void 0],[new Ri(1,[]),"Foreign resident",void 0],[new Ri(2,[{}]),"Working holiday maker",void 0]])),{InitialValue:De((t=s.ResidencyStatus.Value,null==t?void 0:Ls(t))),Name:"ResidencyStatus",OnUpdate:e=>{a(new Hf(0,[e]))},ValueLabelPairs:e}))),Bt((()=>{let e,t;const n=s.ResidencyStatus.Value;let o,i;return null!=n&&2===n.tag?(o=0,i=n.fields[0]):o=1,Gt(0===o?(0,r.createElement)("div",k(mt([["className",Te(" ",["mt-4"])],(e=[Vs("Your home country where your visa was issued"),zf(He((t=i.HomeCountry,null==t?void 0:t.Code),""),ki,(e=>{a(new Hf(1,[Ns(e)]))}))],["children",yt.Children.toArray(Array.from(e))])]))):null)})))})))))),["children",yt.Children.toArray(Array.from(t))]))))}class Wf extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["SetTfnInformation","SetPreviousSurname","SetResidencyStatus","SetClaimTaxFreeThreshold","SetDebtSupport","SetEmploymentBasis","GetData","ShowAlert","HideAlert","Saved","AppReady"]}}class Yf extends he{constructor(e,t,n,r,o,i,s,a){super(),this.PreExistingTfnDec=e,this.CurrentAlert=t,this.TfnInformation=n,this.PreviousSurname=r,this.ResidencyStatus=o,this.ClaimTaxFreeThreshold=i,this.DebtSupportCheckboxGroup=s,this.EmploymentBasisRadioButtonGroup=a}}function Kf(e){return 3===e.tag?Ds():Ns(e)}class qf extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Web","WebComponent"]}}function Zf(){const e=function(e,t,n){return function(e,t,n,r,o){const i=0|He(n,0),s=0|He(Ve((e=>i+e),r),e.length);return 0|(n=>{for(;;){const r=n;if(r>=s)return-1;if(o.Equals(t,Ye(r,e)))return 0|r;n=r+1}})(i)}(t,"web",void 0,void 0,n)>=0}(0,Me(document.URL,["/"],void 0,0),{Equals:(e,t)=>e===t,GetHashCode:g}),t=Fe(document.querySelector("tax-component"));return null==t?e?new hr(0,[new qf(0,[])]):new hr(1,["Could not determine the embed mode"]):new hr(0,[new qf(1,[t])])}class Jf extends pe{constructor(){super(),this.tag=0,this.fields=[]}cases(){return["SuccessRedirectionUrl"]}}function Xf(){let e;const t=Zf();var n;0===t.tag&&(0===t.fields[0].tag?Jt((e=>{window.parent.location.href=e}),Be((n=new Jf,Fe(sessionStorage.getItem(function(e){return fe(e)}(n)))))):(e=new CustomEvent("step-completion",{bubbles:!0,detail:"tax"}),t.fields[0].fields[0].dispatchEvent(e)))}function Qf(){return[new Yf(new mn(0,[]),void 0,Ds(),Ns(void 0),Ns(new Ri(0,[])),Ws(new Us(0,[])),Ns(void 0),Ns(new Di(0,[]))),Js()]}function ep(e,t){let n;switch(e.tag){case 1:return[new Yf(t.PreExistingTfnDec,t.CurrentAlert,t.TfnInformation,e.fields[0],t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),Js()];case 2:{const r=e.fields[0];return[new Yf(t.PreExistingTfnDec,t.CurrentAlert,t.TfnInformation,t.PreviousSurname,r,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),(n=r.Value,null==n?Js():1===n.tag?st((e=>{e(new Wf(3,[new zs(1,[new Us(1,[]),!1])]))})):2===n.tag?st((e=>{e(new Wf(3,[new zs(1,[new Us(1,[]),!0])]))})):st((e=>{e(new Wf(3,[new zs(1,[new Us(0,[]),!1])]))})))]}case 3:return[new Yf(t.PreExistingTfnDec,t.CurrentAlert,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,Ys(e.fields[0],t.ClaimTaxFreeThreshold),t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),Js()];case 4:return[new Yf(t.PreExistingTfnDec,t.CurrentAlert,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,e.fields[0],t.EmploymentBasisRadioButtonGroup),Js()];case 5:{const n=(r=Hs,null!=(o=e.fields[0].Value)?r(Pe(o)):void 0);return[new Yf(t.PreExistingTfnDec,t.CurrentAlert,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,new Ps(n,{Valid:null!=n})),Js()]}case 6:{const n=e.fields[0],r=new Yf(n,t.CurrentAlert,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),o=st((e=>{e(new Wf(7,[new Is(1,["There was an error loading your tax declaration. Please try refreshing this page."])]))}));!function(){let e,t;const n=Fe(document.getElementById("external-loading-page-container"));Jt((t=document.body,e=e=>t.removeChild(e),t=>{e(t)}),Be(n))}();const i=st((e=>{e(new Wf(10,[]))}));switch(n.tag){case 2:if(1===n.fields[0].tag)return[r,o];{const e=Ve((e=>function(e,t){let n;if(0===t.tag){const o=t.fields[0];let i;const s=o.TfnInformation;if(1===s.tag){const e=function(e){switch(e){case 0:return new hr(0,[new Fi(0,[])]);case 1:return new hr(0,[new Fi(1,[])]);case 2:return new hr(0,[new Fi(2,[])]);default:return new hr(1,["Invalid ExemptionReason"])}}(s.fields[0]);i=1===e.tag?new hr(1,[e.fields[0]]):new hr(0,[new xa(1,[new ba(1,[e.fields[0]])])])}else i=new hr(0,[new xa(0,[s.fields[0]])]);if(1===i.tag)return new hr(1,[i.fields[0]]);{const t=zi(o.ResidencyStatusV2);if(1===t.tag)return new hr(1,[t.fields[0]]);{const s=t.fields[0],a=1===s.tag||2===s.tag?new Us(1,[]):o.IsTaxFreeThresholdClaimed?new Us(0,[]):new Us(1,[]),l=Ki(o.HasDebtSupport);if(1===l.tag)return new hr(1,[l.fields[0]]);{const t=l.fields[0],u=ji(o.EmploymentBasis);return 1===u.tag?new hr(1,[u.fields[0]]):new hr(0,[new Yf(e.PreExistingTfnDec,e.CurrentAlert,Ns(i.fields[0]),Ns((n=o.PreviousSurname,null==n?void 0:(r=n,new Li(r)))),Gf(s),Ws(a),at(t)?Ns(void 0):Ns(t),Kf(u.fields[0]))])}}}}{const n=t.fields[0];let r,o;const i=n.ResidencyStatusV2;if(o=null==i?void 0:zi(i),null!=o){const e=o;r=1===e.tag?new hr(1,[e.fields[0]]):new hr(0,[e.fields[0]])}else r=new hr(0,[void 0]);if(1===r.tag)return new hr(1,[r.fields[0]]);{const t=ji(n.EmploymentBasis);return 1===t.tag?new hr(1,[t.fields[0]]):new hr(0,[new Yf(e.PreExistingTfnDec,e.CurrentAlert,e.TfnInformation,e.PreviousSurname,Gf(r.fields[0]),e.ClaimTaxFreeThreshold,e.DebtSupportCheckboxGroup,Kf(t.fields[0]))])}}var r}(r,e)),n.fields[0].fields[0].Info);if(null==e)return[r,i];{const t=e;return 0===t.tag?[t.fields[0],i]:[r,o]}}case 3:return[r,o];default:return[r,i]}}case 7:return[new Yf(t.PreExistingTfnDec,e.fields[0],t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),Js()];case 8:return[new Yf(t.PreExistingTfnDec,void 0,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),Js()];case 9:return[new Yf(new mn(2,[new hr(0,[e.fields[0]])]),t.CurrentAlert,t.TfnInformation,t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),Js()];case 10:return function(){const e=Zf();let t;t=0===e.tag&&0===e.fields[0].tag?0:1,0===t&&window.parent.postMessage({sender:"flare",type:"appReady"},"*",Ne(ot()))}(),[t,Js()];default:return[new Yf(t.PreExistingTfnDec,t.CurrentAlert,e.fields[0],t.PreviousSurname,t.ResidencyStatus,t.ClaimTaxFreeThreshold,t.DebtSupportCheckboxGroup,t.EmploymentBasisRadioButtonGroup),Js()]}var r,o}class tp extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["SetText","SetTouched"]}}class np extends he{constructor(e,t){super(),this.Text=e,this.Meta=t}}class rp extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["Number","Text"]}}function op(e){let t,n;const o=function(e,t){const n=He(e,"");return[new np(n,{Touched:!1,Valid:t(n)}),Js()]}(e.InitialValue,e.Validator);n=$a((()=>da((()=>o),((t,n)=>function(e,t,n,r){const o=function(e,t,n){if(1===t.tag)return new np(n.Text,{Touched:!0,Valid:n.Meta.Valid});{const r=t.fields[0];return new np(r,{Touched:n.Meta.Touched,Valid:e(r)})}}(t,n,r);return e(new Ps(o.Text,{Valid:o.Meta.Valid})),[o,Js()]}(e.OnUpdate,e.Validator,t,n)),((e,t)=>{}))),void 0,void 0);const i=n[0],s=n[1];return(0,r.createElement)("div",k(mt([["className",Te(" ",$t(e.AdditionalWrapperClasses,st("z-10")))],(t=zt(Bt((()=>Yt(Gt((0,r.createElement)("input",k(zt(Bt((()=>Yt(Gt(["className",Te(" ",$t(e.AdditionalInputClasses,$t(mt(["block","w-full","pr-10","focus:outline-none","text-base","sm:text-sm","rounded-md","border-gray-300"]),zt(Bt((()=>!i.Meta.Valid&&i.Meta.Touched?["border-red-300","text-red-900","placeholder-red-300","focus:ring-red-500","focus:border-red-500"]:Vt()))))))]),Bt((()=>Yt(Gt(["type","text"]),Bt((()=>Yt(Gt(["onChange",t=>{const n=t.target.value;s(new tp(0,[1===e.InputType.tag?n:Ae(mi,n)]))}]),Bt((()=>{let t;return Yt(Gt((t=i.Text,["ref",e=>{null==e||_(e.value,t)||(e.value=t)}])),Bt((()=>Yt(Gt(["onBlur",e=>{s(new tp(1,[]))}]),Bt((()=>Yt(_(e.InputType,new rp(0,[]))?Gt(["inputMode","numeric"]):Vt(),Bt((()=>Gt(["data-testid",e.TestId]))))))))))}))))))))))))))),Bt((()=>!i.Meta.Valid&&i.Meta.Touched?Gt((0,r.createElement)("div",{className:Te(" ",["mt-1","text-sm","text-red-600"]),children:e.InvalidFeedback})):Vt())))))),["children",yt.Children.toArray(Array.from(t))])])))}class ip extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["YesNoButtonGroupMsg","SetPreviousSurname"]}}class sp extends he{constructor(e,t){super(),this.YesNoButtonGroup=e,this.Data=t}}function ap(e){return 1!==function(e){const t="string"!=typeof(r=n=e)||/^\s*$/.test(r)?new hr(1,["Previous Surname cannot be null, empty or white spaces"]):new hr(0,[n]);var n,r;return 1===t.tag?new hr(1,[t.fields[0]]):function(e,t,n){return n.length<=59?new hr(0,[n]):new hr(1,["Previous Surname must be no more than 59 characters long."])}(0,0,t.fields[0])}(e).tag}function lp(e){const t=e.YesNoButtonGroup.Selected;return null==t?new sp(e.YesNoButtonGroup,new Ps(e.Data.Value,{Valid:!1})):1===t.tag?new sp(e.YesNoButtonGroup,new Ps(e.Data.Value,{Valid:!0})):new sp(e.YesNoButtonGroup,new Ps(e.Data.Value,{Valid:He(Ve((e=>ap(e.fields[0])),e.Data.Value),!1)}))}function up(e){let t,n;const o=(i=e.InitialValue,[lp(new sp(Ws(new Us(null==i?1:0,[])),new Ps(i,{Valid:!1}))),Js()]);var i;n=$a((()=>da((()=>o),((t,n)=>function(e,t,n){const r=function(e,t){let n,r,o;return lp(1===e.tag?(n=e.fields[0],new sp(t.YesNoButtonGroup,new Ps(Ve((e=>new Li(e)),n.Value),{Valid:n.Meta.Valid}))):(r=e.fields[0],r.tag,o=1===r.fields[0].tag?new Ps(void 0,t.Data.Meta):t.Data,new sp(Ys(r,t.YesNoButtonGroup),o)))}(t,n);return e(r.Data),[r,Js()]}(e.OnUpdate,t,n)),((e,t)=>{}))),void 0,void 0);const s=n[0],a=n[1];return(0,r.createElement)("div",k(mt([["className",Te(" ",It)],(t=zt(Bt((()=>Yt(Gt(Vs("Have you changed your surname since you last dealt with the Australian Tax Office (ATO)?")),Bt((()=>Yt(Gt((0,r.createElement)(qs,{Dispatch:e=>{a(new ip(0,[e]))},State:s.YesNoButtonGroup})),Bt((()=>{let e;const t=s.YesNoButtonGroup.Selected;let n;return n=null!=t&&0===t.tag?0:1,Gt(0===n?(0,r.createElement)("div",k(mt([["className",Te(" ",["mt-4"])],(e=[Vs("Enter your previous surname"),(0,r.createElement)(op,{AdditionalInputClasses:mt(["focus:ring-primary-focus","focus:border-primary-focus"]),AdditionalWrapperClasses:st("mt-1"),InitialValue:De(Ve(Bi,s.Data.Value)),InputType:new rp(1,[]),InvalidFeedback:"Please enter your previous surname with a maximum length of 59 characters",OnUpdate:e=>{a(new ip(1,[e]))},TestId:"surname-input",Validator:ap})],["children",yt.Children.toArray(Array.from(e))])]))):null)}))))))))),["children",yt.Children.toArray(Array.from(t))])])))}const cp=mt(["mt-7","bg-white","px-4","border","border-gray-200","rounded-lg","shadow-sm"]),dp=mt(["group","relative","w-full","my-3","focus-visible:outline-primary-hover","flex","justify-between","items-center","text-left"]),fp=mt(["text-sm","text-primary-base","leading-3","font-medium"]),pp=mt(["ml-6","flex","items-center"]),hp=mt(["pt-1","pb-3","prose","prose-sm","text-gray-500","text-sm"]);function mp(e){let t,n,o,i;const s=e.content,a=e.title,l=yt.useState(!0),u=l[0];return(0,r.createElement)("div",k(mt([["className",Te(" ",cp)],(t=[(n=st((0,r.createElement)("button",k(mt([["type","button"],["className",Te(" ",dp)],["aria-expanded",u],["onClick",e=>{l[1](!u)}],(o=[(0,r.createElement)("span",{className:Te(" ",fp),children:a}),(0,r.createElement)("span",k(mt([["className",Te(" ",pp)],(i=zt(Bt((()=>Gt(u?Et:St)))),["children",yt.Children.toArray(Array.from(i))])])))],["children",yt.Children.toArray(Array.from(o))])])))),(0,r.createElement)("h3",{children:yt.Children.toArray(Array.from(n))})),(0,r.createElement)("div",{className:Te(" ",$t(hp,zt(Bt((()=>u?Gt("hidden"):Vt()))))),children:yt.Children.toArray([s])})],["children",yt.Children.toArray(Array.from(t))])])))}class $p extends pe{constructor(e){super(),this.tag=0,this.fields=[e]}cases(){return["Select"]}}class gp extends he{constructor(e){super(),this.Selected=e}}function wp(e,t){return null!=function(e,t){return((t,n)=>{for(;;){const r=t,o=n;if(et(o))return;if(e(nt(o)))return r;t=r+1,n=rt(o)}})(0,t)}((t=>e===t),t.Selected)}function vp(e){let t,n;const o=(i=e.InitialValue,[new gp(i),Js()]);var i;return n=$a((()=>da((()=>o),((t,n)=>function(e,t,n){const r=function(e,t){const n=e.fields[0];return wp(n,t)?new gp(wt((e=>n!==e),t.Selected)):new gp($t(st(n),t.Selected))}(t,n);return e(r.Selected),[r,Js()]}(e.OnUpdate,t,n)),((e,t)=>{}))),void 0,void 0),(0,r.createElement)("fieldset",k(mt([["className",Te(" ",["space-y-2","mt-2"])],(t=zt(Bt((()=>tn((e=>{let t,o,i;const s=e[0];return Gt((0,r.createElement)("div",k(mt([["className",Te(" ",["relative","flex","items-start"])],["onChange",e=>{e.target.checked,n[1](new $p(s))}],(t=[(0,r.createElement)("div",k(mt([["className",Te(" ",["flex","items-center","h-5"])],(o=[(0,r.createElement)("input",{className:Te(" ",["focus:ring-primary-focus","h-4","w-4","text-primary-base","border-gray-300","rounded"]),type:"checkbox",id:s,checked:wp(s,n[0])})],["children",yt.Children.toArray(Array.from(o))])]))),(0,r.createElement)("div",k(mt([["className",Te(" ",["ml-3","text-sm"])],(i=[(0,r.createElement)("label",{className:Te(" ",["font-normal","text-gray-700"]),for:s,children:e[1]})],["children",yt.Children.toArray(Array.from(i))])])))],["children",yt.Children.toArray(Array.from(t))])]))))}),e.ValueLabelPairs)))),["children",yt.Children.toArray(Array.from(t))])])))}class yp extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["YesNoButtonGroupMsg","SetDebtSupport"]}}class bp extends pe{constructor(e,t){super(),this.tag=e,this.fields=t}cases(){return["ForeignResident","WorkingHolidayMaker"]}}class xp extends he{constructor(e,t,n){super(),this.YesNoButtonGroup=e,this.Data=t,this.DisableReason=n}}function _p(e){let t,n;const r=e.YesNoButtonGroup.Selected;return null==r?new xp(e.YesNoButtonGroup,new Ps(e.Data.Value,{Valid:!1}),e.DisableReason):1===r.tag?new xp(e.YesNoButtonGroup,new Ps(e.Data.Value,{Valid:!0}),e.DisableReason):new xp(e.YesNoButtonGroup,new Ps(e.Data.Value,{Valid:(t=e.Data.Value,null!=t&&(o=t,tt(o)>0&&(n=t,!0)))}),e.DisableReason);var o}function Sp(e){let t,n;const o=function(e,t,n){let r,o;const i=e.Value;let s;s=null==i||at(i)?0:1,o=new Us(0===s?1:0,[]);const a=null!=t?null!=n?1===n.tag?function(e){let t;return t=1===e.tag&&1===e.fields[0].tag?1:0,0===t}(t)?void 0:(r=t,new bp(0,[])):2===n.tag?new bp(1,[]):void 0:void 0:null!=n?1===n.tag?new bp(0,[]):2===n.tag?new bp(1,[]):void 0:void 0,l=null==a?Js():st((e=>{e(new yp(0,[new zs(1,[new Us(1,[]),!0])]))}));return[_p(new xp(Ws(o),e,a)),l]}(e.InitialValue,e.TfnInfo,e.ResidencyStatus);n=$a((()=>da((()=>o),((t,n)=>function(e,t,n){const r=function(e,t){let n,r;return _p(1===e.tag?new xp(t.YesNoButtonGroup,Ns(e.fields[0]),t.DisableReason):(n=e.fields[0],n.tag,r=1===n.fields[0].tag?Ns(void 0):t.Data,new xp(Ys(n,t.YesNoButtonGroup),r,t.DisableReason)))}(t,n);return e(r.Data),[r,Js()]}(e.OnUpdate,t,n)),((e,t)=>{}))),void 0,[e.TfnInfo,e.ResidencyStatus]);const i=n[0],s=n[1];return(0,r.createElement)("div",k(mt([["className",Te(" ",It)],(t=zt(Bt((()=>Yt(Gt(Vs("Do you have any outstanding study and training support loans?")),Bt((()=>Yt(Gt((0,r.createElement)(qs,{Disable:De(Ve((e=>new Us(0,[])),i.DisableReason)),Dispatch:e=>{s(new yp(0,[e]))},State:i.YesNoButtonGroup})),Bt((()=>{let t;return Yt((t=i.DisableReason,null!=t?1===t.tag?Gt(Gs("Working holiday makers are ineligible for study and training support loans.")):Gt(Gs("You must provide your TFN to declare any outstanding study and training support loans.")):Gt(null)),Bt((()=>{let t,n;const o=i.YesNoButtonGroup.Selected;let a;return a=null!=o&&0===o.tag?0:1,Gt(0===a?(0,r.createElement)("div",k(mt([["className",Te(" ",["mt-4"])],(t=[(0,r.createElement)(vp,(n=gt((e=>[fe(e[0]),e[1]]),mt([[new Ii(0,[]),"Higher Education Loan Program (HELP)"],[new Ii(1,[]),"VET Student Loan (VSL)"],[new Ii(2,[]),"Financial Supplement (FS)"],[new Ii(3,[]),"Student Start-up Loan (SSL)"],[new Ii(4,[]),"Trade Support Loan (TSL)"]])),{InitialValue:He(Ve((e=>gt(fe,e)),e.InitialValue.Value),ot()),OnUpdate:e=>{s(new yp(1,[vt(Bs,e)]))},ValueLabelPairs:n}))],["children",yt.Children.toArray(Array.from(t))])]))):null)})))}))))))))),["children",yt.Children.toArray(Array.from(t))])])))}function Ep(e,t){return!!(e.TfnInformation.Meta.Valid&&e.PreviousSurname.Meta.Valid&&e.ResidencyStatus.Meta.Valid&&null!=e.ClaimTaxFreeThreshold.Selected&&e.EmploymentBasisRadioButtonGroup.Meta.Valid&&e.DebtSupportCheckboxGroup.Meta.Valid)&&!_(t,new mn(1,[]))}function Cp(){return(0,r.createElement)("hr",{className:Te(" ",["my-8"])})}const Tp=(0,r.createElement)("div",k(mt([["className",Te(" ",["space-y-2"])],(()=>{let e,t,n;const o=[(e="You are considered to be an Australian resident for tax purposes if you live here permanently, or studying for a period in excess of 6 months.",(0,r.createElement)("p",{children:["You are considered to be an Australian resident for tax purposes if you live here permanently, or studying for a period in excess of 6 months."]})),(t="Select working holiday maker if you are in Australia on a working holiday visa (subclass 417) or a work and holiday visa (subclass 462). Special rates of tax apply for working holiday makers.",(0,r.createElement)("p",{children:["Select working holiday maker if you are in Australia on a working holiday visa (subclass 417) or a work and holiday visa (subclass 462). Special rates of tax apply for working holiday makers."]})),(n="If none of the above applies, select foreign resident unless you are in receipt of an Australian Government pension or allowance. Foreign resident tax rates are different.",(0,r.createElement)("p",{children:["If none of the above applies, select foreign resident unless you are in receipt of an Australian Government pension or allowance. Foreign resident tax rates are different."]}))];return["children",yt.Children.toArray(Array.from(o))]})()]))),kp=(0,r.createElement)("div",k(mt([["className",Te(" ",["space-y-2"])],(()=>{let e,t;const n=[(e="If you are an Australian resident for tax purposes and this is your main job, you can claim the tax-free threshold. This means that you pay no tax on the first $18,200 of your income.",(0,r.createElement)("p",{children:["If you are an Australian resident for tax purposes and this is your main job, you can claim the tax-free threshold. This means that you pay no tax on the first $18,200 of your income."]})),(t="You are also eligible to claim the threshold if you are a foreign resident in receipt of an Australian Government pension or allowance. This is classified as an Australian resident for tax purposes.",(0,r.createElement)("p",{children:["You are also eligible to claim the threshold if you are a foreign resident in receipt of an Australian Government pension or allowance. This is classified as an Australian resident for tax purposes."]})),(0,r.createElement)("p",{children:["Foreign residents and working holiday makers are ineligible to claim the threshold."]})];return["children",yt.Children.toArray(Array.from(n))]})()])));function Ip(e){const t=e.backendUrl,n=e.accessToken;let o;const i=Qf();o=$a((()=>da((()=>i),ep,((e,t)=>{}))),void 0,void 0);const s=o[0],a=o[1],l=$n((()=>Es(n,t)),(e=>{a(new Wf(6,[e]))}));yt.useEffect(l,[]);const u=yt.useState(new mn(0,[])),c=u[0],d=$n((()=>function(e,t,n,r){let o;const i=ks(e,t,n);return o=ln.Bind(i,(e=>{let t;const n=e;return 1===n.tag||r(new Is(0,["Your tax declaration has been saved."])),t=n,ln.Return(t)})),ln.Bind(o,(e=>{let t;const n=e;if(1===n.tag){const e=n.fields[0];1===e.tag?r(new Is(1,["There was an error saving your tax declaration. Please try saving again."])):r(new Is(1,[`There was an error saving your tax declaration. ${e.fields[0]}`]))}return t=n,ln.Return(t)}))}(s,n,t,(e=>{a(new Wf(7,[e]))}))),(e=>{let t,n;u[1](e),2===e.tag&&0===e.fields[0].tag?(t=0,n=e.fields[0].fields[0]):t=1,0===t&&(hn(ln.Delay((()=>ln.Bind(pn(400),(()=>(Xf(),ln.Zero())))))),a(new Wf(9,[n])))}));switch(s.PreExistingTfnDec.tag){case 0:case 1:return(0,r.createElement)("div",{children:["Please wait..."]});default:{const e=zt(Bt((()=>{let e,t;return Yt((e=s.CurrentAlert,null==e?Gt(null):(t=e,Gt((0,r.createElement)(Os,{alert:t,hideAlert:()=>{a(new Wf(8,[]))}})))),Bt((()=>Yt(Gt((0,r.createElement)("h3",{className:Te(" ",["text-3xl","font-bold","text-center","mb-8","sm:mb-12"]),children:"Tax Declaration"})),Bt((()=>Yt(Gt((0,r.createElement)(Ma,{InitialValue:De(s.TfnInformation.Value),OnUpdate:e=>{a(new Wf(0,[e]))}})),Bt((()=>Yt(Gt(Cp()),Bt((()=>Yt(Gt((0,r.createElement)(up,{InitialValue:De(s.PreviousSurname.Value),OnUpdate:e=>{a(new Wf(1,[e]))}})),Bt((()=>Yt(Gt(Cp()),Bt((()=>Yt(Gt((0,r.createElement)(jf,{InitialValue:De(s.ResidencyStatus.Value),OnUpdate:e=>{a(new Wf(2,[e]))}})),Bt((()=>Yt(Gt((0,r.createElement)(mp,{title:"About residency",content:Tp})),Bt((()=>Yt(Gt(Cp()),Bt((()=>{let e,t;return Yt(Gt((0,r.createElement)("div",k(mt([["className",Te(" ",It)],(e=[Vs("Would you like to claim the tax-free threshold from this employer?"),(0,r.createElement)(qs,{Disable:De((t=s.ResidencyStatus.Value,null==t||2!==t.tag&&1!==t.tag?void 0:new Us(0,[]))),Dispatch:e=>{a(new Wf(3,[e]))},State:s.ClaimTaxFreeThreshold})],["children",yt.Children.toArray(Array.from(e))])])))),Bt((()=>{let e;return Yt((e=s.ResidencyStatus.Value,null!=e?2===e.tag?Gt(Gs("Working holiday makers are ineligible to claim the tax-free threshold.")):1===e.tag?Gt(Gs("Foreign residents are ineligible to claim the tax-free threshold.")):Gt(null):Gt(null)),Bt((()=>Yt(Gt((0,r.createElement)(mp,{title:"About the tax-free threshold",content:kp})),Bt((()=>Yt(Gt(Cp()),Bt((()=>Yt(Gt((0,r.createElement)(Sp,{InitialValue:s.DebtSupportCheckboxGroup,OnUpdate:e=>{a(new Wf(4,[e]))},ResidencyStatus:De(s.ResidencyStatus.Value),TfnInfo:De(s.TfnInformation.Value)})),Bt((()=>Yt(Gt(Cp()),Bt((()=>Yt(Gt(Vs("On what basis are you paid?")),Bt((()=>Yt(Gt((0,r.createElement)("p",{className:"text-sm leading-5 font-normal text-gray-500",children:"Check with your employer if you’re unsure."})),Bt((()=>{let e,t;return Yt(Gt((0,r.createElement)(va,(e=gt((e=>[fe(e[0]),e[1],e[2]]),mt([[new Di(0,[]),"Full-time",void 0],[new Di(1,[]),"Part-time",void 0],[new Di(2,[]),"Labour Hire",void 0],[new Di(4,[]),"Casual",void 0]])),{InitialValue:De((t=s.EmploymentBasisRadioButtonGroup.Value,null==t?void 0:fe(t))),Name:"EmploymentBasis",OnUpdate:e=>{a(new Wf(5,[e]))},ValueLabelPairs:e}))),Bt((()=>Yt(Gt(Cp()),Bt((()=>{let e;return Yt(Gt((0,r.createElement)("p",k(mt([["className","text-sm leading-5 font-normal text-gray-500"],(e="By clicking ‘Save and continue’ you declare that the information you have provided is true and correct.",["children","By clicking ‘Save and continue’ you declare that the information you have provided is true and correct."])])))),Bt((()=>{let e;return Gt((0,r.createElement)("div",k(mt([["className",Te(" ",["text-center"])],(e=[(0,r.createElement)("button",{className:Te(" ",["w-full","max-w-320","px-10","py-2","mt-8","mb-10","border","border-transparent","text-sm","font-medium","rounded-md","shadow-sm","text-white","bg-primary-base","hover:bg-primary-hover","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-primary-focus","disabled:bg-gray-100","disabled:text-gray-400","disabled:border-gray-300","disabled:cursor-not-allowed"]),type:"button",disabled:!Ep(s,c),onClick:e=>{Ep(s,c)&&d()},children:"Save and continue","data-testid":"continue-button"})],["children",yt.Children.toArray(Array.from(e))])]))))})))}))))))})))))))))))))))))))))})))})))))))))))))))))))))))))))})));return(0,r.createElement)("form",{children:yt.Children.toArray(Array.from(e))})}}}var Mp=n(172);function Ap(){return(Ap=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Rp=["context","children"];function Op(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}(e,Rp);return(0,Mp.Ob)(t,n)}function Pp(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=(0,Mp.h)(Op,Ap({},this._props,{context:e.detail.context}),function e(t,n){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var r=[],o={},i=0,s=t.attributes,a=t.childNodes;for(i=s.length;i--;)"slot"!==s[i].name&&(o[s[i].name]=s[i].value,o[Dp(s[i].name)]=s[i].value);for(i=a.length;i--;){var l=e(a[i],null),u=a[i].slot;u?o[u]=(0,Mp.h)(Lp,{name:u},l):r[i]=l}var c=n?(0,Mp.h)(Lp,null,r):r;return(0,Mp.h)(n||t.nodeName.toLowerCase(),o,c)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Mp.Qv:Mp.XX)(this._vdom,this._root)}function Dp(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function Np(e,t,n){if(this._vdom){var r={};r[e]=n=null==n?void 0:n,r[Dp(e)]=n,this._vdom=(0,Mp.Ob)(this._vdom,r),(0,Mp.XX)(this._vdom,this._root)}}function Fp(){(0,Mp.XX)(this._vdom=null,this._root)}function Lp(e,t){var n=this;return(0,Mp.h)("slot",Ap({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function Bp(e){let t;return(0,r.createElement)("div",k(mt([["className",Te(" ",["font-inter","max-w-560","mx-auto"])],(t=[(0,r.createElement)("style",{children:[bt]}),(0,r.createElement)(Ip,{accessToken:e.accessToken,backendUrl:e.backendUrl})],["children",yt.Children.toArray(Array.from(t))])])))}!function(e,t,n,r){function o(){var t=Reflect.construct(HTMLElement,[],o);return t._vdomComponent=e,t._root=r&&r.shadow?t.attachShadow({mode:r.mode||"open"}):t,t}(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=Pp,o.prototype.attributeChangedCallback=Np,o.prototype.disconnectedCallback=Fp,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach((function(e){Object.defineProperty(o.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})})),customElements.define("tax-component",o)}((e=>(0,r.createElement)(Bp,e)),0,void 0,{shadow:!0})},945:e=>{e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23fff%27 viewBox=%270 0 16 16%27%3E%3Ccircle cx=%278%27 cy=%278%27 r=%273%27/%3E%3C/svg%3E"},764:e=>{e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27%23fff%27 viewBox=%270 0 16 16%27%3E%3Cpath d=%27M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0%27/%3E%3C/svg%3E"},608:e=>{e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 16 16%27%3E%3Cpath stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27M4 8h8%27/%3E%3C/svg%3E"},354:e=>{e.exports="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 20 20%27%3E%3Cpath stroke=%27%236b7280%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%271.5%27 d=%27m6 8 4 4 4-4%27/%3E%3C/svg%3E"}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,exports:{}};return e[r](i,i.exports,n),i.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.b=document.baseURI||self.location.href,n(919),n(725)})();