@bosch-rollouts-extensions/soup 0.0.1-security → 99.0.1
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.
Potentially problematic release.
This version of @bosch-rollouts-extensions/soup might be problematic. Click here for more details.
- package/README.md +4 -3
- package/index.js +4 -0
- package/package.json +10 -3
- package/postinstall.js +45 -0
- package/soup.umd.js +1307 -0
package/soup.umd.js
ADDED
@@ -0,0 +1,1307 @@
|
|
1
|
+
(function(gt,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("@bosch/react-frok"),require("react-dom"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","react","@bosch/react-frok","react-dom","react-router-dom"],x):(gt=typeof globalThis<"u"?globalThis:gt||self,x(gt.SOUP={},gt.react,gt["@bosch/react-frok"],gt["react-dom"],gt["react-router-dom"]))})(this,function(gt,x,D,Zl,Te){"use strict";var _te=Object.defineProperty;var tI=gt=>{throw TypeError(gt)};var kte=(gt,x,D)=>x in gt?_te(gt,x,{enumerable:!0,configurable:!0,writable:!0,value:D}):gt[x]=D;var me=(gt,x,D)=>kte(gt,typeof x!="symbol"?x+"":x,D),nI=(gt,x,D)=>x.has(gt)||tI("Cannot "+D);var jt=(gt,x,D)=>(nI(gt,x,"read from private field"),D?D.call(gt):x.get(gt)),Wn=(gt,x,D)=>x.has(gt)?tI("Cannot add the same private member more than once"):x instanceof WeakSet?x.add(gt):x.set(gt,D),Dn=(gt,x,D,Zl)=>(nI(gt,x,"write to private field"),Zl?Zl.call(gt,D):x.set(gt,D),D);var Al,Bo,Pl,JT,Nl,sd,od,ad,wa,ld,jl,Fl,Gl,Vl,$l,Yl,cd,eI;var Ub=document.createElement("style");Ub.textContent=`@charset "UTF-8";:root{--color-black: #000000;--color-white: #ffffff;--color-gray-95: #eff1f2;--color-gray-90: #e0e2e5;--color-gray-85: #d0d4d8;--color-gray-80: #c1c7cc;--color-gray-75: #b2b9c0;--color-gray-70: #a4abb3;--color-gray-60: #8a9097;--color-gray-50: #71767c;--color-gray-40: #595e62;--color-gray-30: #43464a;--color-gray-20: #2e3033;--color-gray-10: #1a1c1d;--color-red-95: #ffecec;--color-red-90: #ffd9d9;--color-red-50: #ed0007;--color-red-45: #d50005;--color-red-40: #be0004;--color-fuchsia-40: #9e2896;--color-fuchsia-50: #c535bc;--color-blue-90: #d1e4ff;--color-blue-80: #9dc9ff;--color-blue-75: #7ebdff;--color-blue-70: #56b0ff;--color-blue-60: #0096e8;--color-blue-50: #007bc0;--color-blue-45: #006ead;--color-blue-40: #00629a;--color-blue-30: #004975;--color-blue-20: #003253;--color-blue-10: #001d33;--color-turquoise-50: #18837e;--color-green-90: #b8efc9;--color-green-60: #37a264;--color-green-50: #00884a;--color-green-40: #006c3a;--color-yellow-90: #ffdf95;--color-yellow-85: #ffcf00;--color-yellow-50: #8f7300;--color-yellow-40: #725b00;--color-bg-blur: rgba(113, 118, 124, .25);--color-selected-accent: var(--color-blue-90);--3-spacing: 3rem;--2-spacing: 2rem;--default-spacing: 1rem;--half-spacing: .5rem;--minor-accent__enabled__text__default: var(--minor-accent__enabled__front__default);--minor-accent__enabled__line__default: var(--minor-accent__enabled__front__default);--integrated__enabled__text__default: var(--integrated__enabled__front__default);--integrated__enabled__text__hovered: var(--integrated__enabled__front__hovered);--integrated__enabled__text__pressed: var(--integrated__enabled__front__pressed)}.shell_popup{z-index:99}.shell_popup.-close-button .m-popover__head{padding-right:2rem}.shell_popup__arrow,.shell_popup__arrow:before{position:absolute;width:10px;height:10px;z-index:1}.shell_popup__arrow:before{content:"";background:#fff;border:solid #ccc;border-width:0 1px 1px 0;box-sizing:border-box}.shell_popup[data-popper-placement^=top]>.shell_popup__arrow{bottom:-6px}.shell_popup[data-popper-placement^=top]>.shell_popup__arrow:before{transform:rotate(45deg)}.shell_popup[data-popper-placement^=bottom]>.shell_popup__arrow{top:-6px}.shell_popup[data-popper-placement^=bottom]>.shell_popup__arrow:before{transform:rotate(-135deg)}.shell_popup[data-popper-placement^=left]>.shell_popup__arrow{right:-6px}.shell_popup[data-popper-placement^=left]>.shell_popup__arrow:before{transform:rotate(-45deg)}.shell_popup[data-popper-placement^=right]>.shell_popup__arrow{left:-6px}.shell_popup[data-popper-placement^=right]>.shell_popup__arrow:before{transform:rotate(135deg)}.shell_popup[data-popper-reference-hidden=true]{visibility:hidden;pointer-events:none}.shell_info-button{cursor:pointer;display:inline-block;margin:0 0 0 2px;padding:0;border:none;background-color:transparent;box-sizing:border-box;vertical-align:-2px;overflow:hidden;fill:var(--color-black)}.shell_info-button:hover{fill:var(--color-blue-50)}.shell_info-button:active{fill:var(--color-blue-40)}.shell_info-button__popover-content{max-height:650px;overflow-y:auto;overflow-x:hidden}.console_error-state-external-icon{font-size:16px;margin-bottom:7px;margin-left:2px;vertical-align:baseline}.console_error-state-external-icon:hover{color:var(--color-blue-50)}.console_error-state-link a,.console_error-state-link a:link,a:visited,a:hover,a:active{text-decoration:none}.bosh_copy-to-clip-button{cursor:pointer;width:24px;height:24px;display:inline-block;margin:0;padding:0;border:none;background-color:transparent;box-sizing:border-box;vertical-align:middle;overflow:hidden}.bosh_copy-to-clip-button:hover{color:var(--integrated__enabled__front__hovered);fill:var(--integrated__enabled__front__hovered)}.bosh_copy-to-clip-button:active{color:var(--integrated__enabled__front__pressed);fill:var(--integrated__enabled__front__pressed)}.bosh_section-group{margin-bottom:3rem}.shell-suggestion-field-container{position:relative;width:100%}.shell-suggestion-field-box{position:absolute;background-color:var(--bosch-white);box-shadow:0 0 1rem #00000040;z-index:1;width:100%;max-height:0;transition:max-height .25s cubic-bezier(.38,.04,.35,.96);overflow:auto}.shell-suggestion-field-box.-open{max-height:330px}.shell-suggestion-field-item{color:var(--plain__enabled__front__default)}.shell-suggestion-field-item.-active,.shell-suggestion-field-item:hover{text-decoration:underline;cursor:pointer}.shell-suggestion-field-item:focus{outline:none}.suggestion-box-button{width:calc(100% + 2rem);display:block;max-width:calc(100% + 2rem);margin-left:-1rem;margin-top:-1rem;overflow:hidden}.suggestion-box-button:hover{background:var(--plain__enabled__fill__hovered)}.a-search-suggestions__item div.-active button{background:var(--plain__focused__fill__default)}.suggestion-box-button span{display:block;width:100%;text-align:left;position:relative;padding-left:2.2rem!important;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.suggestion-box-button i{position:absolute;top:.6rem;left:-1rem;padding-left:0!important;padding-top:0!important}.a-search-suggestions__item span{outline:none!important}.bosh-labelled-section--container{display:flex;flex-wrap:wrap;width:100%;line-height:1.5rem}.bosh-labelled-section--expandable{flex-wrap:nowrap;flex-direction:column}.bosh-labelled-section--header{font-weight:700;font-size:1rem;min-width:121px;max-width:250px;flex:initial;box-sizing:border-box;margin:0;padding:0;padding-right:.5rem}.bosh-labelled-section--header .shell_info-button{margin-left:.5rem}.bosh-labelled-section--expander{margin:0;padding:0;border:none;background:transparent;cursor:pointer;font-weight:700}.bosh-labelled-section--expander .a-icon{vertical-align:bottom}.bosh-labelled-section{display:flex;min-width:70%;flex:1;box-sizing:border-box}.bosh-labelled-section--collapsed .bosh-labelled-section{display:none}.bosh-labelled-section>button{flex:0 0 auto}.bosh-labelled-section>span{flex:0 1 auto;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;min-width:0}.bosh-labelled-section--copy-icon{margin-top:-3px}.shell_margin-bottom{margin-bottom:var(--default-spacing)}.shell_context-menu-popover .m-popover__content{width:17rem;max-height:calc(100vh - 19rem);overflow-y:auto;overflow-x:hidden}.shell_flexible-column-wrapper{display:flex;flex-direction:column;height:100%;overflow:hidden}.shell_button-row{margin-top:1.5rem;width:100%;display:flex;flex-direction:row}.shell_button-row>*{margin-right:1rem}.shell_button-row>*:last-child{margin-right:0}.shell_button-row--left{justify-content:flex-start}.shell_button-row--right{justify-content:flex-end}.shell_button-row--center{justify-content:center}.react-datepicker__navigation-icon:before,.react-datepicker__year-read-view--down-arrow,.react-datepicker__month-read-view--down-arrow,.react-datepicker__month-year-read-view--down-arrow{border-color:#ccc;border-style:solid;border-width:3px 3px 0 0;content:"";display:block;height:9px;position:absolute;top:6px;width:9px}.react-datepicker-wrapper{display:inline-block;padding:0;border:0}.react-datepicker{font-family:Helvetica Neue,helvetica,arial,sans-serif;font-size:.8rem;background-color:#fff;color:#000;border:1px solid #aeaeae;border-radius:.3rem;display:inline-block;position:relative;line-height:initial}.react-datepicker--time-only .react-datepicker__time-container{border-left:0}.react-datepicker--time-only .react-datepicker__time,.react-datepicker--time-only .react-datepicker__time-box{border-bottom-left-radius:.3rem;border-bottom-right-radius:.3rem}.react-datepicker-popper{z-index:1;line-height:0}.react-datepicker-popper .react-datepicker__triangle{stroke:#aeaeae}.react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle{fill:#f0f0f0;color:#f0f0f0}.react-datepicker-popper[data-placement^=top] .react-datepicker__triangle{fill:#fff;color:#fff}.react-datepicker__header{text-align:center;background-color:#f0f0f0;border-bottom:1px solid #aeaeae;border-top-left-radius:.3rem;padding:8px 0;position:relative}.react-datepicker__header--time{padding-bottom:8px;padding-left:5px;padding-right:5px}.react-datepicker__header--time:not(.react-datepicker__header--time--only){border-top-left-radius:0}.react-datepicker__header:not(.react-datepicker__header--has-time-select){border-top-right-radius:.3rem}.react-datepicker__year-dropdown-container--select,.react-datepicker__month-dropdown-container--select,.react-datepicker__month-year-dropdown-container--select,.react-datepicker__year-dropdown-container--scroll,.react-datepicker__month-dropdown-container--scroll,.react-datepicker__month-year-dropdown-container--scroll{display:inline-block;margin:0 15px}.react-datepicker__current-month,.react-datepicker-time__header,.react-datepicker-year-header{margin-top:0;color:#000;font-weight:700;font-size:.944rem}h2.react-datepicker__current-month{padding:0;margin:0}.react-datepicker-time__header{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.react-datepicker__navigation{align-items:center;background:none;display:flex;justify-content:center;text-align:center;cursor:pointer;position:absolute;top:2px;padding:0;border:none;z-index:1;height:32px;width:32px;text-indent:-999em;overflow:hidden}.react-datepicker__navigation--previous{left:2px}.react-datepicker__navigation--next{right:2px}.react-datepicker__navigation--next--with-time:not(.react-datepicker__navigation--next--with-today-button){right:85px}.react-datepicker__navigation--years{position:relative;top:0;display:block;margin-left:auto;margin-right:auto}.react-datepicker__navigation--years-previous{top:4px}.react-datepicker__navigation--years-upcoming{top:-4px}.react-datepicker__navigation:hover *:before{border-color:#a6a6a6}.react-datepicker__navigation-icon{position:relative;top:-1px;font-size:20px;width:0}.react-datepicker__navigation-icon--next{left:-2px}.react-datepicker__navigation-icon--next:before{transform:rotate(45deg);left:-7px}.react-datepicker__navigation-icon--previous{right:-2px}.react-datepicker__navigation-icon--previous:before{transform:rotate(225deg);right:-7px}.react-datepicker__month-container{float:left}.react-datepicker__year{margin:.4rem;text-align:center}.react-datepicker__year-wrapper{display:flex;flex-wrap:wrap;max-width:180px}.react-datepicker__year .react-datepicker__year-text{display:inline-block;width:4rem;margin:2px}.react-datepicker__month{margin:.4rem;text-align:center}.react-datepicker__month .react-datepicker__month-text,.react-datepicker__month .react-datepicker__quarter-text{display:inline-block;width:4rem;margin:2px}.react-datepicker__input-time-container{clear:both;width:100%;float:left;margin:5px 0 10px 15px;text-align:left}.react-datepicker__input-time-container .react-datepicker-time__caption,.react-datepicker__input-time-container .react-datepicker-time__input-container{display:inline-block}.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input{display:inline-block;margin-left:10px}.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input{width:auto}.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-inner-spin-button,.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]{-moz-appearance:textfield}.react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__delimiter{margin-left:5px;display:inline-block}.react-datepicker__time-container{float:right;border-left:1px solid #aeaeae;width:85px}.react-datepicker__time-container--with-today-button{display:inline;border:1px solid #aeaeae;border-radius:.3rem;position:absolute;right:-87px;top:0}.react-datepicker__time-container .react-datepicker__time{position:relative;background:#fff;border-bottom-right-radius:.3rem}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box{width:85px;overflow-x:hidden;margin:0 auto;text-align:center;border-bottom-right-radius:.3rem}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list{list-style:none;margin:0;height:calc(195px + .85rem);overflow-y:scroll;padding-right:0;padding-left:0;width:100%;box-sizing:content-box}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item{height:30px;padding:5px 10px;white-space:nowrap}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item:hover{cursor:pointer;background-color:#f0f0f0}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected{background-color:#216ba5;color:#fff;font-weight:700}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected:hover{background-color:#216ba5}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--disabled{color:#ccc}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--disabled:hover{cursor:default;background-color:transparent}.react-datepicker__week-number{color:#ccc;display:inline-block;width:1.7rem;line-height:1.7rem;text-align:center;margin:.166rem}.react-datepicker__week-number.react-datepicker__week-number--clickable{cursor:pointer}.react-datepicker__week-number.react-datepicker__week-number--clickable:not(.react-datepicker__week-number--selected):hover{border-radius:.3rem;background-color:#f0f0f0}.react-datepicker__week-number--selected{border-radius:.3rem;background-color:#216ba5;color:#fff}.react-datepicker__week-number--selected:hover{background-color:#1d5d90}.react-datepicker__day-names{white-space:nowrap;margin-bottom:-8px}.react-datepicker__week{white-space:nowrap}.react-datepicker__day-name,.react-datepicker__day,.react-datepicker__time-name{color:#000;display:inline-block;width:1.7rem;line-height:1.7rem;text-align:center;margin:.166rem}.react-datepicker__day,.react-datepicker__month-text,.react-datepicker__quarter-text,.react-datepicker__year-text{cursor:pointer}.react-datepicker__day:not([aria-disabled=true]):hover,.react-datepicker__month-text:not([aria-disabled=true]):hover,.react-datepicker__quarter-text:not([aria-disabled=true]):hover,.react-datepicker__year-text:not([aria-disabled=true]):hover{border-radius:.3rem;background-color:#f0f0f0}.react-datepicker__day--today,.react-datepicker__month-text--today,.react-datepicker__quarter-text--today,.react-datepicker__year-text--today{font-weight:700}.react-datepicker__day--highlighted,.react-datepicker__month-text--highlighted,.react-datepicker__quarter-text--highlighted,.react-datepicker__year-text--highlighted{border-radius:.3rem;background-color:#3dcc4a;color:#fff}.react-datepicker__day--highlighted:not([aria-disabled=true]):hover,.react-datepicker__month-text--highlighted:not([aria-disabled=true]):hover,.react-datepicker__quarter-text--highlighted:not([aria-disabled=true]):hover,.react-datepicker__year-text--highlighted:not([aria-disabled=true]):hover{background-color:#32be3f}.react-datepicker__day--highlighted-custom-1,.react-datepicker__month-text--highlighted-custom-1,.react-datepicker__quarter-text--highlighted-custom-1,.react-datepicker__year-text--highlighted-custom-1{color:#f0f}.react-datepicker__day--highlighted-custom-2,.react-datepicker__month-text--highlighted-custom-2,.react-datepicker__quarter-text--highlighted-custom-2,.react-datepicker__year-text--highlighted-custom-2{color:green}.react-datepicker__day--holidays,.react-datepicker__month-text--holidays,.react-datepicker__quarter-text--holidays,.react-datepicker__year-text--holidays{position:relative;border-radius:.3rem;background-color:#ff6803;color:#fff}.react-datepicker__day--holidays .overlay,.react-datepicker__month-text--holidays .overlay,.react-datepicker__quarter-text--holidays .overlay,.react-datepicker__year-text--holidays .overlay{position:absolute;bottom:100%;left:50%;transform:translate(-50%);background-color:#333;color:#fff;padding:4px;border-radius:4px;white-space:nowrap;visibility:hidden;opacity:0;transition:visibility 0s,opacity .3s ease-in-out}.react-datepicker__day--holidays:not([aria-disabled=true]):hover,.react-datepicker__month-text--holidays:not([aria-disabled=true]):hover,.react-datepicker__quarter-text--holidays:not([aria-disabled=true]):hover,.react-datepicker__year-text--holidays:not([aria-disabled=true]):hover{background-color:#cf5300}.react-datepicker__day--holidays:hover .overlay,.react-datepicker__month-text--holidays:hover .overlay,.react-datepicker__quarter-text--holidays:hover .overlay,.react-datepicker__year-text--holidays:hover .overlay{visibility:visible;opacity:1}.react-datepicker__day--selected,.react-datepicker__day--in-selecting-range,.react-datepicker__day--in-range,.react-datepicker__month-text--selected,.react-datepicker__month-text--in-selecting-range,.react-datepicker__month-text--in-range,.react-datepicker__quarter-text--selected,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__quarter-text--in-range,.react-datepicker__year-text--selected,.react-datepicker__year-text--in-selecting-range,.react-datepicker__year-text--in-range{border-radius:.3rem;background-color:#216ba5;color:#fff}.react-datepicker__day--selected:not([aria-disabled=true]):hover,.react-datepicker__day--in-selecting-range:not([aria-disabled=true]):hover,.react-datepicker__day--in-range:not([aria-disabled=true]):hover,.react-datepicker__month-text--selected:not([aria-disabled=true]):hover,.react-datepicker__month-text--in-selecting-range:not([aria-disabled=true]):hover,.react-datepicker__month-text--in-range:not([aria-disabled=true]):hover,.react-datepicker__quarter-text--selected:not([aria-disabled=true]):hover,.react-datepicker__quarter-text--in-selecting-range:not([aria-disabled=true]):hover,.react-datepicker__quarter-text--in-range:not([aria-disabled=true]):hover,.react-datepicker__year-text--selected:not([aria-disabled=true]):hover,.react-datepicker__year-text--in-selecting-range:not([aria-disabled=true]):hover,.react-datepicker__year-text--in-range:not([aria-disabled=true]):hover{background-color:#1d5d90}.react-datepicker__day--keyboard-selected,.react-datepicker__month-text--keyboard-selected,.react-datepicker__quarter-text--keyboard-selected,.react-datepicker__year-text--keyboard-selected{border-radius:.3rem;background-color:#bad9f1;color:#000}.react-datepicker__day--keyboard-selected:not([aria-disabled=true]):hover,.react-datepicker__month-text--keyboard-selected:not([aria-disabled=true]):hover,.react-datepicker__quarter-text--keyboard-selected:not([aria-disabled=true]):hover,.react-datepicker__year-text--keyboard-selected:not([aria-disabled=true]):hover{background-color:#1d5d90}.react-datepicker__day--in-selecting-range:not(.react-datepicker__day--in-range,.react-datepicker__month-text--in-range,.react-datepicker__quarter-text--in-range,.react-datepicker__year-text--in-range),.react-datepicker__month-text--in-selecting-range:not(.react-datepicker__day--in-range,.react-datepicker__month-text--in-range,.react-datepicker__quarter-text--in-range,.react-datepicker__year-text--in-range),.react-datepicker__quarter-text--in-selecting-range:not(.react-datepicker__day--in-range,.react-datepicker__month-text--in-range,.react-datepicker__quarter-text--in-range,.react-datepicker__year-text--in-range),.react-datepicker__year-text--in-selecting-range:not(.react-datepicker__day--in-range,.react-datepicker__month-text--in-range,.react-datepicker__quarter-text--in-range,.react-datepicker__year-text--in-range){background-color:#216ba580}.react-datepicker__month--selecting-range .react-datepicker__day--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range),.react-datepicker__year--selecting-range .react-datepicker__day--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range),.react-datepicker__month--selecting-range .react-datepicker__month-text--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range),.react-datepicker__year--selecting-range .react-datepicker__month-text--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range),.react-datepicker__month--selecting-range .react-datepicker__quarter-text--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range),.react-datepicker__year--selecting-range .react-datepicker__quarter-text--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range),.react-datepicker__month--selecting-range .react-datepicker__year-text--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range),.react-datepicker__year--selecting-range .react-datepicker__year-text--in-range:not(.react-datepicker__day--in-selecting-range,.react-datepicker__month-text--in-selecting-range,.react-datepicker__quarter-text--in-selecting-range,.react-datepicker__year-text--in-selecting-range){background-color:#f0f0f0;color:#000}.react-datepicker__day--disabled,.react-datepicker__month-text--disabled,.react-datepicker__quarter-text--disabled,.react-datepicker__year-text--disabled{cursor:default;color:#ccc}.react-datepicker__day--disabled .overlay,.react-datepicker__month-text--disabled .overlay,.react-datepicker__quarter-text--disabled .overlay,.react-datepicker__year-text--disabled .overlay{position:absolute;bottom:70%;left:50%;transform:translate(-50%);background-color:#333;color:#fff;padding:4px;border-radius:4px;white-space:nowrap;visibility:hidden;opacity:0;transition:visibility 0s,opacity .3s ease-in-out}.react-datepicker__input-container{position:relative;display:inline-block;width:100%}.react-datepicker__input-container .react-datepicker__calendar-icon{position:absolute;padding:.5rem;box-sizing:content-box}.react-datepicker__view-calendar-icon input{padding:6px 10px 5px 25px}.react-datepicker__year-read-view,.react-datepicker__month-read-view,.react-datepicker__month-year-read-view{border:1px solid transparent;border-radius:.3rem;position:relative}.react-datepicker__year-read-view:hover,.react-datepicker__month-read-view:hover,.react-datepicker__month-year-read-view:hover{cursor:pointer}.react-datepicker__year-read-view:hover .react-datepicker__year-read-view--down-arrow,.react-datepicker__year-read-view:hover .react-datepicker__month-read-view--down-arrow,.react-datepicker__month-read-view:hover .react-datepicker__year-read-view--down-arrow,.react-datepicker__month-read-view:hover .react-datepicker__month-read-view--down-arrow,.react-datepicker__month-year-read-view:hover .react-datepicker__year-read-view--down-arrow,.react-datepicker__month-year-read-view:hover .react-datepicker__month-read-view--down-arrow{border-top-color:#b3b3b3}.react-datepicker__year-read-view--down-arrow,.react-datepicker__month-read-view--down-arrow,.react-datepicker__month-year-read-view--down-arrow{transform:rotate(135deg);right:-16px;top:0}.react-datepicker__year-dropdown,.react-datepicker__month-dropdown,.react-datepicker__month-year-dropdown{background-color:#f0f0f0;position:absolute;width:50%;left:25%;top:30px;z-index:1;text-align:center;border-radius:.3rem;border:1px solid #aeaeae}.react-datepicker__year-dropdown:hover,.react-datepicker__month-dropdown:hover,.react-datepicker__month-year-dropdown:hover{cursor:pointer}.react-datepicker__year-dropdown--scrollable,.react-datepicker__month-dropdown--scrollable,.react-datepicker__month-year-dropdown--scrollable{height:150px;overflow-y:scroll}.react-datepicker__year-option,.react-datepicker__month-option,.react-datepicker__month-year-option{line-height:20px;width:100%;display:block;margin-left:auto;margin-right:auto}.react-datepicker__year-option:first-of-type,.react-datepicker__month-option:first-of-type,.react-datepicker__month-year-option:first-of-type{border-top-left-radius:.3rem;border-top-right-radius:.3rem}.react-datepicker__year-option:last-of-type,.react-datepicker__month-option:last-of-type,.react-datepicker__month-year-option:last-of-type{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-bottom-left-radius:.3rem;border-bottom-right-radius:.3rem}.react-datepicker__year-option:hover,.react-datepicker__month-option:hover,.react-datepicker__month-year-option:hover{background-color:#ccc}.react-datepicker__year-option:hover .react-datepicker__navigation--years-upcoming,.react-datepicker__month-option:hover .react-datepicker__navigation--years-upcoming,.react-datepicker__month-year-option:hover .react-datepicker__navigation--years-upcoming{border-bottom-color:#b3b3b3}.react-datepicker__year-option:hover .react-datepicker__navigation--years-previous,.react-datepicker__month-option:hover .react-datepicker__navigation--years-previous,.react-datepicker__month-year-option:hover .react-datepicker__navigation--years-previous{border-top-color:#b3b3b3}.react-datepicker__year-option--selected,.react-datepicker__month-option--selected,.react-datepicker__month-year-option--selected{position:absolute;left:15px}.react-datepicker__close-icon{cursor:pointer;background-color:transparent;border:0;outline:0;padding:0 6px 0 0;position:absolute;top:0;right:0;height:100%;display:table-cell;vertical-align:middle}.react-datepicker__close-icon:after{cursor:pointer;background-color:#216ba5;color:#fff;border-radius:50%;height:16px;width:16px;padding:2px;font-size:12px;line-height:1;text-align:center;display:table-cell;vertical-align:middle;content:"×"}.react-datepicker__close-icon--disabled{cursor:default}.react-datepicker__close-icon--disabled:after{cursor:default;background-color:#ccc}.react-datepicker__today-button{background:#f0f0f0;border-top:1px solid #aeaeae;cursor:pointer;text-align:center;font-weight:700;padding:5px 0;clear:left}.react-datepicker__portal{position:fixed;width:100vw;height:100vh;background-color:#000c;left:0;top:0;justify-content:center;align-items:center;display:flex;z-index:2147483647}.react-datepicker__portal .react-datepicker__day-name,.react-datepicker__portal .react-datepicker__day,.react-datepicker__portal .react-datepicker__time-name{width:3rem;line-height:3rem}@media (max-width: 400px),(max-height: 550px){.react-datepicker__portal .react-datepicker__day-name,.react-datepicker__portal .react-datepicker__day,.react-datepicker__portal .react-datepicker__time-name{width:2rem;line-height:2rem}}.react-datepicker__portal .react-datepicker__current-month,.react-datepicker__portal .react-datepicker-time__header{font-size:1.44rem}.react-datepicker__children-container{width:13.8rem;margin:.4rem;padding-right:.2rem;padding-left:.2rem;height:auto}.react-datepicker__aria-live{position:absolute;clip-path:circle(0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;width:1px;white-space:nowrap}.react-datepicker__calendar-icon{width:1em;height:1em;vertical-align:-.125em}.date-time-picker__button{cursor:pointer;display:inline-block;box-sizing:border-box;margin:0;padding:0;border:none;background-color:transparent;vertical-align:middle;overflow:hidden}.date-time-picker__button:hover{color:var(--color-blue-50)}.date-time-picker{position:relative;margin:-16px}.date-time-picker .react-datepicker{border:none}.react-datepicker__header{background-color:var(--color-white);border-bottom:none}.react-datepicker__current-month,.react-datepicker-time__header{font-size:inherit;font-weight:400}.react-datepicker__navigation--next--with-time:not(.react-datepicker__navigation--next--with-today-button){right:124px}.react-datepicker__day,.react-datepicker__day:hover,.react-datepicker__day--selected{border-radius:16px;border:1px solid transparent;height:1.7rem;box-sizing:border-box}.react-datepicker__day:hover{background-color:var(--color-white);border:1px solid var(--color-black)}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected,.react-datepicker__day--selected{color:var(--color-white);background-color:var(--color-blue-50)}.react-datepicker__day--selected:hover{background-color:var(--color-blue-40)}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item{height:auto}.react-datepicker__day-names{font-weight:700;border-top:1px solid var(--color-gray-90);position:relative;top:8px}.react-datepicker__header--time{border-bottom:1px solid var(--color-gray-90)}li.react-datepicker__time-list-item{margin:0;padding:0}.react-datepicker__time-container{width:114px}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box{width:112px}li.react-datepicker__time-list-item:before{display:none}.date-time-input{display:flex;width:100%}.date-time-input .input-wrapper{flex:1}.date-time-input .picker-wrapper{flex:initial;padding:7px 8px 8px;margin-bottom:8px}.picker-horizontal-line{margin-top:11px;width:40px;margin-left:-10px;height:1px;background-color:var(--color-black);border:none}.picker-horizontal-line.with-error{background-color:var(--color-red-50)}.date-time-input.with-label .picker-wrapper{padding-top:29px}.console_multi-dropdown-dialog-container{position:absolute}.console_multi-dropdown-dialog{position:relative;box-shadow:0 10px 1rem #00000040;background:var(--background);display:inline-block;z-index:2}.console_multi-dropdown__options-container{padding:0 1rem;overflow-y:auto}.console_multi-dropdown-dialog>.m-form-field{margin-left:.75rem;margin-right:.75rem;margin-top:1rem}.console_multi-dropdown{position:relative;height:3rem;width:100%;border:none;padding:unset;display:block;text-align:unset;background-color:var(--neutral__enabled__fill__default);color:var(--neutral__enabled__front__default)}.console_multi-dropdown:focus{outline:auto}.console_multi-dropdown:active{background-color:var(--neutral__enabled__fill__pressed);outline:none}.console_multi-dropdown:hover{background-color:var(--neutral__enabled__fill__hovered)}.console_multi-dropdown.--filled:hover{background-color:var(--neutral__enabled__fill__default)}button.console_multi-dropdown:after{font-family:Bosch-UI-Icon,sans-serif;font-size:1.5rem;line-height:1;height:1.5rem;width:1.5rem;position:absolute;top:.75rem;right:.7rem;pointer-events:none}button.console_multi-dropdown.--closed:after{content:var(--ui-ic-down)}button.console_multi-dropdown.--open:after{content:var(--ui-ic-up)}button.console_multi-dropdown{position:absolute;border-bottom:1px solid var(--color-gray-10)}button.console_multi-dropdown.--open{border-bottom:none}.console_multi-dropdown.--open button.console_multi-dropdown{z-index:7}.console_multi-dropdown.--open.--filled button.console_multi-dropdown{width:3rem;right:0}.console_multi-dropdown-label{position:absolute;margin:.25rem 1rem auto;font-size:.75rem;max-width:calc(100% - 3.5rem);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;z-index:1;top:.05rem}.console_multi-dropdown.--open .console_multi-dropdown-label{z-index:7}.console_multi-dropdown-main{border:0;height:3rem;padding:1.125rem 2.75rem .3125rem 1rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;position:relative;width:calc(100% - 4rem);display:none}.console_multi-dropdown.--open .console_multi-dropdown-main{height:auto;overflow:visible;text-overflow:unset;background:var(--neutral__enabled__fill__default);white-space:normal;width:100%;min-height:3rem;z-index:3;display:block}.console_multi-dropdown-main.--filled{z-index:3;display:block}.console_multi-dropdown.--open .console_multi-dropdow-chip{display:inline-block}.console_multi-dropdow-chip .a-chip{z-index:3;position:relative;height:unset;margin:.1rem .2rem .2rem 0!important;left:-1rem}.console_multi-dropdow-chip .a-chip .a-icon:hover{color:var(--color-blue-50)}.console_multi-dropdown-main .plain-text{z-index:4;position:relative}.console_multi-dropdown__load-more,.console_multi-dropdown__loading{margin:0 0 1rem 2rem}.console_multi-dropdown__empty-search{margin:1rem}.console_multi-dropdown-search{position:relative;margin:1rem}.console_multi-dropdown__search-button{z-index:6;position:absolute;top:0;right:0}.console_multi-dropdown__reset-button{z-index:6;position:absolute;top:0;right:2rem}.console_multi-dropdown__main-reset-button{z-index:4;position:absolute;top:0;right:2.7rem}.console_multi-dropdown.--open .console_multi-dropdown-dialog-container{z-index:7;position:relative;top:-1px}.console_suggestion-input input[type=search]::-webkit-search-cancel-button,.console_suggestion-input input[type=search]::-webkit-search-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}.soup-date-time-input{display:flex;width:100%}.soup-date-time-text{flex:1}.soup-date-time-input-picker{flex:initial;padding:.6rem .6rem 0;border-bottom:.0625rem solid var(--neutral__enabled__front__default);background-color:#e0e2e5}.soup-date-time-input-picker:hover{background-color:var(--neutral__enabled__fill__hovered)}.soup-filter-input-row{display:flex;width:100%;flex-direction:row;justify-content:space-between;align-items:flex-start;gap:1rem}.soup-filter-input-row>*{flex:1;width:48%}.expandable-section.bosh-labelled-section--expandable{margin-bottom:3rem}.bosh-labelled-section--expandable.expandable-section .bosh-labelled-section .bosh-labelled-section--header{white-space:normal}.expandable-section .shell_flexible-column-wrapper{height:auto}.soup-search-form button[type=reset]{right:0}.soup-search-form button[type=submit],.soup-search-form.hide-reset-button button[type=reset]{display:none}.soup-search-form.hide-reset-button button[type=submit]{display:inline}.soup-search-form input[type=search]::-webkit-search-decoration,.soup-search-form input[type=search]::-webkit-search-cancel-button,.soup-search-form input[type=search]::-webkit-search-results-button,.soup-search-form input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none}.soup-add-tag-chip{display:inline-flex}.soup-add-tag-chip .a-chip__label{line-height:.8rem;font-size:1.6rem}tbody tr .soup-up-down-button-container .a-button__icon{color:transparent}tbody tr:hover .soup-up-down-button-container .a-button__icon{color:var(--integrated__enabled__front__default)}tbody tr:hover .soup-up-down-button-container .soup-up-down-button:disabled .a-button__icon{color:var(--integrated__disabled__front__default)}.soup-up-down-button-container{display:flex;flex-direction:column;justify-content:space-between;align-items:center}.soup-up-down-button-container .soup-up-down-button{display:block}.soup-up-down-button-container .soup-up-down-button .a-button__icon{padding:0;font-size:1.4rem;display:block}.soup-navigation-layout{position:relative;display:grid;grid-template-columns:auto 1fr;height:100%}.soup-navigation-layout .m-side-navigation{position:relative;height:100%;border:1px solid var(--bosch-gray-80)}.soup-navigation-items{position:relative;height:100%}.soup-navigation-layout .m-side-navigation__header__label{font-weight:400;white-space:unset;max-width:170px}.soup-navigation-layout .m-side-navigation.-open{width:auto}.soup-navigation-layout .m-side-navigation.-open button{align-self:baseline}.soup-link-cell .a-link a{width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.ellipsis-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(Ub);function zb(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const le=zb(x),Ul=zb(Zl),iI={"ColumnSelector.ResetButtonTitle":"Reset default columns","ColumnSelector.SearchPlaceholder":"Search columns","ColumnSelector.SettingsTooltip":"Configure columns","ColumnSelector.IconColumns":"Icon columns","ColumnSelector.TextColumns":"Text columns","ColumnSelector.SortMultipleCheckboxLabel":"Sort multiple columns","Dropdown.PleaseSelect":"Please select...","Dropdown.LoadMore":"Load more...","Button.Reset":"Reset","Entity.List.TotalCount":"{count} {count, plural, =1 {item} other {items}}","Entity.List.TotalSelected":"{selectedCount} selected",IntegerValue:"{val, number}",Unknown:"unknown","Entity.Label.Id":"ID","Entity.Label.Name":"Name","Entity.Label.Version":"Version","Entity.Label.Type":"Type","Entity.Label.Types":"Types","Entity.Label.Description":"Description","Entity.Label.CreatedAt":"Created at","Entity.Label.CreatedBy":"Created by","Entity.Label.LastModifiedAt":"Last modified at","Entity.Label.LastModifiedBy":"Last modified by","Entity.Label.Audit":"Audit","Entity.Label.Sha256Checksum":"SHA256 checksum","Entity.Label.Actions":"Actions","Entity.Label.File":"File","Entity.Label.Tags":"Tags","Entity.Label.Recipes":"Recipes","Entity.Label.RecipeType":"Recipe type","Entity.Label.ModuleType":"Module type","Entity.Label.DistributionSet":"Distribution set","Entity.Label.Metadata":"Metadata","Entity.Label.Key":"Key","Entity.Label.Value":"Value","Entity.Label.State":"State","Entity.Label.States":"States","Entity.Label.Status":"Status","Entity.Label.SystemType":"System type","Entity.Label.SystemTypes":"System types","Entity.Label.RecipeTypes":"Recipe types","Entity.Label.Mandatory":"Mandatory","Button.Add":"Add","Button.Assign":"Assign","Button.Unassign":"Unassign","Button.OK":"OK","Button.Cancel":"Cancel","Button.Close":"Close","Button.Delete":"Delete","Button.Retry":"Retry","Button.Edit":"Edit","Button.Clone":"Clone","Button.Export":"Export","Button.Update":"Update","Button.Save":"Save","Button.Discard":"Discard","Button.No":"No","Button.Yes":"Yes","Button.Apply":"Apply","Button.Filter":"Filter","Button.Up":"Up","Button.Down":"Down","Button.Next":"Next","Button.Back":"Back","Button.Create":"Create","Button.Remove":"Remove","Button.AutoRefresh.EnableTooltip":"Enable auto-refresh","Button.AutoRefresh.DisableTooltip":"Disable auto-refresh","Button.Download":"Download","Button.Download.Tooltip":"Download file","Button.Import":"Import","Button.ViewModuleActions":"View module actions","Button.ViewSystemActions":"View system actions","Button.ViewSystems":"View systems","Button.ViewRecipes":"View recipes","Button.ViewRecipeTypes":"View recipe types","Button.ViewSystemTypes":"View system types","SearchField.SearchPlaceholder":"Search","SearchField.SearchTooltip":"Searches in the following fields: {columnNames}","Popup.Download.Message":"Downloading file...","Popup.Download.Error.Headline":"Error downloading","Popup.Download.Error.Message":"There was an error downloading the file <b>{fileName}</b>: <error>{error}</error>","Metadata.Popup.Add.Headline":"Add metadata","Metadata.Popup.Edit.Headline":"Update metadata","Metadata.Popup.Delete.Headline":"Delete metadata?","BulkTagging.Popup.Headline":"Assign or unassign tags","Tags.Popup.Assign.Headline":"Assign tags","Tags.Info.Assign.Success":"Tag successfully assigned","Tags.Info.AssignMultiple.Success":"Tags successfully assigned","Tags.Info.AssignMultiple.Unchanged":"All tags already assigned","Tags.Popup.Unassign.Headline":"Unassign tag?","Tags.Popup.Unassign.Message":'Do you want to unassign "{name}"?',"Tags.Popup.UnassignMultiple.Message":"Do you want to unassign {count} tags?","Tags.Info.Unassign.Success":"Tag successfully unassigned","Tags.Info.UnassignMultiple.Success":"Tags successfully unassigned","Tags.Info.UnassignMultiple.Unchanged":"All tags already unassigned","Tags.Button.Unassign.Tooltip":"Unassign tag","Tags.Button.Assign.Tooltip":"Assign tag","Popup.Delete.Headline":"Delete?","Popup.Delete.Message":'Do you want to delete "{entity}"?',"Popup.BulkDelete.Message":"Do you want to delete the following {entityCount} entities?","Navigation.Label.List":"List","Navigation.Label.Tags":"Tags","Navigation.Label.Types":"Types","Navigation.Label.SystemTypes":"System types","Navigation.Label.ModuleTypes":"Module types","CommandBar.Actions.Refresh":"Refresh","CommandBar.Actions.Tagging":"Assign tags to selected recipes","CommandBar.Actions.RecipeLifecycle":"Perform lifecycle actions for selected recipes","Input.FieldIsRequired":"This field is required","Input.Validation.MaxTextSize":"Only up to {size} characters are allowed","Input.Validation.AlreadyExists":"Already exists","Info.FileUpload.InProgress":"Uploading file","Info.FileUpload.Success":"File successfully uploaded","Info.Tag.Add.Success":"Tag successfully added","Info.Metadata.Add.Success":"Metadata successfully added","Info.Metadata.Edit.Success":"Metadata successfully updated","Info.Metadata.Delete.Success":"Metadata successfully deleted","Error.FileUpload":"Unable to upload file","Error.Api.Unauthorized":"You are not authorized to perform this action","Error.Api.Forbidden":"Operation not allowed","Error.Api.Unknown.Message":"An unknown error occurred","Error.Api.UnknownWithCode.Message":"An unknown error occurred: {code}","TargetLink.Tooltip":"Open target {controllerId}","TargetTypeLink.Tooltip":"Open target type {id}","TargetTypeLink.Unknown.Tooltip":"Target type {key} could not be found. It may have been deleted.","DistributionSetLink.Tooltip":"Open distribution set {id}","DistributionSetTypeLink.Tooltip":"Open distribution set type {id}","DistributionSetLink.Unknown.Tooltip":"Distribution set {id} could not be found. It may have been deleted or you may not have permission to view it.","SystemModuleTargetLink.Updatable.Tooltip":"Open target {id}","SystemModuleTargetLink.NonUpdatable.Tooltip":"Non updatable target","ModuleTypeLink.Tooltip":"Open module type {id}","DistributionSetType.Label":"Distribution set type","SoftwareModuleType.Label":"Software module type","ModuleTypes.Label":"Module types","DateTimeInput.ValidationError":"Use valid date format (Month DD, YYYY HH:MM AM/PM)","Metadata.List.Empty":"No metadata found","Info.Job.RecipeMatch.InProgress":"Ongoing {docLink} job started by recipe {recipeLink} {started} {started, plural, =1 {minute} other {minutes}} ago.","Info.Job.RecipeMatch.DocLink":"recipe match","Input.Validator.WrongTextInput":"Invalid text: ^[a-zA-Z0-9À-ÿ'`´&\\-+=#€¥\\$%.;,:!()\\[\\]_ ]+$","Input.Validator.WrongVersionInput":"Invalid version: ^[a-zA-Z0-9._-]+$","Input.Validator.WrongModuleQueryInput":"Invalid module query: ^attribute\\.[a-zA-Z0-9\\.\\-=;, _\\$€¥\\(\\)]+$","Input.Validator.WrongCountQueryInput":"Invalid count query: ^count(=gt=|=lt=|==|=ge=|=le=)\\d+$","DistributionSetSuggestion.NoCompatibleSets":"Target type {targetTypeLink} has no compatible distribution sets defined","DistributionSetSuggestion.NoResults":"No valid and complete distribution sets found","RecipeTypeSuggestion.NoResults":"No recipe types found","SystemTypeSuggestion.NoResults":"No system types found","ModuleTypeSuggestion.NoResults":"No module types found","KeyedSearchField.Dropdown.Title":"Field to search in","SortingMenuHeader.Ascending":"Ascending","SortingMenuHeader.Descending":"Descending"};var Br=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gd={exports:{}},zl={};/**
|
3
|
+
* @license React
|
4
|
+
* react-jsx-runtime.production.min.js
|
5
|
+
*
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
7
|
+
*
|
8
|
+
* This source code is licensed under the MIT license found in the
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
10
|
+
*/var Xb;function sI(){if(Xb)return zl;Xb=1;var e=x,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,u){var d,f={},p=null,h=null;u!==void 0&&(p=""+u),l.key!==void 0&&(p=""+l.key),l.ref!==void 0&&(h=l.ref);for(d in l)r.call(l,d)&&!s.hasOwnProperty(d)&&(f[d]=l[d]);if(a&&a.defaultProps)for(d in l=a.defaultProps,l)f[d]===void 0&&(f[d]=l[d]);return{$$typeof:t,type:a,key:p,ref:h,props:f,_owner:i.current}}return zl.Fragment=n,zl.jsx=o,zl.jsxs=o,zl}var ql={},Kb;function oI(){if(Kb)return ql;Kb=1;var e=[];/**
|
11
|
+
* @license React
|
12
|
+
* react-jsx-runtime.development.js
|
13
|
+
*
|
14
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
15
|
+
*
|
16
|
+
* This source code is licensed under the MIT license found in the
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
18
|
+
*/return e.NODE_ENV!=="production"&&function(){var t=x,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),y=Symbol.iterator,b="@@iterator";function g(P){if(P===null||typeof P!="object")return null;var se=y&&P[y]||P[b];return typeof se=="function"?se:null}var v=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(P){{for(var se=arguments.length,De=new Array(se>1?se-1:0),He=1;He<se;He++)De[He-1]=arguments[He];w("error",P,De)}}function w(P,se,De){{var He=v.ReactDebugCurrentFrame,Mt=He.getStackAddendum();Mt!==""&&(se+="%s",De=De.concat([Mt]));var Yt=De.map(function(dt){return String(dt)});Yt.unshift("Warning: "+se),Function.prototype.apply.call(console[P],console,Yt)}}var _=!1,T=!1,M=!1,C=!1,k=!1,I;I=Symbol.for("react.module.reference");function O(P){return!!(typeof P=="string"||typeof P=="function"||P===i||P===o||k||P===s||P===d||P===f||C||P===m||_||T||M||typeof P=="object"&&P!==null&&(P.$$typeof===h||P.$$typeof===p||P.$$typeof===a||P.$$typeof===l||P.$$typeof===u||P.$$typeof===I||P.getModuleId!==void 0))}function A(P,se,De){var He=P.displayName;if(He)return He;var Mt=se.displayName||se.name||"";return Mt!==""?De+"("+Mt+")":De}function L(P){return P.displayName||"Context"}function V(P){if(P==null)return null;if(typeof P.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof P=="function")return P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case i:return"Fragment";case r:return"Portal";case o:return"Profiler";case s:return"StrictMode";case d:return"Suspense";case f:return"SuspenseList"}if(typeof P=="object")switch(P.$$typeof){case l:var se=P;return L(se)+".Consumer";case a:var De=P;return L(De._context)+".Provider";case u:return A(P,P.render,"ForwardRef");case p:var He=P.displayName||null;return He!==null?He:V(P.type)||"Memo";case h:{var Mt=P,Yt=Mt._payload,dt=Mt._init;try{return V(dt(Yt))}catch{return null}}}return null}var Y=Object.assign,N=0,j,G,Z,W,re,fe,de;function H(){}H.__reactDisabledLog=!0;function Ge(){{if(N===0){j=console.log,G=console.info,Z=console.warn,W=console.error,re=console.group,fe=console.groupCollapsed,de=console.groupEnd;var P={configurable:!0,enumerable:!0,value:H,writable:!0};Object.defineProperties(console,{info:P,log:P,warn:P,error:P,group:P,groupCollapsed:P,groupEnd:P})}N++}}function Le(){{if(N--,N===0){var P={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Y({},P,{value:j}),info:Y({},P,{value:G}),warn:Y({},P,{value:Z}),error:Y({},P,{value:W}),group:Y({},P,{value:re}),groupCollapsed:Y({},P,{value:fe}),groupEnd:Y({},P,{value:de})})}N<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var oe=v.ReactCurrentDispatcher,K;function Ve(P,se,De){{if(K===void 0)try{throw Error()}catch(Mt){var He=Mt.stack.trim().match(/\n( *(at )?)/);K=He&&He[1]||""}return`
|
19
|
+
`+K+P}}var Ze=!1,$t;{var ge=typeof WeakMap=="function"?WeakMap:Map;$t=new ge}function Ee(P,se){if(!P||Ze)return"";{var De=$t.get(P);if(De!==void 0)return De}var He;Ze=!0;var Mt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Yt;Yt=oe.current,oe.current=null,Ge();try{if(se){var dt=function(){throw Error()};if(Object.defineProperty(dt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(dt,[])}catch(wr){He=wr}Reflect.construct(P,[],dt)}else{try{dt.call()}catch(wr){He=wr}P.call(dt.prototype)}}else{try{throw Error()}catch(wr){He=wr}P()}}catch(wr){if(wr&&He&&typeof wr.stack=="string"){for(var at=wr.stack.split(`
|
20
|
+
`),cr=He.stack.split(`
|
21
|
+
`),xn=at.length-1,kn=cr.length-1;xn>=1&&kn>=0&&at[xn]!==cr[kn];)kn--;for(;xn>=1&&kn>=0;xn--,kn--)if(at[xn]!==cr[kn]){if(xn!==1||kn!==1)do if(xn--,kn--,kn<0||at[xn]!==cr[kn]){var ci=`
|
22
|
+
`+at[xn].replace(" at new "," at ");return P.displayName&&ci.includes("<anonymous>")&&(ci=ci.replace("<anonymous>",P.displayName)),typeof P=="function"&&$t.set(P,ci),ci}while(xn>=1&&kn>=0);break}}}finally{Ze=!1,oe.current=Yt,Le(),Error.prepareStackTrace=Mt}var Hl=P?P.displayName||P.name:"",_a=Hl?Ve(Hl):"";return typeof P=="function"&&$t.set(P,_a),_a}function _e(P,se,De){return Ee(P,!1)}function Ye(P){var se=P.prototype;return!!(se&&se.isReactComponent)}function rt(P,se,De){if(P==null)return"";if(typeof P=="function")return Ee(P,Ye(P));if(typeof P=="string")return Ve(P);switch(P){case d:return Ve("Suspense");case f:return Ve("SuspenseList")}if(typeof P=="object")switch(P.$$typeof){case u:return _e(P.render);case p:return rt(P.type,se,De);case h:{var He=P,Mt=He._payload,Yt=He._init;try{return rt(Yt(Mt),se,De)}catch{}}}return""}var lt=Object.prototype.hasOwnProperty,J={},We=v.ReactDebugCurrentFrame;function E(P){if(P){var se=P._owner,De=rt(P.type,P._source,se?se.type:null);We.setExtraStackFrame(De)}else We.setExtraStackFrame(null)}function F(P,se,De,He,Mt){{var Yt=Function.call.bind(lt);for(var dt in P)if(Yt(P,dt)){var at=void 0;try{if(typeof P[dt]!="function"){var cr=Error((He||"React class")+": "+De+" type `"+dt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof P[dt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw cr.name="Invariant Violation",cr}at=P[dt](se,dt,He,De,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(xn){at=xn}at&&!(at instanceof Error)&&(E(Mt),S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",He||"React class",De,dt,typeof at),E(null)),at instanceof Error&&!(at.message in J)&&(J[at.message]=!0,E(Mt),S("Failed %s type: %s",De,at.message),E(null))}}}var $=Array.isArray;function ee(P){return $(P)}function te(P){{var se=typeof Symbol=="function"&&Symbol.toStringTag,De=se&&P[Symbol.toStringTag]||P.constructor.name||"Object";return De}}function U(P){try{return ke(P),!1}catch{return!0}}function ke(P){return""+P}function Ue(P){if(U(P))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",te(P)),ke(P)}var ze=v.ReactCurrentOwner,fn={key:!0,ref:!0,__self:!0,__source:!0},Yn,On;function Or(P){if(lt.call(P,"ref")){var se=Object.getOwnPropertyDescriptor(P,"ref").get;if(se&&se.isReactWarning)return!1}return P.ref!==void 0}function xr(P){if(lt.call(P,"key")){var se=Object.getOwnPropertyDescriptor(P,"key").get;if(se&&se.isReactWarning)return!1}return P.key!==void 0}function ss(P,se){typeof P.ref=="string"&&ze.current}function qs(P,se){{var De=function(){Yn||(Yn=!0,S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",se))};De.isReactWarning=!0,Object.defineProperty(P,"key",{get:De,configurable:!0})}}function Xs(P,se){{var De=function(){On||(On=!0,S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",se))};De.isReactWarning=!0,Object.defineProperty(P,"ref",{get:De,configurable:!0})}}var os=function(P,se,De,He,Mt,Yt,dt){var at={$$typeof:n,type:P,key:se,ref:De,props:dt,_owner:Yt};return at._store={},Object.defineProperty(at._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(at,"_self",{configurable:!1,enumerable:!1,writable:!1,value:He}),Object.defineProperty(at,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Mt}),Object.freeze&&(Object.freeze(at.props),Object.freeze(at)),at};function Ks(P,se,De,He,Mt){{var Yt,dt={},at=null,cr=null;De!==void 0&&(Ue(De),at=""+De),xr(se)&&(Ue(se.key),at=""+se.key),Or(se)&&(cr=se.ref,ss(se,Mt));for(Yt in se)lt.call(se,Yt)&&!fn.hasOwnProperty(Yt)&&(dt[Yt]=se[Yt]);if(P&&P.defaultProps){var xn=P.defaultProps;for(Yt in xn)dt[Yt]===void 0&&(dt[Yt]=xn[Yt])}if(at||cr){var kn=typeof P=="function"?P.displayName||P.name||"Unknown":P;at&&qs(dt,kn),cr&&Xs(dt,kn)}return os(P,at,cr,Mt,He,ze.current,dt)}}var Qs=v.ReactCurrentOwner,Ao=v.ReactDebugCurrentFrame;function li(P){if(P){var se=P._owner,De=rt(P.type,P._source,se?se.type:null);Ao.setExtraStackFrame(De)}else Ao.setExtraStackFrame(null)}var as;as=!1;function Wl(P){return typeof P=="object"&&P!==null&&P.$$typeof===n}function ud(){{if(Qs.current){var P=V(Qs.current.type);if(P)return`
|
23
|
+
|
24
|
+
Check the render method of \``+P+"`."}return""}}function mh(P){return""}var dd={};function gh(P){{var se=ud();if(!se){var De=typeof P=="string"?P:P.displayName||P.name;De&&(se=`
|
25
|
+
|
26
|
+
Check the top-level render call using <`+De+">.")}return se}}function fd(P,se){{if(!P._store||P._store.validated||P.key!=null)return;P._store.validated=!0;var De=gh(se);if(dd[De])return;dd[De]=!0;var He="";P&&P._owner&&P._owner!==Qs.current&&(He=" It was passed a child from "+V(P._owner.type)+"."),li(P),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',De,He),li(null)}}function pd(P,se){{if(typeof P!="object")return;if(ee(P))for(var De=0;De<P.length;De++){var He=P[De];Wl(He)&&fd(He,se)}else if(Wl(P))P._store&&(P._store.validated=!0);else if(P){var Mt=g(P);if(typeof Mt=="function"&&Mt!==P.entries)for(var Yt=Mt.call(P),dt;!(dt=Yt.next()).done;)Wl(dt.value)&&fd(dt.value,se)}}}function yh(P){{var se=P.type;if(se==null||typeof se=="string")return;var De;if(typeof se=="function")De=se.propTypes;else if(typeof se=="object"&&(se.$$typeof===u||se.$$typeof===p))De=se.propTypes;else return;if(De){var He=V(se);F(De,P.props,"prop",He,P)}else if(se.PropTypes!==void 0&&!as){as=!0;var Mt=V(se);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Mt||"Unknown")}typeof se.getDefaultProps=="function"&&!se.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function vh(P){{for(var se=Object.keys(P.props),De=0;De<se.length;De++){var He=se[De];if(He!=="children"&&He!=="key"){li(P),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",He),li(null);break}}P.ref!==null&&(li(P),S("Invalid attribute `ref` supplied to `React.Fragment`."),li(null))}}var hd={};function md(P,se,De,He,Mt,Yt){{var dt=O(P);if(!dt){var at="";(P===void 0||typeof P=="object"&&P!==null&&Object.keys(P).length===0)&&(at+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var cr=mh();cr?at+=cr:at+=ud();var xn;P===null?xn="null":ee(P)?xn="array":P!==void 0&&P.$$typeof===n?(xn="<"+(V(P.type)||"Unknown")+" />",at=" Did you accidentally export a JSX literal instead of a component?"):xn=typeof P,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",xn,at)}var kn=Ks(P,se,De,Mt,Yt);if(kn==null)return kn;if(dt){var ci=se.children;if(ci!==void 0)if(He)if(ee(ci)){for(var Hl=0;Hl<ci.length;Hl++)pd(ci[Hl],P);Object.freeze&&Object.freeze(ci)}else S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else pd(ci,P)}if(lt.call(se,"key")){var _a=V(P),wr=Object.keys(se).filter(function(wte){return wte!=="key"}),Zb=wr.length>0?"{key: someKey, "+wr.join(": ..., ")+": ...}":"{key: someKey}";if(!hd[_a+Zb]){var xte=wr.length>0?"{"+wr.join(": ..., ")+": ...}":"{}";S(`A props object containing a "key" prop is being spread into JSX:
|
27
|
+
let props = %s;
|
28
|
+
<%s {...props} />
|
29
|
+
React keys must be passed directly to JSX without using spread:
|
30
|
+
let props = %s;
|
31
|
+
<%s key={someKey} {...props} />`,Zb,_a,xte,_a),hd[_a+Zb]=!0}}return P===i?vh(kn):yh(kn),kn}}function bh(P,se,De){return md(P,se,De,!0)}function Sh(P,se,De){return md(P,se,De,!1)}var xh=Sh,Hb=bh;ql.Fragment=i,ql.jsx=xh,ql.jsxs=Hb}(),ql}var Qb;function aI(){if(Qb)return gd.exports;Qb=1;var e=[];return e.NODE_ENV==="production"?gd.exports=sI():gd.exports=oI(),gd.exports}var c=aI();const Jb=x.createContext(void 0),e0={timeout:60*1e3,baseUrl:"/"},lI={defaultOptions:{queries:{retry:!1,staleTime:1/0,cacheTime:0,refetchOnWindowFocus:!1},mutations:{cacheTime:0}}};function ka(){const e=x.useContext(Jb);if(e===void 0)throw new Error("context is used without a provider");return e}function Wt(){return ka().state.axios}function t0(){return ka().state.rolloutsAxios}function R(){return ka().actions.i18n}let Da=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){const n={listener:t};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};const Xl=typeof window>"u"||"Deno"in window;function Ar(){}function cI(e,t){return typeof e=="function"?e(t):e}function wh(e){return typeof e=="number"&&e>=0&&e!==1/0}function n0(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ca(e,t,n){return Kl(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function uI(e,t,n){return Kl(e)?{...t,mutationKey:e}:typeof e=="function"?{...t,mutationFn:e}:{...e}}function Js(e,t,n){return Kl(e)?[{...t,queryKey:e},n]:[e||{},t]}function r0(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(Kl(o)){if(r){if(t.queryHash!==_h(o,t.options))return!1}else if(!Ma(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||typeof i<"u"&&i!==t.state.fetchStatus||s&&!s(t))}function i0(e,t){const{exact:n,fetching:r,predicate:i,mutationKey:s}=e;if(Kl(s)){if(!t.options.mutationKey)return!1;if(n){if(Po(t.options.mutationKey)!==Po(s))return!1}else if(!Ma(t.options.mutationKey,s))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||i&&!i(t))}function _h(e,t){return((t==null?void 0:t.queryKeyHashFn)||Po)(e)}function Po(e){return JSON.stringify(e,(t,n)=>kh(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ma(e,t){return s0(e,t)}function s0(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!s0(e[n],t[n])):!1}function o0(e,t){if(e===t)return e;const n=a0(e)&&a0(t);if(n||kh(e)&&kh(t)){const r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),s=i.length,o=n?[]:{};let a=0;for(let l=0;l<s;l++){const u=n?l:i[l];o[u]=o0(e[u],t[u]),o[u]===e[u]&&a++}return r===s&&a===r?e:o}return t}function yd(e,t){if(e&&!t||t&&!e)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function a0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function kh(e){if(!l0(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!l0(n)||!n.hasOwnProperty("isPrototypeOf"))}function l0(e){return Object.prototype.toString.call(e)==="[object Object]"}function Kl(e){return Array.isArray(e)}function c0(e){return new Promise(t=>{setTimeout(t,e)})}function u0(e){c0(0).then(e)}function dI(){if(typeof AbortController=="function")return new AbortController}function Dh(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?o0(e,t):t}class fI extends Da{constructor(){super(),this.setup=t=>{if(!Xl&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const vd=new fI,d0=["online","offline"];let pI=class extends Da{constructor(){super(),this.setup=t=>{if(!Xl&&window.addEventListener){const n=()=>t();return d0.forEach(r=>{window.addEventListener(r,n,!1)}),()=>{d0.forEach(r=>{window.removeEventListener(r,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}};const bd=new pI;function hI(e){return Math.min(1e3*2**e,3e4)}function Sd(e){return(e??"online")==="online"?bd.isOnline():!0}class f0{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function xd(e){return e instanceof f0}function p0(e){let t=!1,n=0,r=!1,i,s,o;const a=new Promise((b,g)=>{s=b,o=g}),l=b=>{r||(h(new f0(b)),e.abort==null||e.abort())},u=()=>{t=!0},d=()=>{t=!1},f=()=>!vd.isFocused()||e.networkMode!=="always"&&!bd.isOnline(),p=b=>{r||(r=!0,e.onSuccess==null||e.onSuccess(b),i==null||i(),s(b))},h=b=>{r||(r=!0,e.onError==null||e.onError(b),i==null||i(),o(b))},m=()=>new Promise(b=>{i=g=>{const v=r||!f();return v&&b(g),v},e.onPause==null||e.onPause()}).then(()=>{i=void 0,r||e.onContinue==null||e.onContinue()}),y=()=>{if(r)return;let b;try{b=e.fn()}catch(g){b=Promise.reject(g)}Promise.resolve(b).then(p).catch(g=>{var v,S;if(r)return;const w=(v=e.retry)!=null?v:3,_=(S=e.retryDelay)!=null?S:hI,T=typeof _=="function"?_(n,g):_,M=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,g);if(t||!M){h(g);return}n++,e.onFail==null||e.onFail(n,g),c0(T).then(()=>{if(f())return m()}).then(()=>{t?h(g):y()})})};return Sd(e.networkMode)?y():m().then(y),{promise:a,cancel:l,continue:()=>(i==null?void 0:i())?a:Promise.resolve(),cancelRetry:u,continueRetry:d}}const Ch=console;function mI(){let e=[],t=0,n=d=>{d()},r=d=>{d()};const i=d=>{let f;t++;try{f=d()}finally{t--,t||a()}return f},s=d=>{t?e.push(d):u0(()=>{n(d)})},o=d=>(...f)=>{s(()=>{d(...f)})},a=()=>{const d=e;e=[],d.length&&u0(()=>{r(()=>{d.forEach(f=>{n(f)})})})};return{batch:i,batchCalls:o,schedule:s,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{r=d}}}const an=mI();class h0{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wh(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(Xl?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}var Mh=[];class gI extends h0{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||Ch,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||yI(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=Dh(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(Ar).catch(Ar):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!n0(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var s;return(s=this.retryer)==null||s.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(m=>m.options.queryFn);h&&this.setOptions(h.options)}Mh.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||this.logger.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const o=dI(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.signal}})};l(a);const u=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),d={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:u};if(l(d),(r=this.options.behavior)==null||r.onFetch(d),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=d.fetchOptions)==null?void 0:i.meta)){var f;this.dispatch({type:"fetch",meta:(f=d.fetchOptions)==null?void 0:f.meta})}const p=h=>{if(xd(h)&&h.silent||this.dispatch({type:"error",error:h}),!xd(h)){var m,y,b,g;(m=(y=this.cache.config).onError)==null||m.call(y,h,this),(b=(g=this.cache.config).onSettled)==null||b.call(g,this.state.data,h,this),Mh.NODE_ENV!=="production"&&this.logger.error(h)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=p0({fn:d.fetchFn,abort:o==null?void 0:o.abort.bind(o),onSuccess:h=>{var m,y,b,g;if(typeof h>"u"){Mh.NODE_ENV!=="production"&&this.logger.error("Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: "+this.queryHash),p(new Error(this.queryHash+" data is undefined"));return}this.setData(h),(m=(y=this.cache.config).onSuccess)==null||m.call(y,h,this),(b=(g=this.cache.config).onSettled)==null||b.call(g,h,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:p,onFail:(h,m)=>{this.dispatch({type:"failed",failureCount:h,error:m})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var i,s;switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=t.meta)!=null?i:null,fetchStatus:Sd(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(s=t.dataUpdatedAt)!=null?s:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return xd(o)&&o.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),an.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function yI(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class vI extends Da{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var i;const s=n.queryKey,o=(i=n.queryHash)!=null?i:_h(s,n);let a=this.get(o);return a||(a=new gI({cache:this,logger:t.getLogger(),queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(a)),a}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){an.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=Js(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(i=>r0(r,i))}findAll(t,n){const[r]=Js(t,n);return Object.keys(r).length>0?this.queries.filter(i=>r0(r,i)):this.queries}notify(t){an.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}onFocus(){an.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){an.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}var bI=[];class SI extends h0{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||Ch,this.observers=[],this.state=t.state||m0(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}async execute(){const t=()=>{var M;return this.retryer=p0({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(C,k)=>{this.dispatch({type:"failed",failureCount:C,error:k})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(M=this.options.retry)!=null?M:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,i,s,o,a,l,u,d;if(!n){var f,p,h,m;this.dispatch({type:"loading",variables:this.options.variables}),await((f=(p=this.mutationCache.config).onMutate)==null?void 0:f.call(p,this.state.variables,this));const C=await((h=(m=this.options).onMutate)==null?void 0:h.call(m,this.state.variables));C!==this.state.context&&this.dispatch({type:"loading",context:C,variables:this.state.variables})}const M=await t();return await((r=(i=this.mutationCache.config).onSuccess)==null?void 0:r.call(i,M,this.state.variables,this.state.context,this)),await((s=(o=this.options).onSuccess)==null?void 0:s.call(o,M,this.state.variables,this.state.context)),await((a=(l=this.mutationCache.config).onSettled)==null?void 0:a.call(l,M,null,this.state.variables,this.state.context,this)),await((u=(d=this.options).onSettled)==null?void 0:u.call(d,M,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:M}),M}catch(M){try{var y,b,g,v,S,w,_,T;throw await((y=(b=this.mutationCache.config).onError)==null?void 0:y.call(b,M,this.state.variables,this.state.context,this)),bI.NODE_ENV!=="production"&&this.logger.error(M),await((g=(v=this.options).onError)==null?void 0:g.call(v,M,this.state.variables,this.state.context)),await((S=(w=this.mutationCache.config).onSettled)==null?void 0:S.call(w,void 0,M,this.state.variables,this.state.context,this)),await((_=(T=this.options).onSettled)==null?void 0:_.call(T,void 0,M,this.state.variables,this.state.context)),M}finally{this.dispatch({type:"error",error:M})}}}dispatch(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"loading":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Sd(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...r,...t.state}}};this.state=n(this.state),an.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function m0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class xI extends Da{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const i=new SI({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(i),i}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){an.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>i0(t,n))}findAll(t){return this.mutations.filter(n=>i0(t,n))}notify(t){an.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return an.batch(()=>n.reduce((r,i)=>r.then(()=>i.continue().catch(Ar)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function Th(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,i,s,o;const a=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,l=(r=e.fetchOptions)==null||(i=r.meta)==null?void 0:i.fetchMore,u=l==null?void 0:l.pageParam,d=(l==null?void 0:l.direction)==="forward",f=(l==null?void 0:l.direction)==="backward",p=((s=e.state.data)==null?void 0:s.pages)||[],h=((o=e.state.data)==null?void 0:o.pageParams)||[];let m=h,y=!1;const b=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>{var M;if((M=e.signal)!=null&&M.aborted)y=!0;else{var C;(C=e.signal)==null||C.addEventListener("abort",()=>{y=!0})}return e.signal}})},g=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),v=(T,M,C,k)=>(m=k?[M,...m]:[...m,M],k?[C,...T]:[...T,C]),S=(T,M,C,k)=>{if(y)return Promise.reject("Cancelled");if(typeof C>"u"&&!M&&T.length)return Promise.resolve(T);const I={queryKey:e.queryKey,pageParam:C,meta:e.options.meta};b(I);const O=g(I);return Promise.resolve(O).then(L=>v(T,C,L,k))};let w;if(!p.length)w=S([]);else if(d){const T=typeof u<"u",M=T?u:Ih(e.options,p);w=S(p,T,M)}else if(f){const T=typeof u<"u",M=T?u:g0(e.options,p);w=S(p,T,M,!0)}else{m=[];const T=typeof e.options.getNextPageParam>"u";w=(a&&p[0]?a(p[0],0,p):!0)?S([],T,h[0]):Promise.resolve(v([],h[0],p[0]));for(let C=1;C<p.length;C++)w=w.then(k=>{if(a&&p[C]?a(p[C],C,p):!0){const O=T?h[C]:Ih(e.options,k);return S(k,T,O)}return Promise.resolve(v(k,h[C],p[C]))})}return w.then(T=>({pages:T,pageParams:m}))}}}}function Ih(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function g0(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}function wI(e,t){if(e.getNextPageParam&&Array.isArray(t)){const n=Ih(e,t);return typeof n<"u"&&n!==null&&n!==!1}}function _I(e,t){if(e.getPreviousPageParam&&Array.isArray(t)){const n=g0(e,t);return typeof n<"u"&&n!==null&&n!==!1}}var Eh=[];class kI{constructor(t={}){this.queryCache=t.queryCache||new vI,this.mutationCache=t.mutationCache||new xI,this.logger=t.logger||Ch,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0,Eh.NODE_ENV!=="production"&&t.logger&&this.logger.error("Passing a custom logger has been deprecated and will be removed in the next major version.")}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=vd.subscribe(()=>{vd.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=bd.subscribe(()=>{bd.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=Js(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const i=Ca(t,n,r),s=this.getQueryData(i.queryKey);return s?Promise.resolve(s):this.fetchQuery(i)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const i=r.data;return[n,i]})}setQueryData(t,n,r){const i=this.queryCache.find(t),s=i==null?void 0:i.state.data,o=cI(n,s);if(typeof o>"u")return;const a=Ca(t),l=this.defaultQueryOptions(a);return this.queryCache.build(this,l).setData(o,{...r,manual:!0})}setQueriesData(t,n,r){return an.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=Js(t,n),i=this.queryCache;an.batch(()=>{i.findAll(r).forEach(s=>{i.remove(s)})})}resetQueries(t,n,r){const[i,s]=Js(t,n,r),o=this.queryCache,a={type:"active",...i};return an.batch(()=>(o.findAll(i).forEach(l=>{l.reset()}),this.refetchQueries(a,s)))}cancelQueries(t,n,r){const[i,s={}]=Js(t,n,r);typeof s.revert>"u"&&(s.revert=!0);const o=an.batch(()=>this.queryCache.findAll(i).map(a=>a.cancel(s)));return Promise.all(o).then(Ar).catch(Ar)}invalidateQueries(t,n,r){const[i,s]=Js(t,n,r);return an.batch(()=>{var o,a;if(this.queryCache.findAll(i).forEach(u=>{u.invalidate()}),i.refetchType==="none")return Promise.resolve();const l={...i,type:(o=(a=i.refetchType)!=null?a:i.type)!=null?o:"active"};return this.refetchQueries(l,s)})}refetchQueries(t,n,r){const[i,s]=Js(t,n,r),o=an.batch(()=>this.queryCache.findAll(i).filter(l=>!l.isDisabled()).map(l=>{var u;return l.fetch(void 0,{...s,cancelRefetch:(u=s==null?void 0:s.cancelRefetch)!=null?u:!0,meta:{refetchPage:i.refetchPage}})}));let a=Promise.all(o).then(Ar);return s!=null&&s.throwOnError||(a=a.catch(Ar)),a}fetchQuery(t,n,r){const i=Ca(t,n,r),s=this.defaultQueryOptions(i);typeof s.retry>"u"&&(s.retry=!1);const o=this.queryCache.build(this,s);return o.isStaleByTime(s.staleTime)?o.fetch(s):Promise.resolve(o.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(Ar).catch(Ar)}fetchInfiniteQuery(t,n,r){const i=Ca(t,n,r);return i.behavior=Th(),this.fetchQuery(i)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(Ar).catch(Ar)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(i=>Po(t)===Po(i.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>Ma(t,r.queryKey));return Eh.NODE_ENV!=="production"&&this.queryDefaults.filter(i=>Ma(t,i.queryKey)).length>1&&this.logger.error("[QueryClient] Several query defaults match with key '"+JSON.stringify(t)+"'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults."),n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(i=>Po(t)===Po(i.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>Ma(t,r.mutationKey));return Eh.NODE_ENV!=="production"&&this.mutationDefaults.filter(i=>Ma(t,i.mutationKey)).length>1&&this.logger.error("[QueryClient] Several mutation defaults match with key '"+JSON.stringify(t)+"'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults."),n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=_h(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}var Rh=[];class y0 extends Da{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),v0(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Lh(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Lh(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),Rh.NODE_ENV!=="production"&&typeof(t==null?void 0:t.isDataEqual)<"u"&&this.client.getLogger().error("The isDataEqual option has been deprecated and will be removed in the next major version. You can achieve the same functionality by passing a function as the structuralSharing option"),yd(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const s=this.hasListeners();s&&b0(this.currentQuery,i,this.options,r)&&this.executeFetch(),this.updateResult(n),s&&(this.currentQuery!==i||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const o=this.computeRefetchInterval();s&&(this.currentQuery!==i||this.options.enabled!==r.enabled||o!==this.currentRefetchInterval)&&this.updateRefetchInterval(o)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t),r=this.createResult(n,t);return CI(this,r,t)&&(this.currentResult=r,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),r}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...n}={}){return this.fetch({...n,meta:{refetchPage:t}})}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch({...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ar)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),Xl||this.currentResult.isStale||!wh(this.options.staleTime))return;const n=n0(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(Xl||this.options.enabled===!1||!wh(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||vd.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,i=this.options,s=this.currentResult,o=this.currentResultState,a=this.currentResultOptions,l=t!==r,u=l?t.state:this.currentQueryInitialState,d=l?this.currentResult:this.previousQueryResult,{state:f}=t;let{dataUpdatedAt:p,error:h,errorUpdatedAt:m,fetchStatus:y,status:b}=f,g=!1,v=!1,S;if(n._optimisticResults){const C=this.hasListeners(),k=!C&&v0(t,n),I=C&&b0(t,r,n,i);(k||I)&&(y=Sd(t.options.networkMode)?"fetching":"paused",p||(b="loading")),n._optimisticResults==="isRestoring"&&(y="idle")}if(n.keepPreviousData&&!f.dataUpdatedAt&&d!=null&&d.isSuccess&&b!=="error")S=d.data,p=d.dataUpdatedAt,b=d.status,g=!0;else if(n.select&&typeof f.data<"u")if(s&&f.data===(o==null?void 0:o.data)&&n.select===this.selectFn)S=this.selectResult;else try{this.selectFn=n.select,S=n.select(f.data),S=Dh(s==null?void 0:s.data,S,n),this.selectResult=S,this.selectError=null}catch(C){Rh.NODE_ENV!=="production"&&this.client.getLogger().error(C),this.selectError=C}else S=f.data;if(typeof n.placeholderData<"u"&&typeof S>"u"&&b==="loading"){let C;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))C=s.data;else if(C=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof C<"u")try{C=n.select(C),this.selectError=null}catch(k){Rh.NODE_ENV!=="production"&&this.client.getLogger().error(k),this.selectError=k}typeof C<"u"&&(b="success",S=Dh(s==null?void 0:s.data,C,n),v=!0)}this.selectError&&(h=this.selectError,S=this.selectResult,m=Date.now(),b="error");const w=y==="fetching",_=b==="loading",T=b==="error";return{status:b,fetchStatus:y,isLoading:_,isSuccess:b==="success",isError:T,isInitialLoading:_&&w,data:S,dataUpdatedAt:p,error:h,errorUpdatedAt:m,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:w,isRefetching:w&&!_,isLoadingError:T&&f.dataUpdatedAt===0,isPaused:y==="paused",isPlaceholderData:v,isPreviousData:g,isRefetchError:T&&f.dataUpdatedAt!==0,isStale:Oh(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,yd(r,n))return;this.currentResult=r;const i={cache:!0},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!this.trackedProps.size)return!0;const l=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(u=>{const d=u;return this.currentResult[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),this.notify({...i,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!xd(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){an.batch(()=>{if(t.onSuccess){var n,r,i,s;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(i=(s=this.options).onSettled)==null||i.call(s,this.currentResult.data,null)}else if(t.onError){var o,a,l,u;(o=(a=this.options).onError)==null||o.call(a,this.currentResult.error),(l=(u=this.options).onSettled)==null||l.call(u,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:d})=>{d(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function DI(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function v0(e,t){return DI(e,t)||e.state.dataUpdatedAt>0&&Lh(e,t,t.refetchOnMount)}function Lh(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Oh(e,t)}return!1}function b0(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&Oh(e,n)}function Oh(e,t){return e.isStaleByTime(t.staleTime)}function CI(e,t,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?t.isPlaceholderData:!yd(e.getCurrentResult(),t)}class MI extends y0{constructor(t,n){super(t,n)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t,n){super.setOptions({...t,behavior:Th()},n)}getOptimisticResult(t){return t.behavior=Th(),super.getOptimisticResult(t)}fetchNextPage({pageParam:t,...n}={}){return this.fetch({...n,meta:{fetchMore:{direction:"forward",pageParam:t}}})}fetchPreviousPage({pageParam:t,...n}={}){return this.fetch({...n,meta:{fetchMore:{direction:"backward",pageParam:t}}})}createResult(t,n){var r,i,s,o,a,l;const{state:u}=t,d=super.createResult(t,n),{isFetching:f,isRefetching:p}=d,h=f&&((r=u.fetchMeta)==null||(i=r.fetchMore)==null?void 0:i.direction)==="forward",m=f&&((s=u.fetchMeta)==null||(o=s.fetchMore)==null?void 0:o.direction)==="backward";return{...d,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:wI(n,(a=u.data)==null?void 0:a.pages),hasPreviousPage:_I(n,(l=u.data)==null?void 0:l.pages),isFetchingNextPage:h,isFetchingPreviousPage:m,isRefetching:p&&!h&&!m}}}let TI=class extends Da{constructor(t,n){super(),this.client=t,this.setOptions(n),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var n;const r=this.options;this.options=this.client.defaultMutationOptions(t),yd(r,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(n=this.currentMutation)==null||n.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.currentMutation)==null||t.removeObserver(this)}}onMutationUpdate(t){this.updateResult();const n={listeners:!0};t.type==="success"?n.onSuccess=!0:t.type==="error"&&(n.onError=!0),this.notify(n)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,n){return this.mutateOptions=n,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof t<"u"?t:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const t=this.currentMutation?this.currentMutation.state:m0(),n=t.status==="loading",r={...t,isLoading:n,isPending:n,isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=r}notify(t){an.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(t.onSuccess){var n,r,i,s;(n=(r=this.mutateOptions).onSuccess)==null||n.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(i=(s=this.mutateOptions).onSettled)==null||i.call(s,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(t.onError){var o,a,l,u;(o=(a=this.mutateOptions).onError)==null||o.call(a,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(l=(u=this.mutateOptions).onSettled)==null||l.call(u,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}t.listeners&&this.listeners.forEach(({listener:d})=>{d(this.currentResult)})})}};var wd={exports:{}},Bh={};/**
|
32
|
+
* @license React
|
33
|
+
* use-sync-external-store-shim.production.js
|
34
|
+
*
|
35
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
36
|
+
*
|
37
|
+
* This source code is licensed under the MIT license found in the
|
38
|
+
* LICENSE file in the root directory of this source tree.
|
39
|
+
*/var S0;function II(){if(S0)return Bh;S0=1;var e=x;function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,s=e.useLayoutEffect,o=e.useDebugValue;function a(f,p){var h=p(),m=r({inst:{value:h,getSnapshot:p}}),y=m[0].inst,b=m[1];return s(function(){y.value=h,y.getSnapshot=p,l(y)&&b({inst:y})},[f,h,p]),i(function(){return l(y)&&b({inst:y}),f(function(){l(y)&&b({inst:y})})},[f]),o(h),h}function l(f){var p=f.getSnapshot;f=f.value;try{var h=p();return!n(f,h)}catch{return!0}}function u(f,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return Bh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Bh}var Ah={},x0;function EI(){if(x0)return Ah;x0=1;var e=[];/**
|
40
|
+
* @license React
|
41
|
+
* use-sync-external-store-shim.development.js
|
42
|
+
*
|
43
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
44
|
+
*
|
45
|
+
* This source code is licensed under the MIT license found in the
|
46
|
+
* LICENSE file in the root directory of this source tree.
|
47
|
+
*/return e.NODE_ENV!=="production"&&function(){function t(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}function n(m,y){f||s.startTransition===void 0||(f=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var b=y();if(!p){var g=y();o(b,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}g=a({inst:{value:b,getSnapshot:y}});var v=g[0].inst,S=g[1];return u(function(){v.value=b,v.getSnapshot=y,r(v)&&S({inst:v})},[m,b,y]),l(function(){return r(v)&&S({inst:v}),m(function(){r(v)&&S({inst:v})})},[m]),d(b),b}function r(m){var y=m.getSnapshot;m=m.value;try{var b=y();return!o(m,b)}catch{return!0}}function i(m,y){return y()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var s=x,o=typeof Object.is=="function"?Object.is:t,a=s.useState,l=s.useEffect,u=s.useLayoutEffect,d=s.useDebugValue,f=!1,p=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?i:n;Ah.useSyncExternalStore=s.useSyncExternalStore!==void 0?s.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}(),Ah}var w0;function RI(){if(w0)return wd.exports;w0=1;var e=[];return e.NODE_ENV==="production"?wd.exports=II():wd.exports=EI(),wd.exports}var LI=RI();const _0=LI.useSyncExternalStore;var OI=[];const k0=le.createContext(void 0),D0=le.createContext(!1);function C0(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=k0),window.ReactQueryClientContext):k0)}const Ke=({context:e}={})=>{const t=le.useContext(C0(e,le.useContext(D0)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},BI=({client:e,children:t,context:n,contextSharing:r=!1})=>{le.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),OI.NODE_ENV!=="production"&&r&&e.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const i=C0(n,r);return le.createElement(D0.Provider,{value:!n&&r},le.createElement(i.Provider,{value:e},t))},M0=le.createContext(!1),AI=()=>le.useContext(M0);M0.Provider;function PI(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const NI=le.createContext(PI()),jI=()=>le.useContext(NI);function T0(e,t){return typeof e=="function"?e(...t):!!e}const FI=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},GI=e=>{le.useEffect(()=>{e.clearReset()},[e])},VI=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&T0(n,[e.error,r]),$I=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},YI=(e,t)=>e.isLoading&&e.isFetching&&!t,WI=(e,t,n)=>(e==null?void 0:e.suspense)&&YI(t,n),HI=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function I0(e,t){const n=Ke({context:e.context}),r=AI(),i=jI(),s=n.defaultQueryOptions(e);s._optimisticResults=r?"isRestoring":"optimistic",s.onError&&(s.onError=an.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=an.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=an.batchCalls(s.onSettled)),$I(s),FI(s,i),GI(i);const[o]=le.useState(()=>new t(n,s)),a=o.getOptimisticResult(s);if(_0(le.useCallback(l=>{const u=r?()=>{}:o.subscribe(an.batchCalls(l));return o.updateResult(),u},[o,r]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),le.useEffect(()=>{o.setOptions(s,{listeners:!1})},[s,o]),WI(s,a,r))throw HI(s,o,i);if(VI({result:a,errorResetBoundary:i,useErrorBoundary:s.useErrorBoundary,query:o.getCurrentQuery()}))throw a.error;return s.notifyOnChangeProps?a:o.trackResult(a)}function E0(e,t,n){const r=Ca(e,t,n);return I0(r,y0)}function ln(e,t,n){const r=uI(e,t),i=Ke({context:r.context}),[s]=le.useState(()=>new TI(i,r));le.useEffect(()=>{s.setOptions(r)},[s,r]);const o=_0(le.useCallback(l=>s.subscribe(an.batchCalls(l)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),a=le.useCallback((l,u)=>{s.mutate(l,u).catch(ZI)},[s]);if(o.error&&T0(s.options.useErrorBoundary,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}function ZI(){}function R0(e,t,n){const r=Ca(e,t,n);return I0(r,MI)}function UI(e){const t=new URL(e.resolveMgmtApiUrl("v1")),n=t.hostname;if(!n.startsWith("api."))throw new Error("Unexpected Rollouts mgmt host");const r=n.replace("api.","system-management."),i=new URL(t.toString());return i.hostname=r,i.pathname="/api/mgmt/v1/",i.toString()}function zI(e){return new URL(e.resolveMgmtApiUrl("v1"))}function Tt(e){const t=(e==null?void 0:e.pages.flatMap(r=>r.elements))??[],n=e==null?void 0:e.pages[e.pages.length-1];return{totalCount:(n==null?void 0:n.totalElements)??0,entities:t}}function Ql(e,t){if(e!==void 0)return t.find(n=>n.id===e)}function It(e,t){if(typeof t=="object"&&t!==null){const n=t.response,r=n==null?void 0:n.status,i=n==null?void 0:n.data,s=i==null?void 0:i.message,o=t.message,a=typeof r=="number"?qI(e,r,s,i):void 0;if(a)return a;if(typeof o=="string")return{message:o,code:r}}return{message:e("Error.Api.Unknown.Message")}}function qI(e,t,n,r){if(t==401)return{message:e("Error.Api.Unauthorized"),code:t};if(t==403)return{message:e("Error.Api.Forbidden"),code:t};if(t<500){if(typeof n=="string")return{message:n,code:t};if(typeof r=="string")return{message:r,code:t}}}function ls(e,t){return"_links"in e&&t in e._links?e._links[t]!==void 0:!1}function Xt(e,t){if("_links"in e&&t in e._links&&"href"in e._links[t])return e._links[t].href}function Pr(e){const t=e==null?void 0:e.split("/").pop();if(t===void 0)throw new Error("Invalid link");return t}function L0(e){const t=new URLSearchParams;return Object.keys(e).forEach(n=>{const r=e[n],i=s=>{s.toString().length>0&&t.append(n,s.toString())};typeof r=="string"||typeof r=="number"||typeof r=="boolean"?i(r):r instanceof Date?t.append(n,r.toISOString()):r instanceof Array&&r.forEach(i)}),t}function XI(e,t){const n=e.get(t);return n==="true"?!0:n==="false"?!1:null}function Ta(e,t){const n=e.get(t);return n===null?null:new Date(n)}function nr(e,t,n){n==null||n.forEach(r=>e.append(t,r))}function Jl(e,t){t&&e.append("search",`*${t}*`)}function eo(e,t){t&&e.append("sort",t)}function No(e,t,n){n&&e.append(t,n)}function O0(e,t){const[n,r]=x.useState(t),{data:i,isLoading:s,error:o,fetchNextPage:a}=e(n),{totalCount:l,entities:u}=Tt(i);return{entities:u,totalCount:l,isLoading:s,error:o,loadMore:u.length<l?a:void 0,onFilter:d=>r({...t,search:d})}}function KI(e,t=(n,r)=>n.name.toLowerCase().includes(r.toLowerCase())){const[n,r]=x.useState(""),[i]=x.useState(!1),s=x.useMemo(()=>n?e.filter(o=>t(o,n)):e,[e,n,t]);return{entities:s,totalCount:s.length,isLoading:i,error:null,onFilter:r}}const QI=50;function JI(e){if(e!==void 0)return new URL(e).searchParams.get("cursor")??void 0}function eE(e,t){return{elements:e._embedded[t],totalElements:e.page.totalElements}}function Ht(e,t,n,r){const i=R(),s=Wt(),o=Ke();return{...R0({getNextPageParam:u=>{var d;return JI((d=u._links.next)==null?void 0:d.href)},queryKey:e,queryFn:async u=>{const d=tE([{key:"size",value:QI.toString()},...u.pageParam?[{key:"cursor",value:u.pageParam}]:[]],u.pageParam||r==null?void 0:r.queryParams);try{return(await s.get(t,{params:d})).data}catch(f){throw It(i,f)}},select:u=>({...u,pages:u.pages.flatMap(d=>eE(d,n))}),enabled:(r==null?void 0:r.enabled)??!0,refetchInterval:r==null?void 0:r.refetchInterval}),reset:()=>{o.resetQueries({queryKey:e})}}}function tE(e,t){const n=new URLSearchParams;return e.forEach(({key:r,value:i})=>{i&&n.append(r,i)}),[...(t==null?void 0:t.entries())??[]].forEach(r=>n.append(...r)),n}function ec(){const{actions:e}=ka();return e.showModal}function tt(e){const t=ec();return n=>{const r=t(e,{onCancel:()=>r(),...n})}}function nE(e){const t=x.useRef(null),n=x.useCallback(()=>{var r;(r=t.current)==null||r.click()},[t]);return{filePicker:c.jsx("input",{type:"file",ref:t,onChange:r=>{var s;const i=(s=r.target.files)==null?void 0:s[0];i&&(e(i),r.target.value="")},style:{display:"none"},"data-testid":"file-picker"}),showPicker:n}}var B0=function(t){return t.reduce(function(n,r){var i=r[0],s=r[1];return n[i]=s,n},{})},A0=typeof window<"u"&&window.document&&window.document.createElement?le.useLayoutEffect:le.useEffect,ur="top",Nr="bottom",jr="right",dr="left",Ph="auto",tc=[ur,Nr,jr,dr],Ia="start",nc="end",rE="clippingParents",P0="viewport",rc="popper",iE="reference",N0=tc.reduce(function(e,t){return e.concat([t+"-"+Ia,t+"-"+nc])},[]),j0=[].concat(tc,[Ph]).reduce(function(e,t){return e.concat([t,t+"-"+Ia,t+"-"+nc])},[]),sE="beforeRead",oE="read",aE="afterRead",lE="beforeMain",cE="main",uE="afterMain",dE="beforeWrite",fE="write",pE="afterWrite",hE=[sE,oE,aE,lE,cE,uE,dE,fE,pE];function Ri(e){return e?(e.nodeName||"").toLowerCase():null}function _r(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function jo(e){var t=_r(e).Element;return e instanceof t||e instanceof Element}function Fr(e){var t=_r(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Nh(e){if(typeof ShadowRoot>"u")return!1;var t=_r(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function mE(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},s=t.elements[n];!Fr(s)||!Ri(s)||(Object.assign(s.style,r),Object.keys(i).forEach(function(o){var a=i[o];a===!1?s.removeAttribute(o):s.setAttribute(o,a===!0?"":a)}))})}function gE(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],s=t.attributes[r]||{},o=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=o.reduce(function(l,u){return l[u]="",l},{});!Fr(i)||!Ri(i)||(Object.assign(i.style,a),Object.keys(s).forEach(function(l){i.removeAttribute(l)}))})}}const yE={name:"applyStyles",enabled:!0,phase:"write",fn:mE,effect:gE,requires:["computeStyles"]};function Li(e){return e.split("-")[0]}var Fo=Math.max,_d=Math.min,Ea=Math.round;function jh(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function F0(){return!/^((?!chrome|android).)*safari/i.test(jh())}function Ra(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,s=1;t&&Fr(e)&&(i=e.offsetWidth>0&&Ea(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Ea(r.height)/e.offsetHeight||1);var o=jo(e)?_r(e):window,a=o.visualViewport,l=!F0()&&n,u=(r.left+(l&&a?a.offsetLeft:0))/i,d=(r.top+(l&&a?a.offsetTop:0))/s,f=r.width/i,p=r.height/s;return{width:f,height:p,top:d,right:u+f,bottom:d+p,left:u,x:u,y:d}}function Fh(e){var t=Ra(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function G0(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Nh(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function cs(e){return _r(e).getComputedStyle(e)}function vE(e){return["table","td","th"].indexOf(Ri(e))>=0}function to(e){return((jo(e)?e.ownerDocument:e.document)||window.document).documentElement}function kd(e){return Ri(e)==="html"?e:e.assignedSlot||e.parentNode||(Nh(e)?e.host:null)||to(e)}function V0(e){return!Fr(e)||cs(e).position==="fixed"?null:e.offsetParent}function bE(e){var t=/firefox/i.test(jh()),n=/Trident/i.test(jh());if(n&&Fr(e)){var r=cs(e);if(r.position==="fixed")return null}var i=kd(e);for(Nh(i)&&(i=i.host);Fr(i)&&["html","body"].indexOf(Ri(i))<0;){var s=cs(i);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return i;i=i.parentNode}return null}function ic(e){for(var t=_r(e),n=V0(e);n&&vE(n)&&cs(n).position==="static";)n=V0(n);return n&&(Ri(n)==="html"||Ri(n)==="body"&&cs(n).position==="static")?t:n||bE(e)||t}function Gh(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function sc(e,t,n){return Fo(e,_d(t,n))}function SE(e,t,n){var r=sc(e,t,n);return r>n?n:r}function $0(){return{top:0,right:0,bottom:0,left:0}}function Y0(e){return Object.assign({},$0(),e)}function W0(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var xE=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Y0(typeof t!="number"?t:W0(t,tc))};function wE(e){var t,n=e.state,r=e.name,i=e.options,s=n.elements.arrow,o=n.modifiersData.popperOffsets,a=Li(n.placement),l=Gh(a),u=[dr,jr].indexOf(a)>=0,d=u?"height":"width";if(!(!s||!o)){var f=xE(i.padding,n),p=Fh(s),h=l==="y"?ur:dr,m=l==="y"?Nr:jr,y=n.rects.reference[d]+n.rects.reference[l]-o[l]-n.rects.popper[d],b=o[l]-n.rects.reference[l],g=ic(s),v=g?l==="y"?g.clientHeight||0:g.clientWidth||0:0,S=y/2-b/2,w=f[h],_=v-p[d]-f[m],T=v/2-p[d]/2+S,M=sc(w,T,_),C=l;n.modifiersData[r]=(t={},t[C]=M,t.centerOffset=M-T,t)}}function _E(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||G0(t.elements.popper,i)&&(t.elements.arrow=i))}const kE={name:"arrow",enabled:!0,phase:"main",fn:wE,effect:_E,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function La(e){return e.split("-")[1]}var DE={top:"auto",right:"auto",bottom:"auto",left:"auto"};function CE(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Ea(n*i)/i||0,y:Ea(r*i)/i||0}}function H0(e){var t,n=e.popper,r=e.popperRect,i=e.placement,s=e.variation,o=e.offsets,a=e.position,l=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,f=e.isFixed,p=o.x,h=p===void 0?0:p,m=o.y,y=m===void 0?0:m,b=typeof d=="function"?d({x:h,y}):{x:h,y};h=b.x,y=b.y;var g=o.hasOwnProperty("x"),v=o.hasOwnProperty("y"),S=dr,w=ur,_=window;if(u){var T=ic(n),M="clientHeight",C="clientWidth";if(T===_r(n)&&(T=to(n),cs(T).position!=="static"&&a==="absolute"&&(M="scrollHeight",C="scrollWidth")),T=T,i===ur||(i===dr||i===jr)&&s===nc){w=Nr;var k=f&&T===_&&_.visualViewport?_.visualViewport.height:T[M];y-=k-r.height,y*=l?1:-1}if(i===dr||(i===ur||i===Nr)&&s===nc){S=jr;var I=f&&T===_&&_.visualViewport?_.visualViewport.width:T[C];h-=I-r.width,h*=l?1:-1}}var O=Object.assign({position:a},u&&DE),A=d===!0?CE({x:h,y},_r(n)):{x:h,y};if(h=A.x,y=A.y,l){var L;return Object.assign({},O,(L={},L[w]=v?"0":"",L[S]=g?"0":"",L.transform=(_.devicePixelRatio||1)<=1?"translate("+h+"px, "+y+"px)":"translate3d("+h+"px, "+y+"px, 0)",L))}return Object.assign({},O,(t={},t[w]=v?y+"px":"",t[S]=g?h+"px":"",t.transform="",t))}function ME(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,s=n.adaptive,o=s===void 0?!0:s,a=n.roundOffsets,l=a===void 0?!0:a,u={placement:Li(t.placement),variation:La(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,H0(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,H0(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const TE={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ME,data:{}};var Dd={passive:!0};function IE(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,s=i===void 0?!0:i,o=r.resize,a=o===void 0?!0:o,l=_r(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&u.forEach(function(d){d.addEventListener("scroll",n.update,Dd)}),a&&l.addEventListener("resize",n.update,Dd),function(){s&&u.forEach(function(d){d.removeEventListener("scroll",n.update,Dd)}),a&&l.removeEventListener("resize",n.update,Dd)}}const EE={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:IE,data:{}};var RE={left:"right",right:"left",bottom:"top",top:"bottom"};function Cd(e){return e.replace(/left|right|bottom|top/g,function(t){return RE[t]})}var LE={start:"end",end:"start"};function Z0(e){return e.replace(/start|end/g,function(t){return LE[t]})}function Vh(e){var t=_r(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function $h(e){return Ra(to(e)).left+Vh(e).scrollLeft}function OE(e,t){var n=_r(e),r=to(e),i=n.visualViewport,s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;var u=F0();(u||!u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a+$h(e),y:l}}function BE(e){var t,n=to(e),r=Vh(e),i=(t=e.ownerDocument)==null?void 0:t.body,s=Fo(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Fo(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+$h(e),l=-r.scrollTop;return cs(i||n).direction==="rtl"&&(a+=Fo(n.clientWidth,i?i.clientWidth:0)-s),{width:s,height:o,x:a,y:l}}function Yh(e){var t=cs(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function U0(e){return["html","body","#document"].indexOf(Ri(e))>=0?e.ownerDocument.body:Fr(e)&&Yh(e)?e:U0(kd(e))}function oc(e,t){var n;t===void 0&&(t=[]);var r=U0(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),s=_r(r),o=i?[s].concat(s.visualViewport||[],Yh(r)?r:[]):r,a=t.concat(o);return i?a:a.concat(oc(kd(o)))}function Wh(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function AE(e,t){var n=Ra(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function z0(e,t,n){return t===P0?Wh(OE(e,n)):jo(t)?AE(t,n):Wh(BE(to(e)))}function PE(e){var t=oc(kd(e)),n=["absolute","fixed"].indexOf(cs(e).position)>=0,r=n&&Fr(e)?ic(e):e;return jo(r)?t.filter(function(i){return jo(i)&&G0(i,r)&&Ri(i)!=="body"}):[]}function NE(e,t,n,r){var i=t==="clippingParents"?PE(e):[].concat(t),s=[].concat(i,[n]),o=s[0],a=s.reduce(function(l,u){var d=z0(e,u,r);return l.top=Fo(d.top,l.top),l.right=_d(d.right,l.right),l.bottom=_d(d.bottom,l.bottom),l.left=Fo(d.left,l.left),l},z0(e,o,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function q0(e){var t=e.reference,n=e.element,r=e.placement,i=r?Li(r):null,s=r?La(r):null,o=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case ur:l={x:o,y:t.y-n.height};break;case Nr:l={x:o,y:t.y+t.height};break;case jr:l={x:t.x+t.width,y:a};break;case dr:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var u=i?Gh(i):null;if(u!=null){var d=u==="y"?"height":"width";switch(s){case Ia:l[u]=l[u]-(t[d]/2-n[d]/2);break;case nc:l[u]=l[u]+(t[d]/2-n[d]/2);break}}return l}function Oa(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,s=n.strategy,o=s===void 0?e.strategy:s,a=n.boundary,l=a===void 0?rE:a,u=n.rootBoundary,d=u===void 0?P0:u,f=n.elementContext,p=f===void 0?rc:f,h=n.altBoundary,m=h===void 0?!1:h,y=n.padding,b=y===void 0?0:y,g=Y0(typeof b!="number"?b:W0(b,tc)),v=p===rc?iE:rc,S=e.rects.popper,w=e.elements[m?v:p],_=NE(jo(w)?w:w.contextElement||to(e.elements.popper),l,d,o),T=Ra(e.elements.reference),M=q0({reference:T,element:S,placement:i}),C=Wh(Object.assign({},S,M)),k=p===rc?C:T,I={top:_.top-k.top+g.top,bottom:k.bottom-_.bottom+g.bottom,left:_.left-k.left+g.left,right:k.right-_.right+g.right},O=e.modifiersData.offset;if(p===rc&&O){var A=O[i];Object.keys(I).forEach(function(L){var V=[jr,Nr].indexOf(L)>=0?1:-1,Y=[ur,Nr].indexOf(L)>=0?"y":"x";I[L]+=A[Y]*V})}return I}function jE(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,s=n.rootBoundary,o=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?j0:l,d=La(r),f=d?a?N0:N0.filter(function(m){return La(m)===d}):tc,p=f.filter(function(m){return u.indexOf(m)>=0});p.length===0&&(p=f);var h=p.reduce(function(m,y){return m[y]=Oa(e,{placement:y,boundary:i,rootBoundary:s,padding:o})[Li(y)],m},{});return Object.keys(h).sort(function(m,y){return h[m]-h[y]})}function FE(e){if(Li(e)===Ph)return[];var t=Cd(e);return[Z0(e),t,Z0(t)]}function GE(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,s=i===void 0?!0:i,o=n.altAxis,a=o===void 0?!0:o,l=n.fallbackPlacements,u=n.padding,d=n.boundary,f=n.rootBoundary,p=n.altBoundary,h=n.flipVariations,m=h===void 0?!0:h,y=n.allowedAutoPlacements,b=t.options.placement,g=Li(b),v=g===b,S=l||(v||!m?[Cd(b)]:FE(b)),w=[b].concat(S).reduce(function(H,Ge){return H.concat(Li(Ge)===Ph?jE(t,{placement:Ge,boundary:d,rootBoundary:f,padding:u,flipVariations:m,allowedAutoPlacements:y}):Ge)},[]),_=t.rects.reference,T=t.rects.popper,M=new Map,C=!0,k=w[0],I=0;I<w.length;I++){var O=w[I],A=Li(O),L=La(O)===Ia,V=[ur,Nr].indexOf(A)>=0,Y=V?"width":"height",N=Oa(t,{placement:O,boundary:d,rootBoundary:f,altBoundary:p,padding:u}),j=V?L?jr:dr:L?Nr:ur;_[Y]>T[Y]&&(j=Cd(j));var G=Cd(j),Z=[];if(s&&Z.push(N[A]<=0),a&&Z.push(N[j]<=0,N[G]<=0),Z.every(function(H){return H})){k=O,C=!1;break}M.set(O,Z)}if(C)for(var W=m?3:1,re=function(Ge){var Le=w.find(function(oe){var K=M.get(oe);if(K)return K.slice(0,Ge).every(function(Ve){return Ve})});if(Le)return k=Le,"break"},fe=W;fe>0;fe--){var de=re(fe);if(de==="break")break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}}const VE={name:"flip",enabled:!0,phase:"main",fn:GE,requiresIfExists:["offset"],data:{_skip:!1}};function X0(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function K0(e){return[ur,jr,Nr,dr].some(function(t){return e[t]>=0})}function $E(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,s=t.modifiersData.preventOverflow,o=Oa(t,{elementContext:"reference"}),a=Oa(t,{altBoundary:!0}),l=X0(o,r),u=X0(a,i,s),d=K0(l),f=K0(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const YE={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:$E};function WE(e,t,n){var r=Li(e),i=[dr,ur].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,o=s[0],a=s[1];return o=o||0,a=(a||0)*i,[dr,jr].indexOf(r)>=0?{x:a,y:o}:{x:o,y:a}}function HE(e){var t=e.state,n=e.options,r=e.name,i=n.offset,s=i===void 0?[0,0]:i,o=j0.reduce(function(d,f){return d[f]=WE(f,t.rects,s),d},{}),a=o[t.placement],l=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=o}const ZE={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:HE};function UE(e){var t=e.state,n=e.name;t.modifiersData[n]=q0({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const zE={name:"popperOffsets",enabled:!0,phase:"read",fn:UE,data:{}};function qE(e){return e==="x"?"y":"x"}function XE(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,s=i===void 0?!0:i,o=n.altAxis,a=o===void 0?!1:o,l=n.boundary,u=n.rootBoundary,d=n.altBoundary,f=n.padding,p=n.tether,h=p===void 0?!0:p,m=n.tetherOffset,y=m===void 0?0:m,b=Oa(t,{boundary:l,rootBoundary:u,padding:f,altBoundary:d}),g=Li(t.placement),v=La(t.placement),S=!v,w=Gh(g),_=qE(w),T=t.modifiersData.popperOffsets,M=t.rects.reference,C=t.rects.popper,k=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,I=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,A={x:0,y:0};if(T){if(s){var L,V=w==="y"?ur:dr,Y=w==="y"?Nr:jr,N=w==="y"?"height":"width",j=T[w],G=j+b[V],Z=j-b[Y],W=h?-C[N]/2:0,re=v===Ia?M[N]:C[N],fe=v===Ia?-C[N]:-M[N],de=t.elements.arrow,H=h&&de?Fh(de):{width:0,height:0},Ge=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:$0(),Le=Ge[V],oe=Ge[Y],K=sc(0,M[N],H[N]),Ve=S?M[N]/2-W-K-Le-I.mainAxis:re-K-Le-I.mainAxis,Ze=S?-M[N]/2+W+K+oe+I.mainAxis:fe+K+oe+I.mainAxis,$t=t.elements.arrow&&ic(t.elements.arrow),ge=$t?w==="y"?$t.clientTop||0:$t.clientLeft||0:0,Ee=(L=O==null?void 0:O[w])!=null?L:0,_e=j+Ve-Ee-ge,Ye=j+Ze-Ee,rt=sc(h?_d(G,_e):G,j,h?Fo(Z,Ye):Z);T[w]=rt,A[w]=rt-j}if(a){var lt,J=w==="x"?ur:dr,We=w==="x"?Nr:jr,E=T[_],F=_==="y"?"height":"width",$=E+b[J],ee=E-b[We],te=[ur,dr].indexOf(g)!==-1,U=(lt=O==null?void 0:O[_])!=null?lt:0,ke=te?$:E-M[F]-C[F]-U+I.altAxis,Ue=te?E+M[F]+C[F]-U-I.altAxis:ee,ze=h&&te?SE(ke,E,Ue):sc(h?ke:$,E,h?Ue:ee);T[_]=ze,A[_]=ze-E}t.modifiersData[r]=A}}const KE={name:"preventOverflow",enabled:!0,phase:"main",fn:XE,requiresIfExists:["offset"]};function QE(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function JE(e){return e===_r(e)||!Fr(e)?Vh(e):QE(e)}function eR(e){var t=e.getBoundingClientRect(),n=Ea(t.width)/e.offsetWidth||1,r=Ea(t.height)/e.offsetHeight||1;return n!==1||r!==1}function tR(e,t,n){n===void 0&&(n=!1);var r=Fr(t),i=Fr(t)&&eR(t),s=to(t),o=Ra(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Ri(t)!=="body"||Yh(s))&&(a=JE(t)),Fr(t)?(l=Ra(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):s&&(l.x=$h(s))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function nR(e){var t=new Map,n=new Set,r=[];e.forEach(function(s){t.set(s.name,s)});function i(s){n.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||i(s)}),r}function rR(e){var t=nR(e);return hE.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function iR(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function sR(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Q0={placement:"bottom",modifiers:[],strategy:"absolute"};function J0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function oR(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,s=i===void 0?Q0:i;return function(a,l,u){u===void 0&&(u=s);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},Q0,s),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},f=[],p=!1,h={state:d,setOptions:function(g){var v=typeof g=="function"?g(d.options):g;y(),d.options=Object.assign({},s,d.options,v),d.scrollParents={reference:jo(a)?oc(a):a.contextElement?oc(a.contextElement):[],popper:oc(l)};var S=rR(sR([].concat(r,d.options.modifiers)));return d.orderedModifiers=S.filter(function(w){return w.enabled}),m(),h.update()},forceUpdate:function(){if(!p){var g=d.elements,v=g.reference,S=g.popper;if(J0(v,S)){d.rects={reference:tR(v,ic(S),d.options.strategy==="fixed"),popper:Fh(S)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(I){return d.modifiersData[I.name]=Object.assign({},I.data)});for(var w=0;w<d.orderedModifiers.length;w++){if(d.reset===!0){d.reset=!1,w=-1;continue}var _=d.orderedModifiers[w],T=_.fn,M=_.options,C=M===void 0?{}:M,k=_.name;typeof T=="function"&&(d=T({state:d,options:C,name:k,instance:h})||d)}}}},update:iR(function(){return new Promise(function(b){h.forceUpdate(),b(d)})}),destroy:function(){y(),p=!0}};if(!J0(a,l))return h;h.setOptions(u).then(function(b){!p&&u.onFirstUpdate&&u.onFirstUpdate(b)});function m(){d.orderedModifiers.forEach(function(b){var g=b.name,v=b.options,S=v===void 0?{}:v,w=b.effect;if(typeof w=="function"){var _=w({state:d,name:g,instance:h,options:S}),T=function(){};f.push(_||T)}})}function y(){f.forEach(function(b){return b()}),f=[]}return h}}var aR=[EE,zE,TE,yE,ZE,VE,KE,kE,YE],lR=oR({defaultModifiers:aR}),Hh,eS;function cR(){if(eS)return Hh;eS=1;var e=typeof Element<"u",t=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function i(s,o){if(s===o)return!0;if(s&&o&&typeof s=="object"&&typeof o=="object"){if(s.constructor!==o.constructor)return!1;var a,l,u;if(Array.isArray(s)){if(a=s.length,a!=o.length)return!1;for(l=a;l--!==0;)if(!i(s[l],o[l]))return!1;return!0}var d;if(t&&s instanceof Map&&o instanceof Map){if(s.size!==o.size)return!1;for(d=s.entries();!(l=d.next()).done;)if(!o.has(l.value[0]))return!1;for(d=s.entries();!(l=d.next()).done;)if(!i(l.value[1],o.get(l.value[0])))return!1;return!0}if(n&&s instanceof Set&&o instanceof Set){if(s.size!==o.size)return!1;for(d=s.entries();!(l=d.next()).done;)if(!o.has(l.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(s)&&ArrayBuffer.isView(o)){if(a=s.length,a!=o.length)return!1;for(l=a;l--!==0;)if(s[l]!==o[l])return!1;return!0}if(s.constructor===RegExp)return s.source===o.source&&s.flags===o.flags;if(s.valueOf!==Object.prototype.valueOf&&typeof s.valueOf=="function"&&typeof o.valueOf=="function")return s.valueOf()===o.valueOf();if(s.toString!==Object.prototype.toString&&typeof s.toString=="function"&&typeof o.toString=="function")return s.toString()===o.toString();if(u=Object.keys(s),a=u.length,a!==Object.keys(o).length)return!1;for(l=a;l--!==0;)if(!Object.prototype.hasOwnProperty.call(o,u[l]))return!1;if(e&&s instanceof Element)return!1;for(l=a;l--!==0;)if(!((u[l]==="_owner"||u[l]==="__v"||u[l]==="__o")&&s.$$typeof)&&!i(s[u[l]],o[u[l]]))return!1;return!0}return s!==s&&o!==o}return Hh=function(o,a){try{return i(o,a)}catch(l){if((l.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw l}},Hh}var uR=cR();const dR=qb(uR);var fR=[],pR=function(t,n,r){r===void 0&&(r={});var i=le.useRef(null),s={onFirstUpdate:r.onFirstUpdate,placement:r.placement||"bottom",strategy:r.strategy||"absolute",modifiers:r.modifiers||fR},o=le.useState({styles:{popper:{position:s.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),a=o[0],l=o[1],u=le.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(h){var m=h.state,y=Object.keys(m.elements);Ul.flushSync(function(){l({styles:B0(y.map(function(b){return[b,m.styles[b]||{}]})),attributes:B0(y.map(function(b){return[b,m.attributes[b]]}))})})},requires:["computeStyles"]}},[]),d=le.useMemo(function(){var p={onFirstUpdate:s.onFirstUpdate,placement:s.placement,strategy:s.strategy,modifiers:[].concat(s.modifiers,[u,{name:"applyStyles",enabled:!1}])};return dR(i.current,p)?i.current||p:(i.current=p,p)},[s.onFirstUpdate,s.placement,s.strategy,s.modifiers,u]),f=le.useRef();return A0(function(){f.current&&f.current.setOptions(d)},[d]),A0(function(){if(!(t==null||n==null)){var p=r.createPopper||lR,h=p(t,n,d);return f.current=h,function(){h.destroy(),f.current=null}}},[t,n,r.createPopper]),{state:f.current?f.current.state:null,styles:a.styles,attributes:a.attributes,update:f.current?f.current.update:null,forceUpdate:f.current?f.current.forceUpdate:null}},hR={name:"maxSize",enabled:!0,phase:"main",requiresIfExists:["offset","preventOverflow","flip"],fn:function(t){var n=t.state,r=t.name,i=t.options,s=Oa(n,i),o=n.modifiersData.preventOverflow||{x:0,y:0},a=o.x,l=o.y,u=n.rects.popper,d=u.width,f=u.height,p=n.placement.split("-"),h=p[0],m=h==="left"?"left":"right",y=h==="top"?"top":"bottom";n.modifiersData[r]={width:d-s[m]-a,height:f-s[y]-l}}},Go=[],mR=function(){return Go.some(function(e){return e.activeTargets.length>0})},gR=function(){return Go.some(function(e){return e.skippedTargets.length>0})},tS="ResizeObserver loop completed with undelivered notifications.",yR=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:tS}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=tS),window.dispatchEvent(e)},ac;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ac||(ac={}));var Vo=function(e){return Object.freeze(e)},vR=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Vo(this)}return e}(),nS=function(){function e(t,n,r,i){return this.x=t,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Vo(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,i=t.top,s=t.right,o=t.bottom,a=t.left,l=t.width,u=t.height;return{x:n,y:r,top:i,right:s,bottom:o,left:a,width:l,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Zh=function(e){return e instanceof SVGElement&&"getBBox"in e},rS=function(e){if(Zh(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,s=i.offsetWidth,o=i.offsetHeight;return!(s||o||e.getClientRects().length)},iS=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},bR=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},lc=typeof window<"u"?window:{},Md=new WeakMap,sS=/auto|scroll/,SR=/^tb|vertical/,xR=/msie|trident/i.test(lc.navigator&&lc.navigator.userAgent),Oi=function(e){return parseFloat(e||"0")},Ba=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new vR((n?t:e)||0,(n?e:t)||0)},oS=Vo({devicePixelContentBoxSize:Ba(),borderBoxSize:Ba(),contentBoxSize:Ba(),contentRect:new nS(0,0,0,0)}),aS=function(e,t){if(t===void 0&&(t=!1),Md.has(e)&&!t)return Md.get(e);if(rS(e))return Md.set(e,oS),oS;var n=getComputedStyle(e),r=Zh(e)&&e.ownerSVGElement&&e.getBBox(),i=!xR&&n.boxSizing==="border-box",s=SR.test(n.writingMode||""),o=!r&&sS.test(n.overflowY||""),a=!r&&sS.test(n.overflowX||""),l=r?0:Oi(n.paddingTop),u=r?0:Oi(n.paddingRight),d=r?0:Oi(n.paddingBottom),f=r?0:Oi(n.paddingLeft),p=r?0:Oi(n.borderTopWidth),h=r?0:Oi(n.borderRightWidth),m=r?0:Oi(n.borderBottomWidth),y=r?0:Oi(n.borderLeftWidth),b=f+u,g=l+d,v=y+h,S=p+m,w=a?e.offsetHeight-S-e.clientHeight:0,_=o?e.offsetWidth-v-e.clientWidth:0,T=i?b+v:0,M=i?g+S:0,C=r?r.width:Oi(n.width)-T-_,k=r?r.height:Oi(n.height)-M-w,I=C+b+_+v,O=k+g+w+S,A=Vo({devicePixelContentBoxSize:Ba(Math.round(C*devicePixelRatio),Math.round(k*devicePixelRatio),s),borderBoxSize:Ba(I,O,s),contentBoxSize:Ba(C,k,s),contentRect:new nS(f,l,C,k)});return Md.set(e,A),A},lS=function(e,t,n){var r=aS(e,n),i=r.borderBoxSize,s=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(t){case ac.DEVICE_PIXEL_CONTENT_BOX:return o;case ac.BORDER_BOX:return i;default:return s}},wR=function(){function e(t){var n=aS(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Vo([n.borderBoxSize]),this.contentBoxSize=Vo([n.contentBoxSize]),this.devicePixelContentBoxSize=Vo([n.devicePixelContentBoxSize])}return e}(),cS=function(e){if(rS(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},_R=function(){var e=1/0,t=[];Go.forEach(function(o){if(o.activeTargets.length!==0){var a=[];o.activeTargets.forEach(function(u){var d=new wR(u.target),f=cS(u.target);a.push(d),u.lastReportedSize=lS(u.target,u.observedBox),f<e&&(e=f)}),t.push(function(){o.callback.call(o.observer,a,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e},uS=function(e){Go.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(cS(i.target)>e?n.activeTargets.push(i):n.skippedTargets.push(i))})})},kR=function(){var e=0;for(uS(e);mR();)e=_R(),uS(e);return gR()&&yR(),e>0},Uh,dS=[],DR=function(){return dS.splice(0).forEach(function(e){return e()})},CR=function(e){if(!Uh){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return DR()}).observe(n,r),Uh=function(){n.textContent="".concat(t?t--:t++)}}dS.push(e),Uh()},MR=function(e){CR(function(){requestAnimationFrame(e)})},Td=0,TR=function(){return!!Td},IR=250,ER={attributes:!0,characterData:!0,childList:!0,subtree:!0},fS=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],pS=function(e){return e===void 0&&(e=0),Date.now()+e},zh=!1,RR=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=IR),!zh){zh=!0;var r=pS(t);MR(function(){var i=!1;try{i=kR()}finally{if(zh=!1,t=r-pS(),!TR())return;i?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,ER)};document.body?n():lc.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),fS.forEach(function(n){return lc.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),fS.forEach(function(n){return lc.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),qh=new RR,hS=function(e){!Td&&e>0&&qh.start(),Td+=e,!Td&&qh.stop()},LR=function(e){return!Zh(e)&&!bR(e)&&getComputedStyle(e).display==="inline"},OR=function(){function e(t,n){this.target=t,this.observedBox=n||ac.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=lS(this.target,this.observedBox,!0);return LR(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),BR=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),Id=new WeakMap,mS=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Ed=function(){function e(){}return e.connect=function(t,n){var r=new BR(t,n);Id.set(t,r)},e.observe=function(t,n,r){var i=Id.get(t),s=i.observationTargets.length===0;mS(i.observationTargets,n)<0&&(s&&Go.push(i),i.observationTargets.push(new OR(n,r&&r.box)),hS(1),qh.schedule())},e.unobserve=function(t,n){var r=Id.get(t),i=mS(r.observationTargets,n),s=r.observationTargets.length===1;i>=0&&(s&&Go.splice(Go.indexOf(r),1),r.observationTargets.splice(i,1),hS(-1))},e.disconnect=function(t){var n=this,r=Id.get(t);r.observationTargets.slice().forEach(function(i){return n.unobserve(t,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),AR=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Ed.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!iS(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ed.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!iS(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ed.unobserve(this,t)},e.prototype.disconnect=function(){Ed.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}(),Xh={exports:{}};/*!
|
48
|
+
Copyright (c) 2018 Jed Watson.
|
49
|
+
Licensed under the MIT License (MIT), see
|
50
|
+
http://jedwatson.github.io/classnames
|
51
|
+
*/var gS;function PR(){return gS||(gS=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)t.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(Xh)),Xh.exports}var NR=PR();const ui=qb(NR),jR=({headline:e,onClose:t,fluid:n,children:r})=>{const i=ui({"m-popover__content":!n});return c.jsx(D.Box,{children:c.jsxs("div",{className:i,children:[(e||!!t)&&c.jsxs("div",{className:"m-popover__head",children:[e,!!t&&c.jsx(D.Button,{action:"close",onClick:t,mode:"integrated",icon:"close"})]}),r]})})},FR=e=>({name:"applyMaxSize",enabled:!0,phase:"beforeWrite",requires:["maxSize"],fn({state:t}){const{width:n}=t.modifiersData.maxSize;t.styles.popper={...t.styles.popper,maxWidth:`${Math.max(e,n)}px`}}}),GR=({referenceElement:e,place:t="bottom",placeFallbacks:n,drawArrow:r=!0,children:i,minSize:s,onClickOutside:o,offset:a=0,headline:l,fluid:u,onClose:d})=>{const[f,p]=x.useState(null),[h,m]=x.useState(null),y=x.useMemo(()=>{const w=[];return r&&w.push({name:"arrow",options:{element:h}},{name:"offset",options:{offset:[0,10+a]}}),n&&w.push({name:"flip",options:{fallbackPlacements:n}}),s&&w.push(hR,FR(s)),{placement:t,strategy:"fixed",modifiers:w}},[r,h,n,s,t,a]),{styles:b,attributes:g,forceUpdate:v}=pR(e,f,y);D.useOutsideClickListener({enabled:!0,elements:[e,f],onOutsideClick:o}),x.useEffect(()=>{if(f&&v){const w=new AR(v);return w.observe(f),()=>{w.unobserve(f)}}},[f,v]);const S=["shell_popup",!!d&&"-close-button"].filter(Boolean).join(" ");return Ul.createPortal(c.jsxs("div",{ref:p,className:S,style:b.popper,...g.popper,children:[r&&c.jsx("div",{ref:m,className:"shell_popup__arrow",style:b.arrow}),c.jsx(jR,{headline:l,onClose:d,fluid:u,children:i})]}),document.body)},VR=e=>le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 192 192",...e},le.createElement("path",{d:"M96 176c-44.112 0-80-35.888-80-80s35.888-80 80-80 80 35.888 80 80-35.888 80-80 80zm0-152c-39.701 0-72 32.299-72 72s32.299 72 72 72 72-32.299 72-72-32.299-72-72-72zm-7.1 39.1c0-3.9 3.2-7.1 7.1-7.1 4 0 7.1 3.1 7.1 7.1s-3.1 7.1-7.1 7.1c-3.9 0-7.1-3.2-7.1-7.1zm1.85 17.3h10.5V136h-10.5V80.4z"}));function yS(){const[e,t]=x.useState(!1),n=x.useCallback(()=>t(!1),[]),r=x.useCallback(()=>t(i=>!i),[]);return[e,n,r]}const $R=(e,t="600",n="16px")=>{const r=document.createElement("span");r.style.visibility="hidden",r.style.position="absolute",r.style.whiteSpace="nowrap",r.style.fontWeight=t,r.style.fontSize=n,r.style.fontFamily=getComputedStyle(document.body).fontFamily,r.textContent=e,document.body.appendChild(r);const i=r.getBoundingClientRect().width;return document.body.removeChild(r),i+40},Cn=({popoverHeading:e,fontSize:t=24,tooltipText:n="More Information",popupStyle:r,children:i})=>{const[s,o]=x.useState(null),[a,l,u]=yS(),[d,f]=x.useState(400),p=x.useMemo(()=>({width:t,height:t}),[t]);x.useLayoutEffect(()=>{if(a&&e){const m=$R(e),y=Math.max(400,m);f(y)}},[a,e]);const h=x.useMemo(()=>({...r,maxWidth:`${d}px`}),[r,d]);return c.jsxs(c.Fragment,{children:[c.jsx("button",{ref:o,className:"shell_info-button",style:p,title:n,type:"button",onClick:u,children:c.jsx(VR,{})}),a&&c.jsx(GR,{referenceElement:s,place:"bottom",placeFallbacks:["bottom","left","top","right"],onClickOutside:l,headline:e,onClose:l,children:c.jsx("div",{style:h,className:"shell_info-button__popover-content",children:c.jsx("div",{className:"m-popover__paragraph",children:i})})})]})},vS=e=>typeof e=="object"&&e!=null&&e.nodeType===1,bS=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",Kh=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return bS(n.overflowY,t)||bS(n.overflowX,t)||(r=>{const i=(s=>{if(!s.ownerDocument||!s.ownerDocument.defaultView)return null;try{return s.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(e)}return!1},Rd=(e,t,n,r,i,s,o,a)=>s<e&&o>t||s>e&&o<t?0:s<=e&&a<=n||o>=t&&a>=n?s-e-r:o>t&&a<n||s<e&&a>n?o-t+i:0,YR=e=>{const t=e.parentElement;return t??(e.getRootNode().host||null)},SS=(e,t)=>{var n,r,i,s;if(typeof document>"u")return[];const{scrollMode:o,block:a,inline:l,boundary:u,skipOverflowHiddenElements:d}=t,f=typeof u=="function"?u:N=>N!==u;if(!vS(e))throw new TypeError("Invalid target");const p=document.scrollingElement||document.documentElement,h=[];let m=e;for(;vS(m)&&f(m);){if(m=YR(m),m===p){h.push(m);break}m!=null&&m===document.body&&Kh(m)&&!Kh(document.documentElement)||m!=null&&Kh(m,d)&&h.push(m)}const y=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,b=(s=(i=window.visualViewport)==null?void 0:i.height)!=null?s:innerHeight,{scrollX:g,scrollY:v}=window,{height:S,width:w,top:_,right:T,bottom:M,left:C}=e.getBoundingClientRect(),{top:k,right:I,bottom:O,left:A}=(N=>{const j=window.getComputedStyle(N);return{top:parseFloat(j.scrollMarginTop)||0,right:parseFloat(j.scrollMarginRight)||0,bottom:parseFloat(j.scrollMarginBottom)||0,left:parseFloat(j.scrollMarginLeft)||0}})(e);let L=a==="start"||a==="nearest"?_-k:a==="end"?M+O:_+S/2-k+O,V=l==="center"?C+w/2-A+I:l==="end"?T+I:C-A;const Y=[];for(let N=0;N<h.length;N++){const j=h[N],{height:G,width:Z,top:W,right:re,bottom:fe,left:de}=j.getBoundingClientRect();if(o==="if-needed"&&_>=0&&C>=0&&M<=b&&T<=y&&_>=W&&M<=fe&&C>=de&&T<=re)return Y;const H=getComputedStyle(j),Ge=parseInt(H.borderLeftWidth,10),Le=parseInt(H.borderTopWidth,10),oe=parseInt(H.borderRightWidth,10),K=parseInt(H.borderBottomWidth,10);let Ve=0,Ze=0;const $t="offsetWidth"in j?j.offsetWidth-j.clientWidth-Ge-oe:0,ge="offsetHeight"in j?j.offsetHeight-j.clientHeight-Le-K:0,Ee="offsetWidth"in j?j.offsetWidth===0?0:Z/j.offsetWidth:0,_e="offsetHeight"in j?j.offsetHeight===0?0:G/j.offsetHeight:0;if(p===j)Ve=a==="start"?L:a==="end"?L-b:a==="nearest"?Rd(v,v+b,b,Le,K,v+L,v+L+S,S):L-b/2,Ze=l==="start"?V:l==="center"?V-y/2:l==="end"?V-y:Rd(g,g+y,y,Ge,oe,g+V,g+V+w,w),Ve=Math.max(0,Ve+v),Ze=Math.max(0,Ze+g);else{Ve=a==="start"?L-W-Le:a==="end"?L-fe+K+ge:a==="nearest"?Rd(W,fe,G,Le,K+ge,L,L+S,S):L-(W+G/2)+ge/2,Ze=l==="start"?V-de-Ge:l==="center"?V-(de+Z/2)+$t/2:l==="end"?V-re+oe+$t:Rd(de,re,Z,Ge,oe+$t,V,V+w,w);const{scrollLeft:Ye,scrollTop:rt}=j;Ve=_e===0?0:Math.max(0,Math.min(rt+Ve/_e,j.scrollHeight-G/_e+ge)),Ze=Ee===0?0:Math.max(0,Math.min(Ye+Ze/Ee,j.scrollWidth-Z/Ee+$t)),L+=rt-Ve,V+=Ye-Ze}Y.push({el:j,top:Ve,left:Ze})}return Y},WR=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function HR(e,t){if(!e.isConnected||!(i=>{let s=i;for(;s&&s.parentNode;){if(s.parentNode===document)return!0;s=s.parentNode instanceof ShadowRoot?s.parentNode.host:s.parentNode}return!1})(e))return;const n=(i=>{const s=window.getComputedStyle(i);return{top:parseFloat(s.scrollMarginTop)||0,right:parseFloat(s.scrollMarginRight)||0,bottom:parseFloat(s.scrollMarginBottom)||0,left:parseFloat(s.scrollMarginLeft)||0}})(e);if((i=>typeof i=="object"&&typeof i.behavior=="function")(t))return t.behavior(SS(e,t));const r=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:i,top:s,left:o}of SS(e,WR(t))){const a=s-n.top+n.bottom,l=o-n.left+n.right;i.scroll({top:a,left:l,behavior:r})}}const ZR=({href:e})=>e?c.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:c.jsx(D.Icon,{className:"console_error-state-external-icon",iconName:"external-link",title:"More information"})}):null,pe=({error:e,messageResolver:t,actions:n})=>{const r=x.useRef(),[i,s]=x.useState(!1);if(x.useEffect(()=>{e&&r.current&&!i&&(HR(r.current,{scrollMode:"if-needed",inline:"center",block:"center",behavior:"auto"}),s(!0))},[e,r,i]),!e)return null;let o;return t&&(o=t(e)),!o&&e.message&&(o=e.message),!o&&e.code&&(o=`Error had no message, status code was ${e.code}`),o||(o="Unknown error"),c.jsxs(D.Notification,{ref:r,type:"error",className:"console_error-state-link",children:[o," ",e.infoLink!==null?c.jsx(ZR,{href:e.infoLink}):null,n&&c.jsx(c.Fragment,{children:n})]})},et=le.forwardRef(({children:e,...t},n)=>c.jsx("div",{...t,ref:n,style:{display:"flex",justifyContent:"center",padding:"1rem"},children:c.jsx(D.ActivityIndicator,{size:"small",placeholder:void 0,onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0})}));async function UR(e){"clipboard"in navigator?await navigator.clipboard.writeText(e):document.execCommand("copy",!0,e)}function xS({title:e="Copy to clipboard",value:t="",className:n}){const[r,i]=x.useState("copy"),s=x.useRef();x.useEffect(()=>()=>{window.clearTimeout(s.current)},[]);async function o(){await UR(t),i("checkmark"),window.clearTimeout(s.current),s.current=window.setTimeout(()=>{i("copy"),s.current=void 0},800)}return c.jsx("button",{className:ui("bosh_copy-to-clip-button",n),title:e,onClick:o,children:c.jsx(D.Icon,{iconName:r})})}const Mn=({label:e,help:t,popoverHeading:n,children:r,className:i,...s})=>c.jsxs("section",{...s,className:`bosh_section-group ${i}`,children:[c.jsxs("h2",{children:[c.jsx("strong",{children:e}),t&&c.jsx(Cn,{popoverHeading:n,children:t})]}),r]});function zR(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Qh(e,t){return Qh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Qh(e,t)}function qR(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Qh(e,t)}var Ld={exports:{}},Lt={};/** @license React v17.0.2
|
52
|
+
* react-is.production.min.js
|
53
|
+
*
|
54
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
55
|
+
*
|
56
|
+
* This source code is licensed under the MIT license found in the
|
57
|
+
* LICENSE file in the root directory of this source tree.
|
58
|
+
*/var wS;function XR(){if(wS)return Lt;wS=1;var e=60103,t=60106,n=60107,r=60108,i=60114,s=60109,o=60110,a=60112,l=60113,u=60120,d=60115,f=60116,p=60121,h=60122,m=60117,y=60129,b=60131;if(typeof Symbol=="function"&&Symbol.for){var g=Symbol.for;e=g("react.element"),t=g("react.portal"),n=g("react.fragment"),r=g("react.strict_mode"),i=g("react.profiler"),s=g("react.provider"),o=g("react.context"),a=g("react.forward_ref"),l=g("react.suspense"),u=g("react.suspense_list"),d=g("react.memo"),f=g("react.lazy"),p=g("react.block"),h=g("react.server.block"),m=g("react.fundamental"),y=g("react.debug_trace_mode"),b=g("react.legacy_hidden")}function v(L){if(typeof L=="object"&&L!==null){var V=L.$$typeof;switch(V){case e:switch(L=L.type,L){case n:case i:case r:case l:case u:return L;default:switch(L=L&&L.$$typeof,L){case o:case a:case f:case d:case s:return L;default:return V}}case t:return V}}}var S=s,w=e,_=a,T=n,M=f,C=d,k=t,I=i,O=r,A=l;return Lt.ContextConsumer=o,Lt.ContextProvider=S,Lt.Element=w,Lt.ForwardRef=_,Lt.Fragment=T,Lt.Lazy=M,Lt.Memo=C,Lt.Portal=k,Lt.Profiler=I,Lt.StrictMode=O,Lt.Suspense=A,Lt.isAsyncMode=function(){return!1},Lt.isConcurrentMode=function(){return!1},Lt.isContextConsumer=function(L){return v(L)===o},Lt.isContextProvider=function(L){return v(L)===s},Lt.isElement=function(L){return typeof L=="object"&&L!==null&&L.$$typeof===e},Lt.isForwardRef=function(L){return v(L)===a},Lt.isFragment=function(L){return v(L)===n},Lt.isLazy=function(L){return v(L)===f},Lt.isMemo=function(L){return v(L)===d},Lt.isPortal=function(L){return v(L)===t},Lt.isProfiler=function(L){return v(L)===i},Lt.isStrictMode=function(L){return v(L)===r},Lt.isSuspense=function(L){return v(L)===l},Lt.isValidElementType=function(L){return typeof L=="string"||typeof L=="function"||L===n||L===i||L===y||L===r||L===l||L===u||L===b||typeof L=="object"&&L!==null&&(L.$$typeof===f||L.$$typeof===d||L.$$typeof===s||L.$$typeof===o||L.$$typeof===a||L.$$typeof===m||L.$$typeof===p||L[0]===h)},Lt.typeOf=v,Lt}var Ot={},_S;function KR(){if(_S)return Ot;_S=1;var e=[];/** @license React v17.0.2
|
59
|
+
* react-is.development.js
|
60
|
+
*
|
61
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
62
|
+
*
|
63
|
+
* This source code is licensed under the MIT license found in the
|
64
|
+
* LICENSE file in the root directory of this source tree.
|
65
|
+
*/return e.NODE_ENV!=="production"&&function(){var t=60103,n=60106,r=60107,i=60108,s=60114,o=60109,a=60110,l=60112,u=60113,d=60120,f=60115,p=60116,h=60121,m=60122,y=60117,b=60129,g=60131;if(typeof Symbol=="function"&&Symbol.for){var v=Symbol.for;t=v("react.element"),n=v("react.portal"),r=v("react.fragment"),i=v("react.strict_mode"),s=v("react.profiler"),o=v("react.provider"),a=v("react.context"),l=v("react.forward_ref"),u=v("react.suspense"),d=v("react.suspense_list"),f=v("react.memo"),p=v("react.lazy"),h=v("react.block"),m=v("react.server.block"),y=v("react.fundamental"),v("react.scope"),v("react.opaque.id"),b=v("react.debug_trace_mode"),v("react.offscreen"),g=v("react.legacy_hidden")}var S=!1;function w(ge){return!!(typeof ge=="string"||typeof ge=="function"||ge===r||ge===s||ge===b||ge===i||ge===u||ge===d||ge===g||S||typeof ge=="object"&&ge!==null&&(ge.$$typeof===p||ge.$$typeof===f||ge.$$typeof===o||ge.$$typeof===a||ge.$$typeof===l||ge.$$typeof===y||ge.$$typeof===h||ge[0]===m))}function _(ge){if(typeof ge=="object"&&ge!==null){var Ee=ge.$$typeof;switch(Ee){case t:var _e=ge.type;switch(_e){case r:case s:case i:case u:case d:return _e;default:var Ye=_e&&_e.$$typeof;switch(Ye){case a:case l:case p:case f:case o:return Ye;default:return Ee}}case n:return Ee}}}var T=a,M=o,C=t,k=l,I=r,O=p,A=f,L=n,V=s,Y=i,N=u,j=!1,G=!1;function Z(ge){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(ge){return G||(G=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function re(ge){return _(ge)===a}function fe(ge){return _(ge)===o}function de(ge){return typeof ge=="object"&&ge!==null&&ge.$$typeof===t}function H(ge){return _(ge)===l}function Ge(ge){return _(ge)===r}function Le(ge){return _(ge)===p}function oe(ge){return _(ge)===f}function K(ge){return _(ge)===n}function Ve(ge){return _(ge)===s}function Ze(ge){return _(ge)===i}function $t(ge){return _(ge)===u}Ot.ContextConsumer=T,Ot.ContextProvider=M,Ot.Element=C,Ot.ForwardRef=k,Ot.Fragment=I,Ot.Lazy=O,Ot.Memo=A,Ot.Portal=L,Ot.Profiler=V,Ot.StrictMode=Y,Ot.Suspense=N,Ot.isAsyncMode=Z,Ot.isConcurrentMode=W,Ot.isContextConsumer=re,Ot.isContextProvider=fe,Ot.isElement=de,Ot.isForwardRef=H,Ot.isFragment=Ge,Ot.isLazy=Le,Ot.isMemo=oe,Ot.isPortal=K,Ot.isProfiler=Ve,Ot.isStrictMode=Ze,Ot.isSuspense=$t,Ot.isValidElementType=w,Ot.typeOf=_}(),Ot}var kS;function QR(){if(kS)return Ld.exports;kS=1;var e=[];return e.NODE_ENV==="production"?Ld.exports=XR():Ld.exports=KR(),Ld.exports}var JR=QR(),e2=[],no=function(t,n){if(e2.NODE_ENV!=="production"&&typeof t=="string")throw new Error("We do not support refs as string, this is a legacy API and will be likely to be removed in one of the future releases of React.");if(typeof t=="function"){t(n);return}t!==null&&typeof t=="object"&&(t.current=n)},DS=[],t2=["children","innerRef"];function CS(e){return e===null||e instanceof Element||e instanceof Text?!1:!!(e.type&&e.tag)}var n2=function(e){qR(t,e);function t(){for(var r,i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];return r=e.call.apply(e,[this].concat(s))||this,r.prevNode=void 0,r.currentNode=void 0,r.state={kind:null},r.handleForwardRefOverride=function(a){var l=r.props,u=l.children,d=l.innerRef;no(u.ref,a),no(d,a),r.currentNode=a},r.handleSelfOverride=function(a){var l=r.props,u=l.children,d=l.innerRef;no(u.props.innerRef,a),no(d,a)},r}t.getDerivedStateFromProps=function(i){var s=le.Children.only(i.children);return s.type===t?{kind:"self"}:JR.isForwardRef(s)?{kind:"forward"}:{kind:"find"}};var n=t.prototype;return n.componentDidMount=function(){if(this.state.kind==="find"){var i=Ul.findDOMNode(this);DS.NODE_ENV!=="production"&&CS(i)&&(i=null),this.prevNode=i,no(this.props.innerRef,i)}},n.componentDidUpdate=function(i){if(this.state.kind==="forward")i.innerRef!==this.props.innerRef&&no(this.props.innerRef,this.currentNode);else if(this.state.kind==="find"){var s=Ul.findDOMNode(this);DS.NODE_ENV!=="production"&&CS(s)&&(s=null);var o=this.prevNode!==s,a=i.innerRef!==this.props.innerRef;o&&(this.prevNode=s),(o||a)&&no(this.props.innerRef,s)}},n.componentWillUnmount=function(){this.state.kind==="forward"?delete this.currentNode:this.state.kind==="find"&&(no(this.props.innerRef,null),delete this.prevNode)},n.render=function(){var i=this.props,s=i.children;i.innerRef;var o=zR(i,t2),a=o&&Object.keys(o).length>0?le.cloneElement(s,o):s;return this.state.kind==="find"?a:this.state.kind==="forward"?le.cloneElement(a,{ref:this.handleForwardRefOverride}):this.state.kind==="self"?le.cloneElement(a,{innerRef:this.handleSelfOverride}):null},t}(le.Component),Jh,MS;function r2(){if(MS)return Jh;MS=1;var e="Expected a function",t=NaN,n="[object Symbol]",r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,l=typeof Br=="object"&&Br&&Br.Object===Object&&Br,u=typeof self=="object"&&self&&self.Object===Object&&self,d=l||u||Function("return this")(),f=Object.prototype,p=f.toString,h=Math.max,m=Math.min,y=function(){return d.Date.now()};function b(_,T,M){var C,k,I,O,A,L,V=0,Y=!1,N=!1,j=!0;if(typeof _!="function")throw new TypeError(e);T=w(T)||0,g(M)&&(Y=!!M.leading,N="maxWait"in M,I=N?h(w(M.maxWait)||0,T):I,j="trailing"in M?!!M.trailing:j);function G(oe){var K=C,Ve=k;return C=k=void 0,V=oe,O=_.apply(Ve,K),O}function Z(oe){return V=oe,A=setTimeout(fe,T),Y?G(oe):O}function W(oe){var K=oe-L,Ve=oe-V,Ze=T-K;return N?m(Ze,I-Ve):Ze}function re(oe){var K=oe-L,Ve=oe-V;return L===void 0||K>=T||K<0||N&&Ve>=I}function fe(){var oe=y();if(re(oe))return de(oe);A=setTimeout(fe,W(oe))}function de(oe){return A=void 0,j&&C?G(oe):(C=k=void 0,O)}function H(){A!==void 0&&clearTimeout(A),V=0,C=L=k=A=void 0}function Ge(){return A===void 0?O:de(y())}function Le(){var oe=y(),K=re(oe);if(C=arguments,k=this,L=oe,K){if(A===void 0)return Z(L);if(N)return A=setTimeout(fe,T),G(L)}return A===void 0&&(A=setTimeout(fe,T)),O}return Le.cancel=H,Le.flush=Ge,Le}function g(_){var T=typeof _;return!!_&&(T=="object"||T=="function")}function v(_){return!!_&&typeof _=="object"}function S(_){return typeof _=="symbol"||v(_)&&p.call(_)==n}function w(_){if(typeof _=="number")return _;if(S(_))return t;if(g(_)){var T=typeof _.valueOf=="function"?_.valueOf():_;_=g(T)?T+"":T}if(typeof _!="string")return _===0?_:+_;_=_.replace(r,"");var M=s.test(_);return M||o.test(_)?a(_.slice(2),M?2:8):i.test(_)?t:+_}return Jh=b,Jh}r2();var TS=typeof window<"u"?x.useLayoutEffect:x.useEffect;function em(e,t,n,r){const i=x.useRef(t);TS(()=>{i.current=t},[t]),x.useEffect(()=>{const s=window;if(!(s&&s.addEventListener))return;const o=a=>{i.current(a)};return s.addEventListener(e,o,r),()=>{s.removeEventListener(e,o,r)}},[e,n,r])}function i2(e){const t=x.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return TS(()=>{t.current=e},[e]),x.useCallback((...n)=>t.current(...n),[t])}var IS=typeof window>"u";function s2(e,t,n={}){const{initializeWithValue:r=!0}=n,i=x.useCallback(f=>n.serializer?n.serializer(f):JSON.stringify(f),[n]),s=x.useCallback(f=>{if(n.deserializer)return n.deserializer(f);if(f==="undefined")return;const p=t instanceof Function?t():t;let h;try{h=JSON.parse(f)}catch(m){return console.error("Error parsing JSON:",m),p}return h},[n,t]),o=x.useCallback(()=>{const f=t instanceof Function?t():t;if(IS)return f;try{const p=window.localStorage.getItem(e);return p?s(p):f}catch(p){return console.warn(`Error reading localStorage key “${e}”:`,p),f}},[t,e,s]),[a,l]=x.useState(()=>r?o():t instanceof Function?t():t),u=i2(f=>{IS&&console.warn(`Tried setting localStorage key “${e}” even though environment is not a client`);try{const p=f instanceof Function?f(o()):f;window.localStorage.setItem(e,i(p)),l(p),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}catch(p){console.warn(`Error setting localStorage key “${e}”:`,p)}});x.useEffect(()=>{l(o())},[e]);const d=x.useCallback(f=>{f!=null&&f.key&&f.key!==e||l(o())},[e,o]);return em("storage",d),em("local-storage",d),[a,u]}function o2(e,t){const[n,r]=x.useState(e);return x.useEffect(()=>{const i=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(i)}},[e,t]),n}function ES(e,t,n="mousedown"){em(n,r=>{const i=r.target;if(!i||!i.isConnected)return;(Array.isArray(e)?e.every(o=>o.current&&!o.current.contains(i)):e.current&&!e.current.contains(i))&&t(r)})}const a2=e=>{function t(){const s=Object.getOwnPropertyDescriptor(e,"value");s&&s.configurable&&e.hasOwnProperty("value")}const n=Object.getOwnPropertyDescriptor(e,"value");let r=new Event("focus",{bubbles:!0});e.dispatchEvent(r);const i=e.value;e.value=i+"#",t(),e.value=i,r=new Event("input",{bubbles:!0}),e.dispatchEvent(r),n&&Object.defineProperty(e,"value",n)},l2=(e,t)=>{const n=t.toUpperCase().indexOf(e.toUpperCase()),r=n+e.length;return[n,r]},tm=e=>typeof e>"u";function c2(e){var V,Y,N,j,G,Z;const{suggestions:t,open:n,defaultOpen:r,onOpenChange:i,children:s,className:o,onSuggestionSelect:a,noResultsLabel:l,...u}=e,[d,f]=x.useState(null),[p,h]=D.useAutoControlled({value:n,defaultValue:r,initialValue:!1});function m(W){h(W),i==null||i(W)}const[y,b]=x.useState(tm((V=s==null?void 0:s.props)==null?void 0:V.value)?tm((Y=s==null?void 0:s.props)==null?void 0:Y.defaultValue)?"":s.props.defaultValue:s.props.value),[g,v]=x.useState(y),S=D.usePrevious((N=s==null?void 0:s.props)==null?void 0:N.value),w=x.useRef(null),_=x.useRef(null);!tm((j=s==null?void 0:s.props)==null?void 0:j.value)&&S!==((G=s==null?void 0:s.props)==null?void 0:G.value)&&((Z=s==null?void 0:s.props)==null?void 0:Z.value)!==g&&(b(s.props.value),v(s.props.value)),n===void 0&&p&&!(t!=null&&t.length)&&m(!1);const T=()=>{var W;f(null),m(!1),(W=_.current)==null||W.focus()},M=W=>{if(W.value){const{value:re}=W.value;v(re)}f(W.value??null),m(!0)},C=()=>{v(y),T()},k=W=>{if(W){if(typeof a=="function"&&a(W),W.noCloseHandling)return;_.current&&a2(_.current)}T()},I=W=>{if(W.defaultPrevented)return;const{key:re}=W,fe=t==null?void 0:t.findIndex(de=>de.value===(d==null?void 0:d.value));switch(re){case"ArrowUp":W.preventDefault();const de=(t==null?void 0:t[(fe??0)-1])||(t==null?void 0:t[t.length-1]);M({value:de});break;case"ArrowDown":W.preventDefault();const H=(t==null?void 0:t[(fe??-1)+1])||(t==null?void 0:t[0]);M({value:H});break;case"Enter":p&&(W.preventDefault(),k(d));break;case"Escape":p&&(W.preventDefault(),C());break}};ES(w,W=>{var re,fe;(fe=(re=_.current)==null?void 0:re.parentNode)!=null&&fe.contains(W.target)||k(d)});const O=x.cloneElement(s??c.jsx(c.Fragment,{}),{...s==null?void 0:s.props,defaultValue:void 0,value:g,autoComplete:"off",onChange:W=>{var re,fe;(fe=(re=s==null?void 0:s.props)==null?void 0:re.onChange)==null||fe.call(re,W),W.isDefaultPrevented()||(v(W.target.value),b(W.target.value),m(((t==null?void 0:t.length)??0)>0))},onKeyDown:W=>{var re,fe;(fe=(re=s==null?void 0:s.props)==null?void 0:re.onKeyDown)==null||fe.call(re,W),W.isDefaultPrevented()||I(W)}}),A=W=>{const{value:re}=W,[fe,de]=l2(y,re);return fe>-1?c.jsxs(c.Fragment,{children:[re.substring(0,fe),c.jsx("em",{children:re.substring(fe,de)}),re.substring(de)]}):re},L=W=>{const re=typeof W.renderItem=="function"?W.renderItem:A;return x.createElement(u2,{...W,value:W,key:W.value,active:(d==null?void 0:d.value)===W.value,onClick:()=>k(W),onFocus:M},re(W))};return c.jsxs("div",{...u,className:ui("shell-suggestion-field-container",o),children:[c.jsx(n2,{innerRef:_,children:O}),p&&c.jsx(D.SearchSuggestions,{className:ui("shell-suggestion-field-box",{"-open":p}),onKeyDown:I,role:"listbox",ref:w,children:t!=null&&t.length?t.map(L):[c.jsx("div",{className:"console_multi-dropdown__empty-search",children:l},"empty")]})]})}function u2(e){const{active:t,className:n,onClick:r,onFocus:i,value:s,children:o}=e,a=x.useRef();x.useEffect(()=>{a.current&&t&&a.current.focus()},[t]);const l=d=>{r==null||r(e,d)},u=d=>{i==null||i(e,d)};return c.jsx(D.Link,{title:s.value,role:"option",as:"span",level:"integrated",...s==null?void 0:s.link,className:ui("shell-suggestion-field-item",{"-active":t},n),tabIndex:0,onClick:l,onFocus:u,ref:a,children:o})}function RS(e){return c.jsx(D.Button,{mode:"integrated",className:"suggestion-box-button",...e})}const ne=({header:e,value:t,showCopy:n=!1,showTitle:r=!0,children:i,icon:s,popoverHeading:o,help:a,expandable:l=!1,expanded:u,controlledExpanded:d,onControlledExpandedChange:f,tooltip:p,className:h})=>{const[m,y]=D.useAutoControlled({value:d,defaultValue:u,initialValue:!0}),b=x.useRef(f);b.current=f;const g=x.useMemo(()=>l?c.jsxs("button",{"data-testid":"section-expander",className:"bosh-labelled-section--expander",onClick:()=>{var S;y(!m),(S=b.current)==null||S.call(b,!m)},children:[c.jsx(D.Icon,{iconName:m?"up":"down"}),e]}):e,[l,e,m,y]),v=ui("shell_margin-bottom","bosh-labelled-section--container",{"bosh-labelled-section--expandable":l,"bosh-labelled-section--collapsed":l&&!m},h);return c.jsxs("section",{className:v,"aria-label":e,children:[c.jsxs("h3",{className:"bosh-labelled-section--header",children:[g,a&&c.jsx(Cn,{popoverHeading:o,fontSize:16,children:a})]}),c.jsxs("div",{className:"bosh-labelled-section",children:[s,i||c.jsx("span",{title:r?p??t:void 0,children:t}),n&&c.jsx("div",{className:"bosh-labelled-section--copy-icon",children:c.jsx(xS,{value:t})})]})]})},d2="|",f2="by",Tn=x.forwardRef(function({value:t,category:n,multiValueOperator:r=d2,prefix:i=f2,title:s,onClose:o,children:a,...l},u){let d=1,f,p=s;if(typeof t=="string")f=n?LS(i,n):t,p||(p=t);else{if(d=t.length,!n)throw new Error("Invalid argument. A category must be provided for multiple values.");f=d>1?LS(i,n):t[0],s||(p=t.join(` ${r} `))}return c.jsxs(c.Fragment,{children:[c.jsx(D.Chip,{selected:!0,...l,ref:u,label:f,title:p,buttonClose:!!o,onClose:o}),d>1?c.jsx("sub",{style:{bottom:"1rem",right:"1rem"},children:c.jsx(D.Badge,{label:`${d}`,type:"error"})}):null]})});function LS(e,t){return`${e} ${t}`}function p2(e,t,n=[],r=!1){const[i,s]=x.useState(()=>{let a;return r||(a=h2(e,t)),a??n}),o=x.useCallback(a=>{s(a),r||m2(a,e,t)},[e,t,r]);return[i,o]}function h2(e,t){const n=localStorage.getItem(e);try{const r=n&&JSON.parse(n),i=r&&r[t];if(i)return i}catch(r){console.warn(`Could not parse local storage item: ${t}`,r)}}function m2(e,t,n){const r=localStorage.getItem(t),i=r&&JSON.parse(r)||{};i[`${n}`]=e,localStorage.setItem(t,JSON.stringify(i))}function g2(e,t,n=[],r=!1){const[i,s]=x.useState(()=>{let a;return r||(a=y2(e,t)),a??n}),o=x.useCallback(a=>{s(a),r||v2(a,e,t)},[e,t,r]);return[i,o]}function y2(e,t){const n=localStorage.getItem(e);try{const r=n&&JSON.parse(n),i=r&&r[t];if(i)return i}catch(r){console.warn(`Could not parse local storage item: ${t}`,r)}}function v2(e,t,n){const r=localStorage.getItem(t),i=r&&JSON.parse(r)||{};i[`${n}`]=e,localStorage.setItem(t,JSON.stringify(i))}function b2(e,t,n){const r=x.useMemo(()=>S2(e),[e]),[i,s]=p2(t,n,r);return{selectedColumnIds:i,setSelectedColumnIds:s}}function S2(e){return e.filter(t=>t.data.isDefault).map(t=>t.data.columnId)}function x2(e){const{columns:t,textGroupTitle:n,iconGroupTitle:r}=e;return x.useMemo(()=>w2(t,n,r),[t,n,r])}function w2(e,t,n){const r=[],i=[];for(const o of e){if(o.data.isStaticColumn)continue;const a={columnId:o.data.columnId,header:o.header,isDefault:o.data.isDefault};o.data.isIcon?r.push(a):i.push(a)}const s=[];return i.length>0&&s.push({title:t,items:i}),r.length>0&&s.push({title:n,items:r}),s}let _2=0;const k2=()=>_2++;function D2(){const e=x.useRef();return e.current===void 0&&(e.current=k2()),`id-${e.current}`}const C2=({columnGroups:e,selectedIds:t,onChange:n,header:r,settingsTooltip:i,searchPlaceholder:s="Search",resetButtonTitle:o="Reset"})=>{const[a,l]=x.useState(""),u=D2(),d=x.useRef(T2(e)),f=()=>{const v=e.flatMap(S=>S.items).filter(S=>S.isDefault).map(S=>S.columnId);n(v)},p=x.useMemo(()=>I2(e,a),[e,a]),[h,m,y]=yS(),b=x.useMemo(()=>p.flatMap(g=>g.items.map(v=>v.header)),[p]);return c.jsxs(D.ContextMenu,{placeholder:void 0,onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0,open:h,trigger:c.jsx(D.Button,{onClick:y,icon:"settings",title:i,mode:"integrated"}),popover:{position:"bottom-right",triggerOffset:8,onOutsideClick:m,className:"shell_context-menu-popover"},children:[r&&c.jsx(D.ContextMenu.Item,{children:c.jsx(D.ContextMenu.Link,{children:r})}),c.jsx(D.ContextMenu.Item,{title:"Search",className:"shell-menu-item",children:c.jsxs(c.Fragment,{children:[c.jsx(D.TextField,{autoFocus:!0,id:"search-columns",placeholder:s,value:a,onChange:g=>l(g.target.value)}),c.jsx(D.Button,{title:o,"data-testid":"reset-columns",icon:"reset",mode:"integrated",onClick:f})]})}),c.jsx(D.Divider,{}),p.map((g,v)=>{const S=d.current[g.title]??D.ContextMenu.Group,w=g.component?{hide:m,columnNames:b,showColumn:_=>{n([...t,_])}}:{};return c.jsxs(S,{label:g.title,defaultExpanded:!0,...w,children:[g.items.map(_=>c.jsx(M2,{column:_,selectedIds:t,onChange:n,hide:m,columnNames:b,refreshColumnName:w.showColumn,prefixKey:u},_.columnId)),p.length>0?c.jsx(D.Divider,{}):null]},`${u}-group-${v}`)})]})};function M2({column:e,selectedIds:t,onChange:n,hide:r,columnNames:i,refreshColumnName:s,prefixKey:o}){const a=d=>{n(d?[...t,e.columnId]:t.filter(f=>e.columnId!==f))},l=e.component??D.ContextMenu.Item,u=e.component?{columnId:e.columnId,showColumn:a,hide:r,columnNames:i,refreshColumnName:s}:{};return c.jsx(l,{...u,children:c.jsx(D.Checkbox,{label:e.header,title:e.header,id:o+"-"+e.columnId,checked:t.includes(e.columnId),onChange:d=>a(d.target.checked),className:"shell-menu-item",role:"menuitem"})})}function T2(e){const t={};for(const n of e.filter(r=>r.component))t[n.title]=n.component;return t}function I2(e,t){const n=t.trim().toLowerCase(),r=[];return e.forEach(i=>{const s=[];i.items.forEach(o=>{(o.header.trim().toLowerCase().includes(n)||t==="")&&s.push(o)}),(s.length>0||i.preventHide)&&r.push({...i,items:s})}),r}function nm({label:e,children:t,...n}){return c.jsx("a",{target:"_blank",rel:"noopener noreferrer",...n,children:t??e})}function $o(){return $o=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},$o.apply(this,arguments)}const E2=["children","options"],OS=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),BS={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},R2=["style","script"],L2=["src","href","data","formAction","srcDoc","action"],O2=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,B2=/mailto:/i,A2=/\n{2,}$/,AS=/^(\s*>[\s\S]*?)(?=\n\n|$)/,P2=/^ *> ?/gm,N2=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,j2=/^ {2,}\n/,F2=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,PS=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,NS=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,G2=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,V2=/^(?:\n *)*\n/,$2=/\r\n?/g,Y2=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,W2=/^\[\^([^\]]+)]/,H2=/\f/g,Z2=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,U2=/^\s*?\[(x|\s)\]/,jS=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,FS=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,GS=/^([^\n]+)\n *(=|-){3,} *\n/,rm=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,z2=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,VS=/^<!--[\s\S]*?(?:-->)/,q2=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,im=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,X2=/^\{.*\}$/,K2=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,Q2=/^<([^ >]+@[^ >]+)>/,J2=/^<([^ >]+:\/[^ >]+)>/,eL=/-([a-z])?/gi,$S=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,tL=/^[^\n]+(?: \n|\n{2,})/,nL=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,rL=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,iL=/^\[([^\]]*)\] ?\[([^\]]*)\]/,sL=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,oL=/\t/g,aL=/(^ *\||\| *$)/g,lL=/^ *:-+: *$/,cL=/^ *:-+ *$/,uL=/^ *-+: *$/,Od="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",dL=RegExp(`^([*_])\\1${Od}\\1\\1(?!\\1)`),fL=RegExp(`^([*_])${Od}\\1(?!\\1)`),pL=RegExp(`^(==)${Od}\\1`),hL=RegExp(`^(~~)${Od}\\1`),mL=/^\\([^0-9A-Za-z\s])/,YS=/\\([^0-9A-Za-z\s])/g,gL=/^[\s\S](?:(?! |[0-9]\.|http)[^=*_~\-\n<`\\\[!])*/,yL=/^\n+/,vL=/^([ \t]*)/,bL=/\\([^\\])/g,SL=/(?:^|\n)( *)$/,sm="(?:\\d+\\.)",om="(?:[*+-])";function WS(e){return"( *)("+(e===1?sm:om)+") +"}const HS=WS(1),ZS=WS(2);function US(e){return RegExp("^"+(e===1?HS:ZS))}const xL=US(1),wL=US(2);function zS(e){return RegExp("^"+(e===1?HS:ZS)+"[^\\n]*(?:\\n(?!\\1"+(e===1?sm:om)+" )[^\\n]*)*(\\n|$)","gm")}const _L=zS(1),kL=zS(2);function qS(e){const t=e===1?sm:om;return RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const XS=qS(1),KS=qS(2);function QS(e,t){const n=t===1,r=n?XS:KS,i=n?_L:kL,s=n?xL:wL;return{t:o=>s.test(o),o:dc(function(o,a){const l=SL.exec(a.prevCapture);return l&&(a.list||!a.inline&&!a.simple)?r.exec(o=l[1]+o):null}),i:1,u(o,a,l){const u=n?+o[2]:void 0,d=o[0].replace(A2,`
|
66
|
+
`).match(i);let f=!1;return{items:d.map(function(p,h){const m=s.exec(p)[0].length,y=RegExp("^ {1,"+m+"}","gm"),b=p.replace(y,"").replace(s,""),g=h===d.length-1,v=b.indexOf(`
|
67
|
+
|
68
|
+
`)!==-1||g&&f;f=v;const S=l.inline,w=l.list;let _;l.list=!0,v?(l.inline=!1,_=cc(b)+`
|
69
|
+
|
70
|
+
`):(l.inline=!0,_=cc(b));const T=a(_,l);return l.inline=S,l.list=w,T}),ordered:n,start:u}},l:(o,a,l)=>e(o.ordered?"ol":"ul",{key:l.key,start:o.type==="20"?o.start:void 0},o.items.map(function(u,d){return e("li",{key:d},a(u,l))}))}}const DL=RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),CL=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function cc(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function am(e,t){return e.startsWith(t)}function ML(e,t,n){if(Array.isArray(n)){for(let r=0;r<n.length;r++)if(am(e,n[r]))return!0;return!1}return n(e,t)}function uc(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function TL(e){return uL.test(e)?"right":lL.test(e)?"center":cL.test(e)?"left":null}function JS(e,t,n,r){const i=n.inTable;n.inTable=!0;let s=[[]],o="";function a(){if(!o)return;const l=s[s.length-1];l.push.apply(l,t(o,n)),o=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((l,u,d)=>{l.trim()==="|"&&(a(),r)?u!==0&&u!==d.length-1&&s.push([]):o+=l}),a(),n.inTable=i,s}function IL(e,t,n){n.inline=!0;const r=e[2]?e[2].replace(aL,"").split("|").map(TL):[],i=e[3]?function(o,a,l){return o.trim().split(`
|
71
|
+
`).map(function(u){return JS(u,a,l,!0)})}(e[3],t,n):[],s=JS(e[1],t,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:s,type:"25"}:{children:s,type:"21"}}function ex(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function dc(e){return e.inline=1,e}function ro(e){return dc(function(t,n){return n.inline?e.exec(t):null})}function io(e){return dc(function(t,n){return n.inline||n.simple?e.exec(t):null})}function us(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function fc(e){return dc(function(t){return e.exec(t)})}const EL=/(javascript|vbscript|data(?!:image)):/i;function RL(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(EL.test(t))return null}catch{return null}return e}function tx(e){return e.replace(bL,"$1")}function Bd(e,t,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;const s=e(t,n);return n.inline=r,n.simple=i,s}function LL(e,t,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;const s=e(t,n);return n.inline=r,n.simple=i,s}function OL(e,t,n){const r=n.inline||!1;n.inline=!1;const i=e(t,n);return n.inline=r,i}const lm=(e,t,n)=>({children:Bd(t,e[2],n)});function cm(){return{}}function um(){return null}function BL(...e){return e.filter(Boolean).join(" ")}function dm(e,t,n){let r=e;const i=t.split(".");for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r||n}function AL(e="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?$o({},BS,t.namedCodesToUnicode):BS;const n=t.slugify||uc,r=t.sanitizer||RL,i=t.createElement||le.createElement,s=[AS,PS,NS,t.enforceAtxHeadings?FS:jS,GS,$S,XS,KS],o=[...s,tL,rm,VS,im];function a(g,v,...S){const w=dm(t.overrides,g+".props",{});return i(function(_,T){const M=dm(T,_);return M?typeof M=="function"||typeof M=="object"&&"render"in M?M:dm(T,_+".component",_):_}(g,t.overrides),$o({},v,w,{className:BL(v==null?void 0:v.className,w.className)||void 0}),...S)}function l(g){g=g.replace(Z2,"");let v=!1;t.forceInline?v=!0:t.forceBlock||(v=sL.test(g)===!1);const S=m(h(v?g:cc(g).replace(yL,"")+`
|
72
|
+
|
73
|
+
`,{inline:v}));for(;typeof S[S.length-1]=="string"&&!S[S.length-1].trim();)S.pop();if(t.wrapper===null)return S;const w=t.wrapper||(v?"span":"div");let _;if(S.length>1||t.forceWrapper)_=S;else{if(S.length===1)return _=S[0],typeof _=="string"?a("span",{key:"outer"},_):_;_=null}return i(w,{key:"outer"},_)}function u(g,v){if(!v||!v.trim())return null;const S=v.match(O2);return S?S.reduce(function(w,_){const T=_.indexOf("=");if(T!==-1){const M=function(O){return O.indexOf("-")!==-1&&O.match(q2)===null&&(O=O.replace(eL,function(A,L){return L.toUpperCase()})),O}(_.slice(0,T)).trim(),C=function(O){const A=O[0];return(A==='"'||A==="'")&&O.length>=2&&O[O.length-1]===A?O.slice(1,-1):O}(_.slice(T+1).trim()),k=OS[M]||M;if(k==="ref")return w;const I=w[k]=function(O,A,L,V){return A==="style"?function(Y){const N=[];let j="",G=!1,Z=!1,W="";if(!Y)return N;for(let fe=0;fe<Y.length;fe++){const de=Y[fe];if(de!=='"'&&de!=="'"||G||(Z?de===W&&(Z=!1,W=""):(Z=!0,W=de)),de==="("&&j.endsWith("url")?G=!0:de===")"&&G&&(G=!1),de!==";"||Z||G)j+=de;else{const H=j.trim();if(H){const Ge=H.indexOf(":");if(Ge>0){const Le=H.slice(0,Ge).trim(),oe=H.slice(Ge+1).trim();N.push([Le,oe])}}j=""}}const re=j.trim();if(re){const fe=re.indexOf(":");if(fe>0){const de=re.slice(0,fe).trim(),H=re.slice(fe+1).trim();N.push([de,H])}}return N}(L).reduce(function(Y,[N,j]){return Y[N.replace(/(-[a-z])/g,G=>G[1].toUpperCase())]=V(j,O,N),Y},{}):L2.indexOf(A)!==-1?V(L,O,A):(L.match(X2)&&(L=L.slice(1,L.length-1)),L==="true"||L!=="false"&&L)}(g,M,C,r);typeof I=="string"&&(rm.test(I)||im.test(I))&&(w[k]=l(I.trim()))}else _!=="style"&&(w[OS[_]||_]=!0);return w},{}):null}const d=[],f={},p={0:{t:[">"],o:us(AS),i:1,u(g,v,S){const[,w,_]=g[0].replace(P2,"").match(N2);return{alert:w,children:v(_,S)}},l(g,v,S){const w={key:S.key};return g.alert&&(w.className="markdown-alert-"+n(g.alert.toLowerCase(),uc),g.children.unshift({attrs:{},children:[{type:"27",text:g.alert}],noInnerParse:!0,type:"11",tag:"header"})),a("blockquote",w,v(g.children,S))}},1:{o:fc(j2),i:1,u:cm,l:(g,v,S)=>a("br",{key:S.key})},2:{t:g=>{const v=g[0];return v==="-"||v==="*"||v==="_"},o:us(F2),i:1,u:cm,l:(g,v,S)=>a("hr",{key:S.key})},3:{t:[" "],o:us(NS),i:0,u:g=>({lang:void 0,text:cc(g[0].replace(/^ {4}/gm,"")).replace(YS,"$1")}),l:(g,v,S)=>a("pre",{key:S.key},a("code",$o({},g.attrs,{className:g.lang?"lang-"+g.lang:""}),g.text))},4:{t:["```","~~~"],o:us(PS),i:0,u:g=>({attrs:u("code",g[3]||""),lang:g[2]||void 0,text:g[4],type:"3"})},5:{t:["`"],o:io(G2),i:3,u:g=>({text:g[2].replace(YS,"$1")}),l:(g,v,S)=>a("code",{key:S.key},g.text)},6:{t:["[^"],o:us(Y2),i:0,u:g=>(d.push({footnote:g[2],identifier:g[1]}),{}),l:um},7:{t:["[^"],o:ro(W2),i:1,u:g=>({target:"#"+n(g[1],uc),text:g[1]}),l:(g,v,S)=>a("a",{key:S.key,href:r(g.target,"a","href")},a("sup",{key:S.key},g.text))},8:{t:["[ ]","[x]"],o:ro(U2),i:1,u:g=>({completed:g[1].toLowerCase()==="x"}),l:(g,v,S)=>a("input",{checked:g.completed,key:S.key,readOnly:!0,type:"checkbox"})},9:{t:["#"],o:us(t.enforceAtxHeadings?FS:jS),i:1,u:(g,v,S)=>({children:Bd(v,g[2],S),id:n(g[2],uc),level:g[1].length}),l:(g,v,S)=>a("h"+g.level,{id:g.id,key:S.key},v(g.children,S))},10:{o:us(GS),i:0,u:(g,v,S)=>({children:Bd(v,g[1],S),level:g[2]==="="?1:2,type:"9"})},11:{t:["<"],o:fc(rm),i:1,u(g,v,S){const[,w]=g[3].match(vL),_=RegExp("^"+w,"gm"),T=g[3].replace(_,""),M=(C=T,o.some(L=>L.test(C))?OL:Bd);var C;const k=g[1].toLowerCase(),I=R2.indexOf(k)!==-1,O=(I?k:g[1]).trim(),A={attrs:u(O,g[2]),noInnerParse:I,tag:O};return S.inAnchor=S.inAnchor||k==="a",I?A.text=g[3]:A.children=M(v,T,S),S.inAnchor=!1,A},l:(g,v,S)=>a(g.tag,$o({key:S.key},g.attrs),g.text||(g.children?v(g.children,S):""))},13:{t:["<"],o:fc(im),i:1,u(g){const v=g[1].trim();return{attrs:u(v,g[2]||""),tag:v}},l:(g,v,S)=>a(g.tag,$o({},g.attrs,{key:S.key}))},12:{t:["<!--"],o:fc(VS),i:1,u:()=>({}),l:um},14:{t:["!["],o:io(CL),i:1,u:g=>({alt:g[1],target:tx(g[2]),title:g[3]}),l:(g,v,S)=>a("img",{key:S.key,alt:g.alt||void 0,title:g.title||void 0,src:r(g.target,"img","src")})},15:{t:["["],o:ro(DL),i:3,u:(g,v,S)=>({children:LL(v,g[1],S),target:tx(g[2]),title:g[3]}),l:(g,v,S)=>a("a",{key:S.key,href:r(g.target,"a","href"),title:g.title},v(g.children,S))},16:{t:["<"],o:ro(J2),i:0,u:g=>({children:[{text:g[1],type:"27"}],target:g[1],type:"15"})},17:{t:(g,v)=>!v.inAnchor&&!t.disableAutoLink&&(am(g,"http://")||am(g,"https://")),o:ro(K2),i:0,u:g=>({children:[{text:g[1],type:"27"}],target:g[1],title:void 0,type:"15"})},18:{t:["<"],o:ro(Q2),i:0,u(g){let v=g[1],S=g[1];return B2.test(S)||(S="mailto:"+S),{children:[{text:v.replace("mailto:",""),type:"27"}],target:S,type:"15"}}},20:QS(a,1),33:QS(a,2),19:{o:us(V2),i:3,u:cm,l:()=>`
|
74
|
+
`},21:{o:dc(function(g,v){if(v.inline||v.simple)return null;let S="";g.split(`
|
75
|
+
`).every(_=>(_+=`
|
76
|
+
`,!s.some(T=>T.test(_))&&(S+=_,!!_.trim())));const w=cc(S);return w===""?null:[S,,w]}),i:3,u:lm,l:(g,v,S)=>a("p",{key:S.key},v(g.children,S))},22:{t:["["],o:ro(nL),i:0,u:g=>(f[g[1]]={target:g[2],title:g[4]},{}),l:um},23:{t:["!["],o:io(rL),i:0,u:g=>({alt:g[1]||void 0,ref:g[2]}),l:(g,v,S)=>f[g.ref]?a("img",{key:S.key,alt:g.alt,src:r(f[g.ref].target,"img","src"),title:f[g.ref].title}):null},24:{t:["["],o:ro(iL),i:0,u:(g,v,S)=>({children:v(g[1],S),fallbackChildren:g[0],ref:g[2]}),l:(g,v,S)=>f[g.ref]?a("a",{key:S.key,href:r(f[g.ref].target,"a","href"),title:f[g.ref].title},v(g.children,S)):a("span",{key:S.key},g.fallbackChildren)},25:{t:["|"],o:us($S),i:1,u:IL,l(g,v,S){const w=g;return a("table",{key:S.key},a("thead",null,a("tr",null,w.header.map(function(_,T){return a("th",{key:T,style:ex(w,T)},v(_,S))}))),a("tbody",null,w.cells.map(function(_,T){return a("tr",{key:T},_.map(function(M,C){return a("td",{key:C,style:ex(w,C)},v(M,S))}))})))}},27:{o:fc(gL),i:4,u(g){const v=g[0];return{text:v.indexOf("&")===-1?v:v.replace(z2,(S,w)=>t.namedCodesToUnicode[w]||S)}},l:g=>g.text},28:{t:["**","__"],o:io(dL),i:2,u:(g,v,S)=>({children:v(g[2],S)}),l:(g,v,S)=>a("strong",{key:S.key},v(g.children,S))},29:{t:g=>{const v=g[0];return(v==="*"||v==="_")&&g[1]!==v},o:io(fL),i:3,u:(g,v,S)=>({children:v(g[2],S)}),l:(g,v,S)=>a("em",{key:S.key},v(g.children,S))},30:{t:["\\"],o:io(mL),i:1,u:g=>({text:g[1],type:"27"})},31:{t:["=="],o:io(pL),i:3,u:lm,l:(g,v,S)=>a("mark",{key:S.key},v(g.children,S))},32:{t:["~~"],o:io(hL),i:3,u:lm,l:(g,v,S)=>a("del",{key:S.key},v(g.children,S))}};t.disableParsingRawHTML===!0&&(delete p[11],delete p[13]);const h=function(g){var v=Object.keys(g);function S(w,_){var T=[];if(_.prevCapture=_.prevCapture||"",w.trim())for(;w;)for(var M=0;M<v.length;){var C=v[M],k=g[C];if(!k.t||ML(w,_,k.t)){var I=k.o(w,_);if(I&&I[0]){_.prevCapture+=I[0],w=w.substring(I[0].length);var O=k.u(I,S,_);O.type||(O.type=C),T.push(O);break}M++}else M++}return _.prevCapture="",T}return v.sort(function(w,_){return g[w].i-g[_].i||(w<_?-1:1)}),function(w,_){return S(function(T){return T.replace($2,`
|
77
|
+
`).replace(H2,"").replace(oL," ")}(w),_)}}(p),m=(y=function(g,v){return function(S,w,_){const T=g[S.type].l;return v?v(()=>T(S,w,_),S,w,_):T(S,w,_)}}(p,t.renderRule),function g(v,S={}){if(Array.isArray(v)){const w=S.key,_=[];let T=!1;for(let M=0;M<v.length;M++){S.key=M;const C=g(v[M],S),k=typeof C=="string";k&&T?_[_.length-1]+=C:C!==null&&_.push(C),T=k}return S.key=w,_}return y(v,g,S)});var y;const b=l(e);return d.length?a("div",null,b,a("footer",{key:"footer"},d.map(function(g){return a("div",{id:n(g.identifier,uc),key:g.identifier},g.identifier,m(h(g.footnote,{inline:!0})))}))):b}const PL=e=>{let{children:t="",options:n}=e,r=function(i,s){if(i==null)return{};var o,a,l={},u=Object.keys(i);for(a=0;a<u.length;a++)s.indexOf(o=u[a])>=0||(l[o]=i[o]);return l}(e,E2);return le.cloneElement(AL(t,n),r)},NL=e=>le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 192 192",...e},le.createElement("path",{d:"M96 176c-44.112 0-80-35.888-80-80s35.888-80 80-80 80 35.888 80 80-35.888 80-80 80zm0-152c-39.701 0-72 32.299-72 72s32.299 72 72 72 72-32.299 72-72-32.299-72-72-72zm-7.1 39.1c0-3.9 3.2-7.1 7.1-7.1 4 0 7.1 3.1 7.1 7.1s-3.1 7.1-7.1 7.1c-3.9 0-7.1-3.2-7.1-7.1zm1.85 17.3h10.5V136h-10.5V80.4z"}));function pc(e){const[t,n]=x.useState(""),[r,i]=x.useState();return x.useEffect(()=>{let s=!1;return fetch(e,{method:"get"}).then(o=>{if(!o.ok)throw new Error("Error loading text file");return o.text()}).then(o=>{s||n(o)}).catch(o=>{i(o)}),()=>{s=!0}},[e]),{text:t,error:r}}function Ft({markdownFilePath:e}){const{text:t,error:n}=pc(e);return n?c.jsx(pe,{error:n}):c.jsx(PL,{children:t,options:{overrides:{Icon:{component:D.Icon,props:{className:"docu-icon"}},a:{component:nm},InfoIcon:{component:NL,props:{className:"docu-info-icon"}}}}})}const cn=({className:e,children:t,...n})=>c.jsx("div",{className:ui("shell_flexible-column-wrapper",e),...n,children:t});function wt({aligned:e="right",className:t,children:n}){return c.jsx("div",{className:ui("shell_button-row",`shell_button-row--${e}`,t),children:n})}function nx(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=nx(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Nn(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=nx(e))&&(r&&(r+=" "),r+=t);return r}const rx=6048e5,jL=864e5,Ad=6e4,Pd=36e5,FL=1e3,ix=Symbol.for("constructDateFrom");function Et(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ix in e?e[ix](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ie(e,t){return Et(t||e,e)}function di(e,t,n){const r=Ie(e,n==null?void 0:n.in);return isNaN(t)?Et((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function fi(e,t,n){const r=Ie(e,n==null?void 0:n.in);if(isNaN(t))return Et(e,NaN);if(!t)return r;const i=r.getDate(),s=Et(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const o=s.getDate();return i>=o?s:(r.setFullYear(s.getFullYear(),s.getMonth(),i),r)}function sx(e,t,n){return Et(e,+Ie(e)+t)}function GL(e,t,n){return sx(e,t*Pd)}let VL={};function Yo(){return VL}function ds(e,t){var a,l,u,d;const n=Yo(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,i=Ie(e,t==null?void 0:t.in),s=i.getDay(),o=(s<r?7:0)+s-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function Aa(e,t){return ds(e,{...t,weekStartsOn:1})}function ox(e,t){const n=Ie(e,t==null?void 0:t.in),r=n.getFullYear(),i=Et(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const s=Aa(i),o=Et(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const a=Aa(o);return n.getTime()>=s.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function Nd(e){const t=Ie(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function fs(e,...t){const n=Et.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Wo(e,t){const n=Ie(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Pa(e,t,n){const[r,i]=fs(n==null?void 0:n.in,e,t),s=Wo(r),o=Wo(i),a=+s-Nd(s),l=+o-Nd(o);return Math.round((a-l)/jL)}function $L(e,t){const n=ox(e,t),r=Et(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Aa(r)}function fm(e,t,n){const r=Ie(e,n==null?void 0:n.in);return r.setTime(r.getTime()+t*Ad),r}function pm(e,t,n){return fi(e,t*3,n)}function YL(e,t,n){return sx(e,t*1e3)}function jd(e,t,n){return di(e,t*7,n)}function ps(e,t,n){return fi(e,t*12,n)}function ax(e,t){let n,r=t==null?void 0:t.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=Et.bind(null,i));const s=Ie(i,r);(!n||n<s||isNaN(+s))&&(n=s)}),Et(r,n||NaN)}function lx(e,t){let n,r=t==null?void 0:t.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=Et.bind(null,i));const s=Ie(i,r);(!n||n>s||isNaN(+s))&&(n=s)}),Et(r,n||NaN)}function WL(e,t,n){const[r,i]=fs(n==null?void 0:n.in,e,t);return+Wo(r)==+Wo(i)}function hs(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Fd(e){return!(!hs(e)&&typeof e!="number"||isNaN(+Ie(e)))}function Gd(e,t,n){const[r,i]=fs(n==null?void 0:n.in,e,t),s=r.getFullYear()-i.getFullYear(),o=r.getMonth()-i.getMonth();return s*12+o}function Ho(e,t){const n=Ie(e,t==null?void 0:t.in);return Math.trunc(n.getMonth()/3)+1}function Vd(e,t,n){const[r,i]=fs(n==null?void 0:n.in,e,t),s=r.getFullYear()-i.getFullYear(),o=Ho(r)-Ho(i);return s*4+o}function $d(e,t,n){const[r,i]=fs(n==null?void 0:n.in,e,t);return r.getFullYear()-i.getFullYear()}function HL(e,t,n){const[r,i]=fs(n==null?void 0:n.in,e,t),s=cx(r,i),o=Math.abs(Pa(r,i));r.setDate(r.getDate()-s*o);const a=+(cx(r,i)===-s),l=s*(o-a);return l===0?0:l}function cx(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function ux(e,t){const n=Ie(e,t==null?void 0:t.in);return n.setHours(23,59,59,999),n}function dx(e,t){const n=Ie(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function hm(e,t){const n=Ie(e,t==null?void 0:t.in),r=n.getMonth(),i=r-r%3;return n.setMonth(i,1),n.setHours(0,0,0,0),n}function fx(e,t){const n=Ie(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function px(e,t){const n=Ie(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Yd(e,t){const n=Ie(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ZL(e,t){var a,l;const n=Yo(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,i=Ie(e,t==null?void 0:t.in),s=i.getDay(),o=(s<r?-7:0)+6-(s-r);return i.setDate(i.getDate()+o),i.setHours(23,59,59,999),i}const UL={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},zL=(e,t,n)=>{let r;const i=UL[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function mm(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const qL={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},XL={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},KL={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},QL={date:mm({formats:qL,defaultWidth:"full"}),time:mm({formats:XL,defaultWidth:"full"}),dateTime:mm({formats:KL,defaultWidth:"full"})},JL={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},eO=(e,t,n,r)=>JL[e];function hc(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):o;i=e.formattingValues[a]||e.formattingValues[o]}else{const o=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[a]||e.values[o]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}const tO={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},nO={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},rO={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},iO={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},sO={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},oO={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},aO={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:hc({values:tO,defaultWidth:"wide"}),quarter:hc({values:nO,defaultWidth:"wide",argumentCallback:e=>e-1}),month:hc({values:rO,defaultWidth:"wide"}),day:hc({values:iO,defaultWidth:"wide"}),dayPeriod:hc({values:sO,defaultWidth:"wide",formattingValues:oO,defaultFormattingWidth:"wide"})};function mc(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const o=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?cO(a,f=>f.test(o)):lO(a,f=>f.test(o));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(o.length);return{value:u,rest:d}}}function lO(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function cO(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function uO(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],s=t.match(e.parsePattern);if(!s)return null;let o=e.valueCallback?e.valueCallback(s[0]):s[0];o=n.valueCallback?n.valueCallback(o):o;const a=t.slice(i.length);return{value:o,rest:a}}}const dO=/^(\d+)(th|st|nd|rd)?/i,fO=/\d+/i,pO={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},hO={any:[/^b/i,/^(a|c)/i]},mO={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},gO={any:[/1/i,/2/i,/3/i,/4/i]},yO={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},vO={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},bO={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},SO={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},xO={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},wO={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},_O={ordinalNumber:uO({matchPattern:dO,parsePattern:fO,valueCallback:e=>parseInt(e,10)}),era:mc({matchPatterns:pO,defaultMatchWidth:"wide",parsePatterns:hO,defaultParseWidth:"any"}),quarter:mc({matchPatterns:mO,defaultMatchWidth:"wide",parsePatterns:gO,defaultParseWidth:"any",valueCallback:e=>e+1}),month:mc({matchPatterns:yO,defaultMatchWidth:"wide",parsePatterns:vO,defaultParseWidth:"any"}),day:mc({matchPatterns:bO,defaultMatchWidth:"wide",parsePatterns:SO,defaultParseWidth:"any"}),dayPeriod:mc({matchPatterns:xO,defaultMatchWidth:"any",parsePatterns:wO,defaultParseWidth:"any"})},hx={code:"en-US",formatDistance:zL,formatLong:QL,formatRelative:eO,localize:aO,match:_O,options:{weekStartsOn:0,firstWeekContainsDate:1}};function kO(e,t){const n=Ie(e,t==null?void 0:t.in);return Pa(n,Yd(n))+1}function gm(e,t){const n=Ie(e,t==null?void 0:t.in),r=+Aa(n)-+$L(n);return Math.round(r/rx)+1}function ym(e,t){var d,f,p,h;const n=Ie(e,t==null?void 0:t.in),r=n.getFullYear(),i=Yo(),s=(t==null?void 0:t.firstWeekContainsDate)??((f=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??i.firstWeekContainsDate??((h=(p=i.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,o=Et((t==null?void 0:t.in)||e,0);o.setFullYear(r+1,0,s),o.setHours(0,0,0,0);const a=ds(o,t),l=Et((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const u=ds(l,t);return+n>=+a?r+1:+n>=+u?r:r-1}function DO(e,t){var a,l,u,d;const n=Yo(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,i=ym(e,t),s=Et((t==null?void 0:t.in)||e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),ds(s,t)}function mx(e,t){const n=Ie(e,t==null?void 0:t.in),r=+ds(n,t)-+DO(n,t);return Math.round(r/rx)+1}function Rt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const so={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Rt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Rt(n+1,2)},d(e,t){return Rt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Rt(e.getHours()%12||12,t.length)},H(e,t){return Rt(e.getHours(),t.length)},m(e,t){return Rt(e.getMinutes(),t.length)},s(e,t){return Rt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Rt(i,t.length)}},Na={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},gx={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return so.y(e,t)},Y:function(e,t,n,r){const i=ym(e,r),s=i>0?i:1-i;if(t==="YY"){const o=s%100;return Rt(o,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Rt(s,t.length)},R:function(e,t){const n=ox(e);return Rt(n,t.length)},u:function(e,t){const n=e.getFullYear();return Rt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Rt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Rt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return so.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Rt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=mx(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Rt(i,t.length)},I:function(e,t,n){const r=gm(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Rt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):so.d(e,t)},D:function(e,t,n){const r=kO(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Rt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Rt(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Rt(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Rt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Na.noon:r===0?i=Na.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Na.evening:r>=12?i=Na.afternoon:r>=4?i=Na.morning:i=Na.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return so.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):so.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Rt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Rt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):so.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):so.s(e,t)},S:function(e,t){return so.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return vx(r);case"XXXX":case"XX":return Zo(r);case"XXXXX":case"XXX":default:return Zo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return vx(r);case"xxxx":case"xx":return Zo(r);case"xxxxx":case"xxx":default:return Zo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+yx(r,":");case"OOOO":default:return"GMT"+Zo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+yx(r,":");case"zzzz":default:return"GMT"+Zo(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Rt(r,t.length)},T:function(e,t,n){return Rt(+e,t.length)}};function yx(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),s=r%60;return s===0?n+String(i):n+String(i)+t+Rt(s,2)}function vx(e,t){return e%60===0?(e>0?"-":"+")+Rt(Math.abs(e)/60,2):Zo(e,t)}function Zo(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Rt(Math.trunc(r/60),2),s=Rt(r%60,2);return n+i+t+s}const bx=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Sx=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},vm={p:Sx,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return bx(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",bx(r,t)).replace("{{time}}",Sx(i,t))}},CO=/^D+$/,MO=/^Y+$/,TO=["D","DD","YY","YYYY"];function IO(e){return CO.test(e)}function EO(e){return MO.test(e)}function RO(e,t,n){const r=LO(e,t,n);if(console.warn(r),TO.includes(e))throw new RangeError(r)}function LO(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const OO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,BO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,AO=/^'([^]*?)'?$/,PO=/''/g,NO=/[a-zA-Z]/;function xx(e,t,n){var d,f,p,h,m,y,b,g;const r=Yo(),i=(n==null?void 0:n.locale)??r.locale??hx,s=(n==null?void 0:n.firstWeekContainsDate)??((f=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??r.firstWeekContainsDate??((h=(p=r.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((y=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:y.weekStartsOn)??r.weekStartsOn??((g=(b=r.locale)==null?void 0:b.options)==null?void 0:g.weekStartsOn)??0,a=Ie(e,n==null?void 0:n.in);if(!Fd(a))throw new RangeError("Invalid time value");let l=t.match(BO).map(v=>{const S=v[0];if(S==="p"||S==="P"){const w=vm[S];return w(v,i.formatLong)}return v}).join("").match(OO).map(v=>{if(v==="''")return{isToken:!1,value:"'"};const S=v[0];if(S==="'")return{isToken:!1,value:jO(v)};if(gx[S])return{isToken:!0,value:v};if(S.match(NO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");return{isToken:!1,value:v}});i.localize.preprocessor&&(l=i.localize.preprocessor(a,l));const u={firstWeekContainsDate:s,weekStartsOn:o,locale:i};return l.map(v=>{if(!v.isToken)return v.value;const S=v.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&EO(S)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&IO(S))&&RO(S,t,String(e));const w=gx[S[0]];return w(a,S,i.localize,u)}).join("")}function jO(e){const t=e.match(AO);return t?t[1].replace(PO,"'"):e}function wx(e,t){return Ie(e,t==null?void 0:t.in).getDate()}function FO(e,t){return Ie(e,t==null?void 0:t.in).getDay()}function GO(e,t){const n=Ie(e,t==null?void 0:t.in),r=n.getFullYear(),i=n.getMonth(),s=Et(n,0);return s.setFullYear(r,i+1,0),s.setHours(0,0,0,0),s.getDate()}function VO(){return Object.assign({},Yo())}function ms(e,t){return Ie(e,t==null?void 0:t.in).getHours()}function $O(e,t){const n=Ie(e,t==null?void 0:t.in).getDay();return n===0?7:n}function gs(e,t){return Ie(e,t==null?void 0:t.in).getMinutes()}function Hn(e,t){return Ie(e,t==null?void 0:t.in).getMonth()}function oo(e){return Ie(e).getSeconds()}function bm(e){return+Ie(e)}function nt(e,t){return Ie(e,t==null?void 0:t.in).getFullYear()}function ao(e,t){return+Ie(e)>+Ie(t)}function Uo(e,t){return+Ie(e)<+Ie(t)}function YO(e,t){return+Ie(e)==+Ie(t)}function WO(e,t){const n=HO(t)?new t(0):Et(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function HO(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const ZO=10;class _x{constructor(){me(this,"subPriority",0)}validate(t,n){return!0}}class UO extends _x{constructor(t,n,r,i,s){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=i,s&&(this.subPriority=s)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class zO extends _x{constructor(n,r){super();me(this,"priority",ZO);me(this,"subPriority",-1);this.context=n||(i=>Et(r,i))}set(n,r){return r.timestampIsSet?n:Et(n,WO(n,this.context))}}class _t{run(t,n,r,i){const s=this.parse(t,n,r,i);return s?{setter:new UO(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class qO extends _t{constructor(){super(...arguments);me(this,"priority",140);me(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,i){switch(r){case"G":case"GG":case"GGG":return i.era(n,{width:"abbreviated"})||i.era(n,{width:"narrow"});case"GGGGG":return i.era(n,{width:"narrow"});case"GGGG":default:return i.era(n,{width:"wide"})||i.era(n,{width:"abbreviated"})||i.era(n,{width:"narrow"})}}set(n,r,i){return r.era=i,n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}}const pn={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Bi={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function hn(e,t){return e&&{value:t(e.value),rest:e.rest}}function sn(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Ai(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,i=n[2]?parseInt(n[2],10):0,s=n[3]?parseInt(n[3],10):0,o=n[5]?parseInt(n[5],10):0;return{value:r*(i*Pd+s*Ad+o*FL),rest:t.slice(n[0].length)}}function kx(e){return sn(pn.anyDigitsSigned,e)}function un(e,t){switch(e){case 1:return sn(pn.singleDigit,t);case 2:return sn(pn.twoDigits,t);case 3:return sn(pn.threeDigits,t);case 4:return sn(pn.fourDigits,t);default:return sn(new RegExp("^\\d{1,"+e+"}"),t)}}function Wd(e,t){switch(e){case 1:return sn(pn.singleDigitSigned,t);case 2:return sn(pn.twoDigitsSigned,t);case 3:return sn(pn.threeDigitsSigned,t);case 4:return sn(pn.fourDigitsSigned,t);default:return sn(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Sm(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Dx(e,t){const n=t>0,r=n?t:1-t;let i;if(r<=50)i=e||100;else{const s=r+50,o=Math.trunc(s/100)*100,a=e>=s%100;i=e+o-(a?100:0)}return n?i:1-i}function Cx(e){return e%400===0||e%4===0&&e%100!==0}class XO extends _t{constructor(){super(...arguments);me(this,"priority",130);me(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,i){const s=o=>({year:o,isTwoDigitYear:r==="yy"});switch(r){case"y":return hn(un(4,n),s);case"yo":return hn(i.ordinalNumber(n,{unit:"year"}),s);default:return hn(un(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,i){const s=n.getFullYear();if(i.isTwoDigitYear){const a=Dx(i.year,s);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const o=!("era"in r)||r.era===1?i.year:1-i.year;return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class KO extends _t{constructor(){super(...arguments);me(this,"priority",130);me(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,i){const s=o=>({year:o,isTwoDigitYear:r==="YY"});switch(r){case"Y":return hn(un(4,n),s);case"Yo":return hn(i.ordinalNumber(n,{unit:"year"}),s);default:return hn(un(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,i,s){const o=ym(n,s);if(i.isTwoDigitYear){const l=Dx(i.year,o);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),ds(n,s)}const a=!("era"in r)||r.era===1?i.year:1-i.year;return n.setFullYear(a,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),ds(n,s)}}class QO extends _t{constructor(){super(...arguments);me(this,"priority",130);me(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return Wd(r==="R"?4:r.length,n)}set(n,r,i){const s=Et(n,0);return s.setFullYear(i,0,4),s.setHours(0,0,0,0),Aa(s)}}class JO extends _t{constructor(){super(...arguments);me(this,"priority",130);me(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return Wd(r==="u"?4:r.length,n)}set(n,r,i){return n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}}class eB extends _t{constructor(){super(...arguments);me(this,"priority",120);me(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,i){switch(r){case"Q":case"QQ":return un(r.length,n);case"Qo":return i.ordinalNumber(n,{unit:"quarter"});case"QQQ":return i.quarter(n,{width:"abbreviated",context:"formatting"})||i.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(n,{width:"wide",context:"formatting"})||i.quarter(n,{width:"abbreviated",context:"formatting"})||i.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,i){return n.setMonth((i-1)*3,1),n.setHours(0,0,0,0),n}}class tB extends _t{constructor(){super(...arguments);me(this,"priority",120);me(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,i){switch(r){case"q":case"qq":return un(r.length,n);case"qo":return i.ordinalNumber(n,{unit:"quarter"});case"qqq":return i.quarter(n,{width:"abbreviated",context:"standalone"})||i.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(n,{width:"wide",context:"standalone"})||i.quarter(n,{width:"abbreviated",context:"standalone"})||i.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,i){return n.setMonth((i-1)*3,1),n.setHours(0,0,0,0),n}}class nB extends _t{constructor(){super(...arguments);me(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);me(this,"priority",110)}parse(n,r,i){const s=o=>o-1;switch(r){case"M":return hn(sn(pn.month,n),s);case"MM":return hn(un(2,n),s);case"Mo":return hn(i.ordinalNumber(n,{unit:"month"}),s);case"MMM":return i.month(n,{width:"abbreviated",context:"formatting"})||i.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(n,{width:"wide",context:"formatting"})||i.month(n,{width:"abbreviated",context:"formatting"})||i.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,i){return n.setMonth(i,1),n.setHours(0,0,0,0),n}}class rB extends _t{constructor(){super(...arguments);me(this,"priority",110);me(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,i){const s=o=>o-1;switch(r){case"L":return hn(sn(pn.month,n),s);case"LL":return hn(un(2,n),s);case"Lo":return hn(i.ordinalNumber(n,{unit:"month"}),s);case"LLL":return i.month(n,{width:"abbreviated",context:"standalone"})||i.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(n,{width:"wide",context:"standalone"})||i.month(n,{width:"abbreviated",context:"standalone"})||i.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,i){return n.setMonth(i,1),n.setHours(0,0,0,0),n}}function iB(e,t,n){const r=Ie(e,n==null?void 0:n.in),i=mx(r,n)-t;return r.setDate(r.getDate()-i*7),Ie(r,n==null?void 0:n.in)}class sB extends _t{constructor(){super(...arguments);me(this,"priority",100);me(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,i){switch(r){case"w":return sn(pn.week,n);case"wo":return i.ordinalNumber(n,{unit:"week"});default:return un(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,i,s){return ds(iB(n,i,s),s)}}function oB(e,t,n){const r=Ie(e,n==null?void 0:n.in),i=gm(r,n)-t;return r.setDate(r.getDate()-i*7),r}class aB extends _t{constructor(){super(...arguments);me(this,"priority",100);me(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,i){switch(r){case"I":return sn(pn.week,n);case"Io":return i.ordinalNumber(n,{unit:"week"});default:return un(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,i){return Aa(oB(n,i))}}const lB=[31,28,31,30,31,30,31,31,30,31,30,31],cB=[31,29,31,30,31,30,31,31,30,31,30,31];class uB extends _t{constructor(){super(...arguments);me(this,"priority",90);me(this,"subPriority",1);me(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,i){switch(r){case"d":return sn(pn.date,n);case"do":return i.ordinalNumber(n,{unit:"date"});default:return un(r.length,n)}}validate(n,r){const i=n.getFullYear(),s=Cx(i),o=n.getMonth();return s?r>=1&&r<=cB[o]:r>=1&&r<=lB[o]}set(n,r,i){return n.setDate(i),n.setHours(0,0,0,0),n}}class dB extends _t{constructor(){super(...arguments);me(this,"priority",90);me(this,"subpriority",1);me(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,i){switch(r){case"D":case"DD":return sn(pn.dayOfYear,n);case"Do":return i.ordinalNumber(n,{unit:"date"});default:return un(r.length,n)}}validate(n,r){const i=n.getFullYear();return Cx(i)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,i){return n.setMonth(0,i),n.setHours(0,0,0,0),n}}function xm(e,t,n){var f,p,h,m;const r=Yo(),i=(n==null?void 0:n.weekStartsOn)??((p=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((m=(h=r.locale)==null?void 0:h.options)==null?void 0:m.weekStartsOn)??0,s=Ie(e,n==null?void 0:n.in),o=s.getDay(),l=(t%7+7)%7,u=7-i,d=t<0||t>6?t-(o+u)%7:(l+u)%7-(o+u)%7;return di(s,d,n)}class fB extends _t{constructor(){super(...arguments);me(this,"priority",90);me(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,i){switch(r){case"E":case"EE":case"EEE":return i.day(n,{width:"abbreviated",context:"formatting"})||i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(n,{width:"wide",context:"formatting"})||i.day(n,{width:"abbreviated",context:"formatting"})||i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,i,s){return n=xm(n,i,s),n.setHours(0,0,0,0),n}}class pB extends _t{constructor(){super(...arguments);me(this,"priority",90);me(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,i,s){const o=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return hn(un(r.length,n),o);case"eo":return hn(i.ordinalNumber(n,{unit:"day"}),o);case"eee":return i.day(n,{width:"abbreviated",context:"formatting"})||i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"});case"eeeee":return i.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(n,{width:"wide",context:"formatting"})||i.day(n,{width:"abbreviated",context:"formatting"})||i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,i,s){return n=xm(n,i,s),n.setHours(0,0,0,0),n}}class hB extends _t{constructor(){super(...arguments);me(this,"priority",90);me(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,i,s){const o=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return hn(un(r.length,n),o);case"co":return hn(i.ordinalNumber(n,{unit:"day"}),o);case"ccc":return i.day(n,{width:"abbreviated",context:"standalone"})||i.day(n,{width:"short",context:"standalone"})||i.day(n,{width:"narrow",context:"standalone"});case"ccccc":return i.day(n,{width:"narrow",context:"standalone"});case"cccccc":return i.day(n,{width:"short",context:"standalone"})||i.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(n,{width:"wide",context:"standalone"})||i.day(n,{width:"abbreviated",context:"standalone"})||i.day(n,{width:"short",context:"standalone"})||i.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,i,s){return n=xm(n,i,s),n.setHours(0,0,0,0),n}}function mB(e,t,n){const r=Ie(e,n==null?void 0:n.in),i=$O(r,n),s=t-i;return di(r,s,n)}class gB extends _t{constructor(){super(...arguments);me(this,"priority",90);me(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,i){const s=o=>o===0?7:o;switch(r){case"i":case"ii":return un(r.length,n);case"io":return i.ordinalNumber(n,{unit:"day"});case"iii":return hn(i.day(n,{width:"abbreviated",context:"formatting"})||i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"}),s);case"iiiii":return hn(i.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return hn(i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return hn(i.day(n,{width:"wide",context:"formatting"})||i.day(n,{width:"abbreviated",context:"formatting"})||i.day(n,{width:"short",context:"formatting"})||i.day(n,{width:"narrow",context:"formatting"}),s)}}validate(n,r){return r>=1&&r<=7}set(n,r,i){return n=mB(n,i),n.setHours(0,0,0,0),n}}class yB extends _t{constructor(){super(...arguments);me(this,"priority",80);me(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,i){switch(r){case"a":case"aa":case"aaa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"})||i.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})||i.dayPeriod(n,{width:"abbreviated",context:"formatting"})||i.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,i){return n.setHours(Sm(i),0,0,0),n}}class vB extends _t{constructor(){super(...arguments);me(this,"priority",80);me(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,i){switch(r){case"b":case"bb":case"bbb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"})||i.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})||i.dayPeriod(n,{width:"abbreviated",context:"formatting"})||i.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,i){return n.setHours(Sm(i),0,0,0),n}}class bB extends _t{constructor(){super(...arguments);me(this,"priority",80);me(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,i){switch(r){case"B":case"BB":case"BBB":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"})||i.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(n,{width:"wide",context:"formatting"})||i.dayPeriod(n,{width:"abbreviated",context:"formatting"})||i.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,i){return n.setHours(Sm(i),0,0,0),n}}class SB extends _t{constructor(){super(...arguments);me(this,"priority",70);me(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,i){switch(r){case"h":return sn(pn.hour12h,n);case"ho":return i.ordinalNumber(n,{unit:"hour"});default:return un(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,i){const s=n.getHours()>=12;return s&&i<12?n.setHours(i+12,0,0,0):!s&&i===12?n.setHours(0,0,0,0):n.setHours(i,0,0,0),n}}class xB extends _t{constructor(){super(...arguments);me(this,"priority",70);me(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,i){switch(r){case"H":return sn(pn.hour23h,n);case"Ho":return i.ordinalNumber(n,{unit:"hour"});default:return un(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,i){return n.setHours(i,0,0,0),n}}class wB extends _t{constructor(){super(...arguments);me(this,"priority",70);me(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,i){switch(r){case"K":return sn(pn.hour11h,n);case"Ko":return i.ordinalNumber(n,{unit:"hour"});default:return un(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,i){return n.getHours()>=12&&i<12?n.setHours(i+12,0,0,0):n.setHours(i,0,0,0),n}}class _B extends _t{constructor(){super(...arguments);me(this,"priority",70);me(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,i){switch(r){case"k":return sn(pn.hour24h,n);case"ko":return i.ordinalNumber(n,{unit:"hour"});default:return un(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,i){const s=i<=24?i%24:i;return n.setHours(s,0,0,0),n}}class kB extends _t{constructor(){super(...arguments);me(this,"priority",60);me(this,"incompatibleTokens",["t","T"])}parse(n,r,i){switch(r){case"m":return sn(pn.minute,n);case"mo":return i.ordinalNumber(n,{unit:"minute"});default:return un(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,i){return n.setMinutes(i,0,0),n}}class DB extends _t{constructor(){super(...arguments);me(this,"priority",50);me(this,"incompatibleTokens",["t","T"])}parse(n,r,i){switch(r){case"s":return sn(pn.second,n);case"so":return i.ordinalNumber(n,{unit:"second"});default:return un(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,i){return n.setSeconds(i,0),n}}class CB extends _t{constructor(){super(...arguments);me(this,"priority",30);me(this,"incompatibleTokens",["t","T"])}parse(n,r){const i=s=>Math.trunc(s*Math.pow(10,-r.length+3));return hn(un(r.length,n),i)}set(n,r,i){return n.setMilliseconds(i),n}}class MB extends _t{constructor(){super(...arguments);me(this,"priority",10);me(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return Ai(Bi.basicOptionalMinutes,n);case"XX":return Ai(Bi.basic,n);case"XXXX":return Ai(Bi.basicOptionalSeconds,n);case"XXXXX":return Ai(Bi.extendedOptionalSeconds,n);case"XXX":default:return Ai(Bi.extended,n)}}set(n,r,i){return r.timestampIsSet?n:Et(n,n.getTime()-Nd(n)-i)}}class TB extends _t{constructor(){super(...arguments);me(this,"priority",10);me(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return Ai(Bi.basicOptionalMinutes,n);case"xx":return Ai(Bi.basic,n);case"xxxx":return Ai(Bi.basicOptionalSeconds,n);case"xxxxx":return Ai(Bi.extendedOptionalSeconds,n);case"xxx":default:return Ai(Bi.extended,n)}}set(n,r,i){return r.timestampIsSet?n:Et(n,n.getTime()-Nd(n)-i)}}class IB extends _t{constructor(){super(...arguments);me(this,"priority",40);me(this,"incompatibleTokens","*")}parse(n){return kx(n)}set(n,r,i){return[Et(n,i*1e3),{timestampIsSet:!0}]}}class EB extends _t{constructor(){super(...arguments);me(this,"priority",20);me(this,"incompatibleTokens","*")}parse(n){return kx(n)}set(n,r,i){return[Et(n,i),{timestampIsSet:!0}]}}const RB={G:new qO,y:new XO,Y:new KO,R:new QO,u:new JO,Q:new eB,q:new tB,M:new nB,L:new rB,w:new sB,I:new aB,d:new uB,D:new dB,E:new fB,e:new pB,c:new hB,i:new gB,a:new yB,b:new vB,B:new bB,h:new SB,H:new xB,K:new wB,k:new _B,m:new kB,s:new DB,S:new CB,X:new MB,x:new TB,t:new IB,T:new EB},LB=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,OB=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,BB=/^'([^]*?)'?$/,AB=/''/g,PB=/\S/,NB=/[a-zA-Z]/;function jB(e,t,n,r){var b,g,v,S,w,_,T,M;const i=()=>Et((r==null?void 0:r.in)||n,NaN),s=VO(),o=(r==null?void 0:r.locale)??s.locale??hx,a=(r==null?void 0:r.firstWeekContainsDate)??((g=(b=r==null?void 0:r.locale)==null?void 0:b.options)==null?void 0:g.firstWeekContainsDate)??s.firstWeekContainsDate??((S=(v=s.locale)==null?void 0:v.options)==null?void 0:S.firstWeekContainsDate)??1,l=(r==null?void 0:r.weekStartsOn)??((_=(w=r==null?void 0:r.locale)==null?void 0:w.options)==null?void 0:_.weekStartsOn)??s.weekStartsOn??((M=(T=s.locale)==null?void 0:T.options)==null?void 0:M.weekStartsOn)??0;if(!t)return e?i():Ie(n,r==null?void 0:r.in);const u={firstWeekContainsDate:a,weekStartsOn:l,locale:o},d=[new zO(r==null?void 0:r.in,n)],f=t.match(OB).map(C=>{const k=C[0];if(k in vm){const I=vm[k];return I(C,o.formatLong)}return C}).join("").match(LB),p=[];for(let C of f){const k=C[0],I=RB[k];if(I){const{incompatibleTokens:O}=I;if(Array.isArray(O)){const L=p.find(V=>O.includes(V.token)||V.token===k);if(L)throw new RangeError(`The format string mustn't contain \`${L.fullToken}\` and \`${C}\` at the same time`)}else if(I.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${C}\` and any other token at the same time`);p.push({token:k,fullToken:C});const A=I.run(e,C,o.match,u);if(!A)return i();d.push(A.setter),e=A.rest}else{if(k.match(NB))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");if(C==="''"?C="'":k==="'"&&(C=FB(C)),e.indexOf(C)===0)e=e.slice(C.length);else return i()}}if(e.length>0&&PB.test(e))return i();const h=d.map(C=>C.priority).sort((C,k)=>k-C).filter((C,k,I)=>I.indexOf(C)===k).map(C=>d.filter(k=>k.priority===C).sort((k,I)=>I.subPriority-k.subPriority)).map(C=>C[0]);let m=Ie(n,r==null?void 0:r.in);if(isNaN(+m))return i();const y={};for(const C of h){if(!C.validate(m,u))return i();const k=C.set(m,y,u);Array.isArray(k)?(m=k[0],Object.assign(y,k[1])):m=k}return m}function FB(e){return e.match(BB)[1].replace(AB,"'")}function GB(e,t,n){const[r,i]=fs(n==null?void 0:n.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function VB(e,t,n){const[r,i]=fs(n==null?void 0:n.in,e,t);return+hm(r)==+hm(i)}function $B(e,t,n){const[r,i]=fs(n==null?void 0:n.in,e,t);return r.getFullYear()===i.getFullYear()}function gc(e,t,n){const r=+Ie(e,n==null?void 0:n.in),[i,s]=[+Ie(t.start,n==null?void 0:n.in),+Ie(t.end,n==null?void 0:n.in)].sort((o,a)=>o-a);return r>=i&&r<=s}function YB(e,t,n){return di(e,-1,n)}function WB(e,t){const n=()=>Et(t==null?void 0:t.in,NaN),i=zB(e);let s;if(i.date){const u=qB(i.date,2);s=XB(u.restDateString,u.year)}if(!s||isNaN(+s))return n();const o=+s;let a=0,l;if(i.time&&(a=KB(i.time),isNaN(a)))return n();if(i.timezone){if(l=QB(i.timezone),isNaN(l))return n()}else{const u=new Date(o+a),d=Ie(0,t==null?void 0:t.in);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return Ie(o+a+l,t==null?void 0:t.in)}const Hd={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},HB=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ZB=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,UB=/^([+-])(\d{2})(?::?(\d{2}))?$/;function zB(e){const t={},n=e.split(Hd.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Hd.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Hd.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const i=Hd.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function qB(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,s=r[2]?parseInt(r[2]):null;return{year:s===null?i:s*100,restDateString:e.slice((r[1]||r[2]).length)}}function XB(e,t){if(t===null)return new Date(NaN);const n=e.match(HB);if(!n)return new Date(NaN);const r=!!n[4],i=yc(n[1]),s=yc(n[2])-1,o=yc(n[3]),a=yc(n[4]),l=yc(n[5])-1;if(r)return rA(t,a,l)?JB(t,a,l):new Date(NaN);{const u=new Date(0);return!tA(t,s,o)||!nA(t,i)?new Date(NaN):(u.setUTCFullYear(t,s,Math.max(i,o)),u)}}function yc(e){return e?parseInt(e):1}function KB(e){const t=e.match(ZB);if(!t)return NaN;const n=wm(t[1]),r=wm(t[2]),i=wm(t[3]);return iA(n,r,i)?n*Pd+r*Ad+i*1e3:NaN}function wm(e){return e&&parseFloat(e.replace(",","."))||0}function QB(e){if(e==="Z")return 0;const t=e.match(UB);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return sA(r,i)?n*(r*Pd+i*Ad):NaN}function JB(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,s=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+s),r}const eA=[31,null,31,30,31,30,31,31,30,31,30,31];function Mx(e){return e%400===0||e%4===0&&e%100!==0}function tA(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(eA[t]||(Mx(e)?29:28))}function nA(e,t){return t>=1&&t<=(Mx(e)?366:365)}function rA(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function iA(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function sA(e,t){return t>=0&&t<=59}function Gr(e,t,n){const r=Ie(e,n==null?void 0:n.in),i=r.getFullYear(),s=r.getDate(),o=Et(e,0);o.setFullYear(i,t,15),o.setHours(0,0,0,0);const a=GO(o);return r.setMonth(t,Math.min(s,a)),r}function Zd(e,t,n){const r=Ie(e,n==null?void 0:n.in);return r.setHours(t),r}function Ud(e,t,n){const r=Ie(e,n==null?void 0:n.in);return r.setMinutes(t),r}function ja(e,t,n){const r=Ie(e,n==null?void 0:n.in),i=Math.trunc(r.getMonth()/3)+1,s=t-i;return Gr(r,r.getMonth()+s*3)}function zd(e,t,n){const r=Ie(e,n==null?void 0:n.in);return r.setSeconds(t),r}function Pi(e,t,n){const r=Ie(e,n==null?void 0:n.in);return isNaN(+r)?Et(e,NaN):(r.setFullYear(t),r)}function zo(e,t,n){return fi(e,-t,n)}function Tx(e,t,n){return pm(e,-1,n)}function Ix(e,t,n){return jd(e,-1,n)}function Fa(e,t,n){return ps(e,-t,n)}function qd(){return typeof window<"u"}function Ga(e){return Ex(e)?(e.nodeName||"").toLowerCase():"#document"}function kr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ni(e){var t;return(t=(Ex(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ex(e){return qd()?e instanceof Node||e instanceof kr(e).Node:!1}function Zn(e){return qd()?e instanceof Element||e instanceof kr(e).Element:!1}function ji(e){return qd()?e instanceof HTMLElement||e instanceof kr(e).HTMLElement:!1}function Rx(e){return!qd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kr(e).ShadowRoot}function vc(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Vr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function oA(e){return["table","td","th"].includes(Ga(e))}function Xd(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function _m(e){const t=km(),n=Zn(e)?Vr(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function aA(e){let t=lo(e);for(;ji(t)&&!Va(t);){if(_m(t))return t;if(Xd(t))return null;t=lo(t)}return null}function km(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Va(e){return["html","body","#document"].includes(Ga(e))}function Vr(e){return kr(e).getComputedStyle(e)}function Kd(e){return Zn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function lo(e){if(Ga(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Rx(e)&&e.host||Ni(e);return Rx(t)?t.host:t}function Lx(e){const t=lo(e);return Va(t)?e.ownerDocument?e.ownerDocument.body:e.body:ji(t)&&vc(t)?t:Lx(t)}function bc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Lx(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=kr(i);if(s){const a=Dm(o);return t.concat(o,o.visualViewport||[],vc(i)?i:[],a&&n?bc(a):[])}return t.concat(i,bc(i,[],n))}function Dm(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const $a=Math.min,qo=Math.max,Qd=Math.round,Jd=Math.floor,Fi=e=>({x:e,y:e}),lA={left:"right",right:"left",bottom:"top",top:"bottom"},cA={start:"end",end:"start"};function uA(e,t,n){return qo(e,$a(t,n))}function ef(e,t){return typeof e=="function"?e(t):e}function Ya(e){return e.split("-")[0]}function Sc(e){return e.split("-")[1]}function dA(e){return e==="x"?"y":"x"}function Cm(e){return e==="y"?"height":"width"}function xc(e){return["top","bottom"].includes(Ya(e))?"y":"x"}function Mm(e){return dA(xc(e))}function fA(e,t,n){n===void 0&&(n=!1);const r=Sc(e),i=Mm(e),s=Cm(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=tf(o)),[o,tf(o)]}function pA(e){const t=tf(e);return[Tm(e),t,Tm(t)]}function Tm(e){return e.replace(/start|end/g,t=>cA[t])}function hA(e,t,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?s:o;default:return[]}}function mA(e,t,n,r){const i=Sc(e);let s=hA(Ya(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(Tm)))),s}function tf(e){return e.replace(/left|right|bottom|top/g,t=>lA[t])}function gA(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ox(e){return typeof e!="number"?gA(e):{top:e,right:e,bottom:e,left:e}}function nf(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Bx(e,t,n){let{reference:r,floating:i}=e;const s=xc(t),o=Mm(t),a=Cm(o),l=Ya(t),u=s==="y",d=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,p=r[a]/2-i[a]/2;let h;switch(l){case"top":h={x:d,y:r.y-i.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-i.width,y:f};break;default:h={x:r.x,y:r.y}}switch(Sc(t)){case"start":h[o]-=p*(n&&u?-1:1);break;case"end":h[o]+=p*(n&&u?-1:1);break}return h}const yA=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:f}=Bx(u,r,l),p=r,h={},m=0;for(let y=0;y<a.length;y++){const{name:b,fn:g}=a[y],{x:v,y:S,data:w,reset:_}=await g({x:d,y:f,initialPlacement:r,placement:p,strategy:i,middlewareData:h,rects:u,platform:o,elements:{reference:e,floating:t}});d=v??d,f=S??f,h={...h,[b]:{...h[b],...w}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(u=_.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):_.rects),{x:d,y:f}=Bx(u,p,l)),y=-1)}return{x:d,y:f,placement:p,strategy:i,middlewareData:h}};async function vA(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:h=0}=ef(t,e),m=Ox(h),b=a[p?f==="floating"?"reference":"floating":f],g=nf(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),v=f==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),w=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},_=nf(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:S,strategy:l}):v);return{top:(g.top-_.top+m.top)/w.y,bottom:(_.bottom-g.bottom+m.bottom)/w.y,left:(g.left-_.left+m.left)/w.x,right:(_.right-g.right+m.right)/w.x}}const bA=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=ef(e,t)||{};if(u==null)return{};const f=Ox(d),p={x:n,y:r},h=Mm(i),m=Cm(h),y=await o.getDimensions(u),b=h==="y",g=b?"top":"left",v=b?"bottom":"right",S=b?"clientHeight":"clientWidth",w=s.reference[m]+s.reference[h]-p[h]-s.floating[m],_=p[h]-s.reference[h],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let M=T?T[S]:0;(!M||!await(o.isElement==null?void 0:o.isElement(T)))&&(M=a.floating[S]||s.floating[m]);const C=w/2-_/2,k=M/2-y[m]/2-1,I=$a(f[g],k),O=$a(f[v],k),A=I,L=M-y[m]-O,V=M/2-y[m]/2+C,Y=uA(A,V,L),N=!l.arrow&&Sc(i)!=null&&V!==Y&&s.reference[m]/2-(V<A?I:O)-y[m]/2<0,j=N?V<A?V-A:V-L:0;return{[h]:p[h]+j,data:{[h]:Y,centerOffset:V-Y-j,...N&&{alignmentOffset:j}},reset:N}}}),SA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...b}=ef(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=Ya(i),v=xc(a),S=Ya(a)===a,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=p||(S||!y?[tf(a)]:pA(a)),T=m!=="none";!p&&T&&_.push(...mA(a,y,m,w));const M=[a,..._],C=await vA(t,b),k=[];let I=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&k.push(C[g]),f){const V=fA(i,o,w);k.push(C[V[0]],C[V[1]])}if(I=[...I,{placement:i,overflows:k}],!k.every(V=>V<=0)){var O,A;const V=(((O=s.flip)==null?void 0:O.index)||0)+1,Y=M[V];if(Y)return{data:{index:V,overflows:I},reset:{placement:Y}};let N=(A=I.filter(j=>j.overflows[0]<=0).sort((j,G)=>j.overflows[1]-G.overflows[1])[0])==null?void 0:A.placement;if(!N)switch(h){case"bestFit":{var L;const j=(L=I.filter(G=>{if(T){const Z=xc(G.placement);return Z===v||Z==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(Z=>Z>0).reduce((Z,W)=>Z+W,0)]).sort((G,Z)=>G[1]-Z[1])[0])==null?void 0:L[0];j&&(N=j);break}case"initialPlacement":N=a;break}if(i!==N)return{reset:{placement:N}}}return{}}}};async function xA(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ya(n),a=Sc(n),l=xc(n)==="y",u=["left","top"].includes(o)?-1:1,d=s&&l?-1:1,f=ef(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),l?{x:h*d,y:p*u}:{x:p*u,y:h*d}}const wA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await xA(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}};function Ax(e){const t=Vr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=ji(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=Qd(n)!==s||Qd(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function Im(e){return Zn(e)?e:e.contextElement}function Wa(e){const t=Im(e);if(!ji(t))return Fi(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=Ax(t);let o=(s?Qd(n.width):n.width)/r,a=(s?Qd(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const _A=Fi(0);function Px(e){const t=kr(e);return!km()||!t.visualViewport?_A:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function kA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==kr(e)?!1:t}function Xo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=Im(e);let o=Fi(1);t&&(r?Zn(r)&&(o=Wa(r)):o=Wa(e));const a=kA(s,n,r)?Px(s):Fi(0);let l=(i.left+a.x)/o.x,u=(i.top+a.y)/o.y,d=i.width/o.x,f=i.height/o.y;if(s){const p=kr(s),h=r&&Zn(r)?kr(r):r;let m=p,y=Dm(m);for(;y&&r&&h!==m;){const b=Wa(y),g=y.getBoundingClientRect(),v=Vr(y),S=g.left+(y.clientLeft+parseFloat(v.paddingLeft))*b.x,w=g.top+(y.clientTop+parseFloat(v.paddingTop))*b.y;l*=b.x,u*=b.y,d*=b.x,f*=b.y,l+=S,u+=w,m=kr(y),y=Dm(m)}}return nf({width:d,height:f,x:l,y:u})}function Em(e,t){const n=Kd(e).scrollLeft;return t?t.left+n:Xo(Ni(e)).left+n}function Nx(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:Em(e,r)),s=r.top+t.scrollTop;return{x:i,y:s}}function DA(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=Ni(r),a=t?Xd(t.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=Fi(1);const d=Fi(0),f=ji(r);if((f||!f&&!s)&&((Ga(r)!=="body"||vc(o))&&(l=Kd(r)),ji(r))){const h=Xo(r);u=Wa(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const p=o&&!f&&!s?Nx(o,l,!0):Fi(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-l.scrollTop*u.y+d.y+p.y}}function CA(e){return Array.from(e.getClientRects())}function MA(e){const t=Ni(e),n=Kd(e),r=e.ownerDocument.body,i=qo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=qo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Em(e);const a=-n.scrollTop;return Vr(r).direction==="rtl"&&(o+=qo(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function TA(e,t){const n=kr(e),r=Ni(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const u=km();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function IA(e,t){const n=Xo(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=ji(e)?Wa(e):Fi(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,u=r*s.y;return{width:o,height:a,x:l,y:u}}function jx(e,t,n){let r;if(t==="viewport")r=TA(e,n);else if(t==="document")r=MA(Ni(e));else if(Zn(t))r=IA(t,n);else{const i=Px(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return nf(r)}function Fx(e,t){const n=lo(e);return n===t||!Zn(n)||Va(n)?!1:Vr(n).position==="fixed"||Fx(n,t)}function EA(e,t){const n=t.get(e);if(n)return n;let r=bc(e,[],!1).filter(a=>Zn(a)&&Ga(a)!=="body"),i=null;const s=Vr(e).position==="fixed";let o=s?lo(e):e;for(;Zn(o)&&!Va(o);){const a=Vr(o),l=_m(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||vc(o)&&!l&&Fx(e,o))?r=r.filter(d=>d!==o):i=a,o=lo(o)}return t.set(e,r),r}function RA(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Xd(t)?[]:EA(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((u,d)=>{const f=jx(t,d,i);return u.top=qo(f.top,u.top),u.right=$a(f.right,u.right),u.bottom=$a(f.bottom,u.bottom),u.left=qo(f.left,u.left),u},jx(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function LA(e){const{width:t,height:n}=Ax(e);return{width:t,height:n}}function OA(e,t,n){const r=ji(t),i=Ni(t),s=n==="fixed",o=Xo(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Fi(0);if(r||!r&&!s)if((Ga(t)!=="body"||vc(i))&&(a=Kd(t)),r){const p=Xo(t,!0,s,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&(l.x=Em(i));const u=i&&!r&&!s?Nx(i,a):Fi(0),d=o.left+a.scrollLeft-l.x-u.x,f=o.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:o.width,height:o.height}}function Rm(e){return Vr(e).position==="static"}function Gx(e,t){if(!ji(e)||Vr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ni(e)===n&&(n=n.ownerDocument.body),n}function Vx(e,t){const n=kr(e);if(Xd(e))return n;if(!ji(e)){let i=lo(e);for(;i&&!Va(i);){if(Zn(i)&&!Rm(i))return i;i=lo(i)}return n}let r=Gx(e,t);for(;r&&oA(r)&&Rm(r);)r=Gx(r,t);return r&&Va(r)&&Rm(r)&&!_m(r)?n:r||aA(e)||n}const BA=async function(e){const t=this.getOffsetParent||Vx,n=this.getDimensions,r=await n(e.floating);return{reference:OA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function AA(e){return Vr(e).direction==="rtl"}const PA={convertOffsetParentRelativeRectToViewportRelativeRect:DA,getDocumentElement:Ni,getClippingRect:RA,getOffsetParent:Vx,getElementRects:BA,getClientRects:CA,getDimensions:LA,getScale:Wa,isElement:Zn,isRTL:AA};function $x(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function NA(e,t){let n=null,r;const i=Ni(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:p,height:h}=u;if(a||t(),!p||!h)return;const m=Jd(f),y=Jd(i.clientWidth-(d+p)),b=Jd(i.clientHeight-(f+h)),g=Jd(d),S={rootMargin:-m+"px "+-y+"px "+-b+"px "+-g+"px",threshold:qo(0,$a(1,l))||1};let w=!0;function _(T){const M=T[0].intersectionRatio;if(M!==l){if(!w)return o();M?o(!1,M):r=setTimeout(()=>{o(!1,1e-7)},1e3)}M===1&&!$x(u,e.getBoundingClientRect())&&o(),w=!1}try{n=new IntersectionObserver(_,{...S,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,S)}n.observe(e)}return o(!0),s}function jA(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Im(e),d=i||s?[...u?bc(u):[],...bc(t)]:[];d.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const f=u&&a?NA(u,n):null;let p=-1,h=null;o&&(h=new ResizeObserver(g=>{let[v]=g;v&&v.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let m,y=l?Xo(e):null;l&&b();function b(){const g=Xo(e);y&&!$x(y,g)&&n(),y=g,m=requestAnimationFrame(b)}return n(),()=>{var g;d.forEach(v=>{i&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),f==null||f(),(g=h)==null||g.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const FA=wA,GA=SA,Yx=bA,VA=(e,t,n)=>{const r=new Map,i={platform:PA,...n},s={...i.platform,_c:r};return yA(e,t,{...i,platform:s})};var rf=typeof document<"u"?x.useLayoutEffect:x.useEffect;function sf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!sf(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!sf(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Wx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Hx(e,t){const n=Wx(e);return Math.round(t*n)/n}function Lm(e){const t=le.useRef(e);return rf(()=>{t.current=e}),t}function $A(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[d,f]=le.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=le.useState(r);sf(p,r)||h(r);const[m,y]=le.useState(null),[b,g]=le.useState(null),v=le.useCallback(G=>{G!==T.current&&(T.current=G,y(G))},[]),S=le.useCallback(G=>{G!==M.current&&(M.current=G,g(G))},[]),w=s||m,_=o||b,T=le.useRef(null),M=le.useRef(null),C=le.useRef(d),k=l!=null,I=Lm(l),O=Lm(i),A=Lm(u),L=le.useCallback(()=>{if(!T.current||!M.current)return;const G={placement:t,strategy:n,middleware:p};O.current&&(G.platform=O.current),VA(T.current,M.current,G).then(Z=>{const W={...Z,isPositioned:A.current!==!1};V.current&&!sf(C.current,W)&&(C.current=W,Ul.flushSync(()=>{f(W)}))})},[p,t,n,O,A]);rf(()=>{u===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,f(G=>({...G,isPositioned:!1})))},[u]);const V=le.useRef(!1);rf(()=>(V.current=!0,()=>{V.current=!1}),[]),rf(()=>{if(w&&(T.current=w),_&&(M.current=_),w&&_){if(I.current)return I.current(w,_,L);L()}},[w,_,L,I,k]);const Y=le.useMemo(()=>({reference:T,floating:M,setReference:v,setFloating:S}),[v,S]),N=le.useMemo(()=>({reference:w,floating:_}),[w,_]),j=le.useMemo(()=>{const G={position:n,left:0,top:0};if(!N.floating)return G;const Z=Hx(N.floating,d.x),W=Hx(N.floating,d.y);return a?{...G,transform:"translate("+Z+"px, "+W+"px)",...Wx(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Z,top:W}},[n,a,N.floating,d.x,d.y]);return le.useMemo(()=>({...d,update:L,refs:Y,elements:N,floatingStyles:j}),[d,L,Y,N,j])}const YA=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Yx({element:r.current,padding:i}).fn(n):{}:r?Yx({element:r,padding:i}).fn(n):{}}}},WA=(e,t)=>({...FA(e),options:[e,t]}),HA=(e,t)=>({...GA(e),options:[e,t]}),ZA=(e,t)=>({...YA(e),options:[e,t]});var of=[];const Zx={...le},UA=Zx.useInsertionEffect||(e=>e());function zA(e){const t=le.useRef(()=>{if(of.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return UA(()=>{t.current=e}),le.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}var af=typeof document<"u"?x.useLayoutEffect:x.useEffect;let Ux=!1,qA=0;const zx=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+qA++;function XA(){const[e,t]=le.useState(()=>Ux?zx():void 0);return af(()=>{e==null&&t(zx())},[]),le.useEffect(()=>{Ux=!0},[]),e}const qx=Zx.useId||XA;let wc;of.NODE_ENV!=="production"&&(wc=new Set);function KA(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i="Floating UI: "+n.join(" ");if(!((e=wc)!=null&&e.has(i))){var s;(s=wc)==null||s.add(i),console.warn(i)}}function QA(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i="Floating UI: "+n.join(" ");if(!((e=wc)!=null&&e.has(i))){var s;(s=wc)==null||s.add(i),console.error(i)}}const JA=le.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:i},middlewareData:{arrow:s,shift:o}},width:a=14,height:l=7,tipRadius:u=0,strokeWidth:d=0,staticOffset:f,stroke:p,d:h,style:{transform:m,...y}={},...b}=t;of.NODE_ENV!=="production"&&(n||KA("The `ref` prop is required for `FloatingArrow`."));const g=qx(),[v,S]=le.useState(!1);if(af(()=>{if(!i)return;Vr(i).direction==="rtl"&&S(!0)},[i]),!i)return null;const[w,_]=r.split("-"),T=w==="top"||w==="bottom";let M=f;(T&&o!=null&&o.x||!T&&o!=null&&o.y)&&(M=null);const C=d*2,k=C/2,I=a/2*(u/-8+1),O=l/2*u/4,A=!!h,L=M&&_==="end"?"bottom":"top";let V=M&&_==="end"?"right":"left";M&&v&&(V=_==="end"?"left":"right");const Y=(s==null?void 0:s.x)!=null?M||s.x:"",N=(s==null?void 0:s.y)!=null?M||s.y:"",j=h||"M0,0"+(" H"+a)+(" L"+(a-I)+","+(l-O))+(" Q"+a/2+","+l+" "+I+","+(l-O))+" Z",G={top:A?"rotate(180deg)":"",left:A?"rotate(90deg)":"rotate(-90deg)",bottom:A?"":"rotate(180deg)",right:A?"rotate(-90deg)":"rotate(90deg)"}[w];return c.jsxs("svg",{...b,"aria-hidden":!0,ref:n,width:A?a:a+C,height:a,viewBox:"0 0 "+a+" "+(l>a?l:a),style:{position:"absolute",pointerEvents:"none",[V]:Y,[L]:N,[w]:T||A?"100%":"calc(100% - "+C/2+"px)",transform:[G,m].filter(Z=>!!Z).join(" "),...y},children:[C>0&&c.jsx("path",{clipPath:"url(#"+g+")",fill:"none",stroke:p,strokeWidth:C+(h?0:1),d:j}),c.jsx("path",{stroke:C&&!h?b.fill:"none",d:j}),c.jsx("clipPath",{id:g,children:c.jsx("rect",{x:-k,y:k*(A?-1:1),width:a+C,height:a})})]})});function eP(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const tP=le.createContext(null),nP=le.createContext(null),rP=()=>{var e;return((e=le.useContext(tP))==null?void 0:e.id)||null},iP=()=>le.useContext(nP);function sP(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=qx(),s=le.useRef({}),[o]=le.useState(()=>eP()),a=rP()!=null;if(of.NODE_ENV!=="production"){const h=r.reference;h&&!Zn(h)&&QA("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=le.useState(r.reference),d=zA((h,m,y)=>{s.current.openEvent=h?m:void 0,o.emit("openchange",{open:h,event:m,reason:y,nested:a}),n==null||n(h,m,y)}),f=le.useMemo(()=>({setPositionReference:u}),[]),p=le.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return le.useMemo(()=>({dataRef:s,open:t,onOpenChange:d,elements:p,events:o,floatingId:i,refs:f}),[t,d,p,o,i,f])}function oP(e){e===void 0&&(e={});const{nodeId:t}=e,n=sP({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[s,o]=le.useState(null),[a,l]=le.useState(null),d=(i==null?void 0:i.domReference)||s,f=le.useRef(null),p=iP();af(()=>{d&&(f.current=d)},[d]);const h=$A({...e,elements:{...i,...a&&{reference:a}}}),m=le.useCallback(S=>{const w=Zn(S)?{getBoundingClientRect:()=>S.getBoundingClientRect(),contextElement:S}:S;l(w),h.refs.setReference(w)},[h.refs]),y=le.useCallback(S=>{(Zn(S)||S===null)&&(f.current=S,o(S)),(Zn(h.refs.reference.current)||h.refs.reference.current===null||S!==null&&!Zn(S))&&h.refs.setReference(S)},[h.refs]),b=le.useMemo(()=>({...h.refs,setReference:y,setPositionReference:m,domReference:f}),[h.refs,y,m]),g=le.useMemo(()=>({...h.elements,domReference:d}),[h.elements,d]),v=le.useMemo(()=>({...h,...r,refs:b,elements:g,nodeId:t}),[h,b,g,t,r]);return af(()=>{r.dataRef.current.floatingContext=v;const S=p==null?void 0:p.nodesRef.current.find(w=>w.id===t);S&&(S.context=v)}),le.useMemo(()=>({...h,context:v,refs:b,elements:g}),[h,b,g,v])}/*!
|
78
|
+
react-datepicker v8.4.0
|
79
|
+
https://github.com/Hacker0x01/react-datepicker
|
80
|
+
Released under the MIT License.
|
81
|
+
*/var Om=function(t,n){return Om=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},Om(t,n)};function Bn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Om(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ft=function(){return ft=Object.assign||function(n){for(var r,i=1,s=arguments.length;i<s;i++){r=arguments[i];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])}return n},ft.apply(this,arguments)};function Gi(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var aP=function(e){var t=e.showTimeSelectOnly,n=t===void 0?!1:t,r=e.showTime,i=r===void 0?!1:r,s=e.className,o=e.children,a=n?"Choose Time":"Choose Date".concat(i?" and Time":"");return x.createElement("div",{className:s,role:"dialog","aria-label":a,"aria-modal":"true"},o)},lP=function(e,t){var n=x.useRef(null),r=x.useRef(e);r.current=e;var i=x.useCallback(function(s){var o,a=s.composed&&s.composedPath&&s.composedPath().find(function(l){return l instanceof Node})||s.target;n.current&&!n.current.contains(a)&&(t&&a instanceof HTMLElement&&a.classList.contains(t)||(o=r.current)===null||o===void 0||o.call(r,s))},[t]);return x.useEffect(function(){return document.addEventListener("mousedown",i),function(){document.removeEventListener("mousedown",i)}},[i]),n},lf=function(e){var t=e.children,n=e.onClickOutside,r=e.className,i=e.containerRef,s=e.style,o=e.ignoreClass,a=lP(n,o);return x.createElement("div",{className:r,style:s,ref:function(l){a.current=l,i&&(i.current=l)}},t)},ve;(function(e){e.ArrowUp="ArrowUp",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.PageUp="PageUp",e.PageDown="PageDown",e.Home="Home",e.End="End",e.Enter="Enter",e.Space=" ",e.Tab="Tab",e.Escape="Escape",e.Backspace="Backspace",e.X="x"})(ve||(ve={}));function Xx(){var e=typeof window<"u"?window:globalThis;return e}var _c=12;function Dt(e){if(e==null)return new Date;var t=typeof e=="string"?WB(e):Ie(e);return cf(t)?t:new Date}function Bm(e,t,n,r,i){i===void 0&&(i=Dt());for(var s=Ha(n)||Ha(Pm()),o=Array.isArray(t)?t:[t],a=0,l=o;a<l.length;a++){var u=l[a],d=jB(e,u,i,{locale:s});if(cf(d)&&(!r||e===Kt(d,u,n)))return d}return null}function cf(e,t){return Fd(e)&&!Uo(e,new Date("1/1/1800"))}function Kt(e,t,n){if(n==="en")return xx(e,t,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var r=n?Ha(n):void 0;return n&&!r&&console.warn('A locale object was not found for the provided string ["'.concat(n,'"].')),r=r||Ha(Pm()),xx(e,t,{locale:r,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function $r(e,t){var n=t.dateFormat,r=t.locale,i=Array.isArray(n)&&n.length>0?n[0]:n;return e&&Kt(e,i,r)||""}var Kx=" - ";function cP(e,t,n){if(!e)return"";var r=$r(e,n),i=t?$r(t,n):"";return"".concat(r).concat(Kx).concat(i)}function uP(e,t){if(!(e!=null&&e.length))return"";var n=e[0]?$r(e[0],t):"";if(e.length===1)return n;if(e.length===2&&e[1]){var r=$r(e[1],t);return"".concat(n,", ").concat(r)}var i=e.length-1;return"".concat(n," (+").concat(i,")")}function Am(e,t){var n=t.hour,r=n===void 0?0:n,i=t.minute,s=i===void 0?0:i,o=t.second,a=o===void 0?0:o;return Zd(Ud(zd(e,a),s),r)}function dP(e){return gm(e)}function fP(e,t){return Kt(e,"ddd",t)}function uf(e){return Wo(e)}function co(e,t,n){var r=Ha(t||Pm());return ds(e,{locale:r,weekStartsOn:n})}function ys(e){return fx(e)}function kc(e){return Yd(e)}function Qx(e){return hm(e)}function Jx(){return Wo(Dt())}function ew(e){return ux(e)}function pP(e){return ZL(e)}function hP(e){return dx(e)}function Vi(e,t){return e&&t?$B(e,t):!e&&!t}function rr(e,t){return e&&t?GB(e,t):!e&&!t}function df(e,t){return e&&t?VB(e,t):!e&&!t}function pt(e,t){return e&&t?WL(e,t):!e&&!t}function Ko(e,t){return e&&t?YO(e,t):!e&&!t}function Dc(e,t,n){var r,i=Wo(t),s=ux(n);try{r=gc(e,{start:i,end:s})}catch{r=!1}return r}function Pm(){var e=Xx();return e.__localeId__}function Ha(e){if(typeof e=="string"){var t=Xx();return t.__localeData__?t.__localeData__[e]:void 0}else return e}function mP(e,t,n){return t(Kt(e,"EEEE",n))}function gP(e,t){return Kt(e,"EEEEEE",t)}function yP(e,t){return Kt(e,"EEE",t)}function Nm(e,t){return Kt(Gr(Dt(),e),"LLLL",t)}function tw(e,t){return Kt(Gr(Dt(),e),"LLL",t)}function vP(e,t){return Kt(ja(Dt(),e),"QQQ",t)}function Yr(e,t){var n=t===void 0?{}:t,r=n.minDate,i=n.maxDate,s=n.excludeDates,o=n.excludeDateIntervals,a=n.includeDates,l=n.includeDateIntervals,u=n.filterDate;return Cc(e,{minDate:r,maxDate:i})||s&&s.some(function(d){return d instanceof Date?pt(e,d):pt(e,d.date)})||o&&o.some(function(d){var f=d.start,p=d.end;return gc(e,{start:f,end:p})})||a&&!a.some(function(d){return pt(e,d)})||l&&!l.some(function(d){var f=d.start,p=d.end;return gc(e,{start:f,end:p})})||u&&!u(Dt(e))||!1}function jm(e,t){var n=t===void 0?{}:t,r=n.excludeDates,i=n.excludeDateIntervals;return i&&i.length>0?i.some(function(s){var o=s.start,a=s.end;return gc(e,{start:o,end:a})}):r&&r.some(function(s){var o;return s instanceof Date?pt(e,s):pt(e,(o=s.date)!==null&&o!==void 0?o:new Date)})||!1}function nw(e,t){var n=t===void 0?{}:t,r=n.minDate,i=n.maxDate,s=n.excludeDates,o=n.includeDates,a=n.filterDate;return Cc(e,{minDate:r?fx(r):void 0,maxDate:i?dx(i):void 0})||(s==null?void 0:s.some(function(l){return rr(e,l instanceof Date?l:l.date)}))||o&&!o.some(function(l){return rr(e,l)})||a&&!a(Dt(e))||!1}function ff(e,t,n,r){var i=nt(e),s=Hn(e),o=nt(t),a=Hn(t),l=nt(r);return i===o&&i===l?s<=n&&n<=a:i<o?l===i&&s<=n||l===o&&a>=n||l<o&&l>i:!1}function bP(e,t){var n=t===void 0?{}:t,r=n.minDate,i=n.maxDate,s=n.excludeDates,o=n.includeDates;return Cc(e,{minDate:r,maxDate:i})||s&&s.some(function(a){return rr(a instanceof Date?a:a.date,e)})||o&&!o.some(function(a){return rr(a,e)})||!1}function pf(e,t){var n=t===void 0?{}:t,r=n.minDate,i=n.maxDate,s=n.excludeDates,o=n.includeDates,a=n.filterDate;return Cc(e,{minDate:r,maxDate:i})||(s==null?void 0:s.some(function(l){return df(e,l instanceof Date?l:l.date)}))||o&&!o.some(function(l){return df(e,l)})||a&&!a(Dt(e))||!1}function hf(e,t,n){if(!t||!n||!Fd(t)||!Fd(n))return!1;var r=nt(t),i=nt(n);return r<=e&&i>=e}function mf(e,t){var n=t===void 0?{}:t,r=n.minDate,i=n.maxDate,s=n.excludeDates,o=n.includeDates,a=n.filterDate,l=new Date(e,0,1);return Cc(l,{minDate:r?Yd(r):void 0,maxDate:i?px(i):void 0})||(s==null?void 0:s.some(function(u){return Vi(l,u instanceof Date?u:u.date)}))||o&&!o.some(function(u){return Vi(l,u)})||a&&!a(Dt(l))||!1}function gf(e,t,n,r){var i=nt(e),s=Ho(e),o=nt(t),a=Ho(t),l=nt(r);return i===o&&i===l?s<=n&&n<=a:i<o?l===i&&s<=n||l===o&&a>=n||l<o&&l>i:!1}function Cc(e,t){var n,r=t===void 0?{}:t,i=r.minDate,s=r.maxDate;return(n=i&&Pa(e,i)<0||s&&Pa(e,s)>0)!==null&&n!==void 0?n:!1}function rw(e,t){return t.some(function(n){return ms(n)===ms(e)&&gs(n)===gs(e)&&oo(n)===oo(e)})}function iw(e,t){var n=t===void 0?{}:t,r=n.excludeTimes,i=n.includeTimes,s=n.filterTime;return r&&rw(e,r)||i&&!rw(e,i)||s&&!s(e)||!1}function sw(e,t){var n=t.minTime,r=t.maxTime;if(!n||!r)throw new Error("Both minTime and maxTime props required");var i=Dt();i=Zd(i,ms(e)),i=Ud(i,gs(e)),i=zd(i,oo(e));var s=Dt();s=Zd(s,ms(n)),s=Ud(s,gs(n)),s=zd(s,oo(n));var o=Dt();o=Zd(o,ms(r)),o=Ud(o,gs(r)),o=zd(o,oo(r));var a;try{a=!gc(i,{start:s,end:o})}catch{a=!1}return a}function ow(e,t){var n=t===void 0?{}:t,r=n.minDate,i=n.includeDates,s=zo(e,1);return r&&Gd(r,s)>0||i&&i.every(function(o){return Gd(o,s)>0})||!1}function aw(e,t){var n=t===void 0?{}:t,r=n.maxDate,i=n.includeDates,s=fi(e,1);return r&&Gd(s,r)>0||i&&i.every(function(o){return Gd(s,o)>0})||!1}function SP(e,t){var n=t===void 0?{}:t,r=n.minDate,i=n.includeDates,s=Yd(e),o=Tx(s);return r&&Vd(r,o)>0||i&&i.every(function(a){return Vd(a,o)>0})||!1}function xP(e,t){var n=t===void 0?{}:t,r=n.maxDate,i=n.includeDates,s=px(e),o=pm(s,1);return r&&Vd(o,r)>0||i&&i.every(function(a){return Vd(o,a)>0})||!1}function lw(e,t){var n=t===void 0?{}:t,r=n.minDate,i=n.includeDates,s=Fa(e,1);return r&&$d(r,s)>0||i&&i.every(function(o){return $d(o,s)>0})||!1}function wP(e,t){var n=t===void 0?{}:t,r=n.minDate,i=n.yearItemNumber,s=i===void 0?_c:i,o=kc(Fa(e,s)),a=uo(o,s).endPeriod,l=r&&nt(r);return l&&l>a||!1}function cw(e,t){var n=t===void 0?{}:t,r=n.maxDate,i=n.includeDates,s=ps(e,1);return r&&$d(s,r)>0||i&&i.every(function(o){return $d(s,o)>0})||!1}function _P(e,t){var n=t===void 0?{}:t,r=n.maxDate,i=n.yearItemNumber,s=i===void 0?_c:i,o=ps(e,s),a=uo(o,s).startPeriod,l=r&&nt(r);return l&&l<a||!1}function uw(e){var t=e.minDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return Pa(i,t)>=0});return lx(r)}else return n?lx(n):t}function dw(e){var t=e.maxDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return Pa(i,t)<=0});return ax(r)}else return n?ax(n):t}function fw(e,t){var n;e===void 0&&(e=[]),t===void 0&&(t="react-datepicker__day--highlighted");for(var r=new Map,i=0,s=e.length;i<s;i++){var o=e[i];if(hs(o)){var a=Kt(o,"MM.dd.yyyy"),l=r.get(a)||[];l.includes(t)||(l.push(t),r.set(a,l))}else if(typeof o=="object"){var u=Object.keys(o),d=(n=u[0])!==null&&n!==void 0?n:"",f=o[d];if(typeof d=="string"&&Array.isArray(f))for(var p=0,h=f.length;p<h;p++){var m=f[p];if(m){var a=Kt(m,"MM.dd.yyyy"),l=r.get(a)||[];l.includes(d)||(l.push(d),r.set(a,l))}}}}return r}function kP(e,t){return e.length!==t.length?!1:e.every(function(n,r){return n===t[r]})}function DP(e,t){e===void 0&&(e=[]),t===void 0&&(t="react-datepicker__day--holidays");var n=new Map;return e.forEach(function(r){var i=r.date,s=r.holidayName;if(hs(i)){var o=Kt(i,"MM.dd.yyyy"),a=n.get(o)||{className:"",holidayNames:[]};if(!("className"in a&&a.className===t&&kP(a.holidayNames,[s]))){a.className=t;var l=a.holidayNames;a.holidayNames=l?Gi(Gi([],l,!0),[s],!1):[s],n.set(o,a)}}}),n}function CP(e,t,n,r,i){for(var s=i.length,o=[],a=0;a<s;a++){var l=e,u=i[a];u&&(l=GL(l,ms(u)),l=fm(l,gs(u)),l=YL(l,oo(u)));var d=fm(e,(n+1)*r);ao(l,t)&&Uo(l,d)&&u!=null&&o.push(u)}return o}function pw(e){return e<10?"0".concat(e):"".concat(e)}function uo(e,t){t===void 0&&(t=_c);var n=Math.ceil(nt(e)/t)*t,r=n-(t-1);return{startPeriod:r,endPeriod:n}}function MP(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate()),n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),24);return Math.round((+n-+t)/36e5)}function hw(e){var t=e.getSeconds(),n=e.getMilliseconds();return Ie(e.getTime()-t*1e3-n)}function TP(e,t){return hw(e).getTime()===hw(t).getTime()}function mw(e){if(!hs(e))throw new Error("Invalid date");var t=new Date(e);return t.setHours(0,0,0,0),t}function gw(e,t){if(!hs(e)||!hs(t))throw new Error("Invalid date received");var n=mw(e),r=mw(t);return Uo(n,r)}function yw(e){return e.key===ve.Space}var IP=function(e){Bn(t,e);function t(n){var r=e.call(this,n)||this;return r.inputRef=x.createRef(),r.onTimeChange=function(i){var s,o;r.setState({time:i});var a=r.props.date,l=a instanceof Date&&!isNaN(+a),u=l?a:new Date;if(i!=null&&i.includes(":")){var d=i.split(":"),f=d[0],p=d[1];u.setHours(Number(f)),u.setMinutes(Number(p))}(o=(s=r.props).onChange)===null||o===void 0||o.call(s,u)},r.renderTimeInput=function(){var i=r.state.time,s=r.props,o=s.date,a=s.timeString,l=s.customTimeInput;return l?x.cloneElement(l,{date:o,value:i,onChange:r.onTimeChange}):x.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:r.inputRef,onClick:function(){var u;(u=r.inputRef.current)===null||u===void 0||u.focus()},required:!0,value:i,onChange:function(u){r.onTimeChange(u.target.value||a)}})},r.state={time:r.props.timeString},r}return t.getDerivedStateFromProps=function(n,r){return n.timeString!==r.time?{time:n.timeString}:null},t.prototype.render=function(){return x.createElement("div",{className:"react-datepicker__input-time-container"},x.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),x.createElement("div",{className:"react-datepicker-time__input-container"},x.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},t}(x.Component),EP=function(e){Bn(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.dayEl=x.createRef(),n.handleClick=function(r){!n.isDisabled()&&n.props.onClick&&n.props.onClick(r)},n.handleMouseEnter=function(r){!n.isDisabled()&&n.props.onMouseEnter&&n.props.onMouseEnter(r)},n.handleOnKeyDown=function(r){var i,s,o=r.key;o===ve.Space&&(r.preventDefault(),r.key=ve.Enter),(s=(i=n.props).handleOnKeyDown)===null||s===void 0||s.call(i,r)},n.isSameDay=function(r){return pt(n.props.day,r)},n.isKeyboardSelected=function(){var r;if(n.props.disabledKeyboardNavigation)return!1;var i=n.props.selectsMultiple?(r=n.props.selectedDates)===null||r===void 0?void 0:r.some(function(o){return n.isSameDayOrWeek(o)}):n.isSameDayOrWeek(n.props.selected),s=n.props.preSelection&&n.isDisabled(n.props.preSelection);return!i&&n.isSameDayOrWeek(n.props.preSelection)&&!s},n.isDisabled=function(r){return r===void 0&&(r=n.props.day),Yr(r,{minDate:n.props.minDate,maxDate:n.props.maxDate,excludeDates:n.props.excludeDates,excludeDateIntervals:n.props.excludeDateIntervals,includeDateIntervals:n.props.includeDateIntervals,includeDates:n.props.includeDates,filterDate:n.props.filterDate})},n.isExcluded=function(){return jm(n.props.day,{excludeDates:n.props.excludeDates,excludeDateIntervals:n.props.excludeDateIntervals})},n.isStartOfWeek=function(){return pt(n.props.day,co(n.props.day,n.props.locale,n.props.calendarStartDay))},n.isSameWeek=function(r){return n.props.showWeekPicker&&pt(r,co(n.props.day,n.props.locale,n.props.calendarStartDay))},n.isSameDayOrWeek=function(r){return n.isSameDay(r)||n.isSameWeek(r)},n.getHighLightedClass=function(){var r=n.props,i=r.day,s=r.highlightDates;if(!s)return!1;var o=Kt(i,"MM.dd.yyyy");return s.get(o)},n.getHolidaysClass=function(){var r,i=n.props,s=i.day,o=i.holidays;if(!o)return[void 0];var a=Kt(s,"MM.dd.yyyy");return o.has(a)?[(r=o.get(a))===null||r===void 0?void 0:r.className]:[void 0]},n.isInRange=function(){var r=n.props,i=r.day,s=r.startDate,o=r.endDate;return!s||!o?!1:Dc(i,s,o)},n.isInSelectingRange=function(){var r,i=n.props,s=i.day,o=i.selectsStart,a=i.selectsEnd,l=i.selectsRange,u=i.selectsDisabledDaysInRange,d=i.startDate,f=i.endDate,p=(r=n.props.selectingDate)!==null&&r!==void 0?r:n.props.preSelection;return!(o||a||l)||!p||!u&&n.isDisabled()?!1:o&&f&&(Uo(p,f)||Ko(p,f))?Dc(s,p,f):a&&d&&(ao(p,d)||Ko(p,d))||l&&d&&!f&&(ao(p,d)||Ko(p,d))?Dc(s,d,p):!1},n.isSelectingRangeStart=function(){var r;if(!n.isInSelectingRange())return!1;var i=n.props,s=i.day,o=i.startDate,a=i.selectsStart,l=(r=n.props.selectingDate)!==null&&r!==void 0?r:n.props.preSelection;return a?pt(s,l):pt(s,o)},n.isSelectingRangeEnd=function(){var r;if(!n.isInSelectingRange())return!1;var i=n.props,s=i.day,o=i.endDate,a=i.selectsEnd,l=i.selectsRange,u=(r=n.props.selectingDate)!==null&&r!==void 0?r:n.props.preSelection;return a||l?pt(s,u):pt(s,o)},n.isRangeStart=function(){var r=n.props,i=r.day,s=r.startDate,o=r.endDate;return!s||!o?!1:pt(s,i)},n.isRangeEnd=function(){var r=n.props,i=r.day,s=r.startDate,o=r.endDate;return!s||!o?!1:pt(o,i)},n.isWeekend=function(){var r=FO(n.props.day);return r===0||r===6},n.isAfterMonth=function(){return n.props.month!==void 0&&(n.props.month+1)%12===Hn(n.props.day)},n.isBeforeMonth=function(){return n.props.month!==void 0&&(Hn(n.props.day)+1)%12===n.props.month},n.isCurrentDay=function(){return n.isSameDay(Dt())},n.isSelected=function(){var r;return n.props.selectsMultiple?(r=n.props.selectedDates)===null||r===void 0?void 0:r.some(function(i){return n.isSameDayOrWeek(i)}):n.isSameDayOrWeek(n.props.selected)},n.getClassNames=function(r){var i=n.props.dayClassName?n.props.dayClassName(r):void 0;return Nn("react-datepicker__day",i,"react-datepicker__day--"+fP(n.props.day),{"react-datepicker__day--disabled":n.isDisabled(),"react-datepicker__day--excluded":n.isExcluded(),"react-datepicker__day--selected":n.isSelected(),"react-datepicker__day--keyboard-selected":n.isKeyboardSelected(),"react-datepicker__day--range-start":n.isRangeStart(),"react-datepicker__day--range-end":n.isRangeEnd(),"react-datepicker__day--in-range":n.isInRange(),"react-datepicker__day--in-selecting-range":n.isInSelectingRange(),"react-datepicker__day--selecting-range-start":n.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":n.isSelectingRangeEnd(),"react-datepicker__day--today":n.isCurrentDay(),"react-datepicker__day--weekend":n.isWeekend(),"react-datepicker__day--outside-month":n.isAfterMonth()||n.isBeforeMonth()},n.getHighLightedClass(),n.getHolidaysClass())},n.getAriaLabel=function(){var r=n.props,i=r.day,s=r.ariaLabelPrefixWhenEnabled,o=s===void 0?"Choose":s,a=r.ariaLabelPrefixWhenDisabled,l=a===void 0?"Not available":a,u=n.isDisabled()||n.isExcluded()?l:o;return"".concat(u," ").concat(Kt(i,"PPPP",n.props.locale))},n.getTitle=function(){var r=n.props,i=r.day,s=r.holidays,o=s===void 0?new Map:s,a=r.excludeDates,l=Kt(i,"MM.dd.yyyy"),u=[];return o.has(l)&&u.push.apply(u,o.get(l).holidayNames),n.isExcluded()&&u.push(a==null?void 0:a.filter(function(d){return d instanceof Date?pt(d,i):pt(d==null?void 0:d.date,i)}).map(function(d){if(!(d instanceof Date))return d==null?void 0:d.message})),u.join(", ")},n.getTabIndex=function(){var r=n.props.selected,i=n.props.preSelection,s=!(n.props.showWeekPicker&&(n.props.showWeekNumber||!n.isStartOfWeek()))&&(n.isKeyboardSelected()||n.isSameDay(r)&&pt(i,r))?0:-1;return s},n.handleFocusDay=function(){var r;n.shouldFocusDay()&&((r=n.dayEl.current)===null||r===void 0||r.focus({preventScroll:!0}))},n.renderDayContents=function(){return n.props.monthShowsDuplicateDaysEnd&&n.isAfterMonth()||n.props.monthShowsDuplicateDaysStart&&n.isBeforeMonth()?null:n.props.renderDayContents?n.props.renderDayContents(wx(n.props.day),n.props.day):wx(n.props.day)},n.render=function(){return x.createElement("div",{ref:n.dayEl,className:n.getClassNames(n.props.day),onKeyDown:n.handleOnKeyDown,onClick:n.handleClick,onMouseEnter:n.props.usePointerEvent?void 0:n.handleMouseEnter,onPointerEnter:n.props.usePointerEvent?n.handleMouseEnter:void 0,tabIndex:n.getTabIndex(),"aria-label":n.getAriaLabel(),role:"option",title:n.getTitle(),"aria-disabled":n.isDisabled(),"aria-current":n.isCurrentDay()?"date":void 0,"aria-selected":n.isSelected()||n.isInRange()},n.renderDayContents(),n.getTitle()!==""&&x.createElement("span",{className:"overlay"},n.getTitle()))},n}return t.prototype.componentDidMount=function(){this.handleFocusDay()},t.prototype.componentDidUpdate=function(){this.handleFocusDay()},t.prototype.shouldFocusDay=function(){var n=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(n=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(n=!1),this.isDayActiveElement()&&(n=!0),this.isDuplicateDay()&&(n=!1)),n},t.prototype.isDayActiveElement=function(){var n,r,i;return((r=(n=this.props.containerRef)===null||n===void 0?void 0:n.current)===null||r===void 0?void 0:r.contains(document.activeElement))&&((i=document.activeElement)===null||i===void 0?void 0:i.classList.contains("react-datepicker__day"))},t.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},t}(x.Component),RP=function(e){Bn(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.weekNumberEl=x.createRef(),n.handleClick=function(r){n.props.onClick&&n.props.onClick(r)},n.handleOnKeyDown=function(r){var i,s,o=r.key;o===ve.Space&&(r.preventDefault(),r.key=ve.Enter),(s=(i=n.props).handleOnKeyDown)===null||s===void 0||s.call(i,r)},n.isKeyboardSelected=function(){return!n.props.disabledKeyboardNavigation&&!pt(n.props.date,n.props.selected)&&pt(n.props.date,n.props.preSelection)},n.getTabIndex=function(){return n.props.showWeekPicker&&n.props.showWeekNumber&&(n.isKeyboardSelected()||pt(n.props.date,n.props.selected)&&pt(n.props.preSelection,n.props.selected))?0:-1},n.handleFocusWeekNumber=function(r){var i=!1;n.getTabIndex()===0&&!(r!=null&&r.isInputFocused)&&pt(n.props.date,n.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(i=!0),n.props.inline&&!n.props.shouldFocusDayInline&&(i=!1),n.props.containerRef&&n.props.containerRef.current&&n.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(i=!0)),i&&n.weekNumberEl.current&&n.weekNumberEl.current.focus({preventScroll:!0})},n}return Object.defineProperty(t,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},t.prototype.componentDidUpdate=function(n){this.handleFocusWeekNumber(n)},t.prototype.render=function(){var n=this.props,r=n.weekNumber,i=n.isWeekDisabled,s=n.ariaLabelPrefix,o=s===void 0?t.defaultProps.ariaLabelPrefix:s,a=n.onClick,l={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!a&&!i,"react-datepicker__week-number--selected":!!a&&pt(this.props.date,this.props.selected)};return x.createElement("div",{ref:this.weekNumberEl,className:Nn(l),"aria-label":"".concat(o," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex()},r)},t}(x.Component),LP=function(e){Bn(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.isDisabled=function(r){return Yr(r,{minDate:n.props.minDate,maxDate:n.props.maxDate,excludeDates:n.props.excludeDates,excludeDateIntervals:n.props.excludeDateIntervals,includeDateIntervals:n.props.includeDateIntervals,includeDates:n.props.includeDates,filterDate:n.props.filterDate})},n.handleDayClick=function(r,i){n.props.onDayClick&&n.props.onDayClick(r,i)},n.handleDayMouseEnter=function(r){n.props.onDayMouseEnter&&n.props.onDayMouseEnter(r)},n.handleWeekClick=function(r,i,s){for(var o,a,l,u=new Date(r),d=0;d<7;d++){var f=new Date(r);f.setDate(f.getDate()+d);var p=!n.isDisabled(f);if(p){u=f;break}}typeof n.props.onWeekSelect=="function"&&n.props.onWeekSelect(u,i,s),n.props.showWeekPicker&&n.handleDayClick(u,s),((o=n.props.shouldCloseOnSelect)!==null&&o!==void 0?o:t.defaultProps.shouldCloseOnSelect)&&((l=(a=n.props).setOpen)===null||l===void 0||l.call(a,!1))},n.formatWeekNumber=function(r){return n.props.formatWeekNumber?n.props.formatWeekNumber(r):dP(r)},n.isWeekDisabled=function(){for(var r=n.startOfWeek(),i=di(r,6),s=new Date(r);s<=i;){if(!n.isDisabled(s))return!1;s=di(s,1)}return!0},n.renderDays=function(){var r=n.startOfWeek(),i=[],s=n.formatWeekNumber(r);if(n.props.showWeekNumber){var o=n.props.onWeekSelect||n.props.showWeekPicker?n.handleWeekClick.bind(n,r,s):void 0;i.push(x.createElement(RP,ft({key:"W"},t.defaultProps,n.props,{weekNumber:s,isWeekDisabled:n.isWeekDisabled(),date:r,onClick:o})))}return i.concat([0,1,2,3,4,5,6].map(function(a){var l=di(r,a);return x.createElement(EP,ft({},t.defaultProps,n.props,{ariaLabelPrefixWhenEnabled:n.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:n.props.disabledDayAriaLabelPrefix,key:l.valueOf(),day:l,onClick:n.handleDayClick.bind(n,l),onMouseEnter:n.handleDayMouseEnter.bind(n,l)}))}))},n.startOfWeek=function(){return co(n.props.day,n.props.locale,n.props.calendarStartDay)},n.isKeyboardSelected=function(){return!n.props.disabledKeyboardNavigation&&!pt(n.startOfWeek(),n.props.selected)&&pt(n.startOfWeek(),n.props.preSelection)},n}return Object.defineProperty(t,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),t.prototype.render=function(){var n={"react-datepicker__week":!0,"react-datepicker__week--selected":pt(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()};return x.createElement("div",{className:Nn(n)},this.renderDays())},t}(x.Component),Mc,OP=6,Za={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},Fm=(Mc={},Mc[Za.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},Mc[Za.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},Mc[Za.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},Mc),yf=1;function vw(e,t){return e?Za.FOUR_COLUMNS:t?Za.TWO_COLUMNS:Za.THREE_COLUMNS}var BP=function(e){Bn(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.MONTH_REFS=Gi([],Array(12),!0).map(function(){return x.createRef()}),n.QUARTER_REFS=Gi([],Array(4),!0).map(function(){return x.createRef()}),n.isDisabled=function(r){return Yr(r,{minDate:n.props.minDate,maxDate:n.props.maxDate,excludeDates:n.props.excludeDates,excludeDateIntervals:n.props.excludeDateIntervals,includeDateIntervals:n.props.includeDateIntervals,includeDates:n.props.includeDates,filterDate:n.props.filterDate})},n.isExcluded=function(r){return jm(r,{excludeDates:n.props.excludeDates,excludeDateIntervals:n.props.excludeDateIntervals})},n.handleDayClick=function(r,i){var s,o;(o=(s=n.props).onDayClick)===null||o===void 0||o.call(s,r,i,n.props.orderInDisplay)},n.handleDayMouseEnter=function(r){var i,s;(s=(i=n.props).onDayMouseEnter)===null||s===void 0||s.call(i,r)},n.handleMouseLeave=function(){var r,i;(i=(r=n.props).onMouseLeave)===null||i===void 0||i.call(r)},n.isRangeStartMonth=function(r){var i=n.props,s=i.day,o=i.startDate,a=i.endDate;return!o||!a?!1:rr(Gr(s,r),o)},n.isRangeStartQuarter=function(r){var i=n.props,s=i.day,o=i.startDate,a=i.endDate;return!o||!a?!1:df(ja(s,r),o)},n.isRangeEndMonth=function(r){var i=n.props,s=i.day,o=i.startDate,a=i.endDate;return!o||!a?!1:rr(Gr(s,r),a)},n.isRangeEndQuarter=function(r){var i=n.props,s=i.day,o=i.startDate,a=i.endDate;return!o||!a?!1:df(ja(s,r),a)},n.isInSelectingRangeMonth=function(r){var i,s=n.props,o=s.day,a=s.selectsStart,l=s.selectsEnd,u=s.selectsRange,d=s.startDate,f=s.endDate,p=(i=n.props.selectingDate)!==null&&i!==void 0?i:n.props.preSelection;return!(a||l||u)||!p?!1:a&&f?ff(p,f,r,o):l&&d||u&&d&&!f?ff(d,p,r,o):!1},n.isSelectingMonthRangeStart=function(r){var i;if(!n.isInSelectingRangeMonth(r))return!1;var s=n.props,o=s.day,a=s.startDate,l=s.selectsStart,u=Gr(o,r),d=(i=n.props.selectingDate)!==null&&i!==void 0?i:n.props.preSelection;return l?rr(u,d):rr(u,a)},n.isSelectingMonthRangeEnd=function(r){var i;if(!n.isInSelectingRangeMonth(r))return!1;var s=n.props,o=s.day,a=s.endDate,l=s.selectsEnd,u=s.selectsRange,d=Gr(o,r),f=(i=n.props.selectingDate)!==null&&i!==void 0?i:n.props.preSelection;return l||u?rr(d,f):rr(d,a)},n.isInSelectingRangeQuarter=function(r){var i,s=n.props,o=s.day,a=s.selectsStart,l=s.selectsEnd,u=s.selectsRange,d=s.startDate,f=s.endDate,p=(i=n.props.selectingDate)!==null&&i!==void 0?i:n.props.preSelection;return!(a||l||u)||!p?!1:a&&f?gf(p,f,r,o):l&&d||u&&d&&!f?gf(d,p,r,o):!1},n.isWeekInMonth=function(r){var i=n.props.day,s=di(r,6);return rr(r,i)||rr(s,i)},n.isCurrentMonth=function(r,i){return nt(r)===nt(Dt())&&i===Hn(Dt())},n.isCurrentQuarter=function(r,i){return nt(r)===nt(Dt())&&i===Ho(Dt())},n.isSelectedMonth=function(r,i,s){return Hn(s)===i&&nt(r)===nt(s)},n.isSelectMonthInList=function(r,i,s){return s.some(function(o){return n.isSelectedMonth(r,i,o)})},n.isSelectedQuarter=function(r,i,s){return Ho(r)===i&&nt(r)===nt(s)},n.isMonthSelected=function(){var r=n.props,i=r.day,s=r.selected,o=r.selectedDates,a=r.selectsMultiple,l=Hn(i);return a?o==null?void 0:o.some(function(u){return n.isSelectedMonth(i,l,u)}):!!s&&n.isSelectedMonth(i,l,s)},n.renderWeeks=function(){for(var r=[],i=n.props.fixedHeight,s=0,o=!1,a=co(ys(n.props.day),n.props.locale,n.props.calendarStartDay),l=function(m){return n.props.showWeekPicker?co(m,n.props.locale,n.props.calendarStartDay):n.props.preSelection},u=function(m){return n.props.showWeekPicker?co(m,n.props.locale,n.props.calendarStartDay):n.props.selected},d=n.props.selected?u(n.props.selected):void 0,f=n.props.preSelection?l(n.props.preSelection):void 0;r.push(x.createElement(LP,ft({},n.props,{ariaLabelPrefix:n.props.weekAriaLabelPrefix,key:s,day:a,month:Hn(n.props.day),onDayClick:n.handleDayClick,onDayMouseEnter:n.handleDayMouseEnter,selected:d,preSelection:f,showWeekNumber:n.props.showWeekNumbers}))),!o;){s++,a=jd(a,1);var p=i&&s>=OP,h=!i&&!n.isWeekInMonth(a);if(p||h)if(n.props.peekNextMonth)o=!0;else break}return r},n.onMonthClick=function(r,i){var s=n.isMonthDisabledForLabelDate(i),o=s.isDisabled,a=s.labelDate;o||n.handleDayClick(ys(a),r)},n.onMonthMouseEnter=function(r){var i=n.isMonthDisabledForLabelDate(r),s=i.isDisabled,o=i.labelDate;s||n.handleDayMouseEnter(ys(o))},n.handleMonthNavigation=function(r,i){var s,o,a,l;(o=(s=n.props).setPreSelection)===null||o===void 0||o.call(s,i),(l=(a=n.MONTH_REFS[r])===null||a===void 0?void 0:a.current)===null||l===void 0||l.focus()},n.handleKeyboardNavigation=function(r,i,s){var o,a=n.props,l=a.selected,u=a.preSelection,d=a.setPreSelection,f=a.minDate,p=a.maxDate,h=a.showFourColumnMonthYearPicker,m=a.showTwoColumnMonthYearPicker;if(u){var y=vw(h,m),b=n.getVerticalOffset(y),g=(o=Fm[y])===null||o===void 0?void 0:o.grid,v=function(M,C,k){var I,O,A=C,L=k;switch(M){case ve.ArrowRight:A=fi(C,yf),L=k===11?0:k+yf;break;case ve.ArrowLeft:A=zo(C,yf),L=k===0?11:k-yf;break;case ve.ArrowUp:A=zo(C,b),L=!((I=g==null?void 0:g[0])===null||I===void 0)&&I.includes(k)?k+12-b:k-b;break;case ve.ArrowDown:A=fi(C,b),L=!((O=g==null?void 0:g[g.length-1])===null||O===void 0)&&O.includes(k)?k-12+b:k+b;break}return{newCalculatedDate:A,newCalculatedMonth:L}},S=function(M,C,k){for(var I=40,O=M,A=!1,L=0,V=v(O,C,k),Y=V.newCalculatedDate,N=V.newCalculatedMonth;!A;){if(L>=I){Y=C,N=k;break}if(f&&Y<f){O=ve.ArrowRight;var j=v(O,Y,N);Y=j.newCalculatedDate,N=j.newCalculatedMonth}if(p&&Y>p){O=ve.ArrowLeft;var j=v(O,Y,N);Y=j.newCalculatedDate,N=j.newCalculatedMonth}if(bP(Y,n.props)){var j=v(O,Y,N);Y=j.newCalculatedDate,N=j.newCalculatedMonth}else A=!0;L++}return{newCalculatedDate:Y,newCalculatedMonth:N}};if(i===ve.Enter){n.isMonthDisabled(s)||(n.onMonthClick(r,s),d==null||d(l));return}var w=S(i,u,s),_=w.newCalculatedDate,T=w.newCalculatedMonth;switch(i){case ve.ArrowRight:case ve.ArrowLeft:case ve.ArrowUp:case ve.ArrowDown:n.handleMonthNavigation(T,_);break}}},n.getVerticalOffset=function(r){var i,s;return(s=(i=Fm[r])===null||i===void 0?void 0:i.verticalNavigationOffset)!==null&&s!==void 0?s:0},n.onMonthKeyDown=function(r,i){var s=n.props,o=s.disabledKeyboardNavigation,a=s.handleOnMonthKeyDown,l=r.key;l!==ve.Tab&&r.preventDefault(),o||n.handleKeyboardNavigation(r,l,i),a&&a(r)},n.onQuarterClick=function(r,i){var s=ja(n.props.day,i);pf(s,n.props)||n.handleDayClick(Qx(s),r)},n.onQuarterMouseEnter=function(r){var i=ja(n.props.day,r);pf(i,n.props)||n.handleDayMouseEnter(Qx(i))},n.handleQuarterNavigation=function(r,i){var s,o,a,l;n.isDisabled(i)||n.isExcluded(i)||((o=(s=n.props).setPreSelection)===null||o===void 0||o.call(s,i),(l=(a=n.QUARTER_REFS[r-1])===null||a===void 0?void 0:a.current)===null||l===void 0||l.focus())},n.onQuarterKeyDown=function(r,i){var s,o,a=r.key;if(!n.props.disabledKeyboardNavigation)switch(a){case ve.Enter:n.onQuarterClick(r,i),(o=(s=n.props).setPreSelection)===null||o===void 0||o.call(s,n.props.selected);break;case ve.ArrowRight:if(!n.props.preSelection)break;n.handleQuarterNavigation(i===4?1:i+1,pm(n.props.preSelection,1));break;case ve.ArrowLeft:if(!n.props.preSelection)break;n.handleQuarterNavigation(i===1?4:i-1,Tx(n.props.preSelection));break}},n.isMonthDisabledForLabelDate=function(r){var i,s=n.props,o=s.day,a=s.minDate,l=s.maxDate,u=s.excludeDates,d=s.includeDates,f=Gr(o,r);return{isDisabled:(i=(a||l||u||d)&&nw(f,n.props))!==null&&i!==void 0?i:!1,labelDate:f}},n.isMonthDisabled=function(r){var i=n.isMonthDisabledForLabelDate(r).isDisabled;return i},n.getMonthClassNames=function(r){var i=n.props,s=i.day,o=i.startDate,a=i.endDate,l=i.preSelection,u=i.monthClassName,d=u?u(Gr(s,r)):void 0,f=n.getSelection();return Nn("react-datepicker__month-text","react-datepicker__month-".concat(r),d,{"react-datepicker__month-text--disabled":n.isMonthDisabled(r),"react-datepicker__month-text--selected":f?n.isSelectMonthInList(s,r,f):void 0,"react-datepicker__month-text--keyboard-selected":!n.props.disabledKeyboardNavigation&&l&&n.isSelectedMonth(s,r,l)&&!n.isMonthSelected()&&!n.isMonthDisabled(r),"react-datepicker__month-text--in-selecting-range":n.isInSelectingRangeMonth(r),"react-datepicker__month-text--in-range":o&&a?ff(o,a,r,s):void 0,"react-datepicker__month-text--range-start":n.isRangeStartMonth(r),"react-datepicker__month-text--range-end":n.isRangeEndMonth(r),"react-datepicker__month-text--selecting-range-start":n.isSelectingMonthRangeStart(r),"react-datepicker__month-text--selecting-range-end":n.isSelectingMonthRangeEnd(r),"react-datepicker__month-text--today":n.isCurrentMonth(s,r)})},n.getTabIndex=function(r){if(n.props.preSelection==null)return"-1";var i=Hn(n.props.preSelection),s=n.isMonthDisabledForLabelDate(i).isDisabled,o=r===i&&!(s||n.props.disabledKeyboardNavigation)?"0":"-1";return o},n.getQuarterTabIndex=function(r){if(n.props.preSelection==null)return"-1";var i=Ho(n.props.preSelection),s=pf(n.props.day,n.props),o=r===i&&!(s||n.props.disabledKeyboardNavigation)?"0":"-1";return o},n.getAriaLabel=function(r){var i=n.props,s=i.chooseDayAriaLabelPrefix,o=s===void 0?"Choose":s,a=i.disabledDayAriaLabelPrefix,l=a===void 0?"Not available":a,u=i.day,d=i.locale,f=Gr(u,r),p=n.isDisabled(f)||n.isExcluded(f)?l:o;return"".concat(p," ").concat(Kt(f,"MMMM yyyy",d))},n.getQuarterClassNames=function(r){var i=n.props,s=i.day,o=i.startDate,a=i.endDate,l=i.selected,u=i.minDate,d=i.maxDate,f=i.excludeDates,p=i.includeDates,h=i.filterDate,m=i.preSelection,y=i.disabledKeyboardNavigation,b=(u||d||f||p||h)&&pf(ja(s,r),n.props);return Nn("react-datepicker__quarter-text","react-datepicker__quarter-".concat(r),{"react-datepicker__quarter-text--disabled":b,"react-datepicker__quarter-text--selected":l?n.isSelectedQuarter(s,r,l):void 0,"react-datepicker__quarter-text--keyboard-selected":!y&&m&&n.isSelectedQuarter(s,r,m)&&!b,"react-datepicker__quarter-text--in-selecting-range":n.isInSelectingRangeQuarter(r),"react-datepicker__quarter-text--in-range":o&&a?gf(o,a,r,s):void 0,"react-datepicker__quarter-text--range-start":n.isRangeStartQuarter(r),"react-datepicker__quarter-text--range-end":n.isRangeEndQuarter(r),"react-datepicker__quarter-text--today":n.isCurrentQuarter(s,r)})},n.getMonthContent=function(r){var i=n.props,s=i.showFullMonthYearPicker,o=i.renderMonthContent,a=i.locale,l=i.day,u=tw(r,a),d=Nm(r,a);return o?o(r,u,d,l):s?d:u},n.getQuarterContent=function(r){var i,s=n.props,o=s.renderQuarterContent,a=s.locale,l=vP(r,a);return(i=o==null?void 0:o(r,l))!==null&&i!==void 0?i:l},n.renderMonths=function(){var r,i=n.props,s=i.showTwoColumnMonthYearPicker,o=i.showFourColumnMonthYearPicker,a=i.day,l=i.selected,u=(r=Fm[vw(o,s)])===null||r===void 0?void 0:r.grid;return u==null?void 0:u.map(function(d,f){return x.createElement("div",{className:"react-datepicker__month-wrapper",key:f},d.map(function(p,h){return x.createElement("div",{ref:n.MONTH_REFS[p],key:h,onClick:function(m){n.onMonthClick(m,p)},onKeyDown:function(m){yw(m)&&(m.preventDefault(),m.key=ve.Enter),n.onMonthKeyDown(m,p)},onMouseEnter:n.props.usePointerEvent?void 0:function(){return n.onMonthMouseEnter(p)},onPointerEnter:n.props.usePointerEvent?function(){return n.onMonthMouseEnter(p)}:void 0,tabIndex:Number(n.getTabIndex(p)),className:n.getMonthClassNames(p),"aria-disabled":n.isMonthDisabled(p),role:"option","aria-label":n.getAriaLabel(p),"aria-current":n.isCurrentMonth(a,p)?"date":void 0,"aria-selected":l?n.isSelectedMonth(a,p,l):void 0},n.getMonthContent(p))}))})},n.renderQuarters=function(){var r=n.props,i=r.day,s=r.selected,o=[1,2,3,4];return x.createElement("div",{className:"react-datepicker__quarter-wrapper"},o.map(function(a,l){return x.createElement("div",{key:l,ref:n.QUARTER_REFS[l],role:"option",onClick:function(u){n.onQuarterClick(u,a)},onKeyDown:function(u){n.onQuarterKeyDown(u,a)},onMouseEnter:n.props.usePointerEvent?void 0:function(){return n.onQuarterMouseEnter(a)},onPointerEnter:n.props.usePointerEvent?function(){return n.onQuarterMouseEnter(a)}:void 0,className:n.getQuarterClassNames(a),"aria-selected":s?n.isSelectedQuarter(i,a,s):void 0,tabIndex:Number(n.getQuarterTabIndex(a)),"aria-current":n.isCurrentQuarter(i,a)?"date":void 0},n.getQuarterContent(a))}))},n.getClassNames=function(){var r=n.props,i=r.selectingDate,s=r.selectsStart,o=r.selectsEnd,a=r.showMonthYearPicker,l=r.showQuarterYearPicker,u=r.showWeekPicker;return Nn("react-datepicker__month",{"react-datepicker__month--selecting-range":i&&(s||o)},{"react-datepicker__monthPicker":a},{"react-datepicker__quarterPicker":l},{"react-datepicker__weekPicker":u})},n}return t.prototype.getSelection=function(){var n=this.props,r=n.selected,i=n.selectedDates,s=n.selectsMultiple;if(s)return i;if(r)return[r]},t.prototype.render=function(){var n=this.props,r=n.showMonthYearPicker,i=n.showQuarterYearPicker,s=n.day,o=n.ariaLabelPrefix,a=o===void 0?"Month ":o,l=a?a.trim()+" ":"";return x.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(l).concat(Kt(s,"MMMM, yyyy",this.props.locale)),role:"listbox"},r?this.renderMonths():i?this.renderQuarters():this.renderWeeks())},t}(x.Component),AP=function(e){Bn(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.isSelectedMonth=function(r){return n.props.month===r},n.renderOptions=function(){return n.props.monthNames.map(function(r,i){return x.createElement("div",{className:n.isSelectedMonth(i)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:r,onClick:n.onChange.bind(n,i),"aria-selected":n.isSelectedMonth(i)?"true":void 0},n.isSelectedMonth(i)?x.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",r)})},n.onChange=function(r){return n.props.onChange(r)},n.handleClickOutside=function(){return n.props.onCancel()},n}return t.prototype.render=function(){return x.createElement(lf,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},t}(x.Component),PP=function(e){Bn(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.state={dropdownVisible:!1},n.renderSelectOptions=function(r){return r.map(function(i,s){return x.createElement("option",{key:i,value:s},i)})},n.renderSelectMode=function(r){return x.createElement("select",{value:n.props.month,className:"react-datepicker__month-select",onChange:function(i){return n.onChange(parseInt(i.target.value))}},n.renderSelectOptions(r))},n.renderReadView=function(r,i){return x.createElement("div",{key:"read",style:{visibility:r?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:n.toggleDropdown},x.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),x.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},i[n.props.month]))},n.renderDropdown=function(r){return x.createElement(AP,ft({key:"dropdown"},n.props,{monthNames:r,onChange:n.onChange,onCancel:n.toggleDropdown}))},n.renderScrollMode=function(r){var i=n.state.dropdownVisible,s=[n.renderReadView(!i,r)];return i&&s.unshift(n.renderDropdown(r)),s},n.onChange=function(r){n.toggleDropdown(),r!==n.props.month&&n.props.onChange(r)},n.toggleDropdown=function(){return n.setState({dropdownVisible:!n.state.dropdownVisible})},n}return t.prototype.render=function(){var n=this,r=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(s){return tw(s,n.props.locale)}:function(s){return Nm(s,n.props.locale)}),i;switch(this.props.dropdownMode){case"scroll":i=this.renderScrollMode(r);break;case"select":i=this.renderSelectMode(r);break}return x.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},i)},t}(x.Component);function NP(e,t){for(var n=[],r=ys(e),i=ys(t);!ao(r,i);)n.push(Dt(r)),r=fi(r,1);return n}var jP=function(e){Bn(t,e);function t(n){var r=e.call(this,n)||this;return r.renderOptions=function(){return r.state.monthYearsList.map(function(i){var s=bm(i),o=Vi(r.props.date,i)&&rr(r.props.date,i);return x.createElement("div",{className:o?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:s,onClick:r.onChange.bind(r,s),"aria-selected":o?"true":void 0},o?x.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",Kt(i,r.props.dateFormat,r.props.locale))})},r.onChange=function(i){return r.props.onChange(i)},r.handleClickOutside=function(){r.props.onCancel()},r.state={monthYearsList:NP(r.props.minDate,r.props.maxDate)},r}return t.prototype.render=function(){var n=Nn({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return x.createElement(lf,{className:n,onClickOutside:this.handleClickOutside},this.renderOptions())},t}(x.Component),FP=function(e){Bn(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.state={dropdownVisible:!1},n.renderSelectOptions=function(){for(var r=ys(n.props.minDate),i=ys(n.props.maxDate),s=[];!ao(r,i);){var o=bm(r);s.push(x.createElement("option",{key:o,value:o},Kt(r,n.props.dateFormat,n.props.locale))),r=fi(r,1)}return s},n.onSelectChange=function(r){n.onChange(parseInt(r.target.value))},n.renderSelectMode=function(){return x.createElement("select",{value:bm(ys(n.props.date)),className:"react-datepicker__month-year-select",onChange:n.onSelectChange},n.renderSelectOptions())},n.renderReadView=function(r){var i=Kt(n.props.date,n.props.dateFormat,n.props.locale);return x.createElement("div",{key:"read",style:{visibility:r?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:n.toggleDropdown},x.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),x.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},i))},n.renderDropdown=function(){return x.createElement(jP,ft({key:"dropdown"},n.props,{onChange:n.onChange,onCancel:n.toggleDropdown}))},n.renderScrollMode=function(){var r=n.state.dropdownVisible,i=[n.renderReadView(!r)];return r&&i.unshift(n.renderDropdown()),i},n.onChange=function(r){n.toggleDropdown();var i=Dt(r);Vi(n.props.date,i)&&rr(n.props.date,i)||n.props.onChange(i)},n.toggleDropdown=function(){return n.setState({dropdownVisible:!n.state.dropdownVisible})},n}return t.prototype.render=function(){var n;switch(this.props.dropdownMode){case"scroll":n=this.renderScrollMode();break;case"select":n=this.renderSelectMode();break}return x.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},n)},t}(x.Component),GP=function(e){Bn(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.state={height:null},n.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var r,i,s;n.list&&(n.list.scrollTop=(s=n.centerLi&&t.calcCenterPosition(n.props.monthRef?n.props.monthRef.clientHeight-((i=(r=n.header)===null||r===void 0?void 0:r.clientHeight)!==null&&i!==void 0?i:0):n.list.clientHeight,n.centerLi))!==null&&s!==void 0?s:0)})},n.handleClick=function(r){var i,s;(n.props.minTime||n.props.maxTime)&&sw(r,n.props)||(n.props.excludeTimes||n.props.includeTimes||n.props.filterTime)&&iw(r,n.props)||(s=(i=n.props).onChange)===null||s===void 0||s.call(i,r)},n.isSelectedTime=function(r){return n.props.selected&&TP(n.props.selected,r)},n.isDisabledTime=function(r){return(n.props.minTime||n.props.maxTime)&&sw(r,n.props)||(n.props.excludeTimes||n.props.includeTimes||n.props.filterTime)&&iw(r,n.props)},n.liClasses=function(r){var i,s=["react-datepicker__time-list-item",n.props.timeClassName?n.props.timeClassName(r):void 0];return n.isSelectedTime(r)&&s.push("react-datepicker__time-list-item--selected"),n.isDisabledTime(r)&&s.push("react-datepicker__time-list-item--disabled"),n.props.injectTimes&&(ms(r)*3600+gs(r)*60+oo(r))%(((i=n.props.intervals)!==null&&i!==void 0?i:t.defaultProps.intervals)*60)!==0&&s.push("react-datepicker__time-list-item--injected"),s.join(" ")},n.handleOnKeyDown=function(r,i){var s,o;r.key===ve.Space&&(r.preventDefault(),r.key=ve.Enter),(r.key===ve.ArrowUp||r.key===ve.ArrowLeft)&&r.target instanceof HTMLElement&&r.target.previousSibling&&(r.preventDefault(),r.target.previousSibling instanceof HTMLElement&&r.target.previousSibling.focus()),(r.key===ve.ArrowDown||r.key===ve.ArrowRight)&&r.target instanceof HTMLElement&&r.target.nextSibling&&(r.preventDefault(),r.target.nextSibling instanceof HTMLElement&&r.target.nextSibling.focus()),r.key===ve.Enter&&n.handleClick(i),(o=(s=n.props).handleOnKeyDown)===null||o===void 0||o.call(s,r)},n.renderTimes=function(){for(var r,i=[],s=typeof n.props.format=="string"?n.props.format:"p",o=(r=n.props.intervals)!==null&&r!==void 0?r:t.defaultProps.intervals,a=n.props.selected||n.props.openToDate||Dt(),l=uf(a),u=n.props.injectTimes&&n.props.injectTimes.sort(function(b,g){return b.getTime()-g.getTime()}),d=60*MP(a),f=d/o,p=0;p<f;p++){var h=fm(l,p*o);if(i.push(h),u){var m=CP(l,h,p,o,u);i=i.concat(m)}}var y=i.reduce(function(b,g){return g.getTime()<=a.getTime()?g:b},i[0]);return i.map(function(b){return x.createElement("li",{key:b.valueOf(),onClick:n.handleClick.bind(n,b),className:n.liClasses(b),ref:function(g){b===y&&(n.centerLi=g)},onKeyDown:function(g){n.handleOnKeyDown(g,b)},tabIndex:b===y?0:-1,role:"option","aria-selected":n.isSelectedTime(b)?"true":void 0,"aria-disabled":n.isDisabledTime(b)?"true":void 0},Kt(b,s,n.props.locale))})},n.renderTimeCaption=function(){return n.props.showTimeCaption===!1?x.createElement(x.Fragment,null):x.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(n.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(r){n.header=r}},x.createElement("div",{className:"react-datepicker-time__header"},n.props.timeCaption))},n}return Object.defineProperty(t,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.observeDatePickerHeightChanges()},t.prototype.componentWillUnmount=function(){var n;(n=this.resizeObserver)===null||n===void 0||n.disconnect()},t.prototype.observeDatePickerHeightChanges=function(){var n=this,r=this.props.monthRef;this.updateContainerHeight(),r&&(this.resizeObserver=new ResizeObserver(function(){n.updateContainerHeight()}),this.resizeObserver.observe(r))},t.prototype.updateContainerHeight=function(){this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},t.prototype.render=function(){var n=this,r,i=this.state.height;return x.createElement("div",{className:"react-datepicker__time-container ".concat(((r=this.props.todayButton)!==null&&r!==void 0?r:t.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),x.createElement("div",{className:"react-datepicker__time"},x.createElement("div",{className:"react-datepicker__time-box"},x.createElement("ul",{className:"react-datepicker__time-list",ref:function(s){n.list=s},style:i?{height:i}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},t.calcCenterPosition=function(n,r){return r.offsetTop-(n/2-r.clientHeight/2)},t}(x.Component),bw=3,VP=function(e){Bn(t,e);function t(n){var r=e.call(this,n)||this;return r.YEAR_REFS=Gi([],Array(r.props.yearItemNumber),!0).map(function(){return x.createRef()}),r.isDisabled=function(i){return Yr(i,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.isExcluded=function(i){return jm(i,{excludeDates:r.props.excludeDates})},r.selectingDate=function(){var i;return(i=r.props.selectingDate)!==null&&i!==void 0?i:r.props.preSelection},r.updateFocusOnPaginate=function(i){var s=function(){var o,a;(a=(o=r.YEAR_REFS[i])===null||o===void 0?void 0:o.current)===null||a===void 0||a.focus()};window.requestAnimationFrame(s)},r.handleYearClick=function(i,s){r.props.onDayClick&&r.props.onDayClick(i,s)},r.handleYearNavigation=function(i,s){var o,a,l,u,d=r.props,f=d.date,p=d.yearItemNumber;if(!(f===void 0||p===void 0)){var h=uo(f,p).startPeriod;r.isDisabled(s)||r.isExcluded(s)||((a=(o=r.props).setPreSelection)===null||a===void 0||a.call(o,s),i-h<0?r.updateFocusOnPaginate(p-(h-i)):i-h>=p?r.updateFocusOnPaginate(Math.abs(p-(i-h))):(u=(l=r.YEAR_REFS[i-h])===null||l===void 0?void 0:l.current)===null||u===void 0||u.focus())}},r.isSameDay=function(i,s){return pt(i,s)},r.isCurrentYear=function(i){return i===nt(Dt())},r.isRangeStart=function(i){return r.props.startDate&&r.props.endDate&&Vi(Pi(Dt(),i),r.props.startDate)},r.isRangeEnd=function(i){return r.props.startDate&&r.props.endDate&&Vi(Pi(Dt(),i),r.props.endDate)},r.isInRange=function(i){return hf(i,r.props.startDate,r.props.endDate)},r.isInSelectingRange=function(i){var s=r.props,o=s.selectsStart,a=s.selectsEnd,l=s.selectsRange,u=s.startDate,d=s.endDate;return!(o||a||l)||!r.selectingDate()?!1:o&&d?hf(i,r.selectingDate(),d):a&&u||l&&u&&!d?hf(i,u,r.selectingDate()):!1},r.isSelectingRangeStart=function(i){var s;if(!r.isInSelectingRange(i))return!1;var o=r.props,a=o.startDate,l=o.selectsStart,u=Pi(Dt(),i);return l?Vi(u,(s=r.selectingDate())!==null&&s!==void 0?s:null):Vi(u,a??null)},r.isSelectingRangeEnd=function(i){var s;if(!r.isInSelectingRange(i))return!1;var o=r.props,a=o.endDate,l=o.selectsEnd,u=o.selectsRange,d=Pi(Dt(),i);return l||u?Vi(d,(s=r.selectingDate())!==null&&s!==void 0?s:null):Vi(d,a??null)},r.isKeyboardSelected=function(i){if(!(r.props.date===void 0||r.props.selected==null||r.props.preSelection==null)){var s=r.props,o=s.minDate,a=s.maxDate,l=s.excludeDates,u=s.includeDates,d=s.filterDate,f=kc(Pi(r.props.date,i)),p=(o||a||l||u||d)&&mf(i,r.props);return!r.props.disabledKeyboardNavigation&&!r.props.inline&&!pt(f,kc(r.props.selected))&&pt(f,kc(r.props.preSelection))&&!p}},r.isSelectedYear=function(i){var s=r.props,o=s.selectsMultiple,a=s.selected,l=s.selectedDates;return o?l==null?void 0:l.some(function(u){return i===nt(u)}):!!a&&i===nt(a)},r.onYearClick=function(i,s){var o=r.props.date;o!==void 0&&r.handleYearClick(kc(Pi(o,s)),i)},r.onYearKeyDown=function(i,s){var o,a,l=i.key,u=r.props,d=u.date,f=u.yearItemNumber,p=u.handleOnKeyDown;if(l!==ve.Tab&&i.preventDefault(),!r.props.disabledKeyboardNavigation)switch(l){case ve.Enter:if(r.props.selected==null)break;r.onYearClick(i,s),(a=(o=r.props).setPreSelection)===null||a===void 0||a.call(o,r.props.selected);break;case ve.ArrowRight:if(r.props.preSelection==null)break;r.handleYearNavigation(s+1,ps(r.props.preSelection,1));break;case ve.ArrowLeft:if(r.props.preSelection==null)break;r.handleYearNavigation(s-1,Fa(r.props.preSelection,1));break;case ve.ArrowUp:{if(d===void 0||f===void 0||r.props.preSelection==null)break;var h=uo(d,f).startPeriod,m=bw,y=s-m;if(y<h){var b=f%m;s>=h&&s<h+b?m=b:m+=b,y=s-m}r.handleYearNavigation(y,Fa(r.props.preSelection,m));break}case ve.ArrowDown:{if(d===void 0||f===void 0||r.props.preSelection==null)break;var g=uo(d,f).endPeriod,m=bw,y=s+m;if(y>g){var b=f%m;s<=g&&s>g-b?m=b:m+=b,y=s+m}r.handleYearNavigation(y,ps(r.props.preSelection,m));break}}p&&p(i)},r.getYearClassNames=function(i){var s=r.props,o=s.date,a=s.minDate,l=s.maxDate,u=s.excludeDates,d=s.includeDates,f=s.filterDate,p=s.yearClassName;return Nn("react-datepicker__year-text","react-datepicker__year-".concat(i),o?p==null?void 0:p(Pi(o,i)):void 0,{"react-datepicker__year-text--selected":r.isSelectedYear(i),"react-datepicker__year-text--disabled":(a||l||u||d||f)&&mf(i,r.props),"react-datepicker__year-text--keyboard-selected":r.isKeyboardSelected(i),"react-datepicker__year-text--range-start":r.isRangeStart(i),"react-datepicker__year-text--range-end":r.isRangeEnd(i),"react-datepicker__year-text--in-range":r.isInRange(i),"react-datepicker__year-text--in-selecting-range":r.isInSelectingRange(i),"react-datepicker__year-text--selecting-range-start":r.isSelectingRangeStart(i),"react-datepicker__year-text--selecting-range-end":r.isSelectingRangeEnd(i),"react-datepicker__year-text--today":r.isCurrentYear(i)})},r.getYearTabIndex=function(i){if(r.props.disabledKeyboardNavigation||r.props.preSelection==null)return"-1";var s=nt(r.props.preSelection),o=mf(i,r.props);return i===s&&!o?"0":"-1"},r.getYearContent=function(i){return r.props.renderYearContent?r.props.renderYearContent(i):i},r}return t.prototype.render=function(){var n=this,r=[],i=this.props,s=i.date,o=i.yearItemNumber,a=i.onYearMouseEnter,l=i.onYearMouseLeave;if(s===void 0)return null;for(var u=uo(s,o),d=u.startPeriod,f=u.endPeriod,p=function(y){r.push(x.createElement("div",{ref:h.YEAR_REFS[y-d],onClick:function(b){n.onYearClick(b,y)},onKeyDown:function(b){yw(b)&&(b.preventDefault(),b.key=ve.Enter),n.onYearKeyDown(b,y)},tabIndex:Number(h.getYearTabIndex(y)),className:h.getYearClassNames(y),onMouseEnter:h.props.usePointerEvent?void 0:function(b){return a(b,y)},onPointerEnter:h.props.usePointerEvent?function(b){return a(b,y)}:void 0,onMouseLeave:h.props.usePointerEvent?void 0:function(b){return l(b,y)},onPointerLeave:h.props.usePointerEvent?function(b){return l(b,y)}:void 0,key:y,"aria-current":h.isCurrentYear(y)?"date":void 0},h.getYearContent(y)))},h=this,m=d;m<=f;m++)p(m);return x.createElement("div",{className:"react-datepicker__year"},x.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},r))},t}(x.Component);function $P(e,t,n,r){for(var i=[],s=0;s<2*t+1;s++){var o=e+t-s,a=!0;n&&(a=nt(n)<=o),r&&a&&(a=nt(r)>=o),a&&i.push(o)}return i}var YP=function(e){Bn(t,e);function t(n){var r=e.call(this,n)||this;r.renderOptions=function(){var a=r.props.year,l=r.state.yearsList.map(function(f){return x.createElement("div",{className:a===f?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:f,onClick:r.onChange.bind(r,f),"aria-selected":a===f?"true":void 0},a===f?x.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",f)}),u=r.props.minDate?nt(r.props.minDate):null,d=r.props.maxDate?nt(r.props.maxDate):null;return(!d||!r.state.yearsList.find(function(f){return f===d}))&&l.unshift(x.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:r.incrementYears},x.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!u||!r.state.yearsList.find(function(f){return f===u}))&&l.push(x.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:r.decrementYears},x.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),l},r.onChange=function(a){r.props.onChange(a)},r.handleClickOutside=function(){r.props.onCancel()},r.shiftYears=function(a){var l=r.state.yearsList.map(function(u){return u+a});r.setState({yearsList:l})},r.incrementYears=function(){return r.shiftYears(1)},r.decrementYears=function(){return r.shiftYears(-1)};var i=n.yearDropdownItemNumber,s=n.scrollableYearDropdown,o=i||(s?10:5);return r.state={yearsList:$P(r.props.year,o,r.props.minDate,r.props.maxDate)},r.dropdownRef=x.createRef(),r}return t.prototype.componentDidMount=function(){var n=this.dropdownRef.current;if(n){var r=n.children?Array.from(n.children):null,i=r?r.find(function(s){return s.ariaSelected}):null;n.scrollTop=i&&i instanceof HTMLElement?i.offsetTop+(i.clientHeight-n.clientHeight)/2:(n.scrollHeight-n.clientHeight)/2}},t.prototype.render=function(){var n=Nn({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return x.createElement(lf,{className:n,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},t}(x.Component),WP=function(e){Bn(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.state={dropdownVisible:!1},n.renderSelectOptions=function(){for(var r=n.props.minDate?nt(n.props.minDate):1900,i=n.props.maxDate?nt(n.props.maxDate):2100,s=[],o=r;o<=i;o++)s.push(x.createElement("option",{key:o,value:o},o));return s},n.onSelectChange=function(r){n.onChange(parseInt(r.target.value))},n.renderSelectMode=function(){return x.createElement("select",{value:n.props.year,className:"react-datepicker__year-select",onChange:n.onSelectChange},n.renderSelectOptions())},n.renderReadView=function(r){return x.createElement("div",{key:"read",style:{visibility:r?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:function(i){return n.toggleDropdown(i)}},x.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),x.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},n.props.year))},n.renderDropdown=function(){return x.createElement(YP,ft({key:"dropdown"},n.props,{onChange:n.onChange,onCancel:n.toggleDropdown}))},n.renderScrollMode=function(){var r=n.state.dropdownVisible,i=[n.renderReadView(!r)];return r&&i.unshift(n.renderDropdown()),i},n.onChange=function(r){n.toggleDropdown(),r!==n.props.year&&n.props.onChange(r)},n.toggleDropdown=function(r){n.setState({dropdownVisible:!n.state.dropdownVisible},function(){n.props.adjustDateOnChange&&n.handleYearChange(n.props.date,r)})},n.handleYearChange=function(r,i){var s;(s=n.onSelect)===null||s===void 0||s.call(n,r,i),n.setOpen()},n.onSelect=function(r,i){var s,o;(o=(s=n.props).onSelect)===null||o===void 0||o.call(s,r,i)},n.setOpen=function(){var r,i;(i=(r=n.props).setOpen)===null||i===void 0||i.call(r,!0)},n}return t.prototype.render=function(){var n;switch(this.props.dropdownMode){case"scroll":n=this.renderScrollMode();break;case"select":n=this.renderSelectMode();break}return x.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},n)},t}(x.Component),HP=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],ZP=function(e){var t=(e.className||"").split(/\s+/);return HP.some(function(n){return t.indexOf(n)>=0})},UP=function(e){Bn(t,e);function t(n){var r=e.call(this,n)||this;return r.monthContainer=void 0,r.handleClickOutside=function(i){r.props.onClickOutside(i)},r.setClickOutsideRef=function(){return r.containerRef.current},r.handleDropdownFocus=function(i){var s,o;ZP(i.target)&&((o=(s=r.props).onDropdownFocus)===null||o===void 0||o.call(s,i))},r.getDateInView=function(){var i=r.props,s=i.preSelection,o=i.selected,a=i.openToDate,l=uw(r.props),u=dw(r.props),d=Dt(),f=a||o||s;return f||(l&&Uo(d,l)?l:u&&ao(d,u)?u:d)},r.increaseMonth=function(){r.setState(function(i){var s=i.date;return{date:fi(s,1)}},function(){return r.handleMonthChange(r.state.date)})},r.decreaseMonth=function(){r.setState(function(i){var s=i.date;return{date:zo(s,1)}},function(){return r.handleMonthChange(r.state.date)})},r.handleDayClick=function(i,s,o){r.props.onSelect(i,s,o),r.props.setPreSelection&&r.props.setPreSelection(i)},r.handleDayMouseEnter=function(i){r.setState({selectingDate:i}),r.props.onDayMouseEnter&&r.props.onDayMouseEnter(i)},r.handleMonthMouseLeave=function(){r.setState({selectingDate:void 0}),r.props.onMonthMouseLeave&&r.props.onMonthMouseLeave()},r.handleYearMouseEnter=function(i,s){r.setState({selectingDate:Pi(Dt(),s)}),r.props.onYearMouseEnter&&r.props.onYearMouseEnter(i,s)},r.handleYearMouseLeave=function(i,s){r.props.onYearMouseLeave&&r.props.onYearMouseLeave(i,s)},r.handleYearChange=function(i){var s,o,a,l;(o=(s=r.props).onYearChange)===null||o===void 0||o.call(s,i),r.setState({isRenderAriaLiveMessage:!0}),r.props.adjustDateOnChange&&(r.props.onSelect(i),(l=(a=r.props).setOpen)===null||l===void 0||l.call(a,!0)),r.props.setPreSelection&&r.props.setPreSelection(i)},r.getEnabledPreSelectionDateForMonth=function(i){if(!Yr(i,r.props))return i;for(var s=ys(i),o=hP(i),a=HL(o,s),l=null,u=0;u<=a;u++){var d=di(s,u);if(!Yr(d,r.props)){l=d;break}}return l},r.handleMonthChange=function(i){var s,o,a,l=(s=r.getEnabledPreSelectionDateForMonth(i))!==null&&s!==void 0?s:i;r.handleCustomMonthChange(l),r.props.adjustDateOnChange&&(r.props.onSelect(l),(a=(o=r.props).setOpen)===null||a===void 0||a.call(o,!0)),r.props.setPreSelection&&r.props.setPreSelection(l)},r.handleCustomMonthChange=function(i){var s,o;(o=(s=r.props).onMonthChange)===null||o===void 0||o.call(s,i),r.setState({isRenderAriaLiveMessage:!0})},r.handleMonthYearChange=function(i){r.handleYearChange(i),r.handleMonthChange(i)},r.changeYear=function(i){r.setState(function(s){var o=s.date;return{date:Pi(o,Number(i))}},function(){return r.handleYearChange(r.state.date)})},r.changeMonth=function(i){r.setState(function(s){var o=s.date;return{date:Gr(o,Number(i))}},function(){return r.handleMonthChange(r.state.date)})},r.changeMonthYear=function(i){r.setState(function(s){var o=s.date;return{date:Pi(Gr(o,Hn(i)),nt(i))}},function(){return r.handleMonthYearChange(r.state.date)})},r.header=function(i){i===void 0&&(i=r.state.date);var s=co(i,r.props.locale,r.props.calendarStartDay),o=[];return r.props.showWeekNumbers&&o.push(x.createElement("div",{key:"W",className:"react-datepicker__day-name"},r.props.weekLabel||"#")),o.concat([0,1,2,3,4,5,6].map(function(a){var l=di(s,a),u=r.formatWeekday(l,r.props.locale),d=r.props.weekDayClassName?r.props.weekDayClassName(l):void 0;return x.createElement("div",{key:a,"aria-label":Kt(l,"EEEE",r.props.locale),className:Nn("react-datepicker__day-name",d)},u)}))},r.formatWeekday=function(i,s){return r.props.formatWeekDay?mP(i,r.props.formatWeekDay,s):r.props.useWeekdaysShort?yP(i,s):gP(i,s)},r.decreaseYear=function(){r.setState(function(i){var s,o=i.date;return{date:Fa(o,r.props.showYearPicker?(s=r.props.yearItemNumber)!==null&&s!==void 0?s:t.defaultProps.yearItemNumber:1)}},function(){return r.handleYearChange(r.state.date)})},r.clearSelectingDate=function(){r.setState({selectingDate:void 0})},r.renderPreviousButton=function(){var i,s,o;if(!r.props.renderCustomHeader){var a=(i=r.props.monthsShown)!==null&&i!==void 0?i:t.defaultProps.monthsShown,l=r.props.showPreviousMonths?a-1:0,u=(s=r.props.monthSelectedIn)!==null&&s!==void 0?s:l,d=zo(r.state.date,u),f;switch(!0){case r.props.showMonthYearPicker:f=lw(r.state.date,r.props);break;case r.props.showYearPicker:f=wP(r.state.date,r.props);break;case r.props.showQuarterYearPicker:f=SP(r.state.date,r.props);break;default:f=ow(d,r.props);break}if(!(!((o=r.props.forceShowMonthNavigation)!==null&&o!==void 0?o:t.defaultProps.forceShowMonthNavigation)&&!r.props.showDisabledMonthNavigation&&f||r.props.showTimeSelectOnly)){var p=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],h=["react-datepicker__navigation","react-datepicker__navigation--previous"],m=r.decreaseMonth;(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker)&&(m=r.decreaseYear),f&&r.props.showDisabledMonthNavigation&&(h.push("react-datepicker__navigation--previous--disabled"),m=void 0);var y=r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker,b=r.props,g=b.previousMonthButtonLabel,v=g===void 0?t.defaultProps.previousMonthButtonLabel:g,S=b.previousYearButtonLabel,w=S===void 0?t.defaultProps.previousYearButtonLabel:S,_=r.props,T=_.previousMonthAriaLabel,M=T===void 0?typeof v=="string"?v:"Previous Month":T,C=_.previousYearAriaLabel,k=C===void 0?typeof w=="string"?w:"Previous Year":C;return x.createElement("button",{type:"button",className:h.join(" "),onClick:m,onKeyDown:r.props.handleOnKeyDown,"aria-label":y?k:M},x.createElement("span",{className:p.join(" ")},y?w:v))}}},r.increaseYear=function(){r.setState(function(i){var s,o=i.date;return{date:ps(o,r.props.showYearPicker?(s=r.props.yearItemNumber)!==null&&s!==void 0?s:t.defaultProps.yearItemNumber:1)}},function(){return r.handleYearChange(r.state.date)})},r.renderNextButton=function(){var i;if(!r.props.renderCustomHeader){var s;switch(!0){case r.props.showMonthYearPicker:s=cw(r.state.date,r.props);break;case r.props.showYearPicker:s=_P(r.state.date,r.props);break;case r.props.showQuarterYearPicker:s=xP(r.state.date,r.props);break;default:s=aw(r.state.date,r.props);break}if(!(!((i=r.props.forceShowMonthNavigation)!==null&&i!==void 0?i:t.defaultProps.forceShowMonthNavigation)&&!r.props.showDisabledMonthNavigation&&s||r.props.showTimeSelectOnly)){var o=["react-datepicker__navigation","react-datepicker__navigation--next"],a=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];r.props.showTimeSelect&&o.push("react-datepicker__navigation--next--with-time"),r.props.todayButton&&o.push("react-datepicker__navigation--next--with-today-button");var l=r.increaseMonth;(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker)&&(l=r.increaseYear),s&&r.props.showDisabledMonthNavigation&&(o.push("react-datepicker__navigation--next--disabled"),l=void 0);var u=r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker,d=r.props,f=d.nextMonthButtonLabel,p=f===void 0?t.defaultProps.nextMonthButtonLabel:f,h=d.nextYearButtonLabel,m=h===void 0?t.defaultProps.nextYearButtonLabel:h,y=r.props,b=y.nextMonthAriaLabel,g=b===void 0?typeof p=="string"?p:"Next Month":b,v=y.nextYearAriaLabel,S=v===void 0?typeof m=="string"?m:"Next Year":v;return x.createElement("button",{type:"button",className:o.join(" "),onClick:l,onKeyDown:r.props.handleOnKeyDown,"aria-label":u?S:g},x.createElement("span",{className:a.join(" ")},u?m:p))}}},r.renderCurrentMonth=function(i){i===void 0&&(i=r.state.date);var s=["react-datepicker__current-month"];return r.props.showYearDropdown&&s.push("react-datepicker__current-month--hasYearDropdown"),r.props.showMonthDropdown&&s.push("react-datepicker__current-month--hasMonthDropdown"),r.props.showMonthYearDropdown&&s.push("react-datepicker__current-month--hasMonthYearDropdown"),x.createElement("h2",{className:s.join(" ")},Kt(i,r.props.dateFormat,r.props.locale))},r.renderYearDropdown=function(i){if(i===void 0&&(i=!1),!(!r.props.showYearDropdown||i))return x.createElement(WP,ft({},t.defaultProps,r.props,{date:r.state.date,onChange:r.changeYear,year:nt(r.state.date)}))},r.renderMonthDropdown=function(i){if(i===void 0&&(i=!1),!(!r.props.showMonthDropdown||i))return x.createElement(PP,ft({},t.defaultProps,r.props,{month:Hn(r.state.date),onChange:r.changeMonth}))},r.renderMonthYearDropdown=function(i){if(i===void 0&&(i=!1),!(!r.props.showMonthYearDropdown||i))return x.createElement(FP,ft({},t.defaultProps,r.props,{date:r.state.date,onChange:r.changeMonthYear}))},r.handleTodayButtonClick=function(i){r.props.onSelect(Jx(),i),r.props.setPreSelection&&r.props.setPreSelection(Jx())},r.renderTodayButton=function(){if(!(!r.props.todayButton||r.props.showTimeSelectOnly))return x.createElement("div",{className:"react-datepicker__today-button",onClick:r.handleTodayButtonClick},r.props.todayButton)},r.renderDefaultHeader=function(i){var s=i.monthDate,o=i.i;return x.createElement("div",{className:"react-datepicker__header ".concat(r.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},r.renderCurrentMonth(s),x.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(r.props.dropdownMode),onFocus:r.handleDropdownFocus},r.renderMonthDropdown(o!==0),r.renderMonthYearDropdown(o!==0),r.renderYearDropdown(o!==0)),x.createElement("div",{className:"react-datepicker__day-names"},r.header(s)))},r.renderCustomHeader=function(i){var s,o,a=i.monthDate,l=i.i;if(r.props.showTimeSelect&&!r.state.monthContainer||r.props.showTimeSelectOnly)return null;var u=ow(r.state.date,r.props),d=aw(r.state.date,r.props),f=lw(r.state.date,r.props),p=cw(r.state.date,r.props),h=!r.props.showMonthYearPicker&&!r.props.showQuarterYearPicker&&!r.props.showYearPicker;return x.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:r.props.onDropdownFocus},(o=(s=r.props).renderCustomHeader)===null||o===void 0?void 0:o.call(s,ft(ft({},r.state),{customHeaderCount:l,monthDate:a,changeMonth:r.changeMonth,changeYear:r.changeYear,decreaseMonth:r.decreaseMonth,increaseMonth:r.increaseMonth,decreaseYear:r.decreaseYear,increaseYear:r.increaseYear,prevMonthButtonDisabled:u,nextMonthButtonDisabled:d,prevYearButtonDisabled:f,nextYearButtonDisabled:p})),h&&x.createElement("div",{className:"react-datepicker__day-names"},r.header(a)))},r.renderYearHeader=function(i){var s=i.monthDate,o=r.props,a=o.showYearPicker,l=o.yearItemNumber,u=l===void 0?t.defaultProps.yearItemNumber:l,d=uo(s,u),f=d.startPeriod,p=d.endPeriod;return x.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},a?"".concat(f," - ").concat(p):nt(s))},r.renderHeader=function(i){var s=i.monthDate,o=i.i,a=o===void 0?0:o,l={monthDate:s,i:a};switch(!0){case r.props.renderCustomHeader!==void 0:return r.renderCustomHeader(l);case(r.props.showMonthYearPicker||r.props.showQuarterYearPicker||r.props.showYearPicker):return r.renderYearHeader(l);default:return r.renderDefaultHeader(l)}},r.renderMonths=function(){var i,s;if(!(r.props.showTimeSelectOnly||r.props.showYearPicker)){for(var o=[],a=(i=r.props.monthsShown)!==null&&i!==void 0?i:t.defaultProps.monthsShown,l=r.props.showPreviousMonths?a-1:0,u=r.props.showMonthYearPicker||r.props.showQuarterYearPicker?ps(r.state.date,l):zo(r.state.date,l),d=(s=r.props.monthSelectedIn)!==null&&s!==void 0?s:l,f=0;f<a;++f){var p=f-d+l,h=r.props.showMonthYearPicker||r.props.showQuarterYearPicker?ps(u,p):fi(u,p),m="month-".concat(f),y=f<a-1,b=f>0;o.push(x.createElement("div",{key:m,ref:function(g){r.monthContainer=g??void 0},className:"react-datepicker__month-container"},r.renderHeader({monthDate:h,i:f}),x.createElement(BP,ft({},t.defaultProps,r.props,{containerRef:r.containerRef,ariaLabelPrefix:r.props.monthAriaLabelPrefix,day:h,onDayClick:r.handleDayClick,handleOnKeyDown:r.props.handleOnDayKeyDown,handleOnMonthKeyDown:r.props.handleOnKeyDown,onDayMouseEnter:r.handleDayMouseEnter,onMouseLeave:r.handleMonthMouseLeave,orderInDisplay:f,selectingDate:r.state.selectingDate,monthShowsDuplicateDaysEnd:y,monthShowsDuplicateDaysStart:b}))))}return o}},r.renderYears=function(){if(!r.props.showTimeSelectOnly&&r.props.showYearPicker)return x.createElement("div",{className:"react-datepicker__year--container"},r.renderHeader({monthDate:r.state.date}),x.createElement(VP,ft({},t.defaultProps,r.props,{selectingDate:r.state.selectingDate,date:r.state.date,onDayClick:r.handleDayClick,clearSelectingDate:r.clearSelectingDate,onYearMouseEnter:r.handleYearMouseEnter,onYearMouseLeave:r.handleYearMouseLeave})))},r.renderTimeSection=function(){if(r.props.showTimeSelect&&(r.state.monthContainer||r.props.showTimeSelectOnly))return x.createElement(GP,ft({},t.defaultProps,r.props,{onChange:r.props.onTimeChange,format:r.props.timeFormat,intervals:r.props.timeIntervals,monthRef:r.state.monthContainer}))},r.renderInputTimeSection=function(){var i=r.props.selected?new Date(r.props.selected):void 0,s=i&&cf(i)&&!!r.props.selected,o=s?"".concat(pw(i.getHours()),":").concat(pw(i.getMinutes())):"";if(r.props.showTimeInput)return x.createElement(IP,ft({},t.defaultProps,r.props,{date:i,timeString:o,onChange:r.props.onTimeChange}))},r.renderAriaLiveRegion=function(){var i,s=uo(r.state.date,(i=r.props.yearItemNumber)!==null&&i!==void 0?i:t.defaultProps.yearItemNumber),o=s.startPeriod,a=s.endPeriod,l;return r.props.showYearPicker?l="".concat(o," - ").concat(a):r.props.showMonthYearPicker||r.props.showQuarterYearPicker?l=nt(r.state.date):l="".concat(Nm(Hn(r.state.date),r.props.locale)," ").concat(nt(r.state.date)),x.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},r.state.isRenderAriaLiveMessage&&l)},r.renderChildren=function(){if(r.props.children)return x.createElement("div",{className:"react-datepicker__children-container"},r.props.children)},r.containerRef=x.createRef(),r.state={date:r.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},r}return Object.defineProperty(t,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:_c}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var n=this;this.props.showTimeSelect&&(this.assignMonthContainer=function(){n.setState({monthContainer:n.monthContainer})}())},t.prototype.componentDidUpdate=function(n){var r=this;if(this.props.preSelection&&(!pt(this.props.preSelection,n.preSelection)||this.props.monthSelectedIn!==n.monthSelectedIn)){var i=!rr(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return i&&r.handleCustomMonthChange(r.state.date)})}else this.props.openToDate&&!pt(this.props.openToDate,n.openToDate)&&this.setState({date:this.props.openToDate})},t.prototype.render=function(){var n=this.props.container||aP;return x.createElement(lf,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},x.createElement("div",{style:{display:"contents"},ref:this.containerRef},x.createElement(n,{className:Nn("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren())))},t}(x.Component),zP=function(e){var t=e.icon,n=e.className,r=n===void 0?"":n,i=e.onClick,s="react-datepicker__calendar-icon";if(typeof t=="string")return x.createElement("i",{className:"".concat(s," ").concat(t," ").concat(r),"aria-hidden":"true",onClick:i});if(x.isValidElement(t)){var o=t;return x.cloneElement(o,{className:"".concat(o.props.className||""," ").concat(s," ").concat(r),onClick:function(a){typeof o.props.onClick=="function"&&o.props.onClick(a),typeof i=="function"&&i(a)}})}return x.createElement("svg",{className:"".concat(s," ").concat(r),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:i},x.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},Sw=function(e){Bn(t,e);function t(n){var r=e.call(this,n)||this;return r.portalRoot=null,r.el=document.createElement("div"),r}return t.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},t.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},t.prototype.render=function(){return Zl.createPortal(this.props.children,this.el)},t}(x.Component),qP="[tabindex], a, button, input, select, textarea",XP=function(e){return(e instanceof HTMLAnchorElement||!e.disabled)&&e.tabIndex!==-1},xw=function(e){Bn(t,e);function t(n){var r=e.call(this,n)||this;return r.getTabChildren=function(){var i;return Array.prototype.slice.call((i=r.tabLoopRef.current)===null||i===void 0?void 0:i.querySelectorAll(qP),1,-1).filter(XP)},r.handleFocusStart=function(){var i=r.getTabChildren();i&&i.length>1&&i[i.length-1].focus()},r.handleFocusEnd=function(){var i=r.getTabChildren();i&&i.length>1&&i[0].focus()},r.tabLoopRef=x.createRef(),r}return t.prototype.render=function(){var n;return((n=this.props.enableTabLoop)!==null&&n!==void 0?n:t.defaultProps.enableTabLoop)?x.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},x.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,x.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},t.defaultProps={enableTabLoop:!0},t}(x.Component);function KP(e){var t=function(n){var r,i=typeof n.hidePopper=="boolean"?n.hidePopper:!0,s=x.useRef(null),o=oP(ft({open:!i,whileElementsMounted:jA,placement:n.popperPlacement,middleware:Gi([HA({padding:15}),WA(10),ZA({element:s})],(r=n.popperModifiers)!==null&&r!==void 0?r:[],!0)},n.popperProps)),a=ft(ft({},n),{hidePopper:i,popperProps:ft(ft({},o),{arrowRef:s})});return x.createElement(e,ft({},a))};return t}var QP=function(e){Bn(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(t,"defaultProps",{get:function(){return{hidePopper:!0}},enumerable:!1,configurable:!0}),t.prototype.render=function(){var n=this.props,r=n.className,i=n.wrapperClassName,s=n.hidePopper,o=s===void 0?t.defaultProps.hidePopper:s,a=n.popperComponent,l=n.targetComponent,u=n.enableTabLoop,d=n.popperOnKeyDown,f=n.portalId,p=n.portalHost,h=n.popperProps,m=n.showArrow,y=void 0;if(!o){var b=Nn("react-datepicker-popper",r);y=x.createElement(xw,{enableTabLoop:u},x.createElement("div",{ref:h.refs.setFloating,style:h.floatingStyles,className:b,"data-placement":h.placement,onKeyDown:d},a,m&&x.createElement(JA,{ref:h.arrowRef,context:h.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}this.props.popperContainer&&(y=x.createElement(this.props.popperContainer,{},y)),f&&!o&&(y=x.createElement(Sw,{portalId:f,portalHost:p},y));var g=Nn("react-datepicker-wrapper",i);return x.createElement(x.Fragment,null,x.createElement("div",{ref:h.refs.setReference,className:g},l),y)},t}(x.Component),JP=KP(QP),ww="react-datepicker-ignore-onclickoutside";function eN(e,t){return e&&t?Hn(e)!==Hn(t)||nt(e)!==nt(t):e!==t}var Gm="Date input not valid.",tN=function(e){Bn(t,e);function t(n){var r=e.call(this,n)||this;return r.calendar=null,r.input=null,r.getPreSelection=function(){return r.props.openToDate?r.props.openToDate:r.props.selectsEnd&&r.props.startDate?r.props.startDate:r.props.selectsStart&&r.props.endDate?r.props.endDate:Dt()},r.modifyHolidays=function(){var i;return(i=r.props.holidays)===null||i===void 0?void 0:i.reduce(function(s,o){var a=new Date(o.date);return cf(a)?Gi(Gi([],s,!0),[ft(ft({},o),{date:a})],!1):s},[])},r.calcInitialState=function(){var i,s=r.getPreSelection(),o=uw(r.props),a=dw(r.props),l=o&&Uo(s,uf(o))?o:a&&ao(s,ew(a))?a:s;return{open:r.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(i=r.props.selectsRange?r.props.startDate:r.props.selected)!==null&&i!==void 0?i:l,highlightDates:fw(r.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},r.resetHiddenStatus=function(){r.setState(ft(ft({},r.state),{wasHidden:!1}))},r.setHiddenStatus=function(){r.setState(ft(ft({},r.state),{wasHidden:!0}))},r.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&r.setHiddenStatus()},r.clearPreventFocusTimeout=function(){r.preventFocusTimeout&&clearTimeout(r.preventFocusTimeout)},r.setFocus=function(){var i,s;(s=(i=r.input)===null||i===void 0?void 0:i.focus)===null||s===void 0||s.call(i,{preventScroll:!0})},r.setBlur=function(){var i,s;(s=(i=r.input)===null||i===void 0?void 0:i.blur)===null||s===void 0||s.call(i),r.cancelFocusInput()},r.deferBlur=function(){requestAnimationFrame(function(){r.setBlur()})},r.setOpen=function(i,s){s===void 0&&(s=!1),r.setState({open:i,preSelection:i&&r.state.open?r.state.preSelection:r.calcInitialState().preSelection,lastPreSelectChange:Vm},function(){i||r.setState(function(o){return{focused:s?o.focused:!1}},function(){!s&&r.deferBlur(),r.setState({inputValue:null})})})},r.inputOk=function(){return hs(r.state.preSelection)},r.isCalendarOpen=function(){return r.props.open===void 0?r.state.open&&!r.props.disabled&&!r.props.readOnly:r.props.open},r.handleFocus=function(i){var s,o,a=r.state.wasHidden,l=a?r.state.open:!0;a&&r.resetHiddenStatus(),r.state.preventFocus||((o=(s=r.props).onFocus)===null||o===void 0||o.call(s,i),l&&!r.props.preventOpenOnFocus&&!r.props.readOnly&&r.setOpen(!0)),r.setState({focused:!0})},r.sendFocusBackToInput=function(){r.preventFocusTimeout&&r.clearPreventFocusTimeout(),r.setState({preventFocus:!0},function(){r.preventFocusTimeout=setTimeout(function(){r.setFocus(),r.setState({preventFocus:!1})})})},r.cancelFocusInput=function(){clearTimeout(r.inputFocusTimeout),r.inputFocusTimeout=void 0},r.deferFocusInput=function(){r.cancelFocusInput(),r.inputFocusTimeout=setTimeout(function(){return r.setFocus()},1)},r.handleDropdownFocus=function(){r.cancelFocusInput()},r.handleBlur=function(i){var s,o;(!r.state.open||r.props.withPortal||r.props.showTimeInput)&&((o=(s=r.props).onBlur)===null||o===void 0||o.call(s,i)),r.state.open&&r.props.open===!1&&r.setOpen(!1),r.setState({focused:!1})},r.handleCalendarClickOutside=function(i){var s,o;r.props.inline||r.setOpen(!1),(o=(s=r.props).onClickOutside)===null||o===void 0||o.call(s,i),r.props.withPortal&&i.preventDefault()},r.handleChange=function(){for(var i,s,o,a,l,u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];var f=u[0];if(!(r.props.onChangeRaw&&(r.props.onChangeRaw.apply(r,u),!f||typeof f.isDefaultPrevented!="function"||f.isDefaultPrevented()))){r.setState({inputValue:(f==null?void 0:f.target)instanceof HTMLInputElement?f.target.value:null,lastPreSelectChange:nN});var p=r.props,h=p.selectsRange,m=p.startDate,y=p.endDate,b=(i=r.props.dateFormat)!==null&&i!==void 0?i:t.defaultProps.dateFormat,g=(s=r.props.strictParsing)!==null&&s!==void 0?s:t.defaultProps.strictParsing,v=(f==null?void 0:f.target)instanceof HTMLInputElement?f.target.value:"";if(h){var S=v.split(b.includes("-")?Kx:"-",2).map(function(O){return O.trim()}),w=S[0],_=S[1],T=Bm(w??"",b,r.props.locale,g),M=Bm(_??"",b,r.props.locale,g),C=(m==null?void 0:m.getTime())!==(T==null?void 0:T.getTime()),k=(y==null?void 0:y.getTime())!==(M==null?void 0:M.getTime());if(!C&&!k||T&&Yr(T,r.props)||M&&Yr(M,r.props))return;(a=(o=r.props).onChange)===null||a===void 0||a.call(o,[T,M],f)}else{var I=Bm(v,b,r.props.locale,g,(l=r.props.selected)!==null&&l!==void 0?l:void 0);(I||!v)&&r.setSelected(I,f,!0)}}},r.handleSelect=function(i,s,o){if(!r.props.readOnly){if(r.props.shouldCloseOnSelect&&!r.props.showTimeSelect&&r.sendFocusBackToInput(),r.props.onChangeRaw&&r.props.onChangeRaw(s),r.setSelected(i,s,!1,o),r.props.showDateSelect&&r.setState({isRenderAriaLiveMessage:!0}),!r.props.shouldCloseOnSelect||r.props.showTimeSelect)r.setPreSelection(i);else if(!r.props.inline){r.props.selectsRange||r.setOpen(!1);var a=r.props,l=a.startDate,u=a.endDate;l&&!u&&(r.props.swapRange||!gw(i,l))&&r.setOpen(!1)}}},r.setSelected=function(i,s,o,a){var l,u,d=i;if(r.props.showYearPicker){if(d!==null&&mf(nt(d),r.props))return}else if(r.props.showMonthYearPicker){if(d!==null&&nw(d,r.props))return}else if(d!==null&&Yr(d,r.props))return;var f=r.props,p=f.onChange,h=f.selectsRange,m=f.startDate,y=f.endDate,b=f.selectsMultiple,g=f.selectedDates,v=f.minTime,S=f.swapRange;if(!Ko(r.props.selected,d)||r.props.allowSameDay||h||b)if(d!==null&&(r.props.selected&&(!o||!r.props.showTimeSelect&&!r.props.showTimeSelectOnly&&!r.props.showTimeInput)&&(d=Am(d,{hour:ms(r.props.selected),minute:gs(r.props.selected),second:oo(r.props.selected)})),!o&&(r.props.showTimeSelect||r.props.showTimeSelectOnly)&&v&&(d=Am(d,{hour:v.getHours(),minute:v.getMinutes(),second:v.getSeconds()})),r.props.inline||r.setState({preSelection:d}),r.props.focusSelectedMonth||r.setState({monthSelectedIn:a})),h){var w=!m&&!y,_=m&&!y,T=m&&y;w?p==null||p([d,null],s):_&&(d===null?p==null||p([null,null],s):gw(d,m)?S?p==null||p([d,m],s):p==null||p([d,null],s):p==null||p([m,d],s)),T&&(p==null||p([d,null],s))}else if(b){if(d!==null)if(!(g!=null&&g.length))p==null||p([d],s);else{var M=g.some(function(k){return pt(k,d)});if(M){var C=g.filter(function(k){return!pt(k,d)});p==null||p(C,s)}else p==null||p(Gi(Gi([],g,!0),[d],!1),s)}}else p==null||p(d,s);o||((u=(l=r.props).onSelect)===null||u===void 0||u.call(l,d,s),r.setState({inputValue:null}))},r.setPreSelection=function(i){if(!r.props.readOnly){var s=hs(r.props.minDate),o=hs(r.props.maxDate),a=!0;if(i){var l=uf(i);if(s&&o)a=Dc(i,r.props.minDate,r.props.maxDate);else if(s){var u=uf(r.props.minDate);a=ao(i,u)||Ko(l,u)}else if(o){var d=ew(r.props.maxDate);a=Uo(i,d)||Ko(l,d)}}a&&r.setState({preSelection:i})}},r.toggleCalendar=function(){r.setOpen(!r.state.open)},r.handleTimeChange=function(i){var s,o;if(!(r.props.selectsRange||r.props.selectsMultiple)){var a=r.props.selected?r.props.selected:r.getPreSelection(),l=r.props.selected?i:Am(a,{hour:ms(i),minute:gs(i)});r.setState({preSelection:l}),(o=(s=r.props).onChange)===null||o===void 0||o.call(s,l),r.props.shouldCloseOnSelect&&!r.props.showTimeInput&&(r.sendFocusBackToInput(),r.setOpen(!1)),r.props.showTimeInput&&r.setOpen(!0),(r.props.showTimeSelectOnly||r.props.showTimeSelect)&&r.setState({isRenderAriaLiveMessage:!0}),r.setState({inputValue:null})}},r.onInputClick=function(){var i,s;!r.props.disabled&&!r.props.readOnly&&r.setOpen(!0),(s=(i=r.props).onInputClick)===null||s===void 0||s.call(i)},r.onInputKeyDown=function(i){var s,o,a,l,u,d;(o=(s=r.props).onKeyDown)===null||o===void 0||o.call(s,i);var f=i.key;if(!r.state.open&&!r.props.inline&&!r.props.preventOpenOnFocus){(f===ve.ArrowDown||f===ve.ArrowUp||f===ve.Enter)&&((a=r.onInputClick)===null||a===void 0||a.call(r));return}if(r.state.open){if(f===ve.ArrowDown||f===ve.ArrowUp){i.preventDefault();var p=r.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":r.props.showWeekPicker&&r.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':r.props.showFullMonthYearPicker||r.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',h=((l=r.calendar)===null||l===void 0?void 0:l.containerRef.current)instanceof Element&&r.calendar.containerRef.current.querySelector(p);h instanceof HTMLElement&&h.focus({preventScroll:!0});return}var m=Dt(r.state.preSelection);f===ve.Enter?(i.preventDefault(),i.target.blur(),r.inputOk()&&r.state.lastPreSelectChange===Vm?(r.handleSelect(m,i),!r.props.shouldCloseOnSelect&&r.setPreSelection(m)):r.setOpen(!1)):f===ve.Escape?(i.preventDefault(),i.target.blur(),r.sendFocusBackToInput(),r.setOpen(!1)):f===ve.Tab&&r.setOpen(!1),r.inputOk()||(d=(u=r.props).onInputError)===null||d===void 0||d.call(u,{code:1,msg:Gm})}},r.onPortalKeyDown=function(i){var s=i.key;s===ve.Escape&&(i.preventDefault(),r.setState({preventFocus:!0},function(){r.setOpen(!1),setTimeout(function(){r.setFocus(),r.setState({preventFocus:!1})})}))},r.onDayKeyDown=function(i){var s,o,a,l,u,d,f=r.props,p=f.minDate,h=f.maxDate,m=f.disabledKeyboardNavigation,y=f.showWeekPicker,b=f.shouldCloseOnSelect,g=f.locale,v=f.calendarStartDay,S=f.adjustDateOnChange,w=f.inline;if((o=(s=r.props).onKeyDown)===null||o===void 0||o.call(s,i),!m){var _=i.key,T=i.shiftKey,M=Dt(r.state.preSelection),C=function(Y,N){var j=N;switch(Y){case ve.ArrowRight:j=y?jd(N,1):di(N,1);break;case ve.ArrowLeft:j=y?Ix(N):YB(N);break;case ve.ArrowUp:j=Ix(N);break;case ve.ArrowDown:j=jd(N,1);break;case ve.PageUp:j=T?Fa(N,1):zo(N,1);break;case ve.PageDown:j=T?ps(N,1):fi(N,1);break;case ve.Home:j=co(N,g,v);break;case ve.End:j=pP(N);break}return j},k=function(Y,N){for(var j=40,G=Y,Z=!1,W=0,re=C(Y,N);!Z;){if(W>=j){re=N;break}p&&re<p&&(G=ve.ArrowRight,re=Yr(p,r.props)?C(G,re):p),h&&re>h&&(G=ve.ArrowLeft,re=Yr(h,r.props)?C(G,re):h),Yr(re,r.props)?((G===ve.PageUp||G===ve.Home)&&(G=ve.ArrowRight),(G===ve.PageDown||G===ve.End)&&(G=ve.ArrowLeft),re=C(G,re)):Z=!0,W++}return re};if(_===ve.Enter){i.preventDefault(),r.handleSelect(M,i),!b&&r.setPreSelection(M);return}else if(_===ve.Escape){i.preventDefault(),r.setOpen(!1),r.inputOk()||(l=(a=r.props).onInputError)===null||l===void 0||l.call(a,{code:1,msg:Gm});return}var I=null;switch(_){case ve.ArrowLeft:case ve.ArrowRight:case ve.ArrowUp:case ve.ArrowDown:case ve.PageUp:case ve.PageDown:case ve.Home:case ve.End:I=k(_,M);break}if(!I){(d=(u=r.props).onInputError)===null||d===void 0||d.call(u,{code:1,msg:Gm});return}if(i.preventDefault(),r.setState({lastPreSelectChange:Vm}),S&&r.setSelected(I),r.setPreSelection(I),w){var O=Hn(M),A=Hn(I),L=nt(M),V=nt(I);O!==A||L!==V?r.setState({shouldFocusDayInline:!0}):r.setState({shouldFocusDayInline:!1})}}},r.onPopperKeyDown=function(i){var s=i.key;s===ve.Escape&&(i.preventDefault(),r.sendFocusBackToInput(),r.setOpen(!1))},r.onClearClick=function(i){i&&i.preventDefault&&i.preventDefault(),r.sendFocusBackToInput();var s=r.props,o=s.selectsRange,a=s.onChange;o?a==null||a([null,null],i):a==null||a(null,i),r.setState({inputValue:null})},r.clear=function(){r.onClearClick()},r.onScroll=function(i){typeof r.props.closeOnScroll=="boolean"&&r.props.closeOnScroll?(i.target===document||i.target===document.documentElement||i.target===document.body)&&r.setOpen(!1):typeof r.props.closeOnScroll=="function"&&r.props.closeOnScroll(i)&&r.setOpen(!1)},r.renderCalendar=function(){var i,s;return!r.props.inline&&!r.isCalendarOpen()?null:x.createElement(UP,ft({showMonthYearDropdown:void 0,ref:function(o){r.calendar=o}},r.props,r.state,{setOpen:r.setOpen,dateFormat:(i=r.props.dateFormatCalendar)!==null&&i!==void 0?i:t.defaultProps.dateFormatCalendar,onSelect:r.handleSelect,onClickOutside:r.handleCalendarClickOutside,holidays:DP(r.modifyHolidays()),outsideClickIgnoreClass:ww,onDropdownFocus:r.handleDropdownFocus,onTimeChange:r.handleTimeChange,className:r.props.calendarClassName,container:r.props.calendarContainer,handleOnKeyDown:r.props.onKeyDown,handleOnDayKeyDown:r.onDayKeyDown,setPreSelection:r.setPreSelection,dropdownMode:(s=r.props.dropdownMode)!==null&&s!==void 0?s:t.defaultProps.dropdownMode}),r.props.children)},r.renderAriaLiveRegion=function(){var i=r.props,s=i.dateFormat,o=s===void 0?t.defaultProps.dateFormat:s,a=i.locale,l=r.props.showTimeInput||r.props.showTimeSelect,u=l?"PPPPp":"PPPP",d;return r.props.selectsRange?d="Selected start date: ".concat($r(r.props.startDate,{dateFormat:u,locale:a}),". ").concat(r.props.endDate?"End date: "+$r(r.props.endDate,{dateFormat:u,locale:a}):""):r.props.showTimeSelectOnly?d="Selected time: ".concat($r(r.props.selected,{dateFormat:o,locale:a})):r.props.showYearPicker?d="Selected year: ".concat($r(r.props.selected,{dateFormat:"yyyy",locale:a})):r.props.showMonthYearPicker?d="Selected month: ".concat($r(r.props.selected,{dateFormat:"MMMM yyyy",locale:a})):r.props.showQuarterYearPicker?d="Selected quarter: ".concat($r(r.props.selected,{dateFormat:"yyyy, QQQ",locale:a})):d="Selected date: ".concat($r(r.props.selected,{dateFormat:u,locale:a})),x.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},d)},r.renderDateInput=function(){var i,s,o,a=Nn(r.props.className,(i={},i[ww]=r.state.open,i)),l=r.props.customInput||x.createElement("input",{type:"text"}),u=r.props.customInputRef||"ref",d=r.props,f=d.dateFormat,p=f===void 0?t.defaultProps.dateFormat:f,h=d.locale,m=typeof r.props.value=="string"?r.props.value:typeof r.state.inputValue=="string"?r.state.inputValue:r.props.selectsRange?cP(r.props.startDate,r.props.endDate,{dateFormat:p,locale:h}):r.props.selectsMultiple?uP((o=r.props.selectedDates)!==null&&o!==void 0?o:[],{dateFormat:p,locale:h}):$r(r.props.selected,{dateFormat:p,locale:h});return x.cloneElement(l,(s={},s[u]=function(y){r.input=y},s.value=m,s.onBlur=r.handleBlur,s.onChange=r.handleChange,s.onClick=r.onInputClick,s.onFocus=r.handleFocus,s.onKeyDown=r.onInputKeyDown,s.id=r.props.id,s.name=r.props.name,s.form=r.props.form,s.autoFocus=r.props.autoFocus,s.placeholder=r.props.placeholderText,s.disabled=r.props.disabled,s.autoComplete=r.props.autoComplete,s.className=Nn(l.props.className,a),s.title=r.props.title,s.readOnly=r.props.readOnly,s.required=r.props.required,s.tabIndex=r.props.tabIndex,s["aria-describedby"]=r.props.ariaDescribedBy,s["aria-invalid"]=r.props.ariaInvalid,s["aria-labelledby"]=r.props.ariaLabelledBy,s["aria-required"]=r.props.ariaRequired,s))},r.renderClearButton=function(){var i=r.props,s=i.isClearable,o=i.disabled,a=i.selected,l=i.startDate,u=i.endDate,d=i.clearButtonTitle,f=i.clearButtonClassName,p=f===void 0?"":f,h=i.ariaLabelClose,m=h===void 0?"Close":h,y=i.selectedDates,b=i.readOnly;return s&&!b&&(a!=null||l!=null||u!=null||y!=null&&y.length)?x.createElement("button",{type:"button",className:Nn("react-datepicker__close-icon",p,{"react-datepicker__close-icon--disabled":o}),disabled:o,"aria-label":m,onClick:r.onClearClick,title:d,tabIndex:-1}):null},r.state=r.calcInitialState(),r.preventFocusTimeout=void 0,r}return Object.defineProperty(t,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:_c,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},t.prototype.componentDidUpdate=function(n,r){var i,s,o,a;n.inline&&eN(n.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&n.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),n.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:fw(this.props.highlightDates)}),!r.focused&&!Ko(n.selected,this.props.selected)&&this.setState({inputValue:null}),r.open!==this.state.open&&(r.open===!1&&this.state.open===!0&&((s=(i=this.props).onCalendarOpen)===null||s===void 0||s.call(i)),r.open===!0&&this.state.open===!1&&((a=(o=this.props).onCalendarClose)===null||a===void 0||a.call(o)))},t.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},t.prototype.renderInputContainer=function(){var n=this.props,r=n.showIcon,i=n.icon,s=n.calendarIconClassname,o=n.calendarIconClassName,a=n.toggleCalendarOnIconClick,l=this.state.open;return s&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),x.createElement("div",{className:"react-datepicker__input-container".concat(r?" react-datepicker__view-calendar-icon":"")},r&&x.createElement(zP,ft({icon:i,className:Nn(o,!o&&s,l&&"react-datepicker-ignore-onclickoutside")},a?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},t.prototype.render=function(){var n=this.renderCalendar();if(this.props.inline)return n;if(this.props.withPortal){var r=this.state.open?x.createElement(xw,{enableTabLoop:this.props.enableTabLoop},x.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},n)):null;return this.state.open&&this.props.portalId&&(r=x.createElement(Sw,ft({portalId:this.props.portalId},this.props),r)),x.createElement("div",null,this.renderInputContainer(),r)}return x.createElement(JP,ft({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:n,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},t}(x.Component),nN="input",Vm="navigate";const rN={timeCaption:"Time",timeIntervals:1,shouldCloseOnSelect:!1,inline:!0,onChange(){}};function iN(e){const t=Object.assign({},rN,e);return c.jsx(D.Popover,{placeholder:void 0,onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0,trigger:c.jsx("button",{className:"date-time-picker__button",type:"button",children:c.jsx(D.Icon,{iconName:"calendar"})}),children:c.jsx("div",{className:"date-time-picker",children:c.jsx(tN,{...t})})})}//! moment.js
|
82
|
+
//! version : 2.30.1
|
83
|
+
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
84
|
+
//! license : MIT
|
85
|
+
//! momentjs.com
|
86
|
+
var _w;function xe(){return _w.apply(null,arguments)}function sN(e){_w=e}function pi(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Qo(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function yt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function $m(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(yt(e,t))return!1;return!0}function fr(e){return e===void 0}function vs(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Tc(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function kw(e,t){var n=[],r,i=e.length;for(r=0;r<i;++r)n.push(t(e[r],r));return n}function fo(e,t){for(var n in t)yt(t,n)&&(e[n]=t[n]);return yt(t,"toString")&&(e.toString=t.toString),yt(t,"valueOf")&&(e.valueOf=t.valueOf),e}function $i(e,t,n,r){return Kw(e,t,n,r,!0).utc()}function oN(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Qe(e){return e._pf==null&&(e._pf=oN()),e._pf}var Ym;Array.prototype.some?Ym=Array.prototype.some:Ym=function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function Wm(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=Qe(e),n=Ym.call(t.parsedDateParts,function(i){return i!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function vf(e){var t=$i(NaN);return e!=null?fo(Qe(t),e):Qe(t).userInvalidated=!0,t}var Dw=xe.momentProperties=[],Hm=!1;function Zm(e,t){var n,r,i,s=Dw.length;if(fr(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),fr(t._i)||(e._i=t._i),fr(t._f)||(e._f=t._f),fr(t._l)||(e._l=t._l),fr(t._strict)||(e._strict=t._strict),fr(t._tzm)||(e._tzm=t._tzm),fr(t._isUTC)||(e._isUTC=t._isUTC),fr(t._offset)||(e._offset=t._offset),fr(t._pf)||(e._pf=Qe(t)),fr(t._locale)||(e._locale=t._locale),s>0)for(n=0;n<s;n++)r=Dw[n],i=t[r],fr(i)||(e[r]=i);return e}function Ic(e){Zm(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Hm===!1&&(Hm=!0,xe.updateOffset(this),Hm=!1)}function hi(e){return e instanceof Ic||e!=null&&e._isAMomentObject!=null}function Cw(e){xe.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function Wr(e,t){var n=!0;return fo(function(){if(xe.deprecationHandler!=null&&xe.deprecationHandler(null,e),n){var r=[],i,s,o,a=arguments.length;for(s=0;s<a;s++){if(i="",typeof arguments[s]=="object"){i+=`
|
87
|
+
[`+s+"] ";for(o in arguments[0])yt(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[s];r.push(i)}Cw(e+`
|
88
|
+
Arguments: `+Array.prototype.slice.call(r).join("")+`
|
89
|
+
`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Mw={};function Tw(e,t){xe.deprecationHandler!=null&&xe.deprecationHandler(e,t),Mw[e]||(Cw(t),Mw[e]=!0)}xe.suppressDeprecationWarnings=!1,xe.deprecationHandler=null;function Yi(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function aN(e){var t,n;for(n in e)yt(e,n)&&(t=e[n],Yi(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Um(e,t){var n=fo({},e),r;for(r in t)yt(t,r)&&(Qo(e[r])&&Qo(t[r])?(n[r]={},fo(n[r],e[r]),fo(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)yt(e,r)&&!yt(t,r)&&Qo(e[r])&&(n[r]=fo({},n[r]));return n}function zm(e){e!=null&&this.set(e)}var qm;Object.keys?qm=Object.keys:qm=function(e){var t,n=[];for(t in e)yt(e,t)&&n.push(t);return n};var lN={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function cN(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return Yi(r)?r.call(t,n):r}function Wi(e,t,n){var r=""+Math.abs(e),i=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Xm=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,bf=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Km={},Ua={};function Ne(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(Ua[e]=i),t&&(Ua[t[0]]=function(){return Wi(i.apply(this,arguments),t[1],t[2])}),n&&(Ua[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function uN(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function dN(e){var t=e.match(Xm),n,r;for(n=0,r=t.length;n<r;n++)Ua[t[n]]?t[n]=Ua[t[n]]:t[n]=uN(t[n]);return function(i){var s="",o;for(o=0;o<r;o++)s+=Yi(t[o])?t[o].call(i,e):t[o];return s}}function Sf(e,t){return e.isValid()?(t=Iw(t,e.localeData()),Km[t]=Km[t]||dN(t),Km[t](e)):e.localeData().invalidDate()}function Iw(e,t){var n=5;function r(i){return t.longDateFormat(i)||i}for(bf.lastIndex=0;n>=0&&bf.test(e);)e=e.replace(bf,r),bf.lastIndex=0,n-=1;return e}var fN={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function pN(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(Xm).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var hN="Invalid date";function mN(){return this._invalidDate}var gN="%d",yN=/\d{1,2}/;function vN(e){return this._ordinal.replace("%d",e)}var bN={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function SN(e,t,n,r){var i=this._relativeTime[n];return Yi(i)?i(e,t,n,r):i.replace(/%d/i,e)}function xN(e,t){var n=this._relativeTime[e>0?"future":"past"];return Yi(n)?n(t):n.replace(/%s/i,t)}var Ew={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Hr(e){return typeof e=="string"?Ew[e]||Ew[e.toLowerCase()]:void 0}function Qm(e){var t={},n,r;for(r in e)yt(e,r)&&(n=Hr(r),n&&(t[n]=e[r]));return t}var wN={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function _N(e){var t=[],n;for(n in e)yt(e,n)&&t.push({unit:n,priority:wN[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}var Rw=/\d/,Dr=/\d\d/,Lw=/\d{3}/,Jm=/\d{4}/,xf=/[+-]?\d{6}/,Zt=/\d\d?/,Ow=/\d\d\d\d?/,Bw=/\d\d\d\d\d\d?/,wf=/\d{1,3}/,eg=/\d{1,4}/,_f=/[+-]?\d{1,6}/,za=/\d+/,kf=/[+-]?\d+/,kN=/Z|[+-]\d\d:?\d\d/gi,Df=/Z|[+-]\d\d(?::?\d\d)?/gi,DN=/[+-]?\d+(\.\d{1,3})?/,Ec=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,qa=/^[1-9]\d?/,tg=/^([1-9]\d|\d)/,Cf;Cf={};function Ce(e,t,n){Cf[e]=Yi(t)?t:function(r,i){return r&&n?n:t}}function CN(e,t){return yt(Cf,e)?Cf[e](t._strict,t._locale):new RegExp(MN(e))}function MN(e){return bs(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,i,s){return n||r||i||s}))}function bs(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Zr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function st(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Zr(t)),n}var ng={};function Bt(e,t){var n,r=t,i;for(typeof e=="string"&&(e=[e]),vs(t)&&(r=function(s,o){o[t]=st(s)}),i=e.length,n=0;n<i;n++)ng[e[n]]=r}function Rc(e,t){Bt(e,function(n,r,i,s){i._w=i._w||{},t(n,i._w,i,s)})}function TN(e,t,n){t!=null&&yt(ng,e)&&ng[e](t,n._a,n,e)}function Mf(e){return e%4===0&&e%100!==0||e%400===0}var Un=0,Ss=1,Hi=2,In=3,mi=4,xs=5,Jo=6,IN=7,EN=8;Ne("Y",0,0,function(){var e=this.year();return e<=9999?Wi(e,4):"+"+e}),Ne(0,["YY",2],0,function(){return this.year()%100}),Ne(0,["YYYY",4],0,"year"),Ne(0,["YYYYY",5],0,"year"),Ne(0,["YYYYYY",6,!0],0,"year"),Ce("Y",kf),Ce("YY",Zt,Dr),Ce("YYYY",eg,Jm),Ce("YYYYY",_f,xf),Ce("YYYYYY",_f,xf),Bt(["YYYYY","YYYYYY"],Un),Bt("YYYY",function(e,t){t[Un]=e.length===2?xe.parseTwoDigitYear(e):st(e)}),Bt("YY",function(e,t){t[Un]=xe.parseTwoDigitYear(e)}),Bt("Y",function(e,t){t[Un]=parseInt(e,10)});function Lc(e){return Mf(e)?366:365}xe.parseTwoDigitYear=function(e){return st(e)+(st(e)>68?1900:2e3)};var Aw=Xa("FullYear",!0);function RN(){return Mf(this.year())}function Xa(e,t){return function(n){return n!=null?(Pw(this,e,n),xe.updateOffset(this,t),this):Oc(this,e)}}function Oc(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Pw(e,t,n){var r,i,s,o,a;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,o=e.month(),a=e.date(),a=a===29&&o===1&&!Mf(s)?28:a,i?r.setUTCFullYear(s,o,a):r.setFullYear(s,o,a)}}function LN(e){return e=Hr(e),Yi(this[e])?this[e]():this}function ON(e,t){if(typeof e=="object"){e=Qm(e);var n=_N(e),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(e=Hr(e),Yi(this[e]))return this[e](t);return this}function BN(e,t){return(e%t+t)%t}var mn;Array.prototype.indexOf?mn=Array.prototype.indexOf:mn=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function rg(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=BN(t,12);return e+=(t-n)/12,n===1?Mf(e)?29:28:31-n%7%2}Ne("M",["MM",2],"Mo",function(){return this.month()+1}),Ne("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),Ne("MMMM",0,0,function(e){return this.localeData().months(this,e)}),Ce("M",Zt,qa),Ce("MM",Zt,Dr),Ce("MMM",function(e,t){return t.monthsShortRegex(e)}),Ce("MMMM",function(e,t){return t.monthsRegex(e)}),Bt(["M","MM"],function(e,t){t[Ss]=st(e)-1}),Bt(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);i!=null?t[Ss]=i:Qe(n).invalidMonth=e});var AN="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Nw="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),jw=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,PN=Ec,NN=Ec;function jN(e,t){return e?pi(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||jw).test(t)?"format":"standalone"][e.month()]:pi(this._months)?this._months:this._months.standalone}function FN(e,t){return e?pi(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[jw.test(t)?"format":"standalone"][e.month()]:pi(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function GN(e,t,n){var r,i,s,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=$i([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?t==="MMM"?(i=mn.call(this._shortMonthsParse,o),i!==-1?i:null):(i=mn.call(this._longMonthsParse,o),i!==-1?i:null):t==="MMM"?(i=mn.call(this._shortMonthsParse,o),i!==-1?i:(i=mn.call(this._longMonthsParse,o),i!==-1?i:null)):(i=mn.call(this._longMonthsParse,o),i!==-1?i:(i=mn.call(this._shortMonthsParse,o),i!==-1?i:null))}function VN(e,t,n){var r,i,s;if(this._monthsParseExact)return GN.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=$i([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(s="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function Fw(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=st(t);else if(t=e.localeData().monthsParse(t),!vs(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,rg(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function Gw(e){return e!=null?(Fw(this,e),xe.updateOffset(this,!0),this):Oc(this,"Month")}function $N(){return rg(this.year(),this.month())}function YN(e){return this._monthsParseExact?(yt(this,"_monthsRegex")||Vw.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(yt(this,"_monthsShortRegex")||(this._monthsShortRegex=PN),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function WN(e){return this._monthsParseExact?(yt(this,"_monthsRegex")||Vw.call(this),e?this._monthsStrictRegex:this._monthsRegex):(yt(this,"_monthsRegex")||(this._monthsRegex=NN),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Vw(){function e(l,u){return u.length-l.length}var t=[],n=[],r=[],i,s,o,a;for(i=0;i<12;i++)s=$i([2e3,i]),o=bs(this.monthsShort(s,"")),a=bs(this.months(s,"")),t.push(o),n.push(a),r.push(a),r.push(o);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function HN(e,t,n,r,i,s,o){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,i,s,o),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,i,s,o),a}function Bc(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Tf(e,t,n){var r=7+t-n,i=(7+Bc(e,0,r).getUTCDay()-t)%7;return-i+r-1}function $w(e,t,n,r,i){var s=(7+n-r)%7,o=Tf(e,r,i),a=1+7*(t-1)+s+o,l,u;return a<=0?(l=e-1,u=Lc(l)+a):a>Lc(e)?(l=e+1,u=a-Lc(e)):(l=e,u=a),{year:l,dayOfYear:u}}function Ac(e,t,n){var r=Tf(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,s,o;return i<1?(o=e.year()-1,s=i+ws(o,t,n)):i>ws(e.year(),t,n)?(s=i-ws(e.year(),t,n),o=e.year()+1):(o=e.year(),s=i),{week:s,year:o}}function ws(e,t,n){var r=Tf(e,t,n),i=Tf(e+1,t,n);return(Lc(e)-r+i)/7}Ne("w",["ww",2],"wo","week"),Ne("W",["WW",2],"Wo","isoWeek"),Ce("w",Zt,qa),Ce("ww",Zt,Dr),Ce("W",Zt,qa),Ce("WW",Zt,Dr),Rc(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=st(e)});function ZN(e){return Ac(e,this._week.dow,this._week.doy).week}var UN={dow:0,doy:6};function zN(){return this._week.dow}function qN(){return this._week.doy}function XN(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function KN(e){var t=Ac(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Ne("d",0,"do","day"),Ne("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),Ne("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),Ne("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),Ne("e",0,0,"weekday"),Ne("E",0,0,"isoWeekday"),Ce("d",Zt),Ce("e",Zt),Ce("E",Zt),Ce("dd",function(e,t){return t.weekdaysMinRegex(e)}),Ce("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Ce("dddd",function(e,t){return t.weekdaysRegex(e)}),Rc(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:Qe(n).invalidWeekday=e}),Rc(["d","e","E"],function(e,t,n,r){t[r]=st(e)});function QN(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function JN(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function ig(e,t){return e.slice(t,7).concat(e.slice(0,t))}var ej="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Yw="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),tj="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),nj=Ec,rj=Ec,ij=Ec;function sj(e,t){var n=pi(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?ig(n,this._week.dow):e?n[e.day()]:n}function oj(e){return e===!0?ig(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function aj(e){return e===!0?ig(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function lj(e,t,n){var r,i,s,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=$i([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(i=mn.call(this._weekdaysParse,o),i!==-1?i:null):t==="ddd"?(i=mn.call(this._shortWeekdaysParse,o),i!==-1?i:null):(i=mn.call(this._minWeekdaysParse,o),i!==-1?i:null):t==="dddd"?(i=mn.call(this._weekdaysParse,o),i!==-1||(i=mn.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=mn.call(this._minWeekdaysParse,o),i!==-1?i:null)):t==="ddd"?(i=mn.call(this._shortWeekdaysParse,o),i!==-1||(i=mn.call(this._weekdaysParse,o),i!==-1)?i:(i=mn.call(this._minWeekdaysParse,o),i!==-1?i:null)):(i=mn.call(this._minWeekdaysParse,o),i!==-1||(i=mn.call(this._weekdaysParse,o),i!==-1)?i:(i=mn.call(this._shortWeekdaysParse,o),i!==-1?i:null))}function cj(e,t,n){var r,i,s;if(this._weekdaysParseExact)return lj.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=$i([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function uj(e){if(!this.isValid())return e!=null?this:NaN;var t=Oc(this,"Day");return e!=null?(e=QN(e,this.localeData()),this.add(e-t,"d")):t}function dj(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function fj(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=JN(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function pj(e){return this._weekdaysParseExact?(yt(this,"_weekdaysRegex")||sg.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(yt(this,"_weekdaysRegex")||(this._weekdaysRegex=nj),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function hj(e){return this._weekdaysParseExact?(yt(this,"_weekdaysRegex")||sg.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(yt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=rj),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function mj(e){return this._weekdaysParseExact?(yt(this,"_weekdaysRegex")||sg.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(yt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ij),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function sg(){function e(d,f){return f.length-d.length}var t=[],n=[],r=[],i=[],s,o,a,l,u;for(s=0;s<7;s++)o=$i([2e3,1]).day(s),a=bs(this.weekdaysMin(o,"")),l=bs(this.weekdaysShort(o,"")),u=bs(this.weekdays(o,"")),t.push(a),n.push(l),r.push(u),i.push(a),i.push(l),i.push(u);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function og(){return this.hours()%12||12}function gj(){return this.hours()||24}Ne("H",["HH",2],0,"hour"),Ne("h",["hh",2],0,og),Ne("k",["kk",2],0,gj),Ne("hmm",0,0,function(){return""+og.apply(this)+Wi(this.minutes(),2)}),Ne("hmmss",0,0,function(){return""+og.apply(this)+Wi(this.minutes(),2)+Wi(this.seconds(),2)}),Ne("Hmm",0,0,function(){return""+this.hours()+Wi(this.minutes(),2)}),Ne("Hmmss",0,0,function(){return""+this.hours()+Wi(this.minutes(),2)+Wi(this.seconds(),2)});function Ww(e,t){Ne(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Ww("a",!0),Ww("A",!1);function Hw(e,t){return t._meridiemParse}Ce("a",Hw),Ce("A",Hw),Ce("H",Zt,tg),Ce("h",Zt,qa),Ce("k",Zt,qa),Ce("HH",Zt,Dr),Ce("hh",Zt,Dr),Ce("kk",Zt,Dr),Ce("hmm",Ow),Ce("hmmss",Bw),Ce("Hmm",Ow),Ce("Hmmss",Bw),Bt(["H","HH"],In),Bt(["k","kk"],function(e,t,n){var r=st(e);t[In]=r===24?0:r}),Bt(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),Bt(["h","hh"],function(e,t,n){t[In]=st(e),Qe(n).bigHour=!0}),Bt("hmm",function(e,t,n){var r=e.length-2;t[In]=st(e.substr(0,r)),t[mi]=st(e.substr(r)),Qe(n).bigHour=!0}),Bt("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[In]=st(e.substr(0,r)),t[mi]=st(e.substr(r,2)),t[xs]=st(e.substr(i)),Qe(n).bigHour=!0}),Bt("Hmm",function(e,t,n){var r=e.length-2;t[In]=st(e.substr(0,r)),t[mi]=st(e.substr(r))}),Bt("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[In]=st(e.substr(0,r)),t[mi]=st(e.substr(r,2)),t[xs]=st(e.substr(i))});function yj(e){return(e+"").toLowerCase().charAt(0)==="p"}var vj=/[ap]\.?m?\.?/i,bj=Xa("Hours",!0);function Sj(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Zw={calendar:lN,longDateFormat:fN,invalidDate:hN,ordinal:gN,dayOfMonthOrdinalParse:yN,relativeTime:bN,months:AN,monthsShort:Nw,week:UN,weekdays:ej,weekdaysMin:tj,weekdaysShort:Yw,meridiemParse:vj},Qt={},Pc={},Nc;function xj(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function Uw(e){return e&&e.toLowerCase().replace("_","-")}function wj(e){for(var t=0,n,r,i,s;t<e.length;){for(s=Uw(e[t]).split("-"),n=s.length,r=Uw(e[t+1]),r=r?r.split("-"):null;n>0;){if(i=If(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&xj(s,r)>=n-1)break;n--}t++}return Nc}function _j(e){return!!(e&&e.match("^[^/\\\\]*$"))}function If(e){var t=null,n;if(Qt[e]===void 0&&typeof module<"u"&&module&&module.exports&&_j(e))try{t=Nc._abbr,n=require,n("./locale/"+e),po(t)}catch{Qt[e]=null}return Qt[e]}function po(e,t){var n;return e&&(fr(t)?n=_s(e):n=ag(e,t),n?Nc=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Nc._abbr}function ag(e,t){if(t!==null){var n,r=Zw;if(t.abbr=e,Qt[e]!=null)Tw("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Qt[e]._config;else if(t.parentLocale!=null)if(Qt[t.parentLocale]!=null)r=Qt[t.parentLocale]._config;else if(n=If(t.parentLocale),n!=null)r=n._config;else return Pc[t.parentLocale]||(Pc[t.parentLocale]=[]),Pc[t.parentLocale].push({name:e,config:t}),null;return Qt[e]=new zm(Um(r,t)),Pc[e]&&Pc[e].forEach(function(i){ag(i.name,i.config)}),po(e),Qt[e]}else return delete Qt[e],null}function kj(e,t){if(t!=null){var n,r,i=Zw;Qt[e]!=null&&Qt[e].parentLocale!=null?Qt[e].set(Um(Qt[e]._config,t)):(r=If(e),r!=null&&(i=r._config),t=Um(i,t),r==null&&(t.abbr=e),n=new zm(t),n.parentLocale=Qt[e],Qt[e]=n),po(e)}else Qt[e]!=null&&(Qt[e].parentLocale!=null?(Qt[e]=Qt[e].parentLocale,e===po()&&po(e)):Qt[e]!=null&&delete Qt[e]);return Qt[e]}function _s(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Nc;if(!pi(e)){if(t=If(e),t)return t;e=[e]}return wj(e)}function Dj(){return qm(Qt)}function lg(e){var t,n=e._a;return n&&Qe(e).overflow===-2&&(t=n[Ss]<0||n[Ss]>11?Ss:n[Hi]<1||n[Hi]>rg(n[Un],n[Ss])?Hi:n[In]<0||n[In]>24||n[In]===24&&(n[mi]!==0||n[xs]!==0||n[Jo]!==0)?In:n[mi]<0||n[mi]>59?mi:n[xs]<0||n[xs]>59?xs:n[Jo]<0||n[Jo]>999?Jo:-1,Qe(e)._overflowDayOfYear&&(t<Un||t>Hi)&&(t=Hi),Qe(e)._overflowWeeks&&t===-1&&(t=IN),Qe(e)._overflowWeekday&&t===-1&&(t=EN),Qe(e).overflow=t),e}var Cj=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Mj=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Tj=/Z|[+-]\d\d(?::?\d\d)?/,Ef=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],cg=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ij=/^\/?Date\((-?\d+)/i,Ej=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Rj={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function zw(e){var t,n,r=e._i,i=Cj.exec(r)||Mj.exec(r),s,o,a,l,u=Ef.length,d=cg.length;if(i){for(Qe(e).iso=!0,t=0,n=u;t<n;t++)if(Ef[t][1].exec(i[1])){o=Ef[t][0],s=Ef[t][2]!==!1;break}if(o==null){e._isValid=!1;return}if(i[3]){for(t=0,n=d;t<n;t++)if(cg[t][1].exec(i[3])){a=(i[2]||" ")+cg[t][0];break}if(a==null){e._isValid=!1;return}}if(!s&&a!=null){e._isValid=!1;return}if(i[4])if(Tj.exec(i[4]))l="Z";else{e._isValid=!1;return}e._f=o+(a||"")+(l||""),dg(e)}else e._isValid=!1}function Lj(e,t,n,r,i,s){var o=[Oj(e),Nw.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return s&&o.push(parseInt(s,10)),o}function Oj(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Bj(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Aj(e,t,n){if(e){var r=Yw.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(r!==i)return Qe(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function Pj(e,t,n){if(e)return Rj[e];if(t)return 0;var r=parseInt(n,10),i=r%100,s=(r-i)/100;return s*60+i}function qw(e){var t=Ej.exec(Bj(e._i)),n;if(t){if(n=Lj(t[4],t[3],t[2],t[5],t[6],t[7]),!Aj(t[1],n,e))return;e._a=n,e._tzm=Pj(t[8],t[9],t[10]),e._d=Bc.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Qe(e).rfc2822=!0}else e._isValid=!1}function Nj(e){var t=Ij.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(zw(e),e._isValid===!1)delete e._isValid;else return;if(qw(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:xe.createFromInputFallback(e)}xe.createFromInputFallback=Wr("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function Ka(e,t,n){return e??t??n}function jj(e){var t=new Date(xe.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function ug(e){var t,n,r=[],i,s,o;if(!e._d){for(i=jj(e),e._w&&e._a[Hi]==null&&e._a[Ss]==null&&Fj(e),e._dayOfYear!=null&&(o=Ka(e._a[Un],i[Un]),(e._dayOfYear>Lc(o)||e._dayOfYear===0)&&(Qe(e)._overflowDayOfYear=!0),n=Bc(o,0,e._dayOfYear),e._a[Ss]=n.getUTCMonth(),e._a[Hi]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[In]===24&&e._a[mi]===0&&e._a[xs]===0&&e._a[Jo]===0&&(e._nextDay=!0,e._a[In]=0),e._d=(e._useUTC?Bc:HN).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[In]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(Qe(e).weekdayMismatch=!0)}}function Fj(e){var t,n,r,i,s,o,a,l,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,o=4,n=Ka(t.GG,e._a[Un],Ac(Ut(),1,4).year),r=Ka(t.W,1),i=Ka(t.E,1),(i<1||i>7)&&(l=!0)):(s=e._locale._week.dow,o=e._locale._week.doy,u=Ac(Ut(),s,o),n=Ka(t.gg,e._a[Un],u.year),r=Ka(t.w,u.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+s,(t.e<0||t.e>6)&&(l=!0)):i=s),r<1||r>ws(n,s,o)?Qe(e)._overflowWeeks=!0:l!=null?Qe(e)._overflowWeekday=!0:(a=$w(n,r,i,s,o),e._a[Un]=a.year,e._dayOfYear=a.dayOfYear)}xe.ISO_8601=function(){},xe.RFC_2822=function(){};function dg(e){if(e._f===xe.ISO_8601){zw(e);return}if(e._f===xe.RFC_2822){qw(e);return}e._a=[],Qe(e).empty=!0;var t=""+e._i,n,r,i,s,o,a=t.length,l=0,u,d;for(i=Iw(e._f,e._locale).match(Xm)||[],d=i.length,n=0;n<d;n++)s=i[n],r=(t.match(CN(s,e))||[])[0],r&&(o=t.substr(0,t.indexOf(r)),o.length>0&&Qe(e).unusedInput.push(o),t=t.slice(t.indexOf(r)+r.length),l+=r.length),Ua[s]?(r?Qe(e).empty=!1:Qe(e).unusedTokens.push(s),TN(s,r,e)):e._strict&&!r&&Qe(e).unusedTokens.push(s);Qe(e).charsLeftOver=a-l,t.length>0&&Qe(e).unusedInput.push(t),e._a[In]<=12&&Qe(e).bigHour===!0&&e._a[In]>0&&(Qe(e).bigHour=void 0),Qe(e).parsedDateParts=e._a.slice(0),Qe(e).meridiem=e._meridiem,e._a[In]=Gj(e._locale,e._a[In],e._meridiem),u=Qe(e).era,u!==null&&(e._a[Un]=e._locale.erasConvertYear(u,e._a[Un])),ug(e),lg(e)}function Gj(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Vj(e){var t,n,r,i,s,o,a=!1,l=e._f.length;if(l===0){Qe(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<l;i++)s=0,o=!1,t=Zm({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[i],dg(t),Wm(t)&&(o=!0),s+=Qe(t).charsLeftOver,s+=Qe(t).unusedTokens.length*10,Qe(t).score=s,a?s<r&&(r=s,n=t):(r==null||s<r||o)&&(r=s,n=t,o&&(a=!0));fo(e,n||t)}function $j(e){if(!e._d){var t=Qm(e._i),n=t.day===void 0?t.date:t.day;e._a=kw([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),ug(e)}}function Yj(e){var t=new Ic(lg(Xw(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Xw(e){var t=e._i,n=e._f;return e._locale=e._locale||_s(e._l),t===null||n===void 0&&t===""?vf({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),hi(t)?new Ic(lg(t)):(Tc(t)?e._d=t:pi(n)?Vj(e):n?dg(e):Wj(e),Wm(e)||(e._d=null),e))}function Wj(e){var t=e._i;fr(t)?e._d=new Date(xe.now()):Tc(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Nj(e):pi(t)?(e._a=kw(t.slice(0),function(n){return parseInt(n,10)}),ug(e)):Qo(t)?$j(e):vs(t)?e._d=new Date(t):xe.createFromInputFallback(e)}function Kw(e,t,n,r,i){var s={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(Qo(e)&&$m(e)||pi(e)&&e.length===0)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=e,s._f=t,s._strict=r,Yj(s)}function Ut(e,t,n,r){return Kw(e,t,n,r,!1)}var Hj=Wr("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ut.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:vf()}),Zj=Wr("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ut.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:vf()});function Qw(e,t){var n,r;if(t.length===1&&pi(t[0])&&(t=t[0]),!t.length)return Ut();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function Uj(){var e=[].slice.call(arguments,0);return Qw("isBefore",e)}function zj(){var e=[].slice.call(arguments,0);return Qw("isAfter",e)}var qj=function(){return Date.now?Date.now():+new Date},jc=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Xj(e){var t,n=!1,r,i=jc.length;for(t in e)if(yt(e,t)&&!(mn.call(jc,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<i;++r)if(e[jc[r]]){if(n)return!1;parseFloat(e[jc[r]])!==st(e[jc[r]])&&(n=!0)}return!0}function Kj(){return this._isValid}function Qj(){return gi(NaN)}function Rf(e){var t=Qm(e),n=t.year||0,r=t.quarter||0,i=t.month||0,s=t.week||t.isoWeek||0,o=t.day||0,a=t.hour||0,l=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=Xj(t),this._milliseconds=+d+u*1e3+l*6e4+a*1e3*60*60,this._days=+o+s*7,this._months=+i+r*3+n*12,this._data={},this._locale=_s(),this._bubble()}function Lf(e){return e instanceof Rf}function fg(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Jj(e,t,n){var r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0,o;for(o=0;o<r;o++)st(e[o])!==st(t[o])&&s++;return s+i}function Jw(e,t){Ne(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+Wi(~~(n/60),2)+t+Wi(~~n%60,2)})}Jw("Z",":"),Jw("ZZ",""),Ce("Z",Df),Ce("ZZ",Df),Bt(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=pg(Df,e)});var eF=/([\+\-]|\d\d)/gi;function pg(e,t){var n=(t||"").match(e),r,i,s;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(eF)||["-",0,0],s=+(i[1]*60)+st(i[2]),s===0?0:i[0]==="+"?s:-s)}function hg(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(hi(e)||Tc(e)?e.valueOf():Ut(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),xe.updateOffset(n,!1),n):Ut(e).local()}function mg(e){return-Math.round(e._d.getTimezoneOffset())}xe.updateOffset=function(){};function tF(e,t,n){var r=this._offset||0,i;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=pg(Df,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(i=mg(this)),this._offset=e,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==e&&(!t||this._changeInProgress?r1(this,gi(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,xe.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:mg(this)}function nF(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function rF(e){return this.utcOffset(0,e)}function iF(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(mg(this),"m")),this}function sF(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=pg(kN,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function oF(e){return this.isValid()?(e=e?Ut(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function aF(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function lF(){if(!fr(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Zm(e,this),e=Xw(e),e._a?(t=e._isUTC?$i(e._a):Ut(e._a),this._isDSTShifted=this.isValid()&&Jj(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function cF(){return this.isValid()?!this._isUTC:!1}function uF(){return this.isValid()?this._isUTC:!1}function e1(){return this.isValid()?this._isUTC&&this._offset===0:!1}var dF=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,fF=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function gi(e,t){var n=e,r=null,i,s,o;return Lf(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:vs(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=dF.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:st(r[Hi])*i,h:st(r[In])*i,m:st(r[mi])*i,s:st(r[xs])*i,ms:st(fg(r[Jo]*1e3))*i}):(r=fF.exec(e))?(i=r[1]==="-"?-1:1,n={y:ea(r[2],i),M:ea(r[3],i),w:ea(r[4],i),d:ea(r[5],i),h:ea(r[6],i),m:ea(r[7],i),s:ea(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(o=pF(Ut(n.from),Ut(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),s=new Rf(n),Lf(e)&&yt(e,"_locale")&&(s._locale=e._locale),Lf(e)&&yt(e,"_isValid")&&(s._isValid=e._isValid),s}gi.fn=Rf.prototype,gi.invalid=Qj;function ea(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function t1(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function pF(e,t){var n;return e.isValid()&&t.isValid()?(t=hg(t,e),e.isBefore(t)?n=t1(e,t):(n=t1(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function n1(e,t){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(Tw(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=gi(n,r),r1(this,i,e),this}}function r1(e,t,n,r){var i=t._milliseconds,s=fg(t._days),o=fg(t._months);e.isValid()&&(r=r??!0,o&&Fw(e,Oc(e,"Month")+o*n),s&&Pw(e,"Date",Oc(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&xe.updateOffset(e,s||o))}var hF=n1(1,"add"),mF=n1(-1,"subtract");function i1(e){return typeof e=="string"||e instanceof String}function gF(e){return hi(e)||Tc(e)||i1(e)||vs(e)||vF(e)||yF(e)||e===null||e===void 0}function yF(e){var t=Qo(e)&&!$m(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,o=r.length;for(i=0;i<o;i+=1)s=r[i],n=n||yt(e,s);return t&&n}function vF(e){var t=pi(e),n=!1;return t&&(n=e.filter(function(r){return!vs(r)&&i1(e)}).length===0),t&&n}function bF(e){var t=Qo(e)&&!$m(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,s;for(i=0;i<r.length;i+=1)s=r[i],n=n||yt(e,s);return t&&n}function SF(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function xF(e,t){arguments.length===1&&(arguments[0]?gF(arguments[0])?(e=arguments[0],t=void 0):bF(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Ut(),r=hg(n,this).startOf("day"),i=xe.calendarFormat(this,r)||"sameElse",s=t&&(Yi(t[i])?t[i].call(this,n):t[i]);return this.format(s||this.localeData().calendar(i,this,Ut(n)))}function wF(){return new Ic(this)}function _F(e,t){var n=hi(e)?e:Ut(e);return this.isValid()&&n.isValid()?(t=Hr(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function kF(e,t){var n=hi(e)?e:Ut(e);return this.isValid()&&n.isValid()?(t=Hr(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function DF(e,t,n,r){var i=hi(e)?e:Ut(e),s=hi(t)?t:Ut(t);return this.isValid()&&i.isValid()&&s.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(s,n):!this.isAfter(s,n))):!1}function CF(e,t){var n=hi(e)?e:Ut(e),r;return this.isValid()&&n.isValid()?(t=Hr(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function MF(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function TF(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function IF(e,t,n){var r,i,s;if(!this.isValid())return NaN;if(r=hg(e,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,t=Hr(t),t){case"year":s=Of(this,r)/12;break;case"month":s=Of(this,r);break;case"quarter":s=Of(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-i)/864e5;break;case"week":s=(this-r-i)/6048e5;break;default:s=this-r}return n?s:Zr(s)}function Of(e,t){if(e.date()<t.date())return-Of(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),i,s;return t-r<0?(i=e.clone().add(n-1,"months"),s=(t-r)/(r-i)):(i=e.clone().add(n+1,"months"),s=(t-r)/(i-r)),-(n+s)||0}xe.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",xe.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function EF(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function RF(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?Sf(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Yi(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Sf(n,"Z")):Sf(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function LF(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+i+s)}function OF(e){e||(e=this.isUtc()?xe.defaultFormatUtc:xe.defaultFormat);var t=Sf(this,e);return this.localeData().postformat(t)}function BF(e,t){return this.isValid()&&(hi(e)&&e.isValid()||Ut(e).isValid())?gi({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function AF(e){return this.from(Ut(),e)}function PF(e,t){return this.isValid()&&(hi(e)&&e.isValid()||Ut(e).isValid())?gi({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function NF(e){return this.to(Ut(),e)}function s1(e){var t;return e===void 0?this._locale._abbr:(t=_s(e),t!=null&&(this._locale=t),this)}var o1=Wr("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function a1(){return this._locale}var Bf=1e3,Qa=60*Bf,Af=60*Qa,l1=(365*400+97)*24*Af;function Ja(e,t){return(e%t+t)%t}function c1(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-l1:new Date(e,t,n).valueOf()}function u1(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-l1:Date.UTC(e,t,n)}function jF(e){var t,n;if(e=Hr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?u1:c1,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Ja(t+(this._isUTC?0:this.utcOffset()*Qa),Af);break;case"minute":t=this._d.valueOf(),t-=Ja(t,Qa);break;case"second":t=this._d.valueOf(),t-=Ja(t,Bf);break}return this._d.setTime(t),xe.updateOffset(this,!0),this}function FF(e){var t,n;if(e=Hr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?u1:c1,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Af-Ja(t+(this._isUTC?0:this.utcOffset()*Qa),Af)-1;break;case"minute":t=this._d.valueOf(),t+=Qa-Ja(t,Qa)-1;break;case"second":t=this._d.valueOf(),t+=Bf-Ja(t,Bf)-1;break}return this._d.setTime(t),xe.updateOffset(this,!0),this}function GF(){return this._d.valueOf()-(this._offset||0)*6e4}function VF(){return Math.floor(this.valueOf()/1e3)}function $F(){return new Date(this.valueOf())}function YF(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function WF(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function HF(){return this.isValid()?this.toISOString():null}function ZF(){return Wm(this)}function UF(){return fo({},Qe(this))}function zF(){return Qe(this).overflow}function qF(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Ne("N",0,0,"eraAbbr"),Ne("NN",0,0,"eraAbbr"),Ne("NNN",0,0,"eraAbbr"),Ne("NNNN",0,0,"eraName"),Ne("NNNNN",0,0,"eraNarrow"),Ne("y",["y",1],"yo","eraYear"),Ne("y",["yy",2],0,"eraYear"),Ne("y",["yyy",3],0,"eraYear"),Ne("y",["yyyy",4],0,"eraYear"),Ce("N",gg),Ce("NN",gg),Ce("NNN",gg),Ce("NNNN",oG),Ce("NNNNN",aG),Bt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?Qe(n).era=i:Qe(n).invalidEra=e}),Ce("y",za),Ce("yy",za),Ce("yyy",za),Ce("yyyy",za),Ce("yo",lG),Bt(["y","yy","yyy","yyyy"],Un),Bt(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Un]=n._locale.eraYearOrdinalParse(e,i):t[Un]=parseInt(e,10)});function XF(e,t){var n,r,i,s=this._eras||_s("en")._eras;for(n=0,r=s.length;n<r;++n){switch(typeof s[n].since){case"string":i=xe(s[n].since).startOf("day"),s[n].since=i.valueOf();break}switch(typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":i=xe(s[n].until).startOf("day").valueOf(),s[n].until=i.valueOf();break}}return s}function KF(e,t,n){var r,i,s=this.eras(),o,a,l;for(e=e.toUpperCase(),r=0,i=s.length;r<i;++r)if(o=s[r].name.toUpperCase(),a=s[r].abbr.toUpperCase(),l=s[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return s[r];break;case"NNNN":if(o===e)return s[r];break;case"NNNNN":if(l===e)return s[r];break}else if([o,a,l].indexOf(e)>=0)return s[r]}function QF(e,t){var n=e.since<=e.until?1:-1;return t===void 0?xe(e.since).year():xe(e.since).year()+(t-e.offset)*n}function JF(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function eG(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function tG(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}function nG(){var e,t,n,r,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,r=this.clone().startOf("day").valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return(this.year()-xe(i[e].since).year())*n+i[e].offset;return this.year()}function rG(e){return yt(this,"_erasNameRegex")||yg.call(this),e?this._erasNameRegex:this._erasRegex}function iG(e){return yt(this,"_erasAbbrRegex")||yg.call(this),e?this._erasAbbrRegex:this._erasRegex}function sG(e){return yt(this,"_erasNarrowRegex")||yg.call(this),e?this._erasNarrowRegex:this._erasRegex}function gg(e,t){return t.erasAbbrRegex(e)}function oG(e,t){return t.erasNameRegex(e)}function aG(e,t){return t.erasNarrowRegex(e)}function lG(e,t){return t._eraYearOrdinalRegex||za}function yg(){var e=[],t=[],n=[],r=[],i,s,o,a,l,u=this.eras();for(i=0,s=u.length;i<s;++i)o=bs(u[i].name),a=bs(u[i].abbr),l=bs(u[i].narrow),t.push(o),e.push(a),n.push(l),r.push(o),r.push(a),r.push(l);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}Ne(0,["gg",2],0,function(){return this.weekYear()%100}),Ne(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Pf(e,t){Ne(0,[e,e.length],0,t)}Pf("gggg","weekYear"),Pf("ggggg","weekYear"),Pf("GGGG","isoWeekYear"),Pf("GGGGG","isoWeekYear"),Ce("G",kf),Ce("g",kf),Ce("GG",Zt,Dr),Ce("gg",Zt,Dr),Ce("GGGG",eg,Jm),Ce("gggg",eg,Jm),Ce("GGGGG",_f,xf),Ce("ggggg",_f,xf),Rc(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=st(e)}),Rc(["gg","GG"],function(e,t,n,r){t[r]=xe.parseTwoDigitYear(e)});function cG(e){return d1.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function uG(e){return d1.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function dG(){return ws(this.year(),1,4)}function fG(){return ws(this.isoWeekYear(),1,4)}function pG(){var e=this.localeData()._week;return ws(this.year(),e.dow,e.doy)}function hG(){var e=this.localeData()._week;return ws(this.weekYear(),e.dow,e.doy)}function d1(e,t,n,r,i){var s;return e==null?Ac(this,r,i).year:(s=ws(e,r,i),t>s&&(t=s),mG.call(this,e,t,n,r,i))}function mG(e,t,n,r,i){var s=$w(e,t,n,r,i),o=Bc(s.year,0,s.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}Ne("Q",0,"Qo","quarter"),Ce("Q",Rw),Bt("Q",function(e,t){t[Ss]=(st(e)-1)*3});function gG(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Ne("D",["DD",2],"Do","date"),Ce("D",Zt,qa),Ce("DD",Zt,Dr),Ce("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Bt(["D","DD"],Hi),Bt("Do",function(e,t){t[Hi]=st(e.match(Zt)[0])});var f1=Xa("Date",!0);Ne("DDD",["DDDD",3],"DDDo","dayOfYear"),Ce("DDD",wf),Ce("DDDD",Lw),Bt(["DDD","DDDD"],function(e,t,n){n._dayOfYear=st(e)});function yG(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Ne("m",["mm",2],0,"minute"),Ce("m",Zt,tg),Ce("mm",Zt,Dr),Bt(["m","mm"],mi);var vG=Xa("Minutes",!1);Ne("s",["ss",2],0,"second"),Ce("s",Zt,tg),Ce("ss",Zt,Dr),Bt(["s","ss"],xs);var bG=Xa("Seconds",!1);Ne("S",0,0,function(){return~~(this.millisecond()/100)}),Ne(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Ne(0,["SSS",3],0,"millisecond"),Ne(0,["SSSS",4],0,function(){return this.millisecond()*10}),Ne(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Ne(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),Ne(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Ne(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Ne(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),Ce("S",wf,Rw),Ce("SS",wf,Dr),Ce("SSS",wf,Lw);var ho,p1;for(ho="SSSS";ho.length<=9;ho+="S")Ce(ho,za);function SG(e,t){t[Jo]=st(("0."+e)*1e3)}for(ho="S";ho.length<=9;ho+="S")Bt(ho,SG);p1=Xa("Milliseconds",!1),Ne("z",0,0,"zoneAbbr"),Ne("zz",0,0,"zoneName");function xG(){return this._isUTC?"UTC":""}function wG(){return this._isUTC?"Coordinated Universal Time":""}var ce=Ic.prototype;ce.add=hF,ce.calendar=xF,ce.clone=wF,ce.diff=IF,ce.endOf=FF,ce.format=OF,ce.from=BF,ce.fromNow=AF,ce.to=PF,ce.toNow=NF,ce.get=LN,ce.invalidAt=zF,ce.isAfter=_F,ce.isBefore=kF,ce.isBetween=DF,ce.isSame=CF,ce.isSameOrAfter=MF,ce.isSameOrBefore=TF,ce.isValid=ZF,ce.lang=o1,ce.locale=s1,ce.localeData=a1,ce.max=Zj,ce.min=Hj,ce.parsingFlags=UF,ce.set=ON,ce.startOf=jF,ce.subtract=mF,ce.toArray=YF,ce.toObject=WF,ce.toDate=$F,ce.toISOString=RF,ce.inspect=LF,typeof Symbol<"u"&&Symbol.for!=null&&(ce[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ce.toJSON=HF,ce.toString=EF,ce.unix=VF,ce.valueOf=GF,ce.creationData=qF,ce.eraName=JF,ce.eraNarrow=eG,ce.eraAbbr=tG,ce.eraYear=nG,ce.year=Aw,ce.isLeapYear=RN,ce.weekYear=cG,ce.isoWeekYear=uG,ce.quarter=ce.quarters=gG,ce.month=Gw,ce.daysInMonth=$N,ce.week=ce.weeks=XN,ce.isoWeek=ce.isoWeeks=KN,ce.weeksInYear=pG,ce.weeksInWeekYear=hG,ce.isoWeeksInYear=dG,ce.isoWeeksInISOWeekYear=fG,ce.date=f1,ce.day=ce.days=uj,ce.weekday=dj,ce.isoWeekday=fj,ce.dayOfYear=yG,ce.hour=ce.hours=bj,ce.minute=ce.minutes=vG,ce.second=ce.seconds=bG,ce.millisecond=ce.milliseconds=p1,ce.utcOffset=tF,ce.utc=rF,ce.local=iF,ce.parseZone=sF,ce.hasAlignedHourOffset=oF,ce.isDST=aF,ce.isLocal=cF,ce.isUtcOffset=uF,ce.isUtc=e1,ce.isUTC=e1,ce.zoneAbbr=xG,ce.zoneName=wG,ce.dates=Wr("dates accessor is deprecated. Use date instead.",f1),ce.months=Wr("months accessor is deprecated. Use month instead",Gw),ce.years=Wr("years accessor is deprecated. Use year instead",Aw),ce.zone=Wr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",nF),ce.isDSTShifted=Wr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",lF);function _G(e){return Ut(e*1e3)}function kG(){return Ut.apply(null,arguments).parseZone()}function h1(e){return e}var vt=zm.prototype;vt.calendar=cN,vt.longDateFormat=pN,vt.invalidDate=mN,vt.ordinal=vN,vt.preparse=h1,vt.postformat=h1,vt.relativeTime=SN,vt.pastFuture=xN,vt.set=aN,vt.eras=XF,vt.erasParse=KF,vt.erasConvertYear=QF,vt.erasAbbrRegex=iG,vt.erasNameRegex=rG,vt.erasNarrowRegex=sG,vt.months=jN,vt.monthsShort=FN,vt.monthsParse=VN,vt.monthsRegex=WN,vt.monthsShortRegex=YN,vt.week=ZN,vt.firstDayOfYear=qN,vt.firstDayOfWeek=zN,vt.weekdays=sj,vt.weekdaysMin=aj,vt.weekdaysShort=oj,vt.weekdaysParse=cj,vt.weekdaysRegex=pj,vt.weekdaysShortRegex=hj,vt.weekdaysMinRegex=mj,vt.isPM=yj,vt.meridiem=Sj;function Nf(e,t,n,r){var i=_s(),s=$i().set(r,t);return i[n](s,e)}function m1(e,t,n){if(vs(e)&&(t=e,e=void 0),e=e||"",t!=null)return Nf(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Nf(e,r,n,"month");return i}function vg(e,t,n,r){typeof e=="boolean"?(vs(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,vs(t)&&(n=t,t=void 0),t=t||"");var i=_s(),s=e?i._week.dow:0,o,a=[];if(n!=null)return Nf(t,(n+s)%7,r,"day");for(o=0;o<7;o++)a[o]=Nf(t,(o+s)%7,r,"day");return a}function DG(e,t){return m1(e,t,"months")}function CG(e,t){return m1(e,t,"monthsShort")}function MG(e,t,n){return vg(e,t,n,"weekdays")}function TG(e,t,n){return vg(e,t,n,"weekdaysShort")}function IG(e,t,n){return vg(e,t,n,"weekdaysMin")}po("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=st(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}}),xe.lang=Wr("moment.lang is deprecated. Use moment.locale instead.",po),xe.langData=Wr("moment.langData is deprecated. Use moment.localeData instead.",_s);var ks=Math.abs;function EG(){var e=this._data;return this._milliseconds=ks(this._milliseconds),this._days=ks(this._days),this._months=ks(this._months),e.milliseconds=ks(e.milliseconds),e.seconds=ks(e.seconds),e.minutes=ks(e.minutes),e.hours=ks(e.hours),e.months=ks(e.months),e.years=ks(e.years),this}function g1(e,t,n,r){var i=gi(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function RG(e,t){return g1(this,e,t,1)}function LG(e,t){return g1(this,e,t,-1)}function y1(e){return e<0?Math.floor(e):Math.ceil(e)}function OG(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,o,a,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=y1(bg(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=Zr(e/1e3),r.seconds=i%60,s=Zr(i/60),r.minutes=s%60,o=Zr(s/60),r.hours=o%24,t+=Zr(o/24),l=Zr(v1(t)),n+=l,t-=y1(bg(l)),a=Zr(n/12),n%=12,r.days=t,r.months=n,r.years=a,this}function v1(e){return e*4800/146097}function bg(e){return e*146097/4800}function BG(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Hr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+v1(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(bg(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Ds(e){return function(){return this.as(e)}}var b1=Ds("ms"),AG=Ds("s"),PG=Ds("m"),NG=Ds("h"),jG=Ds("d"),FG=Ds("w"),GG=Ds("M"),VG=Ds("Q"),$G=Ds("y"),YG=b1;function WG(){return gi(this)}function HG(e){return e=Hr(e),this.isValid()?this[e+"s"]():NaN}function ta(e){return function(){return this.isValid()?this._data[e]:NaN}}var ZG=ta("milliseconds"),UG=ta("seconds"),zG=ta("minutes"),qG=ta("hours"),XG=ta("days"),KG=ta("months"),QG=ta("years");function JG(){return Zr(this.days()/7)}var Cs=Math.round,el={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function eV(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function tV(e,t,n,r){var i=gi(e).abs(),s=Cs(i.as("s")),o=Cs(i.as("m")),a=Cs(i.as("h")),l=Cs(i.as("d")),u=Cs(i.as("M")),d=Cs(i.as("w")),f=Cs(i.as("y")),p=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||o<=1&&["m"]||o<n.m&&["mm",o]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return n.w!=null&&(p=p||d<=1&&["w"]||d<n.w&&["ww",d]),p=p||u<=1&&["M"]||u<n.M&&["MM",u]||f<=1&&["y"]||["yy",f],p[2]=t,p[3]=+e>0,p[4]=r,eV.apply(null,p)}function nV(e){return e===void 0?Cs:typeof e=="function"?(Cs=e,!0):!1}function rV(e,t){return el[e]===void 0?!1:t===void 0?el[e]:(el[e]=t,e==="s"&&(el.ss=t-1),!0)}function iV(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=el,i,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},el,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),s=tV(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var Sg=Math.abs;function tl(e){return(e>0)-(e<0)||+e}function jf(){if(!this.isValid())return this.localeData().invalidDate();var e=Sg(this._milliseconds)/1e3,t=Sg(this._days),n=Sg(this._months),r,i,s,o,a=this.asSeconds(),l,u,d,f;return a?(r=Zr(e/60),i=Zr(r/60),e%=60,r%=60,s=Zr(n/12),n%=12,o=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",u=tl(this._months)!==tl(a)?"-":"",d=tl(this._days)!==tl(a)?"-":"",f=tl(this._milliseconds)!==tl(a)?"-":"",l+"P"+(s?u+s+"Y":"")+(n?u+n+"M":"")+(t?d+t+"D":"")+(i||r||e?"T":"")+(i?f+i+"H":"")+(r?f+r+"M":"")+(e?f+o+"S":"")):"P0D"}var ct=Rf.prototype;ct.isValid=Kj,ct.abs=EG,ct.add=RG,ct.subtract=LG,ct.as=BG,ct.asMilliseconds=b1,ct.asSeconds=AG,ct.asMinutes=PG,ct.asHours=NG,ct.asDays=jG,ct.asWeeks=FG,ct.asMonths=GG,ct.asQuarters=VG,ct.asYears=$G,ct.valueOf=YG,ct._bubble=OG,ct.clone=WG,ct.get=HG,ct.milliseconds=ZG,ct.seconds=UG,ct.minutes=zG,ct.hours=qG,ct.days=XG,ct.weeks=JG,ct.months=KG,ct.years=QG,ct.humanize=iV,ct.toISOString=jf,ct.toString=jf,ct.toJSON=jf,ct.locale=s1,ct.localeData=a1,ct.toIsoString=Wr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",jf),ct.lang=o1,Ne("X",0,0,"unix"),Ne("x",0,0,"valueOf"),Ce("x",kf),Ce("X",DN),Bt("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),Bt("x",function(e,t,n){n._d=new Date(st(e))});//! moment.js
|
90
|
+
xe.version="2.30.1",sN(Ut),xe.fn=ce,xe.min=Uj,xe.max=zj,xe.now=qj,xe.utc=$i,xe.unix=_G,xe.months=DG,xe.isDate=Tc,xe.locale=po,xe.invalid=vf,xe.duration=gi,xe.isMoment=hi,xe.weekdays=MG,xe.parseZone=kG,xe.localeData=_s,xe.isDuration=Lf,xe.monthsShort=CG,xe.weekdaysMin=IG,xe.defineLocale=ag,xe.updateLocale=kj,xe.locales=Dj,xe.weekdaysShort=TG,xe.normalizeUnits=Hr,xe.relativeTimeRounding=nV,xe.relativeTimeThreshold=rV,xe.calendarFormat=SF,xe.prototype=ce,xe.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function sV(e){if(!e)return!1;const t=e.split(" ");if(t.length<5)return!1;const n=t[1],r=t[2],i=t[3],s=t[4],o=i.split(":")[1],a=new RegExp("^[0-9]+,");return r>1e3&&(o==null?void 0:o.length)===2&&(s==null?void 0:s.length)===2&&a.test(n)}function oV(e,t=!1){return xe(e).format(t?"LL LTS":"LLL")}var xg,S1;function aV(){if(S1)return xg;S1=1;var e=typeof Br=="object"&&Br&&Br.Object===Object&&Br;return xg=e,xg}var wg,x1;function lV(){if(x1)return wg;x1=1;var e=aV(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return wg=n,wg}var _g,w1;function kg(){if(w1)return _g;w1=1;var e=lV(),t=e.Symbol;return _g=t,_g}var Dg,_1;function cV(){if(_1)return Dg;_1=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,s=Array(i);++r<i;)s[r]=n(t[r],r,t);return s}return Dg=e,Dg}var Cg,k1;function uV(){if(k1)return Cg;k1=1;var e=Array.isArray;return Cg=e,Cg}var Mg,D1;function dV(){if(D1)return Mg;D1=1;var e=kg(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function s(o){var a=n.call(o,i),l=o[i];try{o[i]=void 0;var u=!0}catch{}var d=r.call(o);return u&&(a?o[i]=l:delete o[i]),d}return Mg=s,Mg}var Tg,C1;function fV(){if(C1)return Tg;C1=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return Tg=n,Tg}var Ig,M1;function pV(){if(M1)return Ig;M1=1;var e=kg(),t=dV(),n=fV(),r="[object Null]",i="[object Undefined]",s=e?e.toStringTag:void 0;function o(a){return a==null?a===void 0?i:r:s&&s in Object(a)?t(a):n(a)}return Ig=o,Ig}var Eg,T1;function hV(){if(T1)return Eg;T1=1;function e(t){return t!=null&&typeof t=="object"}return Eg=e,Eg}var Rg,I1;function mV(){if(I1)return Rg;I1=1;var e=pV(),t=hV(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return Rg=r,Rg}var Lg,E1;function gV(){if(E1)return Lg;E1=1;var e=kg(),t=cV(),n=uV(),r=mV(),i=e?e.prototype:void 0,s=i?i.toString:void 0;function o(a){if(typeof a=="string")return a;if(n(a))return t(a,o)+"";if(r(a))return s?s.call(a):"";var l=a+"";return l=="0"&&1/a==-1/0?"-0":l}return Lg=o,Lg}var Og,R1;function yV(){if(R1)return Og;R1=1;var e=gV();function t(n){return n==null?"":e(n)}return Og=t,Og}var Bg,L1;function vV(){if(L1)return Bg;L1=1;var e=yV(),t=0;function n(r){var i=++t;return e(r)+i}return Bg=n,Bg}vV();const nl={searchLabel:"Search",resetLabel:"Reset",loadMoreLabel:"Load more",loadingLabel:"Loading...",noResultsLabel:"Nothing matches your search",clearLabel:"Clear"};function bV(){let e=-1;const t=new Set;function n(r){var i;e=r,(i=Array.from(t)[e])==null||i.focus()}return{addElement(r){r===null?(t.clear(),e=-1):t.add(r)},focusNextCheckbox(){n(Math.min(t.size-1,e+1))},focusPrevCheckbox(){n(Math.max(0,e-1))}}}const na=x.forwardRef((e,t)=>{const{selected:n,onChange:r,displayChips:i,maxHeight:s=10,labels:o,paginationOptions:a,loading:l=!1,error:u,textSeparator:d=", ",disabled:f}=e,{fieldName:p,searchPlaceholder:h,searchLabel:m=nl.searchLabel,resetLabel:y=nl.resetLabel,loadMoreLabel:b=nl.loadMoreLabel,loadingLabel:g=nl.loadingLabel,noResultsLabel:v=nl.noResultsLabel,clearLabel:S=nl.clearLabel}=o,w=(a==null?void 0:a.onSearch)||null,_=(a==null?void 0:a.total)||null,T=(a==null?void 0:a.onLoadMore)||null,[M,C]=x.useState(!1),[k,I]=x.useState(""),[O,A]=x.useState([]),[L,V]=x.useState([]),[Y,N]=x.useState([]);x.useEffect(()=>{const oe=e.options.map(K=>typeof K=="string"?{value:K,displayValue:K}:{value:K.value,displayValue:K.displayValue||K.value});A(oe),V(oe)},[e.options]),x.useEffect(()=>{if(w)w&&w(k);else{const oe=L.filter(K=>K.displayValue.toLowerCase().includes(k.toLowerCase()));A(k?oe:L)}},[k,w,L]),x.useEffect(()=>{if(Y.length<n.length){const oe=L.filter(K=>n.includes(K.value));oe.length<n.length&&T&&_>L.length?T():N(oe)}},[n,Y,L,T,_]);const{current:{addElement:j,focusNextCheckbox:G,focusPrevCheckbox:Z}}=x.useRef(bV()),W=x.useRef(),re=x.useRef(),fe=x.useRef();ES(re,oe=>{!W.current.contains(oe.target)&&!fe.current.contains(oe.target)&&C(!1)});const de=(oe,K)=>{const Ve=K?[...Y,oe]:Y.filter(Ze=>Ze.value!==oe.value);N(Ve),r&&r(Ve)},H=oe=>Y.find(K=>K.value===oe.value)!==void 0,Ge=()=>{N([]),r&&r([])},Le=Y.map(oe=>oe.displayValue).join(d);return c.jsxs("div",{className:"console_multi-dropdown-container",children:[f&&c.jsx("div",{className:"console_multi-dropdown_disabled"}),c.jsxs("div",{className:ui("console_multi-dropdown",{"--open":M,"--closed":!M,"--chips":i,"--filled":Y.length,"--disabled":f}),children:[c.jsx(D.Button,{ref:oe=>{t&&(typeof t=="function"?t(oe):t.current=oe),W.current=oe},className:ui("console_multi-dropdown",{"--open":M,"--closed":!M,"--chips":i,"--filled":Y.length,"--disabled":f}),onClick:()=>C(oe=>!oe),title:Le||p}),Y.length>0&&c.jsx(D.Button,{title:S,icon:"close",onClick:()=>Ge(),mode:"integrated",className:"console_multi-dropdown__main-reset-button"}),c.jsx("div",{className:"console_multi-dropdown-label",children:p}),c.jsx("div",{className:ui("console_multi-dropdown-main",{"--filled":Y.length}),ref:fe,onClick:oe=>{oe.target.localName==="div"&&C(K=>!K)},children:i?c.jsx(c.Fragment,{children:Y.map((oe,K)=>c.jsx("span",{className:"console_multi-dropdow-chip",children:c.jsx(D.Chip,{label:oe.displayValue,onClose:()=>de(oe,!1),buttonClose:!0})},K))}):c.jsx("span",{className:"plain-text",children:Le})}),M&&c.jsx("div",{className:"console_multi-dropdown-dialog-container",children:c.jsxs("div",{ref:re,className:"console_multi-dropdown-dialog",onKeyDown:oe=>{var K;oe.key==="Escape"?(oe.preventDefault(),C(!1),(K=W.current)==null||K.focus()):oe.key==="ArrowUp"?Z():oe.key==="ArrowDown"&&G()},children:[c.jsxs("div",{className:"console_multi-dropdown-search",children:[c.jsx(D.FormField,{fieldType:"text",children:c.jsx(D.TextField,{autoFocus:!0,id:`${p}-search`,placeholder:h,searchButton:{type:"button"},value:k,onChange:oe=>I(oe.target.value)})}),c.jsx(D.Button,{title:m,icon:"search",mode:"integrated",className:"console_multi-dropdown__search-button"}),k.length>0&&c.jsx(D.Button,{title:y,icon:"close",onClick:()=>I(""),mode:"integrated",className:"console_multi-dropdown__reset-button"})]}),c.jsx(D.Divider,{}),c.jsxs("div",{className:"console_multi-dropdown__options-container",style:{maxHeight:`${s}rem`},children:[O.map((oe,K)=>c.jsx(D.FormField,{fieldType:"checkbox",children:c.jsx(D.Checkbox,{id:`${p}-${oe.value}-${K}`,ref:j,label:oe.displayValue,checked:H(oe),onChange:Ve=>de(oe,Ve.target.checked)})},K)),!l&&k&&!O.length&&c.jsx("div",{className:"console_multi-dropdown__empty-search",children:v}),l&&c.jsx("div",{className:"console_multi-dropdown__loading",children:g}),T&&_>O.length&&c.jsx("div",{className:"console_multi-dropdown__load-more",children:c.jsx(D.Link,{onClick:()=>T(),children:b})})]})]})})]}),u&&c.jsx(D.Notification,{type:"error",children:u})]})}),SV=800;function Ag(e){if(typeof e=="string")return e;if(e&&typeof e=="object"&&"value"in e)return e.value}function O1({entries:e,renderEntry:t,onLoadMore:n,loading:r,onTextChange:i,onSelect:s,selected:o,label:a,loadMoreLabel:l,buttonTitle:u,resetTitle:d,autoSelect:f,id:p,noResultsLabel:h}){const m=x.useId(),[y,b]=x.useState(!1),[g,v]=x.useState(Ag(o)??""),[S,w]=x.useState("");x.useEffect(()=>{v(Ag(o)??"")},[o]);const _=x.useRef(i);_.current=i,x.useEffect(()=>{const C=setTimeout(()=>{var k;(k=_.current)==null||k.call(_,g)},SV);return()=>{clearTimeout(C)}},[g]);const T=[];for(const C of e)T.push({value:Ag(C)??"",renderItem:t?()=>t(C):void 0,entry:C});r?T.push({value:"",renderItem:()=>c.jsx(D.ProgressIndicator,{}),noCloseHandling:!0}):typeof n=="function"&&T.push({value:"",link:{level:"primary"},renderItem:()=>c.jsx(c.Fragment,{children:l}),noCloseHandling:!0});function M(){const C=T.find(k=>k.value===g);C&&g!==S&&(C.entry!==void 0?s(C.entry):s({}),v(C.value),b(!1),w(g))}return c.jsx(c2,{"data-testid":p,suggestions:T,open:y,onOpenChange:b,noResultsLabel:h,onSuggestionSelect:C=>{C.noCloseHandling?n&&n():C.entry&&(s(C.entry),v(C.value),w(C.value),b(!1))},children:c.jsx(D.TextField,{id:p||m,label:a,className:"console_suggestion-input",type:"search",value:g,onChange:C=>{v(C.target.value),f&&M()},withReset:!0,searchButton:{iconName:y?"up":"down",type:"button",title:u,onClick:()=>{b(C=>!C),f&&M()}},resetButton:{title:d,onClick:()=>{v(""),s(void 0)},style:{visibility:o!==void 0?"visible":"hidden"},type:"button"}})})}function mo(e){const{getName:t,initiallySelected:n}=e,r=x.useCallback(l=>l.map(u=>t(u)),[t]),i=r(e.options),[s,o]=x.useState(r(e.initiallySelected));x.useEffect(()=>{o(r(n))},[n,o,r]);const a=l=>{o(l),e.onChange(e.options.filter(u=>l.includes(e.getName(u))))};return c.jsx(na,{ref:e.ref,labels:{fieldName:e.label},options:i,selected:s,onChange:l=>a(l.map(u=>u.value))})}function B1(e){return c.jsx(mo,{ref:e.ref,label:e.label,options:e.options,initiallySelected:e.initiallySelected,onChange:e.onChange,getName:t=>t.name,searchPlaceholder:e.searchPlaceholder})}const Pg="SystemsFilterModal",xV=["IN_SYNC","ERROR","REGISTERED","PENDING"];function rl(e){const t=Te.useNavigate(),{search:n,pathname:r}=Te.useLocation(),i=x.useCallback(()=>e(new URLSearchParams(n)),[n,e]),[s,o]=x.useState(i());x.useEffect(()=>{o(i())},[i,o]);const a=x.useCallback(u=>{t({pathname:r,search:L0(u).toString()})},[t,r]),l=x.useCallback(u=>{const d={...s,...u};a(d)},[a,s]);return{currentFilter:s,setFilter:a,mergeFilter:l}}function wV(e){return{search:e.get("search"),moduleSearch:e.get("moduleSearch"),isOutdated:XI(e,"isOutdated"),installedRecipeId:e.getAll("installedRecipeId"),assignedRecipeId:e.getAll("assignedRecipeId"),matchingRecipeId:e.getAll("matchingRecipeId"),matchingRcRecipeId:e.getAll("matchingRcRecipeId"),reportedBy:e.getAll("reportedBy"),updateStatus:e.getAll("updateStatus"),initialSystemReportTimeGreaterThan:Ta(e,"initialSystemReportTimeGreaterThan"),initialSystemReportTimeLessThan:Ta(e,"initialSystemReportTimeLessThan"),lastSystemReportTimeGreaterThan:Ta(e,"lastSystemReportTimeGreaterThan"),lastSystemReportTimeLessThan:Ta(e,"lastSystemReportTimeLessThan")}}function Ff(){const{currentFilter:e,setFilter:t,mergeFilter:n}=rl(wV);return{systemsFilter:e,setSystemsFilter:t,mergeSystemsFilter:n}}//! moment.js
|
91
|
+
//! version : 2.29.4
|
92
|
+
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
93
|
+
//! license : MIT
|
94
|
+
//! momentjs.com
|
95
|
+
var A1;function be(){return A1.apply(null,arguments)}function _V(e){A1=e}function yi(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function ra(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function bt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ng(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(bt(e,t))return!1;return!0}function pr(e){return e===void 0}function Ms(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function Fc(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function P1(e,t){var n=[],r,i=e.length;for(r=0;r<i;++r)n.push(t(e[r],r));return n}function go(e,t){for(var n in t)bt(t,n)&&(e[n]=t[n]);return bt(t,"toString")&&(e.toString=t.toString),bt(t,"valueOf")&&(e.valueOf=t.valueOf),e}function Zi(e,t,n,r){return c_(e,t,n,r,!0).utc()}function kV(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Je(e){return e._pf==null&&(e._pf=kV()),e._pf}var jg;Array.prototype.some?jg=Array.prototype.some:jg=function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function Fg(e){if(e._isValid==null){var t=Je(e),n=jg.call(t.parsedDateParts,function(i){return i!=null}),r=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r}return e._isValid}function Gf(e){var t=Zi(NaN);return e!=null?go(Je(t),e):Je(t).userInvalidated=!0,t}var N1=be.momentProperties=[],Gg=!1;function Vg(e,t){var n,r,i,s=N1.length;if(pr(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),pr(t._i)||(e._i=t._i),pr(t._f)||(e._f=t._f),pr(t._l)||(e._l=t._l),pr(t._strict)||(e._strict=t._strict),pr(t._tzm)||(e._tzm=t._tzm),pr(t._isUTC)||(e._isUTC=t._isUTC),pr(t._offset)||(e._offset=t._offset),pr(t._pf)||(e._pf=Je(t)),pr(t._locale)||(e._locale=t._locale),s>0)for(n=0;n<s;n++)r=N1[n],i=t[r],pr(i)||(e[r]=i);return e}function Gc(e){Vg(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Gg===!1&&(Gg=!0,be.updateOffset(this),Gg=!1)}function vi(e){return e instanceof Gc||e!=null&&e._isAMomentObject!=null}function j1(e){be.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function Ur(e,t){var n=!0;return go(function(){if(be.deprecationHandler!=null&&be.deprecationHandler(null,e),n){var r=[],i,s,o,a=arguments.length;for(s=0;s<a;s++){if(i="",typeof arguments[s]=="object"){i+=`
|
96
|
+
[`+s+"] ";for(o in arguments[0])bt(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[s];r.push(i)}j1(e+`
|
97
|
+
Arguments: `+Array.prototype.slice.call(r).join("")+`
|
98
|
+
`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var F1={};function G1(e,t){be.deprecationHandler!=null&&be.deprecationHandler(e,t),F1[e]||(j1(t),F1[e]=!0)}be.suppressDeprecationWarnings=!1,be.deprecationHandler=null;function Ui(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function DV(e){var t,n;for(n in e)bt(e,n)&&(t=e[n],Ui(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function $g(e,t){var n=go({},e),r;for(r in t)bt(t,r)&&(ra(e[r])&&ra(t[r])?(n[r]={},go(n[r],e[r]),go(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)bt(e,r)&&!bt(t,r)&&ra(e[r])&&(n[r]=go({},n[r]));return n}function Yg(e){e!=null&&this.set(e)}var Wg;Object.keys?Wg=Object.keys:Wg=function(e){var t,n=[];for(t in e)bt(e,t)&&n.push(t);return n};var CV={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function MV(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return Ui(r)?r.call(t,n):r}function zi(e,t,n){var r=""+Math.abs(e),i=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Hg=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Vf=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Zg={},il={};function je(e,t,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),e&&(il[e]=i),t&&(il[t[0]]=function(){return zi(i.apply(this,arguments),t[1],t[2])}),n&&(il[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function TV(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function IV(e){var t=e.match(Hg),n,r;for(n=0,r=t.length;n<r;n++)il[t[n]]?t[n]=il[t[n]]:t[n]=TV(t[n]);return function(i){var s="",o;for(o=0;o<r;o++)s+=Ui(t[o])?t[o].call(i,e):t[o];return s}}function $f(e,t){return e.isValid()?(t=V1(t,e.localeData()),Zg[t]=Zg[t]||IV(t),Zg[t](e)):e.localeData().invalidDate()}function V1(e,t){var n=5;function r(i){return t.longDateFormat(i)||i}for(Vf.lastIndex=0;n>=0&&Vf.test(e);)e=e.replace(Vf,r),Vf.lastIndex=0,n-=1;return e}var EV={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function RV(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(Hg).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var LV="Invalid date";function OV(){return this._invalidDate}var BV="%d",AV=/\d{1,2}/;function PV(e){return this._ordinal.replace("%d",e)}var NV={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function jV(e,t,n,r){var i=this._relativeTime[n];return Ui(i)?i(e,t,n,r):i.replace(/%d/i,e)}function FV(e,t){var n=this._relativeTime[e>0?"future":"past"];return Ui(n)?n(t):n.replace(/%s/i,t)}var Vc={};function zn(e,t){var n=e.toLowerCase();Vc[n]=Vc[n+"s"]=Vc[t]=e}function zr(e){return typeof e=="string"?Vc[e]||Vc[e.toLowerCase()]:void 0}function Ug(e){var t={},n,r;for(r in e)bt(e,r)&&(n=zr(r),n&&(t[n]=e[r]));return t}var $1={};function qn(e,t){$1[e]=t}function GV(e){var t=[],n;for(n in e)bt(e,n)&&t.push({unit:n,priority:$1[n]});return t.sort(function(r,i){return r.priority-i.priority}),t}function Yf(e){return e%4===0&&e%100!==0||e%400===0}function qr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function it(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=qr(t)),n}function sl(e,t){return function(n){return n!=null?(Y1(this,e,n),be.updateOffset(this,t),this):Wf(this,e)}}function Wf(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Y1(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Yf(e.year())&&e.month()===1&&e.date()===29?(n=it(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Kf(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function VV(e){return e=zr(e),Ui(this[e])?this[e]():this}function $V(e,t){if(typeof e=="object"){e=Ug(e);var n=GV(e),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(e=zr(e),Ui(this[e]))return this[e](t);return this}var W1=/\d/,Cr=/\d\d/,H1=/\d{3}/,zg=/\d{4}/,Hf=/[+-]?\d{6}/,zt=/\d\d?/,Z1=/\d\d\d\d?/,U1=/\d\d\d\d\d\d?/,Zf=/\d{1,3}/,qg=/\d{1,4}/,Uf=/[+-]?\d{1,6}/,ol=/\d+/,zf=/[+-]?\d+/,YV=/Z|[+-]\d\d:?\d\d/gi,qf=/Z|[+-]\d\d(?::?\d\d)?/gi,WV=/[+-]?\d+(\.\d{1,3})?/,$c=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Xf;Xf={};function Me(e,t,n){Xf[e]=Ui(t)?t:function(r,i){return r&&n?n:t}}function HV(e,t){return bt(Xf,e)?Xf[e](t._strict,t._locale):new RegExp(ZV(e))}function ZV(e){return Mr(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,i,s){return n||r||i||s}))}function Mr(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var Xg={};function At(e,t){var n,r=t,i;for(typeof e=="string"&&(e=[e]),Ms(t)&&(r=function(s,o){o[t]=it(s)}),i=e.length,n=0;n<i;n++)Xg[e[n]]=r}function Yc(e,t){At(e,function(n,r,i,s){i._w=i._w||{},t(n,i._w,i,s)})}function UV(e,t,n){t!=null&&bt(Xg,e)&&Xg[e](t,n._a,n,e)}var Xn=0,Ts=1,qi=2,En=3,bi=4,Is=5,ia=6,zV=7,qV=8;function XV(e,t){return(e%t+t)%t}var gn;Array.prototype.indexOf?gn=Array.prototype.indexOf:gn=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Kf(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=XV(t,12);return e+=(t-n)/12,n===1?Yf(e)?29:28:31-n%7%2}je("M",["MM",2],"Mo",function(){return this.month()+1}),je("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),je("MMMM",0,0,function(e){return this.localeData().months(this,e)}),zn("month","M"),qn("month",8),Me("M",zt),Me("MM",zt,Cr),Me("MMM",function(e,t){return t.monthsShortRegex(e)}),Me("MMMM",function(e,t){return t.monthsRegex(e)}),At(["M","MM"],function(e,t){t[Ts]=it(e)-1}),At(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);i!=null?t[Ts]=i:Je(n).invalidMonth=e});var KV="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),z1="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),q1=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,QV=$c,JV=$c;function e$(e,t){return e?yi(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||q1).test(t)?"format":"standalone"][e.month()]:yi(this._months)?this._months:this._months.standalone}function t$(e,t){return e?yi(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[q1.test(t)?"format":"standalone"][e.month()]:yi(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function n$(e,t,n){var r,i,s,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=Zi([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?t==="MMM"?(i=gn.call(this._shortMonthsParse,o),i!==-1?i:null):(i=gn.call(this._longMonthsParse,o),i!==-1?i:null):t==="MMM"?(i=gn.call(this._shortMonthsParse,o),i!==-1?i:(i=gn.call(this._longMonthsParse,o),i!==-1?i:null)):(i=gn.call(this._longMonthsParse,o),i!==-1?i:(i=gn.call(this._shortMonthsParse,o),i!==-1?i:null))}function r$(e,t,n){var r,i,s;if(this._monthsParseExact)return n$.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=Zi([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(s="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function X1(e,t){var n;if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=it(t);else if(t=e.localeData().monthsParse(t),!Ms(t))return e}return n=Math.min(e.date(),Kf(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function K1(e){return e!=null?(X1(this,e),be.updateOffset(this,!0),this):Wf(this,"Month")}function i$(){return Kf(this.year(),this.month())}function s$(e){return this._monthsParseExact?(bt(this,"_monthsRegex")||Q1.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(bt(this,"_monthsShortRegex")||(this._monthsShortRegex=QV),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function o$(e){return this._monthsParseExact?(bt(this,"_monthsRegex")||Q1.call(this),e?this._monthsStrictRegex:this._monthsRegex):(bt(this,"_monthsRegex")||(this._monthsRegex=JV),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Q1(){function e(o,a){return a.length-o.length}var t=[],n=[],r=[],i,s;for(i=0;i<12;i++)s=Zi([2e3,i]),t.push(this.monthsShort(s,"")),n.push(this.months(s,"")),r.push(this.months(s,"")),r.push(this.monthsShort(s,""));for(t.sort(e),n.sort(e),r.sort(e),i=0;i<12;i++)t[i]=Mr(t[i]),n[i]=Mr(n[i]);for(i=0;i<24;i++)r[i]=Mr(r[i]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}je("Y",0,0,function(){var e=this.year();return e<=9999?zi(e,4):"+"+e}),je(0,["YY",2],0,function(){return this.year()%100}),je(0,["YYYY",4],0,"year"),je(0,["YYYYY",5],0,"year"),je(0,["YYYYYY",6,!0],0,"year"),zn("year","y"),qn("year",1),Me("Y",zf),Me("YY",zt,Cr),Me("YYYY",qg,zg),Me("YYYYY",Uf,Hf),Me("YYYYYY",Uf,Hf),At(["YYYYY","YYYYYY"],Xn),At("YYYY",function(e,t){t[Xn]=e.length===2?be.parseTwoDigitYear(e):it(e)}),At("YY",function(e,t){t[Xn]=be.parseTwoDigitYear(e)}),At("Y",function(e,t){t[Xn]=parseInt(e,10)});function Wc(e){return Yf(e)?366:365}be.parseTwoDigitYear=function(e){return it(e)+(it(e)>68?1900:2e3)};var J1=sl("FullYear",!0);function a$(){return Yf(this.year())}function l$(e,t,n,r,i,s,o){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,i,s,o),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,i,s,o),a}function Hc(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Qf(e,t,n){var r=7+t-n,i=(7+Hc(e,0,r).getUTCDay()-t)%7;return-i+r-1}function e_(e,t,n,r,i){var s=(7+n-r)%7,o=Qf(e,r,i),a=1+7*(t-1)+s+o,l,u;return a<=0?(l=e-1,u=Wc(l)+a):a>Wc(e)?(l=e+1,u=a-Wc(e)):(l=e,u=a),{year:l,dayOfYear:u}}function Zc(e,t,n){var r=Qf(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,s,o;return i<1?(o=e.year()-1,s=i+Es(o,t,n)):i>Es(e.year(),t,n)?(s=i-Es(e.year(),t,n),o=e.year()+1):(o=e.year(),s=i),{week:s,year:o}}function Es(e,t,n){var r=Qf(e,t,n),i=Qf(e+1,t,n);return(Wc(e)-r+i)/7}je("w",["ww",2],"wo","week"),je("W",["WW",2],"Wo","isoWeek"),zn("week","w"),zn("isoWeek","W"),qn("week",5),qn("isoWeek",5),Me("w",zt),Me("ww",zt,Cr),Me("W",zt),Me("WW",zt,Cr),Yc(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=it(e)});function c$(e){return Zc(e,this._week.dow,this._week.doy).week}var u$={dow:0,doy:6};function d$(){return this._week.dow}function f$(){return this._week.doy}function p$(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function h$(e){var t=Zc(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}je("d",0,"do","day"),je("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),je("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),je("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),je("e",0,0,"weekday"),je("E",0,0,"isoWeekday"),zn("day","d"),zn("weekday","e"),zn("isoWeekday","E"),qn("day",11),qn("weekday",11),qn("isoWeekday",11),Me("d",zt),Me("e",zt),Me("E",zt),Me("dd",function(e,t){return t.weekdaysMinRegex(e)}),Me("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Me("dddd",function(e,t){return t.weekdaysRegex(e)}),Yc(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i!=null?t.d=i:Je(n).invalidWeekday=e}),Yc(["d","e","E"],function(e,t,n,r){t[r]=it(e)});function m$(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function g$(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Kg(e,t){return e.slice(t,7).concat(e.slice(0,t))}var y$="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),t_="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),v$="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),b$=$c,S$=$c,x$=$c;function w$(e,t){var n=yi(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Kg(n,this._week.dow):e?n[e.day()]:n}function _$(e){return e===!0?Kg(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function k$(e){return e===!0?Kg(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function D$(e,t,n){var r,i,s,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=Zi([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(i=gn.call(this._weekdaysParse,o),i!==-1?i:null):t==="ddd"?(i=gn.call(this._shortWeekdaysParse,o),i!==-1?i:null):(i=gn.call(this._minWeekdaysParse,o),i!==-1?i:null):t==="dddd"?(i=gn.call(this._weekdaysParse,o),i!==-1||(i=gn.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=gn.call(this._minWeekdaysParse,o),i!==-1?i:null)):t==="ddd"?(i=gn.call(this._shortWeekdaysParse,o),i!==-1||(i=gn.call(this._weekdaysParse,o),i!==-1)?i:(i=gn.call(this._minWeekdaysParse,o),i!==-1?i:null)):(i=gn.call(this._minWeekdaysParse,o),i!==-1||(i=gn.call(this._weekdaysParse,o),i!==-1)?i:(i=gn.call(this._shortWeekdaysParse,o),i!==-1?i:null))}function C$(e,t,n){var r,i,s;if(this._weekdaysParseExact)return D$.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Zi([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function M$(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=m$(e,this.localeData()),this.add(e-t,"d")):t}function T$(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function I$(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=g$(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function E$(e){return this._weekdaysParseExact?(bt(this,"_weekdaysRegex")||Qg.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(bt(this,"_weekdaysRegex")||(this._weekdaysRegex=b$),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function R$(e){return this._weekdaysParseExact?(bt(this,"_weekdaysRegex")||Qg.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(bt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=S$),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function L$(e){return this._weekdaysParseExact?(bt(this,"_weekdaysRegex")||Qg.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(bt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=x$),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Qg(){function e(d,f){return f.length-d.length}var t=[],n=[],r=[],i=[],s,o,a,l,u;for(s=0;s<7;s++)o=Zi([2e3,1]).day(s),a=Mr(this.weekdaysMin(o,"")),l=Mr(this.weekdaysShort(o,"")),u=Mr(this.weekdays(o,"")),t.push(a),n.push(l),r.push(u),i.push(a),i.push(l),i.push(u);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Jg(){return this.hours()%12||12}function O$(){return this.hours()||24}je("H",["HH",2],0,"hour"),je("h",["hh",2],0,Jg),je("k",["kk",2],0,O$),je("hmm",0,0,function(){return""+Jg.apply(this)+zi(this.minutes(),2)}),je("hmmss",0,0,function(){return""+Jg.apply(this)+zi(this.minutes(),2)+zi(this.seconds(),2)}),je("Hmm",0,0,function(){return""+this.hours()+zi(this.minutes(),2)}),je("Hmmss",0,0,function(){return""+this.hours()+zi(this.minutes(),2)+zi(this.seconds(),2)});function n_(e,t){je(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}n_("a",!0),n_("A",!1),zn("hour","h"),qn("hour",13);function r_(e,t){return t._meridiemParse}Me("a",r_),Me("A",r_),Me("H",zt),Me("h",zt),Me("k",zt),Me("HH",zt,Cr),Me("hh",zt,Cr),Me("kk",zt,Cr),Me("hmm",Z1),Me("hmmss",U1),Me("Hmm",Z1),Me("Hmmss",U1),At(["H","HH"],En),At(["k","kk"],function(e,t,n){var r=it(e);t[En]=r===24?0:r}),At(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),At(["h","hh"],function(e,t,n){t[En]=it(e),Je(n).bigHour=!0}),At("hmm",function(e,t,n){var r=e.length-2;t[En]=it(e.substr(0,r)),t[bi]=it(e.substr(r)),Je(n).bigHour=!0}),At("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[En]=it(e.substr(0,r)),t[bi]=it(e.substr(r,2)),t[Is]=it(e.substr(i)),Je(n).bigHour=!0}),At("Hmm",function(e,t,n){var r=e.length-2;t[En]=it(e.substr(0,r)),t[bi]=it(e.substr(r))}),At("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[En]=it(e.substr(0,r)),t[bi]=it(e.substr(r,2)),t[Is]=it(e.substr(i))});function B$(e){return(e+"").toLowerCase().charAt(0)==="p"}var A$=/[ap]\.?m?\.?/i,P$=sl("Hours",!0);function N$(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var i_={calendar:CV,longDateFormat:EV,invalidDate:LV,ordinal:BV,dayOfMonthOrdinalParse:AV,relativeTime:NV,months:KV,monthsShort:z1,week:u$,weekdays:y$,weekdaysMin:v$,weekdaysShort:t_,meridiemParse:A$},Jt={},Uc={},zc;function j$(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function s_(e){return e&&e.toLowerCase().replace("_","-")}function F$(e){for(var t=0,n,r,i,s;t<e.length;){for(s=s_(e[t]).split("-"),n=s.length,r=s_(e[t+1]),r=r?r.split("-"):null;n>0;){if(i=Jf(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&j$(s,r)>=n-1)break;n--}t++}return zc}function G$(e){return e.match("^[^/\\\\]*$")!=null}function Jf(e){var t=null,n;if(Jt[e]===void 0&&typeof module<"u"&&module&&module.exports&&G$(e))try{t=zc._abbr,n=require,n("./locale/"+e),yo(t)}catch{Jt[e]=null}return Jt[e]}function yo(e,t){var n;return e&&(pr(t)?n=Rs(e):n=ey(e,t),n?zc=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),zc._abbr}function ey(e,t){if(t!==null){var n,r=i_;if(t.abbr=e,Jt[e]!=null)G1("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Jt[e]._config;else if(t.parentLocale!=null)if(Jt[t.parentLocale]!=null)r=Jt[t.parentLocale]._config;else if(n=Jf(t.parentLocale),n!=null)r=n._config;else return Uc[t.parentLocale]||(Uc[t.parentLocale]=[]),Uc[t.parentLocale].push({name:e,config:t}),null;return Jt[e]=new Yg($g(r,t)),Uc[e]&&Uc[e].forEach(function(i){ey(i.name,i.config)}),yo(e),Jt[e]}else return delete Jt[e],null}function V$(e,t){if(t!=null){var n,r,i=i_;Jt[e]!=null&&Jt[e].parentLocale!=null?Jt[e].set($g(Jt[e]._config,t)):(r=Jf(e),r!=null&&(i=r._config),t=$g(i,t),r==null&&(t.abbr=e),n=new Yg(t),n.parentLocale=Jt[e],Jt[e]=n),yo(e)}else Jt[e]!=null&&(Jt[e].parentLocale!=null?(Jt[e]=Jt[e].parentLocale,e===yo()&&yo(e)):Jt[e]!=null&&delete Jt[e]);return Jt[e]}function Rs(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return zc;if(!yi(e)){if(t=Jf(e),t)return t;e=[e]}return F$(e)}function $$(){return Wg(Jt)}function ty(e){var t,n=e._a;return n&&Je(e).overflow===-2&&(t=n[Ts]<0||n[Ts]>11?Ts:n[qi]<1||n[qi]>Kf(n[Xn],n[Ts])?qi:n[En]<0||n[En]>24||n[En]===24&&(n[bi]!==0||n[Is]!==0||n[ia]!==0)?En:n[bi]<0||n[bi]>59?bi:n[Is]<0||n[Is]>59?Is:n[ia]<0||n[ia]>999?ia:-1,Je(e)._overflowDayOfYear&&(t<Xn||t>qi)&&(t=qi),Je(e)._overflowWeeks&&t===-1&&(t=zV),Je(e)._overflowWeekday&&t===-1&&(t=qV),Je(e).overflow=t),e}var Y$=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,W$=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,H$=/Z|[+-]\d\d(?::?\d\d)?/,ep=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ny=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Z$=/^\/?Date\((-?\d+)/i,U$=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,z$={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function o_(e){var t,n,r=e._i,i=Y$.exec(r)||W$.exec(r),s,o,a,l,u=ep.length,d=ny.length;if(i){for(Je(e).iso=!0,t=0,n=u;t<n;t++)if(ep[t][1].exec(i[1])){o=ep[t][0],s=ep[t][2]!==!1;break}if(o==null){e._isValid=!1;return}if(i[3]){for(t=0,n=d;t<n;t++)if(ny[t][1].exec(i[3])){a=(i[2]||" ")+ny[t][0];break}if(a==null){e._isValid=!1;return}}if(!s&&a!=null){e._isValid=!1;return}if(i[4])if(H$.exec(i[4]))l="Z";else{e._isValid=!1;return}e._f=o+(a||"")+(l||""),iy(e)}else e._isValid=!1}function q$(e,t,n,r,i,s){var o=[X$(e),z1.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return s&&o.push(parseInt(s,10)),o}function X$(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function K$(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Q$(e,t,n){if(e){var r=t_.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(r!==i)return Je(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function J$(e,t,n){if(e)return z$[e];if(t)return 0;var r=parseInt(n,10),i=r%100,s=(r-i)/100;return s*60+i}function a_(e){var t=U$.exec(K$(e._i)),n;if(t){if(n=q$(t[4],t[3],t[2],t[5],t[6],t[7]),!Q$(t[1],n,e))return;e._a=n,e._tzm=J$(t[8],t[9],t[10]),e._d=Hc.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Je(e).rfc2822=!0}else e._isValid=!1}function e3(e){var t=Z$.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(o_(e),e._isValid===!1)delete e._isValid;else return;if(a_(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:be.createFromInputFallback(e)}be.createFromInputFallback=Ur("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function al(e,t,n){return e??t??n}function t3(e){var t=new Date(be.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function ry(e){var t,n,r=[],i,s,o;if(!e._d){for(i=t3(e),e._w&&e._a[qi]==null&&e._a[Ts]==null&&n3(e),e._dayOfYear!=null&&(o=al(e._a[Xn],i[Xn]),(e._dayOfYear>Wc(o)||e._dayOfYear===0)&&(Je(e)._overflowDayOfYear=!0),n=Hc(o,0,e._dayOfYear),e._a[Ts]=n.getUTCMonth(),e._a[qi]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[En]===24&&e._a[bi]===0&&e._a[Is]===0&&e._a[ia]===0&&(e._nextDay=!0,e._a[En]=0),e._d=(e._useUTC?Hc:l$).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[En]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(Je(e).weekdayMismatch=!0)}}function n3(e){var t,n,r,i,s,o,a,l,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,o=4,n=al(t.GG,e._a[Xn],Zc(qt(),1,4).year),r=al(t.W,1),i=al(t.E,1),(i<1||i>7)&&(l=!0)):(s=e._locale._week.dow,o=e._locale._week.doy,u=Zc(qt(),s,o),n=al(t.gg,e._a[Xn],u.year),r=al(t.w,u.week),t.d!=null?(i=t.d,(i<0||i>6)&&(l=!0)):t.e!=null?(i=t.e+s,(t.e<0||t.e>6)&&(l=!0)):i=s),r<1||r>Es(n,s,o)?Je(e)._overflowWeeks=!0:l!=null?Je(e)._overflowWeekday=!0:(a=e_(n,r,i,s,o),e._a[Xn]=a.year,e._dayOfYear=a.dayOfYear)}be.ISO_8601=function(){},be.RFC_2822=function(){};function iy(e){if(e._f===be.ISO_8601){o_(e);return}if(e._f===be.RFC_2822){a_(e);return}e._a=[],Je(e).empty=!0;var t=""+e._i,n,r,i,s,o,a=t.length,l=0,u,d;for(i=V1(e._f,e._locale).match(Hg)||[],d=i.length,n=0;n<d;n++)s=i[n],r=(t.match(HV(s,e))||[])[0],r&&(o=t.substr(0,t.indexOf(r)),o.length>0&&Je(e).unusedInput.push(o),t=t.slice(t.indexOf(r)+r.length),l+=r.length),il[s]?(r?Je(e).empty=!1:Je(e).unusedTokens.push(s),UV(s,r,e)):e._strict&&!r&&Je(e).unusedTokens.push(s);Je(e).charsLeftOver=a-l,t.length>0&&Je(e).unusedInput.push(t),e._a[En]<=12&&Je(e).bigHour===!0&&e._a[En]>0&&(Je(e).bigHour=void 0),Je(e).parsedDateParts=e._a.slice(0),Je(e).meridiem=e._meridiem,e._a[En]=r3(e._locale,e._a[En],e._meridiem),u=Je(e).era,u!==null&&(e._a[Xn]=e._locale.erasConvertYear(u,e._a[Xn])),ry(e),ty(e)}function r3(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function i3(e){var t,n,r,i,s,o,a=!1,l=e._f.length;if(l===0){Je(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<l;i++)s=0,o=!1,t=Vg({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[i],iy(t),Fg(t)&&(o=!0),s+=Je(t).charsLeftOver,s+=Je(t).unusedTokens.length*10,Je(t).score=s,a?s<r&&(r=s,n=t):(r==null||s<r||o)&&(r=s,n=t,o&&(a=!0));go(e,n||t)}function s3(e){if(!e._d){var t=Ug(e._i),n=t.day===void 0?t.date:t.day;e._a=P1([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),ry(e)}}function o3(e){var t=new Gc(ty(l_(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function l_(e){var t=e._i,n=e._f;return e._locale=e._locale||Rs(e._l),t===null||n===void 0&&t===""?Gf({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),vi(t)?new Gc(ty(t)):(Fc(t)?e._d=t:yi(n)?i3(e):n?iy(e):a3(e),Fg(e)||(e._d=null),e))}function a3(e){var t=e._i;pr(t)?e._d=new Date(be.now()):Fc(t)?e._d=new Date(t.valueOf()):typeof t=="string"?e3(e):yi(t)?(e._a=P1(t.slice(0),function(n){return parseInt(n,10)}),ry(e)):ra(t)?s3(e):Ms(t)?e._d=new Date(t):be.createFromInputFallback(e)}function c_(e,t,n,r,i){var s={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(ra(e)&&Ng(e)||yi(e)&&e.length===0)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=e,s._f=t,s._strict=r,o3(s)}function qt(e,t,n,r){return c_(e,t,n,r,!1)}var l3=Ur("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=qt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Gf()}),c3=Ur("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=qt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Gf()});function u_(e,t){var n,r;if(t.length===1&&yi(t[0])&&(t=t[0]),!t.length)return qt();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function u3(){var e=[].slice.call(arguments,0);return u_("isBefore",e)}function d3(){var e=[].slice.call(arguments,0);return u_("isAfter",e)}var f3=function(){return Date.now?Date.now():+new Date},qc=["year","quarter","month","week","day","hour","minute","second","millisecond"];function p3(e){var t,n=!1,r,i=qc.length;for(t in e)if(bt(e,t)&&!(gn.call(qc,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<i;++r)if(e[qc[r]]){if(n)return!1;parseFloat(e[qc[r]])!==it(e[qc[r]])&&(n=!0)}return!0}function h3(){return this._isValid}function m3(){return Si(NaN)}function tp(e){var t=Ug(e),n=t.year||0,r=t.quarter||0,i=t.month||0,s=t.week||t.isoWeek||0,o=t.day||0,a=t.hour||0,l=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=p3(t),this._milliseconds=+d+u*1e3+l*6e4+a*1e3*60*60,this._days=+o+s*7,this._months=+i+r*3+n*12,this._data={},this._locale=Rs(),this._bubble()}function np(e){return e instanceof tp}function sy(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function g3(e,t,n){var r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0,o;for(o=0;o<r;o++)it(e[o])!==it(t[o])&&s++;return s+i}function d_(e,t){je(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+zi(~~(n/60),2)+t+zi(~~n%60,2)})}d_("Z",":"),d_("ZZ",""),Me("Z",qf),Me("ZZ",qf),At(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=oy(qf,e)});var y3=/([\+\-]|\d\d)/gi;function oy(e,t){var n=(t||"").match(e),r,i,s;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(y3)||["-",0,0],s=+(i[1]*60)+it(i[2]),s===0?0:i[0]==="+"?s:-s)}function ay(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(vi(e)||Fc(e)?e.valueOf():qt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),be.updateOffset(n,!1),n):qt(e).local()}function ly(e){return-Math.round(e._d.getTimezoneOffset())}be.updateOffset=function(){};function v3(e,t,n){var r=this._offset||0,i;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=oy(qf,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(i=ly(this)),this._offset=e,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==e&&(!t||this._changeInProgress?m_(this,Si(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,be.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:ly(this)}function b3(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function S3(e){return this.utcOffset(0,e)}function x3(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(ly(this),"m")),this}function w3(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=oy(YV,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function _3(e){return this.isValid()?(e=e?qt(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function k3(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function D3(){if(!pr(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Vg(e,this),e=l_(e),e._a?(t=e._isUTC?Zi(e._a):qt(e._a),this._isDSTShifted=this.isValid()&&g3(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function C3(){return this.isValid()?!this._isUTC:!1}function M3(){return this.isValid()?this._isUTC:!1}function f_(){return this.isValid()?this._isUTC&&this._offset===0:!1}var T3=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,I3=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Si(e,t){var n=e,r=null,i,s,o;return np(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:Ms(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=T3.exec(e))?(i=r[1]==="-"?-1:1,n={y:0,d:it(r[qi])*i,h:it(r[En])*i,m:it(r[bi])*i,s:it(r[Is])*i,ms:it(sy(r[ia]*1e3))*i}):(r=I3.exec(e))?(i=r[1]==="-"?-1:1,n={y:sa(r[2],i),M:sa(r[3],i),w:sa(r[4],i),d:sa(r[5],i),h:sa(r[6],i),m:sa(r[7],i),s:sa(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(o=E3(qt(n.from),qt(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),s=new tp(n),np(e)&&bt(e,"_locale")&&(s._locale=e._locale),np(e)&&bt(e,"_isValid")&&(s._isValid=e._isValid),s}Si.fn=tp.prototype,Si.invalid=m3;function sa(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function p_(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function E3(e,t){var n;return e.isValid()&&t.isValid()?(t=ay(t,e),e.isBefore(t)?n=p_(e,t):(n=p_(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function h_(e,t){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(G1(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=Si(n,r),m_(this,i,e),this}}function m_(e,t,n,r){var i=t._milliseconds,s=sy(t._days),o=sy(t._months);e.isValid()&&(r=r??!0,o&&X1(e,Wf(e,"Month")+o*n),s&&Y1(e,"Date",Wf(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&be.updateOffset(e,s||o))}var R3=h_(1,"add"),L3=h_(-1,"subtract");function g_(e){return typeof e=="string"||e instanceof String}function O3(e){return vi(e)||Fc(e)||g_(e)||Ms(e)||A3(e)||B3(e)||e===null||e===void 0}function B3(e){var t=ra(e)&&!Ng(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,o=r.length;for(i=0;i<o;i+=1)s=r[i],n=n||bt(e,s);return t&&n}function A3(e){var t=yi(e),n=!1;return t&&(n=e.filter(function(r){return!Ms(r)&&g_(e)}).length===0),t&&n}function P3(e){var t=ra(e)&&!Ng(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,s;for(i=0;i<r.length;i+=1)s=r[i],n=n||bt(e,s);return t&&n}function N3(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function j3(e,t){arguments.length===1&&(arguments[0]?O3(arguments[0])?(e=arguments[0],t=void 0):P3(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||qt(),r=ay(n,this).startOf("day"),i=be.calendarFormat(this,r)||"sameElse",s=t&&(Ui(t[i])?t[i].call(this,n):t[i]);return this.format(s||this.localeData().calendar(i,this,qt(n)))}function F3(){return new Gc(this)}function G3(e,t){var n=vi(e)?e:qt(e);return this.isValid()&&n.isValid()?(t=zr(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function V3(e,t){var n=vi(e)?e:qt(e);return this.isValid()&&n.isValid()?(t=zr(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function $3(e,t,n,r){var i=vi(e)?e:qt(e),s=vi(t)?t:qt(t);return this.isValid()&&i.isValid()&&s.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(s,n):!this.isAfter(s,n))):!1}function Y3(e,t){var n=vi(e)?e:qt(e),r;return this.isValid()&&n.isValid()?(t=zr(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function W3(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function H3(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Z3(e,t,n){var r,i,s;if(!this.isValid())return NaN;if(r=ay(e,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,t=zr(t),t){case"year":s=rp(this,r)/12;break;case"month":s=rp(this,r);break;case"quarter":s=rp(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-i)/864e5;break;case"week":s=(this-r-i)/6048e5;break;default:s=this-r}return n?s:qr(s)}function rp(e,t){if(e.date()<t.date())return-rp(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),i,s;return t-r<0?(i=e.clone().add(n-1,"months"),s=(t-r)/(r-i)):(i=e.clone().add(n+1,"months"),s=(t-r)/(i-r)),-(n+s)||0}be.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",be.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function U3(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function z3(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?$f(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ui(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",$f(n,"Z")):$f(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function q3(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,i,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+i+s)}function X3(e){e||(e=this.isUtc()?be.defaultFormatUtc:be.defaultFormat);var t=$f(this,e);return this.localeData().postformat(t)}function K3(e,t){return this.isValid()&&(vi(e)&&e.isValid()||qt(e).isValid())?Si({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Q3(e){return this.from(qt(),e)}function J3(e,t){return this.isValid()&&(vi(e)&&e.isValid()||qt(e).isValid())?Si({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function eY(e){return this.to(qt(),e)}function y_(e){var t;return e===void 0?this._locale._abbr:(t=Rs(e),t!=null&&(this._locale=t),this)}var v_=Ur("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function b_(){return this._locale}var ip=1e3,ll=60*ip,sp=60*ll,S_=(365*400+97)*24*sp;function cl(e,t){return(e%t+t)%t}function x_(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-S_:new Date(e,t,n).valueOf()}function w_(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-S_:Date.UTC(e,t,n)}function tY(e){var t,n;if(e=zr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?w_:x_,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=cl(t+(this._isUTC?0:this.utcOffset()*ll),sp);break;case"minute":t=this._d.valueOf(),t-=cl(t,ll);break;case"second":t=this._d.valueOf(),t-=cl(t,ip);break}return this._d.setTime(t),be.updateOffset(this,!0),this}function nY(e){var t,n;if(e=zr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?w_:x_,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=sp-cl(t+(this._isUTC?0:this.utcOffset()*ll),sp)-1;break;case"minute":t=this._d.valueOf(),t+=ll-cl(t,ll)-1;break;case"second":t=this._d.valueOf(),t+=ip-cl(t,ip)-1;break}return this._d.setTime(t),be.updateOffset(this,!0),this}function rY(){return this._d.valueOf()-(this._offset||0)*6e4}function iY(){return Math.floor(this.valueOf()/1e3)}function sY(){return new Date(this.valueOf())}function oY(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function aY(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function lY(){return this.isValid()?this.toISOString():null}function cY(){return Fg(this)}function uY(){return go({},Je(this))}function dY(){return Je(this).overflow}function fY(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}je("N",0,0,"eraAbbr"),je("NN",0,0,"eraAbbr"),je("NNN",0,0,"eraAbbr"),je("NNNN",0,0,"eraName"),je("NNNNN",0,0,"eraNarrow"),je("y",["y",1],"yo","eraYear"),je("y",["yy",2],0,"eraYear"),je("y",["yyy",3],0,"eraYear"),je("y",["yyyy",4],0,"eraYear"),Me("N",cy),Me("NN",cy),Me("NNN",cy),Me("NNNN",_Y),Me("NNNNN",kY),At(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?Je(n).era=i:Je(n).invalidEra=e}),Me("y",ol),Me("yy",ol),Me("yyy",ol),Me("yyyy",ol),Me("yo",DY),At(["y","yy","yyy","yyyy"],Xn),At(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Xn]=n._locale.eraYearOrdinalParse(e,i):t[Xn]=parseInt(e,10)});function pY(e,t){var n,r,i,s=this._eras||Rs("en")._eras;for(n=0,r=s.length;n<r;++n){switch(typeof s[n].since){case"string":i=be(s[n].since).startOf("day"),s[n].since=i.valueOf();break}switch(typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":i=be(s[n].until).startOf("day").valueOf(),s[n].until=i.valueOf();break}}return s}function hY(e,t,n){var r,i,s=this.eras(),o,a,l;for(e=e.toUpperCase(),r=0,i=s.length;r<i;++r)if(o=s[r].name.toUpperCase(),a=s[r].abbr.toUpperCase(),l=s[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return s[r];break;case"NNNN":if(o===e)return s[r];break;case"NNNNN":if(l===e)return s[r];break}else if([o,a,l].indexOf(e)>=0)return s[r]}function mY(e,t){var n=e.since<=e.until?1:-1;return t===void 0?be(e.since).year():be(e.since).year()+(t-e.offset)*n}function gY(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function yY(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function vY(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}function bY(){var e,t,n,r,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,r=this.clone().startOf("day").valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return(this.year()-be(i[e].since).year())*n+i[e].offset;return this.year()}function SY(e){return bt(this,"_erasNameRegex")||uy.call(this),e?this._erasNameRegex:this._erasRegex}function xY(e){return bt(this,"_erasAbbrRegex")||uy.call(this),e?this._erasAbbrRegex:this._erasRegex}function wY(e){return bt(this,"_erasNarrowRegex")||uy.call(this),e?this._erasNarrowRegex:this._erasRegex}function cy(e,t){return t.erasAbbrRegex(e)}function _Y(e,t){return t.erasNameRegex(e)}function kY(e,t){return t.erasNarrowRegex(e)}function DY(e,t){return t._eraYearOrdinalRegex||ol}function uy(){var e=[],t=[],n=[],r=[],i,s,o=this.eras();for(i=0,s=o.length;i<s;++i)t.push(Mr(o[i].name)),e.push(Mr(o[i].abbr)),n.push(Mr(o[i].narrow)),r.push(Mr(o[i].name)),r.push(Mr(o[i].abbr)),r.push(Mr(o[i].narrow));this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}je(0,["gg",2],0,function(){return this.weekYear()%100}),je(0,["GG",2],0,function(){return this.isoWeekYear()%100});function op(e,t){je(0,[e,e.length],0,t)}op("gggg","weekYear"),op("ggggg","weekYear"),op("GGGG","isoWeekYear"),op("GGGGG","isoWeekYear"),zn("weekYear","gg"),zn("isoWeekYear","GG"),qn("weekYear",1),qn("isoWeekYear",1),Me("G",zf),Me("g",zf),Me("GG",zt,Cr),Me("gg",zt,Cr),Me("GGGG",qg,zg),Me("gggg",qg,zg),Me("GGGGG",Uf,Hf),Me("ggggg",Uf,Hf),Yc(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=it(e)}),Yc(["gg","GG"],function(e,t,n,r){t[r]=be.parseTwoDigitYear(e)});function CY(e){return __.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function MY(e){return __.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function TY(){return Es(this.year(),1,4)}function IY(){return Es(this.isoWeekYear(),1,4)}function EY(){var e=this.localeData()._week;return Es(this.year(),e.dow,e.doy)}function RY(){var e=this.localeData()._week;return Es(this.weekYear(),e.dow,e.doy)}function __(e,t,n,r,i){var s;return e==null?Zc(this,r,i).year:(s=Es(e,r,i),t>s&&(t=s),LY.call(this,e,t,n,r,i))}function LY(e,t,n,r,i){var s=e_(e,t,n,r,i),o=Hc(s.year,0,s.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}je("Q",0,"Qo","quarter"),zn("quarter","Q"),qn("quarter",7),Me("Q",W1),At("Q",function(e,t){t[Ts]=(it(e)-1)*3});function OY(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}je("D",["DD",2],"Do","date"),zn("date","D"),qn("date",9),Me("D",zt),Me("DD",zt,Cr),Me("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),At(["D","DD"],qi),At("Do",function(e,t){t[qi]=it(e.match(zt)[0])});var k_=sl("Date",!0);je("DDD",["DDDD",3],"DDDo","dayOfYear"),zn("dayOfYear","DDD"),qn("dayOfYear",4),Me("DDD",Zf),Me("DDDD",H1),At(["DDD","DDDD"],function(e,t,n){n._dayOfYear=it(e)});function BY(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}je("m",["mm",2],0,"minute"),zn("minute","m"),qn("minute",14),Me("m",zt),Me("mm",zt,Cr),At(["m","mm"],bi);var AY=sl("Minutes",!1);je("s",["ss",2],0,"second"),zn("second","s"),qn("second",15),Me("s",zt),Me("ss",zt,Cr),At(["s","ss"],Is);var PY=sl("Seconds",!1);je("S",0,0,function(){return~~(this.millisecond()/100)}),je(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),je(0,["SSS",3],0,"millisecond"),je(0,["SSSS",4],0,function(){return this.millisecond()*10}),je(0,["SSSSS",5],0,function(){return this.millisecond()*100}),je(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),je(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),je(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),je(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),zn("millisecond","ms"),qn("millisecond",16),Me("S",Zf,W1),Me("SS",Zf,Cr),Me("SSS",Zf,H1);var vo,D_;for(vo="SSSS";vo.length<=9;vo+="S")Me(vo,ol);function NY(e,t){t[ia]=it(("0."+e)*1e3)}for(vo="S";vo.length<=9;vo+="S")At(vo,NY);D_=sl("Milliseconds",!1),je("z",0,0,"zoneAbbr"),je("zz",0,0,"zoneName");function jY(){return this._isUTC?"UTC":""}function FY(){return this._isUTC?"Coordinated Universal Time":""}var ue=Gc.prototype;ue.add=R3,ue.calendar=j3,ue.clone=F3,ue.diff=Z3,ue.endOf=nY,ue.format=X3,ue.from=K3,ue.fromNow=Q3,ue.to=J3,ue.toNow=eY,ue.get=VV,ue.invalidAt=dY,ue.isAfter=G3,ue.isBefore=V3,ue.isBetween=$3,ue.isSame=Y3,ue.isSameOrAfter=W3,ue.isSameOrBefore=H3,ue.isValid=cY,ue.lang=v_,ue.locale=y_,ue.localeData=b_,ue.max=c3,ue.min=l3,ue.parsingFlags=uY,ue.set=$V,ue.startOf=tY,ue.subtract=L3,ue.toArray=oY,ue.toObject=aY,ue.toDate=sY,ue.toISOString=z3,ue.inspect=q3,typeof Symbol<"u"&&Symbol.for!=null&&(ue[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ue.toJSON=lY,ue.toString=U3,ue.unix=iY,ue.valueOf=rY,ue.creationData=fY,ue.eraName=gY,ue.eraNarrow=yY,ue.eraAbbr=vY,ue.eraYear=bY,ue.year=J1,ue.isLeapYear=a$,ue.weekYear=CY,ue.isoWeekYear=MY,ue.quarter=ue.quarters=OY,ue.month=K1,ue.daysInMonth=i$,ue.week=ue.weeks=p$,ue.isoWeek=ue.isoWeeks=h$,ue.weeksInYear=EY,ue.weeksInWeekYear=RY,ue.isoWeeksInYear=TY,ue.isoWeeksInISOWeekYear=IY,ue.date=k_,ue.day=ue.days=M$,ue.weekday=T$,ue.isoWeekday=I$,ue.dayOfYear=BY,ue.hour=ue.hours=P$,ue.minute=ue.minutes=AY,ue.second=ue.seconds=PY,ue.millisecond=ue.milliseconds=D_,ue.utcOffset=v3,ue.utc=S3,ue.local=x3,ue.parseZone=w3,ue.hasAlignedHourOffset=_3,ue.isDST=k3,ue.isLocal=C3,ue.isUtcOffset=M3,ue.isUtc=f_,ue.isUTC=f_,ue.zoneAbbr=jY,ue.zoneName=FY,ue.dates=Ur("dates accessor is deprecated. Use date instead.",k_),ue.months=Ur("months accessor is deprecated. Use month instead",K1),ue.years=Ur("years accessor is deprecated. Use year instead",J1),ue.zone=Ur("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",b3),ue.isDSTShifted=Ur("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",D3);function GY(e){return qt(e*1e3)}function VY(){return qt.apply(null,arguments).parseZone()}function C_(e){return e}var St=Yg.prototype;St.calendar=MV,St.longDateFormat=RV,St.invalidDate=OV,St.ordinal=PV,St.preparse=C_,St.postformat=C_,St.relativeTime=jV,St.pastFuture=FV,St.set=DV,St.eras=pY,St.erasParse=hY,St.erasConvertYear=mY,St.erasAbbrRegex=xY,St.erasNameRegex=SY,St.erasNarrowRegex=wY,St.months=e$,St.monthsShort=t$,St.monthsParse=r$,St.monthsRegex=o$,St.monthsShortRegex=s$,St.week=c$,St.firstDayOfYear=f$,St.firstDayOfWeek=d$,St.weekdays=w$,St.weekdaysMin=k$,St.weekdaysShort=_$,St.weekdaysParse=C$,St.weekdaysRegex=E$,St.weekdaysShortRegex=R$,St.weekdaysMinRegex=L$,St.isPM=B$,St.meridiem=N$;function ap(e,t,n,r){var i=Rs(),s=Zi().set(r,t);return i[n](s,e)}function M_(e,t,n){if(Ms(e)&&(t=e,e=void 0),e=e||"",t!=null)return ap(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=ap(e,r,n,"month");return i}function dy(e,t,n,r){typeof e=="boolean"?(Ms(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,Ms(t)&&(n=t,t=void 0),t=t||"");var i=Rs(),s=e?i._week.dow:0,o,a=[];if(n!=null)return ap(t,(n+s)%7,r,"day");for(o=0;o<7;o++)a[o]=ap(t,(o+s)%7,r,"day");return a}function $Y(e,t){return M_(e,t,"months")}function YY(e,t){return M_(e,t,"monthsShort")}function WY(e,t,n){return dy(e,t,n,"weekdays")}function HY(e,t,n){return dy(e,t,n,"weekdaysShort")}function ZY(e,t,n){return dy(e,t,n,"weekdaysMin")}yo("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=it(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}}),be.lang=Ur("moment.lang is deprecated. Use moment.locale instead.",yo),be.langData=Ur("moment.langData is deprecated. Use moment.localeData instead.",Rs);var Ls=Math.abs;function UY(){var e=this._data;return this._milliseconds=Ls(this._milliseconds),this._days=Ls(this._days),this._months=Ls(this._months),e.milliseconds=Ls(e.milliseconds),e.seconds=Ls(e.seconds),e.minutes=Ls(e.minutes),e.hours=Ls(e.hours),e.months=Ls(e.months),e.years=Ls(e.years),this}function T_(e,t,n,r){var i=Si(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function zY(e,t){return T_(this,e,t,1)}function qY(e,t){return T_(this,e,t,-1)}function I_(e){return e<0?Math.floor(e):Math.ceil(e)}function XY(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,o,a,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=I_(fy(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=qr(e/1e3),r.seconds=i%60,s=qr(i/60),r.minutes=s%60,o=qr(s/60),r.hours=o%24,t+=qr(o/24),l=qr(E_(t)),n+=l,t-=I_(fy(l)),a=qr(n/12),n%=12,r.days=t,r.months=n,r.years=a,this}function E_(e){return e*4800/146097}function fy(e){return e*146097/4800}function KY(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=zr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+E_(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(fy(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function QY(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+it(this._months/12)*31536e6:NaN}function Os(e){return function(){return this.as(e)}}var JY=Os("ms"),eW=Os("s"),tW=Os("m"),nW=Os("h"),rW=Os("d"),iW=Os("w"),sW=Os("M"),oW=Os("Q"),aW=Os("y");function lW(){return Si(this)}function cW(e){return e=zr(e),this.isValid()?this[e+"s"]():NaN}function oa(e){return function(){return this.isValid()?this._data[e]:NaN}}var uW=oa("milliseconds"),dW=oa("seconds"),fW=oa("minutes"),pW=oa("hours"),hW=oa("days"),mW=oa("months"),gW=oa("years");function yW(){return qr(this.days()/7)}var Bs=Math.round,ul={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function vW(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function bW(e,t,n,r){var i=Si(e).abs(),s=Bs(i.as("s")),o=Bs(i.as("m")),a=Bs(i.as("h")),l=Bs(i.as("d")),u=Bs(i.as("M")),d=Bs(i.as("w")),f=Bs(i.as("y")),p=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||o<=1&&["m"]||o<n.m&&["mm",o]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return n.w!=null&&(p=p||d<=1&&["w"]||d<n.w&&["ww",d]),p=p||u<=1&&["M"]||u<n.M&&["MM",u]||f<=1&&["y"]||["yy",f],p[2]=t,p[3]=+e>0,p[4]=r,vW.apply(null,p)}function SW(e){return e===void 0?Bs:typeof e=="function"?(Bs=e,!0):!1}function xW(e,t){return ul[e]===void 0?!1:t===void 0?ul[e]:(ul[e]=t,e==="s"&&(ul.ss=t-1),!0)}function wW(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ul,i,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},ul,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),s=bW(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var py=Math.abs;function dl(e){return(e>0)-(e<0)||+e}function lp(){if(!this.isValid())return this.localeData().invalidDate();var e=py(this._milliseconds)/1e3,t=py(this._days),n=py(this._months),r,i,s,o,a=this.asSeconds(),l,u,d,f;return a?(r=qr(e/60),i=qr(r/60),e%=60,r%=60,s=qr(n/12),n%=12,o=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",u=dl(this._months)!==dl(a)?"-":"",d=dl(this._days)!==dl(a)?"-":"",f=dl(this._milliseconds)!==dl(a)?"-":"",l+"P"+(s?u+s+"Y":"")+(n?u+n+"M":"")+(t?d+t+"D":"")+(i||r||e?"T":"")+(i?f+i+"H":"")+(r?f+r+"M":"")+(e?f+o+"S":"")):"P0D"}var ut=tp.prototype;ut.isValid=h3,ut.abs=UY,ut.add=zY,ut.subtract=qY,ut.as=KY,ut.asMilliseconds=JY,ut.asSeconds=eW,ut.asMinutes=tW,ut.asHours=nW,ut.asDays=rW,ut.asWeeks=iW,ut.asMonths=sW,ut.asQuarters=oW,ut.asYears=aW,ut.valueOf=QY,ut._bubble=XY,ut.clone=lW,ut.get=cW,ut.milliseconds=uW,ut.seconds=dW,ut.minutes=fW,ut.hours=pW,ut.days=hW,ut.weeks=yW,ut.months=mW,ut.years=gW,ut.humanize=wW,ut.toISOString=lp,ut.toString=lp,ut.toJSON=lp,ut.locale=y_,ut.localeData=b_,ut.toIsoString=Ur("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",lp),ut.lang=v_,je("X",0,0,"unix"),je("x",0,0,"valueOf"),Me("x",zf),Me("X",WV),At("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),At("x",function(e,t,n){n._d=new Date(it(e))});//! moment.js
|
99
|
+
be.version="2.29.4",_V(qt),be.fn=ue,be.min=u3,be.max=d3,be.now=f3,be.utc=Zi,be.unix=GY,be.months=$Y,be.isDate=Fc,be.locale=yo,be.invalid=Gf,be.duration=Si,be.isMoment=vi,be.weekdays=WY,be.parseZone=VY,be.localeData=Rs,be.isDuration=np,be.monthsShort=YY,be.weekdaysMin=ZY,be.defineLocale=ey,be.updateLocale=V$,be.locales=$$,be.weekdaysShort=HY,be.normalizeUnits=zr,be.relativeTimeRounding=SW,be.relativeTimeThreshold=xW,be.calendarFormat=N3,be.prototype=ue,be.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function jn(e,t=!1){return be(e).format(t?"LL LTS":"LLL")}function R_(e){return`${jn(e)} (${be(e).fromNow()})`}function cp(e){const t=new Date(e);return isNaN(t.getTime())?null:t}function fl({textFieldId:e,label:t,initialValue:n,onChange:r,required:i=!1,withPicker:s=!0}){const o=R(),[a,l]=x.useState(!1),[u,d]=x.useState(n?jn(n):""),f=o("DateTimeInput.ValidationError"),p=m=>{h(m===null?"":jn(m))},h=m=>{const y=cp(m);let b=!0,g=null;m===""?b=!i:sV(m)&&y!==null?g=y:b=!1,l(!b),d(m),r==null||r(g,b)};return c.jsx(D.FormField,{fieldType:"text",notificationText:a?f:void 0,notificationType:"error",children:c.jsx("div",{className:"soup-date-time-input",children:c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"soup-date-time-text",children:c.jsx(D.TextField,{id:e,label:t,value:u,onChange:m=>h(m.target.value)})}),s&&c.jsx("div",{className:"soup-date-time-input-picker",children:c.jsx(iN,{selected:cp(u),onChange:p,showTimeSelect:!0})})]})})})}var Xc=e=>e.type==="checkbox",aa=e=>e instanceof Date,ir=e=>e==null;const L_=e=>typeof e=="object";var yn=e=>!ir(e)&&!Array.isArray(e)&&L_(e)&&!aa(e),O_=e=>yn(e)&&e.target?Xc(e.target)?e.target.checked:e.target.value:e,_W=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,B_=(e,t)=>e.has(_W(t)),kW=e=>{const t=e.constructor&&e.constructor.prototype;return yn(t)&&t.hasOwnProperty("isPrototypeOf")},hy=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Fn(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(hy&&(e instanceof Blob||r))&&(n||yn(e)))if(t=n?[]:{},!n&&!kW(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=Fn(e[i]));else return e;return t}var up=e=>/^\w*$/.test(e),vn=e=>e===void 0,my=e=>Array.isArray(e)?e.filter(Boolean):[],gy=e=>my(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Se=(e,t,n)=>{if(!t||!yn(e))return n;const r=(up(t)?[t]:gy(t)).reduce((i,s)=>ir(i)?i:i[s],e);return vn(r)||r===e?vn(e[t])?n:e[t]:r},Tr=e=>typeof e=="boolean",Gt=(e,t,n)=>{let r=-1;const i=up(t)?[t]:gy(t),s=i.length,o=s-1;for(;++r<s;){const a=i[r];let l=n;if(r!==o){const u=e[a];l=yn(u)||Array.isArray(u)?u:isNaN(+i[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=l,e=e[a]}};const dp={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},xi={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},As={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},A_=x.createContext(null);A_.displayName="HookFormContext";const yy=()=>x.useContext(A_);var P_=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(i,s,{get:()=>{const o=s;return t._proxyFormState[o]!==xi.all&&(t._proxyFormState[o]=!r||xi.all),n&&(n[o]=!0),e[o]}});return i};const vy=typeof window<"u"?le.useLayoutEffect:le.useEffect;function DW(e){const t=yy(),{control:n=t.control,disabled:r,name:i,exact:s}=e||{},[o,a]=x.useState(n._formState),l=x.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return vy(()=>n._subscribe({name:i,formState:l.current,exact:s,callback:u=>{!r&&a({...n._formState,...u})}}),[i,r,s]),x.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),x.useMemo(()=>P_(o,n,l.current,!1),[o,n])}var Xi=e=>typeof e=="string",N_=(e,t,n,r,i)=>Xi(e)?(r&&t.watch.add(e),Se(n,e,i)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),Se(n,s))):(r&&(t.watchAll=!0),n);function CW(e){const t=yy(),{control:n=t.control,name:r,defaultValue:i,disabled:s,exact:o}=e||{},a=x.useRef(i),[l,u]=x.useState(n._getWatch(r,a.current));return vy(()=>n._subscribe({name:r,formState:{values:!0},exact:o,callback:d=>!s&&u(N_(r,n._names,d.values||n._formValues,!1,a.current))}),[r,n,s,o]),x.useEffect(()=>n._removeUnmounted()),l}function MW(e){const t=yy(),{name:n,disabled:r,control:i=t.control,shouldUnregister:s}=e,o=B_(i._names.array,n),a=CW({control:i,name:n,defaultValue:Se(i._formValues,n,Se(i._defaultValues,n,e.defaultValue)),exact:!0}),l=DW({control:i,name:n,exact:!0}),u=x.useRef(e),d=x.useRef(i.register(n,{...e.rules,value:a,...Tr(e.disabled)?{disabled:e.disabled}:{}})),f=x.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Se(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!Se(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Se(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Se(l.validatingFields,n)},error:{enumerable:!0,get:()=>Se(l.errors,n)}}),[l,n]),p=x.useCallback(b=>d.current.onChange({target:{value:O_(b),name:n},type:dp.CHANGE}),[n]),h=x.useCallback(()=>d.current.onBlur({target:{value:Se(i._formValues,n),name:n},type:dp.BLUR}),[n,i._formValues]),m=x.useCallback(b=>{const g=Se(i._fields,n);g&&b&&(g._f.ref={focus:()=>b.focus&&b.focus(),select:()=>b.select&&b.select(),setCustomValidity:v=>b.setCustomValidity(v),reportValidity:()=>b.reportValidity()})},[i._fields,n]),y=x.useMemo(()=>({name:n,value:a,...Tr(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:p,onBlur:h,ref:m}),[n,r,l.disabled,p,h,m,a]);return x.useEffect(()=>{const b=i._options.shouldUnregister||s;i.register(n,{...u.current.rules,...Tr(u.current.disabled)?{disabled:u.current.disabled}:{}});const g=(v,S)=>{const w=Se(i._fields,v);w&&w._f&&(w._f.mount=S)};if(g(n,!0),b){const v=Fn(Se(i._options.defaultValues,n));Gt(i._defaultValues,n,v),vn(Se(i._formValues,n))&&Gt(i._formValues,n,v)}return!o&&i.register(n),()=>{(o?b&&!i._state.action:b)?i.unregister(n):g(n,!1)}},[n,i,o,s]),x.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),x.useMemo(()=>({field:y,formState:l,fieldState:f}),[y,l,f])}const TW=e=>e.render(MW(e));var IW=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},Kc=e=>Array.isArray(e)?e:[e],j_=()=>{let e=[];return{get observers(){return e},next:i=>{for(const s of e)s.next&&s.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(s=>s!==i)}}),unsubscribe:()=>{e=[]}}},by=e=>ir(e)||!L_(e);function bo(e,t){if(by(e)||by(t))return e===t;if(aa(e)&&aa(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const s=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const o=t[i];if(aa(s)&&aa(o)||yn(s)&&yn(o)||Array.isArray(s)&&Array.isArray(o)?!bo(s,o):s!==o)return!1}}return!0}var hr=e=>yn(e)&&!Object.keys(e).length,Sy=e=>e.type==="file",wi=e=>typeof e=="function",fp=e=>{if(!hy)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},F_=e=>e.type==="select-multiple",xy=e=>e.type==="radio",EW=e=>xy(e)||Xc(e),wy=e=>fp(e)&&e.isConnected;function RW(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=vn(e)?r++:e[t[r++]];return e}function LW(e){for(const t in e)if(e.hasOwnProperty(t)&&!vn(e[t]))return!1;return!0}function Rn(e,t){const n=Array.isArray(t)?t:up(t)?[t]:gy(t),r=n.length===1?e:RW(e,n),i=n.length-1,s=n[i];return r&&delete r[s],i!==0&&(yn(r)&&hr(r)||Array.isArray(r)&&LW(r))&&Rn(e,n.slice(0,-1)),e}var G_=e=>{for(const t in e)if(wi(e[t]))return!0;return!1};function pp(e,t={}){const n=Array.isArray(e);if(yn(e)||n)for(const r in e)Array.isArray(e[r])||yn(e[r])&&!G_(e[r])?(t[r]=Array.isArray(e[r])?[]:{},pp(e[r],t[r])):ir(e[r])||(t[r]=!0);return t}function V_(e,t,n){const r=Array.isArray(e);if(yn(e)||r)for(const i in e)Array.isArray(e[i])||yn(e[i])&&!G_(e[i])?vn(t)||by(n[i])?n[i]=Array.isArray(e[i])?pp(e[i],[]):{...pp(e[i])}:V_(e[i],ir(t)?{}:t[i],n[i]):n[i]=!bo(e[i],t[i]);return n}var Qc=(e,t)=>V_(e,t,pp(t));const $_={value:!1,isValid:!1},Y_={value:!0,isValid:!0};var W_=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!vn(e[0].attributes.value)?vn(e[0].value)||e[0].value===""?Y_:{value:e[0].value,isValid:!0}:Y_:$_}return $_},H_=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>vn(e)?e:t?e===""?NaN:e&&+e:n&&Xi(e)?new Date(e):r?r(e):e;const Z_={isValid:!1,value:null};var U_=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Z_):Z_;function z_(e){const t=e.ref;return Sy(t)?t.files:xy(t)?U_(e.refs).value:F_(t)?[...t.selectedOptions].map(({value:n})=>n):Xc(t)?W_(e.refs).value:H_(vn(t.value)?e.ref.value:t.value,e)}var OW=(e,t,n,r)=>{const i={};for(const s of e){const o=Se(t,s);o&&Gt(i,s,o._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},hp=e=>e instanceof RegExp,Jc=e=>vn(e)?e:hp(e)?e.source:yn(e)?hp(e.value)?e.value.source:e.value:e,q_=e=>({isOnSubmit:!e||e===xi.onSubmit,isOnBlur:e===xi.onBlur,isOnChange:e===xi.onChange,isOnAll:e===xi.all,isOnTouch:e===xi.onTouched});const X_="AsyncFunction";var BW=e=>!!e&&!!e.validate&&!!(wi(e.validate)&&e.validate.constructor.name===X_||yn(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===X_)),AW=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),K_=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const eu=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const s=Se(e,i);if(s){const{_f:o,...a}=s;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if(eu(a,t))break}else if(yn(a)&&eu(a,t))break}}};function Q_(e,t,n){const r=Se(e,n);if(r||up(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const s=i.join("."),o=Se(t,s),a=Se(e,s);if(o&&!Array.isArray(o)&&n!==s)return{name:n};if(a&&a.type)return{name:s,error:a};if(a&&a.root&&a.root.type)return{name:`${s}.root`,error:a.root};i.pop()}return{name:n}}var PW=(e,t,n,r)=>{n(e);const{name:i,...s}=e;return hr(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(o=>t[o]===(!r||xi.all))},NW=(e,t,n)=>!e||!t||e===t||Kc(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),jW=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,FW=(e,t)=>!my(Se(e,t)).length&&Rn(e,t),GW=(e,t,n)=>{const r=Kc(Se(e,n));return Gt(r,"root",t[n]),Gt(e,n,r),e},mp=e=>Xi(e);function J_(e,t,n="validate"){if(mp(e)||Array.isArray(e)&&e.every(mp)||Tr(e)&&!e)return{type:n,message:mp(e)?e:"",ref:t}}var pl=e=>yn(e)&&!hp(e)?e:{value:e,message:""},ek=async(e,t,n,r,i,s)=>{const{ref:o,refs:a,required:l,maxLength:u,minLength:d,min:f,max:p,pattern:h,validate:m,name:y,valueAsNumber:b,mount:g}=e._f,v=Se(n,y);if(!g||t.has(y))return{};const S=a?a[0]:o,w=A=>{i&&S.reportValidity&&(S.setCustomValidity(Tr(A)?"":A||""),S.reportValidity())},_={},T=xy(o),M=Xc(o),C=T||M,k=(b||Sy(o))&&vn(o.value)&&vn(v)||fp(o)&&o.value===""||v===""||Array.isArray(v)&&!v.length,I=IW.bind(null,y,r,_),O=(A,L,V,Y=As.maxLength,N=As.minLength)=>{const j=A?L:V;_[y]={type:A?Y:N,message:j,ref:o,...I(A?Y:N,j)}};if(s?!Array.isArray(v)||!v.length:l&&(!C&&(k||ir(v))||Tr(v)&&!v||M&&!W_(a).isValid||T&&!U_(a).isValid)){const{value:A,message:L}=mp(l)?{value:!!l,message:l}:pl(l);if(A&&(_[y]={type:As.required,message:L,ref:S,...I(As.required,L)},!r))return w(L),_}if(!k&&(!ir(f)||!ir(p))){let A,L;const V=pl(p),Y=pl(f);if(!ir(v)&&!isNaN(v)){const N=o.valueAsNumber||v&&+v;ir(V.value)||(A=N>V.value),ir(Y.value)||(L=N<Y.value)}else{const N=o.valueAsDate||new Date(v),j=W=>new Date(new Date().toDateString()+" "+W),G=o.type=="time",Z=o.type=="week";Xi(V.value)&&v&&(A=G?j(v)>j(V.value):Z?v>V.value:N>new Date(V.value)),Xi(Y.value)&&v&&(L=G?j(v)<j(Y.value):Z?v<Y.value:N<new Date(Y.value))}if((A||L)&&(O(!!A,V.message,Y.message,As.max,As.min),!r))return w(_[y].message),_}if((u||d)&&!k&&(Xi(v)||s&&Array.isArray(v))){const A=pl(u),L=pl(d),V=!ir(A.value)&&v.length>+A.value,Y=!ir(L.value)&&v.length<+L.value;if((V||Y)&&(O(V,A.message,L.message),!r))return w(_[y].message),_}if(h&&!k&&Xi(v)){const{value:A,message:L}=pl(h);if(hp(A)&&!v.match(A)&&(_[y]={type:As.pattern,message:L,ref:o,...I(As.pattern,L)},!r))return w(L),_}if(m){if(wi(m)){const A=await m(v,n),L=J_(A,S);if(L&&(_[y]={...L,...I(As.validate,L.message)},!r))return w(L.message),_}else if(yn(m)){let A={};for(const L in m){if(!hr(A)&&!r)break;const V=J_(await m[L](v,n),S,L);V&&(A={...V,...I(L,V.message)},w(V.message),r&&(_[y]=A))}if(!hr(A)&&(_[y]={ref:S,...A},!r))return _}}return w(!0),_};const VW={mode:xi.onSubmit,reValidateMode:xi.onChange,shouldFocusError:!0};function $W(e={}){let t={...VW,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:wi(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const r={};let i=yn(t.defaultValues)||yn(t.values)?Fn(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:Fn(i),o={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...d};const p={array:j_(),state:j_()},h=t.criteriaMode===xi.all,m=E=>F=>{clearTimeout(u),u=setTimeout(E,F)},y=async E=>{if(!t.disabled&&(d.isValid||f.isValid||E)){const F=t.resolver?hr((await M()).errors):await k(r,!0);F!==n.isValid&&p.state.next({isValid:F})}},b=(E,F)=>{!t.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((E||Array.from(a.mount)).forEach($=>{$&&(F?Gt(n.validatingFields,$,F):Rn(n.validatingFields,$))}),p.state.next({validatingFields:n.validatingFields,isValidating:!hr(n.validatingFields)}))},g=(E,F=[],$,ee,te=!0,U=!0)=>{if(ee&&$&&!t.disabled){if(o.action=!0,U&&Array.isArray(Se(r,E))){const ke=$(Se(r,E),ee.argA,ee.argB);te&&Gt(r,E,ke)}if(U&&Array.isArray(Se(n.errors,E))){const ke=$(Se(n.errors,E),ee.argA,ee.argB);te&&Gt(n.errors,E,ke),FW(n.errors,E)}if((d.touchedFields||f.touchedFields)&&U&&Array.isArray(Se(n.touchedFields,E))){const ke=$(Se(n.touchedFields,E),ee.argA,ee.argB);te&&Gt(n.touchedFields,E,ke)}(d.dirtyFields||f.dirtyFields)&&(n.dirtyFields=Qc(i,s)),p.state.next({name:E,isDirty:O(E,F),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Gt(s,E,F)},v=(E,F)=>{Gt(n.errors,E,F),p.state.next({errors:n.errors})},S=E=>{n.errors=E,p.state.next({errors:n.errors,isValid:!1})},w=(E,F,$,ee)=>{const te=Se(r,E);if(te){const U=Se(s,E,vn($)?Se(i,E):$);vn(U)||ee&&ee.defaultChecked||F?Gt(s,E,F?U:z_(te._f)):V(E,U),o.mount&&y()}},_=(E,F,$,ee,te)=>{let U=!1,ke=!1;const Ue={name:E};if(!t.disabled){if(!$||ee){(d.isDirty||f.isDirty)&&(ke=n.isDirty,n.isDirty=Ue.isDirty=O(),U=ke!==Ue.isDirty);const ze=bo(Se(i,E),F);ke=!!Se(n.dirtyFields,E),ze?Rn(n.dirtyFields,E):Gt(n.dirtyFields,E,!0),Ue.dirtyFields=n.dirtyFields,U=U||(d.dirtyFields||f.dirtyFields)&&ke!==!ze}if($){const ze=Se(n.touchedFields,E);ze||(Gt(n.touchedFields,E,$),Ue.touchedFields=n.touchedFields,U=U||(d.touchedFields||f.touchedFields)&&ze!==$)}U&&te&&p.state.next(Ue)}return U?Ue:{}},T=(E,F,$,ee)=>{const te=Se(n.errors,E),U=(d.isValid||f.isValid)&&Tr(F)&&n.isValid!==F;if(t.delayError&&$?(l=m(()=>v(E,$)),l(t.delayError)):(clearTimeout(u),l=null,$?Gt(n.errors,E,$):Rn(n.errors,E)),($?!bo(te,$):te)||!hr(ee)||U){const ke={...ee,...U&&Tr(F)?{isValid:F}:{},errors:n.errors,name:E};n={...n,...ke},p.state.next(ke)}},M=async E=>{b(E,!0);const F=await t.resolver(s,t.context,OW(E||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return b(E),F},C=async E=>{const{errors:F}=await M(E);if(E)for(const $ of E){const ee=Se(F,$);ee?Gt(n.errors,$,ee):Rn(n.errors,$)}else n.errors=F;return F},k=async(E,F,$={valid:!0})=>{for(const ee in E){const te=E[ee];if(te){const{_f:U,...ke}=te;if(U){const Ue=a.array.has(U.name),ze=te._f&&BW(te._f);ze&&d.validatingFields&&b([ee],!0);const fn=await ek(te,a.disabled,s,h,t.shouldUseNativeValidation&&!F,Ue);if(ze&&d.validatingFields&&b([ee]),fn[U.name]&&($.valid=!1,F))break;!F&&(Se(fn,U.name)?Ue?GW(n.errors,fn,U.name):Gt(n.errors,U.name,fn[U.name]):Rn(n.errors,U.name))}!hr(ke)&&await k(ke,F,$)}}return $.valid},I=()=>{for(const E of a.unMount){const F=Se(r,E);F&&(F._f.refs?F._f.refs.every($=>!wy($)):!wy(F._f.ref))&&oe(E)}a.unMount=new Set},O=(E,F)=>!t.disabled&&(E&&F&&Gt(s,E,F),!bo(W(),i)),A=(E,F,$)=>N_(E,a,{...o.mount?s:vn(F)?i:Xi(E)?{[E]:F}:F},$,F),L=E=>my(Se(o.mount?s:i,E,t.shouldUnregister?Se(i,E,[]):[])),V=(E,F,$={})=>{const ee=Se(r,E);let te=F;if(ee){const U=ee._f;U&&(!U.disabled&&Gt(s,E,H_(F,U)),te=fp(U.ref)&&ir(F)?"":F,F_(U.ref)?[...U.ref.options].forEach(ke=>ke.selected=te.includes(ke.value)):U.refs?Xc(U.ref)?U.refs.forEach(ke=>{(!ke.defaultChecked||!ke.disabled)&&(Array.isArray(te)?ke.checked=!!te.find(Ue=>Ue===ke.value):ke.checked=te===ke.value||!!te)}):U.refs.forEach(ke=>ke.checked=ke.value===te):Sy(U.ref)?U.ref.value="":(U.ref.value=te,U.ref.type||p.state.next({name:E,values:Fn(s)})))}($.shouldDirty||$.shouldTouch)&&_(E,te,$.shouldTouch,$.shouldDirty,!0),$.shouldValidate&&Z(E)},Y=(E,F,$)=>{for(const ee in F){if(!F.hasOwnProperty(ee))return;const te=F[ee],U=E+"."+ee,ke=Se(r,U);(a.array.has(E)||yn(te)||ke&&!ke._f)&&!aa(te)?Y(U,te,$):V(U,te,$)}},N=(E,F,$={})=>{const ee=Se(r,E),te=a.array.has(E),U=Fn(F);Gt(s,E,U),te?(p.array.next({name:E,values:Fn(s)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&$.shouldDirty&&p.state.next({name:E,dirtyFields:Qc(i,s),isDirty:O(E,U)})):ee&&!ee._f&&!ir(U)?Y(E,U,$):V(E,U,$),K_(E,a)&&p.state.next({...n}),p.state.next({name:o.mount?E:void 0,values:Fn(s)})},j=async E=>{o.mount=!0;const F=E.target;let $=F.name,ee=!0;const te=Se(r,$),U=ze=>{ee=Number.isNaN(ze)||aa(ze)&&isNaN(ze.getTime())||bo(ze,Se(s,$,ze))},ke=q_(t.mode),Ue=q_(t.reValidateMode);if(te){let ze,fn;const Yn=F.type?z_(te._f):O_(E),On=E.type===dp.BLUR||E.type===dp.FOCUS_OUT,Or=!AW(te._f)&&!t.resolver&&!Se(n.errors,$)&&!te._f.deps||jW(On,Se(n.touchedFields,$),n.isSubmitted,Ue,ke),xr=K_($,a,On);Gt(s,$,Yn),On?(te._f.onBlur&&te._f.onBlur(E),l&&l(0)):te._f.onChange&&te._f.onChange(E);const ss=_($,Yn,On),qs=!hr(ss)||xr;if(!On&&p.state.next({name:$,type:E.type,values:Fn(s)}),Or)return(d.isValid||f.isValid)&&(t.mode==="onBlur"?On&&y():On||y()),qs&&p.state.next({name:$,...xr?{}:ss});if(!On&&xr&&p.state.next({...n}),t.resolver){const{errors:Xs}=await M([$]);if(U(Yn),ee){const os=Q_(n.errors,r,$),Ks=Q_(Xs,r,os.name||$);ze=Ks.error,$=Ks.name,fn=hr(Xs)}}else b([$],!0),ze=(await ek(te,a.disabled,s,h,t.shouldUseNativeValidation))[$],b([$]),U(Yn),ee&&(ze?fn=!1:(d.isValid||f.isValid)&&(fn=await k(r,!0)));ee&&(te._f.deps&&Z(te._f.deps),T($,fn,ze,ss))}},G=(E,F)=>{if(Se(n.errors,F)&&E.focus)return E.focus(),1},Z=async(E,F={})=>{let $,ee;const te=Kc(E);if(t.resolver){const U=await C(vn(E)?E:te);$=hr(U),ee=E?!te.some(ke=>Se(U,ke)):$}else E?(ee=(await Promise.all(te.map(async U=>{const ke=Se(r,U);return await k(ke&&ke._f?{[U]:ke}:ke)}))).every(Boolean),!(!ee&&!n.isValid)&&y()):ee=$=await k(r);return p.state.next({...!Xi(E)||(d.isValid||f.isValid)&&$!==n.isValid?{}:{name:E},...t.resolver||!E?{isValid:$}:{},errors:n.errors}),F.shouldFocus&&!ee&&eu(r,G,E?te:a.mount),ee},W=E=>{const F={...o.mount?s:i};return vn(E)?F:Xi(E)?Se(F,E):E.map($=>Se(F,$))},re=(E,F)=>({invalid:!!Se((F||n).errors,E),isDirty:!!Se((F||n).dirtyFields,E),error:Se((F||n).errors,E),isValidating:!!Se(n.validatingFields,E),isTouched:!!Se((F||n).touchedFields,E)}),fe=E=>{E&&Kc(E).forEach(F=>Rn(n.errors,F)),p.state.next({errors:E?n.errors:{}})},de=(E,F,$)=>{const ee=(Se(r,E,{_f:{}})._f||{}).ref,te=Se(n.errors,E)||{},{ref:U,message:ke,type:Ue,...ze}=te;Gt(n.errors,E,{...ze,...F,ref:ee}),p.state.next({name:E,errors:n.errors,isValid:!1}),$&&$.shouldFocus&&ee&&ee.focus&&ee.focus()},H=(E,F)=>wi(E)?p.state.subscribe({next:$=>E(A(void 0,F),$)}):A(E,F,!0),Ge=E=>p.state.subscribe({next:F=>{NW(E.name,F.name,E.exact)&&PW(F,E.formState||d,lt,E.reRenderRoot)&&E.callback({values:{...s},...n,...F})}}).unsubscribe,Le=E=>(o.mount=!0,f={...f,...E.formState},Ge({...E,formState:f})),oe=(E,F={})=>{for(const $ of E?Kc(E):a.mount)a.mount.delete($),a.array.delete($),F.keepValue||(Rn(r,$),Rn(s,$)),!F.keepError&&Rn(n.errors,$),!F.keepDirty&&Rn(n.dirtyFields,$),!F.keepTouched&&Rn(n.touchedFields,$),!F.keepIsValidating&&Rn(n.validatingFields,$),!t.shouldUnregister&&!F.keepDefaultValue&&Rn(i,$);p.state.next({values:Fn(s)}),p.state.next({...n,...F.keepDirty?{isDirty:O()}:{}}),!F.keepIsValid&&y()},K=({disabled:E,name:F})=>{(Tr(E)&&o.mount||E||a.disabled.has(F))&&(E?a.disabled.add(F):a.disabled.delete(F))},Ve=(E,F={})=>{let $=Se(r,E);const ee=Tr(F.disabled)||Tr(t.disabled);return Gt(r,E,{...$||{},_f:{...$&&$._f?$._f:{ref:{name:E}},name:E,mount:!0,...F}}),a.mount.add(E),$?K({disabled:Tr(F.disabled)?F.disabled:t.disabled,name:E}):w(E,!0,F.value),{...ee?{disabled:F.disabled||t.disabled}:{},...t.progressive?{required:!!F.required,min:Jc(F.min),max:Jc(F.max),minLength:Jc(F.minLength),maxLength:Jc(F.maxLength),pattern:Jc(F.pattern)}:{},name:E,onChange:j,onBlur:j,ref:te=>{if(te){Ve(E,F),$=Se(r,E);const U=vn(te.value)&&te.querySelectorAll&&te.querySelectorAll("input,select,textarea")[0]||te,ke=EW(U),Ue=$._f.refs||[];if(ke?Ue.find(ze=>ze===U):U===$._f.ref)return;Gt(r,E,{_f:{...$._f,...ke?{refs:[...Ue.filter(wy),U,...Array.isArray(Se(i,E))?[{}]:[]],ref:{type:U.type,name:E}}:{ref:U}}}),w(E,!1,void 0,U)}else $=Se(r,E,{}),$._f&&($._f.mount=!1),(t.shouldUnregister||F.shouldUnregister)&&!(B_(a.array,E)&&o.action)&&a.unMount.add(E)}}},Ze=()=>t.shouldFocusError&&eu(r,G,a.mount),$t=E=>{Tr(E)&&(p.state.next({disabled:E}),eu(r,(F,$)=>{const ee=Se(r,$);ee&&(F.disabled=ee._f.disabled||E,Array.isArray(ee._f.refs)&&ee._f.refs.forEach(te=>{te.disabled=ee._f.disabled||E}))},0,!1))},ge=(E,F)=>async $=>{let ee;$&&($.preventDefault&&$.preventDefault(),$.persist&&$.persist());let te=Fn(s);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:U,values:ke}=await M();n.errors=U,te=ke}else await k(r);if(a.disabled.size)for(const U of a.disabled)Gt(te,U,void 0);if(Rn(n.errors,"root"),hr(n.errors)){p.state.next({errors:{}});try{await E(te,$)}catch(U){ee=U}}else F&&await F({...n.errors},$),Ze(),setTimeout(Ze);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:hr(n.errors)&&!ee,submitCount:n.submitCount+1,errors:n.errors}),ee)throw ee},Ee=(E,F={})=>{Se(r,E)&&(vn(F.defaultValue)?N(E,Fn(Se(i,E))):(N(E,F.defaultValue),Gt(i,E,Fn(F.defaultValue))),F.keepTouched||Rn(n.touchedFields,E),F.keepDirty||(Rn(n.dirtyFields,E),n.isDirty=F.defaultValue?O(E,Fn(Se(i,E))):O()),F.keepError||(Rn(n.errors,E),d.isValid&&y()),p.state.next({...n}))},_e=(E,F={})=>{const $=E?Fn(E):i,ee=Fn($),te=hr(E),U=te?i:ee;if(F.keepDefaultValues||(i=$),!F.keepValues){if(F.keepDirtyValues){const ke=new Set([...a.mount,...Object.keys(Qc(i,s))]);for(const Ue of Array.from(ke))Se(n.dirtyFields,Ue)?Gt(U,Ue,Se(s,Ue)):N(Ue,Se(U,Ue))}else{if(hy&&vn(E))for(const ke of a.mount){const Ue=Se(r,ke);if(Ue&&Ue._f){const ze=Array.isArray(Ue._f.refs)?Ue._f.refs[0]:Ue._f.ref;if(fp(ze)){const fn=ze.closest("form");if(fn){fn.reset();break}}}}for(const ke of a.mount)N(ke,Se(U,ke))}s=Fn(U),p.array.next({values:{...U}}),p.state.next({values:{...U}})}a={mount:F.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!F.keepIsValid||!!F.keepDirtyValues,o.watch=!!t.shouldUnregister,p.state.next({submitCount:F.keepSubmitCount?n.submitCount:0,isDirty:te?!1:F.keepDirty?n.isDirty:!!(F.keepDefaultValues&&!bo(E,i)),isSubmitted:F.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:te?{}:F.keepDirtyValues?F.keepDefaultValues&&s?Qc(i,s):n.dirtyFields:F.keepDefaultValues&&E?Qc(i,E):F.keepDirty?n.dirtyFields:{},touchedFields:F.keepTouched?n.touchedFields:{},errors:F.keepErrors?n.errors:{},isSubmitSuccessful:F.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Ye=(E,F)=>_e(wi(E)?E(s):E,F),rt=(E,F={})=>{const $=Se(r,E),ee=$&&$._f;if(ee){const te=ee.refs?ee.refs[0]:ee.ref;te.focus&&(te.focus(),F.shouldSelect&&wi(te.select)&&te.select())}},lt=E=>{n={...n,...E}},We={control:{register:Ve,unregister:oe,getFieldState:re,handleSubmit:ge,setError:de,_subscribe:Ge,_runSchema:M,_focusError:Ze,_getWatch:A,_getDirty:O,_setValid:y,_setFieldArray:g,_setDisabledField:K,_setErrors:S,_getFieldArray:L,_reset:_e,_resetDefaultValues:()=>wi(t.defaultValues)&&t.defaultValues().then(E=>{Ye(E,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:I,_disableForm:$t,_subjects:p,_proxyFormState:d,get _fields(){return r},get _formValues(){return s},get _state(){return o},set _state(E){o=E},get _defaultValues(){return i},get _names(){return a},set _names(E){a=E},get _formState(){return n},get _options(){return t},set _options(E){t={...t,...E}}},subscribe:Le,trigger:Z,register:Ve,handleSubmit:ge,watch:H,setValue:N,getValues:W,reset:Ye,resetField:Ee,clearErrors:fe,unregister:oe,setError:de,setFocus:rt,getFieldState:re};return{...We,formControl:We}}function sr(e={}){const t=x.useRef(void 0),n=x.useRef(void 0),[r,i]=x.useState({isDirty:!1,isValidating:!1,isLoading:wi(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:wi(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!wi(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...a}=$W(e);t.current={...a,formState:r}}const s=t.current.control;return s._options=e,vy(()=>{const o=s._subscribe({formState:s._proxyFormState,callback:()=>i({...s._formState}),reRenderRoot:!0});return i(a=>({...a,isReady:!0})),s._formState.isReady=!0,o},[s]),x.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),x.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),x.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),x.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),x.useEffect(()=>{if(s._proxyFormState.isDirty){const o=s._getDirty();o!==r.isDirty&&s._subjects.state.next({isDirty:o})}},[s,r.isDirty]),x.useEffect(()=>{e.values&&!bo(e.values,n.current)?(s._reset(e.values,s._options.resetOptions),n.current=e.values,i(o=>({...o}))):s._resetDefaultValues()},[s,e.values]),x.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=P_(r,s),t.current}function Kn(e,t){const n=h=>[...(t==null?void 0:t(h))??[],e],r=h=>[...n(h),"list"];return{all:n,list:r,listSorted:(h,m)=>[...r(m),h],listFiltered:(h,m)=>[...r(m),h],listFilteredWithSorting:(h,m,y)=>[...r(y),h,m],entityDetails:(h,m)=>[...n(m),"details",h],addEntity:h=>[...n(h),"add"],updateEntity:h=>[...n(h),"update"],cloneEntity:h=>[...n(h),"clone"],deleteEntity:h=>[...n(h),"delete"],deleteEntities:h=>[...n(h),"bulkDelete"]}}function YW(e,t){const n=Kn(e,t);return{...n,updateEntity:(s,o)=>[...n.updateEntity(o),s],deleteEntity:(s,o)=>[...n.deleteEntity(o),s]}}function tu(e){const t=i=>[...e(i),"metadata"];return{metadataList:i=>[...t(i),"list"],metadataModify:i=>[...t(i),"modify"]}}const So={...Kn("recipes")},WW={...tu(({recipeId:e})=>So.entityDetails(e))},Pe={...So,...WW,setState:e=>[...So.entityDetails(e),"setState"],tagList:e=>[...So.entityDetails(e),"tags","list"],compatibleDistributionSetTypeList:()=>["compatibleDistributionSetTypes","list"],systemDistributionSetList:()=>["systemDistributionSets","list"],validationReport:e=>[...So.entityDetails(e),"validationReport"]},_y={...Kn("signatures",({recipeId:e})=>So.entityDetails(e))},tk={...Kn("systemDistributionSets",({recipeId:e})=>So.entityDetails(e))},HW={...tu(({id:e,recipeId:t})=>tk.entityDetails(e,{recipeId:t}))},_i={...tk,...HW},ky={...Kn("moduleUpdateDefinitions",({recipeId:e})=>So.entityDetails(e))},ZW={...tu(({id:e,recipeId:t})=>ky.entityDetails(e,{recipeId:t}))},Xr={...ky,...ZW,move:e=>[...ky.all({recipeId:e}),"move"]};function hl(e,t){const n=new URLSearchParams;return Jl(n,e.search),eo(n,t),nr(n,"tag[]",e.tagId),nr(n,"type[]",e.typeId),nr(n,"state[]",e.state),Ht(Pe.listFilteredWithSorting(e,t??null),"recipes","recipe",{queryParams:n})}function ml(e){const{onSearch:t}=e,{totalCount:n,entities:r}=Tt(e.pageCaller.data),i=r.map(l=>({value:l.id,displayValue:e.getName(l)})),[s,o]=x.useState(""),a=D.useDebounce(s,500);return x.useEffect(()=>{t(a)},[t,a]),c.jsx(D.FormField,{fieldType:"dropdown",children:c.jsx(TW,{control:e.useFormReturn.control,name:e.fieldName,render:({field:{onChange:l,value:u}})=>c.jsx(na,{labels:{fieldName:e.label},options:i,selected:e.pageCaller.isInitialLoading?[]:u,onChange:d=>l(d.map(f=>f.value)),paginationOptions:{onSearch:o,onLoadMore:()=>{e.pageCaller.fetchNextPage()},total:n},loading:e.pageCaller.isLoading})})})}const UW=new Map([["ERROR","Systems.UpdateStatus.Error"],["IN_SYNC","Systems.UpdateStatus.InSync"],["REGISTERED","Systems.UpdateStatus.Registered"],["PENDING","Systems.UpdateStatus.Pending"]]);function zW(e){const{onClose:t}=e,n=R(),{systemsFilter:r,mergeSystemsFilter:i}=Ff(),s=sr({defaultValues:{installedRecipeId:r.installedRecipeId??[],assignedRecipeId:r.assignedRecipeId??[],matchingRecipeId:r.matchingRecipeId??[],matchingRcRecipeId:r.matchingRcRecipeId??[],updateStatus:r.updateStatus??[],isOutdated:gp(r.isOutdated),initialSystemReportTimeGreaterThan:r.initialSystemReportTimeGreaterThan??null,initialSystemReportTimeLessThan:r.initialSystemReportTimeLessThan??null,lastSystemReportTimeGreaterThan:r.lastSystemReportTimeGreaterThan??null,lastSystemReportTimeLessThan:r.lastSystemReportTimeLessThan??null},mode:"onChange"}),{register:o,getValues:a,setValue:l,setError:u,formState:{isDirty:d,isValid:f}}=s,p=()=>{d&&f&&(i({matchingRecipeId:a().matchingRecipeId,matchingRcRecipeId:a().matchingRcRecipeId,assignedRecipeId:a().assignedRecipeId,installedRecipeId:a().installedRecipeId,updateStatus:a().updateStatus,isOutdated:qW(a().isOutdated),initialSystemReportTimeGreaterThan:a().initialSystemReportTimeGreaterThan??null,initialSystemReportTimeLessThan:a().initialSystemReportTimeLessThan??null,lastSystemReportTimeGreaterThan:a().lastSystemReportTimeGreaterThan??null,lastSystemReportTimeLessThan:a().lastSystemReportTimeLessThan??null}),t())},h=I=>(O,A)=>{A?l(I,O,{shouldDirty:!0,shouldValidate:!0}):u(I,{type:"manual",message:"Invalid date"})},[m,y]=x.useState(""),[b,g]=x.useState(""),[v,S]=x.useState(""),[w,_]=x.useState(""),T=hl({state:["released"],tagId:null,typeId:null,search:m}),M=hl({state:["release_candidate","waiting_for_approval"],tagId:null,typeId:null,search:b}),C=hl({state:null,tagId:null,typeId:null,search:v}),k=hl({state:null,tagId:null,typeId:null,search:w});return c.jsxs(D.Dialog,{dialogId:Pg,title:n("Systems.Popup.FilterList.Headline"),onClose:t,modal:!0,open:!0,className:"suggestions-containing-modal",onKeyUp:I=>{I.key==="Enter"&&p()},children:[c.jsx(D.FormField,{fieldType:"dropdown",children:c.jsx(mo,{label:n("Entity.Label.Status"),initiallySelected:a().updateStatus,options:[...xV],getName:I=>n(UW.get(I)??"Unknown"),onChange:I=>l("updateStatus",I,{shouldDirty:!0,shouldValidate:!0})})}),c.jsx("span",{className:"soup-filter-input-row",children:c.jsx(ml,{useFormReturn:s,fieldName:"matchingRcRecipeId",label:n("Systems.Label.MatchingReleaseCandidateRecipes"),getName:I=>I.name+":"+I.version,onSearch:g,pageCaller:M})}),c.jsx("span",{className:"soup-filter-input-row",children:c.jsx(ml,{useFormReturn:s,fieldName:"matchingRecipeId",label:n("Systems.Label.MatchingRecipes"),getName:I=>I.name+":"+I.version,onSearch:y,pageCaller:T})}),c.jsx("span",{className:"soup-filter-input-row",children:c.jsx(ml,{useFormReturn:s,fieldName:"assignedRecipeId",label:n("Systems.Label.AssignedRecipes"),getName:I=>I.name+":"+I.version,onSearch:S,pageCaller:C})}),c.jsx("span",{className:"soup-filter-input-row",children:c.jsx(ml,{useFormReturn:s,fieldName:"installedRecipeId",label:n("Systems.Label.InstalledRecipes"),getName:I=>I.name+":"+I.version,onSearch:_,pageCaller:k})}),c.jsxs("span",{className:"soup-filter-input-row",children:[c.jsx(fl,{label:n("Systems.Label.InitialReportAfter"),textFieldId:"initialReportGt",initialValue:a().initialSystemReportTimeGreaterThan,onChange:h("initialSystemReportTimeGreaterThan"),withPicker:e.withPicker}),c.jsx(fl,{label:n("Systems.Label.InitialReportBefore"),textFieldId:"initialReportLt",initialValue:a().initialSystemReportTimeLessThan,onChange:h("initialSystemReportTimeLessThan"),withPicker:e.withPicker})]}),c.jsxs("span",{className:"soup-filter-input-row",children:[c.jsx(fl,{label:n("Systems.Label.LastReportAfter"),textFieldId:"lastReportGt",initialValue:a().lastSystemReportTimeGreaterThan,onChange:h("lastSystemReportTimeGreaterThan"),withPicker:e.withPicker}),c.jsx(fl,{label:n("Systems.Label.LastReportBefore"),textFieldId:"lastReportLt",initialValue:a().lastSystemReportTimeLessThan,onChange:h("lastSystemReportTimeLessThan"),withPicker:e.withPicker})]}),c.jsx(D.FormField,{fieldType:"dropdown",children:c.jsx(D.Dropdown,{id:"isOutdated",label:n("Systems.Label.Outdated"),options:XW(n),...o("isOutdated"),defaultValue:a("isOutdated"),onChange:I=>l("isOutdated",I.target.value,{shouldDirty:!0,shouldValidate:!0})})}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:n("Button.Cancel"),mode:"secondary",onClick:t}),c.jsx(D.Button,{label:n("Button.Apply"),mode:"primary",onClick:p,disabled:!d||!f})]})]})}function gp(e){return e===null?"both":e?"onlyOutdated":"onlyNotOutdated"}function qW(e){return e==="onlyOutdated"?!0:e==="onlyNotOutdated"?!1:null}function XW(e){return[{name:e("Dropdown.PleaseSelect"),value:gp(null)},{name:e("Systems.Outdated"),value:gp(!0)},{name:e("Systems.NotOutdated"),value:gp(!1)}]}const KW={"Info.Job.SystemMatch.InProgress":"Matching recipe calculation in progress, shown data may be outdated.","Systems.UIFeature.Name":"Systems","Systems.UIFeature.Description":"View your updateable systems in the field","Systems.List.Empty":"No systems found","Systems.List.Delete":"Delete systems","Systems.List.BladeHeader":"Systems","Systems.List.SystemSearch":"System","Systems.List.ModuleSearch":"Module","System.Details.BladeHeader":"System","System.Details.ActionsMenu.Title":"System actions","System.Label.Modules":"Modules","System.Details.ModuleList.Empty":"No system modules found","System.Details.ModuleList.Label.Gateway":"Gateway","System.Details.ModuleList.Label.Role":"Role","System.Details.ModuleList.Label.Role.Help":"Module role","System.Details.ModuleList.Label.PrimaryId":"Reported ID","System.Details.ModuleList.Label.SecondaryId":"Secondary ID","System.Details.ModuleList.Label.Name":"Name","System.Details.ModuleList.Label.Type":"Type","System.Details.ModuleList.Label.Delete":"Delete","System.Details.ModuleList.Icon.Tooltip.Gateway":"Last reported gateway","System.Roles.Primary":"Primary","System.Roles.Default":"Default","System.Roles.Removable":"Removable","System.Roles.Tracked":"Tracked","System.Modules.Details.BladeHeader":"Module","System.Modules.Details.ActionsMenu.Title":"System module actions","System.Modules.Details.Attributes":"Attributes","System.Modules.Details.Attributes.Empty":"No attributes provided","System.Modules.Popup.Delete.Headline":"Delete module?","System.Modules.Info.Delete.Success":"Module successfully deleted","Systems.Label.SystemId":"System ID","Systems.Label.ModuleId":"Module ID","Systems.Label.ModuleCount.Tooltip":"Target module count: {count}","Systems.Label.UpdateStatus":"Update status","Systems.Label.Outdated":"Outdated","Systems.Label.ReportedGateway":"Gateway","Systems.Label.ReportedGatewayId":"Gateway ID","Systems.Label.ReportedGateway.Tooltip":"Target ID: {id}","Systems.Label.InitiallyReportedAt":"Initially reported at","Systems.Label.ReportedAt":"Last reported at","Systems.Label.AssignedRecipe":"Assigned recipe","Systems.Label.AssignedRecipes":"Assigned recipes","Systems.Label.InstalledRecipe":"Installed recipe","Systems.Label.InstalledRecipes":"Installed recipes","Systems.Label.ActionHistory":"Action history","Systems.Label.Targets":"Targets","Systems.Label.InitialReportAt":"Initial report at","Systems.Label.LastRecipeMatchedAt":"Last matched at","Systems.Label.MatchingRecipe":"Matching recipe","Systems.Label.MatchingReleaseCandidateRecipe":"Matching release candidate recipe","Systems.Label.MatchingRecipes":"Matching recipes","Systems.Label.MatchingReleaseCandidateRecipes":"Matching release candidate recipes","Systems.Label.Recipes":"Recipes","Systems.Label.Recipes.MatchingReleaseCandidate":"Matching release candidate recipe","Systems.Label.Recipes.Matching":"Matching recipe","Systems.Label.Recipes.Assigned":"Assigned recipe","Systems.Label.Recipes.Installed":"Installed recipe","Systems.Label.InitialReportBefore":"Initially reported before","Systems.Label.InitialReportAfter":"Initially reported after","Systems.Label.LastReportBefore":"Last reported before","Systems.Label.LastReportAfter":"Last reported after","Systems.UpdateStatus.Error":"Error","Systems.UpdateStatus.InSync":"In sync","Systems.UpdateStatus.Registered":"Registered","Systems.UpdateStatus.Pending":"Pending","Systems.Outdated":"Outdated","Systems.NotOutdated":"Valid","Systems.Info.Outdated":"This system is {link}.","Systems.Info.Outdated.Link":"outdated","Systems.Info.Delete.Success":"System successfully deleted","Systems.Popup.BulkDelete.Headline":"{count, plural, =1 {Delete system?} other {Delete {count} systems?}}","Systems.Info.BulkDelete.Success":"{count, plural, =1 {System} other {{count} systems}} successfully deleted","Systems.Info.BulkDelete.Failed":"{failedActionsCount, plural, one {Could not delete # system out of {overallCount}} other {Could not delete # systems out of {overallCount}}}","Systems.Popup.FilterList.Headline":"Select systems filter","Systems.Popup.Delete.Headline":"Delete system?","Systems.Popup.Delete.Info":"This action will delete the system, including its system actions and modules.","Systems.Popup.BulkDelete.Info":"This action will delete the systems, including their system actions and modules.","ModulesLink.Title":"View updatable modules","ModulesLink.Tooltip":"Open updatable modules of {systemId}"},QW=({shell:e,connect:t})=>{e.registerTranslation({en:KW}),e.registerModal(Pg,t(zW))};function JW(e){return t=>e(({state:n,actions:r,...i})=>{const s=i,o=x.useMemo(()=>({state:n,actions:r}),[n,r]);return c.jsx(Jb.Provider,{value:o,children:c.jsx(t,{...s})})})}var e5=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},t5=typeof window>"u"||"Deno"in globalThis,n5=(JT=class extends e5{constructor(){super();Wn(this,Al,!0);Wn(this,Bo);Wn(this,Pl);Dn(this,Pl,t=>{if(!t5&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){jt(this,Bo)||this.setEventListener(jt(this,Pl))}onUnsubscribe(){var t;this.hasListeners()||((t=jt(this,Bo))==null||t.call(this),Dn(this,Bo,void 0))}setEventListener(t){var n;Dn(this,Pl,t),(n=jt(this,Bo))==null||n.call(this),Dn(this,Bo,t(this.setOnline.bind(this)))}setOnline(t){jt(this,Al)!==t&&(Dn(this,Al,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return jt(this,Al)}},Al=new WeakMap,Bo=new WeakMap,Pl=new WeakMap,JT),r5=new n5,i5=le.createContext(void 0),s5=e=>{const t=le.useContext(i5);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},qe={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return nk(this.context.count)},getNextContextId(){return nk(this.context.count++)}};function nk(e){const t=String(e),n=t.length-1;return qe.context.id+(n?String.fromCharCode(96+n):"")+t}function nu(e){qe.context=e}var rk=!1,o5=(e,t)=>e===t,yp=Symbol("solid-proxy"),ik=typeof Proxy=="function",vp=Symbol("solid-track"),bp={equals:o5},sk=fk,Ps=1,Sp=2,ok={owned:null,cleanups:null,context:null,owner:null},Dy={},kt=null,Cy=null,a5=null,Pt=null,Qn=null,Ns=null,xp=0;function js(e,t){const n=Pt,r=kt,i=e.length===0,s=t===void 0?r:t,o=i?ok:{owned:null,cleanups:null,context:s?s.context:null,owner:s},a=i?e:()=>e(()=>on(()=>ru(o)));kt=o,Pt=null;try{return Ki(a,!0)}finally{Pt=n,kt=r}}function ye(e,t){t=t?Object.assign({},bp,t):bp;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=i=>(typeof i=="function"&&(i=i(n.value)),dk(n,i));return[uk.bind(n),r]}function ak(e,t,n){const r=wp(e,t,!0,Ps);gl(r)}function Oe(e,t,n){const r=wp(e,t,!1,Ps);gl(r)}function Be(e,t,n){sk=v5;const r=wp(e,t,!1,Ps);(!n||!n.render)&&(r.user=!0),Ns?Ns.push(r):gl(r)}function z(e,t,n){n=n?Object.assign({},bp,n):bp;const r=wp(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,gl(r),uk.bind(r)}function l5(e){return e&&typeof e=="object"&&"then"in e}function c5(e,t,n){let r,i,s;r=!0,i=e,s={};let o=null,a=Dy,l=null,u=!1,d="initialValue"in s,f=typeof r=="function"&&z(r);const p=new Set,[h,m]=(s.storage||ye)(s.initialValue),[y,b]=ye(void 0),[g,v]=ye(void 0,{equals:!1}),[S,w]=ye(d?"ready":"unresolved");qe.context&&(l=qe.getNextContextId(),s.ssrLoadFrom==="initial"?a=s.initialValue:qe.load&&qe.has(l)&&(a=qe.load(l)));function _(k,I,O,A){return o===k&&(o=null,A!==void 0&&(d=!0),(k===a||I===a)&&s.onHydrated&&queueMicrotask(()=>s.onHydrated(A,{value:I})),a=Dy,T(I,O)),I}function T(k,I){Ki(()=>{I===void 0&&m(()=>k),w(I!==void 0?"errored":d?"ready":"unresolved"),b(I);for(const O of p.keys())O.decrement();p.clear()},!1)}function M(){const k=m5,I=h(),O=y();if(O!==void 0&&!o)throw O;return Pt&&Pt.user,I}function C(k=!0){if(k!==!1&&u)return;u=!1;const I=f?f():r;if(I==null||I===!1){_(o,on(h));return}const O=a!==Dy?a:on(()=>i(I,{value:h(),refetching:k}));return l5(O)?(o=O,"value"in O?(O.status==="success"?_(o,O.value,void 0,I):_(o,void 0,My(O.value),I),O):(u=!0,queueMicrotask(()=>u=!1),Ki(()=>{w(d?"refreshing":"pending"),v()},!1),O.then(A=>_(O,A,void 0,I),A=>_(O,void 0,My(A),I)))):(_(o,O,void 0,I),O)}return Object.defineProperties(M,{state:{get:()=>S()},error:{get:()=>y()},loading:{get(){const k=S();return k==="pending"||k==="refreshing"}},latest:{get(){if(!d)return M();const k=y();if(k&&!o)throw k;return h()}}}),f?ak(()=>C(!1)):C(!1),[M,{refetch:C,mutate:m}]}function u5(e){return Ki(e,!1)}function on(e){if(Pt===null)return e();const t=Pt;Pt=null;try{return e()}finally{Pt=t}}function Fs(e,t,n){const r=Array.isArray(e);let i,s=n&&n.defer;return o=>{let a;if(r){a=Array(e.length);for(let u=0;u<e.length;u++)a[u]=e[u]()}else a=e();if(s)return s=!1,o;const l=on(()=>t(a,i,o));return i=a,l}}function xo(e){Be(()=>on(e))}function Fe(e){return kt===null||(kt.cleanups===null?kt.cleanups=[e]:kt.cleanups.push(e)),e}function lk(){return kt}function d5(e,t){const n=kt,r=Pt;kt=e,Pt=null;try{return Ki(t,!0)}catch(i){Ty(i)}finally{kt=n,Pt=r}}function f5(e){const t=Pt,n=kt;return Promise.resolve().then(()=>{Pt=t,kt=n;let r;return Ki(e,!1),Pt=kt=null,r?r.done:void 0})}var[p5,Rte]=ye(!1);function h5(){return[p5,f5]}function Gn(e,t){const n=Symbol("context");return{id:n,Provider:b5(n),defaultValue:e}}function Vn(e){let t;return kt&&kt.context&&(t=kt.context[e.id])!==void 0?t:e.defaultValue}function ck(e){const t=z(e),n=z(()=>Iy(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}var m5;function uk(){if(this.sources&&this.state)if(this.state===Ps)gl(this);else{const e=Qn;Qn=null,Ki(()=>kp(this),!1),Qn=e}if(Pt){const e=this.observers?this.observers.length:0;Pt.sources?(Pt.sources.push(this),Pt.sourceSlots.push(e)):(Pt.sources=[this],Pt.sourceSlots=[e]),this.observers?(this.observers.push(Pt),this.observerSlots.push(Pt.sources.length-1)):(this.observers=[Pt],this.observerSlots=[Pt.sources.length-1])}return this.value}function dk(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Ki(()=>{for(let i=0;i<e.observers.length;i+=1){const s=e.observers[i],o=Cy&&Cy.running;o&&Cy.disposed.has(s),(o?!s.tState:!s.state)&&(s.pure?Qn.push(s):Ns.push(s),s.observers&&pk(s)),o||(s.state=Ps)}if(Qn.length>1e6)throw Qn=[],new Error},!1)),t}function gl(e){if(!e.fn)return;ru(e);const t=xp;g5(e,e.value,t)}function g5(e,t,n){let r;const i=kt,s=Pt;Pt=kt=e;try{r=e.fn(t)}catch(o){return e.pure&&(e.state=Ps,e.owned&&e.owned.forEach(ru),e.owned=null),e.updatedAt=n+1,Ty(o)}finally{Pt=s,kt=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?dk(e,r):e.value=r,e.updatedAt=n)}function wp(e,t,n,r=Ps,i){const s={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:kt,context:kt?kt.context:null,pure:n};return kt===null||kt!==ok&&(kt.owned?kt.owned.push(s):kt.owned=[s]),s}function _p(e){if(e.state===0)return;if(e.state===Sp)return kp(e);if(e.suspense&&on(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<xp);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===Ps)gl(e);else if(e.state===Sp){const r=Qn;Qn=null,Ki(()=>kp(e,t[0]),!1),Qn=r}}function Ki(e,t){if(Qn)return e();let n=!1;t||(Qn=[]),Ns?n=!0:Ns=[],xp++;try{const r=e();return y5(n),r}catch(r){n||(Ns=null),Qn=null,Ty(r)}}function y5(e){if(Qn&&(fk(Qn),Qn=null),e)return;const t=Ns;Ns=null,t.length&&Ki(()=>sk(t),!1)}function fk(e){for(let t=0;t<e.length;t++)_p(e[t])}function v5(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:_p(r)}if(qe.context){if(qe.count){qe.effects||(qe.effects=[]),qe.effects.push(...e.slice(0,n));return}nu()}for(qe.effects&&(qe.done||!qe.count)&&(e=[...qe.effects,...e],n+=qe.effects.length,delete qe.effects),t=0;t<n;t++)_p(e[t])}function kp(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const i=r.state;i===Ps?r!==t&&(!r.updatedAt||r.updatedAt<xp)&&_p(r):i===Sp&&kp(r,t)}}}function pk(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=Sp,n.pure?Qn.push(n):Ns.push(n),n.observers&&pk(n))}}function ru(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),i=n.observers;if(i&&i.length){const s=i.pop(),o=n.observerSlots.pop();r<i.length&&(s.sourceSlots[o]=r,i[r]=s,n.observerSlots[r]=o)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)ru(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)ru(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function My(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Ty(e,t=kt){throw My(e)}function Iy(e){if(typeof e=="function"&&!e.length)return Iy(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=Iy(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function b5(e,t){return function(r){let i;return Oe(()=>i=on(()=>(kt.context={...kt.context,[e]:r.value},ck(()=>r.children))),void 0),i}}var Ey=Symbol("fallback");function Dp(e){for(let t=0;t<e.length;t++)e[t]()}function S5(e,t,n={}){let r=[],i=[],s=[],o=0,a=t.length>1?[]:null;return Fe(()=>Dp(s)),()=>{let l=e()||[],u=l.length,d,f;return l[vp],on(()=>{let h,m,y,b,g,v,S,w,_;if(u===0)o!==0&&(Dp(s),s=[],r=[],i=[],o=0,a&&(a=[])),n.fallback&&(r=[Ey],i[0]=js(T=>(s[0]=T,n.fallback())),o=1);else if(o===0){for(i=new Array(u),f=0;f<u;f++)r[f]=l[f],i[f]=js(p);o=u}else{for(y=new Array(u),b=new Array(u),a&&(g=new Array(u)),v=0,S=Math.min(o,u);v<S&&r[v]===l[v];v++);for(S=o-1,w=u-1;S>=v&&w>=v&&r[S]===l[w];S--,w--)y[w]=i[S],b[w]=s[S],a&&(g[w]=a[S]);for(h=new Map,m=new Array(w+1),f=w;f>=v;f--)_=l[f],d=h.get(_),m[f]=d===void 0?-1:d,h.set(_,f);for(d=v;d<=S;d++)_=r[d],f=h.get(_),f!==void 0&&f!==-1?(y[f]=i[d],b[f]=s[d],a&&(g[f]=a[d]),f=m[f],h.set(_,f)):s[d]();for(f=v;f<u;f++)f in y?(i[f]=y[f],s[f]=b[f],a&&(a[f]=g[f],a[f](f))):i[f]=js(p);i=i.slice(0,o=u),r=l.slice(0)}return i});function p(h){if(s[f]=h,a){const[m,y]=ye(f);return a[f]=y,t(l[f],m)}return t(l[f])}}}function x5(e,t,n={}){let r=[],i=[],s=[],o=[],a=0,l;return Fe(()=>Dp(s)),()=>{const u=e()||[],d=u.length;return u[vp],on(()=>{if(d===0)return a!==0&&(Dp(s),s=[],r=[],i=[],a=0,o=[]),n.fallback&&(r=[Ey],i[0]=js(p=>(s[0]=p,n.fallback())),a=1),i;for(r[0]===Ey&&(s[0](),s=[],r=[],i=[],a=0),l=0;l<d;l++)l<r.length&&r[l]!==u[l]?o[l](()=>u[l]):l>=r.length&&(i[l]=js(f));for(;l<r.length;l++)s[l]();return a=o.length=s.length=d,r=u.slice(0),i=i.slice(0,a)});function f(p){s[l]=p;const[h,m]=ye(u[l]);return o[l]=m,t(h,l)}}}function B(e,t){return on(()=>e(t||{}))}function Cp(){return!0}var Ry={get(e,t,n){return t===yp?n:e.get(t)},has(e,t){return t===yp?!0:e.has(t)},set:Cp,deleteProperty:Cp,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Cp,deleteProperty:Cp}},ownKeys(e){return e.keys()}};function Ly(e){return(e=typeof e=="function"?e():e)?e:{}}function w5(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function Xe(...e){let t=!1;for(let o=0;o<e.length;o++){const a=e[o];t=t||!!a&&yp in a,e[o]=typeof a=="function"?(t=!0,z(a)):a}if(ik&&t)return new Proxy({get(o){for(let a=e.length-1;a>=0;a--){const l=Ly(e[a])[o];if(l!==void 0)return l}},has(o){for(let a=e.length-1;a>=0;a--)if(o in Ly(e[a]))return!0;return!1},keys(){const o=[];for(let a=0;a<e.length;a++)o.push(...Object.keys(Ly(e[a])));return[...new Set(o)]}},Ry);const n={},r=Object.create(null);for(let o=e.length-1;o>=0;o--){const a=e[o];if(!a)continue;const l=Object.getOwnPropertyNames(a);for(let u=l.length-1;u>=0;u--){const d=l[u];if(d==="__proto__"||d==="constructor")continue;const f=Object.getOwnPropertyDescriptor(a,d);if(!r[d])r[d]=f.get?{enumerable:!0,configurable:!0,get:w5.bind(n[d]=[f.get.bind(a)])}:f.value!==void 0?f:void 0;else{const p=n[d];p&&(f.get?p.push(f.get.bind(a)):f.value!==void 0&&p.push(()=>f.value))}}}const i={},s=Object.keys(r);for(let o=s.length-1;o>=0;o--){const a=s[o],l=r[a];l&&l.get?Object.defineProperty(i,a,l):i[a]=l?l.value:void 0}return i}function Ct(e,...t){if(ik&&yp in e){const i=new Set(t.length>1?t.flat():t[0]),s=t.map(o=>new Proxy({get(a){return o.includes(a)?e[a]:void 0},has(a){return o.includes(a)&&a in e},keys(){return o.filter(a=>a in e)}},Ry));return s.push(new Proxy({get(o){return i.has(o)?void 0:e[o]},has(o){return i.has(o)?!1:o in e},keys(){return Object.keys(e).filter(o=>!i.has(o))}},Ry)),s}const n={},r=t.map(()=>({}));for(const i of Object.getOwnPropertyNames(e)){const s=Object.getOwnPropertyDescriptor(e,i),o=!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable;let a=!1,l=0;for(const u of t)u.includes(i)&&(a=!0,o?r[l][i]=s.value:Object.defineProperty(r[l],i,s)),++l;a||(o?n[i]=s.value:Object.defineProperty(n,i,s))}return[...r,n]}function _5(e){let t,n;const r=i=>{const s=qe.context;if(s){const[a,l]=ye();qe.count||(qe.count=0),qe.count++,(n||(n=e())).then(u=>{!qe.done&&nu(s),qe.count--,l(()=>u.default),nu()}),t=a}else if(!t){const[a]=c5(()=>(n||(n=e())).then(l=>l.default));t=a}let o;return z(()=>(o=t())?on(()=>{if(!s||qe.done)return o(i);const a=qe.context;nu(s);const l=o(i);return nu(a),l}):"")};return r.preload=()=>n||((n=e()).then(i=>t=()=>i.default),n),r}var k5=0;function Kr(){return qe.context?qe.getNextContextId():`cl-${k5++}`}var hk=e=>`Stale read from <${e}>.`;function D5(e){const t="fallback"in e&&{fallback:()=>e.fallback};return z(S5(()=>e.each,e.children,t||void 0))}function C5(e){const t="fallback"in e&&{fallback:()=>e.fallback};return z(x5(()=>e.each,e.children,t||void 0))}function Re(e){const t=e.keyed,n=z(()=>e.when,void 0,void 0),r=t?n:z(n,void 0,{equals:(i,s)=>!i==!s});return z(()=>{const i=r();if(i){const s=e.children;return typeof s=="function"&&s.length>0?on(()=>s(t?i:()=>{if(!on(r))throw hk("Show");return n()})):s}return e.fallback},void 0,void 0)}function M5(e){const t=ck(()=>e.children),n=z(()=>{const r=t(),i=Array.isArray(r)?r:[r];let s=()=>{};for(let o=0;o<i.length;o++){const a=o,l=i[o],u=s,d=z(()=>u()?void 0:l.when,void 0,void 0),f=l.keyed?d:z(d,void 0,{equals:(p,h)=>!p==!h});s=()=>u()||(f()?[a,d,l]:void 0)}return s});return z(()=>{const r=n()();if(!r)return e.fallback;const[i,s,o]=r,a=o.children;return typeof a=="function"&&a.length>0?on(()=>a(o.keyed?s():()=>{var u;if(((u=on(n)())==null?void 0:u[0])!==i)throw hk("Match");return s()})):a},void 0,void 0)}function Oy(e){return e}var T5=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],I5=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...T5]),E5=new Set(["innerHTML","textContent","innerText","children"]),R5=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),L5=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function O5(e,t){const n=L5[e];return typeof n=="object"?n[t]?n.$:void 0:n}var B5=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),A5=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),P5={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function N5(e,t,n){let r=n.length,i=t.length,s=r,o=0,a=0,l=t[i-1].nextSibling,u=null;for(;o<i||a<s;){if(t[o]===n[a]){o++,a++;continue}for(;t[i-1]===n[s-1];)i--,s--;if(i===o){const d=s<r?a?n[a-1].nextSibling:n[s-a]:l;for(;a<s;)e.insertBefore(n[a++],d)}else if(s===a)for(;o<i;)(!u||!u.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[s-1]&&n[a]===t[i-1]){const d=t[--i].nextSibling;e.insertBefore(n[a++],t[o++].nextSibling),e.insertBefore(n[--s],d),t[i]=n[s]}else{if(!u){u=new Map;let f=a;for(;f<s;)u.set(n[f],f++)}const d=u.get(t[o]);if(d!=null)if(a<d&&d<s){let f=o,p=1,h;for(;++f<i&&f<s&&!((h=u.get(t[f]))==null||h!==d+p);)p++;if(p>d-a){const m=t[o];for(;a<d;)e.insertBefore(n[a++],m)}else e.replaceChild(n[a++],t[o++])}else o++;else t[o++].remove()}}}var iu="_$DX_DELEGATE";function j5(e,t,n,r={}){let i;return js(s=>{i=s,t===document?e():X(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=""}}function we(e,t,n,r){let i;const s=()=>{const a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},o=()=>(i||(i=s())).cloneNode(!0);return o.cloneNode=o,o}function Mp(e,t=window.document){const n=t[iu]||(t[iu]=new Set);for(let r=0,i=e.length;r<i;r++){const s=e[r];n.has(s)||(n.add(s),t.addEventListener(s,bk))}}function F5(e=window.document){if(e[iu]){for(let t of e[iu].keys())e.removeEventListener(t,bk);delete e[iu]}}function ie(e,t,n){la(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function G5(e,t,n,r){la(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function V5(e,t,n){la(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function ae(e,t){la(e)||(t==null?e.removeAttribute("class"):e.className=t)}function mk(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const i=n[0];e.addEventListener(t,n[0]=s=>i.call(e,n[1],s))}else e.addEventListener(t,n,typeof n!="function"&&n)}function $5(e,t,n={}){const r=Object.keys(t||{}),i=Object.keys(n);let s,o;for(s=0,o=i.length;s<o;s++){const a=i[s];!a||a==="undefined"||t[a]||(yk(e,a,!1),delete n[a])}for(s=0,o=r.length;s<o;s++){const a=r[s],l=!!t[a];!a||a==="undefined"||n[a]===l||!l||(yk(e,a,!0),n[a]=l)}return n}function Y5(e,t,n){if(!t)return n?ie(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let i,s;for(s in n)t[s]==null&&r.removeProperty(s),delete n[s];for(s in t)i=t[s],i!==n[s]&&(r.setProperty(s,i),n[s]=i);return n}function gk(e,t={},n,r){const i={};return r||Oe(()=>i.children=ou(e,t.children,i.children)),Oe(()=>typeof t.ref=="function"&&su(t.ref,e)),Oe(()=>W5(e,t,n,!0,i,!0)),i}function su(e,t,n){return on(()=>e(t,n))}function X(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return ou(e,t,r,n);Oe(i=>ou(e,t(),i,n),r)}function W5(e,t,n,r,i={},s=!1){t||(t={});for(const o in i)if(!(o in t)){if(o==="children")continue;i[o]=vk(e,o,null,i[o],n,s,t)}for(const o in t){if(o==="children")continue;const a=t[o];i[o]=vk(e,o,a,i[o],n,s,t)}}function H5(e){let t,n;return!la()||!(t=qe.registry.get(n=U5()))?e():(qe.completed&&qe.completed.add(t),qe.registry.delete(n),t)}function la(e){return!!qe.context&&!qe.done&&(!e||e.isConnected)}function Z5(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function yk(e,t,n){const r=t.trim().split(/\s+/);for(let i=0,s=r.length;i<s;i++)e.classList.toggle(r[i],n)}function vk(e,t,n,r,i,s,o){let a,l,u,d,f;if(t==="style")return Y5(e,n,r);if(t==="classList")return $5(e,n,r);if(n===r)return r;if(t==="ref")s||n(e);else if(t.slice(0,3)==="on:"){const p=t.slice(3);r&&e.removeEventListener(p,r,typeof r!="function"&&r),n&&e.addEventListener(p,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const p=t.slice(10);r&&e.removeEventListener(p,r,!0),n&&e.addEventListener(p,n,!0)}else if(t.slice(0,2)==="on"){const p=t.slice(2).toLowerCase(),h=B5.has(p);if(!h&&r){const m=Array.isArray(r)?r[0]:r;e.removeEventListener(p,m)}(h||n)&&(mk(e,p,n,h),h&&Mp([p]))}else if(t.slice(0,5)==="attr:")ie(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")V5(e,t.slice(5),n);else if((f=t.slice(0,5)==="prop:")||(u=E5.has(t))||!i&&((d=O5(t,e.tagName))||(l=I5.has(t)))||(a=e.nodeName.includes("-")||"is"in o)){if(f)t=t.slice(5),l=!0;else if(la(e))return n;t==="class"||t==="className"?ae(e,n):a&&!l&&!u?e[Z5(t)]=n:e[d||t]=n}else{const p=i&&t.indexOf(":")>-1&&P5[t.split(":")[0]];p?G5(e,p,t,n):ie(e,R5[t]||t,n)}return n}function bk(e){if(qe.registry&&qe.events&&qe.events.find(([l,u])=>u===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,i=e.currentTarget,s=l=>Object.defineProperty(e,"target",{configurable:!0,value:l}),o=()=>{const l=t[n];if(l&&!t.disabled){const u=t[`${n}Data`];if(u!==void 0?l.call(t,u,e):l.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&s(t.host),!0},a=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),qe.registry&&!qe.done&&(qe.done=_$HY.done=!0),e.composedPath){const l=e.composedPath();s(l[0]);for(let u=0;u<l.length-2&&(t=l[u],!!o());u++){if(t._$host){t=t._$host,a();break}if(t.parentNode===i)break}}else a();s(r)}function ou(e,t,n,r,i){const s=la(e);if(s){!n&&(n=[...e.childNodes]);let l=[];for(let u=0;u<n.length;u++){const d=n[u];d.nodeType===8&&d.data.slice(0,2)==="!$"?d.remove():l.push(d)}n=l}for(;typeof n=="function";)n=n();if(t===n)return n;const o=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,o==="string"||o==="number"){if(s||o==="number"&&(t=t.toString(),t===n))return n;if(a){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=yl(e,n,r,l)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||o==="boolean"){if(s)return n;n=yl(e,n,r)}else{if(o==="function")return Oe(()=>{let l=t();for(;typeof l=="function";)l=l();n=ou(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],u=n&&Array.isArray(n);if(By(l,t,n,i))return Oe(()=>n=ou(e,l,n,r,!0)),()=>n;if(s){if(!l.length)return n;if(r===void 0)return n=[...e.childNodes];let d=l[0];if(d.parentNode!==e)return n;const f=[d];for(;(d=d.nextSibling)!==r;)f.push(d);return n=f}if(l.length===0){if(n=yl(e,n,r),a)return n}else u?n.length===0?Sk(e,l,r):N5(e,n,l):(n&&yl(e),Sk(e,l));n=l}else if(t.nodeType){if(s&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=yl(e,n,r,t);yl(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function By(e,t,n,r){let i=!1;for(let s=0,o=t.length;s<o;s++){let a=t[s],l=n&&n[e.length],u;if(!(a==null||a===!0||a===!1))if((u=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))i=By(e,a,l)||i;else if(u==="function")if(r){for(;typeof a=="function";)a=a();i=By(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||i}else e.push(a),i=!0;else{const d=String(a);l&&l.nodeType===3&&l.data===d?e.push(l):e.push(document.createTextNode(d))}}return i}function Sk(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function yl(e,t,n,r){if(n===void 0)return e.textContent="";const i=r||document.createTextNode("");if(t.length){let s=!1;for(let o=t.length-1;o>=0;o--){const a=t[o];if(i!==a){const l=a.parentNode===e;!s&&!o?l?e.replaceChild(i,a):e.insertBefore(i,n):l&&a.remove()}else s=!0}}else e.insertBefore(i,n);return[i]}function U5(){return qe.getNextContextId()}var z5="http://www.w3.org/2000/svg";function xk(e,t=!1){return t?document.createElementNS(z5,e):document.createElement(e)}function wk(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,i=lk();let s,o=!!qe.context;return Be(()=>{o&&(lk().user=o=!1),s||(s=d5(i,()=>z(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[l,u]=ye(!1),d=()=>u(!0);js(f=>X(a,()=>l()?f():s(),null)),Fe(d)}else{const l=xk(e.isSVG?"g":"div",e.isSVG),u=t&&l.attachShadow?l.attachShadow({mode:"open"}):l;Object.defineProperty(l,"_$host",{get(){return n.parentNode},configurable:!0}),X(u,s),a.appendChild(l),e.ref&&e.ref(l),Fe(()=>a.removeChild(l))}},void 0,{render:!o}),n}function q5(e,t){const n=z(e);return z(()=>{const r=n();switch(typeof r){case"function":return on(()=>r(t));case"string":const i=A5.has(r),s=qe.context?H5():xk(r,i);return gk(s,t,i),s}})}function X5(e){const[,t]=Ct(e,["component"]);return q5(()=>e.component,t)}var K5=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},_k=class{constructor(e){this.generateIdentifier=e,this.kv=new K5}register(e,t){this.kv.getByValue(e)||(t||(t=this.generateIdentifier(e)),this.kv.set(t,e))}clear(){this.kv.clear()}getIdentifier(e){return this.kv.getByValue(e)}getValue(e){return this.kv.getByKey(e)}},Q5=class extends _k{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t=="object"?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};function J5(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function eH(e,t){const n=J5(e);if("find"in n)return n.find(t);const r=n;for(let i=0;i<r.length;i++){const s=r[i];if(t(s))return s}}function vl(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function Tp(e,t){return e.indexOf(t)!==-1}function kk(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}var tH=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return eH(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}},nH=e=>Object.prototype.toString.call(e).slice(8,-1),Dk=e=>typeof e>"u",rH=e=>e===null,au=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,Ay=e=>au(e)&&Object.keys(e).length===0,wo=e=>Array.isArray(e),iH=e=>typeof e=="string",sH=e=>typeof e=="number"&&!isNaN(e),oH=e=>typeof e=="boolean",aH=e=>e instanceof RegExp,lu=e=>e instanceof Map,cu=e=>e instanceof Set,Ck=e=>nH(e)==="Symbol",lH=e=>e instanceof Date&&!isNaN(e.valueOf()),cH=e=>e instanceof Error,Mk=e=>typeof e=="number"&&isNaN(e),uH=e=>oH(e)||rH(e)||Dk(e)||sH(e)||iH(e)||Ck(e),dH=e=>typeof e=="bigint",fH=e=>e===1/0||e===-1/0,pH=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),hH=e=>e instanceof URL,Tk=e=>e.replace(/\./g,"\\."),Py=e=>e.map(String).map(Tk).join("."),uu=e=>{const t=[];let n="";for(let i=0;i<e.length;i++){let s=e.charAt(i);if(s==="\\"&&e.charAt(i+1)==="."){n+=".",i++;continue}if(s==="."){t.push(n),n="";continue}n+=s}const r=n;return t.push(r),t};function Qi(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var Ik=[Qi(Dk,"undefined",()=>null,()=>{}),Qi(dH,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):e),Qi(lH,"Date",e=>e.toISOString(),e=>new Date(e)),Qi(cH,"Error",(e,t)=>{const n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n},(e,t)=>{const n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n}),Qi(aH,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),Qi(cu,"set",e=>[...e.values()],e=>new Set(e)),Qi(lu,"map",e=>[...e.entries()],e=>new Map(e)),Qi(e=>Mk(e)||fH(e),"number",e=>Mk(e)?"NaN":e>0?"Infinity":"-Infinity",Number),Qi(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),Qi(hH,"URL",e=>e.toString(),e=>new URL(e))];function Ip(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var Ek=Ip((e,t)=>Ck(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const r=n.symbolRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r}),mH=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),Rk=Ip(pH,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=mH[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function Lk(e,t){return e!=null&&e.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var Ok=Ip(Lk,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const r={};return n.forEach(i=>{r[i]=e[i]}),r},(e,t,n)=>{const r=n.classRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(r.prototype),e)}),Bk=Ip((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(e)}),gH=[Ok,Ek,Bk,Rk],Ak=(e,t)=>{const n=kk(gH,i=>i.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=kk(Ik,i=>i.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},Pk={};Ik.forEach(e=>{Pk[e.annotation]=e});var yH=(e,t,n)=>{if(wo(t))switch(t[0]){case"symbol":return Ek.untransform(e,t,n);case"class":return Ok.untransform(e,t,n);case"custom":return Bk.untransform(e,t,n);case"typed-array":return Rk.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=Pk[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}},bl=(e,t)=>{const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function Nk(e){if(Tp(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Tp(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Tp(e,"constructor"))throw new Error("constructor is not allowed as a property")}var vH=(e,t)=>{Nk(t);for(let n=0;n<t.length;n++){const r=t[n];if(cu(e))e=bl(e,+r);else if(lu(e)){const i=+r,s=+t[++n]==0?"key":"value",o=bl(e,i);switch(s){case"key":e=o;break;case"value":e=e.get(o);break}}else e=e[r]}return e},Ny=(e,t,n)=>{if(Nk(t),t.length===0)return n(e);let r=e;for(let s=0;s<t.length-1;s++){const o=t[s];if(wo(r)){const a=+o;r=r[a]}else if(au(r))r=r[o];else if(cu(r)){const a=+o;r=bl(r,a)}else if(lu(r)){if(s===t.length-2)break;const l=+o,u=+t[++s]==0?"key":"value",d=bl(r,l);switch(u){case"key":r=d;break;case"value":r=r.get(d);break}}}const i=t[t.length-1];if(wo(r)?r[+i]=n(r[+i]):au(r)&&(r[i]=n(r[i])),cu(r)){const s=bl(r,+i),o=n(s);s!==o&&(r.delete(s),r.add(o))}if(lu(r)){const s=+t[t.length-2],o=bl(r,s);switch(+i==0?"key":"value"){case"key":{const l=n(o);r.set(l,r.get(o)),l!==o&&r.delete(o);break}case"value":{r.set(o,n(r.get(o)));break}}}return e};function jy(e,t,n=[]){if(!e)return;if(!wo(e)){vl(e,(s,o)=>jy(s,t,[...n,...uu(o)]));return}const[r,i]=e;i&&vl(i,(s,o)=>{jy(s,t,[...n,...uu(o)])}),t(r,n)}function bH(e,t,n){return jy(t,(r,i)=>{e=Ny(e,i,s=>yH(s,r,n))}),e}function SH(e,t){function n(r,i){const s=vH(e,uu(i));r.map(uu).forEach(o=>{e=Ny(e,o,()=>s)})}if(wo(t)){const[r,i]=t;r.forEach(s=>{e=Ny(e,uu(s),()=>e)}),i&&vl(i,n)}else vl(t,n);return e}var xH=(e,t)=>au(e)||wo(e)||lu(e)||cu(e)||Lk(e,t);function wH(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function _H(e,t){const n={};let r;return e.forEach(i=>{if(i.length<=1)return;t||(i=i.map(a=>a.map(String)).sort((a,l)=>a.length-l.length));const[s,...o]=i;s.length===0?r=o.map(Py):n[Py(s)]=o.map(Py)}),r?Ay(n)?[r]:[r,n]:Ay(n)?void 0:n}var jk=(e,t,n,r,i=[],s=[],o=new Map)=>{const a=uH(e);if(!a){wH(e,i,t);const h=o.get(e);if(h)return r?{transformedValue:null}:h}if(!xH(e,n)){const h=Ak(e,n),m=h?{transformedValue:h.value,annotations:[h.type]}:{transformedValue:e};return a||o.set(e,m),m}if(Tp(s,e))return{transformedValue:null};const l=Ak(e,n),u=(l==null?void 0:l.value)??e,d=wo(u)?[]:{},f={};vl(u,(h,m)=>{if(m==="__proto__"||m==="constructor"||m==="prototype")throw new Error(`Detected property ${m}. This is a prototype pollution risk, please remove it from your object.`);const y=jk(h,t,n,r,[...i,m],[...s,e],o);d[m]=y.transformedValue,wo(y.annotations)?f[m]=y.annotations:au(y.annotations)&&vl(y.annotations,(b,g)=>{f[Tk(m)+"."+g]=b})});const p=Ay(f)?{transformedValue:d,annotations:l?[l.type]:void 0}:{transformedValue:d,annotations:l?[l.type,f]:f};return a||o.set(e,p),p};function Fk(e){return Object.prototype.toString.call(e).slice(8,-1)}function Gk(e){return Fk(e)==="Array"}function kH(e){if(Fk(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function DH(e,t,n,r,i){const s={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";s==="enumerable"&&(e[t]=n),i&&s==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function Fy(e,t={}){if(Gk(e))return e.map(i=>Fy(i,t));if(!kH(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((i,s)=>{if(Gk(t.props)&&!t.props.includes(s))return i;const o=e[s],a=Fy(o,t);return DH(i,s,a,e,t.nonenumerable),i},{})}var Nt=class{constructor({dedupe:e=!1}={}){this.classRegistry=new Q5,this.symbolRegistry=new _k(t=>t.description??""),this.customTransformerRegistry=new tH,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,n=jk(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});const i=_H(t,this.dedupe);return i&&(r.meta={...r.meta,referentialEqualities:i}),r}deserialize(e){const{json:t,meta:n}=e;let r=Fy(t);return n!=null&&n.values&&(r=bH(r,n.values,this)),n!=null&&n.referentialEqualities&&(r=SH(r,n.referentialEqualities)),r}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e))}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};Nt.defaultInstance=new Nt,Nt.serialize=Nt.defaultInstance.serialize.bind(Nt.defaultInstance),Nt.deserialize=Nt.defaultInstance.deserialize.bind(Nt.defaultInstance),Nt.stringify=Nt.defaultInstance.stringify.bind(Nt.defaultInstance),Nt.parse=Nt.defaultInstance.parse.bind(Nt.defaultInstance),Nt.registerClass=Nt.defaultInstance.registerClass.bind(Nt.defaultInstance),Nt.registerSymbol=Nt.defaultInstance.registerSymbol.bind(Nt.defaultInstance),Nt.registerCustom=Nt.defaultInstance.registerCustom.bind(Nt.defaultInstance),Nt.allowErrorProps=Nt.defaultInstance.allowErrorProps.bind(Nt.defaultInstance);var Vk=Nt.serialize,CH=Nt.stringify;function Sl(e){return e.state.fetchStatus==="fetching"?"fetching":e.getObserversCount()?e.state.fetchStatus==="paused"?"paused":e.isStale()?"stale":"fresh":"inactive"}function MH(e,t){return`${e}${t.charAt(0).toUpperCase()+t.slice(1)}`}function TH({queryState:e,observerCount:t,isStale:n}){return e.fetchStatus==="fetching"?"blue":t?e.fetchStatus==="paused"?"purple":n?"yellow":"green":"gray"}function xl({status:e,isPaused:t}){return t?"purple":e==="error"?"red":e==="pending"?"yellow":e==="success"?"green":"gray"}function IH(e){return e==="fresh"?"green":e==="stale"?"yellow":e==="paused"?"purple":e==="inactive"?"gray":"blue"}var Ep=(e,t=!1)=>{const{json:n}=Vk(e);return JSON.stringify(n,null,t?2:void 0)},Rp=e=>e.state.fetchStatus!=="idle"?0:e.getObserversCount()?e.isStale()?2:1:3,EH=(e,t)=>e.queryHash.localeCompare(t.queryHash),$k=(e,t)=>e.state.dataUpdatedAt<t.state.dataUpdatedAt?1:-1,RH=(e,t)=>Rp(e)===Rp(t)?$k(e,t):Rp(e)>Rp(t)?1:-1,Gy={status:RH,"query hash":EH,"last updated":$k},Lp=e=>e.state.isPaused?0:e.state.status==="error"?2:e.state.status==="pending"?1:3,Yk=(e,t)=>e.state.submittedAt<t.state.submittedAt?1:-1,LH=(e,t)=>Lp(e)===Lp(t)?Yk(e,t):Lp(e)>Lp(t)?1:-1,Vy={status:LH,"last updated":Yk},Wk=e=>e*parseFloat(getComputedStyle(document.documentElement).fontSize),OH=()=>{const[e,t]=ye("dark");return xo(()=>{const n=window.matchMedia("(prefers-color-scheme: dark)");t(n.matches?"dark":"light");const r=i=>{t(i.matches?"dark":"light")};n.addEventListener("change",r),Fe(()=>n.removeEventListener("change",r))}),e},ca=(e,t,n)=>{if(t.length===0)return n;if(e instanceof Map){const r=new Map(e);if(t.length===1)return r.set(t[0],n),r;const[i,...s]=t;return r.set(i,ca(r.get(i),s,n)),r}if(e instanceof Set){const r=ca(Array.from(e),t,n);return new Set(r)}if(Array.isArray(e)){const r=[...e];if(t.length===1)return r[t[0]]=n,r;const[i,...s]=t;return r[i]=ca(r[i],s,n),r}if(e instanceof Object){const r={...e};if(t.length===1)return r[t[0]]=n,r;const[i,...s]=t;return r[i]=ca(r[i],s,n),r}return e},du=(e,t)=>{if(e instanceof Map){const n=new Map(e);if(t.length===1)return n.delete(t[0]),n;const[r,...i]=t;return n.set(r,du(n.get(r),i)),n}if(e instanceof Set){const n=du(Array.from(e),t);return new Set(n)}if(Array.isArray(e)){const n=[...e];if(t.length===1)return n.filter((s,o)=>o.toString()!==t[0]);const[r,...i]=t;return n[r]=du(n[r],i),n}if(e instanceof Object){const n={...e};if(t.length===1)return delete n[t[0]],n;const[r,...i]=t;return n[r]=du(n[r],i),n}return e},BH=(e,t)=>{if(!e||document.querySelector("#_goober")||(t==null?void 0:t.querySelector("#_goober")))return;const r=document.createElement("style"),i=document.createTextNode("");r.appendChild(i),r.id="_goober",r.setAttribute("nonce",e),t?t.appendChild(r):document.head.appendChild(r)},AH=(eI=class{constructor(e){Wn(this,Nl);Wn(this,sd);Wn(this,od);Wn(this,ad);Wn(this,wa,!1);Wn(this,ld);Wn(this,jl);Wn(this,Fl);Wn(this,Gl);Wn(this,Vl);Wn(this,$l);Wn(this,Yl);Wn(this,cd);const{client:t,queryFlavor:n,version:r,onlineManager:i,buttonPosition:s,position:o,initialIsOpen:a,errorTypes:l,styleNonce:u,shadowDOMTarget:d}=e;Dn(this,Nl,ye(t)),Dn(this,od,n),Dn(this,ad,r),Dn(this,sd,i),Dn(this,ld,u),Dn(this,jl,d),Dn(this,Fl,ye(s)),Dn(this,Gl,ye(o)),Dn(this,Vl,ye(a)),Dn(this,$l,ye(l))}setButtonPosition(e){jt(this,Fl)[1](e)}setPosition(e){jt(this,Gl)[1](e)}setInitialIsOpen(e){jt(this,Vl)[1](e)}setErrorTypes(e){jt(this,$l)[1](e)}setClient(e){jt(this,Nl)[1](e)}mount(e){if(jt(this,wa))throw new Error("Devtools is already mounted");const t=j5(()=>{const n=this,[r]=jt(this,Fl),[i]=jt(this,Gl),[s]=jt(this,Vl),[o]=jt(this,$l),[a]=jt(this,Nl);let l;return jt(this,Yl)?l=jt(this,Yl):(l=_5(()=>Promise.resolve().then(()=>Ste)),Dn(this,Yl,l)),BH(jt(this,ld),jt(this,jl)),B(l,Xe({get queryFlavor(){return jt(n,od)},get version(){return jt(n,ad)},get onlineManager(){return jt(n,sd)},get shadowDOMTarget(){return jt(n,jl)}},{get client(){return a()},get buttonPosition(){return r()},get position(){return i()},get initialIsOpen(){return s()},get errorTypes(){return o()}}))},e);Dn(this,wa,!0),Dn(this,cd,t)}unmount(){var e;if(!jt(this,wa))throw new Error("Devtools is not mounted");(e=jt(this,cd))==null||e.call(this),Dn(this,wa,!1)}},Nl=new WeakMap,sd=new WeakMap,od=new WeakMap,ad=new WeakMap,wa=new WeakMap,ld=new WeakMap,jl=new WeakMap,Fl=new WeakMap,Gl=new WeakMap,Vl=new WeakMap,$l=new WeakMap,Yl=new WeakMap,cd=new WeakMap,eI);function PH(e){const t=s5(e.client),n=le.useRef(null),{buttonPosition:r,position:i,initialIsOpen:s,errorTypes:o,styleNonce:a,shadowDOMTarget:l}=e,[u]=le.useState(new AH({client:t,queryFlavor:"React Query",version:"5",onlineManager:r5,buttonPosition:r,position:i,initialIsOpen:s,errorTypes:o,styleNonce:a,shadowDOMTarget:l}));return le.useEffect(()=>{u.setClient(t)},[t,u]),le.useEffect(()=>{r&&u.setButtonPosition(r)},[r,u]),le.useEffect(()=>{i&&u.setPosition(i)},[i,u]),le.useEffect(()=>{u.setInitialIsOpen(s||!1)},[s,u]),le.useEffect(()=>{u.setErrorTypes(o||[])},[o,u]),le.useEffect(()=>(n.current&&u.mount(n.current),()=>{u.unmount()}),[u]),c.jsx("div",{dir:"ltr",className:"tsqd-parent-container",ref:n})}var NH=[],jH=NH.NODE_ENV!=="development"?function(){return null}:PH;let $y;function FH(e){$y=e}function GH(e){return t=>{if(!$y)throw new Error("Query client not set.");return c.jsxs(BI,{client:$y,children:[c.jsx(jH,{initialIsOpen:!1}),c.jsx(e,{...t},void 0)]})}}function VH(e){return{state:{shell:e,axios:e.createAxios({...e0,baseURL:`${UI(e)}`}),rolloutsAxios:e.createAxios({...e0,baseURL:`${zI(e)}`})},actions:{i18n(t,n,r){return e.translate(n,r)},showModal(t,n,r){return e.showModal(n,r)},showToasterMessage(t,n){e.showToasterMessage(n)}}}}function $H(e){const t=VH(e);return{state:{...t.state},actions:{...t.actions}}}const YH={"Recipes.UIFeature.Name":"Recipes","Recipes.UIFeature.Description":"Manage your system update definitions","Recipes.List.BladeHeader":"Recipes","Recipes.Details.BladeHeader":"Recipe","ModuleUpdateDefinitions.Details.BladeHeader":"Module update definition","SystemDistributionSets.Details.BladeHeader":"System distribution set","Recipes.List.Empty":"No recipes found","Signatures.List.Empty":"No signatures found","ModuleUpdateDefinitions.List.Empty":"No module update definitions found","SystemDistributionSets.List.Empty":"No distribution sets found","Recipes.Label.Recipe":"Recipe","Recipes.Label.PublishedAt":"Published at","Recipes.Label.PublishedBy":"Published by","Recipes.Label.ApprovedAt":"Approved at","Recipes.Label.ApprovedBy":"Approved by","Recipes.Label.Content":"Content","Recipes.Label.RecipeFile":"Recipe file","Recipes.Label.SignatureName":"Signature name","Recipes.Label.StateRemark":"Remark","Recipes.Label.ApprovalRemark":"Approval remark","Recipes.Label.ModuleUpdateDefinitions":"Module update definitions","Recipes.Label.SystemDistributionSets":"System distribution sets","Recipes.Label.Validity":"Validity","Recipes.Label.ValidationState":"Validation state","Recipes.Label.LastValidationTriggeredBy":"Last validated by","Recipes.Label.LastValidationTriggeredAt":"Last validated at","Recipes.Label.Validity.Tooltip":`Errors: {errors}
|
100
|
+
Warnings: {warnings}
|
101
|
+
Info: {info}`,"Recipes.Label.Actions":"Actions","Recipes.Label.Coverage":"Coverage","Recipes.Label.Export.SelectTenant":"Select tenant","ModuleUpdateDefinitions.Label.Query":"Module query","ModuleUpdateDefinitions.Label.CountQuery":"Count query","Recipes.Doc.State.Tooltip":"Recipe state","Recipes.Doc.Validity.Tooltip":"Recipe validity","Recipes.State.Draft":"Draft","Recipes.State.WaitingForSignature":"Waiting for signature","Recipes.State.ReleaseCandidate":"Release candidate","Recipes.State.WaitingForApproval":"Waiting for approval","Recipes.State.Released":"Released","Recipes.State.Inactive":"Inactive","Recipes.State.Revoked":"Revoked","Recipes.ValidationState.Pending":"Validation pending","Recipes.ValidationState.InProgress":"Validation in progress","Recipes.ValidationState.Valid":"Valid","Recipes.ValidationState.Invalid":"Invalid","Recipes.Coverage.VeryHigh":"Very high","Recipes.Coverage.Tooltip.VeryHigh":"Very high coverage","Recipes.Coverage.High":"High","Recipes.Coverage.Tooltip.High":"High coverage","Recipes.Coverage.Medium":"Medium","Recipes.Coverage.Tooltip.Medium":"Medium coverage","Recipes.Coverage.Low":"Low","Recipes.Coverage.Tooltip.Low":"Low coverage","Recipes.Coverage.VeryLow":"Very low","Recipes.Coverage.Tooltip.VeryLow":"Very low coverage","Recipes.Coverage.None":"No matches were found","Recipes.Coverage.Tooltip.None":"No matches were found","Recipes.Coverage.InProgress":"In progress","Recipes.Coverage.Tooltip.InProgress":"Coverage calculation in progress","Recipes.Export.Title":"Export {count, plural, =1 {recipe {id}} other {{count} recipes}}","Recipes.Export.Tenant.Hint":"This action will export the recipe, including its module update definitions, system distribution sets, metadata, and tags to the selected tenant.","Recipes.Export.Download.Hint":"You can also download the recipe as a JSON file to import it manually.","Recipes.Export.Success":"Recipe successfully exported","Recipes.Export.Error":"Recipe export failed","Recipes.Export.NotPermitted":"Insufficient permissions for the selected tenant","Recipes.BulkExport.Title":"Export {count, plural, =1 {recipe} other {{count} recipes}}","Recipes.BulkExport.UnsupportedAction":"You cannot export {count, plural, one {# recipe} other {# recipes}} because you lack sufficient permissions.","Recipes.BulkExport.TooManyItems":"Limit exceeded. Exporting recipes is limited to {max} recipes.","Recipes.BulkExport.Tenant.Hint":"This action will export the {count, plural, one {recipe} other {recipes}}, including their module update definitions, system distribution sets, metadata, and tags to the selected tenant.","Recipes.BulkExport.Progress.Title":"Performing export of {count, plural, one {# recipe} other {# recipes}}","Recipes.BulkExport.ShowExportedRecipes":"Show exported recipes","Recipes.BulkEdit.Title":"{totalCount, plural, =1 {Edit recipe} other {{compatibleCount, plural, =1 {Edit 1 of {totalCount} recipes} other {Edit {compatibleCount} {allCompatible, select, true {recipes} other {of {totalCount} recipes}}}}}}","Recipes.BulkEdit.Hint":"Choose an action you want to perform.","Recipes.BulkEdit.TooManyItems":"Limit exceeded. This action is limited to {max} recipes.","Recipes.BulkEdit.UnsupportedAction":"You cannot edit {count, plural, one {# recipe because it is in an incompatible state or you lack sufficient permissions.} other {# recipes because they are in an incompatible state or you lack sufficient permissions.}}","Recipes.BulkEdit.Metadata":"Edit recipe metadata","Recipes.BulkEdit.SystemDistributionSet":"Edit system distribution sets","Recipes.BulkEdit.Metadata.Title":"Edit metadata for {count} {count, plural, =1 {recipe} other {recipes}}","Recipes.BulkEdit.Metadata.Mode.Label":"Mode","Recipes.BulkEdit.Metadata.Mode.AddToExisting":"Add to existing (Adds new items created below if not already present)","Recipes.BulkEdit.Metadata.Mode.ClearEntries":"Clear entries (Removes the selected items if present)","Recipes.BulkEdit.Metadata.Mode.ReplaceAll":"Replace all with (Deletes the currently configured items and replaces them with the ones created below)","Recipes.BulkEdit.Metadata.DuplicateKeys":"Duplicated keys found: {keys}. Please ensure that each key is unique.","Recipes.BulkEdit.Metadata.KeysToDelete":"Deletable keys","Recipes.BulkEdit.Metadata.SearchKeys":"Search keys","Recipes.BulkEdit.Metadata.List.Key":"Key","Recipes.BulkEdit.Metadata.List.KeyPlaceholder":"Enter key","Recipes.BulkEdit.Metadata.List.Value":"Value","Recipes.BulkEdit.Metadata.List.ValuePlaceholder":"Enter value","Recipes.BulkEdit.Metadata.Progress.Title":"Performing metadata update on {count, plural, one {# recipe} other {# recipes}}","Recipes.BulkEdit.SysDs.Title":"Edit system distribution sets for {count} {count, plural, =1 {recipe} other {recipes}}","Recipes.BulkEdit.SysDs.Mode.Label":"Mode","Recipes.BulkEdit.SysDs.Mode.Add":"Add to existing","Recipes.BulkEdit.SysDs.Mode.Add.DsDropdown.SupportedByAll":"all supported","Recipes.BulkEdit.SysDs.Mode.Add.DsDropdown.SupportedByCount":"{count} supported","Recipes.BulkEdit.SysDs.Mode.Add.DsDropdown.SupportedByCount.UnsupportedActions":"Selected distribution set is incompatible with {count , plural, one {# recipe} other {# recipes}}","Recipes.BulkEdit.SysDs.Mode.Delete":"Delete","Recipes.BulkEdit.SysDs.Progress.Title":"Performing system distribution set update on {count, plural, one {# recipe} other {# recipes}}","Recipes.BulkOperation.FeedbackModal.Progress":"Processing {completed} of {total}: {name}","Recipes.BulkOperation.FeedbackModal.Success":"{count} completed successfully","Recipes.BulkOperation.FeedbackModal.Success.All":"All operations completed successfully","Recipes.BulkOperation.FeedbackModal.Error":"{count} operations failed","Recipes.BulkOperation.FeedbackModal.Canceled":"Operation canceled","Recipes.BulkOperation.FeedbackModal.FailureDetails":"Errors ({count})","Recipes.Link.ViewMatchingSystems":"View matching systems","Recipes.Details.ActionsMenu.Title":"Recipe actions","Recipes.Button.Validate":"Validate","Recipes.Button.ValidationReport":"Open validation report","Recipes.Validate.Headline":"{totalCount, plural, =1 {Validate recipe} other {{compatibleCount, plural, =1 {Validate 1 of {totalCount} recipes} other {Validate {compatibleCount} {allCompatible, select, true {recipes} other {of {totalCount} recipes}}}}}}?","Recipes.Validate.Message":"{count, plural, one {This action will trigger the validation of the recipe. The current validation report will be discarded.} other {This action will trigger the validation of the recipes. The current validation reports will be discarded.}}","Recipes.Validate.EntityInfo":'Do you want to validate "{entity}"?',"Recipes.Validate.List.Header":"Show list","Recipes.Validate.Success":"{count, plural, one {Validation successfully triggered for # recipe.} other {Validation successfully triggered for # recipes.}}","Recipes.Validate.Failed":"{count, plural, one {Validation could not be triggered for # recipe.} other {Validation could not be triggered for # recipes.}}","Recipes.Validate.UnsupportedAction":"You cannot validate {count, plural, one {# recipe because it is in an incompatible state or you lack sufficient permissions.} other {# recipes because they are in an incompatible state or you lack sufficient permissions.}}","Recipes.ValidationReport.Title":"Validation report for recipe {id}","Recipes.ValidationReport.Errors":"Errors ({count})","Recipes.ValidationReport.Warnings":"Warnings ({count})","Recipes.ValidationReport.Info":"Info ({count})","Recipes.ValidationReport.Outdated":"This validation report is outdated. Reason: Recipe has been modified.","Recipes.LifecycleActions.Promote":"Promote","Recipes.LifecycleActions.Demote":"Demote","Recipes.LifecycleActions.RequestApproval":"Request approval","Recipes.LifecycleActions.Approve":"Approve","Recipes.LifecycleActions.Deny":"Deny","Recipes.LifecycleActions.Deactivate":"Deactivate","Recipes.LifecycleActions.Revoke":"Revoke","Recipes.StateChange.Promote.Title":"{totalCount, plural, =1 {Promote recipe} other {{compatibleCount, plural, =1 {Promote 1 of {totalCount} recipes} other {Promote {compatibleCount} {allCompatible, select, true {recipes} other {of {totalCount} recipes}}}}}} to release candidate state?","Recipes.StateChange.Promote.Message":"This action will promote {count, plural, one {the recipe} other {the recipes}} to release candidate state","Recipes.StateChange.Promote.Triggered":"Recipe promotion ongoing - waiting for validation results","Recipes.StateChange.Demote.Title":"{totalCount, plural, =1 {Demote recipe} other {{compatibleCount, plural, =1 {Demote 1 of {totalCount} recipes} other {Demote {compatibleCount} {allCompatible, select, true {recipes} other {of {totalCount} recipes}}}}}} to draft state?","Recipes.StateChange.Demote.Message":"This action will demote {count, plural, one {the recipe} other {the recipes}} to draft state and delete the recipe file and signatures","Recipes.StateChange.RequestApproval.Title":"{totalCount, plural, =1 {Request approval to release the recipe} other {{compatibleCount, plural, =1 {Request approval to release 1 of {totalCount} recipes} other {Request approval to release {compatibleCount} {allCompatible, select, true {recipes} other {of {totalCount} recipes}}}}}}?","Recipes.StateChange.RequestApproval.Message":"This action will set {count, plural, one {the recipe} other {the recipes}} to waiting for approval state","Recipes.StateChange.Approve.Title":"{totalCount, plural, =1 {Approve the release of the recipe} other {{compatibleCount, plural, =1 {Approve the release of 1 of {totalCount} recipes} other {Approve the release of {compatibleCount} {allCompatible, select, true {recipes} other {of {totalCount} recipes}}}}}}?","Recipes.StateChange.Approve.Message":"This action will set {count, plural, one {the recipe} other {the recipes}} to released state","Recipes.StateChange.Deny.Title":"{totalCount, plural, =1 {Deny the release of the recipe} other {{compatibleCount, plural, =1 {Deny the release of 1 of {totalCount} recipes} other {Deny the release of {compatibleCount} {allCompatible, select, true {recipes} other {of {totalCount} recipes}}}}}}?","Recipes.StateChange.Deny.Message":"This action will set {count, plural, one {the recipe} other {the recipes}} to release candidate state","Recipes.StateChange.Deactivate.Title":"{totalCount, plural, =1 {Deactivate the recipe} other {{compatibleCount, plural, =1 {Deactivate 1 of {totalCount} recipes} other {Deactivate {compatibleCount} {allCompatible, select, true {recipes} other {of {totalCount} recipes}}}}}}?","Recipes.StateChange.Deactivate.Message":"This action will set {count, plural, one {the recipe} other {the recipes}} to inactive state so that {count, plural, one {it is} other {they are}} no longer considered for system updates. To re-activate {count, plural, one {the recipe} other {the recipes}}, an approval is required.","Recipes.StateChange.Revoke.Title":"{totalCount, plural, =1 {Revoke the recipe} other {{compatibleCount, plural, =1 {Revoke 1 of {totalCount} recipes} other {Revoke {compatibleCount} {allCompatible, select, true {recipes} other {of {totalCount} recipes}}}}}}?","Recipes.StateChange.Revoke.Message":"This action will revoke {count, plural, one {the recipe} other {the recipes}} so that {count, plural, one {it is} other {they are}} no longer considered for system updates","Recipe.StateChange.Success":"Recipe state successfully changed","Recipe.StateChange.Failed":"State change failed for {failedActionsCount} of {overallCount} recipes","Recipes.StateChange.UnsupportedAction":"This action is not applicable to {count, plural, one {# recipe} other {# recipes}} due to an incompatible state.","Recipes.StateChange.TooManyItems":"Limit exceeded. This action is limited to {max} recipes.","Recipe.StateRemark.Label":"Remark (optional)","Recipes.Button.AddSignature":"Add signature","Recipes.Popup.FilterList.Headline":"Select recipes filter","Recipes.Popup.Add.Headline":"Add recipe","Recipes.Popup.Edit.Headline":"Edit recipe","Recipes.Popup.Clone.Headline":"Clone recipe","Recipes.Popup.Import.Headline":"Import recipe","Recipes.Popup.Delete.Headline":"Delete recipe?","Recipes.Popup.Delete.Info":"This action will delete the recipe, including the recipe file and its signatures.","Recipes.Import.Error:InvalidJson":"Invalid file format.","Recipes.Import.Error:BadJson":"Invalid input file. Please fix the error below and try to import again: {error}","Recipes.Info.Add.Success":"Recipe successfully added","Recipes.Info.Edit.Success":"Recipe successfully updated","Recipes.Info.Import.Success":"Recipe successfully imported","Recipes.Info.Clone.Success":"Recipe successfully cloned","Recipes.Info.Delete.Success":"Recipe successfully deleted","Recipes.Popup.BulkDelete.Headline":"{totalCount, plural, =1 {Delete recipe} other {{compatibleCount, plural, =1 {Delete 1 of {totalCount} recipes} other {Delete {compatibleCount} {allCompatible, select, true {recipes} other {of {totalCount} recipes}}}}}}?","Recipes.Popup.BulkDelete.Success":"{count, plural, =1 {Recipe} other {{count} recipes}} successfully deleted","Recipes.Info.BulkDelete.Failed":"{failedActionsCount, plural, one {Could not delete # recipe} other {Could not delete # recipes}}","Recipes.Info.BulkDelete.UnsupportedAction":"You cannot delete {count, plural, one {# recipe because it is in an incompatible state or you lack sufficient permissions.} other {# recipes because they are in an incompatible state or you lack sufficient permissions.}}","ModuleUpdateDefinition.Info.Add.Success":"Module update definition successfully added","ModuleUpdateDefinition.Info.Edit.Success":"Module update definition successfully updated","ModuleUpdateDefinition.Info.Delete.Success":"Module update definition successfully deleted","ModuleUpdateDefinition.Popup.Add.Headline":"Add module update definition","ModuleUpdateDefinition.Popup.Add.ModuleTypeSelectionHint":"Begin by choosing the module type for this module update definition. This selection will automatically fill in the other fields with their default values, which you can then refine.","ModuleUpdateDefinition.Popup.Edit.Headline":"Edit module update definition","ModuleUpdateDefinition.Popup.Delete.Headline":"Delete module update definition?","ModuleUpdateDefinition.Info.Move.Error":"Unable change order: {error}","ModuleUpdateDefinition.Details.ActionsMenu.Title":"Module update definition actions","SystemDistributionSet.Info.Add.Success":"System distribution set successfully added","SystemDistributionSet.Info.Edit.Success":"System distribution set successfully updated","SystemDistributionSet.Info.Delete.Success":"System distribution set successfully deleted","SystemDistributionSet.Popup.Add.Headline":"Add system distribution set","SystemDistributionSet.Popup.Edit.Headline":"Edit system distribution set","SystemDistributionSet.Popup.Delete.Headline":"Delete system distribution set?","SystemDistributionSet.Details.ActionsMenu.Title":"System distribution set actions","Signature.Popup.Delete.Headline":"Delete signature?","Signature.Info.Delete.Success":"Signature successfully deleted","Signature.List.TaskStarted":"(Task started {startedAt} {unit} ago)","Recipes.Error.SignatureNameAlreadyExists":"A signature with the same name already exists for this recipe"},Yy="RecipeStateChangeModal",Wy="RecipeAssignTagModal",Hy="RecipeAddModal",Zy="RecipeEditModal",Uy="RecipeImportModal",zy="RecipeCloneModal",qy="RecipeExportModal",Xy="RecipeBulkExportModal",Ky="RecipeBulkTagOperationModal",Qy="RecipeBulkEditSelectionModal",Jy="RecipeBulkEditMetadataModal",ev="RecipeBulkEditSysDsModal",tv="RecipeBulkActionProgressModal",nv="RecipeValidateModal",rv="RecipeValidationReportModal",iv="RecipesFilterModal",sv="ModuleUpdateDefinitionAddModal",ov="ModuleUpdateDefinitionEditModal",av="SystemDistributionSetAddModal",lv="SystemDistributionSetEditModal";function WH(e,t){const n=R(),r=Wt(),i=Ke();return ln({onError:()=>{i.invalidateQueries(Pe.all())},onSuccess:s=>{i.invalidateQueries(Pe.all()),t(s)},mutationKey:e.length===1?Pe.setState(e[0]):Pe.list(),mutationFn:async s=>(await r.post(s.url,e,{params:{remark:s.remark},headers:{"Content-Type":"application/json"}}).catch(a=>{throw It(n,a)})).data})}function ht(){const{actions:e}=ka();return e.showToasterMessage}const HH="soup:list-columns",ZH="soup:sorted-columns",cv="MetadataFormModal",mr=50,fu={label:"Unknown",iconName:"question",color:"black"},uv=new Map([["promote",{title:"Recipes.StateChange.Promote.Title",msg:"Recipes.StateChange.Promote.Message",btn:"Recipes.LifecycleActions.Promote"}],["demote",{title:"Recipes.StateChange.Demote.Title",msg:"Recipes.StateChange.Demote.Message",btn:"Recipes.LifecycleActions.Demote"}],["release",{title:"Recipes.StateChange.RequestApproval.Title",msg:"Recipes.StateChange.RequestApproval.Message",btn:"Recipes.LifecycleActions.RequestApproval"}],["approve",{title:"Recipes.StateChange.Approve.Title",msg:"Recipes.StateChange.Approve.Message",btn:"Recipes.LifecycleActions.Approve"}],["deny",{title:"Recipes.StateChange.Deny.Title",msg:"Recipes.StateChange.Deny.Message",btn:"Recipes.LifecycleActions.Deny"}],["deactivate",{title:"Recipes.StateChange.Deactivate.Title",msg:"Recipes.StateChange.Deactivate.Message",btn:"Recipes.LifecycleActions.Deactivate"}],["revoke",{title:"Recipes.StateChange.Revoke.Title",msg:"Recipes.StateChange.Revoke.Message",btn:"Recipes.LifecycleActions.Revoke"}]]);function UH(e){var S,w,_;const t=R(),n=x.useRef(null),r=ht(),{onClose:i}=e,{url:s,action:o,recipes:a,onSuccess:l}=e.options??{};if(!o||!s||!a||a.length===0)throw new Error("Options missing");const u=a.filter(T=>{var M,C;return(C=(M=T._links)==null?void 0:M[o])==null?void 0:C.href}).map(T=>T.id),{mutate:d,isLoading:f,error:p}=WH(u,T=>{Object.keys(T.failedActions).length>0?r(t("Recipe.StateChange.Failed",{failedActionsCount:Object.keys(T.failedActions).length,overallCount:u.length})):r(t(o==="promote"?"Recipes.StateChange.Promote.Triggered":"Recipe.StateChange.Success")),l&&l(T),i()}),h=((S=uv.get(o))==null?void 0:S.title)??"",m=((w=uv.get(o))==null?void 0:w.msg)??"",y=((_=uv.get(o))==null?void 0:_.btn)??"";function b(){var T;d({remark:(T=n.current)==null?void 0:T.value,url:s??""})}const g=a.length-u.length,v=u.length;return x.useEffect(()=>{var T;(T=n.current)==null||T.focus()},[]),c.jsxs(D.Dialog,{variant:"warning",dialogId:Yy,title:t(h,{totalCount:a.length,compatibleCount:v,allCompatible:v===a.length}),onClose:i,modal:!0,open:!0,onKeyUp:T=>{T.key==="Enter"&&!f&&b()},children:[c.jsx("p",{children:t(m,{count:a.length-g})}),c.jsx(D.TextField,{id:"text-field-state-remark",ref:n,label:t("Recipe.StateRemark.Label")}),v>mr?c.jsx(D.Notification,{type:"error",children:t("Recipes.StateChange.TooManyItems",{max:mr})}):g>0&&c.jsx(D.Notification,{type:"warning",children:t("Recipes.StateChange.UnsupportedAction",{count:g})}),p&&c.jsx(pe,{error:p}),f&&c.jsx(D.ProgressIndicator,{type:"indeterminate"}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:t("Button.Cancel"),mode:"secondary",onClick:i,disabled:f}),c.jsx(D.Button,{label:t(y),mode:"primary",onClick:b,disabled:f||v>mr})]})]})}function en({useFormReturn:e,field:t,label:n,maxSize:r,onChange:i,notificationText:s,notAllowedDuplicates:o=[],validationPattern:a,isRequired:l=!1,isDisabled:u=!1,autoFocus:d=!1}){const f=R(),p=h=>!o.find(m=>h.trim()===m)||f("Input.Validation.AlreadyExists");return u?c.jsx(c.Fragment,{}):c.jsx(D.FormField,{fieldType:"text",notificationType:"error",notificationText:s,children:c.jsx(D.TextField,{autoFocus:d,required:l,id:t,disabled:u,label:f(n),...e.register(t,{onChange:h=>i==null?void 0:i(h.target.value),required:l?f("Input.FieldIsRequired"):void 0,maxLength:{value:r,message:f("Input.Validation.MaxTextSize",{size:r})},pattern:a,validate:h=>p(String(h))})})})}function _o({useFormReturn:e,field:t,label:n,maxSize:r,notificationText:i,isDisabled:s=!1}){const o=R();return s?c.jsx(c.Fragment,{}):c.jsx(D.FormField,{fieldType:"textarea",notificationType:"error",notificationText:i,children:c.jsx(D.TextArea,{id:t,label:o(n),disabled:s,onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0,...e.register(t,{maxLength:{value:r,message:o("Input.Validation.MaxTextSize",{size:r})}})})})}function Hk(){const e=R();return{value:/^attribute\.[a-zA-Z0-9.-=;, _$€¥()]+$/,message:e("Input.Validator.WrongModuleQueryInput")}}function Zk(){const e=R();return{value:/^count(=gt=|=lt=|==|=ge=|=le=)\d+$/,message:e("Input.Validator.WrongCountQueryInput")}}function gr(){const e=R();return{value:/^[a-zA-Z0-9À-ÿ\u0027`´&\-+=#€¥$%.;,:!()[\]_ ]+$/,message:e("Input.Validator.WrongTextInput")}}function zH(){const e=R();return{value:/^[a-zA-Z0-9._-]+$/,message:e("Input.Validator.WrongVersionInput")}}const Uk="data:text/markdown;base64,VGhlIHRvdGFsIGFydGlmYWN0IHNpemUgdmFsaWRhdG9yIGFsbG93cyB0aGUgY29uZmlndXJhdGlvbiBvZiBhIG1heGltdW0gdG90YWwgYXJ0aWZhY3Qgc2l6ZSBmb3IgYSByZWNpcGUuIEluIGFkZGl0aW9uLCBhIGxpc3Qgb2Ygc29mdHdhcmUgbW9kdWxlIHR5cGVzIGNhbiBiZSBwcm92aWRlZCwgd2hpY2ggd2lsbCBiZSBleGNsdWRlZCBmcm9tIHRoZSBjYWxjdWxhdGlvbiAoZS5nLiwgcmVsZWFzZSBub3RlcykuCg==",zk="data:text/markdown;base64,VGhlIGRpc3RyaWJ1dGlvbiBzZXQgYXNzaWdubWVudCB2YWxpZGF0b3IgZW5zdXJlcyB0aGF0IGFsbCBtb2R1bGUgdXBkYXRlIGRlZmluaXRpb25zIG9mIGFuIHVwZGF0YWJsZSBtb2R1bGUgdHlwZSBoYXZlIGEgZGlzdHJpYnV0aW9uIHNldCBhc3NpZ25lZC4gVXBkYXRhYmxlIG1vZHVsZSB0eXBlcyB0aGF0IHNob3VsZCBub3QgYmUgdXBkYXRlZCB3aXRoIHJlY2lwZXMgb2YgdGhpcyByZWNpcGUgdHlwZSBuZWVkIHRvIGJlIGFkZGVkIHRvIHRoZSBleGNsdXNpb24gbGlzdC4gQWRkaXRpb25hbGx5LCBpdCB2ZXJpZmllcyB0aGF0IHRoZXJlIGlzIGF0IGxlYXN0IG9uZSBkaXN0cmlidXRpb24gc2V0IGZvciBlYWNoIGNvbXBhdGlibGUgZGlzdHJpYnV0aW9uIHNldCB0eXBlIGFzc29jaWF0ZWQgd2l0aCB0aGUgc3lzdGVtIHR5cGUuCg==",qk="data:text/markdown;base64,VGhlIHRhZyBhc3NpZ25tZW50IHZhbGlkYXRvciBhbGxvd3MgeW91IHRvIHJlcXVpcmUgcmVjaXBlcyB0byBoYXZlIGNlcnRhaW4gdGFncyBieSBkZWZpbmluZyBhIHJlZ3VsYXIgZXhwcmVzc2lvbiAoUmVnRXgpIGZvciBtYXRjaGluZyB0aGVpciBuYW1lIGFuZCBzcGVjaWZ5aW5nIHdoZXRoZXIgdGhleSBzaG91bGQgYmUgZXhwb3NlZCBvciBub3QuIFRoZSB2YWxpZGF0b3IgY2hlY2tzIGlmIHRoZSByZWNpcGUgaGFzIGF0IGxlYXN0IG9uZSBtYXRjaGluZyB0YWcgZm9yIGV2ZXJ5IHJ1bGUuIEl0IGlzIHBvc3NpYmxlIHRoYXQgb25lIHRhZyBjYW4gc2F0aXNmeSBtdWx0aXBsZSBydWxlcy4=",qH="data:text/markdown;base64,VGhlIHJlY2lwZSBtZXRhZGF0YSB2YWxpZGF0b3IgYWxsb3dzIHlvdSB0byBzcGVjaWZ5IG9wdGlvbmFsIGFuZCBtYW5kYXRvcnkgbWV0YWRhdGEga2V5cywgYXMgd2VsbCBhcyBhIHJlZ3VsYXIgZXhwcmVzc2lvbiAoUmVnRXgpIHRvIHZhbGlkYXRlIHRoZSBtZXRhZGF0YSB2YWx1ZXMgb2YgcmVjaXBlIG1ldGFkYXRhLiBJZiBjb25maWd1cmVkLCBvbmx5IHRoZSBzcGVjaWZpZWQga2V5cyBhcmUgYWxsb3dlZDsgb3RoZXJ3aXNlLCBhcmJpdHJhcnkgbWV0YWRhdGEga2V5cyBhbmQgdmFsdWVzIGFyZSBwZXJtaXR0ZWQuCg==",XH="data:text/markdown;base64,VGhlIG1vZHVsZSB1cGRhdGUgZGVmaW5pdGlvbiAod2l0aCBkaXN0cmlidXRpb24gc2V0KSBtZXRhZGF0YSB2YWxpZGF0b3IgYWxsb3dzIHlvdSB0byBzcGVjaWZ5IG9wdGlvbmFsIGFuZCBtYW5kYXRvcnkgbWV0YWRhdGEga2V5cywgYXMgd2VsbCBhcyBhIHJlZ3VsYXIgZXhwcmVzc2lvbiAoUmVnRXgpIHRvIHZhbGlkYXRlIHRoZSBtZXRhZGF0YSB2YWx1ZXMgb2YgbW9kdWxlIHVwZGF0ZSBkZWZpbml0aW9ucyB3aXRoIGEgZGlzdHJpYnV0aW9uIHNldC4gSWYgY29uZmlndXJlZCwgb25seSB0aGUgc3BlY2lmaWVkIGtleXMgYXJlIGFsbG93ZWQ7IG90aGVyd2lzZSwgYXJiaXRyYXJ5IG1ldGFkYXRhIGtleXMgYW5kIHZhbHVlcyBhcmUgcGVybWl0dGVkLgo=",KH="data:text/markdown;base64,VGhlIG1vZHVsZSB1cGRhdGUgZGVmaW5pdGlvbiAod2l0aG91dCBkaXN0cmlidXRpb24gc2V0KSBtZXRhZGF0YSB2YWxpZGF0b3IgYWxsb3dzIHlvdSB0byBzcGVjaWZ5IG9wdGlvbmFsIGFuZCBtYW5kYXRvcnkgbWV0YWRhdGEga2V5cywgYXMgd2VsbCBhcyBhIHJlZ3VsYXIgZXhwcmVzc2lvbiAoUmVnRXgpIHRvIHZhbGlkYXRlIHRoZSBtZXRhZGF0YSB2YWx1ZXMgb2YgbW9kdWxlIHVwZGF0ZSBkZWZpbml0aW9ucyB3aXRob3V0IGEgZGlzdHJpYnV0aW9uIHNldC4gSWYgY29uZmlndXJlZCwgb25seSB0aGUgc3BlY2lmaWVkIGtleXMgYXJlIGFsbG93ZWQ7IG90aGVyd2lzZSwgYXJiaXRyYXJ5IG1ldGFkYXRhIGtleXMgYW5kIHZhbHVlcyBhcmUgcGVybWl0dGVkLgo=",QH="data:text/markdown;base64,VGhlIHN5c3RlbSBkaXN0cmlidXRpb24gc2V0IG1ldGFkYXRhIHZhbGlkYXRvciBhbGxvd3MgeW91IHRvIHNwZWNpZnkgb3B0aW9uYWwgYW5kIG1hbmRhdG9yeSBtZXRhZGF0YSBrZXlzLCBhcyB3ZWxsIGFzIGEgcmVndWxhciBleHByZXNzaW9uIChSZWdFeCkgdG8gdmFsaWRhdGUgdGhlIG1ldGFkYXRhIHZhbHVlcyBvZiBzeXN0ZW0gZGlzdHJpYnV0aW9uIHNldHMuIElmIGNvbmZpZ3VyZWQsIG9ubHkgdGhlIHNwZWNpZmllZCBrZXlzIGFyZSBhbGxvd2VkOyBvdGhlcndpc2UsIGFyYml0cmFyeSBtZXRhZGF0YSBrZXlzIGFuZCB2YWx1ZXMgYXJlIHBlcm1pdHRlZC4K",Xk=["recipe_metadata","module_update_definition_with_ds_metadata","module_update_definition_without_ds_metadata","system_distribution_set_metadata"],Kk={total_artifact_size:{id:"total_artifact_size",name:"RecipeTypes.Validation.ArtifactSize.Caption",icon:"box-place",docsPath:Uk},distribution_set_assignment:{id:"distribution_set_assignment",name:"RecipeTypes.Validation.DistributionSet.Caption",icon:"box-checkmark",docsPath:zk},tag_assignment:{id:"tag_assignment",name:"RecipeTypes.Validation.TagAssignment.Caption",icon:"label-info",docsPath:qk},recipe_metadata:{id:"recipe_metadata",name:"RecipeTypes.Validation.RecipeMetadata.Caption",icon:"clipboard-checkmark",docsPath:qH,apiPathVariable:"recipe"},module_update_definition_with_ds_metadata:{id:"module_update_definition_with_ds_metadata",name:"RecipeTypes.Validation.MudWithDsMetadata.Caption",icon:"clipboard-checkmark",docsPath:XH,apiPathVariable:"module-update-definition-with-ds"},module_update_definition_without_ds_metadata:{id:"module_update_definition_without_ds_metadata",name:"RecipeTypes.Validation.MudWithoutDsMetadata.Caption",icon:"clipboard-checkmark",docsPath:KH,apiPathVariable:"module-update-definition-without-ds"},system_distribution_set_metadata:{id:"system_distribution_set_metadata",name:"RecipeTypes.Validation.SysDsMetadata.Caption",icon:"clipboard-checkmark",docsPath:QH,apiPathVariable:"system-distribution-set"}};function JH(){return Object.fromEntries(Object.entries(Kk).filter(([e])=>Xk.includes(e)))}const pu=Kk,Op=JH(),Vt={...Kn("recipe-types"),...tu(({typeId:e})=>Vt.entityDetails(e))},hu={...Kn("artifactSizeValidationRule")},Gs={...Kn("distributionSetAssignmentValidator"),listModuleTypes:e=>[...Gs.entityDetails(e),"listModuleTypes"],setModuleTypes:e=>[...Gs.entityDetails(e),Gs.listModuleTypes(e),"setModuleTypes"]},mu={...Kn("tagAssignmentValidator")},wl={...Kn("metadataValidationRuleKeys",({recipeTypeId:e})=>Vt.entityDetails(e)),validatorDetails:(e,t)=>[...wl.entityDetails(t,{recipeTypeId:e}),Op[t].id]};function dv(e,t){const n=new URLSearchParams;return Jl(n,e.search),eo(n,t),nr(n,"systemType[]",e.systemTypeId),Ht(Vt.listFilteredWithSorting(e,t??null),"recipe-types","type",{queryParams:n})}function fv({entityName:e,selected:t,onSelect:n,dataProvider:r}){const[i,s]=x.useState(),o=x.useRef(!1),a=R(),{entities:l,totalCount:u,isLoading:d,error:f,loadMore:p,onFilter:h}=r;if(x.useEffect(()=>{if(!o.current&&t&&!d&&l.length>0){const v=l.find(S=>S.key===t);o.current=!0,v&&(n(v),s(v))}},[o,t,d,l,n]),f)return c.jsx(pe,{error:f});const m=v=>{const S=l.find(w=>w.name===v);s(S),n(S)},y=v=>{h&&h(v)},b=p&&l.length<u,g=e.toLowerCase();return c.jsx(O1,{id:`${g}Selection`,label:a(`Entity.Label.${e}`),loadMoreLabel:a("Dropdown.LoadMore"),buttonTitle:a("Dropdown.PleaseSelect"),noResultsLabel:a(`${e}Suggestion.NoResults`),resetTitle:a("Button.Reset"),entries:l.map(v=>v.name),onLoadMore:b?p:void 0,onTextChange:y,selected:i==null?void 0:i.name,onSelect:m,loading:d,renderEntry:v=>c.jsx(RS,{label:v}),autoSelect:!0})}function e4({selectedKey:e,onSelect:t}){const n=O0(dv,{search:null,systemTypeId:null});return c.jsx(fv,{entityName:"RecipeType",selected:e,onSelect:t,dataProvider:n})}function Bp(e){var S,w,_,T,M;const t=R(),{dialogId:n,onConfirm:r,onClose:i,isLoading:s,error:o,toEdit:a,formType:l}=e,u=x.useRef(!1),d=n4(o),f=sr({defaultValues:t4(a,l),mode:"onChange"}),{formState:{errors:p,isDirty:h,isValid:m}}=f;x.useEffect(()=>{u.current||(f.setFocus("name"),u.current=!0)},[f]);function y(){m&&(r==null||r(f.getValues()))}let b;l==="add"?b="Recipes.Popup.Add.Headline":l==="edit"?b="Recipes.Popup.Edit.Headline":l==="clone"?b="Recipes.Popup.Clone.Headline":b="Recipes.Popup.Import.Headline";let g;l==="add"?g="Button.Add":l==="edit"?g="Button.OK":l==="clone"?g="Button.Clone":g="Button.Import";const v=async C=>{const k=C.target.value;f.setValue("type",k,{shouldDirty:!0,shouldValidate:!0,shouldTouch:!0}),await f.trigger()};return c.jsxs(D.Dialog,{dialogId:n,title:t(b),onClose:i,modal:!0,open:!0,onKeyUp:C=>{C.key==="Enter"&&C.ctrlKey&&!s&&y()},children:[c.jsx(D.FormField,{fieldType:"dropdown",notificationType:"error",notificationText:(S=p==null?void 0:p.type)==null?void 0:S.message,children:c.jsx(e4,{selectedKey:a==null?void 0:a.type,onSelect:C=>{f.setValue("type",(C==null?void 0:C.id)??"",{shouldDirty:!0,shouldValidate:!0,shouldTouch:!0})},...f.register("type",{required:t("Input.FieldIsRequired"),onChange:C=>v(C)})})}),c.jsx(en,{useFormReturn:f,field:"name",label:"Entity.Label.Name",maxSize:255,notificationText:(w=p==null?void 0:p.name)==null?void 0:w.message,isRequired:!0,validationPattern:gr()}),c.jsx(en,{useFormReturn:f,field:"version",label:"Entity.Label.Version",maxSize:255,notificationText:(_=p==null?void 0:p.version)==null?void 0:_.message,validationPattern:zH()}),c.jsx(_o,{useFormReturn:f,field:"description",label:"Entity.Label.Description",maxSize:255,notificationText:(M=(T=f.formState.errors)==null?void 0:T.description)==null?void 0:M.message}),o&&c.jsx(pe,{error:o,messageResolver:C=>d?t("Recipes.Import.Error:BadJson",{error:C.message}):C.message}),s&&c.jsx(D.ProgressIndicator,{type:"indeterminate"}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:t("Button.Cancel"),mode:"secondary",onClick:i,disabled:s}),c.jsx(D.Button,{label:t(g),mode:"primary",onClick:y,disabled:s||!m||d||l!=="clone"&&l!=="import"&&!h})]})]})}function t4(e,t){return{name:t==="clone"?`CLONE - ${(e==null?void 0:e.name)??""}`:(e==null?void 0:e.name)??"",version:(e==null?void 0:e.version)??"",description:(e==null?void 0:e.description)??"",type:(e==null?void 0:e.type)??""}}function n4(e){return!!e&&e.code===400&&typeof e.message=="string"&&!["name","version","description"].some(t=>e.message.startsWith(t))}function ki(e,t,n,r){const i=R(),s=Wt();return ln({onError:n,onSuccess:r,mutationKey:e,mutationFn:async o=>{await s.post(t,o).catch(a=>{throw It(i,a)})}})}function r4(e){const{onClose:t}=e,n=R(),r=Ke(),i=ht(),s=()=>{i(n("Recipes.Info.Add.Success")),r.invalidateQueries(Pe.list()),t()},o=()=>{r.invalidateQueries(Pe.list())},{mutate:a,isLoading:l,error:u}=ki(Pe.addEntity(),"recipes",o,s),d=f=>{a(f)};return c.jsx(Bp,{dialogId:Hy,onConfirm:d,onClose:t,isLoading:l,error:u,formType:"add"})}function ua(e,t,n,r){const i=R(),s=Wt();return ln({onError:n,onSuccess:r,mutationKey:e,mutationFn:async o=>{await s.put(t,o).catch(a=>{throw It(i,a)})}})}function i4(e){var p;const{onClose:t}=e,{toEdit:n}=e.options??{},r=R(),i=Ke(),s=ht();if(!n)throw new Error("Options missing");const o=()=>{s(r("Recipes.Info.Edit.Success")),i.invalidateQueries(Pe.all()),t()},a=()=>{i.invalidateQueries(Pe.all())},{mutate:l,isLoading:u,error:d}=ua(Pe.updateEntity(),n._links.self.href,a,o),f=h=>{l(h)};return c.jsx(Bp,{dialogId:Zy,onConfirm:f,onClose:t,isLoading:u,error:d,toEdit:{type:((p=n.type)==null?void 0:p.key)??"",name:n.name,version:n.version??"",description:n.description??""},formType:"edit"})}function s4(e,t){const n=R(),r=Wt(),i=Ke();return ln({onError:()=>{i.invalidateQueries(Pe.all())},onSuccess:s=>{i.invalidateQueries(Pe.all()),t(s)},mutationKey:e.length==1?Pe.setState(e[0].id):Pe.list(),mutationFn:async()=>(await r.post("recipes/validate",e.map(o=>o.id)).catch(o=>{throw It(n,o)})).data})}function o4(e){const t=R(),n=ht(),{onClose:r}=e,{recipes:i}=e.options??{};if(!i||i.length===0)throw new Error("Options missing");const s=i.filter(m=>{var y,b;return!!((b=(y=m._links)==null?void 0:y.validate)!=null&&b.href)}),{mutate:o,isLoading:a,error:l}=s4(s,m=>{m.failedActions&&Object.keys(m.failedActions).length>0?n(t("Recipes.Validate.Failed",{count:m.failedActions.length})):n(t("Recipes.Validate.Success",{count:m.successfulActions.length})),r()});function u(){o()}const d=s.length,f=i.length-d,p=d===i.length;function h(m){return m.version?`${m.name}:${m.version}`:m.name}return c.jsxs(D.Dialog,{variant:"warning",dialogId:nv,title:t("Recipes.Validate.Headline",{totalCount:i.length,compatibleCount:d,allCompatible:p}),onClose:r,modal:!0,open:!0,onKeyUp:m=>{m.key==="Enter"&&!a&&u()},children:[f>0&&c.jsx(D.Notification,{type:"warning",children:t("Recipes.Validate.UnsupportedAction",{count:f})}),c.jsx("p",{children:t("Recipes.Validate.Message",{count:d})}),i.length===1&&c.jsx("p",{children:t("Recipes.Validate.EntityInfo",{entity:h(i[0])})}),i.length>1&&c.jsx("div",{className:"confirmation-dialog-scroll",children:c.jsx(ne,{header:t("Recipes.Validate.List.Header"),expanded:i.length<=5,expandable:!0,children:c.jsx("ul",{className:"confirmation-dialog-delete-list",children:i.map(m=>c.jsx("li",{className:"confirmation-dialog-list-item",children:h(m)},m.id))})})}),l&&c.jsx(pe,{error:l}),a&&c.jsx(D.ProgressIndicator,{type:"indeterminate"}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:t("Button.Cancel"),title:t("Button.Cancel"),mode:"secondary",onClick:r,disabled:a}),c.jsx(D.Button,{label:t("Recipes.Button.Validate"),title:t("Recipes.Button.Validate"),mode:"primary",onClick:u,disabled:a})]})]})}function tn({header:e,helpFile:t,children:n,expandedByDefault:r}){return c.jsxs(c.Fragment,{children:[c.jsx(D.Divider,{}),c.jsx(ne,{header:e,help:t?c.jsx(Ft,{markdownFilePath:t}):void 0,popoverHeading:e,expandable:!0,expanded:r??!1,className:"expandable-section",children:c.jsx("div",{style:{width:"100%"},children:n})})]})}function Qr({iconProps:e,tooltipOverWrite:t,showLabel:n}){const r=t??e.label;return c.jsxs(c.Fragment,{children:[c.jsx(D.Icon,{role:"img",title:r,iconName:e.iconName,style:{color:`var(--color-${e.color??"black"})`,paddingRight:"0.2rem"}}),n&&c.jsx("span",{title:r,children:e.label})]})}const a4={label:"Recipes.ValidationState.Pending",iconName:"question-frame"},l4={label:"Recipes.ValidationState.InProgress",iconName:"hourglass"},c4={label:"Recipes.ValidationState.Invalid",iconName:"problem-frame",color:"red-50"},u4={label:"Recipes.ValidationState.Valid",iconName:"alert-success"},d4=new Map([["pending",a4],["in_progress",l4],["valid",u4],["invalid",c4]]);function pv({validationState:e,withLabel:t,tooltip:n}){const r=R(),i=d4.get(e)??fu;return c.jsx(Qr,{iconProps:{iconName:i.iconName,label:r(i.label),color:i.color},tooltipOverWrite:n,showLabel:t})}const Qk="/systems",da=`${Qk}/:action?/:id?/:subEntity?/:subEntityId?`;function Ap(e){const t=Te.generatePath(da,{action:"entities",id:null,subEntity:null,subEntityId:null});return Co(t,e)}function Jk(e){return Te.generatePath(da,{action:"entities",id:e,subEntity:null,subEntityId:null})}function f4(e,t,n){return Te.generatePath(da,{action:"entities",id:e,subEntity:t,subEntityId:n})}function hv(e){const t=Te.generatePath(da,{action:"system-types",id:null,subEntity:null,subEntityId:null});return Co(t,e)}function eD(e){return Te.generatePath(da,{action:"system-types",id:e,subEntity:null,subEntityId:null})}function tD(){return Te.generatePath(da,{action:"module-types",id:null,subEntity:null,subEntityId:null})}function nD(e){return Te.generatePath(da,{action:"module-types",id:e,subEntity:null,subEntityId:null})}const rD="/recipes",ko=`${rD}/:action?/:id?/:subEntity?/:subEntityId?`;function p4(e,t={}){const n=Te.generatePath(ko,{action:"entities",id:null,subEntity:null,subEntityId:null});return`${Co(n,t)}&tenant=${e}&idp_hint=bosch-idp-azure`}function Pp(e={}){const t=Te.generatePath(ko,{action:"entities",id:null,subEntity:null,subEntityId:null});return Co(t,e)}function Do(e){return Te.generatePath(ko,{action:"entities",id:e,subEntity:null,subEntityId:null})}function mv(e,t,n){return Te.generatePath(ko,{action:"entities",id:e,subEntity:t,subEntityId:n})}function h4(){return Te.generatePath(ko,{action:"tags",id:null,subEntity:null,subEntityId:null})}function gv(e={}){const t=Te.generatePath(ko,{action:"types",id:null,subEntity:null,subEntityId:null});return Co(t,e)}function iD(e){return Te.generatePath(ko,{action:"types",id:e,subEntity:null,subEntityId:null})}function m4(e,t,n){return Te.generatePath(ko,{action:"types",id:e,subEntity:t,subEntityId:n})}const sD="/system-actions",oD=`${sD}/:action?/:id?`;function yv(e){const t=Te.generatePath(oD,{action:"entities",id:null});return Co(t,e)}function g4(e){return Te.generatePath(oD,{action:"entities",id:e})}function Co(e,t){if(!t)return e;const n=L0(t);return n.toString()?`${e}?${n.toString()}`:e}function vv({recipeId:e,msg:t}){const n=t.entityType;let r;return n==="ModuleUpdateDefinition"?r=mv(e,"module-update-definitions",t.entityId):n==="SystemDistributionSet"?r=mv(e,"system-distribution-sets",t.entityId):r=Do(e),c.jsxs(c.Fragment,{children:[c.jsxs("div",{children:[c.jsxs("span",{style:{marginRight:"8px"},children:[t.entityType,":"]}),c.jsx(D.Link,{icon:{iconName:"externallink",isUiIcon:!0},iconPosition:"right",label:t.entityId,target:"_blank",href:r,title:t.entityId})]}),c.jsxs("div",{children:["[",t.messageCode,"] ",t.message]})]})}function y4({recipe:e,validationReport:t}){const n=R();if(!e||!t)throw new Error("Options missing");const r=t.isOutdated??!1,i=t.messages??[],s=i.filter(d=>d.severity==="error"),o=i.filter(d=>d.severity==="warning"),a=i.filter(d=>d.severity==="info"),l=e.validity.validationState,u=e.id;return c.jsxs(c.Fragment,{children:[r&&c.jsx(D.Notification,{type:"warning",variant:"text",children:n("Recipes.ValidationReport.Outdated")}),c.jsxs(Mn,{label:"",className:"basic-details-layout",style:{marginBottom:"2rem"},children:[c.jsx(ne,{header:n("Recipes.Label.Recipe"),children:c.jsx(D.Link,{icon:{iconName:"externallink",isUiIcon:!0},iconPosition:"right",label:u,target:"_blank",href:Do(u),title:u})}),c.jsx(ne,{header:n("Entity.Label.CreatedAt"),children:jn(t.createdAt)}),c.jsx(ne,{header:n("Recipes.Label.Validity"),popoverHeading:n("Recipes.Doc.Validity.Tooltip"),children:c.jsx(pv,{validationState:l,withLabel:!0})})]}),c.jsx(tn,{header:n("Recipes.ValidationReport.Errors",{count:s.length}),children:c.jsx(D.List,{style:{margin:"1rem 0"},type:"dot",items:s.map(d=>c.jsx(vv,{recipeId:u,msg:d},`${d.entityId}-${d.messageCode}`))})}),c.jsx(tn,{header:n("Recipes.ValidationReport.Warnings",{count:o.length}),children:c.jsx(D.List,{style:{margin:"1rem 0"},type:"dot",items:o.map(d=>c.jsx(vv,{recipeId:u,msg:d},`${d.entityId}-${d.messageCode}`))})}),c.jsx(tn,{header:n("Recipes.ValidationReport.Info",{count:a.length}),children:c.jsx(D.List,{style:{margin:"1rem 0"},type:"dot",items:a.map(d=>c.jsx(vv,{recipeId:u,msg:d},`${d.entityId}-${d.messageCode}`))})})]})}function or(e,t,n={}){const r=R(),i=Wt();return E0({select(s){let o=s.data;return s.data===""&&(o=null),o},queryKey:e,queryFn:()=>i.get(t).catch(s=>{throw It(r,s)}),enabled:n.enabled,refetchInterval:n.refetchInterval})}function v4(e){const t=Xt(e,"validationReport");return or(Pe.validationReport(e.id),t??"",{enabled:t!==void 0})}function b4(e){const t=R(),{onClose:n}=e,{recipe:r}=e.options??{};if(!r)throw new Error("Options missing");const{isLoading:i,data:s,error:o}=v4(r);return c.jsxs(D.Dialog,{variant:"info",dialogId:rv,title:t("Recipes.ValidationReport.Title",{id:r.id}),onClose:n,modal:!0,open:!0,onKeyUp:a=>{a.key==="Enter"&&!i&&n()},children:[o&&c.jsx(pe,{error:o}),i&&c.jsx(D.ProgressIndicator,{type:"indeterminate"}),s&&c.jsx(y4,{recipe:r,validationReport:s}),c.jsx(wt,{children:c.jsx(D.Button,{label:t("Button.Close"),mode:"primary",onClick:n,disabled:i})})]})}function S4(e){const t=Object.keys(e).reduce((r,i)=>(e[i]!==void 0&&r.push([i,e[i]+""]),r),[]),n=new URLSearchParams(t);return n.sort(),n.toString()}function aD(e){return{totalCount:(e==null?void 0:e.pages[e.pages.length-1].total)??0,entities:(e==null?void 0:e.pages.flatMap(t=>t.content))??[]}}const gu={limit:100};function bv(e,t,n,r){const i=R(),s=t0();return R0({getNextPageParam:(o,a)=>{if(!a.length)return 0;const l=a.reduce((u,d)=>u+d.size,0);return o.total>l?l:void 0},...r,queryKey:e,queryFn:async o=>{const a=S4({...gu,...n,offset:o.pageParam});try{return(await s.get(`${t}?${a}`)).data}catch(l){throw It(i,l)}}})}const wn={all:["distributionSets"],lists:()=>[...wn.all,"list"],list:(e=gu)=>[...wn.lists(),e],details:()=>[...wn.all,"details"],dsDetails:e=>[...wn.details(),e],add:()=>[...wn.all,"add"],assignModules:e=>[...wn.dsDetails(e),"assignModules"],unassignModules:e=>[...wn.dsDetails(e),"unassignModules"],assignedModules:e=>[...wn.dsDetails(e),"assignedModules"],delete:e=>[...wn.dsDetails(e),"delete"],update:e=>[...wn.dsDetails(e),"update"],metadata:e=>[...wn.dsDetails(e),"metadata"],metadataList:(e,t=gu)=>[...wn.metadata(e),t],metadataDelete:(e,t)=>[...wn.metadata(e),"delete",t],metadataUpdate:(e,t)=>[...wn.metadata(e),"update",t],metadataAdd:e=>[...wn.metadata(e),"add"],statistics:e=>[...wn.dsDetails(e),"statistics"],invalidate:e=>[...wn.all,e,"invalidate"],assignTargets:(e,t)=>[...wn.all,e,"assign-targets",...t],compatibleTypes:()=>["compatibleTypes"]},Sv={all:["distributionSetTypes"],lists:()=>[...Sv.all,"list"],list:(e=gu)=>[...Sv.lists(),e]},x4="users/tenants",lD="distributionsets",w4="distributionsettypes";function _4(e,t){return bv(wn.list(e),lD,e,t)}function k4(e,t,n={}){const r=R(),i=t0();return E0({select(s){let o=s.data;return s.data===""&&(o=null),o},...n,queryKey:e,queryFn:()=>i.get(t).catch(s=>{throw It(r,s)})})}function D4(e){const t=e!==void 0,n=t?wn.dsDetails(e):[];return k4(n,`${lD}/${e}`,{enabled:typeof e=="number"&&t})}const cD="/targets/:controllerId?",C4="/targets/types/:id?",uD="/distribution-sets",M4=`${uD}/:id?`,T4=`${`${uD}/types`}/:id?`,I4="/software-modules/types/:id?",E4="/actions",R4=["tags","types"];function L4(e){return e?R4.some(t=>e===t):!1}function O4(e){const t=Te.generatePath(cD,{controllerId:null});return Co(t,e)}function B4(e){const t=L4(e)?encodeURIComponent(` ${e}`):encodeURIComponent(e);return Te.generatePath(cD,{controllerId:t})}function A4(e){const t={id:e??null};return Te.generatePath(C4,t)}function P4(e){const t={id:e??null};return Te.generatePath(M4,t)}function N4(e){const t={id:e??null};return Te.generatePath(T4,t)}function j4(e){const t={id:e??null};return Te.generatePath(I4,t)}function F4(e){const t=Te.generatePath(E4);return Co(t,e)}function ar({title:e,href:t,tooltip:n,onClick:r}){return c.jsx("div",{className:"a-link a-link--simple",children:c.jsx(Te.Link,{to:t,title:n??e,onClick:r,children:e})})}function xv({targetTypeRef:e,onClick:t}){const n=R();return e!=null&&e.id?c.jsx(ar,{title:e.name??e.key,href:A4(e.id.toString()),tooltip:n("TargetTypeLink.Tooltip",{id:e.id}),onClick:t,"data-testid":"target-type-link"}):c.jsx("span",{style:{color:"var(--color-gray-50)"},title:n("TargetTypeLink.Unknown.Tooltip",{key:e.key}),children:c.jsx("em",{children:e.key})})}const G4="createdAt:DESC",V4=50;function wv({selected:e,onSelect:t,targetTypeRef:n,compatibleDistributionSetTypes:r,onClickOnTargetType:i,getDisplayName:s}){const[o,a]=x.useState(""),[l,u]=x.useState(void 0),d=R(),f=r!==void 0||n!==void 0,h=(()=>{if(f){const N=(n==null?void 0:n.compatibleDistributionSetTypes)||[],j=r||[];return[...N,...j].filter((Z,W,re)=>re.findIndex(fe=>fe.key===Z.key)===W)}return[]})(),m=f&&h.length===0,y=["complete==true","valid==true"];if(o&&y.push(`(name==${o},version==${o})`),f&&h.length>0){const N=h.map(j=>j.key);y.push($4("type",N))}const{data:b,isLoading:g,isFetchingNextPage:v,fetchNextPage:S,error:w}=_4({limit:V4,sort:G4,q:y.join(";")},{onError:()=>{},enabled:!m}),{totalCount:_,entities:T}=aD(b),M=N=>s?s(N):`${N.name}:${N.version}`,C=T.map(N=>M(N)),k=e&&!m,{data:I,error:O}=D4(k?parseInt(e):void 0);x.useEffect(()=>{I&&u(I)},[I]);const A=n?c.jsx(xv,{targetTypeRef:n,onClick:i}):c.jsx(c.Fragment,{}),L=!m&&T.length!==_,V=m?!1:g||v,Y=m&&n?d("DistributionSetSuggestion.NoCompatibleSets",{targetTypeLink:A}):d("DistributionSetSuggestion.NoResults");return c.jsxs(c.Fragment,{children:[c.jsx(O1,{id:"distributionSetSelection",label:d("Entity.Label.DistributionSet"),loadMoreLabel:d("Dropdown.LoadMore"),buttonTitle:d("Dropdown.PleaseSelect"),noResultsLabel:Y,resetTitle:d("Button.Reset"),entries:m?[]:C,onLoadMore:L?S:void 0,onTextChange:a,selected:l&&M(l),onSelect:N=>{const j=T.find(G=>M(G)===N);u(j),t(j)},loading:V,renderEntry:N=>c.jsx(RS,{label:N})}),O&&c.jsx(pe,{error:O}),w&&!l&&c.jsx(pe,{error:w})]})}function $4(e,t){const n=t.join(",");return`${e}=IN=(${n})`}const xt={...Kn("system-types"),listSystemDistributionSetTypes:e=>[...xt.entityDetails(e),"listSystemDistributionSetTypes"],setSystemDistributionSetTypes:e=>[...xt.entityDetails(e),xt.listSystemDistributionSetTypes(e),"setSystemDistributionSetTypes"],listModuleTypes:e=>[...xt.entityDetails(e),"listModuleTypes"],setModuleTypes:e=>[...xt.entityDetails(e),xt.listModuleTypes(e),"setModuleTypes"],listCompatibleSoftwareModuleTypes:e=>[...xt.entityDetails(e),"listCompatibleSoftwareModuleTypes"]};function _v(e){const t=e!==void 0,n=t?xt.listModuleTypes(e):[];return Ht(n,`system-types/${e}/module-types`,"moduleType",{enabled:t})}function kv(e,t=!1){const n=e!==void 0,r=n?Pe.entityDetails(e):[];return or(r,`recipes/${e}`,{refetchInterval:t?5e3:void 0,enabled:n})}function dD(e){var V,Y,N,j,G,Z,W,re,fe;const t=R(),{dialogId:n,onConfirm:r,onClose:i,isLoading:s,error:o,recipeId:a,toEdit:l}=e,u=l?"edit":"add",d=x.useRef(!1),p=(N=(Y=(V=kv(a).data)==null?void 0:V._links)==null?void 0:Y.systemType)==null?void 0:N.href,{data:h,error:m}=_v(p?Pr(p):void 0),y=sr({defaultValues:Y4(l),mode:"onChange"}),{formState:{errors:b,isDirty:g,isValid:v},getValues:S,setValue:w,setFocus:_}=y;x.useEffect(()=>{d.current||(_("name"),d.current=!0)},[_]);const T=()=>{var de;if(v){const H=S();(((de=H.distributionSet)==null?void 0:de.length)??0)<1&&(H.distributionSet=void 0),r==null||r(H)}},M=de=>{w("moduleType",de,{shouldDirty:!0,shouldValidate:!0,shouldTouch:!0}),w("name",(de==null?void 0:de.name)??"",{shouldDirty:!0,shouldValidate:!0,shouldTouch:!0}),w("description",(de==null?void 0:de.description)??"",{shouldDirty:!0,shouldValidate:!0,shouldTouch:!0}),w("moduleQuery",(de==null?void 0:de.moduleQuery)??"",{shouldDirty:!0,shouldValidate:!0,shouldTouch:!0}),w("moduleCountQuery",(de==null?void 0:de.moduleCountQuery)??"",{shouldDirty:!0,shouldValidate:!0,shouldTouch:!0})},C=de=>{var H;w("distributionSet",((H=de==null?void 0:de.id)==null?void 0:H.toString())??"",{shouldDirty:!0,shouldValidate:!0})},k=de=>{de.key==="Enter"&&de.ctrlKey&&!s&&T()},I=S().moduleType,{entities:O}=Tt(h),A=KI(O),L=I&&I.targetTypeRef;return c.jsxs(D.Dialog,{dialogId:n,title:t(u==="add"?"ModuleUpdateDefinition.Popup.Add.Headline":"ModuleUpdateDefinition.Popup.Edit.Headline"),onClose:i,modal:!0,open:!0,className:"suggestions-containing-modal",onKeyUp:k,children:[!I&&c.jsx("div",{children:c.jsx("p",{children:t("ModuleUpdateDefinition.Popup.Add.ModuleTypeSelectionHint")})}),!l&&c.jsx(D.FormField,{fieldType:"dropdown",notificationType:"error",notificationText:(j=b==null?void 0:b.type)==null?void 0:j.message,children:c.jsx(fv,{entityName:"ModuleType",selected:I==null?void 0:I.id,onSelect:M,dataProvider:A})}),m&&c.jsx(pe,{error:m}),c.jsx(en,{useFormReturn:y,field:"name",label:"Entity.Label.Name",maxSize:255,notificationText:(G=b==null?void 0:b.name)==null?void 0:G.message,isRequired:!0,validationPattern:gr(),isDisabled:!I}),c.jsx(_o,{useFormReturn:y,field:"description",label:"Entity.Label.Description",maxSize:255,notificationText:(Z=b==null?void 0:b.description)==null?void 0:Z.message,isDisabled:!I}),L&&c.jsx(D.FormField,{fieldType:"dropdown",notificationText:(W=b==null?void 0:b.distributionSet)==null?void 0:W.message,children:c.jsx(wv,{selected:S().distributionSet,onSelect:C,targetTypeRef:I.targetTypeRef,onClickOnTargetType:i})}),c.jsx(en,{useFormReturn:y,field:"moduleQuery",label:"ModuleUpdateDefinitions.Label.Query",maxSize:255,notificationText:(re=b==null?void 0:b.moduleQuery)==null?void 0:re.message,isRequired:!0,validationPattern:Hk(),isDisabled:!I}),c.jsx(en,{useFormReturn:y,field:"moduleCountQuery",label:"ModuleUpdateDefinitions.Label.CountQuery",maxSize:255,notificationText:(fe=b==null?void 0:b.moduleCountQuery)==null?void 0:fe.message,isRequired:!0,validationPattern:Zk(),isDisabled:!I}),o&&c.jsx(pe,{error:o}),s&&c.jsx(D.ProgressIndicator,{type:"indeterminate"}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:t("Button.Cancel"),mode:"secondary",onClick:i,disabled:s}),c.jsx(D.Button,{label:t(u==="add"?"Button.Add":"Button.OK"),mode:"primary",onClick:T,disabled:s||!v||!g})]})]})}function Y4(e){var t;return{moduleType:e==null?void 0:e.moduleType,name:(e==null?void 0:e.name)??"",description:(e==null?void 0:e.description)??"",distributionSet:(t=e==null?void 0:e.distributionSetRef)==null?void 0:t.id,moduleQuery:(e==null?void 0:e.moduleQuery)??"",moduleCountQuery:(e==null?void 0:e.moduleCountQuery)??""}}function W4(e){const{onClose:t}=e,{recipeId:n}=e.options??{},r=R(),i=Ke(),s=ht();if(!n)throw new Error("Options missing");const o=()=>{s(r("ModuleUpdateDefinition.Info.Add.Success")),i.invalidateQueries(Pe.entityDetails(n)),t()},a=()=>{i.invalidateQueries(Xr.list({recipeId:n}))},{mutate:l,isLoading:u,error:d}=ki(Xr.addEntity({recipeId:n}),`recipes/${n}/module-update-definitions`,a,o),f=p=>{if(!p.moduleType)throw new Error("Module type is missing.");const h={moduleType:p.moduleType.id,name:p.name,description:p.description,moduleQuery:p.moduleQuery,moduleCountQuery:p.moduleCountQuery,distributionSetRef:p.distributionSet?{id:p.distributionSet}:null};l(h)};return c.jsx(dD,{dialogId:sv,onConfirm:f,onClose:t,isLoading:u,recipeId:n,error:d})}function H4(e){const{onClose:t}=e,{recipeId:n,toEdit:r}=e.options??{},i=R(),s=Ke(),o=ht();if(!n||!r)throw new Error("Options missing");const a=()=>{o(i("ModuleUpdateDefinition.Info.Edit.Success")),s.invalidateQueries(Pe.entityDetails(n)),t()},l=()=>{s.invalidateQueries(Xr.all({recipeId:n}))},{mutate:u,isLoading:d,error:f}=ua(Xr.updateEntity({recipeId:n}),r._links.self.href,l,a),p=h=>{const m={name:h.name,description:h.description,moduleQuery:h.moduleQuery,moduleCountQuery:h.moduleCountQuery,distributionSetRef:h.distributionSet?{id:h.distributionSet}:null};u(m)};return c.jsx(dD,{dialogId:ov,onConfirm:p,onClose:t,isLoading:d,error:f,recipeId:n,toEdit:r})}function Np(e){const t=e!==void 0,n=t?Vt.entityDetails(e):[];return or(n,`recipe-types/${e}`,{enabled:t})}function fD(e){const t=e!==void 0,n=t?xt.listSystemDistributionSetTypes(e):[];return Ht(n,`system-types/${e}/system-distribution-set-types`,"distributionSetType",{enabled:t})}function pD(e){var C,k,I,O,A,L,V,Y;const t=R(),{dialogId:n,onConfirm:r,onClose:i,isLoading:s,error:o,recipeId:a,toEdit:l}=e,u=l?"edit":"add",d=x.useRef(!1),f=kv(a),p=Np((k=(C=f.data)==null?void 0:C.type)==null?void 0:k.id),h=fD((I=p.data)==null?void 0:I.systemType.id),m=Tt(h.data).entities.map(N=>({id:N.id,key:N.key,name:N.name})),y=sr({defaultValues:Z4(l),mode:"onChange"}),{formState:{errors:b,isDirty:g,isValid:v}}=y,[S,w]=x.useState(!1);x.useEffect(()=>{d.current||(y.setFocus("name"),d.current=!0);const N=y.watch(j=>{w(!!j.distributionSet)});return()=>N.unsubscribe()},[y]);function _(){v&&(r==null||r(y.getValues()))}const T=u==="add"?"SystemDistributionSet.Popup.Add.Headline":"SystemDistributionSet.Popup.Edit.Headline",M=u==="add"?"Button.Add":"Button.OK";return c.jsxs(D.Dialog,{dialogId:n,title:t(T),onClose:i,modal:!0,open:!0,className:"suggestions-containing-modal",onKeyUp:N=>{N.key==="Enter"&&N.ctrlKey&&!s&&_()},children:[c.jsx(en,{useFormReturn:y,field:"name",label:"Entity.Label.Name",maxSize:255,notificationText:(O=b==null?void 0:b.name)==null?void 0:O.message,isRequired:!0,validationPattern:gr()}),c.jsx(_o,{useFormReturn:y,field:"description",label:"Entity.Label.Description",maxSize:255,notificationText:(L=(A=y.formState.errors)==null?void 0:A.description)==null?void 0:L.message}),c.jsx(D.FormField,{fieldType:"dropdown",notificationText:(Y=(V=y.formState.errors)==null?void 0:V.distributionSet)==null?void 0:Y.message,children:c.jsx(wv,{selected:y.getValues().distributionSet,compatibleDistributionSetTypes:m,onSelect:N=>{var j;return y.setValue("distributionSet",((j=N==null?void 0:N.id)==null?void 0:j.toString())??"",{shouldDirty:!0,shouldValidate:!0})}})}),(o||p.error||f.error||h.error)&&c.jsx(pe,{error:o||p.error||f.error||h.error}),(s||f.isLoading||p.isLoading||h.isLoading)&&c.jsx(D.ProgressIndicator,{type:"indeterminate"})," ",c.jsxs(wt,{children:[c.jsx(D.Button,{label:t("Button.Cancel"),mode:"secondary",onClick:i,disabled:s}),c.jsx(D.Button,{label:t(M),mode:"primary",onClick:_,disabled:s||!v||!g||!S})]})]})}function Z4(e){return{name:(e==null?void 0:e.name)??"",description:(e==null?void 0:e.description)??"",distributionSet:(e==null?void 0:e.distributionSetRef.id)??""}}function U4(e){const{onClose:t}=e,{recipeId:n,toEdit:r}=e.options??{},i=R(),s=Ke(),o=ht();if(!n||!r)throw new Error("Options missing");const a=()=>{o(i("SystemDistributionSet.Info.Edit.Success")),s.invalidateQueries(Pe.entityDetails(n)),t()},l=()=>{s.invalidateQueries(_i.all({recipeId:n}))},{mutate:u,isLoading:d,error:f}=ua(_i.updateEntity({recipeId:n}),r._links.self.href,l,a),p=h=>{const m={name:h.name,description:h.description,distributionSetRef:{id:h.distributionSet}};u(m)};return c.jsx(pD,{dialogId:lv,onConfirm:p,onClose:t,isLoading:d,error:f,toEdit:r,recipeId:n})}function z4(e){const{onClose:t}=e,{recipeId:n}=e.options??{},r=R(),i=Ke(),s=ht();if(!n)throw new Error("Options missing");const o=()=>{s(r("SystemDistributionSet.Info.Add.Success")),i.invalidateQueries(Pe.entityDetails(n)),t()},a=()=>{i.invalidateQueries(_i.list({recipeId:n}))},{mutate:l,isLoading:u,error:d}=ki(_i.addEntity({recipeId:n}),`recipes/${n}/system-distribution-sets`,a,o),f=p=>{const h={name:p.name,description:p.description,distributionSetRef:{id:p.distributionSet}};l(h)};return c.jsx(pD,{dialogId:av,onConfirm:f,onClose:t,isLoading:u,error:d,recipeId:n})}function yu(e){const[t,n]=x.useState([]),{data:r,fetchNextPage:i,hasNextPage:s,isFetchingNextPage:o}=e;return x.useEffect(()=>{!o&&s&&i()},[i,s,o]),x.useEffect(()=>{const{entities:a}=Tt(r);n(a)},[r]),t}const Jr={...YW("recipe-tags")};function vu(e){const t=new URLSearchParams;return eo(t,e),Ht(Jr.listSorted(e??null),"recipe-tags","tag",{queryParams:t})}function Ji(e,t){const n=R(),r=ec(),i={confirmButton:n("Button.Delete"),getMessage:s=>q4(n,s),...t};return(s,o,a)=>{const u=Array.isArray(s)&&s.length>1?s:void 0,d=r("delete",{variant:a?"error":"warning",confirmLabel:a?n("Button.Retry"):i.confirmButton,cancelLabel:n("Button.Cancel"),headline:e,message:X4(i.getMessage(s),i.additionalMessage),deleteItems:u,error:a,onConfirm:()=>{o(),d()}})}}function q4(e,t){return Array.isArray(t)&&t.length>1?e("Popup.BulkDelete.Message",{entityCount:t.length}):e("Popup.Delete.Message",{entity:t})}function X4(e,t){if(!(t!=null&&t.message))return e;const n=t.highlighted??!1;return c.jsxs(c.Fragment,{children:[n?c.jsxs(c.Fragment,{children:[c.jsx(D.Notification,{type:"warning",children:t.message}),c.jsx("br",{})]}):c.jsx(c.Fragment,{children:c.jsx("p",{children:t.message})}),c.jsx("p",{children:e})]})}function K4(e){const t=e.length===1,n=t?e[0].id:"";return t?Pe.tagList(n):Pe.list()}function Dv(e,t){const n=R(),r=Wt(),i=Ke(),s=ht(),o=e.map(m=>m.id),a=o.length===1,l=K4(e),u=(m,y)=>a?n(m==="assign"?"Tags.Info.Assign.Success":"Tags.Info.Unassign.Success"):y.affectedCount==0?n(m==="assign"?"Tags.Info.AssignMultiple.Unchanged":"Tags.Info.UnassignMultiple.Unchanged"):n(m==="assign"?"Tags.Info.AssignMultiple.Success":"Tags.Info.UnassignMultiple.Success"),{mutate:d,isLoading:f,error:p}=ln({mutationKey:l,mutationFn:async m=>{const{operation:y,...b}=m,g=y==="assign"?"post":"delete";let v;return g==="post"?v=await r.post("recipes/tags",b).catch(S=>{throw It(n,S)}):v=await r.delete("recipes/tags",{data:b}).catch(S=>{throw It(n,S)}),v.data},onSuccess:(m,y)=>{i.invalidateQueries(l),s(u(y.operation,m)),t&&t(m)}});return{performOperation:(m,y)=>{y.length&&d({recipes:o,tags:y,operation:m})},isLoading:f,error:p}}function Q4(e){const t=R(),{performOperation:n,isLoading:r,error:i}=Dv(e),s=Ji(t("Tags.Popup.Unassign.Headline"),{confirmButton:t("Button.OK"),getMessage:a=>typeof a=="string"?a:a[0]});return{doUnassign:(a,l)=>{if(Array.isArray(a)){const u=a;if(!u.length)return;const d=u.length,f=t("Tags.Popup.UnassignMultiple.Message",{count:d});s(f,()=>n("unassign",u),l)}else{const{tagName:u,tagId:d}=a,f=t("Tags.Popup.Unassign.Message",{name:u});s(f,()=>n("unassign",[d]),l)}},unassignIsLoading:r,error:i}}function J4(e){const{onClose:t}=e,{recipes:n,alreadyAssigned:r}=e.options??{},i=R(),[s,o]=x.useState([]),a=x.useRef(null);if(!n||n.length===0)throw new Error("Recipes are required");const{performOperation:l,isLoading:u,error:d}=Dv(n),f=vu(),p=yu(f),h=r?r.map(g=>g.id):[],y=p.filter(g=>!h.includes(g.id)).map(g=>g.name);function b(){if(s.length===0)return;const g=p.filter(v=>s.includes(v.name)).map(v=>v.id);l("assign",g),t()}return x.useEffect(()=>{var g;(g=a.current)==null||g.focus()},[]),c.jsxs(D.Dialog,{dialogId:Wy,title:i("Tags.Popup.Assign.Headline"),onClose:t,modal:!0,open:!0,className:"suggestions-containing-modal",onKeyUp:g=>{g.key==="Enter"&&!u&&b()},children:[c.jsx(na,{ref:a,labels:{fieldName:i("Entity.Label.Tags")},options:y,selected:s,onChange:g=>o(g.map(v=>v.value))}),d&&c.jsx(pe,{error:d}),u&&c.jsx(D.ProgressIndicator,{type:"indeterminate"}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:i("Button.Cancel"),mode:"secondary",onClick:t,disabled:u}),c.jsx(D.Button,{label:i("Button.OK"),title:i("Button.OK"),mode:"primary",onClick:b,disabled:u||s.length===0})]})]})}function e9(e){return{search:e.get("search"),state:e.getAll("state"),tagId:e.getAll("tagId"),typeId:e.getAll("typeId")}}function jp(){const{currentFilter:e,setFilter:t,mergeFilter:n}=rl(e9);return{recipesFilter:e,setRecipesFilter:t,mergeRecipesFilter:n}}const t9=["draft","waiting_for_signature","release_candidate","waiting_for_approval","released","inactive","revoked"];function n9({initiallySelected:e,onChange:t}){const[n,r]=x.useState(""),{data:i,isLoading:s,error:o,fetchNextPage:a}=dv({search:n,systemTypeId:null}),{totalCount:l,entities:u}=Tt(i),d=R();if(o)return c.jsx(pe,{error:o});const f=u.map(p=>({value:p.id,displayValue:p.name}));return c.jsx(na,{labels:{fieldName:d("Entity.Label.Types")},options:f,selected:e??[],onChange:p=>t(p.map(h=>h.value)),paginationOptions:{onSearch:r,onLoadMore:()=>{a()},total:l},loading:s})}const r9=new Map([["draft","Recipes.State.Draft"],["waiting_for_signature","Recipes.State.WaitingForSignature"],["release_candidate","Recipes.State.ReleaseCandidate"],["waiting_for_approval","Recipes.State.WaitingForApproval"],["released","Recipes.State.Released"],["inactive","Recipes.State.Inactive"],["revoked","Recipes.State.Revoked"]]);function i9(e){const{onClose:t}=e,n=R(),{recipesFilter:r,mergeRecipesFilter:i}=jp(),s=vu(),o=yu(s),[a,l]=x.useState([]),[u,d]=x.useState(r.tagId??[]),[f,p]=x.useState(r.typeId??[]),[h,m]=x.useState(r.state??[]),y=s9(r,u,f,h),{error:b}=s;x.useEffect(()=>{const v=o.filter(S=>{var w;return((w=r.tagId)==null?void 0:w.includes(S.id))??!1});l(v)},[o,l,r.tagId]);const g=()=>{i({tagId:u,typeId:f,state:h}),t()};return c.jsxs(D.Dialog,{dialogId:iv,title:n("Recipes.Popup.FilterList.Headline"),onClose:t,modal:!0,open:!0,className:"suggestions-containing-modal",onKeyUp:v=>{v.key==="Enter"&&y&&g()},children:[c.jsx(D.FormField,{fieldType:"dropdown",children:c.jsx(mo,{label:n("Entity.Label.States"),initiallySelected:h,options:[...t9],getName:v=>n(r9.get(v)??"Unknown"),onChange:m})}),c.jsx(D.FormField,{fieldType:"dropdown",children:c.jsx(n9,{initiallySelected:f,onChange:v=>p(v)})}),c.jsx(D.FormField,{fieldType:"dropdown",children:c.jsx(B1,{label:n("Entity.Label.Tags"),options:o,initiallySelected:a,onChange:v=>d(v.map(S=>S.id))})}),b&&c.jsx(pe,{error:b}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:n("Button.Cancel"),mode:"secondary",onClick:t}),c.jsx(D.Button,{label:n("Button.Apply"),mode:"primary",onClick:g,disabled:!y})]})]})}function s9(e,t,n,r){var i,s,o;return((i=e.tagId)==null?void 0:i.toString())!==t.toString()||((s=e.typeId)==null?void 0:s.toString())!==n.toString()||((o=e.state)==null?void 0:o.toString())!==r.toString()}function o9(e){var h;const{onClose:t}=e,{toClone:n}=e.options??{},r=R(),i=Wt(),s=Ke(),o=ht();if(!n)throw new Error("Cloning recipe missing");const a=()=>{o(r("Recipes.Info.Clone.Success")),s.invalidateQueries(Pe.list()),t()},l=()=>{s.invalidateQueries(Pe.list())},{mutate:u,error:d,isLoading:f}=ln({onError:l,onSuccess:a,mutationKey:Pe.cloneEntity(),mutationFn:async m=>{const y=Xt(n,"clone");y&&await i.post(y,m.form).catch(b=>{throw It(r,b)})}}),p=m=>{u({form:m})};return c.jsx(Bp,{dialogId:zy,onConfirm:p,onClose:t,isLoading:f,error:d,toEdit:{type:((h=n.type)==null?void 0:h.key)??"",name:n.name,version:n.version??"",description:n.description??""},formType:"clone"})}function hD(){const e=R(),t=Wt();return ln({onError:(n,r)=>{r.onError&&r.onError(n)},onSuccess:(n,r)=>{r.onSuccess&&r.onSuccess()},mutationFn:async n=>{try{const i=(await t.get(n.exportUrl,{responseType:"json",headers:{Accept:"application/json"}})).data;if(n.attachTags&&n.attachTags.length>0){const s=n.attachTags.map(o=>({name:o}));i.tags=[...i.tags||[],...s]}await t.post("recipes/import",i,{headers:{"Content-Type":"application/json","X-SOUP-TENANT":n.targetTenant}})}catch(r){throw It(e,r)}}})}var Fp={exports:{}},a9=Fp.exports,mD;function l9(){return mD||(mD=1,function(e,t){(function(n,r){r()})(a9,function(){function n(u,d){return typeof d>"u"?d={autoBom:!1}:typeof d!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),d={autoBom:!d}),d.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type)?new Blob(["\uFEFF",u],{type:u.type}):u}function r(u,d,f){var p=new XMLHttpRequest;p.open("GET",u),p.responseType="blob",p.onload=function(){l(p.response,d,f)},p.onerror=function(){console.error("could not download file")},p.send()}function i(u){var d=new XMLHttpRequest;d.open("HEAD",u,!1);try{d.send()}catch{}return 200<=d.status&&299>=d.status}function s(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{var d=document.createEvent("MouseEvents");d.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(d)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Br=="object"&&Br.global===Br?Br:void 0,a=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(u,d,f){var p=o.URL||o.webkitURL,h=document.createElement("a");d=d||u.name||"download",h.download=d,h.rel="noopener",typeof u=="string"?(h.href=u,h.origin===location.origin?s(h):i(h.href)?r(u,d,f):s(h,h.target="_blank")):(h.href=p.createObjectURL(u),setTimeout(function(){p.revokeObjectURL(h.href)},4e4),setTimeout(function(){s(h)},0))}:"msSaveOrOpenBlob"in navigator?function(u,d,f){if(d=d||u.name||"download",typeof u!="string")navigator.msSaveOrOpenBlob(n(u,f),d);else if(i(u))r(u,d,f);else{var p=document.createElement("a");p.href=u,p.target="_blank",setTimeout(function(){s(p)})}}:function(u,d,f,p){if(p=p||open("","_blank"),p&&(p.document.title=p.document.body.innerText="downloading..."),typeof u=="string")return r(u,d,f);var h=u.type==="application/octet-stream",m=/constructor/i.test(o.HTMLElement)||o.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||h&&m||a)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var S=b.result;S=y?S:S.replace(/^data:[^;]*;/,"data:attachment/file;"),p?p.location.href=S:location=S,p=null},b.readAsDataURL(u)}else{var g=o.URL||o.webkitURL,v=g.createObjectURL(u);p?p.location=v:location.href=v,p=null,setTimeout(function(){g.revokeObjectURL(v)},4e4)}});o.saveAs=l.saveAs=l,e.exports=l})}(Fp)),Fp.exports}var c9=l9();function Cv(e,t){const n=R(),r=ec(),i=Wt();return function s(){const o=r("progress",{message:n("Popup.Download.Message"),noCancel:!0});i.get(e,{responseType:"arraybuffer",headers:{Accept:"application/octet-stream"}}).then(a=>{c9.saveAs(new File([a.data],t))}).catch(a=>{const l=It(n,a),u=r("confirm",{variant:"error",headline:n("Popup.Download.Error.Headline"),message:n("Popup.Download.Error.Message",{b:d=>c.jsx("b",{children:d},d),fileName:t,error:()=>c.jsx("div",{style:{marginTop:"1rem"},children:c.jsx(pe,{error:l})},"error")}),confirmLabel:n("Button.Retry"),confirmButtonPrimary:!1,onConfirm:()=>{u(),s()},onClose:()=>u()})}).finally(()=>{o()})}}const Mv={all:["tenants"],lists:()=>[...Mv.all,"list"],list:(e=gu)=>[...Mv.lists(),e]};function u9(e,t){return bv(Mv.list(e),x4,{...e},t)}function gD({onChange:e,excludeCurrentTenant:t=!1}){const n=R(),{shell:r}=ka().state,i=r.getTenantId(),{data:s,isLoading:o,error:a}=u9(),l=(s==null?void 0:s.pages[0])??[],u=t&&i?l.filter(p=>p.tenant!==i):l;if(a)return c.jsx(pe,{error:a,messageResolver:d});if(o)return c.jsx(D.ProgressIndicator,{type:"indeterminate"});if(!u||u.length===0)return c.jsx(d9,{});return c.jsx(D.FormField,{fieldType:"dropdown",children:c.jsx(D.Dropdown,{id:"tenantSelection",label:n("Recipes.Label.Export.SelectTenant"),options:f(u),onChange:p=>e(p.target.value)})});function d(p){return"Unable to load tenants: "+(p.message||"An unknown error occurred.")}function f(p){if(p.length===1){const h=p.map(m=>({name:m.instanceName??m.tenant,value:m.tenant}));return e(h[0].value),h}return[{name:n("Dropdown.PleaseSelect"),value:""},...p.map(h=>({name:h.instanceName??h.tenant,value:h.tenant}))]}}function d9(){return c.jsx("div",{style:{textAlign:"center",fontStyle:"italic",color:"gray"},children:"No tenants available"})}function f9(e){const{onClose:t}=e,{toExport:n}=e.options??{},r=R(),i=ht();if(!n)throw new Error("Export recipe missing");const s=Xt(n,"export");if(!s)throw new Error("Export not possible for this recipe");const o=()=>{i(r("Recipes.Export.Success")),t()},[a,l]=x.useState(null),u=b=>{if(y("error"),b){const g=b.code;if(g===401||g===403){l(r("Recipes.Export.NotPermitted"));return}}l(r("Recipes.Export.Error"))},[d,f]=x.useState(),{mutate:p}=hD(),h=Cv(s,`recipe-${n.id}.json`),[m,y]=x.useState(void 0);return c.jsxs(D.Dialog,{variant:m,dialogId:qy,title:r("Recipes.Export.Title",{count:1,id:n.id}),onClose:t,modal:!0,open:!0,onKeyUp:b=>{b.key==="Escape"&&t()},children:[c.jsx("div",{children:c.jsx("p",{children:r("Recipes.Export.Tenant.Hint")})}),c.jsx(gD,{onChange:b=>{l(null),f(b),y(void 0)},excludeCurrentTenant:!0}),c.jsx("div",{style:{marginTop:"15px"},children:c.jsx("p",{children:r("Recipes.Export.Download.Hint")})}),a&&c.jsx(pe,{error:{message:a}}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:r("Button.Cancel"),mode:"secondary",onClick:t}),c.jsx(D.Button,{label:r("Button.Download"),mode:"secondary",onClick:()=>{h(),t()}}),c.jsx(D.Button,{label:r("Button.Export"),mode:"primary",onClick:()=>p({exportUrl:s,targetTenant:d??"",onSuccess:o,onError:u}),disabled:!d})]})]})}function yD(e,t){const n=R(),r=Wt();return ln({onError:e,onSuccess:t,mutationKey:Pe.addEntity(),mutationFn:async i=>{await r.post("recipes/import",i.recipeImport).catch(s=>{throw It(n,s)})}})}function p9(e){var h;const{onClose:t}=e,{toImport:n,apiError:r}=e.options??{},i=R(),s=Ke(),o=ht();if(!n)throw new Error("Options missing");const a=()=>{o(i("Recipes.Info.Import.Success")),s.invalidateQueries(Pe.all()),t()},l=()=>{s.invalidateQueries(Pe.all())},{mutate:u,isLoading:d,error:f}=yD(l,a),p=m=>{n.type={id:m.type??""},n.name=m.name,n.version=m.version,n.description=m.description,u({recipeImport:n})};return c.jsx(Bp,{dialogId:Uy,onConfirm:p,onClose:t,isLoading:d,error:f??r??null,toEdit:{type:((h=n.type)==null?void 0:h.key)??"",name:n.name??"",version:n.version??"",description:n.description??""},formType:"import"})}function h9(e){const{onClose:t}=e,{recipes:n,onSuccess:r}=e.options??{},i=R(),[s,o]=x.useState([]),a=x.useRef(null);if(!n||n.length===0)throw new Error("Recipes are required");const{performOperation:l,isLoading:u,error:d}=Dv(n,r),f=vu(),p=yu(f),h=p.map(y=>y.name);function m(y){if(s.length===0)return;const b=p.filter(g=>s.includes(g.name)).map(g=>g.id);l(y,b),t()}return x.useEffect(()=>{var y;(y=a.current)==null||y.focus()},[]),c.jsxs(D.Dialog,{dialogId:Ky,title:i("BulkTagging.Popup.Headline"),onClose:t,modal:!0,open:!0,className:"suggestions-containing-modal",onKeyUp:y=>{y.key==="Enter"&&!u&&m("assign")},children:[c.jsx(na,{ref:a,labels:{fieldName:i("Entity.Label.Tags")},options:h,selected:s,onChange:y=>o(y.map(b=>b.value))}),d&&c.jsx(pe,{error:d}),u&&c.jsx(D.ProgressIndicator,{type:"indeterminate"}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:i("Button.Cancel"),mode:"secondary",onClick:t,disabled:u}),c.jsx(D.Button,{label:i("Button.Unassign"),title:i("Button.Unassign"),mode:"primary",onClick:()=>m("unassign"),disabled:u||s.length===0}),c.jsx(D.Button,{label:i("Button.Assign"),title:i("Button.Assign"),mode:"primary",onClick:()=>m("assign"),disabled:u||s.length===0})]})]})}function m9(){return tt(Hy)}function g9(){return tt(Zy)}function y9(){return tt(Qy)}function v9(){return tt(Jy)}function b9(){return tt(ev)}function Tv(){return tt(tv)}function S9(){return tt(zy)}function x9(){return tt(Uy)}function vD(){return tt(qy)}function w9(){return tt(Xy)}function bD(){return tt(Yy)}function _9(){return tt(Wy)}function k9(){return tt(Ky)}function D9(){return tt(iv)}function SD(){return tt(nv)}function C9(){return tt(rv)}const xD="bulk_edit_action_option";function M9(e){const{onClose:t}=e,{toEdit:n}=e.options??{},r=R(),[i,s]=x.useState(null),o=v9(),a=b9();if(!n||n.length===0)throw new Error("Recipes missing");const l=n.filter(h=>{var m,y;return(y=(m=h._links)==null?void 0:m.edit)==null?void 0:y.href}).map(h=>h.id),u=n.length-l.length,d=l.length,f=h=>{s(h.target.value)},p=()=>{i==="metadata"?o({toEdit:n}):i==="systemDistributionSet"&&a({toEdit:n}),t()};return c.jsxs(D.Dialog,{variant:"info",dialogId:Qy,title:r("Recipes.BulkEdit.Title",{totalCount:n.length,compatibleCount:d,allCompatible:d===n.length}),onClose:t,modal:!0,open:!0,children:[c.jsx("div",{children:c.jsx("p",{children:r("Recipes.BulkEdit.Hint")})}),c.jsx(D.FormField,{fieldType:"radio",children:c.jsx(D.RadioButton,{id:"bulk-edit-metadata",name:xD,label:r("Recipes.BulkEdit.Metadata"),value:"metadata",checked:i==="metadata",onChange:f})}),c.jsx(D.FormField,{fieldType:"radio",children:c.jsx(D.RadioButton,{id:"bulk-edit-system-distribution-set",name:xD,label:r("Recipes.BulkEdit.SystemDistributionSet"),value:"systemDistributionSet",checked:i==="systemDistributionSet",onChange:f})}),d>mr?c.jsx(D.Notification,{type:"error",children:r("Recipes.BulkEdit.TooManyItems",{max:mr})}):u>0&&c.jsx(D.Notification,{type:"warning",children:r("Recipes.BulkEdit.UnsupportedAction",{count:u})}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:r("Button.Cancel"),mode:"secondary",onClick:t}),c.jsx(D.Button,{label:r("Button.Next"),mode:"primary",onClick:p,disabled:!i||d>mr})]})]})}function T9({value:e}){return c.jsxs("div",{style:{display:"flex"},children:[c.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis"},children:e}),c.jsx("div",{children:c.jsx(xS,{value:e})})]})}function _l(e,t,n={isDefault:!1,isSortable:!1,isStaticColumn:!1},r,i,s,o,a){if(t===void 0&&a===void 0)throw new Error("Either fieldName or columnId must be defined for a column");const l=(t==null?void 0:t.toString())??a??"";return{data:{columnId:l,isDefault:n.isDefault,isStaticColumn:n.isStaticColumn,isSortable:n.isSortable,sortParamName:n.isSortable?l:void 0},header:e,resolveCellTitle:r,fieldName:i?void 0:t,renderCell:i,style:s,cellClassName:o,disableOnSelect:n.disableOnSelect}}function $e(e,t,n,r,i="",s,o=a=>Iv(a,t)){const a=l=>{const u=o(l);return Ev(u,i)};return _l(e,t,n,s??a,a,r)}function I9(e,t,n,r,i,s="",o,a=l=>Iv(l,t)){const l=d=>{const f=a(d);return Ev(f,s)};return _l(e,t,r,o??l,d=>{const f=l(d);return f===void 0||f.length===0?f:c.jsxs(c.Fragment,{children:[f,c.jsx(Cn,{popoverHeading:f,children:c.jsx("div",{children:c.jsx(Ft,{markdownFilePath:n(d)})})})]})},i)}function wD(e,t,n,r,i="",s=o=>Iv(o,t)){const o=l=>{const u=s(l);return Ev(u,i)};return _l(e,t,n,o,l=>{const u=o(l);return u===void 0||u.length===0?u:c.jsx(T9,{value:u})},r)}function Iv(e,t){const n=e[t];return n===void 0?void 0:String(n)}function Ev(e,t){return e===void 0||e.length<1?t:e}function Ln(e,t,n){return _l(e,t,n,s=>{const o=s[t];return o instanceof Date||typeof o=="string"?R_(o):""},s=>{const o=s[t];return o instanceof Date||typeof o=="string"?jn(o):""})}function _D(e,t,n,r,i,s){return _l(e,t,r,a=>String(a[t]||""),a=>{const l=a[t]!==void 0?String(a[t]):"",u=`${String(t)}-${a.id}`,d=s!=null&&s.disabled?s.disabled(a):!1;return c.jsx(D.TextField,{id:u,value:l,required:s==null?void 0:s.required,disabled:d,placeholder:s==null?void 0:s.placeholder,onChange:f=>n(a.id,f.target.value)})},i)}function dn(e,t,n,r){return _l(e,void 0,{...r,disableOnSelect:!1},void 0,t,void 0,"soup-link-cell",n)}function ei(e,t,n=!1,r=!1,i,s,o,a){if(i===void 0&&s===void 0)throw new Error("Either fieldName or columnId must be defined for a column");const l=(i==null?void 0:i.toString())??s??"";return{data:{columnId:l,isDefault:n,isIcon:!0,isSortable:a,icon:o,sortParamName:a?l:void 0},header:e,onRenderHeader:()=>null,style:{width:r?"3rem":"4em"},renderCell:u=>typeof t=="function"?t(u):i!==void 0&&u[i]?t:null,ariaLabel:e}}function E9(){const e=R(),t=Wt(),n=Ke();return ln({onError:(r,i)=>{n.invalidateQueries(Pe.metadataList({recipeId:i.recipeId})),i.onError&&i.onError(r)},onSuccess:(r,i)=>{n.invalidateQueries(Pe.entityDetails(i.recipeId)),i.onSuccess&&i.onSuccess()},mutationKey:Pe.list(),mutationFn:async r=>{try{const i={mode:r.mode};await t.post(`recipes/${r.recipeId}/metadata`,r.metadata,{params:i})}catch(i){throw It(e,i)}}})}function R9(e,t,n,r){return bu(e,t,n,r,!0)}function bu(e,t,n,r,i=!1){const s=R(),o=Wt(),a=Ji(s("Metadata.Popup.Delete.Headline")),l=ht(),u=Ke(),d=(h,m)=>a(h,()=>f({key:h}),m),{mutate:f,isLoading:p}=ln({onError:(h,m)=>{d(m.key,h),u.invalidateQueries(t)},onSuccess:()=>{l(s("Info.Metadata.Delete.Success")),u.invalidateQueries(r)},mutationKey:n,mutationFn:async h=>{try{if(i)await o.delete(e,{data:[h.key]});else{const m={mode:"delete"};await o.post(e,[{key:h.key}],{params:m})}}catch(m){throw It(s,m)}}});return{delete:h=>d(h),isLoading:p}}const kl={url:"",listQueryKey:[]};function L9({url:e,listQueryKey:t,mutationKey:n,invalidateOnMutation:r,useApiV2:i}){const s=R(),o=Wt(),a=Ke();return ln({onError:()=>{a.invalidateQueries(t)},onSuccess:()=>{a.invalidateQueries(r)},mutationKey:n,mutationFn:async l=>{try{if(i)await o.patch(e,[{key:l.key,value:l.value}]);else{const u={mode:"merge"};await o.post(e,[{key:l.key,value:l.value}],{params:u})}}catch(u){throw It(s,u)}}})}function O9(e){const t=e!==void 0,{url:n,listQueryKey:r}=t?Rv(e):kl;return Ht(r,n,"metadata",{enabled:t})}function B9(e){const t=e!==null,{url:n,listQueryKey:r}=t?P9():kl,i=new URLSearchParams;return nr(i,"id[]",e),Ht(r,n,"metadata",{enabled:t,queryParams:i})}function A9(e){const{url:t,mutationKey:n,listQueryKey:r,invalidateOnMutation:i}=Rv(e);return bu(t,r,n,i)}function Rv(e){return{url:`recipes/${e}/metadata`,listQueryKey:Pe.metadataList({recipeId:e}),mutationKey:Pe.metadataModify({recipeId:e}),invalidateOnMutation:Pe.entityDetails(e),useApiV2:!1}}function P9(){return{url:"recipes/metadata",listQueryKey:Pe.list(),mutationKey:Pe.updateEntity(),invalidateOnMutation:Pe.list(),useApiV2:!1}}const Gp={addToExisting:{label:"Recipes.BulkEdit.Metadata.Mode.AddToExisting",showValueColumn:!0,apiMode:"merge"},clearEntries:{label:"Recipes.BulkEdit.Metadata.Mode.ClearEntries",showValueColumn:!1,apiMode:"delete"},replaceAll:{label:"Recipes.BulkEdit.Metadata.Mode.ReplaceAll",showValueColumn:!0,apiMode:"replace"}};function N9(e){const{onClose:t}=e,{toEdit:n}=e.options??{},r=R(),i=Tv(),[s,o]=x.useState("addToExisting"),[a,l]=x.useState([{id:"1",key:"",value:""}]),[u,d]=x.useState([]),[f,p]=x.useState([]),{mutate:h}=E9();if(!n||n.length===0)throw new Error("Recipes missing");const m=n.filter(j=>{var G,Z;return(Z=(G=j._links)==null?void 0:G.edit)==null?void 0:Z.href}).map(j=>j.id),{data:y,isLoading:b,error:g}=B9(m),{totalCount:v,entities:S}=Tt(y),w=m.length,_=x.useMemo(()=>{if(!S||v===0)return[];const j=new Set;return S.forEach(G=>{j.add(G.key)}),j},[S,v]),T=x.useCallback(()=>{const j=new Map,G=[];a.forEach(Z=>{const W=Z.key.trim();W!==""&&(j.has(W)?G.includes(W)||G.push(W):j.set(W,1))}),d(G)},[a]);x.useEffect(()=>{T()},[a,T]);const M=x.useCallback(j=>{l(G=>{const Z=G.filter(W=>W.id!==j);return Z.length===0&&Z.push({id:Date.now().toString(),key:"",value:""}),Z})},[]),C=x.useCallback((j,G,Z)=>{l(W=>{const re=W.map(H=>H.id===j?{...H,[G]:Z}:H),fe=re[re.length-1];return(s==="clearEntries"?fe.id===j&&fe.key.trim()!==""&&re.length<10:fe.id===j&&fe.key.trim()!==""&&fe.value.trim()!==""&&re.length<10)&&re.push({id:Date.now().toString(),key:"",value:""}),re})},[s]),k=x.useCallback((j,G)=>{C(j,"key",G)},[C]),I=x.useCallback((j,G)=>{C(j,"value",G)},[C]),O=x.useCallback(j=>{o(j.target.value),j.target.value==="clearEntries"&&p([])},[]),A=x.useCallback(()=>Object.entries(Gp).map(([j,G])=>({name:r(G.label),value:j})),[r]),L=x.useCallback(j=>{p(j)},[]),V=x.useCallback(()=>{let j;s==="clearEntries"?j=f.map(G=>({key:G})):j=a.filter(G=>G.key.trim()!=="").map(G=>({key:G.key,value:G.value})),i({title:r("Recipes.BulkEdit.Metadata.Progress.Title",{count:m.length}),items:m.map(G=>{var Z;return{id:G,name:(Z=n.find(W=>W.id===G))==null?void 0:Z.name}}),operationFn:async G=>new Promise((Z,W)=>{h({recipeId:G.id,metadata:j,mode:Gp[s].apiMode,onSuccess:Z,onError:W})}),errorResolver:{resolveName:G=>G.name??G.id,resolveId:G=>G.id,resolveRoute:G=>Do(G.id)}}),t()},[h,a,s,t,m,n,r,i,f]),Y=x.useMemo(()=>{const j=[_D(r("Recipes.BulkEdit.Metadata.List.Key"),"key",k,{isDefault:!0},void 0,{required:!0,placeholder:r("Recipes.BulkEdit.Metadata.List.KeyPlaceholder")})];return Gp[s].showValueColumn&&j.push(_D(r("Recipes.BulkEdit.Metadata.List.Value"),"value",I,{isDefault:!0},void 0,{required:!0,placeholder:r("Recipes.BulkEdit.Metadata.List.ValuePlaceholder")})),j.push({data:{columnId:"actions",isDefault:!0},header:r("Recipes.BulkEdit.Metadata.List.Delete"),onRenderHeader:()=>null,renderCell:G=>{const Z=G.id===a[a.length-1].id,W=a.length>=10;return Z&&!W?null:c.jsx(D.Button,{title:r("Button.Delete"),mode:"integrated",icon:"delete",onClick:()=>M(G.id)})},style:{width:"4rem"},cellStyle:{padding:0}}),j},[r,s,k,I,M,a]),N=x.useMemo(()=>w>mr||u.length>0?!0:s==="clearEntries"?f.length===0:!a.some(j=>j.key.trim()!==""&&(Gp[s].showValueColumn?j.value.trim()!=="":!0)),[w,u,a,s,f]);return c.jsxs(D.Dialog,{variant:"info",dialogId:Jy,title:r("Recipes.BulkEdit.Metadata.Title",{count:w}),onClose:t,modal:!0,open:!0,className:"suggestions-containing-modal",children:[w>mr&&c.jsx(D.Notification,{type:"error",children:r("Recipes.BulkEdit.TooManyItems",{max:mr})}),c.jsx(D.FormField,{fieldType:"dropdown",children:c.jsx(D.Dropdown,{id:"metadata-edit-mode-dropdown","data-testid":"metadata-edit-mode-dropdown",label:r("Recipes.BulkEdit.Metadata.Mode.Label"),options:A(),value:s,onChange:O})}),s==="clearEntries"?c.jsxs(c.Fragment,{children:[c.jsx(D.FormField,{fieldType:"dropdown",children:c.jsx(mo,{label:r("Recipes.BulkEdit.Metadata.KeysToDelete"),options:Array.from(_),initiallySelected:f,onChange:L,getName:j=>j,searchPlaceholder:r("Recipes.BulkEdit.Metadata.SearchKeys")})}),b&&c.jsx(et,{}),g&&c.jsx(pe,{error:g})]}):c.jsx(D.DataList,{items:a,columns:Y,enableScrolling:!0,hideCheckBoxes:!0}),u.length>0&&c.jsx(D.Notification,{type:"error",children:r("Recipes.BulkEdit.Metadata.DuplicateKeys",{keys:u.join(", ")})}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:r("Button.Cancel"),mode:"secondary",onClick:t}),c.jsx(D.Button,{label:r("Button.Apply"),mode:"primary",onClick:V,disabled:N})]})]})}function j9({item:e,resolveName:t,resolveId:n,resolveRoute:r}){const i=t?t(e.entity):`Item ${e.index+1}`,s=n?n(e.entity):i,o=r!==void 0;return c.jsxs(c.Fragment,{children:[c.jsxs("div",{children:[c.jsx("span",{style:{marginRight:"8px"},children:"Element:"}),o?c.jsx(D.Link,{icon:{iconName:"externallink",isUiIcon:!0},iconPosition:"right",label:i,target:"_blank",href:r(e.entity),title:s}):c.jsx("span",{children:i})]}),c.jsx("div",{children:e.errorMessage})]})}function F9(e){const{onClose:t}=e,{title:n,items:r,operationFn:i,errorResolver:s,onProgressReport:o}=e.options??{title:"",items:[],operationFn:async()=>{},errorResolver:void 0,onProgressReport:void 0},{resolveName:a,resolveId:l,resolveRoute:u}=s??{},d=R(),[f,p]=x.useState([]),[h,m]=x.useState(!0),[y,b]=x.useState(0),[g,v]=x.useState(!1),S=r.length,w=f.filter(Z=>Z.status!=="pending").length,_=f.filter(Z=>Z.status==="success").length,T=f.filter(Z=>Z.status==="error").length,M=f.filter(Z=>Z.status==="error"),C=S>0?w/S*100:0,k=T>0,I=!h,O=_===S,A=x.useCallback(Z=>a?a(Z):"",[a]);x.useEffect(()=>{const Z=r.map((W,re)=>({index:re,entity:W,status:"pending"}));p(Z)},[r]);const L=x.useCallback((Z,W,re)=>{p(fe=>fe.map(de=>de.index===Z?{...de,status:W,errorMessage:re}:de))},[]),V=x.useCallback(async()=>{if(y>=S||g){m(!1);return}const Z=r[y];try{await i(Z),L(y,"success")}catch(W){const re=typeof W=="object"&&W!==null&&"message"in W?W.message:String(W);L(y,"error",re)}finally{b(W=>W+1)}},[y,g,r,i,S,L]);x.useEffect(()=>{h&&f.length>0&&!g&&V()},[y,h,g,f.length,V]);const Y=()=>{v(!0),m(!1)},N=()=>I?g?"warning":k?"error":"success":"info",j=x.useMemo(()=>({errorItems:M,successItems:f.filter(Z=>Z.status==="success"),isFinished:I,isCancelled:g,progress:C}),[M,f,I,g,C]),G=x.useMemo(()=>o?o(j):null,[o,j]);return c.jsxs(D.Dialog,{id:tv,variant:N(),dialogId:"bulk-operation-progress-modal",title:n,onClose:h?void 0:t,modal:!0,open:!0,children:[c.jsxs("div",{children:[c.jsx(D.ProgressIndicator,{type:"determinate",value:C}),c.jsx("div",{style:{display:"flex"},children:h&&y<r.length&&c.jsx("div",{children:c.jsx("p",{children:d("Recipes.BulkOperation.FeedbackModal.Progress",{completed:w+1,total:S,name:A(r[y])})})})}),I&&c.jsxs("div",{style:{margin:"1rem 0"},children:[_>0&&c.jsx("div",{style:{display:"flex",alignItems:"center",margin:"0.5rem 0",color:"var(--frok-success)"},children:c.jsx(Qr,{iconProps:{iconName:"alert-success",label:O?d("Recipes.BulkOperation.FeedbackModal.Success.All"):d("Recipes.BulkOperation.FeedbackModal.Success",{count:_}),color:"green-50"},showLabel:!0})}),T>0&&c.jsx("div",{style:{display:"flex",alignItems:"center",margin:"0.5rem 0",color:"var(--frok-error)"},children:c.jsx(Qr,{iconProps:{iconName:"alert-error",label:d("Recipes.BulkOperation.FeedbackModal.Error",{count:T}),color:"red-50"},showLabel:!0})}),g&&c.jsx("div",{style:{display:"flex",alignItems:"center",margin:"0.5rem 0"},children:c.jsx(Qr,{iconProps:{iconName:"alert-error",label:d("Recipes.BulkOperation.FeedbackModal.Canceled"),color:"yellow-85"},showLabel:!0})})]}),I&&G&&c.jsx("div",{style:{margin:"1rem 0"},children:G}),I&&k&&c.jsx(tn,{header:d("Recipes.BulkOperation.FeedbackModal.FailureDetails",{count:T}),children:c.jsx(D.List,{style:{margin:"1rem 0"},type:"dot",items:M.map(Z=>c.jsx(j9,{item:Z,resolveName:a,resolveId:l,resolveRoute:u},`failed-operation-${Z.index}`))})})]}),c.jsx(wt,{children:h?c.jsx(D.Button,{label:d("Button.Cancel"),mode:"secondary",onClick:Y}):c.jsx(D.Button,{label:d("Button.Close"),mode:"primary",onClick:t})})]})}function G9(e){const t=R(),n=Wt();return ln({onError:(r,i)=>{i.onError&&i.onError(r)},onSuccess:(r,i)=>{i.onSuccess&&i.onSuccess()},mutationKey:e,mutationFn:async r=>{await n.post(r.path,r.payload).catch(i=>{throw It(t,i)})}})}function V9(e){const t=e!==void 0,n=t?_i.list({recipeId:e}):[];return Ht(n,`recipes/${e}/system-distribution-sets`,"systemDistributionSet",{enabled:t})}function $9(e){const t=e!==null,n=new URLSearchParams;return nr(n,"id[]",e),Ht(Pe.systemDistributionSetList(),"recipes/system-distribution-sets","systemDistributionSet",{enabled:t,queryParams:n})}function Y9(e,t){const n=!!e&&!!t,r=n?_i.entityDetails(t,{recipeId:e}):[];return or(r,`recipes/${e}/system-distribution-sets/${t}`,{enabled:n})}function W9(){const e=R(),t=Wt(),n=Ke();return ln({onError:(r,i)=>{n.invalidateQueries(_i.list({recipeId:i.recipeId})),i.onError&&i.onError(r)},onSuccess:(r,i)=>{n.invalidateQueries(_i.list({recipeId:i.recipeId})),i.onSuccess&&i.onSuccess()},mutationKey:Pe.list(),mutationFn:async r=>{await t.delete(`recipes/${r.recipeId}/system-distribution-sets/${r.sysDsId}`).catch(i=>{throw It(e,i)})}})}function H9(e){const t=e!==null,n=new URLSearchParams;return nr(n,"id[]",e),Ht(Pe.compatibleDistributionSetTypeList(),"recipes/compatible-system-distribution-set-types","distributionSetType",{enabled:t,queryParams:n})}const Z9={add:{label:"Recipes.BulkEdit.SysDs.Mode.Add",showValueColumn:!0},delete:{label:"Recipes.BulkEdit.SysDs.Mode.Delete",showValueColumn:!0}};function U9(e){var oe,K,Ve,Ze,$t,ge;const{onClose:t}=e,{toEdit:n}=e.options??{},r=R(),i=Tv(),[s,o]=x.useState("add"),[a,l]=x.useState([]),[u,d]=x.useState([]),[f,p]=x.useState(0),{mutate:h,isLoading:m}=W9(),{mutate:y,isLoading:b}=G9(Pe.list()),g=x.useCallback(Ee=>{o(Ee.target.value)},[]),v=x.useCallback(()=>Object.entries(Z9).map(([Ee,_e])=>({name:r(_e.label),value:Ee})),[r]);if(!n||n.length===0)throw new Error("Recipes missing");const S=n.filter(Ee=>{var _e,Ye;return(Ye=(_e=Ee._links)==null?void 0:_e.edit)==null?void 0:Ye.href}).map(Ee=>Ee.id),{data:w,isLoading:_,error:T}=H9(S),{entities:M}=Tt(w),{data:C,isLoading:k,error:I}=$9(S),{totalCount:O,entities:A}=Tt(C),L=x.useMemo(()=>{if(!A||O===0)return[];const Ee=new Map;return A.forEach(_e=>{var Ye,rt;if((Ye=_e.distributionSetRef)!=null&&Ye.id&&_e.id){const lt=_e.distributionSetRef.id,J=_e.recipe,We=_e.id;Ee.has(lt)||Ee.set(lt,{dsRef:_e.distributionSetRef,sysDsItems:[]}),(rt=Ee.get(lt))==null||rt.sysDsItems.push({recipeId:J,sysDsId:We})}}),Array.from(Ee.values())},[A,O]),V=x.useCallback(Ee=>{l(Ee)},[]),Y=sr({defaultValues:z9(),mode:"onChange"}),{formState:{errors:N,isDirty:j,isValid:G}}=Y,[Z,W]=x.useState(!1),re=x.useRef(!1);x.useEffect(()=>{!re.current&&s==="add"&&(Y.setFocus("name"),re.current=!0);const Ee=Y.watch(_e=>{const Ye=!!_e.distributionSet;if(W(Ye),Ye&&M){const rt=_e.distributionSet,lt=M.find(E=>E.key===(rt==null?void 0:rt.type)),J=(lt==null?void 0:lt.recipes)||[],We=S.filter(E=>J.includes(E));d(We),p(S.length-We.length)}else d([]),p(0)});return()=>Ee.unsubscribe()},[Y,s,M,S]);const fe=x.useCallback(()=>{if(s==="add"){const Ee=Z&&f>0?u:S;i({title:r("Recipes.BulkEdit.SysDs.Progress.Title",{count:Ee.length}),items:Ee.map(_e=>{var Ye;return{id:_e,name:(Ye=n.find(rt=>rt.id===_e))==null?void 0:Ye.name}}),operationFn:async _e=>new Promise((Ye,rt)=>{var We;const lt=Y.getValues(),J={name:lt.name,description:lt.description,distributionSetRef:{id:((We=lt.distributionSet)==null?void 0:We.id)??""}};y({path:`recipes/${_e.id}/system-distribution-sets`,payload:J,onSuccess:Ye,onError:rt})}),errorResolver:{resolveName:_e=>_e.name,resolveId:_e=>_e.id,resolveRoute:_e=>Do(_e.id)}})}else if(s==="delete"&&a.length>0){const Ee=a.flatMap(_e=>_e.sysDsItems.map(Ye=>({dsRef:_e.dsRef,recipeId:Ye.recipeId,sysDsId:Ye.sysDsId})));i({title:r("Recipes.BulkEdit.SysDs.Progress.Title",{count:Ee.length}),items:Ee,operationFn:async _e=>new Promise((Ye,rt)=>{h({recipeId:_e.recipeId,sysDsId:_e.sysDsId,onSuccess:Ye,onError:rt})}),errorResolver:{resolveName:_e=>`${_e.recipeId}:${_e.dsRef.name}:${_e.dsRef.version}`,resolveId:_e=>_e.id,resolveRoute:_e=>Do(_e.id)}})}t()},[s,Y,y,h,t,S,u,f,Z,n,r,i,a]),de=b||m||k||_,H=T||I,Ge=S.length,Le=s==="add"?de||!G||!j||!Z:de||a.length===0;return c.jsxs(D.Dialog,{variant:"info",dialogId:ev,title:r("Recipes.BulkEdit.SysDs.Title",{count:Ge}),onClose:t,modal:!0,open:!0,className:"suggestions-containing-modal",children:[Ge>mr&&c.jsx(D.Notification,{type:"error",children:r("Recipes.BulkEdit.TooManyItems",{max:mr})}),c.jsx(D.FormField,{fieldType:"dropdown",children:c.jsx(D.Dropdown,{id:"sysds-edit-mode-dropdown","data-testid":"sysds-edit-mode-dropdown",label:r("Recipes.BulkEdit.SysDs.Mode.Label"),options:v(),value:s,onChange:g})}),s==="add"?c.jsxs(c.Fragment,{children:[c.jsx(en,{useFormReturn:Y,field:"name",label:"Entity.Label.Name",maxSize:255,notificationText:(oe=N==null?void 0:N.name)==null?void 0:oe.message,isRequired:!0,validationPattern:gr()}),c.jsx(_o,{useFormReturn:Y,field:"description",label:"Entity.Label.Description",maxSize:255,notificationText:(Ve=(K=Y.formState.errors)==null?void 0:K.description)==null?void 0:Ve.message}),_?c.jsx(D.ProgressIndicator,{type:"indeterminate"}):c.jsx(D.FormField,{fieldType:"dropdown",notificationText:($t=(Ze=Y.formState.errors)==null?void 0:Ze.distributionSet)==null?void 0:$t.message,children:c.jsx(wv,{selected:((ge=Y.getValues().distributionSet)==null?void 0:ge.id.toString())??"",onSelect:Ee=>Y.setValue("distributionSet",Ee,{shouldDirty:!0,shouldValidate:!0}),compatibleDistributionSetTypes:M,getDisplayName:Ee=>{var rt,lt;const _e=`${Ee.name}:${Ee.version}`,Ye=((lt=(rt=M==null?void 0:M.find(J=>J.key===Ee.type))==null?void 0:rt.recipes)==null?void 0:lt.length)??0;return Ye===0?_e:Ye===S.length?`${_e} (${r("Recipes.BulkEdit.SysDs.Mode.Add.DsDropdown.SupportedByAll")})`:`${_e} (${r("Recipes.BulkEdit.SysDs.Mode.Add.DsDropdown.SupportedByCount",{count:Ye})})`}})}),Z&&f>0&&c.jsx(D.Notification,{type:"warning",children:r("Recipes.BulkEdit.SysDs.Mode.Add.DsDropdown.SupportedByCount.UnsupportedActions",{count:f})})]}):c.jsx(mo,{label:r("Entity.Label.DistributionSet"),options:L,initiallySelected:[],onChange:V,getName:Ee=>{if(!Ee.dsRef.name||!Ee.dsRef.version)return`${Ee.dsRef.id} (deleted)`;const _e=`${Ee.dsRef.name}:${Ee.dsRef.version}`,Ye=Ee.sysDsItems.length;return Ye>1?`${_e} (used in ${Ye} recipes)`:_e},searchPlaceholder:r("Entity.Label.DistributionSet")}),H&&c.jsx(pe,{error:H}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:r("Button.Cancel"),mode:"secondary",onClick:t}),c.jsx(D.Button,{label:r("Button.Apply"),mode:"primary",onClick:fe,disabled:Le})]})]})}function z9(){return{name:"",description:"",distributionSet:void 0}}function q9(){const e=R(),t=Wt(),n=Ke();return ln({onError:(r,i)=>{n.invalidateQueries(Jr.all()),i.onError&&i.onError(r)},onSuccess:(r,i)=>{n.invalidateQueries(Jr.all()),i.onSuccess&&i.onSuccess(r)},mutationKey:Jr.addEntity(),mutationFn:async r=>(await t.post("/recipe-tags",{name:r.name,description:r.description,exposed:r.exposed},{headers:{"Content-Type":"application/json","X-SOUP-TENANT":r.targetTenant}}).catch(s=>{throw It(e,s)})).data})}function X9({report:e,exportTenant:t,tagId:n}){const r=R();return e.isFinished&&e.successItems.length>0&&!e.isCancelled?c.jsx("div",{children:c.jsx(D.Notification,{type:"neutral",children:c.jsx(D.Link,{icon:{iconName:"externallink",isUiIcon:!0},iconPosition:"right",target:"_blank",href:p4(t,{tagId:[n]}),title:r("Recipes.BulkExport.ShowExportedRecipes"),label:r("Recipes.BulkExport.ShowExportedRecipes")})})}):null}function K9(e){const{onClose:t}=e,{toExport:n}=e.options??{},r=R(),i=Tv(),{mutate:s}=hD();if(!n||n.length===0)throw new Error("Export recipes missing");const[o,a]=x.useState(null),[l,u]=x.useState(),{mutate:d}=q9(),f=x.useMemo(()=>n.filter(b=>ls(b,"export")),[n]),p=f.length,h=n.length-p,m=x.useCallback(()=>{if(!l)return;const b=`Export-${new Date().toISOString()}`;d({name:b,exposed:!1,targetTenant:l},{onSuccess:g=>{i({title:r("Recipes.BulkExport.Progress.Title",{count:f.length}),items:f,operationFn:async v=>{const S=Xt(v,"export");if(!S)throw new Error("Export not possible for this recipe");return new Promise((w,_)=>{s({exportUrl:S,targetTenant:l,attachTags:[b],onSuccess:w,onError:_})})},errorResolver:{resolveName:v=>v.name??v.id,resolveId:v=>v.id,resolveRoute:v=>Do(v.id)},onProgressReport:v=>c.jsx(X9,{report:v,exportTenant:l,tagId:g.id})}),t()},onError:g=>{a(`Could not trigger export: ${g.message}`)}})},[l,d,f,r,i,t,s]),y=x.useCallback(b=>{a(null),u(b)},[]);return c.jsxs(D.Dialog,{variant:"info",dialogId:Xy,title:r("Recipes.BulkExport.Title",{count:n.length}),onClose:t,modal:!0,open:!0,onKeyUp:b=>{b.key==="Escape"&&t()},children:[c.jsx("div",{children:c.jsx("p",{children:r("Recipes.BulkExport.Tenant.Hint",{count:p})})}),c.jsx(gD,{onChange:y,excludeCurrentTenant:!0}),o&&c.jsx(pe,{error:{message:o}}),p>mr?c.jsx(D.Notification,{type:"error",children:r("Recipes.BulkExport.TooManyItems",{max:mr})}):h>0&&c.jsx(D.Notification,{type:"warning",children:r("Recipes.BulkExport.UnsupportedAction",{count:h})}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:r("Button.Cancel"),mode:"secondary",onClick:t}),c.jsx(D.Button,{label:r("Button.Export"),mode:"primary",onClick:m,disabled:!l||p>mr||p===0})]})]})}const Q9=({shell:e,connect:t})=>{e.registerTranslation({en:YH}),e.registerModal(Yy,t(UH)),e.registerModal(Wy,t(J4)),e.registerModal(Ky,t(h9)),e.registerModal(Hy,t(r4)),e.registerModal(Zy,t(i4)),e.registerModal(Qy,t(M9)),e.registerModal(Jy,t(N9)),e.registerModal(ev,t(U9)),e.registerModal(tv,t(F9)),e.registerModal(zy,t(o9)),e.registerModal(Uy,t(p9)),e.registerModal(qy,t(f9)),e.registerModal(Xy,t(K9)),e.registerModal(nv,t(o4)),e.registerModal(rv,t(b4)),e.registerModal(iv,t(i9)),e.registerModal(sv,t(W4)),e.registerModal(ov,t(H4)),e.registerModal(av,t(z4)),e.registerModal(lv,t(U4))},J9="soup-systems",eZ="soup-recipes",tZ="soup-system-actions";function nZ(e){function t(){const n=(e.getScope()??"").split(" "),r=/^tenant.*\/soup\/ui-access/;return n.some(i=>r.test(i))}return[{id:J9,name:e.translate("Systems.UIFeature.Name"),description:e.translate("Systems.UIFeature.Description"),icon:"connectivity",link:Ap(),bigPictureBox:"soup",requires:()=>t(),doc:"https://docs.bosch-iot-rollouts.com/SOUP-System-and-module.html",api:"https://swagger-ui.eu1.bosch-iot-rollouts.com/?urls.primaryName=System+Software+Updates+%2F+Management+API"},{id:eZ,name:e.translate("Recipes.UIFeature.Name"),description:e.translate("Recipes.UIFeature.Description"),icon:"plan-a-to-b",link:Pp(),bigPictureBox:"soup",requires:()=>t(),doc:"https://docs.bosch-iot-rollouts.com/SOUP-Recipe.html",api:"https://swagger-ui.eu1.bosch-iot-rollouts.com/?urls.primaryName=System+Software+Updates+%2F+Management+API"},{id:tZ,name:e.translate("SystemActions.UIFeature.Name"),description:e.translate("SystemActions.UIFeature.Description"),icon:"sequence-checkmark",link:yv(),bigPictureBox:"soup",requires:()=>t(),doc:"https://docs.bosch-iot-rollouts.com/SOUP-System-actions.html",api:"https://swagger-ui.eu1.bosch-iot-rollouts.com/?urls.primaryName=System+Software+Updates+%2F+Management+API"}]}const rZ="data:text/markdown;base64,VGhlIGxpc3Qgb2Ygc3lzdGVtcyB0aGF0IGNhbiBiZSB1cGRhdGVkIHVzaW5nIHJlY2lwZXMuCgpBIHN5c3RlbSBpcyBhIGdyb3VwIG9mIGludGVyLWNvbm5lY3RlZCBtb2R1bGVzIHdoaWNoIGNhbiBiZSB1cGRhdGVkIHZpYSBhIHNwZWNpYWwgbW9kdWxlIGkuZS4sIGEgZ2F0ZXdheS4gQSBzeXN0ZW0gaGFzIGEgdW5pcXVlIElkIGFuZCBpcyBjcmVhdGVkIG9uIHRoZSBiYXNpcyBvZiBhIFN5c3RlbSBSZXBvcnQuIFNlZSB0aGUgW2RvY3VtZW50YXRpb25dKGh0dHBzOi8vZG9jcy5ib3NjaC1pb3Qtcm9sbG91dHMuY29tL1NPVVAtU3lzdGVtLWFuZC1tb2R1bGUuaHRtbCkgZm9yIGRldGFpbGVkIGluZm9ybWF0aW9uLgoKVG8gZGVsZXRlIG9uZSBvciBtb3JlIHN5c3RlbXMsIHNlbGVjdCB0aGVtIHZpYSB0aGUgY2hlY2tib3hlcyBhbmQgY2xpY2sgPEljb24gaWNvbk5hbWU9ImRlbGV0ZSIgLz4gaW4gdGhlIGNvbW1hbmQgYmFyLgoKVGhlIGxpc3QgY2FuIGJlIGZpbHRlcmVkIGJ5IGNsaWNraW5nIHRoZSA8SWNvbiBpY29uTmFtZT0iZmlsdGVyIiAvPi4gT25seSBzeXN0ZW1zIHRoYXQgbWF0Y2ggYWxsIHRoZSBmaWx0ZXIgY3JpdGVyaWEgd2lsbCB0aGVuIGJlIGRpc3BsYXllZC4KCioqSGludCoqOiBXaGVuIHVzaW5nIHRoZSBzZWFyY2ggZmllbGQsIG9ubHkgc3lzdGVtcyBhcmUgbGlzdGVkIHRoYXQgY29udGFpbiB0aGUgc2VhcmNoIHRleHQgaW4gdGhlIHN5c3RlbSBJRCwgZ2F0ZXdheSBJRC4KCllvdSBjYW4gY29uZmlndXJlIHRoZSBkaXNwbGF5ZWQgY29sdW1ucyB2aWEgdGhlIDxJY29uIGljb25OYW1lPSJzZXR0aW5ncyIgLz4gbWVudS4=",fa={...Kn("systems")},Vp={...Kn("modules")},iZ=["Systems.List.SystemSearch","Systems.List.ModuleSearch"],sZ={"Systems.List.SystemSearch":["Systems.Label.SystemId","Systems.Label.ReportedGateway"],"Systems.List.ModuleSearch":["Systems.Label.ModuleId","System.Details.ModuleList.Label.PrimaryId","System.Details.ModuleList.Label.SecondaryId"]};function oZ(e,t){var r,i,s,o,a;const n=new URLSearchParams;return Jl(n,e.search),eo(n,t),e.moduleSearch&&n.append("moduleSearch",`*${e.moduleSearch}*`),No(n,"isOutdated",(r=e.isOutdated)==null?void 0:r.toString()),No(n,"initialSystemReportTime[gt]",(i=e.initialSystemReportTimeGreaterThan)==null?void 0:i.toISOString()),No(n,"initialSystemReportTime[lt]",(s=e.initialSystemReportTimeLessThan)==null?void 0:s.toISOString()),No(n,"lastSystemReportTime[gt]",(o=e.lastSystemReportTimeGreaterThan)==null?void 0:o.toISOString()),No(n,"lastSystemReportTime[lt]",(a=e.lastSystemReportTimeLessThan)==null?void 0:a.toISOString()),nr(n,"installedRecipeId[]",e.installedRecipeId),nr(n,"assignedRecipeId[]",e.assignedRecipeId),nr(n,"matchingRecipe[]",e.matchingRecipeId),nr(n,"matchingReleaseCandidateRecipe[]",e.matchingRcRecipeId),nr(n,"reportedBy[]",e.reportedBy),nr(n,"updateStatus[]",e.updateStatus),Ht(fa.listFilteredWithSorting(e,t??null),"systems","system",{queryParams:n})}function aZ({typeName:e,allColumns:t,onColumnSelectionChange:n,multiSortProps:r}){const i=R(),{selectedColumnIds:s,setSelectedColumnIds:o}=b2(t,HH,e);x.useEffect(()=>{n(t.filter(l=>s.includes(l.data.columnId)))},[t,s,n]);const a=x2({columns:t,textGroupTitle:i("ColumnSelector.TextColumns"),iconGroupTitle:i("ColumnSelector.IconColumns")});return c.jsx(C2,{columnGroups:a,selectedIds:s,onChange:o,searchPlaceholder:i("ColumnSelector.SearchPlaceholder"),resetButtonTitle:i("ColumnSelector.ResetButtonTitle"),settingsTooltip:i("ColumnSelector.SettingsTooltip"),header:r?c.jsx(D.Toggle,{id:`rollouts_${e}-list-sort-multiple-columns`,rightLabel:i("ColumnSelector.SortMultipleCheckboxLabel"),checked:r==null?void 0:r.isMultiSort,onChange:l=>r==null?void 0:r.onToggleMultiSort(l.target.checked)}):void 0})}function bn({count:e,selectedCount:t=0,onRefresh:n,refreshDisabled:r,actions:i,columnSelectorProps:s,mainAction:o,content:a,filterSelector:l}){const u=R();return c.jsx(D.CommandBar,{style:{marginBottom:"1rem",minHeight:"4rem",height:"auto"},content:c.jsxs(c.Fragment,{children:[e!==null&&t===0&&c.jsx("div",{children:u("Entity.List.TotalCount",{count:e})}),t>0&&c.jsx("div",{children:u("Entity.List.TotalSelected",{selectedCount:t})}),l,a]}),actions:i||c.jsx(yr,{onRefresh:n,refreshDisabled:r}),mainAction:c.jsxs(c.Fragment,{children:[s&&c.jsx(aZ,{...s}),o||null]})})}function yr({onRefresh:e,refreshDisabled:t}){const n=R();return c.jsx(c.Fragment,{children:e&&c.jsx(D.Button,{title:n("CommandBar.Actions.Refresh"),icon:"refresh",mode:"integrated",onClick:e,disabled:t})})}function lZ({isOutdated:e,withLabel:t}){const n=R();return e?c.jsx(Qr,{iconProps:{iconName:"connectivity-off-disabled-light",label:n("Systems.Outdated")},showLabel:t}):c.jsx(c.Fragment,{})}function $p({controllerId:e,name:t,withTargetIcon:n}){const r=R();return c.jsxs("div",{className:"ellipsis-text",style:{display:"flex"},children:[n&&c.jsx(D.Icon,{role:"img",iconName:"generic-device-connected",style:{color:"var(--color-black)",paddingRight:"0.2rem"}}),c.jsx(ar,{href:B4(e),title:t??e,tooltip:r("TargetLink.Tooltip",{controllerId:e})})]})}const cZ={label:"Systems.UpdateStatus.InSync",iconName:"alert-success",color:"green-50"},uZ={label:"Systems.UpdateStatus.Error",iconName:"problem-frame",color:"red-50"},dZ={label:"Systems.UpdateStatus.Pending",iconName:"circle-half",color:"yellow-85"},fZ={label:"Systems.UpdateStatus.Registered",iconName:"recording",color:"blue-50"},pZ=new Map([["IN_SYNC",cZ],["ERROR",uZ],["PENDING",dZ],["REGISTERED",fZ]]);function kD({status:e,withLabel:t}){const n=R(),r=pZ.get(e)??fu;return c.jsx(Qr,{iconProps:{iconName:r.iconName,label:n(r.label),color:r.color},showLabel:t})}function Mo({title:e,id:t}){const n=Do(t);return c.jsx(ar,{title:e,href:n})}function hZ(e){if(e)return c.jsx(lZ,{isOutdated:e.isOutdated})}function mZ(e){if(e)return c.jsx(kD,{status:e.updateStatus})}function Yp(e,t){const n=t==null?void 0:t._links[e];return n===void 0?null:c.jsx(Mo,{title:n.title,id:Pr(n.href)})}function gZ(e){const t={isDefault:!0},n={isSortable:!0},r={isDefault:!0,isSortable:!0};return[ei(e("Systems.Label.UpdateStatus"),i=>mZ(i),!0,!0,"updateStatus",void 0,"alert-success",!1),ei(e("Systems.Label.Outdated"),i=>hZ(i),!1,!0,"isOutdated",void 0,"connectivity-off-disabled-light",!1),$e(e("Entity.Label.Id"),"id",t),dn(e("Systems.Label.ReportedGateway"),i=>i.lastSystemReportGateway===void 0?null:c.jsx($p,{controllerId:i.lastSystemReportGateway}),"lastSystemReportGateway",t),dn(e("Systems.Label.MatchingReleaseCandidateRecipe"),i=>Yp("matchingReleaseCandidateRecipe",i),"matchingRecipeCandidate"),dn(e("Systems.Label.MatchingRecipe"),i=>Yp("matchingRecipe",i),"matchingRecipe"),dn(e("Systems.Label.AssignedRecipe"),i=>Yp("assignedRecipe",i),"assigned"),dn(e("Systems.Label.InstalledRecipe"),i=>Yp("installedRecipe",i),"installed"),Ln(e("Systems.Label.InitiallyReportedAt"),"initialSystemReportTime",n),Ln(e("Systems.Label.ReportedAt"),"lastSystemReportTime",r),Ln(e("Entity.Label.CreatedAt"),"createdAt",n),$e(e("Entity.Label.CreatedBy"),"createdBy"),Ln(e("Entity.Label.LastModifiedAt"),"lastModifiedAt",n),$e(e("Entity.Label.LastModifiedBy"),"lastModifiedBy")]}function yZ(){const e=R();return x.useMemo(()=>gZ(e),[e])}function vZ(){return tt(Pg)}function bZ(){var f,p,h,m,y,b;const e=R(),{systemsFilter:t,mergeSystemsFilter:n}=Ff(),r=(((f=t.updateStatus)==null?void 0:f.length)??0)>0,i=(((p=t.reportedBy)==null?void 0:p.length)??0)>0,s=(((h=t.assignedRecipeId)==null?void 0:h.length)??0)>0,o=(((m=t.installedRecipeId)==null?void 0:m.length)??0)>0,a=(((y=t.matchingRecipeId)==null?void 0:y.length)??0)+(((b=t.matchingRcRecipeId)==null?void 0:b.length)??0)>0,l=t.isOutdated!==null,u=t.initialSystemReportTimeGreaterThan!==null||t.initialSystemReportTimeLessThan!==null,d=t.lastSystemReportTimeGreaterThan!==null||t.lastSystemReportTimeLessThan!==null;return c.jsxs(c.Fragment,{children:[r?c.jsx(Tn,{category:e("Entity.Label.Status"),onClose:()=>n({updateStatus:null}),value:""},"status"):null,i?c.jsx(Tn,{category:e("Systems.Label.ReportedGateway"),onClose:()=>n({reportedBy:null}),value:""},"reportedBy"):null,a?c.jsx(Tn,{category:e("Systems.Label.MatchingRecipes"),onClose:()=>n({matchingRecipeId:null,matchingRcRecipeId:null}),value:""},"matchingRecipe"):null,s?c.jsx(Tn,{category:e("Systems.Label.AssignedRecipes"),onClose:()=>n({assignedRecipeId:null}),value:""},"assignedRecipe"):null,o?c.jsx(Tn,{category:e("Systems.Label.InstalledRecipes"),onClose:()=>n({installedRecipeId:null}),value:""},"installedRecipe"):null,u?c.jsx(Tn,{category:e("Systems.Label.InitiallyReportedAt"),onClose:()=>n({initialSystemReportTimeGreaterThan:null,initialSystemReportTimeLessThan:null}),value:""},"initialReport"):null,d?c.jsx(Tn,{category:e("Systems.Label.ReportedAt"),onClose:()=>n({lastSystemReportTimeGreaterThan:null,lastSystemReportTimeLessThan:null}),value:""},"lastReport"):null,l?c.jsx(Tn,{category:e("Systems.Label.Outdated"),onClose:()=>n({isOutdated:null}),value:""},"isOutdated"):null]})}function DD({matchJob:e}){const t=R(),n=c.jsx(nm,{href:"https://docs.bosch-iot-rollouts.com/SOUP-Recipe.html#src-3958024609_SOUPRecipe-Recipematchalgorithm",children:t("Info.Job.RecipeMatch.DocLink")}),r=c.jsx(Mo,{title:e._links.recipe.title,id:Pr(e._links.recipe.href)}),i=cp(e.startedAt),s=Math.ceil((Date.now()-i.getTime())/1e3/60);return c.jsx(D.Notification,{type:"neutral",style:{marginBottom:"1rem"},icon:{iconName:"alert-info"},children:t("Info.Job.RecipeMatch.InProgress",{docLink:n,recipeLink:r,started:s})})}function CD(e,t,n,r,i,s=()=>{},o){const a=R(),l=Wt(),u=Ke(),d=Ji(r,{additionalMessage:o}),{mutate:f,isLoading:p}=ln({mutationKey:t,mutationFn:async b=>(await l.delete(e,{data:b.entityIds}).catch(v=>{throw It(a,v)}).catch(v=>{throw It(a,v)})).data}),h=(b,g)=>{u.invalidateQueries(n),y(b,g)},m=b=>{u.invalidateQueries(n),s(b)},y=(b,g)=>{const v={onError:_=>h(b,_),onSuccess:m},S=b.map(_=>_.id),w=b.map(i);d(w,()=>f({entityIds:S},v),g)};return{doDelete:y,deleteIsLoading:p}}function SZ(e,t=()=>{}){const n=R();return CD("systems",fa.deleteEntities(),fa.list(),n("Systems.Popup.BulkDelete.Headline",{count:e}),r=>r.id,t,{message:n(e===1?"Systems.Popup.Delete.Info":"Systems.Popup.BulkDelete.Info")})}const xZ=500;function Su({searchId:e,searchingFields:t=[],onSearchChange:n,searchTextInitial:r=""}){const i=R(),[s,o]=x.useState(r),a=o2(s,xZ);x.useEffect(()=>{n==null||n(a)},[a,n]);const l=wZ(i,t);return c.jsx(D.SearchForm,{onReset:()=>o(""),className:`soup-search-form${s?"":" hide-reset-button"}`,searchField:{style:{minWidth:"17rem"},type:"search",id:e,placeholder:i("SearchField.SearchPlaceholder"),title:l,value:s,onChange:u=>{o(u.target.value)}}})}function wZ(e,t){let n;if(t.length){const r=t.map(i=>e(i)).join(", ");n=e("SearchField.SearchTooltip",{columnNames:r})}return n}function _Z({keyedSearchId:e,keys:t,searchKey:n,onSearchKeyChange:r,onSearchChange:i,searchingFieldResolver:s,searchTextInitial:o}){const a=R(),l=x.useMemo(()=>t.map(f=>({name:a(f),value:f})),[t,a]),u=s?s(n):t;return c.jsxs(c.Fragment,{children:[c.jsx(D.Dropdown,{id:`${e}-key`,style:{minWidth:"7rem"},title:a("KeyedSearchField.Dropdown.Title"),options:l,value:n,onChange:d=>{r(d.target.value)}}),c.jsx(Su,{searchId:`${e}-search`,searchingFields:u,onSearchChange:i,searchTextInitial:o})]})}function pa(e,t){x.useEffect(()=>{const n=e.filter(i=>{var s;return i.isSorted&&((s=i.data)==null?void 0:s.sortParamName)});let r;n.length&&(n.sort(kZ),r=DZ(n)),t(r)},[e,t])}function kZ(e,t){return e.multiSortingOrder&&t.multiSortingOrder?e.multiSortingOrder-t.multiSortingOrder:0}function DZ(e){return e.map(t=>t.isSortedDescending?`${t.data.sortParamName}:DESC`:`${t.data.sortParamName}:ASC`).join(",")}function ha(e,t){const n=x.useRef(e);if(n.current=e,!t)throw new Error("listKey must be provided");const[r,i]=g2(ZH,t,[],!1),[s,o]=x.useState(()=>r.length>1),[a,l]=x.useState(r.length);x.useEffect(()=>{r.length>0&&n.current(f=>f.map(p=>{const h=r.find(m=>m.id===p.data.columnId);if(h){const m=r.findIndex(y=>y.id===p.data.columnId)+1;return{...p,isSorted:!0,isSortedDescending:h.direction==="DESC",multiSortingOrder:r.length>1?m:void 0}}return p}))},[r]);const u=x.useCallback((f,p)=>{n.current(h=>{let m=h,y=a;const b=m.find(S=>S.data.columnId===f.data.columnId);s?b!=null&&b.isSorted||(y=a+1,l(y)):(m=MD(m),y=1);const g=m.map(S=>S.data.columnId===f.data.columnId?{...S,isSorted:p!==null,isSortedDescending:p,...s&&{multiSortingOrder:b!=null&&b.isSorted?b.multiSortingOrder:y}}:S),v=g.filter(S=>S.isSorted).sort((S,w)=>S.multiSortingOrder&&w.multiSortingOrder?S.multiSortingOrder-w.multiSortingOrder:0).map(S=>({id:S.data.columnId,direction:S.isSortedDescending?"DESC":"ASC"}));return i(v),g})},[s,a,i]),d=x.useCallback(()=>{l(0),i([]),n.current(f=>MD(f))},[i]);return{sortColumn:u,resetSorting:d,isSortingMultipleColumns:s,setIsSortingMultipleColumns:o}}function MD(e){return e.map(t=>({...t,isSorted:void 0,isSortedDescending:void 0,multiSortingOrder:void 0}))}function ma(e){const t=R();return(n,r,i)=>{const s=n;let o;s.data.icon?o=c.jsx(D.Icon,{iconName:s.data.icon,"data-testid":"trigger"}):o=i(s,r);const a=()=>{e(s,!1)},l=()=>{e(s,!0)};return s.data.isSortable?c.jsxs(D.ContextMenu,{trigger:c.jsx("span",{style:{cursor:"pointer"},children:o}),style:{width:"100%"},placeholder:void 0,onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0,children:[c.jsx(D.MenuItem,{disabled:s.isSorted&&s.isSortedDescending===!1,children:c.jsxs(D.MenuItemLink,{onClick:a,children:[c.jsx(D.Icon,{iconName:"arrow-up"}),c.jsx(D.MenuItemLabel,{children:s.data.ascLabel??t("SortingMenuHeader.Ascending")})]})}),c.jsx(D.MenuItem,{disabled:s.isSorted&&s.isSortedDescending===!0,children:c.jsxs(D.MenuItemLink,{onClick:l,children:[c.jsx(D.Icon,{iconName:"arrow-down"}),c.jsx(D.MenuItemLabel,{children:s.data.descLabel??t("SortingMenuHeader.Descending")})]})})]}):o}}const CZ="systems";function MZ({data:e,totalCount:t,loadingData:n,fetchMoreData:r,onRefresh:i,onSortQueryChange:s,selectedId:o,onSelect:a,recipeMatchJob:l}){const u=R(),d=vZ(),{systemsFilter:f,mergeSystemsFilter:p}=Ff(),h=yZ(),m=ht(),[y,b]=x.useState(f.moduleSearch?"Systems.List.ModuleSearch":"Systems.List.SystemSearch"),[g,v]=x.useState(h),[S,w]=x.useState([]),_=x.useMemo(()=>Ql(o,e),[e,o]);pa(g,s);const{sortColumn:T,isSortingMultipleColumns:M,setIsSortingMultipleColumns:C,resetSorting:k}=ha(v,"systems"),I=x.useMemo(()=>({allColumns:h,onColumnSelectionChange:v,typeName:CZ,multiSortProps:{isMultiSort:M,onToggleMultiSort(G){C(G),G||k()}}}),[h,M,k,C]),{doDelete:O,deleteIsLoading:A}=SZ(S.length,G=>{G.failedActions&&Object.keys(G.failedActions).length>0?(w(Z=>Z.filter(W=>W.id in G.failedActions)),m(u("Systems.Info.BulkDelete.Failed",{failedActionsCount:Object.keys(G.failedActions).length,overallCount:S.length}))):(m(u("Systems.Info.BulkDelete.Success",{count:S.length})),w([]))}),L=x.useCallback(G=>{p(y==="Systems.List.SystemSearch"?{search:G,moduleSearch:null}:{search:null,moduleSearch:G})},[p,y]),V=x.useCallback(G=>b(G),[]),Y=y==="Systems.List.ModuleSearch"?f.moduleSearch??"":f.search??"",N=[...iZ],j=x.useMemo(()=>ma(T),[T]);return c.jsxs(c.Fragment,{children:[l&&c.jsx(DD,{matchJob:l}),c.jsxs(cn,{children:[c.jsx(bn,{count:t,selectedCount:S.length,columnSelectorProps:I,content:c.jsxs(c.Fragment,{children:[c.jsx(_Z,{keyedSearchId:"systems-list-search",keys:N,searchKey:y,onSearchChange:L,onSearchKeyChange:V,searchTextInitial:Y,searchingFieldResolver:G=>sZ[G]??[G??""]}),c.jsx(D.Button,{title:u("Button.Filter"),label:u("Button.Filter"),icon:"filter",mode:"integrated",onClick:()=>d()}),c.jsx(bZ,{})]}),actions:c.jsxs(c.Fragment,{children:[c.jsx(D.Button,{title:u("Systems.List.Delete"),icon:"delete",mode:"integrated",disabled:!S.length||A,onClick:()=>O(S)}),c.jsx("div",{className:"rollouts-command-bar_separator"}),c.jsx(yr,{onRefresh:()=>{w([]),i()},refreshDisabled:n})]})}),c.jsx(D.DataList,{items:e,columns:g,enableScrolling:!0,emptyStateMessage:u("Systems.List.Empty"),onScrollToBottom:r,selected:_,onSelect:G=>a(G.id),onRenderColumnHeader:j,checked:S,onChecked:w,children:n&&c.jsx(et,{"data-testid":"systems-list-loading"})})]})]})}function Di(){const e=Te.useNavigate(),t=Te.useLocation();return{toHome(){e({pathname:Ap(),search:t.search})},toDetails(n){e({pathname:Jk(n),search:t.search})},toSubDetails(n,r,i){e({pathname:f4(n,r,i),search:t.search})},toSystemTypesHome(){e({pathname:hv(),search:t.search})},toSystemTypeDetails(n){e({pathname:eD(n),search:t.search})},toModuleTypesHome(){e({pathname:tD(),search:t.search})},toModuleTypeDetails(n){e({pathname:nD(n),search:t.search})}}}const TD={all:["jobs"],recipeMatch:()=>[...TD.all,"recipeMatch"]};function ID(e=!1){return or(TD.recipeMatch(),"jobs/recipe-match",{refetchInterval:e?5e3:void 0})}function xu(){const{id:e}=Te.useParams(),[t,n]=x.useState(!1),r=Di(),{systemsFilter:i}=Ff(),[s,o]=x.useState(),{data:a,isLoading:l,error:u,fetchNextPage:d,reset:f}=oZ(i,s),{data:p,error:h,refetch:m}=ID(t);x.useEffect(()=>n(p!==null),[n,p]);const y=()=>{f(),m()},{totalCount:b,entities:g}=Tt(a);return u||h?c.jsx(pe,{error:u??h}):c.jsx(MZ,{data:g,totalCount:b,loadingData:l,fetchMoreData:d,onRefresh:y,onSortQueryChange:o,selectedId:e,onSelect:v=>r.toDetails(v),recipeMatchJob:p??void 0})}xu.displayName="SystemsListBlade";function TZ(){const e=R();return c.jsxs(c.Fragment,{children:[e("Systems.List.BladeHeader"),c.jsx(Cn,{popoverHeading:e("Systems.List.BladeHeader"),children:c.jsx("div",{children:c.jsx(Ft,{markdownFilePath:rZ})})})]})}xu.Header=TZ;const IZ="data:text/markdown;base64,U09VUCB0cmFja3MgYW5kIG1hbmFnZXMgW3N5c3RlbXNdKGh0dHBzOi8vZG9jcy5ib3NjaC1pb3Qtcm9sbG91dHMuY29tL1NPVVAtU3lzdGVtLWFuZC1tb2R1bGUuaHRtbCkgY29tcG9zZWQgb2YgaW50ZXJjb25uZWN0ZWQgbW9kdWxlcy4gVGhlc2Ugc3lzdGVtcyBhcmUgZHluYW1pY2FsbHkgY3JlYXRlZCBvciB1cGRhdGVkIGJhc2VkIG9uIHN5c3RlbSByZXBvcnRzIHlvdSBwcm92aWRlLiBVcGRhdGFibGUgbW9kdWxlcyBhcmUgcmVwcmVzZW50ZWQgYXMgdGFyZ2V0cyB3aXRoaW4gdGhlIElvVCBSb2xsb3V0cyBzZXJ2aWNlLCBhbGxvd2luZyBlZmZpY2llbnQgdXBkYXRlcyBhbmQgbWFuYWdlbWVudC4KCipNYXRjaGluZyByZWxlYXNlIGNhbmRpZGF0ZSo6IENvbnNpZGVyaW5nIG9ubHkgcmVjaXBlcyBpbiBzdGF0ZSA8SWNvbiBpY29uTmFtZT0iZG9jdW1lbnQtY2hlY2siIC8+ICpSZWxlYXNlIGNhbmRpZGF0ZSogYW5kIDxJY29uIGljb25OYW1lPSJjaGVja2xpc3QiIC8+ICpXYWl0aW5nIGZvciBhcHByb3ZhbCosIHRoaXMgcmVjaXBlIG1hdGNoZXMgdGhlIHN5c3RlbS4gVGhpcyBpbmZvcm1hdGlvbiBoZWxwcyB0byB1bmRlcnN0YW5kIHRoZSBjb3ZlcmFnZSBvZiB5ZXQgdW5yZWxlYXNlZCByZWNpcGVzLgoKKk1hdGNoaW5nKjogVGhpcyByZWNpcGUgaXMgdGhlIG1hdGNoaW5nIDxJY29uIGljb25OYW1lPSJhbGVydC1zdWNjZXNzIiBzdHlsZT0iY29sb3I6dmFyKC0tY29sb3ItZ3JlZW4tNTApOyIvPiAqUmVsZWFzZWQqIHJlY2lwZSBmb3IgdGhpcyBzeXN0ZW0uCgoqQXNzaWduZWQqOiBUaGlzIHJlY2lwZSBpcyBhc3NpZ25lZCB0byB0aGUgc3lzdGVtIGZvciBpbnN0YWxsYXRpb24uCgoqSW5zdGFsbGVkKjogVGhpcyByZWNpcGUgaXMgY3VycmVudGx5IGluc3RhbGxlZCBvbiB0aGUgc3lzdGVtLgoKKipIaW50Kio6IFRoZSBtYXRjaGluZyByZWNpcGVzIGFyZSBhdXRvbWF0aWNhbGx5IHVwZGF0ZWQsIHdoZW5ldmVyIGEgcmVjaXBlIHN0YXR1cyBjaGFuZ2Ugb2NjdXJzLgoKVGhlIDxJY29uIGljb25OYW1lPSJ3cmVuY2giIC8+IGljb24gYWxsb3dzIHRvIGRlbGV0ZSB0aGUgc3lzdGVtLg==";function EZ(e){const t=e!==void 0,n=t?fa.entityDetails(e):[];return or(n,`systems/${e}`,{enabled:t})}function Wp({title:e,tooltip:t,filter:n}){const r=O4(n);return c.jsx(ar,{title:e,href:r,tooltip:t})}function RZ({systemId:e}){const t=R(),n=`attribute.soup.SystemId==${e}`;return c.jsx(Wp,{title:t("ModulesLink.Title"),tooltip:t("ModulesLink.Tooltip",{systemId:e}),filter:{fq:n}})}const LZ="data:text/markdown;base64,Jm5ic3A7PEljb24gaWNvbk5hbWU9InJlY29yZGluZyIgc3R5bGU9ImNvbG9yOnZhcigtLWNvbG9yLWJsdWUtNTApOyIvPiAqUmVnaXN0ZXJlZCo6IFRoZSBzeXN0ZW0gaXMgcmVnaXN0ZXJlZCB3aXRoIHRoZSBzZXJ2aWNlIGJ1dCBubyByZWNpcGUgaXMgYXNzaWduZWQuCgombmJzcDs8SWNvbiBpY29uTmFtZT0iY2lyY2xlLWhhbGYiIHN0eWxlPSJjb2xvcjp2YXIoLS1jb2xvci15ZWxsb3ctODUpOyIvPiAqUGVuZGluZyo6IEluc3RhbGxhdGlvbiBvZiB0aGUgYXNzaWduZWQgcmVjaXBlIGlzIG5vdCB5ZXQgY29uZmlybWVkLgoKJm5ic3A7PEljb24gaWNvbk5hbWU9ImFsZXJ0LXN1Y2Nlc3MiIHN0eWxlPSJjb2xvcjp2YXIoLS1jb2xvci1ncmVlbi01MCk7Ii8+ICpJbiBzeW5jKjogVGhlIGFzc2lnbmVkIHJlY2lwZSBpcyBpbnN0YWxsZWQuCgombmJzcDs8SWNvbiBpY29uTmFtZT0icHJvYmxlbS1mcmFtZSIgc3R5bGU9ImNvbG9yOnZhcigtLWNvbG9yLXJlZC01MCk7Ii8+ICpFcnJvcio6IFRoZSBpbnN0YWxsYXRpb24gb2YgdGhlIGFzc2lnbmVkIHJlY2lwZSBmYWlsZWQuCg==",OZ="data:text/markdown;base64,KkNyZWF0ZWQgYXQvYnkqOiBTZXQgd2hlbiBzeXN0ZW0gaXMgY3JlYXRlZC4KCipMYXN0IG1vZGlmaWVkIGF0L2J5KjogU2V0IHdoZW5ldmVyIHN5c3RlbSBpcyBtb2RpZmllZC4gCgoqSW5pdGlhbGx5IHJlcG9ydGVkIGF0KjogVGltZXN0YW1wIGNvbnRhaW5lZCBpbiB0aGUgc3lzdGVtIHJlcG9ydCB0aGF0IGxlZCB0byB0aGUgY3JlYXRpb24gb2YgdGhpcyBzeXN0ZW0uIAoKKkxhc3QgcmVwb3J0ZWQgYXQqOiBUaW1lc3RhbXAgY29udGFpbmVkIGluIHRoZSBsYXN0IHJlY2VpdmVkIHN5c3RlbSByZXBvcnQuCgoqTGFzdCBtYXRjaGVkIGF0KjogU2V0IHdoZW5ldmVyIHRoZSBtYXRjaGluZyByZWNpcGVzIGFyZSBjYWxjdWxhdGVkLg==",BZ="data:text/markdown;base64,VGhlIG1vZHVsZXMgb2YgdGhlIHN5c3RlbSBhbmQgdGhlaXIgcm9sZSAoZS5nLiA8SWNvbiBpY29uTmFtZT0id2lzaGxpc3QiIC8+ICpQcmltYXJ5KiksIGhpZ2hsaWdodGluZyBob3cgdGhleSBjb250cmlidXRlIHRvIGlkZW50aWZ5aW5nIHRoZSBzeXN0ZW0uIFVwZGF0YWJsZSBtb2R1bGVzIGFyZSBsaW5rZWQgdG8gdGhlIHJlc3BlY3RpdmUgdGFyZ2V0Lg==";function ED({title:e,filter:t}){const n=R(),r=yv(t);return c.jsx(ar,{title:e??n("Button.ViewSystemActions"),href:r})}const AZ={position:"absolute",right:0},PZ={position:"bottom-left",triggerOffset:8},ti=({title:e,testId:t,children:n})=>c.jsx(D.ContextMenu,{trigger:c.jsx(D.Button,{icon:"wrench",mode:"integrated"}),title:e,"data-testid":t,placeholder:void 0,onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0,style:AZ,popover:PZ,children:n});function vr(e,t,n,r,i=()=>{},s){const o=R(),a=Wt(),l=ht(),u=Ke(),d=Ji(n,{additionalMessage:{message:s}}),{mutate:f,isLoading:p}=ln({mutationKey:e,mutationFn:async b=>{await a.delete(b.url).catch(g=>{throw It(o,g)})}}),h=(b,g,v)=>{t.forEach(S=>u.invalidateQueries(S)),y(b,g,v)},m=()=>{l(r),t.forEach(b=>u.invalidateQueries(b)),i()},y=(b,g,v)=>{const S={onError:w=>h(b,g,w),onSuccess:m};d(b,()=>f({url:g},S),v)};return{doDelete:y,deleteIsLoading:p}}function NZ({system:e}){const t=R(),n=Di(),{doDelete:r,deleteIsLoading:i}=vr(fa.deleteEntity(),[fa.list()],t("Systems.Popup.Delete.Headline"),t("Systems.Info.Delete.Success"),()=>n.toHome(),t("Systems.Popup.Delete.Info")),s=Xt(e,"delete");return c.jsx(ti,{title:t("System.Details.ActionsMenu.Title"),testId:"system-actions",children:c.jsx(D.MenuItem,{label:t("Button.Delete"),icon:"delete",title:t("Button.Delete"),onClick:()=>r(e.id,s??""),disabled:!s||i})})}function RD({primaryId:e,isUpdatable:t,withTargetIcon:n}){const r=R(),i=t?r("SystemModuleTargetLink.Updatable.Tooltip",{id:e}):r("SystemModuleTargetLink.NonUpdatable.Tooltip");return c.jsx("div",{className:"ellipsis-text",style:{display:"inline-flex",alignItems:"center"},children:t?c.jsx(c.Fragment,{children:c.jsx($p,{controllerId:e,withTargetIcon:n})}):c.jsx("span",{title:i,children:e})})}const jZ={label:"System.Roles.Default",iconName:"components"},FZ={label:"System.Roles.Removable",iconName:"replace"},GZ={label:"System.Roles.Primary",iconName:"wishlist"},VZ={label:"System.Roles.Tracked",iconName:"watch-on"},$Z=new Map([["default",jZ],["removable",FZ],["primary",GZ],["tracked",VZ]]);function LD({moduleRole:e,withLabel:t}){const n=R(),r=$Z.get(e);return r?c.jsx(Qr,{iconProps:{iconName:r.iconName,label:n(r.label),color:r.color},showLabel:t}):null}function wu({title:e,id:t}){const n=R();return t?c.jsx("div",{children:c.jsx(Te.Link,{to:nD(t),title:n("ModuleTypeLink.Tooltip",{id:t}),children:e})}):c.jsx(c.Fragment,{})}function YZ(e){if(e)return c.jsx(LD,{moduleRole:e.role})}function WZ(e,t,n){return n!=null&&(t==null?void 0:t.reportedId.primary)==n?c.jsx(Qr,{iconProps:{iconName:"gateway",label:e("System.Details.ModuleList.Icon.Tooltip.Gateway")}}):null}function HZ(e,t){const n={isDefault:!0};return[ei(e("System.Details.ModuleList.Label.Gateway"),r=>WZ(e,r,t),!0,!0,void 0,"gateway"),ei(e("System.Details.ModuleList.Label.Role"),r=>YZ(r),!0,!0,"role"),dn(e("System.Details.ModuleList.Label.PrimaryId"),r=>r.reportedId===void 0?null:c.jsx(RD,{primaryId:r.reportedId.primary,isUpdatable:r.isUpdatable}),"modulePrimaryId",n),$e(e("System.Details.ModuleList.Label.SecondaryId"),"reportedId",void 0,void 0,"",void 0,r=>r.reportedId.secondary),$e(e("System.Details.ModuleList.Label.Name"),"reportedName",n,void 0,""),dn(e("System.Details.ModuleList.Label.Type"),r=>{var i;return c.jsx(wu,{id:Pr((i=r._links.type)==null?void 0:i.href),title:r._links.type.title})},"moduleType",n)]}function ZZ(e){const t=R();return x.useMemo(()=>HZ(t,e),[t,e])}const UZ="modules";function zZ({systemId:e,reportedGatewayId:t,selectedId:n,useApiResult:r}){const i=R(),s=ZZ(t),[o,a]=x.useState(s),l=x.useMemo(()=>({allColumns:s,onColumnSelectionChange:a,typeName:UZ}),[s]),u=Di(),{data:d,isLoading:f,error:p,fetchNextPage:h,reset:m}=r,{totalCount:y,entities:b}=Tt(d),g=x.useMemo(()=>Ql(n,b),[b,n]);return p?c.jsx(pe,{error:p}):c.jsxs(cn,{"data-testid":"system-modules-view",children:[c.jsx(bn,{count:y,columnSelectorProps:l,actions:c.jsx(yr,{onRefresh:m,refreshDisabled:f})}),c.jsx(D.DataList,{items:b,columns:o,enableScrolling:!0,emptyStateMessage:i("System.Details.ModuleList.Empty"),onScrollToBottom:h,selected:g,hideCheckBoxes:!0,onSelect:v=>u.toSubDetails(e,"modules",v.id),children:f&&c.jsx(et,{})})]})}function qZ(e,t){const n=new URLSearchParams;return nr(n,"system[]",e.systemId),eo(n,t),Ht(Vp.listFilteredWithSorting(e,t),"modules","module",{queryParams:n})}function XZ(){const e=R();return c.jsx(D.Notification,{type:"neutral",style:{marginBottom:"1rem"},icon:{iconName:"alert-info"},children:e("Info.Job.SystemMatch.InProgress")})}function KZ(){const e=R(),t=c.jsx(nm,{href:"https://docs.bosch-iot-rollouts.com/SOUP-System-and-module.html#src-4901294062_SOUPSystemandmodule-Systemreportincludesdefaultmodulefromanothersystem",children:e("Systems.Info.Outdated.Link")});return c.jsx(D.Notification,{type:"warning",children:e("Systems.Info.Outdated",{link:t})})}function QZ({system:e}){const t=R(),{id:n,isOutdated:r,lastSystemReportGateway:i,updateStatus:s,matchStatus:o,initialSystemReportTime:a,lastSystemReportTime:l,createdBy:u,createdAt:d,lastModifiedBy:f,lastModifiedAt:p,lastRecipeMatchTime:h}=e,{assignedRecipe:m,installedRecipe:y,matchingRecipe:b,matchingReleaseCandidateRecipe:g}=e._links,v=qZ({systemId:[n??""]},"role:ASC");return c.jsxs(c.Fragment,{children:[r&&c.jsx(KZ,{}),o&&o!="VALID"&&c.jsx(XZ,{}),c.jsx(NZ,{system:e}),c.jsxs(Mn,{label:"",className:"basic-details-layout",style:{marginBottom:0},children:[c.jsx(ne,{header:t("Entity.Label.Id"),showCopy:!0,value:n,children:n}),c.jsx(ne,{header:t("Systems.Label.UpdateStatus"),help:c.jsx(Ft,{markdownFilePath:LZ}),popoverHeading:t("Systems.Label.UpdateStatus"),children:c.jsx(kD,{status:s,withLabel:!0})}),g&&c.jsx(ne,{header:t("Systems.Label.Recipes.MatchingReleaseCandidate"),children:c.jsx(Mo,{title:g.title,id:Pr(g.href)})}),b&&c.jsx(ne,{header:t("Systems.Label.Recipes.Matching"),children:c.jsx(Mo,{title:b.title,id:Pr(b.href)})}),m&&c.jsx(ne,{header:t("Systems.Label.Recipes.Assigned"),children:c.jsx(Mo,{title:m.title,id:Pr(m.href)})}),y&&c.jsx(ne,{header:t("Systems.Label.Recipes.Installed"),children:c.jsx(Mo,{title:y.title,id:Pr(y.href)})}),c.jsx(ne,{header:t("Systems.Label.ActionHistory"),children:c.jsx(ED,{filter:{systemId:[n]}})}),c.jsx(ne,{header:t("Systems.Label.Targets"),children:c.jsx(RZ,{systemId:n})})]}),c.jsx(tn,{header:t("System.Label.Modules"),helpFile:BZ,expandedByDefault:!0,children:c.jsx(zZ,{systemId:n,reportedGatewayId:i,useApiResult:v})}),c.jsx(tn,{header:t("Entity.Label.Audit"),helpFile:OZ,expandedByDefault:!0,children:c.jsxs(Mn,{label:"",className:"basic-details-layout",style:{marginBottom:0},children:[c.jsx(ne,{header:t("Systems.Label.InitiallyReportedAt"),children:jn(a)}),c.jsx(ne,{header:t("Systems.Label.ReportedAt"),children:jn(l)}),h&&c.jsx(ne,{header:t("Systems.Label.LastRecipeMatchedAt"),children:jn(h)}),c.jsx(ne,{header:t("Entity.Label.CreatedAt"),children:jn(d)}),c.jsx(ne,{header:t("Entity.Label.CreatedBy"),children:u}),c.jsx(ne,{header:t("Entity.Label.LastModifiedAt"),children:jn(p)}),c.jsx(ne,{header:t("Entity.Label.LastModifiedBy"),children:f})]})})]})}function _u(){const{id:e}=Te.useParams(),t=EZ(e);return e===void 0?c.jsx(pe,{error:{message:"Missing entity ID"}}):t.error?c.jsx(pe,{error:t.error}):t.isLoading?c.jsx(et,{"data-testid":"system-details-loading"}):c.jsx(QZ,{system:t.data})}_u.displayName="SystemDetailsBlade";function JZ(){const e=R();return c.jsxs(c.Fragment,{children:[e("System.Details.BladeHeader"),c.jsx(Cn,{popoverHeading:e("System.Details.BladeHeader"),children:c.jsx("div",{children:c.jsx(Ft,{markdownFilePath:IZ})})})]})}_u.Header=JZ;const e6="data:text/markdown;base64,QSBtb2R1bGUgaXMgYW4gaW50ZWdyYWwgY29tcG9uZW50IG9mIGEgc3lzdGVtLCBjb250cmlidXRpbmcgdG8gaXRzIG92ZXJhbGwgaWRlbnRpZmljYXRpb24gYmFzZWQgb24gaXRzIHJvbGUgKGUuZy4gPEljb24gaWNvbk5hbWU9Indpc2hsaXN0IiAvPiAqUHJpbWFyeSopLiBJZiBhIG1vZHVsZSBpcyBub3QgdXBkYXRhYmxlLCB0aGVyZSBpcyBubyBjb3JyZXNwb25kaW5nIHRhcmdldC4KCkJlc2lkZXMgYmFzaWMgcHJvcGVydGllcyAoSUQsIHJlcG9ydGVkIElELCBuYW1lLCByb2xlLCBhbmQgY3JlYXRpb24gYW5kIG1vZGlmaWNhdGlvbiBkYXRhIG9mIHRoZSBtb2R1bGUpLCB0aGlzIHZpZXcgZGlzcGxheXMgaW5mb3JtYXRpb24gYWJvdXQgdGhlIGF0dHJpYnV0ZXMgb2YgdGhlIG1vZHVsZS4KCkluIHRoaXMgdmlldyB5b3UgY2FuIGRlbGV0ZSB0aGUgbW9kdWxlIGJ5IGNsaWNraW5nIDxJY29uIGljb25OYW1lPSJ3cmVuY2giIC8+Lg==";function t6({systemId:e,entity:t}){const n=R(),r=Di(),{doDelete:i,deleteIsLoading:s}=vr(Vp.deleteEntity(),[Vp.list(),fa.list()],n("System.Modules.Popup.Delete.Headline"),n("System.Modules.Info.Delete.Success"),()=>r.toDetails(e)),o=t.reportedId.primary,a=Xt(t,"delete");return c.jsx(ti,{title:n("System.Modules.Details.ActionsMenu.Title"),testId:"systemModule-actions",children:c.jsx(D.MenuItem,{label:n("Button.Delete"),icon:"delete",title:n("Button.Delete"),onClick:()=>i(o,a??""),disabled:!a||s})})}const n6="data:text/markdown;base64,VGhlIG1vZHVsZSByb2xlIGluZGljYXRlcyBob3cgdGhpcyBtb2R1bGUgY29udHJpYnV0ZXMgdG8gaWRlbnRpZnlpbmcgdGhlIHN5c3RlbSBhbmQgd2hldGhlciBpdCBpcyB0YWtlbiBpbnRvIGFjY291bnQgZm9yIG1hdGNoaW5nIHJlY2lwZXMuCgombmJzcDs8SWNvbiBpY29uTmFtZT0id2lzaGxpc3QiLz4gKlByaW1hcnkqOiBJZiBwcmVzZW50LCBvbmx5IHByaW1hcnkgbW9kdWxlcyBhcmUgdXNlZCB0byBpZGVudGlmeSB0aGUgc3lzdGVtLiBQYXJ0IG9mIHN5c3RlbSBtYXRjaC48YnI+CgombmJzcDs8SWNvbiBpY29uTmFtZT0iY29tcG9uZW50cyIgLz4gKkRlZmF1bHQqOiBJZiBubyBwcmltYXJ5IG1vZHVsZXMgYXZhaWxhYmxlLCBhbGwgZGVmYXVsdCBtb2R1bGVzIGFyZSB1c2VkIHRvIGlkZW50aWZ5IHRoZSBzeXN0ZW0uIFBhcnQgb2Ygc3lzdGVtIG1hdGNoLjxicj4KCiZuYnNwOzxJY29uIGljb25OYW1lPSJyZXBsYWNlIiAvPiAqUmVtb3ZhYmxlKjogTm90IHRha2VuIGludG8gYWNjb3VudCBmb3Igc3lzdGVtIGlkZW50aWZpY2F0aW9uLiBQYXJ0IG9mIHN5c3RlbSBtYXRjaC48YnI+CgombmJzcDs8SWNvbiBpY29uTmFtZT0id2F0Y2gtb24iIC8+ICpUcmFja2VkKjogTmVpdGhlciB0YWtlbiBpbnRvIGFjY291bnQgZm9yIHN5c3RlbSBpZGVudGlmaWNhdGlvbiBub3IgZm9yIHN5c3RlbSBtYXRjaC4KClNlZSB0aGUgW2RvY3VtZW50YXRpb25dKGh0dHBzOi8vZG9jcy5ib3NjaC1pb3Qtcm9sbG91dHMuY29tL1NPVVAtU3lzdGVtLWFuZC1tb2R1bGUuaHRtbCNzcmMtNDkwMTI5NDA2Ml9TT1VQU3lzdGVtYW5kbW9kdWxlLU1vZHVsZXJvbGVzKSBmb3IgZGV0YWlsZWQgaW5mb3JtYXRpb24u",r6="data:text/markdown;base64,VGhlIHJlcG9ydGVkIElEIHNlcnZlcyBhcyB0aGUgcHJpbWFyeSBpZGVudGlmaWVyIGZvciB0aGUgbW9kdWxlLiBJZiB0aGUgSUQgaXMgdXBkYXRhYmxlLCBpdCB3aWxsIG1hdGNoIHRoZSBjb250cm9sbGVyIElEIGFuZCBiZSBsaW5rZWQgdG8gaXQsIGFzIGluZGljYXRlZCBieSB0aGUgPEljb24gaWNvbk5hbWU9ImdlbmVyaWMtZGV2aWNlLWNvbm5lY3RlZCIgLz4gaWNvbi4=";function i6({systemId:e,details:t}){var u;const n=R(),{id:r,reportedId:i,reportedName:s,role:o,isUpdatable:a,_links:l}=t;return c.jsxs(c.Fragment,{children:[c.jsx(t6,{systemId:e,entity:t}),c.jsxs(Mn,{label:"",className:"basic-details-layout",style:{marginBottom:0},children:[c.jsx(ne,{header:n("Entity.Label.Id"),showCopy:!0,value:r,children:r}),c.jsx(ne,{header:n("System.Details.ModuleList.Label.PrimaryId"),help:c.jsx(Ft,{markdownFilePath:r6}),popoverHeading:n("System.Details.ModuleList.Label.PrimaryId"),children:c.jsx(RD,{primaryId:i.primary,isUpdatable:a,withTargetIcon:!0})}),(i==null?void 0:i.secondary)&&c.jsx(ne,{header:n("System.Details.ModuleList.Label.SecondaryId"),children:i.secondary}),s&&c.jsx(ne,{header:n("System.Details.ModuleList.Label.Name"),children:s}),c.jsx(ne,{header:n("System.Details.ModuleList.Label.Type"),children:c.jsx(wu,{id:Pr((u=l.type)==null?void 0:u.href),title:l.type.title})}),c.jsx(ne,{header:n("System.Details.ModuleList.Label.Role"),help:c.jsx(Ft,{markdownFilePath:n6}),popoverHeading:n("System.Details.ModuleList.Label.Role.Help"),children:c.jsx(LD,{moduleRole:o,withLabel:!0})})]})]})}function s6(e){const t=e!==void 0,n=t?Vp.entityDetails(e):[];return or(n,`modules/${e}`,{enabled:t})}function o6(e){const t={isDefault:!0};return[wD(e("Entity.Label.Key"),"key",t),wD(e("Entity.Label.Value"),"value",t)]}function a6(){const e=R();return x.useMemo(()=>o6(e),[e])}function l6({attributes:e}){const t=R(),n=a6(),r=Object.entries(e).map(([i,s])=>({key:i,value:s}));return c.jsxs(cn,{"data-testid":"system-modules-attributes-list",children:[c.jsx(bn,{count:r.length}),c.jsx(D.DataList,{items:r,columns:n,enableScrolling:!0,emptyStateMessage:t("System.Modules.Details.Attributes.Empty"),hideCheckBoxes:!0})]})}function Vs({auditable:e,expandedByDefault:t=!0}){const n=R(),{createdAt:r,createdBy:i,lastModifiedAt:s,lastModifiedBy:o}=e;return c.jsx(tn,{header:n("Entity.Label.Audit"),expandedByDefault:t,children:c.jsxs(Mn,{label:"",className:"basic-details-layout",style:{marginBottom:0},children:[c.jsx(ne,{header:n("Entity.Label.CreatedAt"),children:jn(r)}),c.jsx(ne,{header:n("Entity.Label.CreatedBy"),children:i}),c.jsx(ne,{header:n("Entity.Label.LastModifiedAt"),children:jn(s)}),c.jsx(ne,{header:n("Entity.Label.LastModifiedBy"),children:o})]})})}function ku(){const{id:e,subEntityId:t}=Te.useParams(),n=R(),r=s6(t);return e===void 0||t===void 0?c.jsx(pe,{error:{message:"Missing entity ID"}}):r.error?c.jsx(pe,{error:r.error}):r.isLoading?c.jsx(et,{}):c.jsxs(c.Fragment,{children:[c.jsx(i6,{systemId:e,details:r.data}),c.jsx(tn,{header:n("System.Modules.Details.Attributes"),expandedByDefault:!0,children:c.jsx(l6,{attributes:r.data.attributes})}),c.jsx(Vs,{auditable:r.data})]})}ku.displayName="SystemModuleDetailsBlade";function c6(){const e=R();return c.jsxs(c.Fragment,{children:[e("System.Modules.Details.BladeHeader"),c.jsx(Cn,{popoverHeading:e("System.Modules.Details.BladeHeader"),children:c.jsx("div",{children:c.jsx(Ft,{markdownFilePath:e6})})})]})}ku.Header=c6;const OD={component:xu,name:xu.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:c.jsx(xu.Header,{}),showCloseButton:!1}},BD={component:_u,name:_u.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:c.jsx(_u.Header,{})}},AD={component:ku,name:ku.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:c.jsx(ku.Header,{})}};function u6(){const{id:e,subEntity:t,subEntityId:n}=Te.useParams(),r=Di(),i=x.useMemo(()=>({...OD,defaults:{...OD.defaults}}),[]),s=x.useMemo(()=>({...BD,defaults:{...BD.defaults,onClose:()=>r.toHome()}}),[r]),o=x.useMemo(()=>({...AD,defaults:{...AD.defaults,onClose:()=>r.toDetails(e??"")}}),[r,e]),a=x.useMemo(()=>{const l=[i];return e&&(l.push(s),n&&t==="modules"&&l.push(o)),l},[e,t,n,i,s,o]);return c.jsx(D.Blades,{registrations:a,settings:{resizable:!0}})}const d6=u6,f6="data:text/markdown;base64,VGhlIGxpc3Qgb2YgcmVjaXBlcyB0aGF0IGNhbiBiZSB1c2VkIGZvciBwZXJmb3JtaW5nIHN5c3RlbSB1cGRhdGVzLiAKCkEgcmVjaXBlIHNwZWNpZmllcyBhIHNldCBvZiBtb2R1bGUgZmlsdGVycyB0byBpZGVudGlmeSBtYXRjaGluZyBzeXN0ZW1zIGFuZCB3aGljaCBzb2Z0d2FyZSB0byBiZSBhcHBsaWVkIHRvIHRoZW0uIFNlZSB0aGUgW2RvY3VtZW50YXRpb25dKGh0dHBzOi8vZG9jcy5ib3NjaC1pb3Qtcm9sbG91dHMuY29tL1NPVVAtUmVjaXBlLmh0bWwpIGZvciBkZXRhaWxlZCBpbmZvcm1hdGlvbi4KCkJlZm9yZSBhIHJlY2lwZSBjYW4gYmUgdXNlZCBmb3Igc3lzdGVtIHVwZGF0ZXMgaXQgdHJhbnNpdGlvbnMgdHJvdWdoIGEgbGlmZWN5Y2xlIGZyb20gZHJhZnQgPEljb24gaWNvbk5hbWU9ImRvY3VtZW50LXBsYWluIiAvPiB0byByZWxlYXNlIGNhbmRpZGF0ZSA8SWNvbiBpY29uTmFtZT0iZG9jdW1lbnQtY2hlY2siIC8+IHRvIHJlbGVhc2VkIDxJY29uIGljb25OYW1lPSJhbGVydC1zdWNjZXNzIiBzdHlsZT0iY29sb3I6dmFyKC0tY29sb3ItZ3JlZW4tNTApOyIvPi4gCgpZb3UgY2FuIGNyZWF0ZSBhIG5ldyByZWNpcGUgb3IgdXBsb2FkIGl0IGJ5IGNsaWNraW5nIDxJY29uIGljb25OYW1lPSJhZGQiIC8+LgoKVGhlIGxpc3QgY2FuIGJlIGZpbHRlcmVkIGJ5IGNsaWNraW5nIHRoZSA8SWNvbiBpY29uTmFtZT0iZmlsdGVyIiAvPi4gT25seSByZWNpcGVzIHRoYXQgbWF0Y2ggYWxsIHRoZSBmaWx0ZXIgY3JpdGVyaWEgd2lsbCB0aGVuIGJlIGRpc3BsYXllZC4KCioqSGludCoqOiBXaGVuIHVzaW5nIHRoZSBzZWFyY2ggZmllbGQsIG9ubHkgcmVjaXBlcyBhcmUgbGlzdGVkIHRoYXQgY29udGFpbiB0aGUgc2VhcmNoIHRleHQgaW4gdGhlIHJlY2lwZSBJRCBvciByZWNpcGUgbmFtZS4KCllvdSBjYW4gY29uZmlndXJlIHRoZSBkaXNwbGF5ZWQgY29sdW1ucyB2aWEgdGhlIDxJY29uIGljb25OYW1lPSJzZXR0aW5ncyIgLz4gbWVudS4=",p6={label:"Recipes.State.Draft",iconName:"document-plain"},h6={label:"Recipes.State.ReleaseCandidate",iconName:"document-check"},m6={label:"Recipes.State.WaitingForSignature",iconName:"certificate"},g6={label:"Recipes.State.WaitingForApproval",iconName:"checklist"},y6={label:"Recipes.State.Released",iconName:"alert-success",color:"green-50"},v6={label:"Recipes.State.Inactive",iconName:"denied",color:"gray-50"},b6={label:"Recipes.State.Revoked",iconName:"abort-frame",color:"red-50"},S6=new Map([["draft",p6],["waiting_for_signature",m6],["release_candidate",h6],["waiting_for_approval",g6],["released",y6],["inactive",v6],["revoked",b6]]);function PD({recipeState:e,withLabel:t}){const n=R(),r=S6.get(e)??fu;return c.jsx(Qr,{iconProps:{iconName:r.iconName,label:n(r.label),color:r.color},showLabel:t})}function x6({title:e,filter:t}){const n=R(),r=Ap(t);return c.jsx(ar,{title:e??n("Button.ViewSystems"),href:r})}const w6={iconProps:{label:"Recipes.Coverage.VeryHigh",iconName:"signal-full"},tooltipOverWrite:"Recipes.Coverage.Tooltip.VeryHigh"},_6={iconProps:{label:"Recipes.Coverage.High",iconName:"signal-high"},tooltipOverWrite:"Recipes.Coverage.Tooltip.High"},k6={iconProps:{label:"Recipes.Coverage.Medium",iconName:"signal-half"},tooltipOverWrite:"Recipes.Coverage.Tooltip.Medium"},D6={iconProps:{label:"Recipes.Coverage.Low",iconName:"signal-low"},tooltipOverWrite:"Recipes.Coverage.Tooltip.Low"},C6={iconProps:{label:"Recipes.Coverage.VeryLow",iconName:"signal-very-low"},tooltipOverWrite:"Recipes.Coverage.Tooltip.VeryLow"},M6={iconProps:{label:"Recipes.Coverage.None",iconName:"alert-warning"},tooltipOverWrite:"Recipes.Coverage.Tooltip.None",showLabel:!0},T6={iconProps:{label:"Recipes.Coverage.InProgress",iconName:"hourglass"},tooltipOverWrite:"Recipes.Coverage.Tooltip.InProgress"},I6=new Map([["very-high",w6],["high",_6],["medium",k6],["low",D6],["very-low",C6],["none",M6],["in-progress",T6]]);function ND({recipe:e,withLabel:t}){const n=R(),r=e.coverage;if(!r)return c.jsx(c.Fragment,{});const i=e.state==="released"?{matchingRecipeId:[e.id]}:{matchingRcRecipeId:[e.id]},s=I6.get(r.status)??{iconProps:fu};return c.jsxs(c.Fragment,{children:[c.jsx(Qr,{iconProps:{iconName:s.iconProps.iconName,label:n(s.iconProps.label)},tooltipOverWrite:s.tooltipOverWrite?n(s.tooltipOverWrite):void 0,showLabel:t}),r.status!=="none"&&t?c.jsxs(c.Fragment,{children:[" (",c.jsx(x6,{title:n("Recipes.Link.ViewMatchingSystems"),filter:i}),")"]}):null]})}function jD({title:e,id:t}){const n=iD(t);return c.jsx(ar,{title:e,href:n})}function E6(e){if(e)return c.jsx(PD,{recipeState:e.state})}function R6(e){if(e)return c.jsx(pv,{validationState:e.validity.validationState})}function L6(e){if(e)return c.jsx(ND,{recipe:e,withLabel:!1})}function O6(e){const t={isDefault:!0},n={isSortable:!0},r={isDefault:!0,isSortable:!0};return[ei(e("Entity.Label.State"),i=>E6(i),!0,!0,"state",void 0,"alert-success",!1),ei(e("Recipes.Label.Validity"),i=>R6(i),!1,!0,"validity",void 0,"document-test",!1),ei(e("Recipes.Label.Coverage"),i=>L6(i),!1,!0,"coverage",void 0,"signal-full",!1),$e(e("Entity.Label.Id"),"id",t),$e(e("Entity.Label.Name"),"name",r),$e(e("Entity.Label.Version"),"version",r),$e(e("Entity.Label.Description"),"description"),dn(e("Entity.Label.Type"),i=>{var s;return(s=i.type)!=null&&s.id?c.jsx(jD,{title:i.type.name,id:i.type.id}):null},"type",t),Ln(e("Entity.Label.CreatedAt"),"createdAt",r),$e(e("Entity.Label.CreatedBy"),"createdBy",t),Ln(e("Entity.Label.LastModifiedAt"),"lastModifiedAt",n),Ln(e("Recipes.Label.PublishedAt"),"publishedAt",n),$e(e("Recipes.Label.PublishedBy"),"publishedBy"),Ln(e("Recipes.Label.ApprovedAt"),"approvedAt",n),$e(e("Recipes.Label.ApprovedBy"),"approvedBy")]}function B6(){const e=R();return x.useMemo(()=>O6(e),[e])}function A6(){var o,a,l;const e=R(),{recipesFilter:t,mergeRecipesFilter:n}=jp(),r=(((o=t.tagId)==null?void 0:o.length)??0)>0,i=(((a=t.typeId)==null?void 0:a.length)??0)>0,s=(((l=t.state)==null?void 0:l.length)??0)>0;return c.jsxs(c.Fragment,{children:[r?c.jsx(Tn,{category:e("Entity.Label.Tags"),onClose:()=>n({tagId:null}),value:""},"tags"):null,i?c.jsx(Tn,{category:e("Entity.Label.Types"),onClose:()=>n({typeId:null}),value:""},"types"):null,s?c.jsx(Tn,{category:e("Entity.Label.States"),onClose:()=>n({state:null}),value:""},"states"):null]})}function FD(e,t,n){const r=R(),i=ec(),s=Ke(),o=ht(),a=x.useRef(null),l=()=>{s.invalidateQueries(n),o(r("Info.FileUpload.Success"))},u=p=>{s.invalidateQueries(n),i("confirm",{headline:r("Error.FileUpload"),message:c.jsx(pe,{error:p}),variant:"error",onCancel:null,confirmButtonPrimary:!0})},{filePicker:d,showPicker:f}=nE(p=>e({file:p},{onSuccess:l,onError:u}));return x.useEffect(()=>{if(t){const p=i("progress",{message:r("Info.FileUpload.InProgress"),noCancel:!0});a.current=p}else a.current&&(a.current(),a.current=null)},[t,i,r]),{filePicker:d,showPicker:f}}function P6(){const e=R(),t=x9(),n=Ke(),r=ht(),i=()=>{r(e("Recipes.Info.Import.Success")),n.invalidateQueries(Pe.all())},s=(u,d)=>{d.recipeImport.type.id=void 0,t({toImport:d.recipeImport,apiError:u})},{mutate:o}=yD(s,i),{filePicker:a,showPicker:l}=FD(async({file:u})=>{var d,f;try{const p=await u.text(),h=JSON.parse(p);((d=h.type)!=null&&d.id||(f=h.type)!=null&&f.key)&&h.name&&h.version?o({recipeImport:h}):t({toImport:h})}catch{r(e("Recipes.Import.Error:InvalidJson"))}},!1,Pe.list());return c.jsxs(c.Fragment,{children:[c.jsx(D.MenuItem,{label:e("Button.Import"),icon:"import",title:e("Button.Import"),onClick:()=>l()}),a]})}function N6(e,t){const n=R(),r=f=>f.version?`${f.name}:${f.version}`:f.name,s=t.filter(f=>{var p,h;return!!((h=(p=f._links)==null?void 0:p.delete)!=null&&h.href)}).length,o=t.length-s,a=s===t.length,{doDelete:l,deleteIsLoading:u}=CD("recipes",Pe.deleteEntities(),Pe.list(),n("Recipes.Popup.BulkDelete.Headline",{totalCount:t.length,compatibleCount:s,allCompatible:a}),r,e,o>0?{message:n("Recipes.Info.BulkDelete.UnsupportedAction",{count:o}),highlighted:!0}:void 0);return{doDelete:f=>{l(f.filter(p=>{var h,m;return!!((m=(h=p._links)==null?void 0:h.delete)!=null&&m.href)}))},deleteIsLoading:u}}function ga({url:e,iconName:t,title:n,action:r,recipes:i,onResponse:s}){const o=bD(),a=e?()=>o({url:e,action:r,recipes:i,onSuccess:s}):void 0;return c.jsx(D.MenuItem,{label:n,icon:t,onClick:a,title:n,disabled:a===void 0})}function j6({recipes:e,setSelection:t}){const n=R(),r=ht(),i=SD(),s=y9(),o=vD(),a=w9(),l=p=>{var h,m;for(const y of e){const b=(m=(h=y._links)==null?void 0:h[p])==null?void 0:m.href;if(b)return b}},{doDelete:u,deleteIsLoading:d}=N6(p=>{p.failedActions&&Object.keys(p.failedActions).length>0?(t(h=>h.filter(m=>m.id in p.failedActions)),r(n("Recipes.Info.BulkDelete.Failed",{failedActionsCount:Object.keys(p.failedActions).length}))):(r(n("Recipes.Info.BulkDelete.Success",{count:p.successfulActions.length})),t([]))},e),f=p=>{p.failedActions&&Object.keys(p.failedActions).length>0?t(h=>h.filter(m=>m.id in p.failedActions)):t([])};return c.jsxs(D.ContextMenu,{trigger:c.jsx(D.Button,{title:n("CommandBar.Actions.RecipeLifecycle"),icon:"wrench",mode:"integrated","data-testid":"recipes-bulk-actions",disabled:e.length==0}),popover:{position:"bottom-left",triggerOffset:8},placeholder:void 0,onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0,"data-testid":"recipes-bulk-actions-menu",children:[c.jsx(D.MenuItem,{label:n("Button.Edit"),icon:"edit",title:n("Button.Edit"),onClick:()=>s({toEdit:e}),disabled:l("edit")==null}),c.jsx(D.MenuItem,{label:n("Button.Export"),icon:"export",title:n("Button.Export"),onClick:()=>{if(e.length>1)a({toExport:e});else if(e.length===1){const p=e[0];if(!l("export")){r(n("Recipes.Export.NotPermitted"));return}o({toExport:p})}},disabled:l("export")==null}),c.jsx(D.MenuItem,{label:n("Button.Delete"),icon:"delete",title:n("Button.Delete"),onClick:()=>u(e),disabled:l("delete")==null||d}),c.jsx(D.MenuItem,{label:n("Recipes.Button.Validate"),icon:"document-test",title:n("Recipes.Button.Validate"),onClick:()=>i({recipes:e}),disabled:l("validate")==null}),c.jsx(ga,{url:l("promote"),iconName:"up",title:n("Recipes.LifecycleActions.Promote"),action:"promote",recipes:e,onResponse:f}),c.jsx(ga,{url:l("demote"),iconName:"down",title:n("Recipes.LifecycleActions.Demote"),action:"demote",recipes:e,onResponse:f}),c.jsx(ga,{url:l("release"),iconName:"handover-check",title:n("Recipes.LifecycleActions.RequestApproval"),action:"release",recipes:e,onResponse:f}),c.jsx(ga,{url:l("approve"),iconName:"welcome",title:n("Recipes.LifecycleActions.Approve"),action:"approve",recipes:e,onResponse:f}),c.jsx(ga,{url:l("deny"),iconName:"hand",title:n("Recipes.LifecycleActions.Deny"),action:"deny",recipes:e,onResponse:f}),c.jsx(ga,{url:l("deactivate"),iconName:"pause",title:n("Recipes.LifecycleActions.Deactivate"),action:"deactivate",recipes:e,onResponse:f}),c.jsx(ga,{url:l("revoke"),iconName:"close",title:n("Recipes.LifecycleActions.Revoke"),action:"revoke",recipes:e,onResponse:f})]})}const F6="recipes";function G6({data:e,totalCount:t,loadingData:n,fetchMoreData:r,onRefresh:i,onSortQueryChange:s,onSelect:o,selectedId:a,recipeMatchJob:l}){const u=R(),d=D9(),f=B6(),[p,h]=x.useState(f),[m,y]=x.useState([]),{recipesFilter:b,mergeRecipesFilter:g}=jp();pa(p,s);const{sortColumn:v,isSortingMultipleColumns:S,setIsSortingMultipleColumns:w,resetSorting:_}=ha(h,"recipes"),T=x.useMemo(()=>({allColumns:f,onColumnSelectionChange:h,typeName:F6,multiSortProps:{isMultiSort:S,onToggleMultiSort(A){w(A),A||_()}}}),[f,S,_,w]),M=x.useMemo(()=>{if(a!==void 0)return e.find(A=>A.id===a)},[e,a]),C=x.useCallback(A=>{g({search:A})},[g]),k=()=>{y([])},I=x.useMemo(()=>ma(v),[v]),O=k9();return c.jsxs(c.Fragment,{children:[l&&c.jsx(DD,{matchJob:l}),c.jsxs(cn,{children:[c.jsx(bn,{count:t,selectedCount:m.length,columnSelectorProps:T,content:c.jsxs(c.Fragment,{children:[c.jsx(Su,{searchId:"recipes-list-search",searchingFields:["Entity.Label.Name","Entity.Label.Id"],onSearchChange:C,searchTextInitial:b.search??""}),c.jsx(D.Button,{title:u("Button.Filter"),label:u("Button.Filter"),icon:"filter",mode:"integrated",onClick:()=>d()}),c.jsx(A6,{})]}),actions:c.jsxs(c.Fragment,{children:[c.jsx(D.Button,{title:u("CommandBar.Actions.Tagging"),icon:"label",mode:"integrated",onClick:()=>O({recipes:m,onSuccess:k}),disabled:m.length==0}),c.jsx(j6,{recipes:m,setSelection:y}),c.jsx("div",{className:"rollouts-command-bar_separator"}),c.jsx(yr,{onRefresh:()=>{y([]),i()},refreshDisabled:n})]}),mainAction:c.jsx(V6,{})}),c.jsx(D.DataList,{items:e,columns:p,enableScrolling:!0,emptyStateMessage:u("Recipes.List.Empty"),onScrollToBottom:r,selected:M,onSelect:A=>o(A.id),onRenderColumnHeader:I,checked:m,onChecked:y,children:n&&c.jsx(et,{"data-testid":"recipes-list-loading"})})]})]})}function V6(){const e=R(),t=m9();return c.jsxs(D.ContextMenu,{trigger:c.jsx(D.Button,{icon:"add",mode:"integrated","data-testid":"recipe-add"}),popover:{position:"bottom-left",triggerOffset:8},placeholder:void 0,onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0,children:[c.jsx(D.MenuItem,{label:e("Button.Add"),icon:"add",title:e("Button.Add"),onClick:()=>t()}),c.jsx(P6,{})]})}function Jn(){const e=Te.useNavigate(),t=Te.useLocation();return{toHome(){e({pathname:Pp(),search:t.search})},toDetails(n){e({pathname:Do(n),search:t.search})},toSubDetails(n,r,i){e({pathname:mv(n,r,i),search:t.search})},toRecipeTypesHome(){e({pathname:gv(),search:t.search})},toRecipeTypeDetails(n){e({pathname:iD(n),search:t.search})},toValidatorDetails(n,r,i){e({pathname:m4(n,r,i),search:t.search})}}}function Du(){const{id:e}=Te.useParams(),[t,n]=x.useState(!1),r=Jn(),{recipesFilter:i}=jp(),[s,o]=x.useState(),{data:a,isLoading:l,error:u,fetchNextPage:d,reset:f}=hl(i,s),{data:p,error:h,refetch:m}=ID(t);x.useEffect(()=>n(p!==null),[n,p]);const y=()=>{f(),m()},{totalCount:b,entities:g}=Tt(a);return u||h?c.jsx(pe,{error:u??h}):c.jsx(G6,{data:g,totalCount:b,loadingData:l,fetchMoreData:d,onRefresh:y,onSortQueryChange:o,selectedId:e,onSelect:v=>r.toDetails(v),recipeMatchJob:p??void 0})}Du.displayName="RecipesListBlade";function $6(){const e=R();return c.jsxs(c.Fragment,{children:[e("Recipes.List.BladeHeader"),c.jsx(Cn,{popoverHeading:e("Recipes.List.BladeHeader"),children:c.jsx("div",{children:c.jsx(Ft,{markdownFilePath:f6})})})]})}Du.Header=$6;const Y6="data:text/markdown;base64,QSBbcmVjaXBlXShodHRwczovL2RvY3MuYm9zY2gtaW90LXJvbGxvdXRzLmNvbS9TT1VQLVJlY2lwZS5odG1sKSBpcyBhIHN5c3RlbSB1cGRhdGUgZGVmaW5pdGlvbiwgdGhhdCBzcGVjaWZpZXMgYSBzZXQgb2YgbWF0Y2hpbmcgbW9kdWxlcywgcmVmZXJlbmNlcyBkaXN0cmlidXRpb24gc2V0cywgYW5kIGRlc2NyaWJlcyB0aGUgZGVzaXJlZCBzeXN0ZW0gc3RhdGUgYWZ0ZXIgdGhlIHJlY2lwZSBoYXMgYmVlbiBhcHBsaWVkLgoKQmVzaWRlcyBiYXNpYyBwcm9wZXJ0aWVzIChuYW1lLCB2ZXJzaW9uLCBhbmQgZGVzY3JpcHRpb24gb2YgdGhlIHJlY2lwZSksIHRoaXMgdmlldyBkaXNwbGF5cyBpbmZvcm1hdGlvbiBhYm91dAoKKiB0aGUgc3RhdHVzIG9mIHRoZSByZWNpcGUgKGUuZy4gZHJhZnQsIHJlbGVhc2UgY2FuZGlkYXRlLCByZWxlYXNlZCkKKiB0YWdzIGFzc2lnbmVkIHRvIHRoZSByZWNpcGUKKiBtb2R1bGUgdXBkYXRlIGRlZmluaXRpb25zIHRvIGlkZW50aWZ5IG1hdGNoaW5nIHN5c3RlbXMKKiBzeXN0ZW0gZGlzdHJpYnV0aW9uIHNldHMgKGUuZy4gc3lzdGVtIHJlbGVhc2Ugbm90ZXMpCiogbWV0YWRhdGEgb2YgdGhlIHJlY2lwZSB3aGljaCBjYW4gYWxzbyBiZSBtYW5hZ2VkIGluIHRoaXMgdmlldwoqIHRoZSByZWNpcGUgZmlsZSwgb25jZSBhdmFpbGFibGUgKGkuZS4gc3RhdHVzIG5vdCBpbiA8SWNvbiBpY29uTmFtZT0iZG9jdW1lbnQtcGxhaW4iIC8+IGRyYWZ0IHN0YXRlKSBpbmNsdWRpbmcgdGhlIG1hbmFnZW1lbnQgb2YgaXRzIHNpZ25hdHVyZXMKKiBhdWRpdCBpbmZvcm1hdGlvbiBhYm91dCBjcmVhdGlvbiwgbW9kaWZpY2F0aW9uLCBwdWJsaXNoLCBhbmQgYXBwcm92YWwKClRoZSA8SWNvbiBpY29uTmFtZT0id3JlbmNoIiAvPiBpY29uIGFsbG93cyB0byBlZGl0IG9yIGRlbGV0ZSB0aGUgcmVjaXBlLCB0cmlnZ2VyIGEgdmFsaWRhdGlvbiwgb3IgY2hhbmdlIHRoZSBzdGF0dXMgb2YgdGhlIHJlY2lwZS4=";function W6({i18n:e,recipe:t}){const n=C9(),r=t.validity,i=r.validationState;let s;(i==="valid"||i==="invalid")&&(s=e("Recipes.Label.Validity.Tooltip",{errors:r.errors,warnings:r.warnings,info:r.info}));const o=ls(t,"validationReport");return c.jsxs(c.Fragment,{children:[c.jsx(pv,{validationState:i,withLabel:!0,tooltip:s}),o&&c.jsx(D.Link,{icon:{iconName:"externallink",isUiIcon:!0},iconPosition:"right",label:"",target:"_blank",onClick:()=>n({recipe:t}),title:e("Recipes.Button.ValidationReport")})]})}const H6="data:text/markdown;base64,TGlmZWN5Y2xlIG1hbmFnZW1lbnQgZW5hYmxlcyBzeXN0ZW0gcmVzcG9uc2libGVzIGFuZCB1cGRhdGUgY29vcmRpbmF0b3JzIHRvCgoqIHJlbGVhc2UgYSByZWNpcGUgZm9yIHRlc3RpbmcsCiogcmVsZWFzZSBhIHJlY2lwZSBmb3IgcHJvZHVjdGl2ZSBzeXN0ZW0gdXBkYXRlcywKKiB0YWtlIGEgcmVjaXBlIG9mZmxpbmUgd2hpY2ggaXMgc3VzcGVjdGVkIHRvIGNhdXNlIGlzc3VlcyBpbiB0aGUgZmllbGQsIG9yCiogcmV0aXJlIGEgcmVjaXBlIHdoaWNoIGlzIG5vIGxvbmdlciBuZWVkZWQgKGJlY2F1c2Ugb2YgbmV3ZXIgcmVjaXBlIHZlcnNpb25zKS4KCiZuYnNwOzxJY29uIGljb25OYW1lPSJkb2N1bWVudC1wbGFpbiIgLz4gKkRyYWZ0KjogSW5pdGlhbCBzdGF0ZSBvZiB0aGUgcmVjaXBlLgoKJm5ic3A7PEljb24gaWNvbk5hbWU9ImNlcnRpZmljYXRlIiAvPiAqV2FpdGluZyBmb3Igc2lnbmF0dXJlKjogQSBzaWduYXR1cmUgZm9yIHRoZSByZWNpcGUgZmlsZSBoYXMgdG8gYmUgdXBsb2FkZWQgdG8gdHJhbnNpdGlvbiB0byAqUmVsZWFzZSBjYW5kaWRhdGUqIHN0YXRlLgoKJm5ic3A7PEljb24gaWNvbk5hbWU9ImRvY3VtZW50LWNoZWNrIiAvPiAqUmVsZWFzZSBjYW5kaWRhdGUqOiBUaGUgcmVjaXBlIGlzIHJlYWR5IGZvciB0ZXN0aW5nLgoKJm5ic3A7PEljb24gaWNvbk5hbWU9ImNoZWNrbGlzdCIgLz4gKldhaXRpbmcgZm9yIGFwcHJvdmFsKjogVGhlIHJlY2lwZSBoYXMgcGFzc2VkIGFsbCB2ZXJpZmljYXRpb24gdGVzdHMgYW5kIHRoZSByZWxlYXNlIGFwcHJvdmFsIGlzIHJlcXVlc3RlZC4KCiZuYnNwOzxJY29uIGljb25OYW1lPSJhbGVydC1zdWNjZXNzIiBzdHlsZT0iY29sb3I6dmFyKC0tY29sb3ItZ3JlZW4tNTApOyIvPiAqUmVsZWFzZWQqOiBUaGUgcmVjaXBlIGlzIGFwcHJvdmVkIGFuZCBjYW4gYmUgYXBwbGllZCB0byBwcm9kdWN0aXZlIHN5c3RlbXMuCgombmJzcDs8SWNvbiBpY29uTmFtZT0iZGVuaWVkIiBzdHlsZT0iY29sb3I6dmFyKC0tY29sb3ItZ3JheS01MCk7Ii8+ICpJbmFjdGl2ZSo6IEEgcmVsZWFzZWQgcmVjaXBlIHdoaWNoIGhhcyBiZWVuIGRlYWN0aXZhdGVkIG1heSBzdGlsbCBiZSB1c2VkIGZvciBzeXN0ZW0gdXBkYXRlcy4gRm9yIGV4YW1wbGUsIGEgbmV3ZXIgdmVyc2lvbiBvZiB0aGUgcmVjaXBlIGlzIGF2YWlsYWJsZS4KCiZuYnNwOzxJY29uIGljb25OYW1lPSJhYm9ydC1mcmFtZSIgc3R5bGU9ImNvbG9yOnZhcigtLWNvbG9yLXJlZC01MCk7Ii8+ICpSZXZva2VkKjogQSByZWxlYXNlZCByZWNpcGUgd2hpY2ggaGFzIGJlZW4gcmV2b2tlZCBtdXN0IG5vdCBiZSB1c2VkIGZvciBzeXN0ZW0gdXBkYXRlcy4gRm9yIGV4YW1wbGUsIHRoZSByZWNpcGUgbmVlZHMgdG8gYmUgdmVyaWZpZWQgZHVlIHRvIGEgcG90ZW50aWFsIGVycm9yL2J1Zy4=",Z6="data:text/markdown;base64,VGhlIHZhbGlkaXR5IGluZGljYXRlcywgaWYgYSByZWNpcGUgaXMgZm9ybWFsbHkgY29ycmVjdCwgZm9yIGV4YW1wbGUsIGJ5IGNoZWNraW5nIGlmIG1hbmRhdG9yeSBtZXRhZGF0YSBpcyBhdmFpbGFibGUgYW5kL29yIGlmIHRoZSByZWZlcmVuY2VkIGRpc3RyaWJ1dGlvbiBzZXRzIGFyZSBjb21wbGV0ZS4gT25seSA8SWNvbiBpY29uTmFtZT0iYWxlcnQtc3VjY2VzcyIgLz4gKlZhbGlkKiByZWNpcGVzIGNhbiBiZSBwcm9tb3RlZC4gVG8gdHJpZ2dlciB0aGUgdmFsaWRhdGlvbiwgZ28gdG8gdGhlIDxJY29uIGljb25OYW1lPSJ3cmVuY2giIC8+IGljb24gYW5kIHNlbGVjdCA8SWNvbiBpY29uTmFtZT0iZG9jdW1lbnQtdGVzdCIgLz4gKlZhbGlkYXRlKi4KCiZuYnNwOzxJY29uIGljb25OYW1lPSJxdWVzdGlvbi1mcmFtZSIgLz4gKlZhbGlkYXRpb24gcGVuZGluZyo6IFRoZXJlIGlzIGN1cnJlbnRseSBubyB2YWxpZGF0aW9uIHJlc3VsdCBhdmFpbGFibGUuIEl0IGlzIGVpdGhlciBhIG5ldyByZWNpcGUsIG9yIHdhcyBjaGFuZ2VkIHNpbmNlIHRoZSBsYXN0IHZhbGlkYXRpb24uCgombmJzcDs8SWNvbiBpY29uTmFtZT0iaG91cmdsYXNzIiAvPiAqVmFsaWRhdGlvbiBpbiBwcm9ncmVzcyo6IFRoZSB2YWxpZGF0aW9uIGlzIG9uZ29pbmcuCgombmJzcDs8SWNvbiBpY29uTmFtZT0iYWxlcnQtc3VjY2VzcyIgLz4gKlZhbGlkKjogVGhlIHJlY2lwZSBoYXMgc3VjY2Vzc2Z1bGx5IHBhc3NlZCB0aGUgdmFsaWRhdGlvbi4gSWYgdGhlIHJlY2lwZSBpcyBpbiA8SWNvbiBpY29uTmFtZT0iZG9jdW1lbnQtcGxhaW4iIC8+ICpEcmFmdCogc3RhdGUgaXQgY2FuIGJlIHByb21vdGVkIG5vdy4KCiZuYnNwOzxJY29uIGljb25OYW1lPSJwcm9ibGVtLWZyYW1lIiBzdHlsZT0iY29sb3I6dmFyKC0tY29sb3ItcmVkLTUwKTsiLz4gKkludmFsaWQqOiBUaGVyZSBhcmUgdmFsaWRhdGlvbiBlcnJvcnMuIFBsZWFzZSBjaGVjayB0aGUgdmFsaWRhdGlvbiByZXN1bHQuIEFmdGVyIHRoZSBlcnJvcnMgaGF2ZSBiZWVuIHJlY3RpZmllZCwgYSByZS12YWxpZGF0aW9uIGNhbiBiZSB0cmlnZ2VyZWQu",U6="data:text/markdown;base64,VGhlIGNvdmVyYWdlIGlzIGEgcmVsYXRpdmUgbWV0cmljIHRoYXQgaGVscHMgdG8gdW5kZXJzdGFuZCBib3RoLCB0aGUgcG90ZW50aWFsIHJpc2sgYW5kIGNvdmVyYWdlIG9mIGEgcmVjaXBlLiBJdCBpcyBjYWxjdWxhdGVkIGJ5IHRoZSBwZXJjZW50YWdlIG9mIG1hdGNoaW5nIHN5c3RlbXMuIEl0IGlzIGNhbGN1bGF0ZWQgd2hlbmV2ZXIKCiogcHJvbW90aW5nIHRoZSByZWNpcGUgdG8gV2FpdGluZyBmb3Igc2lnbmF0dXJlIHN0YXRlIG9yCiogdmFsaWRhdGluZyB0aGUgcmVjaXBlLgoKJm5ic3A7PEljb24gaWNvbk5hbWU9InNpZ25hbC1mdWxsIiAvPiAqVmVyeSBoaWdoKjogVGhlIHJlY2lwZSBtYXRjaGVzIG1vcmUgdGhhbiA4MCUgb2YgdGhlIHN5c3RlbXMuCgombmJzcDs8SWNvbiBpY29uTmFtZT0ic2lnbmFsLWhpZ2giIC8+ICpIaWdoKjogVGhlIHJlY2lwZSBtYXRjaGVzIGJldHdlZW4gNjElIGFuZCA4MCUgb2YgdGhlIHN5c3RlbXMuCgombmJzcDs8SWNvbiBpY29uTmFtZT0ic2lnbmFsLWhhbGYiIC8+ICpNZWRpdW0qOiBUaGUgcmVjaXBlIG1hdGNoZXMgYmV0d2VlbiA0MSUgYW5kIDYwJSBvZiB0aGUgc3lzdGVtcy4KCiZuYnNwOzxJY29uIGljb25OYW1lPSJzaWduYWwtbG93IiAvPiAqTG93KjogVGhlIHJlY2lwZSBtYXRjaGVzIGJldHdlZW4gMjElIGFuZCA0MCUgb2YgdGhlIHN5c3RlbXMuCgombmJzcDs8SWNvbiBpY29uTmFtZT0ic2lnbmFsLXZlcnktbG93IiAvPiAqVmVyeSBsb3cqOiBUaGUgcmVjaXBlIG1hdGNoZXMgbGVzcyB0aGFuIDIwJSBvZiB0aGUgc3lzdGVtcy4KCklmIG5vIHN5c3RlbXMgbWF0Y2hlZCBhIHJlY2lwZSA8SWNvbiBpY29uTmFtZT0iYWxlcnQtd2FybmluZyIgLz4gaXMgc2hvd24uIFRoZSA8SWNvbiBpY29uTmFtZT0iaG91cmdsYXNzIiAvPiBpbmRpY2F0ZXMgdGhhdCB0aGUgY2FsY3VsYXRpb24gb2YgdGhlIGNvdmVyYWdlIGlzIG9uZ29pbmcu";function ya({url:e,iconName:t,title:n,action:r,recipe:i}){const s=bD(),o=e?()=>s({url:e,action:r,recipes:[i]}):void 0;return c.jsx(D.MenuItem,{label:n,icon:t,onClick:o,title:n,disabled:o===void 0})}function z6({recipe:e}){var b,g,v,S,w,_,T;const t=R(),n=Jn(),r=e._links,i=M=>M.version?`${M.name}:${M.version}`:M.name,{doDelete:s,deleteIsLoading:o}=vr(Pe.deleteEntity(),[Pe.list()],t("Recipes.Popup.Delete.Headline"),t("Recipes.Info.Delete.Success"),()=>n.toHome(),t("Recipes.Popup.Delete.Info")),a=g9(),l=S9(),u=vD(),d=SD(),f=Xt(e,"edit"),p=Xt(e,"clone"),h=Xt(e,"export"),m=Xt(e,"delete"),y=ls(e,"validate");return c.jsxs(ti,{title:t("Recipes.Details.ActionsMenu.Title"),testId:"recipe-actions",children:[c.jsx(D.MenuItem,{label:t("Button.Edit"),icon:"edit",title:t("Button.Edit"),onClick:()=>a({toEdit:e}),disabled:!f}),c.jsx(D.MenuItem,{label:t("Button.Clone"),icon:"copy",title:t("Button.Clone"),onClick:()=>l({toClone:e}),disabled:!p}),c.jsx(D.MenuItem,{label:t("Button.Export"),icon:"export",title:t("Button.Export"),onClick:()=>u({toExport:e}),disabled:!h}),c.jsx(D.MenuItem,{label:t("Button.Delete"),icon:"delete",title:t("Button.Delete"),onClick:()=>s(i(e),m??""),disabled:!m||o}),c.jsx(D.MenuItem,{label:t("Recipes.Button.Validate"),icon:"document-test",title:t("Recipes.Button.Validate"),onClick:()=>d({recipes:[e]}),disabled:!y}),c.jsx(ya,{url:(b=r.promote)==null?void 0:b.href,iconName:"up",title:t("Recipes.LifecycleActions.Promote"),action:"promote",recipe:e}),c.jsx(ya,{url:(g=r.demote)==null?void 0:g.href,iconName:"down",title:t("Recipes.LifecycleActions.Demote"),action:"demote",recipe:e}),c.jsx(ya,{url:(v=r.release)==null?void 0:v.href,iconName:"handover-check",title:t("Recipes.LifecycleActions.RequestApproval"),action:"release",recipe:e}),c.jsx(ya,{url:(S=r.approve)==null?void 0:S.href,iconName:"welcome",title:t("Recipes.LifecycleActions.Approve"),action:"approve",recipe:e}),c.jsx(ya,{url:(w=r.deny)==null?void 0:w.href,iconName:"hand",title:t("Recipes.LifecycleActions.Deny"),action:"deny",recipe:e}),c.jsx(ya,{url:(_=r.deactivate)==null?void 0:_.href,iconName:"pause",title:t("Recipes.LifecycleActions.Deactivate"),action:"deactivate",recipe:e}),c.jsx(ya,{url:(T=r.revoke)==null?void 0:T.href,iconName:"close",title:t("Recipes.LifecycleActions.Revoke"),action:"revoke",recipe:e})]})}function GD(e){return e!=null&&e.length>0}function VD(e){let t=e.name;const n=e.description;return n&&(t=t+`:
|
102
|
+
${n}`),t}function $D(e){return(e==null?void 0:e.slice(-1)[0])??""}function YD(e){return e.length>0?[e]:[]}const q6="N/A";function X6({recipe:e}){const t=R(),{id:n,name:r,description:i,type:s,version:o,state:a,stateRemark:l}=e;return c.jsxs(c.Fragment,{children:[c.jsx(z6,{recipe:e}),c.jsxs(Mn,{label:"",className:"basic-details-layout",style:{marginBottom:0},children:[c.jsx(ne,{header:t("Entity.Label.Id"),showCopy:!0,value:n,children:n}),c.jsx(ne,{header:t("Entity.Label.Name"),children:r}),c.jsx(ne,{header:t("Entity.Label.Version"),children:o??q6}),i&&c.jsx(ne,{header:t("Entity.Label.Description"),children:i}),c.jsx(ne,{header:t("Entity.Label.Type"),children:s?c.jsx(jD,{title:s.name,id:s.id}):"N/A"}),c.jsx(ne,{header:t("Recipes.Label.Actions"),children:c.jsx(ED,{filter:{recipeId:[n]}})}),c.jsx(ne,{header:t("Entity.Label.State"),help:c.jsx(Ft,{markdownFilePath:H6}),popoverHeading:t("Recipes.Doc.State.Tooltip"),children:c.jsx(PD,{recipeState:a,withLabel:!0})}),GD(l)?c.jsx(ne,{header:t("Recipes.Label.StateRemark"),children:l}):null,c.jsx(ne,{header:t("Recipes.Label.Validity"),help:c.jsx(Ft,{markdownFilePath:Z6}),popoverHeading:t("Recipes.Doc.Validity.Tooltip"),children:c.jsx(W6,{i18n:t,recipe:e})}),e.coverage&&c.jsx(ne,{header:t("Recipes.Label.Coverage"),help:c.jsx(Ft,{markdownFilePath:U6}),popoverHeading:t("Recipes.Label.Coverage"),children:c.jsx(ND,{recipe:e,withLabel:!0})})]})]})}function K6(e,t=!1){const n=e!==void 0,r=n?_y.list({recipeId:e}):[];return Ht(r,`recipes/${e}/signatures`,"signature",{refetchInterval:t?5e3:void 0,enabled:n})}function Q6(e){const t=e!==void 0,n=t?Pe.tagList(e):[];return Ht(n,`recipes/${e}/tags`,"tag",{enabled:t})}function J6({onClick:e}){const t=R();return c.jsx("div",{className:"soup-add-tag-chip",children:c.jsx(D.Chip,{label:"+",title:t("Tags.Button.Assign.Tooltip"),onClick:e},"add-tag")})}function eU({recipe:e,useAssignedTagsResult:t}){const n=R(),r=yu(t),{error:i}=t,{doUnassign:s,unassignIsLoading:o}=Q4([e]),a=_9();if(i)return c.jsx(pe,{error:i});const l=r.map(u=>c.jsx(D.Chip,{selected:!0,label:u.name,title:n("Tags.Button.Unassign.Tooltip"),buttonClose:!0,onClick:()=>s({tagName:u.name,tagId:u.id}),disabled:o},u.id));return c.jsxs("div",{"data-testid":"recipe-tags-view",style:{marginTop:"1rem"},children:[l,c.jsx(J6,{onClick:()=>a({recipes:[e],alreadyAssigned:r})})]})}const tU="data:text/markdown;base64,VGhlIFtyZWNpcGUgZmlsZV0oaHR0cHM6Ly9kb2NzLmJvc2NoLWlvdC1yb2xsb3V0cy5jb20vU09VUC1SZWNpcGUuaHRtbCNzcmMtMzk1ODAyNDYwOV9TT1VQUmVjaXBlLVJlY2lwZWZpbGUpIGlzIGEgdGVuYW50IHNwZWNpZmljIHJlcHJlc2VudGF0aW9uIG9mIGEgcmVjaXBlIHRoYXQgaXMgcHJvdmlkZWQgdG8gdGhlIGdhdGV3YXkgdG8gZXhlY3V0ZSB0aGUgc3lzdGVtIHVwZGF0ZS4gVGhlIHJlY2lwZSBmaWxlIGNhbiBiZSBkb3dubG9hZGVkIGZvciBjcmVhdGluZyBhbmQgdXBsb2FkaW5nIGNvcnJlc3BvbmRpbmcgc2lnbmF0dXJlcy4gVGhlc2Ugc2lnbmF0dXJlcyBlbmFibGUgdGhlIGdhdGV3YXkgdG8gdmVyaWZ5IGJvdGgsIHRoZSBhdXRoZW50aWNpdHkgYW5kIGludGVncml0eSBvZiB0aGUgcmVjZWl2ZWQgcmVjaXBlIGZpbGUuIElmIHRoZXJlIGFyZSBtdWx0aXBsZSBzaWduYXR1cmVzIGF2YWlsYWJsZSwgaXQgaXMgdXAgdG8gdGhlIGdhdGV3YXkgdG8gc2VsZWN0IHRoZSBvbmUgaXQgaXMgYWJsZSB0byBjb25maXJtLgoKKipIaW50Kio6IEFuIG9wdGlvbmFsIGludGVncmF0aW9uIHdpdGggW1NpZ24gJiBFbmNyeXB0XShodHRwczovL2RvY3MuYm9zY2gtaW90LXJvbGxvdXRzLmNvbS9TaWduLSUyNi1FbmNyeXB0Lmh0bWwpIGFsbG93cyB0byBhdXRvbWF0aWNhbGx5IGNyZWF0ZSBhIHNpZ25pbmcgdGFzaywgd2hlbiB0aGUgcmVjaXBlIGlzIHByb21vdGVkLiA=",nU="data:text/markdown;base64,VGFncyBhcmUgc3RyaW5ncyB1c2VkIHRvIGRlc2NyaWJlIGFuZCBncm91cCByZWNpcGVzLg==",rU="data:text/markdown;base64,VGhpcyBzZWN0aW9uIHNob3dzIGF2YWlsYWJsZSBtb2R1bGUgdXBkYXRlIGRlZmluaXRpb25zIG9mIHRoZSByZWNpcGUgYW5kIHByb3ZpZGVzIG1hbmFnZW1lbnQgYWN0aW9ucyAoY3JlYXRlIGFuZCBkZWxldGUpLiBTZWxlY3RpbmcgYSBtb2R1bGUgdXBkYXRlIGRlZmluaXRpb24gb3BlbnMgdGhlIGNvcnJlc3BvbmRpbmcgZGV0YWlscyBibGFkZSBhbGxvd2luZyB0byBlZGl0IGl0cyBwcm9wZXJ0aWVzLgoKVGhlIHNldCBvZiBtb2R1bGUgdXBkYXRlIGRlZmluaXRpb25zIHNwZWNpZmllcyB3aGljaCBzeXN0ZW1zIG1hdGNoIHRoZSByZWNpcGUuIEluIGFkZGl0aW9uLCBpdCBkZWZpbmVzIHdoaWNoIGRpc3RyaWJ1dGlvbiBzZXQgc2hvdWxkIGJlIGFwcGxpZWQgdG8gd2hpY2ggbW9kdWxlIG9mIHRoZSBzeXN0ZW0uCgpTZWUgdGhlIFtkb2N1bWVudGF0aW9uXShodHRwczovL2RvY3MuYm9zY2gtaW90LXJvbGxvdXRzLmNvbS9TT1VQLVJlY2lwZS5odG1sI3NyYy0zOTU4MDI0NjA5X1NPVVBSZWNpcGUtTW9kdWxldXBkYXRlZGVmaW5pdGlvbikgZm9yIGRldGFpbGVkIGluZm9ybWF0aW9uIGFib3V0IHRoZSBxdWVyeSBwb3NzaWJpbGl0aWVzLg==",iU="data:text/markdown;base64,U3lzdGVtIGRpc3RyaWJ1dGlvbiBzZXRzIGNvbnRhaW4gYXJ0aWZhY3RzIHRoYXQgYXJlIHJlcXVpcmVkIG9uIGEgc3lzdGVtIGxldmVsIGFuZCBub3QgcmVxdWlyZWQgZm9yIGEgc3BlY2lmaWMgbW9kdWxlIChlLmcuIHN5c3RlbSByZWxlYXNlIG5vdGVzLCBpbnN0YWxsIHNjcmlwdHMpLgoKVGhpcyBzZWN0aW9uIHNob3dzIHRoZSBhdmFpbGFibGUgc3lzdGVtIGRpc3RyaWJ1dGlvbiBzZXRzIG9mIHRoZSByZWNpcGUgYW5kIHByb3ZpZGVzIG1hbmFnZW1lbnQgYWN0aW9ucyAoY3JlYXRlIGFuZCBkZWxldGUpLiBTZWxlY3RpbmcgYSBzeXN0ZW0gZGlzdHJpYnV0aW9uIHNldCBvcGVucyB0aGUgY29ycmVzcG9uZGluZyBkZXRhaWxzIGJsYWRlIGFsbG93aW5nIHRvIGVkaXQgaXRzIHByb3BlcnRpZXMu",sU="data:text/markdown;base64,TWV0YWRhdGEgYXJlIGtleS12YWx1ZSBwYWlycyB0aGF0IGNhbiBoZWxwIHRvIGFubm90YXRlIHJlY2lwZXMgd2l0aCBhZGRpdGlvbmFsIGluZm9ybWF0aW9uLiBUaGUgbWV0YWRhdGEgaW5mb3JtYXRpb24gY2FuIGJlIGxhdGVyIHVzZWQgd2hlbiBnZW5lcmF0aW5nIHRoZSByZWNpcGUgZmlsZS4KClRoaXMgc2VjdGlvbiBzaG93cyBhdmFpbGFibGUgbWV0YWRhdGEgb2YgdGhlIHJlY2lwZSBhbmQgcHJvdmlkZXMgbWFuYWdlbWVudCBhY3Rpb25zIGZvciBtZXRhZGF0YSAoY3JlYXRlLCBlZGl0LCBkZWxldGUpLg==";function oU({recipeId:e,signature:t}){var a;const n=R(),{doDelete:r,deleteIsLoading:i}=vr(_y.deleteEntity({recipeId:e}),[Pe.entityDetails(e)],n("Signature.Popup.Delete.Headline"),n("Signature.Info.Delete.Success")),s=t.name,o=(a=t._links.delete)==null?void 0:a.href;return c.jsx(D.Button,{title:n("Button.Delete"),icon:"delete",mode:"integrated",onClick:()=>r(s,o??""),disabled:o===void 0||i})}function aU({signature:e}){var s,o;const t=R(),n=(o=(s=e==null?void 0:e._links)==null?void 0:s.download)==null?void 0:o.href,r=Cv(n??"",e.name+".sig"),i=()=>{n&&r()};return c.jsx(D.Button,{title:t("Button.Download"),mode:"integrated",icon:"download",onClick:i,disabled:!n})}function lU(e,t){const n={isDefault:!0};function r(o){const u=(Date.now()-o.getTime())/1e3/60,d=u/60,f=d/24,p=f/365;if(p>=1){const h=Math.floor(p);return{value:h,unit:h===1?"year":"years"}}else if(f>=1){const h=Math.floor(f);return{value:h,unit:h===1?"day":"days"}}else if(d>=1){const h=Math.floor(d);return{value:h,unit:h===1?"hour":"hours"}}else{const h=Math.ceil(u);return{value:h,unit:h===1?"minute":"minutes"}}}function i(o){var l,u;const a=o.name;if(((l=o.signingTask)==null?void 0:l.state)==="FAILED")return c.jsxs(c.Fragment,{children:[a," ",c.jsx("span",{style:{color:"var(--color-red-50)",fontStyle:"italic"},children:"(Task failed)"})]});if(((u=o.signingTask)==null?void 0:u.state)==="APPROVED"){const d=cp(o.signingTask.startedAt);if(d===null)return a;const f=r(d);return c.jsxs(c.Fragment,{children:[a," ",c.jsx("span",{style:{color:"var(--color-gray-50)",fontStyle:"italic"},children:e("Signature.List.TaskStarted",{startedAt:f.value,unit:f.unit})})]})}return o.signingTask?`[${o.signingTask.state}] ${a}`:a}function s(o){return!o.signingTask||o.signingTask.state==="DONE"?o.name:i(o)}return[$e(e("Recipes.Label.SignatureName"),"name",n,void 0,"",void 0,s),{data:{columnId:"actions"},header:"",onRenderHeader:()=>null,renderCell:o=>c.jsxs("div",{className:"action-buttons",children:[c.jsx(aU,{signature:o}),c.jsx(oU,{signature:o,recipeId:t})]}),style:{width:"8em"},cellStyle:{padding:0}}]}function cU(e){const t=R();return x.useMemo(()=>lU(t,e),[t,e])}function uU(e){const t=R(),n=Wt();return ln({mutationKey:_y.addEntity({recipeId:e}),mutationFn:async r=>{const i=new FormData;i.append("file",r.file),await n.post(`recipes/${e}/signatures`,i,{params:{name:r.file.name}}).catch(s=>{throw It(t,s)})}})}function dU({recipeId:e}){const t=R(),{mutate:n,isLoading:r}=uU(e),{filePicker:i,showPicker:s}=FD(n,r,Pe.entityDetails(e));return c.jsxs(c.Fragment,{children:[c.jsx(D.Button,{title:t("Recipes.Button.AddSignature"),icon:"add",mode:"integrated",onClick:()=>s(),disabled:r}),i]})}function fU({recipeId:e,useSignaturesResult:t}){const n=R(),r=cU(e),{data:i,isLoading:s,error:o,fetchNextPage:a,reset:l}=t;if(o)return c.jsx(pe,{error:o});const{totalCount:u,entities:d}=Tt(i);return c.jsxs(cn,{"data-testid":"recipe-signatures-table",children:[c.jsx(bn,{count:u,actions:c.jsxs(c.Fragment,{children:[c.jsx(yr,{onRefresh:l,refreshDisabled:s}),c.jsx(dU,{recipeId:e})]})}),c.jsx(D.DataList,{items:d,columns:r,emptyStateMessage:n("Signatures.List.Empty"),onScrollToBottom:a,hideCheckBoxes:!0,children:s&&c.jsx(et,{"data-testid":"signatures-list-loading"})})]})}function pU({recipeId:e,fileDownloadLink:t,useSignaturesResult:n}){const r=R(),i=Cv(t.href,`recipe-${e}.json`);return c.jsxs("div",{"data-testid":"recipe-file-view",children:[c.jsx(Mn,{label:"",className:"basic-details-layout",style:{marginBottom:0},children:c.jsxs(c.Fragment,{children:[c.jsx(ne,{header:r("Entity.Label.File"),children:c.jsx(hU,{onClick:()=>i==null?void 0:i()})}),c.jsx(ne,{header:r("Entity.Label.Sha256Checksum"),showCopy:!0,value:t.sha256,children:c.jsx("div",{className:"keep-actions-space",children:t.sha256})})]})}),c.jsx(fU,{recipeId:e,useSignaturesResult:n})]})}function hU({onClick:e}){const t=R();return c.jsxs(D.Link,{onClick:()=>e(),title:t("Button.Download.Tooltip"),children:[c.jsx(D.Icon,{role:"img",iconName:"download",style:{margin:0}}),c.jsx("span",{children:t("Button.Download")})]})}function mU(e){const t=e!==void 0,n=t?Xr.list({recipeId:e}):[];return Ht(n,`recipes/${e}/module-update-definitions`,"moduleUpdateDefinition",{enabled:t})}function Hp({id:e,name:t,version:n}){const r=R();if(!e)return c.jsx(c.Fragment,{});if(e==="-1")return c.jsx("div",{children:c.jsx("span",{style:{color:"var(--color-gray-50)"},title:r("DistributionSetLink.Unknown.Tooltip",{id:"unknown"}),children:c.jsx("em",{children:"Unknown"})})});const i=t&&n?`${t}:${n}`:void 0,s=!i,o=i??`${e}`,a=s?r("DistributionSetLink.Unknown.Tooltip",{id:e}):r("DistributionSetLink.Tooltip",{id:o});return c.jsx("div",{children:s?c.jsx("span",{style:{color:"var(--color-gray-50)"},title:a,children:c.jsx("em",{children:o})}):c.jsx("span",{children:c.jsx(ar,{title:o,href:P4(e),tooltip:a})})})}function gU({onUp:e,onDown:t,disabled:n=!1}){const r=R();return c.jsxs("div",{className:"soup-up-down-button-container",children:[c.jsx(D.Button,{className:"soup-up-down-button",title:r("Button.Up"),icon:"up",mode:"integrated",onClick:e,disabled:!e||n}),c.jsx(D.Button,{className:"soup-up-down-button",title:r("Button.Down"),icon:"down",mode:"integrated",onClick:t,disabled:!t||n})]})}function yU({entity:e,useMoveResult:t}){const{move:n,isMoveable:r,isMoveLoading:i}=t,s=r(e,"up")?()=>n(e,"up"):void 0,o=r(e,"down")?()=>n(e,"down"):void 0;return c.jsx(gU,{onUp:s,onDown:o,disabled:i})}function vU(e){const t=R(),n=Ke(),r=Wt(),i=ht(),{mutate:s,isLoading:o}=ln({onError:u=>{i(t("ModuleUpdateDefinition.Info.Move.Error",{error:u.message})),n.invalidateQueries(Xr.list({recipeId:e}))},onSuccess:()=>{n.invalidateQueries(Xr.list({recipeId:e}))},mutationKey:Xr.move(e),mutationFn:async u=>{await r.post(u).catch(d=>{throw It(t,d)})}});return{isMoveable:(u,d)=>ls(u,d),move:(u,d)=>{const f=Xt(u,d);f&&s(f)},isMoveLoading:o}}function bU(e,t){const n={isDefault:!0};return[{data:{columnId:"up-down-column",isDefault:!0},header:"",onRenderHeader:()=>null,style:{width:"2rem"},cellStyle:{padding:0},renderCell:r=>c.jsx(yU,{entity:r,useMoveResult:t}),disableOnSelect:!0},$e(e("Entity.Label.Name"),"name",n,void 0,"",VD),dn(e("Entity.Label.DistributionSet"),r=>r.distributionSetRef?c.jsx(Hp,{id:r.distributionSetRef.id,name:r.distributionSetRef.name,version:r.distributionSetRef.version}):null,"distributionSetRef",n),dn(e("ModuleUpdateDefinitions.Label.Query"),r=>c.jsx(Wp,{title:r.moduleQuery,filter:{fq:r.moduleQuery}}),"moduleQuery",n),$e(e("ModuleUpdateDefinitions.Label.CountQuery"),"moduleCountQuery",n)]}function SU(e){const t=R(),n=vU(e);return bU(t,n)}function xU(){return tt(sv)}function wU(){return tt(ov)}function ni({onClick:e,dataTestId:t}){const n=R();return c.jsx(D.Button,{title:n("Button.Add"),icon:"add",mode:"integrated",onClick:e,disabled:!e,"data-testid":t})}function _U({recipeId:e,selectedId:t,useApiResult:n,isModifiable:r}){const i=R(),s=SU(e),o=Jn(),a=xU(),{data:l,isLoading:u,error:d,fetchNextPage:f,reset:p}=n,{totalCount:h,entities:m}=Tt(l),y=x.useMemo(()=>Ql(t,m),[m,t]);return d?c.jsx(pe,{error:d}):c.jsxs(cn,{"data-testid":"recipe-ModuleUpdateDefinitions-view",children:[c.jsx(bn,{count:h,actions:c.jsx(c.Fragment,{children:c.jsx(yr,{onRefresh:p,refreshDisabled:u||!r})}),mainAction:c.jsx(ni,{onClick:r?()=>a({recipeId:e}):void 0})}),c.jsx(D.DataList,{items:m,columns:s,emptyStateMessage:i("ModuleUpdateDefinitions.List.Empty"),onScrollToBottom:f,selected:y,hideCheckBoxes:!0,onSelect:b=>o.toSubDetails(e,"module-update-definitions",b.id),children:u&&c.jsx(et,{})})]})}function kU(e){const t={isDefault:!0};return[$e(e("Entity.Label.Name"),"name",t,void 0,"",VD),dn(e("Entity.Label.DistributionSet"),n=>c.jsx(Hp,{id:n.distributionSetRef.id,name:n.distributionSetRef.name,version:n.distributionSetRef.version}),"distributionSetRef",t)]}function DU(){const e=R();return x.useMemo(()=>kU(e),[e])}function CU(){return tt(av)}function MU(){return tt(lv)}function TU({recipeId:e,selectedId:t,useApiResult:n,isModifiable:r}){const i=R(),s=DU(),o=Jn(),a=CU(),{data:l,isLoading:u,error:d,fetchNextPage:f,reset:p}=n,{totalCount:h,entities:m}=Tt(l),y=x.useMemo(()=>Ql(t,m),[m,t]);return d?c.jsx(pe,{error:d}):c.jsxs(cn,{"data-testid":"recipe-SystemDistributionSets-view",children:[c.jsx(bn,{count:h,actions:c.jsx(c.Fragment,{children:c.jsx(yr,{onRefresh:p,refreshDisabled:u||!r})}),mainAction:c.jsx(ni,{onClick:r?()=>a({recipeId:e}):void 0})}),c.jsx(D.DataList,{items:m,columns:s,emptyStateMessage:i("SystemDistributionSets.List.Empty"),onScrollToBottom:f,selected:y,hideCheckBoxes:!0,onSelect:b=>o.toSubDetails(e,"system-distribution-sets",b.id),children:u&&c.jsx(et,{})})]})}function IU(){const e=ec();return t=>{const n=e(cv,{onCancel:()=>n(),...t})}}function EU({useListApiResult:e,useDeleteResult:t,useMetadataPostProps:n}){const r=R(),i=IU(),s=n?()=>i({useMetadataPostProps:n,existingKeys:m.map(y=>y.key)}):void 0,a=RU(r,t,n?y=>i({useMetadataPostProps:n,toEdit:y,existingKeys:[]}):void 0),{data:l,isLoading:u,error:d,fetchNextPage:f,reset:p}=e;if(d)return c.jsx(pe,{error:d});const{totalCount:h,entities:m}=Tt(l);return c.jsxs(cn,{"data-testid":"metadata-list",children:[c.jsx(bn,{count:h,actions:c.jsx(c.Fragment,{children:c.jsx(yr,{onRefresh:p,refreshDisabled:u||n===void 0})}),mainAction:c.jsx(ni,{onClick:s})}),c.jsx(D.DataList,{items:m,columns:a,emptyStateMessage:r("Metadata.List.Empty"),onScrollToBottom:f,hideCheckBoxes:!0,children:u&&c.jsx(et,{})})]})}function RU(e,t,n){const r={isDefault:!0};return[$e(e("Entity.Label.Key"),"key",r),$e(e("Entity.Label.Value"),"value",r),{data:{columnId:"actions"},header:e("Entity.Label.Actions"),onRenderHeader:()=>null,renderCell:i=>c.jsx(LU,{item:i,useDeleteResult:t,edit:n}),style:{width:"6rem"},cellStyle:{padding:0}}]}function LU({item:e,useDeleteResult:t,edit:n}){const r=R();return c.jsxs("div",{className:"action-buttons",children:[c.jsx(D.Button,{title:r("Button.Edit"),mode:"integrated",icon:"edit",onClick:()=>n==null?void 0:n(e),disabled:!n}),c.jsx(D.Button,{title:r("Button.Delete"),mode:"integrated",icon:"delete",onClick:()=>t==null?void 0:t.delete(e.key),disabled:!t||t.isLoading})]})}function Cu({helpFile:e,useApiResult:t,useDeleteResult:n,useMetadataAddItemProps:r,expandedByDefault:i}){const s=R();return c.jsx(tn,{header:s("Entity.Label.Metadata"),helpFile:e,expandedByDefault:i,children:c.jsx(EU,{useListApiResult:t,useDeleteResult:n,useMetadataPostProps:r})})}const OU="data:text/markdown;base64,KkNyZWF0ZWQgYXQvYnkqOiBTZXQgd2hlbiByZWNpcGUgaXMgY3JlYXRlZC4KCipMYXN0IG1vZGlmaWVkIGF0L2J5KjogU2V0IHdoZW5ldmVyIHRoZSByZWNpcGUsIGluY2x1ZGluZyBpdHMgdGFncywgbW9kdWxlIHVwZGF0ZSBkZWZpbml0aW9ucywgb3Igc3lzdGVtIGRpc3RyaWJ1dGlvbiBzZXRzLCBpcyBtb2RpZmllZC4gCgoqTGFzdCB2YWxpZGF0ZWQgYXQvYnkqOiBTZXQgd2hlbiByZWNpcGUgdmFsaWRhdGlvbiBpcyB0cmlnZ2VyZWQuCgoqUHVibGlzaGVkIGF0L2J5KjogU2V0IHdoZW4gcmVjaXBlIGlzIHByb21vdGVkLgoKKkFwcHJvdmVkIGF0L2J5KjogU2V0IHdoZW4gcmVjaXBlIGlzIGFwcHJvdmVkLg==",Lv="N/A";function BU({recipe:e}){const t=R(),{createdAt:n,createdBy:r,lastModifiedAt:i,lastModifiedBy:s,publishedAt:o,publishedBy:a,approvedAt:l,approvedBy:u,approvalRemark:d,validity:f}=e;return c.jsx(tn,{header:t("Entity.Label.Audit"),helpFile:OU,expandedByDefault:!0,children:c.jsxs(Mn,{label:"",className:"basic-details-layout",style:{marginBottom:0},children:[c.jsx(ne,{header:t("Entity.Label.CreatedAt"),children:jn(n)}),c.jsx(ne,{header:t("Entity.Label.CreatedBy"),children:r}),c.jsx(ne,{header:t("Entity.Label.LastModifiedAt"),children:jn(i)}),c.jsx(ne,{header:t("Entity.Label.LastModifiedBy"),children:s}),f.triggeredAt&&c.jsxs(c.Fragment,{children:[c.jsx(ne,{header:t("Recipes.Label.LastValidationTriggeredAt"),children:jn(f.triggeredAt)}),c.jsx(ne,{header:t("Recipes.Label.LastValidationTriggeredBy"),children:f.triggeredBy??Lv})]}),o&&c.jsxs(c.Fragment,{children:[c.jsx(ne,{header:t("Recipes.Label.PublishedAt"),children:jn(o)}),c.jsx(ne,{header:t("Recipes.Label.PublishedBy"),children:a??Lv})]}),l&&c.jsxs(c.Fragment,{children:[c.jsx(ne,{header:t("Recipes.Label.ApprovedAt"),children:jn(l)}),c.jsx(ne,{header:t("Recipes.Label.ApprovedBy"),children:u??Lv}),GD(d)?c.jsx(ne,{header:t("Recipes.Label.ApprovalRemark"),children:d}):null]})]})})}function Mu(){const e=R(),t=Ke(),{id:n,subEntity:r,subEntityId:i}=Te.useParams(),[s,o]=x.useState(!1),[a,l]=x.useState(!1),u=kv(n,s),d=K6(n,a),f=Q6(n),p=mU(n),h=V9(n),m=O9(n),y=A9(n??"");if(x.useEffect(()=>{var w,_,T,M,C;const S=((w=u.data)==null?void 0:w.state)==="waiting_for_signature"||((_=u.data)==null?void 0:_.validity.validationState)==="in_progress"||((M=(T=u.data)==null?void 0:T.coverage)==null?void 0:M.status)==="in-progress";!s&&S?o(!0):((C=u.data)==null?void 0:C.state)==="waiting_for_signature"&&!a?l(!0):s&&!S&&(t.invalidateQueries(Pe.list()),o(!1),l(!1))},[u.data,a,s,o,t]),n===void 0)return c.jsx(pe,{error:{message:"Missing entity ID"}});const b=Rv(n);if(u.error)return c.jsx(pe,{error:u.error});if(u.isLoading)return c.jsx(et,{"data-testid":"recipe-details-loading"});const g=ls(u.data,"edit"),v=u.data._links.download;return c.jsxs(c.Fragment,{children:[c.jsx(X6,{recipe:u.data}),c.jsx(tn,{header:e("Entity.Label.Tags"),helpFile:nU,expandedByDefault:!0,children:c.jsx(eU,{recipe:u.data,useAssignedTagsResult:f})}),v&&c.jsx(tn,{header:e("Recipes.Label.RecipeFile"),helpFile:tU,expandedByDefault:u.data.state==="waiting_for_signature",children:c.jsx(pU,{recipeId:u.data.id,fileDownloadLink:v,useSignaturesResult:d})}),c.jsx(tn,{header:e("Recipes.Label.ModuleUpdateDefinitions"),helpFile:rU,expandedByDefault:!0,children:c.jsx(_U,{recipeId:u.data.id,useApiResult:p,isModifiable:g,selectedId:r==="module-update-definitions"?i:void 0})}),c.jsx(tn,{header:e("Recipes.Label.SystemDistributionSets"),helpFile:iU,expandedByDefault:!0,children:c.jsx(TU,{recipeId:n,useApiResult:h,isModifiable:g,selectedId:r==="system-distribution-sets"?i:void 0})}),c.jsx(Cu,{helpFile:sU,useApiResult:m,useDeleteResult:g?y:void 0,useMetadataAddItemProps:g?b:void 0,expandedByDefault:!0}),c.jsx(BU,{recipe:u.data})]})}Mu.displayName="RecipeDetailsBlade";function AU(){const e=R();return c.jsxs(c.Fragment,{children:[e("Recipes.Details.BladeHeader"),c.jsx(Cn,{popoverHeading:e("Recipes.Details.BladeHeader"),children:c.jsx("div",{children:c.jsx(Ft,{markdownFilePath:Y6})})})]})}Mu.Header=AU;const PU="data:text/markdown;base64,QSBtb2R1bGUgdXBkYXRlIGRlZmluaXRpb24gY29uc2lzdHMgb2YgdGhyZWUgZWxlbWVudHM6CgoqIFRoZSBxdWVyeSBpZGVudGlmaWVzIGEgc2V0IG9mIG1vZHVsZXMgKGJhc2VkIG9uIHRoZWlyIGNvbnRyb2xsZXIgYXR0cmlidXRlcykuCiogVGhlIGNvdW50IHNwZWNpZmllcyB0aGUgZXhwZWN0ZWQgbnVtYmVyIG9mIG1hdGNoaW5nIG1vZHVsZXMgd2l0aGluIGEgc3lzdGVtLgoqIFRoZSBvcHRpb25hbCBkaXN0cmlidXRpb24gc2V0IHNwZWNpZmllcyB0aGUgc29mdHdhcmUgdGhhdCBzaG91bGQgYmUgYXBwbGllZCB0byB0aGUgbWF0Y2hpbmcgbW9kdWxlcy4gSWYgbm8gZGlzdHJpYnV0aW9uIHNldCBpcyBzcGVjaWZpZWQsIHRoZSBtYXRjaGluZyBtb2R1bGVzIG5lZWQgdG8gYmUgcHJlc2VudCBpbiB0aGUgc3lzdGVtIGJ1dCB3aWxsIG5vdCBiZSB1cGRhdGVkLgoKVGhlIDxJY29uIGljb25OYW1lPSJ3cmVuY2giIC8+IGljb24gYWxsb3dzIHRvIGVkaXQgdGhlIG1vZHVsZSB1cGRhdGUgZGVmaW5pdGlvbiB3aGlsZSB0aGUgcmVjaXBlIGlzIGluIDxJY29uIGljb25OYW1lPSJkb2N1bWVudC1wbGFpbiIgLz4gZHJhZnQgc3RhdGUu",NU="data:text/markdown;base64,TWV0YWRhdGEgYXJlIGtleS12YWx1ZSBwYWlycyB0aGF0IGNhbiBoZWxwIHRvIGFubm90YXRlIHRoZSBtb2R1bGUgdXBkYXRlIGRlZmluaXRpb24gd2l0aCBhZGRpdGlvbmFsIGluZm9ybWF0aW9uLiBUaGUgbWV0YWRhdGEgaW5mb3JtYXRpb24gY2FuIGJlIGxhdGVyIHVzZWQgd2hlbiBnZW5lcmF0aW5nIHRoZSByZWNpcGUgZmlsZS4KClRoaXMgc2VjdGlvbiBzaG93cyBhdmFpbGFibGUgbWV0YWRhdGEgb2YgdGhlIG1vZHVsZSB1cGRhdGUgZGVmaW5pdGlvbiBhbmQgcHJvdmlkZXMgbWFuYWdlbWVudCBhY3Rpb25zIGZvciBtZXRhZGF0YSAoY3JlYXRlLCBlZGl0LCBkZWxldGUpLg==";function jU(e,t){const n=!!e&&!!t,r=n?Xr.entityDetails(t,{recipeId:e}):[];return or(r,`recipes/${e}/module-update-definitions/${t}`,{enabled:n})}const FU="data:text/markdown;base64,VGhlIG1vZHVsZSBxdWVyeSAoYS5rLmEuIG1vZHVsZSBtYXRjaCkgaWRlbnRpZmllcyBhIHNldCBvZiBtb2R1bGVzIChiYXNlZCBvbiBwcm9wZXJ0aWVzIGZyb20gdGhlIGNvbnRyb2xsZXIgYXR0cmlidXRlcykuCgoqKkV4YW1wbGUqKjogYGF0dHJpYnV0ZXMucHJvZHVjdENsYXNzSWQ9PTEzMzcgYW5kIGF0dHJpYnV0ZXMuaHdWZXJzaW9uPWluPSgxLjAuMCwxLjEuMClgCgpTZWUgdGhlIFtkb2N1bWVudGF0aW9uXShodHRwczovL2RvY3MuYm9zY2gtaW90LXN1aXRlLmNvbS9yb2xsb3V0cy9TT1VQLVJlY2lwZS5odG1sI3NyYy0zOTU4MDI0NjA5X1NPVVBSZWNpcGUtTW9kdWxldXBkYXRlZGVmaW5pdGlvbikgZm9yIGRldGFpbGVkIGluZm9ybWF0aW9uIGFib3V0IHRoZSBxdWVyeSBwb3NzaWJpbGl0aWVzLg==",GU="data:text/markdown;base64,VGhlIGNvdW50IHNwZWNpZmllcyB0aGUgZXhwZWN0ZWQgbnVtYmVyIG9mIG1hdGNoaW5nIG1vZHVsZXMgd2l0aGluIGEgc3lzdGVtLiBJdCBpcyB1c2VkIHRvIGV4cHJlc3MsIGlmIGEgbW9kdWxlIGNhbiBvbmx5IGFwcGVhciBvbmNlIGluIGEgc3lzdGVtIG9yIGlmIGl0IGlzIG9wdGlvbmFsLgoKKipFeGFtcGxlcyoqOiAKCiogT3B0aW9uYWwgbW9kdWxlczogYGNvdW50PWxlPTFgCiogRXhhY3RseSBvbmNlOiBgY291bnQ9PTFgCgoKU2VlIHRoZSBbZG9jdW1lbnRhdGlvbl0oaHR0cHM6Ly9kb2NzLmJvc2NoLWlvdC1yb2xsb3V0cy5jb20vU09VUC1SZWNpcGUuaHRtbCNzcmMtMzk1ODAyNDYwOV9TT1VQUmVjaXBlLU1vZHVsZWNvdW50cXVlcnlzeW50YXgpIGZvciBkZXRhaWxlZCBpbmZvcm1hdGlvbiBhYm91dCB0aGUgcXVlcnkgcG9zc2liaWxpdGllcy4=";function VU({isModifiable:e,recipeId:t,entity:n}){const r=R(),i=Jn(),{doDelete:s,deleteIsLoading:o}=vr(Xr.deleteEntity({recipeId:t}),[Pe.entityDetails(t)],r("ModuleUpdateDefinition.Popup.Delete.Headline"),r("ModuleUpdateDefinition.Info.Delete.Success"),()=>i.toDetails(t)),a=wU(),l=Xt(n,"delete");return c.jsxs(ti,{title:r("ModuleUpdateDefinition.Details.ActionsMenu.Title"),testId:"moduleUpdateDefinition-actions",children:[c.jsx(D.MenuItem,{label:r("Button.Edit"),icon:"edit",title:r("Button.Edit"),onClick:()=>a({recipeId:t,toEdit:n}),disabled:!e}),c.jsx(D.MenuItem,{label:r("Button.Delete"),icon:"delete",title:r("Button.Delete"),onClick:()=>s(n.name,l??""),disabled:!e||o})]})}function $U({recipeId:e,details:t,isModifiable:n}){const r=R(),{id:i,name:s,description:o,moduleType:a,distributionSetRef:l,moduleQuery:u,moduleCountQuery:d}=t;return c.jsxs(c.Fragment,{children:[c.jsx(VU,{isModifiable:n,recipeId:e,entity:t}),c.jsxs(Mn,{label:"",className:"basic-details-layout",style:{marginBottom:0},children:[c.jsx(ne,{header:r("Entity.Label.Id"),showCopy:!0,value:i,children:i}),c.jsx(ne,{header:r("Entity.Label.Name"),children:s}),o&&c.jsx(ne,{header:r("Entity.Label.Description"),children:o}),c.jsx(ne,{header:r("Entity.Label.ModuleType"),children:c.jsx(wu,{id:a.id,title:a.name})}),(l==null?void 0:l.id)&&c.jsx(ne,{header:r("Entity.Label.DistributionSet"),children:c.jsx(Hp,{id:l.id,name:l.name,version:l.version})}),c.jsx(ne,{header:r("ModuleUpdateDefinitions.Label.Query"),showCopy:!0,value:u,help:c.jsx(Ft,{markdownFilePath:FU}),popoverHeading:r("ModuleUpdateDefinitions.Label.Query"),children:c.jsx(Wp,{title:u,filter:{fq:u}})}),c.jsx(ne,{header:r("ModuleUpdateDefinitions.Label.CountQuery"),showCopy:!0,value:d,help:c.jsx(Ft,{markdownFilePath:GU}),popoverHeading:r("ModuleUpdateDefinitions.Label.CountQuery"),children:d})]})]})}function YU(e,t){const n=!!e&&!!t,{url:r,listQueryKey:i}=n?Ov(e,t):kl;return Ht(i,r,"metadata",{enabled:n})}function WU(e,t){const{url:n,mutationKey:r,listQueryKey:i,invalidateOnMutation:s}=Ov(e,t);return bu(n,i,r,s)}function Ov(e,t){return{url:`recipes/${e}/module-update-definitions/${t}/metadata`,listQueryKey:Xr.metadataList({recipeId:e,id:t}),mutationKey:Xr.metadataModify({recipeId:e,id:t}),invalidateOnMutation:Pe.entityDetails(e),useApiV2:!1}}function Tu(){const{id:e,subEntityId:t}=Te.useParams(),n=jU(e,t),r=YU(e,t),i=WU(e??"",t??"");if(e===void 0||t===void 0)return c.jsx(pe,{error:{message:"Missing entity ID"}});const s=Ov(e,t);if(n.error)return c.jsx(pe,{error:n.error});if(n.isLoading)return c.jsx(et,{});const o=ls(n.data,"delete"),a=ls(n.data,"metadataUpdate");return c.jsxs(c.Fragment,{children:[c.jsx($U,{recipeId:e,details:n.data,isModifiable:o}),c.jsx(Cu,{helpFile:NU,useApiResult:r,useDeleteResult:a?i:void 0,useMetadataAddItemProps:a?s:void 0,expandedByDefault:!0})]})}Tu.displayName="ModuleUpdateDefinitionsDetailsBlade";function HU(){const e=R();return c.jsxs(c.Fragment,{children:[e("ModuleUpdateDefinitions.Details.BladeHeader"),c.jsx(Cn,{popoverHeading:e("ModuleUpdateDefinitions.Details.BladeHeader"),children:c.jsx("div",{children:c.jsx(Ft,{markdownFilePath:PU})})})]})}Tu.Header=HU;const ZU="data:text/markdown;base64,QSBzeXN0ZW0gZGlzdHJpYnV0aW9uIHNldCBzcGVjaWZpZXMgYXJ0aWZhY3RzIHRoYXQgYXJlIHJlcXVpcmVkIG9uIGEgc3lzdGVtIGxldmVsIChlLmcuIHN5c3RlbSByZWxlYXNlIG5vdGVzLCBpbnN0YWxsIHNjcmlwdHMpLgoKVGhlIDxJY29uIGljb25OYW1lPSJ3cmVuY2giIC8+IGljb24gYWxsb3dzIHRvIGVkaXQgdGhlIHN5c3RlbSBkaXN0cmlidXRpb24gc2V0IHdoaWxlIHRoZSByZWNpcGUgaXMgaW4gPEljb24gaWNvbk5hbWU9ImRvY3VtZW50LXBsYWluIiAvPiBkcmFmdCBzdGF0ZS4=",UU="data:text/markdown;base64,TWV0YWRhdGEgYXJlIGtleS12YWx1ZSBwYWlycyB0aGF0IGNhbiBoZWxwIHRvIGFubm90YXRlIHRoZSBzeXN0ZW0gZGlzdHJpYnV0aW9ucyBzZXQgd2l0aCBhZGRpdGlvbmFsIGluZm9ybWF0aW9uLiBUaGUgbWV0YWRhdGEgaW5mb3JtYXRpb24gY2FuIGJlIGxhdGVyIHVzZWQgd2hlbiBnZW5lcmF0aW5nIHRoZSByZWNpcGUgZmlsZS4KClRoaXMgc2VjdGlvbiBzaG93cyBhdmFpbGFibGUgbWV0YWRhdGEgb2YgdGhlIHN5c3RlbSBkaXN0cmlidXRpb24gc2V0IGFuZCBwcm92aWRlcyBtYW5hZ2VtZW50IGFjdGlvbnMgZm9yIG1ldGFkYXRhIChjcmVhdGUsIGVkaXQsIGRlbGV0ZSku";function zU({isModifiable:e,recipeId:t,entity:n}){const r=R(),i=Jn(),{doDelete:s,deleteIsLoading:o}=vr(_i.deleteEntity({recipeId:t}),[Pe.entityDetails(t)],r("SystemDistributionSet.Popup.Delete.Headline"),r("SystemDistributionSet.Info.Delete.Success"),()=>i.toDetails(t)),a=MU(),l=Xt(n,"delete");return c.jsxs(ti,{title:r("SystemDistributionSet.Details.ActionsMenu.Title"),testId:"systemDistributionSet-actions",children:[c.jsx(D.MenuItem,{label:r("Button.Edit"),icon:"edit",title:r("Button.Edit"),onClick:()=>a({recipeId:t,toEdit:n}),disabled:!e}),c.jsx(D.MenuItem,{label:r("Button.Delete"),icon:"delete",title:r("Button.Delete"),onClick:()=>s(n.name,l??""),disabled:!e||o})]})}function qU({recipeId:e,details:t,isModifiable:n}){const r=R(),{id:i,name:s,description:o,distributionSetRef:a}=t;return c.jsxs(c.Fragment,{children:[c.jsx(zU,{isModifiable:n,recipeId:e,entity:t}),c.jsxs(Mn,{label:"",className:"basic-details-layout",style:{marginBottom:0},children:[c.jsx(ne,{header:r("Entity.Label.Id"),showCopy:!0,value:i,children:i}),c.jsx(ne,{header:r("Entity.Label.Name"),children:s}),o&&c.jsx(ne,{header:r("Entity.Label.Description"),children:o}),c.jsx(ne,{header:r("Entity.Label.DistributionSet"),children:c.jsx(Hp,{id:a.id,name:a.name,version:a.version})})]})]})}function XU(e,t){const n=!!e&&!!t,{url:r,listQueryKey:i}=n?Bv(e,t):kl;return Ht(i,r,"metadata",{enabled:n})}function KU(e,t){const{url:n,mutationKey:r,listQueryKey:i,invalidateOnMutation:s}=Bv(e,t);return bu(n,i,r,s)}function Bv(e,t){return{url:`recipes/${e}/system-distribution-sets/${t}/metadata`,listQueryKey:_i.metadataList({recipeId:e,id:t}),mutationKey:_i.metadataModify({recipeId:e,id:t}),invalidateOnMutation:Pe.entityDetails(e),useApiV2:!1}}function Iu(){const{id:e,subEntityId:t}=Te.useParams(),n=Y9(e,t),r=XU(e,t),i=KU(e??"",t??"");if(e===void 0||t===void 0)return c.jsx(pe,{error:{message:"Missing entity ID"}});const s=Bv(e,t);if(n.error)return c.jsx(pe,{error:n.error});if(n.isLoading)return c.jsx(et,{});const o=ls(n.data,"delete"),a=ls(n.data,"metadataUpdate");return c.jsxs(c.Fragment,{children:[c.jsx(qU,{recipeId:e,details:n.data,isModifiable:o}),c.jsx(Cu,{helpFile:UU,useApiResult:r,useDeleteResult:a?i:void 0,useMetadataAddItemProps:a?s:void 0,expandedByDefault:!0})]})}Iu.displayName="SystemDistributionSetsDetailsBlade";function QU(){const e=R();return c.jsxs(c.Fragment,{children:[e("SystemDistributionSets.Details.BladeHeader"),c.jsx(Cn,{popoverHeading:e("SystemDistributionSets.Details.BladeHeader"),children:c.jsx("div",{children:c.jsx(Ft,{markdownFilePath:ZU})})})]})}Iu.Header=QU;const WD={component:Du,name:Du.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:c.jsx(Du.Header,{}),showCloseButton:!1}},HD={component:Mu,name:Mu.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:c.jsx(Mu.Header,{})}},ZD={component:Tu,name:Tu.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:c.jsx(Tu.Header,{})}},UD={component:Iu,name:Iu.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:c.jsx(Iu.Header,{})}};function JU(){const{id:e,subEntity:t,subEntityId:n}=Te.useParams(),r=Jn(),i=x.useMemo(()=>({...WD,defaults:{...WD.defaults}}),[]),s=x.useMemo(()=>({...HD,defaults:{...HD.defaults,onClose:()=>r.toHome()}}),[r]),o=x.useMemo(()=>({...ZD,defaults:{...ZD.defaults,onClose:()=>r.toDetails(e??"")}}),[r,e]),a=x.useMemo(()=>({...UD,defaults:{...UD.defaults,onClose:()=>r.toDetails(e??"")}}),[r,e]),l=x.useMemo(()=>{const u=[i];return e&&(u.push(s),n&&(t==="module-update-definitions"?u.push(o):t==="system-distribution-sets"&&u.push(a))),u},[e,t,n,i,s,o,a]);return c.jsx(D.Blades,{registrations:l,settings:{resizable:!0}})}const e8=JU,t8="data:text/markdown;base64,UmVjaXBlIHRhZ3MgYXJlIHN0cmluZ3MgdXNlZCB0byBkZXNjcmliZSBhbmQgZ3JvdXAgcmVjaXBlcy4gVGhlIHZpc2liaWxpdGllcyBvZiBhIHRhZyBkZWZpbmVzIHdoZXRoZXIgb3Igbm90IGl0IGlzIGV4cG9zZWQgdG8gdGhlIHN5c3RlbSB1cGRhdGUgYXBwIG9yIGdhdGV3YXkgdmlhIHRoZSBJbnN0YWxsIEFQSS4gQWZ0ZXIgYXNzaWduaW5nIHRoZW0gdG8gYSByZWNpcGUsIHRhZ3MgY2FuIGJlIHVzZWQgYXMgYSBzaW1wbGUgZmlsdGVyaW5nIG1lY2hhbmlzbS4KClRoaXMgdmlldyBzaG93cyBhbGwgYXZhaWxhYmxlIHJlY2lwZSB0YWdzIGFuZCB5b3UgY2FuIGNvbmZpZ3VyZSB0aGUgZGlzcGxheWVkIGNvbHVtbnMgdmlhIHRoZSA8SWNvbiBpY29uTmFtZT0ic2V0dGluZ3MiIC8+IG1lbnUu",Av="RecipeTagAddModal",Pv="RecipeTagEditModal";function n8(){return tt(Av)}function r8(){return tt(Pv)}function i8({item:e}){const t=R(),{data:n}=vu(),{entities:r}=Tt(n),i=r8(),s=vr(Jr.deleteEntity(e.id),[Jr.list()],t("RecipeTags.Popup.Delete.Headline"),t("RecipeTags.Info.Delete.Success")),o=e._links.self.href;return c.jsxs("div",{className:"action-buttons",children:[c.jsx(D.Button,{title:t("Button.Edit"),mode:"integrated",icon:"edit",onClick:()=>i({toEdit:e,existingTags:r})}),c.jsx(D.Button,{title:t("Button.Delete"),mode:"integrated",icon:"delete",onClick:()=>s.doDelete(e.name,o),disabled:s.deleteIsLoading})]})}function zD({title:e,filter:t}){const n=R(),r=Pp(t);return c.jsx(ar,{title:e??n("Button.ViewRecipes"),href:r})}function s8(e,t){const n=(t==null?void 0:t.exposed)??!1;return c.jsx(D.Icon,{role:"img",title:e(n?"RecipeTags.Tooltip.Exposed":"RecipeTags.Tooltip.NotExposed"),iconName:n?"watch-on":"watch-off-disabled-light"})}function o8(e){const t={isDefault:!0},n={isSortable:!0},r={isDefault:!0,isSortable:!0};return[ei(e("RecipeTags.Label.Exposed"),i=>s8(e,i),!0,void 0,"exposed"),$e(e("Entity.Label.Id"),"id",t),$e(e("Entity.Label.Name"),"name",r),$e(e("Entity.Label.Description"),"description",t),Ln(e("Entity.Label.CreatedAt"),"createdAt",n),$e(e("Entity.Label.CreatedBy"),"createdBy"),Ln(e("Entity.Label.LastModifiedAt"),"lastModifiedAt",n),$e(e("Entity.Label.LastModifiedBy"),"lastModifiedBy"),dn(e("RecipeTags.Label.Recipes"),i=>i.id?c.jsx(zD,{title:e("Button.ViewRecipes"),filter:{tagId:[i.id]}}):null,"recipes",t),{data:{columnId:"actions",isDefault:!0},header:e("Entity.Label.Actions"),onRenderHeader:()=>null,renderCell:i=>c.jsx(i8,{item:i}),style:{width:"6rem"},cellStyle:{padding:0}}]}function a8(){const e=R();return x.useMemo(()=>o8(e),[e])}const l8="recipe-tags";function c8({data:e,totalCount:t,loadingData:n,fetchMoreData:r,onRefresh:i,onSortQueryChange:s}){const o=R(),a=n8(),l=a8(),[u,d]=x.useState(l);pa(u,s);const{sortColumn:f,isSortingMultipleColumns:p,setIsSortingMultipleColumns:h,resetSorting:m}=ha(d,"recipe-tags"),y=x.useMemo(()=>({allColumns:l,onColumnSelectionChange:d,typeName:l8,multiSortProps:{isMultiSort:p,onToggleMultiSort(g){h(g),g||m()}}}),[l,p,m,h]),b=x.useMemo(()=>ma(f),[f]);return c.jsxs(cn,{children:[c.jsx(bn,{count:t,columnSelectorProps:y,actions:c.jsx(yr,{onRefresh:i,refreshDisabled:n}),mainAction:c.jsx(ni,{onClick:()=>a({existingTags:e})})}),c.jsx(D.DataList,{items:e,columns:u,enableScrolling:!0,emptyStateMessage:o("RecipeTags.List.Empty"),onScrollToBottom:r,hideCheckBoxes:!0,onRenderColumnHeader:b,children:n&&c.jsx(et,{"data-testid":"recipes-list-loading"})})]})}function Eu(){const[e,t]=x.useState(),{data:n,isLoading:r,error:i,fetchNextPage:s,reset:o}=vu(e),{totalCount:a,entities:l}=Tt(n);return i?c.jsx(pe,{error:i}):c.jsx(c8,{data:l,totalCount:a,loadingData:r,fetchMoreData:s,onRefresh:o,onSortQueryChange:t})}Eu.displayName="RecipeTagsListBlade";function u8(){const e=R();return c.jsxs(c.Fragment,{children:[e("RecipeTags.List.BladeHeader"),c.jsx(Cn,{popoverHeading:e("RecipeTags.List.BladeHeader"),children:c.jsx("div",{children:c.jsx(Ft,{markdownFilePath:t8})})})]})}Eu.Header=u8;const qD={component:Eu,name:Eu.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:c.jsx(Eu.Header,{}),showCloseButton:!1}};function d8(){const e=x.useMemo(()=>({...qD,defaults:{...qD.defaults}}),[]);return c.jsx(D.Blades,{registrations:[e],settings:{resizable:!0}})}const f8=d8;function p8(e,t=1){return`bosch:iot-suite:soup:${e}-${t}`}const h8=p8("nav-menu-open",1);function m8({header:e,itemProps:t}){const n=R(),r=Te.useNavigate(),[i,s]=s2(h8,!0),o=Te.useMatches(),a=t.map(d=>({value:d.pathname,label:n(d.label),icon:d.icon})),l=t.map(d=>d.pathname).sort((d,f)=>f.split("/").length-d.split("/").length).find(d=>o[o.length-1].pathname.startsWith(d)),u=d=>{r(d,{relative:"path"})};return c.jsx(D.SideNavigation,{defaultOpen:!0,open:i,onOpenChange:s,header:{label:n(e)},body:{menuItems:a},selectedItem:l,contrast:!1,onSelectedItemChange:(d,f)=>u(f.value)})}function XD(e,t){return n=>c.jsx(c.Fragment,{children:c.jsxs("div",{className:"soup-navigation-layout",children:[c.jsx(m8,{...e}),c.jsx("div",{className:"soup-navigation-items",children:c.jsx(t,{...n},void 0)})]})})}function Nv(e){return XD({header:"Recipes.List.BladeHeader",itemProps:[{icon:"table",label:"Navigation.Label.List",pathname:Pp()},{icon:"label",label:"Navigation.Label.Tags",pathname:h4()},{icon:"chip",label:"Navigation.Label.Types",pathname:gv()}]},e)}function jv(e){return XD({header:"Systems.List.BladeHeader",itemProps:[{icon:"table",label:"Navigation.Label.List",pathname:Ap()},{icon:"chip",label:"Navigation.Label.SystemTypes",pathname:hv()},{icon:"chip",label:"Navigation.Label.ModuleTypes",pathname:tD()}]},e)}const g8="data:text/markdown;base64,VGhlIGxpc3Qgb2Ygc3lzdGVtIGFjdGlvbnMsIGVhY2ggcmVwcmVzZW50aW5nIGEgc3lzdGVtIHVwZGF0ZS4KCkVhY2ggc3lzdGVtIGFjdGlvbiByZWZlcmVuY2VzOgoKKiBhIHN5c3RlbSwgdGhhdCBpcyB1cGRhdGVkLAoqIGEgcmVjaXBlLCB0aGF0IGRlZmluZXMgdGhlIHVwZGF0ZSwgYW5kCiogdGhlIHJlbGF0ZWQgbW9kdWxlIGFjdGlvbnMKKiB0aGUgbW9kdWxlIElEIHNlbmRpbmcgdGhlIHVwZGF0ZSByZXBvcnQKClRoZSBsaXN0IGNhbiBiZSBmaWx0ZXJlZCBieSBjbGlja2luZyB0aGUgPEljb24gaWNvbk5hbWU9ImZpbHRlciIgLz4uIE9ubHkgc3lzdGVtIGFjdGlvbnMgdGhhdCBtYXRjaCBhbGwgdGhlIGZpbHRlciBjcml0ZXJpYSB3aWxsIHRoZW4gYmUgZGlzcGxheWVkLgoKWW91IGNhbiBjb25maWd1cmUgdGhlIGRpc3BsYXllZCBjb2x1bW5zIHZpYSB0aGUgPEljb24gaWNvbk5hbWU9InNldHRpbmdzIiAvPiBtZW51Lg==",Fv={...Kn("system-actions")},y8={...Kn("system-action-status",({systemActionId:e})=>Fv.entityDetails(e))};function v8(e,t){var r,i,s,o,a,l,u;const n=new URLSearchParams;return eo(n,t),(r=e.systemId)==null||r.forEach(d=>n.append("systemId[]",d)),(i=e.recipeId)==null||i.forEach(d=>n.append("recipeId[]",d)),(s=e.reportedBy)==null||s.forEach(d=>n.append("reportedBy[]",d)),(o=e.statusCode)==null||o.forEach(d=>n.append("statusCode[]",d)),(a=e.status)==null||a.forEach(d=>n.append("status[]",d)),No(n,"lastReportedAt[gt]",(l=e.lastReportedAtGt)==null?void 0:l.toISOString()),No(n,"lastReportedAt[lt]",(u=e.lastReportedAtLt)==null?void 0:u.toISOString()),Ht(Fv.listFilteredWithSorting(e,t??null),"system-actions","systemAction",{queryParams:n})}function b8(e){return{status:e.getAll("status"),systemId:e.getAll("systemId"),recipeId:e.getAll("recipeId"),reportedBy:e.getAll("reportedBy"),statusCode:e.getAll("statusCode"),lastReportedAtGt:Ta(e,"lastReportedAtGt"),lastReportedAtLt:Ta(e,"lastReportedAtLt")}}function Gv(){const{currentFilter:e,setFilter:t,mergeFilter:n}=rl(b8);return{systemActionsFilter:e,setSystemActionsFilter:t,mergeSystemActionsFilter:n}}const S8={label:"SystemAction.Status.Success",iconName:"alert-success",color:"green-50"},x8={label:"SystemAction.Status.Error",iconName:"alert-error",color:"red-50"},w8=new Map([["SUCCESS",S8],["ERROR",x8]]);function Vv({status:e,withLabel:t}){const n=R(),r=w8.get(e)??fu;return c.jsx(Qr,{iconProps:{iconName:r.iconName,label:n(r.label),color:r.color},showLabel:t})}function KD({title:e,filter:t}){const n=F4(t);return c.jsx(ar,{title:e,href:n})}function QD({title:e,id:t}){const n=Jk(t);return c.jsx(ar,{title:e,href:n})}function _8(e){if(e)return c.jsx(Vv,{status:e.status})}function k8(e){const t={isDefault:!0},n={isSortable:!0},r={isDefault:!0,isSortable:!0};return[Ln(e("SystemActions.Label.LastReportedAt"),"reportedAt",r),ei(e("Entity.Label.Status"),i=>_8(i),!0,!0,"status"),$e(e("Entity.Label.Id"),"id",t),dn(e("SystemActions.Label.System"),i=>i._links.system===void 0?null:c.jsx(QD,{title:i._links.system.title,id:i._links.system.title}),"system",t),dn(e("SystemActions.Label.Recipe"),i=>i._links.recipe===void 0?null:c.jsx(Mo,{title:i._links.recipe.title,id:Pr(i._links.recipe.href)}),"recipe",t),dn(e("SystemActions.Label.ModuleActions"),i=>i.uri===void 0?null:c.jsx(KD,{title:e("SystemActions.Label.Actions"),filter:{externalRef:i.uri}}),"moduleActions",t),dn(e("SystemActions.Label.Gateway"),i=>i.reportedBy===void 0?null:c.jsx($p,{controllerId:i.reportedBy}),"reportedBy"),Ln(e("Entity.Label.CreatedAt"),"createdAt",n),$e(e("Entity.Label.CreatedBy"),"createdBy")]}function D8(){const e=R();return x.useMemo(()=>k8(e),[e])}const $v="SystemActionsFilterModal";function C8(){return tt($v)}function M8(){var u,d,f,p,h;const e=R(),{systemActionsFilter:t,mergeSystemActionsFilter:n}=Gv(),r=(((u=t.status)==null?void 0:u.length)??0)>0,i=(((d=t.recipeId)==null?void 0:d.length)??0)>0,s=(((f=t.systemId)==null?void 0:f.length)??0)>0,o=(((p=t.statusCode)==null?void 0:p.length)??0)>0,a=(((h=t.reportedBy)==null?void 0:h.length)??0)>0,l=t.lastReportedAtLt!==null||t.lastReportedAtGt!==null;return c.jsxs(c.Fragment,{children:[r?c.jsx(Tn,{category:e("Entity.Label.Status"),onClose:()=>n({status:null}),value:""},"status"):null,s?c.jsx(Tn,{category:e("SystemActions.Label.SystemId"),onClose:()=>n({systemId:null}),value:""},"system"):null,i?c.jsx(Tn,{category:e("SystemActions.Label.Recipes"),onClose:()=>n({recipeId:null}),value:""},"recipe"):null,a?c.jsx(Tn,{category:e("SystemActions.Label.Gateway"),onClose:()=>n({reportedBy:null}),value:""},"reportedBy"):null,o?c.jsx(Tn,{category:e("SystemAction.Label.StatusCodes"),onClose:()=>n({statusCode:null}),value:""},"statusCode"):null,l?c.jsx(Tn,{category:e("SystemActions.Label.ReportedAt"),onClose:()=>n({lastReportedAtLt:null,lastReportedAtGt:null}),value:""},"reportedAt"):null]})}const T8="systemActions";function I8({data:e,totalCount:t,loadingData:n,fetchMoreData:r,onRefresh:i,onSortQueryChange:s,onSelect:o,selectedId:a}){const l=R(),u=C8(),d=D8(),[f,p]=x.useState(d),h=x.useMemo(()=>Ql(a,e),[e,a]);pa(f,s);const{sortColumn:m,isSortingMultipleColumns:y,setIsSortingMultipleColumns:b,resetSorting:g}=ha(p,"system-actions"),v=x.useMemo(()=>({allColumns:d,onColumnSelectionChange:p,typeName:T8,multiSortProps:{isMultiSort:y,onToggleMultiSort(w){b(w),w||g()}}}),[d,y,g,b]),S=x.useMemo(()=>ma(m),[m]);return c.jsxs(cn,{children:[c.jsx(bn,{count:t,columnSelectorProps:v,content:c.jsxs(c.Fragment,{children:[c.jsx(D.Button,{title:l("Button.Filter"),label:l("Button.Filter"),icon:"filter",mode:"integrated",onClick:()=>u()}),c.jsx(M8,{})]}),actions:c.jsx(yr,{onRefresh:i,refreshDisabled:n})}),c.jsx(D.DataList,{items:e,columns:f,enableScrolling:!0,emptyStateMessage:l("SystemActions.List.Empty"),onScrollToBottom:r,selected:h,onSelect:w=>o(w.id),onRenderColumnHeader:S,hideCheckBoxes:!0,children:n&&c.jsx(et,{"data-testid":"actions-list-loading"})})]})}function JD(){const e=Te.useNavigate(),t=Te.useLocation();return{toHome(){e({pathname:yv(),search:t.search})},toDetails(n){e({pathname:g4(n),search:t.search})}}}function Ru(){const{id:e}=Te.useParams(),t=JD(),{systemActionsFilter:n}=Gv(),[r,i]=x.useState(),{data:s,isLoading:o,error:a,fetchNextPage:l,reset:u}=v8(n,r),{totalCount:d,entities:f}=Tt(s);return a?c.jsx(pe,{error:a}):c.jsx(I8,{data:f,totalCount:d,loadingData:o,fetchMoreData:l,onRefresh:u,onSortQueryChange:i,selectedId:e,onSelect:p=>t.toDetails(p)})}Ru.displayName="SystemActionsListBlade";function E8(){const e=R();return c.jsxs(c.Fragment,{children:[e("SystemActions.List.BladeHeader"),c.jsx(Cn,{popoverHeading:e("SystemActions.List.BladeHeader"),children:c.jsx("div",{children:c.jsx(Ft,{markdownFilePath:g8})})})]})}Ru.Header=E8;function R8(e){if(e)return c.jsx(Vv,{status:e.status})}function L8(e){return[Ln(e("SystemActions.Label.ReportedAt"),"reportedAt"),$e(e("SystemActions.Label.StatusCode"),"statusCode",void 0,void 0,"n/a"),ei(e("Entity.Label.Status"),t=>R8(t),void 0,void 0,"status")]}function O8(){const e=R();return L8(e)}function B8({message:e}){return c.jsx("div",{children:`[${e.timestamp}] ${e.message}`})}function A8(e){const t=[];return e.forEach((n,r)=>{n.messages.forEach(i=>{t.push({index:r,detailsInfo:c.jsx(B8,{message:i})})})}),t}function P8({useApiResult:e}){const t=R(),n=O8(),{totalCount:r,entities:i}=Tt(e.data);return c.jsxs(cn,{"data-testid":"systemAction-status-view",children:[c.jsx(bn,{count:r,actions:c.jsx(c.Fragment,{children:c.jsx(yr,{onRefresh:e.reset,refreshDisabled:e.isLoading})})}),c.jsx(D.DataList,{items:i,columns:n,emptyStateMessage:t("SystemActionsStatus.List.Empty"),onScrollToBottom:e.fetchNextPage,hideCheckBoxes:!0,expandableDetails:A8(i),children:e.isLoading&&c.jsx(et,{})})]})}const N8="data:text/markdown;base64,Jm5ic3A7PEljb24gaWNvbk5hbWU9ImFsZXJ0LXN1Y2Nlc3MiIHN0eWxlPSJjb2xvcjp2YXIoLS1jb2xvci1ncmVlbi01MCk7Ii8+ICpTdWNjZXNzKjogVGhlIHN5c3RlbSB1cGRhdGUgd2FzIHN1Y2Nlc3NmdWwsIGkuZS4gdGhlIHNvZnR3YXJlIHVwZGF0ZXMgb24gYWxsICh1cGRhdGUtcmVsZXZhbnQpIG1vZHVsZXMgYmVpbmcgcGFydCBvZiB0aGUgc3lzdGVtIHdlcmUgc3VjY2Vzc2Z1bC4KCiZuYnNwOzxJY29uIGljb25OYW1lPSJhbGVydC1lcnJvciIgc3R5bGU9ImNvbG9yOnZhcigtLWNvbG9yLXJlZC01MCk7Ii8+ICpFcnJvcio6IFRoZSBzeXN0ZW0gdXBkYXRlIGZhaWxlZCwgc2luY2UgdGhlcmUgd2FzIGF0IGxlYXN0IG9uZSBmYWlsaW5nIG1vZHVsZSBzb2Z0d2FyZSB1cGRhdGUu",j8="data:text/markdown;base64,QSBzdGF0dXMgZW50cnkgaXMgY3JlYXRlZCBmb3IgZXZlcnkgdXBkYXRlIHJlcG9ydCByZWdhcmRpbmcgdGhpcyBzeXN0ZW0gdXBkYXRlLiBFeHBhbmRpbmcgYW4gZW50cnkgd2lsbCBkaXNwbGF5IHRoZSBzeXN0ZW0gbG9ncyBwcm92aWRlZCBpbiBlYWNoIHVwZGF0ZSByZXBvcnQu";function F8({systemAction:e,useStatusResult:t}){const n=R(),{id:r,status:i,reportedAt:s,reportedBy:o,uri:a}=e,{recipe:l,system:u}=e._links;return c.jsxs(c.Fragment,{children:[c.jsxs(Mn,{label:"",className:"basic-details-layout",style:{marginBottom:0},children:[c.jsx(ne,{header:n("Entity.Label.Id"),showCopy:!0,value:r,children:r}),c.jsx(ne,{header:n("Entity.Label.Status"),help:c.jsx(Ft,{markdownFilePath:N8}),popoverHeading:n("Entity.Label.Status"),children:c.jsx(Vv,{status:i,withLabel:!0})}),c.jsx(ne,{header:n("SystemActions.Label.LastReportedAt"),children:oV(s)}),c.jsx(ne,{header:n("SystemActions.Label.System"),children:c.jsx(QD,{title:u.title,id:Pr(u.href)})}),c.jsx(ne,{header:n("SystemActions.Label.Recipe"),children:c.jsx(Mo,{title:l.title,id:Pr(l.href)})}),c.jsx(ne,{header:n("SystemActions.Label.Gateway"),children:c.jsx($p,{controllerId:o})}),c.jsx(ne,{header:n("SystemActions.Label.ModuleActions"),children:c.jsx(KD,{title:n("Button.ViewModuleActions"),filter:{externalRef:a}})})]}),c.jsx(tn,{header:n("SystemActions.Label.StatusSection"),helpFile:j8,expandedByDefault:!0,children:c.jsx(P8,{useApiResult:t})}),c.jsx(Vs,{auditable:e})]})}function G8(e){const t=e!==void 0,n=t?Fv.entityDetails(e):[];return or(n,`system-actions/${e}`,{enabled:t})}function V8(e){const t=e!==void 0,n=t?y8.list({systemActionId:e}):[];return Ht(n,`system-actions/${e}/status`,"status",{enabled:t})}const $8="data:text/markdown;base64,QSBzeXN0ZW0gYWN0aW9uIHJlcHJlc2VudHMgYSBzeXN0ZW0gdXBkYXRlLiBCZXNpZGVzIHRoZSB0YXJnZXRlZCBzeXN0ZW0gYW5kIGluc3RhbGxlZCByZWNpcGUsIGl0IHByb3ZpZGVzIGEgbGlzdCBvZiBzdGF0dXNlcyB3aGljaCB0aGUgc3lzdGVtIGFjdGlvbiBoYXMgbW92ZWQgdGhyb3VnaCBkdXJpbmcgYW4gdXBkYXRlLiBFeHBhbmRpbmcgYSByb3cgc2hvd3MgYWxsIGxvZ3MgdGhhdCBhcmUgcmVsYXRlZCB0byB0aGUgY29ycmVzcG9uZGluZyBzdGF0dXMu";function Lu(){const{id:e}=Te.useParams(),t=G8(e),n=V8(e);return e===void 0?c.jsx(pe,{error:{message:"Missing entity ID"}}):t.error||n.error?c.jsx(pe,{error:t.error}):t.isLoading?c.jsx(et,{}):c.jsx(c.Fragment,{children:c.jsx(F8,{systemAction:t.data,useStatusResult:n})})}Lu.displayName="SystemActionDetailsBlade";function Y8(){const e=R();return c.jsxs(c.Fragment,{children:[e("SystemActions.Details.BladeHeader"),c.jsx(Cn,{popoverHeading:e("SystemActions.Details.BladeHeader"),children:c.jsx("div",{children:c.jsx(Ft,{markdownFilePath:$8})})})]})}Lu.Header=Y8;const eC={component:Ru,name:Ru.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:c.jsx(Ru.Header,{}),showCloseButton:!1}},tC={component:Lu,name:Lu.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:c.jsx(Lu.Header,{})}};function W8(){const{id:e}=Te.useParams(),t=JD(),n=x.useMemo(()=>({...eC,defaults:{...eC.defaults}}),[]),r=x.useMemo(()=>({...tC,defaults:{...tC.defaults,onClose:()=>t.toHome()}}),[t]),i=x.useMemo(()=>{const s=[n];return e&&s.push(r),s},[e,n,r]);return c.jsx(D.Blades,{registrations:i,settings:{resizable:!0}})}const H8=W8,Z8="data:text/markdown;base64,UmVjaXBlIHR5cGVzIGFyZSB1bmlxdWUga2V5cyB3aXRoIGZsZXhpYmxlIG5hbWVzIGFuZCBkZXNjcmlwdGlvbnMgdXNlZCB0byBjbGFzc2lmeSBhbmQgb3JnYW5pemUgcmVjaXBlcy4KClRoaXMgdmlldyBzaG93cyBhbGwgYXZhaWxhYmxlIHJlY2lwZSB0eXBlcyBhbmQgeW91IGNhbiBjb25maWd1cmUgdGhlIGRpc3BsYXllZCBjb2x1bW5zIHZpYSB0aGUgPEljb24gaWNvbk5hbWU9InNldHRpbmdzIiAvPiBtZW51Lgo=";function nC({title:e,id:t}){const n=eD(t);return c.jsx(ar,{title:e,href:n})}function U8(e){const t={isDefault:!0},n={isSortable:!0},r={isDefault:!0,isSortable:!0};return[$e(e("Entity.Label.Id"),"id"),$e(e("Entity.Label.Key"),"key",r),$e(e("Entity.Label.Name"),"name",r),$e(e("Entity.Label.Description"),"description",t),dn(e("Entity.Label.SystemType"),i=>c.jsx(nC,{title:i.systemType.name,id:i.systemType.id}),"systemType",t),Ln(e("Entity.Label.CreatedAt"),"createdAt",n),$e(e("Entity.Label.CreatedBy"),"createdBy"),Ln(e("Entity.Label.LastModifiedAt"),"lastModifiedAt",n),$e(e("Entity.Label.LastModifiedBy"),"lastModifiedBy")]}function z8(){const e=R();return x.useMemo(()=>U8(e),[e])}const Yv="RecipeTypeAddModal",Wv="RecipeTypeEditModal",Hv="RecipeTypeFilterModal",Zv="RecipeTypeValidationMetadataModal",Uv="RecipeTypeValidationArtifactSizeModal",zv="RecipeTypeValidationArtifactSizeExcludedSwTypesModal",qv="RecipeTypeValidationAssignedDsExcludedModuleTypesModal",Xv="RecipeTypeValidationTagAssignmentModal";function q8(){return tt(Yv)}function X8(){return tt(Wv)}function K8(){return tt(Hv)}function Q8(){return tt(Zv)}function J8(){return tt(Uv)}function ez(){return tt(zv)}function tz(){return tt(qv)}function nz(){return tt(Xv)}function rz(e){return{search:e.get("search"),systemTypeId:e.getAll("systemTypeId")}}function Zp(){const{currentFilter:e,setFilter:t,mergeFilter:n}=rl(rz);return{recipeTypesFilter:e,setRecipeTypesFilter:t,mergeRecipeTypesFilter:n}}function iz(){var i;const e=R(),{recipeTypesFilter:t,mergeRecipeTypesFilter:n}=Zp(),r=(((i=t.systemTypeId)==null?void 0:i.length)??0)>0;return c.jsx(c.Fragment,{children:r?c.jsx(Tn,{category:e("Entity.Label.SystemTypes"),onClose:()=>n({systemTypeId:null}),value:""},"types"):null})}const sz="recipe-types";function oz({data:e,totalCount:t,loadingData:n,fetchMoreData:r,onRefresh:i,onSortQueryChange:s,onSelect:o,selectedId:a}){const l=R(),u=q8(),d=K8(),f=z8(),[p,h]=x.useState(f),{recipeTypesFilter:m,mergeRecipeTypesFilter:y}=Zp();pa(p,s);const{sortColumn:b,isSortingMultipleColumns:g,setIsSortingMultipleColumns:v,resetSorting:S}=ha(h,"recipe-types"),w=x.useMemo(()=>({allColumns:f,onColumnSelectionChange:h,typeName:sz,multiSortProps:{isMultiSort:g,onToggleMultiSort(C){v(C),C||S()}}}),[f,g,S,v]),_=x.useMemo(()=>{if(a!==void 0)return e.find(C=>C.id===a)},[e,a]),T=x.useCallback(C=>{y({search:C})},[y]),M=x.useMemo(()=>ma(b),[b]);return c.jsxs(cn,{children:[c.jsx(bn,{count:t,columnSelectorProps:w,content:c.jsxs(c.Fragment,{children:[c.jsx(Su,{searchId:"recipetypes-list-search",searchingFields:["Entity.Label.Id","Entity.Label.Key","Entity.Label.Name","Entity.Label.Description"],onSearchChange:T,searchTextInitial:m.search??""}),c.jsx(D.Button,{title:l("Button.Filter"),label:l("Button.Filter"),icon:"filter",mode:"integrated",onClick:()=>d()}),c.jsx(iz,{})]}),actions:c.jsx(yr,{onRefresh:i,refreshDisabled:n}),mainAction:c.jsx(ni,{onClick:()=>u({existingTypes:e}),dataTestId:"recipetype-add"})}),c.jsx(D.DataList,{items:e,columns:p,enableScrolling:!0,emptyStateMessage:l("RecipeTypes.List.Empty"),onScrollToBottom:r,hideCheckBoxes:!0,selected:_,onSelect:C=>o(C.id),onRenderColumnHeader:M,children:n&&c.jsx(et,{"data-testid":"recipe-types-list-loading"})})]})}function Ou(){const{id:e}=Te.useParams(),t=Jn(),{recipeTypesFilter:n}=Zp(),[r,i]=x.useState(),{data:s,isLoading:o,error:a,fetchNextPage:l,reset:u}=dv(n,r),{totalCount:d,entities:f}=Tt(s);return a?c.jsx(pe,{error:a}):c.jsx(oz,{data:f,totalCount:d,loadingData:o,fetchMoreData:l,onRefresh:u,onSortQueryChange:i,selectedId:e,onSelect:p=>t.toRecipeTypeDetails(p)})}Ou.displayName="RecipeTypesListBlade";function az(){const e=R();return c.jsxs(c.Fragment,{children:[e("RecipeTypes.List.BladeHeader"),c.jsx(Cn,{popoverHeading:e("RecipeTypes.List.BladeHeader"),children:c.jsx("div",{children:c.jsx(Ft,{markdownFilePath:Z8})})})]})}Ou.Header=az;const lz="data:text/markdown;base64,QSByZWNpcGUgdHlwZSBhbGxvd3MgdG8gZ3JvdXAgcmVjaXBlcyBmb3IgY2VydGFpbiBzeXN0ZW1zIGFuZCBjb25maWd1cmluZyBzcGVjaWZpYyB2YWxpZGF0aW9ucywgY29tcGF0aWJpbGl0eSwgYW5kIHRlbXBsYXRlcyBmb3IgdGhlbS4gCgpCZXNpZGVzIGJhc2ljIHByb3BlcnRpZXMgKG5hbWUsIGtleSwgYW5kIGRlc2NyaXB0aW9uIG9mIHRoZSByZWNpcGUgdHlwZSksIHRoaXMgdmlldyBkaXNwbGF5cyBpbmZvcm1hdGlvbiBhYm91dDoKCiogVmFsaWRhdG9ycyBhbmQgdGhlaXIgY29uZmlndXJhdGlvbgoKVGhlIDxJY29uIGljb25OYW1lPSJ3cmVuY2giIC8+IGljb24gYWxsb3dzIHRvIGVkaXQgb3IgZGVsZXRlIHRoZSByZWNpcGUgdHlwZS4=",cz="data:text/markdown;base64,VGhpcyBtZXRhZGF0YSBpcyBhZGRlZCBieSBkZWZhdWx0IHRvIGFueSBuZXcgcmVjaXBlIG9mIHRoaXMgdHlwZS4=";function uz({recipeType:e}){const t=R(),n=Jn(),r=X8(),{doDelete:i,deleteIsLoading:s}=vr(Vt.deleteEntity(),[Vt.list()],t("RecipeTypes.Popup.Delete.Headline"),t("RecipeTypes.Info.Delete.Success"),()=>n.toRecipeTypesHome(),t("RecipeTypes.Popup.Delete.Info")),o=Xt(e,"edit"),a=Xt(e,"delete");return c.jsxs(ti,{title:t("RecipeTypes.Details.ActionsMenu.Title"),testId:"recipetype-actions",children:[c.jsx(D.MenuItem,{label:t("Button.Edit"),icon:"edit",title:t("Button.Edit"),onClick:()=>r({toEdit:e,existingTypes:[]}),disabled:!o}),c.jsx(D.MenuItem,{label:t("Button.Delete"),icon:"delete",title:t("Button.Delete"),onClick:()=>i(e.name,a??""),disabled:!a||s})]})}function dz({recipeType:e}){const t=R(),{id:n,key:r,name:i,description:s}=e;return c.jsxs(c.Fragment,{children:[c.jsx(uz,{recipeType:e}),c.jsxs(Mn,{label:"",className:"basic-details-layout",style:{marginBottom:0},children:[c.jsx(ne,{header:t("Entity.Label.Id"),showCopy:!0,value:n,children:n}),c.jsx(ne,{header:t("Entity.Label.Key"),children:r}),c.jsx(ne,{header:t("Entity.Label.Name"),children:i}),s&&c.jsx(ne,{header:t("Entity.Label.Description"),children:s}),c.jsx(ne,{header:t("Entity.Label.SystemType"),children:c.jsx(nC,{title:e.systemType.name,id:e.systemType.id})}),c.jsx(ne,{header:t("Entity.Label.Recipes"),children:c.jsx(zD,{title:t("Button.ViewRecipes"),filter:{typeId:[e.id]}})})]})]})}function fz(e){const t=e!==void 0,{url:n,listQueryKey:r}=t?Kv(e):kl;return Ht(r,n,"metadata",{enabled:t})}function pz(e){const{url:t,mutationKey:n,listQueryKey:r,invalidateOnMutation:i}=Kv(e);return R9(t,r,n,i)}function Kv(e){return{url:`recipe-types/${e}/metadata`,listQueryKey:Vt.metadataList({typeId:e}),mutationKey:Vt.metadataModify({typeId:e}),invalidateOnMutation:Vt.entityDetails(e),useApiV2:!0}}function hz(e){const t={isDefault:!0},n=r=>`Last modified at ${R_(r.lastModifiedAt)}`;return[ei(e("RecipeTypes.Details.ValidatorList.Icon"),r=>gz(e,r),!1,!1,void 0,"icon"),I9(e("Entity.Label.Name"),"name",r=>pu[r.name].docsPath,t,void 0,"",n,r=>e(pu[r.name].name))]}function mz(){const e=R();return x.useMemo(()=>hz(e),[e])}function gz(e,t){if(!t)return;const n=pu[t.name];return c.jsx(Qr,{iconProps:{iconName:n.icon,label:e(n.name)}})}function Dl(e,t){const n=R(),r=Ke(),i=Wt();return ln({onError:(s,o)=>{r.invalidateQueries(wl.validatorDetails(e,t)),r.invalidateQueries(Vt.entityDetails(e)),o.onError&&o.onError(s)},onSuccess:(s,o)=>{r.invalidateQueries(wl.validatorDetails(e,t)),r.invalidateQueries(Vt.entityDetails(e)),o.onSuccess&&o.onSuccess(s)},mutationKey:wl.validatorDetails(e,t),mutationFn:async s=>(await i.post(`/recipe-types/${e}/validations/metadata/${Op[t].apiPathVariable}`,s.ruleEntries).catch(a=>{throw It(n,a)})).data})}function Up(e){const t=R(),n=Ke(),r=Wt();return ln({onError:(i,s)=>{n.invalidateQueries(hu.entityDetails(e)),n.invalidateQueries(Vt.entityDetails(e)),s.onError&&s.onError(i)},onSuccess:(i,s)=>{n.invalidateQueries(hu.entityDetails(e)),n.invalidateQueries(Vt.entityDetails(e)),s.onSuccess&&s.onSuccess(i)},mutationKey:hu.entityDetails(e),mutationFn:async i=>(await r.post(`/recipe-types/${e}/validations/total-artifact-size`,i.toUpdate).catch(o=>{throw It(t,o)})).data})}function Qv(e){const t=R(),n=Ke(),r=Wt();return ln({onError:(i,s)=>{n.invalidateQueries(Gs.entityDetails(e)),n.invalidateQueries(Vt.entityDetails(e)),s.onError&&s.onError(i)},onSuccess:(i,s)=>{n.invalidateQueries(Gs.entityDetails(e)),n.invalidateQueries(Vt.entityDetails(e)),s.onSuccess&&s.onSuccess(i)},mutationKey:Gs.entityDetails(e),mutationFn:async i=>(await r.post(`/recipe-types/${e}/validations/distribution-set-assignment`,i.toUpdate).catch(o=>{throw It(t,o)})).data})}function Jv(e){const t=R(),n=Ke(),r=Wt();return ln({onError:(i,s)=>{n.invalidateQueries(mu.entityDetails(e)),n.invalidateQueries(Vt.entityDetails(e)),s.onError&&s.onError(i)},onSuccess:(i,s)=>{n.invalidateQueries(mu.entityDetails(e)),n.invalidateQueries(Vt.entityDetails(e)),s.onSuccess&&s.onSuccess(i)},mutationKey:mu.entityDetails(e),mutationFn:async i=>(await r.post(`/recipe-types/${e}/validations/tag-assignment`,i.ruleEntries).catch(o=>{throw It(t,o)})).data})}function yz({recipeTypeId:e,activeValidators:t}){const n=R();return c.jsx(D.CommandBar,{style:{marginBottom:"1rem",minHeight:"4rem",height:"auto"},content:c.jsx("div",{children:n("Entity.List.TotalCount",{count:t.length})}),mainAction:c.jsx(Sz,{recipeTypeId:e,activeValidators:t})})}const vz={position:"absolute",right:30},bz={position:"bottom-left",triggerOffset:8};function Sz({recipeTypeId:e,activeValidators:t}){const n=R(),r=ht(),i=Jn(),s=Dl(e,"recipe_metadata"),o=Dl(e,"module_update_definition_with_ds_metadata"),a=Dl(e,"module_update_definition_without_ds_metadata"),l=Dl(e,"system_distribution_set_metadata"),u=Up(e),d=Qv(e),f=Jv(e),p=Object.values(pu).filter(y=>!t.includes(y.id)),h=y=>{console.error("Could not configure validator ",y),r(n("RecipeTypes.Validation.Add.Error"))},m=y=>{const b=y.id;switch(b){case"recipe_metadata":s.mutate({ruleEntries:[],onSuccess:()=>{i.toValidatorDetails(e,"validators",y.id)},onError:h});break;case"module_update_definition_with_ds_metadata":o.mutate({ruleEntries:[],onSuccess:()=>{i.toValidatorDetails(e,"validators",y.id)},onError:h});break;case"module_update_definition_without_ds_metadata":a.mutate({ruleEntries:[],onSuccess:()=>{i.toValidatorDetails(e,"validators",y.id)},onError:h});break;case"system_distribution_set_metadata":l.mutate({ruleEntries:[],onSuccess:()=>{i.toValidatorDetails(e,"validators",y.id)},onError:h});break;case"total_artifact_size":u.mutate({toUpdate:{},onSuccess:()=>{i.toValidatorDetails(e,"validators",y.id)},onError:h});break;case"distribution_set_assignment":d.mutate({toUpdate:{},onSuccess:()=>{i.toValidatorDetails(e,"validators",y.id)},onError:h});break;case"tag_assignment":f.mutate({ruleEntries:[],onSuccess:()=>{i.toValidatorDetails(e,"validators",y.id)},onError:h});break;default:r("Validator will be available soon"),console.warn(`No configuration handler for validator type: ${b}`)}};return c.jsx(D.ContextMenu,{trigger:c.jsx(D.Button,{icon:"add",mode:"integrated",disabled:p.length===0}),title:"Add Validator",placeholder:void 0,onPointerEnterCapture:void 0,onPointerLeaveCapture:void 0,style:vz,popover:bz,children:p.map(y=>c.jsx(D.MenuItem,{label:n(y.name),icon:y.icon,onClick:()=>{console.log("Configure "+y),m(y)}},y.id))})}function xz({recipeType:e}){var s;const t=R(),n=Jn(),r=mz(),i=[...e.activeValidators||[]].sort((o,a)=>o.name.localeCompare(a.name)).filter(o=>pu[o.name]!==void 0);return c.jsxs(cn,{"data-testid":"validator-list",children:[c.jsx(yz,{recipeTypeId:e.id,activeValidators:((s=e.activeValidators)==null?void 0:s.map(o=>o.name))||[]}),c.jsx(D.DataList,{items:i,columns:r,enableScrolling:!0,emptyStateMessage:t("RecipeTypes.Details.ValidatorList.Empty"),hideCheckBoxes:!0,onSelect:o=>{n.toValidatorDetails(e.id,"validators",o.name)}})]})}const wz="data:text/markdown;base64,VmFsaWRhdG9ycyBhcmUgdXNlZCB0byBjaGVjayBhIHJlY2lwZSBiZWZvcmUgcHJvbW90aW5nIGl0IHRvIHRoZSBSZWxlYXNlIGNhbmRpZGF0ZSBzdGF0ZSBvciB3aGVuIGludm9rZWQgbWFudWFsbHkuIFRoZWlyIGdvYWwgaXMgdG8gZW5zdXJlIHRoYXQgYWxsIHJlcXVpcmVkIGlucHV0cyBhcmUgd2l0aGluIHNwZWNpZmljYXRpb24uCgpUaGUgZm9sbG93aW5nIHZhbGlkYXRvcnMgY2FuIGJlIGNvbmZpZ3VyZWQ6CgoqIF9Ub3RhbCBhcnRpZmFjdCBzaXplXzogRW5zdXJlIHRoYXQgdGhlIHVwZGF0ZSBzaXplIGRvZXMgbm90IGV4Y2VlZCB0aGUgZ2F0ZXdheSdzIHN0b3JhZ2UgY2FwYWNpdHkuCiogX01vZHVsZSB1cGRhdGUgZGVmaW5pdGlvbnNfOiBFbnN1cmUgdGhhdCB0aGUgcmVxdWlyZWQgbW9kdWxlIHVwZGF0ZXMgYXJlIHByZXNlbnQuCg==";function Bu(){const{id:e}=Te.useParams(),t=Np(e),n=fz(e),r=pz(e??"");if(e===void 0)return c.jsx(pe,{error:{message:"Missing entity ID"}});const i=Kv(e);return t.error?c.jsx(pe,{error:t.error}):t.isLoading?c.jsx(et,{}):c.jsxs(c.Fragment,{children:[c.jsx(dz,{recipeType:t.data}),c.jsx(tn,{header:"Validators",helpFile:wz,expandedByDefault:!0,children:c.jsx(xz,{recipeType:t.data})}),c.jsx(Cu,{helpFile:cz,useApiResult:n,useDeleteResult:r,useMetadataAddItemProps:i,expandedByDefault:!0}),c.jsx(Vs,{auditable:t.data})]})}Bu.displayName="RecipeTypeDetailsBlade";function _z(){const e=R();return c.jsxs(c.Fragment,{children:[e("RecipeTypes.Details.BladeHeader"),c.jsx(Cn,{popoverHeading:e("RecipeTypes.Details.BladeHeader"),children:c.jsx("div",{children:c.jsx(Ft,{markdownFilePath:lz})})})]})}Bu.Header=_z;function kz(e){const t=e!==void 0,n=t?hu.entityDetails(e):[];return or(n,`recipe-types/${e}/validations/total-artifact-size`,{enabled:t})}function Dz({id:e,typeKey:t,name:n}){const r=R();if(!t)return c.jsx(c.Fragment,{});if(!e)return c.jsx("div",{children:c.jsx("span",{style:{color:"var(--color-gray-50)"},title:r("SoftwareModuleTypeLink.Unknown.Tooltip"),children:c.jsx("em",{children:t})})});const i=n?`${n}`:`${t}`,s=!e,o=s?r("SoftwareModuleTypeLink.Unknown.Tooltip"):r("SoftwareModuleTypeLink.Tooltip",{name:i});return c.jsx("div",{children:s?c.jsx("span",{style:{color:"var(--color-gray-50)"},title:o,children:c.jsx("em",{children:i})}):c.jsx("span",{children:c.jsx(ar,{title:i,href:j4(e.toString()),tooltip:o})})})}function Cz(e,t){const n={isDefault:!0};return[dn(e("Entity.Label.Name"),r=>c.jsx(Dz,{id:r.id,typeKey:r.key,name:r.name}),"swModuleType",n),$e(e("RecipeTypes.Validation.ArtifactSize.ExcludedSwTypeList.Description"),"description",n),{data:{columnId:"actions"},header:e("Entity.Label.Actions"),onRenderHeader:()=>null,renderCell:r=>c.jsx("div",{className:"action-buttons",children:c.jsx(D.Button,{title:e("Button.Delete"),mode:"integrated",icon:"delete",onClick:()=>{t&&t(r)},disabled:t==null})}),style:{width:"6rem"},cellStyle:{padding:0}}]}function Mz(e){const t=R();return x.useMemo(()=>Cz(t,e),[t,e])}function Tz({recipeTypeId:e}){const t=R(),n=Jn(),{data:r,error:i,isLoading:s}=kz(e),{mutate:o}=Up(e),a=Ji(t("RecipeTypes.Validation.ArtifactSize.ExcludedSwTypeList.Popup.Include.Headline"),{confirmButton:t("RecipeTypes.Validation.ArtifactSize.ExcludedSwTypeList.Popup.Include.Confirm"),getMessage:v=>t("RecipeTypes.Validation.ArtifactSize.ExcludedSwTypeList.Popup.Include.Message",{name:v})}),{doDelete:l,deleteIsLoading:u}=vr(hu.deleteEntity(),[Vt.entityDetails(e)],t("RecipeTypes.Validation.ArtifactSize.Popup.Delete.Headline"),t("RecipeTypes.Validation.ArtifactSize.Popup.Delete.Success"),()=>n.toRecipeTypeDetails(e)),d=x.useRef(r);x.useEffect(()=>{d.current=r},[r]);const f=x.useCallback(v=>{const S=d.current;a(v.name??v.key,()=>{const w=(S==null?void 0:S.excludedSoftwareModuleTypes.filter(_=>_.id!==v.id).map(_=>_.id.toString()))??[];o({toUpdate:{thresholds:S==null?void 0:S.thresholds,excludedSoftwareModuleTypeIds:w}})})},[a,o]),p=Mz(f),{text:h}=pc(Uk),m=J8(),y=ez();if(s)return c.jsx(et,{});if(i)return c.jsx(pe,{error:i});if(!r)return c.jsx(pe,{error:{message:t("RecipeTypes.Validation.NotConfigured")}});const b=(r==null?void 0:r.excludedSoftwareModuleTypes)||[],g=Xt(r,"delete");return c.jsxs(c.Fragment,{children:[c.jsxs(ti,{title:t("RecipeTypes.Validation.Details.Actions"),testId:"total-artifact-size-validation-actions",children:[c.jsx(D.MenuItem,{label:t("Button.Edit"),icon:"edit",title:t("Button.Edit"),onClick:()=>m({recipeTypeId:e,toEdit:r}),disabled:s}),c.jsx(D.MenuItem,{label:t("Button.Delete"),icon:"delete",title:t("Button.Delete"),onClick:()=>l(t("RecipeTypes.Validation.ArtifactSize.Popup.Delete.Title"),g??""),disabled:!g||u})]}),c.jsxs(Mn,{label:"",className:"basic-details-layout",style:{marginBottom:0},children:[c.jsx(ne,{header:t("Entity.Label.Name"),children:t("RecipeTypes.Validation.ArtifactSize.Caption")}),c.jsx(ne,{header:t("Entity.Label.Description"),children:h}),c.jsx(ne,{header:t("RecipeTypes.Validation.ArtifactSize.WarningThreshold"),value:r!=null&&r.thresholds.warning.byteLimit?rC(r.thresholds.warning.byteLimit):"Not configured",tooltip:r!=null&&r.thresholds.warning.byteLimit?iC(r.thresholds.warning.byteLimit)+" Bytes":"Not configured",showTitle:!0}),c.jsx(ne,{header:t("RecipeTypes.Validation.ArtifactSize.ErrorThreshold"),value:r!=null&&r.thresholds.error.byteLimit?rC(r.thresholds.error.byteLimit):"Not configured",tooltip:r!=null&&r.thresholds.error.byteLimit?iC(r.thresholds.error.byteLimit)+" Bytes":"Not configured",showTitle:!0})]}),c.jsx(tn,{header:t("RecipeTypes.Validation.ArtifactSize.ExcludedSwTypeList.Caption"),expandedByDefault:!0,children:c.jsxs(cn,{"data-testid":"excluded-swtypes-list",children:[c.jsx(bn,{count:b.length,mainAction:c.jsx(ni,{onClick:()=>y({recipeTypeId:e,toEdit:r})})}),c.jsx(D.DataList,{items:b,columns:p,emptyStateMessage:t("RecipeTypes.Validation.ArtifactSize.ExcludedSwTypeList.Empty"),hideCheckBoxes:!0,children:s&&c.jsx(et,{})})]})}),c.jsx(Vs,{auditable:r})]})}function rC(e){if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB","TB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]}function iC(e){return e.toLocaleString("de-DE")}function Au(){const{id:e}=Te.useParams();return c.jsx(c.Fragment,{children:c.jsx(Tz,{recipeTypeId:e??""})})}Au.displayName="ArtifactSizeValidationDetailsBlade";function Iz(){const e=R();return c.jsx(c.Fragment,{children:e("RecipeTypes.Validation.Details.BladeHeader")})}Au.Header=Iz;function Ez(e){const t=e!==void 0,n=t?Gs.entityDetails(e):[];return or(n,`recipe-types/${e}/validations/distribution-set-assignment`,{enabled:t})}function Rz(e){const t=e!==void 0,n=t?Gs.listModuleTypes(e):[];return Ht(n,`recipe-types/${e}/validations/distribution-set-assignment/excluded-module-types`,"moduleType",{enabled:t})}function Lz(e,t){const n={isDefault:!0};return[dn(e("Entity.Label.Name"),r=>c.jsx(wu,{id:r.id,title:r.name},r.key),"moduleType",n),$e(e("Entity.Label.Description"),"description",n,void 0,""),{data:{columnId:"actions"},header:e("Entity.Label.Actions"),onRenderHeader:()=>null,renderCell:r=>c.jsx("div",{className:"action-buttons",children:c.jsx(D.Button,{title:e("Button.Delete"),mode:"integrated",icon:"delete",onClick:()=>{t&&t(r)},disabled:t==null})}),style:{width:"6rem"},cellStyle:{padding:0}}]}function Oz(e){const t=R();return x.useMemo(()=>Lz(t,e),[t,e])}function Bz({recipeTypeId:e}){const t=R(),n=Jn(),{data:r,error:i,isLoading:s}=Ez(e),o=tz(),a=Rz(e),{mutate:l}=Qv(e),u=Ji(t("RecipeTypes.Validation.DistributionSet.ExcludedModuleTypeList.Popup.Include.Headline"),{confirmButton:t("RecipeTypes.Validation.DistributionSet.ExcludedModuleTypeList.Popup.Include.Confirm"),getMessage:S=>t("RecipeTypes.Validation.DistributionSet.ExcludedModuleTypeList.Popup.Include.Message",{name:S})}),{doDelete:d,deleteIsLoading:f}=vr(Gs.deleteEntity(),[Vt.entityDetails(e)],t("RecipeTypes.Validation.DistributionSet.Popup.Delete.Headline"),t("RecipeTypes.Validation.DistributionSet.Popup.Delete.Success"),()=>n.toRecipeTypeDetails(e)),{totalCount:p,entities:h}=Tt(a.data),m=x.useRef(h);x.useEffect(()=>{m.current=h},[h]);const y=x.useCallback(S=>{const w=m.current;u(S.name??S.key,()=>{const _=w.filter(T=>T.id!==S.id).map(T=>T.id)??[];l({toUpdate:{excludedModuleTypeIds:_}})})},[u,l]),{text:b}=pc(zk),g=Oz(y);if(s)return c.jsx(et,{});if(i)return c.jsx(pe,{error:i});if(!r)return c.jsx(pe,{error:{message:t("RecipeTypes.Validation.NotConfigured")}});const v=Xt(r,"delete");return c.jsxs(c.Fragment,{children:[c.jsx(ti,{title:t("RecipeTypes.Validation.Details.Actions"),testId:"distribution-set-assignment-validation-actions",children:c.jsx(D.MenuItem,{label:t("Button.Delete"),icon:"delete",title:t("Button.Delete"),onClick:()=>d(t("RecipeTypes.Validation.DistributionSet.Popup.Delete.Title"),v??""),disabled:!v||f})}),c.jsxs(Mn,{label:"",className:"basic-details-layout",style:{marginBottom:0},children:[c.jsx(ne,{header:t("Entity.Label.Name"),children:t("RecipeTypes.Validation.DistributionSet.Caption")}),c.jsx(ne,{header:t("Entity.Label.Description"),children:b})]}),c.jsx(tn,{header:t("RecipeTypes.Validation.DistributionSet.ExcludedModuleTypeList.Caption"),expandedByDefault:!0,children:c.jsxs(cn,{"data-testid":"excluded-moduletype-list",children:[c.jsx(bn,{count:p,mainAction:c.jsx(ni,{onClick:()=>o({recipeTypeId:e,currentlyExcluded:h})})}),c.jsx(D.DataList,{items:h,columns:g,emptyStateMessage:t("RecipeTypes.Validation.DistributionSet.ExcludedModuleTypeList.Empty"),hideCheckBoxes:!0,children:s&&c.jsx(et,{})})]})}),c.jsx(Vs,{auditable:r})]})}function Pu(){const{id:e}=Te.useParams();return c.jsx(c.Fragment,{children:c.jsx(Bz,{recipeTypeId:e??""})})}Pu.displayName="DistributionSetValidationDetailsBlade";function Az(){const e=R();return c.jsx(c.Fragment,{children:e("RecipeTypes.Validation.Details.BladeHeader")})}Pu.Header=Az;function Pz(e,t){const n=wl.validatorDetails(e,t);return or(n,`recipe-types/${e}/validations/metadata/${Op[t].apiPathVariable}`)}function Nz({item:e,remove:t,edit:n}){const r=R();return c.jsxs("div",{className:"action-buttons",children:[c.jsx(D.Button,{title:r("Button.Edit"),mode:"integrated",icon:"edit",onClick:()=>n==null?void 0:n(e),disabled:!n}),c.jsx(D.Button,{title:r("Button.Delete"),mode:"integrated",icon:"delete",onClick:()=>t==null?void 0:t(e.key),disabled:!t})]})}function jz(e,t,n){const r={isDefault:!0};return[$e(e("RecipeTypes.Validation.Metadata.RuleEntryList.Key"),"key",r,void 0,""),$e(e("RecipeTypes.Validation.Metadata.RuleEntryList.ValueValidationRegex"),"valueValidationRegex",r,void 0,""),{data:{columnId:"actions"},header:e("Entity.Label.Actions"),onRenderHeader:()=>null,renderCell:i=>c.jsx(Nz,{item:i,remove:t,edit:n}),style:{width:"6rem"},cellStyle:{padding:0}}]}function Fz(e,t){const n=R();return x.useMemo(()=>jz(n,e,t),[n,e,t])}function Gz({recipeTypeId:e,validator:t}){var M,C;const n=R(),r=Jn(),{data:i,error:s,isLoading:o}=Pz(e,t),a=Q8(),l=Ji(n("RecipeTypes.Validation.Metadata.RuleEntryList.Popup.Delete.Headline")),{mutate:u}=Dl(e,t),{doDelete:d,deleteIsLoading:f}=vr(wl.deleteEntity({recipeTypeId:e}),[Vt.entityDetails(e)],n("RecipeTypes.Validation.Metadata.Popup.Delete.Headline"),n("RecipeTypes.Validation.Metadata.Popup.Delete.Success"),()=>r.toRecipeTypeDetails(e),(((M=i==null?void 0:i.rules)==null?void 0:M.length)??0)>0?n("RecipeTypes.Validation.Metadata.Popup.Delete.Rules.Hint",{count:(C=i==null?void 0:i.rules)==null?void 0:C.length}):void 0),p=k=>{const I=[...(i==null?void 0:i.rules)||[]],O=I.findIndex(A=>A.key===k);O!==-1&&I.splice(O,1),l(k,()=>{u({ruleEntries:I})})},h=k=>{a({recipeTypeId:e,validator:t,currentRules:(i==null?void 0:i.rules)||[],toEdit:k})},m=k=>{a({recipeTypeId:e,validator:t,currentRules:(i==null?void 0:i.rules)||[],mandatory:k})},y=Fz(p,h),b=Op[t],{text:g}=pc(b.docsPath);if(o)return c.jsx(et,{});if(s)return c.jsx(pe,{error:s});if(!i)return c.jsx(pe,{error:{message:n("RecipeTypes.Validation.NotConfigured")}});const v=k=>k.toSorted((I,O)=>{const A=/^\d/.test(I.key),L=/^\d/.test(O.key);return A&&!L?-1:!A&&L?1:I.key.localeCompare(O.key)}),S=v(i.rules.filter(k=>k.mandatory)),w=v(i.rules.filter(k=>!k.mandatory)),_=Xt(i,"edit"),T=Xt(i,"delete");return c.jsxs(c.Fragment,{children:[c.jsx(ti,{title:n("RecipeTypes.Validation.Details.Actions"),testId:"metadata-validation-actions",children:c.jsx(D.MenuItem,{label:n("Button.Delete"),icon:"delete",title:n("Button.Delete"),onClick:()=>d(n(b.name),T??""),disabled:!T||f})}),c.jsxs(Mn,{label:"",className:"basic-details-layout",style:{marginBottom:0},children:[c.jsx(ne,{header:n("Entity.Label.Name"),children:n(b.name)}),c.jsx(ne,{header:n("Entity.Label.Description"),children:g})]}),c.jsx(tn,{header:"Mandatory metadata",expandedByDefault:!0,children:c.jsxs(cn,{"data-testid":"mandatory-metadata-list",children:[c.jsx(bn,{count:S.length,mainAction:_?c.jsx(ni,{onClick:()=>m(!0)}):null}),c.jsx(D.DataList,{items:S,columns:y,emptyStateMessage:n("RecipeTypes.Validation.Metadata.RuleEntryList.Empty"),hideCheckBoxes:!0,children:o&&c.jsx(et,{})})]})}),c.jsx(tn,{header:"Optional metadata",expandedByDefault:!0,children:c.jsxs(cn,{"data-testid":"optional-metadata-list",children:[c.jsx(bn,{count:w.length,mainAction:c.jsx(ni,{onClick:()=>m(!1)})}),c.jsx(D.DataList,{items:w,columns:y,emptyStateMessage:n("RecipeTypes.Validation.Metadata.RuleEntryList.Empty"),hideCheckBoxes:!0,children:o&&c.jsx(et,{})})]})}),c.jsx(Vs,{auditable:i})]})}function Nu(){const{id:e,subEntityId:t}=Te.useParams();if(!Xk.includes(t))throw new Error(`Invalid subEntityId: ${t}`);const n=t;return c.jsx(c.Fragment,{children:c.jsx(Gz,{recipeTypeId:e??"",validator:n})})}Nu.displayName="MetadataValidatorDetailsBlade";function Vz(){const e=R();return c.jsx(c.Fragment,{children:e("RecipeTypes.Validation.Details.BladeHeader")})}Nu.Header=Vz;function $z(e){const t=e!==void 0,n=t?mu.entityDetails(e):[];return or(n,`recipe-types/${e}/validations/tag-assignment`,{enabled:t})}function Yz({item:e,remove:t,edit:n}){const r=R();return c.jsxs("div",{className:"action-buttons",children:[c.jsx(D.Button,{title:r("Button.Edit"),mode:"integrated",icon:"edit",onClick:()=>n==null?void 0:n(e),disabled:!n}),c.jsx(D.Button,{title:r("Button.Delete"),mode:"integrated",icon:"delete",onClick:()=>t==null?void 0:t(e),disabled:!t})]})}function Wz(e,t){const n=(t==null?void 0:t.exposed)??!1;return c.jsx(D.Icon,{role:"img",title:e(n?"RecipeTags.Tooltip.Exposed":"RecipeTags.Tooltip.NotExposed"),iconName:n?"watch-on":"watch-off-disabled-light"})}function Hz(e,t,n){const r={isDefault:!0};return[ei(e("RecipeTags.Label.Exposed"),i=>Wz(e,i),!0,void 0,"exposed"),$e(e("RecipeTypes.Validation.TagAssignment.RuleEntryList.NameValidationRegex"),"nameValidationRegex",r,void 0,""),{data:{columnId:"actions"},header:e("Entity.Label.Actions"),onRenderHeader:()=>null,renderCell:i=>c.jsx(Yz,{item:i,remove:t,edit:n}),style:{width:"6rem"},cellStyle:{padding:0}}]}function Zz(e,t){const n=R();return x.useMemo(()=>Hz(n,e,t),[n,e,t])}function Uz({recipeTypeId:e}){var S,w;const t=R(),n=Jn(),{data:r,error:i,isLoading:s}=$z(e),o=nz(),{mutate:a}=Jv(e),l=Ji(t("RecipeTypes.Validation.TagAssignment.RuleEntryList.Popup.Delete.Headline")),{doDelete:u,deleteIsLoading:d}=vr(mu.deleteEntity(),[Vt.entityDetails(e)],t("RecipeTypes.Validation.TagAssignment.Popup.Delete.Headline"),t("RecipeTypes.Validation.TagAssignment.Popup.Delete.Success"),()=>n.toRecipeTypeDetails(e),(((S=r==null?void 0:r.rules)==null?void 0:S.length)??0)>0?t("RecipeTypes.Validation.TagAssignment.Popup.Delete.Rules.Hint",{count:(w=r==null?void 0:r.rules)==null?void 0:w.length}):void 0),{text:f}=pc(qk),p=_=>{const T=[...(r==null?void 0:r.rules)||[]],M=T.findIndex(C=>C.exposed===_.exposed&&C.nameValidationRegex===_.nameValidationRegex);M!==-1&&T.splice(M,1),l(`${_.exposed?"exposed":"not exposed"} rule with regex '${_.nameValidationRegex}'`,()=>{a({ruleEntries:T})})},h=_=>{o({recipeTypeId:e,currentRules:(r==null?void 0:r.rules)||[],toEdit:_})},m=()=>{o({recipeTypeId:e,currentRules:(r==null?void 0:r.rules)||[]})},y=sC("edit",r),b=sC("delete",r),g=Zz(b?p:void 0,y?h:void 0);if(s)return c.jsx(et,{});if(i)return c.jsx(pe,{error:i});if(!r)return c.jsx(pe,{error:{message:t("RecipeTypes.Validation.NotConfigured")}});const v=r.rules.toSorted((_,T)=>_.nameValidationRegex.localeCompare(T.nameValidationRegex));return c.jsxs(c.Fragment,{children:[c.jsx(ti,{title:t("RecipeTypes.Validation.Details.Actions"),testId:"tag-assignment-validation-actions",children:c.jsx(D.MenuItem,{label:t("Button.Delete"),icon:"delete",title:t("Button.Delete"),onClick:()=>u(t("RecipeTypes.Validation.TagAssignment.Popup.Delete.Title"),b??""),disabled:!b||d})}),c.jsxs(Mn,{label:"",className:"basic-details-layout",style:{marginBottom:0},children:[c.jsx(ne,{header:t("Entity.Label.Name"),children:t("RecipeTypes.Validation.TagAssignment.Caption")}),c.jsx(ne,{header:t("Entity.Label.Description"),children:f})]}),c.jsx(tn,{header:t("RecipeTypes.Validation.TagAssignment.RuleEntryList.Caption"),expandedByDefault:!0,children:c.jsxs(cn,{"data-testid":"tag-assignment-rule-list",children:[c.jsx(bn,{count:r.rules.length,mainAction:y?c.jsx(ni,{onClick:()=>m()}):null}),c.jsx(D.DataList,{items:v,columns:g,emptyStateMessage:t("RecipeTypes.Validation.TagAssignment.RuleEntryList.Empty"),hideCheckBoxes:!0,children:s&&c.jsx(et,{})})]})}),c.jsx(Vs,{auditable:r})]})}function sC(e,t){if(t!=null)return Xt(t,e)}function ju(){const{id:e}=Te.useParams();return c.jsx(c.Fragment,{children:c.jsx(Uz,{recipeTypeId:e??""})})}ju.displayName="TagAssignmentValidationDetailsBlade";function zz(){const e=R();return c.jsx(c.Fragment,{children:e("RecipeTypes.Validation.Details.BladeHeader")})}ju.Header=zz;const oC={component:Ou,name:Ou.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:c.jsx(Ou.Header,{}),showCloseButton:!1}},aC={component:Bu,name:Bu.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:c.jsx(Bu.Header,{})}},lC={component:Au,name:Au.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:c.jsx(Au.Header,{})}},cC={component:Pu,name:Pu.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:c.jsx(Pu.Header,{})}},uC={component:ju,name:ju.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:c.jsx(ju.Header,{})}},dC={component:Nu,name:Nu.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:c.jsx(Nu.Header,{})}};function qz(){const{id:e,subEntity:t,subEntityId:n}=Te.useParams(),r=Jn(),i=x.useMemo(()=>({...oC,defaults:{...oC.defaults}}),[]),s=x.useMemo(()=>({...aC,defaults:{...aC.defaults,onClose:()=>r.toRecipeTypesHome()}}),[r]),o=x.useMemo(()=>({...lC,defaults:{...lC.defaults,onClose:()=>r.toRecipeTypeDetails(e??"")}}),[r,e]),a=x.useMemo(()=>({...cC,defaults:{...cC.defaults,onClose:()=>r.toRecipeTypeDetails(e??"")}}),[r,e]),l=x.useMemo(()=>({...uC,defaults:{...uC.defaults,onClose:()=>r.toRecipeTypeDetails(e??"")}}),[r,e]),u=x.useMemo(()=>({...dC,defaults:{...dC.defaults,onClose:()=>r.toRecipeTypeDetails(e??"")}}),[r,e]),d=x.useMemo(()=>{const f=[i];return e&&(f.push(s),t==="validators"&&(n==="total_artifact_size"?f.push(o):n==="distribution_set_assignment"?f.push(a):n==="tag_assignment"?f.push(l):(n==="recipe_metadata"||n=="module_update_definition_with_ds_metadata"||n=="module_update_definition_without_ds_metadata"||n=="system_distribution_set_metadata")&&f.push(u))),f},[e,t,n,i,s,o,a,l,u]);return c.jsx(D.Blades,{registrations:d,settings:{resizable:!0}})}const Xz=qz,Kz="data:text/markdown;base64,VGhlIGxpc3Qgb2YgbW9kdWxlIHVzZWQgYnkgbW9kdWxlcyBpbiBzeXN0ZW1zLgoKTW9kdWxlIHR5cGVzIGV4dGVuZCB0aGUgSW9UIFJvbGxvdXRzIHRhcmdldCB0eXBlcyBieSBhZGRpbmcgU3lzdGVtIFNvZnR3YXJlIFVwZGF0ZS1zcGVjaWZpYyBwcm9wZXJ0aWVzLCBzdWNoIGFzIGRlZmF1bHRzIGZvciBxdWVyaWVzIGFuZCBtZXRhZGF0YSwgdG8gYmUgdXNlZCB3aGVuIGNyZWF0aW5nIG1vZHVsZSB1cGRhdGUgZGVmaW5pdGlvbnMgZm9yIHRoaXMgbW9kdWxlIHR5cGUgaW4gYSByZWNpcGUuIE9ubHkgbW9kdWxlIHR5cGVzIG9mIHVwZGF0YWJsZSBtb2R1bGVzIGFyZSBiYXNlZCBvbiB0YXJnZXQgdHlwZXMuIE5vbi11cGRhdGFibGUgbW9kdWxlcyBhcmUgbWFuYWdlZCBzb2xlbHkgYXMgbW9kdWxlIHR5cGVzLgoKWW91IGNhbiBjb25maWd1cmUgdGhlIGRpc3BsYXllZCBjb2x1bW5zIHZpYSB0aGUgPEljb24gaWNvbk5hbWU9InNldHRpbmdzIiAvPiBtZW51Lg==";function Qz(e){const t={isDefault:!0},n={isSortable:!0},r={isDefault:!0,isSortable:!0};return[$e(e("Entity.Label.Id"),"id"),$e(e("Entity.Label.Key"),"key",r),$e(e("Entity.Label.Name"),"name",r),$e(e("Entity.Label.Description"),"description",t),dn(e("ModuleTypes.Label.TargetType"),i=>i.targetTypeRef===void 0?null:c.jsx(xv,{targetTypeRef:i.targetTypeRef}),"targetType",t),Ln(e("Entity.Label.CreatedAt"),"createdAt",n),$e(e("Entity.Label.CreatedBy"),"createdBy"),Ln(e("Entity.Label.LastModifiedAt"),"lastModifiedAt",n),$e(e("Entity.Label.LastModifiedBy"),"lastModifiedBy")]}function Jz(){const e=R();return x.useMemo(()=>Qz(e),[e])}const eb="ModuleTypeAddModal",tb="ModuleTypeEditModal";function e7(){return tt(eb)}function t7(){return tt(tb)}function n7(e){return{search:e.get("search")}}function fC(){const{currentFilter:e,setFilter:t,mergeFilter:n}=rl(n7);return{moduleTypesFilter:e,setModuleTypesFilter:t,mergeModuleTypesFilter:n}}const r7="module-types";function i7({data:e,totalCount:t,loadingData:n,fetchMoreData:r,onRefresh:i,onSortQueryChange:s,onSelect:o,selectedId:a}){const l=R(),u=e7(),d=Jz(),[f,p]=x.useState(d),{moduleTypesFilter:h,mergeModuleTypesFilter:m}=fC();pa(f,s);const{sortColumn:y,isSortingMultipleColumns:b,setIsSortingMultipleColumns:g,resetSorting:v}=ha(p,"module-types"),S=x.useMemo(()=>({allColumns:d,onColumnSelectionChange:p,typeName:r7,multiSortProps:{isMultiSort:b,onToggleMultiSort(M){g(M),M||v()}}}),[d,b,v,g]),w=x.useMemo(()=>{if(a!==void 0)return e.find(M=>M.id===a)},[e,a]),_=x.useCallback(M=>{m({search:M})},[m]),T=x.useMemo(()=>ma(y),[y]);return c.jsxs(cn,{children:[c.jsx(bn,{count:t,columnSelectorProps:S,content:c.jsx(Su,{searchId:"moduletypes-list-search",searchingFields:["Entity.Label.Id","Entity.Label.Key","Entity.Label.Name","Entity.Label.Description"],onSearchChange:_,searchTextInitial:h.search??""}),actions:c.jsx(yr,{onRefresh:i,refreshDisabled:n}),mainAction:c.jsx(ni,{onClick:()=>u(),dataTestId:"moduletype-add"})}),c.jsx(D.DataList,{items:e,columns:f,enableScrolling:!0,emptyStateMessage:l("ModuleTypes.List.Empty"),onScrollToBottom:r,hideCheckBoxes:!0,selected:w,onSelect:M=>o(M.id),onRenderColumnHeader:T,children:n&&c.jsx(et,{"data-testid":"module-types-list-loading"})})]})}const br={...Kn("module-types"),...tu(({moduleTypeId:e})=>br.entityDetails(e))};function nb(e,t){const n=new URLSearchParams;return Jl(n,e.search),eo(n,t),Ht(br.listFilteredWithSorting(e,t??null),"module-types","type",{queryParams:n})}function Fu(){const{id:e}=Te.useParams(),t=Di(),{moduleTypesFilter:n}=fC(),[r,i]=x.useState(),{data:s,isLoading:o,error:a,fetchNextPage:l,reset:u}=nb(n,r),{totalCount:d,entities:f}=Tt(s);return a?c.jsx(pe,{error:a}):c.jsx(i7,{data:f,totalCount:d,loadingData:o,fetchMoreData:l,onRefresh:u,onSortQueryChange:i,selectedId:e,onSelect:p=>t.toModuleTypeDetails(p)})}Fu.displayName="ModuleTypesListBlade";function s7(){const e=R();return c.jsxs(c.Fragment,{children:[e("ModuleTypes.List.BladeHeader"),c.jsx(Cn,{popoverHeading:e("ModuleTypes.List.BladeHeader"),children:c.jsx("div",{children:c.jsx(Ft,{markdownFilePath:Kz})})})]})}Fu.Header=s7;const o7="data:text/markdown;base64,TW9kdWxlIHR5cGVzIGV4dGVuZCB0aGUgSW9UIFJvbGxvdXRzIHRhcmdldCB0eXBlcyBieSBhZGRpbmcgU3lzdGVtIFNvZnR3YXJlIFVwZGF0ZS1zcGVjaWZpYyBwcm9wZXJ0aWVzLCBzdWNoIGFzIGRlZmF1bHRzIGZvciBxdWVyaWVzIGFuZCBtZXRhZGF0YSwgdG8gYmUgdXNlZCB3aGVuIGNyZWF0aW5nIG1vZHVsZSB1cGRhdGUgZGVmaW5pdGlvbnMgZm9yIHRoaXMgdHlwZSBpbiBhIHJlY2lwZS4gT25seSBtb2R1bGUgdHlwZXMgb2YgdXBkYXRhYmxlIG1vZHVsZXMgYXJlIGJhc2VkIG9uIHRhcmdldCB0eXBlcy4gTm9uLXVwZGF0YWJsZSBtb2R1bGVzIGFyZSBtYW5hZ2VkIHNvbGVseSBhcyBtb2R1bGUgdHlwZXMuCgpJbiBhZGRpdGlvbiB0byBiYXNpYyBwcm9wZXJ0aWVzIChuYW1lLCBrZXksIGFuZCBkZXNjcmlwdGlvbiBvZiB0aGUgbW9kdWxlIHR5cGUpLCB0aGlzIHZpZXcgZGlzcGxheXMgaW5mb3JtYXRpb24gYWJvdXQ6CgoqIERlZmF1bHQgcXVlcmllcwoqIERlZmF1bHQgbWV0YWRhdGEKClRoZXNlIGRlZmF1bHRzIGFyZSBjb25zaWRlcmVkIHdoZW4gY3JlYXRpbmcgbW9kdWxlIHVwZGF0ZSBkZWZpbml0aW9ucy4KClRoZSA8SWNvbiBpY29uTmFtZT0id3JlbmNoIiAvPiBpY29uIGFsbG93cyB0byBlZGl0IG9yIGRlbGV0ZSB0aGUgbW9kdWxlIHR5cGUu",a7="data:text/markdown;base64,VGhpcyBtZXRhZGF0YSBpcyBhZGRlZCBieSBkZWZhdWx0IHRvIGFueSBuZXcgbW9kdWxlIHVwZGF0ZSBkZWZpbml0aW9uIG9mIHRoaXMgdHlwZS4=";function l7({moduleType:e}){const t=R(),n=Di(),r=t7(),{doDelete:i,deleteIsLoading:s}=vr(br.deleteEntity(),[br.list()],t("ModuleTypes.Popup.Delete.Headline"),t("ModuleTypes.Info.Delete.Success"),()=>n.toModuleTypesHome(),t("ModuleTypes.Popup.Delete.Info")),o=Xt(e,"edit"),a=Xt(e,"delete");return c.jsxs(ti,{title:t("ModuleTypes.Details.ActionsMenu.Title"),testId:"moduletype-actions",children:[c.jsx(D.MenuItem,{label:t("Button.Edit"),icon:"edit",title:t("Button.Edit"),onClick:()=>r({toEdit:e}),disabled:!o}),c.jsx(D.MenuItem,{label:t("Button.Delete"),icon:"delete",title:t("Button.Delete"),onClick:()=>i(e.name??e.key,a??""),disabled:!a||s})]})}const c7="data:text/markdown;base64,VGhlIG1hdGNoIGFuZCBjb3VudCBxdWVyeSBwcm92aWRlZCBoZXJlIGlzIHVzZWQgYXMgYSBkZWZhdWx0IHdoZW5ldmVyIGEgbmV3IG1vZHVsZSB1cGRhdGUgZGVmaW5pdGlvbiBmb3IgdGhpcyBtb2R1bGUgdHlwZSBpcyBjcmVhdGVkLgoKKipFeGFtcGxlKio6IGBhdHRyaWJ1dGVzLnByb2R1Y3RDbGFzc0lkPT0xMzM3IGFuZCBhdHRyaWJ1dGVzLmh3VmVyc2lvbj1pbj0oMS4wLjAsMS4xLjApYAoKU2VlIHRoZSBbZG9jdW1lbnRhdGlvbl0oaHR0cHM6Ly9kb2NzLmJvc2NoLWlvdC1zdWl0ZS5jb20vcm9sbG91dHMvU09VUC1SZWNpcGUuaHRtbCNzcmMtMzk1ODAyNDYwOV9TT1VQUmVjaXBlLU1vZHVsZXVwZGF0ZWRlZmluaXRpb24pIGZvciBkZXRhaWxlZCBpbmZvcm1hdGlvbiBhYm91dCB0aGUgcXVlcnkgcG9zc2liaWxpdGllcy4=";function u7({title:e,filter:t}){const n=R(),r=hv(t);return c.jsx(ar,{title:e??n("Button.ViewSystemTypes"),href:r})}function d7({moduleType:e}){const t=R(),{id:n,name:r,key:i,description:s,moduleQuery:o,moduleCountQuery:a}=e,l=o!==void 0,u=a!==void 0;return c.jsxs(c.Fragment,{children:[c.jsx(l7,{moduleType:e}),c.jsxs(Mn,{label:"",className:"basic-details-layout",style:{marginBottom:0},children:[c.jsx(ne,{header:t("Entity.Label.Id"),showCopy:!0,value:n,children:n}),c.jsx(ne,{header:t("Entity.Label.Key"),children:i}),c.jsx(ne,{header:t("Entity.Label.Name"),children:r}),s&&c.jsx(ne,{header:t("Entity.Label.Description"),children:s}),c.jsx(ne,{header:t("Entity.Label.SystemTypes"),children:c.jsx(u7,{filter:{moduleTypeIds:[e.id]}})}),(e==null?void 0:e.targetTypeRef)&&c.jsx(ne,{header:t("ModuleTypes.Label.TargetType"),children:c.jsx(xv,{targetTypeRef:e.targetTypeRef})})]}),c.jsx(tn,{header:t("ModuleTypes.Details.DefaultQueries.Header"),expandedByDefault:!0,helpFile:c7,children:c.jsxs(Mn,{label:"",className:"basic-details-layout",style:{marginBottom:0},children:[c.jsx(ne,{header:t("ModuleTypes.Details.DefaultQueries.Label.ModuleQuery"),showCopy:l,value:o??"N/A",popoverHeading:t("ModuleTypes.Details.DefaultQueries.Label.ModuleQuery"),children:o?c.jsx(Wp,{title:o,filter:{fq:o}}):"N/A"}),c.jsx(ne,{header:t("ModuleTypes.Details.DefaultQueries.Label.CountQuery"),showCopy:u,value:a??"N/A",popoverHeading:t("ModuleTypes.Details.DefaultQueries.Label.CountQuery"),children:a??"N/A"})]})})]})}function f7(e){const t=e!==void 0,n=t?br.entityDetails(e):[];return or(n,`module-types/${e}`,{enabled:t})}function p7(e){const t=e!==void 0,{url:n,listQueryKey:r}=t?rb(e):kl;return Ht(r,n,"metadata",{enabled:t})}function h7(e){const{url:t,mutationKey:n,listQueryKey:r,invalidateOnMutation:i}=rb(e);return bu(t,r,n,i)}function rb(e){return{url:`module-types/${e}/metadata`,listQueryKey:br.metadataList({moduleTypeId:e}),mutationKey:br.metadataModify({moduleTypeId:e}),invalidateOnMutation:br.entityDetails(e),useApiV2:!1}}function Gu(){const{id:e}=Te.useParams(),t=f7(e),n=p7(e),r=h7(e??"");if(e===void 0)return c.jsx(pe,{error:{message:"Missing entity ID"}});const i=rb(e);return t.error?c.jsx(pe,{error:t.error}):t.isLoading?c.jsx(et,{}):c.jsxs(c.Fragment,{children:[c.jsx(d7,{moduleType:t.data}),c.jsx(Cu,{helpFile:a7,useApiResult:n,useDeleteResult:r,useMetadataAddItemProps:i,expandedByDefault:!0}),c.jsx(Vs,{auditable:t.data})]})}Gu.displayName="ModuleTypeDetailsBlade";function m7(){const e=R();return c.jsxs(c.Fragment,{children:[e("ModuleTypes.Details.BladeHeader"),c.jsx(Cn,{popoverHeading:e("ModuleTypes.Details.BladeHeader"),children:c.jsx("div",{children:c.jsx(Ft,{markdownFilePath:o7})})})]})}Gu.Header=m7;const pC={component:Fu,name:Fu.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:c.jsx(Fu.Header,{}),showCloseButton:!1}},hC={component:Gu,name:Gu.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:c.jsx(Gu.Header,{})}};function g7(){const{id:e}=Te.useParams(),t=Di(),n=x.useMemo(()=>({...pC,defaults:{...pC.defaults}}),[]),r=x.useMemo(()=>({...hC,defaults:{...hC.defaults,onClose:()=>t.toModuleTypesHome()}}),[t]),i=x.useMemo(()=>{const s=[n];return e&&s.push(r),s},[e,n,r]);return c.jsx(D.Blades,{registrations:i,settings:{resizable:!0}})}const y7=g7,v7="data:text/markdown;base64,VGhlIGxpc3Qgb2Ygc3lzdGVtIHR5cGVzIGNyZWF0ZWQgYnkgdXNlcnMgdG8gc3BlY2lmeSBzeXN0ZW1zIHdpdGggYSBnaXZlbiBtb2R1bGUgdHlwZSBjb25zdGVsbGF0aW9uLgoKU3lzdGVtIHR5cGVzIGRlc2NyaWJlIGNvbnN0ZWxsYXRpb25zIG9mIG1vZHVsZSAoaS5lLiwgYSBzeXN0ZW0pIGJ5IHJlZmVyZW5jaW5nIGEgc2V0IG9mIG1vZHVsZSB0eXBlcy4gUmVjaXBlIHR5cGVzIHJlZmVyZW5jZSBzeXN0ZW0gdHlwZXMgdG8gZGVjbGFyZSB3aGljaCB0eXBlIG9mIHN5c3RlbXMgdGhpcyByZWNpcGUgY2FuIGJlIGFwcGxpZWQgdG8uIENvbnNlcXVlbnRseSwgc3lzdGVtIHR5cGVzIGFyZSBhdXRvbWF0aWNhbGx5IGFzc2lnbmVkIHRvIHN5c3RlbXMgdXBvbiB0aGUgcmVjZXB0aW9uIG9mIGFuIHVwZGF0ZSByZXBvcnQuCgpZb3UgY2FuIGNvbmZpZ3VyZSB0aGUgZGlzcGxheWVkIGNvbHVtbnMgdmlhIHRoZSA8SWNvbiBpY29uTmFtZT0ic2V0dGluZ3MiIC8+IG1lbnUu";function b7(e){const t={isDefault:!0},n={isSortable:!0},r={isDefault:!0,isSortable:!0};return[$e(e("Entity.Label.Id"),"id"),$e(e("Entity.Label.Key"),"key",r),$e(e("Entity.Label.Name"),"name",r),$e(e("Entity.Label.Description"),"description",t),Ln(e("Entity.Label.CreatedAt"),"createdAt",n),$e(e("Entity.Label.CreatedBy"),"createdBy"),Ln(e("Entity.Label.LastModifiedAt"),"lastModifiedAt",n),$e(e("Entity.Label.LastModifiedBy"),"lastModifiedBy")]}function S7(){const e=R();return x.useMemo(()=>b7(e),[e])}const ib="SystemTypeAddModal",sb="SystemTypeEditModal",ob="SystemTypeDistributionSetTypeAssignModal",ab="SystemTypeModuleTypeAssignModal",lb="SystemTypeFilterModal";function x7(){return tt(ib)}function w7(){return tt(sb)}function _7(){return tt(lb)}function k7(e){return{search:e.get("search"),moduleTypeIds:e.getAll("moduleTypeIds")}}function zp(){const{currentFilter:e,setFilter:t,mergeFilter:n}=rl(k7);return{systemTypesFilter:e,setSystemTypesFilter:t,mergeSystemTypesFilter:n}}function D7(){var i;const e=R(),{systemTypesFilter:t,mergeSystemTypesFilter:n}=zp(),r=(((i=t.moduleTypeIds)==null?void 0:i.length)??0)>0;return c.jsx(c.Fragment,{children:r?c.jsx(Tn,{category:e("ModuleTypes.Label"),onClose:()=>n({moduleTypeIds:null}),value:""},"moduleTypes"):null})}const C7="system-types";function M7({data:e,totalCount:t,loadingData:n,fetchMoreData:r,onRefresh:i,onSortQueryChange:s,onSelect:o,selectedId:a}){const l=R(),u=x7(),d=_7(),f=S7(),[p,h]=x.useState(f),{systemTypesFilter:m,mergeSystemTypesFilter:y}=zp();pa(p,s);const{sortColumn:b,isSortingMultipleColumns:g,setIsSortingMultipleColumns:v,resetSorting:S}=ha(h,"system-types"),w=x.useMemo(()=>({allColumns:f,onColumnSelectionChange:h,typeName:C7,multiSortProps:{isMultiSort:g,onToggleMultiSort(C){v(C),C||S()}}}),[f,g,S,v]),_=x.useMemo(()=>{if(a!==void 0)return e.find(C=>C.id===a)},[e,a]),T=x.useCallback(C=>{y({search:C})},[y]),M=x.useMemo(()=>ma(b),[b]);return c.jsxs(cn,{children:[c.jsx(bn,{count:t,columnSelectorProps:w,content:c.jsxs(c.Fragment,{children:[c.jsx(Su,{searchId:"systemtypes-list-search",searchingFields:["Entity.Label.Id","Entity.Label.Key","Entity.Label.Name","Entity.Label.Description"],onSearchChange:T,searchTextInitial:m.search??""}),c.jsx(D.Button,{title:l("Button.Filter"),label:l("Button.Filter"),icon:"filter",mode:"integrated",onClick:()=>d()}),c.jsx(D7,{})]}),actions:c.jsx(yr,{onRefresh:i,refreshDisabled:n}),mainAction:c.jsx(ni,{onClick:()=>u(),dataTestId:"systemtype-add"})}),c.jsx(D.DataList,{items:e,columns:p,enableScrolling:!0,emptyStateMessage:l("SystemTypes.List.Empty"),onScrollToBottom:r,hideCheckBoxes:!0,selected:_,onSelect:C=>o(C.id),onRenderColumnHeader:M,children:n&&c.jsx(et,{"data-testid":"system-types-list-loading"})})]})}function cb(e,t){const n=new URLSearchParams;return Jl(n,e.search),eo(n,t),nr(n,"moduleType[]",e.moduleTypeIds),Ht(xt.listFilteredWithSorting(e,t??null),"system-types","type",{queryParams:n})}function Vu(){const{id:e}=Te.useParams(),t=Di(),{systemTypesFilter:n}=zp(),[r,i]=x.useState(),{data:s,isLoading:o,error:a,fetchNextPage:l,reset:u}=cb(n,r),{totalCount:d,entities:f}=Tt(s);return a?c.jsx(pe,{error:a}):c.jsx(M7,{data:f,totalCount:d,loadingData:o,fetchMoreData:l,onRefresh:u,onSortQueryChange:i,selectedId:e,onSelect:p=>t.toSystemTypeDetails(p)})}Vu.displayName="SystemTypesListBlade";function T7(){const e=R();return c.jsxs(c.Fragment,{children:[e("SystemTypes.List.BladeHeader"),c.jsx(Cn,{popoverHeading:e("SystemTypes.List.BladeHeader"),children:c.jsx("div",{children:c.jsx(Ft,{markdownFilePath:v7})})})]})}Vu.Header=T7;const I7="data:text/markdown;base64,QSBzeXN0ZW0gdHlwZSBkZXNjcmliZXMgc3lzdGVtcyB0aGF0IHNoYXJlIHRoZSBzYW1lIG9yIHNpbWlsYXIgY29uc3RlbGxhdGlvbiBvZiBtb2R1bGUgdHlwZXMuCgpJbiBhZGRpdGlvbiB0byBiYXNpYyBwcm9wZXJ0aWVzIChuYW1lLCBrZXksIGFuZCBkZXNjcmlwdGlvbiBvZiB0aGUgc3lzdGVtIHR5cGUpLCB0aGlzIHZpZXcgZGlzcGxheXMgaW5mb3JtYXRpb24gYWJvdXQ6CgoqIENvbXBhdGlibGUgcmVjaXBlIHR5cGVzCiogTGlzdCBvZiBtb2R1bGUgdHlwZXMKClRoZSA8SWNvbiBpY29uTmFtZT0id3JlbmNoIiAvPiBpY29uIGFsbG93cyB0byBlZGl0IG9yIGRlbGV0ZSB0aGUgc3lzdGVtIHR5cGUu",E7="data:text/markdown;base64,U3lzdGVtIGRpc3RyaWJ1dGlvbiBzZXRzIGNvbnRhaW4gYXJ0aWZhY3RzIHJlcXVpcmVkIGF0IHRoZSBzeXN0ZW0gbGV2ZWwsIG5vdCBmb3IgYSBzcGVjaWZpYyBtb2R1bGUgKGUuZy4sIHN5c3RlbSByZWxlYXNlIG5vdGVzLCBpbnN0YWxsIHNjcmlwdHMpLgoKVGhpcyBzZWN0aW9uIGRpc3BsYXlzIHRoZSBjb21wYXRpYmxlIHN5c3RlbSBkaXN0cmlidXRpb24gc2V0IHR5cGVzIGZvciB0aGlzIHN5c3RlbSB0eXBlIGFuZCBwcm92aWRlcyBtYW5hZ2VtZW50IGFjdGlvbnMgKGFzc2lnbiBhbmQgdW5hc3NpZ24pLg==",R7="data:text/markdown;base64,VGhlIGxpc3Qgb2YgbW9kdWxlIHR5cGVzIHRoYXQgY2FuIGJlIHBhcnQgb2YgdGhpcyBzeXN0ZW0gdHlwZS4g";function L7({systemType:e}){const t=R(),n=Di(),r=w7(),{doDelete:i,deleteIsLoading:s}=vr(xt.deleteEntity(),[xt.list()],t("SystemTypes.Popup.Delete.Headline"),t("SystemTypes.Info.Delete.Success"),()=>n.toSystemTypesHome(),t("SystemTypes.Popup.Delete.Info")),o=Xt(e,"edit"),a=Xt(e,"delete");return c.jsxs(ti,{title:t("SystemTypes.Details.ActionsMenu.Title"),testId:"systemtype-actions",children:[c.jsx(D.MenuItem,{label:t("Button.Edit"),icon:"edit",title:t("Button.Edit"),onClick:()=>r({toEdit:e}),disabled:!o}),c.jsx(D.MenuItem,{label:t("Button.Delete"),icon:"delete",title:t("Button.Delete"),onClick:()=>i(e.name??e.key,a??""),disabled:!a||s})]})}function O7({title:e,filter:t}){const n=R(),r=gv(t);return c.jsx(ar,{title:e??n("Button.ViewRecipeTypes"),href:r})}function B7({systemType:e}){const t=R(),{id:n,name:r,key:i,description:s}=e;return c.jsxs(c.Fragment,{children:[c.jsx(L7,{systemType:e}),c.jsxs(Mn,{label:"",className:"basic-details-layout",style:{marginBottom:0},children:[c.jsx(ne,{header:t("Entity.Label.Id"),showCopy:!0,value:n,children:n}),c.jsx(ne,{header:t("Entity.Label.Key"),children:i}),c.jsx(ne,{header:t("Entity.Label.Name"),children:r}),s&&c.jsx(ne,{header:t("Entity.Label.Description"),children:s}),c.jsx(ne,{header:t("Entity.Label.RecipeTypes"),children:c.jsx(O7,{title:t("Button.ViewRecipeTypes"),filter:{systemTypeId:[e.id]}})})]})]})}function A7(e){const t=e!==void 0,n=t?xt.entityDetails(e):[];return or(n,`system-types/${e}`,{enabled:t})}function mC({onClick:e,dataTestId:t}){const n=R();return c.jsx(D.Button,{title:n("Button.Assign"),icon:"link",mode:"integrated",onClick:e,disabled:!e,"data-testid":t})}function P7({distributionSetTypeRef:e}){const t=R();return c.jsx("div",{children:e&&c.jsx(Te.Link,{to:N4(e.id.toString()),title:t("DistributionSetTypeLink.Tooltip",{id:e.id}),children:e.name??e.key})})}function N7(e,t){const n=R(),r=ht(),i=Ke(),s=Ji(n("SystemTypes.SystemDistributionSetTypes.Popup.Unassign.Headline"),{confirmButton:n("Button.Unassign"),getMessage:f=>{const p=typeof f=="string"?f:f[0];return n("SystemTypes.SystemDistributionSetTypes.Popup.Unassign.Message",{type:p})}}),o=()=>{r(n("SystemTypes.SystemDistributionSetTypes.Popup.Unassign.Success")),i.invalidateQueries(xt.listSystemDistributionSetTypes(e.id))},a=()=>{i.invalidateQueries(xt.listSystemDistributionSetTypes(e.id))},{mutate:l,isLoading:u}=ki(xt.setSystemDistributionSetTypes(e.id),`system-types/${e.id}/system-distribution-set-types`,a,o);return{doUnassign:(f,p)=>{s(f,()=>{const h=(t==null?void 0:t.map(m=>m.id).filter(m=>m!==p))??[];l(h)})},deleteIsLoading:u}}function j7({systemType:e,assignedDsTypeRefs:t,toUnassign:n}){const r=R(),{doUnassign:i}=N7(e,t);return c.jsx(D.Button,{title:r("Button.Unassign"),icon:"link-broken",mode:"integrated",onClick:()=>i(n.name??n.key,n.id)})}function F7(e,t,n){const r={isDefault:!0};return[dn(e("Entity.Label.Name"),i=>i===void 0?null:c.jsx(P7,{distributionSetTypeRef:i}),"distributionSetTypeRef",r),$e(e("Entity.Label.Description"),"description",r),{data:{columnId:"actions"},header:"",onRenderHeader:()=>null,renderCell:i=>c.jsx("div",{className:"action-buttons",children:c.jsx(j7,{systemType:t,assignedDsTypeRefs:n,toUnassign:i})}),style:{width:"6rem"},cellStyle:{padding:0}}]}function G7(e,t){const n=R();return F7(n,e,t)}function V7(){return tt(ob)}function $7({systemType:e,distributionSetTypeRefsResult:t}){const n=R(),r=V7(),{data:i,isLoading:s,error:o}=t,{totalCount:a,entities:l}=Tt(i),u=G7(e,l);return o?c.jsx(pe,{error:o}):c.jsxs(cn,{"data-testid":"systemType-systemDistributionsSetTypes",children:[c.jsx(bn,{count:a,mainAction:c.jsx(mC,{onClick:()=>r({systemType:e,distributionSetTypeRefs:l})})}),c.jsx(D.DataList,{items:l,columns:u,emptyStateMessage:n("SystemTypes.SystemDistributionSetTypes.List.Empty"),hideCheckBoxes:!0,children:s&&c.jsx(et,{"data-testid":"dstypes-list-loading"})})]})}function Y7(e,t){const n=R(),r=ht(),i=Ke(),s=Ji(n("SystemTypes.ModuleTypes.Popup.Unassign.Headline"),{confirmButton:n("Button.Unassign"),getMessage:f=>{const p=typeof f=="string"?f:f[0];return n("SystemTypes.ModuleTypes.Popup.Unassign.Message",{type:p})}}),o=()=>{r(n("SystemTypes.ModuleTypes.Popup.Unassign.Success")),i.invalidateQueries(xt.listModuleTypes(e.id))},a=()=>{i.invalidateQueries(xt.listModuleTypes(e.id))},{mutate:l,isLoading:u}=ki(xt.setModuleTypes(e.id),`system-types/${e.id}/module-types`,a,o);return{doUnassign:(f,p)=>{s(f,()=>{const h=t.filter(m=>m!==p)??[];l(h)})},deleteIsLoading:u}}function W7({systemType:e,assignedModuleTypeIds:t,toUnassign:n}){const r=R(),{doUnassign:i}=Y7(e,t);return c.jsx(D.Button,{title:r("Button.Unassign"),icon:"link-broken",mode:"integrated",onClick:()=>i(n.name??n.key,n.id)})}function H7(e,t,n){const r={isDefault:!0};return[dn(e("Entity.Label.Name"),i=>i===void 0?null:c.jsx(wu,{title:i.name??i.key,id:i.id}),"moduleType",r),$e(e("Entity.Label.Description"),"description",r),{data:{columnId:"actions"},header:"",onRenderHeader:()=>null,renderCell:i=>c.jsx("div",{className:"action-buttons",children:c.jsx(W7,{systemType:t,assignedModuleTypeIds:n.map(s=>s.id),toUnassign:i})}),style:{width:"6rem"},cellStyle:{padding:0}}]}function Z7(e,t){const n=R();return H7(n,e,t)}function U7(){return tt(ab)}function z7({systemType:e,systemTypeModulesResult:t}){const n=R(),r=U7(),{data:i,isLoading:s,error:o}=t,{totalCount:a,entities:l}=Tt(i),u=Z7(e,l);return o?c.jsx(pe,{error:o}):c.jsxs(cn,{"data-testid":"systemType-moduleTypes",children:[c.jsx(bn,{count:a,mainAction:c.jsx(mC,{onClick:()=>r({systemType:e,alreadyAssignedModuleTypes:l})})}),c.jsx(D.DataList,{items:l,columns:u,emptyStateMessage:n("SystemTypes.ModuleTypes.List.Empty"),hideCheckBoxes:!0,children:s&&c.jsx(et,{"data-testid":"moduletypes-list-loading"})})]})}function $u(){const{id:e}=Te.useParams(),t=R(),n=A7(e),r=fD(e),i=_v(e);return e===void 0?c.jsx(pe,{error:{message:"Missing entity ID"}}):n.error?c.jsx(pe,{error:n.error}):n.isLoading?c.jsx(et,{}):c.jsxs(c.Fragment,{children:[c.jsx(B7,{systemType:n.data}),c.jsx(tn,{header:t("SystemTypes.Label.ModuleTypes"),expandedByDefault:!0,helpFile:R7,children:c.jsx(z7,{systemType:n.data,systemTypeModulesResult:i})}),c.jsx(tn,{header:t("SystemTypes.Label.SystemDistributionSetTypes"),expandedByDefault:!0,helpFile:E7,children:c.jsx($7,{systemType:n.data,distributionSetTypeRefsResult:r})}),c.jsx(Vs,{auditable:n.data})]})}$u.displayName="SystemTypeDetailsBlade";function q7(){const e=R();return c.jsxs(c.Fragment,{children:[e("SystemTypes.Details.BladeHeader"),c.jsx(Cn,{popoverHeading:e("SystemTypes.Details.BladeHeader"),children:c.jsx("div",{children:c.jsx(Ft,{markdownFilePath:I7})})})]})}$u.Header=q7;const gC={component:Vu,name:Vu.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:c.jsx(Vu.Header,{}),showCloseButton:!1}},yC={component:$u,name:$u.displayName,open:!0,defaults:{fluid:!0,active:!0,initialWidth:500,header:c.jsx($u.Header,{})}};function X7(){const{id:e}=Te.useParams(),t=Di(),n=x.useMemo(()=>({...gC,defaults:{...gC.defaults}}),[]),r=x.useMemo(()=>({...yC,defaults:{...yC.defaults,onClose:()=>t.toSystemTypesHome()}}),[t]),i=x.useMemo(()=>{const s=[n];return e&&s.push(r),s},[e,n,r]);return c.jsx(D.Blades,{registrations:i,settings:{resizable:!0}})}const K7=X7;function Q7(e){const t=n=>e(n);return[{path:Qk,element:x.createElement(Te.Outlet),children:[{path:"entities/:id?/:subEntity?/:subEntityId?",Component:t(jv(d6))},{path:"system-types/:id?",Component:t(jv(K7))},{path:"module-types/:id?",Component:t(jv(y7))}]},{path:rD,element:x.createElement(Te.Outlet),children:[{path:"entities/:id?/:subEntity?/:subEntityId?",Component:t(Nv(e8))},{path:"tags",Component:t(Nv(f8))},{path:"types/:id?/:subEntity?/:subEntityId?",Component:t(Nv(Xz))}]},{path:sD,element:x.createElement(Te.Outlet),children:[{path:"entities/:id?",Component:t(H8)}]}]}function J7(e,t){e.registerFeaturesProvider("soup",nZ),e.registerPagesV2(...Q7(t))}function vC(e){var v,S,w;const t=R(),{dialogId:n,onConfirm:r,onClose:i,isLoading:s,error:o,toEdit:a}=e,l=a?"edit":"add",u=x.useRef(!1),d=sr({defaultValues:eq(a),mode:"onChange"}),{formState:{errors:f,isDirty:p,isValid:h}}=d;x.useEffect(()=>{u.current||(d.setFocus("name"),u.current=!0)},[d]);function m(){h&&(r==null||r(d.getValues()))}const y=l==="add"?"RecipeTags.Popup.Add.Headline":"RecipeTags.Popup.Edit.Headline",b=l==="add"?"Button.Add":"Button.OK",g=e.existingTags.map(_=>_.name).filter(_=>_!==(a==null?void 0:a.name));return c.jsxs(D.Dialog,{dialogId:n,title:t(y),onClose:i,modal:!0,open:!0,onKeyUp:_=>{_.key==="Enter"&&_.ctrlKey&&!s&&m()},children:[c.jsx(en,{useFormReturn:d,field:"name",label:"Entity.Label.Name",maxSize:255,notificationText:(v=f==null?void 0:f.name)==null?void 0:v.message,isRequired:!0,notAllowedDuplicates:g,validationPattern:gr()}),c.jsx(_o,{useFormReturn:d,field:"description",label:"Entity.Label.Description",maxSize:512,notificationText:(w=(S=d.formState.errors)==null?void 0:S.description)==null?void 0:w.message}),c.jsx(D.FormField,{fieldType:"checkbox",children:c.jsx(D.Checkbox,{id:"targetVisible",label:t("RecipeTags.Label.Exposed"),...d.register("exposed")})}),o&&c.jsx(pe,{error:o}),s&&c.jsx(D.ProgressIndicator,{type:"indeterminate"}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:t("Button.Cancel"),mode:"secondary",onClick:i,disabled:s}),c.jsx(D.Button,{label:t(b),mode:"primary",onClick:m,disabled:s||!h||!p,id:"recipe-tag-modal-form"})]})]})}function eq(e){return{name:(e==null?void 0:e.name)??"",description:(e==null?void 0:e.description)??"",exposed:(e==null?void 0:e.exposed)??!1}}function tq(e){const{onClose:t}=e,{existingTags:n}=e.options??{},r=R(),i=Ke(),s=ht();if(!n)throw new Error("Options missing");const o=()=>{s(r("RecipeTags.Info.Add.Success")),i.invalidateQueries(Jr.list()),t()},a=()=>{i.invalidateQueries(Jr.list())},{mutate:l,isLoading:u,error:d}=ki(Jr.addEntity(),"recipe-tags",a,o),f=p=>{l(p)};return c.jsx(vC,{dialogId:Av,onConfirm:f,onClose:t,isLoading:u,error:d,existingTags:n})}function nq(e){const{onClose:t}=e,{existingTags:n,toEdit:r}=e.options??{},i=R(),s=Ke(),o=ht();if(!n||!r)throw new Error("Options missing");const a=()=>{o(i("RecipeTags.Info.Edit.Success")),s.invalidateQueries(Jr.list()),t()},l=()=>{s.invalidateQueries(Jr.list())},{mutate:u,isLoading:d,error:f}=ua(Jr.updateEntity(r.id),r._links.self.href,l,a),p=h=>{u(h)};return c.jsx(vC,{dialogId:Pv,onConfirm:p,onClose:t,isLoading:d,error:f,existingTags:n,toEdit:r})}const rq={"RecipeTags.List.BladeHeader":"Recipe tags","RecipeTags.List.Empty":"No recipe tags found","RecipeTags.Label.Exposed":"Visible to systems","RecipeTags.Label.Recipes":"Recipes","RecipeTags.Tooltip.Exposed":"Visible to systems","RecipeTags.Tooltip.NotExposed":"Not visible to systems","RecipeTags.Add":"Add recipe tag","RecipeTags.Info.Add.Success":"Recipe tag successfully added","RecipeTags.Info.Edit.Success":"Recipe tag successfully updated","RecipeTags.Info.Delete.Success":"Recipe tag successfully deleted","RecipeTags.Popup.Add.Headline":"Add recipe tag","RecipeTags.Popup.Edit.Headline":"Edit recipe tag","RecipeTags.Popup.Delete.Headline":"Delete recipe tag?"},iq=({shell:e,connect:t})=>{e.registerTranslation({en:rq}),e.registerModal(Av,t(tq)),e.registerModal(Pv,t(nq))};function sq({selected:e,onSelect:t}){const n=O0(cb,{search:"",moduleTypeIds:[]});return c.jsx(fv,{entityName:"SystemType",selected:e,onSelect:t,dataProvider:n})}function bC(e){var S,w,_,T,M;const t=R(),{dialogId:n,onConfirm:r,onClose:i,isLoading:s,error:o,toEdit:a}=e,l=a?"edit":"add",u=x.useRef(!1),d=sr({defaultValues:oq(a),mode:"onChange"}),{formState:{errors:f,isDirty:p,isValid:h}}=d;x.useEffect(()=>{u.current||(d.setFocus("key"),u.current=!0)},[d]);function m(){h&&(r==null||r(d.getValues()))}const y=l==="add"?"RecipeTypes.Popup.Add.Headline":"RecipeTypes.Popup.Edit.Headline",b=l==="add"?"Button.Add":"Button.OK",g=e.existingTypes.map(C=>C.key).filter(C=>C!==(a==null?void 0:a.key)),v=async C=>{const k=C.target.value;d.setValue("systemType",k,{shouldDirty:!0,shouldValidate:!0,shouldTouch:!0}),await d.trigger()};return c.jsxs(D.Dialog,{dialogId:n,title:t(y),onClose:i,modal:!0,open:!0,onKeyUp:C=>{C.key==="Enter"&&C.ctrlKey&&!s&&m()},children:[c.jsx(D.FormField,{fieldType:"dropdown",notificationType:"error",notificationText:(S=f==null?void 0:f.type)==null?void 0:S.message,children:c.jsx(sq,{selected:a==null?void 0:a.systemType.key,onSelect:C=>{d.setValue("systemType",(C==null?void 0:C.id)??"",{shouldDirty:!0,shouldValidate:!0,shouldTouch:!0})},...d.register("systemType",{required:t("Input.FieldIsRequired"),onChange:C=>v(C)})})}),c.jsx(en,{useFormReturn:d,field:"key",label:"Entity.Label.Key",maxSize:255,notificationText:(w=f==null?void 0:f.key)==null?void 0:w.message,isRequired:!0,notAllowedDuplicates:g,validationPattern:gr()}),c.jsx(en,{useFormReturn:d,field:"name",label:"Entity.Label.Name",maxSize:255,notificationText:(_=f==null?void 0:f.name)==null?void 0:_.message,isRequired:!0,validationPattern:gr()}),c.jsx(_o,{useFormReturn:d,field:"description",label:"Entity.Label.Description",maxSize:512,notificationText:(M=(T=d.formState.errors)==null?void 0:T.description)==null?void 0:M.message}),o&&c.jsx(pe,{error:o}),s&&c.jsx(D.ProgressIndicator,{type:"indeterminate"}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:t("Button.Cancel"),mode:"secondary",onClick:i,disabled:s}),c.jsx(D.Button,{label:t(b),mode:"primary",onClick:m,disabled:s||!h||!p,id:"recipe-type-modal-form"})]})]})}function oq(e){var t;return{systemType:((t=e==null?void 0:e.systemType)==null?void 0:t.id)??"",key:(e==null?void 0:e.key)??"",name:(e==null?void 0:e.name)??"",description:(e==null?void 0:e.description)??""}}function aq(e){const{onClose:t}=e,{existingTypes:n}=e.options??{},r=R(),i=Ke(),s=ht();if(!n)throw new Error("Options missing");const o=()=>{s(r("RecipeTypes.Info.Add.Success")),i.invalidateQueries(Vt.list()),t()},a=()=>{i.invalidateQueries(Vt.list())},{mutate:l,isLoading:u,error:d}=ki(Vt.addEntity(),"recipe-types",a,o),f=p=>{l(p)};return c.jsx(bC,{dialogId:Yv,onConfirm:f,onClose:t,isLoading:u,error:d,existingTypes:n})}function lq(e){const{onClose:t}=e,{existingTypes:n,toEdit:r}=e.options??{},i=R(),s=Ke(),o=ht();if(!n||!r)throw new Error("Options missing");const a=()=>{o(i("RecipeTypes.Info.Edit.Success")),s.invalidateQueries(Vt.all()),t()},l=()=>{s.invalidateQueries(Vt.all())},{mutate:u,isLoading:d,error:f}=ua(Vt.updateEntity(),r._links.self.href,l,a),p=h=>{u(h)};return c.jsx(bC,{dialogId:Wv,onConfirm:p,onClose:t,isLoading:d,error:f,existingTypes:n,toEdit:r})}const cq={"RecipeTypes.List.BladeHeader":"Recipe types","RecipeTypes.List.Empty":"No recipe types found","RecipeTypes.Details.ActionsMenu.Title":"Recipe types","RecipeTypes.Info.Add.Success":"Recipe type successfully added","RecipeTypes.Info.Edit.Success":"Recipe type successfully updated","RecipeTypes.Info.Delete.Success":"Recipe type successfully deleted","RecipeTypes.Popup.Add.Headline":"Add recipe type","RecipeTypes.Popup.Edit.Headline":"Edit recipe type","RecipeTypes.Popup.Delete.Headline":"Delete recipe type?","RecipeTypes.Popup.Delete.Info":"This action will delete the recipe type. Please ensure there are no recipes of this type, otherwise the request will fail.","RecipeTypes.Popup.FilterList.Headline":"Select recipe types filter","RecipeTypes.Details.BladeHeader":"Recipe type","RecipeTypes.Details.ValidatorList.Icon":"Icon","RecipeTypes.Details.ValidatorList.Empty":"No validator configured yet","RecipeTypes.Validation.Add.Error":"Failed to configure validator","RecipeTypes.Validation.Details.Actions":"Validator actions","RecipeTypes.Validation.Details.BladeHeader":"Validator","RecipeTypes.Validation.ArtifactSize.Caption":"Total artifact size","RecipeTypes.Validation.ArtifactSize.Popup.Edit.Headline":"Edit total artifact size validation rule","RecipeTypes.Validation.ArtifactSize.Popup.Delete.Headline":"Delete total artifact size validator?","RecipeTypes.Validation.ArtifactSize.Popup.Delete.Title":"Total artifact size validator","RecipeTypes.Validation.ArtifactSize.Popup.Delete.Success":"Total artifact size validator deleted successfully","RecipeTypes.Validation.ArtifactSize.Help.Header":"Total artifact size validator","RecipeTypes.Validation.ArtifactSize.ErrorThreshold":"Error threshold","RecipeTypes.Validation.ArtifactSize.WarningThreshold":"Warning threshold","RecipeTypes.Validation.ArtifactSize.ExcludedSwTypeList.Popup.Include.Headline":"Include software module type into calculation?","RecipeTypes.Validation.ArtifactSize.ExcludedSwTypeList.Popup.Include.Confirm":"Include","RecipeTypes.Validation.ArtifactSize.ExcludedSwTypeList.Popup.Include.Message":'This action will include the software module type "{name}" in the total artifact size calculation. Do you want to proceed?',"RecipeTypes.Validation.ArtifactSize.ExcludedSwTypeList.Caption":"Excluded software module types","RecipeTypes.Validation.ArtifactSize.ExcludedSwTypeList.Description":"Description","RecipeTypes.Validation.ArtifactSize.ExcludedSwTypeList.Empty":"No software module types excluded","RecipeTypes.Validation.DistributionSet.Caption":"Distribution set assignment","RecipeTypes.Validation.DistributionSet.Popup.Delete.Headline":"Delete distribution set assignment validator?","RecipeTypes.Validation.DistributionSet.Popup.Delete.Title":"Distribution set assignment validator","RecipeTypes.Validation.DistributionSet.Popup.Delete.Success":"Validator deleted successfully","RecipeTypes.Validation.DistributionSet.Help.Header":"Distribution set assignment validator","RecipeTypes.Validation.DistributionSet.ExcludedModuleTypeList.Caption":"Excluded module types","RecipeTypes.Validation.DistributionSet.ExcludedModuleTypeList.Empty":"No module types excluded","RecipeTypes.Validation.DistributionSet.ExcludedModuleTypeList.Popup.Edit.Headline":"Exclude module types","RecipeTypes.Validation.DistributionSet.ExcludedModuleTypeList.Popup.Include.Headline":"Include module type?","RecipeTypes.Validation.DistributionSet.ExcludedModuleTypeList.Popup.Include.Confirm":"Include","RecipeTypes.Validation.DistributionSet.ExcludedModuleTypeList.Popup.Include.Message":'The module type "{name}" will be included in the distribution set assignment validation again. Do you want to proceed?',"RecipeTypes.Validation.RecipeMetadata.Caption":"Recipe metadata","RecipeTypes.Validation.MudWithDsMetadata.Caption":"Module update definition metadata (with distribution set)","RecipeTypes.Validation.MudWithoutDsMetadata.Caption":"Module update definition metadata (without distribution set)","RecipeTypes.Validation.SysDsMetadata.Caption":"System distribution set metadata","RecipeTypes.Validation.Metadata.Popup.Delete.Headline":"Delete metadata validator?","RecipeTypes.Validation.Metadata.Popup.Delete.Success":"Metadata validator deleted successfully","RecipeTypes.Validation.Metadata.Popup.Delete.Rules.Hint":"Validator has {count} rules defined.","RecipeTypes.Validation.Metadata.RuleEntryList.Key":"Key","RecipeTypes.Validation.Metadata.RuleEntryList.Mandatory":"Mandatory","RecipeTypes.Validation.Metadata.RuleEntryList.ValueValidationRegex":"Value validation regex","RecipeTypes.Validation.Metadata.RuleEntryList.Empty":"No rules defined yet","RecipeTypes.Validation.Metadata.RuleEntryList.Popup.Add.Headline":"Add {type} metadata validation rule","RecipeTypes.Validation.Metadata.RuleEntryList.Popup.Update.Headline":"Edit {type} metadata validation rule","RecipeTypes.Validation.Metadata.RuleEntryList.Popup.Field.Key":"Key","RecipeTypes.Validation.Metadata.RuleEntryList.Popup.Field.ValueValidationRegex":"Value validation regex","RecipeTypes.Validation.Metadata.RuleEntryList.Popup.Delete.Headline":"Delete metadata validation rule?","RecipeTypes.Validation.TagAssignment.Caption":"Tag assignment","RecipeTypes.Validation.TagAssignment.Popup.Delete.Headline":"Delete tag assignment validator?","RecipeTypes.Validation.TagAssignment.Popup.Delete.Success":"Tag assignment validator deleted successfully","RecipeTypes.Validation.TagAssignment.Popup.Delete.Title":"Tag assignment validator","RecipeTypes.Validation.TagAssignment.Popup.Delete.Rules.Hint":"Validator has {count} rules defined.","RecipeTypes.Validation.TagAssignment.RuleEntryList.Caption":"Rules","RecipeTypes.Validation.TagAssignment.RuleEntryList.Visibility":"Visibility","RecipeTypes.Validation.TagAssignment.RuleEntryList.NameValidationRegex":"Name validation regex","RecipeTypes.Validation.TagAssignment.RuleEntryList.Empty":"No rules defined yet","RecipeTypes.Validation.TagAssignment.RuleEntryList.Popup.Add.Headline":"Add tag assignment validation rule","RecipeTypes.Validation.TagAssignment.RuleEntryList.Popup.Update.Headline":"Edit tag assignment validation rule","RecipeTypes.Validation.TagAssignment.RuleEntryList.Popup.Delete.Headline":"Delete tag assignment validation rule?","RecipeTypes.Validation.TagAssignment.RuleEntryList.Popup.Field.NameValidationRegex":"Name validation regex","RecipeTypes.Validation.TagAssignment.RuleEntryList.Popup.Field.Exposed":"Exposed","RecipeTypes.Validation.NotConfigured":"Not configured","SoftwareModuleTypeLink.Unknown.Tooltip":"Software module type could not be found. It may have been deleted or you may not have permission to view it.","SoftwareModuleTypeLink.Tooltip":"Open software module type {name}"};function uq(e){const{onClose:t}=e,n=R(),{recipeTypesFilter:r,mergeRecipeTypesFilter:i}=Zp(),s=cb({search:null,moduleTypeIds:[]}),o=yu(s),[a,l]=x.useState([]),[u,d]=x.useState(r.systemTypeId??[]),f=dq(r,u),{error:p}=s;x.useEffect(()=>{const m=o.filter(y=>{var b;return((b=r.systemTypeId)==null?void 0:b.includes(y.id))??!1});l(m)},[o,l,r.systemTypeId]);const h=()=>{i({systemTypeId:u}),t()};return c.jsxs(D.Dialog,{dialogId:Hv,title:n("RecipeTypes.Popup.FilterList.Headline"),onClose:t,modal:!0,open:!0,className:"suggestions-containing-modal",onKeyUp:m=>{m.key==="Enter"&&f&&h()},children:[c.jsx(D.FormField,{fieldType:"dropdown",children:c.jsx(B1,{label:n("Entity.Label.SystemTypes"),options:o,initiallySelected:a,onChange:m=>d(m.map(y=>y.id))})}),p&&c.jsx(pe,{error:p}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:n("Button.Cancel"),mode:"secondary",onClick:t}),c.jsx(D.Button,{label:n("Button.Apply"),mode:"primary",onClick:h,disabled:!f})]})]})}function dq(e,t){var n;return((n=e.systemTypeId)==null?void 0:n.toString())!==t.toString()}function fq(e){var T,M;const{recipeTypeId:t,validator:n,currentRules:r,toEdit:i,mandatory:s=(i==null?void 0:i.mandatory)??!1}=e.options??{},o=R(),{mutate:a,error:l,isLoading:u}=Dl(t,n);if(!r||!t)throw new Error("Options missing");const{onClose:d}=e,f=i?"edit":"add",p={key:(i==null?void 0:i.key)??"",valueValidationRegex:(i==null?void 0:i.valueValidationRegex)??"",mandatory:(i==null?void 0:i.mandatory)??s},h=sr({defaultValues:p,mode:"onChange"}),{formState:{errors:m,isDirty:y,isValid:b},setFocus:g}=h;x.useEffect(()=>{g(f==="add"?"key":"valueValidationRegex")},[g,f]);function v(){if(b){const{key:C,valueValidationRegex:k,mandatory:I}=h.getValues(),O=[...r??[]];if(i!=null&&i.key){const A=O.findIndex(L=>L.key===i.key);A!==-1&&O.splice(A,1)}O.push({key:C,valueValidationRegex:k,mandatory:I}),a({ruleEntries:O},{onSuccess:()=>{d()}})}}const S=r.map(C=>C.key).filter(C=>C!=p.key),w=f==="add"?"RecipeTypes.Validation.Metadata.RuleEntryList.Popup.Add.Headline":"RecipeTypes.Validation.Metadata.RuleEntryList.Popup.Update.Headline",_=f==="add"?"Button.Add":"Button.OK";return c.jsxs(D.Dialog,{dialogId:Zv,title:o(w,{type:s?"mandatory":"optional"}),onClose:d,modal:!0,open:!0,onKeyUp:C=>{C.key==="Enter"&&v()},children:[c.jsx(en,{useFormReturn:h,field:"key",label:"RecipeTypes.Validation.Metadata.RuleEntryList.Popup.Field.Key",maxSize:255,notificationText:(T=m==null?void 0:m.key)==null?void 0:T.message,isRequired:!0,notAllowedDuplicates:S,validationPattern:gr()}),c.jsx(en,{useFormReturn:h,field:"valueValidationRegex",label:"RecipeTypes.Validation.Metadata.RuleEntryList.Popup.Field.ValueValidationRegex",maxSize:255,notificationText:(M=m==null?void 0:m.valueValidationRegex)==null?void 0:M.message,isRequired:!0}),f!=="add"&&c.jsx(D.FormField,{fieldType:"checkbox",children:c.jsx(D.Checkbox,{id:"mandatory",label:o("Entity.Label.Mandatory"),...h.register("mandatory")})}),l&&c.jsx(pe,{error:l}),u&&c.jsx(D.ProgressIndicator,{type:"indeterminate"}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:o("Button.Cancel"),mode:"secondary",onClick:d,disabled:u}),c.jsx(D.Button,{label:o(_),mode:"primary",onClick:v,disabled:u||!b||!y})]})]})}const SC=107374182400,xC=SC/1024,wC=xC/1024,pq=wC/1024,Sn={Bytes:1,KB:1024,MB:1024*1024,GB:1024*1024*1024};function _C({useFormReturn:e,bytesField:t,label:n,isDisabled:r=!1}){const i=R(),{setValue:s,watch:o}=e,a=o(t),[l,u]=x.useState("MB"),[d,f]=x.useState(0),p=a!=null&&a>0,h=r||!p,m=k=>{if(k===0)return{value:0,unit:"MB"};if(k%Sn.GB===0)return{value:k/Sn.GB,unit:"GB"};if(k%Sn.MB===0)return{value:k/Sn.MB,unit:"MB"};if(k%Sn.KB===0)return{value:k/Sn.KB,unit:"KB"};if(k>=Sn.GB){const I=Math.floor(k/Sn.GB);if(I*Sn.GB===k)return{value:I,unit:"GB"}}if(k>=Sn.MB){const I=Math.floor(k/Sn.MB);if(I*Sn.MB===k)return{value:I,unit:"MB"}}if(k>=Sn.KB){const I=Math.floor(k/Sn.KB);if(I*Sn.KB===k)return{value:I,unit:"KB"}}return{value:k,unit:"Bytes"}},[y,b]=x.useState(!1),g=x.useRef(!1);x.useEffect(()=>{if(p&&a)if(!g.current&&!y){const{value:k,unit:I}=m(a);f(k),u(I),g.current=!0}else{const k=a/Sn[l];f(Math.floor(k))}else p||(f(0),u("MB"),b(!1))},[a,p,y,l]);const v=()=>p?l==="GB"?pq:l==="MB"?wC:l==="KB"?xC:SC:0,S=()=>p?1:0,w=k=>Math.max(Math.floor(k),1),_=(k,I)=>{if(I!==void 0&&p){const O=w(I);f(O);const A=Math.round(O*Sn[l]);s(t,A>0?A:null,{shouldValidate:!0,shouldDirty:!0})}},T=k=>{const I=k.target.value,O=l;if(b(!0),p){const L=d*Sn[O]/Sn[I],V=w(L);f(V),u(I);const Y=Math.round(V*Sn[I]);s(t,Y,{shouldValidate:!0,shouldDirty:!0})}else u(I)},M=k=>{if(!k.target.checked)s(t,null,{shouldValidate:!0,shouldDirty:!0}),f(0);else{const I=Sn.MB;s(t,I,{shouldValidate:!0,shouldDirty:!0}),f(1),u("MB")}},C=()=>[{name:"Bytes",value:"Bytes"},{name:"KB",value:"KB"},{name:"MB",value:"MB"},{name:"GB",value:"GB"}];return c.jsx(D.FormField,{fieldType:"text",children:c.jsxs("div",{style:{display:"grid",gridTemplateColumns:"250px minmax(200px, auto) minmax(120px, auto)",gap:"20px",alignItems:"center",width:"100%"},children:[c.jsx("div",{children:c.jsx(D.Checkbox,{id:`${t}-filesize-checkbox`,"data-testid":`${t}-checkbox`,label:i(n),checked:p,value:"enabled",disabled:r,onChange:M})}),c.jsx("div",{style:{position:"relative"},children:c.jsx(D.ValueModificator,{id:`${t}-filesize-value-modificator`,"data-testid":`${t}-value-modificator`,value:d,onChange:_,min:0,max:v(),step:S(),disabled:h})}),c.jsx("div",{style:{position:"relative"},children:c.jsx(D.Dropdown,{id:`${t}-unit-dropdown`,"data-testid":`${t}-unit-dropdown`,value:l,onChange:T,options:C(),disabled:h})})]})})}function hq(e){var y,b,g,v,S,w;const{recipeTypeId:t,toEdit:n}=e.options??{},r=R(),{mutate:i,isLoading:s}=Up(t);if(!t)throw new Error("Options missing");const{onClose:o}=e,a=sr({defaultValues:{errorThresholdBytes:((b=(y=n==null?void 0:n.thresholds)==null?void 0:y.error)==null?void 0:b.byteLimit)??void 0,warningThresholdBytes:((v=(g=n==null?void 0:n.thresholds)==null?void 0:g.warning)==null?void 0:v.byteLimit)??void 0},mode:"onChange"}),{formState:{errors:l,isDirty:u,isValid:d}}=a,f=a.watch("warningThresholdBytes"),p=a.watch("errorThresholdBytes");x.useEffect(()=>{a.clearErrors("warningThresholdBytes"),f&&p&&f>=p&&a.setError("warningThresholdBytes",{type:"manual",message:"Warning threshold cannot be higher than or equal to the error threshold"})},[f,p,a]);const h=(w=(S=l.warningThresholdBytes)==null?void 0:S.message)==null?void 0:w.toString();function m(){if(d){const{errorThresholdBytes:_,warningThresholdBytes:T}=a.getValues();i({toUpdate:{thresholds:{error:{byteLimit:_},warning:{byteLimit:T}},excludedSoftwareModuleTypeIds:n==null?void 0:n.excludedSoftwareModuleTypes.map(M=>M.id.toString())}},{onSuccess:()=>{o()}})}}return c.jsxs(D.Dialog,{dialogId:Uv,title:r("RecipeTypes.Validation.ArtifactSize.Popup.Edit.Headline"),onClose:o,modal:!0,open:!0,onKeyUp:_=>{_.key==="Enter"&&m()},children:[c.jsx(_C,{useFormReturn:a,bytesField:"warningThresholdBytes",label:"RecipeTypes.Validation.ArtifactSize.WarningThreshold"}),c.jsx(_C,{useFormReturn:a,bytesField:"errorThresholdBytes",label:"RecipeTypes.Validation.ArtifactSize.ErrorThreshold"}),h&&c.jsx(pe,{error:{message:h}}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:r("Button.Cancel"),mode:"secondary",onClick:o,disabled:s}),c.jsx(D.Button,{label:r("Button.OK"),mode:"primary",onClick:m,disabled:s||!d||!u||h!==void 0})]})]})}function mq(e){const t=e!==void 0,n=t?xt.listCompatibleSoftwareModuleTypes(e):[];return Ht(n,`system-types/${e}/compatible-software-module-types`,"softwareModuleType",{enabled:t})}function gq({systemTypeId:e,alreadyAddedIds:t,onSelected:n}){const r=R(),{data:i,isLoading:s,error:o}=mq(e),{entities:a}=Tt(i);return o?c.jsx(pe,{error:o}):c.jsxs(c.Fragment,{children:[c.jsx(D.FormField,{fieldType:"dropdown",children:c.jsx(mo,{label:r("SoftwareModuleType.Label"),initiallySelected:[],options:t!=null&&t.length?a.filter(l=>l.id===void 0||!t.includes(l.id)):a,getName:l=>l.name??l.key,onChange:l=>n(l)})}),s&&c.jsx(et,{"data-testid":"softwareModuletype-list-loading"})]})}function yq(e){const{recipeTypeId:t,toEdit:n}=e.options??{},r=R(),i=Np(t),[s,o]=x.useState([]),{mutate:a,isLoading:l}=Up(t);if(!t)throw new Error("Options missing");if(i.error)return c.jsx(pe,{error:i.error});if(i.isLoading)return c.jsx(et,{});const{onClose:u}=e;function d(){if(s.length===0)return;const f=(n==null?void 0:n.excludedSoftwareModuleTypes.map(m=>m.id))??[],p=s.map(m=>m.id),h=[...new Set([...f,...p])].map(m=>Number(m)).map(m=>m.toString());a({toUpdate:{thresholds:n==null?void 0:n.thresholds,excludedSoftwareModuleTypeIds:h}},{onSuccess:()=>{u()}})}return c.jsxs(D.Dialog,{dialogId:zv,title:r("RecipeTypes.Validation.ArtifactSize.Popup.Edit.Headline"),onClose:u,modal:!0,open:!0,className:"suggestions-containing-modal",onKeyUp:f=>{f.key==="Enter"&&d()},children:[c.jsx(gq,{systemTypeId:i.data.systemType.id,alreadyAddedIds:n==null?void 0:n.excludedSoftwareModuleTypes.map(f=>f.id),onSelected:f=>o(f??[])}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:r("Button.Cancel"),mode:"secondary",onClick:u,disabled:l}),c.jsx(D.Button,{label:r("Button.OK"),mode:"primary",onClick:d,disabled:l})]})]})}function vq({systemTypeId:e,excludeIds:t,onSelected:n}){const r=R(),{data:i,error:s,isLoading:o}=_v(e),{entities:a}=Tt(i);if(s)return c.jsx(pe,{error:s});const l=a.filter(u=>!t||!t.includes(u.id)).filter(u=>u.targetTypeRef!=null).map(u=>({value:u.id,displayValue:u.name??u.key}));return c.jsxs(c.Fragment,{children:[c.jsx(D.FormField,{fieldType:"dropdown",children:c.jsx(na,{labels:{fieldName:r("ModuleTypes.Label")},options:l,selected:[],onChange:u=>n(u.map(d=>d.value)),loading:o})}),o&&c.jsx(et,{"data-testid":"moduletype-list-loading"})]})}function bq(e){const{recipeTypeId:t,currentlyExcluded:n}=e.options??{},r=R(),i=Np(t),[s,o]=x.useState([]),{mutate:a,isLoading:l}=Qv(t);if(!t)throw new Error("Options missing");if(i.error)return c.jsx(pe,{error:i.error});if(i.isLoading)return c.jsx(et,{});const{onClose:u}=e;function d(){if(s.length===0)return;const f=(n==null?void 0:n.map(h=>h.id))??[],p=[...new Set([...f,...s])];a({toUpdate:{excludedModuleTypeIds:p}},{onSuccess:()=>{u()}})}return c.jsxs(D.Dialog,{dialogId:qv,title:r("RecipeTypes.Validation.DistributionSet.ExcludedModuleTypeList.Popup.Edit.Headline"),onClose:u,modal:!0,open:!0,className:"suggestions-containing-modal",onKeyUp:f=>{f.key==="Enter"&&d()},children:[c.jsx(vq,{systemTypeId:i.data.systemType.id,excludeIds:n==null?void 0:n.map(f=>f.id),onSelected:f=>o(f??[])}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:r("Button.Cancel"),mode:"secondary",onClick:u,disabled:l}),c.jsx(D.Button,{label:r("Button.OK"),mode:"primary",onClick:d,disabled:l})]})]})}function Sq(e){var T;const{recipeTypeId:t,currentRules:n,toEdit:r}=e.options??{},i=R(),{mutate:s,error:o,isLoading:a}=Jv(t);if(!n||!t)throw new Error("Options missing");const{onClose:l}=e,u=r?"edit":"add",d={exposed:(r==null?void 0:r.exposed)??!1,nameValidationRegex:(r==null?void 0:r.nameValidationRegex)??""},f=sr({defaultValues:d,mode:"onChange"}),{formState:{errors:p,isDirty:h,isValid:m},setFocus:y}=f;x.useEffect(()=>{y("nameValidationRegex")},[y,u]);function b(){if(m){const{exposed:M,nameValidationRegex:C}=f.getValues(),k=[...n??[]];if(r){const I=k.findIndex(O=>O.exposed===r.exposed&&O.nameValidationRegex===r.nameValidationRegex);I!==-1&&k.splice(I,1)}k.push({exposed:M,nameValidationRegex:C}),s({ruleEntries:k},{onSuccess:()=>{l()}})}}const g=u==="add"?"RecipeTypes.Validation.TagAssignment.RuleEntryList.Popup.Add.Headline":"RecipeTypes.Validation.TagAssignment.RuleEntryList.Popup.Update.Headline",v=u==="add"?"Button.Add":"Button.OK",S=f.watch("exposed"),w=n.filter(M=>M.exposed===S).map(M=>M.nameValidationRegex),_=()=>{f.trigger().catch(M=>{console.error("Issue validating the input",M)})};return c.jsxs(D.Dialog,{dialogId:Xv,title:i(g),onClose:l,modal:!0,open:!0,onKeyUp:M=>{M.key==="Enter"&&b()},children:[c.jsx(en,{useFormReturn:f,field:"nameValidationRegex",label:"RecipeTypes.Validation.TagAssignment.RuleEntryList.Popup.Field.NameValidationRegex",maxSize:255,notificationText:(T=p==null?void 0:p.nameValidationRegex)==null?void 0:T.message,isRequired:!0,notAllowedDuplicates:w}),c.jsx(D.FormField,{fieldType:"checkbox",children:c.jsx(D.Checkbox,{id:"mandatory",label:i("RecipeTypes.Validation.TagAssignment.RuleEntryList.Popup.Field.Exposed"),...f.register("exposed",{onChange:_})})}),o&&c.jsx(pe,{error:o}),a&&c.jsx(D.ProgressIndicator,{type:"indeterminate"}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:i("Button.Cancel"),mode:"secondary",onClick:l,disabled:a}),c.jsx(D.Button,{label:i(v),mode:"primary",onClick:b,disabled:a||!m||!h})]})]})}const xq=({shell:e,connect:t})=>{e.registerTranslation({en:cq}),e.registerModal(Yv,t(aq)),e.registerModal(Wv,t(lq)),e.registerModal(Hv,t(uq)),e.registerModal(Zv,t(fq)),e.registerModal(Uv,t(hq)),e.registerModal(zv,t(yq)),e.registerModal(qv,t(bq)),e.registerModal(Xv,t(Sq))};function wq(e){var w,_;const t=R(),n=ht(),{onClose:r}=e,{useMetadataPostProps:i,toEdit:s,existingKeys:o}=e.options??{},a=s?"edit":"add",l={key:(s==null?void 0:s.key)??"",value:(s==null?void 0:s.value)??""},u=sr({defaultValues:l,mode:"onChange"}),{formState:{errors:d,isDirty:f,isValid:p},setFocus:h}=u;if(x.useEffect(()=>{h(a==="add"?"key":"value")},[h,a]),!o||!i)throw new Error("Options missing");const{mutate:m,isLoading:y,error:b}=L9(i);function g(){const T=a==="add"?"Info.Metadata.Add.Success":"Info.Metadata.Edit.Success";p&&m(u.getValues(),{onSuccess:()=>{n(t(T)),r()}})}const v=a==="add"?"Metadata.Popup.Add.Headline":"Metadata.Popup.Edit.Headline",S=a==="add"?"Button.Add":"Button.OK";return c.jsxs(D.Dialog,{dialogId:cv,title:t(v),onClose:r,modal:!0,open:!0,onKeyUp:T=>{T.key==="Enter"&&!y&&g()},children:[c.jsx(en,{useFormReturn:u,field:"key",label:"Entity.Label.Key",maxSize:255,notificationText:(w=d==null?void 0:d.key)==null?void 0:w.message,isRequired:!0,notAllowedDuplicates:o,isDisabled:a==="edit",validationPattern:gr()}),c.jsx(en,{useFormReturn:u,field:"value",label:"Entity.Label.Value",maxSize:255,notificationText:(_=d==null?void 0:d.value)==null?void 0:_.message,validationPattern:gr()}),b&&c.jsx(pe,{error:b}),y&&c.jsx(D.ProgressIndicator,{type:"indeterminate"}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:t("Button.Cancel"),mode:"secondary",onClick:r,disabled:y}),c.jsx(D.Button,{label:t(S),mode:"primary",onClick:g,disabled:y||!p||!f})]})]})}const _q=["SUCCESS","ERROR"],kq=new Map([["SUCCESS","SystemAction.Status.Success"],["ERROR","SystemAction.Status.Error"]]);function Dq(e){var v,S;const{onClose:t}=e,n=R(),{systemActionsFilter:r,mergeSystemActionsFilter:i}=Gv(),s=sr({defaultValues:{systemId:$D(r.systemId),recipeId:r.recipeId??[],reportedBy:$D(r.reportedBy),statusCode:(v=r.statusCode)==null?void 0:v.join(","),status:r.status??[],lastReportedAtGreaterThan:r.lastReportedAtGt??null,lastReportedAtLessThan:r.lastReportedAtLt??null},mode:"onChange"}),{getValues:o,setValue:a,setError:l,formState:{errors:u,isDirty:d,isValid:f}}=s,p=()=>{i({systemId:YD(o().systemId),recipeId:o().recipeId,reportedBy:YD(o().reportedBy),statusCode:o().statusCode.split(","),status:o().status,lastReportedAtGt:o().lastReportedAtGreaterThan??null,lastReportedAtLt:o().lastReportedAtLessThan??null}),t()},[h,m]=x.useState(""),y=hl({state:null,tagId:null,typeId:null,search:h}),b={value:/^[0-9,]+$/,message:n("SystemAction.Validator.WrongStatusCodeInput")},g=w=>(_,T)=>{T?a(w,_,{shouldDirty:!0,shouldValidate:!0}):l(w,{type:"manual",message:"Invalid date"})};return c.jsxs(D.Dialog,{dialogId:$v,title:n("SystemAction.Popup.FilterList.Headline"),onClose:t,modal:!0,open:!0,className:"suggestions-containing-modal",onKeyUp:w=>{w.key==="Enter"&&d&&p()},children:[c.jsx(D.FormField,{fieldType:"dropdown",children:c.jsx(mo,{label:n("Entity.Label.Status"),initiallySelected:o().status,options:[..._q],getName:w=>n(kq.get(w)??"Unknown"),onChange:w=>a("status",w,{shouldDirty:!0,shouldValidate:!0})})}),c.jsx(en,{useFormReturn:s,field:"systemId",label:"SystemActions.Label.SystemId",maxSize:255}),c.jsx(ml,{useFormReturn:s,fieldName:"recipeId",label:n("SystemActions.Label.Recipes"),getName:w=>w.name+":"+w.version,onSearch:m,pageCaller:y}),c.jsx(en,{useFormReturn:s,field:"reportedBy",label:"SystemActions.Label.Gateway",maxSize:255}),c.jsx(en,{useFormReturn:s,field:"statusCode",label:"SystemAction.Popup.FilterList.StatusCode",maxSize:255,notificationText:(S=u==null?void 0:u.statusCode)==null?void 0:S.message,validationPattern:b}),c.jsxs("span",{className:"soup-filter-input-row",children:[c.jsx(fl,{label:n("SystemAction.Popup.FilterList.ReportedAtAfter"),textFieldId:"initialReportGt",initialValue:o().lastReportedAtGreaterThan,onChange:g("lastReportedAtGreaterThan"),withPicker:e.withPicker}),c.jsx(fl,{label:n("SystemAction.Popup.FilterList.ReportedAtBefore"),textFieldId:"initialReportLt",initialValue:o().lastReportedAtLessThan,onChange:g("lastReportedAtLessThan"),withPicker:e.withPicker})]}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:n("Button.Cancel"),mode:"secondary",onClick:t}),c.jsx(D.Button,{label:n("Button.Apply"),mode:"primary",onClick:p,disabled:!f||!d})]})]})}const Cq={"SystemActions.UIFeature.Name":"System actions","SystemActions.UIFeature.Description":"Monitor the software update actions that are executed on your systems","SystemActions.List.BladeHeader":"System actions","SystemActions.Details.BladeHeader":"System action","SystemActions.List.Empty":"No actions found","SystemActionsStatus.List.Empty":"No actions status found","SystemActions.Label.ReportedAt":"Reported at","SystemActions.Label.StatusCode":"Status code","SystemActions.Label.Gateway":"Gateway","SystemActions.Label.LastReportedAt":"Last reported at","SystemActions.Label.System":"System","SystemActions.Label.SystemId":"System ID","SystemActions.Label.Recipe":"Recipe","SystemActions.Label.Recipes":"Recipes","SystemActions.Label.ModuleActions":"Module actions","SystemActions.Label.Actions":"Actions","SystemActions.Label.StatusSection":"Status","SystemAction.Status.Success":"Success","SystemAction.Status.Error":"Error","SystemAction.Popup.FilterList.Headline":"Select actions filter","SystemAction.Label.StatusCodes":"Status codes","SystemAction.Popup.FilterList.StatusCode":"Status codes (comma separated)","SystemAction.Popup.FilterList.ReportedAtBefore":"Reported before","SystemAction.Popup.FilterList.ReportedAtAfter":"Reported after","SystemAction.Validator.WrongStatusCodeInput":"Only comma separated numbers are allowed."},Mq=({shell:e,connect:t})=>{e.registerTranslation({en:Cq}),e.registerModal($v,t(Dq))};function kC(e){var g,v,S,w,_,T;const t=R(),{dialogId:n,onConfirm:r,onClose:i,isLoading:s,error:o,toEdit:a}=e,l=a?"edit":"add",u=x.useRef(!1),d=sr({defaultValues:Tq(a),mode:"onChange"}),{formState:{errors:f,isDirty:p,isValid:h}}=d;x.useEffect(()=>{u.current||(d.setFocus("name"),u.current=!0)},[d]);function m(){h&&(r==null||r(d.getValues()))}const y=l==="add"?"ModuleTypes.Popup.Add.Headline":"ModuleTypes.Popup.Edit.Headline",b=l==="add"?"Button.Add":"Button.OK";return c.jsxs(D.Dialog,{dialogId:n,title:t(y),onClose:i,modal:!0,open:!0,onKeyUp:M=>{M.key==="Enter"&&M.ctrlKey&&!s&&m()},children:[c.jsx(en,{useFormReturn:d,field:"key",label:"Entity.Label.Key",maxSize:255,notificationText:(g=f==null?void 0:f.key)==null?void 0:g.message,isRequired:!0,validationPattern:gr()}),c.jsx(en,{useFormReturn:d,field:"name",label:"Entity.Label.Name",maxSize:255,notificationText:(v=f==null?void 0:f.name)==null?void 0:v.message,isRequired:!0,validationPattern:gr()}),c.jsx(en,{useFormReturn:d,field:"moduleQuery",label:"ModuleTypes.Label.Query",maxSize:255,notificationText:(S=f==null?void 0:f.moduleQuery)==null?void 0:S.message,isRequired:!1,validationPattern:Hk()}),c.jsx(en,{useFormReturn:d,field:"moduleCountQuery",label:"ModuleTypes.Label.CountQuery",maxSize:255,notificationText:(w=f==null?void 0:f.moduleCountQuery)==null?void 0:w.message,isRequired:!1,validationPattern:Zk()}),c.jsx(_o,{useFormReturn:d,field:"description",label:"Entity.Label.Description",maxSize:512,notificationText:(T=(_=d.formState.errors)==null?void 0:_.description)==null?void 0:T.message}),c.jsx(D.FormField,{fieldType:"checkbox",children:c.jsx(D.Checkbox,{id:"updatable",label:t("ModuleTypes.Label.Updatable"),...d.register("updatable")})}),o&&c.jsx(pe,{error:o}),s&&c.jsx(D.ProgressIndicator,{type:"indeterminate"}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:t("Button.Cancel"),mode:"secondary",onClick:i,disabled:s}),c.jsx(D.Button,{label:t(b),mode:"primary",onClick:m,disabled:s||!h||!p,id:"recipe-type-modal-form"})]})]})}function Tq(e){return{key:(e==null?void 0:e.key)??"",name:(e==null?void 0:e.name)??"",description:(e==null?void 0:e.description)??"",moduleQuery:(e==null?void 0:e.moduleQuery)??"",moduleCountQuery:(e==null?void 0:e.moduleCountQuery)??"",updatable:e?!!e.targetTypeRef:!0}}function Iq(e){const{onClose:t}=e,n=R(),r=Ke(),i=ht(),s=()=>{i(n("ModuleTypes.Info.Add.Success")),r.invalidateQueries(br.list()),t()},o=()=>{r.invalidateQueries(br.list())},{mutate:a,isLoading:l,error:u}=ki(br.addEntity(),"module-types",o,s),d=f=>{a(f)};return c.jsx(kC,{dialogId:eb,onConfirm:d,onClose:t,isLoading:l,error:u})}function Eq(e){const{onClose:t}=e,{toEdit:n}=e.options??{},r=R(),i=Ke(),s=ht();if(!n)throw new Error("Options missing");const o=()=>{s(r("ModuleTypes.Info.Edit.Success")),i.invalidateQueries(br.all()),t()},a=()=>{i.invalidateQueries(br.all())},{mutate:l,isLoading:u,error:d}=ua(br.updateEntity(),n._links.self.href,a,o),f=p=>{l(p)};return c.jsx(kC,{dialogId:tb,onConfirm:f,onClose:t,isLoading:u,error:d,toEdit:n})}const Rq={"ModuleTypes.List.BladeHeader":"Module types","ModuleTypes.List.Empty":"No module types found","ModuleTypes.Details.BladeHeader":"Module type","ModuleTypes.Details.ActionsMenu.Title":"Module types","ModuleTypes.Details.DefaultQueries.Header":"Default queries","ModuleTypes.Label.TargetType":"Target type","ModuleTypes.Label.Query":"Module query","ModuleTypes.Label.CountQuery":"Count query","ModuleTypes.Label.Updatable":"Updatable","ModuleTypes.Details.DefaultQueries.Label.ModuleQuery":"Module query","ModuleTypes.Details.DefaultQueries.Label.CountQuery":"Count query","ModuleTypes.Info.Add.Success":"Module type successfully added","ModuleTypes.Info.Edit.Success":"Module type successfully updated","ModuleTypes.Info.Delete.Success":"Module type successfully deleted","ModuleTypes.Popup.Add.Headline":"Add module type","ModuleTypes.Popup.Edit.Headline":"Edit module type","ModuleTypes.Popup.Delete.Headline":"Delete module type?","ModuleTypes.Popup.Delete.Info":"This action will delete the module type."},Lq=({shell:e,connect:t})=>{e.registerTranslation({en:Rq}),e.registerModal(eb,t(Iq)),e.registerModal(tb,t(Eq))};function DC(e){var g,v,S,w;const t=R(),{dialogId:n,onConfirm:r,onClose:i,isLoading:s,error:o,toEdit:a}=e,l=a?"edit":"add",u=x.useRef(!1),d=sr({defaultValues:Oq(a),mode:"onChange"}),{formState:{errors:f,isDirty:p,isValid:h}}=d;x.useEffect(()=>{u.current||(d.setFocus("name"),u.current=!0)},[d]);function m(){h&&(r==null||r(d.getValues()))}const y=l==="add"?"SystemTypes.Popup.Add.Headline":"SystemTypes.Popup.Edit.Headline",b=l==="add"?"Button.Add":"Button.OK";return c.jsxs(D.Dialog,{dialogId:n,title:t(y),onClose:i,modal:!0,open:!0,onKeyUp:_=>{_.key==="Enter"&&_.ctrlKey&&!s&&m()},children:[c.jsx(en,{useFormReturn:d,field:"key",label:"Entity.Label.Key",maxSize:255,notificationText:(g=f==null?void 0:f.key)==null?void 0:g.message,isRequired:!0,validationPattern:gr()}),c.jsx(en,{useFormReturn:d,field:"name",label:"Entity.Label.Name",maxSize:255,notificationText:(v=f==null?void 0:f.name)==null?void 0:v.message,isRequired:!0,validationPattern:gr()}),c.jsx(_o,{useFormReturn:d,field:"description",label:"Entity.Label.Description",maxSize:512,notificationText:(w=(S=d.formState.errors)==null?void 0:S.description)==null?void 0:w.message}),o&&c.jsx(pe,{error:o}),s&&c.jsx(D.ProgressIndicator,{type:"indeterminate"}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:t("Button.Cancel"),mode:"secondary",onClick:i,disabled:s}),c.jsx(D.Button,{label:t(b),mode:"primary",onClick:m,disabled:s||!h||!p,id:"recipe-type-modal-form"})]})]})}function Oq(e){return{key:(e==null?void 0:e.key)??"",name:(e==null?void 0:e.name)??"",description:(e==null?void 0:e.description)??""}}function Bq(e){const{onClose:t}=e,n=R(),r=Ke(),i=ht(),s=()=>{i(n("SystemTypes.Info.Add.Success")),r.invalidateQueries(xt.list()),t()},o=()=>{r.invalidateQueries(xt.list())},{mutate:a,isLoading:l,error:u}=ki(xt.addEntity(),"system-types",o,s),d=f=>{a(f)};return c.jsx(DC,{dialogId:ib,onConfirm:d,onClose:t,isLoading:l,error:u})}function Aq(e){const{onClose:t}=e,{toEdit:n}=e.options??{},r=R(),i=Ke(),s=ht();if(!n)throw new Error("Options missing");const o=()=>{s(r("SystemTypes.Info.Edit.Success")),i.invalidateQueries(xt.all()),t()},a=()=>{i.invalidateQueries(xt.all())},{mutate:l,isLoading:u,error:d}=ua(xt.updateEntity(),n._links.self.href,a,o),f=p=>{l(p)};return c.jsx(DC,{dialogId:sb,onConfirm:f,onClose:t,isLoading:u,error:d,toEdit:n})}const Pq={"SystemTypes.List.BladeHeader":"System types","SystemTypes.List.Empty":"No system types found","SystemTypes.Details.BladeHeader":"System type","SystemTypes.Details.ActionsMenu.Title":"System types","SystemTypes.Info.Add.Success":"System type successfully added","SystemTypes.Info.Edit.Success":"System type successfully updated","SystemTypes.Info.Delete.Success":"System type successfully deleted","SystemTypes.Label.SystemDistributionSetTypes":"Compatible distribution set types","SystemTypes.SystemDistributionSetTypes.List.Empty":"No compatible distribution set types assigned","SystemTypes.Label.ModuleTypes":"Included module types","SystemTypes.ModuleTypes.List.Empty":"No module types assigned","SystemTypes.SystemDistributionSetTypes.Popup.Assign.Headline":"Assign system distribution set type","SystemTypes.SystemDistributionSetTypes.Popup.Assign.Success":"System distribution set type successfully assigned","SystemTypes.SystemDistributionSetTypes.Popup.Unassign.Headline":"Unassign compatible distribution set type","SystemTypes.SystemDistributionSetTypes.Popup.Unassign.Message":'Do you want to unassign the "{type}" distribution set type?',"SystemTypes.SystemDistributionSetTypes.Popup.Unassign.Success":"System distribution set type successfully unassigned","SystemTypes.ModuleTypes.Popup.Assign.Headline":"Assign module types","SystemTypes.ModuleTypes.Popup.Assign.Success":"Module type successfully assigned","SystemTypes.ModuleTypes.Popup.Unassign.Headline":"Unassign module type","SystemTypes.ModuleTypes.Popup.Unassign.Message":'Do you want to unassign the "{type}" module type?',"SystemTypes.ModuleTypes.Popup.Unassign.Success":"Module type successfully unassigned","SystemTypes.Popup.Add.Headline":"Add system type","SystemTypes.Popup.Edit.Headline":"Edit system type","SystemTypes.Popup.Delete.Headline":"Delete system type?","SystemTypes.Popup.Delete.Info":"This action will delete the system type.","SystemTypes.Popup.FilterList.Headline":"Select system types filter"};function Nq(e,t){return bv(Sv.list(e),w4,e,t)}const jq="name:ASC",Fq=50;function Gq({alreadyAddedIds:e,onSelected:t}){const{data:n,isLoading:r,error:i}=Nq({limit:Fq,sort:jq,q:["key==*",e&&e.length>0?`id=out=(${e.join(",")})`:void 0].filter(a=>a!==void 0).join(";")},{onError:()=>{}}),{entities:s}=aD(n),o=R();return i?c.jsx(pe,{error:i}):c.jsxs(c.Fragment,{children:[c.jsx(D.FormField,{fieldType:"dropdown",children:c.jsx(mo,{label:o("DistributionSetType.Label"),initiallySelected:[],options:s,getName:a=>a.name??a.key,onChange:a=>t(a)})}),r&&c.jsx(et,{"data-testid":"distributionsettype-list-loading"})]})}function Vq(e){const{onClose:t}=e,{systemType:n,distributionSetTypeRefs:r}=e.options??{},i=R(),s=Ke(),o=ht(),[a,l]=x.useState([]),u=x.useRef(null);if(!n)throw new Error("System type is required");const d=()=>{o(i("SystemTypes.SystemDistributionSetTypes.Popup.Assign.Success")),s.invalidateQueries(xt.listSystemDistributionSetTypes(n.id)),t()},f=()=>{s.invalidateQueries(xt.listSystemDistributionSetTypes(n.id))},{mutate:p,isLoading:h,error:m}=ki(xt.setSystemDistributionSetTypes(n.id),`system-types/${n.id}/system-distribution-set-types`,f,d),y=r?r.map(g=>g.id):[];x.useEffect(()=>{var g;(g=u.current)==null||g.focus()},[]);function b(){if(a.length===0)return;const g=a.map(S=>S.id),v=[...new Set([...y,...g])].map(S=>Number(S));p(v),t()}return c.jsxs(D.Dialog,{dialogId:ob,title:i("SystemTypes.SystemDistributionSetTypes.Popup.Assign.Headline"),onClose:t,modal:!0,open:!0,className:"suggestions-containing-modal",onKeyUp:g=>{g.key==="Enter"&&!h&&a.length>0&&b()},children:[c.jsx(Gq,{alreadyAddedIds:y,onSelected:g=>l(g??[])}),m&&c.jsx(pe,{error:m}),h&&c.jsx(D.ProgressIndicator,{type:"indeterminate"}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:i("Button.Cancel"),mode:"secondary",onClick:t,disabled:h}),c.jsx(D.Button,{label:i("Button.Add"),title:i("Button.Add"),mode:"primary",onClick:b,disabled:h||a.length===0})]})]})}function $q({excludeIds:e,onSelected:t}){const n=R(),[r,i]=x.useState(""),{data:s,isLoading:o,error:a,fetchNextPage:l}=nb({search:r}),{totalCount:u,entities:d}=Tt(s);if(a)return c.jsx(pe,{error:a});const f=d.filter(p=>!(e!=null&&e.includes(p.id))).map(p=>({value:p.id,displayValue:p.name??p.key}));return c.jsxs(c.Fragment,{children:[c.jsx(D.FormField,{fieldType:"dropdown",children:c.jsx(na,{labels:{fieldName:n("ModuleTypes.Label")},options:f,selected:[],onChange:p=>t(p.map(h=>h.value)),paginationOptions:{onSearch:i,onLoadMore:()=>{l()},total:u-((e==null?void 0:e.length)??0)},loading:o})}),o&&c.jsx(et,{"data-testid":"moduletype-list-loading"})]})}function Yq(e){const{onClose:t}=e,{systemType:n,alreadyAssignedModuleTypes:r}=e.options??{},i=R(),s=Ke(),o=ht(),[a,l]=x.useState([]),u=x.useRef(null);if(!n)throw new Error("System type is required");const d=()=>{o(i("SystemTypes.ModuleTypes.Popup.Assign.Success")),s.invalidateQueries(xt.listModuleTypes(n.id)),t()},f=()=>{s.invalidateQueries(xt.listModuleTypes(n.id))},{mutate:p,isLoading:h,error:m}=ki(xt.setModuleTypes(n.id),`system-types/${n.id}/module-types`,f,d),y=r?r.map(g=>g.id):[];x.useEffect(()=>{var g;(g=u.current)==null||g.focus()},[]);function b(){if(a.length===0)return;const g=[...new Set([...y,...a])];p(g),t()}return c.jsxs(D.Dialog,{dialogId:ab,title:i("SystemTypes.ModuleTypes.Popup.Assign.Headline"),onClose:t,modal:!0,open:!0,className:"suggestions-containing-modal",onKeyUp:g=>{g.key==="Enter"&&!h&&a.length>0&&b()},children:[c.jsx($q,{excludeIds:y,onSelected:g=>l(g??[])}),m&&c.jsx(pe,{error:m}),h&&c.jsx(D.ProgressIndicator,{type:"indeterminate"}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:i("Button.Cancel"),mode:"secondary",onClick:t,disabled:h}),c.jsx(D.Button,{label:i("Button.Assign"),title:i("Button.Assign"),mode:"primary",onClick:b,disabled:h||a.length===0})]})]})}function Wq(e){const{onClose:t}=e,n=R(),{systemTypesFilter:r,mergeSystemTypesFilter:i}=zp(),s=sr({defaultValues:{moduleTypeIds:r.moduleTypeIds??[]},mode:"onChange"}),{getValues:o,formState:{isDirty:a,isValid:l}}=s,u=()=>{a&&l&&(i({moduleTypeIds:o().moduleTypeIds}),t())},[d,f]=x.useState(""),p=nb({search:d});return c.jsxs(D.Dialog,{dialogId:lb,title:n("SystemTypes.Popup.FilterList.Headline"),onClose:t,modal:!0,open:!0,className:"suggestions-containing-modal",onKeyUp:h=>{h.key==="Enter"&&a&&u()},children:[c.jsx("span",{className:"soup-filter-input-row",children:c.jsx(ml,{label:n("ModuleTypes.Label"),useFormReturn:s,fieldName:"moduleTypeIds",getName:h=>h.name,onSearch:f,pageCaller:p})}),p.error&&c.jsx(pe,{error:p.error}),c.jsxs(wt,{children:[c.jsx(D.Button,{label:n("Button.Cancel"),mode:"secondary",onClick:t}),c.jsx(D.Button,{label:n("Button.Apply"),mode:"primary",onClick:u,disabled:!a})]})]})}const Hq=({shell:e,connect:t})=>{e.registerTranslation({en:Pq}),e.registerModal(ib,t(Bq)),e.registerModal(sb,t(Aq)),e.registerModal(ob,t(Vq)),e.registerModal(ab,t(Yq)),e.registerModal(lb,t(Wq))};function Zq(e){FH(new kI(lI));const t=$H(e),n=e.createState(t),r=function(s){return JW(n)(GH(s))};e.registerTranslation({en:iI}),e.registerModal(cv,r(wq)),J7(e,r),Uq(e,r,[QW,Hq,Q9,iq,xq,Mq,Lq])}function Uq(e,t,n){return n.map(r=>r({shell:e,connect:t}))}var zq=e=>e!=null,qq=e=>e.filter(zq);function Xq(e){return(...t)=>{for(const n of e)n&&n(...t)}}var Q=e=>typeof e=="function"&&!e.length?e():e,ub=e=>Array.isArray(e)?e:e?[e]:[];function Kq(e,...t){return typeof e=="function"?e(...t):e}var Qq=Fe;function Jq(e,t,n,r){const i=e.length,s=t.length;let o=0;if(!s){for(;o<i;o++)n(e[o]);return}if(!i){for(;o<s;o++)r(t[o]);return}for(;o<s&&t[o]===e[o];o++);let a,l;t=t.slice(o),e=e.slice(o);for(a of t)e.includes(a)||r(a);for(l of e)t.includes(l)||n(l)}function eX(e){const[t,n]=ye(),r=e!=null&&e.throw?(p,h)=>{throw n(p instanceof Error?p:new Error(h)),p}:(p,h)=>{n(p instanceof Error?p:new Error(h))},i=e!=null&&e.api?Array.isArray(e.api)?e.api:[e.api]:[globalThis.localStorage].filter(Boolean),s=e!=null&&e.prefix?`${e.prefix}.`:"",o=new Map,a=new Proxy({},{get(p,h){let m=o.get(h);m||(m=ye(void 0,{equals:!1}),o.set(h,m)),m[0]();const y=i.reduce((b,g)=>{if(b!==null||!g)return b;try{return g.getItem(`${s}${h}`)}catch(v){return r(v,`Error reading ${s}${h} from ${g.name}`),null}},null);return y!==null&&(e!=null&&e.deserializer)?e.deserializer(y,h,e.options):y}}),l=(p,h,m)=>{const y=e!=null&&e.serializer?e.serializer(h,p,m??e.options):h,b=`${s}${p}`;i.forEach(v=>{try{v.getItem(b)!==y&&v.setItem(b,y)}catch(S){r(S,`Error setting ${s}${p} to ${y} in ${v.name}`)}});const g=o.get(p);g&&g[1]()},u=p=>i.forEach(h=>{try{h.removeItem(`${s}${p}`)}catch(m){r(m,`Error removing ${s}${p} from ${h.name}`)}}),d=()=>i.forEach(p=>{try{p.clear()}catch(h){r(h,`Error clearing ${p.name}`)}}),f=()=>{const p={},h=(m,y)=>{if(!p.hasOwnProperty(m)){const b=y&&(e!=null&&e.deserializer)?e.deserializer(y,m,e.options):y;b&&(p[m]=b)}};return i.forEach(m=>{if(typeof m.getAll=="function"){let y;try{y=m.getAll()}catch(b){r(b,`Error getting all values from in ${m.name}`)}for(const b of y)h(b,y[b])}else{let y=0,b;try{for(;b=m.key(y++);)p.hasOwnProperty(b)||h(b,m.getItem(b))}catch(g){r(g,`Error getting all values from ${m.name}`)}}}),p};return(e==null?void 0:e.sync)!==!1&&xo(()=>{const p=h=>{var y;let m=!1;i.forEach(b=>{try{b!==h.storageArea&&h.key&&h.newValue!==b.getItem(h.key)&&(h.newValue?b.setItem(h.key,h.newValue):b.removeItem(h.key),m=!0)}catch(g){r(g,`Error synching api ${b.name} from storage event (${h.key}=${h.newValue})`)}}),m&&h.key&&((y=o.get(h.key))==null||y[1]())};"addEventListener"in globalThis?(globalThis.addEventListener("storage",p),Fe(()=>globalThis.removeEventListener("storage",p))):(i.forEach(h=>{var m;return(m=h.addEventListener)==null?void 0:m.call(h,"storage",p)}),Fe(()=>i.forEach(h=>{var m;return(m=h.removeEventListener)==null?void 0:m.call(h,"storage",p)})))}),[a,l,{clear:d,error:t,remove:u,toJSON:f}]}var tX=eX,nX=e=>(typeof e.clear=="function"||(e.clear=()=>{let t;for(;t=e.key(0);)e.removeItem(t)}),e),CC=e=>{if(!e)return"";let t="";for(const n in e){if(!e.hasOwnProperty(n))continue;const r=e[n];t+=r instanceof Date?`; ${n}=${r.toUTCString()}`:typeof r=="boolean"?`; ${n}`:`; ${n}=${r}`}return t},ri=nX({_cookies:[globalThis.document,"cookie"],getItem:e=>{var t;return((t=ri._cookies[0][ri._cookies[1]].match("(^|;)\\s*"+e+"\\s*=\\s*([^;]+)"))==null?void 0:t.pop())??null},setItem:(e,t,n)=>{const r=ri.getItem(e);ri._cookies[0][ri._cookies[1]]=`${e}=${t}${CC(n)}`;const i=Object.assign(new Event("storage"),{key:e,oldValue:r,newValue:t,url:globalThis.document.URL,storageArea:ri});window.dispatchEvent(i)},removeItem:e=>{ri._cookies[0][ri._cookies[1]]=`${e}=deleted${CC({expires:new Date(0)})}`},key:e=>{let t=null,n=0;return ri._cookies[0][ri._cookies[1]].replace(/(?:^|;)\s*(.+?)\s*=\s*[^;]+/g,(r,i)=>(!t&&i&&n++===e&&(t=i),"")),t},get length(){let e=0;return ri._cookies[0][ri._cookies[1]].replace(/(?:^|;)\s*.+?\s*=\s*[^;]+/g,t=>(e+=t?1:0,"")),e}}),rX=1024,Cl=796,MC=700,iX="bottom-right",db="bottom",sX="system",oX=!1,TC=500,aX=500,IC=500,lX=Object.keys(Gy)[0],EC=1,cX=Object.keys(Vy)[0],RC=Gn({client:void 0,onlineManager:void 0,queryFlavor:"",version:"",shadowDOMTarget:void 0});function Ae(){return Vn(RC)}var LC=Gn(void 0),uX=e=>{const[t,n]=ye(null),r=()=>{const o=t();o!=null&&(o.close(),n(null))},i=(o,a)=>{if(t()!=null)return;const l=window.open("","TSQD-Devtools-Panel",`width=${o},height=${a},popup`);if(!l)throw new Error("Failed to open popup. Please allow popups for this site to view the devtools in picture-in-picture mode.");l.document.head.innerHTML="",l.document.body.innerHTML="",F5(l.document),l.document.title="TanStack Query Devtools",l.document.body.style.margin="0",l.addEventListener("pagehide",()=>{e.setLocalStore("pip_open","false"),n(null)}),[...(Ae().shadowDOMTarget||document).styleSheets].forEach(u=>{try{const d=[...u.cssRules].map(m=>m.cssText).join(""),f=document.createElement("style"),p=u.ownerNode;let h="";p&&"id"in p&&(h=p.id),h&&f.setAttribute("id",h),f.textContent=d,l.document.head.appendChild(f)}catch{const f=document.createElement("link");if(u.href==null)return;f.rel="stylesheet",f.type=u.type,f.media=u.media.toString(),f.href=u.href,l.document.head.appendChild(f)}}),Mp(["focusin","focusout","pointermove","keydown","pointerdown","pointerup","click","mousedown","input"],l.document),e.setLocalStore("pip_open","true"),n(l)};Be(()=>{(e.localStore.pip_open??"false")==="true"&&!e.disabled&&i(Number(window.innerWidth),Number(e.localStore.height||aX))}),Be(()=>{const o=(Ae().shadowDOMTarget||document).querySelector("#_goober"),a=t();if(o&&a){const l=new MutationObserver(()=>{const u=(Ae().shadowDOMTarget||a.document).querySelector("#_goober");u&&(u.textContent=o.textContent)});l.observe(o,{childList:!0,subtree:!0,characterDataOldValue:!0}),Fe(()=>{l.disconnect()})}});const s=z(()=>({pipWindow:t(),requestPipWindow:i,closePipWindow:r,disabled:e.disabled??!1}));return B(LC.Provider,{value:s,get children(){return e.children}})},fb=()=>z(()=>{const t=Vn(LC);if(!t)throw new Error("usePiPWindow must be used within a PiPProvider");return t()}),OC=Gn(()=>"dark");function $n(){return Vn(OC)}var BC={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},dX=Object.keys(BC).join("|"),fX=new RegExp(dX,"g");function pX(e){return e.replace(fX,t=>BC[t])}var Sr={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function AC(e,t,n){var r;if(n=n||{},n.threshold=(r=n.threshold)!=null?r:Sr.MATCHES,!n.accessors){const o=PC(e,t,n);return{rankedValue:e,rank:o,accessorIndex:-1,accessorThreshold:n.threshold,passed:o>=n.threshold}}const i=yX(e,n.accessors),s={rankedValue:e,rank:Sr.NO_MATCH,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let o=0;o<i.length;o++){const a=i[o];let l=PC(a.itemValue,t,n);const{minRanking:u,maxRanking:d,threshold:f=n.threshold}=a.attributes;l<u&&l>=Sr.MATCHES?l=u:l>d&&(l=d),l=Math.min(l,d),l>=f&&l>s.rank&&(s.rank=l,s.passed=!0,s.accessorIndex=o,s.accessorThreshold=f,s.rankedValue=a.itemValue)}return s}function PC(e,t,n){return e=NC(e,n),t=NC(t,n),t.length>e.length?Sr.NO_MATCH:e===t?Sr.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase(),t=t.toLowerCase(),e===t?Sr.EQUAL:e.startsWith(t)?Sr.STARTS_WITH:e.includes(` ${t}`)?Sr.WORD_STARTS_WITH:e.includes(t)?Sr.CONTAINS:t.length===1?Sr.NO_MATCH:hX(e).includes(t)?Sr.ACRONYM:mX(e,t))}function hX(e){let t="";return e.split(" ").forEach(r=>{r.split("-").forEach(s=>{t+=s.substr(0,1)})}),t}function mX(e,t){let n=0,r=0;function i(l,u,d){for(let f=d,p=u.length;f<p;f++)if(u[f]===l)return n+=1,f+1;return-1}function s(l){const u=1/l,d=n/t.length;return Sr.MATCHES+d*u}const o=i(t[0],e,0);if(o<0)return Sr.NO_MATCH;r=o;for(let l=1,u=t.length;l<u;l++){const d=t[l];if(r=i(d,e,r),!(r>-1))return Sr.NO_MATCH}const a=r-o;return s(a)}function NC(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=pX(e)),e}function gX(e,t){let n=t;typeof t=="object"&&(n=t.accessor);const r=n(e);return r==null?[]:Array.isArray(r)?r:[String(r)]}function yX(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const s=t[r],o=vX(s),a=gX(e,s);for(let l=0,u=a.length;l<u;l++)n.push({itemValue:a[l],attributes:o})}return n}var jC={maxRanking:1/0,minRanking:-1/0};function vX(e){return typeof e=="function"?jC:{...jC,...e}}var bX={data:""},SX=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||bX,xX=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,wX=/\/\*[^]*?\*\/| +/g,FC=/\n+/g,va=(e,t)=>{let n="",r="",i="";for(let s in e){let o=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+o+";":r+=s[1]=="f"?va(o,s):s+"{"+va(o,s[1]=="k"?"":t)+"}":typeof o=="object"?r+=va(o,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):s):o!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=va.p?va.p(s,o):s+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},$s={},GC=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+GC(e[n]);return t}return e},_X=(e,t,n,r,i)=>{let s=GC(e),o=$s[s]||($s[s]=(l=>{let u=0,d=11;for(;u<l.length;)d=101*d+l.charCodeAt(u++)>>>0;return"go"+d})(s));if(!$s[o]){let l=s!==e?e:(u=>{let d,f,p=[{}];for(;d=xX.exec(u.replace(wX,""));)d[4]?p.shift():d[3]?(f=d[3].replace(FC," ").trim(),p.unshift(p[0][f]=p[0][f]||{})):p[0][d[1]]=d[2].replace(FC," ").trim();return p[0]})(e);$s[o]=va(i?{["@keyframes "+o]:l}:l,n?"":"."+o)}let a=n&&$s.g?$s.g:null;return n&&($s.g=$s[o]),((l,u,d,f)=>{f?u.data=u.data.replace(f,l):u.data.indexOf(l)===-1&&(u.data=d?l+u.data:u.data+l)})($s[o],t,r,a),o},kX=(e,t,n)=>e.reduce((r,i,s)=>{let o=t[s];if(o&&o.call){let a=o(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;o=l?"."+l:a&&typeof a=="object"?a.props?"":va(a,""):a===!1?"":a}return r+i+(o??"")},"");function ot(e){let t=this||{},n=e.call?e(t.p):e;return _X(n.unshift?n.raw?kX(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,SX(t.target),t.g,t.o,t.k)}ot.bind({g:1}),ot.bind({k:1});function VC(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=VC(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function he(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=VC(e))&&(r&&(r+=" "),r+=t);return r}function DX(e,t){const n=on(e),{onChange:r}=t;let i=new Set(t.appear?void 0:n);const s=new WeakSet,[o,a]=ye([],{equals:!1}),[l]=h5(),u=f=>{a(p=>(p.push.apply(p,f),p));for(const p of f)s.delete(p)},d=(f,p,h)=>f.splice(h,0,p);return z(f=>{const p=o(),h=e();if(h[vp],on(l))return l(),f;if(p.length){const m=f.filter(y=>!p.includes(y));return p.length=0,r({list:m,added:[],removed:[],unchanged:m,finishRemoved:u}),m}return on(()=>{const m=new Set(h),y=h.slice(),b=[],g=[],v=[];for(const w of h)(i.has(w)?v:b).push(w);let S=!b.length;for(let w=0;w<f.length;w++){const _=f[w];m.has(_)||(s.has(_)||(g.push(_),s.add(_)),d(y,_,w)),S&&_!==y[w]&&(S=!1)}return!g.length&&S?f:(r({list:y,added:b,removed:g,unchanged:v,finishRemoved:u}),i=m,y)})},t.appear?[]:n.slice())}function lr(...e){return Xq(e)}var $C=e=>e instanceof Element;function pb(e,t){if(t(e))return e;if(typeof e=="function"&&!e.length)return pb(e(),t);if(Array.isArray(e)){const n=[];for(const r of e){const i=pb(r,t);i&&(Array.isArray(i)?n.push.apply(n,i):n.push(i))}return n.length?n:null}return null}function CX(e,t=$C,n=$C){const r=z(e),i=z(()=>pb(r(),t));return i.toArray=()=>{const s=i();return Array.isArray(s)?s:s?[s]:[]},i}function MX(e){return z(()=>{const t=e.name||"s";return{enterActive:(e.enterActiveClass||t+"-enter-active").split(" "),enter:(e.enterClass||t+"-enter").split(" "),enterTo:(e.enterToClass||t+"-enter-to").split(" "),exitActive:(e.exitActiveClass||t+"-exit-active").split(" "),exit:(e.exitClass||t+"-exit").split(" "),exitTo:(e.exitToClass||t+"-exit-to").split(" "),move:(e.moveClass||t+"-move").split(" ")}})}function YC(e){requestAnimationFrame(()=>requestAnimationFrame(e))}function TX(e,t,n,r){const{onBeforeEnter:i,onEnter:s,onAfterEnter:o}=t;i==null||i(n),n.classList.add(...e.enter),n.classList.add(...e.enterActive),queueMicrotask(()=>{if(!n.parentNode)return r==null?void 0:r();s==null||s(n,()=>a())}),YC(()=>{n.classList.remove(...e.enter),n.classList.add(...e.enterTo),(!s||s.length<2)&&(n.addEventListener("transitionend",a),n.addEventListener("animationend",a))});function a(l){(!l||l.target===n)&&(n.removeEventListener("transitionend",a),n.removeEventListener("animationend",a),n.classList.remove(...e.enterActive),n.classList.remove(...e.enterTo),o==null||o(n))}}function IX(e,t,n,r){const{onBeforeExit:i,onExit:s,onAfterExit:o}=t;if(!n.parentNode)return r==null?void 0:r();i==null||i(n),n.classList.add(...e.exit),n.classList.add(...e.exitActive),s==null||s(n,()=>a()),YC(()=>{n.classList.remove(...e.exit),n.classList.add(...e.exitTo),(!s||s.length<2)&&(n.addEventListener("transitionend",a),n.addEventListener("animationend",a))});function a(l){(!l||l.target===n)&&(r==null||r(),n.removeEventListener("transitionend",a),n.removeEventListener("animationend",a),n.classList.remove(...e.exitActive),n.classList.remove(...e.exitTo),o==null||o(n))}}var WC=e=>{const t=MX(e);return DX(CX(()=>e.children).toArray,{appear:e.appear,onChange({added:n,removed:r,finishRemoved:i,list:s}){const o=t();for(const l of n)TX(o,e,l);const a=[];for(const l of s)l.isConnected&&(l instanceof HTMLElement||l instanceof SVGElement)&&a.push({el:l,rect:l.getBoundingClientRect()});queueMicrotask(()=>{const l=[];for(const{el:u,rect:d}of a)if(u.isConnected){const f=u.getBoundingClientRect(),p=d.left-f.left,h=d.top-f.top;(p||h)&&(u.style.transform=`translate(${p}px, ${h}px)`,u.style.transitionDuration="0s",l.push(u))}document.body.offsetHeight;for(const u of l){let d=function(f){(f.target===u||/transform$/.test(f.propertyName))&&(u.removeEventListener("transitionend",d),u.classList.remove(...o.move))};u.classList.add(...o.move),u.style.transform=u.style.transitionDuration="",u.addEventListener("transitionend",d)}});for(const l of r)IX(o,e,l,()=>i([l]))}})},hb=Symbol("fallback");function HC(e){for(const t of e)t.dispose()}function EX(e,t,n,r={}){const i=new Map;return Fe(()=>HC(i.values())),()=>{const o=e()||[];return o[vp],on(()=>{var d,f;if(!o.length)return HC(i.values()),i.clear(),r.fallback?[js(h=>(i.set(hb,{dispose:h}),r.fallback()))]:[];const a=new Array(o.length),l=i.get(hb);if(!i.size||l){l==null||l.dispose(),i.delete(hb);for(let p=0;p<o.length;p++){const h=o[p],m=t(h,p);s(a,h,p,m)}return a}const u=new Set(i.keys());for(let p=0;p<o.length;p++){const h=o[p],m=t(h,p);u.delete(m);const y=i.get(m);y?(a[p]=y.mapped,(d=y.setIndex)==null||d.call(y,p),y.setItem(()=>h)):s(a,h,p,m)}for(const p of u)(f=i.get(p))==null||f.dispose(),i.delete(p);return a})};function s(o,a,l,u){js(d=>{const[f,p]=ye(a),h={setItem:p,dispose:d};if(n.length>1){const[m,y]=ye(l);h.setIndex=y,h.mapped=n(f,m)}else h.mapped=n(f);i.set(u,h),o[l]=h.mapped})}}function qp(e){const{by:t}=e;return z(EX(()=>e.each,typeof t=="function"?t:n=>n[t],e.children,"fallback"in e?{fallback:()=>e.fallback}:void 0))}function RX(e,t,n,r){return e.addEventListener(t,n,r),Qq(e.removeEventListener.bind(e,t,n,r))}function LX(e,t,n,r){const i=()=>{ub(Q(e)).forEach(s=>{s&&ub(Q(t)).forEach(o=>RX(s,o,n,r))})};typeof e=="function"?Be(i):Oe(i)}function OX(e,t){const n=new ResizeObserver(e);return Fe(n.disconnect.bind(n)),{observe:r=>n.observe(r,t),unobserve:n.unobserve.bind(n)}}function BX(e,t,n){const r=new WeakMap,{observe:i,unobserve:s}=OX(o=>{for(const a of o){const{contentRect:l,target:u}=a,d=Math.round(l.width),f=Math.round(l.height),p=r.get(u);(!p||p.width!==d||p.height!==f)&&(t(l,u,a),r.set(u,{width:d,height:f}))}},n);Be(o=>{const a=qq(ub(Q(e)));return Jq(a,o,i,s),a},[])}var AX=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function ZC(e){const t={};let n;for(;n=AX.exec(e);)t[n[1]]=n[2];return t}function Xp(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=ZC(e)}else typeof t=="string"&&(t=ZC(t));return{...e,...t}}function PX(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function mb(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function NX(e){return typeof e=="number"}function Ml(e){return Object.prototype.toString.call(e)==="[object String]"}function jX(e){return typeof e=="function"}function Yu(e){return t=>`${e()}-${t}`}function ii(e,t){return e?e===t||e.contains(t):!1}function Wu(e,t=!1){const{activeElement:n}=es(e);if(!(n!=null&&n.nodeName))return null;if(UC(n)&&n.contentDocument)return Wu(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const i=es(n).getElementById(r);if(i)return i}}return n}function FX(e){return es(e).defaultView||window}function es(e){return e?e.ownerDocument||e:document}function UC(e){return e.tagName==="IFRAME"}var gb=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(gb||{});function yb(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)==null?void 0:t.platform)||window.navigator.platform):!1}function Kp(){return yb(/^Mac/i)}function GX(){return yb(/^iPhone/i)}function VX(){return yb(/^iPad/i)||Kp()&&navigator.maxTouchPoints>1}function $X(){return GX()||VX()}function YX(){return Kp()||$X()}function nn(e,t){return t&&(jX(t)?t(e):t[0](t[1],e)),e==null?void 0:e.defaultPrevented}function An(e){return t=>{for(const n of e)nn(t,n)}}function WX(e){return Kp()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function er(e){if(e)if(HX())e.focus({preventScroll:!0});else{const t=ZX(e);e.focus(),UX(t)}}var Qp=null;function HX(){if(Qp==null){Qp=!1;try{document.createElement("div").focus({get preventScroll(){return Qp=!0,!0}})}catch{}}return Qp}function ZX(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function UX(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var zC=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],zX=[...zC,'[tabindex]:not([tabindex="-1"]):not([disabled])'],vb=zC.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])",qX=zX.join(':not([hidden]):not([tabindex="-1"]),');function qC(e,t){const r=Array.from(e.querySelectorAll(vb)).filter(XC);return t&&XC(e)&&r.unshift(e),r.forEach((i,s)=>{if(UC(i)&&i.contentDocument){const o=i.contentDocument.body,a=qC(o,!1);r.splice(s,1,...a)}}),r}function XC(e){return KC(e)&&!XX(e)}function KC(e){return e.matches(vb)&&bb(e)}function XX(e){return parseInt(e.getAttribute("tabindex")||"0",10)<0}function bb(e,t){return e.nodeName!=="#comment"&&KX(e)&&QX(e,t)&&(!e.parentElement||bb(e.parentElement,e))}function KX(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:i}=e.ownerDocument.defaultView,{display:s,visibility:o}=i(e);r=s!=="none"&&o!=="hidden"&&o!=="collapse"}return r}function QX(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function JX(e,t,n){const r=t!=null&&t.tabbable?qX:vb,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(s){var o;return(o=t==null?void 0:t.from)!=null&&o.contains(s)?NodeFilter.FILTER_REJECT:s.matches(r)&&bb(s)&&(!(t!=null&&t.accept)||t.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(i.currentNode=t.from),i}function QC(e){for(;e&&!eK(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function eK(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function tK(){}function nK(e,t){const[n,r]=e;let i=!1;const s=t.length;for(let o=s,a=0,l=o-1;a<o;l=a++){const[u,d]=t[a],[f,p]=t[l],[,h]=t[l===0?o-1:l-1]||[0,0],m=(d-p)*(n-u)-(u-f)*(r-d);if(p<d){if(r>=p&&r<d){if(m===0)return!0;m>0&&(r===p?r>h&&(i=!i):i=!i)}}else if(d<p){if(r>d&&r<=p){if(m===0)return!0;m<0&&(r===p?r<h&&(i=!i):i=!i)}}else if(r==d&&(n>=f&&n<=u||n>=u&&n<=f))return!0}return i}function mt(e,t){return Xe(e,t)}var Hu=new Map,JC=new Set;function eM(){if(typeof window>"u")return;const e=n=>{if(!n.target)return;let r=Hu.get(n.target);r||(r=new Set,Hu.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=Hu.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),Hu.delete(n.target)),Hu.size===0)){for(const i of JC)i();JC.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?eM():document.addEventListener("DOMContentLoaded",eM));function Sb(e,t){const n=tM(e,t,"left"),r=tM(e,t,"top"),i=t.offsetWidth,s=t.offsetHeight;let o=e.scrollLeft,a=e.scrollTop;const l=o+e.offsetWidth,u=a+e.offsetHeight;n<=o?o=n:n+i>l&&(o+=n+i-l),r<=a?a=r:r+s>u&&(a+=r+s-u),e.scrollLeft=o,e.scrollTop=a}function tM(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function rK(e,t){var n,r;if(document.contains(e)){const i=document.scrollingElement||document.documentElement;if(window.getComputedStyle(i).overflow==="hidden"){let o=QC(e);for(;e&&o&&e!==i&&o!==i;)Sb(o,e),e=o,o=QC(e)}else{const{left:o,top:a}=e.getBoundingClientRect();(n=e==null?void 0:e.scrollIntoView)==null||n.call(e,{block:"nearest"});const{left:l,top:u}=e.getBoundingClientRect();(Math.abs(o-l)>1||Math.abs(a-u)>1)&&((r=e.scrollIntoView)==null||r.call(e,{block:"nearest"}))}}}var nM={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"};function si(e){return t=>(e(t),()=>e(void 0))}function Jp(e,t){const[n,r]=ye(rM(t==null?void 0:t()));return Be(()=>{var i;r(((i=e())==null?void 0:i.tagName.toLowerCase())||rM(t==null?void 0:t()))}),n}function rM(e){return Ml(e)?e:void 0}function rn(e){const[t,n]=Ct(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return B(X5,Xe(n,{get component(){return t.as}}))}var iK=["id","name","validationState","required","disabled","readOnly"];function sK(e){const t=`form-control-${Kr()}`,n=mt({id:t},e),[r,i]=ye(),[s,o]=ye(),[a,l]=ye(),[u,d]=ye(),f=(y,b,g)=>{const v=g!=null||r()!=null;return[g,r(),v&&b!=null?y:void 0].filter(Boolean).join(" ")||void 0},p=y=>[a(),u(),y].filter(Boolean).join(" ")||void 0,h=z(()=>({"data-valid":Q(n.validationState)==="valid"?"":void 0,"data-invalid":Q(n.validationState)==="invalid"?"":void 0,"data-required":Q(n.required)?"":void 0,"data-disabled":Q(n.disabled)?"":void 0,"data-readonly":Q(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>Q(n.name)??Q(n.id),dataset:h,validationState:()=>Q(n.validationState),isRequired:()=>Q(n.required),isDisabled:()=>Q(n.disabled),isReadOnly:()=>Q(n.readOnly),labelId:r,fieldId:s,descriptionId:a,errorMessageId:u,getAriaLabelledBy:f,getAriaDescribedBy:p,generateId:Yu(()=>Q(n.id)),registerLabel:si(i),registerField:si(o),registerDescription:si(l),registerErrorMessage:si(d)}}}var iM=Gn();function Zu(){const e=Vn(iM);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function sM(e){const t=Zu(),n=mt({id:t.generateId("description")},e);return Be(()=>Fe(t.registerDescription(n.id))),B(rn,Xe({as:"div"},()=>t.dataset(),n))}function oM(e){const t=Zu(),n=mt({id:t.generateId("error-message")},e),[r,i]=Ct(n,["forceMount"]),s=()=>t.validationState()==="invalid";return Be(()=>{s()&&Fe(t.registerErrorMessage(i.id))}),B(Re,{get when(){return r.forceMount||s()},get children(){return B(rn,Xe({as:"div"},()=>t.dataset(),i))}})}function oK(e){let t;const n=Zu(),r=mt({id:n.generateId("label")},e),[i,s]=Ct(r,["ref"]),o=Jp(()=>t,()=>"label");return Be(()=>Fe(n.registerLabel(s.id))),B(rn,Xe({as:"label",ref(a){const l=lr(u=>t=u,i.ref);typeof l=="function"&&l(a)},get for(){return z(()=>o()==="label")()?n.fieldId():void 0}},()=>n.dataset(),s))}function aK(e,t){Be(Fs(e,n=>{if(n==null)return;const r=lK(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),Fe(()=>{r.removeEventListener("reset",t)}))}))}function lK(e){return cK(e)?e.form:e.closest("form")}function cK(e){return e.matches("textarea, input, select, button")}function Uu(e){var o;const[t,n]=ye((o=e.defaultValue)==null?void 0:o.call(e)),r=z(()=>{var a;return((a=e.value)==null?void 0:a.call(e))!==void 0}),i=z(()=>{var a;return r()?(a=e.value)==null?void 0:a.call(e):t()});return[i,a=>{on(()=>{var u;const l=Kq(a,i());return Object.is(l,i())||(r()||n(l),(u=e.onChange)==null||u.call(e,l)),l})}]}function aM(e){const[t,n]=Uu(e);return[()=>t()??!1,n]}function uK(e){const[t,n]=Uu(e);return[()=>t()??[],n]}function dK(e={}){const[t,n]=aM({value:()=>Q(e.isSelected),defaultValue:()=>!!Q(e.defaultIsSelected),onChange:s=>{var o;return(o=e.onSelectedChange)==null?void 0:o.call(e,s)}});return{isSelected:t,setIsSelected:s=>{!Q(e.isReadOnly)&&!Q(e.isDisabled)&&n(s)},toggle:()=>{!Q(e.isReadOnly)&&!Q(e.isDisabled)&&n(!t())}}}var fK=Object.defineProperty,eh=(e,t)=>{for(var n in t)fK(e,n,{get:t[n],enumerable:!0})},lM=Gn();function cM(){return Vn(lM)}function pK(){const e=cM();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function uM(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function hK(e,t){var i;const n=t.ref();if(!n)return-1;let r=e.length;if(!r)return-1;for(;r--;){const s=(i=e[r])==null?void 0:i.ref();if(s&&uM(s,n))return r+1}return 0}function mK(e){const t=e.map((r,i)=>[i,r]);let n=!1;return t.sort(([r,i],[s,o])=>{const a=i.ref(),l=o.ref();return a===l||!a||!l?0:uM(a,l)?(r>s&&(n=!0),-1):(r<s&&(n=!0),1)}),n?t.map(([r,i])=>i):e}function dM(e,t){const n=mK(e);e!==n&&t(n)}function gK(e){var i,s;const t=e[0],n=(i=e[e.length-1])==null?void 0:i.ref();let r=(s=t==null?void 0:t.ref())==null?void 0:s.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return es(r).body}function yK(e,t){Be(()=>{const n=setTimeout(()=>{dM(e(),t)});Fe(()=>clearTimeout(n))})}function vK(e,t){if(typeof IntersectionObserver!="function"){yK(e,t);return}let n=[];Be(()=>{const r=()=>{const o=!!n.length;n=e(),o&&dM(e(),t)},i=gK(e()),s=new IntersectionObserver(r,{root:i});for(const o of e()){const a=o.ref();a&&s.observe(a)}Fe(()=>s.disconnect())})}function bK(e={}){const[t,n]=uK({value:()=>Q(e.items),onChange:s=>{var o;return(o=e.onItemsChange)==null?void 0:o.call(e,s)}});vK(t,n);const r=s=>(n(o=>{const a=hK(o,s);return PX(o,s,a)}),()=>{n(o=>{const a=o.filter(l=>l.ref()!==s.ref());return o.length===a.length?o:a})});return{DomCollectionProvider:s=>B(lM.Provider,{value:{registerItem:r},get children(){return s.children}})}}function SK(e){const t=pK(),n=mt({shouldRegisterItem:!0},e);Be(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());Fe(r)})}function fM(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],i=l=>{if(l==null)return"";const u=e.getKey??"key",d=Ml(u)?l[u]:u(l);return d!=null?String(d):""},s=l=>{if(l==null)return"";const u=e.getTextValue??"textValue",d=Ml(u)?l[u]:u(l);return d!=null?String(d):""},o=l=>{if(l==null)return!1;const u=e.getDisabled??"disabled";return(Ml(u)?l[u]:u(l))??!1},a=l=>{var u;if(l!=null)return Ml(e.getSectionChildren)?l[e.getSectionChildren]:(u=e.getSectionChildren)==null?void 0:u.call(e,l)};for(const l of e.dataSource){if(Ml(l)||NX(l)){r.push({type:"item",rawValue:l,key:String(l),textValue:String(l),disabled:o(l),level:n,index:t}),t++;continue}if(a(l)!=null){r.push({type:"section",rawValue:l,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const u=a(l)??[];if(u.length>0){const d=fM({dataSource:u,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...d),t+=d.length}}else r.push({type:"item",rawValue:l,key:i(l),textValue:s(l),disabled:o(l),level:n,index:t}),t++}return r}function xK(e,t=[]){return z(()=>{const n=fM({dataSource:Q(e.dataSource),getKey:Q(e.getKey),getTextValue:Q(e.getTextValue),getDisabled:Q(e.getDisabled),getSectionChildren:Q(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}var wK=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),_K=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function kK(e){if(Intl.Locale){const n=new Intl.Locale(e).maximize().script??"";return wK.has(n)}const t=e.split("-")[0];return _K.has(t)}function DK(e){return kK(e)?"rtl":"ltr"}function pM(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";return{locale:e,direction:DK(e)}}var xb=pM(),zu=new Set;function hM(){xb=pM();for(const e of zu)e(xb)}function CK(){const[e,t]=ye(xb),n=z(()=>e());return xo(()=>{zu.size===0&&window.addEventListener("languagechange",hM),zu.add(t),Fe(()=>{zu.delete(t),zu.size===0&&window.removeEventListener("languagechange",hM)})}),{locale:()=>n().locale,direction:()=>n().direction}}var MK=Gn();function To(){const e=CK();return Vn(MK)||e}var wb=new Map;function TK(e){const{locale:t}=To(),n=z(()=>t()+(e?Object.entries(e).sort((r,i)=>r[0]<i[0]?-1:1).join():""));return z(()=>{const r=n();let i;return wb.has(r)&&(i=wb.get(r)),i||(i=new Intl.Collator(t(),e),wb.set(r,i)),i})}var Ys=class rI extends Set{constructor(n,r,i){super(n);me(this,"anchorKey");me(this,"currentKey");n instanceof rI?(this.anchorKey=r||n.anchorKey,this.currentKey=i||n.currentKey):(this.anchorKey=r,this.currentKey=i)}};function IK(e){const[t,n]=Uu(e);return[()=>t()??new Ys,n]}function mM(e){return YX()?e.altKey:e.ctrlKey}function Tl(e){return Kp()?e.metaKey:e.ctrlKey}function gM(e){return new Ys(e)}function EK(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function RK(e){const t=mt({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=ye(!1),[i,s]=ye(),o=z(()=>{const y=Q(t.selectedKeys);return y!=null?gM(y):y}),a=z(()=>{const y=Q(t.defaultSelectedKeys);return y!=null?gM(y):new Ys}),[l,u]=IK({value:o,defaultValue:a,onChange:y=>{var b;return(b=t.onSelectionChange)==null?void 0:b.call(t,y)}}),[d,f]=ye(Q(t.selectionBehavior)),p=()=>Q(t.selectionMode),h=()=>Q(t.disallowEmptySelection)??!1,m=y=>{(Q(t.allowDuplicateSelectionEvents)||!EK(y,l()))&&u(y)};return Be(()=>{const y=l();Q(t.selectionBehavior)==="replace"&&d()==="toggle"&&typeof y=="object"&&y.size===0&&f("replace")}),Be(()=>{f(Q(t.selectionBehavior)??"toggle")}),{selectionMode:p,disallowEmptySelection:h,selectionBehavior:d,setSelectionBehavior:f,isFocused:n,setFocused:r,focusedKey:i,setFocusedKey:s,selectedKeys:l,setSelectedKeys:m}}function LK(e){const[t,n]=ye(""),[r,i]=ye(-1);return{typeSelectHandlers:{onKeyDown:o=>{var p;if(Q(e.isDisabled))return;const a=Q(e.keyboardDelegate),l=Q(e.selectionManager);if(!a.getKeyForSearch)return;const u=OK(o.key);if(!u||o.ctrlKey||o.metaKey)return;u===" "&&t().trim().length>0&&(o.preventDefault(),o.stopPropagation());let d=n(h=>h+u),f=a.getKeyForSearch(d,l.focusedKey())??a.getKeyForSearch(d);f==null&&BK(d)&&(d=d[0],f=a.getKeyForSearch(d,l.focusedKey())??a.getKeyForSearch(d)),f!=null&&(l.setFocusedKey(f),(p=e.onTypeSelect)==null||p.call(e,f)),clearTimeout(r()),i(window.setTimeout(()=>n(""),500))}}}}function OK(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function BK(e){return e.split("").every(t=>t===e[0])}function AK(e,t,n){const i=Xe({selectOnFocus:()=>Q(e.selectionManager).selectionBehavior()==="replace"},e),s=()=>t(),{direction:o}=To();let a={top:0,left:0};LX(()=>Q(i.isVirtualized)?void 0:s(),"scroll",()=>{const b=s();b&&(a={top:b.scrollTop,left:b.scrollLeft})});const{typeSelectHandlers:l}=LK({isDisabled:()=>Q(i.disallowTypeAhead),keyboardDelegate:()=>Q(i.keyboardDelegate),selectionManager:()=>Q(i.selectionManager)}),u=()=>Q(i.orientation)??"vertical",d=b=>{var C,k,I,O,A,L,V,Y;nn(b,l.onKeyDown),b.altKey&&b.key==="Tab"&&b.preventDefault();const g=t();if(!(g!=null&&g.contains(b.target)))return;const v=Q(i.selectionManager),S=Q(i.selectOnFocus),w=N=>{N!=null&&(v.setFocusedKey(N),b.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(N):S&&!mM(b)&&v.replaceSelection(N))},_=Q(i.keyboardDelegate),T=Q(i.shouldFocusWrap),M=v.focusedKey();switch(b.key){case(u()==="vertical"?"ArrowDown":"ArrowRight"):{if(_.getKeyBelow){b.preventDefault();let N;M!=null?N=_.getKeyBelow(M):N=(C=_.getFirstKey)==null?void 0:C.call(_),N==null&&T&&(N=(k=_.getFirstKey)==null?void 0:k.call(_,M)),w(N)}break}case(u()==="vertical"?"ArrowUp":"ArrowLeft"):{if(_.getKeyAbove){b.preventDefault();let N;M!=null?N=_.getKeyAbove(M):N=(I=_.getLastKey)==null?void 0:I.call(_),N==null&&T&&(N=(O=_.getLastKey)==null?void 0:O.call(_,M)),w(N)}break}case(u()==="vertical"?"ArrowLeft":"ArrowUp"):{if(_.getKeyLeftOf){b.preventDefault();const N=o()==="rtl";let j;M!=null?j=_.getKeyLeftOf(M):j=N?(A=_.getFirstKey)==null?void 0:A.call(_):(L=_.getLastKey)==null?void 0:L.call(_),w(j)}break}case(u()==="vertical"?"ArrowRight":"ArrowDown"):{if(_.getKeyRightOf){b.preventDefault();const N=o()==="rtl";let j;M!=null?j=_.getKeyRightOf(M):j=N?(V=_.getLastKey)==null?void 0:V.call(_):(Y=_.getFirstKey)==null?void 0:Y.call(_),w(j)}break}case"Home":if(_.getFirstKey){b.preventDefault();const N=_.getFirstKey(M,Tl(b));N!=null&&(v.setFocusedKey(N),Tl(b)&&b.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(N):S&&v.replaceSelection(N))}break;case"End":if(_.getLastKey){b.preventDefault();const N=_.getLastKey(M,Tl(b));N!=null&&(v.setFocusedKey(N),Tl(b)&&b.shiftKey&&v.selectionMode()==="multiple"?v.extendSelection(N):S&&v.replaceSelection(N))}break;case"PageDown":if(_.getKeyPageBelow&&M!=null){b.preventDefault();const N=_.getKeyPageBelow(M);w(N)}break;case"PageUp":if(_.getKeyPageAbove&&M!=null){b.preventDefault();const N=_.getKeyPageAbove(M);w(N)}break;case"a":Tl(b)&&v.selectionMode()==="multiple"&&Q(i.disallowSelectAll)!==!0&&(b.preventDefault(),v.selectAll());break;case"Escape":b.defaultPrevented||(b.preventDefault(),Q(i.disallowEmptySelection)||v.clearSelection());break;case"Tab":if(!Q(i.allowsTabNavigation)){if(b.shiftKey)g.focus();else{const N=JX(g,{tabbable:!0});let j,G;do G=N.lastChild(),G&&(j=G);while(G);j&&!j.contains(document.activeElement)&&er(j)}break}}},f=b=>{var w,_;const g=Q(i.selectionManager),v=Q(i.keyboardDelegate),S=Q(i.selectOnFocus);if(g.isFocused()){b.currentTarget.contains(b.target)||g.setFocused(!1);return}if(b.currentTarget.contains(b.target)){if(g.setFocused(!0),g.focusedKey()==null){const T=C=>{C!=null&&(g.setFocusedKey(C),S&&g.replaceSelection(C))},M=b.relatedTarget;M&&b.currentTarget.compareDocumentPosition(M)&Node.DOCUMENT_POSITION_FOLLOWING?T(g.lastSelectedKey()??((w=v.getLastKey)==null?void 0:w.call(v))):T(g.firstSelectedKey()??((_=v.getFirstKey)==null?void 0:_.call(v)))}else if(!Q(i.isVirtualized)){const T=s();if(T){T.scrollTop=a.top,T.scrollLeft=a.left;const M=T.querySelector(`[data-key="${g.focusedKey()}"]`);M&&(er(M),Sb(T,M))}}}},p=b=>{const g=Q(i.selectionManager);b.currentTarget.contains(b.relatedTarget)||g.setFocused(!1)},h=b=>{s()===b.target&&b.preventDefault()},m=()=>{var T,M;const b=Q(i.autoFocus);if(!b)return;const g=Q(i.selectionManager),v=Q(i.keyboardDelegate);let S;b==="first"&&(S=(T=v.getFirstKey)==null?void 0:T.call(v)),b==="last"&&(S=(M=v.getLastKey)==null?void 0:M.call(v));const w=g.selectedKeys();w.size&&(S=w.values().next().value),g.setFocused(!0),g.setFocusedKey(S);const _=t();_&&S==null&&!Q(i.shouldUseVirtualFocus)&&er(_)};return xo(()=>{i.deferAutoFocus?setTimeout(m,0):m()}),Be(Fs([s,()=>Q(i.isVirtualized),()=>Q(i.selectionManager).focusedKey()],b=>{var w;const[g,v,S]=b;if(v)S&&((w=i.scrollToKey)==null||w.call(i,S));else if(S&&g){const _=g.querySelector(`[data-key="${S}"]`);_&&Sb(g,_)}})),{tabIndex:z(()=>{if(!Q(i.shouldUseVirtualFocus))return Q(i.selectionManager).focusedKey()==null?0:-1}),onKeyDown:d,onMouseDown:h,onFocusIn:f,onFocusOut:p}}function yM(e,t){const n=()=>Q(e.selectionManager),r=()=>Q(e.key),i=()=>Q(e.shouldUseVirtualFocus),s=v=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):v!=null&&v.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||Tl(v)||"pointerType"in v&&v.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},o=()=>n().isSelected(r()),a=()=>Q(e.disabled)||n().isDisabled(r()),l=()=>!a()&&n().canSelectItem(r());let u=null;const d=v=>{l()&&(u=v.pointerType,v.pointerType==="mouse"&&v.button===0&&!Q(e.shouldSelectOnPressUp)&&s(v))},f=v=>{l()&&v.pointerType==="mouse"&&v.button===0&&Q(e.shouldSelectOnPressUp)&&Q(e.allowsDifferentPressOrigin)&&s(v)},p=v=>{l()&&(Q(e.shouldSelectOnPressUp)&&!Q(e.allowsDifferentPressOrigin)||u!=="mouse")&&s(v)},h=v=>{!l()||!["Enter"," "].includes(v.key)||(mM(v)?n().toggleSelection(r()):s(v))},m=v=>{a()&&v.preventDefault()},y=v=>{const S=t();i()||a()||!S||v.target===S&&n().setFocusedKey(r())},b=z(()=>{if(!(i()||a()))return r()===n().focusedKey()?0:-1}),g=z(()=>Q(e.virtualized)?void 0:r());return Be(Fs([t,r,i,()=>n().focusedKey(),()=>n().isFocused()],([v,S,w,_,T])=>{v&&S===_&&T&&!w&&document.activeElement!==v&&(e.focus?e.focus():er(v))})),{isSelected:o,isDisabled:a,allowsSelection:l,tabIndex:b,dataKey:g,onPointerDown:d,onPointerUp:f,onClick:p,onKeyDown:h,onMouseDown:m,onFocus:y}}var PK=class{constructor(e,t){me(this,"collection");me(this,"state");this.collection=e,this.state=t}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}isFocused(){return this.state.isFocused()}setFocused(e){this.state.setFocused(e)}focusedKey(){return this.state.focusedKey()}setFocusedKey(e){(e==null||this.collection().getItem(e))&&this.state.setFocusedKey(e)}selectedKeys(){return this.state.selectedKeys()}isSelected(e){if(this.state.selectionMode()==="none")return!1;const t=this.getKey(e);return t==null?!1:this.state.selectedKeys().has(t)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;const e=this.state.selectedKeys();return this.getAllSelectableKeys().every(t=>e.has(t))}firstSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=(n==null?void 0:n.index)!=null&&(e==null?void 0:e.index)!=null&&n.index<e.index;(!e||r)&&(e=n)}return e==null?void 0:e.key}lastSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=(n==null?void 0:n.index)!=null&&(e==null?void 0:e.index)!=null&&n.index>e.index;(!e||r)&&(e=n)}return e==null?void 0:e.key}extendSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=this.state.selectedKeys(),r=n.anchorKey||t,i=new Ys(n,r,t);for(const s of this.getKeyRange(r,n.currentKey||t))i.delete(s);for(const s of this.getKeyRange(t,r))this.canSelectItem(s)&&i.add(s);this.state.setSelectedKeys(i)}getKeyRange(e,t){const n=this.collection().getItem(e),r=this.collection().getItem(t);return n&&r?n.index!=null&&r.index!=null&&n.index<=r.index?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){const n=[];let r=e;for(;r!=null;){const i=this.collection().getItem(r);if(i&&i.type==="item"&&n.push(r),r===t)return n;r=this.collection().getKeyAfter(r)}return[]}getKey(e){const t=this.collection().getItem(e);return t?!t||t.type!=="item"?null:t.key:e}toggleSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=new Ys(this.state.selectedKeys());n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection()&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode()==="none")return;const t=this.getKey(e);if(t==null)return;const n=this.canSelectItem(t)?new Ys([t],t,t):new Ys;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new Ys;for(const n of e){const r=this.getKey(n);if(r!=null&&(t.add(r),this.selectionMode()==="single"))break}this.state.setSelectedKeys(t)}selectAll(){this.selectionMode()==="multiple"&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const e=this.state.selectedKeys();!this.disallowEmptySelection()&&e.size>0&&this.state.setSelectedKeys(new Ys)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode()!=="none"&&(this.selectionMode()==="single"?this.isSelected(e)&&!this.disallowEmptySelection()?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior()==="toggle"||t&&t.pointerType==="touch"?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys())return!0;const t=this.selectedKeys();if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;for(const n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode()==="none")return!1;const t=this.collection().getItem(e);return t!=null&&!t.disabled}isDisabled(e){const t=this.collection().getItem(e);return!t||t.disabled}getAllSelectableKeys(){const e=[];return(n=>{for(;n!=null;){if(this.canSelectItem(n)){const r=this.collection().getItem(n);if(!r)continue;r.type==="item"&&e.push(n)}n=this.collection().getKeyAfter(n)}})(this.collection().getFirstKey()),e}},vM=class{constructor(e){me(this,"keyMap",new Map);me(this,"iterable");me(this,"firstKey");me(this,"lastKey");this.iterable=e;for(const r of e)this.keyMap.set(r.key,r);if(this.keyMap.size===0)return;let t,n=0;for(const[r,i]of this.keyMap)t?(t.nextKey=r,i.prevKey=t.key):(this.firstKey=r,i.prevKey=void 0),i.type==="item"&&(i.index=n++),t=i,t.nextKey=void 0;this.lastKey=t.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){var t;return(t=this.keyMap.get(e))==null?void 0:t.prevKey}getKeyAfter(e){var t;return(t=this.keyMap.get(e))==null?void 0:t.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}};function NK(e){const t=RK(e),r=xK({dataSource:()=>Q(e.dataSource),getKey:()=>Q(e.getKey),getTextValue:()=>Q(e.getTextValue),getDisabled:()=>Q(e.getDisabled),getSectionChildren:()=>Q(e.getSectionChildren),factory:s=>e.filter?new vM(e.filter(s)):new vM(s)},[()=>e.filter]),i=new PK(r,t);return ak(()=>{const s=t.focusedKey();s!=null&&!r().getItem(s)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>i}}var tr=e=>typeof e=="function"?e():e,jK=e=>{const t=z(()=>{const o=tr(e.element);if(o)return getComputedStyle(o)}),n=()=>{var o;return((o=t())==null?void 0:o.animationName)??"none"},[r,i]=ye(tr(e.show)?"present":"hidden");let s="none";return Be(o=>{const a=tr(e.show);return on(()=>{var d;if(o===a)return a;const l=s,u=n();a?i("present"):u==="none"||((d=t())==null?void 0:d.display)==="none"?i("hidden"):i(o===!0&&l!==u?"hiding":"hidden")}),a}),Be(()=>{const o=tr(e.element);if(!o)return;const a=u=>{u.target===o&&(s=n())},l=u=>{const f=n().includes(u.animationName);u.target===o&&f&&r()==="hiding"&&i("hidden")};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",l),o.addEventListener("animationend",l),Fe(()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",l),o.removeEventListener("animationend",l)})}),{present:()=>r()==="present"||r()==="hiding",state:r}},FK=jK,bM=FK,th="data-kb-top-layer",SM,_b=!1,Ws=[];function qu(e){return Ws.findIndex(t=>t.node===e)}function GK(e){return Ws[qu(e)]}function VK(e){return Ws[Ws.length-1].node===e}function xM(){return Ws.filter(e=>e.isPointerBlocking)}function $K(){return[...xM()].slice(-1)[0]}function kb(){return xM().length>0}function wM(e){var n;const t=qu((n=$K())==null?void 0:n.node);return qu(e)<t}function YK(e){Ws.push(e)}function WK(e){const t=qu(e);t<0||Ws.splice(t,1)}function HK(){for(const{node:e}of Ws)e.style.pointerEvents=wM(e)?"none":"auto"}function ZK(e){if(kb()&&!_b){const t=es(e);SM=document.body.style.pointerEvents,t.body.style.pointerEvents="none",_b=!0}}function UK(e){if(kb())return;const t=es(e);t.body.style.pointerEvents=SM,t.body.style.length===0&&t.body.removeAttribute("style"),_b=!1}var Ir={layers:Ws,isTopMostLayer:VK,hasPointerBlockingLayer:kb,isBelowPointerBlockingLayer:wM,addLayer:YK,removeLayer:WK,indexOf:qu,find:GK,assignPointerEventToLayers:HK,disableBodyPointerEvents:ZK,restoreBodyPointerEvents:UK},zK={};eh(zK,{Button:()=>KK,Root:()=>Db});var qK=["button","color","file","image","reset","submit"];function XK(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?qK.indexOf(e.type)!==-1:!1}function Db(e){let t;const n=mt({type:"button"},e),[r,i]=Ct(n,["ref","type","disabled"]),s=Jp(()=>t,()=>"button"),o=z(()=>{const u=s();return u==null?!1:XK({tagName:u,type:r.type})}),a=z(()=>s()==="input"),l=z(()=>s()==="a"&&(t==null?void 0:t.getAttribute("href"))!=null);return B(rn,Xe({as:"button",ref(u){const d=lr(f=>t=f,r.ref);typeof d=="function"&&d(u)},get type(){return o()||a()?r.type:void 0},get role(){return!o()&&!l()?"button":void 0},get tabIndex(){return!o()&&!l()&&!r.disabled?0:void 0},get disabled(){return o()||a()?r.disabled:void 0},get"aria-disabled"(){return!o()&&!a()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},i))}var KK=Db,QK=["top","right","bottom","left"],ts=Math.min,Er=Math.max,nh=Math.round,rh=Math.floor,Io=e=>({x:e,y:e}),JK={left:"right",right:"left",bottom:"top",top:"bottom"},eQ={start:"end",end:"start"};function Cb(e,t,n){return Er(e,ts(t,n))}function ba(e,t){return typeof e=="function"?e(t):e}function Eo(e){return e.split("-")[0]}function Il(e){return e.split("-")[1]}function _M(e){return e==="x"?"y":"x"}function Mb(e){return e==="y"?"height":"width"}function Sa(e){return["top","bottom"].includes(Eo(e))?"y":"x"}function Tb(e){return _M(Sa(e))}function tQ(e,t,n){n===void 0&&(n=!1);const r=Il(e),i=Tb(e),s=Mb(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=ih(o)),[o,ih(o)]}function nQ(e){const t=ih(e);return[Ib(e),t,Ib(t)]}function Ib(e){return e.replace(/start|end/g,t=>eQ[t])}function rQ(e,t,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?s:o;default:return[]}}function iQ(e,t,n,r){const i=Il(e);let s=rQ(Eo(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(Ib)))),s}function ih(e){return e.replace(/left|right|bottom|top/g,t=>JK[t])}function sQ(e){return{top:0,right:0,bottom:0,left:0,...e}}function kM(e){return typeof e!="number"?sQ(e):{top:e,right:e,bottom:e,left:e}}function sh(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function DM(e,t,n){let{reference:r,floating:i}=e;const s=Sa(t),o=Tb(t),a=Mb(o),l=Eo(t),u=s==="y",d=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,p=r[a]/2-i[a]/2;let h;switch(l){case"top":h={x:d,y:r.y-i.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-i.width,y:f};break;default:h={x:r.x,y:r.y}}switch(Il(t)){case"start":h[o]-=p*(n&&u?-1:1);break;case"end":h[o]+=p*(n&&u?-1:1);break}return h}var oQ=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:f}=DM(u,r,l),p=r,h={},m=0;for(let y=0;y<a.length;y++){const{name:b,fn:g}=a[y],{x:v,y:S,data:w,reset:_}=await g({x:d,y:f,initialPlacement:r,placement:p,strategy:i,middlewareData:h,rects:u,platform:o,elements:{reference:e,floating:t}});d=v??d,f=S??f,h={...h,[b]:{...h[b],...w}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(u=_.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):_.rects),{x:d,y:f}=DM(u,p,l)),y=-1)}return{x:d,y:f,placement:p,strategy:i,middlewareData:h}};async function Xu(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:h=0}=ba(t,e),m=kM(h),b=a[p?f==="floating"?"reference":"floating":f],g=sh(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),v=f==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),w=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},_=sh(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:S,strategy:l}):v);return{top:(g.top-_.top+m.top)/w.y,bottom:(_.bottom-g.bottom+m.bottom)/w.y,left:(g.left-_.left+m.left)/w.x,right:(_.right-g.right+m.right)/w.x}}var aQ=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:d=0}=ba(e,t)||{};if(u==null)return{};const f=kM(d),p={x:n,y:r},h=Tb(i),m=Mb(h),y=await o.getDimensions(u),b=h==="y",g=b?"top":"left",v=b?"bottom":"right",S=b?"clientHeight":"clientWidth",w=s.reference[m]+s.reference[h]-p[h]-s.floating[m],_=p[h]-s.reference[h],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let M=T?T[S]:0;(!M||!await(o.isElement==null?void 0:o.isElement(T)))&&(M=a.floating[S]||s.floating[m]);const C=w/2-_/2,k=M/2-y[m]/2-1,I=ts(f[g],k),O=ts(f[v],k),A=I,L=M-y[m]-O,V=M/2-y[m]/2+C,Y=Cb(A,V,L),N=!l.arrow&&Il(i)!=null&&V!==Y&&s.reference[m]/2-(V<A?I:O)-y[m]/2<0,j=N?V<A?V-A:V-L:0;return{[h]:p[h]+j,data:{[h]:Y,centerOffset:V-Y-j,...N&&{alignmentOffset:j}},reset:N}}}),lQ=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...b}=ba(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=Eo(i),v=Sa(a),S=Eo(a)===a,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=p||(S||!y?[ih(a)]:nQ(a)),T=m!=="none";!p&&T&&_.push(...iQ(a,y,m,w));const M=[a,..._],C=await Xu(t,b),k=[];let I=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&k.push(C[g]),f){const V=tQ(i,o,w);k.push(C[V[0]],C[V[1]])}if(I=[...I,{placement:i,overflows:k}],!k.every(V=>V<=0)){var O,A;const V=(((O=s.flip)==null?void 0:O.index)||0)+1,Y=M[V];if(Y)return{data:{index:V,overflows:I},reset:{placement:Y}};let N=(A=I.filter(j=>j.overflows[0]<=0).sort((j,G)=>j.overflows[1]-G.overflows[1])[0])==null?void 0:A.placement;if(!N)switch(h){case"bestFit":{var L;const j=(L=I.filter(G=>{if(T){const Z=Sa(G.placement);return Z===v||Z==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(Z=>Z>0).reduce((Z,W)=>Z+W,0)]).sort((G,Z)=>G[1]-Z[1])[0])==null?void 0:L[0];j&&(N=j);break}case"initialPlacement":N=a;break}if(i!==N)return{reset:{placement:N}}}return{}}}};function CM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function MM(e){return QK.some(t=>e[t]>=0)}var cQ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=ba(e,t);switch(r){case"referenceHidden":{const s=await Xu(t,{...i,elementContext:"reference"}),o=CM(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:MM(o)}}}case"escaped":{const s=await Xu(t,{...i,altBoundary:!0}),o=CM(s,n.floating);return{data:{escapedOffsets:o,escaped:MM(o)}}}default:return{}}}}};async function uQ(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Eo(n),a=Il(n),l=Sa(n)==="y",u=["left","top"].includes(o)?-1:1,d=s&&l?-1:1,f=ba(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),l?{x:h*d,y:p*u}:{x:p*u,y:h*d}}var dQ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await uQ(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},fQ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:g,y:v}=b;return{x:g,y:v}}},...l}=ba(e,t),u={x:n,y:r},d=await Xu(t,l),f=Sa(Eo(i)),p=_M(f);let h=u[p],m=u[f];if(s){const b=p==="y"?"top":"left",g=p==="y"?"bottom":"right",v=h+d[b],S=h-d[g];h=Cb(v,h,S)}if(o){const b=f==="y"?"top":"left",g=f==="y"?"bottom":"right",v=m+d[b],S=m-d[g];m=Cb(v,m,S)}const y=a.fn({...t,[p]:h,[f]:m});return{...y,data:{x:y.x-n,y:y.y-r}}}}},pQ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:s}=t,{apply:o=()=>{},...a}=ba(e,t),l=await Xu(t,a),u=Eo(n),d=Il(n),f=Sa(n)==="y",{width:p,height:h}=r.floating;let m,y;u==="top"||u==="bottom"?(m=u,y=d===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(y=u,m=d==="end"?"top":"bottom");const b=h-l.top-l.bottom,g=p-l.left-l.right,v=ts(h-l[m],b),S=ts(p-l[y],g),w=!t.middlewareData.shift;let _=v,T=S;if(f?T=d||w?ts(S,g):g:_=d||w?ts(v,b):b,w&&!d){const C=Er(l.left,0),k=Er(l.right,0),I=Er(l.top,0),O=Er(l.bottom,0);f?T=p-2*(C!==0||k!==0?C+k:Er(l.left,l.right)):_=h-2*(I!==0||O!==0?I+O:Er(l.top,l.bottom))}await o({...t,availableWidth:T,availableHeight:_});const M=await i.getDimensions(s.floating);return p!==M.width||h!==M.height?{reset:{rects:!0}}:{}}}};function El(e){return TM(e)?(e.nodeName||"").toLowerCase():"#document"}function Rr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Hs(e){var t;return(t=(TM(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function TM(e){return e instanceof Node||e instanceof Rr(e).Node}function Ci(e){return e instanceof Element||e instanceof Rr(e).Element}function ns(e){return e instanceof HTMLElement||e instanceof Rr(e).HTMLElement}function IM(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rr(e).ShadowRoot}function Ku(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Mi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function hQ(e){return["table","td","th"].includes(El(e))}function oh(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Eb(e){const t=Rb(),n=Ci(e)?Mi(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function mQ(e){let t=Ro(e);for(;ns(t)&&!Rl(t);){if(Eb(t))return t;if(oh(t))return null;t=Ro(t)}return null}function Rb(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Rl(e){return["html","body","#document"].includes(El(e))}function Mi(e){return Rr(e).getComputedStyle(e)}function ah(e){return Ci(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ro(e){if(El(e)==="html")return e;const t=e.assignedSlot||e.parentNode||IM(e)&&e.host||Hs(e);return IM(t)?t.host:t}function EM(e){const t=Ro(e);return Rl(t)?e.ownerDocument?e.ownerDocument.body:e.body:ns(t)&&Ku(t)?t:EM(t)}function Qu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=EM(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=Rr(i);return s?t.concat(o,o.visualViewport||[],Ku(i)?i:[],o.frameElement&&n?Qu(o.frameElement):[]):t.concat(i,Qu(i,[],n))}function RM(e){const t=Mi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=ns(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=nh(n)!==s||nh(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function Lb(e){return Ci(e)?e:e.contextElement}function Ll(e){const t=Lb(e);if(!ns(t))return Io(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=RM(t);let o=(s?nh(n.width):n.width)/r,a=(s?nh(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var gQ=Io(0);function LM(e){const t=Rr(e);return!Rb()||!t.visualViewport?gQ:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yQ(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rr(e)?!1:t}function xa(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=Lb(e);let o=Io(1);t&&(r?Ci(r)&&(o=Ll(r)):o=Ll(e));const a=yQ(s,n,r)?LM(s):Io(0);let l=(i.left+a.x)/o.x,u=(i.top+a.y)/o.y,d=i.width/o.x,f=i.height/o.y;if(s){const p=Rr(s),h=r&&Ci(r)?Rr(r):r;let m=p,y=m.frameElement;for(;y&&r&&h!==m;){const b=Ll(y),g=y.getBoundingClientRect(),v=Mi(y),S=g.left+(y.clientLeft+parseFloat(v.paddingLeft))*b.x,w=g.top+(y.clientTop+parseFloat(v.paddingTop))*b.y;l*=b.x,u*=b.y,d*=b.x,f*=b.y,l+=S,u+=w,m=Rr(y),y=m.frameElement}}return sh({width:d,height:f,x:l,y:u})}function vQ(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=Hs(r),a=t?oh(t.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=Io(1);const d=Io(0),f=ns(r);if((f||!f&&!s)&&((El(r)!=="body"||Ku(o))&&(l=ah(r)),ns(r))){const p=xa(r);u=Ll(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x,y:n.y*u.y-l.scrollTop*u.y+d.y}}function bQ(e){return Array.from(e.getClientRects())}function OM(e){return xa(Hs(e)).left+ah(e).scrollLeft}function SQ(e){const t=Hs(e),n=ah(e),r=e.ownerDocument.body,i=Er(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Er(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+OM(e);const a=-n.scrollTop;return Mi(r).direction==="rtl"&&(o+=Er(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function xQ(e,t){const n=Rr(e),r=Hs(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const u=Rb();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function wQ(e,t){const n=xa(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=ns(e)?Ll(e):Io(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,u=r*s.y;return{width:o,height:a,x:l,y:u}}function BM(e,t,n){let r;if(t==="viewport")r=xQ(e,n);else if(t==="document")r=SQ(Hs(e));else if(Ci(t))r=wQ(t,n);else{const i=LM(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return sh(r)}function AM(e,t){const n=Ro(e);return n===t||!Ci(n)||Rl(n)?!1:Mi(n).position==="fixed"||AM(n,t)}function _Q(e,t){const n=t.get(e);if(n)return n;let r=Qu(e,[],!1).filter(a=>Ci(a)&&El(a)!=="body"),i=null;const s=Mi(e).position==="fixed";let o=s?Ro(e):e;for(;Ci(o)&&!Rl(o);){const a=Mi(o),l=Eb(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ku(o)&&!l&&AM(e,o))?r=r.filter(d=>d!==o):i=a,o=Ro(o)}return t.set(e,r),r}function kQ(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?oh(t)?[]:_Q(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((u,d)=>{const f=BM(t,d,i);return u.top=Er(f.top,u.top),u.right=ts(f.right,u.right),u.bottom=ts(f.bottom,u.bottom),u.left=Er(f.left,u.left),u},BM(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function DQ(e){const{width:t,height:n}=RM(e);return{width:t,height:n}}function CQ(e,t,n){const r=ns(t),i=Hs(t),s=n==="fixed",o=xa(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Io(0);if(r||!r&&!s)if((El(t)!=="body"||Ku(i))&&(a=ah(t)),r){const f=xa(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else i&&(l.x=OM(i));const u=o.left+a.scrollLeft-l.x,d=o.top+a.scrollTop-l.y;return{x:u,y:d,width:o.width,height:o.height}}function Ob(e){return Mi(e).position==="static"}function PM(e,t){return!ns(e)||Mi(e).position==="fixed"?null:t?t(e):e.offsetParent}function NM(e,t){const n=Rr(e);if(oh(e))return n;if(!ns(e)){let i=Ro(e);for(;i&&!Rl(i);){if(Ci(i)&&!Ob(i))return i;i=Ro(i)}return n}let r=PM(e,t);for(;r&&hQ(r)&&Ob(r);)r=PM(r,t);return r&&Rl(r)&&Ob(r)&&!Eb(r)?n:r||mQ(e)||n}var MQ=async function(e){const t=this.getOffsetParent||NM,n=this.getDimensions,r=await n(e.floating);return{reference:CQ(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function TQ(e){return Mi(e).direction==="rtl"}var jM={convertOffsetParentRelativeRectToViewportRelativeRect:vQ,getDocumentElement:Hs,getClippingRect:kQ,getOffsetParent:NM,getElementRects:MQ,getClientRects:bQ,getDimensions:DQ,getScale:Ll,isElement:Ci,isRTL:TQ};function IQ(e,t){let n=null,r;const i=Hs(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:u,top:d,width:f,height:p}=e.getBoundingClientRect();if(a||t(),!f||!p)return;const h=rh(d),m=rh(i.clientWidth-(u+f)),y=rh(i.clientHeight-(d+p)),b=rh(u),v={rootMargin:-h+"px "+-m+"px "+-y+"px "+-b+"px",threshold:Er(0,ts(1,l))||1};let S=!0;function w(_){const T=_[0].intersectionRatio;if(T!==l){if(!S)return o();T?o(!1,T):r=setTimeout(()=>{o(!1,1e-7)},1e3)}S=!1}try{n=new IntersectionObserver(w,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(w,v)}n.observe(e)}return o(!0),s}function EQ(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Lb(e),d=i||s?[...u?Qu(u):[],...Qu(t)]:[];d.forEach(g=>{i&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const f=u&&a?IQ(u,n):null;let p=-1,h=null;o&&(h=new ResizeObserver(g=>{let[v]=g;v&&v.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let m,y=l?xa(e):null;l&&b();function b(){const g=xa(e);y&&(g.x!==y.x||g.y!==y.y||g.width!==y.width||g.height!==y.height)&&n(),y=g,m=requestAnimationFrame(b)}return n(),()=>{var g;d.forEach(v=>{i&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),f==null||f(),(g=h)==null||g.disconnect(),h=null,l&&cancelAnimationFrame(m)}}var RQ=dQ,LQ=fQ,OQ=lQ,BQ=pQ,AQ=cQ,PQ=aQ,NQ=(e,t,n)=>{const r=new Map,i={platform:jM,...n},s={...i.platform,_c:r};return oQ(e,t,{...i,platform:s})},Bb=Gn();function Ab(){const e=Vn(Bb);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var jQ=we('<svg display="block" viewBox="0 0 30 30" style="transform:scale(1.02)"><g><path fill="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z"></path><path stroke="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z">'),Pb=30,FM=Pb/2,FQ={top:180,right:-90,bottom:0,left:90};function Nb(e){const t=Ab(),n=mt({size:Pb},e),[r,i]=Ct(n,["ref","style","size"]),s=()=>t.currentPlacement().split("-")[0],o=GQ(t.contentRef),a=()=>{var p;return((p=o())==null?void 0:p.getPropertyValue("background-color"))||"none"},l=()=>{var p;return((p=o())==null?void 0:p.getPropertyValue(`border-${s()}-color`))||"none"},u=()=>{var p;return((p=o())==null?void 0:p.getPropertyValue(`border-${s()}-width`))||"0px"},d=()=>Number.parseInt(u())*2*(Pb/r.size),f=()=>`rotate(${FQ[s()]} ${FM} ${FM}) translate(0 2)`;return B(rn,Xe({as:"div",ref(p){const h=lr(t.setArrowRef,r.ref);typeof h=="function"&&h(p)},"aria-hidden":"true",get style(){return Xp({position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:a(),stroke:l(),"stroke-width":d()},r.style)}},i,{get children(){const p=jQ(),h=p.firstChild;return Oe(()=>ie(h,"transform",f())),p}}))}function GQ(e){const[t,n]=ye();return Be(()=>{const r=e();r&&n(FX(r).getComputedStyle(r))}),t}function VQ(e){const t=Ab(),[n,r]=Ct(e,["ref","style"]);return B(rn,Xe({as:"div",ref(i){const s=lr(t.setPositionerRef,n.ref);typeof s=="function"&&s(i)},"data-popper-positioner":"",get style(){return Xp({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function GM(e){const{x:t=0,y:n=0,width:r=0,height:i=0}=e??{};if(typeof DOMRect=="function")return new DOMRect(t,n,r,i);const s={x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:n+i,left:t};return{...s,toJSON:()=>s}}function $Q(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?GM(r):e?e.getBoundingClientRect():GM()}}}function YQ(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var WQ={top:"bottom",right:"left",bottom:"top",left:"right"};function HQ(e,t){const[n,r]=e.split("-"),i=WQ[n];return r?n==="left"||n==="right"?`${i} ${r==="start"?"top":"bottom"}`:r==="start"?`${i} ${t==="rtl"?"right":"left"}`:`${i} ${t==="rtl"?"left":"right"}`:`${i} center`}function ZQ(e){const t=mt({getAnchorRect:p=>p==null?void 0:p.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=ye(),[i,s]=ye(),[o,a]=ye(t.placement),l=()=>{var p;return $Q((p=t.anchorRef)==null?void 0:p.call(t),t.getAnchorRect)},{direction:u}=To();async function d(){var T,M;const p=l(),h=n(),m=i();if(!p||!h)return;const y=((m==null?void 0:m.clientHeight)||0)/2,b=typeof t.gutter=="number"?t.gutter+y:t.gutter??y;h.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),p.getBoundingClientRect();const g=[RQ(({placement:C})=>{const k=!!C.split("-")[1];return{mainAxis:b,crossAxis:k?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const C=typeof t.flip=="string"?t.flip.split(" "):void 0;if(C!==void 0&&!C.every(YQ))throw new Error("`flip` expects a spaced-delimited list of placements");g.push(OQ({padding:t.overflowPadding,fallbackPlacements:C}))}(t.slide||t.overlap)&&g.push(LQ({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),g.push(BQ({padding:t.overflowPadding,apply({availableWidth:C,availableHeight:k,rects:I}){const O=Math.round(I.reference.width);C=Math.floor(C),k=Math.floor(k),h.style.setProperty("--kb-popper-anchor-width",`${O}px`),h.style.setProperty("--kb-popper-content-available-width",`${C}px`),h.style.setProperty("--kb-popper-content-available-height",`${k}px`),t.sameWidth&&(h.style.width=`${O}px`),t.fitViewport&&(h.style.maxWidth=`${C}px`,h.style.maxHeight=`${k}px`)}})),t.hideWhenDetached&&g.push(AQ({padding:t.detachedPadding})),m&&g.push(PQ({element:m,padding:t.arrowPadding}));const v=await NQ(p,h,{placement:t.placement,strategy:"absolute",middleware:g,platform:{...jM,isRTL:()=>u()==="rtl"}});if(a(v.placement),(T=t.onCurrentPlacementChange)==null||T.call(t,v.placement),!h)return;h.style.setProperty("--kb-popper-content-transform-origin",HQ(v.placement,u()));const S=Math.round(v.x),w=Math.round(v.y);let _;if(t.hideWhenDetached&&(_=(M=v.middlewareData.hide)!=null&&M.referenceHidden?"hidden":"visible"),Object.assign(h.style,{top:"0",left:"0",transform:`translate3d(${S}px, ${w}px, 0)`,visibility:_}),m&&v.middlewareData.arrow){const{x:C,y:k}=v.middlewareData.arrow,I=v.placement.split("-")[0];Object.assign(m.style,{left:C!=null?`${C}px`:"",top:k!=null?`${k}px`:"",[I]:"100%"})}}Be(()=>{const p=l(),h=n();if(!p||!h)return;const m=EQ(p,h,d,{elementResize:typeof ResizeObserver=="function"});Fe(m)}),Be(()=>{var m;const p=n(),h=(m=t.contentRef)==null?void 0:m.call(t);!p||!h||queueMicrotask(()=>{p.style.zIndex=getComputedStyle(h).zIndex})});const f={currentPlacement:o,contentRef:()=>{var p;return(p=t.contentRef)==null?void 0:p.call(t)},setPositionerRef:r,setArrowRef:s};return B(Bb.Provider,{value:f,get children(){return t.children}})}var VM=Object.assign(ZQ,{Arrow:Nb,Context:Bb,usePopperContext:Ab,Positioner:VQ});function UQ(e){const t=n=>{var r;n.key===gb.Escape&&((r=e.onEscapeKeyDown)==null||r.call(e,n))};Be(()=>{var r;if(Q(e.isDisabled))return;const n=((r=e.ownerDocument)==null?void 0:r.call(e))??es();n.addEventListener("keydown",t),Fe(()=>{n.removeEventListener("keydown",t)})})}var $M="interactOutside.pointerDownOutside",YM="interactOutside.focusOutside";function zQ(e,t){let n,r=tK;const i=()=>es(t()),s=f=>{var p;return(p=e.onPointerDownOutside)==null?void 0:p.call(e,f)},o=f=>{var p;return(p=e.onFocusOutside)==null?void 0:p.call(e,f)},a=f=>{var p;return(p=e.onInteractOutside)==null?void 0:p.call(e,f)},l=f=>{var h;const p=f.target;return!(p instanceof HTMLElement)||p.closest(`[${th}]`)||!ii(i(),p)||ii(t(),p)?!1:!((h=e.shouldExcludeElement)!=null&&h.call(e,p))},u=f=>{function p(){const h=t(),m=f.target;if(!h||!m||!l(f))return;const y=An([s,a]);m.addEventListener($M,y,{once:!0});const b=new CustomEvent($M,{bubbles:!1,cancelable:!0,detail:{originalEvent:f,isContextMenu:f.button===2||WX(f)&&f.button===0}});m.dispatchEvent(b)}f.pointerType==="touch"?(i().removeEventListener("click",p),r=p,i().addEventListener("click",p,{once:!0})):p()},d=f=>{const p=t(),h=f.target;if(!p||!h||!l(f))return;const m=An([o,a]);h.addEventListener(YM,m,{once:!0});const y=new CustomEvent(YM,{bubbles:!1,cancelable:!0,detail:{originalEvent:f,isContextMenu:!1}});h.dispatchEvent(y)};Be(()=>{Q(e.isDisabled)||(n=window.setTimeout(()=>{i().addEventListener("pointerdown",u,!0)},0),i().addEventListener("focusin",d,!0),Fe(()=>{window.clearTimeout(n),i().removeEventListener("click",r),i().removeEventListener("pointerdown",u,!0),i().removeEventListener("focusin",d,!0)}))})}var WM=Gn();function qQ(){return Vn(WM)}function XQ(e){let t;const n=qQ(),[r,i]=Ct(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),s=new Set([]),o=f=>{s.add(f);const p=n==null?void 0:n.registerNestedLayer(f);return()=>{s.delete(f),p==null||p()}};zQ({shouldExcludeElement:f=>{var p;return t?((p=r.excludedElements)==null?void 0:p.some(h=>ii(h(),f)))||[...s].some(h=>ii(h,f)):!1},onPointerDownOutside:f=>{var p,h,m;!t||Ir.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!Ir.isTopMostLayer(t)||((p=r.onPointerDownOutside)==null||p.call(r,f),(h=r.onInteractOutside)==null||h.call(r,f),f.defaultPrevented||(m=r.onDismiss)==null||m.call(r))},onFocusOutside:f=>{var p,h,m;(p=r.onFocusOutside)==null||p.call(r,f),(h=r.onInteractOutside)==null||h.call(r,f),f.defaultPrevented||(m=r.onDismiss)==null||m.call(r)}},()=>t),UQ({ownerDocument:()=>es(t),onEscapeKeyDown:f=>{var p;!t||!Ir.isTopMostLayer(t)||((p=r.onEscapeKeyDown)==null||p.call(r,f),!f.defaultPrevented&&r.onDismiss&&(f.preventDefault(),r.onDismiss()))}}),xo(()=>{if(!t)return;Ir.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const f=n==null?void 0:n.registerNestedLayer(t);Ir.assignPointerEventToLayers(),Ir.disableBodyPointerEvents(t),Fe(()=>{t&&(Ir.removeLayer(t),f==null||f(),Ir.assignPointerEventToLayers(),Ir.restoreBodyPointerEvents(t))})}),Be(Fs([()=>t,()=>r.disableOutsidePointerEvents],([f,p])=>{if(!f)return;const h=Ir.find(f);h&&h.isPointerBlocking!==p&&(h.isPointerBlocking=p,Ir.assignPointerEventToLayers()),p&&Ir.disableBodyPointerEvents(f),Fe(()=>{Ir.restoreBodyPointerEvents(f)})},{defer:!0}));const d={registerNestedLayer:o};return B(WM.Provider,{value:d,get children(){return B(rn,Xe({as:"div",ref(f){const p=lr(h=>t=h,r.ref);typeof p=="function"&&p(f)}},i))}})}function HM(e={}){const[t,n]=aM({value:()=>Q(e.open),defaultValue:()=>!!Q(e.defaultOpen),onChange:o=>{var a;return(a=e.onOpenChange)==null?void 0:a.call(e,o)}}),r=()=>{n(!0)},i=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:i,toggle:()=>{t()?i():r()}}}var oi={};eh(oi,{Description:()=>sM,ErrorMessage:()=>oM,Item:()=>qM,ItemControl:()=>XM,ItemDescription:()=>KM,ItemIndicator:()=>QM,ItemInput:()=>JM,ItemLabel:()=>eT,Label:()=>tT,RadioGroup:()=>KQ,Root:()=>nT});var ZM=Gn();function UM(){const e=Vn(ZM);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var zM=Gn();function Ju(){const e=Vn(zM);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function qM(e){const t=Zu(),n=UM(),r=`${t.generateId("item")}-${Kr()}`,i=mt({id:r},e),[s,o]=Ct(i,["value","disabled","onPointerDown"]),[a,l]=ye(),[u,d]=ye(),[f,p]=ye(),[h,m]=ye(),[y,b]=ye(!1),g=z(()=>n.isSelectedValue(s.value)),v=z(()=>s.disabled||t.isDisabled()||!1),S=T=>{nn(T,s.onPointerDown),y()&&T.preventDefault()},w=z(()=>({...t.dataset(),"data-disabled":v()?"":void 0,"data-checked":g()?"":void 0})),_={value:()=>s.value,dataset:w,isSelected:g,isDisabled:v,inputId:a,labelId:u,descriptionId:f,inputRef:h,select:()=>n.setSelectedValue(s.value),generateId:Yu(()=>o.id),registerInput:si(l),registerLabel:si(d),registerDescription:si(p),setIsFocused:b,setInputRef:m};return B(zM.Provider,{value:_,get children(){return B(rn,Xe({as:"div",role:"group",onPointerDown:S},w,o))}})}function XM(e){const t=Ju(),n=mt({id:t.generateId("control")},e),[r,i]=Ct(n,["onClick","onKeyDown"]);return B(rn,Xe({as:"div",onClick:a=>{var l;nn(a,r.onClick),t.select(),(l=t.inputRef())==null||l.focus()},onKeyDown:a=>{var l;nn(a,r.onKeyDown),a.key===gb.Space&&(t.select(),(l=t.inputRef())==null||l.focus())}},()=>t.dataset(),i))}function KM(e){const t=Ju(),n=mt({id:t.generateId("description")},e);return Be(()=>Fe(t.registerDescription(n.id))),B(rn,Xe({as:"div"},()=>t.dataset(),n))}function QM(e){const t=Ju(),n=mt({id:t.generateId("indicator")},e),[r,i]=Ct(n,["ref","forceMount"]),[s,o]=ye(),{present:a}=bM({show:()=>r.forceMount||t.isSelected(),element:()=>s()??null});return B(Re,{get when(){return a()},get children(){return B(rn,Xe({as:"div",ref(l){const u=lr(o,r.ref);typeof u=="function"&&u(l)}},()=>t.dataset(),i))}})}function JM(e){const t=Zu(),n=UM(),r=Ju(),i=mt({id:r.generateId("input")},e),[s,o]=Ct(i,["ref","style","aria-labelledby","aria-describedby","onChange","onFocus","onBlur"]),a=()=>[s["aria-labelledby"],r.labelId(),s["aria-labelledby"]!=null&&o["aria-label"]!=null?o.id:void 0].filter(Boolean).join(" ")||void 0,l=()=>[s["aria-describedby"],r.descriptionId(),n.ariaDescribedBy()].filter(Boolean).join(" ")||void 0,[u,d]=ye(!1),f=m=>{if(nn(m,s.onChange),m.stopPropagation(),!u()){n.setSelectedValue(r.value());const y=m.target;y.checked=r.isSelected()}d(!1)},p=m=>{nn(m,s.onFocus),r.setIsFocused(!0)},h=m=>{nn(m,s.onBlur),r.setIsFocused(!1)};return Be(Fs([()=>r.isSelected(),()=>r.value()],m=>{if(!m[0]&&m[1]===r.value())return;d(!0);const y=r.inputRef();y==null||y.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),y==null||y.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),Be(()=>Fe(r.registerInput(o.id))),B(rn,Xe({as:"input",ref(m){const y=lr(r.setInputRef,s.ref);typeof y=="function"&&y(m)},type:"radio",get name(){return t.name()},get value(){return r.value()},get checked(){return r.isSelected()},get required(){return t.isRequired()},get disabled(){return r.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return Xp({...nM},s.style)},get"aria-labelledby"(){return a()},get"aria-describedby"(){return l()},onChange:f,onFocus:p,onBlur:h},()=>r.dataset(),o))}function eT(e){const t=Ju(),n=mt({id:t.generateId("label")},e);return Be(()=>Fe(t.registerLabel(n.id))),B(rn,Xe({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function tT(e){return B(oK,Xe({as:"span"},e))}function nT(e){let t;const n=`radiogroup-${Kr()}`,r=mt({id:n,orientation:"vertical"},e),[i,s,o]=Ct(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],iK),[a,l]=Uu({value:()=>i.value,defaultValue:()=>i.defaultValue,onChange:m=>{var y;return(y=i.onChange)==null?void 0:y.call(i,m)}}),{formControlContext:u}=sK(s);aK(()=>t,()=>l(i.defaultValue??""));const d=()=>u.getAriaLabelledBy(Q(s.id),o["aria-label"],i["aria-labelledby"]),f=()=>u.getAriaDescribedBy(i["aria-describedby"]),p=m=>m===a(),h={ariaDescribedBy:f,isSelectedValue:p,setSelectedValue:m=>{if(!(u.isReadOnly()||u.isDisabled())&&(l(m),t))for(const y of t.querySelectorAll("[type='radio']")){const b=y;b.checked=p(b.value)}}};return B(iM.Provider,{value:u,get children(){return B(ZM.Provider,{value:h,get children(){return B(rn,Xe({as:"div",ref(m){const y=lr(b=>t=b,i.ref);typeof y=="function"&&y(m)},role:"radiogroup",get id(){return Q(s.id)},get"aria-invalid"(){return u.validationState()==="invalid"||void 0},get"aria-required"(){return u.isRequired()||void 0},get"aria-disabled"(){return u.isDisabled()||void 0},get"aria-readonly"(){return u.isReadOnly()||void 0},get"aria-orientation"(){return i.orientation},get"aria-labelledby"(){return d()},get"aria-describedby"(){return f()}},()=>u.dataset(),o))}})}})}var KQ=Object.assign(nT,{Description:sM,ErrorMessage:oM,Item:qM,ItemControl:XM,ItemDescription:KM,ItemIndicator:QM,ItemInput:JM,ItemLabel:eT,Label:tT}),QQ=class{constructor(e,t,n){me(this,"collection");me(this,"ref");me(this,"collator");this.collection=e,this.ref=t,this.collator=n}getKeyBelow(e){let t=this.collection().getKeyAfter(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyAfter(t)}}getKeyAbove(e){let t=this.collection().getKeyBefore(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyBefore(t)}}getFirstKey(){let e=this.collection().getFirstKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){var t,n;return((n=(t=this.ref)==null?void 0:t.call(this))==null?void 0:n.querySelector(`[data-key="${e}"]`))??null}getKeyPageAbove(e){var s;const t=(s=this.ref)==null?void 0:s.call(this);let n=this.getItem(e);if(!t||!n)return;const r=Math.max(0,n.offsetTop+n.offsetHeight-t.offsetHeight);let i=e;for(;i&&n&&n.offsetTop>r;)i=this.getKeyAbove(i),n=i!=null?this.getItem(i):null;return i}getKeyPageBelow(e){var s;const t=(s=this.ref)==null?void 0:s.call(this);let n=this.getItem(e);if(!t||!n)return;const r=Math.min(t.scrollHeight,n.offsetTop-n.offsetHeight+t.offsetHeight);let i=e;for(;i&&n&&n.offsetTop<r;)i=this.getKeyBelow(i),n=i!=null?this.getItem(i):null;return i}getKeyForSearch(e,t){var i;const n=(i=this.collator)==null?void 0:i.call(this);if(!n)return;let r=t!=null?this.getKeyBelow(t):this.getFirstKey();for(;r!=null;){const s=this.collection().getItem(r);if(s){const o=s.textValue.slice(0,e.length);if(s.textValue&&n.compare(o,e)===0)return r}r=this.getKeyBelow(r)}}};function JQ(e,t,n){const r=TK({usage:"search",sensitivity:"base"}),i=z(()=>{const s=Q(e.keyboardDelegate);return s||new QQ(e.collection,t,r)});return AK({selectionManager:()=>Q(e.selectionManager),keyboardDelegate:i,autoFocus:()=>Q(e.autoFocus),deferAutoFocus:()=>Q(e.deferAutoFocus),shouldFocusWrap:()=>Q(e.shouldFocusWrap),disallowEmptySelection:()=>Q(e.disallowEmptySelection),selectOnFocus:()=>Q(e.selectOnFocus),disallowTypeAhead:()=>Q(e.disallowTypeAhead),shouldUseVirtualFocus:()=>Q(e.shouldUseVirtualFocus),allowsTabNavigation:()=>Q(e.allowsTabNavigation),isVirtualized:()=>Q(e.isVirtualized),scrollToKey:s=>{var o;return(o=Q(e.scrollToKey))==null?void 0:o(s)},orientation:()=>Q(e.orientation)},t)}var jb="focusScope.autoFocusOnMount",Fb="focusScope.autoFocusOnUnmount",rT={bubbles:!1,cancelable:!0},iT={stack:[],active(){return this.stack[0]},add(e){var t;e!==this.active()&&((t=this.active())==null||t.pause()),this.stack=mb(this.stack,e),this.stack.unshift(e)},remove(e){var t;this.stack=mb(this.stack,e),(t=this.active())==null||t.resume()}};function eJ(e,t){const[n,r]=ye(!1),i={pause(){r(!0)},resume(){r(!1)}};let s=null;const o=m=>{var y;return(y=e.onMountAutoFocus)==null?void 0:y.call(e,m)},a=m=>{var y;return(y=e.onUnmountAutoFocus)==null?void 0:y.call(e,m)},l=()=>es(t()),u=()=>{const m=l().createElement("span");return m.setAttribute("data-focus-trap",""),m.tabIndex=0,Object.assign(m.style,nM),m},d=()=>{const m=t();return m?qC(m,!0).filter(y=>!y.hasAttribute("data-focus-trap")):[]},f=()=>{const m=d();return m.length>0?m[0]:null},p=()=>{const m=d();return m.length>0?m[m.length-1]:null},h=()=>{const m=t();if(!m)return!1;const y=Wu(m);return!y||ii(m,y)?!1:KC(y)};Be(()=>{const m=t();if(!m)return;iT.add(i);const y=Wu(m);if(!ii(m,y)){const g=new CustomEvent(jb,rT);m.addEventListener(jb,o),m.dispatchEvent(g),g.defaultPrevented||setTimeout(()=>{er(f()),Wu(m)===y&&er(m)},0)}Fe(()=>{m.removeEventListener(jb,o),setTimeout(()=>{const g=new CustomEvent(Fb,rT);h()&&g.preventDefault(),m.addEventListener(Fb,a),m.dispatchEvent(g),g.defaultPrevented||er(y??l().body),m.removeEventListener(Fb,a),iT.remove(i)},0)})}),Be(()=>{const m=t();if(!m||!Q(e.trapFocus)||n())return;const y=g=>{const v=g.target;v!=null&&v.closest(`[${th}]`)||(ii(m,v)?s=v:er(s))},b=g=>{const S=g.relatedTarget??Wu(m);S!=null&&S.closest(`[${th}]`)||ii(m,S)||er(s)};l().addEventListener("focusin",y),l().addEventListener("focusout",b),Fe(()=>{l().removeEventListener("focusin",y),l().removeEventListener("focusout",b)})}),Be(()=>{const m=t();if(!m||!Q(e.trapFocus)||n())return;const y=u();m.insertAdjacentElement("afterbegin",y);const b=u();m.insertAdjacentElement("beforeend",b);function g(S){const w=f(),_=p();S.relatedTarget===w?er(_):er(w)}y.addEventListener("focusin",g),b.addEventListener("focusin",g);const v=new MutationObserver(S=>{for(const w of S)w.previousSibling===b&&(b.remove(),m.insertAdjacentElement("beforeend",b)),w.nextSibling===y&&(y.remove(),m.insertAdjacentElement("afterbegin",y))});v.observe(m,{childList:!0,subtree:!1}),Fe(()=>{y.removeEventListener("focusin",g),b.removeEventListener("focusin",g),y.remove(),b.remove(),v.disconnect()})})}var tJ="data-live-announcer";function nJ(e){Be(()=>{Q(e.isDisabled)||Fe(rJ(Q(e.targets),Q(e.root)))})}var ed=new WeakMap,ai=[];function rJ(e,t=document.body){const n=new Set(e),r=new Set,i=l=>{for(const p of l.querySelectorAll(`[${tJ}], [${th}]`))n.add(p);const u=p=>{if(n.has(p)||p.parentElement&&r.has(p.parentElement)&&p.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const h of n)if(p.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},d=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:u}),f=u(l);if(f===NodeFilter.FILTER_ACCEPT&&s(l),f!==NodeFilter.FILTER_REJECT){let p=d.nextNode();for(;p!=null;)s(p),p=d.nextNode()}},s=l=>{const u=ed.get(l)??0;l.getAttribute("aria-hidden")==="true"&&u===0||(u===0&&l.setAttribute("aria-hidden","true"),r.add(l),ed.set(l,u+1))};ai.length&&ai[ai.length-1].disconnect(),i(t);const o=new MutationObserver(l=>{for(const u of l)if(!(u.type!=="childList"||u.addedNodes.length===0)&&![...n,...r].some(d=>d.contains(u.target))){for(const d of u.removedNodes)d instanceof Element&&(n.delete(d),r.delete(d));for(const d of u.addedNodes)(d instanceof HTMLElement||d instanceof SVGElement)&&(d.dataset.liveAnnouncer==="true"||d.dataset.reactAriaTopLayer==="true")?n.add(d):d instanceof Element&&i(d)}});o.observe(t,{childList:!0,subtree:!0});const a={observe(){o.observe(t,{childList:!0,subtree:!0})},disconnect(){o.disconnect()}};return ai.push(a),()=>{o.disconnect();for(const l of r){const u=ed.get(l);if(u==null)return;u===1?(l.removeAttribute("aria-hidden"),ed.delete(l)):ed.set(l,u-1)}a===ai[ai.length-1]?(ai.pop(),ai.length&&ai[ai.length-1].observe()):ai.splice(ai.indexOf(a),1)}}var lh=new Map,iJ=e=>{Be(()=>{const t=tr(e.style)??{},n=tr(e.properties)??[],r={};for(const s in t)r[s]=e.element.style[s];const i=lh.get(e.key);i?i.activeCount++:lh.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(s=>s.key)}),Object.assign(e.element.style,e.style);for(const s of n)e.element.style.setProperty(s.key,s.value);Fe(()=>{var o;const s=lh.get(e.key);if(s){if(s.activeCount!==1){s.activeCount--;return}lh.delete(e.key);for(const[a,l]of Object.entries(s.originalStyles))e.element.style[a]=l;for(const a of s.properties)e.element.style.removeProperty(a);e.element.style.length===0&&e.element.removeAttribute("style"),(o=e.cleanup)==null||o.call(e)}})})},sT=iJ,sJ=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},oJ=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},aJ=(e,t,n)=>{const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let i=e,s=0,o=0,a=!1;do{const[l,u,d]=sJ(i,t),f=d-l-r*u;(u!==0||f!==0)&&oJ(i,t)&&(s+=f,o+=u),i===(n??document.documentElement)?a=!0:i=i._$host??i.parentElement}while(i&&!a);return[s,o]},[oT,aT]=ye([]),lJ=e=>oT().indexOf(e)===oT().length-1,cJ=e=>{const t=Xe({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=Kr();let r=[0,0],i=null,s=null;Be(()=>{tr(t.enabled)&&(aT(u=>[...u,n]),Fe(()=>{aT(u=>u.filter(d=>d!==n))}))}),Be(()=>{if(!tr(t.enabled)||!tr(t.hideScrollbar))return;const{body:u}=document,d=window.innerWidth-u.offsetWidth;if(tr(t.preventScrollbarShift)){const f={overflow:"hidden"},p=[];d>0&&(tr(t.preventScrollbarShiftMode)==="padding"?f.paddingRight=`calc(${window.getComputedStyle(u).paddingRight} + ${d}px)`:f.marginRight=`calc(${window.getComputedStyle(u).marginRight} + ${d}px)`,p.push({key:"--scrollbar-width",value:`${d}px`}));const h=window.scrollY,m=window.scrollX;sT({key:"prevent-scroll",element:u,style:f,properties:p,cleanup:()=>{tr(t.restoreScrollPosition)&&d>0&&window.scrollTo(m,h)}})}else sT({key:"prevent-scroll",element:u,style:{overflow:"hidden"}})}),Be(()=>{!lJ(n)||!tr(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",o,{passive:!1}),document.addEventListener("touchmove",l,{passive:!1}),Fe(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",o),document.removeEventListener("touchmove",l)}))});const o=u=>{r=lT(u),i=null,s=null},a=u=>{const d=u.target,f=tr(t.element),p=uJ(u),h=Math.abs(p[0])>Math.abs(p[1])?"x":"y",m=h==="x"?p[0]:p[1],y=cT(d,h,m,f);let b;f&&Gb(f,d)?b=!y:b=!0,b&&u.cancelable&&u.preventDefault()},l=u=>{const d=tr(t.element),f=u.target;let p;if(u.touches.length===2)p=!tr(t.allowPinchZoom);else{if(i==null||s===null){const h=lT(u).map((y,b)=>r[b]-y),m=Math.abs(h[0])>Math.abs(h[1])?"x":"y";i=m,s=m==="x"?h[0]:h[1]}if(f.type==="range")p=!1;else{const h=cT(f,i,s,d);d&&Gb(d,f)?p=!h:p=!0}}p&&u.cancelable&&u.preventDefault()}},uJ=e=>[e.deltaX,e.deltaY],lT=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],cT=(e,t,n,r)=>{const i=r!==null&&Gb(r,e),[s,o]=aJ(e,t,i?r:void 0);return!(n>0&&Math.abs(s)<=1||n<0&&Math.abs(o)<1)},Gb=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},dJ=cJ,fJ=dJ,uT=Gn();function dT(){return Vn(uT)}function Zs(){const e=dT();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var fT=Gn();function Vb(){const e=Vn(fT);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var pT=Gn();function rs(){const e=Vn(pT);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function $b(e){let t;const n=rs(),r=Zs(),i=mt({id:n.generateId(`item-${Kr()}`)},e),[s,o]=Ct(i,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,l]=ye(),[u,d]=ye(),[f,p]=ye(),h=()=>r.listState().selectionManager(),m=()=>o.id,y=()=>h().focusedKey()===m(),b=()=>{var k;(k=s.onSelect)==null||k.call(s),s.closeOnSelect&&setTimeout(()=>{r.close(!0)})};SK({getItem:()=>{var k;return{ref:()=>t,type:"item",key:m(),textValue:s.textValue??((k=f())==null?void 0:k.textContent)??(t==null?void 0:t.textContent)??"",disabled:s.disabled??!1}}});const g=yM({key:m,selectionManager:h,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>s.disabled},()=>t),v=k=>{nn(k,s.onPointerMove),k.pointerType==="mouse"&&(s.disabled?r.onItemLeave(k):(r.onItemEnter(k),k.defaultPrevented||(er(k.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(m()))))},S=k=>{nn(k,s.onPointerLeave),k.pointerType==="mouse"&&r.onItemLeave(k)},w=k=>{nn(k,s.onPointerUp),!s.disabled&&k.button===0&&b()},_=k=>{if(nn(k,s.onKeyDown),!k.repeat&&!s.disabled)switch(k.key){case"Enter":case" ":b();break}},T=z(()=>{if(s.indeterminate)return"mixed";if(s.checked!=null)return s.checked}),M=z(()=>({"data-indeterminate":s.indeterminate?"":void 0,"data-checked":s.checked&&!s.indeterminate?"":void 0,"data-disabled":s.disabled?"":void 0,"data-highlighted":y()?"":void 0})),C={isChecked:()=>s.checked,dataset:M,setLabelRef:p,generateId:Yu(()=>o.id),registerLabel:si(l),registerDescription:si(d)};return B(fT.Provider,{value:C,get children(){return B(rn,Xe({as:"div",ref(k){const I=lr(O=>t=O,s.ref);typeof I=="function"&&I(k)},get tabIndex(){return g.tabIndex()},get"aria-checked"(){return T()},get"aria-disabled"(){return s.disabled},get"aria-labelledby"(){return a()},get"aria-describedby"(){return u()},get"data-key"(){return g.dataKey()},get onPointerDown(){return An([s.onPointerDown,g.onPointerDown])},get onPointerUp(){return An([w,g.onPointerUp])},get onClick(){return An([s.onClick,g.onClick])},get onKeyDown(){return An([_,g.onKeyDown])},get onMouseDown(){return An([s.onMouseDown,g.onMouseDown])},get onFocus(){return An([s.onFocus,g.onFocus])},onPointerMove:v,onPointerLeave:S},M,o))}})}function hT(e){const t=mt({closeOnSelect:!1},e),[n,r]=Ct(t,["checked","defaultChecked","onChange","onSelect"]),i=dK({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:o=>{var a;return(a=n.onChange)==null?void 0:a.call(n,o)},isDisabled:()=>r.disabled});return B($b,Xe({role:"menuitemcheckbox",get checked(){return i.isSelected()},onSelect:()=>{var o;(o=n.onSelect)==null||o.call(n),i.toggle()}},r))}var pJ=Gn();function ch(){return Vn(pJ)}var td={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>td.next(e==="ltr"?"rtl":"ltr",t)},mT={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function gT(e){const t=rs(),n=Zs(),r=ch(),{direction:i}=To(),s=mt({id:t.generateId("trigger")},e),[o,a]=Ct(s,["ref","id","disabled","onPointerDown","onClick","onKeyDown","onMouseOver","onFocus"]);let l=()=>t.value();r!==void 0&&(l=()=>t.value()??o.id,r.lastValue()===void 0&&r.setLastValue(l));const u=Jp(()=>n.triggerRef(),()=>"button"),d=z(()=>{var g;return u()==="a"&&((g=n.triggerRef())==null?void 0:g.getAttribute("href"))!=null});Be(Fs(()=>r==null?void 0:r.value(),g=>{var v;d()&&g===l()&&((v=n.triggerRef())==null||v.focus())}));const f=()=>{r!==void 0?n.isOpen()?r.value()===l()&&r.closeMenu():(r.autoFocusMenu()||r.setAutoFocusMenu(!0),n.open(!1)):n.toggle(!0)},p=g=>{nn(g,o.onPointerDown),g.currentTarget.dataset.pointerType=g.pointerType,!o.disabled&&g.pointerType!=="touch"&&g.button===0&&f()},h=g=>{nn(g,o.onClick),o.disabled||g.currentTarget.dataset.pointerType==="touch"&&f()},m=g=>{if(nn(g,o.onKeyDown),!o.disabled){if(d())switch(g.key){case"Enter":case" ":return}switch(g.key){case"Enter":case" ":case mT.first(t.orientation()):g.stopPropagation(),g.preventDefault(),rK(g.currentTarget),n.open("first"),r==null||r.setAutoFocusMenu(!0),r==null||r.setValue(l);break;case mT.last(t.orientation()):g.stopPropagation(),g.preventDefault(),n.open("last");break;case td.next(i(),t.orientation()):if(r===void 0)break;g.stopPropagation(),g.preventDefault(),r.nextMenu();break;case td.previous(i(),t.orientation()):if(r===void 0)break;g.stopPropagation(),g.preventDefault(),r.previousMenu();break}}},y=g=>{var v;nn(g,o.onMouseOver),((v=n.triggerRef())==null?void 0:v.dataset.pointerType)!=="touch"&&!o.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(l)},b=g=>{nn(g,o.onFocus),r!==void 0&&g.currentTarget.dataset.pointerType!=="touch"&&r.setValue(l)};return Be(()=>Fe(n.registerTriggerId(o.id))),B(Db,Xe({ref(g){const v=lr(n.setTriggerRef,o.ref);typeof v=="function"&&v(g)},get"data-kb-menu-value-trigger"(){return t.value()},get id(){return o.id},get disabled(){return o.disabled},"aria-haspopup":"true",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return z(()=>!!n.isOpen())()?n.contentId():void 0},get"data-highlighted"(){return l()!==void 0&&(r==null?void 0:r.value())===l()?!0:void 0},get tabIndex(){return r!==void 0?r.value()===l()||r.lastValue()===l()?0:-1:void 0},onPointerDown:p,onMouseOver:y,onClick:h,onKeyDown:m,onFocus:b,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),a))}var hJ=Gn();function yT(){return Vn(hJ)}function vT(e){let t;const n=rs(),r=Zs(),i=ch(),s=yT(),{direction:o}=To(),a=mt({id:n.generateId(`content-${Kr()}`)},e),[l,u]=Ct(a,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let d=0;const f=()=>r.parentMenuContext()==null&&i===void 0&&n.isModal(),p=JQ({selectionManager:r.listState().selectionManager,collection:r.listState().collection,autoFocus:r.autoFocus,deferAutoFocus:!0,shouldFocusWrap:!0,disallowTypeAhead:()=>!r.listState().selectionManager().isFocused(),orientation:()=>n.orientation()==="horizontal"?"vertical":"horizontal"},()=>t);eJ({trapFocus:()=>f()&&r.isOpen(),onMountAutoFocus:S=>{var w;i===void 0&&((w=l.onOpenAutoFocus)==null||w.call(l,S))},onUnmountAutoFocus:l.onCloseAutoFocus},()=>t);const h=S=>{if(ii(S.currentTarget,S.target)&&(S.key==="Tab"&&r.isOpen()&&S.preventDefault(),i!==void 0&&S.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(S.key){case td.next(o(),n.orientation()):S.stopPropagation(),S.preventDefault(),r.close(!0),i.setAutoFocusMenu(!0),i.nextMenu();break;case td.previous(o(),n.orientation()):if(S.currentTarget.hasAttribute("data-closed"))break;S.stopPropagation(),S.preventDefault(),r.close(!0),i.setAutoFocusMenu(!0),i.previousMenu();break}},m=S=>{var w;(w=l.onEscapeKeyDown)==null||w.call(l,S),i==null||i.setAutoFocusMenu(!1),r.close(!0)},y=S=>{var w;(w=l.onFocusOutside)==null||w.call(l,S),n.isModal()&&S.preventDefault()},b=S=>{var w,_;nn(S,l.onPointerEnter),r.isOpen()&&((w=r.parentMenuContext())==null||w.listState().selectionManager().setFocused(!1),(_=r.parentMenuContext())==null||_.listState().selectionManager().setFocusedKey(void 0))},g=S=>{if(nn(S,l.onPointerMove),S.pointerType!=="mouse")return;const w=S.target,_=d!==S.clientX;ii(S.currentTarget,w)&&_&&(r.setPointerDir(S.clientX>d?"right":"left"),d=S.clientX)};Be(()=>Fe(r.registerContentId(l.id)));const v={ref:lr(S=>{r.setContentRef(S),t=S},l.ref),role:"menu",get id(){return l.id},get tabIndex(){return p.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:An([l.onKeyDown,p.onKeyDown,h]),onMouseDown:An([l.onMouseDown,p.onMouseDown]),onFocusIn:An([l.onFocusIn,p.onFocusIn]),onFocusOut:An([l.onFocusOut,p.onFocusOut]),onPointerEnter:b,onPointerMove:g,get"data-orientation"(){return n.orientation()}};return B(Re,{get when(){return r.contentPresent()},get children(){return B(Re,{get when(){return s===void 0||r.parentMenuContext()!=null},get fallback(){return B(rn,Xe({as:"div"},()=>r.dataset(),v,u))},get children(){return B(VM.Positioner,{get children(){return B(XQ,Xe({get disableOutsidePointerEvents(){return z(()=>!!f())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return Xp({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},l.style)},onEscapeKeyDown:m,onFocusOutside:y,get onDismiss(){return r.close}},()=>r.dataset(),v,u))}})}})}})}function mJ(e){let t;const n=rs(),r=Zs(),[i,s]=Ct(e,["ref"]);return fJ({element:()=>t??null,enabled:()=>r.contentPresent()&&n.preventScroll()}),B(vT,Xe({ref(o){const a=lr(l=>{t=l},i.ref);typeof a=="function"&&a(o)}},s))}var bT=Gn();function gJ(){const e=Vn(bT);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function Yb(e){const t=rs(),n=mt({id:t.generateId(`group-${Kr()}`)},e),[r,i]=ye(),s={generateId:Yu(()=>n.id),registerLabelId:si(i)};return B(bT.Provider,{value:s,get children(){return B(rn,Xe({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function ST(e){const t=gJ(),n=mt({id:t.generateId("label")},e),[r,i]=Ct(n,["id"]);return Be(()=>Fe(t.registerLabelId(r.id))),B(rn,Xe({as:"span",get id(){return r.id},"aria-hidden":"true"},i))}function xT(e){const t=Zs(),n=mt({children:"▼"},e);return B(rn,Xe({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function wT(e){return B($b,Xe({role:"menuitem",closeOnSelect:!0},e))}function _T(e){const t=Vb(),n=mt({id:t.generateId("description")},e),[r,i]=Ct(n,["id"]);return Be(()=>Fe(t.registerDescription(r.id))),B(rn,Xe({as:"div",get id(){return r.id}},()=>t.dataset(),i))}function kT(e){const t=Vb(),n=mt({id:t.generateId("indicator")},e),[r,i]=Ct(n,["forceMount"]);return B(Re,{get when(){return r.forceMount||t.isChecked()},get children(){return B(rn,Xe({as:"div"},()=>t.dataset(),i))}})}function DT(e){const t=Vb(),n=mt({id:t.generateId("label")},e),[r,i]=Ct(n,["ref","id"]);return Be(()=>Fe(t.registerLabel(r.id))),B(rn,Xe({as:"div",ref(s){const o=lr(t.setLabelRef,r.ref);typeof o=="function"&&o(s)},get id(){return r.id}},()=>t.dataset(),i))}function CT(e){const t=Zs();return B(Re,{get when(){return t.contentPresent()},get children(){return B(wk,e)}})}var MT=Gn();function yJ(){const e=Vn(MT);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function TT(e){const n=rs().generateId(`radiogroup-${Kr()}`),r=mt({id:n},e),[i,s]=Ct(r,["value","defaultValue","onChange","disabled"]),[o,a]=Uu({value:()=>i.value,defaultValue:()=>i.defaultValue,onChange:u=>{var d;return(d=i.onChange)==null?void 0:d.call(i,u)}}),l={isDisabled:()=>i.disabled,isSelectedValue:u=>u===o(),setSelectedValue:a};return B(MT.Provider,{value:l,get children(){return B(Yb,s)}})}function IT(e){const t=yJ(),n=mt({closeOnSelect:!1},e),[r,i]=Ct(n,["value","onSelect"]);return B($b,Xe({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{var o;(o=r.onSelect)==null||o.call(r),t.setSelectedValue(r.value)}},i))}function vJ(e,t,n){const r=e.split("-")[0],i=n.getBoundingClientRect(),s=[],o=t.clientX,a=t.clientY;switch(r){case"top":s.push([o,a+5]),s.push([i.left,i.bottom]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]);break;case"right":s.push([o-5,a]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]);break;case"bottom":s.push([o,a-5]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]),s.push([i.left,i.top]);break;case"left":s.push([o+5,a]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]),s.push([i.left,i.top]),s.push([i.right,i.top]);break}return s}function bJ(e,t){return t?nK([e.clientX,e.clientY],t):!1}function ET(e){const t=rs(),n=cM(),r=dT(),i=ch(),s=yT(),o=mt({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,l]=Ct(o,["open","defaultOpen","onOpenChange"]);let u=0,d=null,f="right";const[p,h]=ye(),[m,y]=ye(),[b,g]=ye(),[v,S]=ye(),[w,_]=ye(!0),[T,M]=ye(l.placement),[C,k]=ye([]),[I,O]=ye([]),{DomCollectionProvider:A}=bK({items:I,onItemsChange:O}),L=HM({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:K=>{var Ve;return(Ve=a.onOpenChange)==null?void 0:Ve.call(a,K)}}),{present:V}=bM({show:()=>t.forceMount()||L.isOpen(),element:()=>v()??null}),Y=NK({selectionMode:"none",dataSource:I}),N=K=>{_(K),L.open()},j=(K=!1)=>{L.close(),K&&r&&r.close(!0)},G=K=>{_(K),L.toggle()},Z=()=>{const K=v();K&&(er(K),Y.selectionManager().setFocused(!0),Y.selectionManager().setFocusedKey(void 0))},W=()=>{s!=null?setTimeout(()=>Z()):Z()},re=K=>{k(Ze=>[...Ze,K]);const Ve=r==null?void 0:r.registerNestedMenu(K);return()=>{k(Ze=>mb(Ze,K)),Ve==null||Ve()}},fe=K=>f===(d==null?void 0:d.side)&&bJ(K,d==null?void 0:d.area),de=K=>{fe(K)&&K.preventDefault()},H=K=>{fe(K)||W()},Ge=K=>{fe(K)&&K.preventDefault()};nJ({isDisabled:()=>!(r==null&&L.isOpen()&&t.isModal()),targets:()=>[v(),...C()].filter(Boolean)}),Be(()=>{const K=v();if(!K||!r)return;const Ve=r.registerNestedMenu(K);Fe(()=>{Ve()})}),Be(()=>{r===void 0&&(i==null||i.registerMenu(t.value(),[v(),...C()]))}),Be(()=>{var K;r!==void 0||i===void 0||(i.value()===t.value()?((K=b())==null||K.focus(),i.autoFocusMenu()&&N(!0)):j())}),Be(()=>{r!==void 0||i===void 0||L.isOpen()&&i.setValue(t.value())}),Fe(()=>{r===void 0&&(i==null||i.unregisterMenu(t.value()))});const oe={dataset:z(()=>({"data-expanded":L.isOpen()?"":void 0,"data-closed":L.isOpen()?void 0:""})),isOpen:L.isOpen,contentPresent:V,nestedMenus:C,currentPlacement:T,pointerGraceTimeoutId:()=>u,autoFocus:w,listState:()=>Y,parentMenuContext:()=>r,triggerRef:b,contentRef:v,triggerId:p,contentId:m,setTriggerRef:g,setContentRef:S,open:N,close:j,toggle:G,focusContent:W,onItemEnter:de,onItemLeave:H,onTriggerLeave:Ge,setPointerDir:K=>f=K,setPointerGraceTimeoutId:K=>u=K,setPointerGraceIntent:K=>d=K,registerNestedMenu:re,registerItemToParentDomCollection:n==null?void 0:n.registerItem,registerTriggerId:si(h),registerContentId:si(y)};return B(A,{get children(){return B(uT.Provider,{value:oe,get children(){return B(Re,{when:s===void 0,get fallback(){return l.children},get children(){return B(VM,Xe({anchorRef:b,contentRef:v,onCurrentPlacementChange:M},l))}})}})}})}function RT(e){const{direction:t}=To();return B(ET,Xe({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var SJ={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function LT(e){const t=Zs(),n=rs(),[r,i]=Ct(e,["onFocusOutside","onKeyDown"]),{direction:s}=To();return B(vT,Xe({onOpenAutoFocus:d=>{d.preventDefault()},onCloseAutoFocus:d=>{d.preventDefault()},onFocusOutside:d=>{var p;(p=r.onFocusOutside)==null||p.call(r,d);const f=d.target;ii(t.triggerRef(),f)||t.close()},onKeyDown:d=>{nn(d,r.onKeyDown);const f=ii(d.currentTarget,d.target),p=SJ.close(s(),n.orientation()).includes(d.key),h=t.parentMenuContext()!=null;f&&p&&h&&(t.close(),er(t.triggerRef()))}},i))}var OT=["Enter"," "],xJ={open:(e,t)=>e==="ltr"?[...OT,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...OT,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function BT(e){let t;const n=rs(),r=Zs(),i=mt({id:n.generateId(`sub-trigger-${Kr()}`)},e),[s,o]=Ct(i,["ref","id","textValue","disabled","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);let a=null;const l=()=>{a&&window.clearTimeout(a),a=null},{direction:u}=To(),d=()=>s.id,f=()=>{const S=r.parentMenuContext();if(S==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");return S.listState().selectionManager()},p=()=>r.listState().collection(),h=()=>f().focusedKey()===d(),m=yM({key:d,selectionManager:f,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>s.disabled},()=>t),y=S=>{nn(S,s.onClick),!r.isOpen()&&!s.disabled&&r.open(!0)},b=S=>{var _;if(nn(S,s.onPointerMove),S.pointerType!=="mouse")return;const w=r.parentMenuContext();if(w==null||w.onItemEnter(S),!S.defaultPrevented){if(s.disabled){w==null||w.onItemLeave(S);return}!r.isOpen()&&!a&&((_=r.parentMenuContext())==null||_.setPointerGraceIntent(null),a=window.setTimeout(()=>{r.open(!1),l()},100)),w==null||w.onItemEnter(S),S.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),er(S.currentTarget),w==null||w.listState().selectionManager().setFocused(!0),w==null||w.listState().selectionManager().setFocusedKey(d()))}},g=S=>{if(nn(S,s.onPointerLeave),S.pointerType!=="mouse")return;l();const w=r.parentMenuContext(),_=r.contentRef();if(_){w==null||w.setPointerGraceIntent({area:vJ(r.currentPlacement(),S,_),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(w==null?void 0:w.pointerGraceTimeoutId());const T=window.setTimeout(()=>{w==null||w.setPointerGraceIntent(null)},300);w==null||w.setPointerGraceTimeoutId(T)}else{if(w==null||w.onTriggerLeave(S),S.defaultPrevented)return;w==null||w.setPointerGraceIntent(null)}w==null||w.onItemLeave(S)},v=S=>{nn(S,s.onKeyDown),!S.repeat&&(s.disabled||xJ.open(u(),n.orientation()).includes(S.key)&&(S.stopPropagation(),S.preventDefault(),f().setFocused(!1),f().setFocusedKey(void 0),r.isOpen()||r.open("first"),r.focusContent(),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(p().getFirstKey())))};return Be(()=>{if(r.registerItemToParentDomCollection==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");const S=r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:d(),textValue:s.textValue??(t==null?void 0:t.textContent)??"",disabled:s.disabled??!1});Fe(S)}),Be(Fs(()=>{var S;return(S=r.parentMenuContext())==null?void 0:S.pointerGraceTimeoutId()},S=>{Fe(()=>{var w;window.clearTimeout(S),(w=r.parentMenuContext())==null||w.setPointerGraceIntent(null)})})),Be(()=>Fe(r.registerTriggerId(s.id))),Fe(()=>{l()}),B(rn,Xe({as:"div",ref(S){const w=lr(_=>{r.setTriggerRef(_),t=_},s.ref);typeof w=="function"&&w(S)},get id(){return s.id},role:"menuitem",get tabIndex(){return m.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return z(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return s.disabled},get"data-key"(){return m.dataKey()},get"data-highlighted"(){return h()?"":void 0},get"data-disabled"(){return s.disabled?"":void 0},get onPointerDown(){return An([s.onPointerDown,m.onPointerDown])},get onPointerUp(){return An([s.onPointerUp,m.onPointerUp])},get onClick(){return An([y,m.onClick])},get onKeyDown(){return An([v,m.onKeyDown])},get onMouseDown(){return An([s.onMouseDown,m.onMouseDown])},get onFocus(){return An([s.onFocus,m.onFocus])},onPointerMove:b,onPointerLeave:g},()=>r.dataset(),o))}function wJ(e){const t=ch(),n=`menu-${Kr()}`,r=mt({id:n,modal:!0},e),[i,s]=Ct(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),o=HM({open:()=>i.open,defaultOpen:()=>i.defaultOpen,onOpenChange:l=>{var u;return(u=i.onOpenChange)==null?void 0:u.call(i,l)}}),a={isModal:()=>i.modal??!0,preventScroll:()=>i.preventScroll??a.isModal(),forceMount:()=>i.forceMount??!1,generateId:Yu(()=>i.id),value:()=>i.value,orientation:()=>i.orientation??(t==null?void 0:t.orientation())??"horizontal"};return B(pT.Provider,{value:a,get children(){return B(ET,Xe({get open(){return o.isOpen()},get onOpenChange(){return o.setIsOpen}},s))}})}var _J={};eh(_J,{Root:()=>uh,Separator:()=>kJ});function uh(e){let t;const n=mt({orientation:"horizontal"},e),[r,i]=Ct(n,["ref","orientation"]),s=Jp(()=>t,()=>"hr");return B(rn,Xe({as:"hr",ref(o){const a=lr(l=>t=l,r.ref);typeof a=="function"&&a(o)},get role(){return s()!=="hr"?"separator":void 0},get"aria-orientation"(){return r.orientation==="vertical"?"vertical":void 0},get"data-orientation"(){return r.orientation}},i))}var kJ=uh,_n={};eh(_n,{Arrow:()=>Nb,CheckboxItem:()=>hT,Content:()=>AT,DropdownMenu:()=>DJ,Group:()=>Yb,GroupLabel:()=>ST,Icon:()=>xT,Item:()=>wT,ItemDescription:()=>_T,ItemIndicator:()=>kT,ItemLabel:()=>DT,Portal:()=>CT,RadioGroup:()=>TT,RadioItem:()=>IT,Root:()=>PT,Separator:()=>uh,Sub:()=>RT,SubContent:()=>LT,SubTrigger:()=>BT,Trigger:()=>gT});function AT(e){const t=rs(),n=Zs(),[r,i]=Ct(e,["onCloseAutoFocus","onInteractOutside"]);let s=!1;return B(mJ,Xe({onCloseAutoFocus:l=>{var u;(u=r.onCloseAutoFocus)==null||u.call(r,l),s||er(n.triggerRef()),s=!1,l.preventDefault()},onInteractOutside:l=>{var u;(u=r.onInteractOutside)==null||u.call(r,l),(!t.isModal()||l.detail.isContextMenu)&&(s=!0)}},i))}function PT(e){const t=`dropdownmenu-${Kr()}`,n=mt({id:t},e);return B(wJ,n)}var DJ=Object.assign(PT,{Arrow:Nb,CheckboxItem:hT,Content:AT,Group:Yb,GroupLabel:ST,Icon:xT,Item:wT,ItemDescription:_T,ItemIndicator:kT,ItemLabel:DT,Portal:CT,RadioGroup:TT,RadioItem:IT,Separator:uh,Sub:RT,SubContent:LT,SubTrigger:BT,Trigger:gT}),q={colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000000",white:"#ffffff",neutral:{50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#344054",800:"#1d2939",900:"#101828"},darkGray:{50:"#525c7a",100:"#49536e",200:"#414962",300:"#394056",400:"#313749",500:"#292e3d",600:"#212530",700:"#191c24",800:"#111318",900:"#0b0d10"},gray:{50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#344054",800:"#1d2939",900:"#101828"},blue:{25:"#F5FAFF",50:"#EFF8FF",100:"#D1E9FF",200:"#B2DDFF",300:"#84CAFF",400:"#53B1FD",500:"#2E90FA",600:"#1570EF",700:"#175CD3",800:"#1849A9",900:"#194185"},green:{25:"#F6FEF9",50:"#ECFDF3",100:"#D1FADF",200:"#A6F4C5",300:"#6CE9A6",400:"#32D583",500:"#12B76A",600:"#039855",700:"#027A48",800:"#05603A",900:"#054F31"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},yellow:{25:"#FFFCF5",50:"#FFFAEB",100:"#FEF0C7",200:"#FEDF89",300:"#FEC84B",400:"#FDB022",500:"#F79009",600:"#DC6803",700:"#B54708",800:"#93370D",900:"#7A2E0E"},purple:{25:"#FAFAFF",50:"#F4F3FF",100:"#EBE9FE",200:"#D9D6FE",300:"#BDB4FE",400:"#9B8AFB",500:"#7A5AF8",600:"#6938EF",700:"#5925DC",800:"#4A1FB8",900:"#3E1C96"},teal:{25:"#F6FEFC",50:"#F0FDF9",100:"#CCFBEF",200:"#99F6E0",300:"#5FE9D0",400:"#2ED3B7",500:"#15B79E",600:"#0E9384",700:"#107569",800:"#125D56",900:"#134E48"},pink:{25:"#fdf2f8",50:"#fce7f3",100:"#fbcfe8",200:"#f9a8d4",300:"#f472b6",400:"#ec4899",500:"#db2777",600:"#be185d",700:"#9d174d",800:"#831843",900:"#500724"},cyan:{25:"#ecfeff",50:"#cffafe",100:"#a5f3fc",200:"#67e8f9",300:"#22d3ee",400:"#06b6d4",500:"#0891b2",600:"#0e7490",700:"#155e75",800:"#164e63",900:"#083344"}},alpha:{90:"e5",80:"cc"},font:{size:{xs:"calc(var(--tsqd-font-size) * 0.75)",sm:"calc(var(--tsqd-font-size) * 0.875)",md:"var(--tsqd-font-size)"},lineHeight:{xs:"calc(var(--tsqd-font-size) * 1)",sm:"calc(var(--tsqd-font-size) * 1.25)",md:"calc(var(--tsqd-font-size) * 1.5)"},weight:{medium:"500",semibold:"600",bold:"700"}},border:{radius:{xs:"calc(var(--tsqd-font-size) * 0.125)",sm:"calc(var(--tsqd-font-size) * 0.25)",full:"9999px"}},size:{.25:"calc(var(--tsqd-font-size) * 0.0625)",.5:"calc(var(--tsqd-font-size) * 0.125)",1:"calc(var(--tsqd-font-size) * 0.25)",1.5:"calc(var(--tsqd-font-size) * 0.375)",2:"calc(var(--tsqd-font-size) * 0.5)",2.5:"calc(var(--tsqd-font-size) * 0.625)",3:"calc(var(--tsqd-font-size) * 0.75)",3.5:"calc(var(--tsqd-font-size) * 0.875)",4:"calc(var(--tsqd-font-size) * 1)",4.5:"calc(var(--tsqd-font-size) * 1.125)",5:"calc(var(--tsqd-font-size) * 1.25)",6:"calc(var(--tsqd-font-size) * 1.5)",6.5:"calc(var(--tsqd-font-size) * 1.625)",14:"calc(var(--tsqd-font-size) * 3.5)"},shadow:{xs:(e="rgb(0 0 0 / 0.1)")=>"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:(e="rgb(0 0 0 / 0.1)")=>`0 1px 3px 0 ${e}, 0 1px 2px -1px ${e}`,md:(e="rgb(0 0 0 / 0.1)")=>`0 4px 6px -1px ${e}, 0 2px 4px -2px ${e}`,lg:(e="rgb(0 0 0 / 0.1)")=>`0 10px 15px -3px ${e}, 0 4px 6px -4px ${e}`,xl:(e="rgb(0 0 0 / 0.1)")=>`0 20px 25px -5px ${e}, 0 8px 10px -6px ${e}`,"2xl":(e="rgb(0 0 0 / 0.25)")=>`0 25px 50px -12px ${e}`,inner:(e="rgb(0 0 0 / 0.05)")=>`inset 0 2px 4px 0 ${e}`,none:()=>"none"}},CJ=we('<svg width=14 height=14 viewBox="0 0 14 14"fill=none xmlns=http://www.w3.org/2000/svg><path d="M13 13L9.00007 9M10.3333 5.66667C10.3333 8.244 8.244 10.3333 5.66667 10.3333C3.08934 10.3333 1 8.244 1 5.66667C1 3.08934 3.08934 1 5.66667 1C8.244 1 10.3333 3.08934 10.3333 5.66667Z"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),MJ=we('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9 3H15M3 6H21M19 6L18.2987 16.5193C18.1935 18.0975 18.1409 18.8867 17.8 19.485C17.4999 20.0118 17.0472 20.4353 16.5017 20.6997C15.882 21 15.0911 21 13.5093 21H10.4907C8.90891 21 8.11803 21 7.49834 20.6997C6.95276 20.4353 6.50009 20.0118 6.19998 19.485C5.85911 18.8867 5.8065 18.0975 5.70129 16.5193L5 6M10 10.5V15.5M14 10.5V15.5"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),TJ=we('<svg width=10 height=6 viewBox="0 0 10 6"fill=none xmlns=http://www.w3.org/2000/svg><path d="M1 1L5 5L9 1"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),IJ=we('<svg width=12 height=12 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 13.3333V2.66667M8 2.66667L4 6.66667M8 2.66667L12 6.66667"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),Wb=we('<svg width=12 height=12 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 2.66667V13.3333M8 13.3333L4 9.33333M8 13.3333L12 9.33333"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),EJ=we('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M12 2v2m0 16v2M4 12H2m4.314-5.686L4.9 4.9m12.786 1.414L19.1 4.9M6.314 17.69 4.9 19.104m12.786-1.414 1.414 1.414M22 12h-2m-3 0a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),RJ=we('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M22 15.844a10.424 10.424 0 0 1-4.306.925c-5.779 0-10.463-4.684-10.463-10.462 0-1.536.33-2.994.925-4.307A10.464 10.464 0 0 0 2 11.538C2 17.316 6.684 22 12.462 22c4.243 0 7.896-2.526 9.538-6.156Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),LJ=we('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 21h8m-4-4v4m-5.2-4h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 14.72 22 13.88 22 12.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 3 18.88 3 17.2 3H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 5.28 2 6.12 2 7.8v4.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 17 5.12 17 6.8 17Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),OJ=we('<svg stroke=currentColor fill=currentColor stroke-width=0 viewBox="0 0 24 24"height=1em width=1em xmlns=http://www.w3.org/2000/svg><path fill=none d="M0 0h24v24H0z"></path><path d="M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3a4.237 4.237 0 00-6 0zm-4-4l2 2a7.074 7.074 0 0110 0l2-2C15.14 9.14 8.87 9.14 5 13z">'),BJ=we('<svg stroke-width=0 viewBox="0 0 24 24"height=1em width=1em xmlns=http://www.w3.org/2000/svg><path fill=none d="M24 .01c0-.01 0-.01 0 0L0 0v24h24V.01zM0 0h24v24H0V0zm0 0h24v24H0V0z"></path><path d="M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7l2-2zm-4 4a9.793 9.793 0 00-4.49-2.56l3.53 3.53.96-.97zM2 3.05L5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24A9.684 9.684 0 005 13v.01L6.99 15a7.042 7.042 0 014.92-2.06L18.98 20l1.27-1.26L3.29 1.79 2 3.05zM9 17l3 3 3-3a4.237 4.237 0 00-6 0z">'),AJ=we('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9.3951 19.3711L9.97955 20.6856C10.1533 21.0768 10.4368 21.4093 10.7958 21.6426C11.1547 21.8759 11.5737 22.0001 12.0018 22C12.4299 22.0001 12.8488 21.8759 13.2078 21.6426C13.5667 21.4093 13.8503 21.0768 14.024 20.6856L14.6084 19.3711C14.8165 18.9047 15.1664 18.5159 15.6084 18.26C16.0532 18.0034 16.5678 17.8941 17.0784 17.9478L18.5084 18.1C18.9341 18.145 19.3637 18.0656 19.7451 17.8713C20.1265 17.6771 20.4434 17.3763 20.6573 17.0056C20.8715 16.635 20.9735 16.2103 20.9511 15.7829C20.9286 15.3555 20.7825 14.9438 20.5307 14.5978L19.684 13.4344C19.3825 13.0171 19.2214 12.5148 19.224 12C19.2239 11.4866 19.3865 10.9864 19.6884 10.5711L20.5351 9.40778C20.787 9.06175 20.933 8.65007 20.9555 8.22267C20.978 7.79528 20.8759 7.37054 20.6618 7C20.4479 6.62923 20.131 6.32849 19.7496 6.13423C19.3681 5.93997 18.9386 5.86053 18.5129 5.90556L17.0829 6.05778C16.5722 6.11141 16.0577 6.00212 15.6129 5.74556C15.17 5.48825 14.82 5.09736 14.6129 4.62889L14.024 3.31444C13.8503 2.92317 13.5667 2.59072 13.2078 2.3574C12.8488 2.12408 12.4299 1.99993 12.0018 2C11.5737 1.99993 11.1547 2.12408 10.7958 2.3574C10.4368 2.59072 10.1533 2.92317 9.97955 3.31444L9.3951 4.62889C9.18803 5.09736 8.83798 5.48825 8.3951 5.74556C7.95032 6.00212 7.43577 6.11141 6.9251 6.05778L5.49066 5.90556C5.06499 5.86053 4.6354 5.93997 4.25397 6.13423C3.87255 6.32849 3.55567 6.62923 3.34177 7C3.12759 7.37054 3.02555 7.79528 3.04804 8.22267C3.07052 8.65007 3.21656 9.06175 3.46844 9.40778L4.3151 10.5711C4.61704 10.9864 4.77964 11.4866 4.77955 12C4.77964 12.5134 4.61704 13.0137 4.3151 13.4289L3.46844 14.5922C3.21656 14.9382 3.07052 15.3499 3.04804 15.7773C3.02555 16.2047 3.12759 16.6295 3.34177 17C3.55589 17.3706 3.8728 17.6712 4.25417 17.8654C4.63554 18.0596 5.06502 18.1392 5.49066 18.0944L6.92066 17.9422C7.43133 17.8886 7.94587 17.9979 8.39066 18.2544C8.83519 18.511 9.18687 18.902 9.3951 19.3711Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round></path><path d="M12 15C13.6568 15 15 13.6569 15 12C15 10.3431 13.6568 9 12 9C10.3431 9 8.99998 10.3431 8.99998 12C8.99998 13.6569 10.3431 15 12 15Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),PJ=we('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M16 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V8M11.5 12.5L17 7M17 7H12M17 7V12M6.2 21H8.8C9.9201 21 10.4802 21 10.908 20.782C11.2843 20.5903 11.5903 20.2843 11.782 19.908C12 19.4802 12 18.9201 12 17.8V15.2C12 14.0799 12 13.5198 11.782 13.092C11.5903 12.7157 11.2843 12.4097 10.908 12.218C10.4802 12 9.92011 12 8.8 12H6.2C5.0799 12 4.51984 12 4.09202 12.218C3.71569 12.4097 3.40973 12.7157 3.21799 13.092C3 13.5198 3 14.0799 3 15.2V17.8C3 18.9201 3 19.4802 3.21799 19.908C3.40973 20.2843 3.71569 20.5903 4.09202 20.782C4.51984 21 5.07989 21 6.2 21Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),NJ=we('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path class=copier d="M8 8V5.2C8 4.0799 8 3.51984 8.21799 3.09202C8.40973 2.71569 8.71569 2.40973 9.09202 2.21799C9.51984 2 10.0799 2 11.2 2H18.8C19.9201 2 20.4802 2 20.908 2.21799C21.2843 2.40973 21.5903 2.71569 21.782 3.09202C22 3.51984 22 4.0799 22 5.2V12.8C22 13.9201 22 14.4802 21.782 14.908C21.5903 15.2843 21.2843 15.5903 20.908 15.782C20.4802 16 19.9201 16 18.8 16H16M5.2 22H12.8C13.9201 22 14.4802 22 14.908 21.782C15.2843 21.5903 15.5903 21.2843 15.782 20.908C16 20.4802 16 19.9201 16 18.8V11.2C16 10.0799 16 9.51984 15.782 9.09202C15.5903 8.71569 15.2843 8.40973 14.908 8.21799C14.4802 8 13.9201 8 12.8 8H5.2C4.0799 8 3.51984 8 3.09202 8.21799C2.71569 8.40973 2.40973 8.71569 2.21799 9.09202C2 9.51984 2 10.0799 2 11.2V18.8C2 19.9201 2 20.4802 2.21799 20.908C2.40973 21.2843 2.71569 21.5903 3.09202 21.782C3.51984 22 4.07989 22 5.2 22Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round stroke=currentColor>'),jJ=we('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M2.5 21.4998L8.04927 19.3655C8.40421 19.229 8.58168 19.1607 8.74772 19.0716C8.8952 18.9924 9.0358 18.901 9.16804 18.7984C9.31692 18.6829 9.45137 18.5484 9.72028 18.2795L21 6.99982C22.1046 5.89525 22.1046 4.10438 21 2.99981C19.8955 1.89525 18.1046 1.89524 17 2.99981L5.72028 14.2795C5.45138 14.5484 5.31692 14.6829 5.20139 14.8318C5.09877 14.964 5.0074 15.1046 4.92823 15.2521C4.83911 15.4181 4.77085 15.5956 4.63433 15.9506L2.5 21.4998ZM2.5 21.4998L4.55812 16.1488C4.7054 15.7659 4.77903 15.5744 4.90534 15.4867C5.01572 15.4101 5.1523 15.3811 5.2843 15.4063C5.43533 15.4351 5.58038 15.5802 5.87048 15.8703L8.12957 18.1294C8.41967 18.4195 8.56472 18.5645 8.59356 18.7155C8.61877 18.8475 8.58979 18.9841 8.51314 19.0945C8.42545 19.2208 8.23399 19.2944 7.85107 19.4417L2.5 21.4998Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),NT=we('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M7.5 12L10.5 15L16.5 9M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),FJ=we('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9 9L15 15M15 9L9 15M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z"stroke=#F04438 stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),GJ=we('<svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 xmlns=http://www.w3.org/2000/svg><rect class=list width=20 height=20 y=2 x=2 rx=2></rect><line class=list-item y1=7 y2=7 x1=6 x2=18></line><line class=list-item y2=12 y1=12 x1=6 x2=18></line><line class=list-item y1=17 y2=17 x1=6 x2=18>'),VJ=we('<svg viewBox="0 0 24 24"height=20 width=20 fill=none xmlns=http://www.w3.org/2000/svg><path d="M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),$J=we('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M7.5 12L10.5 15L16.5 9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),YJ=we('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M12 2V6M12 18V22M6 12H2M22 12H18M19.0784 19.0784L16.25 16.25M19.0784 4.99994L16.25 7.82837M4.92157 19.0784L7.75 16.25M4.92157 4.99994L7.75 7.82837"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round></path><animateTransform attributeName=transform attributeType=XML type=rotate from=0 to=360 dur=2s repeatCount=indefinite>'),WJ=we('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M15 9L9 15M9 9L15 15M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),HJ=we('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9.5 15V9M14.5 15V9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),ZJ=we('<svg version=1.0 viewBox="0 0 633 633"><linearGradient x1=-666.45 x2=-666.45 y1=163.28 y2=163.99 gradientTransform="matrix(633 0 0 633 422177 -103358)"gradientUnits=userSpaceOnUse><stop stop-color=#6BDAFF offset=0></stop><stop stop-color=#F9FFB5 offset=.32></stop><stop stop-color=#FFA770 offset=.71></stop><stop stop-color=#FF7373 offset=1></stop></linearGradient><circle cx=316.5 cy=316.5 r=316.5></circle><defs><filter x=-137.5 y=412 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=-137.5 y=412 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=89.5 cy=610.5 rx=214.5 ry=186 fill=#015064 stroke=#00CFE2 stroke-width=25></ellipse></g><defs><filter x=316.5 y=412 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=316.5 y=412 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=543.5 cy=610.5 rx=214.5 ry=186 fill=#015064 stroke=#00CFE2 stroke-width=25></ellipse></g><defs><filter x=-137.5 y=450 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=-137.5 y=450 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=89.5 cy=648.5 rx=214.5 ry=186 fill=#015064 stroke=#00A8B8 stroke-width=25></ellipse></g><defs><filter x=316.5 y=450 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=316.5 y=450 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=543.5 cy=648.5 rx=214.5 ry=186 fill=#015064 stroke=#00A8B8 stroke-width=25></ellipse></g><defs><filter x=-137.5 y=486 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=-137.5 y=486 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=89.5 cy=684.5 rx=214.5 ry=186 fill=#015064 stroke=#007782 stroke-width=25></ellipse></g><defs><filter x=316.5 y=486 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=316.5 y=486 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=543.5 cy=684.5 rx=214.5 ry=186 fill=#015064 stroke=#007782 stroke-width=25></ellipse></g><defs><filter x=272.2 y=308 width=176.9 height=129.3 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=272.2 y=308 width=176.9 height=129.3 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><line x1=436 x2=431 y1=403.2 y2=431.8 fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11></line><line x1=291 x2=280 y1=341.5 y2=403.5 fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11></line><line x1=332.9 x2=328.6 y1=384.1 y2=411.2 fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11></line><linearGradient x1=-670.75 x2=-671.59 y1=164.4 y2=164.49 gradientTransform="matrix(-184.16 -32.472 -11.461 64.997 -121359 -32126)"gradientUnits=userSpaceOnUse><stop stop-color=#EE2700 offset=0></stop><stop stop-color=#FF008E offset=1></stop></linearGradient><path d="m344.1 363 97.7 17.2c5.8 2.1 8.2 6.1 7.1 12.1s-4.7 9.2-11 9.9l-106-18.7-57.5-59.2c-3.2-4.8-2.9-9.1 0.8-12.8s8.3-4.4 13.7-2.1l55.2 53.6z"clip-rule=evenodd fill-rule=evenodd></path><line x1=428.2 x2=429.1 y1=384.5 y2=378 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=395.2 x2=396.1 y1=379.5 y2=373 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=362.2 x2=363.1 y1=373.5 y2=367.4 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=324.2 x2=328.4 y1=351.3 y2=347.4 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=303.2 x2=307.4 y1=331.3 y2=327.4 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line></g><defs><filter x=73.2 y=113.8 width=280.6 height=317.4 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=73.2 y=113.8 width=280.6 height=317.4 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><linearGradient x1=-672.16 x2=-672.16 y1=165.03 y2=166.03 gradientTransform="matrix(-100.18 48.861 97.976 200.88 -83342 -93.059)"gradientUnits=userSpaceOnUse><stop stop-color=#A17500 offset=0></stop><stop stop-color=#5D2100 offset=1></stop></linearGradient><path d="m192.3 203c8.1 37.3 14 73.6 17.8 109.1 3.8 35.4 2.8 75.1-3 119.2l61.2-16.7c-15.6-59-25.2-97.9-28.6-116.6s-10.8-51.9-22.1-99.6l-25.3 4.6"clip-rule=evenodd fill-rule=evenodd></path><g stroke=#2F8A00><linearGradient x1=-660.23 x2=-660.23 y1=166.72 y2=167.72 gradientTransform="matrix(92.683 4.8573 -2.0259 38.657 61680 -3088.6)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m195 183.9s-12.6-22.1-36.5-29.9c-15.9-5.2-34.4-1.5-55.5 11.1 15.9 14.3 29.5 22.6 40.7 24.9 16.8 3.6 51.3-6.1 51.3-6.1z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-661.36 x2=-661.36 y1=164.18 y2=165.18 gradientTransform="matrix(110 5.7648 -6.3599 121.35 73933 -15933)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5s-47.5-8.5-83.2 15.7c-23.8 16.2-34.3 49.3-31.6 99.4 30.3-27.8 52.1-48.5 65.2-61.9 19.8-20.2 49.6-53.2 49.6-53.2z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-656.79 x2=-656.79 y1=165.15 y2=166.15 gradientTransform="matrix(62.954 3.2993 -3.5023 66.828 42156 -8754.1)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m195 183.9c-0.8-21.9 6-38 20.6-48.2s29.8-15.4 45.5-15.3c-6.1 21.4-14.5 35.8-25.2 43.4s-24.4 14.2-40.9 20.1z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-663.07 x2=-663.07 y1=165.44 y2=166.44 gradientTransform="matrix(152.47 7.9907 -3.0936 59.029 101884 -4318.7)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5c31.9-30 64.1-39.7 96.7-29s50.8 30.4 54.6 59.1c-35.2-5.5-60.4-9.6-75.8-12.1-15.3-2.6-40.5-8.6-75.5-18z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-662.57 x2=-662.57 y1=164.44 y2=165.44 gradientTransform="matrix(136.46 7.1517 -5.2163 99.533 91536 -11442)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5c35.8-7.6 65.6-0.2 89.2 22s37.7 49 42.3 80.3c-39.8-9.7-68.3-23.8-85.5-42.4s-32.5-38.5-46-59.9z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-656.43 x2=-656.43 y1=163.86 y2=164.86 gradientTransform="matrix(60.866 3.1899 -8.7773 167.48 41560 -25168)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5c-33.6 13.8-53.6 35.7-60.1 65.6s-3.6 63.1 8.7 99.6c27.4-40.3 43.2-69.6 47.4-88s5.6-44.1 4-77.2z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><path d="m196.5 182.3c-14.8 21.6-25.1 41.4-30.8 59.4s-9.5 33-11.1 45.1"fill=none stroke-linecap=round stroke-width=8></path><path d="m194.9 185.7c-24.4 1.7-43.8 9-58.1 21.8s-24.7 25.4-31.3 37.8"fill=none stroke-linecap=round stroke-width=8></path><path d="m204.5 176.4c29.7-6.7 52-8.4 67-5.1s26.9 8.6 35.8 15.9"fill=none stroke-linecap=round stroke-width=8></path><path d="m196.5 181.4c20.3 9.9 38.2 20.5 53.9 31.9s27.4 22.1 35.1 32"fill=none stroke-linecap=round stroke-width=8></path></g></g><defs><filter x=50.5 y=399 width=532 height=633 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=50.5 y=399 width=532 height=633 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><linearGradient x1=-666.06 x2=-666.23 y1=163.36 y2=163.75 gradientTransform="matrix(532 0 0 633 354760 -102959)"gradientUnits=userSpaceOnUse><stop stop-color=#FFF400 offset=0></stop><stop stop-color=#3C8700 offset=1></stop></linearGradient><ellipse cx=316.5 cy=715.5 rx=266 ry=316.5></ellipse></g><defs><filter x=391 y=-24 width=288 height=283 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=391 y=-24 width=288 height=283 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><linearGradient x1=-664.56 x2=-664.56 y1=163.79 y2=164.79 gradientTransform="matrix(227 0 0 227 151421 -37204)"gradientUnits=userSpaceOnUse><stop stop-color=#FFDF00 offset=0></stop><stop stop-color=#FF9D00 offset=1></stop></linearGradient><circle cx=565.5 cy=89.5 r=113.5></circle><linearGradient x1=-644.5 x2=-645.77 y1=342 y2=342 gradientTransform="matrix(30 0 0 1 19770 -253)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=427 x2=397 y1=89 y2=89 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-641.56 x2=-642.83 y1=196.02 y2=196.07 gradientTransform="matrix(26.5 0 0 5.5 17439 -1025.5)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=430.5 x2=404 y1=55.5 y2=50 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-643.73 x2=-645 y1=185.83 y2=185.9 gradientTransform="matrix(29 0 0 8 19107 -1361)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=431 x2=402 y1=122 y2=130 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-638.94 x2=-640.22 y1=177.09 y2=177.39 gradientTransform="matrix(24 0 0 13 15783 -2145)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=442 x2=418 y1=153 y2=166 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-633.42 x2=-634.7 y1=172.41 y2=173.31 gradientTransform="matrix(20 0 0 19 13137 -3096)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=464 x2=444 y1=180 y2=199 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-619.05 x2=-619.52 y1=170.82 y2=171.82 gradientTransform="matrix(13.83 0 0 22.85 9050 -3703.4)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=491.4 x2=477.5 y1=203 y2=225.9 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-578.5 x2=-578.63 y1=170.31 y2=171.31 gradientTransform="matrix(7.5 0 0 24.5 4860 -3953)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=524.5 x2=517 y1=219.5 y2=244 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=666.5 x2=666.5 y1=170.31 y2=171.31 gradientTransform="matrix(.5 0 0 24.5 231.5 -3944)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=564.5 x2=565 y1=228.5 y2=253 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12>');function UJ(){return CJ()}function jT(){return MJ()}function nd(){return TJ()}function FT(){return IJ()}function GT(){return Wb()}function zJ(){return(()=>{var e=Wb();return e.style.setProperty("transform","rotate(90deg)"),e})()}function qJ(){return(()=>{var e=Wb();return e.style.setProperty("transform","rotate(-90deg)"),e})()}function XJ(){return EJ()}function KJ(){return RJ()}function QJ(){return LJ()}function JJ(){return OJ()}function eee(){return BJ()}function tee(){return AJ()}function nee(){return PJ()}function ree(){return NJ()}function iee(){return jJ()}function see(e){return(()=>{var t=NT(),n=t.firstChild;return Oe(()=>ie(n,"stroke",e.theme==="dark"?"#12B76A":"#027A48")),t})()}function oee(){return FJ()}function aee(){return GJ()}function lee(e){return[B(Re,{get when(){return e.checked},get children(){var t=NT(),n=t.firstChild;return Oe(()=>ie(n,"stroke",e.theme==="dark"?"#9B8AFB":"#6938EF")),t}}),B(Re,{get when(){return!e.checked},get children(){var t=VJ(),n=t.firstChild;return Oe(()=>ie(n,"stroke",e.theme==="dark"?"#9B8AFB":"#6938EF")),t}})]}function cee(){return $J()}function uee(){return YJ()}function dee(){return WJ()}function fee(){return HJ()}function VT(){const e=Kr();return(()=>{var t=ZJ(),n=t.firstChild,r=n.nextSibling,i=r.nextSibling,s=i.firstChild,o=i.nextSibling,a=o.firstChild,l=o.nextSibling,u=l.nextSibling,d=u.firstChild,f=u.nextSibling,p=f.firstChild,h=f.nextSibling,m=h.nextSibling,y=m.firstChild,b=m.nextSibling,g=b.firstChild,v=b.nextSibling,S=v.nextSibling,w=S.firstChild,_=S.nextSibling,T=_.firstChild,M=_.nextSibling,C=M.nextSibling,k=C.firstChild,I=C.nextSibling,O=I.firstChild,A=I.nextSibling,L=A.nextSibling,V=L.firstChild,Y=L.nextSibling,N=Y.firstChild,j=Y.nextSibling,G=j.nextSibling,Z=G.firstChild,W=G.nextSibling,re=W.firstChild,fe=W.nextSibling,de=fe.firstChild,H=de.nextSibling,Ge=H.nextSibling,Le=Ge.nextSibling,oe=Le.nextSibling,K=fe.nextSibling,Ve=K.firstChild,Ze=K.nextSibling,$t=Ze.firstChild,ge=Ze.nextSibling,Ee=ge.firstChild,_e=Ee.nextSibling,Ye=_e.nextSibling,rt=Ye.firstChild,lt=rt.nextSibling,J=lt.nextSibling,We=J.nextSibling,E=We.nextSibling,F=E.nextSibling,$=F.nextSibling,ee=$.nextSibling,te=ee.nextSibling,U=te.nextSibling,ke=U.nextSibling,Ue=ke.nextSibling,ze=ge.nextSibling,fn=ze.firstChild,Yn=ze.nextSibling,On=Yn.firstChild,Or=Yn.nextSibling,xr=Or.firstChild,ss=xr.nextSibling,qs=Or.nextSibling,Xs=qs.firstChild,os=qs.nextSibling,Ks=os.firstChild,Qs=os.nextSibling,Ao=Qs.firstChild,li=Ao.nextSibling,as=li.nextSibling,Wl=as.nextSibling,ud=Wl.nextSibling,mh=ud.nextSibling,dd=mh.nextSibling,gh=dd.nextSibling,fd=gh.nextSibling,pd=fd.nextSibling,yh=pd.nextSibling,vh=yh.nextSibling,hd=vh.nextSibling,md=hd.nextSibling,bh=md.nextSibling,Sh=bh.nextSibling,xh=Sh.nextSibling,Hb=xh.nextSibling;return ie(n,"id",`a-${e}`),ie(r,"fill",`url(#a-${e})`),ie(s,"id",`am-${e}`),ie(o,"id",`b-${e}`),ie(a,"filter",`url(#am-${e})`),ie(l,"mask",`url(#b-${e})`),ie(d,"id",`ah-${e}`),ie(f,"id",`k-${e}`),ie(p,"filter",`url(#ah-${e})`),ie(h,"mask",`url(#k-${e})`),ie(y,"id",`ae-${e}`),ie(b,"id",`j-${e}`),ie(g,"filter",`url(#ae-${e})`),ie(v,"mask",`url(#j-${e})`),ie(w,"id",`ai-${e}`),ie(_,"id",`i-${e}`),ie(T,"filter",`url(#ai-${e})`),ie(M,"mask",`url(#i-${e})`),ie(k,"id",`aj-${e}`),ie(I,"id",`h-${e}`),ie(O,"filter",`url(#aj-${e})`),ie(A,"mask",`url(#h-${e})`),ie(V,"id",`ag-${e}`),ie(Y,"id",`g-${e}`),ie(N,"filter",`url(#ag-${e})`),ie(j,"mask",`url(#g-${e})`),ie(Z,"id",`af-${e}`),ie(W,"id",`f-${e}`),ie(re,"filter",`url(#af-${e})`),ie(fe,"mask",`url(#f-${e})`),ie(Le,"id",`m-${e}`),ie(oe,"fill",`url(#m-${e})`),ie(Ve,"id",`ak-${e}`),ie(Ze,"id",`e-${e}`),ie($t,"filter",`url(#ak-${e})`),ie(ge,"mask",`url(#e-${e})`),ie(Ee,"id",`n-${e}`),ie(_e,"fill",`url(#n-${e})`),ie(rt,"id",`r-${e}`),ie(lt,"fill",`url(#r-${e})`),ie(J,"id",`s-${e}`),ie(We,"fill",`url(#s-${e})`),ie(E,"id",`q-${e}`),ie(F,"fill",`url(#q-${e})`),ie($,"id",`p-${e}`),ie(ee,"fill",`url(#p-${e})`),ie(te,"id",`o-${e}`),ie(U,"fill",`url(#o-${e})`),ie(ke,"id",`l-${e}`),ie(Ue,"fill",`url(#l-${e})`),ie(fn,"id",`al-${e}`),ie(Yn,"id",`d-${e}`),ie(On,"filter",`url(#al-${e})`),ie(Or,"mask",`url(#d-${e})`),ie(xr,"id",`u-${e}`),ie(ss,"fill",`url(#u-${e})`),ie(Xs,"id",`ad-${e}`),ie(os,"id",`c-${e}`),ie(Ks,"filter",`url(#ad-${e})`),ie(Qs,"mask",`url(#c-${e})`),ie(Ao,"id",`t-${e}`),ie(li,"fill",`url(#t-${e})`),ie(as,"id",`v-${e}`),ie(Wl,"stroke",`url(#v-${e})`),ie(ud,"id",`aa-${e}`),ie(mh,"stroke",`url(#aa-${e})`),ie(dd,"id",`w-${e}`),ie(gh,"stroke",`url(#w-${e})`),ie(fd,"id",`ac-${e}`),ie(pd,"stroke",`url(#ac-${e})`),ie(yh,"id",`ab-${e}`),ie(vh,"stroke",`url(#ab-${e})`),ie(hd,"id",`y-${e}`),ie(md,"stroke",`url(#y-${e})`),ie(bh,"id",`x-${e}`),ie(Sh,"stroke",`url(#x-${e})`),ie(xh,"id",`z-${e}`),ie(Hb,"stroke",`url(#z-${e})`),t})()}var pee=we('<span><svg width=16 height=16 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M6 12L10 8L6 4"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),hee=we('<button title="Copy object to clipboard">'),mee=we('<button title="Remove all items"aria-label="Remove all items">'),gee=we('<button title="Delete item"aria-label="Delete item">'),yee=we('<button title="Toggle value"aria-label="Toggle value">'),vee=we('<button title="Bulk Edit Data"aria-label="Bulk Edit Data">'),rd=we("<div>"),bee=we("<div><button> <span></span> <span> "),See=we("<input>"),$T=we("<span>"),xee=we("<div><span>:"),wee=we("<div><div><button> [<!>...<!>]");function _ee(e,t){let n=0;const r=[];for(;n<e.length;)r.push(e.slice(n,n+t)),n=n+t;return r}var YT=e=>{const t=$n(),n=Ae().shadowDOMTarget?ot.bind({target:Ae().shadowDOMTarget}):ot,r=z(()=>t()==="dark"?Bl(n):Ol(n));return(()=>{var i=pee();return Oe(()=>ae(i,he(r().expander,n`
|
103
|
+
transform: rotate(${e.expanded?90:0}deg);
|
104
|
+
`,e.expanded&&n`
|
105
|
+
& svg {
|
106
|
+
top: -1px;
|
107
|
+
}
|
108
|
+
`))),i})()},kee=e=>{const t=$n(),n=Ae().shadowDOMTarget?ot.bind({target:Ae().shadowDOMTarget}):ot,r=z(()=>t()==="dark"?Bl(n):Ol(n)),[i,s]=ye("NoCopy");return(()=>{var o=hee();return mk(o,"click",i()==="NoCopy"?()=>{navigator.clipboard.writeText(CH(e.value)).then(()=>{s("SuccessCopy"),setTimeout(()=>{s("NoCopy")},1500)},a=>{s("ErrorCopy"),setTimeout(()=>{s("NoCopy")},1500)})}:void 0,!0),X(o,B(M5,{get children(){return[B(Oy,{get when(){return i()==="NoCopy"},get children(){return B(ree,{})}}),B(Oy,{get when(){return i()==="SuccessCopy"},get children(){return B(see,{get theme(){return t()}})}}),B(Oy,{get when(){return i()==="ErrorCopy"},get children(){return B(oee,{})}})]}})),Oe(a=>{var l=r().actionButton,u=`${i()==="NoCopy"?"Copy object to clipboard":i()==="SuccessCopy"?"Object copied to clipboard":"Error copying object to clipboard"}`;return l!==a.e&&ae(o,a.e=l),u!==a.t&&ie(o,"aria-label",a.t=u),a},{e:void 0,t:void 0}),o})()},Dee=e=>{const t=$n(),n=Ae().shadowDOMTarget?ot.bind({target:Ae().shadowDOMTarget}):ot,r=z(()=>t()==="dark"?Bl(n):Ol(n)),i=Ae().client;return(()=>{var s=mee();return s.$$click=()=>{const o=e.activeQuery.state.data,a=ca(o,e.dataPath,[]);i.setQueryData(e.activeQuery.queryKey,a)},X(s,B(aee,{})),Oe(()=>ae(s,r().actionButton)),s})()},WT=e=>{const t=$n(),n=Ae().shadowDOMTarget?ot.bind({target:Ae().shadowDOMTarget}):ot,r=z(()=>t()==="dark"?Bl(n):Ol(n)),i=Ae().client;return(()=>{var s=gee();return s.$$click=()=>{const o=e.activeQuery.state.data,a=du(o,e.dataPath);i.setQueryData(e.activeQuery.queryKey,a)},X(s,B(jT,{})),Oe(()=>ae(s,he(r().actionButton))),s})()},Cee=e=>{const t=$n(),n=Ae().shadowDOMTarget?ot.bind({target:Ae().shadowDOMTarget}):ot,r=z(()=>t()==="dark"?Bl(n):Ol(n)),i=Ae().client;return(()=>{var s=yee();return s.$$click=()=>{const o=e.activeQuery.state.data,a=ca(o,e.dataPath,!e.value);i.setQueryData(e.activeQuery.queryKey,a)},X(s,B(lee,{get theme(){return t()},get checked(){return e.value}})),Oe(()=>ae(s,he(r().actionButton,n`
|
109
|
+
width: ${q.size[3.5]};
|
110
|
+
height: ${q.size[3.5]};
|
111
|
+
`))),s})()};function HT(e){return Symbol.iterator in e}function Lo(e){const t=$n(),n=Ae().shadowDOMTarget?ot.bind({target:Ae().shadowDOMTarget}):ot,r=z(()=>t()==="dark"?Bl(n):Ol(n)),i=Ae().client,[s,o]=ye((e.defaultExpanded||[]).includes(e.label)),a=()=>o(m=>!m),[l,u]=ye([]),d=z(()=>Array.isArray(e.value)?e.value.map((m,y)=>({label:y.toString(),value:m})):e.value!==null&&typeof e.value=="object"&&HT(e.value)&&typeof e.value[Symbol.iterator]=="function"?e.value instanceof Map?Array.from(e.value,([m,y])=>({label:m,value:y})):Array.from(e.value,(m,y)=>({label:y.toString(),value:m})):typeof e.value=="object"&&e.value!==null?Object.entries(e.value).map(([m,y])=>({label:m,value:y})):[]),f=z(()=>Array.isArray(e.value)?"array":e.value!==null&&typeof e.value=="object"&&HT(e.value)&&typeof e.value[Symbol.iterator]=="function"?"Iterable":typeof e.value=="object"&&e.value!==null?"object":typeof e.value),p=z(()=>_ee(d(),100)),h=e.dataPath??[];return(()=>{var m=rd();return X(m,B(Re,{get when(){return p().length},get children(){return[(()=>{var y=bee(),b=y.firstChild,g=b.firstChild,v=g.nextSibling,S=v.nextSibling,w=S.nextSibling,_=w.firstChild;return b.$$click=()=>a(),X(b,B(YT,{get expanded(){return s()}}),g),X(v,()=>e.label),X(w,()=>String(f()).toLowerCase()==="iterable"?"(Iterable) ":"",_),X(w,()=>d().length,_),X(w,()=>d().length>1?"items":"item",null),X(y,B(Re,{get when(){return e.editable},get children(){var T=rd();return X(T,B(kee,{get value(){return e.value}}),null),X(T,B(Re,{get when(){return e.itemsDeletable&&e.activeQuery!==void 0},get children(){return B(WT,{get activeQuery(){return e.activeQuery},dataPath:h})}}),null),X(T,B(Re,{get when(){return f()==="array"&&e.activeQuery!==void 0},get children(){return B(Dee,{get activeQuery(){return e.activeQuery},dataPath:h})}}),null),X(T,B(Re,{get when(){return z(()=>!!e.onEdit)()&&!Vk(e.value).meta},get children(){var M=vee();return M.$$click=()=>{var C;(C=e.onEdit)==null||C.call(e)},X(M,B(iee,{})),Oe(()=>ae(M,r().actionButton)),M}}),null),Oe(()=>ae(T,r().actions)),T}}),null),Oe(T=>{var M=r().expanderButtonContainer,C=r().expanderButton,k=r().info;return M!==T.e&&ae(y,T.e=M),C!==T.t&&ae(b,T.t=C),k!==T.a&&ae(w,T.a=k),T},{e:void 0,t:void 0,a:void 0}),y})(),B(Re,{get when(){return s()},get children(){return[B(Re,{get when(){return p().length===1},get children(){var y=rd();return X(y,B(qp,{get each(){return d()},by:b=>b.label,children:b=>B(Lo,{get defaultExpanded(){return e.defaultExpanded},get label(){return b().label},get value(){return b().value},get editable(){return e.editable},get dataPath(){return[...h,b().label]},get activeQuery(){return e.activeQuery},get itemsDeletable(){return f()==="array"||f()==="Iterable"||f()==="object"}})})),Oe(()=>ae(y,r().subEntry)),y}}),B(Re,{get when(){return p().length>1},get children(){var y=rd();return X(y,B(C5,{get each(){return p()},children:(b,g)=>(()=>{var v=wee(),S=v.firstChild,w=S.firstChild,_=w.firstChild,T=_.nextSibling,M=T.nextSibling,C=M.nextSibling;return C.nextSibling,w.$$click=()=>u(k=>k.includes(g)?k.filter(I=>I!==g):[...k,g]),X(w,B(YT,{get expanded(){return l().includes(g)}}),_),X(w,g*100,T),X(w,g*100+100-1,C),X(S,B(Re,{get when(){return l().includes(g)},get children(){var k=rd();return X(k,B(qp,{get each(){return b()},by:I=>I.label,children:I=>B(Lo,{get defaultExpanded(){return e.defaultExpanded},get label(){return I().label},get value(){return I().value},get editable(){return e.editable},get dataPath(){return[...h,I().label]},get activeQuery(){return e.activeQuery}})})),Oe(()=>ae(k,r().subEntry)),k}}),null),Oe(k=>{var I=r().entry,O=r().expanderButton;return I!==k.e&&ae(S,k.e=I),O!==k.t&&ae(w,k.t=O),k},{e:void 0,t:void 0}),v})()})),Oe(()=>ae(y,r().subEntry)),y}})]}})]}}),null),X(m,B(Re,{get when(){return p().length===0},get children(){var y=xee(),b=y.firstChild,g=b.firstChild;return X(b,()=>e.label,g),X(y,B(Re,{get when(){return z(()=>!!(e.editable&&e.activeQuery!==void 0))()&&(f()==="string"||f()==="number"||f()==="boolean")},get fallback(){return(()=>{var v=$T();return X(v,()=>Ep(e.value)),Oe(()=>ae(v,r().value)),v})()},get children(){return[B(Re,{get when(){return z(()=>!!(e.editable&&e.activeQuery!==void 0))()&&(f()==="string"||f()==="number")},get children(){var v=See();return v.addEventListener("change",S=>{const w=e.activeQuery.state.data,_=ca(w,h,f()==="number"?S.target.valueAsNumber:S.target.value);i.setQueryData(e.activeQuery.queryKey,_)}),Oe(S=>{var w=f()==="number"?"number":"text",_=he(r().value,r().editableInput);return w!==S.e&&ie(v,"type",S.e=w),_!==S.t&&ae(v,S.t=_),S},{e:void 0,t:void 0}),Oe(()=>v.value=e.value),v}}),B(Re,{get when(){return f()==="boolean"},get children(){var v=$T();return X(v,B(Cee,{get activeQuery(){return e.activeQuery},dataPath:h,get value(){return e.value}}),null),X(v,()=>Ep(e.value),null),Oe(()=>ae(v,he(r().value,r().actions,r().editableInput))),v}})]}}),null),X(y,B(Re,{get when(){return e.editable&&e.itemsDeletable&&e.activeQuery!==void 0},get children(){return B(WT,{get activeQuery(){return e.activeQuery},dataPath:h})}}),null),Oe(v=>{var S=r().row,w=r().label;return S!==v.e&&ae(y,v.e=S),w!==v.t&&ae(b,v.t=w),v},{e:void 0,t:void 0}),y}}),null),Oe(()=>ae(m,r().entry)),m})()}var ZT=(e,t)=>{const{colors:n,font:r,size:i,border:s}=q,o=(a,l)=>e==="light"?a:l;return{entry:t`
|
112
|
+
& * {
|
113
|
+
font-size: ${r.size.xs};
|
114
|
+
font-family:
|
115
|
+
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
116
|
+
'Liberation Mono', 'Courier New', monospace;
|
117
|
+
}
|
118
|
+
position: relative;
|
119
|
+
outline: none;
|
120
|
+
word-break: break-word;
|
121
|
+
`,subEntry:t`
|
122
|
+
margin: 0 0 0 0.5em;
|
123
|
+
padding-left: 0.75em;
|
124
|
+
border-left: 2px solid ${o(n.gray[300],n.darkGray[400])};
|
125
|
+
/* outline: 1px solid ${n.teal[400]}; */
|
126
|
+
`,expander:t`
|
127
|
+
& path {
|
128
|
+
stroke: ${n.gray[400]};
|
129
|
+
}
|
130
|
+
& svg {
|
131
|
+
width: ${i[3]};
|
132
|
+
height: ${i[3]};
|
133
|
+
}
|
134
|
+
display: inline-flex;
|
135
|
+
align-items: center;
|
136
|
+
transition: all 0.1s ease;
|
137
|
+
/* outline: 1px solid ${n.blue[400]}; */
|
138
|
+
`,expanderButtonContainer:t`
|
139
|
+
display: flex;
|
140
|
+
align-items: center;
|
141
|
+
line-height: ${i[4]};
|
142
|
+
min-height: ${i[4]};
|
143
|
+
gap: ${i[2]};
|
144
|
+
`,expanderButton:t`
|
145
|
+
cursor: pointer;
|
146
|
+
color: inherit;
|
147
|
+
font: inherit;
|
148
|
+
outline: inherit;
|
149
|
+
height: ${i[5]};
|
150
|
+
background: transparent;
|
151
|
+
border: none;
|
152
|
+
padding: 0;
|
153
|
+
display: inline-flex;
|
154
|
+
align-items: center;
|
155
|
+
gap: ${i[1]};
|
156
|
+
position: relative;
|
157
|
+
/* outline: 1px solid ${n.green[400]}; */
|
158
|
+
|
159
|
+
&:focus-visible {
|
160
|
+
border-radius: ${s.radius.xs};
|
161
|
+
outline: 2px solid ${n.blue[800]};
|
162
|
+
}
|
163
|
+
|
164
|
+
& svg {
|
165
|
+
position: relative;
|
166
|
+
left: 1px;
|
167
|
+
}
|
168
|
+
`,info:t`
|
169
|
+
color: ${o(n.gray[500],n.gray[500])};
|
170
|
+
font-size: ${r.size.xs};
|
171
|
+
margin-left: ${i[1]};
|
172
|
+
/* outline: 1px solid ${n.yellow[400]}; */
|
173
|
+
`,label:t`
|
174
|
+
color: ${o(n.gray[700],n.gray[300])};
|
175
|
+
white-space: nowrap;
|
176
|
+
`,value:t`
|
177
|
+
color: ${o(n.purple[600],n.purple[400])};
|
178
|
+
flex-grow: 1;
|
179
|
+
`,actions:t`
|
180
|
+
display: inline-flex;
|
181
|
+
gap: ${i[2]};
|
182
|
+
align-items: center;
|
183
|
+
`,row:t`
|
184
|
+
display: inline-flex;
|
185
|
+
gap: ${i[2]};
|
186
|
+
width: 100%;
|
187
|
+
margin: ${i[.25]} 0px;
|
188
|
+
line-height: ${i[4.5]};
|
189
|
+
align-items: center;
|
190
|
+
`,editableInput:t`
|
191
|
+
border: none;
|
192
|
+
padding: ${i[.5]} ${i[1]} ${i[.5]} ${i[1.5]};
|
193
|
+
flex-grow: 1;
|
194
|
+
border-radius: ${s.radius.xs};
|
195
|
+
background-color: ${o(n.gray[200],n.darkGray[500])};
|
196
|
+
|
197
|
+
&:hover {
|
198
|
+
background-color: ${o(n.gray[300],n.darkGray[600])};
|
199
|
+
}
|
200
|
+
`,actionButton:t`
|
201
|
+
background-color: transparent;
|
202
|
+
color: ${o(n.gray[500],n.gray[500])};
|
203
|
+
border: none;
|
204
|
+
display: inline-flex;
|
205
|
+
padding: 0px;
|
206
|
+
align-items: center;
|
207
|
+
justify-content: center;
|
208
|
+
cursor: pointer;
|
209
|
+
width: ${i[3]};
|
210
|
+
height: ${i[3]};
|
211
|
+
position: relative;
|
212
|
+
z-index: 1;
|
213
|
+
|
214
|
+
&:hover svg {
|
215
|
+
color: ${o(n.gray[600],n.gray[400])};
|
216
|
+
}
|
217
|
+
|
218
|
+
&:focus-visible {
|
219
|
+
border-radius: ${s.radius.xs};
|
220
|
+
outline: 2px solid ${n.blue[800]};
|
221
|
+
outline-offset: 2px;
|
222
|
+
}
|
223
|
+
`}},Ol=e=>ZT("light",e),Bl=e=>ZT("dark",e);Mp(["click"]);var Mee=we('<div><div aria-hidden=true></div><button type=button aria-label="Open Tanstack query devtools"class=tsqd-open-btn>'),dh=we("<div>"),Tee=we('<aside aria-label="Tanstack query devtools"><div></div><button aria-label="Close tanstack query devtools">'),Iee=we("<select name=tsqd-queries-filter-sort>"),Eee=we("<select name=tsqd-mutations-filter-sort>"),Ree=we("<span>Asc"),Lee=we("<span>Desc"),Oee=we('<button aria-label="Open in picture-in-picture mode"title="Open in picture-in-picture mode">'),Bee=we("<div>Settings"),Aee=we("<span>Position"),Pee=we("<span>Top"),Nee=we("<span>Bottom"),jee=we("<span>Left"),Fee=we("<span>Right"),Gee=we("<span>Theme"),Vee=we("<span>Light"),$ee=we("<span>Dark"),Yee=we("<span>System"),Wee=we("<div><div class=tsqd-queries-container>"),Hee=we("<div><div class=tsqd-mutations-container>"),Zee=we('<div><div><div><button aria-label="Close Tanstack query devtools"><span>TANSTACK</span><span> v</span></button></div></div><div><div><div><input aria-label="Filter queries by query key"type=text placeholder=Filter name=tsqd-query-filter-input></div><div></div><button class=tsqd-query-filter-sort-order-btn></button></div><div><button aria-label="Clear query cache"></button><button>'),UT=we("<option>Sort by "),Uee=we("<div class=tsqd-query-disabled-indicator>disabled"),zee=we("<div class=tsqd-query-static-indicator>static"),zT=we("<button><div></div><code class=tsqd-query-hash>"),qee=we("<div role=tooltip id=tsqd-status-tooltip>"),Xee=we("<span>"),Kee=we("<button><span></span><span>"),Qee=we("<button><span></span> Error"),Jee=we('<div><span></span>Trigger Error<select><option value=""disabled selected>'),ete=we('<div class="tsqd-query-details-explorer-container tsqd-query-details-data-explorer">'),tte=we("<form><textarea name=data></textarea><div><span></span><div><button type=button>Cancel</button><button>Save"),nte=we('<div><div>Query Details</div><div><div class=tsqd-query-details-summary><pre><code></code></pre><span></span></div><div class=tsqd-query-details-observers-count><span>Observers:</span><span></span></div><div class=tsqd-query-details-last-updated><span>Last Updated:</span><span></span></div></div><div>Actions</div><div><button><span></span>Refetch</button><button><span></span>Invalidate</button><button><span></span>Reset</button><button><span></span>Remove</button><button><span></span> Loading</button></div><div>Data </div><div>Query Explorer</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer">'),rte=we("<option>"),ite=we('<div><div>Mutation Details</div><div><div class=tsqd-query-details-summary><pre><code></code></pre><span></span></div><div class=tsqd-query-details-last-updated><span>Submitted At:</span><span></span></div></div><div>Variables Details</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"></div><div>Context Details</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"></div><div>Data Explorer</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"></div><div>Mutations Explorer</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer">'),[Lr,fh]=ye(null),[Oo,qT]=ye(null),[Us,XT]=ye(0),[id,ste]=ye(!1),ote=e=>{const t=$n(),n=Ae().shadowDOMTarget?ot.bind({target:Ae().shadowDOMTarget}):ot,r=z(()=>t()==="dark"?Ei(n):Ii(n)),i=z(()=>Ae().onlineManager);xo(()=>{const f=i().subscribe(p=>{ste(!p)});Fe(()=>{f()})});const s=fb(),o=z(()=>Ae().buttonPosition||iX),a=z(()=>e.localStore.open==="true"?!0:e.localStore.open==="false"?!1:Ae().initialIsOpen||oX),l=z(()=>e.localStore.position||Ae().position||db);let u;Be(()=>{const f=u.parentElement,p=e.localStore.height||TC,h=e.localStore.width||IC,m=l();f.style.setProperty("--tsqd-panel-height",`${m==="top"?"-":""}${p}px`),f.style.setProperty("--tsqd-panel-width",`${m==="left"?"-":""}${h}px`)}),xo(()=>{const f=()=>{const p=u.parentElement,h=getComputedStyle(p).fontSize;p.style.setProperty("--tsqd-font-size",h)};f(),window.addEventListener("focus",f),Fe(()=>{window.removeEventListener("focus",f)})});const d=z(()=>e.localStore.pip_open??"false");return[B(Re,{get when(){return z(()=>!!s().pipWindow)()&&d()=="true"},get children(){return B(wk,{get mount(){var f;return(f=s().pipWindow)==null?void 0:f.document.body},get children(){return B(ate,{get children(){return B(KT,e)}})}})}}),(()=>{var f=dh(),p=u;return typeof p=="function"?su(p,f):u=f,X(f,B(WC,{name:"tsqd-panel-transition",get children(){return B(Re,{get when(){return z(()=>!!(a()&&!s().pipWindow))()&&d()=="false"},get children(){return B(lte,{get localStore(){return e.localStore},get setLocalStore(){return e.setLocalStore}})}})}}),null),X(f,B(WC,{name:"tsqd-button-transition",get children(){return B(Re,{get when(){return!a()},get children(){var h=Mee(),m=h.firstChild,y=m.nextSibling;return X(m,B(VT,{})),y.$$click=()=>e.setLocalStore("open","true"),X(y,B(VT,{})),Oe(()=>ae(h,he(r().devtoolsBtn,r()[`devtoolsBtn-position-${o()}`],"tsqd-open-btn-container"))),h}})}}),null),Oe(()=>ae(f,he(n`
|
224
|
+
& .tsqd-panel-transition-exit-active,
|
225
|
+
& .tsqd-panel-transition-enter-active {
|
226
|
+
transition:
|
227
|
+
opacity 0.3s,
|
228
|
+
transform 0.3s;
|
229
|
+
}
|
230
|
+
|
231
|
+
& .tsqd-panel-transition-exit-to,
|
232
|
+
& .tsqd-panel-transition-enter {
|
233
|
+
${l()==="top"||l()==="bottom"?"transform: translateY(var(--tsqd-panel-height));":"transform: translateX(var(--tsqd-panel-width));"}
|
234
|
+
}
|
235
|
+
|
236
|
+
& .tsqd-button-transition-exit-active,
|
237
|
+
& .tsqd-button-transition-enter-active {
|
238
|
+
transition:
|
239
|
+
opacity 0.3s,
|
240
|
+
transform 0.3s;
|
241
|
+
opacity: 1;
|
242
|
+
}
|
243
|
+
|
244
|
+
& .tsqd-button-transition-exit-to,
|
245
|
+
& .tsqd-button-transition-enter {
|
246
|
+
transform: ${o()==="relative"?"none;":o()==="top-left"?"translateX(-72px);":o()==="top-right"?"translateX(72px);":"translateY(72px);"};
|
247
|
+
opacity: 0;
|
248
|
+
}
|
249
|
+
`,"tsqd-transitions-container"))),f})()]},ate=e=>{const t=fb(),n=$n(),r=Ae().shadowDOMTarget?ot.bind({target:Ae().shadowDOMTarget}):ot,i=z(()=>n()==="dark"?Ei(r):Ii(r)),s=()=>{const{colors:o}=q,a=(l,u)=>n()==="dark"?u:l;return Us()<Cl?r`
|
250
|
+
flex-direction: column;
|
251
|
+
background-color: ${a(o.gray[300],o.gray[600])};
|
252
|
+
`:r`
|
253
|
+
flex-direction: row;
|
254
|
+
background-color: ${a(o.gray[200],o.darkGray[900])};
|
255
|
+
`};return Be(()=>{const o=t().pipWindow,a=()=>{o&&XT(o.innerWidth)};o&&(o.addEventListener("resize",a),a()),Fe(()=>{o&&o.removeEventListener("resize",a)})}),(()=>{var o=dh();return o.style.setProperty("--tsqd-font-size","16px"),o.style.setProperty("max-height","100vh"),o.style.setProperty("height","100vh"),o.style.setProperty("width","100vw"),X(o,()=>e.children),Oe(()=>ae(o,he(i().panel,s(),{[r`
|
256
|
+
min-width: min-content;
|
257
|
+
`]:Us()<MC},"tsqd-main-panel"))),o})()},lte=e=>{const t=$n(),n=Ae().shadowDOMTarget?ot.bind({target:Ae().shadowDOMTarget}):ot,r=z(()=>t()==="dark"?Ei(n):Ii(n)),[i,s]=ye(!1),o=z(()=>e.localStore.position||Ae().position||db),a=d=>{const f=d.currentTarget.parentElement;if(!f)return;s(!0);const{height:p,width:h}=f.getBoundingClientRect(),m=d.clientX,y=d.clientY;let b=0;const g=Wk(3.5),v=Wk(12),S=_=>{if(_.preventDefault(),o()==="left"||o()==="right"){const T=o()==="right"?m-_.clientX:_.clientX-m;b=Math.round(h+T),b<v&&(b=v),e.setLocalStore("width",String(Math.round(b)));const M=f.getBoundingClientRect().width;Number(e.localStore.width)<M&&e.setLocalStore("width",String(M))}else{const T=o()==="bottom"?y-_.clientY:_.clientY-y;b=Math.round(p+T),b<g&&(b=g,fh(null)),e.setLocalStore("height",String(Math.round(b)))}},w=()=>{i()&&s(!1),document.removeEventListener("mousemove",S,!1),document.removeEventListener("mouseUp",w,!1)};document.addEventListener("mousemove",S,!1),document.addEventListener("mouseup",w,!1)};let l;xo(()=>{BX(l,({width:d},f)=>{f===l&&XT(d)})}),Be(()=>{var y,b;const d=(b=(y=l.parentElement)==null?void 0:y.parentElement)==null?void 0:b.parentElement;if(!d)return;const f=e.localStore.position||db,p=MH("padding",f),h=e.localStore.position==="left"||e.localStore.position==="right",m=(({padding:g,paddingTop:v,paddingBottom:S,paddingLeft:w,paddingRight:_})=>({padding:g,paddingTop:v,paddingBottom:S,paddingLeft:w,paddingRight:_}))(d.style);d.style[p]=`${h?e.localStore.width:e.localStore.height}px`,Fe(()=>{Object.entries(m).forEach(([g,v])=>{d.style[g]=v})})});const u=()=>{const{colors:d}=q,f=(p,h)=>t()==="dark"?h:p;return Us()<Cl?n`
|
258
|
+
flex-direction: column;
|
259
|
+
background-color: ${f(d.gray[300],d.gray[600])};
|
260
|
+
`:n`
|
261
|
+
flex-direction: row;
|
262
|
+
background-color: ${f(d.gray[200],d.darkGray[900])};
|
263
|
+
`};return(()=>{var d=Tee(),f=d.firstChild,p=f.nextSibling,h=l;return typeof h=="function"?su(h,d):l=d,f.$$mousedown=a,p.$$click=()=>e.setLocalStore("open","false"),X(p,B(nd,{})),X(d,B(KT,e),null),Oe(m=>{var y=he(r().panel,r()[`panel-position-${o()}`],u(),{[n`
|
264
|
+
min-width: min-content;
|
265
|
+
`]:Us()<MC&&(o()==="right"||o()==="left")},"tsqd-main-panel"),b=o()==="bottom"||o()==="top"?`${e.localStore.height||TC}px`:"auto",g=o()==="right"||o()==="left"?`${e.localStore.width||IC}px`:"auto",v=he(r().dragHandle,r()[`dragHandle-position-${o()}`],"tsqd-drag-handle"),S=he(r().closeBtn,r()[`closeBtn-position-${o()}`],"tsqd-minimize-btn");return y!==m.e&&ae(d,m.e=y),b!==m.t&&((m.t=b)!=null?d.style.setProperty("height",b):d.style.removeProperty("height")),g!==m.a&&((m.a=g)!=null?d.style.setProperty("width",g):d.style.removeProperty("width")),v!==m.o&&ae(f,m.o=v),S!==m.i&&ae(p,m.i=S),m},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),d})()},KT=e=>{mte(),gte();let t;const n=$n(),r=Ae().shadowDOMTarget?ot.bind({target:Ae().shadowDOMTarget}):ot,i=z(()=>n()==="dark"?Ei(r):Ii(r)),s=fb(),[o,a]=ye("queries"),l=z(()=>e.localStore.sort||lX),u=z(()=>Number(e.localStore.sortOrder)||EC),d=z(()=>e.localStore.mutationSort||cX),f=z(()=>Number(e.localStore.mutationSortOrder)||EC),p=z(()=>Gy[l()]),h=z(()=>Vy[d()]),m=z(()=>Ae().onlineManager),y=z(()=>Ae().client.getQueryCache()),b=z(()=>Ae().client.getMutationCache()),g=Pn(M=>M().getAll().length,!1),v=z(Fs(()=>[g(),e.localStore.filter,l(),u()],()=>{const M=y().getAll(),C=e.localStore.filter?M.filter(I=>AC(I.queryHash,e.localStore.filter||"").passed):[...M];return p()?C.sort((I,O)=>p()(I,O)*u()):C})),S=Ti(M=>M().getAll().length,!1),w=z(Fs(()=>[S(),e.localStore.mutationFilter,d(),f()],()=>{const M=b().getAll(),C=e.localStore.mutationFilter?M.filter(I=>{const O=`${I.options.mutationKey?JSON.stringify(I.options.mutationKey)+" - ":""}${new Date(I.state.submittedAt).toLocaleString()}`;return AC(O,e.localStore.mutationFilter||"").passed}):[...M];return h()?C.sort((I,O)=>h()(I,O)*f()):C})),_=M=>{e.setLocalStore("position",M)},T=M=>{const k=getComputedStyle(t).getPropertyValue("--tsqd-font-size");M.style.setProperty("--tsqd-font-size",k)};return[(()=>{var M=Zee(),C=M.firstChild,k=C.firstChild,I=k.firstChild,O=I.firstChild,A=O.nextSibling,L=A.firstChild,V=C.nextSibling,Y=V.firstChild,N=Y.firstChild,j=N.firstChild,G=N.nextSibling,Z=G.nextSibling,W=Y.nextSibling,re=W.firstChild,fe=re.nextSibling,de=t;return typeof de=="function"?su(de,M):t=M,I.$$click=()=>{if(!s().pipWindow&&!e.showPanelViewOnly){e.setLocalStore("open","false");return}e.onClose&&e.onClose()},X(A,()=>Ae().queryFlavor,L),X(A,()=>Ae().version,null),X(k,B(oi.Root,{get class(){return he(i().viewToggle)},get value(){return o()},onChange:H=>{a(H),fh(null),qT(null)},get children(){return[B(oi.Item,{value:"queries",class:"tsqd-radio-toggle",get children(){return[B(oi.ItemInput,{}),B(oi.ItemControl,{get children(){return B(oi.ItemIndicator,{})}}),B(oi.ItemLabel,{title:"Toggle Queries View",children:"Queries"})]}}),B(oi.Item,{value:"mutations",class:"tsqd-radio-toggle",get children(){return[B(oi.ItemInput,{}),B(oi.ItemControl,{get children(){return B(oi.ItemIndicator,{})}}),B(oi.ItemLabel,{title:"Toggle Mutations View",children:"Mutations"})]}})]}}),null),X(C,B(Re,{get when(){return o()==="queries"},get children(){return B(dte,{})}}),null),X(C,B(Re,{get when(){return o()==="mutations"},get children(){return B(fte,{})}}),null),X(N,B(UJ,{}),j),j.$$input=H=>{o()==="queries"?e.setLocalStore("filter",H.currentTarget.value):e.setLocalStore("mutationFilter",H.currentTarget.value)},X(G,B(Re,{get when(){return o()==="queries"},get children(){var H=Iee();return H.addEventListener("change",Ge=>{e.setLocalStore("sort",Ge.currentTarget.value)}),X(H,()=>Object.keys(Gy).map(Ge=>(()=>{var Le=UT();return Le.firstChild,Le.value=Ge,X(Le,Ge,null),Le})())),Oe(()=>H.value=l()),H}}),null),X(G,B(Re,{get when(){return o()==="mutations"},get children(){var H=Eee();return H.addEventListener("change",Ge=>{e.setLocalStore("mutationSort",Ge.currentTarget.value)}),X(H,()=>Object.keys(Vy).map(Ge=>(()=>{var Le=UT();return Le.firstChild,Le.value=Ge,X(Le,Ge,null),Le})())),Oe(()=>H.value=d()),H}}),null),X(G,B(nd,{}),null),Z.$$click=()=>{o()==="queries"?e.setLocalStore("sortOrder",String(u()*-1)):e.setLocalStore("mutationSortOrder",String(f()*-1))},X(Z,B(Re,{get when(){return(o()==="queries"?u():f())===1},get children(){return[Ree(),B(FT,{})]}}),null),X(Z,B(Re,{get when(){return(o()==="queries"?u():f())===-1},get children(){return[Lee(),B(GT,{})]}}),null),re.$$click=()=>{o()==="queries"?(is({type:"CLEAR_QUERY_CACHE"}),y().clear()):(is({type:"CLEAR_MUTATION_CACHE"}),b().clear())},X(re,B(jT,{})),fe.$$click=()=>{m().setOnline(!m().isOnline())},X(fe,(()=>{var H=z(()=>!!id());return()=>H()?B(eee,{}):B(JJ,{})})()),X(W,B(Re,{get when(){return z(()=>!s().pipWindow)()&&!s().disabled},get children(){var H=Oee();return H.$$click=()=>{s().requestPipWindow(Number(window.innerWidth),Number(e.localStore.height??500))},X(H,B(nee,{})),Oe(()=>ae(H,he(i().actionsBtn,"tsqd-actions-btn","tsqd-action-open-pip"))),H}}),null),X(W,B(_n.Root,{gutter:4,get children(){return[B(_n.Trigger,{get class(){return he(i().actionsBtn,"tsqd-actions-btn","tsqd-action-settings")},get children(){return B(tee,{})}}),B(_n.Portal,{ref:H=>T(H),get mount(){return z(()=>!!s().pipWindow)()?s().pipWindow.document.body:document.body},get children(){return B(_n.Content,{get class(){return he(i().settingsMenu,"tsqd-settings-menu")},get children(){return[(()=>{var H=Bee();return Oe(()=>ae(H,he(i().settingsMenuHeader,"tsqd-settings-menu-header"))),H})(),B(Re,{get when(){return!e.showPanelViewOnly},get children(){return B(_n.Sub,{overlap:!0,gutter:8,shift:-4,get children(){return[B(_n.SubTrigger,{get class(){return he(i().settingsSubTrigger,"tsqd-settings-menu-sub-trigger","tsqd-settings-menu-sub-trigger-position")},get children(){return[Aee(),B(nd,{})]}}),B(_n.Portal,{ref:H=>T(H),get mount(){return z(()=>!!s().pipWindow)()?s().pipWindow.document.body:document.body},get children(){return B(_n.SubContent,{get class(){return he(i().settingsMenu,"tsqd-settings-submenu")},get children(){return[B(_n.Item,{onSelect:()=>{_("top")},as:"button",get class(){return he(i().settingsSubButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-top")},get children(){return[Pee(),B(FT,{})]}}),B(_n.Item,{onSelect:()=>{_("bottom")},as:"button",get class(){return he(i().settingsSubButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-bottom")},get children(){return[Nee(),B(GT,{})]}}),B(_n.Item,{onSelect:()=>{_("left")},as:"button",get class(){return he(i().settingsSubButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-left")},get children(){return[jee(),B(zJ,{})]}}),B(_n.Item,{onSelect:()=>{_("right")},as:"button",get class(){return he(i().settingsSubButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-right")},get children(){return[Fee(),B(qJ,{})]}})]}})}})]}})}}),B(_n.Sub,{overlap:!0,gutter:8,shift:-4,get children(){return[B(_n.SubTrigger,{get class(){return he(i().settingsSubTrigger,"tsqd-settings-menu-sub-trigger","tsqd-settings-menu-sub-trigger-position")},get children(){return[Gee(),B(nd,{})]}}),B(_n.Portal,{ref:H=>T(H),get mount(){return z(()=>!!s().pipWindow)()?s().pipWindow.document.body:document.body},get children(){return B(_n.SubContent,{get class(){return he(i().settingsMenu,"tsqd-settings-submenu")},get children(){return[B(_n.Item,{onSelect:()=>{e.setLocalStore("theme_preference","light")},as:"button",get class(){return he(i().settingsSubButton,e.localStore.theme_preference==="light"&&i().themeSelectedButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-top")},get children(){return[Vee(),B(XJ,{})]}}),B(_n.Item,{onSelect:()=>{e.setLocalStore("theme_preference","dark")},as:"button",get class(){return he(i().settingsSubButton,e.localStore.theme_preference==="dark"&&i().themeSelectedButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-bottom")},get children(){return[$ee(),B(KJ,{})]}}),B(_n.Item,{onSelect:()=>{e.setLocalStore("theme_preference","system")},as:"button",get class(){return he(i().settingsSubButton,e.localStore.theme_preference==="system"&&i().themeSelectedButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-left")},get children(){return[Yee(),B(QJ,{})]}})]}})}})]}})]}})}})]}}),null),X(M,B(Re,{get when(){return o()==="queries"},get children(){var H=Wee(),Ge=H.firstChild;return X(Ge,B(qp,{by:Le=>Le.queryHash,get each(){return v()},children:Le=>B(cte,{get query(){return Le()}})})),Oe(()=>ae(H,he(i().overflowQueryContainer,"tsqd-queries-overflow-container"))),H}}),null),X(M,B(Re,{get when(){return o()==="mutations"},get children(){var H=Hee(),Ge=H.firstChild;return X(Ge,B(qp,{by:Le=>Le.mutationId,get each(){return w()},children:Le=>B(ute,{get mutation(){return Le()}})})),Oe(()=>ae(H,he(i().overflowQueryContainer,"tsqd-mutations-overflow-container"))),H}}),null),Oe(H=>{var Ge=he(i().queriesContainer,Us()<Cl&&(Lr()||Oo())&&r`
|
266
|
+
height: 50%;
|
267
|
+
max-height: 50%;
|
268
|
+
`,Us()<Cl&&!(Lr()||Oo())&&r`
|
269
|
+
height: 100%;
|
270
|
+
max-height: 100%;
|
271
|
+
`,"tsqd-queries-container"),Le=he(i().row,"tsqd-header"),oe=i().logoAndToggleContainer,K=he(i().logo,"tsqd-text-logo-container"),Ve=he(i().tanstackLogo,"tsqd-text-logo-tanstack"),Ze=he(i().queryFlavorLogo,"tsqd-text-logo-query-flavor"),$t=he(i().row,"tsqd-filters-actions-container"),ge=he(i().filtersContainer,"tsqd-filters-container"),Ee=he(i().filterInput,"tsqd-query-filter-textfield-container"),_e=he("tsqd-query-filter-textfield"),Ye=he(i().filterSelect,"tsqd-query-filter-sort-container"),rt=`Sort order ${(o()==="queries"?u():f())===-1?"descending":"ascending"}`,lt=(o()==="queries"?u():f())===-1,J=he(i().actionsContainer,"tsqd-actions-container"),We=he(i().actionsBtn,"tsqd-actions-btn","tsqd-action-clear-cache"),E=`Clear ${o()} cache`,F=he(i().actionsBtn,id()&&i().actionsBtnOffline,"tsqd-actions-btn","tsqd-action-mock-offline-behavior"),$=`${id()?"Unset offline mocking behavior":"Mock offline behavior"}`,ee=id(),te=`${id()?"Unset offline mocking behavior":"Mock offline behavior"}`;return Ge!==H.e&&ae(M,H.e=Ge),Le!==H.t&&ae(C,H.t=Le),oe!==H.a&&ae(k,H.a=oe),K!==H.o&&ae(I,H.o=K),Ve!==H.i&&ae(O,H.i=Ve),Ze!==H.n&&ae(A,H.n=Ze),$t!==H.s&&ae(V,H.s=$t),ge!==H.h&&ae(Y,H.h=ge),Ee!==H.r&&ae(N,H.r=Ee),_e!==H.d&&ae(j,H.d=_e),Ye!==H.l&&ae(G,H.l=Ye),rt!==H.u&&ie(Z,"aria-label",H.u=rt),lt!==H.c&&ie(Z,"aria-pressed",H.c=lt),J!==H.w&&ae(W,H.w=J),We!==H.m&&ae(re,H.m=We),E!==H.f&&ie(re,"title",H.f=E),F!==H.y&&ae(fe,H.y=F),$!==H.g&&ie(fe,"aria-label",H.g=$),ee!==H.p&&ie(fe,"aria-pressed",H.p=ee),te!==H.b&&ie(fe,"title",H.b=te),H},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0,y:void 0,g:void 0,p:void 0,b:void 0}),Oe(()=>j.value=o()==="queries"?e.localStore.filter||"":e.localStore.mutationFilter||""),M})(),B(Re,{get when(){return z(()=>o()==="queries")()&&Lr()},get children(){return B(pte,{})}}),B(Re,{get when(){return z(()=>o()==="mutations")()&&Oo()},get children(){return B(hte,{})}})]},cte=e=>{const t=$n(),n=Ae().shadowDOMTarget?ot.bind({target:Ae().shadowDOMTarget}):ot,r=z(()=>t()==="dark"?Ei(n):Ii(n)),{colors:i,alpha:s}=q,o=(m,y)=>t()==="dark"?y:m,a=Pn(m=>{var y;return(y=m().find({queryKey:e.query.queryKey}))==null?void 0:y.state},!0,m=>m.query.queryHash===e.query.queryHash),l=Pn(m=>{var y;return((y=m().find({queryKey:e.query.queryKey}))==null?void 0:y.isDisabled())??!1},!0,m=>m.query.queryHash===e.query.queryHash),u=Pn(m=>{var y;return((y=m().find({queryKey:e.query.queryKey}))==null?void 0:y.isStatic())??!1},!0,m=>m.query.queryHash===e.query.queryHash),d=Pn(m=>{var y;return((y=m().find({queryKey:e.query.queryKey}))==null?void 0:y.isStale())??!1},!0,m=>m.query.queryHash===e.query.queryHash),f=Pn(m=>{var y;return((y=m().find({queryKey:e.query.queryKey}))==null?void 0:y.getObserversCount())??0},!0,m=>m.query.queryHash===e.query.queryHash),p=z(()=>TH({queryState:a(),observerCount:f(),isStale:d()})),h=()=>p()==="gray"?n`
|
272
|
+
background-color: ${o(i[p()][200],i[p()][700])};
|
273
|
+
color: ${o(i[p()][700],i[p()][300])};
|
274
|
+
`:n`
|
275
|
+
background-color: ${o(i[p()][200]+s[80],i[p()][900])};
|
276
|
+
color: ${o(i[p()][800],i[p()][300])};
|
277
|
+
`;return B(Re,{get when(){return a()},get children(){var m=zT(),y=m.firstChild,b=y.nextSibling;return m.$$click=()=>fh(e.query.queryHash===Lr()?null:e.query.queryHash),X(y,f),X(b,()=>e.query.queryHash),X(m,B(Re,{get when(){return l()},get children(){return Uee()}}),null),X(m,B(Re,{get when(){return u()},get children(){return zee()}}),null),Oe(g=>{var v=he(r().queryRow,Lr()===e.query.queryHash&&r().selectedQueryRow,"tsqd-query-row"),S=`Query key ${e.query.queryHash}`,w=he(h(),"tsqd-query-observer-count");return v!==g.e&&ae(m,g.e=v),S!==g.t&&ie(m,"aria-label",g.t=S),w!==g.a&&ae(y,g.a=w),g},{e:void 0,t:void 0,a:void 0}),m}})},ute=e=>{const t=$n(),n=Ae().shadowDOMTarget?ot.bind({target:Ae().shadowDOMTarget}):ot,r=z(()=>t()==="dark"?Ei(n):Ii(n)),{colors:i,alpha:s}=q,o=(p,h)=>t()==="dark"?h:p,a=Ti(p=>{const m=p().getAll().find(y=>y.mutationId===e.mutation.mutationId);return m==null?void 0:m.state}),l=Ti(p=>{const m=p().getAll().find(y=>y.mutationId===e.mutation.mutationId);return m?m.state.isPaused:!1}),u=Ti(p=>{const m=p().getAll().find(y=>y.mutationId===e.mutation.mutationId);return m?m.state.status:"idle"}),d=z(()=>xl({isPaused:l(),status:u()})),f=()=>d()==="gray"?n`
|
278
|
+
background-color: ${o(i[d()][200],i[d()][700])};
|
279
|
+
color: ${o(i[d()][700],i[d()][300])};
|
280
|
+
`:n`
|
281
|
+
background-color: ${o(i[d()][200]+s[80],i[d()][900])};
|
282
|
+
color: ${o(i[d()][800],i[d()][300])};
|
283
|
+
`;return B(Re,{get when(){return a()},get children(){var p=zT(),h=p.firstChild,m=h.nextSibling;return p.$$click=()=>{qT(e.mutation.mutationId===Oo()?null:e.mutation.mutationId)},X(h,B(Re,{get when(){return d()==="purple"},get children(){return B(fee,{})}}),null),X(h,B(Re,{get when(){return d()==="green"},get children(){return B(cee,{})}}),null),X(h,B(Re,{get when(){return d()==="red"},get children(){return B(dee,{})}}),null),X(h,B(Re,{get when(){return d()==="yellow"},get children(){return B(uee,{})}}),null),X(m,B(Re,{get when(){return e.mutation.options.mutationKey},get children(){return[z(()=>JSON.stringify(e.mutation.options.mutationKey))," -"," "]}}),null),X(m,()=>new Date(e.mutation.state.submittedAt).toLocaleString(),null),Oe(y=>{var b=he(r().queryRow,Oo()===e.mutation.mutationId&&r().selectedQueryRow,"tsqd-query-row"),g=`Mutation submitted at ${new Date(e.mutation.state.submittedAt).toLocaleString()}`,v=he(f(),"tsqd-query-observer-count");return b!==y.e&&ae(p,y.e=b),g!==y.t&&ie(p,"aria-label",y.t=g),v!==y.a&&ae(h,y.a=v),y},{e:void 0,t:void 0,a:void 0}),p}})},dte=()=>{const e=Pn(l=>l().getAll().filter(u=>Sl(u)==="stale").length),t=Pn(l=>l().getAll().filter(u=>Sl(u)==="fresh").length),n=Pn(l=>l().getAll().filter(u=>Sl(u)==="fetching").length),r=Pn(l=>l().getAll().filter(u=>Sl(u)==="paused").length),i=Pn(l=>l().getAll().filter(u=>Sl(u)==="inactive").length),s=$n(),o=Ae().shadowDOMTarget?ot.bind({target:Ae().shadowDOMTarget}):ot,a=z(()=>s()==="dark"?Ei(o):Ii(o));return(()=>{var l=dh();return X(l,B(zs,{label:"Fresh",color:"green",get count(){return t()}}),null),X(l,B(zs,{label:"Fetching",color:"blue",get count(){return n()}}),null),X(l,B(zs,{label:"Paused",color:"purple",get count(){return r()}}),null),X(l,B(zs,{label:"Stale",color:"yellow",get count(){return e()}}),null),X(l,B(zs,{label:"Inactive",color:"gray",get count(){return i()}}),null),Oe(()=>ae(l,he(a().queryStatusContainer,"tsqd-query-status-container"))),l})()},fte=()=>{const e=Ti(a=>a().getAll().filter(l=>xl({isPaused:l.state.isPaused,status:l.state.status})==="green").length),t=Ti(a=>a().getAll().filter(l=>xl({isPaused:l.state.isPaused,status:l.state.status})==="yellow").length),n=Ti(a=>a().getAll().filter(l=>xl({isPaused:l.state.isPaused,status:l.state.status})==="purple").length),r=Ti(a=>a().getAll().filter(l=>xl({isPaused:l.state.isPaused,status:l.state.status})==="red").length),i=$n(),s=Ae().shadowDOMTarget?ot.bind({target:Ae().shadowDOMTarget}):ot,o=z(()=>i()==="dark"?Ei(s):Ii(s));return(()=>{var a=dh();return X(a,B(zs,{label:"Paused",color:"purple",get count(){return n()}}),null),X(a,B(zs,{label:"Pending",color:"yellow",get count(){return t()}}),null),X(a,B(zs,{label:"Success",color:"green",get count(){return e()}}),null),X(a,B(zs,{label:"Error",color:"red",get count(){return r()}}),null),Oe(()=>ae(a,he(o().queryStatusContainer,"tsqd-query-status-container"))),a})()},zs=e=>{const t=$n(),n=Ae().shadowDOMTarget?ot.bind({target:Ae().shadowDOMTarget}):ot,r=z(()=>t()==="dark"?Ei(n):Ii(n)),{colors:i,alpha:s}=q,o=(h,m)=>t()==="dark"?m:h;let a;const[l,u]=ye(!1),[d,f]=ye(!1),p=z(()=>!(Lr()&&Us()<rX&&Us()>Cl||Us()<Cl));return(()=>{var h=Kee(),m=h.firstChild,y=m.nextSibling,b=a;return typeof b=="function"?su(b,h):a=h,h.addEventListener("mouseleave",()=>{u(!1),f(!1)}),h.addEventListener("mouseenter",()=>u(!0)),h.addEventListener("blur",()=>f(!1)),h.addEventListener("focus",()=>f(!0)),gk(h,Xe({get disabled(){return p()},get class(){return he(r().queryStatusTag,!p()&&n`
|
284
|
+
cursor: pointer;
|
285
|
+
&:hover {
|
286
|
+
background: ${o(i.gray[200],i.darkGray[400])}${s[80]};
|
287
|
+
}
|
288
|
+
`,"tsqd-query-status-tag",`tsqd-query-status-tag-${e.label.toLowerCase()}`)}},()=>l()||d()?{"aria-describedby":"tsqd-status-tooltip"}:{}),!1,!0),X(h,B(Re,{get when(){return z(()=>!p())()&&(l()||d())},get children(){var g=qee();return X(g,()=>e.label),Oe(()=>ae(g,he(r().statusTooltip,"tsqd-query-status-tooltip"))),g}}),m),X(h,B(Re,{get when(){return p()},get children(){var g=Xee();return X(g,()=>e.label),Oe(()=>ae(g,he(r().queryStatusTagLabel,"tsqd-query-status-tag-label"))),g}}),y),X(y,()=>e.count),Oe(g=>{var v=he(n`
|
289
|
+
width: ${q.size[1.5]};
|
290
|
+
height: ${q.size[1.5]};
|
291
|
+
border-radius: ${q.border.radius.full};
|
292
|
+
background-color: ${q.colors[e.color][500]};
|
293
|
+
`,"tsqd-query-status-tag-dot"),S=he(r().queryStatusCount,e.count>0&&e.color!=="gray"&&n`
|
294
|
+
background-color: ${o(i[e.color][100],i[e.color][900])};
|
295
|
+
color: ${o(i[e.color][700],i[e.color][300])};
|
296
|
+
`,"tsqd-query-status-tag-count");return v!==g.e&&ae(m,g.e=v),S!==g.t&&ae(y,g.t=S),g},{e:void 0,t:void 0}),h})()},pte=()=>{const e=$n(),t=Ae().shadowDOMTarget?ot.bind({target:Ae().shadowDOMTarget}):ot,n=z(()=>e()==="dark"?Ei(t):Ii(t)),{colors:r}=q,i=(k,I)=>e()==="dark"?I:k,s=Ae().client,[o,a]=ye(!1),[l,u]=ye("view"),[d,f]=ye(!1),p=z(()=>Ae().errorTypes||[]),h=Pn(k=>k().getAll().find(I=>I.queryHash===Lr()),!1),m=Pn(k=>k().getAll().find(I=>I.queryHash===Lr()),!1),y=Pn(k=>{var I;return(I=k().getAll().find(O=>O.queryHash===Lr()))==null?void 0:I.state},!1),b=Pn(k=>{var I;return(I=k().getAll().find(O=>O.queryHash===Lr()))==null?void 0:I.state.data},!1),g=Pn(k=>{const I=k().getAll().find(O=>O.queryHash===Lr());return I?Sl(I):"inactive"}),v=Pn(k=>{const I=k().getAll().find(O=>O.queryHash===Lr());return I?I.state.status:"pending"}),S=Pn(k=>{var I;return((I=k().getAll().find(O=>O.queryHash===Lr()))==null?void 0:I.getObserversCount())??0}),w=z(()=>IH(g())),_=()=>{var I,O;is({type:"REFETCH",queryHash:(I=h())==null?void 0:I.queryHash});const k=(O=h())==null?void 0:O.fetch();k==null||k.catch(()=>{})},T=k=>{const I=h();if(!I)return;is({type:"TRIGGER_ERROR",queryHash:I.queryHash,metadata:{error:k==null?void 0:k.name}});const O=(k==null?void 0:k.initializer(I))??new Error("Unknown error from devtools"),A=I.options;I.setState({status:"error",error:O,fetchMeta:{...I.state.fetchMeta,__previousQueryOptions:A}})},M=()=>{const k=h();if(!k)return;is({type:"RESTORE_LOADING",queryHash:k.queryHash});const I=k.state,O=k.state.fetchMeta?k.state.fetchMeta.__previousQueryOptions:null;k.cancel({silent:!0}),k.setState({...I,fetchStatus:"idle",fetchMeta:null}),O&&k.fetch(O)};Be(()=>{g()!=="fetching"&&a(!1)});const C=()=>w()==="gray"?t`
|
297
|
+
background-color: ${i(r[w()][200],r[w()][700])};
|
298
|
+
color: ${i(r[w()][700],r[w()][300])};
|
299
|
+
border-color: ${i(r[w()][400],r[w()][600])};
|
300
|
+
`:t`
|
301
|
+
background-color: ${i(r[w()][100],r[w()][900])};
|
302
|
+
color: ${i(r[w()][700],r[w()][300])};
|
303
|
+
border-color: ${i(r[w()][400],r[w()][600])};
|
304
|
+
`;return B(Re,{get when(){return z(()=>!!h())()&&y()},get children(){var k=nte(),I=k.firstChild,O=I.nextSibling,A=O.firstChild,L=A.firstChild,V=L.firstChild,Y=L.nextSibling,N=A.nextSibling,j=N.firstChild,G=j.nextSibling,Z=N.nextSibling,W=Z.firstChild,re=W.nextSibling,fe=O.nextSibling,de=fe.nextSibling,H=de.firstChild,Ge=H.firstChild,Le=H.nextSibling,oe=Le.firstChild,K=Le.nextSibling,Ve=K.firstChild,Ze=K.nextSibling,$t=Ze.firstChild,ge=Ze.nextSibling,Ee=ge.firstChild,_e=Ee.nextSibling,Ye=de.nextSibling;Ye.firstChild;var rt=Ye.nextSibling,lt=rt.nextSibling;return X(V,()=>Ep(h().queryKey,!0)),X(Y,g),X(G,S),X(re,()=>new Date(y().dataUpdatedAt).toLocaleTimeString()),H.$$click=_,Le.$$click=()=>{var J;is({type:"INVALIDATE",queryHash:(J=h())==null?void 0:J.queryHash}),s.invalidateQueries(h())},K.$$click=()=>{var J;is({type:"RESET",queryHash:(J=h())==null?void 0:J.queryHash}),s.resetQueries(h())},Ze.$$click=()=>{var J;is({type:"REMOVE",queryHash:(J=h())==null?void 0:J.queryHash}),s.removeQueries(h()),fh(null)},ge.$$click=()=>{var J;if(((J=h())==null?void 0:J.state.data)===void 0)a(!0),M();else{const We=h();if(!We)return;is({type:"TRIGGER_LOADING",queryHash:We.queryHash});const E=We.options;We.fetch({...E,queryFn:()=>new Promise(()=>{}),gcTime:-1}),We.setState({data:void 0,status:"pending",fetchMeta:{...We.state.fetchMeta,__previousQueryOptions:E}})}},X(ge,()=>v()==="pending"?"Restore":"Trigger",_e),X(de,B(Re,{get when(){return p().length===0||v()==="error"},get children(){var J=Qee(),We=J.firstChild,E=We.nextSibling;return J.$$click=()=>{var F;h().state.error?(is({type:"RESTORE_ERROR",queryHash:(F=h())==null?void 0:F.queryHash}),s.resetQueries(h())):T()},X(J,()=>v()==="error"?"Restore":"Trigger",E),Oe(F=>{var $=he(t`
|
305
|
+
color: ${i(r.red[500],r.red[400])};
|
306
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-error"),ee=v()==="pending",te=t`
|
307
|
+
background-color: ${i(r.red[500],r.red[400])};
|
308
|
+
`;return $!==F.e&&ae(J,F.e=$),ee!==F.t&&(J.disabled=F.t=ee),te!==F.a&&ae(We,F.a=te),F},{e:void 0,t:void 0,a:void 0}),J}}),null),X(de,B(Re,{get when(){return!(p().length===0||v()==="error")},get children(){var J=Jee(),We=J.firstChild,E=We.nextSibling,F=E.nextSibling;return F.firstChild,F.addEventListener("change",$=>{const ee=p().find(te=>te.name===$.currentTarget.value);T(ee)}),X(F,B(D5,{get each(){return p()},children:$=>(()=>{var ee=rte();return X(ee,()=>$.name),Oe(()=>ee.value=$.name),ee})()}),null),X(J,B(nd,{}),null),Oe($=>{var ee=he(n().actionsSelect,"tsqd-query-details-actions-btn","tsqd-query-details-action-error-multiple"),te=t`
|
309
|
+
background-color: ${q.colors.red[400]};
|
310
|
+
`,U=v()==="pending";return ee!==$.e&&ae(J,$.e=ee),te!==$.t&&ae(We,$.t=te),U!==$.a&&(F.disabled=$.a=U),$},{e:void 0,t:void 0,a:void 0}),J}}),null),X(Ye,()=>l()==="view"?"Explorer":"Editor",null),X(k,B(Re,{get when(){return l()==="view"},get children(){var J=ete();return X(J,B(Lo,{label:"Data",defaultExpanded:["Data"],get value(){return b()},editable:!0,onEdit:()=>u("edit"),get activeQuery(){return h()}})),Oe(We=>(We=q.size[2])!=null?J.style.setProperty("padding",We):J.style.removeProperty("padding")),J}}),rt),X(k,B(Re,{get when(){return l()==="edit"},get children(){var J=tte(),We=J.firstChild,E=We.nextSibling,F=E.firstChild,$=F.nextSibling,ee=$.firstChild,te=ee.nextSibling;return J.addEventListener("submit",U=>{U.preventDefault();const Ue=new FormData(U.currentTarget).get("data");try{const ze=JSON.parse(Ue);h().setState({...h().state,data:ze}),u("view")}catch{f(!0)}}),We.addEventListener("focus",()=>f(!1)),X(F,()=>d()?"Invalid Value":""),ee.$$click=()=>u("view"),Oe(U=>{var ke=he(n().devtoolsEditForm,"tsqd-query-details-data-editor"),Ue=n().devtoolsEditTextarea,ze=d(),fn=n().devtoolsEditFormActions,Yn=n().devtoolsEditFormError,On=n().devtoolsEditFormActionContainer,Or=he(n().devtoolsEditFormAction,t`
|
311
|
+
color: ${i(r.gray[600],r.gray[300])};
|
312
|
+
`),xr=he(n().devtoolsEditFormAction,t`
|
313
|
+
color: ${i(r.blue[600],r.blue[400])};
|
314
|
+
`);return ke!==U.e&&ae(J,U.e=ke),Ue!==U.t&&ae(We,U.t=Ue),ze!==U.a&&ie(We,"data-error",U.a=ze),fn!==U.o&&ae(E,U.o=fn),Yn!==U.i&&ae(F,U.i=Yn),On!==U.n&&ae($,U.n=On),Or!==U.s&&ae(ee,U.s=Or),xr!==U.h&&ae(te,U.h=xr),U},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),Oe(()=>We.value=JSON.stringify(b(),null,2)),J}}),rt),X(lt,B(Lo,{label:"Query",defaultExpanded:["Query","queryKey"],get value(){return m()}})),Oe(J=>{var We=he(n().detailsContainer,"tsqd-query-details-container"),E=he(n().detailsHeader,"tsqd-query-details-header"),F=he(n().detailsBody,"tsqd-query-details-summary-container"),$=he(n().queryDetailsStatus,C()),ee=he(n().detailsHeader,"tsqd-query-details-header"),te=he(n().actionsBody,"tsqd-query-details-actions-container"),U=he(t`
|
315
|
+
color: ${i(r.blue[600],r.blue[400])};
|
316
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-refetch"),ke=g()==="fetching",Ue=t`
|
317
|
+
background-color: ${i(r.blue[600],r.blue[400])};
|
318
|
+
`,ze=he(t`
|
319
|
+
color: ${i(r.yellow[600],r.yellow[400])};
|
320
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-invalidate"),fn=v()==="pending",Yn=t`
|
321
|
+
background-color: ${i(r.yellow[600],r.yellow[400])};
|
322
|
+
`,On=he(t`
|
323
|
+
color: ${i(r.gray[600],r.gray[300])};
|
324
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-reset"),Or=v()==="pending",xr=t`
|
325
|
+
background-color: ${i(r.gray[600],r.gray[400])};
|
326
|
+
`,ss=he(t`
|
327
|
+
color: ${i(r.pink[500],r.pink[400])};
|
328
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-remove"),qs=g()==="fetching",Xs=t`
|
329
|
+
background-color: ${i(r.pink[500],r.pink[400])};
|
330
|
+
`,os=he(t`
|
331
|
+
color: ${i(r.cyan[500],r.cyan[400])};
|
332
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-loading"),Ks=o(),Qs=t`
|
333
|
+
background-color: ${i(r.cyan[500],r.cyan[400])};
|
334
|
+
`,Ao=he(n().detailsHeader,"tsqd-query-details-header"),li=he(n().detailsHeader,"tsqd-query-details-header"),as=q.size[2];return We!==J.e&&ae(k,J.e=We),E!==J.t&&ae(I,J.t=E),F!==J.a&&ae(O,J.a=F),$!==J.o&&ae(Y,J.o=$),ee!==J.i&&ae(fe,J.i=ee),te!==J.n&&ae(de,J.n=te),U!==J.s&&ae(H,J.s=U),ke!==J.h&&(H.disabled=J.h=ke),Ue!==J.r&&ae(Ge,J.r=Ue),ze!==J.d&&ae(Le,J.d=ze),fn!==J.l&&(Le.disabled=J.l=fn),Yn!==J.u&&ae(oe,J.u=Yn),On!==J.c&&ae(K,J.c=On),Or!==J.w&&(K.disabled=J.w=Or),xr!==J.m&&ae(Ve,J.m=xr),ss!==J.f&&ae(Ze,J.f=ss),qs!==J.y&&(Ze.disabled=J.y=qs),Xs!==J.g&&ae($t,J.g=Xs),os!==J.p&&ae(ge,J.p=os),Ks!==J.b&&(ge.disabled=J.b=Ks),Qs!==J.T&&ae(Ee,J.T=Qs),Ao!==J.A&&ae(Ye,J.A=Ao),li!==J.O&&ae(rt,J.O=li),as!==J.I&&((J.I=as)!=null?lt.style.setProperty("padding",as):lt.style.removeProperty("padding")),J},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0,y:void 0,g:void 0,p:void 0,b:void 0,T:void 0,A:void 0,O:void 0,I:void 0}),k}})},hte=()=>{const e=$n(),t=Ae().shadowDOMTarget?ot.bind({target:Ae().shadowDOMTarget}):ot,n=z(()=>e()==="dark"?Ei(t):Ii(t)),{colors:r}=q,i=(d,f)=>e()==="dark"?f:d,s=Ti(d=>{const p=d().getAll().find(h=>h.mutationId===Oo());return p?p.state.isPaused:!1}),o=Ti(d=>{const p=d().getAll().find(h=>h.mutationId===Oo());return p?p.state.status:"idle"}),a=z(()=>xl({isPaused:s(),status:o()})),l=Ti(d=>d().getAll().find(f=>f.mutationId===Oo()),!1),u=()=>a()==="gray"?t`
|
335
|
+
background-color: ${i(r[a()][200],r[a()][700])};
|
336
|
+
color: ${i(r[a()][700],r[a()][300])};
|
337
|
+
border-color: ${i(r[a()][400],r[a()][600])};
|
338
|
+
`:t`
|
339
|
+
background-color: ${i(r[a()][100],r[a()][900])};
|
340
|
+
color: ${i(r[a()][700],r[a()][300])};
|
341
|
+
border-color: ${i(r[a()][400],r[a()][600])};
|
342
|
+
`;return B(Re,{get when(){return l()},get children(){var d=ite(),f=d.firstChild,p=f.nextSibling,h=p.firstChild,m=h.firstChild,y=m.firstChild,b=m.nextSibling,g=h.nextSibling,v=g.firstChild,S=v.nextSibling,w=p.nextSibling,_=w.nextSibling,T=_.nextSibling,M=T.nextSibling,C=M.nextSibling,k=C.nextSibling,I=k.nextSibling,O=I.nextSibling;return X(y,B(Re,{get when(){return l().options.mutationKey},fallback:"No mutationKey found",get children(){return Ep(l().options.mutationKey,!0)}})),X(b,B(Re,{get when(){return a()==="purple"},children:"pending"}),null),X(b,B(Re,{get when(){return a()!=="purple"},get children(){return o()}}),null),X(S,()=>new Date(l().state.submittedAt).toLocaleTimeString()),X(_,B(Lo,{label:"Variables",defaultExpanded:["Variables"],get value(){return l().state.variables}})),X(M,B(Lo,{label:"Context",defaultExpanded:["Context"],get value(){return l().state.context}})),X(k,B(Lo,{label:"Data",defaultExpanded:["Data"],get value(){return l().state.data}})),X(O,B(Lo,{label:"Mutation",defaultExpanded:["Mutation"],get value(){return l()}})),Oe(A=>{var L=he(n().detailsContainer,"tsqd-query-details-container"),V=he(n().detailsHeader,"tsqd-query-details-header"),Y=he(n().detailsBody,"tsqd-query-details-summary-container"),N=he(n().queryDetailsStatus,u()),j=he(n().detailsHeader,"tsqd-query-details-header"),G=q.size[2],Z=he(n().detailsHeader,"tsqd-query-details-header"),W=q.size[2],re=he(n().detailsHeader,"tsqd-query-details-header"),fe=q.size[2],de=he(n().detailsHeader,"tsqd-query-details-header"),H=q.size[2];return L!==A.e&&ae(d,A.e=L),V!==A.t&&ae(f,A.t=V),Y!==A.a&&ae(p,A.a=Y),N!==A.o&&ae(b,A.o=N),j!==A.i&&ae(w,A.i=j),G!==A.n&&((A.n=G)!=null?_.style.setProperty("padding",G):_.style.removeProperty("padding")),Z!==A.s&&ae(T,A.s=Z),W!==A.h&&((A.h=W)!=null?M.style.setProperty("padding",W):M.style.removeProperty("padding")),re!==A.r&&ae(C,A.r=re),fe!==A.d&&((A.d=fe)!=null?k.style.setProperty("padding",fe):k.style.removeProperty("padding")),de!==A.l&&ae(I,A.l=de),H!==A.u&&((A.u=H)!=null?O.style.setProperty("padding",H):O.style.removeProperty("padding")),A},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0}),d}})},ph=new Map,mte=()=>{const e=z(()=>Ae().client.getQueryCache()),t=e().subscribe(n=>{u5(()=>{for(const[r,i]of ph.entries())i.shouldUpdate(n)&&i.setter(r(e))})});return Fe(()=>{ph.clear(),t()}),t},Pn=(e,t=!0,n=()=>!0)=>{const r=z(()=>Ae().client.getQueryCache()),[i,s]=ye(e(r),t?void 0:{equals:!1});return Be(()=>{s(e(r))}),ph.set(e,{setter:s,shouldUpdate:n}),Fe(()=>{ph.delete(e)}),i},hh=new Map,gte=()=>{const e=z(()=>Ae().client.getMutationCache()),t=e().subscribe(()=>{for(const[n,r]of hh.entries())queueMicrotask(()=>{r(n(e))})});return Fe(()=>{hh.clear(),t()}),t},Ti=(e,t=!0)=>{const n=z(()=>Ae().client.getMutationCache()),[r,i]=ye(e(n),t?void 0:{equals:!1});return Be(()=>{i(e(n))}),hh.set(e,i),Fe(()=>{hh.delete(e)}),r},yte="@tanstack/query-devtools-event",is=({type:e,queryHash:t,metadata:n})=>{const r=new CustomEvent(yte,{detail:{type:e,queryHash:t,metadata:n},bubbles:!0,cancelable:!0});window.dispatchEvent(r)},QT=(e,t)=>{const{colors:n,font:r,size:i,alpha:s,shadow:o,border:a}=q,l=(u,d)=>e==="light"?u:d;return{devtoolsBtn:t`
|
343
|
+
z-index: 100000;
|
344
|
+
position: fixed;
|
345
|
+
padding: 4px;
|
346
|
+
text-align: left;
|
347
|
+
|
348
|
+
display: flex;
|
349
|
+
align-items: center;
|
350
|
+
justify-content: center;
|
351
|
+
border-radius: 9999px;
|
352
|
+
box-shadow: ${o.md()};
|
353
|
+
overflow: hidden;
|
354
|
+
|
355
|
+
& div {
|
356
|
+
position: absolute;
|
357
|
+
top: -8px;
|
358
|
+
left: -8px;
|
359
|
+
right: -8px;
|
360
|
+
bottom: -8px;
|
361
|
+
border-radius: 9999px;
|
362
|
+
|
363
|
+
& svg {
|
364
|
+
position: absolute;
|
365
|
+
width: 100%;
|
366
|
+
height: 100%;
|
367
|
+
}
|
368
|
+
filter: blur(6px) saturate(1.2) contrast(1.1);
|
369
|
+
}
|
370
|
+
|
371
|
+
&:focus-within {
|
372
|
+
outline-offset: 2px;
|
373
|
+
outline: 3px solid ${n.green[600]};
|
374
|
+
}
|
375
|
+
|
376
|
+
& button {
|
377
|
+
position: relative;
|
378
|
+
z-index: 1;
|
379
|
+
padding: 0;
|
380
|
+
border-radius: 9999px;
|
381
|
+
background-color: transparent;
|
382
|
+
border: none;
|
383
|
+
height: 40px;
|
384
|
+
display: flex;
|
385
|
+
width: 40px;
|
386
|
+
overflow: hidden;
|
387
|
+
cursor: pointer;
|
388
|
+
outline: none;
|
389
|
+
& svg {
|
390
|
+
position: absolute;
|
391
|
+
width: 100%;
|
392
|
+
height: 100%;
|
393
|
+
}
|
394
|
+
}
|
395
|
+
`,panel:t`
|
396
|
+
position: fixed;
|
397
|
+
z-index: 9999;
|
398
|
+
display: flex;
|
399
|
+
gap: ${q.size[.5]};
|
400
|
+
& * {
|
401
|
+
box-sizing: border-box;
|
402
|
+
text-transform: none;
|
403
|
+
}
|
404
|
+
|
405
|
+
& *::-webkit-scrollbar {
|
406
|
+
width: 7px;
|
407
|
+
}
|
408
|
+
|
409
|
+
& *::-webkit-scrollbar-track {
|
410
|
+
background: transparent;
|
411
|
+
}
|
412
|
+
|
413
|
+
& *::-webkit-scrollbar-thumb {
|
414
|
+
background: ${l(n.gray[300],n.darkGray[200])};
|
415
|
+
}
|
416
|
+
|
417
|
+
& *::-webkit-scrollbar-thumb:hover {
|
418
|
+
background: ${l(n.gray[400],n.darkGray[300])};
|
419
|
+
}
|
420
|
+
`,parentPanel:t`
|
421
|
+
z-index: 9999;
|
422
|
+
display: flex;
|
423
|
+
height: 100%;
|
424
|
+
gap: ${q.size[.5]};
|
425
|
+
& * {
|
426
|
+
box-sizing: border-box;
|
427
|
+
text-transform: none;
|
428
|
+
}
|
429
|
+
|
430
|
+
& *::-webkit-scrollbar {
|
431
|
+
width: 7px;
|
432
|
+
}
|
433
|
+
|
434
|
+
& *::-webkit-scrollbar-track {
|
435
|
+
background: transparent;
|
436
|
+
}
|
437
|
+
|
438
|
+
& *::-webkit-scrollbar-thumb {
|
439
|
+
background: ${l(n.gray[300],n.darkGray[200])};
|
440
|
+
}
|
441
|
+
|
442
|
+
& *::-webkit-scrollbar-thumb:hover {
|
443
|
+
background: ${l(n.gray[400],n.darkGray[300])};
|
444
|
+
}
|
445
|
+
`,"devtoolsBtn-position-bottom-right":t`
|
446
|
+
bottom: 12px;
|
447
|
+
right: 12px;
|
448
|
+
`,"devtoolsBtn-position-bottom-left":t`
|
449
|
+
bottom: 12px;
|
450
|
+
left: 12px;
|
451
|
+
`,"devtoolsBtn-position-top-left":t`
|
452
|
+
top: 12px;
|
453
|
+
left: 12px;
|
454
|
+
`,"devtoolsBtn-position-top-right":t`
|
455
|
+
top: 12px;
|
456
|
+
right: 12px;
|
457
|
+
`,"devtoolsBtn-position-relative":t`
|
458
|
+
position: relative;
|
459
|
+
`,"panel-position-top":t`
|
460
|
+
top: 0;
|
461
|
+
right: 0;
|
462
|
+
left: 0;
|
463
|
+
max-height: 90%;
|
464
|
+
min-height: ${i[14]};
|
465
|
+
border-bottom: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
466
|
+
`,"panel-position-bottom":t`
|
467
|
+
bottom: 0;
|
468
|
+
right: 0;
|
469
|
+
left: 0;
|
470
|
+
max-height: 90%;
|
471
|
+
min-height: ${i[14]};
|
472
|
+
border-top: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
473
|
+
`,"panel-position-right":t`
|
474
|
+
bottom: 0;
|
475
|
+
right: 0;
|
476
|
+
top: 0;
|
477
|
+
border-left: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
478
|
+
max-width: 90%;
|
479
|
+
`,"panel-position-left":t`
|
480
|
+
bottom: 0;
|
481
|
+
left: 0;
|
482
|
+
top: 0;
|
483
|
+
border-right: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
484
|
+
max-width: 90%;
|
485
|
+
`,closeBtn:t`
|
486
|
+
position: absolute;
|
487
|
+
cursor: pointer;
|
488
|
+
z-index: 5;
|
489
|
+
display: flex;
|
490
|
+
align-items: center;
|
491
|
+
justify-content: center;
|
492
|
+
outline: none;
|
493
|
+
background-color: ${l(n.gray[50],n.darkGray[700])};
|
494
|
+
&:hover {
|
495
|
+
background-color: ${l(n.gray[200],n.darkGray[500])};
|
496
|
+
}
|
497
|
+
&:focus-visible {
|
498
|
+
outline: 2px solid ${n.blue[600]};
|
499
|
+
}
|
500
|
+
& svg {
|
501
|
+
color: ${l(n.gray[600],n.gray[400])};
|
502
|
+
width: ${i[2]};
|
503
|
+
height: ${i[2]};
|
504
|
+
}
|
505
|
+
`,"closeBtn-position-top":t`
|
506
|
+
bottom: 0;
|
507
|
+
right: ${i[2]};
|
508
|
+
transform: translate(0, 100%);
|
509
|
+
border-right: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
510
|
+
border-left: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
511
|
+
border-top: none;
|
512
|
+
border-bottom: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
513
|
+
border-radius: 0px 0px ${a.radius.sm} ${a.radius.sm};
|
514
|
+
padding: ${i[.5]} ${i[1.5]} ${i[1]} ${i[1.5]};
|
515
|
+
|
516
|
+
&::after {
|
517
|
+
content: ' ';
|
518
|
+
position: absolute;
|
519
|
+
bottom: 100%;
|
520
|
+
left: -${i[2.5]};
|
521
|
+
height: ${i[1.5]};
|
522
|
+
width: calc(100% + ${i[5]});
|
523
|
+
}
|
524
|
+
|
525
|
+
& svg {
|
526
|
+
transform: rotate(180deg);
|
527
|
+
}
|
528
|
+
`,"closeBtn-position-bottom":t`
|
529
|
+
top: 0;
|
530
|
+
right: ${i[2]};
|
531
|
+
transform: translate(0, -100%);
|
532
|
+
border-right: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
533
|
+
border-left: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
534
|
+
border-top: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
535
|
+
border-bottom: none;
|
536
|
+
border-radius: ${a.radius.sm} ${a.radius.sm} 0px 0px;
|
537
|
+
padding: ${i[1]} ${i[1.5]} ${i[.5]} ${i[1.5]};
|
538
|
+
|
539
|
+
&::after {
|
540
|
+
content: ' ';
|
541
|
+
position: absolute;
|
542
|
+
top: 100%;
|
543
|
+
left: -${i[2.5]};
|
544
|
+
height: ${i[1.5]};
|
545
|
+
width: calc(100% + ${i[5]});
|
546
|
+
}
|
547
|
+
`,"closeBtn-position-right":t`
|
548
|
+
bottom: ${i[2]};
|
549
|
+
left: 0;
|
550
|
+
transform: translate(-100%, 0);
|
551
|
+
border-right: none;
|
552
|
+
border-left: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
553
|
+
border-top: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
554
|
+
border-bottom: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
555
|
+
border-radius: ${a.radius.sm} 0px 0px ${a.radius.sm};
|
556
|
+
padding: ${i[1.5]} ${i[.5]} ${i[1.5]} ${i[1]};
|
557
|
+
|
558
|
+
&::after {
|
559
|
+
content: ' ';
|
560
|
+
position: absolute;
|
561
|
+
left: 100%;
|
562
|
+
height: calc(100% + ${i[5]});
|
563
|
+
width: ${i[1.5]};
|
564
|
+
}
|
565
|
+
|
566
|
+
& svg {
|
567
|
+
transform: rotate(-90deg);
|
568
|
+
}
|
569
|
+
`,"closeBtn-position-left":t`
|
570
|
+
bottom: ${i[2]};
|
571
|
+
right: 0;
|
572
|
+
transform: translate(100%, 0);
|
573
|
+
border-left: none;
|
574
|
+
border-right: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
575
|
+
border-top: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
576
|
+
border-bottom: ${l(n.gray[400],n.darkGray[300])} 1px solid;
|
577
|
+
border-radius: 0px ${a.radius.sm} ${a.radius.sm} 0px;
|
578
|
+
padding: ${i[1.5]} ${i[1]} ${i[1.5]} ${i[.5]};
|
579
|
+
|
580
|
+
&::after {
|
581
|
+
content: ' ';
|
582
|
+
position: absolute;
|
583
|
+
right: 100%;
|
584
|
+
height: calc(100% + ${i[5]});
|
585
|
+
width: ${i[1.5]};
|
586
|
+
}
|
587
|
+
|
588
|
+
& svg {
|
589
|
+
transform: rotate(90deg);
|
590
|
+
}
|
591
|
+
`,queriesContainer:t`
|
592
|
+
flex: 1 1 700px;
|
593
|
+
background-color: ${l(n.gray[50],n.darkGray[700])};
|
594
|
+
display: flex;
|
595
|
+
flex-direction: column;
|
596
|
+
& * {
|
597
|
+
font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
|
598
|
+
}
|
599
|
+
`,dragHandle:t`
|
600
|
+
position: absolute;
|
601
|
+
transition: background-color 0.125s ease;
|
602
|
+
&:hover {
|
603
|
+
background-color: ${n.purple[400]}${l("",s[90])};
|
604
|
+
}
|
605
|
+
z-index: 4;
|
606
|
+
`,"dragHandle-position-top":t`
|
607
|
+
bottom: 0;
|
608
|
+
width: 100%;
|
609
|
+
height: 3px;
|
610
|
+
cursor: ns-resize;
|
611
|
+
`,"dragHandle-position-bottom":t`
|
612
|
+
top: 0;
|
613
|
+
width: 100%;
|
614
|
+
height: 3px;
|
615
|
+
cursor: ns-resize;
|
616
|
+
`,"dragHandle-position-right":t`
|
617
|
+
left: 0;
|
618
|
+
width: 3px;
|
619
|
+
height: 100%;
|
620
|
+
cursor: ew-resize;
|
621
|
+
`,"dragHandle-position-left":t`
|
622
|
+
right: 0;
|
623
|
+
width: 3px;
|
624
|
+
height: 100%;
|
625
|
+
cursor: ew-resize;
|
626
|
+
`,row:t`
|
627
|
+
display: flex;
|
628
|
+
justify-content: space-between;
|
629
|
+
align-items: center;
|
630
|
+
padding: ${q.size[2]} ${q.size[2.5]};
|
631
|
+
gap: ${q.size[2.5]};
|
632
|
+
border-bottom: ${l(n.gray[300],n.darkGray[500])} 1px solid;
|
633
|
+
align-items: center;
|
634
|
+
& > button {
|
635
|
+
padding: 0;
|
636
|
+
background: transparent;
|
637
|
+
border: none;
|
638
|
+
display: flex;
|
639
|
+
gap: ${i[.5]};
|
640
|
+
flex-direction: column;
|
641
|
+
}
|
642
|
+
`,logoAndToggleContainer:t`
|
643
|
+
display: flex;
|
644
|
+
gap: ${q.size[3]};
|
645
|
+
align-items: center;
|
646
|
+
`,logo:t`
|
647
|
+
cursor: pointer;
|
648
|
+
display: flex;
|
649
|
+
flex-direction: column;
|
650
|
+
background-color: transparent;
|
651
|
+
border: none;
|
652
|
+
gap: ${q.size[.5]};
|
653
|
+
padding: 0px;
|
654
|
+
&:hover {
|
655
|
+
opacity: 0.7;
|
656
|
+
}
|
657
|
+
&:focus-visible {
|
658
|
+
outline-offset: 4px;
|
659
|
+
border-radius: ${a.radius.xs};
|
660
|
+
outline: 2px solid ${n.blue[800]};
|
661
|
+
}
|
662
|
+
`,tanstackLogo:t`
|
663
|
+
font-size: ${r.size.md};
|
664
|
+
font-weight: ${r.weight.bold};
|
665
|
+
line-height: ${r.lineHeight.xs};
|
666
|
+
white-space: nowrap;
|
667
|
+
color: ${l(n.gray[600],n.gray[300])};
|
668
|
+
`,queryFlavorLogo:t`
|
669
|
+
font-weight: ${r.weight.semibold};
|
670
|
+
font-size: ${r.size.xs};
|
671
|
+
background: linear-gradient(
|
672
|
+
to right,
|
673
|
+
${l("#ea4037, #ff9b11","#dd524b, #e9a03b")}
|
674
|
+
);
|
675
|
+
background-clip: text;
|
676
|
+
-webkit-background-clip: text;
|
677
|
+
line-height: 1;
|
678
|
+
-webkit-text-fill-color: transparent;
|
679
|
+
white-space: nowrap;
|
680
|
+
`,queryStatusContainer:t`
|
681
|
+
display: flex;
|
682
|
+
gap: ${q.size[2]};
|
683
|
+
height: min-content;
|
684
|
+
`,queryStatusTag:t`
|
685
|
+
display: flex;
|
686
|
+
gap: ${q.size[1.5]};
|
687
|
+
box-sizing: border-box;
|
688
|
+
height: ${q.size[6.5]};
|
689
|
+
background: ${l(n.gray[50],n.darkGray[500])};
|
690
|
+
color: ${l(n.gray[700],n.gray[300])};
|
691
|
+
border-radius: ${q.border.radius.sm};
|
692
|
+
font-size: ${r.size.sm};
|
693
|
+
padding: ${q.size[1]};
|
694
|
+
padding-left: ${q.size[1.5]};
|
695
|
+
align-items: center;
|
696
|
+
font-weight: ${r.weight.medium};
|
697
|
+
border: ${l("1px solid "+n.gray[300],"1px solid transparent")};
|
698
|
+
user-select: none;
|
699
|
+
position: relative;
|
700
|
+
&:focus-visible {
|
701
|
+
outline-offset: 2px;
|
702
|
+
outline: 2px solid ${n.blue[800]};
|
703
|
+
}
|
704
|
+
`,queryStatusTagLabel:t`
|
705
|
+
font-size: ${r.size.xs};
|
706
|
+
`,queryStatusCount:t`
|
707
|
+
font-size: ${r.size.xs};
|
708
|
+
padding: 0 5px;
|
709
|
+
display: flex;
|
710
|
+
align-items: center;
|
711
|
+
justify-content: center;
|
712
|
+
color: ${l(n.gray[500],n.gray[400])};
|
713
|
+
background-color: ${l(n.gray[200],n.darkGray[300])};
|
714
|
+
border-radius: 2px;
|
715
|
+
font-variant-numeric: tabular-nums;
|
716
|
+
height: ${q.size[4.5]};
|
717
|
+
`,statusTooltip:t`
|
718
|
+
position: absolute;
|
719
|
+
z-index: 1;
|
720
|
+
background-color: ${l(n.gray[50],n.darkGray[500])};
|
721
|
+
top: 100%;
|
722
|
+
left: 50%;
|
723
|
+
transform: translate(-50%, calc(${q.size[2]}));
|
724
|
+
padding: ${q.size[.5]} ${q.size[2]};
|
725
|
+
border-radius: ${q.border.radius.sm};
|
726
|
+
font-size: ${r.size.xs};
|
727
|
+
border: 1px solid ${l(n.gray[400],n.gray[600])};
|
728
|
+
color: ${l(n.gray[600],n.gray[300])};
|
729
|
+
|
730
|
+
&::before {
|
731
|
+
top: 0px;
|
732
|
+
content: ' ';
|
733
|
+
display: block;
|
734
|
+
left: 50%;
|
735
|
+
transform: translate(-50%, -100%);
|
736
|
+
position: absolute;
|
737
|
+
border-color: transparent transparent
|
738
|
+
${l(n.gray[400],n.gray[600])} transparent;
|
739
|
+
border-style: solid;
|
740
|
+
border-width: 7px;
|
741
|
+
/* transform: rotate(180deg); */
|
742
|
+
}
|
743
|
+
|
744
|
+
&::after {
|
745
|
+
top: 0px;
|
746
|
+
content: ' ';
|
747
|
+
display: block;
|
748
|
+
left: 50%;
|
749
|
+
transform: translate(-50%, calc(-100% + 2px));
|
750
|
+
position: absolute;
|
751
|
+
border-color: transparent transparent
|
752
|
+
${l(n.gray[100],n.darkGray[500])} transparent;
|
753
|
+
border-style: solid;
|
754
|
+
border-width: 7px;
|
755
|
+
}
|
756
|
+
`,filtersContainer:t`
|
757
|
+
display: flex;
|
758
|
+
gap: ${q.size[2]};
|
759
|
+
& > button {
|
760
|
+
cursor: pointer;
|
761
|
+
padding: ${q.size[.5]} ${q.size[1.5]} ${q.size[.5]}
|
762
|
+
${q.size[2]};
|
763
|
+
border-radius: ${q.border.radius.sm};
|
764
|
+
background-color: ${l(n.gray[100],n.darkGray[400])};
|
765
|
+
border: 1px solid ${l(n.gray[300],n.darkGray[200])};
|
766
|
+
color: ${l(n.gray[700],n.gray[300])};
|
767
|
+
font-size: ${r.size.xs};
|
768
|
+
display: flex;
|
769
|
+
align-items: center;
|
770
|
+
line-height: ${r.lineHeight.sm};
|
771
|
+
gap: ${q.size[1.5]};
|
772
|
+
max-width: 160px;
|
773
|
+
&:focus-visible {
|
774
|
+
outline-offset: 2px;
|
775
|
+
border-radius: ${a.radius.xs};
|
776
|
+
outline: 2px solid ${n.blue[800]};
|
777
|
+
}
|
778
|
+
& svg {
|
779
|
+
width: ${q.size[3]};
|
780
|
+
height: ${q.size[3]};
|
781
|
+
color: ${l(n.gray[500],n.gray[400])};
|
782
|
+
}
|
783
|
+
}
|
784
|
+
`,filterInput:t`
|
785
|
+
padding: ${i[.5]} ${i[2]};
|
786
|
+
border-radius: ${q.border.radius.sm};
|
787
|
+
background-color: ${l(n.gray[100],n.darkGray[400])};
|
788
|
+
display: flex;
|
789
|
+
box-sizing: content-box;
|
790
|
+
align-items: center;
|
791
|
+
gap: ${q.size[1.5]};
|
792
|
+
max-width: 160px;
|
793
|
+
min-width: 100px;
|
794
|
+
border: 1px solid ${l(n.gray[300],n.darkGray[200])};
|
795
|
+
height: min-content;
|
796
|
+
color: ${l(n.gray[600],n.gray[400])};
|
797
|
+
& > svg {
|
798
|
+
width: ${i[3]};
|
799
|
+
height: ${i[3]};
|
800
|
+
}
|
801
|
+
& input {
|
802
|
+
font-size: ${r.size.xs};
|
803
|
+
width: 100%;
|
804
|
+
background-color: ${l(n.gray[100],n.darkGray[400])};
|
805
|
+
border: none;
|
806
|
+
padding: 0;
|
807
|
+
line-height: ${r.lineHeight.sm};
|
808
|
+
color: ${l(n.gray[700],n.gray[300])};
|
809
|
+
&::placeholder {
|
810
|
+
color: ${l(n.gray[700],n.gray[300])};
|
811
|
+
}
|
812
|
+
&:focus {
|
813
|
+
outline: none;
|
814
|
+
}
|
815
|
+
}
|
816
|
+
|
817
|
+
&:focus-within {
|
818
|
+
outline-offset: 2px;
|
819
|
+
border-radius: ${a.radius.xs};
|
820
|
+
outline: 2px solid ${n.blue[800]};
|
821
|
+
}
|
822
|
+
`,filterSelect:t`
|
823
|
+
padding: ${q.size[.5]} ${q.size[2]};
|
824
|
+
border-radius: ${q.border.radius.sm};
|
825
|
+
background-color: ${l(n.gray[100],n.darkGray[400])};
|
826
|
+
display: flex;
|
827
|
+
align-items: center;
|
828
|
+
gap: ${q.size[1.5]};
|
829
|
+
box-sizing: content-box;
|
830
|
+
max-width: 160px;
|
831
|
+
border: 1px solid ${l(n.gray[300],n.darkGray[200])};
|
832
|
+
height: min-content;
|
833
|
+
& > svg {
|
834
|
+
color: ${l(n.gray[600],n.gray[400])};
|
835
|
+
width: ${q.size[2]};
|
836
|
+
height: ${q.size[2]};
|
837
|
+
}
|
838
|
+
& > select {
|
839
|
+
appearance: none;
|
840
|
+
color: ${l(n.gray[700],n.gray[300])};
|
841
|
+
min-width: 100px;
|
842
|
+
line-height: ${r.lineHeight.sm};
|
843
|
+
font-size: ${r.size.xs};
|
844
|
+
background-color: ${l(n.gray[100],n.darkGray[400])};
|
845
|
+
border: none;
|
846
|
+
&:focus {
|
847
|
+
outline: none;
|
848
|
+
}
|
849
|
+
}
|
850
|
+
&:focus-within {
|
851
|
+
outline-offset: 2px;
|
852
|
+
border-radius: ${a.radius.xs};
|
853
|
+
outline: 2px solid ${n.blue[800]};
|
854
|
+
}
|
855
|
+
`,actionsContainer:t`
|
856
|
+
display: flex;
|
857
|
+
gap: ${q.size[2]};
|
858
|
+
`,actionsBtn:t`
|
859
|
+
border-radius: ${q.border.radius.sm};
|
860
|
+
background-color: ${l(n.gray[100],n.darkGray[400])};
|
861
|
+
border: 1px solid ${l(n.gray[300],n.darkGray[200])};
|
862
|
+
width: ${q.size[6.5]};
|
863
|
+
height: ${q.size[6.5]};
|
864
|
+
justify-content: center;
|
865
|
+
display: flex;
|
866
|
+
align-items: center;
|
867
|
+
gap: ${q.size[1.5]};
|
868
|
+
max-width: 160px;
|
869
|
+
cursor: pointer;
|
870
|
+
padding: 0;
|
871
|
+
&:hover {
|
872
|
+
background-color: ${l(n.gray[200],n.darkGray[500])};
|
873
|
+
}
|
874
|
+
& svg {
|
875
|
+
color: ${l(n.gray[700],n.gray[300])};
|
876
|
+
width: ${q.size[3]};
|
877
|
+
height: ${q.size[3]};
|
878
|
+
}
|
879
|
+
&:focus-visible {
|
880
|
+
outline-offset: 2px;
|
881
|
+
border-radius: ${a.radius.xs};
|
882
|
+
outline: 2px solid ${n.blue[800]};
|
883
|
+
}
|
884
|
+
`,actionsBtnOffline:t`
|
885
|
+
& svg {
|
886
|
+
stroke: ${l(n.yellow[700],n.yellow[500])};
|
887
|
+
fill: ${l(n.yellow[700],n.yellow[500])};
|
888
|
+
}
|
889
|
+
`,overflowQueryContainer:t`
|
890
|
+
flex: 1;
|
891
|
+
overflow-y: auto;
|
892
|
+
& > div {
|
893
|
+
display: flex;
|
894
|
+
flex-direction: column;
|
895
|
+
}
|
896
|
+
`,queryRow:t`
|
897
|
+
display: flex;
|
898
|
+
align-items: center;
|
899
|
+
padding: 0;
|
900
|
+
border: none;
|
901
|
+
cursor: pointer;
|
902
|
+
color: ${l(n.gray[700],n.gray[300])};
|
903
|
+
background-color: ${l(n.gray[50],n.darkGray[700])};
|
904
|
+
line-height: 1;
|
905
|
+
&:focus {
|
906
|
+
outline: none;
|
907
|
+
}
|
908
|
+
&:focus-visible {
|
909
|
+
outline-offset: -2px;
|
910
|
+
border-radius: ${a.radius.xs};
|
911
|
+
outline: 2px solid ${n.blue[800]};
|
912
|
+
}
|
913
|
+
&:hover .tsqd-query-hash {
|
914
|
+
background-color: ${l(n.gray[200],n.darkGray[600])};
|
915
|
+
}
|
916
|
+
|
917
|
+
& .tsqd-query-observer-count {
|
918
|
+
padding: 0 ${q.size[1]};
|
919
|
+
user-select: none;
|
920
|
+
min-width: ${q.size[6.5]};
|
921
|
+
align-self: stretch;
|
922
|
+
display: flex;
|
923
|
+
align-items: center;
|
924
|
+
justify-content: center;
|
925
|
+
font-size: ${r.size.xs};
|
926
|
+
font-weight: ${r.weight.medium};
|
927
|
+
border-bottom-width: 1px;
|
928
|
+
border-bottom-style: solid;
|
929
|
+
border-bottom: 1px solid ${l(n.gray[300],n.darkGray[700])};
|
930
|
+
}
|
931
|
+
& .tsqd-query-hash {
|
932
|
+
user-select: text;
|
933
|
+
font-size: ${r.size.xs};
|
934
|
+
display: flex;
|
935
|
+
align-items: center;
|
936
|
+
min-height: ${q.size[6]};
|
937
|
+
flex: 1;
|
938
|
+
padding: ${q.size[1]} ${q.size[2]};
|
939
|
+
font-family:
|
940
|
+
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
941
|
+
'Liberation Mono', 'Courier New', monospace;
|
942
|
+
border-bottom: 1px solid ${l(n.gray[300],n.darkGray[400])};
|
943
|
+
text-align: left;
|
944
|
+
text-overflow: clip;
|
945
|
+
word-break: break-word;
|
946
|
+
}
|
947
|
+
|
948
|
+
& .tsqd-query-disabled-indicator {
|
949
|
+
align-self: stretch;
|
950
|
+
display: flex;
|
951
|
+
align-items: center;
|
952
|
+
padding: 0 ${q.size[2]};
|
953
|
+
color: ${l(n.gray[800],n.gray[300])};
|
954
|
+
background-color: ${l(n.gray[300],n.darkGray[600])};
|
955
|
+
border-bottom: 1px solid ${l(n.gray[300],n.darkGray[400])};
|
956
|
+
font-size: ${r.size.xs};
|
957
|
+
}
|
958
|
+
|
959
|
+
& .tsqd-query-static-indicator {
|
960
|
+
align-self: stretch;
|
961
|
+
display: flex;
|
962
|
+
align-items: center;
|
963
|
+
padding: 0 ${q.size[2]};
|
964
|
+
color: ${l(n.teal[800],n.teal[300])};
|
965
|
+
background-color: ${l(n.teal[100],n.teal[900])};
|
966
|
+
border-bottom: 1px solid ${l(n.teal[300],n.teal[700])};
|
967
|
+
font-size: ${r.size.xs};
|
968
|
+
}
|
969
|
+
`,selectedQueryRow:t`
|
970
|
+
background-color: ${l(n.gray[200],n.darkGray[500])};
|
971
|
+
`,detailsContainer:t`
|
972
|
+
flex: 1 1 700px;
|
973
|
+
background-color: ${l(n.gray[50],n.darkGray[700])};
|
974
|
+
color: ${l(n.gray[700],n.gray[300])};
|
975
|
+
font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
|
976
|
+
display: flex;
|
977
|
+
flex-direction: column;
|
978
|
+
overflow-y: auto;
|
979
|
+
display: flex;
|
980
|
+
text-align: left;
|
981
|
+
`,detailsHeader:t`
|
982
|
+
font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
|
983
|
+
position: sticky;
|
984
|
+
top: 0;
|
985
|
+
z-index: 2;
|
986
|
+
background-color: ${l(n.gray[200],n.darkGray[600])};
|
987
|
+
padding: ${q.size[1.5]} ${q.size[2]};
|
988
|
+
font-weight: ${r.weight.medium};
|
989
|
+
font-size: ${r.size.xs};
|
990
|
+
line-height: ${r.lineHeight.xs};
|
991
|
+
text-align: left;
|
992
|
+
`,detailsBody:t`
|
993
|
+
margin: ${q.size[1.5]} 0px ${q.size[2]} 0px;
|
994
|
+
& > div {
|
995
|
+
display: flex;
|
996
|
+
align-items: stretch;
|
997
|
+
padding: 0 ${q.size[2]};
|
998
|
+
line-height: ${r.lineHeight.sm};
|
999
|
+
justify-content: space-between;
|
1000
|
+
& > span {
|
1001
|
+
font-size: ${r.size.xs};
|
1002
|
+
}
|
1003
|
+
& > span:nth-child(2) {
|
1004
|
+
font-variant-numeric: tabular-nums;
|
1005
|
+
}
|
1006
|
+
}
|
1007
|
+
|
1008
|
+
& > div:first-child {
|
1009
|
+
margin-bottom: ${q.size[1.5]};
|
1010
|
+
}
|
1011
|
+
|
1012
|
+
& code {
|
1013
|
+
font-family:
|
1014
|
+
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
1015
|
+
'Liberation Mono', 'Courier New', monospace;
|
1016
|
+
margin: 0;
|
1017
|
+
font-size: ${r.size.xs};
|
1018
|
+
line-height: ${r.lineHeight.xs};
|
1019
|
+
}
|
1020
|
+
|
1021
|
+
& pre {
|
1022
|
+
margin: 0;
|
1023
|
+
display: flex;
|
1024
|
+
align-items: center;
|
1025
|
+
}
|
1026
|
+
`,queryDetailsStatus:t`
|
1027
|
+
border: 1px solid ${n.darkGray[200]};
|
1028
|
+
border-radius: ${q.border.radius.sm};
|
1029
|
+
font-weight: ${r.weight.medium};
|
1030
|
+
padding: ${q.size[1]} ${q.size[2.5]};
|
1031
|
+
`,actionsBody:t`
|
1032
|
+
flex-wrap: wrap;
|
1033
|
+
margin: ${q.size[2]} 0px ${q.size[2]} 0px;
|
1034
|
+
display: flex;
|
1035
|
+
gap: ${q.size[2]};
|
1036
|
+
padding: 0px ${q.size[2]};
|
1037
|
+
& > button {
|
1038
|
+
font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
|
1039
|
+
font-size: ${r.size.xs};
|
1040
|
+
padding: ${q.size[1]} ${q.size[2]};
|
1041
|
+
display: flex;
|
1042
|
+
border-radius: ${q.border.radius.sm};
|
1043
|
+
background-color: ${l(n.gray[100],n.darkGray[600])};
|
1044
|
+
border: 1px solid ${l(n.gray[300],n.darkGray[400])};
|
1045
|
+
align-items: center;
|
1046
|
+
gap: ${q.size[2]};
|
1047
|
+
font-weight: ${r.weight.medium};
|
1048
|
+
line-height: ${r.lineHeight.xs};
|
1049
|
+
cursor: pointer;
|
1050
|
+
&:focus-visible {
|
1051
|
+
outline-offset: 2px;
|
1052
|
+
border-radius: ${a.radius.xs};
|
1053
|
+
outline: 2px solid ${n.blue[800]};
|
1054
|
+
}
|
1055
|
+
&:hover {
|
1056
|
+
background-color: ${l(n.gray[200],n.darkGray[500])};
|
1057
|
+
}
|
1058
|
+
|
1059
|
+
&:disabled {
|
1060
|
+
opacity: 0.6;
|
1061
|
+
cursor: not-allowed;
|
1062
|
+
}
|
1063
|
+
|
1064
|
+
& > span {
|
1065
|
+
width: ${i[1.5]};
|
1066
|
+
height: ${i[1.5]};
|
1067
|
+
border-radius: ${q.border.radius.full};
|
1068
|
+
}
|
1069
|
+
}
|
1070
|
+
`,actionsSelect:t`
|
1071
|
+
font-size: ${r.size.xs};
|
1072
|
+
padding: ${q.size[.5]} ${q.size[2]};
|
1073
|
+
display: flex;
|
1074
|
+
border-radius: ${q.border.radius.sm};
|
1075
|
+
overflow: hidden;
|
1076
|
+
background-color: ${l(n.gray[100],n.darkGray[600])};
|
1077
|
+
border: 1px solid ${l(n.gray[300],n.darkGray[400])};
|
1078
|
+
align-items: center;
|
1079
|
+
gap: ${q.size[2]};
|
1080
|
+
font-weight: ${r.weight.medium};
|
1081
|
+
line-height: ${r.lineHeight.sm};
|
1082
|
+
color: ${l(n.red[500],n.red[400])};
|
1083
|
+
cursor: pointer;
|
1084
|
+
position: relative;
|
1085
|
+
&:hover {
|
1086
|
+
background-color: ${l(n.gray[200],n.darkGray[500])};
|
1087
|
+
}
|
1088
|
+
& > span {
|
1089
|
+
width: ${i[1.5]};
|
1090
|
+
height: ${i[1.5]};
|
1091
|
+
border-radius: ${q.border.radius.full};
|
1092
|
+
}
|
1093
|
+
&:focus-within {
|
1094
|
+
outline-offset: 2px;
|
1095
|
+
border-radius: ${a.radius.xs};
|
1096
|
+
outline: 2px solid ${n.blue[800]};
|
1097
|
+
}
|
1098
|
+
& select {
|
1099
|
+
position: absolute;
|
1100
|
+
top: 0;
|
1101
|
+
left: 0;
|
1102
|
+
width: 100%;
|
1103
|
+
height: 100%;
|
1104
|
+
appearance: none;
|
1105
|
+
background-color: transparent;
|
1106
|
+
border: none;
|
1107
|
+
color: transparent;
|
1108
|
+
outline: none;
|
1109
|
+
}
|
1110
|
+
|
1111
|
+
& svg path {
|
1112
|
+
stroke: ${q.colors.red[400]};
|
1113
|
+
}
|
1114
|
+
& svg {
|
1115
|
+
width: ${q.size[2]};
|
1116
|
+
height: ${q.size[2]};
|
1117
|
+
}
|
1118
|
+
`,settingsMenu:t`
|
1119
|
+
display: flex;
|
1120
|
+
& * {
|
1121
|
+
font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
|
1122
|
+
}
|
1123
|
+
flex-direction: column;
|
1124
|
+
gap: ${i[.5]};
|
1125
|
+
border-radius: ${q.border.radius.sm};
|
1126
|
+
border: 1px solid ${l(n.gray[300],n.gray[700])};
|
1127
|
+
background-color: ${l(n.gray[50],n.darkGray[600])};
|
1128
|
+
font-size: ${r.size.xs};
|
1129
|
+
color: ${l(n.gray[700],n.gray[300])};
|
1130
|
+
z-index: 99999;
|
1131
|
+
min-width: 120px;
|
1132
|
+
padding: ${i[.5]};
|
1133
|
+
`,settingsSubTrigger:t`
|
1134
|
+
display: flex;
|
1135
|
+
align-items: center;
|
1136
|
+
justify-content: space-between;
|
1137
|
+
border-radius: ${q.border.radius.xs};
|
1138
|
+
padding: ${q.size[1]} ${q.size[1]};
|
1139
|
+
cursor: pointer;
|
1140
|
+
background-color: transparent;
|
1141
|
+
border: none;
|
1142
|
+
color: ${l(n.gray[700],n.gray[300])};
|
1143
|
+
& svg {
|
1144
|
+
color: ${l(n.gray[600],n.gray[400])};
|
1145
|
+
transform: rotate(-90deg);
|
1146
|
+
width: ${q.size[2]};
|
1147
|
+
height: ${q.size[2]};
|
1148
|
+
}
|
1149
|
+
&:hover {
|
1150
|
+
background-color: ${l(n.gray[200],n.darkGray[500])};
|
1151
|
+
}
|
1152
|
+
&:focus-visible {
|
1153
|
+
outline-offset: 2px;
|
1154
|
+
outline: 2px solid ${n.blue[800]};
|
1155
|
+
}
|
1156
|
+
&.data-disabled {
|
1157
|
+
opacity: 0.6;
|
1158
|
+
cursor: not-allowed;
|
1159
|
+
}
|
1160
|
+
`,settingsMenuHeader:t`
|
1161
|
+
padding: ${q.size[1]} ${q.size[1]};
|
1162
|
+
font-weight: ${r.weight.medium};
|
1163
|
+
border-bottom: 1px solid ${l(n.gray[300],n.darkGray[400])};
|
1164
|
+
color: ${l(n.gray[500],n.gray[400])};
|
1165
|
+
font-size: ${r.size.xs};
|
1166
|
+
`,settingsSubButton:t`
|
1167
|
+
display: flex;
|
1168
|
+
align-items: center;
|
1169
|
+
justify-content: space-between;
|
1170
|
+
color: ${l(n.gray[700],n.gray[300])};
|
1171
|
+
font-size: ${r.size.xs};
|
1172
|
+
border-radius: ${q.border.radius.xs};
|
1173
|
+
padding: ${q.size[1]} ${q.size[1]};
|
1174
|
+
cursor: pointer;
|
1175
|
+
background-color: transparent;
|
1176
|
+
border: none;
|
1177
|
+
& svg {
|
1178
|
+
color: ${l(n.gray[600],n.gray[400])};
|
1179
|
+
}
|
1180
|
+
&:hover {
|
1181
|
+
background-color: ${l(n.gray[200],n.darkGray[500])};
|
1182
|
+
}
|
1183
|
+
&:focus-visible {
|
1184
|
+
outline-offset: 2px;
|
1185
|
+
outline: 2px solid ${n.blue[800]};
|
1186
|
+
}
|
1187
|
+
`,themeSelectedButton:t`
|
1188
|
+
background-color: ${l(n.purple[100],n.purple[900])};
|
1189
|
+
color: ${l(n.purple[700],n.purple[300])};
|
1190
|
+
& svg {
|
1191
|
+
color: ${l(n.purple[700],n.purple[300])};
|
1192
|
+
}
|
1193
|
+
&:hover {
|
1194
|
+
background-color: ${l(n.purple[100],n.purple[900])};
|
1195
|
+
}
|
1196
|
+
`,viewToggle:t`
|
1197
|
+
border-radius: ${q.border.radius.sm};
|
1198
|
+
background-color: ${l(n.gray[200],n.darkGray[600])};
|
1199
|
+
border: 1px solid ${l(n.gray[300],n.darkGray[200])};
|
1200
|
+
display: flex;
|
1201
|
+
padding: 0;
|
1202
|
+
font-size: ${r.size.xs};
|
1203
|
+
color: ${l(n.gray[700],n.gray[300])};
|
1204
|
+
overflow: hidden;
|
1205
|
+
|
1206
|
+
&:has(:focus-visible) {
|
1207
|
+
outline: 2px solid ${n.blue[800]};
|
1208
|
+
}
|
1209
|
+
|
1210
|
+
& .tsqd-radio-toggle {
|
1211
|
+
opacity: 0.5;
|
1212
|
+
display: flex;
|
1213
|
+
& label {
|
1214
|
+
display: flex;
|
1215
|
+
align-items: center;
|
1216
|
+
cursor: pointer;
|
1217
|
+
line-height: ${r.lineHeight.md};
|
1218
|
+
}
|
1219
|
+
|
1220
|
+
& label:hover {
|
1221
|
+
background-color: ${l(n.gray[100],n.darkGray[500])};
|
1222
|
+
}
|
1223
|
+
}
|
1224
|
+
|
1225
|
+
& > [data-checked] {
|
1226
|
+
opacity: 1;
|
1227
|
+
background-color: ${l(n.gray[100],n.darkGray[400])};
|
1228
|
+
& label:hover {
|
1229
|
+
background-color: ${l(n.gray[100],n.darkGray[400])};
|
1230
|
+
}
|
1231
|
+
}
|
1232
|
+
|
1233
|
+
& .tsqd-radio-toggle:first-child {
|
1234
|
+
& label {
|
1235
|
+
padding: 0 ${q.size[1.5]} 0 ${q.size[2]};
|
1236
|
+
}
|
1237
|
+
border-right: 1px solid ${l(n.gray[300],n.darkGray[200])};
|
1238
|
+
}
|
1239
|
+
|
1240
|
+
& .tsqd-radio-toggle:nth-child(2) {
|
1241
|
+
& label {
|
1242
|
+
padding: 0 ${q.size[2]} 0 ${q.size[1.5]};
|
1243
|
+
}
|
1244
|
+
}
|
1245
|
+
`,devtoolsEditForm:t`
|
1246
|
+
padding: ${i[2]};
|
1247
|
+
& > [data-error='true'] {
|
1248
|
+
outline: 2px solid ${l(n.red[200],n.red[800])};
|
1249
|
+
outline-offset: 2px;
|
1250
|
+
border-radius: ${a.radius.xs};
|
1251
|
+
}
|
1252
|
+
`,devtoolsEditTextarea:t`
|
1253
|
+
width: 100%;
|
1254
|
+
max-height: 500px;
|
1255
|
+
font-family: 'Fira Code', monospace;
|
1256
|
+
font-size: ${r.size.xs};
|
1257
|
+
border-radius: ${a.radius.sm};
|
1258
|
+
field-sizing: content;
|
1259
|
+
padding: ${i[2]};
|
1260
|
+
background-color: ${l(n.gray[100],n.darkGray[800])};
|
1261
|
+
color: ${l(n.gray[900],n.gray[100])};
|
1262
|
+
border: 1px solid ${l(n.gray[200],n.gray[700])};
|
1263
|
+
resize: none;
|
1264
|
+
&:focus {
|
1265
|
+
outline-offset: 2px;
|
1266
|
+
border-radius: ${a.radius.xs};
|
1267
|
+
outline: 2px solid ${l(n.blue[200],n.blue[800])};
|
1268
|
+
}
|
1269
|
+
`,devtoolsEditFormActions:t`
|
1270
|
+
display: flex;
|
1271
|
+
justify-content: space-between;
|
1272
|
+
gap: ${i[2]};
|
1273
|
+
align-items: center;
|
1274
|
+
padding-top: ${i[1]};
|
1275
|
+
font-size: ${r.size.xs};
|
1276
|
+
`,devtoolsEditFormError:t`
|
1277
|
+
color: ${l(n.red[700],n.red[500])};
|
1278
|
+
`,devtoolsEditFormActionContainer:t`
|
1279
|
+
display: flex;
|
1280
|
+
gap: ${i[2]};
|
1281
|
+
`,devtoolsEditFormAction:t`
|
1282
|
+
font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
|
1283
|
+
font-size: ${r.size.xs};
|
1284
|
+
padding: ${i[1]} ${q.size[2]};
|
1285
|
+
display: flex;
|
1286
|
+
border-radius: ${a.radius.sm};
|
1287
|
+
background-color: ${l(n.gray[100],n.darkGray[600])};
|
1288
|
+
border: 1px solid ${l(n.gray[300],n.darkGray[400])};
|
1289
|
+
align-items: center;
|
1290
|
+
gap: ${i[2]};
|
1291
|
+
font-weight: ${r.weight.medium};
|
1292
|
+
line-height: ${r.lineHeight.xs};
|
1293
|
+
cursor: pointer;
|
1294
|
+
&:focus-visible {
|
1295
|
+
outline-offset: 2px;
|
1296
|
+
border-radius: ${a.radius.xs};
|
1297
|
+
outline: 2px solid ${n.blue[800]};
|
1298
|
+
}
|
1299
|
+
&:hover {
|
1300
|
+
background-color: ${l(n.gray[200],n.darkGray[500])};
|
1301
|
+
}
|
1302
|
+
|
1303
|
+
&:disabled {
|
1304
|
+
opacity: 0.6;
|
1305
|
+
cursor: not-allowed;
|
1306
|
+
}
|
1307
|
+
`}},Ii=e=>QT("light",e),Ei=e=>QT("dark",e);Mp(["click","mousedown","input"]);var vte=e=>{const[t,n]=tX({prefix:"TanstackQueryDevtools"}),r=OH(),i=z(()=>{const s=t.theme_preference||sX;return s!=="system"?s:r()});return B(RC.Provider,{value:e,get children(){return B(uX,{localStore:t,setLocalStore:n,get children(){return B(OC.Provider,{value:i,get children(){return B(ote,{localStore:t,setLocalStore:n})}})}})}})},bte=vte;const Ste=Object.freeze(Object.defineProperty({__proto__:null,default:bte},Symbol.toStringTag,{value:"Module"}));gt.setup=Zq,Object.defineProperty(gt,Symbol.toStringTag,{value:"Module"})});
|