diff --git a/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/General.php b/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/General.php index dbd983f8b..cbfec399d 100755 --- a/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/General.php +++ b/src/new/var/plugins/System/PSC/Bootstrap4/Form/Field/General.php @@ -14,7 +14,6 @@ use Symfony\Component\Form\FormEvent; class General implements Field { - private $options; public function getTemplate() @@ -30,11 +29,7 @@ class General implements Field /** * @param array $data */ - public function formPreSubmit(FormEvent $event) - { - - - } + public function formPreSubmit(FormEvent $event) {} public function buildForm(FormBuilderInterface $builder, array $options) { @@ -45,15 +40,31 @@ class General implements Field $tempLayouts = []; if ($shopEntity->isCustomTemplates() == 1) { foreach (new DirectoryIterator('/data/www/old/application/design/vorlagen') as $file) { - if ($file == '.' || $file == '..' || $file == 'config' || $file == '.svn' || $file == 'datapacks' || $file == '.DS_Store') { + if ( + $file == '.' + || $file == '..' + || $file == 'config' + || $file == '.svn' + || $file == 'datapacks' + || $file == '.DS_Store' + ) { continue; } $tempLayouts[$file->getFileName()] = $file->getFileName(); } } else { if (file_exists('/data/www/old/application/design/clients/' . $shopEntity->getUID())) { - foreach (new DirectoryIterator('/data/www/old/application/design/clients/' . $shopEntity->getUID()) as $file) { - if ($file == '.' || $file == '..' || $file == 'config' || $file == '.svn' || $file == 'datapacks' || $file == '.DS_Store') { + foreach (new DirectoryIterator( + '/data/www/old/application/design/clients/' . $shopEntity->getUID(), + ) as $file) { + if ( + $file == '.' + || $file == '..' + || $file == 'config' + || $file == '.svn' + || $file == 'datapacks' + || $file == '.DS_Store' + ) { continue; } $tempLayouts[$file->getFileName()] = $file->getFileName(); @@ -61,37 +72,54 @@ class General implements Field } } - $builder->add('displayArticleCount', NumberType::class, ['label' => 'Anzahl Artikel in Liste']) - ->add('basketField1', TextType::class, array('required' => false, 'label' => 'Warenkorb Feld 1')) - ->add('basketField2', TextType::class, array('required' => false, 'label' => 'Warenkorb Feld 2')) - ->add('basketPosField1', TextType::class, array('required' => false, 'label' => 'Warenkorb Position Feld 1')) - ->add('basketPosField2', TextType::class, array('required' => false, 'label' => 'Warenkorb Position Feld 2')) - ->add('customTemplates', CheckboxType::class, ['label' => 'Vorlagen benutzen', 'required' => false]) - ->add('templateDisplayProductsCrossselling', CheckboxType::class, ['label' => 'Cross Selling anzeigen', 'required' => false]) - ->add('templateDisplayUserApproval', CheckboxType::class, ['label' => 'User Freigabebedürftige anzeigen', 'required' => false]) - ->add('layout', ChoiceType::class, array('label' => 'Layout', 'choices' => $tempLayouts, 'required' => false, 'attr' => array('onchange' => "savestyle();"))) - - ->add('googleanalyticscode', TextType::class, ['required' => false]) - ->add('defaultFunc', ChoiceType::class, ['required' => false, - 'choices' => [ - "Cms" => "Cms", - "Overview" => "Overview", - "Page" => "Page", - "Article" => "Article", - "Login" => "Login", - "Index" => "Index", - "OverviewWithRedirect" => "OverviewWithRedirect", - "PersArticle" => "PersArticle", - "Redirect" => "Redirect" - ] - ]) - ->add('defaultParam', TextType::class, ['required' => false]) - - - ->add('displaySender', CheckboxType::class, ['required' => false, 'label' => 'Absenderadresse benutzen']) - ->add('displayDelivery', CheckboxType::class, ['required' => false, 'label' => 'Lieferadresse benutzen']) - - ; + $builder + ->add('displayArticleCount', NumberType::class, ['label' => 'Anzahl Artikel in Liste']) + ->add('basketField1', TextType::class, array('required' => false, 'label' => 'Warenkorb Feld 1')) + ->add('basketField2', TextType::class, array( + 'required' => false, + 'label' => 'Warenkorb Feld 2 (XRechnung bt-13)', + )) + ->add('basketPosField1', TextType::class, array( + 'required' => false, + 'label' => 'Warenkorb Position Feld 1', + )) + ->add('basketPosField2', TextType::class, array( + 'required' => false, + 'label' => 'Warenkorb Position Feld 2', + )) + ->add('customTemplates', CheckboxType::class, ['label' => 'Vorlagen benutzen', 'required' => false]) + ->add('templateDisplayProductsCrossselling', CheckboxType::class, [ + 'label' => 'Cross Selling anzeigen', + 'required' => false, + ]) + ->add('templateDisplayUserApproval', CheckboxType::class, [ + 'label' => 'User Freigabebedürftige anzeigen', + 'required' => false, + ]) + ->add('layout', ChoiceType::class, array( + 'label' => 'Layout', + 'choices' => $tempLayouts, + 'required' => false, + 'attr' => array('onchange' => 'savestyle();'), + )) + ->add('googleanalyticscode', TextType::class, ['required' => false]) + ->add('defaultFunc', ChoiceType::class, [ + 'required' => false, + 'choices' => [ + 'Cms' => 'Cms', + 'Overview' => 'Overview', + 'Page' => 'Page', + 'Article' => 'Article', + 'Login' => 'Login', + 'Index' => 'Index', + 'OverviewWithRedirect' => 'OverviewWithRedirect', + 'PersArticle' => 'PersArticle', + 'Redirect' => 'Redirect', + ], + ]) + ->add('defaultParam', TextType::class, ['required' => false]) + ->add('displaySender', CheckboxType::class, ['required' => false, 'label' => 'Absenderadresse benutzen']) + ->add('displayDelivery', CheckboxType::class, ['required' => false, 'label' => 'Lieferadresse benutzen']); return $builder; } @@ -103,13 +131,16 @@ class General implements Field public function formPostSetData(FormEvent $event) { - /** @var Shop $shopEntity */ $shopEntity = $this->options['shopEntity']; $layoutSettings = json_decode($shopEntity->getLayoutSettings(), true); - $event->getForm()->get('bootstrap4General')->get('displayArticleCount')->setData($shopEntity->getDisplayArticleCount()); + $event + ->getForm() + ->get('bootstrap4General') + ->get('displayArticleCount') + ->setData($shopEntity->getDisplayArticleCount()); $event->getForm()->get('bootstrap4General')->get('basketField1')->setData($shopEntity->getBasketfield1()); $event->getForm()->get('bootstrap4General')->get('basketField2')->setData($shopEntity->getBasketfield2()); $event->getForm()->get('bootstrap4General')->get('basketPosField1')->setData($shopEntity->getBasketposfield1()); @@ -118,29 +149,36 @@ class General implements Field $event->getForm()->get('bootstrap4General')->get('displayDelivery')->setData($shopEntity->getDisplayDelivery()); $event->getForm()->get('bootstrap4General')->get('layout')->setData($shopEntity->getLayout()); $event->getForm()->get('bootstrap4General')->get('customTemplates')->setData($shopEntity->isCustomTemplates()); - $event->getForm()->get('bootstrap4General')->get('googleanalyticscode')->setData($shopEntity->getGoogleanalyticscode()); + $event + ->getForm() + ->get('bootstrap4General') + ->get('googleanalyticscode') + ->setData($shopEntity->getGoogleanalyticscode()); $event->getForm()->get('bootstrap4General')->get('defaultFunc')->setData($shopEntity->getDefaultFunc()); $event->getForm()->get('bootstrap4General')->get('defaultParam')->setData($shopEntity->getDefaultParam()); - $event->getForm()->get('bootstrap4General')->get('templateDisplayProductsCrossselling')->setData($shopEntity->isTemplateDisplayProductsCrossselling()); - $event->getForm()->get('bootstrap4General')->get('templateDisplayUserApproval')->setData($shopEntity->isTemplateDisplayUserApproval()); - + $event + ->getForm() + ->get('bootstrap4General') + ->get('templateDisplayProductsCrossselling') + ->setData($shopEntity->isTemplateDisplayProductsCrossselling()); + $event + ->getForm() + ->get('bootstrap4General') + ->get('templateDisplayUserApproval') + ->setData($shopEntity->isTemplateDisplayUserApproval()); } - public function formPostSubmit(FormEvent $event) - { - - } + public function formPostSubmit(FormEvent $event) {} - public function formPreSetData(FormEvent $event) - { - - } + public function formPreSetData(FormEvent $event) {} public function formSubmit(FormEvent $event) { /** @var Shop $shopEntity */ $shopEntity = $this->options['shopEntity']; - $shopEntity->setDisplayArticleCount($event->getForm()->get('bootstrap4General')->get('displayArticleCount')->getData()); + $shopEntity->setDisplayArticleCount( + $event->getForm()->get('bootstrap4General')->get('displayArticleCount')->getData(), + ); $shopEntity->setBasketfield1($event->getForm()->get('bootstrap4General')->get('basketField1')->getData()); $shopEntity->setBasketfield2($event->getForm()->get('bootstrap4General')->get('basketField2')->getData()); $shopEntity->setBasketposfield1($event->getForm()->get('bootstrap4General')->get('basketPosField1')->getData()); @@ -149,11 +187,16 @@ class General implements Field $shopEntity->setDisplayDelivery($event->getForm()->get('bootstrap4General')->get('displayDelivery')->getData()); $shopEntity->setCustomTemplates($event->getForm()->get('bootstrap4General')->get('customTemplates')->getData()); $shopEntity->setLayout($event->getForm()->get('bootstrap4General')->get('layout')->getData()); - $shopEntity->setGoogleanalyticscode($event->getForm()->get('bootstrap4General')->get('googleanalyticscode')->getData()); + $shopEntity->setGoogleanalyticscode( + $event->getForm()->get('bootstrap4General')->get('googleanalyticscode')->getData(), + ); $shopEntity->setDefaultFunc($event->getForm()->get('bootstrap4General')->get('defaultFunc')->getData()); $shopEntity->setDefaultParam($event->getForm()->get('bootstrap4General')->get('defaultParam')->getData()); - $shopEntity->setTemplateDisplayProductsCrossselling($event->getForm()->get('bootstrap4General')->get('templateDisplayProductsCrossselling')->getData()); - $shopEntity->setTemplateDisplayUserApproval($event->getForm()->get('bootstrap4General')->get('templateDisplayUserApproval')->getData()); - + $shopEntity->setTemplateDisplayProductsCrossselling( + $event->getForm()->get('bootstrap4General')->get('templateDisplayProductsCrossselling')->getData(), + ); + $shopEntity->setTemplateDisplayUserApproval( + $event->getForm()->get('bootstrap4General')->get('templateDisplayUserApproval')->getData(), + ); } -} \ No newline at end of file +} diff --git a/src/new/var/plugins/System/PSC/Invoice/InvoiceTS/src/modules/button/ButtonComponent.tsx b/src/new/var/plugins/System/PSC/Invoice/InvoiceTS/src/modules/button/ButtonComponent.tsx index 17aafc7c8..ad949bc0b 100644 --- a/src/new/var/plugins/System/PSC/Invoice/InvoiceTS/src/modules/button/ButtonComponent.tsx +++ b/src/new/var/plugins/System/PSC/Invoice/InvoiceTS/src/modules/button/ButtonComponent.tsx @@ -8,6 +8,26 @@ import Button, { ButtonGroup } from '../base/Button' import { showToast } from '../../lib/toast' import React from 'react' +const TYPE_LABELS: Record = { + 1: 'Auftrag', + 2: 'Angebot', + 3: 'Storno', + 4: 'Gutschrift', + 5: 'Rechnung', + 6: 'Teilrechnung', + 7: 'Teilstorno', +} + +const TYPE_PRINT_MAP: Record = { + 1: 1, // Auftrag → INVOICE + 2: 5, // Angebot → OFFER + 3: 6, // Storno → STORNO + 4: 6, // Gutschrift → STORNO + 5: 1, // Rechnung → INVOICE + 6: 1, // Teilrechnung → INVOICE + 7: 6, // Teilstorno → STORNO +} + class ButtonComponent extends Component<{ loadOrder }, { disabled: boolean, saving: boolean }> { orderState: OrderState orderService: OrderService @@ -38,8 +58,14 @@ class ButtonComponent extends Component<{ loadOrder }, { disabled: boolean, savi async handlePrint(e) { const uuid = this.orderState.getCurrentOrder().value.uuid; - const type = this.orderState.getCurrentOrder().value.type; - window.open('/apps/backend/order/detail/print/' + type + '/' + uuid) + const orderType = this.orderState.getCurrentOrder().value.type; + const printType = TYPE_PRINT_MAP[orderType] || 1; + window.open('/apps/backend/order/detail/print/' + printType + '/' + uuid) + } + + async handleJobTicket(e) { + const uuid = this.orderState.getCurrentOrder().value.uuid; + window.open('/apps/backend/order/detail/print/7/' + uuid) } async handleSave(e) { @@ -58,6 +84,9 @@ class ButtonComponent extends Component<{ loadOrder }, { disabled: boolean, savi } render() { + const orderType = this.orderState.getCurrentOrder().value.type; + const typeLabel = TYPE_LABELS[orderType] || 'Auftrag'; + return ( + ) diff --git a/src/new/var/plugins/System/PSC/Invoice/Resources/public/invoicets/assets/index.js b/src/new/var/plugins/System/PSC/Invoice/Resources/public/invoicets/assets/index.js index 0812c0965..0a86e1ade 100644 --- a/src/new/var/plugins/System/PSC/Invoice/Resources/public/invoicets/assets/index.js +++ b/src/new/var/plugins/System/PSC/Invoice/Resources/public/invoicets/assets/index.js @@ -43,6 +43,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PD(e){return jD(e)||MD(e)||mD(e)||ND()}function FD(e){if(e.sheet)return e.sheet;for(var t=0;t0?tO(fO,--uO):0,cO--,dO===10&&(cO=1,sO--),dO}function _O(){return dO=uO2||xO(dO)>3?``:` `}function EO(e,t){for(;--t&&_O()&&!(dO<48||dO>102||dO>57&&dO<65||dO>70&&dO<97););return bO(e,yO()+(t<6&&vO()==32&&_O()==32))}function DO(e){for(;_O();)switch(dO){case e:return uO;case 34:case 39:e!==34&&e!==39&&DO(dO);break;case 40:e===41&&DO(e);break;case 92:_O();break}return uO}function OO(e,t){for(;_O()&&e+dO!==57&&!(e+dO===84&&vO()===47););return`/*`+bO(t,uO-1)+`*`+JD(e===47?e:_O())}function kO(e){for(;!xO(vO());)_O();return bO(e,uO)}function AO(e){return CO(jO(``,null,null,null,[``],e=SO(e),0,[0],e))}function jO(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=_O()){case 40:if(m!=108&&tO(C,d-1)==58){eO(C+=$D(wO(v),`&`,`&\f`),`&\f`)!=-1&&(_=-1);break}case 34:case 39:case 91:C+=wO(v);break;case 9:case 10:case 13:case 32:C+=TO(m);break;case 92:C+=EO(yO()-1,7);continue;case 47:switch(vO()){case 42:case 47:aO(NO(OO(_O(),yO()),t,n),c);break;default:C+=`/`}break;case 123*h:s[l++]=rO(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=$D(C,/\f/g,``)),p>0&&rO(C)-d&&aO(p>32?PO(C+`;`,r,n,d-1):PO($D(C,` `,``)+`;`,r,n,d-2),c);break;case 59:C+=`;`;default:if(aO(S=MO(C,t,n,l,u,i,s,y,b=[],x=[],d),a),v===123)if(u===0)jO(C,t,S,S,b,a,d,s,x);else switch(f===99&&tO(C,3)===110?100:f){case 100:case 108:case 109:case 115:jO(e,S,S,r&&aO(MO(e,S,S,0,0,i,s,y,i,b=[],d),x),i,x,d,s,r?b:x);break;default:jO(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+rO(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&gO()==125)continue}switch(C+=JD(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(rO(C)-1)*_,_=1;break;case 64:vO()===45&&(C+=wO(_O())),f=vO(),u=d=rO(y=C+=kO(yO())),v++;break;case 45:m===45&&rO(C)==2&&(h=0)}}return a}function MO(e,t,n,r,i,a,o,s,c,l,u){for(var d=i-1,f=i===0?a:[``],p=iO(f),m=0,h=0,g=0;m0?f[_]+` `+v:$D(v,/&\f/g,f[_])))&&(c[g++]=y);return pO(e,t,n,i===0?HD:s,c,l,u)}function NO(e,t,n){return pO(e,t,n,VD,JD(hO()),nO(e,2,-2),0)}function PO(e,t,n,r){return pO(e,t,n,UD,nO(e,0,r),nO(e,r+1,-1),r)}function FO(e,t){for(var n=``,r=iO(e),i=0;i6)switch(tO(e,t+1)){case 109:if(tO(e,t+4)!==45)break;case 102:return $D(e,/(.+:)(.+)-([^]+)/,`$1`+BD+`$2-$3$1`+zD+(tO(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~eO(e,`stretch`)?KO($D(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(tO(e,t+1)!==115)break;case 6444:switch(tO(e,rO(e)-3-(~eO(e,`!important`)&&10))){case 107:return $D(e,`:`,`:`+BD)+e;case 101:return $D(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+BD+(tO(e,14)===45?`inline-`:``)+`box$3$1`+BD+`$2$3$1`+RD+`$2box$3`)+e}break;case 5936:switch(tO(e,t+11)){case 114:return BD+e+RD+$D(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return BD+e+RD+$D(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return BD+e+RD+$D(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return BD+e+RD+e+e}return e}var qO=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case UD:e.return=KO(e.value,e.length);break;case GD:return FO([mO(e,{value:$D(e.value,`@`,`@`+BD)})],r);case HD:if(e.length)return oO(e.props,function(t){switch(QD(t,/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:return FO([mO(e,{props:[$D(t,/:(read-\w+)/,`:`+zD+`$1`)]})],r);case`::placeholder`:return FO([mO(e,{props:[$D(t,/:(plac\w+)/,`:`+BD+`input-$1`)]}),mO(e,{props:[$D(t,/:(plac\w+)/,`:`+zD+`$1`)]}),mO(e,{props:[$D(t,/:(plac\w+)/,RD+`input-$1`)]})],r)}return``})}}],JO=function(e){var t=e.key;if(t===`css`){var n=document.querySelectorAll(`style[data-emotion]:not([data-s])`);Array.prototype.forEach.call(n,function(e){e.getAttribute(`data-emotion`).indexOf(` `)!==-1&&(document.head.appendChild(e),e.setAttribute(`data-s`,``))})}var r=e.stylisPlugins||qO,i={},a,o=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll(`style[data-emotion^="`+t+` "]`),function(e){for(var t=e.getAttribute(`data-emotion`).split(` `),n=1;n{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e=e&&e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),XO=s(((e,t)=>{t.exports=YO()})),ZO=s(((e,t)=>{var n=XO(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[n.ForwardRef]=a,s[n.Memo]=o;function c(e){return n.isMemo(e)?o:s[e.$$typeof]||r}var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;function h(e,t,n){if(typeof t!=`string`){if(m){var r=p(t);r&&r!==m&&h(e,r,n)}var a=u(t);d&&(a=a.concat(d(t)));for(var o=c(e),s=c(t),g=0;g=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var nk={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},rk=/[A-Z]|^ms/g,ik=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ak=function(e){return e.charCodeAt(1)===45},ok=function(e){return e!=null&&typeof e!=`boolean`},sk=zO(function(e){return ak(e)?e:e.replace(rk,`-$&`).toLowerCase()}),ck=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(ik,function(e,t,n){return fk={name:t,styles:n,next:fk},t})}return nk[e]!==1&&!ak(e)&&typeof t==`number`&&t!==0?t+`px`:t};function lk(e,t,n){if(n==null)return``;var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case`boolean`:return``;case`object`:var i=n;if(i.anim===1)return fk={name:i.name,styles:i.styles,next:fk},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)fk={name:o.name,styles:o.styles,next:fk},o=o.next;return a.styles+`;`}return uk(e,t,n);case`function`:if(e!==void 0){var s=fk,c=n(e);return fk=s,lk(e,t,c)}break}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function uk(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i({x:e,y:e});function Nk(e){let{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 Pk(){return typeof window<`u`}function Fk(e){return Rk(e)?(e.nodeName||``).toLowerCase():`#document`}function Ik(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lk(e){var t;return(t=(Rk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Rk(e){return Pk()?e instanceof Node||e instanceof Ik(e).Node:!1}function zk(e){return Pk()?e instanceof Element||e instanceof Ik(e).Element:!1}function Bk(e){return Pk()?e instanceof HTMLElement||e instanceof Ik(e).HTMLElement:!1}function Vk(e){return!Pk()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Ik(e).ShadowRoot}function Hk(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Kk(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}var Uk;function Wk(){return Uk==null&&(Uk=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`)),Uk}function Gk(e){return/^(html|body|#document)$/.test(Fk(e))}function Kk(e){return Ik(e).getComputedStyle(e)}function qk(e){if(Fk(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Vk(e)&&e.host||Lk(e);return Vk(t)?t.host:t}function Jk(e){let t=qk(e);return Gk(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bk(t)&&Hk(t)?t:Jk(t)}function Yk(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let i=Jk(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=Ik(i);if(a){let e=Xk(o);return t.concat(o,o.visualViewport||[],Hk(i)?i:[],e&&n?Yk(e):[])}else return t.concat(i,Yk(i,[],n))}function Xk(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}K();function Zk(e){let t=Kk(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Bk(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Ak(n)!==a||Ak(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Qk(e){return zk(e)?e:e.contextElement}function $k(e){let t=Qk(e);if(!Bk(t))return Mk(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Zk(t),o=(a?Ak(n.width):n.width)/r,s=(a?Ak(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var eA=Mk(0);function tA(e){let t=Ik(e);return!Wk()||!t.visualViewport?eA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ik(e)?!1:t}function rA(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Qk(e),o=Mk(1);t&&(r?zk(r)&&(o=$k(r)):o=$k(e));let s=nA(a,n,r)?tA(a):Mk(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Ik(a),t=r&&zk(r)?Ik(r):r,n=e,i=Xk(n);for(;i&&r&&t!==n;){let e=$k(i),t=i.getBoundingClientRect(),r=Kk(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ik(i),i=Xk(n)}}return Nk({width:u,height:d,x:c,y:l})}function iA(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function aA(e,t){let n=null,r,i=Lk(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=jk(d),h=jk(i.clientWidth-(u+f)),g=jk(i.clientHeight-(d+p)),_=jk(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:kk(0,Ok(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!iA(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,G(G({},v),{},{root:i.ownerDocument}))}catch(e){n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function oA(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Qk(e),u=i||a?[...l?Yk(l):[],...t?Yk(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?aA(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?rA(e):null;c&&g();function g(){let t=rA(e);h&&!iA(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d==null||d(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var sA=_.useLayoutEffect,cA=[`className`,`clearValue`,`cx`,`getStyles`,`getClassNames`,`getValue`,`hasValue`,`isMulti`,`isRtl`,`options`,`selectOption`,`selectProps`,`setValue`,`theme`],lA=function(){};function uA(e,t){return t?t[0]===`-`?e+t:e+`__`+t:e}function dA(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i-1}function gA(e){return hA(e)?window.innerHeight:e.clientHeight}function _A(e){return hA(e)?window.pageYOffset:e.scrollTop}function vA(e,t){if(hA(e)){window.scrollTo(0,t);return}e.scrollTop=t}function yA(e){var t=getComputedStyle(e),n=t.position===`absolute`,r=/(auto|scroll)/;if(t.position===`fixed`)return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position===`static`)&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}function bA(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function xA(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:lA,i=_A(e),a=t-i,o=10,s=0;function c(){s+=o,vA(e,bA(s,i,a,n)),sn.bottom?vA(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i1?t-1:0),r=1;r=p)return{placement:`bottom`,maxHeight:t};if(C>=p&&!o)return a&&xA(c,w,E),{placement:`bottom`,maxHeight:t};if(!o&&C>=r||o&&x>=r)return a&&xA(c,w,E),{placement:`bottom`,maxHeight:o?x-v:C-v};if(i===`auto`||o){var D=t,O=o?b:S;return O>=r&&(D=Math.min(O-v-s,t)),{placement:`top`,maxHeight:D}}if(i===`bottom`)return a&&vA(c,w),{placement:`bottom`,maxHeight:t};break;case`top`:if(b>=p)return{placement:`top`,maxHeight:t};if(S>=p&&!o)return a&&xA(c,T,E),{placement:`top`,maxHeight:t};if(!o&&S>=r||o&&b>=r){var k=t;return(!o&&S>=r||o&&b>=r)&&(k=o?b-y:S-y),a&&xA(c,T,E),{placement:`top`,maxHeight:k}}return{placement:`bottom`,maxHeight:t};default:throw Error(`Invalid placement provided "${i}".`)}return l}function zA(e){return e?{bottom:`top`,top:`bottom`}[e]:`bottom`}var BA=function(e){return e===`auto`?`bottom`:e},VA=function(e,t){var n,r=e.placement,i=e.theme,a=i.borderRadius,o=i.spacing,s=i.colors;return Z((n={label:`menu`},lD(n,zA(r),`100%`),lD(n,`position`,`absolute`),lD(n,`width`,`100%`),lD(n,`zIndex`,1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:a,boxShadow:`0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)`,marginBottom:o.menuGutter,marginTop:o.menuGutter})},HA=(0,_.createContext)(null),UA=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,i=e.menuPlacement,a=e.menuPosition,o=e.menuShouldScrollIntoView,s=e.theme,c=((0,_.useContext)(HA)||{}).setPortalPlacement,l=(0,_.useRef)(null),u=gD((0,_.useState)(r),2),d=u[0],f=u[1],p=gD((0,_.useState)(null),2),m=p[0],h=p[1],g=s.spacing.controlHeight;return sA(function(){var e=l.current;if(e){var t=a===`fixed`,s=RA({maxHeight:r,menuEl:e,minHeight:n,placement:i,shouldScroll:o&&!t,isFixedPosition:t,controlHeight:g});f(s.maxHeight),h(s.placement),c==null||c(s.placement)}},[r,i,a,o,n,c,g]),t({ref:l,placerProps:Z(Z({},e),{},{placement:m||BA(i),maxHeight:d})})},WA=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return $(`div`,Q({},mA(e,`menu`,{menu:!0}),{ref:n},r),t)},GA=function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return Z({maxHeight:n,overflowY:`auto`,position:`relative`,WebkitOverflowScrolling:`touch`},t?{}:{paddingBottom:r,paddingTop:r})},KA=function(e){var t=e.children,n=e.innerProps,r=e.innerRef,i=e.isMulti;return $(`div`,Q({},mA(e,`menuList`,{"menu-list":!0,"menu-list--is-multi":i}),{ref:r},n),t)},qA=function(e,t){var n=e.theme,r=n.spacing.baseUnit,i=n.colors;return Z({textAlign:`center`},t?{}:{color:i.neutral40,padding:`${r*2}px ${r*3}px`})},JA=qA,YA=qA,XA=function(e){var t=e.children,n=t===void 0?`No options`:t,r=e.innerProps;return $(`div`,Q({},mA(Z(Z({},vD(e,IA)),{},{children:n,innerProps:r}),`noOptionsMessage`,{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},ZA=function(e){var t=e.children,n=t===void 0?`Loading...`:t,r=e.innerProps;return $(`div`,Q({},mA(Z(Z({},vD(e,LA)),{},{children:n,innerProps:r}),`loadingMessage`,{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},QA=function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},$A=function(e){var t=e.appendTo,n=e.children,r=e.controlElement,i=e.innerProps,a=e.menuPlacement,o=e.menuPosition,s=(0,_.useRef)(null),c=(0,_.useRef)(null),l=gD((0,_.useState)(BA(a)),2),u=l[0],d=l[1],f=(0,_.useMemo)(function(){return{setPortalPlacement:d}},[]),p=gD((0,_.useState)(null),2),m=p[0],h=p[1],g=(0,_.useCallback)(function(){if(r){var e=CA(r),t=o===`fixed`?0:window.pageYOffset,n=e[u]+t;(n!==(m==null?void 0:m.offset)||e.left!==(m==null?void 0:m.rect.left)||e.width!==(m==null?void 0:m.rect.width))&&h({offset:n,rect:e})}},[r,o,u,m==null?void 0:m.offset,m==null?void 0:m.rect.left,m==null?void 0:m.rect.width]);sA(function(){g()},[g]);var v=(0,_.useCallback)(function(){typeof c.current==`function`&&(c.current(),c.current=null),r&&s.current&&(c.current=oA(r,s.current,g,{elementResize:`ResizeObserver`in window}))},[r,g]);sA(function(){v()},[v]);var y=(0,_.useCallback)(function(e){s.current=e,v()},[v]);if(!t&&o!==`fixed`||!m)return null;var b=$(`div`,Q({ref:y},mA(Z(Z({},e),{},{offset:m.offset,position:o,rect:m.rect}),`menuPortal`,{"menu-portal":!0}),i),n);return $(HA.Provider,{value:f},t?(0,ko.createPortal)(b,t):b)},ej=function(e){var t=e.isDisabled;return{label:`container`,direction:e.isRtl?`rtl`:void 0,pointerEvents:t?`none`:void 0,position:`relative`}},tj=function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,i=e.isRtl;return $(`div`,Q({},mA(e,`container`,{"--is-disabled":r,"--is-rtl":i}),n),t)},nj=function(e,t){var n=e.theme.spacing,r=e.isMulti,i=e.hasValue,a=e.selectProps.controlShouldRenderValue;return Z({alignItems:`center`,display:r&&i&&a?`flex`:`grid`,flex:1,flexWrap:`wrap`,WebkitOverflowScrolling:`touch`,position:`relative`,overflow:`hidden`},t?{}:{padding:`${n.baseUnit/2}px ${n.baseUnit*2}px`})},rj=function(e){var t=e.children,n=e.innerProps,r=e.isMulti,i=e.hasValue;return $(`div`,Q({},mA(e,`valueContainer`,{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":i}),n),t)},ij=function(){return{alignItems:`center`,alignSelf:`stretch`,display:`flex`,flexShrink:0}},aj=function(e){var t=e.children,n=e.innerProps;return $(`div`,Q({},mA(e,`indicatorsContainer`,{indicators:!0}),n),t)},oj,sj=[`size`],cj=[`innerProps`,`isRtl`,`size`],lj={name:`8mmkcg`,styles:`display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0`},uj=function(e){var t=e.size,n=vD(e,sj);return $(`svg`,Q({height:t,width:t,viewBox:`0 0 20 20`,"aria-hidden":`true`,focusable:`false`,css:lj},n))},dj=function(e){return $(uj,Q({size:20},e),$(`path`,{d:`M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z`}))},fj=function(e){return $(uj,Q({size:20},e),$(`path`,{d:`M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z`}))},pj=function(e,t){var n=e.isFocused,r=e.theme,i=r.spacing.baseUnit,a=r.colors;return Z({label:`indicatorContainer`,display:`flex`,transition:`color 150ms`},t?{}:{color:n?a.neutral60:a.neutral20,padding:i*2,":hover":{color:n?a.neutral80:a.neutral40}})},mj=pj,hj=function(e){var t=e.children,n=e.innerProps;return $(`div`,Q({},mA(e,`dropdownIndicator`,{indicator:!0,"dropdown-indicator":!0}),n),t||$(fj,null))},gj=pj,_j=function(e){var t=e.children,n=e.innerProps;return $(`div`,Q({},mA(e,`clearIndicator`,{indicator:!0,"clear-indicator":!0}),n),t||$(dj,null))},vj=function(e,t){var n=e.isDisabled,r=e.theme,i=r.spacing.baseUnit,a=r.colors;return Z({label:`indicatorSeparator`,alignSelf:`stretch`,width:1},t?{}:{backgroundColor:n?a.neutral10:a.neutral20,marginBottom:i*2,marginTop:i*2})},yj=function(e){var t=e.innerProps;return $(`span`,Q({},t,mA(e,`indicatorSeparator`,{"indicator-separator":!0})))},bj=Ek(oj||(oj=Dk([` 0%, 80%, 100% { opacity: 0; } 40% { opacity: 1; } -`]))),xj=function(e,t){var n=e.isFocused,r=e.size,i=e.theme,a=i.colors,o=i.spacing.baseUnit;return Z({label:`loadingIndicator`,display:`flex`,transition:`color 150ms`,alignSelf:`center`,fontSize:r,lineHeight:1,marginRight:r,textAlign:`center`,verticalAlign:`middle`},t?{}:{color:n?a.neutral60:a.neutral20,padding:o*2})},Sj=function(e){var t=e.delay,n=e.offset;return $(`span`,{css:Tk({animation:`${bj} 1s ease-in-out ${t}ms infinite;`,backgroundColor:`currentColor`,borderRadius:`1em`,display:`inline-block`,marginLeft:n?`1em`:void 0,height:`1em`,verticalAlign:`top`,width:`1em`},``,``)})},Cj=function(e){var t=e.innerProps,n=e.isRtl,r=e.size,i=r===void 0?4:r;return $(`div`,Q({},mA(Z(Z({},vD(e,cj)),{},{innerProps:t,isRtl:n,size:i}),`loadingIndicator`,{indicator:!0,"loading-indicator":!0}),t),$(Sj,{delay:0,offset:n}),$(Sj,{delay:160,offset:!0}),$(Sj,{delay:320,offset:!n}))},wj=function(e,t){var n=e.isDisabled,r=e.isFocused,i=e.theme,a=i.colors,o=i.borderRadius,s=i.spacing;return Z({label:`control`,alignItems:`center`,cursor:`default`,display:`flex`,flexWrap:`wrap`,justifyContent:`space-between`,minHeight:s.controlHeight,outline:`0 !important`,position:`relative`,transition:`all 100ms`},t?{}:{backgroundColor:n?a.neutral5:a.neutral0,borderColor:n?a.neutral10:r?a.primary:a.neutral20,borderRadius:o,borderStyle:`solid`,borderWidth:1,boxShadow:r?`0 0 0 1px ${a.primary}`:void 0,"&:hover":{borderColor:r?a.primary:a.neutral30}})},Tj=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,i=e.innerRef,a=e.innerProps,o=e.menuIsOpen;return $(`div`,Q({ref:i},mA(e,`control`,{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":o}),a,{"aria-disabled":n||void 0}),t)},Ej=[`data`],Dj=function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:n.baseUnit*2,paddingTop:n.baseUnit*2}},Oj=function(e){var t=e.children,n=e.cx,r=e.getStyles,i=e.getClassNames,a=e.Heading,o=e.headingProps,s=e.innerProps,c=e.label,l=e.theme,u=e.selectProps;return $(`div`,Q({},mA(e,`group`,{group:!0}),s),$(a,Q({},o,{selectProps:u,theme:l,getStyles:r,getClassNames:i,cx:n}),c),$(`div`,null,t))},kj=function(e,t){var n=e.theme,r=n.colors,i=n.spacing;return Z({label:`group`,cursor:`default`,display:`block`},t?{}:{color:r.neutral40,fontSize:`75%`,fontWeight:500,marginBottom:`0.25em`,paddingLeft:i.baseUnit*3,paddingRight:i.baseUnit*3,textTransform:`uppercase`})},Aj=function(e){var t=pA(e);t.data;var n=vD(t,Ej);return $(`div`,Q({},mA(e,`groupHeading`,{"group-heading":!0}),n))},jj=Oj,Mj=[`innerRef`,`isDisabled`,`isHidden`,`inputClassName`],Nj=function(e,t){var n=e.isDisabled,r=e.value,i=e.theme,a=i.spacing,o=i.colors;return Z(Z({visibility:n?`hidden`:`visible`,transform:r?`translateZ(0)`:``},Fj),t?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:o.neutral80})},Pj={gridArea:`1 / 2`,font:`inherit`,minWidth:`2px`,border:0,margin:0,outline:0,padding:0},Fj={flex:`1 1 auto`,display:`inline-grid`,gridArea:`1 / 1 / 2 / 3`,gridTemplateColumns:`0 min-content`,"&:after":Z({content:`attr(data-value) " "`,visibility:`hidden`,whiteSpace:`pre`},Pj)},Ij=function(e){return Z({label:`input`,color:`inherit`,background:0,opacity:+!e,width:`100%`},Pj)},Lj=function(e){var t=e.cx,n=e.value,r=pA(e),i=r.innerRef,a=r.isDisabled,o=r.isHidden,s=r.inputClassName,c=vD(r,Mj);return $(`div`,Q({},mA(e,`input`,{"input-container":!0}),{"data-value":n||``}),$(`input`,Q({className:t({input:!0},s),ref:i,style:Ij(o),disabled:a},c)))},Rj=function(e,t){var n=e.theme,r=n.spacing,i=n.borderRadius,a=n.colors;return Z({label:`multiValue`,display:`flex`,minWidth:0},t?{}:{backgroundColor:a.neutral10,borderRadius:i/2,margin:r.baseUnit/2})},zj=function(e,t){var n=e.theme,r=n.borderRadius,i=n.colors,a=e.cropWithEllipsis;return Z({overflow:`hidden`,textOverflow:a||a===void 0?`ellipsis`:void 0,whiteSpace:`nowrap`},t?{}:{borderRadius:r/2,color:i.neutral80,fontSize:`85%`,padding:3,paddingLeft:6})},Bj=function(e,t){var n=e.theme,r=n.spacing,i=n.borderRadius,a=n.colors,o=e.isFocused;return Z({alignItems:`center`,display:`flex`},t?{}:{borderRadius:i/2,backgroundColor:o?a.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Vj=function(e){var t=e.children,n=e.innerProps;return $(`div`,n,t)},Hj=Vj,Uj=Vj;function Wj(e){var t=e.children,n=e.innerProps;return $(`div`,Q({role:`button`},n),t||$(dj,{size:14}))}var Gj=function(e){var t=e.children,n=e.components,r=e.data,i=e.innerProps,a=e.isDisabled,o=e.removeProps,s=e.selectProps,c=n.Container,l=n.Label,u=n.Remove;return $(c,{data:r,innerProps:Z(Z({},mA(e,`multiValue`,{"multi-value":!0,"multi-value--is-disabled":a})),i),selectProps:s},$(l,{data:r,innerProps:Z({},mA(e,`multiValueLabel`,{"multi-value__label":!0})),selectProps:s},t),$(u,{data:r,innerProps:Z(Z({},mA(e,`multiValueRemove`,{"multi-value__remove":!0})),{},{"aria-label":`Remove ${t||`option`}`},o),selectProps:s}))},Kj=function(e,t){var n=e.isDisabled,r=e.isFocused,i=e.isSelected,a=e.theme,o=a.spacing,s=a.colors;return Z({label:`option`,cursor:`default`,display:`block`,fontSize:`inherit`,width:`100%`,userSelect:`none`,WebkitTapHighlightColor:`rgba(0, 0, 0, 0)`},t?{}:{backgroundColor:i?s.primary:r?s.primary25:`transparent`,color:n?s.neutral20:i?s.neutral0:`inherit`,padding:`${o.baseUnit*2}px ${o.baseUnit*3}px`,":active":{backgroundColor:n?void 0:i?s.primary:s.primary50}})},qj=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,i=e.isSelected,a=e.innerRef,o=e.innerProps;return $(`div`,Q({},mA(e,`option`,{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":i}),{ref:a,"aria-disabled":n},o),t)},Jj=function(e,t){var n=e.theme,r=n.spacing,i=n.colors;return Z({label:`placeholder`,gridArea:`1 / 1 / 2 / 3`},t?{}:{color:i.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},Yj=function(e){var t=e.children,n=e.innerProps;return $(`div`,Q({},mA(e,`placeholder`,{placeholder:!0}),n),t)},Xj=function(e,t){var n=e.isDisabled,r=e.theme,i=r.spacing,a=r.colors;return Z({label:`singleValue`,gridArea:`1 / 1 / 2 / 3`,maxWidth:`100%`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},t?{}:{color:n?a.neutral40:a.neutral80,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},Zj={ClearIndicator:_j,Control:Tj,DropdownIndicator:hj,DownChevron:fj,CrossIcon:dj,Group:jj,GroupHeading:Aj,IndicatorsContainer:aj,IndicatorSeparator:yj,Input:Lj,LoadingIndicator:Cj,Menu:WA,MenuList:KA,MenuPortal:$A,LoadingMessage:ZA,NoOptionsMessage:XA,MultiValue:Gj,MultiValueContainer:Hj,MultiValueLabel:Uj,MultiValueRemove:Wj,Option:qj,Placeholder:Yj,SelectContainer:tj,SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return $(`div`,Q({},mA(e,`singleValue`,{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:rj},Qj=function(e){return Z(Z({},Zj),e.components)},$j=Number.isNaN||function(e){return typeof e==`number`&&e!==e};function eM(e,t){return!!(e===t||$j(e)&&$j(t))}function tM(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?`s`:``} ${i.join(`,`)}, selected.`;case`select-option`:return a?`option ${r} is disabled. Select another option.`:`option ${r}, selected.`;default:return``}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,i=e.label,a=i===void 0?``:i,o=e.selectValue,s=e.isDisabled,c=e.isSelected,l=e.isAppleDevice,u=function(e,t){return e&&e.length?`${e.indexOf(t)+1} of ${e.length}`:``};return t===`value`&&o?`value ${a} focused, ${u(o,n)}.`:t===`menu`&&l?`${a}${`${c?` selected`:``}${s?` disabled`:``}`}, ${u(r,n)}.`:``},onFilter:function(e){var t=e.inputValue;return`${e.resultsMessage}${t?` for search term `+t:``}.`}},oM=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,i=e.focusableOptions,a=e.isFocused,o=e.selectValue,s=e.selectProps,c=e.id,l=e.isAppleDevice,u=s.ariaLiveMessages,d=s.getOptionLabel,f=s.inputValue,p=s.isMulti,m=s.isOptionDisabled,h=s.isSearchable,g=s.menuIsOpen,v=s.options,y=s.screenReaderStatus,b=s.tabSelectsValue,x=s.isLoading,S=s[`aria-label`],C=s[`aria-live`],w=(0,_.useMemo)(function(){return Z(Z({},aM),u||{})},[u]),T=(0,_.useMemo)(function(){var e=``;if(t&&w.onChange){var n=t.option,r=t.options,i=t.removedValue,a=t.removedValues,s=t.value,c=i||n||function(e){return Array.isArray(e)?null:e}(s),l=c?d(c):``,u=r||a||void 0,f=u?u.map(d):[],p=Z({isDisabled:c&&m(c,o),label:l,labels:f},t);e=w.onChange(p)}return e},[t,w,m,o,d]),E=(0,_.useMemo)(function(){var e=``,t=n||r,a=!!(n&&o&&o.includes(n));if(t&&w.onFocus){var s={focused:t,label:d(t),isDisabled:m(t,o),isSelected:a,options:i,context:t===n?`menu`:`value`,selectValue:o,isAppleDevice:l};e=w.onFocus(s)}return e},[n,r,d,m,w,i,o,l]),D=(0,_.useMemo)(function(){var e=``;if(g&&v.length&&!x&&w.onFilter){var t=y({count:i.length});e=w.onFilter({inputValue:f,resultsMessage:t})}return e},[i,f,g,w,v,y,x]),O=(t==null?void 0:t.action)===`initial-input-focus`,k=(0,_.useMemo)(function(){var e=``;if(w.guidance){var t=r?`value`:g?`menu`:`input`;e=w.guidance({"aria-label":S,context:t,isDisabled:n&&m(n,o),isMulti:p,isSearchable:h,tabSelectsValue:b,isInitialFocus:O})}return e},[S,n,r,p,m,h,g,w,o,b,O]),A=$(_.Fragment,null,$(`span`,{id:`aria-selection`},T),$(`span`,{id:`aria-focused`},E),$(`span`,{id:`aria-results`},D),$(`span`,{id:`aria-guidance`},k));return $(_.Fragment,null,$(iM,{id:c},O&&A),$(iM,{"aria-live":C,"aria-atomic":`false`,"aria-relevant":`additions text`,role:`log`},a&&!O&&A))},sM=[{base:`A`,letters:`AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ`},{base:`AA`,letters:`Ꜳ`},{base:`AE`,letters:`ÆǼǢ`},{base:`AO`,letters:`Ꜵ`},{base:`AU`,letters:`Ꜷ`},{base:`AV`,letters:`ꜸꜺ`},{base:`AY`,letters:`Ꜽ`},{base:`B`,letters:`BⒷBḂḄḆɃƂƁ`},{base:`C`,letters:`CⒸCĆĈĊČÇḈƇȻꜾ`},{base:`D`,letters:`DⒹDḊĎḌḐḒḎĐƋƊƉꝹ`},{base:`DZ`,letters:`DZDŽ`},{base:`Dz`,letters:`DzDž`},{base:`E`,letters:`EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ`},{base:`F`,letters:`FⒻFḞƑꝻ`},{base:`G`,letters:`GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ`},{base:`H`,letters:`HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ`},{base:`I`,letters:`IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ`},{base:`J`,letters:`JⒿJĴɈ`},{base:`K`,letters:`KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ`},{base:`L`,letters:`LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ`},{base:`LJ`,letters:`LJ`},{base:`Lj`,letters:`Lj`},{base:`M`,letters:`MⓂMḾṀṂⱮƜ`},{base:`N`,letters:`NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ`},{base:`NJ`,letters:`NJ`},{base:`Nj`,letters:`Nj`},{base:`O`,letters:`OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ`},{base:`OI`,letters:`Ƣ`},{base:`OO`,letters:`Ꝏ`},{base:`OU`,letters:`Ȣ`},{base:`P`,letters:`PⓅPṔṖƤⱣꝐꝒꝔ`},{base:`Q`,letters:`QⓆQꝖꝘɊ`},{base:`R`,letters:`RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ`},{base:`S`,letters:`SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ`},{base:`T`,letters:`TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ`},{base:`TZ`,letters:`Ꜩ`},{base:`U`,letters:`UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ`},{base:`V`,letters:`VⓋVṼṾƲꝞɅ`},{base:`VY`,letters:`Ꝡ`},{base:`W`,letters:`WⓌWẀẂŴẆẄẈⱲ`},{base:`X`,letters:`XⓍXẊẌ`},{base:`Y`,letters:`YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ`},{base:`Z`,letters:`ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ`},{base:`a`,letters:`aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ`},{base:`aa`,letters:`ꜳ`},{base:`ae`,letters:`æǽǣ`},{base:`ao`,letters:`ꜵ`},{base:`au`,letters:`ꜷ`},{base:`av`,letters:`ꜹꜻ`},{base:`ay`,letters:`ꜽ`},{base:`b`,letters:`bⓑbḃḅḇƀƃɓ`},{base:`c`,letters:`cⓒcćĉċčçḉƈȼꜿↄ`},{base:`d`,letters:`dⓓdḋďḍḑḓḏđƌɖɗꝺ`},{base:`dz`,letters:`dzdž`},{base:`e`,letters:`eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ`},{base:`f`,letters:`fⓕfḟƒꝼ`},{base:`g`,letters:`gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ`},{base:`h`,letters:`hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ`},{base:`hv`,letters:`ƕ`},{base:`i`,letters:`iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı`},{base:`j`,letters:`jⓙjĵǰɉ`},{base:`k`,letters:`kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ`},{base:`l`,letters:`lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ`},{base:`lj`,letters:`lj`},{base:`m`,letters:`mⓜmḿṁṃɱɯ`},{base:`n`,letters:`nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ`},{base:`nj`,letters:`nj`},{base:`o`,letters:`oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ`},{base:`oi`,letters:`ƣ`},{base:`ou`,letters:`ȣ`},{base:`oo`,letters:`ꝏ`},{base:`p`,letters:`pⓟpṕṗƥᵽꝑꝓꝕ`},{base:`q`,letters:`qⓠqɋꝗꝙ`},{base:`r`,letters:`rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ`},{base:`s`,letters:`sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ`},{base:`t`,letters:`tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ`},{base:`tz`,letters:`ꜩ`},{base:`u`,letters:`uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ`},{base:`v`,letters:`vⓥvṽṿʋꝟʌ`},{base:`vy`,letters:`ꝡ`},{base:`w`,letters:`wⓦwẁẃŵẇẅẘẉⱳ`},{base:`x`,letters:`xⓧxẋẍ`},{base:`y`,letters:`yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ`},{base:`z`,letters:`zⓩzźẑżžẓẕƶȥɀⱬꝣ`}],cM=RegExp(`[`+sM.map(function(e){return e.letters}).join(``)+`]`,`g`),lM={},uM=0;uM-1}},vM=[`innerRef`];function yM(e){var t=e.innerRef,n=FA(vD(e,vM),`onExited`,`in`,`enter`,`exit`,`appear`);return $(`input`,Q({ref:t},n,{css:Tk({label:`dummyInput`,background:0,border:0,caretColor:`transparent`,fontSize:`inherit`,gridArea:`1 / 1 / 2 / 3`,outline:0,padding:0,width:1,color:`transparent`,left:-100,opacity:0,position:`relative`,transform:`scale(.01)`},``,``)}))}var bM=function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()};function xM(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,a=e.onTopLeave,o=(0,_.useRef)(!1),s=(0,_.useRef)(!1),c=(0,_.useRef)(0),l=(0,_.useRef)(null),u=(0,_.useCallback)(function(e,t){if(l.current!==null){var c=l.current,u=c.scrollTop,d=c.scrollHeight,f=c.clientHeight,p=l.current,m=t>0,h=d-f-u,g=!1;h>t&&o.current&&(r&&r(e),o.current=!1),m&&s.current&&(a&&a(e),s.current=!1),m&&t>h?(n&&!o.current&&n(e),p.scrollTop=d,g=!0,o.current=!0):!m&&-t>u&&(i&&!s.current&&i(e),p.scrollTop=0,g=!0,s.current=!0),g&&bM(e)}},[n,r,i,a]),d=(0,_.useCallback)(function(e){u(e,e.deltaY)},[u]),f=(0,_.useCallback)(function(e){c.current=e.changedTouches[0].clientY},[]),p=(0,_.useCallback)(function(e){u(e,c.current-e.changedTouches[0].clientY)},[u]),m=(0,_.useCallback)(function(e){if(e){var t=kA?{passive:!1}:!1;e.addEventListener(`wheel`,d,t),e.addEventListener(`touchstart`,f,t),e.addEventListener(`touchmove`,p,t)}},[p,f,d]),h=(0,_.useCallback)(function(e){e&&(e.removeEventListener(`wheel`,d,!1),e.removeEventListener(`touchstart`,f,!1),e.removeEventListener(`touchmove`,p,!1))},[p,f,d]);return(0,_.useEffect)(function(){if(t){var e=l.current;return m(e),function(){h(e)}}},[t,m,h]),function(e){l.current=e}}var SM=[`boxSizing`,`height`,`overflow`,`paddingRight`,`position`],CM={boxSizing:`border-box`,overflow:`hidden`,position:`relative`,height:`100%`};function wM(e){e.cancelable&&e.preventDefault()}function TM(e){e.stopPropagation()}function EM(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function DM(){return`ontouchstart`in window||navigator.maxTouchPoints}var OM=!!(typeof window<`u`&&window.document&&window.document.createElement),kM=0,AM={capture:!1,passive:!1};function jM(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=(0,_.useRef)({}),a=(0,_.useRef)(null),o=(0,_.useCallback)(function(e){if(OM){var t=document.body,n=t&&t.style;if(r&&SM.forEach(function(e){var t=n&&n[e];i.current[e]=t}),r&&kM<1){var a=parseInt(i.current.paddingRight,10)||0,o=document.body?document.body.clientWidth:0,s=window.innerWidth-o+a||0;Object.keys(CM).forEach(function(e){var t=CM[e];n&&(n[e]=t)}),n&&(n.paddingRight=`${s}px`)}t&&DM()&&(t.addEventListener(`touchmove`,wM,AM),e&&(e.addEventListener(`touchstart`,EM,AM),e.addEventListener(`touchmove`,TM,AM))),kM+=1}},[r]),s=(0,_.useCallback)(function(e){if(OM){var t=document.body,n=t&&t.style;kM=Math.max(kM-1,0),r&&kM<1&&SM.forEach(function(e){var t=i.current[e];n&&(n[e]=t)}),t&&DM()&&(t.removeEventListener(`touchmove`,wM,AM),e&&(e.removeEventListener(`touchstart`,EM,AM),e.removeEventListener(`touchmove`,TM,AM)))}},[r]);return(0,_.useEffect)(function(){if(t){var e=a.current;return o(e),function(){s(e)}}},[t,o,s]),function(e){a.current=e}}var MM=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},NM={name:`1kfdb0e`,styles:`position:fixed;left:0;bottom:0;right:0;top:0`};function PM(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,a=e.onBottomArrive,o=e.onBottomLeave,s=e.onTopArrive,c=e.onTopLeave,l=xM({isEnabled:i,onBottomArrive:a,onBottomLeave:o,onTopArrive:s,onTopLeave:c}),u=jM({isEnabled:n});return $(_.Fragment,null,n&&$(`div`,{onClick:MM,css:NM}),t(function(e){l(e),u(e)}))}var FM={name:`1a0ro4n-requiredInput`,styles:`label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%`},IM=function(e){var t=e.name,n=e.onFocus;return $(`input`,{required:!0,name:t,tabIndex:-1,"aria-hidden":`true`,onFocus:n,css:FM,value:``,onChange:function(){}})};function LM(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 RM(){return LM(/^iPhone/i)}function zM(){return LM(/^Mac/i)}function BM(){return LM(/^iPad/i)||zM()&&navigator.maxTouchPoints>1}function VM(){return RM()||BM()}function HM(){return zM()||VM()}var UM=function(e){return e.label},WM=function(e){return e.label},GM=function(e){return e.value},KM=function(e){return!!e.isDisabled},qM={clearIndicator:gj,container:ej,control:wj,dropdownIndicator:mj,group:Dj,groupHeading:kj,indicatorsContainer:ij,indicatorSeparator:vj,input:Nj,loadingIndicator:xj,loadingMessage:YA,menu:VA,menuList:GA,menuPortal:QA,multiValue:Rj,multiValueLabel:zj,multiValueRemove:Bj,noOptionsMessage:JA,option:Kj,placeholder:Jj,singleValue:Xj,valueContainer:nj},JM={primary:`#2684FF`,primary75:`#4C9AFF`,primary50:`#B2D4FF`,primary25:`#DEEBFF`,danger:`#DE350B`,dangerLight:`#FFBDAD`,neutral0:`hsl(0, 0%, 100%)`,neutral5:`hsl(0, 0%, 95%)`,neutral10:`hsl(0, 0%, 90%)`,neutral20:`hsl(0, 0%, 80%)`,neutral30:`hsl(0, 0%, 70%)`,neutral40:`hsl(0, 0%, 60%)`,neutral50:`hsl(0, 0%, 50%)`,neutral60:`hsl(0, 0%, 40%)`,neutral70:`hsl(0, 0%, 30%)`,neutral80:`hsl(0, 0%, 20%)`,neutral90:`hsl(0, 0%, 10%)`},YM=4,XM=4,ZM={borderRadius:YM,colors:JM,spacing:{baseUnit:XM,controlHeight:38,menuGutter:XM*2}},QM={"aria-live":`polite`,backspaceRemovesValue:!0,blurInputOnSelect:wA(),captureMenuScroll:!wA(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:_M(),formatGroupLabel:UM,getOptionLabel:WM,getOptionValue:GM,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:KM,loadingMessage:function(){return`Loading...`},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:`bottom`,menuPosition:`absolute`,menuShouldBlockScroll:!1,menuShouldScrollIntoView:!TA(),noOptionsMessage:function(){return`No options`},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:`Select...`,screenReaderStatus:function(e){var t=e.count;return`${t} result${t===1?``:`s`} available`},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function $M(e,t,n,r){return{type:`option`,data:t,isDisabled:uN(e,t,n),isSelected:dN(e,t,n),label:cN(e,t),value:lN(e,t),index:r}}function eN(e,t){return e.options.map(function(n,r){if(`options`in n){var i=n.options.map(function(n,r){return $M(e,n,t,r)}).filter(function(t){return iN(e,t)});return i.length>0?{type:`group`,data:n,options:i,index:r}:void 0}var a=$M(e,n,t,r);return iN(e,a)?a:void 0}).filter(AA)}function tN(e){return e.reduce(function(e,t){return t.type===`group`?e.push.apply(e,PD(t.options.map(function(e){return e.data}))):e.push(t.data),e},[])}function nN(e,t){return e.reduce(function(e,n){return n.type===`group`?e.push.apply(e,PD(n.options.map(function(e){return{data:e.data,id:`${t}-${n.index}-${e.index}`}}))):e.push({data:n.data,id:`${t}-${n.index}`}),e},[])}function rN(e,t){return tN(eN(e,t))}function iN(e,t){var n=e.inputValue,r=n===void 0?``:n,i=t.data,a=t.isSelected,o=t.label,s=t.value;return(!pN(e)||!a)&&fN(e,{label:o,value:s,data:i},r)}function aN(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r-1?n:t[0]}var sN=function(e,t){var n;return((n=e.find(function(e){return e.data===t}))==null?void 0:n.id)||null},cN=function(e,t){return e.getOptionLabel(t)},lN=function(e,t){return e.getOptionValue(t)};function uN(e,t,n){return typeof e.isOptionDisabled==`function`?e.isOptionDisabled(t,n):!1}function dN(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected==`function`)return e.isOptionSelected(t,n);var r=lN(e,t);return n.some(function(t){return lN(e,t)===r})}function fN(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var pN=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return t===void 0?n:t},mN=1,hN=function(e){TD(n,e);var t=AD(n);function n(e){var r;if(xD(this,n),r=t.call(this,e),r.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:``,isAppleDevice:!1},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,i=n.onChange;t.name=n.name,r.ariaOnChange(e,t),i(e,t)},r.setValue=function(e,t,n){var i=r.props,a=i.closeMenuOnSelect,o=i.isMulti,s=i.inputValue;r.onInputChange(``,{action:`set-value`,prevInputValue:s}),a&&(r.setState({inputIsHiddenAfterUpdate:!o}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,i=t.isMulti,a=t.name,o=r.state.selectValue,s=i&&r.isOptionSelected(e,o),c=r.isOptionDisabled(e,o);if(s){var l=r.getOptionValue(e);r.setValue(PA(o.filter(function(e){return r.getOptionValue(e)!==l})),`deselect-option`,e)}else if(!c)i?r.setValue(PA([].concat(PD(o),[e])),`select-option`,e):r.setValue(NA(e),`select-option`);else{r.ariaOnChange(NA(e),{action:`select-option`,option:e,name:a});return}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,i=r.getOptionValue(e),a=n.filter(function(e){return r.getOptionValue(e)!==i}),o=MA(t,a,a[0]||null);r.onChange(o,{action:`remove-value`,removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(MA(r.props.isMulti,[],null),{action:`clear`,removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],i=t.slice(0,t.length-1),a=MA(e,i,i[0]||null);n&&r.onChange(a,{action:`pop-value`,removedValue:n})},r.getFocusedOptionId=function(e){return sN(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return nN(eN(r.props,r.state.selectValue),r.getElementId(`option`))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=Array(e),n=0;no||a>o}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:`input-change`,prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu(`first`),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;if(r.menuListRef&&r.menuListRef.contains(document.activeElement)){r.inputRef.focus();return}r.props.onBlur&&r.props.onBlur(e),r.onInputChange(``,{action:`input-blur`,prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1})},r.onOptionHover=function(e){if(!(r.blockOptionHover||r.state.focusedOption===e)){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return pN(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,i=t.backspaceRemovesValue,a=t.escapeClearsValue,o=t.inputValue,s=t.isClearable,c=t.isDisabled,l=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,f=t.openMenuOnFocus,p=r.state,m=p.focusedOption,h=p.focusedValue,g=p.selectValue;if(!c&&!(typeof u==`function`&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case`ArrowLeft`:if(!n||o)return;r.focusValue(`previous`);break;case`ArrowRight`:if(!n||o)return;r.focusValue(`next`);break;case`Delete`:case`Backspace`:if(o)return;if(h)r.removeValue(h);else{if(!i)return;n?r.popValue():s&&r.clearValue()}break;case`Tab`:if(r.isComposing||e.shiftKey||!l||!d||!m||f&&r.isOptionSelected(m,g))return;r.selectOption(m);break;case`Enter`:if(e.keyCode===229)break;if(l){if(!m||r.isComposing)return;r.selectOption(m);break}return;case`Escape`:l?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(``,{action:`menu-close`,prevInputValue:o}),r.onMenuClose()):s&&a&&r.clearValue();break;case` `:if(o)return;if(!l){r.openMenu(`first`);break}if(!m)return;r.selectOption(m);break;case`ArrowUp`:l?r.focusOption(`up`):r.openMenu(`last`);break;case`ArrowDown`:l?r.focusOption(`down`):r.openMenu(`first`);break;case`PageUp`:if(!l)return;r.focusOption(`pageup`);break;case`PageDown`:if(!l)return;r.focusOption(`pagedown`);break;case`Home`:if(!l)return;r.focusOption(`first`);break;case`End`:if(!l)return;r.focusOption(`last`);break;default:return}e.preventDefault()}},r.state.instancePrefix=`react-select-`+(r.props.instanceId||++mN),r.state.selectValue=fA(e.value),e.menuIsOpen&&r.state.selectValue.length){var i=r.getFocusableOptionsWithIds(),a=r.buildFocusableOptions(),o=a.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=i,r.state.focusedOption=a[o],r.state.focusedOptionId=sN(i,a[o])}return r}return CD(n,[{key:`componentDidMount`,value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener(`scroll`,this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&SA(this.menuListRef,this.focusedOptionRef),HM()&&this.setState({isAppleDevice:!0})}},{key:`componentDidUpdate`,value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,i=this.state.isFocused;(i&&!n&&e.isDisabled||i&&r&&!e.menuIsOpen)&&this.focusInput(),i&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!i&&!n&&e.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(SA(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:`componentWillUnmount`,value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener(`scroll`,this.onScroll,!0)}},{key:`onMenuOpen`,value:function(){this.props.onMenuOpen()}},{key:`onMenuClose`,value:function(){this.onInputChange(``,{action:`menu-close`,prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:`onInputChange`,value:function(e,t){this.props.onInputChange(e,t)}},{key:`focusInput`,value:function(){this.inputRef&&this.inputRef.focus()}},{key:`blurInput`,value:function(){this.inputRef&&this.inputRef.blur()}},{key:`openMenu`,value:function(e){var t=this,n=this.state,r=n.selectValue,i=n.isFocused,a=this.buildFocusableOptions(),o=e===`first`?0:a.length-1;if(!this.props.isMulti){var s=a.indexOf(r[0]);s>-1&&(o=s)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:a[o],focusedOptionId:this.getFocusedOptionId(a[o])},function(){return t.onMenuOpen()})}},{key:`focusValue`,value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var i=n.indexOf(r);r||(i=-1);var a=n.length-1,o=-1;if(n.length){switch(e){case`previous`:o=i===0?0:i===-1?a:i-1;break;case`next`:i>-1&&i0&&arguments[0]!==void 0?arguments[0]:`first`,t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var i=0,a=r.indexOf(n);n||(a=-1),e===`up`?i=a>0?a-1:r.length-1:e===`down`?i=(a+1)%r.length:e===`pageup`?(i=a-t,i<0&&(i=0)):e===`pagedown`?(i=a+t,i>r.length-1&&(i=r.length-1)):e===`last`&&(i=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[i],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[i])})}}},{key:`getTheme`,value:function(){return this.props.theme?typeof this.props.theme==`function`?this.props.theme(ZM):Z(Z({},ZM),this.props.theme):ZM}},{key:`getCommonProps`,value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,i=this.getValue,a=this.selectOption,o=this.setValue,s=this.props,c=s.isMulti,l=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:i,hasValue:this.hasValue(),isMulti:c,isRtl:l,options:u,selectOption:a,selectProps:s,setValue:o,theme:this.getTheme()}}},{key:`hasValue`,value:function(){return this.state.selectValue.length>0}},{key:`hasOptions`,value:function(){return!!this.getFocusableOptions().length}},{key:`isClearable`,value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return t===void 0?n:t}},{key:`isOptionDisabled`,value:function(e,t){return uN(this.props,e,t)}},{key:`isOptionSelected`,value:function(e,t){return dN(this.props,e,t)}},{key:`filterOption`,value:function(e,t){return fN(this.props,e,t)}},{key:`formatOptionLabel`,value:function(e,t){if(typeof this.props.formatOptionLabel==`function`){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}else return this.getOptionLabel(e)}},{key:`formatGroupLabel`,value:function(e){return this.props.formatGroupLabel(e)}},{key:`startListeningComposition`,value:function(){document&&document.addEventListener&&(document.addEventListener(`compositionstart`,this.onCompositionStart,!1),document.addEventListener(`compositionend`,this.onCompositionEnd,!1))}},{key:`stopListeningComposition`,value:function(){document&&document.removeEventListener&&(document.removeEventListener(`compositionstart`,this.onCompositionStart),document.removeEventListener(`compositionend`,this.onCompositionEnd))}},{key:`startListeningToTouch`,value:function(){document&&document.addEventListener&&(document.addEventListener(`touchstart`,this.onTouchStart,!1),document.addEventListener(`touchmove`,this.onTouchMove,!1),document.addEventListener(`touchend`,this.onTouchEnd,!1))}},{key:`stopListeningToTouch`,value:function(){document&&document.removeEventListener&&(document.removeEventListener(`touchstart`,this.onTouchStart),document.removeEventListener(`touchmove`,this.onTouchMove),document.removeEventListener(`touchend`,this.onTouchEnd))}},{key:`renderInput`,value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,i=e.inputValue,a=e.tabIndex,o=e.form,s=e.menuIsOpen,c=e.required,l=this.getComponents().Input,u=this.state,d=u.inputIsHidden,f=u.ariaSelection,p=this.commonProps,m=r||this.getElementId(`input`),h=Z(Z(Z({"aria-autocomplete":`list`,"aria-expanded":s,"aria-haspopup":!0,"aria-errormessage":this.props[`aria-errormessage`],"aria-invalid":this.props[`aria-invalid`],"aria-label":this.props[`aria-label`],"aria-labelledby":this.props[`aria-labelledby`],"aria-required":c,role:`combobox`,"aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||``},s&&{"aria-controls":this.getElementId(`listbox`)}),!n&&{"aria-readonly":!0}),this.hasValue()?(f==null?void 0:f.action)===`initial-input-focus`&&{"aria-describedby":this.getElementId(`live-region`)}:{"aria-describedby":this.getElementId(`placeholder`)});return n?_.createElement(l,Q({},p,{autoCapitalize:`none`,autoComplete:`off`,autoCorrect:`off`,id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:d,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:`false`,tabIndex:a,form:o,type:`text`,value:i},h)):_.createElement(yM,Q({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:lA,onFocus:this.onInputFocus,disabled:t,tabIndex:a,inputMode:`none`,form:o,value:``},h))}},{key:`renderPlaceholderOrValue`,value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,a=t.MultiValueRemove,o=t.SingleValue,s=t.Placeholder,c=this.commonProps,l=this.props,u=l.controlShouldRenderValue,d=l.isDisabled,f=l.isMulti,p=l.inputValue,m=l.placeholder,h=this.state,g=h.selectValue,v=h.focusedValue,y=h.isFocused;if(!this.hasValue()||!u)return p?null:_.createElement(s,Q({},c,{key:`placeholder`,isDisabled:d,isFocused:y,innerProps:{id:this.getElementId(`placeholder`)}}),m);if(f)return g.map(function(t,o){var s=t===v,l=`${e.getOptionLabel(t)}-${e.getOptionValue(t)}`;return _.createElement(n,Q({},c,{components:{Container:r,Label:i,Remove:a},isFocused:s,isDisabled:d,key:l,index:o,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,`value`))});if(p)return null;var b=g[0];return _.createElement(o,Q({},c,{data:b,isDisabled:d}),this.formatOptionLabel(b,`value`))}},{key:`renderClearIndicator`,value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var o={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":`true`};return _.createElement(e,Q({},t,{innerProps:o,isFocused:a}))}},{key:`renderLoadingIndicator`,value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;return!e||!i?null:_.createElement(e,Q({},t,{innerProps:{"aria-hidden":`true`},isDisabled:r,isFocused:a}))}},{key:`renderIndicatorSeparator`,value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return _.createElement(n,Q({},r,{isDisabled:i,isFocused:a}))}},{key:`renderDropdownIndicator`,value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":`true`};return _.createElement(e,Q({},t,{innerProps:i,isDisabled:n,isFocused:r}))}},{key:`renderMenu`,value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,i=t.Menu,a=t.MenuList,o=t.MenuPortal,s=t.LoadingMessage,c=t.NoOptionsMessage,l=t.Option,u=this.commonProps,d=this.state.focusedOption,f=this.props,p=f.captureMenuScroll,m=f.inputValue,h=f.isLoading,g=f.loadingMessage,v=f.minMenuHeight,y=f.maxMenuHeight,b=f.menuIsOpen,x=f.menuPlacement,S=f.menuPosition,C=f.menuPortalTarget,w=f.menuShouldBlockScroll,T=f.menuShouldScrollIntoView,E=f.noOptionsMessage,D=f.onMenuScrollToTop,O=f.onMenuScrollToBottom;if(!b)return null;var k=function(t,n){var r=t.type,i=t.data,a=t.isDisabled,o=t.isSelected,s=t.label,c=t.value,f=d===i,p=a?void 0:function(){return e.onOptionHover(i)},m=a?void 0:function(){return e.selectOption(i)},h=`${e.getElementId(`option`)}-${n}`,g={id:h,onClick:m,onMouseMove:p,onMouseOver:p,tabIndex:-1,role:`option`,"aria-selected":e.state.isAppleDevice?void 0:o};return _.createElement(l,Q({},u,{innerProps:g,data:i,isDisabled:a,isSelected:o,key:h,label:s,type:r,value:c,isFocused:f,innerRef:f?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,`menu`))},A;if(this.hasOptions())A=this.getCategorizedOptions().map(function(t){if(t.type===`group`){var i=t.data,a=t.options,o=t.index,s=`${e.getElementId(`group`)}-${o}`,c=`${s}-heading`;return _.createElement(n,Q({},u,{key:s,data:i,options:a,Heading:r,headingProps:{id:c,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return k(e,`${o}-${e.index}`)}))}else if(t.type===`option`)return k(t,`${t.index}`)});else if(h){var j=g({inputValue:m});if(j===null)return null;A=_.createElement(s,u,j)}else{var M=E({inputValue:m});if(M===null)return null;A=_.createElement(c,u,M)}var N={minMenuHeight:v,maxMenuHeight:y,menuPlacement:x,menuPosition:S,menuShouldScrollIntoView:T},P=_.createElement(UA,Q({},u,N),function(t){var n=t.ref,r=t.placerProps,o=r.placement,s=r.maxHeight;return _.createElement(i,Q({},u,N,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:h,placement:o}),_.createElement(PM,{captureEnabled:p,onTopArrive:D,onBottomArrive:O,lockEnabled:w},function(t){return _.createElement(a,Q({},u,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:`listbox`,"aria-multiselectable":u.isMulti,id:e.getElementId(`listbox`)},isLoading:h,maxHeight:s,focusedOption:d}),A)}))});return C||S===`fixed`?_.createElement(o,Q({},u,{appendTo:C,controlElement:this.controlRef,menuPlacement:x,menuPosition:S}),P):P}},{key:`renderFormField`,value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,a=t.name,o=t.required,s=this.state.selectValue;if(o&&!this.hasValue()&&!r)return _.createElement(IM,{name:a,onFocus:this.onValueInputFocus});if(!(!a||r))if(i)if(n){var c=s.map(function(t){return e.getOptionValue(t)}).join(n);return _.createElement(`input`,{name:a,type:`hidden`,value:c})}else{var l=s.length>0?s.map(function(t,n){return _.createElement(`input`,{key:`i-${n}`,name:a,type:`hidden`,value:e.getOptionValue(t)})}):_.createElement(`input`,{name:a,type:`hidden`,value:``});return _.createElement(`div`,null,l)}else{var u=s[0]?this.getOptionValue(s[0]):``;return _.createElement(`input`,{name:a,type:`hidden`,value:u})}}},{key:`renderLiveRegion`,value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,a=t.isFocused,o=t.selectValue,s=this.getFocusableOptions();return _.createElement(oM,Q({},e,{id:this.getElementId(`live-region`),ariaSelection:n,focusedOption:r,focusedValue:i,isFocused:a,selectValue:o,focusableOptions:s,isAppleDevice:this.state.isAppleDevice}))}},{key:`render`,value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,a=this.props,o=a.className,s=a.id,c=a.isDisabled,l=a.menuIsOpen,u=this.state.isFocused,d=this.commonProps=this.getCommonProps();return _.createElement(r,Q({},d,{className:o,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:u}),this.renderLiveRegion(),_.createElement(t,Q({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:u,menuIsOpen:l}),_.createElement(i,Q({},d,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),_.createElement(n,Q({},d,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:`getDerivedStateFromProps`,value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,i=t.inputIsHiddenAfterUpdate,a=t.ariaSelection,o=t.isFocused,s=t.prevWasFocused,c=t.instancePrefix,l=e.options,u=e.value,d=e.menuIsOpen,f=e.inputValue,p=e.isMulti,m=fA(u),h={};if(n&&(u!==n.value||l!==n.options||d!==n.menuIsOpen||f!==n.inputValue)){var g=d?rN(e,m):[],_=d?nN(eN(e,m),`${c}-option`):[],v=r?aN(t,m):null,y=oN(t,g);h={selectValue:m,focusedOption:y,focusedOptionId:sN(_,y),focusableOptionsWithIds:_,focusedValue:v,clearFocusValueOnUpdate:!1}}var b=i!=null&&e!==n?{inputIsHidden:i,inputIsHiddenAfterUpdate:void 0}:{},x=a,S=o&&s;return o&&!S&&(x={value:MA(p,m,m[0]||null),options:m,action:`initial-input-focus`},S=!s),(a==null?void 0:a.action)===`initial-input-focus`&&(x=null),Z(Z(Z({},h),b),{},{prevProps:e,ariaSelection:x,prevWasFocused:S})}}]),n}(_.Component);hN.defaultProps=QM;var gN=(0,_.forwardRef)(function(e,t){var n=bD(e);return _.createElement(hN,Q({ref:t},n))}),_N=u(s((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(){for(var e=[],t=0;t{let t=(0,_.useRef)(vN);return t.current===vN&&(t.current=e()),t};function bN(){var e=(0,_.useRef)(!1);return(0,_.useEffect)(function(){return e.current=!0,function(){e.current=!1}},[]),e}var xN=function(e){var t=_.useRef(e);return sA(function(){t.current=e}),t};function SN(e){return{isOk:()=>!0,isOkAnd:t=>t(e),isErr:()=>!1,isErrAnd:()=>!1,ok:()=>TN(e),err:()=>wN(),map:t=>SN(t(e)),mapOr:(t,n)=>n(e),mapOrElse:(t,n)=>n(e),mapErr:()=>SN(e),expect:()=>e,expectErr:e=>{throw Error(e)},unwrap:()=>e,unwrapErr:()=>{throw Error(`${e}`)},unwrapOr:()=>e,unwrapOrElse:()=>e,and:e=>e,andThen:t=>t(e),or:()=>SN(e),orElse:()=>SN(e)}}function CN(e){return{isOk:()=>!1,isOkAnd:()=>!1,isErr:()=>!0,isErrAnd:t=>t(e),ok:()=>wN(),err:()=>TN(e),map:()=>CN(e),mapOr:e=>e,mapOrElse:t=>t(e),mapErr:t=>CN(t(e)),expect:e=>{throw Error(e)},expectErr:()=>e,unwrap:()=>{throw Error(`${e}`)},unwrapErr:()=>e,unwrapOr:e=>e,unwrapOrElse:t=>t(e),and:()=>CN(e),andThen:()=>CN(e),or:e=>e,orElse:t=>t(e)}}function wN(){let e={and:()=>wN(),andThen:()=>wN(),expect:e=>{throw Error(e)},filter:()=>e,isSome:()=>!1,isSomeAnd:()=>!1,isNone:()=>!0,map:()=>wN(),mapOr:e=>e,mapOrElse:e=>e(),okOr:e=>CN(e),okOrElse:e=>CN(e()),or:e=>e,orElse:e=>e(),unwrap:()=>{throw Error("panic! call `unwrap` on a `None` value")},unwrapOr:e=>e,unwrapOrElse:e=>e(),xor:t=>t.isSome()?t:e};return e}function TN(e){let t={and:e=>e,andThen:t=>t(e),expect:()=>e,filter:n=>n(e)?t:wN(),isSome:()=>!0,isSomeAnd:t=>t(e),isNone:()=>!1,map:t=>TN(t(e)),mapOr:(t,n)=>n(e),mapOrElse:(t,n)=>n(e),okOr:()=>SN(e),okOrElse:()=>SN(e),or:()=>t,orElse:()=>t,unwrap:()=>e,unwrapOr:()=>e,unwrapOrElse:()=>e,xor:e=>e.isNone()?t:wN()};return t}function EN(e){return e.then(e=>SN(e),e=>CN(e))}var DN=setTimeout;function ON(e,t){var n=t.useCachedSetTimeout?DN:setTimeout;return new Promise((function(t){n(t,e)}))}function kN(e){var t=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).useCachedSetTimeout,n=ON(e,{useCachedSetTimeout:t});function r(e){return n.then((function(){return e}))}return r.then=function(){return n.then.apply(n,arguments)},r.catch=Promise.resolve().catch,r}K(),Nn(),F();var AN=[`components`,`selectRef`,`isLoading`,`cacheUniqs`,`menuPlacement`,`menuShouldScrollIntoView`],jN=300;function MN(e){function t(t){let{selectProps:n,innerRef:r}=t,{handleScrolledToBottom:i,shouldLoadMore:a}=n,o=(0,_.useRef)(null),s=(0,_.useRef)(null),c=(0,_.useCallback)(()=>{let e=s.current;if(!e)return!1;let{scrollTop:t,scrollHeight:n,clientHeight:r}=e;return a(n,r,t)},[a]),l=(0,_.useCallback)(()=>{c()&&i&&i()},[c,i]),u=(0,_.useMemo)(()=>{let e=()=>{l(),o.current=setTimeout(e,jN)};return e},[l]);return(0,_.useEffect)(()=>(u(),()=>{o.current&&clearTimeout(o.current)}),[]),(0,v.jsx)(e,G(G({},t),{},{innerRef:(0,_N.default)(r,s)}))}return t}var NN=MN(Zj.MenuList),PN=e=>(0,_.useMemo)(()=>G({MenuList:NN},e),[e]),FN=(e,t)=>[...e,...t],IN=10,LN=(e,t,n)=>e-t-IN({isFirstLoad:!0,options:[],hasMore:!0,isLoading:!1,lockedUntil:0,additional:e.additional}),zN=({options:e,defaultOptions:t,additional:n,defaultAdditional:r})=>{let i=t===!0?null:Array.isArray(t)?t:e;return i?{"":{isFirstLoad:!1,isLoading:!1,options:i,hasMore:!0,lockedUntil:0,additional:r||n}}:{}},BN=`[react-select-async-paginate] response of "loadOptions" should be an object with "options" prop, which contains array of options.`,VN=e=>{if(!e)return!1;let{options:t,hasMore:n}=e;return!(!Array.isArray(t)||typeof n!=`boolean`&&n!==void 0)},HN=e=>{if(!VN(e))throw console.error(BN,`Received:`,e),Error(BN);return!0},UN=function(){var e=j(function*(e,t,n,r,i,a,o,s){let c=t.current.inputValue,l=!n.current[c],u=l?RN(t.current):n.current[c];if(u.isLoading||!u.hasMore||u.lockedUntil>Date.now())return;if(i(t=>s&&e===`input-change`?{[c]:G(G({},u),{},{isLoading:!0})}:G(G({},t),{},{[c]:G(G({},u),{},{isLoading:!0})})),r>0&&e===`input-change`&&(yield kN(r),c!==t.current.inputValue)){i(e=>{if(l){let{[c]:t}=e;return P(e,[c].map(Mn))}return G(G({},e),{},{[c]:G(G({},u),{},{isLoading:!1})})});return}let{loadOptions:d,reloadOnErrorTimeout:f=0}=t.current,p=yield EN(Promise.resolve().then(()=>d(c,u.options,u.additional)));if(!o.current)return;if(p.isErr()){i(e=>G(G({},e),{},{[c]:G(G({},u),{},{isLoading:!1,lockedUntil:Date.now()+f})}));return}let m=p.unwrap();if(HN(m)){let{options:e,hasMore:t}=m,n=Object.hasOwn(m,`additional`)?m.additional:u.additional;i(r=>G(G({},r),{},{[c]:G(G({},u),{},{options:a(u.options,e,n),hasMore:!!t,isLoading:!1,isFirstLoad:!1,additional:n})}))}});return function(t,n,r,i,a,o,s,c){return e.apply(this,arguments)}}(),WN=e=>e+1,GN=(e,t=[])=>{let{clearCacheOnSearchChange:n=!1,clearCacheOnMenuClose:r=!1,defaultOptions:i,loadOptionsOnMenuOpen:a=!0,debounceTimeout:o=0,inputValue:s,menuIsOpen:c,filterOption:l=null,reduceOptions:u=FN,shouldLoadMore:d=LN,mapOptionsForMenu:f=void 0}=e,p=xN(c),m=bN(),h=xN(u),g=xN(a),v=(0,_.useRef)(!0),y=(0,_.useRef)(e);y.current=e;let[b,x]=(0,_.useState)(0),S=yN(()=>zN(e)),C=xN(e=>{UN(e,y,S,o,e=>{S.current=e(S.current),m.current&&x(WN)},h.current,m,n)}),w=(0,_.useCallback)(()=>{let e=y.current.inputValue;S.current[e]&&C.current(`menu-scroll`)},[C,S]);(0,_.useEffect)(()=>{v.current?v.current=!1:(S.current={},x(WN)),i===!0&&C.current(`autoload`)},t),(0,_.useEffect)(()=>{p.current&&!S.current[s]&&C.current(`input-change`)},[C,s,p,S]),(0,_.useEffect)(()=>{if(c){if(!S.current[``]&&g.current){C.current(`menu-toggle`);return}return}r&&(S.current={},x(WN))},[C,g,c,S,r]);let T=S.current[s]||RN(e),E=(0,_.useMemo)(()=>f?f(T.options):T.options,[T.options,f]);return{handleScrolledToBottom:w,shouldLoadMore:d,filterOption:l,isLoading:T.isLoading||T.lockedUntil>Date.now(),isFirstLoad:T.isFirstLoad,options:E}},KN=(e,t=[])=>{let{inputValue:n,menuIsOpen:r,defaultInputValue:i,defaultMenuIsOpen:a,onInputChange:o,onMenuClose:s,onMenuOpen:c}=e,[l,u]=(0,_.useState)(i||``),[d,f]=(0,_.useState)(!!a),p=typeof n==`string`?n:l,m=typeof r==`boolean`?r:d,h=(0,_.useCallback)((e,t)=>{o&&o(e,t),u(e)},[o]),g=(0,_.useCallback)(()=>{s&&s(),f(!1)},[s]),v=(0,_.useCallback)(()=>{c&&c(),f(!0)},[c]);return G(G({},GN(G(G({},e),{},{inputValue:p,menuIsOpen:m}),t)),{},{inputValue:p,menuIsOpen:m,onInputChange:h,onMenuClose:g,onMenuOpen:v})},qN=[],JN={};function YN(e){function t(t){let{components:n=JN,selectRef:r=void 0,isLoading:i,cacheUniqs:a=qN,menuPlacement:o,menuShouldScrollIntoView:s}=t,c=KN(P(t,AN),a),l=PN(n),u=typeof i==`boolean`?i:c.isLoading;return(0,v.jsx)(e,G(G(G({},t),c),{},{menuPlacement:o,menuShouldScrollIntoView:o===`auto`&&u?!1:s,isLoading:u,components:l,ref:r}))}return t}var XN=YN(gN),ZN=class{constructor(e){this.token=e}getPayments(e){var t=this;return j(function*(){var n;return yield q.get(`/apps/api/payment/by/shop/`+e.uuid,{headers:{Authorization:`Bearer `+((n=t.token)==null?void 0:n.currentToken)}}).then(e=>e.data.data.map(e=>{let t=new ba;return t.uid=e.uid,t.title=e.title,t.uuid=e.uuid,t}))})()}};ZN=li([Ce(),be(),mi(0,xe(di)),pi(`design:paramtypes`,[di===void 0?Object:di])],ZN);var QN=ZN,$N=({shop:e,order:t})=>{let[n,r]=(0,_.useState)(null),i=H.resolve(To),[a,o]=(0,_.useState)(0),s=new QN,c=function(){var t=j(function*(t,n){return{options:yield s.getPayments(e),hasMore:!1}});return function(e,n){return t.apply(this,arguments)}}();return(0,_.useEffect)(()=>{r(e.uuid)},[e.uuid]),(0,_.useEffect)(()=>{o(t.payment.uid)},[t.payment]),(0,v.jsx)(Eo,{title:`Zahlart`,subtitle:`Zahlungsbedingung`,incomplete:a===0,icon:(0,v.jsx)(`svg`,{className:`h-5 w-5`,fill:`none`,stroke:`currentColor`,strokeWidth:2,viewBox:`0 0 24 24`,children:(0,v.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z`})}),children:(0,v.jsx)(XN,{defaultOptions:!0,defaultValue:t.payment,loadOptions:c,placeholder:``,name:`Zahlart`,getOptionValue:e=>e.uid,getOptionLabel:e=>e.title,onChange:e=>{t.payment=e;let n=i.getCurrentOrder().getValue();n.payment=e,i.setCurrentOrder(n),o(e.uid)},isSearchable:!1,className:`${a==0?`border border-red-400 rounded-sm`:``}`},JSON.stringify(n))})};$N.propTypes={shop:ia.instanceOf(ta),order:ia.instanceOf(Sa)};var eP=class{constructor(e){this.token=e}getShipping(e){var t=this;return j(function*(){var n;return yield q.get(`/apps/api/shipping/by/shop/`+e.uuid,{headers:{Authorization:`Bearer `+((n=t.token)==null?void 0:n.currentToken)}}).then(e=>e.data.data.map(e=>{let t=new xa;return t.uid=e.uid,t.title=e.title,t.uuid=e.uuid,t}))})()}};eP=li([Ce(),be(),mi(0,xe(di)),pi(`design:paramtypes`,[di===void 0?Object:di])],eP);var tP=eP,nP=({shop:e,order:t})=>{let[n,r]=(0,_.useState)(null),i=H.resolve(To),[a,o]=(0,_.useState)(0),s=new tP,c=function(){var t=j(function*(t,n){return{options:yield s.getShipping(e),hasMore:!1}});return function(e,n){return t.apply(this,arguments)}}();return(0,_.useEffect)(()=>{r(e.uuid)},[e.uuid]),(0,_.useEffect)(()=>{o(t.shipping.uid)},[t.shipping]),(0,v.jsx)(Eo,{title:`Versandart`,subtitle:`Versand oder Abholung`,incomplete:a===0,icon:(0,v.jsx)(`svg`,{className:`h-5 w-5`,fill:`none`,stroke:`currentColor`,strokeWidth:2,viewBox:`0 0 24 24`,children:(0,v.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4`})}),children:(0,v.jsx)(XN,{defaultOptions:!0,defaultValue:t.shipping,placeholder:``,name:`Versandart`,loadOptions:c,getOptionValue:e=>e.uid,getOptionLabel:e=>e.title,onChange:e=>{t.shipping=e;let n=i.getCurrentOrder().getValue();n.shipping=e,i.setCurrentOrder(n),o(e.uid)},isSearchable:!1,className:`${a==0?`border border-red-400 rounded-sm`:``}`},JSON.stringify(n))})};nP.propTypes={shop:ia.instanceOf(ta),order:ia.instanceOf(Sa)};var rP=class{constructor(e){this.token=e}getOrder(e){var t=this;return j(function*(){var n;return yield q.post(`/apps/api/order/getonebyuuid`,{uuid:e},{headers:{Authorization:`Bearer `+((n=t.token)==null?void 0:n.currentToken)}}).then(e=>{let t=new Sa;return t.parseFromJson(e.data),t})})()}saveOrder(e){var t=this;return j(function*(){var n;return yield q.post(`/apps/api/order/create`,e,{headers:{Authorization:`Bearer `+((n=t.token)==null?void 0:n.currentToken)}}).then(e=>e.data)})()}calcOrder(e){var t=this;return j(function*(){var n;return yield q.post(`/apps/api/order/calc`,e,{headers:{Authorization:`Bearer `+((n=t.token)==null?void 0:n.currentToken)}}).then(e=>e.data)})()}};rP=li([Ce(),be(),mi(0,xe(di)),pi(`design:paramtypes`,[di===void 0?Object:di])],rP);var iP=rP,aP=new mo,oP=0,sP=aP.asObservable();function cP(e,t=`success`){aP.next({id:++oP,text:e,type:t})}var lP=class extends _.Component{constructor(e){super(e),this.orderState=H.resolve(To),this.orderService=H.resolve(iP),this.state={disabled:!0,saving:!1}}componentDidMount(){this.orderState.getCurrentOrder().pipe(Co(2e3)).subscribe(e=>this.saveButton(e))}saveButton(e){e.contact.username!=``&&e.payment.title!=``&&e.shipping.title!=``&&e.shop.name!=``&&e.invoiceAddress.uuid!=``&&e.type!=0&&e.positions.length>0&&this.setState({disabled:!1})}handlePrint(e){var t=this;return j(function*(){let e=t.orderState.getCurrentOrder().value.uuid,n=t.orderState.getCurrentOrder().value.type;window.open(`/apps/backend/order/detail/print/`+n+`/`+e)})()}handleSave(e){var t=this;return j(function*(){e.preventDefault(),t.setState({saving:!0});try{let e=yield t.orderService.saveOrder(t.orderState.getCurrentOrder().value);t.props.loadOrder(e.uuid),cP(`Auftrag gespeichert`)}catch(e){cP(`Speichern fehlgeschlagen`,`error`)}finally{t.setState({saving:!1})}})()}render(){return(0,v.jsxs)(w,{className:`gap-3`,children:[(0,v.jsxs)(C,{color:`success`,disabled:this.state.disabled,onClick:e=>this.handleSave(e),children:[(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,strokeWidth:`1.5`,stroke:`currentColor`,fill:`none`,className:`h-5 w-5`,children:(0,v.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M6 20.25h12A2.25 2.25 0 0 0 20.25 18V7.5L16.5 3.75H6A2.25 2.25 0 0 0 3.75 6v12A2.25 2.25 0 0 0 6 20.25zm9.75-16.5v5h-9.5v-5zM13 5.5V7m-6.75 4.25h11.5v6.5H6.25Z`})}),this.state.saving===!0&&(0,v.jsx)(`span`,{children:`wird gespeichert...`}),this.state.saving===!1&&(0,v.jsx)(`span`,{children:`Speichern`})]}),(0,v.jsxs)(C,{color:`light`,disabled:!this.orderState.getCurrentOrder().value.saved,onClick:e=>this.handlePrint(e),children:[(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:`1.5`,stroke:`currentColor`,className:`h-5 w-5`,children:(0,v.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M6.72 13.829c-.24.03-.48.062-.72.096m.72-.096a42.415 42.415 0 0 1 10.56 0m-10.56 0L6.34 18m10.94-4.171c.24.03.48.062.72.096m-.72-.096L17.66 18m0 0 .229 2.523a1.125 1.125 0 0 1-1.12 1.227H7.231c-.662 0-1.18-.568-1.12-1.227L6.34 18m11.318 0h1.091A2.25 2.25 0 0 0 21 15.75V9.456c0-1.081-.768-2.015-1.837-2.175a48.055 48.055 0 0 0-1.913-.247M6.34 18H5.25A2.25 2.25 0 0 1 3 15.75V9.456c0-1.081.768-2.015 1.837-2.175a48.041 48.041 0 0 1 1.913-.247m10.5 0a48.536 48.536 0 0 0-10.5 0m10.5 0V3.375c0-.621-.504-1.125-1.125-1.125h-8.25c-.621 0-1.125.504-1.125 1.125v3.659M18 10.5h.008v.008H18V10.5Zm-3 0h.008v.008H15V10.5Z`})}),`Drucken`]})]})}},uP=function(e,t,n){let r=Promise.resolve();function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};K(),F();var dP=[`matches`,`historyAction`],fP=[`page`],pP=[`page`,`matches`],mP=[`page`,`matches`],hP=[`onClick`,`discover`,`prefetch`,`relative`,`reloadDocument`,`replace`,`mask`,`state`,`target`,`to`,`preventScrollReset`,`viewTransition`,`defaultShouldRevalidate`],gP=[`aria-current`,`caseSensitive`,`className`,`end`,`style`,`to`,`viewTransition`,`children`],_P=[`discover`,`fetcherKey`,`navigate`,`reloadDocument`,`replace`,`state`,`method`,`action`,`onSubmit`,`relative`,`preventScrollReset`,`viewTransition`,`defaultShouldRevalidate`],vP=[`getKey`,`storageKey`],yP=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,bP=/^[\\/]{2}/;function xP(e,t){return t+e.replace(/\\/g,`/`)}var SP=`popstate`;function CP(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function wP(e={}){function t(e,t){let{pathname:n=`/`,search:r=``,hash:i=``}=jP(e.location.hash.substring(1));return!n.startsWith(`/`)&&!n.startsWith(`.`)&&(n=`/`+n),kP(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){let n=e.document.querySelector(`base`),r=``;if(n&&n.getAttribute(`href`)){let t=e.location.href,n=t.indexOf(`#`);r=n===-1?t:t.slice(0,n)}return r+`#`+(typeof t==`string`?t:AP(t))}function r(e,t){EP(e.pathname.charAt(0)===`/`,`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}return MP(t,n,r,e)}function TP(e,t){if(e===!1||e==null)throw Error(t)}function EP(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch(e){}}}function DP(){return Math.random().toString(36).substring(2,10)}function OP(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function kP(e,t,n=null,r,i){return G(G({pathname:typeof e==`string`?e:e.pathname,search:``,hash:``},typeof t==`string`?jP(t):t),{},{state:n,key:t&&t.key||r||DP(),mask:i})}function AP({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function jP(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function MP(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l==null&&(l=0,o.replaceState(G(G({},o.state),{},{idx:l}),``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=CP(e)?e:kP(h.location,e,t);n&&n(r,e),l=u()+1;let d=OP(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=CP(e)?e:kP(h.location,e,t);n&&n(r,e),l=u();let i=OP(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return NP(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(SP,d),c=e,()=>{i.removeEventListener(SP,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function NP(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),TP(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:AP(t);return i=i.replace(/ $/,`%20`),!n&&bP.test(i)&&(i=r+i),new URL(i,r)}function PP(e,t,n=`/`){return FP(e,t,n,!1)}function FP(e,t,n,r,i){let a=tF((typeof t==`string`?jP(t):t).pathname||`/`,n);if(a==null)return null;let o=i==null?LP(e):i,s=null,c=eF(a);for(let e=0;s==null&&e{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;TP(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=lF([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(TP(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),RP(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:JP(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=$P(e.relativePath,e.caseSensitive,t===u.length-1);return G(G({},e),{},{matcher:n,compiledParams:r})})})};return e.forEach((e,t)=>{var n;if(e.path===``||!((n=e.path)!=null&&n.includes(`?`)))a(e,t);else for(let n of zP(e.path))a(e,t,!0,n)}),t}function zP(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=zP(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function BP(e){e.sort((e,t)=>e.score===t.score?YP(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var VP=/^:[\w-]+$/,HP=3,UP=2,WP=1,GP=10,KP=-2,qP=e=>e===`*`;function JP(e,t){let n=e.split(`/`),r=n.length;return n.some(qP)&&(r+=KP),t&&(r+=UP),n.filter(e=>!qP(e)).reduce((e,t)=>e+(VP.test(t)?HP:t===``?WP:GP),r)}function YP(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function XP(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function $P(e,t=!1,n=!0){EP(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function eF(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return EP(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function tF(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function nF(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?jP(e):e,a;return n?(n=cF(n),a=n.startsWith(`/`)?rF(n.substring(1),`/`):rF(n,t)):a=t,{pathname:a,search:fF(r),hash:pF(i)}}function rF(e,t){let n=uF(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function iF(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function aF(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function oF(e){let t=aF(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function sF(e,t,n,r=!1){let i;typeof e==`string`?i=jP(e):(i=G({},e),TP(!i.pathname||!i.pathname.includes(`?`),iF(`?`,`pathname`,`search`,i)),TP(!i.pathname||!i.pathname.includes(`#`),iF(`#`,`pathname`,`hash`,i)),TP(!i.search||!i.search.includes(`#`),iF(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=nF(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var cF=e=>e.replace(/[\\/]{2,}/g,`/`),lF=e=>cF(e.join(`/`)),uF=e=>e.replace(/\/+$/,``),dF=e=>uF(e).replace(/^\/*/,`/`),fF=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,pF=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,mF=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function hF(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function gF(e){return lF(e.map(e=>e.route.path).filter(Boolean))||`/`}var _F=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function vF(e,t){let n=e;if(typeof n!=`string`||!yP.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(_F)try{let e=new URL(window.location.href),r=bP.test(n)?new URL(xP(n,e.protocol)):new URL(n),a=tF(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch(e){EP(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var yF=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(yF);var bF=[`GET`,...yF];new Set(bF);var xF=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function SF(e){try{return xF.includes(new URL(e).protocol)}catch(e){return!1}}var CF=_.createContext(null);CF.displayName=`DataRouter`;var wF=_.createContext(null);wF.displayName=`DataRouterState`;var TF=_.createContext(!1);function EF(){return _.useContext(TF)}var DF=_.createContext({isTransitioning:!1});DF.displayName=`ViewTransition`;var OF=_.createContext(new Map);OF.displayName=`Fetchers`;var kF=_.createContext(null);kF.displayName=`Await`;var AF=_.createContext(null);AF.displayName=`Navigation`;var jF=_.createContext(null);jF.displayName=`Location`;var MF=_.createContext({outlet:null,matches:[],isDataRoute:!1});MF.displayName=`Route`;var NF=_.createContext(null);NF.displayName=`RouteError`;var PF=`REACT_ROUTER_ERROR`,FF=`REDIRECT`,IF=`ROUTE_ERROR_RESPONSE`;function LF(e){if(e.startsWith(`${PF}:${FF}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch(e){}}function RF(e){if(e.startsWith(`${PF}:${IF}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new mF(t.status,t.statusText,t.data)}catch(e){}}function zF(e,{relative:t}={}){TP(BF(),`useHref() may be used only in the context of a component.`);let{basename:n,navigator:r}=_.useContext(AF),{hash:i,pathname:a,search:o}=qF(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:lF([n,a])),r.createHref({pathname:s,search:o,hash:i})}function BF(){return _.useContext(jF)!=null}function VF(){return TP(BF(),`useLocation() may be used only in the context of a component.`),_.useContext(jF).location}var HF=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function UF(e){_.useContext(AF).static||_.useLayoutEffect(e)}function WF(){let{isDataRoute:e}=_.useContext(MF);return e?fI():GF()}function GF(){TP(BF(),`useNavigate() may be used only in the context of a component.`);let e=_.useContext(CF),{basename:t,navigator:n}=_.useContext(AF),{matches:r}=_.useContext(MF),{pathname:i}=VF(),a=JSON.stringify(oF(r)),o=_.useRef(!1);return UF(()=>{o.current=!0}),_.useCallback((r,s={})=>{if(EP(o.current,HF),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=sF(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:lF([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}_.createContext(null);function KF(){var e;let{matches:t}=_.useContext(MF),n=t[t.length-1];return(e=n==null?void 0:n.params)==null?{}:e}function qF(e,{relative:t}={}){let{matches:n}=_.useContext(MF),{pathname:r}=VF(),i=JSON.stringify(oF(n));return _.useMemo(()=>sF(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function JF(e,t){return YF(e,t)}function YF(e,t,n){TP(BF(),`useRoutes() may be used only in the context of a component.`);let{navigator:r}=_.useContext(AF),{matches:i}=_.useContext(MF),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;mI(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant (or called \`useRoutes()\`) at "${s}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. +`]))),xj=function(e,t){var n=e.isFocused,r=e.size,i=e.theme,a=i.colors,o=i.spacing.baseUnit;return Z({label:`loadingIndicator`,display:`flex`,transition:`color 150ms`,alignSelf:`center`,fontSize:r,lineHeight:1,marginRight:r,textAlign:`center`,verticalAlign:`middle`},t?{}:{color:n?a.neutral60:a.neutral20,padding:o*2})},Sj=function(e){var t=e.delay,n=e.offset;return $(`span`,{css:Tk({animation:`${bj} 1s ease-in-out ${t}ms infinite;`,backgroundColor:`currentColor`,borderRadius:`1em`,display:`inline-block`,marginLeft:n?`1em`:void 0,height:`1em`,verticalAlign:`top`,width:`1em`},``,``)})},Cj=function(e){var t=e.innerProps,n=e.isRtl,r=e.size,i=r===void 0?4:r;return $(`div`,Q({},mA(Z(Z({},vD(e,cj)),{},{innerProps:t,isRtl:n,size:i}),`loadingIndicator`,{indicator:!0,"loading-indicator":!0}),t),$(Sj,{delay:0,offset:n}),$(Sj,{delay:160,offset:!0}),$(Sj,{delay:320,offset:!n}))},wj=function(e,t){var n=e.isDisabled,r=e.isFocused,i=e.theme,a=i.colors,o=i.borderRadius,s=i.spacing;return Z({label:`control`,alignItems:`center`,cursor:`default`,display:`flex`,flexWrap:`wrap`,justifyContent:`space-between`,minHeight:s.controlHeight,outline:`0 !important`,position:`relative`,transition:`all 100ms`},t?{}:{backgroundColor:n?a.neutral5:a.neutral0,borderColor:n?a.neutral10:r?a.primary:a.neutral20,borderRadius:o,borderStyle:`solid`,borderWidth:1,boxShadow:r?`0 0 0 1px ${a.primary}`:void 0,"&:hover":{borderColor:r?a.primary:a.neutral30}})},Tj=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,i=e.innerRef,a=e.innerProps,o=e.menuIsOpen;return $(`div`,Q({ref:i},mA(e,`control`,{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":o}),a,{"aria-disabled":n||void 0}),t)},Ej=[`data`],Dj=function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:n.baseUnit*2,paddingTop:n.baseUnit*2}},Oj=function(e){var t=e.children,n=e.cx,r=e.getStyles,i=e.getClassNames,a=e.Heading,o=e.headingProps,s=e.innerProps,c=e.label,l=e.theme,u=e.selectProps;return $(`div`,Q({},mA(e,`group`,{group:!0}),s),$(a,Q({},o,{selectProps:u,theme:l,getStyles:r,getClassNames:i,cx:n}),c),$(`div`,null,t))},kj=function(e,t){var n=e.theme,r=n.colors,i=n.spacing;return Z({label:`group`,cursor:`default`,display:`block`},t?{}:{color:r.neutral40,fontSize:`75%`,fontWeight:500,marginBottom:`0.25em`,paddingLeft:i.baseUnit*3,paddingRight:i.baseUnit*3,textTransform:`uppercase`})},Aj=function(e){var t=pA(e);t.data;var n=vD(t,Ej);return $(`div`,Q({},mA(e,`groupHeading`,{"group-heading":!0}),n))},jj=Oj,Mj=[`innerRef`,`isDisabled`,`isHidden`,`inputClassName`],Nj=function(e,t){var n=e.isDisabled,r=e.value,i=e.theme,a=i.spacing,o=i.colors;return Z(Z({visibility:n?`hidden`:`visible`,transform:r?`translateZ(0)`:``},Fj),t?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:o.neutral80})},Pj={gridArea:`1 / 2`,font:`inherit`,minWidth:`2px`,border:0,margin:0,outline:0,padding:0},Fj={flex:`1 1 auto`,display:`inline-grid`,gridArea:`1 / 1 / 2 / 3`,gridTemplateColumns:`0 min-content`,"&:after":Z({content:`attr(data-value) " "`,visibility:`hidden`,whiteSpace:`pre`},Pj)},Ij=function(e){return Z({label:`input`,color:`inherit`,background:0,opacity:+!e,width:`100%`},Pj)},Lj=function(e){var t=e.cx,n=e.value,r=pA(e),i=r.innerRef,a=r.isDisabled,o=r.isHidden,s=r.inputClassName,c=vD(r,Mj);return $(`div`,Q({},mA(e,`input`,{"input-container":!0}),{"data-value":n||``}),$(`input`,Q({className:t({input:!0},s),ref:i,style:Ij(o),disabled:a},c)))},Rj=function(e,t){var n=e.theme,r=n.spacing,i=n.borderRadius,a=n.colors;return Z({label:`multiValue`,display:`flex`,minWidth:0},t?{}:{backgroundColor:a.neutral10,borderRadius:i/2,margin:r.baseUnit/2})},zj=function(e,t){var n=e.theme,r=n.borderRadius,i=n.colors,a=e.cropWithEllipsis;return Z({overflow:`hidden`,textOverflow:a||a===void 0?`ellipsis`:void 0,whiteSpace:`nowrap`},t?{}:{borderRadius:r/2,color:i.neutral80,fontSize:`85%`,padding:3,paddingLeft:6})},Bj=function(e,t){var n=e.theme,r=n.spacing,i=n.borderRadius,a=n.colors,o=e.isFocused;return Z({alignItems:`center`,display:`flex`},t?{}:{borderRadius:i/2,backgroundColor:o?a.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Vj=function(e){var t=e.children,n=e.innerProps;return $(`div`,n,t)},Hj=Vj,Uj=Vj;function Wj(e){var t=e.children,n=e.innerProps;return $(`div`,Q({role:`button`},n),t||$(dj,{size:14}))}var Gj=function(e){var t=e.children,n=e.components,r=e.data,i=e.innerProps,a=e.isDisabled,o=e.removeProps,s=e.selectProps,c=n.Container,l=n.Label,u=n.Remove;return $(c,{data:r,innerProps:Z(Z({},mA(e,`multiValue`,{"multi-value":!0,"multi-value--is-disabled":a})),i),selectProps:s},$(l,{data:r,innerProps:Z({},mA(e,`multiValueLabel`,{"multi-value__label":!0})),selectProps:s},t),$(u,{data:r,innerProps:Z(Z({},mA(e,`multiValueRemove`,{"multi-value__remove":!0})),{},{"aria-label":`Remove ${t||`option`}`},o),selectProps:s}))},Kj=function(e,t){var n=e.isDisabled,r=e.isFocused,i=e.isSelected,a=e.theme,o=a.spacing,s=a.colors;return Z({label:`option`,cursor:`default`,display:`block`,fontSize:`inherit`,width:`100%`,userSelect:`none`,WebkitTapHighlightColor:`rgba(0, 0, 0, 0)`},t?{}:{backgroundColor:i?s.primary:r?s.primary25:`transparent`,color:n?s.neutral20:i?s.neutral0:`inherit`,padding:`${o.baseUnit*2}px ${o.baseUnit*3}px`,":active":{backgroundColor:n?void 0:i?s.primary:s.primary50}})},qj=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,i=e.isSelected,a=e.innerRef,o=e.innerProps;return $(`div`,Q({},mA(e,`option`,{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":i}),{ref:a,"aria-disabled":n},o),t)},Jj=function(e,t){var n=e.theme,r=n.spacing,i=n.colors;return Z({label:`placeholder`,gridArea:`1 / 1 / 2 / 3`},t?{}:{color:i.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},Yj=function(e){var t=e.children,n=e.innerProps;return $(`div`,Q({},mA(e,`placeholder`,{placeholder:!0}),n),t)},Xj=function(e,t){var n=e.isDisabled,r=e.theme,i=r.spacing,a=r.colors;return Z({label:`singleValue`,gridArea:`1 / 1 / 2 / 3`,maxWidth:`100%`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},t?{}:{color:n?a.neutral40:a.neutral80,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},Zj={ClearIndicator:_j,Control:Tj,DropdownIndicator:hj,DownChevron:fj,CrossIcon:dj,Group:jj,GroupHeading:Aj,IndicatorsContainer:aj,IndicatorSeparator:yj,Input:Lj,LoadingIndicator:Cj,Menu:WA,MenuList:KA,MenuPortal:$A,LoadingMessage:ZA,NoOptionsMessage:XA,MultiValue:Gj,MultiValueContainer:Hj,MultiValueLabel:Uj,MultiValueRemove:Wj,Option:qj,Placeholder:Yj,SelectContainer:tj,SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return $(`div`,Q({},mA(e,`singleValue`,{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:rj},Qj=function(e){return Z(Z({},Zj),e.components)},$j=Number.isNaN||function(e){return typeof e==`number`&&e!==e};function eM(e,t){return!!(e===t||$j(e)&&$j(t))}function tM(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?`s`:``} ${i.join(`,`)}, selected.`;case`select-option`:return a?`option ${r} is disabled. Select another option.`:`option ${r}, selected.`;default:return``}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,i=e.label,a=i===void 0?``:i,o=e.selectValue,s=e.isDisabled,c=e.isSelected,l=e.isAppleDevice,u=function(e,t){return e&&e.length?`${e.indexOf(t)+1} of ${e.length}`:``};return t===`value`&&o?`value ${a} focused, ${u(o,n)}.`:t===`menu`&&l?`${a}${`${c?` selected`:``}${s?` disabled`:``}`}, ${u(r,n)}.`:``},onFilter:function(e){var t=e.inputValue;return`${e.resultsMessage}${t?` for search term `+t:``}.`}},oM=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,i=e.focusableOptions,a=e.isFocused,o=e.selectValue,s=e.selectProps,c=e.id,l=e.isAppleDevice,u=s.ariaLiveMessages,d=s.getOptionLabel,f=s.inputValue,p=s.isMulti,m=s.isOptionDisabled,h=s.isSearchable,g=s.menuIsOpen,v=s.options,y=s.screenReaderStatus,b=s.tabSelectsValue,x=s.isLoading,S=s[`aria-label`],C=s[`aria-live`],w=(0,_.useMemo)(function(){return Z(Z({},aM),u||{})},[u]),T=(0,_.useMemo)(function(){var e=``;if(t&&w.onChange){var n=t.option,r=t.options,i=t.removedValue,a=t.removedValues,s=t.value,c=i||n||function(e){return Array.isArray(e)?null:e}(s),l=c?d(c):``,u=r||a||void 0,f=u?u.map(d):[],p=Z({isDisabled:c&&m(c,o),label:l,labels:f},t);e=w.onChange(p)}return e},[t,w,m,o,d]),E=(0,_.useMemo)(function(){var e=``,t=n||r,a=!!(n&&o&&o.includes(n));if(t&&w.onFocus){var s={focused:t,label:d(t),isDisabled:m(t,o),isSelected:a,options:i,context:t===n?`menu`:`value`,selectValue:o,isAppleDevice:l};e=w.onFocus(s)}return e},[n,r,d,m,w,i,o,l]),D=(0,_.useMemo)(function(){var e=``;if(g&&v.length&&!x&&w.onFilter){var t=y({count:i.length});e=w.onFilter({inputValue:f,resultsMessage:t})}return e},[i,f,g,w,v,y,x]),O=(t==null?void 0:t.action)===`initial-input-focus`,k=(0,_.useMemo)(function(){var e=``;if(w.guidance){var t=r?`value`:g?`menu`:`input`;e=w.guidance({"aria-label":S,context:t,isDisabled:n&&m(n,o),isMulti:p,isSearchable:h,tabSelectsValue:b,isInitialFocus:O})}return e},[S,n,r,p,m,h,g,w,o,b,O]),A=$(_.Fragment,null,$(`span`,{id:`aria-selection`},T),$(`span`,{id:`aria-focused`},E),$(`span`,{id:`aria-results`},D),$(`span`,{id:`aria-guidance`},k));return $(_.Fragment,null,$(iM,{id:c},O&&A),$(iM,{"aria-live":C,"aria-atomic":`false`,"aria-relevant":`additions text`,role:`log`},a&&!O&&A))},sM=[{base:`A`,letters:`AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ`},{base:`AA`,letters:`Ꜳ`},{base:`AE`,letters:`ÆǼǢ`},{base:`AO`,letters:`Ꜵ`},{base:`AU`,letters:`Ꜷ`},{base:`AV`,letters:`ꜸꜺ`},{base:`AY`,letters:`Ꜽ`},{base:`B`,letters:`BⒷBḂḄḆɃƂƁ`},{base:`C`,letters:`CⒸCĆĈĊČÇḈƇȻꜾ`},{base:`D`,letters:`DⒹDḊĎḌḐḒḎĐƋƊƉꝹ`},{base:`DZ`,letters:`DZDŽ`},{base:`Dz`,letters:`DzDž`},{base:`E`,letters:`EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ`},{base:`F`,letters:`FⒻFḞƑꝻ`},{base:`G`,letters:`GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ`},{base:`H`,letters:`HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ`},{base:`I`,letters:`IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ`},{base:`J`,letters:`JⒿJĴɈ`},{base:`K`,letters:`KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ`},{base:`L`,letters:`LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ`},{base:`LJ`,letters:`LJ`},{base:`Lj`,letters:`Lj`},{base:`M`,letters:`MⓂMḾṀṂⱮƜ`},{base:`N`,letters:`NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ`},{base:`NJ`,letters:`NJ`},{base:`Nj`,letters:`Nj`},{base:`O`,letters:`OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ`},{base:`OI`,letters:`Ƣ`},{base:`OO`,letters:`Ꝏ`},{base:`OU`,letters:`Ȣ`},{base:`P`,letters:`PⓅPṔṖƤⱣꝐꝒꝔ`},{base:`Q`,letters:`QⓆQꝖꝘɊ`},{base:`R`,letters:`RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ`},{base:`S`,letters:`SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ`},{base:`T`,letters:`TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ`},{base:`TZ`,letters:`Ꜩ`},{base:`U`,letters:`UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ`},{base:`V`,letters:`VⓋVṼṾƲꝞɅ`},{base:`VY`,letters:`Ꝡ`},{base:`W`,letters:`WⓌWẀẂŴẆẄẈⱲ`},{base:`X`,letters:`XⓍXẊẌ`},{base:`Y`,letters:`YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ`},{base:`Z`,letters:`ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ`},{base:`a`,letters:`aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ`},{base:`aa`,letters:`ꜳ`},{base:`ae`,letters:`æǽǣ`},{base:`ao`,letters:`ꜵ`},{base:`au`,letters:`ꜷ`},{base:`av`,letters:`ꜹꜻ`},{base:`ay`,letters:`ꜽ`},{base:`b`,letters:`bⓑbḃḅḇƀƃɓ`},{base:`c`,letters:`cⓒcćĉċčçḉƈȼꜿↄ`},{base:`d`,letters:`dⓓdḋďḍḑḓḏđƌɖɗꝺ`},{base:`dz`,letters:`dzdž`},{base:`e`,letters:`eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ`},{base:`f`,letters:`fⓕfḟƒꝼ`},{base:`g`,letters:`gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ`},{base:`h`,letters:`hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ`},{base:`hv`,letters:`ƕ`},{base:`i`,letters:`iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı`},{base:`j`,letters:`jⓙjĵǰɉ`},{base:`k`,letters:`kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ`},{base:`l`,letters:`lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ`},{base:`lj`,letters:`lj`},{base:`m`,letters:`mⓜmḿṁṃɱɯ`},{base:`n`,letters:`nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ`},{base:`nj`,letters:`nj`},{base:`o`,letters:`oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ`},{base:`oi`,letters:`ƣ`},{base:`ou`,letters:`ȣ`},{base:`oo`,letters:`ꝏ`},{base:`p`,letters:`pⓟpṕṗƥᵽꝑꝓꝕ`},{base:`q`,letters:`qⓠqɋꝗꝙ`},{base:`r`,letters:`rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ`},{base:`s`,letters:`sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ`},{base:`t`,letters:`tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ`},{base:`tz`,letters:`ꜩ`},{base:`u`,letters:`uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ`},{base:`v`,letters:`vⓥvṽṿʋꝟʌ`},{base:`vy`,letters:`ꝡ`},{base:`w`,letters:`wⓦwẁẃŵẇẅẘẉⱳ`},{base:`x`,letters:`xⓧxẋẍ`},{base:`y`,letters:`yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ`},{base:`z`,letters:`zⓩzźẑżžẓẕƶȥɀⱬꝣ`}],cM=RegExp(`[`+sM.map(function(e){return e.letters}).join(``)+`]`,`g`),lM={},uM=0;uM-1}},vM=[`innerRef`];function yM(e){var t=e.innerRef,n=FA(vD(e,vM),`onExited`,`in`,`enter`,`exit`,`appear`);return $(`input`,Q({ref:t},n,{css:Tk({label:`dummyInput`,background:0,border:0,caretColor:`transparent`,fontSize:`inherit`,gridArea:`1 / 1 / 2 / 3`,outline:0,padding:0,width:1,color:`transparent`,left:-100,opacity:0,position:`relative`,transform:`scale(.01)`},``,``)}))}var bM=function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()};function xM(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,a=e.onTopLeave,o=(0,_.useRef)(!1),s=(0,_.useRef)(!1),c=(0,_.useRef)(0),l=(0,_.useRef)(null),u=(0,_.useCallback)(function(e,t){if(l.current!==null){var c=l.current,u=c.scrollTop,d=c.scrollHeight,f=c.clientHeight,p=l.current,m=t>0,h=d-f-u,g=!1;h>t&&o.current&&(r&&r(e),o.current=!1),m&&s.current&&(a&&a(e),s.current=!1),m&&t>h?(n&&!o.current&&n(e),p.scrollTop=d,g=!0,o.current=!0):!m&&-t>u&&(i&&!s.current&&i(e),p.scrollTop=0,g=!0,s.current=!0),g&&bM(e)}},[n,r,i,a]),d=(0,_.useCallback)(function(e){u(e,e.deltaY)},[u]),f=(0,_.useCallback)(function(e){c.current=e.changedTouches[0].clientY},[]),p=(0,_.useCallback)(function(e){u(e,c.current-e.changedTouches[0].clientY)},[u]),m=(0,_.useCallback)(function(e){if(e){var t=kA?{passive:!1}:!1;e.addEventListener(`wheel`,d,t),e.addEventListener(`touchstart`,f,t),e.addEventListener(`touchmove`,p,t)}},[p,f,d]),h=(0,_.useCallback)(function(e){e&&(e.removeEventListener(`wheel`,d,!1),e.removeEventListener(`touchstart`,f,!1),e.removeEventListener(`touchmove`,p,!1))},[p,f,d]);return(0,_.useEffect)(function(){if(t){var e=l.current;return m(e),function(){h(e)}}},[t,m,h]),function(e){l.current=e}}var SM=[`boxSizing`,`height`,`overflow`,`paddingRight`,`position`],CM={boxSizing:`border-box`,overflow:`hidden`,position:`relative`,height:`100%`};function wM(e){e.cancelable&&e.preventDefault()}function TM(e){e.stopPropagation()}function EM(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function DM(){return`ontouchstart`in window||navigator.maxTouchPoints}var OM=!!(typeof window<`u`&&window.document&&window.document.createElement),kM=0,AM={capture:!1,passive:!1};function jM(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=(0,_.useRef)({}),a=(0,_.useRef)(null),o=(0,_.useCallback)(function(e){if(OM){var t=document.body,n=t&&t.style;if(r&&SM.forEach(function(e){var t=n&&n[e];i.current[e]=t}),r&&kM<1){var a=parseInt(i.current.paddingRight,10)||0,o=document.body?document.body.clientWidth:0,s=window.innerWidth-o+a||0;Object.keys(CM).forEach(function(e){var t=CM[e];n&&(n[e]=t)}),n&&(n.paddingRight=`${s}px`)}t&&DM()&&(t.addEventListener(`touchmove`,wM,AM),e&&(e.addEventListener(`touchstart`,EM,AM),e.addEventListener(`touchmove`,TM,AM))),kM+=1}},[r]),s=(0,_.useCallback)(function(e){if(OM){var t=document.body,n=t&&t.style;kM=Math.max(kM-1,0),r&&kM<1&&SM.forEach(function(e){var t=i.current[e];n&&(n[e]=t)}),t&&DM()&&(t.removeEventListener(`touchmove`,wM,AM),e&&(e.removeEventListener(`touchstart`,EM,AM),e.removeEventListener(`touchmove`,TM,AM)))}},[r]);return(0,_.useEffect)(function(){if(t){var e=a.current;return o(e),function(){s(e)}}},[t,o,s]),function(e){a.current=e}}var MM=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},NM={name:`1kfdb0e`,styles:`position:fixed;left:0;bottom:0;right:0;top:0`};function PM(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,a=e.onBottomArrive,o=e.onBottomLeave,s=e.onTopArrive,c=e.onTopLeave,l=xM({isEnabled:i,onBottomArrive:a,onBottomLeave:o,onTopArrive:s,onTopLeave:c}),u=jM({isEnabled:n});return $(_.Fragment,null,n&&$(`div`,{onClick:MM,css:NM}),t(function(e){l(e),u(e)}))}var FM={name:`1a0ro4n-requiredInput`,styles:`label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%`},IM=function(e){var t=e.name,n=e.onFocus;return $(`input`,{required:!0,name:t,tabIndex:-1,"aria-hidden":`true`,onFocus:n,css:FM,value:``,onChange:function(){}})};function LM(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 RM(){return LM(/^iPhone/i)}function zM(){return LM(/^Mac/i)}function BM(){return LM(/^iPad/i)||zM()&&navigator.maxTouchPoints>1}function VM(){return RM()||BM()}function HM(){return zM()||VM()}var UM=function(e){return e.label},WM=function(e){return e.label},GM=function(e){return e.value},KM=function(e){return!!e.isDisabled},qM={clearIndicator:gj,container:ej,control:wj,dropdownIndicator:mj,group:Dj,groupHeading:kj,indicatorsContainer:ij,indicatorSeparator:vj,input:Nj,loadingIndicator:xj,loadingMessage:YA,menu:VA,menuList:GA,menuPortal:QA,multiValue:Rj,multiValueLabel:zj,multiValueRemove:Bj,noOptionsMessage:JA,option:Kj,placeholder:Jj,singleValue:Xj,valueContainer:nj},JM={primary:`#2684FF`,primary75:`#4C9AFF`,primary50:`#B2D4FF`,primary25:`#DEEBFF`,danger:`#DE350B`,dangerLight:`#FFBDAD`,neutral0:`hsl(0, 0%, 100%)`,neutral5:`hsl(0, 0%, 95%)`,neutral10:`hsl(0, 0%, 90%)`,neutral20:`hsl(0, 0%, 80%)`,neutral30:`hsl(0, 0%, 70%)`,neutral40:`hsl(0, 0%, 60%)`,neutral50:`hsl(0, 0%, 50%)`,neutral60:`hsl(0, 0%, 40%)`,neutral70:`hsl(0, 0%, 30%)`,neutral80:`hsl(0, 0%, 20%)`,neutral90:`hsl(0, 0%, 10%)`},YM=4,XM=4,ZM={borderRadius:YM,colors:JM,spacing:{baseUnit:XM,controlHeight:38,menuGutter:XM*2}},QM={"aria-live":`polite`,backspaceRemovesValue:!0,blurInputOnSelect:wA(),captureMenuScroll:!wA(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:_M(),formatGroupLabel:UM,getOptionLabel:WM,getOptionValue:GM,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:KM,loadingMessage:function(){return`Loading...`},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:`bottom`,menuPosition:`absolute`,menuShouldBlockScroll:!1,menuShouldScrollIntoView:!TA(),noOptionsMessage:function(){return`No options`},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:`Select...`,screenReaderStatus:function(e){var t=e.count;return`${t} result${t===1?``:`s`} available`},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function $M(e,t,n,r){return{type:`option`,data:t,isDisabled:uN(e,t,n),isSelected:dN(e,t,n),label:cN(e,t),value:lN(e,t),index:r}}function eN(e,t){return e.options.map(function(n,r){if(`options`in n){var i=n.options.map(function(n,r){return $M(e,n,t,r)}).filter(function(t){return iN(e,t)});return i.length>0?{type:`group`,data:n,options:i,index:r}:void 0}var a=$M(e,n,t,r);return iN(e,a)?a:void 0}).filter(AA)}function tN(e){return e.reduce(function(e,t){return t.type===`group`?e.push.apply(e,PD(t.options.map(function(e){return e.data}))):e.push(t.data),e},[])}function nN(e,t){return e.reduce(function(e,n){return n.type===`group`?e.push.apply(e,PD(n.options.map(function(e){return{data:e.data,id:`${t}-${n.index}-${e.index}`}}))):e.push({data:n.data,id:`${t}-${n.index}`}),e},[])}function rN(e,t){return tN(eN(e,t))}function iN(e,t){var n=e.inputValue,r=n===void 0?``:n,i=t.data,a=t.isSelected,o=t.label,s=t.value;return(!pN(e)||!a)&&fN(e,{label:o,value:s,data:i},r)}function aN(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r-1?n:t[0]}var sN=function(e,t){var n;return((n=e.find(function(e){return e.data===t}))==null?void 0:n.id)||null},cN=function(e,t){return e.getOptionLabel(t)},lN=function(e,t){return e.getOptionValue(t)};function uN(e,t,n){return typeof e.isOptionDisabled==`function`?e.isOptionDisabled(t,n):!1}function dN(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected==`function`)return e.isOptionSelected(t,n);var r=lN(e,t);return n.some(function(t){return lN(e,t)===r})}function fN(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var pN=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return t===void 0?n:t},mN=1,hN=function(e){TD(n,e);var t=AD(n);function n(e){var r;if(xD(this,n),r=t.call(this,e),r.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:``,isAppleDevice:!1},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,i=n.onChange;t.name=n.name,r.ariaOnChange(e,t),i(e,t)},r.setValue=function(e,t,n){var i=r.props,a=i.closeMenuOnSelect,o=i.isMulti,s=i.inputValue;r.onInputChange(``,{action:`set-value`,prevInputValue:s}),a&&(r.setState({inputIsHiddenAfterUpdate:!o}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,i=t.isMulti,a=t.name,o=r.state.selectValue,s=i&&r.isOptionSelected(e,o),c=r.isOptionDisabled(e,o);if(s){var l=r.getOptionValue(e);r.setValue(PA(o.filter(function(e){return r.getOptionValue(e)!==l})),`deselect-option`,e)}else if(!c)i?r.setValue(PA([].concat(PD(o),[e])),`select-option`,e):r.setValue(NA(e),`select-option`);else{r.ariaOnChange(NA(e),{action:`select-option`,option:e,name:a});return}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,i=r.getOptionValue(e),a=n.filter(function(e){return r.getOptionValue(e)!==i}),o=MA(t,a,a[0]||null);r.onChange(o,{action:`remove-value`,removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(MA(r.props.isMulti,[],null),{action:`clear`,removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],i=t.slice(0,t.length-1),a=MA(e,i,i[0]||null);n&&r.onChange(a,{action:`pop-value`,removedValue:n})},r.getFocusedOptionId=function(e){return sN(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return nN(eN(r.props,r.state.selectValue),r.getElementId(`option`))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=Array(e),n=0;no||a>o}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:`input-change`,prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu(`first`),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;if(r.menuListRef&&r.menuListRef.contains(document.activeElement)){r.inputRef.focus();return}r.props.onBlur&&r.props.onBlur(e),r.onInputChange(``,{action:`input-blur`,prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1})},r.onOptionHover=function(e){if(!(r.blockOptionHover||r.state.focusedOption===e)){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return pN(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,i=t.backspaceRemovesValue,a=t.escapeClearsValue,o=t.inputValue,s=t.isClearable,c=t.isDisabled,l=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,f=t.openMenuOnFocus,p=r.state,m=p.focusedOption,h=p.focusedValue,g=p.selectValue;if(!c&&!(typeof u==`function`&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case`ArrowLeft`:if(!n||o)return;r.focusValue(`previous`);break;case`ArrowRight`:if(!n||o)return;r.focusValue(`next`);break;case`Delete`:case`Backspace`:if(o)return;if(h)r.removeValue(h);else{if(!i)return;n?r.popValue():s&&r.clearValue()}break;case`Tab`:if(r.isComposing||e.shiftKey||!l||!d||!m||f&&r.isOptionSelected(m,g))return;r.selectOption(m);break;case`Enter`:if(e.keyCode===229)break;if(l){if(!m||r.isComposing)return;r.selectOption(m);break}return;case`Escape`:l?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(``,{action:`menu-close`,prevInputValue:o}),r.onMenuClose()):s&&a&&r.clearValue();break;case` `:if(o)return;if(!l){r.openMenu(`first`);break}if(!m)return;r.selectOption(m);break;case`ArrowUp`:l?r.focusOption(`up`):r.openMenu(`last`);break;case`ArrowDown`:l?r.focusOption(`down`):r.openMenu(`first`);break;case`PageUp`:if(!l)return;r.focusOption(`pageup`);break;case`PageDown`:if(!l)return;r.focusOption(`pagedown`);break;case`Home`:if(!l)return;r.focusOption(`first`);break;case`End`:if(!l)return;r.focusOption(`last`);break;default:return}e.preventDefault()}},r.state.instancePrefix=`react-select-`+(r.props.instanceId||++mN),r.state.selectValue=fA(e.value),e.menuIsOpen&&r.state.selectValue.length){var i=r.getFocusableOptionsWithIds(),a=r.buildFocusableOptions(),o=a.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=i,r.state.focusedOption=a[o],r.state.focusedOptionId=sN(i,a[o])}return r}return CD(n,[{key:`componentDidMount`,value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener(`scroll`,this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&SA(this.menuListRef,this.focusedOptionRef),HM()&&this.setState({isAppleDevice:!0})}},{key:`componentDidUpdate`,value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,i=this.state.isFocused;(i&&!n&&e.isDisabled||i&&r&&!e.menuIsOpen)&&this.focusInput(),i&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!i&&!n&&e.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(SA(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:`componentWillUnmount`,value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener(`scroll`,this.onScroll,!0)}},{key:`onMenuOpen`,value:function(){this.props.onMenuOpen()}},{key:`onMenuClose`,value:function(){this.onInputChange(``,{action:`menu-close`,prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:`onInputChange`,value:function(e,t){this.props.onInputChange(e,t)}},{key:`focusInput`,value:function(){this.inputRef&&this.inputRef.focus()}},{key:`blurInput`,value:function(){this.inputRef&&this.inputRef.blur()}},{key:`openMenu`,value:function(e){var t=this,n=this.state,r=n.selectValue,i=n.isFocused,a=this.buildFocusableOptions(),o=e===`first`?0:a.length-1;if(!this.props.isMulti){var s=a.indexOf(r[0]);s>-1&&(o=s)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:a[o],focusedOptionId:this.getFocusedOptionId(a[o])},function(){return t.onMenuOpen()})}},{key:`focusValue`,value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var i=n.indexOf(r);r||(i=-1);var a=n.length-1,o=-1;if(n.length){switch(e){case`previous`:o=i===0?0:i===-1?a:i-1;break;case`next`:i>-1&&i0&&arguments[0]!==void 0?arguments[0]:`first`,t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var i=0,a=r.indexOf(n);n||(a=-1),e===`up`?i=a>0?a-1:r.length-1:e===`down`?i=(a+1)%r.length:e===`pageup`?(i=a-t,i<0&&(i=0)):e===`pagedown`?(i=a+t,i>r.length-1&&(i=r.length-1)):e===`last`&&(i=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[i],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[i])})}}},{key:`getTheme`,value:function(){return this.props.theme?typeof this.props.theme==`function`?this.props.theme(ZM):Z(Z({},ZM),this.props.theme):ZM}},{key:`getCommonProps`,value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,i=this.getValue,a=this.selectOption,o=this.setValue,s=this.props,c=s.isMulti,l=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:i,hasValue:this.hasValue(),isMulti:c,isRtl:l,options:u,selectOption:a,selectProps:s,setValue:o,theme:this.getTheme()}}},{key:`hasValue`,value:function(){return this.state.selectValue.length>0}},{key:`hasOptions`,value:function(){return!!this.getFocusableOptions().length}},{key:`isClearable`,value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return t===void 0?n:t}},{key:`isOptionDisabled`,value:function(e,t){return uN(this.props,e,t)}},{key:`isOptionSelected`,value:function(e,t){return dN(this.props,e,t)}},{key:`filterOption`,value:function(e,t){return fN(this.props,e,t)}},{key:`formatOptionLabel`,value:function(e,t){if(typeof this.props.formatOptionLabel==`function`){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}else return this.getOptionLabel(e)}},{key:`formatGroupLabel`,value:function(e){return this.props.formatGroupLabel(e)}},{key:`startListeningComposition`,value:function(){document&&document.addEventListener&&(document.addEventListener(`compositionstart`,this.onCompositionStart,!1),document.addEventListener(`compositionend`,this.onCompositionEnd,!1))}},{key:`stopListeningComposition`,value:function(){document&&document.removeEventListener&&(document.removeEventListener(`compositionstart`,this.onCompositionStart),document.removeEventListener(`compositionend`,this.onCompositionEnd))}},{key:`startListeningToTouch`,value:function(){document&&document.addEventListener&&(document.addEventListener(`touchstart`,this.onTouchStart,!1),document.addEventListener(`touchmove`,this.onTouchMove,!1),document.addEventListener(`touchend`,this.onTouchEnd,!1))}},{key:`stopListeningToTouch`,value:function(){document&&document.removeEventListener&&(document.removeEventListener(`touchstart`,this.onTouchStart),document.removeEventListener(`touchmove`,this.onTouchMove),document.removeEventListener(`touchend`,this.onTouchEnd))}},{key:`renderInput`,value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,i=e.inputValue,a=e.tabIndex,o=e.form,s=e.menuIsOpen,c=e.required,l=this.getComponents().Input,u=this.state,d=u.inputIsHidden,f=u.ariaSelection,p=this.commonProps,m=r||this.getElementId(`input`),h=Z(Z(Z({"aria-autocomplete":`list`,"aria-expanded":s,"aria-haspopup":!0,"aria-errormessage":this.props[`aria-errormessage`],"aria-invalid":this.props[`aria-invalid`],"aria-label":this.props[`aria-label`],"aria-labelledby":this.props[`aria-labelledby`],"aria-required":c,role:`combobox`,"aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||``},s&&{"aria-controls":this.getElementId(`listbox`)}),!n&&{"aria-readonly":!0}),this.hasValue()?(f==null?void 0:f.action)===`initial-input-focus`&&{"aria-describedby":this.getElementId(`live-region`)}:{"aria-describedby":this.getElementId(`placeholder`)});return n?_.createElement(l,Q({},p,{autoCapitalize:`none`,autoComplete:`off`,autoCorrect:`off`,id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:d,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:`false`,tabIndex:a,form:o,type:`text`,value:i},h)):_.createElement(yM,Q({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:lA,onFocus:this.onInputFocus,disabled:t,tabIndex:a,inputMode:`none`,form:o,value:``},h))}},{key:`renderPlaceholderOrValue`,value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,a=t.MultiValueRemove,o=t.SingleValue,s=t.Placeholder,c=this.commonProps,l=this.props,u=l.controlShouldRenderValue,d=l.isDisabled,f=l.isMulti,p=l.inputValue,m=l.placeholder,h=this.state,g=h.selectValue,v=h.focusedValue,y=h.isFocused;if(!this.hasValue()||!u)return p?null:_.createElement(s,Q({},c,{key:`placeholder`,isDisabled:d,isFocused:y,innerProps:{id:this.getElementId(`placeholder`)}}),m);if(f)return g.map(function(t,o){var s=t===v,l=`${e.getOptionLabel(t)}-${e.getOptionValue(t)}`;return _.createElement(n,Q({},c,{components:{Container:r,Label:i,Remove:a},isFocused:s,isDisabled:d,key:l,index:o,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,`value`))});if(p)return null;var b=g[0];return _.createElement(o,Q({},c,{data:b,isDisabled:d}),this.formatOptionLabel(b,`value`))}},{key:`renderClearIndicator`,value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var o={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":`true`};return _.createElement(e,Q({},t,{innerProps:o,isFocused:a}))}},{key:`renderLoadingIndicator`,value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,a=this.state.isFocused;return!e||!i?null:_.createElement(e,Q({},t,{innerProps:{"aria-hidden":`true`},isDisabled:r,isFocused:a}))}},{key:`renderIndicatorSeparator`,value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return _.createElement(n,Q({},r,{isDisabled:i,isFocused:a}))}},{key:`renderDropdownIndicator`,value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":`true`};return _.createElement(e,Q({},t,{innerProps:i,isDisabled:n,isFocused:r}))}},{key:`renderMenu`,value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,i=t.Menu,a=t.MenuList,o=t.MenuPortal,s=t.LoadingMessage,c=t.NoOptionsMessage,l=t.Option,u=this.commonProps,d=this.state.focusedOption,f=this.props,p=f.captureMenuScroll,m=f.inputValue,h=f.isLoading,g=f.loadingMessage,v=f.minMenuHeight,y=f.maxMenuHeight,b=f.menuIsOpen,x=f.menuPlacement,S=f.menuPosition,C=f.menuPortalTarget,w=f.menuShouldBlockScroll,T=f.menuShouldScrollIntoView,E=f.noOptionsMessage,D=f.onMenuScrollToTop,O=f.onMenuScrollToBottom;if(!b)return null;var k=function(t,n){var r=t.type,i=t.data,a=t.isDisabled,o=t.isSelected,s=t.label,c=t.value,f=d===i,p=a?void 0:function(){return e.onOptionHover(i)},m=a?void 0:function(){return e.selectOption(i)},h=`${e.getElementId(`option`)}-${n}`,g={id:h,onClick:m,onMouseMove:p,onMouseOver:p,tabIndex:-1,role:`option`,"aria-selected":e.state.isAppleDevice?void 0:o};return _.createElement(l,Q({},u,{innerProps:g,data:i,isDisabled:a,isSelected:o,key:h,label:s,type:r,value:c,isFocused:f,innerRef:f?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,`menu`))},A;if(this.hasOptions())A=this.getCategorizedOptions().map(function(t){if(t.type===`group`){var i=t.data,a=t.options,o=t.index,s=`${e.getElementId(`group`)}-${o}`,c=`${s}-heading`;return _.createElement(n,Q({},u,{key:s,data:i,options:a,Heading:r,headingProps:{id:c,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return k(e,`${o}-${e.index}`)}))}else if(t.type===`option`)return k(t,`${t.index}`)});else if(h){var j=g({inputValue:m});if(j===null)return null;A=_.createElement(s,u,j)}else{var M=E({inputValue:m});if(M===null)return null;A=_.createElement(c,u,M)}var N={minMenuHeight:v,maxMenuHeight:y,menuPlacement:x,menuPosition:S,menuShouldScrollIntoView:T},P=_.createElement(UA,Q({},u,N),function(t){var n=t.ref,r=t.placerProps,o=r.placement,s=r.maxHeight;return _.createElement(i,Q({},u,N,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:h,placement:o}),_.createElement(PM,{captureEnabled:p,onTopArrive:D,onBottomArrive:O,lockEnabled:w},function(t){return _.createElement(a,Q({},u,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:`listbox`,"aria-multiselectable":u.isMulti,id:e.getElementId(`listbox`)},isLoading:h,maxHeight:s,focusedOption:d}),A)}))});return C||S===`fixed`?_.createElement(o,Q({},u,{appendTo:C,controlElement:this.controlRef,menuPlacement:x,menuPosition:S}),P):P}},{key:`renderFormField`,value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,a=t.name,o=t.required,s=this.state.selectValue;if(o&&!this.hasValue()&&!r)return _.createElement(IM,{name:a,onFocus:this.onValueInputFocus});if(!(!a||r))if(i)if(n){var c=s.map(function(t){return e.getOptionValue(t)}).join(n);return _.createElement(`input`,{name:a,type:`hidden`,value:c})}else{var l=s.length>0?s.map(function(t,n){return _.createElement(`input`,{key:`i-${n}`,name:a,type:`hidden`,value:e.getOptionValue(t)})}):_.createElement(`input`,{name:a,type:`hidden`,value:``});return _.createElement(`div`,null,l)}else{var u=s[0]?this.getOptionValue(s[0]):``;return _.createElement(`input`,{name:a,type:`hidden`,value:u})}}},{key:`renderLiveRegion`,value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,a=t.isFocused,o=t.selectValue,s=this.getFocusableOptions();return _.createElement(oM,Q({},e,{id:this.getElementId(`live-region`),ariaSelection:n,focusedOption:r,focusedValue:i,isFocused:a,selectValue:o,focusableOptions:s,isAppleDevice:this.state.isAppleDevice}))}},{key:`render`,value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,a=this.props,o=a.className,s=a.id,c=a.isDisabled,l=a.menuIsOpen,u=this.state.isFocused,d=this.commonProps=this.getCommonProps();return _.createElement(r,Q({},d,{className:o,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:u}),this.renderLiveRegion(),_.createElement(t,Q({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:u,menuIsOpen:l}),_.createElement(i,Q({},d,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),_.createElement(n,Q({},d,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:`getDerivedStateFromProps`,value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,i=t.inputIsHiddenAfterUpdate,a=t.ariaSelection,o=t.isFocused,s=t.prevWasFocused,c=t.instancePrefix,l=e.options,u=e.value,d=e.menuIsOpen,f=e.inputValue,p=e.isMulti,m=fA(u),h={};if(n&&(u!==n.value||l!==n.options||d!==n.menuIsOpen||f!==n.inputValue)){var g=d?rN(e,m):[],_=d?nN(eN(e,m),`${c}-option`):[],v=r?aN(t,m):null,y=oN(t,g);h={selectValue:m,focusedOption:y,focusedOptionId:sN(_,y),focusableOptionsWithIds:_,focusedValue:v,clearFocusValueOnUpdate:!1}}var b=i!=null&&e!==n?{inputIsHidden:i,inputIsHiddenAfterUpdate:void 0}:{},x=a,S=o&&s;return o&&!S&&(x={value:MA(p,m,m[0]||null),options:m,action:`initial-input-focus`},S=!s),(a==null?void 0:a.action)===`initial-input-focus`&&(x=null),Z(Z(Z({},h),b),{},{prevProps:e,ariaSelection:x,prevWasFocused:S})}}]),n}(_.Component);hN.defaultProps=QM;var gN=(0,_.forwardRef)(function(e,t){var n=bD(e);return _.createElement(hN,Q({ref:t},n))}),_N=u(s((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(){for(var e=[],t=0;t{let t=(0,_.useRef)(vN);return t.current===vN&&(t.current=e()),t};function bN(){var e=(0,_.useRef)(!1);return(0,_.useEffect)(function(){return e.current=!0,function(){e.current=!1}},[]),e}var xN=function(e){var t=_.useRef(e);return sA(function(){t.current=e}),t};function SN(e){return{isOk:()=>!0,isOkAnd:t=>t(e),isErr:()=>!1,isErrAnd:()=>!1,ok:()=>TN(e),err:()=>wN(),map:t=>SN(t(e)),mapOr:(t,n)=>n(e),mapOrElse:(t,n)=>n(e),mapErr:()=>SN(e),expect:()=>e,expectErr:e=>{throw Error(e)},unwrap:()=>e,unwrapErr:()=>{throw Error(`${e}`)},unwrapOr:()=>e,unwrapOrElse:()=>e,and:e=>e,andThen:t=>t(e),or:()=>SN(e),orElse:()=>SN(e)}}function CN(e){return{isOk:()=>!1,isOkAnd:()=>!1,isErr:()=>!0,isErrAnd:t=>t(e),ok:()=>wN(),err:()=>TN(e),map:()=>CN(e),mapOr:e=>e,mapOrElse:t=>t(e),mapErr:t=>CN(t(e)),expect:e=>{throw Error(e)},expectErr:()=>e,unwrap:()=>{throw Error(`${e}`)},unwrapErr:()=>e,unwrapOr:e=>e,unwrapOrElse:t=>t(e),and:()=>CN(e),andThen:()=>CN(e),or:e=>e,orElse:t=>t(e)}}function wN(){let e={and:()=>wN(),andThen:()=>wN(),expect:e=>{throw Error(e)},filter:()=>e,isSome:()=>!1,isSomeAnd:()=>!1,isNone:()=>!0,map:()=>wN(),mapOr:e=>e,mapOrElse:e=>e(),okOr:e=>CN(e),okOrElse:e=>CN(e()),or:e=>e,orElse:e=>e(),unwrap:()=>{throw Error("panic! call `unwrap` on a `None` value")},unwrapOr:e=>e,unwrapOrElse:e=>e(),xor:t=>t.isSome()?t:e};return e}function TN(e){let t={and:e=>e,andThen:t=>t(e),expect:()=>e,filter:n=>n(e)?t:wN(),isSome:()=>!0,isSomeAnd:t=>t(e),isNone:()=>!1,map:t=>TN(t(e)),mapOr:(t,n)=>n(e),mapOrElse:(t,n)=>n(e),okOr:()=>SN(e),okOrElse:()=>SN(e),or:()=>t,orElse:()=>t,unwrap:()=>e,unwrapOr:()=>e,unwrapOrElse:()=>e,xor:e=>e.isNone()?t:wN()};return t}function EN(e){return e.then(e=>SN(e),e=>CN(e))}var DN=setTimeout;function ON(e,t){var n=t.useCachedSetTimeout?DN:setTimeout;return new Promise((function(t){n(t,e)}))}function kN(e){var t=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).useCachedSetTimeout,n=ON(e,{useCachedSetTimeout:t});function r(e){return n.then((function(){return e}))}return r.then=function(){return n.then.apply(n,arguments)},r.catch=Promise.resolve().catch,r}K(),Nn(),F();var AN=[`components`,`selectRef`,`isLoading`,`cacheUniqs`,`menuPlacement`,`menuShouldScrollIntoView`],jN=300;function MN(e){function t(t){let{selectProps:n,innerRef:r}=t,{handleScrolledToBottom:i,shouldLoadMore:a}=n,o=(0,_.useRef)(null),s=(0,_.useRef)(null),c=(0,_.useCallback)(()=>{let e=s.current;if(!e)return!1;let{scrollTop:t,scrollHeight:n,clientHeight:r}=e;return a(n,r,t)},[a]),l=(0,_.useCallback)(()=>{c()&&i&&i()},[c,i]),u=(0,_.useMemo)(()=>{let e=()=>{l(),o.current=setTimeout(e,jN)};return e},[l]);return(0,_.useEffect)(()=>(u(),()=>{o.current&&clearTimeout(o.current)}),[]),(0,v.jsx)(e,G(G({},t),{},{innerRef:(0,_N.default)(r,s)}))}return t}var NN=MN(Zj.MenuList),PN=e=>(0,_.useMemo)(()=>G({MenuList:NN},e),[e]),FN=(e,t)=>[...e,...t],IN=10,LN=(e,t,n)=>e-t-IN({isFirstLoad:!0,options:[],hasMore:!0,isLoading:!1,lockedUntil:0,additional:e.additional}),zN=({options:e,defaultOptions:t,additional:n,defaultAdditional:r})=>{let i=t===!0?null:Array.isArray(t)?t:e;return i?{"":{isFirstLoad:!1,isLoading:!1,options:i,hasMore:!0,lockedUntil:0,additional:r||n}}:{}},BN=`[react-select-async-paginate] response of "loadOptions" should be an object with "options" prop, which contains array of options.`,VN=e=>{if(!e)return!1;let{options:t,hasMore:n}=e;return!(!Array.isArray(t)||typeof n!=`boolean`&&n!==void 0)},HN=e=>{if(!VN(e))throw console.error(BN,`Received:`,e),Error(BN);return!0},UN=function(){var e=j(function*(e,t,n,r,i,a,o,s){let c=t.current.inputValue,l=!n.current[c],u=l?RN(t.current):n.current[c];if(u.isLoading||!u.hasMore||u.lockedUntil>Date.now())return;if(i(t=>s&&e===`input-change`?{[c]:G(G({},u),{},{isLoading:!0})}:G(G({},t),{},{[c]:G(G({},u),{},{isLoading:!0})})),r>0&&e===`input-change`&&(yield kN(r),c!==t.current.inputValue)){i(e=>{if(l){let{[c]:t}=e;return P(e,[c].map(Mn))}return G(G({},e),{},{[c]:G(G({},u),{},{isLoading:!1})})});return}let{loadOptions:d,reloadOnErrorTimeout:f=0}=t.current,p=yield EN(Promise.resolve().then(()=>d(c,u.options,u.additional)));if(!o.current)return;if(p.isErr()){i(e=>G(G({},e),{},{[c]:G(G({},u),{},{isLoading:!1,lockedUntil:Date.now()+f})}));return}let m=p.unwrap();if(HN(m)){let{options:e,hasMore:t}=m,n=Object.hasOwn(m,`additional`)?m.additional:u.additional;i(r=>G(G({},r),{},{[c]:G(G({},u),{},{options:a(u.options,e,n),hasMore:!!t,isLoading:!1,isFirstLoad:!1,additional:n})}))}});return function(t,n,r,i,a,o,s,c){return e.apply(this,arguments)}}(),WN=e=>e+1,GN=(e,t=[])=>{let{clearCacheOnSearchChange:n=!1,clearCacheOnMenuClose:r=!1,defaultOptions:i,loadOptionsOnMenuOpen:a=!0,debounceTimeout:o=0,inputValue:s,menuIsOpen:c,filterOption:l=null,reduceOptions:u=FN,shouldLoadMore:d=LN,mapOptionsForMenu:f=void 0}=e,p=xN(c),m=bN(),h=xN(u),g=xN(a),v=(0,_.useRef)(!0),y=(0,_.useRef)(e);y.current=e;let[b,x]=(0,_.useState)(0),S=yN(()=>zN(e)),C=xN(e=>{UN(e,y,S,o,e=>{S.current=e(S.current),m.current&&x(WN)},h.current,m,n)}),w=(0,_.useCallback)(()=>{let e=y.current.inputValue;S.current[e]&&C.current(`menu-scroll`)},[C,S]);(0,_.useEffect)(()=>{v.current?v.current=!1:(S.current={},x(WN)),i===!0&&C.current(`autoload`)},t),(0,_.useEffect)(()=>{p.current&&!S.current[s]&&C.current(`input-change`)},[C,s,p,S]),(0,_.useEffect)(()=>{if(c){if(!S.current[``]&&g.current){C.current(`menu-toggle`);return}return}r&&(S.current={},x(WN))},[C,g,c,S,r]);let T=S.current[s]||RN(e),E=(0,_.useMemo)(()=>f?f(T.options):T.options,[T.options,f]);return{handleScrolledToBottom:w,shouldLoadMore:d,filterOption:l,isLoading:T.isLoading||T.lockedUntil>Date.now(),isFirstLoad:T.isFirstLoad,options:E}},KN=(e,t=[])=>{let{inputValue:n,menuIsOpen:r,defaultInputValue:i,defaultMenuIsOpen:a,onInputChange:o,onMenuClose:s,onMenuOpen:c}=e,[l,u]=(0,_.useState)(i||``),[d,f]=(0,_.useState)(!!a),p=typeof n==`string`?n:l,m=typeof r==`boolean`?r:d,h=(0,_.useCallback)((e,t)=>{o&&o(e,t),u(e)},[o]),g=(0,_.useCallback)(()=>{s&&s(),f(!1)},[s]),v=(0,_.useCallback)(()=>{c&&c(),f(!0)},[c]);return G(G({},GN(G(G({},e),{},{inputValue:p,menuIsOpen:m}),t)),{},{inputValue:p,menuIsOpen:m,onInputChange:h,onMenuClose:g,onMenuOpen:v})},qN=[],JN={};function YN(e){function t(t){let{components:n=JN,selectRef:r=void 0,isLoading:i,cacheUniqs:a=qN,menuPlacement:o,menuShouldScrollIntoView:s}=t,c=KN(P(t,AN),a),l=PN(n),u=typeof i==`boolean`?i:c.isLoading;return(0,v.jsx)(e,G(G(G({},t),c),{},{menuPlacement:o,menuShouldScrollIntoView:o===`auto`&&u?!1:s,isLoading:u,components:l,ref:r}))}return t}var XN=YN(gN),ZN=class{constructor(e){this.token=e}getPayments(e){var t=this;return j(function*(){var n;return yield q.get(`/apps/api/payment/by/shop/`+e.uuid,{headers:{Authorization:`Bearer `+((n=t.token)==null?void 0:n.currentToken)}}).then(e=>e.data.data.map(e=>{let t=new ba;return t.uid=e.uid,t.title=e.title,t.uuid=e.uuid,t}))})()}};ZN=li([Ce(),be(),mi(0,xe(di)),pi(`design:paramtypes`,[di===void 0?Object:di])],ZN);var QN=ZN,$N=({shop:e,order:t})=>{let[n,r]=(0,_.useState)(null),i=H.resolve(To),[a,o]=(0,_.useState)(0),s=new QN,c=function(){var t=j(function*(t,n){return{options:yield s.getPayments(e),hasMore:!1}});return function(e,n){return t.apply(this,arguments)}}();return(0,_.useEffect)(()=>{r(e.uuid)},[e.uuid]),(0,_.useEffect)(()=>{o(t.payment.uid)},[t.payment]),(0,v.jsx)(Eo,{title:`Zahlart`,subtitle:`Zahlungsbedingung`,incomplete:a===0,icon:(0,v.jsx)(`svg`,{className:`h-5 w-5`,fill:`none`,stroke:`currentColor`,strokeWidth:2,viewBox:`0 0 24 24`,children:(0,v.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z`})}),children:(0,v.jsx)(XN,{defaultOptions:!0,defaultValue:t.payment,loadOptions:c,placeholder:``,name:`Zahlart`,getOptionValue:e=>e.uid,getOptionLabel:e=>e.title,onChange:e=>{t.payment=e;let n=i.getCurrentOrder().getValue();n.payment=e,i.setCurrentOrder(n),o(e.uid)},isSearchable:!1,className:`${a==0?`border border-red-400 rounded-sm`:``}`},JSON.stringify(n))})};$N.propTypes={shop:ia.instanceOf(ta),order:ia.instanceOf(Sa)};var eP=class{constructor(e){this.token=e}getShipping(e){var t=this;return j(function*(){var n;return yield q.get(`/apps/api/shipping/by/shop/`+e.uuid,{headers:{Authorization:`Bearer `+((n=t.token)==null?void 0:n.currentToken)}}).then(e=>e.data.data.map(e=>{let t=new xa;return t.uid=e.uid,t.title=e.title,t.uuid=e.uuid,t}))})()}};eP=li([Ce(),be(),mi(0,xe(di)),pi(`design:paramtypes`,[di===void 0?Object:di])],eP);var tP=eP,nP=({shop:e,order:t})=>{let[n,r]=(0,_.useState)(null),i=H.resolve(To),[a,o]=(0,_.useState)(0),s=new tP,c=function(){var t=j(function*(t,n){return{options:yield s.getShipping(e),hasMore:!1}});return function(e,n){return t.apply(this,arguments)}}();return(0,_.useEffect)(()=>{r(e.uuid)},[e.uuid]),(0,_.useEffect)(()=>{o(t.shipping.uid)},[t.shipping]),(0,v.jsx)(Eo,{title:`Versandart`,subtitle:`Versand oder Abholung`,incomplete:a===0,icon:(0,v.jsx)(`svg`,{className:`h-5 w-5`,fill:`none`,stroke:`currentColor`,strokeWidth:2,viewBox:`0 0 24 24`,children:(0,v.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4`})}),children:(0,v.jsx)(XN,{defaultOptions:!0,defaultValue:t.shipping,placeholder:``,name:`Versandart`,loadOptions:c,getOptionValue:e=>e.uid,getOptionLabel:e=>e.title,onChange:e=>{t.shipping=e;let n=i.getCurrentOrder().getValue();n.shipping=e,i.setCurrentOrder(n),o(e.uid)},isSearchable:!1,className:`${a==0?`border border-red-400 rounded-sm`:``}`},JSON.stringify(n))})};nP.propTypes={shop:ia.instanceOf(ta),order:ia.instanceOf(Sa)};var rP=class{constructor(e){this.token=e}getOrder(e){var t=this;return j(function*(){var n;return yield q.post(`/apps/api/order/getonebyuuid`,{uuid:e},{headers:{Authorization:`Bearer `+((n=t.token)==null?void 0:n.currentToken)}}).then(e=>{let t=new Sa;return t.parseFromJson(e.data),t})})()}saveOrder(e){var t=this;return j(function*(){var n;return yield q.post(`/apps/api/order/create`,e,{headers:{Authorization:`Bearer `+((n=t.token)==null?void 0:n.currentToken)}}).then(e=>e.data)})()}calcOrder(e){var t=this;return j(function*(){var n;return yield q.post(`/apps/api/order/calc`,e,{headers:{Authorization:`Bearer `+((n=t.token)==null?void 0:n.currentToken)}}).then(e=>e.data)})()}};rP=li([Ce(),be(),mi(0,xe(di)),pi(`design:paramtypes`,[di===void 0?Object:di])],rP);var iP=rP,aP=new mo,oP=0,sP=aP.asObservable();function cP(e,t=`success`){aP.next({id:++oP,text:e,type:t})}var lP={1:`Auftrag`,2:`Angebot`,3:`Storno`,4:`Gutschrift`,5:`Rechnung`,6:`Teilrechnung`,7:`Teilstorno`},uP={1:1,2:5,3:6,4:6,5:1,6:1,7:6},dP=class extends _.Component{constructor(e){super(e),this.orderState=H.resolve(To),this.orderService=H.resolve(iP),this.state={disabled:!0,saving:!1}}componentDidMount(){this.orderState.getCurrentOrder().pipe(Co(2e3)).subscribe(e=>this.saveButton(e))}saveButton(e){e.contact.username!=``&&e.payment.title!=``&&e.shipping.title!=``&&e.shop.name!=``&&e.invoiceAddress.uuid!=``&&e.type!=0&&e.positions.length>0&&this.setState({disabled:!1})}handlePrint(e){var t=this;return j(function*(){let e=t.orderState.getCurrentOrder().value.uuid,n=uP[t.orderState.getCurrentOrder().value.type]||1;window.open(`/apps/backend/order/detail/print/`+n+`/`+e)})()}handleJobTicket(e){var t=this;return j(function*(){let e=t.orderState.getCurrentOrder().value.uuid;window.open(`/apps/backend/order/detail/print/7/`+e)})()}handleSave(e){var t=this;return j(function*(){e.preventDefault(),t.setState({saving:!0});try{let e=yield t.orderService.saveOrder(t.orderState.getCurrentOrder().value);t.props.loadOrder(e.uuid),cP(`Auftrag gespeichert`)}catch(e){cP(`Speichern fehlgeschlagen`,`error`)}finally{t.setState({saving:!1})}})()}render(){let e=lP[this.orderState.getCurrentOrder().value.type]||`Auftrag`;return(0,v.jsxs)(w,{className:`gap-3`,children:[(0,v.jsxs)(C,{color:`success`,disabled:this.state.disabled,onClick:e=>this.handleSave(e),children:[(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,strokeWidth:`1.5`,stroke:`currentColor`,fill:`none`,className:`h-5 w-5`,children:(0,v.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M6 20.25h12A2.25 2.25 0 0 0 20.25 18V7.5L16.5 3.75H6A2.25 2.25 0 0 0 3.75 6v12A2.25 2.25 0 0 0 6 20.25zm9.75-16.5v5h-9.5v-5zM13 5.5V7m-6.75 4.25h11.5v6.5H6.25Z`})}),this.state.saving===!0&&(0,v.jsx)(`span`,{children:`wird gespeichert...`}),this.state.saving===!1&&(0,v.jsx)(`span`,{children:`Speichern`})]}),(0,v.jsxs)(C,{color:`light`,disabled:!this.orderState.getCurrentOrder().value.saved,onClick:e=>this.handlePrint(e),children:[(0,v.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,className:`h-5 w-5`,children:[(0,v.jsx)(`path`,{d:`M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625Z`,fill:`currentColor`,opacity:`0.2`}),(0,v.jsx)(`path`,{stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625Z`}),(0,v.jsx)(`path`,{stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 14.25v5.25m-3-3.75h6`}),(0,v.jsx)(`path`,{stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12.75 6.75h-3.75V3`})]}),e,` drucken`]}),(0,v.jsxs)(C,{color:`light`,disabled:!this.orderState.getCurrentOrder().value.saved,onClick:e=>this.handleJobTicket(e),children:[(0,v.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,className:`h-5 w-5`,children:[(0,v.jsx)(`path`,{d:`M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625Z`,fill:`currentColor`,opacity:`0.2`}),(0,v.jsx)(`path`,{stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625Z`}),(0,v.jsx)(`path`,{stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9 12h6m-3 3V9`})]}),`Job Ticket`]})]})}},fP=function(e,t,n){let r=Promise.resolve();function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};K(),F();var pP=[`matches`,`historyAction`],mP=[`page`],hP=[`page`,`matches`],gP=[`page`,`matches`],_P=[`onClick`,`discover`,`prefetch`,`relative`,`reloadDocument`,`replace`,`mask`,`state`,`target`,`to`,`preventScrollReset`,`viewTransition`,`defaultShouldRevalidate`],vP=[`aria-current`,`caseSensitive`,`className`,`end`,`style`,`to`,`viewTransition`,`children`],yP=[`discover`,`fetcherKey`,`navigate`,`reloadDocument`,`replace`,`state`,`method`,`action`,`onSubmit`,`relative`,`preventScrollReset`,`viewTransition`,`defaultShouldRevalidate`],bP=[`getKey`,`storageKey`],xP=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,SP=/^[\\/]{2}/;function CP(e,t){return t+e.replace(/\\/g,`/`)}var wP=`popstate`;function TP(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function EP(e={}){function t(e,t){let{pathname:n=`/`,search:r=``,hash:i=``}=NP(e.location.hash.substring(1));return!n.startsWith(`/`)&&!n.startsWith(`.`)&&(n=`/`+n),jP(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){let n=e.document.querySelector(`base`),r=``;if(n&&n.getAttribute(`href`)){let t=e.location.href,n=t.indexOf(`#`);r=n===-1?t:t.slice(0,n)}return r+`#`+(typeof t==`string`?t:MP(t))}function r(e,t){OP(e.pathname.charAt(0)===`/`,`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}return PP(t,n,r,e)}function DP(e,t){if(e===!1||e==null)throw Error(t)}function OP(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch(e){}}}function kP(){return Math.random().toString(36).substring(2,10)}function AP(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function jP(e,t,n=null,r,i){return G(G({pathname:typeof e==`string`?e:e.pathname,search:``,hash:``},typeof t==`string`?NP(t):t),{},{state:n,key:t&&t.key||r||kP(),mask:i})}function MP({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function NP(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function PP(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l==null&&(l=0,o.replaceState(G(G({},o.state),{},{idx:l}),``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=TP(e)?e:jP(h.location,e,t);n&&n(r,e),l=u()+1;let d=AP(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=TP(e)?e:jP(h.location,e,t);n&&n(r,e),l=u();let i=AP(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return FP(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(wP,d),c=e,()=>{i.removeEventListener(wP,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function FP(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),DP(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:MP(t);return i=i.replace(/ $/,`%20`),!n&&SP.test(i)&&(i=r+i),new URL(i,r)}function IP(e,t,n=`/`){return LP(e,t,n,!1)}function LP(e,t,n,r,i){let a=rF((typeof t==`string`?NP(t):t).pathname||`/`,n);if(a==null)return null;let o=i==null?zP(e):i,s=null,c=nF(a);for(let e=0;s==null&&e{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;DP(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=dF([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(DP(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),BP(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:XP(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=tF(e.relativePath,e.caseSensitive,t===u.length-1);return G(G({},e),{},{matcher:n,compiledParams:r})})})};return e.forEach((e,t)=>{var n;if(e.path===``||!((n=e.path)!=null&&n.includes(`?`)))a(e,t);else for(let n of VP(e.path))a(e,t,!0,n)}),t}function VP(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=VP(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function HP(e){e.sort((e,t)=>e.score===t.score?ZP(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var UP=/^:[\w-]+$/,WP=3,GP=2,KP=1,qP=10,JP=-2,YP=e=>e===`*`;function XP(e,t){let n=e.split(`/`),r=n.length;return n.some(YP)&&(r+=JP),t&&(r+=GP),n.filter(e=>!YP(e)).reduce((e,t)=>e+(UP.test(t)?WP:t===``?KP:qP),r)}function ZP(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function QP(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function tF(e,t=!1,n=!0){OP(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function nF(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return OP(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function rF(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function iF(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?NP(e):e,a;return n?(n=uF(n),a=n.startsWith(`/`)?aF(n.substring(1),`/`):aF(n,t)):a=t,{pathname:a,search:mF(r),hash:hF(i)}}function aF(e,t){let n=fF(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function oF(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function sF(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function cF(e){let t=sF(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function lF(e,t,n,r=!1){let i;typeof e==`string`?i=NP(e):(i=G({},e),DP(!i.pathname||!i.pathname.includes(`?`),oF(`?`,`pathname`,`search`,i)),DP(!i.pathname||!i.pathname.includes(`#`),oF(`#`,`pathname`,`hash`,i)),DP(!i.search||!i.search.includes(`#`),oF(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=iF(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var uF=e=>e.replace(/[\\/]{2,}/g,`/`),dF=e=>uF(e.join(`/`)),fF=e=>e.replace(/\/+$/,``),pF=e=>fF(e).replace(/^\/*/,`/`),mF=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,hF=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,gF=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function _F(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function vF(e){return dF(e.map(e=>e.route.path).filter(Boolean))||`/`}var yF=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function bF(e,t){let n=e;if(typeof n!=`string`||!xP.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(yF)try{let e=new URL(window.location.href),r=SP.test(n)?new URL(CP(n,e.protocol)):new URL(n),a=rF(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch(e){OP(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var xF=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(xF);var SF=[`GET`,...xF];new Set(SF);var CF=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function wF(e){try{return CF.includes(new URL(e).protocol)}catch(e){return!1}}var TF=_.createContext(null);TF.displayName=`DataRouter`;var EF=_.createContext(null);EF.displayName=`DataRouterState`;var DF=_.createContext(!1);function OF(){return _.useContext(DF)}var kF=_.createContext({isTransitioning:!1});kF.displayName=`ViewTransition`;var AF=_.createContext(new Map);AF.displayName=`Fetchers`;var jF=_.createContext(null);jF.displayName=`Await`;var MF=_.createContext(null);MF.displayName=`Navigation`;var NF=_.createContext(null);NF.displayName=`Location`;var PF=_.createContext({outlet:null,matches:[],isDataRoute:!1});PF.displayName=`Route`;var FF=_.createContext(null);FF.displayName=`RouteError`;var IF=`REACT_ROUTER_ERROR`,LF=`REDIRECT`,RF=`ROUTE_ERROR_RESPONSE`;function zF(e){if(e.startsWith(`${IF}:${LF}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch(e){}}function BF(e){if(e.startsWith(`${IF}:${RF}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new gF(t.status,t.statusText,t.data)}catch(e){}}function VF(e,{relative:t}={}){DP(HF(),`useHref() may be used only in the context of a component.`);let{basename:n,navigator:r}=_.useContext(MF),{hash:i,pathname:a,search:o}=YF(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:dF([n,a])),r.createHref({pathname:s,search:o,hash:i})}function HF(){return _.useContext(NF)!=null}function UF(){return DP(HF(),`useLocation() may be used only in the context of a component.`),_.useContext(NF).location}var WF=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function GF(e){_.useContext(MF).static||_.useLayoutEffect(e)}function KF(){let{isDataRoute:e}=_.useContext(PF);return e?mI():qF()}function qF(){DP(HF(),`useNavigate() may be used only in the context of a component.`);let e=_.useContext(TF),{basename:t,navigator:n}=_.useContext(MF),{matches:r}=_.useContext(PF),{pathname:i}=UF(),a=JSON.stringify(cF(r)),o=_.useRef(!1);return GF(()=>{o.current=!0}),_.useCallback((r,s={})=>{if(OP(o.current,WF),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=lF(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:dF([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}_.createContext(null);function JF(){var e;let{matches:t}=_.useContext(PF),n=t[t.length-1];return(e=n==null?void 0:n.params)==null?{}:e}function YF(e,{relative:t}={}){let{matches:n}=_.useContext(PF),{pathname:r}=UF(),i=JSON.stringify(cF(n));return _.useMemo(()=>lF(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function XF(e,t){return ZF(e,t)}function ZF(e,t,n){DP(HF(),`useRoutes() may be used only in the context of a component.`);let{navigator:r}=_.useContext(MF),{matches:i}=_.useContext(PF),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;gI(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant (or called \`useRoutes()\`) at "${s}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. -Please change the parent to .`)}let u=VF(),d;if(t){var f;let e=typeof t==`string`?jP(t):t;TP(c===`/`||((f=e.pathname)==null?void 0:f.startsWith(c)),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let p=d.pathname||`/`,m=p;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):PP(e,{pathname:m});EP(l||h!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),EP(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let g=nI(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:lF([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:lF([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?_.createElement(jF.Provider,{value:{location:G({pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0},d),navigationType:`POP`}},g):g}function XF(){let e=dI(),t=hF(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=_.createElement(_.Fragment,null,_.createElement(`p`,null,`💿 Hey developer 👋`),_.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,_.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,_.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),_.createElement(_.Fragment,null,_.createElement(`h2`,null,`Unexpected Application Error!`),_.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?_.createElement(`pre`,{style:i},n):null,o)}var ZF=_.createElement(XF,null),QF=class extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=RF(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:_.createElement(MF.Provider,{value:this.props.routeContext},_.createElement(NF.Provider,{value:e,children:this.props.component}));return this.context?_.createElement(eI,{error:e},t):t}};QF.contextType=TF;var $F=new WeakMap;function eI({children:e,error:t}){let{basename:n}=_.useContext(AF);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=LF(t.digest);if(e){let r=$F.get(t);if(r)throw r;let i=vF(e.location,n),a=i.absoluteURL||i.to;if(SF(a))throw Error(`Invalid redirect location`);if(_F&&!$F.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw $F.set(t,n),n}return _.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function tI({routeContext:e,match:t,children:n}){let r=_.useContext(CF);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(MF.Provider,{value:e},n)}function nI(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r==null?void 0:r.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&(a==null?void 0:a[e.route.id])!==void 0);TP(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e=0?i.slice(0,s+1):[i[0]];break}}}}let c=n==null?void 0:n.onError,l=r&&c?(e,t)=>{var n,i;c(e,{location:r.location,params:(n=(i=r.matches)==null||(i=i[0])==null?void 0:i.params)==null?{}:n,pattern:gF(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||ZF,o&&(s<0&&c===0?(mI(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?_.createElement(n.route.Component,null):n.route.element?n.route.element:e,_.createElement(tI,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?_.createElement(QF,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function rI(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function iI(e){let t=_.useContext(CF);return TP(t,rI(e)),t}function aI(e){let t=_.useContext(wF);return TP(t,rI(e)),t}function oI(e){let t=_.useContext(MF);return TP(t,rI(e)),t}function sI(e){let t=oI(e),n=t.matches[t.matches.length-1];return TP(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function cI(){return sI(`useRouteId`)}function lI(){let e=aI(`useNavigation`);return _.useMemo(()=>{let t=e.navigation,{matches:n,historyAction:r}=t;return P(t,dP)},[e.navigation])}function uI(){let{matches:e,loaderData:t}=aI(`useMatches`);return _.useMemo(()=>e.map(e=>IP(e,t)),[e,t])}function dI(){var e;let t=_.useContext(NF),n=aI(`useRouteError`),r=sI(`useRouteError`);return t===void 0?(e=n.errors)==null?void 0:e[r]:t}function fI(){let{router:e}=iI(`useNavigate`),t=sI(`useNavigate`),n=_.useRef(!1);return UF(()=>{n.current=!0}),_.useCallback(function(){var r=j(function*(r,i={}){EP(n.current,HF),n.current&&(typeof r==`number`?yield e.navigate(r):yield e.navigate(r,G({fromRouteId:t},i)))});return function(e){return r.apply(this,arguments)}}(),[e,t])}var pI={};function mI(e,t,n){!t&&!pI[e]&&(pI[e]=!0,EP(!1,n))}_.memo(hI);function hI({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return YF(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function gI(e){TP(!1,`A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .`)}function _I({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){TP(!BF(),`You cannot render a inside another . You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=_.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=jP(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=_.useMemo(()=>{let e=tF(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return EP(h!=null,` is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the won't render anything.`),h==null?null:_.createElement(AF.Provider,{value:c},_.createElement(jF.Provider,{children:t,value:h}))}function vI({children:e,location:t}){return JF(yI(e),t)}_.Component;function yI(e,t=[]){let n=[];return _.Children.forEach(e,(e,r)=>{if(!_.isValidElement(e))return;let i=[...t,r];if(e.type===_.Fragment){n.push.apply(n,yI(e.props.children,i));return}TP(e.type===gI,`[${typeof e.type==`string`?e.type:e.type.name}] is not a component. All component children of must be a or `),TP(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=yI(e.props.children,i)),n.push(a)}),n}var bI=`get`,xI=`application/x-www-form-urlencoded`;function SI(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function CI(e){return SI(e)&&e.tagName.toLowerCase()===`button`}function wI(e){return SI(e)&&e.tagName.toLowerCase()===`form`}function TI(e){return SI(e)&&e.tagName.toLowerCase()===`input`}function EI(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function DI(e,t){return e.button===0&&(!t||t===`_self`)&&!EI(e)}var OI=null;function kI(){if(OI===null)try{new FormData(document.createElement(`form`),0),OI=!1}catch(e){OI=!0}return OI}var AI=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function jI(e){return e!=null&&!AI.has(e)?(EP(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${xI}"`),null):e}function MI(e,t){let n,r,i,a,o;if(wI(e)){let o=e.getAttribute(`action`);r=o?tF(o,t):null,n=e.getAttribute(`method`)||bI,i=jI(e.getAttribute(`enctype`))||xI,a=new FormData(e)}else if(CI(e)||TI(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a