/*! For license information please see 904.js.LICENSE.txt */ (self.webpackChunkgrafana_metricsdrilldown_app=self.webpackChunkgrafana_metricsdrilldown_app||[]).push([[605,904],{231:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchAll=void 0;var n=r(262),a=r(44757);t.switchAll=function(){return n.switchMap(a.identity)}},262:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMap=void 0;var n=r(83598),a=r(34230),o=r(82792);t.switchMap=function(e,t){return a.operate(function(r,a){var i=null,s=0,l=!1,u=function(){return l&&!i&&a.complete()};r.subscribe(o.createOperatorSubscriber(a,function(r){null==i||i.unsubscribe();var l=0,c=s++;n.innerFrom(e(r,c)).subscribe(i=o.createOperatorSubscriber(a,function(e){return a.next(t?t(r,e,c,l++):e)},function(){i=null,u()}))},function(){l=!0,u()}))})}},1172:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sample=void 0;var n=r(83598),a=r(34230),o=r(87023),i=r(82792);t.sample=function(e){return a.operate(function(t,r){var a=!1,s=null;t.subscribe(i.createOperatorSubscriber(r,function(e){a=!0,s=e})),n.innerFrom(e).subscribe(i.createOperatorSubscriber(r,function(){if(a){a=!1;var e=s;s=null,r.next(e)}},o.noop))})}},1785:(e,t,r)=>{"use strict";r.r(t),r.d(t,{defaultOptions:()=>o,pluginVersion:()=>a});var n=r(33300);const a="12.3.1",o={cellHeight:n.T.Sm,frameIndex:0,showHeader:!0,showTypeIcons:!1,sortBy:[]}},2013:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){0}},2125:(e,t,r)=>{"use strict";r.r(t),r.d(t,{HeatmapColorMode:()=>o,HeatmapColorScale:()=>i,HeatmapSelectionMode:()=>s,defaultOptions:()=>l,pluginVersion:()=>a});var n=r(33300);const a="12.3.1";var o=(e=>(e.Opacity="opacity",e.Scheme="scheme",e))(o||{}),i=(e=>(e.Exponential="exponential",e.Linear="linear",e))(i||{}),s=(e=>(e.X="x",e.Xy="xy",e.Y="y",e))(s||{});const l={calculate:!1,cellGap:1,cellValues:{},color:{scheme:"Oranges",fill:"dark-orange",reverse:!1,exponent:.5,steps:64},exemplars:{color:"rgba(255,0,255,0.7)"},filterValues:{le:1e-9},legend:{show:!0},selectionMode:"x",showValue:n.V.Auto,tooltip:{mode:n.d.Single,yHistogram:!1,showColorScale:!1}}},2894:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retryWhen=void 0;var n=r(83598),a=r(86322),o=r(34230),i=r(82792);t.retryWhen=function(e){return o.operate(function(t,r){var o,s,l=!1,u=function(){o=t.subscribe(i.createOperatorSubscriber(r,void 0,void 0,function(t){s||(s=new a.Subject,n.innerFrom(e(s)).subscribe(i.createOperatorSubscriber(r,function(){return o?u():l=!0}))),s&&s.next(t)})),l&&(o.unsubscribe(),o=null,l=!1,u())};u()})}},3014:(e,t)=>{"use strict";t.default={"grafana-scenes":{components:{"adhoc-filter-pill":{"edit-filter-with-key":"Upravit filtr pomocí klíče {{keyLabel}}","managed-filter":"Spravovaný filtr: {{origin}}","non-applicable":"","remove-filter-with-key":"Odebrat filtr pomocí klíče {{keyLabel}}"},"adhoc-filters-combobox":{"remove-filter-value":"Odebrat hodnotu filtru – {{itemLabel}}","use-custom-value":"Použít vlastní hodnotu: {{itemLabel}}"},"fallback-page":{content:"Pokud jste se sem dostali pomocí odkazu, může se jednat o chybu v této aplikaci.",subTitle:"Adresa URL neodpovídá žádné stránce",title:"Nenalezeno"},"lazy-loader":{placeholder:""},"nested-scene-renderer":{"collapse-button-label":"Sbalit scénu","expand-button-label":"Rozbalit scénu","remove-button-label":"Odebrat scénu"},"scene-debugger":{"object-details":"Podrobnosti objektu","scene-graph":"Graf scény","title-scene-debugger":"Ladicí program scény"},"scene-grid-row":{"collapse-row":"Sbalit řádek","expand-row":"Rozbalit řádek"},"scene-refresh-picker":{"text-cancel":"Zrušit","text-refresh":"Obnovit","tooltip-cancel":""},"scene-time-range-compare-renderer":{"button-label":"Srovnání","button-tooltip":"Povolit porovnání časového rámce"},splitter:{"aria-label-pane-resize-widget":"Widget pro změnu velikosti panelu"},"time-picker":{"move-backward-tooltip":"","move-forward-tooltip":""},"viz-panel":{title:{title:"Název"}},"viz-panel-explore-button":{explore:"Prozkoumat"},"viz-panel-renderer":{"loading-plugin-panel":"Načítání panelu pluginu…","panel-plugin-has-no-panel-component":"Plugin panelu nemá žádnou komponentu panelu"},"viz-panel-series-limit":{"content-rendering-series-single-panel-impact-performance":"Renderování příliš mnoha řad v rámci jednoho panelu může ovlivnit výkon a zhoršit čitelnost dat.","warning-message":"Zobrazují se pouze {{seriesLimit}} série/sérií"}},utils:{"controls-label":{"tooltip-remove":"Odebrat"},"loading-indicator":{"content-cancel-query":"Zrušit dotaz"}},variables:{"ad-hoc-combobox":{"aria-label-edit-filter-operator":"Upravit operátor filtru"},"ad-hoc-filter-builder":{"aria-label-add-filter":"Přidat filtr","title-add-filter":"Přidat filtr"},"ad-hoc-filter-renderer":{"aria-label-remove-filter":"Odebrat filtr","key-select":{"placeholder-select-label":"Vybrat štítek"},"label-select-label":"Vybrat štítek","title-remove-filter":"Odebrat filtr","value-select":{"placeholder-select-value":"Vybrat hodnotu"}},"data-source-variable":{label:{default:"výchozí"}},"default-group-by-custom-indicator-container":{"aria-label-clear":"vymazat",tooltip:"Použito ve výchozím nastavení na této nástěnce. Pokud je upraveno, přenese se na jiné nástěnky.","tooltip-restore-groupby-set-by-this-dashboard":"Obnovit skupinu nastavenou touto nástěnkou."},"format-registry":{formats:{description:{"commaseparated-values":"Hodnoty oddělené čárkou","double-quoted-values":"Hodnoty v dvojitých uvozovkách","format-date-in-different-ways":"Formátovat datum různými způsoby","format-multivalued-variables-using-syntax-example":"Formátovat vícehodnotové proměnné pomocí globální syntaxe, například {value1,value2}","html-escaping-of-values":"HTML escapování hodnot","join-values-with-a-comma":"","json-stringify-value":"Hodnota JSON stringify","keep-value-as-is":"Ponechat hodnotu tak, jak je","multiple-values-are-formatted-like-variablevalue":"Více hodnot je formátováno jako proměnná=hodnota","single-quoted-values":"Hodnoty v jednoduchých uvozovkách","useful-escaping-values-taking-syntax-characters":"Užitečné pro hodnoty HTML escapování, přičemž se bere v úvahu syntaxe URL","useful-for-url-escaping-values":"Užitečné pro hodnoty adresy URL escapování","values-are-separated-by-character":"Hodnoty jsou odděleny znakem |"}}},"group-by-variable-renderer":{"aria-label-group-by-selector":"Seřadit podle voliče","placeholder-group-by-label":"Seřadit podle štítku"},"interval-variable":{"placeholder-select-value":"Vybrat hodnotu"},"loading-options-placeholder":{"loading-options":"Načítání možností…"},"multi-value-apply-button":{apply:"Použít"},"no-options-placeholder":{"no-options-found":"Nebyly nalezeny žádné možnosti"},"options-error-placeholder":{"error-occurred-fetching-labels-click-retry":"Při načítání štítků došlo k chybě. Klikněte pro opakování"},"test-object-with-variable-dependency":{title:{hello:"Dobrý den"}},"test-variable":{text:{text:"Text"}},"variable-value-input":{"placeholder-enter-value":"Zadat hodnotu"},"variable-value-select":{"placeholder-select-value":"Vybrat hodnotu"}}}}},3526:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsOrArgArray=void 0;var r=Array.isArray;t.argsOrArgArray=function(e){return 1===e.length&&r(e[0])?e[0]:e}},4181:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMapTo=void 0;var n=r(76628),a=r(93639);t.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),a.isFunction(t)?n.mergeMap(function(){return e},t,r):("number"==typeof t&&(r=t),n.mergeMap(function(){return e},r))}},4283:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowCount=void 0;var a=r(86322),o=r(34230),i=r(82792);t.windowCount=function(e,t){void 0===t&&(t=0);var r=t>0?t:e;return o.operate(function(t,o){var s=[new a.Subject],l=0;o.next(s[0].asObservable()),t.subscribe(i.createOperatorSubscriber(o,function(t){var i,u;try{for(var c=n(s),d=c.next();!d.done;d=c.next()){d.value.next(t)}}catch(e){i={error:e}}finally{try{d&&!d.done&&(u=c.return)&&u.call(c)}finally{if(i)throw i.error}}var f=l-e+1;if(f>=0&&f%r===0&&s.shift().complete(),++l%r===0){var p=new a.Subject;s.push(p),o.next(p.asObservable())}},function(){for(;s.length>0;)s.shift().complete();o.complete()},function(e){for(;s.length>0;)s.shift().error(e);o.error(e)},function(){s=null}))})}},4908:(e,t)=>{"use strict";function r(e){return 14+(e+64>>>9<<4)+1}function n(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function a(e,t,r,a,o,i){return n((s=n(n(t,e),n(a,i)))<<(l=o)|s>>>32-l,r);var s,l}function o(e,t,r,n,o,i,s){return a(t&r|~t&n,e,t,o,i,s)}function i(e,t,r,n,o,i,s){return a(t&n|r&~n,e,t,o,i,s)}function s(e,t,r,n,o,i,s){return a(t^r^n,e,t,o,i,s)}function l(e,t,r,n,o,i,s){return a(r^(t|~n),e,t,o,i,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var u=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let r=0;r>5]>>>a%32&255,o=parseInt(n.charAt(r>>>4&15)+n.charAt(15&r),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[r/8])<{"use strict";t.default={"grafana-scenes":{components:{"adhoc-filter-pill":{"edit-filter-with-key":"Редактировать фильтр с ключом {{keyLabel}}","managed-filter":"фильтр, управляемый {{origin}}","non-applicable":"","remove-filter-with-key":"Удалить фильтр с ключом {{keyLabel}}"},"adhoc-filters-combobox":{"remove-filter-value":"Удалить значение фильтра ({{itemLabel}})","use-custom-value":"Использовать пользовательское значение: {{itemLabel}}"},"fallback-page":{content:"Если вы попали сюда по ссылке, возможна ошибка в приложении.",subTitle:"URL-адрес не соответствует ни одной странице",title:"Не найдена"},"lazy-loader":{placeholder:""},"nested-scene-renderer":{"collapse-button-label":"Свернуть сцену","expand-button-label":"Развернуть сцену","remove-button-label":"Удалить сцену"},"scene-debugger":{"object-details":"Сведения об объекте","scene-graph":"Граф сцены","title-scene-debugger":"Отладчик сцен"},"scene-grid-row":{"collapse-row":"Свернуть строку","expand-row":"Развернуть строку"},"scene-refresh-picker":{"text-cancel":"Отмена","text-refresh":"Обновить","tooltip-cancel":""},"scene-time-range-compare-renderer":{"button-label":"Сравнение","button-tooltip":"Включить сравнение временных рамок"},splitter:{"aria-label-pane-resize-widget":"Виджет изменения размера панелей"},"time-picker":{"move-backward-tooltip":"","move-forward-tooltip":""},"viz-panel":{title:{title:"Заголовок"}},"viz-panel-explore-button":{explore:"Обзор"},"viz-panel-renderer":{"loading-plugin-panel":"Загрузка панели плагинов...","panel-plugin-has-no-panel-component":"Плагин не имеет свойства панели"},"viz-panel-series-limit":{"content-rendering-series-single-panel-impact-performance":"Отображение слишком большого количества рядов на одной панели может повлиять на производительность и затруднить чтение данных.","warning-message":"Макс. количество отображаемых рядов: {{seriesLimit}}"}},utils:{"controls-label":{"tooltip-remove":"Удалить"},"loading-indicator":{"content-cancel-query":"Отмена запроса"}},variables:{"ad-hoc-combobox":{"aria-label-edit-filter-operator":"Оператор редактирования фильтра"},"ad-hoc-filter-builder":{"aria-label-add-filter":"Добавить фильтр","title-add-filter":"Добавить фильтр"},"ad-hoc-filter-renderer":{"aria-label-remove-filter":"Удалить фильтр","key-select":{"placeholder-select-label":"Выбрать метку"},"label-select-label":"Выбрать метку","title-remove-filter":"Удалить фильтр","value-select":{"placeholder-select-value":"Выбрать значение"}},"data-source-variable":{label:{default:"по умолчанию"}},"default-group-by-custom-indicator-container":{"aria-label-clear":"очистить",tooltip:"Применяется по умолчанию на этом дашборде. При редактировании переносится на другие дашборды.","tooltip-restore-groupby-set-by-this-dashboard":"Восстановить критерий группирования, заданный этим дашбордом."},"format-registry":{formats:{description:{"commaseparated-values":"Значения, разделенные запятыми","double-quoted-values":"Значения в двойных кавычках","format-date-in-different-ways":"Форматируйте дату разными способами","format-multivalued-variables-using-syntax-example":"Форматируйте многозначные переменные с использованием синтаксиса glob, например {value1,value2}","html-escaping-of-values":"HTML-экранирование значений","join-values-with-a-comma":"","json-stringify-value":"Значение преобразования JSON в строку","keep-value-as-is":"Сохраните значение как есть","multiple-values-are-formatted-like-variablevalue":"Несколько значений форматируются как «переменная=значение»","single-quoted-values":"Значения в одинарных кавычках","useful-escaping-values-taking-syntax-characters":"Функция удобна при URL-экранировании значений с учетом символов синтаксиса URI","useful-for-url-escaping-values":"Функция удобна при URL-экранировании значений","values-are-separated-by-character":"Значения разделяются символом |"}}},"group-by-variable-renderer":{"aria-label-group-by-selector":"Группировать по селектору","placeholder-group-by-label":"Группировать по меткам"},"interval-variable":{"placeholder-select-value":"Выбрать значение"},"loading-options-placeholder":{"loading-options":"Загрузка параметров..."},"multi-value-apply-button":{apply:"Применить"},"no-options-placeholder":{"no-options-found":"Параметры не найдены"},"options-error-placeholder":{"error-occurred-fetching-labels-click-retry":"Ошибка при получении меток. Нажмите, чтобы повторить попытку"},"test-object-with-variable-dependency":{title:{hello:"Привет"}},"test-variable":{text:{text:"Текст"}},"variable-value-input":{"placeholder-enter-value":"Ввести значение"},"variable-value-select":{"placeholder-select-value":"Выбрать значение"}}}}},6024:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotFoundError=void 0;var n=r(36333);t.NotFoundError=n.createErrorClass(function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}})},6278:function(e,t,r){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_OBSERVER=t.SafeSubscriber=t.Subscriber=void 0;var o=r(93639),i=r(59705),s=r(85362),l=r(45094),u=r(87023),c=r(98005),d=r(8630),f=r(91722),p=function(e){function r(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,i.isSubscription(r)&&r.add(n)):n.destination=t.EMPTY_OBSERVER,n}return a(r,e),r.create=function(e,t,r){return new g(e,t,r)},r.prototype.next=function(e){this.isStopped?y(c.nextNotification(e),this):this._next(e)},r.prototype.error=function(e){this.isStopped?y(c.errorNotification(e),this):(this.isStopped=!0,this._error(e))},r.prototype.complete=function(){this.isStopped?y(c.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(e){this.destination.next(e)},r.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(i.Subscription);t.Subscriber=p;var h=Function.prototype.bind;function m(e,t){return h.call(e,t)}var v=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){b(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){b(e)}else b(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){b(e)}},e}(),g=function(e){function t(t,r,n){var a,i,l=e.call(this)||this;o.isFunction(t)||!t?a={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:l&&s.config.useDeprecatedNextContext?((i=Object.create(t)).unsubscribe=function(){return l.unsubscribe()},a={next:t.next&&m(t.next,i),error:t.error&&m(t.error,i),complete:t.complete&&m(t.complete,i)}):a=t;return l.destination=new v(a),l}return a(t,e),t}(p);function b(e){s.config.useDeprecatedSynchronousErrorHandling?f.captureError(e):l.reportUnhandledError(e)}function y(e,t){var r=s.config.onStoppedNotification;r&&d.timeoutProvider.setTimeout(function(){return r(e,t)})}t.SafeSubscriber=g,t.EMPTY_OBSERVER={closed:!0,next:u.noop,error:function(e){throw e},complete:u.noop}},6832:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.MIN_GRAFANA_VERSION="8.5.0"},7003:(e,t,r)=>{"use strict";e.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},e.exports.Resizable=r(89637).default,e.exports.ResizableBox=r(34156).default},7040:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,a,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(a=n;0!==a--;)if(!e(t[a],r[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(a=n;0!==a--;)if(!Object.prototype.hasOwnProperty.call(r,o[a]))return!1;for(a=n;0!==a--;){var i=o[a];if(!e(t[i],r[i]))return!1}return!0}return t!=t&&r!=r}},7108:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AbortedDeferredError:()=>i.AbortedDeferredError,Await:()=>i.Await,BrowserRouter:()=>Ot,Form:()=>Pt,HashRouter:()=>At,Link:()=>Ct,MemoryRouter:()=>i.MemoryRouter,NavLink:()=>It,Navigate:()=>i.Navigate,NavigationType:()=>i.NavigationType,Outlet:()=>i.Outlet,Route:()=>i.Route,Router:()=>i.Router,RouterProvider:()=>St,Routes:()=>i.Routes,ScrollRestoration:()=>Mt,UNSAFE_DataRouterContext:()=>i.UNSAFE_DataRouterContext,UNSAFE_DataRouterStateContext:()=>i.UNSAFE_DataRouterStateContext,UNSAFE_ErrorResponseImpl:()=>$,UNSAFE_FetchersContext:()=>mt,UNSAFE_LocationContext:()=>i.UNSAFE_LocationContext,UNSAFE_NavigationContext:()=>i.UNSAFE_NavigationContext,UNSAFE_RouteContext:()=>i.UNSAFE_RouteContext,UNSAFE_ViewTransitionContext:()=>ht,UNSAFE_useRouteId:()=>i.UNSAFE_useRouteId,UNSAFE_useScrollRestoration:()=>$t,createBrowserRouter:()=>ct,createHashRouter:()=>dt,createMemoryRouter:()=>i.createMemoryRouter,createPath:()=>i.createPath,createRoutesFromChildren:()=>i.createRoutesFromChildren,createRoutesFromElements:()=>i.createRoutesFromElements,createSearchParams:()=>rt,defer:()=>i.defer,generatePath:()=>i.generatePath,isRouteErrorResponse:()=>i.isRouteErrorResponse,json:()=>i.json,matchPath:()=>i.matchPath,matchRoutes:()=>i.matchRoutes,parsePath:()=>i.parsePath,redirect:()=>i.redirect,redirectDocument:()=>i.redirectDocument,renderMatches:()=>i.renderMatches,replace:()=>i.replace,resolvePath:()=>i.resolvePath,unstable_HistoryRouter:()=>Rt,unstable_usePrompt:()=>Qt,useActionData:()=>i.useActionData,useAsyncError:()=>i.useAsyncError,useAsyncValue:()=>i.useAsyncValue,useBeforeUnload:()=>Kt,useBlocker:()=>i.useBlocker,useFetcher:()=>Wt,useFetchers:()=>Gt,useFormAction:()=>Ut,useHref:()=>i.useHref,useInRouterContext:()=>i.useInRouterContext,useLinkClickHandler:()=>jt,useLoaderData:()=>i.useLoaderData,useLocation:()=>i.useLocation,useMatch:()=>i.useMatch,useMatches:()=>i.useMatches,useNavigate:()=>i.useNavigate,useNavigation:()=>i.useNavigation,useNavigationType:()=>i.useNavigationType,useOutlet:()=>i.useOutlet,useOutletContext:()=>i.useOutletContext,useParams:()=>i.useParams,useResolvedPath:()=>i.useResolvedPath,useRevalidator:()=>i.useRevalidator,useRouteError:()=>i.useRouteError,useRouteLoaderData:()=>i.useRouteLoaderData,useRoutes:()=>i.useRoutes,useSearchParams:()=>Lt,useSubmit:()=>Bt,useViewTransitionState:()=>Yt});var n,a=r(85959),o=r(48398),i=r(81159);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function g(e,t,r,a){void 0===a&&(a={});let{window:o=document.defaultView,v5Compat:i=!1}=a,u=o.history,c=n.Pop,f=null,v=g();function g(){return(u.state||{idx:null}).idx}function b(){c=n.Pop;let e=g(),t=null==e?null:e-v;v=e,f&&f({action:c,location:w.location,delta:t})}function y(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,r="string"==typeof e?e:m(e);return r=r.replace(/ $/,"%20"),d(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}null==v&&(v=0,u.replaceState(s({},u.state,{idx:v}),""));let w={get action(){return c},get location(){return e(o,u)},listen(e){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(l,b),f=e,()=>{o.removeEventListener(l,b),f=null}},createHref:e=>t(o,e),createURL:y,encodeLocation(e){let t=y(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c=n.Push;let a=h(w.location,e,t);r&&r(a,e),v=g()+1;let s=p(a,v),l=w.createHref(a);try{u.pushState(s,"",l)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(l)}i&&f&&f({action:c,location:w.location,delta:1})},replace:function(e,t){c=n.Replace;let a=h(w.location,e,t);r&&r(a,e),v=g();let o=p(a,v),s=w.createHref(a);u.replaceState(o,"",s),i&&f&&f({action:c,location:w.location,delta:0})},go:e=>u.go(e)};return w}var b;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(b||(b={}));const y=new Set(["lazy","caseSensitive","path","id","index","children"]);function w(e,t,r,n){return void 0===r&&(r=[]),void 0===n&&(n={}),e.map((e,a)=>{let o=[...r,String(a)],i="string"==typeof e.id?e.id:o.join("-");if(d(!0!==e.index||!e.children,"Cannot specify children on an index route"),d(!n[i],'Found a route id collision on id "'+i+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let r=s({},e,t(e),{id:i});return n[i]=r,r}{let r=s({},e,t(e),{id:i,children:void 0});return n[i]=r,e.children&&(r.children=w(e.children,t,o,n)),r}})}function S(e,t,r){return void 0===r&&(r="/"),_(e,t,r,!1)}function _(e,t,r,n){let a=F(("string"==typeof t?v(t):t).pathname||"/",r);if(null==a)return null;let o=x(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every((e,r)=>e===t[r]);return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(o);let i=null;for(let e=0;null==i&&e{let i={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};i.relativePath.startsWith("/")&&(d(i.relativePath.startsWith(n),'Absolute route path "'+i.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(n.length));let s=W([n,i.relativePath]),l=r.concat(i);e.children&&e.children.length>0&&(d(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),x(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:M(s,e.index),routesMeta:l})};return e.forEach((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of O(e.path))a(e,t,r);else a(e,t)}),t}function O(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(0===n.length)return a?[o,""]:[o];let i=O(n.join("/")),s=[];return s.push(...i.map(e=>""===e?o:[o,e].join("/"))),a&&s.push(...i),s.map(t=>e.startsWith("/")&&""===t?"/":t)}const A=/^:[\w-]+$/,R=3,E=2,k=1,C=10,I=-2,P=e=>"*"===e;function M(e,t){let r=e.split("/"),n=r.length;return r.some(P)&&(n+=I),t&&(n+=E),r.filter(e=>!P(e)).reduce((e,t)=>e+(A.test(t)?R:""===t?k:C),n)}function T(e,t,r){void 0===r&&(r=!1);let{routesMeta:n}=e,a={},o="/",i=[];for(let e=0;e(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)"));e.endsWith("*")?(n.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))");let o=new RegExp(a,t?void 0:"i");return[o,n]}(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:n.reduce((e,t,r)=>{let{paramName:n,isOptional:a}=t;if("*"===n){let e=s[r]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[r];return e[n]=a&&!l?void 0:(l||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:i,pattern:e}}function D(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return f(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function F(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}const j=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,L=e=>j.test(e);function V(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"}function z(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the `to."+r+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function B(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function U(e,t,r,n){let a;void 0===n&&(n=!1),"string"==typeof e?a=v(e):(a=s({},e),d(!a.pathname||!a.pathname.includes("?"),z("?","pathname","search",a)),d(!a.pathname||!a.pathname.includes("#"),z("#","pathname","hash",a)),d(!a.search||!a.search.includes("#"),z("#","search","hash",a)));let o,i=""===e||""===a.pathname,l=i?"/":a.pathname;if(null==l)o=r;else{let e=t.length-1;if(!n&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let u=function(e,t){void 0===t&&(t="/");let r,{pathname:n,search:a="",hash:o=""}="string"==typeof e?v(e):e;if(n)if(L(n))r=n;else{if(n.includes("//")){let e=n;n=n.replace(/\/\/+/g,"/"),f(!1,"Pathnames cannot have embedded double slashes - normalizing "+e+" -> "+n)}r=n.startsWith("/")?V(n.substring(1),"/"):V(n,t)}else r=t;return{pathname:r,search:H(a),hash:q(o)}}(a,o),c=l&&"/"!==l&&l.endsWith("/"),p=(i||"."===l)&&r.endsWith("/");return u.pathname.endsWith("/")||!c&&!p||(u.pathname+="/"),u}const W=e=>e.join("/").replace(/\/\/+/g,"/"),G=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),H=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",q=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class ${constructor(e,t,r,n){void 0===n&&(n=!1),this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function K(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const Q=["post","put","patch","delete"],Y=new Set(Q),Z=["get",...Q],J=new Set(Z),X=new Set([301,302,303,307,308]),ee=new Set([307,308]),te={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},re={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ne={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ae=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,oe=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),ie="remix-router-transitions";function se(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,r=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement,a=!r;let o;if(d(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;o=e=>({hasErrorBoundary:t(e)})}else o=oe;let i,l,u,c={},p=w(e.routes,o,void 0,c),m=e.basename||"/",v=e.dataStrategy||ge,g=e.patchRoutesOnNavigation,y=s({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),x=null,O=new Set,A=null,R=null,E=null,k=null!=e.hydrationData,C=S(p,e.history.location,m),I=!1,P=null;if(null==C&&!g){let t=Pe(404,{pathname:e.history.location.pathname}),{matches:r,route:n}=Ie(p);C=r,P={[n.id]:t}}if(C&&!e.hydrationData){ut(C,p,e.history.location.pathname).active&&(C=null)}if(C)if(C.some(e=>e.route.lazy))l=!1;else if(C.some(e=>e.route.loader))if(y.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,r=e.hydrationData?e.hydrationData.errors:null;if(r){let e=C.findIndex(e=>void 0!==r[e.route.id]);l=C.slice(0,e+1).every(e=>!fe(e.route,t,r))}else l=C.every(e=>!fe(e.route,t,r))}else l=null!=e.hydrationData;else l=!0;else if(l=!1,C=[],y.v7_partialHydration){let t=ut(null,p,e.history.location.pathname);t.active&&t.matches&&(I=!0,C=t.matches)}let M,T,N={historyAction:e.history.action,location:e.history.location,matches:C,initialized:l,navigation:te,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||P,fetchers:new Map,blockers:new Map},D=n.Pop,j=!1,L=!1,V=new Map,z=null,B=!1,U=!1,W=[],G=new Set,H=new Map,q=0,$=-1,Q=new Map,Y=new Set,Z=new Map,J=new Map,X=new Set,se=new Map,ce=new Map;function pe(e,t){void 0===t&&(t={}),N=s({},N,e);let r=[],n=[];y.v7_fetcherPersist&&N.fetchers.forEach((e,t)=>{"idle"===e.state&&(X.has(t)?n.push(t):r.push(t))}),X.forEach(e=>{N.fetchers.has(e)||H.has(e)||n.push(e)}),[...O].forEach(e=>e(N,{deletedFetchers:n,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync})),y.v7_fetcherPersist?(r.forEach(e=>N.fetchers.delete(e)),n.forEach(e=>Ze(e))):n.forEach(e=>X.delete(e))}function he(t,r,a){var o,l;let u,{flushSync:c}=void 0===a?{}:a,d=null!=N.actionData&&null!=N.navigation.formMethod&&Be(N.navigation.formMethod)&&"loading"===N.navigation.state&&!0!==(null==(o=t.state)?void 0:o._isRedirect);u=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:d?N.actionData:null;let f=r.loaderData?Ee(N.loaderData,r.loaderData,r.matches||[],r.errors):N.loaderData,h=N.blockers;h.size>0&&(h=new Map(h),h.forEach((e,t)=>h.set(t,ne)));let m,v=!0===j||null!=N.navigation.formMethod&&Be(N.navigation.formMethod)&&!0!==(null==(l=t.state)?void 0:l._isRedirect);if(i&&(p=i,i=void 0),B||D===n.Pop||(D===n.Push?e.history.push(t,t.state):D===n.Replace&&e.history.replace(t,t.state)),D===n.Pop){let e=V.get(N.location.pathname);e&&e.has(t.pathname)?m={currentLocation:N.location,nextLocation:t}:V.has(t.pathname)&&(m={currentLocation:t,nextLocation:N.location})}else if(L){let e=V.get(N.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),V.set(N.location.pathname,e)),m={currentLocation:N.location,nextLocation:t}}pe(s({},r,{actionData:u,loaderData:f,historyAction:D,location:t,initialized:!0,navigation:te,revalidation:"idle",restoreScrollPosition:lt(t,r.matches||N.matches),preventScrollReset:v,blockers:h}),{viewTransitionOpts:m,flushSync:!0===c}),D=n.Pop,j=!1,L=!1,B=!1,U=!1,W=[]}async function ve(t,r,a){M&&M.abort(),M=null,D=t,B=!0===(a&&a.startUninterruptedRevalidation),function(e,t){if(A&&E){let r=st(e,t);A[r]=E()}}(N.location,N.matches),j=!0===(a&&a.preventScrollReset),L=!0===(a&&a.enableViewTransition);let o=i||p,l=a&&a.overrideNavigation,u=null!=a&&a.initialHydration&&N.matches&&N.matches.length>0&&!I?N.matches:S(o,r,m),c=!0===(a&&a.flushSync);if(u&&N.initialized&&!U&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(N.location,r)&&!(a&&a.submission&&Be(a.submission.formMethod)))return void he(r,{matches:u},{flushSync:c});let d=ut(u,o,r.pathname);if(d.active&&d.matches&&(u=d.matches),!u){let{error:e,notFoundMatches:t,route:n}=ot(r.pathname);return void he(r,{matches:t,loaderData:{},errors:{[n.id]:e}},{flushSync:c})}M=new AbortController;let f,h=_e(e.history,r,M.signal,a&&a.submission);if(a&&a.pendingError)f=[Ce(u).route.id,{type:b.error,error:a.pendingError}];else if(a&&a.submission&&Be(a.submission.formMethod)){let t=await async function(t,r,a,o,i,s){void 0===s&&(s={});Le();let l,u=function(e,t){let r={state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return r}(r,a);if(pe({navigation:u},{flushSync:!0===s.flushSync}),i){let e=await ct(o,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=Ce(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:b.error,error:e.error}]}}if(!e.matches){let{notFoundMatches:e,error:t,route:n}=ot(r.pathname);return{matches:e,pendingActionResult:[n.id,{type:b.error,error:t}]}}o=e.matches}let c=qe(o,r);if(c.route.action||c.route.lazy){if(l=(await Ae("action",N,t,[c],o,null))[c.route.id],t.signal.aborted)return{shortCircuited:!0}}else l={type:b.error,error:Pe(405,{method:t.method,pathname:r.pathname,routeId:c.route.id})};if(je(l)){let r;if(s&&null!=s.replace)r=s.replace;else{r=Se(l.response.headers.get("Location"),new URL(t.url),m,e.history)===N.location.pathname+N.location.search}return await Oe(t,l,!0,{submission:a,replace:r}),{shortCircuited:!0}}if(De(l))throw Pe(400,{type:"defer-action"});if(Fe(l)){let e=Ce(o,c.route.id);return!0!==(s&&s.replace)&&(D=n.Push),{matches:o,pendingActionResult:[e.route.id,l]}}return{matches:o,pendingActionResult:[c.route.id,l]}}(h,r,a.submission,u,d.active,{replace:a.replace,flushSync:c});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,n]=t.pendingActionResult;if(Fe(n)&&K(n.error)&&404===n.error.status)return M=null,void he(r,{matches:t.matches,loaderData:{},errors:{[e]:n.error}})}u=t.matches||u,f=t.pendingActionResult,l=Ke(r,a.submission),c=!1,d.active=!1,h=_e(e.history,h.url,h.signal)}let{shortCircuited:v,matches:g,loaderData:w,errors:_}=await async function(t,r,n,a,o,l,u,c,d,f,h){let v=o||Ke(r,l),g=l||u||$e(v),b=!(B||y.v7_partialHydration&&d);if(a){if(b){let e=xe(h);pe(s({navigation:v},void 0!==e?{actionData:e}:{}),{flushSync:f})}let e=await ct(n,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=Ce(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:n}=ot(r.pathname);return{matches:t,loaderData:{},errors:{[n.id]:e}}}n=e.matches}let w=i||p,[S,_]=de(e.history,N,n,g,r,y.v7_partialHydration&&!0===d,y.v7_skipActionErrorRevalidation,U,W,G,X,Z,Y,w,m,h);if(it(e=>!(n&&n.some(t=>t.route.id===e))||S&&S.some(t=>t.route.id===e)),$=++q,0===S.length&&0===_.length){let e=et();return he(r,s({matches:n,loaderData:{},errors:h&&Fe(h[1])?{[h[0]]:h[1].error}:null},ke(h),e?{fetchers:new Map(N.fetchers)}:{}),{flushSync:f}),{shortCircuited:!0}}if(b){let e={};if(!a){e.navigation=v;let t=xe(h);void 0!==t&&(e.actionData=t)}_.length>0&&(e.fetchers=function(e){return e.forEach(e=>{let t=N.fetchers.get(e.key),r=Qe(void 0,t?t.data:void 0);N.fetchers.set(e.key,r)}),new Map(N.fetchers)}(_)),pe(e,{flushSync:f})}_.forEach(e=>{Je(e.key),e.controller&&H.set(e.key,e.controller)});let x=()=>_.forEach(e=>Je(e.key));M&&M.signal.addEventListener("abort",x);let{loaderResults:O,fetcherResults:A}=await Te(N,n,S,_,t);if(t.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener("abort",x);_.forEach(e=>H.delete(e.key));let R=Me(O);if(R)return await Oe(t,R.result,!0,{replace:c}),{shortCircuited:!0};if(R=Me(A),R)return Y.add(R.key),await Oe(t,R.result,!0,{replace:c}),{shortCircuited:!0};let{loaderData:E,errors:k}=Re(N,n,O,h,_,A,se);se.forEach((e,t)=>{e.subscribe(r=>{(r||e.done)&&se.delete(t)})}),y.v7_partialHydration&&d&&N.errors&&(k=s({},N.errors,k));let C=et(),I=tt($),P=C||I||_.length>0;return s({matches:n,loaderData:E,errors:k},P?{fetchers:new Map(N.fetchers)}:{})}(h,r,u,d.active,l,a&&a.submission,a&&a.fetcherSubmission,a&&a.replace,a&&!0===a.initialHydration,c,f);v||(M=null,he(r,s({matches:g||u},ke(f),{loaderData:w,errors:_})))}function xe(e){return e&&!Fe(e[1])?{[e[0]]:e[1].data}:N.actionData?0===Object.keys(N.actionData).length?null:N.actionData:void 0}async function Oe(a,o,i,l){let{submission:u,fetcherSubmission:c,preventScrollReset:f,replace:p}=void 0===l?{}:l;o.response.headers.has("X-Remix-Revalidate")&&(U=!0);let v=o.response.headers.get("Location");d(v,"Expected a Location header on the redirect Response"),v=Se(v,new URL(a.url),m,e.history);let g=h(N.location,v,{_isRedirect:!0});if(r){let r=!1;if(o.response.headers.has("X-Remix-Reload-Document"))r=!0;else if(ae.test(v)){const n=e.history.createURL(v);r=n.origin!==t.location.origin||null==F(n.pathname,m)}if(r)return void(p?t.location.replace(v):t.location.assign(v))}M=null;let b=!0===p||o.response.headers.has("X-Remix-Replace")?n.Replace:n.Push,{formMethod:y,formAction:w,formEncType:S}=N.navigation;!u&&!c&&y&&w&&S&&(u=$e(N.navigation));let _=u||c;if(ee.has(o.response.status)&&_&&Be(_.formMethod))await ve(b,g,{submission:s({},_,{formAction:v}),preventScrollReset:f||j,enableViewTransition:i?L:void 0});else{let e=Ke(g,u);await ve(b,g,{overrideNavigation:e,fetcherSubmission:c,preventScrollReset:f||j,enableViewTransition:i?L:void 0})}}async function Ae(e,t,r,n,a,i){let s,l={};try{s=await be(v,e,t,r,n,a,i,c,o)}catch(e){return n.forEach(t=>{l[t.route.id]={type:b.error,error:e}}),l}for(let[e,t]of Object.entries(s))if(Ne(t)){let n=t.result;l[e]={type:b.redirect,response:we(n,r,e,a,m,y.v7_relativeSplatPath)}}else l[e]=await ye(t);return l}async function Te(t,r,n,a,o){let i=t.matches,s=Ae("loader",t,o,n,r,null),l=Promise.all(a.map(async r=>{if(r.matches&&r.match&&r.controller){let n=(await Ae("loader",t,_e(e.history,r.path,r.controller.signal),[r.match],r.matches,r.key))[r.match.route.id];return{[r.key]:n}}return Promise.resolve({[r.key]:{type:b.error,error:Pe(404,{pathname:r.path})}})})),u=await s,c=(await l).reduce((e,t)=>Object.assign(e,t),{});return await Promise.all([Ue(r,u,o.signal,i,t.loaderData),We(r,c,a)]),{loaderResults:u,fetcherResults:c}}function Le(){U=!0,W.push(...it()),Z.forEach((e,t)=>{H.has(t)&&G.add(t),Je(t)})}function Ve(e,t,r){void 0===r&&(r={}),N.fetchers.set(e,t),pe({fetchers:new Map(N.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function ze(e,t,r,n){void 0===n&&(n={});let a=Ce(N.matches,t);Ze(e),pe({errors:{[a.route.id]:r},fetchers:new Map(N.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function He(e){return J.set(e,(J.get(e)||0)+1),X.has(e)&&X.delete(e),N.fetchers.get(e)||re}function Ze(e){let t=N.fetchers.get(e);!H.has(e)||t&&"loading"===t.state&&Q.has(e)||Je(e),Z.delete(e),Q.delete(e),Y.delete(e),y.v7_fetcherPersist&&X.delete(e),G.delete(e),N.fetchers.delete(e)}function Je(e){let t=H.get(e);t&&(t.abort(),H.delete(e))}function Xe(e){for(let t of e){let e=Ye(He(t).data);N.fetchers.set(t,e)}}function et(){let e=[],t=!1;for(let r of Y){let n=N.fetchers.get(r);d(n,"Expected fetcher: "+r),"loading"===n.state&&(Y.delete(r),e.push(r),t=!0)}return Xe(e),t}function tt(e){let t=[];for(let[r,n]of Q)if(n0}function rt(e){N.blockers.delete(e),ce.delete(e)}function nt(e,t){let r=N.blockers.get(e)||ne;d("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,"Invalid blocker state transition: "+r.state+" -> "+t.state);let n=new Map(N.blockers);n.set(e,t),pe({blockers:n})}function at(e){let{currentLocation:t,nextLocation:r,historyAction:n}=e;if(0===ce.size)return;ce.size>1&&f(!1,"A router only supports one blocker at a time");let a=Array.from(ce.entries()),[o,i]=a[a.length-1],s=N.blockers.get(o);return s&&"proceeding"===s.state?void 0:i({currentLocation:t,nextLocation:r,historyAction:n})?o:void 0}function ot(e){let t=Pe(404,{pathname:e}),r=i||p,{matches:n,route:a}=Ie(r);return it(),{notFoundMatches:n,route:a,error:t}}function it(e){let t=[];return se.forEach((r,n)=>{e&&!e(n)||(r.cancel(),t.push(n),se.delete(n))}),t}function st(e,t){if(R){return R(e,t.map(e=>function(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}(e,N.loaderData)))||e.key}return e.key}function lt(e,t){if(A){let r=st(e,t),n=A[r];if("number"==typeof n)return n}return null}function ut(e,t,r){if(g){if(!e){return{active:!0,matches:_(t,r,m,!0)||[]}}if(Object.keys(e[0].params).length>0){return{active:!0,matches:_(t,r,m,!0)}}}return{active:!1,matches:null}}async function ct(e,t,r,n){if(!g)return{type:"success",matches:e};let a=e;for(;;){let e=null==i,s=i||p,l=c;try{await g({signal:r,path:t,matches:a,fetcherKey:n,patch:(e,t)=>{r.aborted||me(e,t,s,l,o)}})}catch(e){return{type:"error",error:e,partialMatches:a}}finally{e&&!r.aborted&&(p=[...p])}if(r.aborted)return{type:"aborted"};let u=S(s,t,m);if(u)return{type:"success",matches:u};let d=_(s,t,m,!0);if(!d||a.length===d.length&&a.every((e,t)=>e.route.id===d[t].route.id))return{type:"success",matches:null};a=d}}return u={get basename(){return m},get future(){return y},get state(){return N},get routes(){return p},get window(){return t},initialize:function(){if(x=e.history.listen(t=>{let{action:r,location:n,delta:a}=t;if(T)return T(),void(T=void 0);f(0===ce.size||null!=a,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let o=at({currentLocation:N.location,nextLocation:n,historyAction:r});if(o&&null!=a){let t=new Promise(e=>{T=e});return e.history.go(-1*a),void nt(o,{state:"blocked",location:n,proceed(){nt(o,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(a))},reset(){let e=new Map(N.blockers);e.set(o,ne),pe({blockers:e})}})}return ve(r,n)}),r){!function(e,t){try{let r=e.sessionStorage.getItem(ie);if(r){let e=JSON.parse(r);for(let[r,n]of Object.entries(e||{}))n&&Array.isArray(n)&&t.set(r,new Set(n||[]))}}catch(e){}}(t,V);let e=()=>function(e,t){if(t.size>0){let r={};for(let[e,n]of t)r[e]=[...n];try{e.sessionStorage.setItem(ie,JSON.stringify(r))}catch(e){f(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}}(t,V);t.addEventListener("pagehide",e),z=()=>t.removeEventListener("pagehide",e)}return N.initialized||ve(n.Pop,N.location,{initialHydration:!0}),u},subscribe:function(e){return O.add(e),()=>O.delete(e)},enableScrollRestoration:function(e,t,r){if(A=e,E=t,R=r||null,!k&&N.navigation===te){k=!0;let e=lt(N.location,N.matches);null!=e&&pe({restoreScrollPosition:e})}return()=>{A=null,E=null,R=null}},navigate:async function t(r,a){if("number"==typeof r)return void e.history.go(r);let o=le(N.location,N.matches,m,y.v7_prependBasename,r,y.v7_relativeSplatPath,null==a?void 0:a.fromRouteId,null==a?void 0:a.relative),{path:i,submission:l,error:u}=ue(y.v7_normalizeFormMethod,!1,o,a),c=N.location,d=h(N.location,i,a&&a.state);d=s({},d,e.history.encodeLocation(d));let f=a&&null!=a.replace?a.replace:void 0,p=n.Push;!0===f?p=n.Replace:!1===f||null!=l&&Be(l.formMethod)&&l.formAction===N.location.pathname+N.location.search&&(p=n.Replace);let v=a&&"preventScrollReset"in a?!0===a.preventScrollReset:void 0,g=!0===(a&&a.flushSync),b=at({currentLocation:c,nextLocation:d,historyAction:p});if(!b)return await ve(p,d,{submission:l,pendingError:u,preventScrollReset:v,replace:a&&a.replace,enableViewTransition:a&&a.viewTransition,flushSync:g});nt(b,{state:"blocked",location:d,proceed(){nt(b,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),t(r,a)},reset(){let e=new Map(N.blockers);e.set(b,ne),pe({blockers:e})}})},fetch:function(t,r,n,o){if(a)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Je(t);let s=!0===(o&&o.flushSync),l=i||p,u=le(N.location,N.matches,m,y.v7_prependBasename,n,y.v7_relativeSplatPath,r,null==o?void 0:o.relative),c=S(l,u,m),f=ut(c,l,u);if(f.active&&f.matches&&(c=f.matches),!c)return void ze(t,r,Pe(404,{pathname:u}),{flushSync:s});let{path:h,submission:v,error:g}=ue(y.v7_normalizeFormMethod,!0,u,o);if(g)return void ze(t,r,g,{flushSync:s});let b=qe(c,h),w=!0===(o&&o.preventScrollReset);v&&Be(v.formMethod)?async function(t,r,n,a,o,s,l,u,c){function f(e){if(!e.route.action&&!e.route.lazy){let e=Pe(405,{method:c.formMethod,pathname:n,routeId:r});return ze(t,r,e,{flushSync:l}),!0}return!1}if(Le(),Z.delete(t),!s&&f(a))return;let h=N.fetchers.get(t);Ve(t,function(e,t){let r={state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0};return r}(c,h),{flushSync:l});let v=new AbortController,g=_e(e.history,n,v.signal,c);if(s){let e=await ct(o,new URL(g.url).pathname,g.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void ze(t,r,e.error,{flushSync:l});if(!e.matches)return void ze(t,r,Pe(404,{pathname:n}),{flushSync:l});if(f(a=qe(o=e.matches,n)))return}H.set(t,v);let b=q,w=await Ae("action",N,g,[a],o,t),_=w[a.route.id];if(g.signal.aborted)return void(H.get(t)===v&&H.delete(t));if(y.v7_fetcherPersist&&X.has(t)){if(je(_)||Fe(_))return void Ve(t,Ye(void 0))}else{if(je(_))return H.delete(t),$>b?void Ve(t,Ye(void 0)):(Y.add(t),Ve(t,Qe(c)),Oe(g,_,!1,{fetcherSubmission:c,preventScrollReset:u}));if(Fe(_))return void ze(t,r,_.error)}if(De(_))throw Pe(400,{type:"defer-action"});let x=N.navigation.location||N.location,O=_e(e.history,x,v.signal),A=i||p,R="idle"!==N.navigation.state?S(A,N.navigation.location,m):N.matches;d(R,"Didn't find any matches after fetcher action");let E=++q;Q.set(t,E);let k=Qe(c,_.data);N.fetchers.set(t,k);let[C,I]=de(e.history,N,R,c,x,!1,y.v7_skipActionErrorRevalidation,U,W,G,X,Z,Y,A,m,[a.route.id,_]);I.filter(e=>e.key!==t).forEach(e=>{let t=e.key,r=N.fetchers.get(t),n=Qe(void 0,r?r.data:void 0);N.fetchers.set(t,n),Je(t),e.controller&&H.set(t,e.controller)}),pe({fetchers:new Map(N.fetchers)});let P=()=>I.forEach(e=>Je(e.key));v.signal.addEventListener("abort",P);let{loaderResults:T,fetcherResults:F}=await Te(N,R,C,I,O);if(v.signal.aborted)return;v.signal.removeEventListener("abort",P),Q.delete(t),H.delete(t),I.forEach(e=>H.delete(e.key));let j=Me(T);if(j)return Oe(O,j.result,!1,{preventScrollReset:u});if(j=Me(F),j)return Y.add(j.key),Oe(O,j.result,!1,{preventScrollReset:u});let{loaderData:L,errors:V}=Re(N,R,T,void 0,I,F,se);if(N.fetchers.has(t)){let e=Ye(_.data);N.fetchers.set(t,e)}tt(E),"loading"===N.navigation.state&&E>$?(d(D,"Expected pending action"),M&&M.abort(),he(N.navigation.location,{matches:R,loaderData:L,errors:V,fetchers:new Map(N.fetchers)})):(pe({errors:V,loaderData:Ee(N.loaderData,L,R,V),fetchers:new Map(N.fetchers)}),U=!1)}(t,r,h,b,c,f.active,s,w,v):(Z.set(t,{routeId:r,path:h}),async function(t,r,n,a,o,i,s,l,u){let c=N.fetchers.get(t);Ve(t,Qe(u,c?c.data:void 0),{flushSync:s});let f=new AbortController,p=_e(e.history,n,f.signal);if(i){let e=await ct(o,new URL(p.url).pathname,p.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void ze(t,r,e.error,{flushSync:s});if(!e.matches)return void ze(t,r,Pe(404,{pathname:n}),{flushSync:s});a=qe(o=e.matches,n)}H.set(t,f);let h=q,m=await Ae("loader",N,p,[a],o,t),v=m[a.route.id];De(v)&&(v=await Ge(v,p.signal,!0)||v);H.get(t)===f&&H.delete(t);if(p.signal.aborted)return;if(X.has(t))return void Ve(t,Ye(void 0));if(je(v))return $>h?void Ve(t,Ye(void 0)):(Y.add(t),void await Oe(p,v,!1,{preventScrollReset:l}));if(Fe(v))return void ze(t,r,v.error);d(!De(v),"Unhandled fetcher deferred data"),Ve(t,Ye(v.data))}(t,r,h,b,c,f.active,s,w,v))},revalidate:function(){Le(),pe({revalidation:"loading"}),"submitting"!==N.navigation.state&&("idle"!==N.navigation.state?ve(D||N.historyAction,N.navigation.location,{overrideNavigation:N.navigation,enableViewTransition:!0===L}):ve(N.historyAction,N.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:He,deleteFetcher:function(e){let t=(J.get(e)||0)-1;t<=0?(J.delete(e),X.add(e),y.v7_fetcherPersist||Ze(e)):J.set(e,t),pe({fetchers:new Map(N.fetchers)})},dispose:function(){x&&x(),z&&z(),O.clear(),M&&M.abort(),N.fetchers.forEach((e,t)=>Ze(t)),N.blockers.forEach((e,t)=>rt(t))},getBlocker:function(e,t){let r=N.blockers.get(e)||ne;return ce.get(e)!==t&&ce.set(e,t),r},deleteBlocker:rt,patchRoutes:function(e,t){let r=null==i;me(e,t,i||p,c,o),r&&(p=[...p],pe({}))},_internalFetchControllers:H,_internalActiveDeferreds:se,_internalSetRoutes:function(e){c={},i=w(e,o,void 0,c)}},u}Symbol("deferred");function le(e,t,r,n,a,o,i,s){let l,u;if(i){l=[];for(let e of t)if(l.push(e),e.route.id===i){u=e;break}}else l=t,u=t[t.length-1];let c=U(a||".",function(e,t){let r=B(e);return t?r.map((e,t)=>t===r.length-1?e.pathname:e.pathnameBase):r.map(e=>e.pathnameBase)}(l,o),F(e.pathname,r)||e.pathname,"path"===s);if(null==a&&(c.search=e.search,c.hash=e.hash),(null==a||""===a||"."===a)&&u){let e=He(c.search);if(u.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll("index");e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();c.search=r?"?"+r:""}}return n&&"/"!==r&&(c.pathname="/"===c.pathname?r:W([r,c.pathname])),m(c)}function ue(e,t,r,n){if(!n||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(n))return{path:r};if(n.formMethod&&!ze(n.formMethod))return{path:r,error:Pe(405,{method:n.formMethod})};let a,o,i=()=>({path:r,error:Pe(400,{type:"invalid-body"})}),s=n.formMethod||"get",l=e?s.toUpperCase():s.toLowerCase(),u=Te(r);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!Be(l))return i();let e="string"==typeof n.body?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,t)=>{let[r,n]=t;return""+e+r+"="+n+"\n"},""):String(n.body);return{path:r,submission:{formMethod:l,formAction:u,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===n.formEncType){if(!Be(l))return i();try{let e="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:l,formAction:u,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return i()}}}if(d("function"==typeof FormData,"FormData is not available in this environment"),n.formData)a=xe(n.formData),o=n.formData;else if(n.body instanceof FormData)a=xe(n.body),o=n.body;else if(n.body instanceof URLSearchParams)a=n.body,o=Oe(a);else if(null==n.body)a=new URLSearchParams,o=new FormData;else try{a=new URLSearchParams(n.body),o=Oe(a)}catch(e){return i()}let c={formMethod:l,formAction:u,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:o,json:void 0,text:void 0};if(Be(c.formMethod))return{path:r,submission:c};let f=v(r);return t&&f.search&&He(f.search)&&a.append("index",""),f.search="?"+a,{path:m(f),submission:c}}function ce(e,t,r){void 0===r&&(r=!1);let n=e.findIndex(e=>e.route.id===t);return n>=0?e.slice(0,r?n+1:n):e}function de(e,t,r,n,a,o,i,l,u,c,d,f,p,h,m,v){let g=v?Fe(v[1])?v[1].error:v[1].data:void 0,b=e.createURL(t.location),y=e.createURL(a),w=r;o&&t.errors?w=ce(r,Object.keys(t.errors)[0],!0):v&&Fe(v[1])&&(w=ce(r,v[0]));let _=v?v[1].statusCode:void 0,x=i&&_&&_>=400,O=w.filter((e,r)=>{let{route:a}=e;if(a.lazy)return!0;if(null==a.loader)return!1;if(o)return fe(a,t.loaderData,t.errors);if(function(e,t,r){let n=!t||r.route.id!==t.route.id,a=void 0===e[r.route.id];return n||a}(t.loaderData,t.matches[r],e)||u.some(t=>t===e.route.id))return!0;let i=t.matches[r],c=e;return he(e,s({currentUrl:b,currentParams:i.params,nextUrl:y,nextParams:c.params},n,{actionResult:g,actionStatus:_,defaultShouldRevalidate:!x&&(l||b.pathname+b.search===y.pathname+y.search||b.search!==y.search||pe(i,c))}))}),A=[];return f.forEach((e,a)=>{if(o||!r.some(t=>t.route.id===e.routeId)||d.has(a))return;let i=S(h,e.path,m);if(!i)return void A.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let u=t.fetchers.get(a),f=qe(i,e.path),v=!1;p.has(a)?v=!1:c.has(a)?(c.delete(a),v=!0):v=u&&"idle"!==u.state&&void 0===u.data?l:he(f,s({currentUrl:b,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:r[r.length-1].params},n,{actionResult:g,actionStatus:_,defaultShouldRevalidate:!x&&l})),v&&A.push({key:a,routeId:e.routeId,path:e.path,matches:i,match:f,controller:new AbortController})}),[O,A]}function fe(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=null!=t&&void 0!==t[e.id],a=null!=r&&void 0!==r[e.id];return!(!n&&a)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!n&&!a)}function pe(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function he(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function me(e,t,r,n,a){var o;let i;if(e){let t=n[e];d(t,"No route found to patch children into: routeId = "+e),t.children||(t.children=[]),i=t.children}else i=r;let s=w(t.filter(e=>!i.some(t=>ve(e,t))),a,[e||"_","patch",String((null==(o=i)?void 0:o.length)||"0")],n);i.push(...s)}function ve(e,t){return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||e.children.every((e,r)=>{var n;return null==(n=t.children)?void 0:n.some(t=>ve(e,t))}))}async function ge(e){let{matches:t}=e,r=t.filter(e=>e.shouldLoad);return(await Promise.all(r.map(e=>e.resolve()))).reduce((e,t,n)=>Object.assign(e,{[r[n].route.id]:t}),{})}async function be(e,t,r,n,a,o,i,l,u,c){let p=o.map(e=>e.route.lazy?async function(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];d(a,"No route found in manifest");let o={};for(let e in n){let t=void 0!==a[e]&&"hasErrorBoundary"!==e;f(!t,'Route "'+a.id+'" has a static property "'+e+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+e+'" will be ignored.'),t||y.has(e)||(o[e]=n[e])}Object.assign(a,o),Object.assign(a,s({},t(a),{lazy:void 0}))}(e.route,u,l):void 0),h=o.map((e,r)=>{let o=p[r],i=a.some(t=>t.route.id===e.route.id);return s({},e,{shouldLoad:i,resolve:async r=>(r&&"GET"===n.method&&(e.route.lazy||e.route.loader)&&(i=!0),i?async function(e,t,r,n,a,o){let i,s,l=n=>{let i,l=new Promise((e,t)=>i=t);s=()=>i(),t.signal.addEventListener("abort",s);let u=a=>"function"!=typeof n?Promise.reject(new Error('You cannot call the handler for a route which defines a boolean "'+e+'" [routeId: '+r.route.id+"]")):n({request:t,params:r.params,context:o},...void 0!==a?[a]:[]),c=(async()=>{try{return{type:"data",result:await(a?a(e=>u(e)):u())}}catch(e){return{type:"error",result:e}}})();return Promise.race([c,l])};try{let a=r.route[e];if(n)if(a){let e,[t]=await Promise.all([l(a).catch(t=>{e=t}),n]);if(void 0!==e)throw e;i=t}else{if(await n,a=r.route[e],!a){if("action"===e){let e=new URL(t.url),n=e.pathname+e.search;throw Pe(405,{method:t.method,pathname:n,routeId:r.route.id})}return{type:b.data,result:void 0}}i=await l(a)}else{if(!a){let e=new URL(t.url);throw Pe(404,{pathname:e.pathname+e.search})}i=await l(a)}d(void 0!==i.result,"You defined "+("action"===e?"an action":"a loader")+' for route "'+r.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(e){return{type:b.error,result:e}}finally{s&&t.signal.removeEventListener("abort",s)}return i}(t,n,e,o,r,c):Promise.resolve({type:b.data,result:void 0}))})}),m=await e({matches:h,request:n,params:o[0].params,fetcherKey:i,context:c});try{await Promise.all(p)}catch(e){}return m}async function ye(e){let{result:t,type:r}=e;if(Ve(t)){let e;try{let r=t.headers.get("Content-Type");e=r&&/\bapplication\/json\b/.test(r)?null==t.body?null:await t.json():await t.text()}catch(e){return{type:b.error,error:e}}return r===b.error?{type:b.error,error:new $(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:b.data,data:e,statusCode:t.status,headers:t.headers}}var n,a,o,i,s,l,u,c;return r===b.error?Le(t)?t.data instanceof Error?{type:b.error,error:t.data,statusCode:null==(o=t.init)?void 0:o.status,headers:null!=(i=t.init)&&i.headers?new Headers(t.init.headers):void 0}:{type:b.error,error:new $((null==(n=t.init)?void 0:n.status)||500,void 0,t.data),statusCode:K(t)?t.status:void 0,headers:null!=(a=t.init)&&a.headers?new Headers(t.init.headers):void 0}:{type:b.error,error:t,statusCode:K(t)?t.status:void 0}:function(e){let t=e;return t&&"object"==typeof t&&"object"==typeof t.data&&"function"==typeof t.subscribe&&"function"==typeof t.cancel&&"function"==typeof t.resolveData}(t)?{type:b.deferred,deferredData:t,statusCode:null==(s=t.init)?void 0:s.status,headers:(null==(l=t.init)?void 0:l.headers)&&new Headers(t.init.headers)}:Le(t)?{type:b.data,data:t.data,statusCode:null==(u=t.init)?void 0:u.status,headers:null!=(c=t.init)&&c.headers?new Headers(t.init.headers):void 0}:{type:b.data,data:t}}function we(e,t,r,n,a,o){let i=e.headers.get("Location");if(d(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!ae.test(i)){let s=n.slice(0,n.findIndex(e=>e.route.id===r)+1);i=le(new URL(t.url),s,a,!0,i,o),e.headers.set("Location",i)}return e}function Se(e,t,r,n){let a=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(ae.test(e)){let n=e,o=n.startsWith("//")?new URL(t.protocol+n):new URL(n);if(a.includes(o.protocol))throw new Error("Invalid redirect location");let i=null!=F(o.pathname,r);if(o.origin===t.origin&&i)return o.pathname+o.search+o.hash}try{let t=n.createURL(e);if(a.includes(t.protocol))throw new Error("Invalid redirect location")}catch(e){}return e}function _e(e,t,r,n){let a=e.createURL(Te(t)).toString(),o={signal:r};if(n&&Be(n.formMethod)){let{formMethod:e,formEncType:t}=n;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(n.json)):"text/plain"===t?o.body=n.text:"application/x-www-form-urlencoded"===t&&n.formData?o.body=xe(n.formData):o.body=n.formData}return new Request(a,o)}function xe(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,"string"==typeof n?n:n.name);return t}function Oe(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Ae(e,t,r,n,a){let o,i={},s=null,l=!1,u={},c=r&&Fe(r[1])?r[1].error:void 0;return e.forEach(r=>{if(!(r.route.id in t))return;let f=r.route.id,p=t[f];if(d(!je(p),"Cannot handle redirect results in processLoaderData"),Fe(p)){let t=p.error;if(void 0!==c&&(t=c,c=void 0),s=s||{},a)s[f]=t;else{let r=Ce(e,f);null==s[r.route.id]&&(s[r.route.id]=t)}i[f]=void 0,l||(l=!0,o=K(p.error)?p.error.status:500),p.headers&&(u[f]=p.headers)}else De(p)?(n.set(f,p.deferredData),i[f]=p.deferredData.data,null==p.statusCode||200===p.statusCode||l||(o=p.statusCode),p.headers&&(u[f]=p.headers)):(i[f]=p.data,p.statusCode&&200!==p.statusCode&&!l&&(o=p.statusCode),p.headers&&(u[f]=p.headers))}),void 0!==c&&r&&(s={[r[0]]:c},i[r[0]]=void 0),{loaderData:i,errors:s,statusCode:o||200,loaderHeaders:u}}function Re(e,t,r,n,a,o,i){let{loaderData:l,errors:u}=Ae(t,r,n,i,!1);return a.forEach(t=>{let{key:r,match:n,controller:a}=t,i=o[r];if(d(i,"Did not find corresponding fetcher result"),!a||!a.signal.aborted)if(Fe(i)){let t=Ce(e.matches,null==n?void 0:n.route.id);u&&u[t.route.id]||(u=s({},u,{[t.route.id]:i.error})),e.fetchers.delete(r)}else if(je(i))d(!1,"Unhandled fetcher revalidation redirect");else if(De(i))d(!1,"Unhandled fetcher deferred data");else{let t=Ye(i.data);e.fetchers.set(r,t)}}),{loaderData:l,errors:u}}function Ee(e,t,r,n){let a=s({},t);for(let o of r){let r=o.route.id;if(t.hasOwnProperty(r)?void 0!==t[r]&&(a[r]=t[r]):void 0!==e[r]&&o.route.loader&&(a[r]=e[r]),n&&n.hasOwnProperty(r))break}return a}function ke(e){return e?Fe(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ce(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>!0===e.route.hasErrorBoundary)||e[0]}function Ie(e){let t=1===e.length?e[0]:e.find(e=>e.index||!e.path||"/"===e.path)||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Pe(e,t){let{pathname:r,routeId:n,method:a,type:o,message:i}=void 0===t?{}:t,s="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(s="Bad Request",a&&r&&n?l="You made a "+a+' request to "'+r+'" but did not provide a `loader` for route "'+n+'", so there is no way to handle the request.':"defer-action"===o?l="defer() is not supported in actions":"invalid-body"===o&&(l="Unable to encode submission body")):403===e?(s="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):404===e?(s="Not Found",l='No route matches URL "'+r+'"'):405===e&&(s="Method Not Allowed",a&&r&&n?l="You made a "+a.toUpperCase()+' request to "'+r+'" but did not provide an `action` for route "'+n+'", so there is no way to handle the request.':a&&(l='Invalid request method "'+a.toUpperCase()+'"')),new $(e||500,s,new Error(l),!0)}function Me(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[r,n]=t[e];if(je(n))return{key:r,result:n}}}function Te(e){return m(s({},"string"==typeof e?v(e):e,{hash:""}))}function Ne(e){return Ve(e.result)&&X.has(e.result.status)}function De(e){return e.type===b.deferred}function Fe(e){return e.type===b.error}function je(e){return(e&&e.type)===b.redirect}function Le(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function Ve(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function ze(e){return J.has(e.toLowerCase())}function Be(e){return Y.has(e.toLowerCase())}async function Ue(e,t,r,n,a){let o=Object.entries(t);for(let i=0;i(null==e?void 0:e.route.id)===s);if(!u)continue;let c=n.find(e=>e.route.id===u.route.id),d=null!=c&&!pe(c,u)&&void 0!==(a&&a[u.route.id]);De(l)&&d&&await Ge(l,r,!1).then(e=>{e&&(t[s]=e)})}}async function We(e,t,r){for(let n=0;n(null==e?void 0:e.route.id)===o)&&(De(s)&&(d(i,"Expected an AbortController for revalidating fetcher deferred result"),await Ge(s,i.signal,!0).then(e=>{e&&(t[a]=e)})))}}async function Ge(e,t,r){if(void 0===r&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:b.data,data:e.deferredData.unwrappedData}}catch(e){return{type:b.error,error:e}}return{type:b.data,data:e.deferredData.data}}}function He(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function qe(e,t){let r="string"==typeof t?v(t).search:t.search;if(e[e.length-1].route.index&&He(r||""))return e[e.length-1];let n=B(e);return n[n.length-1]}function $e(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(t&&r&&n)return null!=a?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a}:null!=o?{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0}:void 0!==i?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}:void 0}function Ke(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Qe(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Ye(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Ze(){return Ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[r]=e[r]);return a}const Xe="get",et="application/x-www-form-urlencoded";function tt(e){return null!=e&&"string"==typeof e.tagName}function rt(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(e=>[r,e]):[[r,n]])},[]))}let nt=null;const at=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ot(e){return null==e||at.has(e)?e:null}function it(e,t){let r,n,a,o,i;if(tt(s=e)&&"form"===s.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?F(i,t):null,r=e.getAttribute("method")||Xe,a=ot(e.getAttribute("enctype"))||et,o=new FormData(e)}else if(function(e){return tt(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return tt(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a