/*! For license information please see 759-7bec687ceae71c0ffbac.js.LICENSE.txt */ (globalThis.webpackChunkhelphub=globalThis.webpackChunkhelphub||[]).push([[759],{305:(B,j,z)=>{"use strict";z.d(j,{u:()=>useFeatureFlag});var $=z(21728),ee=z(96540);class FeatureFlagScope{static create(B){return new FeatureFlagScope(B)}static merge(B,j){const z=new FeatureFlagScope;for(const[$,ee]of B.flags)z.flags.set($,ee);for(const[$,ee]of j.flags)z.flags.set($,ee);return z}constructor(B={}){this.flags=new Map;for(const[j,z]of Object.entries(B))this.flags.set(j,null!=z&&z)}enable(B){this.flags.set(B,!0)}disable(B){this.flags.set(B,!1)}enabled(B){var j;return null!==(j=this.flags.get(B))&&void 0!==j&&j}}const ae=FeatureFlagScope.create({primer_react_breadcrumbs_overflow_menu:!1,primer_react_css_has_selector_perf:!1,primer_react_select_panel_fullscreen_on_narrow:!1,primer_react_select_panel_order_selected_at_top:!1,primer_react_select_panel_remove_active_descendant:!1,primer_react_spinner_synchronize_animations:!1}),ie=(0,ee.createContext)(ae);function useFeatureFlag(B){const j=(0,$.c)(3),z=(0,ee.useContext)(ie);let ae;return j[0]!==z||j[1]!==B?(ae=z.enabled(B),j[0]=z,j[1]=B,j[2]=ae):ae=j[2],ae}},659:(B,j,z)=>{var $=z(51873),ee=Object.prototype,ae=ee.hasOwnProperty,ie=ee.toString,le=$?$.toStringTag:void 0;B.exports=function getRawTag(B){var j=ae.call(B,le),z=B[le];try{B[le]=void 0;var $=!0}catch(ce){}var ee=ie.call(B);return $&&(j?B[le]=z:delete B[le]),ee}},815:(B,j)=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.default=void 0;var z={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author","contents"],prohibitedProps:[],props:{},relatedConcepts:[{concept:{name:"tbody"},module:"HTML"},{concept:{name:"tfoot"},module:"HTML"},{concept:{name:"thead"},module:"HTML"}],requireContextRole:["grid","table","treegrid"],requiredContextRole:["grid","table","treegrid"],requiredOwnedElements:[["row"]],requiredProps:{},superClass:[["roletype","structure"]]};j.default=z},1148:(B,j,z)=>{"use strict";z.d(j,{I:()=>$});const $=(0,z(96540).createContext)({})},1347:(B,j,z)=>{"use strict";function _typeof(B){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(B){return typeof B}:function(B){return B&&"function"==typeof Symbol&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},_typeof(B)}z.d(j,{A:()=>we});function hasXMLHttpRequest(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":_typeof(XMLHttpRequest))}var $=z(85178),ee=z.t($,2);function ownKeys(B,j){var z=Object.keys(B);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(B);j&&($=$.filter((function(j){return Object.getOwnPropertyDescriptor(B,j).enumerable}))),z.push.apply(z,$)}return z}function _objectSpread(B){for(var j=1;j=1?B.alternateFetch:void 0;try{de(j,ie,$,le)}catch(be){if(!ae||0===Object.keys(ae).length||!be.message||be.message.indexOf("not implemented")<0)return $(be);try{Object.keys(ae).forEach((function(B){delete ie[B]})),de(j,ie,$,le),fe=!0}catch(ye){$(ye)}}}(B,j,z,$):hasXMLHttpRequest()||"function"==typeof ActiveXObject?function requestWithXmlHttpRequest(B,j,z,$){z&&"object"===request_typeof(z)&&(z=ce("",z).slice(1)),B.queryStringParams&&(j=ce(j,B.queryStringParams));try{var ee;(ee=ae?new ae:new ie("MSXML2.XMLHTTP.3.0")).open(z?"POST":"GET",j,1),B.crossDomain||ee.setRequestHeader("X-Requested-With","XMLHttpRequest"),ee.withCredentials=!!B.withCredentials,z&&ee.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),ee.overrideMimeType&&ee.overrideMimeType("application/json");var le=B.customHeaders;if(le="function"==typeof le?le():le)for(var de in le)ee.setRequestHeader(de,le[de]);ee.onreadystatechange=function(){ee.readyState>3&&$(ee.status>=400?ee.statusText:null,{status:ee.status,data:ee.responseText})},ee.send(z)}catch(fe){console}}(B,j,z,$):void $(new Error("No fetch and no xhr implementation found!"))};function esm_typeof(B){return esm_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(B){return typeof B}:function(B){return B&&"function"==typeof Symbol&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},esm_typeof(B)}function esm_ownKeys(B,j){var z=Object.keys(B);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(B);j&&($=$.filter((function(j){return Object.getOwnPropertyDescriptor(B,j).enumerable}))),z.push.apply(z,$)}return z}function esm_objectSpread(B){for(var j=1;j1&&void 0!==arguments[1]?arguments[1]:{},z=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function _classCallCheck(B,j){if(!(B instanceof j))throw new TypeError("Cannot call a class as a function")}(this,Backend),this.services=B,this.options=j,this.allOptions=z,this.type="backend",this.init(B,j,z)}),[{key:"init",value:function init(B){var j=this,z=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},$=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.services=B,this.options=esm_objectSpread(esm_objectSpread(esm_objectSpread({},function getDefaults(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function parse(B){return JSON.parse(B)},stringify:JSON.stringify,parsePayload:function parsePayload(B,j,z){return esm_defineProperty({},j,z||"")},parseLoadPayload:function parseLoadPayload(B,j){},request:be,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}}()),this.options||{}),z),this.allOptions=$,this.services&&this.options.reloadInterval){var ee=setInterval((function(){return j.reload()}),this.options.reloadInterval);"object"===esm_typeof(ee)&&"function"==typeof ee.unref&&ee.unref()}}},{key:"readMulti",value:function readMulti(B,j,z){this._readAny(B,B,j,j,z)}},{key:"read",value:function read(B,j,z){this._readAny([B],B,[j],j,z)}},{key:"_readAny",value:function _readAny(B,j,z,$,ee){var ae=this,ie=this.options.loadPath;"function"==typeof this.options.loadPath&&(ie=this.options.loadPath(B,z)),(ie=function makePromise(B){return function isPromise(B){return!!B&&"function"==typeof B.then}(B)?B:Promise.resolve(B)}(ie)).then((function(ie){if(!ie)return ee(null,{});var le=ae.services.interpolator.interpolate(ie,{lng:B.join("+"),ns:z.join("+")});ae.loadUrl(le,ee,j,$)}))}},{key:"loadUrl",value:function loadUrl(B,j,z,$){var ee=this,ae="string"==typeof z?[z]:z,ie="string"==typeof $?[$]:$,le=this.options.parseLoadPayload(ae,ie);this.options.request(this.options,B,le,(function(ae,ie){if(ie&&(ie.status>=500&&ie.status<600||!ie.status))return j("failed loading "+B+"; status code: "+ie.status,!0);if(ie&&ie.status>=400&&ie.status<500)return j("failed loading "+B+"; status code: "+ie.status,!1);if(!ie&&ae&&ae.message){var le=ae.message.toLowerCase();if(["failed","fetch","network","load"].find((function(B){return le.indexOf(B)>-1})))return j("failed loading "+B+": "+ae.message,!0)}if(ae)return j(ae,!1);var ce,de;try{ce="string"==typeof ie.data?ee.options.parse(ie.data,z,$):ie.data}catch(fe){de="failed parsing "+B+" to json"}if(de)return j(de,!1);j(null,ce)}))}},{key:"create",value:function create(B,j,z,$,ee){var ae=this;if(this.options.addPath){"string"==typeof B&&(B=[B]);var ie=this.options.parsePayload(j,z,$),le=0,ce=[],de=[];B.forEach((function(z){var $=ae.options.addPath;"function"==typeof ae.options.addPath&&($=ae.options.addPath(z,j));var fe=ae.services.interpolator.interpolate($,{lng:z,ns:j});ae.options.request(ae.options,fe,ie,(function(j,z){le+=1,ce.push(j),de.push(z),le===B.length&&"function"==typeof ee&&ee(ce,de)}))}))}}},{key:"reload",value:function reload(){var B=this,j=this.services,z=j.backendConnector,$=j.languageUtils,ee=j.logger,ae=z.language;if(!ae||"cimode"!==ae.toLowerCase()){var ie=[],le=function append(B){$.toResolveHierarchy(B).forEach((function(B){ie.indexOf(B)<0&&ie.push(B)}))};le(ae),this.allOptions.preload&&this.allOptions.preload.forEach((function(B){return le(B)})),ie.forEach((function(j){B.allOptions.ns.forEach((function(B){z.read(j,B,"read",null,null,(function($,ae){$&&ee.warn("loading namespace ".concat(B," for language ").concat(j," failed"),$),!$&&ae&&ee.log("loaded namespace ".concat(B," for language ").concat(j),ae),z.loaded("".concat(j,"|").concat(B),$,ae)}))}))}))}}}]);ye.type="backend";const we=ye},1733:B=>{var j=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;B.exports=function asciiWords(B){return B.match(j)||[]}},1782:(B,j)=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.default=void 0;var z={abstract:!1,accessibleNameRequired:!1,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-disabled":null,"aria-errormessage":null,"aria-expanded":null,"aria-haspopup":null,"aria-invalid":null},relatedConcepts:[{concept:{name:"notice [EPUB-SSV]"},module:"EPUB"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","structure","section","note"]]};j.default=z},1871:(B,j,z)=>{"use strict";z.d(j,{A:()=>Pt});var $,ee,ae,ie,le,ce,de,fe,be,ye,we,Se,Te,Re,He,ze,qe,$e,We,tt,rt,nt=z(21728),ot=z(96540),__classPrivateFieldSet=function(B,j,z,$,ee){if("m"===$)throw new TypeError("Private method is not writable");if("a"===$&&!ee)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof j?B!==j||!ee:!j.has(B))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===$?ee.call(B,z):ee?ee.value=z:j.set(B,z),z},__classPrivateFieldGet=function(B,j,z,$){if("a"===z&&!$)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof j?B!==j||!$:!j.has(B))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===z?$:"a"===z?$.call(B):$?$.value:j.get(B)},__rest=function(B,j){var z={};for(var $ in B)Object.prototype.hasOwnProperty.call(B,$)&&j.indexOf($)<0&&(z[$]=B[$]);if(null!=B&&"function"==typeof Object.getOwnPropertySymbols){var ee=0;for($=Object.getOwnPropertySymbols(B);ee<$.length;ee++)j.indexOf($[ee])<0&&Object.prototype.propertyIsEnumerable.call(B,$[ee])&&(z[$[ee]]=B[$[ee]])}return z};const at=globalThis.HTMLElement||null,it="assign"in((null===($=globalThis.HTMLSlotElement)||void 0===$?void 0:$.prototype)||{})?(B,...j)=>{B.assign(...j)}:(B,...j)=>{const z=B.getRootNode().host;for(const $ of z.querySelectorAll(`[slot="${B.name}"]`))$.removeAttribute("slot");for(const $ of j)$.setAttribute("slot",B.name)};class TabContainerChangeEvent extends Event{constructor(B,j){var{tabIndex:z,tab:$,panel:le}=j;super(B,__rest(j,["tabIndex","tab","panel"])),ee.set(this,null),ae.set(this,null),ie.set(this,null),__classPrivateFieldSet(this,ie,$||null,"f"),__classPrivateFieldSet(this,ee,z||null,"f"),__classPrivateFieldSet(this,ae,le||null,"f")}get detail(){return{relatedTarget:__classPrivateFieldGet(this,ae,"f")}}get tabIndex(){return __classPrivateFieldGet(this,ee,"f")}get panel(){return __classPrivateFieldGet(this,ae,"f")}get tab(){return __classPrivateFieldGet(this,ie,"f")}}ee=new WeakMap,ae=new WeakMap,ie=new WeakMap;class tab_container_element_TabContainerElement extends at{constructor(){super(...arguments),le.add(this),ce.set(this,null),de.set(this,null),qe.set(this,!1),$e.set(this,void 0)}static define(B="tab-container",j=customElements){return j.define(B,this),this}get onChange(){return this.onTabContainerChange}set onChange(B){this.onTabContainerChange=B}get onTabContainerChange(){return __classPrivateFieldGet(this,ce,"f")}set onTabContainerChange(B){__classPrivateFieldGet(this,ce,"f")&&this.removeEventListener("tab-container-change",__classPrivateFieldGet(this,ce,"f")),__classPrivateFieldSet(this,ce,"object"==typeof B||"function"==typeof B?B:null,"f"),"function"==typeof B&&this.addEventListener("tab-container-change",B)}get onTabContainerChanged(){return __classPrivateFieldGet(this,de,"f")}set onTabContainerChanged(B){__classPrivateFieldGet(this,de,"f")&&this.removeEventListener("tab-container-changed",__classPrivateFieldGet(this,de,"f")),__classPrivateFieldSet(this,de,"object"==typeof B||"function"==typeof B?B:null,"f"),"function"==typeof B&&this.addEventListener("tab-container-changed",B)}get onChanged(){return this.onTabContainerChanged}set onChanged(B){this.onTabContainerChanged=B}get activeTab(){return __classPrivateFieldGet(this,le,"a",ze)[this.selectedTabIndex]}get activePanel(){return __classPrivateFieldGet(this,le,"a",He).assignedNodes()[0]}get vertical(){var B;return"vertical"===(null===(B=__classPrivateFieldGet(this,le,"a",fe))||void 0===B?void 0:B.getAttribute("aria-orientation"))}set vertical(B){const j=__classPrivateFieldGet(this,le,"a",fe);j&&B?j.setAttribute("aria-orientation","vertical"):j.setAttribute("aria-orientation","horizontal")}connectedCallback(){__classPrivateFieldSet(this,$e,__classPrivateFieldGet(this,$e,"f")||(this.attachInternals?this.attachInternals():null),"f");const B=this.shadowRoot||this.attachShadow({mode:"open",slotAssignment:"manual"}),j=document.createElement("slot");j.style.display="flex",j.setAttribute("part","tablist-wrapper"),j.setAttribute("name","tablist-wrapper");const z=document.createElement("div");z.setAttribute("part","tablist-tab-wrapper"),z.setAttribute("name","tablist-tab-wrapper");const $=document.createElement("slot");$.setAttribute("part","tablist"),$.setAttribute("name","tablist"),z.append($);const ee=document.createElement("slot");ee.setAttribute("part","panel"),ee.setAttribute("name","panel");const ae=document.createElement("slot");ae.setAttribute("part","before-tabs"),ae.setAttribute("name","before-tabs");const ie=document.createElement("slot");ie.setAttribute("part","after-tabs"),ie.setAttribute("name","after-tabs"),j.append(ae,z,ie);const le=document.createElement("slot");if(le.setAttribute("part","after-panels"),le.setAttribute("name","after-panels"),B.replaceChildren(j,ee,le),__classPrivateFieldGet(this,$e,"f")&&"role"in __classPrivateFieldGet(this,$e,"f")?__classPrivateFieldGet(this,$e,"f").role="presentation":this.setAttribute("role","presentation"),this.addEventListener("keydown",this),this.addEventListener("click",this),this.selectTab(-1),!__classPrivateFieldGet(this,qe,"f")){const B=new MutationObserver((()=>{this.selectTab(-1),__classPrivateFieldGet(this,qe,"f")&&B.disconnect()}));B.observe(this,{childList:!0,subtree:!0})}}attributeChangedCallback(B){this.isConnected&&this.shadowRoot&&"vertical"===B&&(this.vertical=this.hasAttribute("vertical"))}handleEvent(B){return"click"===B.type?__classPrivateFieldGet(this,le,"m",tt).call(this,B):"keydown"===B.type?__classPrivateFieldGet(this,le,"m",We).call(this,B):void 0}get selectedTabIndex(){return __classPrivateFieldGet(this,le,"a",ze).findIndex((B=>B.matches("[aria-selected=true]")))}set selectedTabIndex(B){this.selectTab(B)}get defaultTabIndex(){return Number(this.getAttribute("default-tab")||-1)}set defaultTabIndex(B){this.setAttribute("default-tab",String(B))}selectTab(B){var j;if(!__classPrivateFieldGet(this,qe,"f")){const z=__classPrivateFieldGet(this,le,"a",Re),$=__classPrivateFieldGet(this,le,"a",be),ee=this.querySelector("[role=tablist]"),ae=this.querySelector("[slot=tablist-wrapper]");ae&&ae.closest(this.tagName)===this?it($,ae):ee&&ee.closest(this.tagName)===this?it(z,ee):(__classPrivateFieldGet(this,le,"a",ye).role="tablist",it(z,...[...this.children].filter((B=>B.matches("[role=tab]")))));const ie=__classPrivateFieldGet(this,le,"a",fe);__classPrivateFieldGet(this,le,"m",rt).call(this,"aria-description",ie),__classPrivateFieldGet(this,le,"m",rt).call(this,"aria-label",ie),this.vertical&&__classPrivateFieldGet(this,le,"a",fe).setAttribute("aria-orientation","vertical");if(!((null===(j=this.querySelector("[slot=tablist-wrapper]"))||void 0===j?void 0:j.closest(this.tagName))===this)){const B=[],j=[],z=[];let $=B;for(const ee of this.children)"tab"!==ee.getAttribute("role")&&"tablist"!==ee.getAttribute("role")?"tabpanel"!==ee.getAttribute("role")?"before-tabs"===ee.getAttribute("slot")?B.push(ee):"after-tabs"===ee.getAttribute("slot")?j.push(ee):$.push(ee):$=z:$=j;it(__classPrivateFieldGet(this,le,"a",we),...B),it(__classPrivateFieldGet(this,le,"a",Se),...j),it(__classPrivateFieldGet(this,le,"a",Te),...z)}const ce=this.defaultTabIndex,de=ce>=0?ce:this.selectedTabIndex;B=B>=0?B:Math.max(0,de)}const z=__classPrivateFieldGet(this,le,"a",ze),$=Array.from(this.querySelectorAll('[role="tabpanel"]')).filter((B=>B.closest(this.tagName)===this));if(B>z.length-1)return;const ee=z[B],ae=$[B];if(ee&&ae){if(__classPrivateFieldGet(this,qe,"f")){if(!this.dispatchEvent(new TabContainerChangeEvent("tab-container-change",{tabIndex:B,bubbles:!0,cancelable:!0,tab:ee,panel:ae})))return}for(const B of z)B.setAttribute("aria-selected","false"),B.setAttribute("tabindex","-1");for(const B of $)B.hasAttribute("tabindex")||B.hasAttribute("data-tab-container-no-tabstop")||B.setAttribute("tabindex","0");ee.setAttribute("aria-selected","true"),ee.setAttribute("tabindex","0"),it(__classPrivateFieldGet(this,le,"a",He),ae),ae.hidden=!1,__classPrivateFieldGet(this,qe,"f")&&(ee.focus(),this.dispatchEvent(new TabContainerChangeEvent("tab-container-changed",{tabIndex:B,bubbles:!0,tab:ee,panel:ae}))),__classPrivateFieldSet(this,qe,!0,"f")}}}ce=new WeakMap,de=new WeakMap,qe=new WeakMap,$e=new WeakMap,le=new WeakSet,fe=function _TabContainerElement_tabList_get(){const B=this.querySelector("[slot=tablist-wrapper]");if((null==B?void 0:B.closest(this.tagName))===this)return B.querySelector("[role=tablist]");const j=__classPrivateFieldGet(this,le,"a",Re);return __classPrivateFieldGet(this,le,"a",ye).hasAttribute("role")?__classPrivateFieldGet(this,le,"a",ye):j.assignedNodes()[0]},be=function _TabContainerElement_tabListWrapper_get(){return this.shadowRoot.querySelector('slot[part="tablist-wrapper"]')},ye=function _TabContainerElement_tabListTabWrapper_get(){return this.shadowRoot.querySelector('div[part="tablist-tab-wrapper"]')},we=function _TabContainerElement_beforeTabsSlot_get(){return this.shadowRoot.querySelector('slot[part="before-tabs"]')},Se=function _TabContainerElement_afterTabsSlot_get(){return this.shadowRoot.querySelector('slot[part="after-tabs"]')},Te=function _TabContainerElement_afterPanelsSlot_get(){return this.shadowRoot.querySelector('slot[part="after-panels"]')},Re=function _TabContainerElement_tabListSlot_get(){return this.shadowRoot.querySelector('slot[part="tablist"]')},He=function _TabContainerElement_panelSlot_get(){return this.shadowRoot.querySelector('slot[part="panel"]')},ze=function _TabContainerElement_tabs_get(){var B;return __classPrivateFieldGet(this,le,"a",ye).matches("[role=tablist]")?__classPrivateFieldGet(this,le,"a",Re).assignedNodes():Array.from((null===(B=__classPrivateFieldGet(this,le,"a",fe))||void 0===B?void 0:B.querySelectorAll('[role="tab"]'))||[]).filter((B=>B instanceof at&&B.closest(this.tagName)===this))},We=function _TabContainerElement_handleKeydown(B){var j,z,$;const ee=null===(z=null===(j=B.target)||void 0===j?void 0:j.closest)||void 0===z?void 0:z.call(j,'[role="tab"]');if(!ee)return;const ae=__classPrivateFieldGet(this,le,"a",ze);if(!ae.includes(ee))return;const ie=this.selectedTabIndex,ce="vertical"===(null===($=ee.closest('[role="tablist"]'))||void 0===$?void 0:$.getAttribute("aria-orientation")),de="ArrowLeft"===B.code||ce&&"ArrowUp"===B.code;if("ArrowRight"===B.code||ce&&"ArrowDown"===B.code){let B=ie+1;B>=ae.length&&(B=0),this.selectTab(B)}else if(de){let B=ie-1;B<0&&(B=ae.length-1),this.selectTab(B)}else"Home"===B.code?(this.selectTab(0),B.preventDefault()):"End"===B.code&&(this.selectTab(ae.length-1),B.preventDefault())},tt=function _TabContainerElement_handleClick(B){var j,z;const $=null===(z=null===(j=B.target)||void 0===j?void 0:j.closest)||void 0===z?void 0:z.call(j,"[role=tab]");if(!$)return;const ee=__classPrivateFieldGet(this,le,"a",ze).indexOf($);ee>=0&&this.selectTab(ee)},rt=function _TabContainerElement_reflectAttributeToShadow(B,j){this.hasAttribute(B)&&(j.setAttribute(B,this.getAttribute(B)),this.removeAttribute(B))},tab_container_element_TabContainerElement.observedAttributes=["vertical"];const lt="undefined"!=typeof globalThis?globalThis:window;try{lt.TabContainerElement=tab_container_element_TabContainerElement.define()}catch(Ot){if(!(lt.DOMException&&Ot instanceof DOMException&&"NotSupportedError"===Ot.name||Ot instanceof ReferenceError))throw Ot}var st=z(31507),ct=z(27535),dt=z(93330),ut=z(50463),mt="prc-UnderlinePanels-StyledUnderlineWrapper-aiLna",ft=z(34164),ht=z(15197),xt=z(74848),Bt=z(49021);const wt=(0,st.a)(tab_container_element_TabContainerElement,"tab-container"),UnderlinePanels=({"aria-label":B,"aria-labelledby":j,children:z,loadingCounters:$,className:ee,...ae})=>{const[ie,le]=(0,ot.useState)(!0),ce=(0,ot.useRef)(null),de=(0,ot.useRef)(null),fe=(0,Bt.B)(ae.id),[be,ye]=(0,ot.useState)([]),[we,Se]=(0,ot.useState)([]);(0,ot.useEffect)((()=>{let B=0,j=0;const ee=ot.Children.map(z,(z=>{if((0,ot.isValidElement)(z)&&(z.type===Tab||(0,ht.R)(z,Tab)))return(0,ot.cloneElement)(z,{id:`${fe}-tab-${B++}`,loadingCounters:$,iconsVisible:ie});if((0,ot.isValidElement)(z)&&(z.type===Panel||(0,ht.R)(z,Panel))){const B=z;return(0,ot.cloneElement)(B,{"aria-labelledby":`${fe}-tab-${j++}`})}return z})),ae=ot.Children.toArray(ee).filter((B=>(0,ot.isValidElement)(B)&&(B.type===Tab||(0,ht.R)(B,Tab)))),le=ot.Children.toArray(ee).filter((B=>(0,ot.isValidElement)(B)&&(B.type===Panel||(0,ht.R)(B,Panel))));ye(ae),Se(le)}),[z,fe,$,ie]);const Te=be.some((B=>ot.isValidElement(B)&&B.props.icon)),[Re,He]=(0,ot.useState)(0);return(0,ut.A)((()=>{var B,j;Te&&He(null!==(B=null===(j=de.current)||void 0===j?void 0:j.getBoundingClientRect().width)&&void 0!==B?B:0)}),[Te]),(0,dt.w)((B=>{if(!Te)return;const j=B[0].contentRect.width;le(j>Re)}),ce,[]),(0,xt.jsxs)(wt,{children:[(0,xt.jsx)(ct.Eg,{ref:ce,slot:"tablist-wrapper","data-icons-visible":ie,className:(0,ft.$)(ee,mt),...ae,children:(0,xt.jsx)(ct.mw,{ref:de,"aria-label":B,"aria-labelledby":j,role:"tablist",children:be})}),we]})};UnderlinePanels.displayName="UnderlinePanels";const Tab=B=>{const j=(0,nt.c)(14);let z,$,ee,ae;j[0]!==B?(({"aria-selected":z,onSelect:$,...ee}=B),j[0]=B,j[1]=z,j[2]=$,j[3]=ee):(z=j[1],$=j[2],ee=j[3]),j[4]!==$?(ae=B=>{B.defaultPrevented||"function"!=typeof $||$(B)},j[4]=$,j[5]=ae):ae=j[5];const ie=ae;let le;j[6]!==$?(le=B=>{" "!==B.key&&"Enter"!==B.key||B.defaultPrevented||"function"!=typeof $||$(B)},j[6]=$,j[7]=le):le=j[7];const ce=le,de=z?0:-1;let fe;return j[8]!==z||j[9]!==ie||j[10]!==ce||j[11]!==ee||j[12]!==de?(fe=(0,xt.jsx)(ct.ug,{as:"button",role:"tab",tabIndex:de,"aria-selected":z,type:"button",onClick:ie,onKeyDown:ce,...ee}),j[8]=z,j[9]=ie,j[10]=ce,j[11]=ee,j[12]=de,j[13]=fe):fe=j[13],fe};Tab.displayName="UnderlinePanels.Tab";const Panel=B=>{const j=(0,nt.c)(6);let z,$,ee;return j[0]!==B?(({children:z,...$}=B),j[0]=B,j[1]=z,j[2]=$):(z=j[1],$=j[2]),j[3]!==z||j[4]!==$?(ee=(0,xt.jsx)("div",{role:"tabpanel",...$,children:z}),j[3]=z,j[4]=$,j[5]=ee):ee=j[5],ee};Panel.displayName="UnderlinePanels.Panel";var Pt=Object.assign(UnderlinePanels,{Panel,Tab});UnderlinePanels.__SLOT__=Symbol("UnderlinePanels"),Tab.__SLOT__=Symbol("UnderlinePanels.Tab"),Panel.__SLOT__=Symbol("UnderlinePanels.Panel")},1980:(B,j)=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.default=void 0;var z={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!0,nameFrom:["author","contents"],prohibitedProps:[],props:{"aria-disabled":null,"aria-expanded":null,"aria-haspopup":null,"aria-pressed":null},relatedConcepts:[{concept:{attributes:[{name:"type",value:"button"}],name:"input"},module:"HTML"},{concept:{attributes:[{name:"type",value:"image"}],name:"input"},module:"HTML"},{concept:{attributes:[{name:"type",value:"reset"}],name:"input"},module:"HTML"},{concept:{attributes:[{name:"type",value:"submit"}],name:"input"},module:"HTML"},{concept:{name:"button"},module:"HTML"},{concept:{name:"trigger"},module:"XForms"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","command"]]};j.default=z},2096:(B,j,z)=>{"use strict";z.d(j,{A:()=>CheckboxOrRadioGroupLabel});var $=z(96540),ee=z(79933),ae=z(87933),ie=z(94857),le=z(46251),ce=z(34164),de=z(74848);const CheckboxOrRadioGroupLabel=({children:B,className:j,visuallyHidden:z=!1})=>{const{required:fe,disabled:be}=$.useContext(ae.A);return(0,de.jsx)(ee.A,{className:(0,ce.$)(j,ie.A.RadioGroupLabel),isVisible:!z,title:fe?"required field":void 0,"data-label-disabled":be?"":void 0,children:fe?(0,de.jsxs)(le.B,{direction:"horizontal",gap:"none",children:[(0,de.jsx)("div",{className:ie.A.GroupLabelChildren,children:B}),(0,de.jsx)("span",{children:"*"})]}):B})};CheckboxOrRadioGroupLabel.displayName="CheckboxOrRadioGroupLabel",CheckboxOrRadioGroupLabel.__SLOT__=Symbol("CheckboxOrRadioGroupLabel")},2604:(B,j,z)=>{"use strict";z.d(j,{u:()=>Te});var $=z(96540),ee=z(21513),ae=z(18630),ie=z(34164),le=z(54351),ce=z(44363),de=z(74848),fe=z(49021),be=z(48211),ye=z(40949),we=z(16976),Se=z(26928);const renderModuleVisual=(B,j,z,$)=>(0,de.jsx)("span",{"data-component":z,className:(0,ie.$)(!$&&le.A.Visual,j?le.A.LoadingSpinner:le.A.VisualWrap),children:j?(0,de.jsx)(be.A,{size:"small"}):(0,ce.isElement)(B)?B:(0,de.jsx)(B,{})});renderModuleVisual.displayName="renderModuleVisual";const Te=(0,$.forwardRef)((({children:B,as:j="button",...z},Te)=>{const{leadingVisual:Re,trailingVisual:He,trailingAction:ze,"aria-describedby":qe,"aria-labelledby":$e,count:We,icon:tt,id:rt,variant:nt="default",size:ot="medium",alignContent:at="center",block:it=!1,loading:lt,loadingAnnouncement:st="Loading",inactive:ct,onClick:dt,labelWrap:ut,className:mt,...ft}=z,ht=$.useRef(null);(0,ee.T)(Te,ht);const xt=(0,fe.B)(rt),Bt=`${xt}-loading-announcement`,wt=lt?[Bt,qe]:[qe];return(0,de.jsxs)(ae.e,{if:void 0!==lt,className:it?le.A.ConditionalWrapper:void 0,"data-loading-wrapper":!0,children:[(0,de.jsx)(j,{"aria-disabled":!!lt||void 0,...ft,ref:ht,className:(0,ie.$)(le.A.ButtonBase,mt),"data-block":it?"block":null,"data-inactive":!!ct||void 0,"data-loading":Boolean(lt),"data-no-visuals":!(Re||He||ze)||void 0,"data-size":ot,"data-variant":nt,"data-label-wrap":ut,"data-has-count":void 0!==We||void 0,"aria-describedby":wt.filter((B=>Boolean(B))).join(" ")||void 0,"aria-labelledby":lt?[`${xt}-label`,$e].filter((B=>Boolean(B))).join(" "):$e,id:rt,onClick:lt?void 0:dt,children:tt?lt?(0,de.jsx)(be.A,{size:"small"}):(0,ce.isElement)(tt)?tt:(0,de.jsx)(tt,{}):(0,de.jsxs)(de.Fragment,{children:[(0,de.jsxs)("span",{"data-component":"buttonContent","data-align":at,className:le.A.ButtonContent,children:[lt&&!Re&&!He&&!ze&&void 0===We&&renderModuleVisual(be.A,lt,"loadingSpinner",!1),Re&&renderModuleVisual(Re,Boolean(lt),"leadingVisual",!1),B&&(0,de.jsx)("span",{"data-component":"text",className:le.A.Label,id:lt?`${xt}-label`:void 0,children:B}),void 0===We||He?He?renderModuleVisual(He,Boolean(lt)&&!Re,"trailingVisual",!1):null:renderModuleVisual((()=>(0,de.jsx)(Se.A,{className:le.A.CounterLabel,"data-component":"ButtonCounter",children:We})),Boolean(lt)&&!Re,"trailingVisual",!0)]}),ze&&renderModuleVisual(ze,Boolean(lt)&&!Re&&!He,"trailingAction",!1)]})}),lt&&(0,de.jsx)(ye.s,{children:(0,de.jsx)(we.u,{id:Bt,children:st})})]})}))},2694:(B,j,z)=>{"use strict";var $=z(6925);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,B.exports=function(){function shim(B,j,z,ee,ae,ie){if(ie!==$){var le=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw le.name="Invariant Violation",le}}function getShim(){return shim}shim.isRequired=shim;var B={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return B.PropTypes=B,B}},2778:(B,j)=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.default=void 0;var z={abstract:!1,accessibleNameRequired:!0,baseConcepts:[],childrenPresentational:!1,nameFrom:["author"],prohibitedProps:[],props:{"aria-activedescendant":null,"aria-autocomplete":null,"aria-errormessage":null,"aria-haspopup":null,"aria-invalid":null,"aria-multiline":null,"aria-placeholder":null,"aria-readonly":null,"aria-required":null},relatedConcepts:[{concept:{attributes:[{constraints:["undefined"],name:"type"},{constraints:["undefined"],name:"list"}],constraints:["the list attribute is not set"],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["undefined"],name:"list"},{name:"type",value:"email"}],constraints:["the list attribute is not set"],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["undefined"],name:"list"},{name:"type",value:"tel"}],constraints:["the list attribute is not set"],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["undefined"],name:"list"},{name:"type",value:"text"}],constraints:["the list attribute is not set"],name:"input"},module:"HTML"},{concept:{attributes:[{constraints:["undefined"],name:"list"},{name:"type",value:"url"}],constraints:["the list attribute is not set"],name:"input"},module:"HTML"},{concept:{name:"input"},module:"XForms"},{concept:{name:"textarea"},module:"HTML"}],requireContextRole:[],requiredContextRole:[],requiredOwnedElements:[],requiredProps:{},superClass:[["roletype","widget","input"]]};j.default=z},2833:B=>{B.exports=function shallowEqual(B,j,z,$){var ee=z?z.call($,B,j):void 0;if(void 0!==ee)return!!ee;if(B===j)return!0;if("object"!=typeof B||!B||"object"!=typeof j||!j)return!1;var ae=Object.keys(B),ie=Object.keys(j);if(ae.length!==ie.length)return!1;for(var le=Object.prototype.hasOwnProperty.bind(j),ce=0;ce{"use strict";z.d(j,{E:()=>ae,X:()=>ee});var $=z(96540);const ee=$.createContext({}),ae=$.createContext({})},3433:(B,j,z)=>{"use strict";var $;z.d(j,{C5:()=>Navigate,Ew:()=>useRouteLoaderData,LG:()=>useLoaderData,N_:()=>Mr,V2:()=>redirect,Ys:()=>createBrowserRouter,Zp:()=>useNavigate,aB:()=>le,g:()=>useParams,jD:()=>Await,k2:()=>Or,of:()=>useSubmit,ok:()=>useSearchParams,pg:()=>RouterProvider,q6:()=>createContext,sv:()=>Outlet,wQ:()=>useNavigationType,zy:()=>useLocation});var ee,ae=z(96540),__typeError=B=>{throw TypeError(B)},__privateGet=(B,j,z)=>(((B,j,z)=>{j.has(B)||__typeError("Cannot "+z)})(B,j,"read from private field"),z?z.call(B):j.get(B)),ie="popstate";function createBrowserHistory(B={}){return getUrlBasedHistory((function createBrowserLocation(B,j){let{pathname:z,search:$,hash:ee}=B.location;return createLocation("",{pathname:z,search:$,hash:ee},j.state&&j.state.usr||null,j.state&&j.state.key||"default")}),(function createBrowserHref(B,j){return"string"==typeof j?j:createPath(j)}),null,B)}function invariant(B,j){if(!1===B||null==B)throw new Error(j)}function warning(B,j){if(!B)try{throw new Error(j)}catch(z){}}function getHistoryState(B,j){return{usr:B.state,key:B.key,idx:j}}function createLocation(B,j,z=null,$){return{pathname:"string"==typeof B?B:B.pathname,search:"",hash:"",..."string"==typeof j?parsePath(j):j,state:z,key:j&&j.key||$||Math.random().toString(36).substring(2,10)}}function createPath({pathname:B="/",search:j="",hash:z=""}){return j&&"?"!==j&&(B+="?"===j.charAt(0)?j:"?"+j),z&&"#"!==z&&(B+="#"===z.charAt(0)?z:"#"+z),B}function parsePath(B){let j={};if(B){let z=B.indexOf("#");z>=0&&(j.hash=B.substring(z),B=B.substring(0,z));let $=B.indexOf("?");$>=0&&(j.search=B.substring($),B=B.substring(0,$)),B&&(j.pathname=B)}return j}function getUrlBasedHistory(B,j,z,$={}){let{window:ee=document.defaultView,v5Compat:ae=!1}=$,le=ee.history,ce="POP",de=null,fe=getIndex();function getIndex(){return(le.state||{idx:null}).idx}function handlePop(){ce="POP";let B=getIndex(),j=null==B?null:B-fe;fe=B,de&&de({action:ce,location:be.location,delta:j})}function createURL(B){return createBrowserURLImpl(B)}null==fe&&(fe=0,le.replaceState({...le.state,idx:fe},""));let be={get action(){return ce},get location(){return B(ee,le)},listen(B){if(de)throw new Error("A history only accepts one active listener");return ee.addEventListener(ie,handlePop),de=B,()=>{ee.removeEventListener(ie,handlePop),de=null}},createHref:B=>j(ee,B),createURL,encodeLocation(B){let j=createURL(B);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:function push(B,j){ce="PUSH";let $=createLocation(be.location,B,j);z&&z($,B),fe=getIndex()+1;let ie=getHistoryState($,fe),ye=be.createHref($);try{le.pushState(ie,"",ye)}catch(we){if(we instanceof DOMException&&"DataCloneError"===we.name)throw we;ee.location.assign(ye)}ae&&de&&de({action:ce,location:be.location,delta:1})},replace:function replace2(B,j){ce="REPLACE";let $=createLocation(be.location,B,j);z&&z($,B),fe=getIndex();let ee=getHistoryState($,fe),ie=be.createHref($);le.replaceState(ee,"",ie),ae&&de&&de({action:ce,location:be.location,delta:0})},go:B=>le.go(B)};return be}function createBrowserURLImpl(B,j=!1){let z="http://localhost";"undefined"!=typeof window&&(z="null"!==window.location.origin?window.location.origin:window.location.href),invariant(z,"No window.location.(origin|href) available to create URL");let $="string"==typeof B?B:createPath(B);return $=$.replace(/ $/,"%20"),!j&&$.startsWith("//")&&($=z+$),new URL($,z)}function createContext(B){return{defaultValue:B}}var le=class{constructor(B){var j,z,$;if(j=this,z=ee,$=new Map,z.has(j)?__typeError("Cannot add the same private member more than once"):z instanceof WeakSet?z.add(j):z.set(j,$),B)for(let[ee,ae]of B)this.set(ee,ae)}get(B){if(__privateGet(this,ee).has(B))return __privateGet(this,ee).get(B);if(void 0!==B.defaultValue)return B.defaultValue;throw new Error("No value found for context")}set(B,j){__privateGet(this,ee).set(B,j)}};ee=new WeakMap;var ce=new Set(["lazy","caseSensitive","path","id","index","children"]);var de=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function convertRoutesToDataRoutes(B,j,z=[],$={},ee=!1){return B.map(((B,ae)=>{let ie=[...z,String(ae)],le="string"==typeof B.id?B.id:ie.join("-");if(invariant(!0!==B.index||!B.children,"Cannot specify children on an index route"),invariant(ee||!$[le],`Found a route id collision on id "${le}". Route id's must be globally unique within Data Router usages`),function isIndexRoute(B){return!0===B.index}(B)){let z={...B,id:le};return $[le]=mergeRouteUpdates(z,j(z)),z}{let z={...B,id:le,children:void 0};return $[le]=mergeRouteUpdates(z,j(z)),B.children&&(z.children=convertRoutesToDataRoutes(B.children,j,ie,$,ee)),z}}))}function mergeRouteUpdates(B,j){return Object.assign(B,{...j,..."object"==typeof j.lazy&&null!=j.lazy?{lazy:{...B.lazy,...j.lazy}}:{}})}function matchRoutes(B,j,z="/"){return matchRoutesImpl(B,j,z,!1)}function matchRoutesImpl(B,j,z,$){let ee=stripBasename(("string"==typeof j?parsePath(j):j).pathname||"/",z);if(null==ee)return null;let ae=flattenRoutes(B);!function rankRouteBranches(B){B.sort(((B,j)=>B.score!==j.score?j.score-B.score:function compareIndexes(B,j){let z=B.length===j.length&&B.slice(0,-1).every(((B,z)=>B===j[z]));return z?B[B.length-1]-j[j.length-1]:0}(B.routesMeta.map((B=>B.childrenIndex)),j.routesMeta.map((B=>B.childrenIndex)))))}(ae);let ie=null;for(let le=0;null==ie&&le{let ce={relativePath:void 0===le?B.path||"":le,caseSensitive:!0===B.caseSensitive,childrenIndex:ae,route:B};if(ce.relativePath.startsWith("/")){if(!ce.relativePath.startsWith($)&&ie)return;invariant(ce.relativePath.startsWith($),`Absolute route path "${ce.relativePath}" nested under path "${$}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),ce.relativePath=ce.relativePath.slice($.length)}let de=joinPaths([$,ce.relativePath]),fe=z.concat(ce);B.children&&B.children.length>0&&(invariant(!0!==B.index,`Index routes must not have child routes. Please remove all child routes from route path "${de}".`),flattenRoutes(B.children,j,fe,de,ie)),(null!=B.path||B.index)&&j.push({path:de,score:computeScore(de,B.index),routesMeta:fe})};return B.forEach(((B,j)=>{if(""!==B.path&&B.path?.includes("?"))for(let z of explodeOptionalSegments(B.path))flattenRoute(B,j,!0,z);else flattenRoute(B,j)})),j}function explodeOptionalSegments(B){let j=B.split("/");if(0===j.length)return[];let[z,...$]=j,ee=z.endsWith("?"),ae=z.replace(/\?$/,"");if(0===$.length)return ee?[ae,""]:[ae];let ie=explodeOptionalSegments($.join("/")),le=[];return le.push(...ie.map((B=>""===B?ae:[ae,B].join("/")))),ee&&le.push(...ie),le.map((j=>B.startsWith("/")&&""===j?"/":j))}var fe=/^:[\w-]+$/,be=3,ye=2,we=1,Se=10,Te=-2,isSplat=B=>"*"===B;function computeScore(B,j){let z=B.split("/"),$=z.length;return z.some(isSplat)&&($+=Te),j&&($+=ye),z.filter((B=>!isSplat(B))).reduce(((B,j)=>B+(fe.test(j)?be:""===j?we:Se)),$)}function matchRouteBranch(B,j,z=!1){let{routesMeta:$}=B,ee={},ae="/",ie=[];for(let le=0;le<$.length;++le){let B=$[le],ce=le===$.length-1,de="/"===ae?j:j.slice(ae.length)||"/",fe=matchPath({path:B.relativePath,caseSensitive:B.caseSensitive,end:ce},de),be=B.route;if(!fe&&ce&&z&&!$[$.length-1].route.index&&(fe=matchPath({path:B.relativePath,caseSensitive:B.caseSensitive,end:!1},de)),!fe)return null;Object.assign(ee,fe.params),ie.push({params:ee,pathname:joinPaths([ae,fe.pathname]),pathnameBase:normalizePathname(joinPaths([ae,fe.pathnameBase])),route:be}),"/"!==fe.pathnameBase&&(ae=joinPaths([ae,fe.pathnameBase]))}return ie}function matchPath(B,j){"string"==typeof B&&(B={path:B,caseSensitive:!1,end:!0});let[z,$]=compilePath(B.path,B.caseSensitive,B.end),ee=j.match(z);if(!ee)return null;let ae=ee[0],ie=ae.replace(/(.)\/+$/,"$1"),le=ee.slice(1);return{params:$.reduce(((B,{paramName:j,isOptional:z},$)=>{if("*"===j){let B=le[$]||"";ie=ae.slice(0,ae.length-B.length).replace(/(.)\/+$/,"$1")}const ee=le[$];return B[j]=z&&!ee?void 0:(ee||"").replace(/%2F/g,"/"),B}),{}),pathname:ae,pathnameBase:ie,pattern:B}}function compilePath(B,j=!1,z=!0){warning("*"===B||!B.endsWith("*")||B.endsWith("/*"),`Route path "${B}" will be treated as if it were "${B.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${B.replace(/\*$/,"/*")}".`);let $=[],ee="^"+B.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((B,j,z)=>($.push({paramName:j,isOptional:null!=z}),z?"/?([^\\/]+)?":"/([^\\/]+)"))).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return B.endsWith("*")?($.push({paramName:"*"}),ee+="*"===B||"/*"===B?"(.*)$":"(?:\\/(.+)|\\/*)$"):z?ee+="\\/*$":""!==B&&"/"!==B&&(ee+="(?:(?=\\/|$))"),[new RegExp(ee,j?void 0:"i"),$]}function decodePath(B){try{return B.split("/").map((B=>decodeURIComponent(B).replace(/\//g,"%2F"))).join("/")}catch(j){return warning(!1,`The URL path "${B}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${j}).`),B}}function stripBasename(B,j){if("/"===j)return B;if(!B.toLowerCase().startsWith(j.toLowerCase()))return null;let z=j.endsWith("/")?j.length-1:j.length,$=B.charAt(z);return $&&"/"!==$?null:B.slice(z)||"/"}var Re=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,isAbsoluteUrl=B=>Re.test(B);function resolvePathname(B,j){let z=j.replace(/\/+$/,"").split("/");return B.split("/").forEach((B=>{".."===B?z.length>1&&z.pop():"."!==B&&z.push(B)})),z.length>1?z.join("/"):"/"}function getInvalidPathError(B,j,z,$){return`Cannot include a '${B}' character in a manually specified \`to.${j}\` field [${JSON.stringify($)}]. Please separate it out to the \`to.${z}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function getPathContributingMatches(B){return B.filter(((B,j)=>0===j||B.route.path&&B.route.path.length>0))}function getResolveToMatches(B){let j=getPathContributingMatches(B);return j.map(((B,z)=>z===j.length-1?B.pathname:B.pathnameBase))}function resolveTo(B,j,z,$=!1){let ee;"string"==typeof B?ee=parsePath(B):(ee={...B},invariant(!ee.pathname||!ee.pathname.includes("?"),getInvalidPathError("?","pathname","search",ee)),invariant(!ee.pathname||!ee.pathname.includes("#"),getInvalidPathError("#","pathname","hash",ee)),invariant(!ee.search||!ee.search.includes("#"),getInvalidPathError("#","search","hash",ee)));let ae,ie=""===B||""===ee.pathname,le=ie?"/":ee.pathname;if(null==le)ae=z;else{let B=j.length-1;if(!$&&le.startsWith("..")){let j=le.split("/");for(;".."===j[0];)j.shift(),B-=1;ee.pathname=j.join("/")}ae=B>=0?j[B]:"/"}let ce=function resolvePath(B,j="/"){let z,{pathname:$,search:ee="",hash:ae=""}="string"==typeof B?parsePath(B):B;if($)if(isAbsoluteUrl($))z=$;else{if($.includes("//")){let B=$;$=$.replace(/\/\/+/g,"/"),warning(!1,`Pathnames cannot have embedded double slashes - normalizing ${B} -> ${$}`)}z=$.startsWith("/")?resolvePathname($.substring(1),"/"):resolvePathname($,j)}else z=j;return{pathname:z,search:normalizeSearch(ee),hash:normalizeHash(ae)}}(ee,ae),de=le&&"/"!==le&&le.endsWith("/"),fe=(ie||"."===le)&&z.endsWith("/");return ce.pathname.endsWith("/")||!de&&!fe||(ce.pathname+="/"),ce}var joinPaths=B=>B.join("/").replace(/\/\/+/g,"/"),normalizePathname=B=>B.replace(/\/+$/,"").replace(/^\/*/,"/"),normalizeSearch=B=>B&&"?"!==B?B.startsWith("?")?B:"?"+B:"",normalizeHash=B=>B&&"#"!==B?B.startsWith("#")?B:"#"+B:"";var redirect=(B,j=302)=>{let z=j;"number"==typeof z?z={status:z}:void 0===z.status&&(z.status=302);let $=new Headers(z.headers);return $.set("Location",B),new Response(null,{...z,headers:$})},He=class{constructor(B,j,z,$=!1){this.status=B,this.statusText=j||"",this.internal=$,z instanceof Error?(this.data=z.toString(),this.error=z):this.data=z}};function isRouteErrorResponse(B){return null!=B&&"number"==typeof B.status&&"string"==typeof B.statusText&&"boolean"==typeof B.internal&&"data"in B}function getRoutePattern(B){return B.map((B=>B.route.path)).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var ze="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function parseToInfo(B,j){let z=B;if("string"!=typeof z||!Re.test(z))return{absoluteURL:void 0,isExternal:!1,to:z};let $=z,ee=!1;if(ze)try{let B=new URL(window.location.href),$=z.startsWith("//")?new URL(B.protocol+z):new URL(z),ae=stripBasename($.pathname,j);$.origin===B.origin&&null!=ae?z=ae+$.search+$.hash:ee=!0}catch(ae){warning(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:$,isExternal:ee,to:z}}var qe=Symbol("Uninstrumented");function getRouteInstrumentationUpdates(B,j){let z={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};B.forEach((B=>B({id:j.id,index:j.index,path:j.path,instrument(B){let j=Object.keys(z);for(let $ of j)B[$]&&z[$].push(B[$])}})));let $={};if("function"==typeof j.lazy&&z.lazy.length>0){let B=wrapImpl(z.lazy,j.lazy,(()=>{}));B&&($.lazy=B)}if("object"==typeof j.lazy){let B=j.lazy;["middleware","loader","action"].forEach((j=>{let ee=B[j],ae=z[`lazy.${j}`];if("function"==typeof ee&&ae.length>0){let B=wrapImpl(ae,ee,(()=>{}));B&&($.lazy=Object.assign($.lazy||{},{[j]:B}))}}))}return["loader","action"].forEach((B=>{let ee=j[B];if("function"==typeof ee&&z[B].length>0){let j=ee[qe]??ee,ae=wrapImpl(z[B],j,((...B)=>getHandlerInfo(B[0])));ae&&("loader"===B&&!0===j.hydrate&&(ae.hydrate=!0),ae[qe]=j,$[B]=ae)}})),j.middleware&&j.middleware.length>0&&z.middleware.length>0&&($.middleware=j.middleware.map((B=>{let j=B[qe]??B,$=wrapImpl(z.middleware,j,((...B)=>getHandlerInfo(B[0])));return $?($[qe]=j,$):B}))),$}function wrapImpl(B,j,z){return 0===B.length?null:async(...$)=>{let ee=await recurseRight(B,z(...$),(()=>j(...$)),B.length-1);if("error"===ee.type)throw ee.value;return ee.value}}async function recurseRight(B,j,z,$){let ee,ae=B[$];if(ae){let le,callHandler=async()=>(le||(le=recurseRight(B,j,z,$-1)),ee=await le,invariant(ee,"Expected a result"),"error"===ee.type&&ee.value instanceof Error?{status:"error",error:ee.value}:{status:"success",error:void 0});try{await ae(callHandler,j)}catch(ie){}le||await callHandler(),await le}else try{let B=await z();ee={type:"success",value:B}}catch(ie){ee={type:"error",value:ie}}return ee||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function getHandlerInfo(B){let{request:j,context:z,params:$,unstable_pattern:ee}=B;return{request:getReadonlyRequest(j),params:{...$},unstable_pattern:ee,context:getReadonlyContext(z)}}function getRouterInfo(B,j){return{currentUrl:createPath(B.state.location),..."formMethod"in j?{formMethod:j.formMethod}:{},..."formEncType"in j?{formEncType:j.formEncType}:{},..."formData"in j?{formData:j.formData}:{},..."body"in j?{body:j.body}:{}}}function getReadonlyRequest(B){return{method:B.method,url:B.url,headers:{get:(...j)=>B.headers.get(...j)}}}function getReadonlyContext(B){if(function isPlainObject(B){if(null===B||"object"!=typeof B)return!1;const j=Object.getPrototypeOf(B);return j===Object.prototype||null===j||Object.getOwnPropertyNames(j).sort().join("\0")===$e}(B)){let j={...B};return Object.freeze(j),j}return{get:j=>B.get(j)}}var $e=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var We=["POST","PUT","PATCH","DELETE"],tt=new Set(We),rt=["GET",...We],nt=new Set(rt),ot=new Set([301,302,303,307,308]),at=new Set([307,308]),it={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},lt={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},st={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},defaultMapRouteProperties=B=>({hasErrorBoundary:Boolean(B.hasErrorBoundary)}),ct="remix-router-transitions",dt=Symbol("ResetLoaderData");function createRouter(B){const j=B.window?B.window:"undefined"!=typeof window?window:void 0,z=void 0!==j&&void 0!==j.document&&void 0!==j.document.createElement;invariant(B.routes.length>0,"You must provide a non-empty routes array to createRouter");let $=B.hydrationRouteProperties||[],ee=B.mapRouteProperties||defaultMapRouteProperties,ae=ee;if(B.unstable_instrumentations){let j=B.unstable_instrumentations;ae=B=>({...ee(B),...getRouteInstrumentationUpdates(j.map((B=>B.route)).filter(Boolean),B)})}let ie,ce={},de=convertRoutesToDataRoutes(B.routes,ae,void 0,ce),fe=B.basename||"/";fe.startsWith("/")||(fe=`/${fe}`);let be,ye,we=B.dataStrategy||defaultDataStrategyWithMiddleware,Se={...B.future},Te=null,Re=new Set,He=null,ze=null,$e=null,We=null!=B.hydrationData,tt=matchRoutes(de,B.history.location,fe),rt=!1,nt=null;if(null!=tt||B.patchRoutesOnNavigation){if(tt&&!B.hydrationData){checkFogOfWar(tt,de,B.history.location.pathname).active&&(tt=null)}if(tt)if(tt.some((B=>B.route.lazy)))be=!1;else if(tt.some((B=>routeHasLoaderOrMiddleware(B.route)))){let j=B.hydrationData?B.hydrationData.loaderData:null,z=B.hydrationData?B.hydrationData.errors:null;if(z){let B=tt.findIndex((B=>void 0!==z[B.route.id]));be=tt.slice(0,B+1).every((B=>!shouldLoadRouteOnHydration(B.route,j,z)))}else be=tt.every((B=>!shouldLoadRouteOnHydration(B.route,j,z)))}else be=!0;else{be=!1,tt=[];let j=checkFogOfWar(null,de,B.history.location.pathname);j.active&&j.matches&&(rt=!0,tt=j.matches)}}else{let j=getInternalRouterError(404,{pathname:B.history.location.pathname}),{matches:z,route:$}=getShortCircuitMatches(de);be=!0,tt=z,nt={[$.id]:j}}let ot,dt,ut={historyAction:B.history.action,location:B.history.location,matches:tt,initialized:be,navigation:it,restoreScrollPosition:null==B.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:B.hydrationData&&B.hydrationData.loaderData||{},actionData:B.hydrationData&&B.hydrationData.actionData||null,errors:B.hydrationData&&B.hydrationData.errors||nt,fetchers:new Map,blockers:new Map},mt="POP",ft=null,ht=!1,xt=!1,Bt=new Map,wt=null,Pt=!1,Ot=!1,Dt=new Set,Ft=new Map,zt=0,Zt=-1,Wt=new Map,Kt=new Set,Xt=new Map,Qt=new Map,Jt=new Set,rr=new Map,or=null;function updateState(B,j={}){B.matches&&(B.matches=B.matches.map((B=>{let j=ce[B.route.id],z=B.route;return z.element!==j.element||z.errorElement!==j.errorElement||z.hydrateFallbackElement!==j.hydrateFallbackElement?{...B,route:j}:B}))),ut={...ut,...B};let z=[],$=[];ut.fetchers.forEach(((B,j)=>{"idle"===B.state&&(Jt.has(j)?z.push(j):$.push(j))})),Jt.forEach((B=>{ut.fetchers.has(B)||Ft.has(B)||z.push(B)})),[...Re].forEach(($=>$(ut,{deletedFetchers:z,newErrors:B.errors??null,viewTransitionOpts:j.viewTransitionOpts,flushSync:!0===j.flushSync}))),z.forEach((B=>deleteFetcher(B))),$.forEach((B=>ut.fetchers.delete(B)))}function completeNavigation(j,z,{flushSync:$}={}){let ee,ae=null!=ut.actionData&&null!=ut.navigation.formMethod&&isMutationMethod(ut.navigation.formMethod)&&"loading"===ut.navigation.state&&!0!==j.state?._isRedirect;ee=z.actionData?Object.keys(z.actionData).length>0?z.actionData:null:ae?ut.actionData:null;let le=z.loaderData?mergeLoaderData(ut.loaderData,z.loaderData,z.matches||[],z.errors):ut.loaderData,ce=ut.blockers;ce.size>0&&(ce=new Map(ce),ce.forEach(((B,j)=>ce.set(j,st))));let fe,be=!Pt&&getSavedScrollPosition(j,z.matches||ut.matches),ye=!0===ht||null!=ut.navigation.formMethod&&isMutationMethod(ut.navigation.formMethod)&&!0!==j.state?._isRedirect;if(ie&&(de=ie,ie=void 0),Pt||"POP"===mt||("PUSH"===mt?B.history.push(j,j.state):"REPLACE"===mt&&B.history.replace(j,j.state)),"POP"===mt){let B=Bt.get(ut.location.pathname);B&&B.has(j.pathname)?fe={currentLocation:ut.location,nextLocation:j}:Bt.has(j.pathname)&&(fe={currentLocation:j,nextLocation:ut.location})}else if(xt){let B=Bt.get(ut.location.pathname);B?B.add(j.pathname):(B=new Set([j.pathname]),Bt.set(ut.location.pathname,B)),fe={currentLocation:ut.location,nextLocation:j}}updateState({...z,actionData:ee,loaderData:le,historyAction:mt,location:j,initialized:!0,navigation:it,revalidation:"idle",restoreScrollPosition:be,preventScrollReset:ye,blockers:ce},{viewTransitionOpts:fe,flushSync:!0===$}),mt="POP",ht=!1,xt=!1,Pt=!1,Ot=!1,ft?.resolve(),ft=null,or?.resolve(),or=null}async function startNavigation(j,z,ee){ot&&ot.abort(),ot=null,mt=j,Pt=!0===(ee&&ee.startUninterruptedRevalidation),function saveScrollPosition(B,j){if(He&&$e){let z=getScrollKey(B,j);He[z]=$e()}}(ut.location,ut.matches),ht=!0===(ee&&ee.preventScrollReset),xt=!0===(ee&&ee.enableViewTransition);let be=ie||de,ye=ee&&ee.overrideNavigation,we=ee?.initialHydration&&ut.matches&&ut.matches.length>0&&!rt?ut.matches:matchRoutes(be,z,fe),Se=!0===(ee&&ee.flushSync);if(we&&ut.initialized&&!Ot&&function isHashChangeOnly(B,j){if(B.pathname!==j.pathname||B.search!==j.search)return!1;if(""===B.hash)return""!==j.hash;if(B.hash===j.hash)return!0;if(""!==j.hash)return!0;return!1}(ut.location,z)&&!(ee&&ee.submission&&isMutationMethod(ee.submission.formMethod)))return void completeNavigation(z,{matches:we},{flushSync:Se});let Te=checkFogOfWar(we,be,z.pathname);if(Te.active&&Te.matches&&(we=Te.matches),!we){let{error:B,notFoundMatches:j,route:$}=handleNavigational404(z.pathname);return void completeNavigation(z,{matches:j,loaderData:{},errors:{[$.id]:B}},{flushSync:Se})}ot=new AbortController;let Re,ze=createClientSideRequest(B.history,z,ot.signal,ee&&ee.submission),qe=B.getContext?await B.getContext():new le;if(ee&&ee.pendingError)Re=[findNearestBoundary(we).route.id,{type:"error",error:ee.pendingError}];else if(ee&&ee.submission&&isMutationMethod(ee.submission.formMethod)){let j=await async function handleAction(j,z,ee,ie,le,be,ye,we={}){interruptActiveLoads();let Se,Te=function getSubmittingNavigation(B,j){let z={state:"submitting",location:B,formMethod:j.formMethod,formAction:j.formAction,formEncType:j.formEncType,formData:j.formData,json:j.json,text:j.text};return z}(z,ee);if(updateState({navigation:Te},{flushSync:!0===we.flushSync}),be){let B=await discoverRoutes(ie,z.pathname,j.signal);if("aborted"===B.type)return{shortCircuited:!0};if("error"===B.type){if(0===B.partialMatches.length){let{matches:j,route:z}=getShortCircuitMatches(de);return{matches:j,pendingActionResult:[z.id,{type:"error",error:B.error}]}}let j=findNearestBoundary(B.partialMatches).route.id;return{matches:B.partialMatches,pendingActionResult:[j,{type:"error",error:B.error}]}}if(!B.matches){let{notFoundMatches:B,error:j,route:$}=handleNavigational404(z.pathname);return{matches:B,pendingActionResult:[$.id,{type:"error",error:j}]}}ie=B.matches}let Re=getTargetMatch(ie,z);if(Re.route.action||Re.route.lazy){let B=getTargetedDataStrategyMatches(ae,ce,j,ie,Re,ye?[]:$,le),z=await callDataStrategy(j,B,le,null);if(Se=z[Re.route.id],!Se)for(let j of ie)if(z[j.route.id]){Se=z[j.route.id];break}if(j.signal.aborted)return{shortCircuited:!0}}else Se={type:"error",error:getInternalRouterError(405,{method:j.method,pathname:z.pathname,routeId:Re.route.id})};if(isRedirectResult(Se)){let z;if(we&&null!=we.replace)z=we.replace;else{z=normalizeRedirectLocation(Se.response.headers.get("Location"),new URL(j.url),fe,B.history)===ut.location.pathname+ut.location.search}return await startRedirectNavigation(j,Se,!0,{submission:ee,replace:z}),{shortCircuited:!0}}if(isErrorResult(Se)){let B=findNearestBoundary(ie,Re.route.id);return!0!==(we&&we.replace)&&(mt="PUSH"),{matches:ie,pendingActionResult:[B.route.id,Se,Re.route.id]}}return{matches:ie,pendingActionResult:[Re.route.id,Se]}}(ze,z,ee.submission,we,qe,Te.active,ee&&!0===ee.initialHydration,{replace:ee.replace,flushSync:Se});if(j.shortCircuited)return;if(j.pendingActionResult){let[B,$]=j.pendingActionResult;if(isErrorResult($)&&isRouteErrorResponse($.error)&&404===$.error.status)return ot=null,void completeNavigation(z,{matches:j.matches,loaderData:{},errors:{[B]:$.error}})}we=j.matches||we,Re=j.pendingActionResult,ye=getLoadingNavigation(z,ee.submission),Se=!1,Te.active=!1,ze=createClientSideRequest(B.history,ze.url,ze.signal)}let{shortCircuited:We,matches:tt,loaderData:nt,errors:at}=await async function handleLoaders(j,z,ee,le,be,ye,we,Se,Te,Re,He,ze,qe){let $e=ye||getLoadingNavigation(z,we),We=we||Se||getSubmissionFromNavigation($e),tt=!Pt&&!Re;if(be){if(tt){let B=getUpdatedActionData(ze);updateState({navigation:$e,...void 0!==B?{actionData:B}:{}},{flushSync:He})}let B=await discoverRoutes(ee,z.pathname,j.signal);if("aborted"===B.type)return{shortCircuited:!0};if("error"===B.type){if(0===B.partialMatches.length){let{matches:j,route:z}=getShortCircuitMatches(de);return{matches:j,loaderData:{},errors:{[z.id]:B.error}}}let j=findNearestBoundary(B.partialMatches).route.id;return{matches:B.partialMatches,loaderData:{},errors:{[j]:B.error}}}if(!B.matches){let{error:B,notFoundMatches:j,route:$}=handleNavigational404(z.pathname);return{matches:j,loaderData:{},errors:{[$.id]:B}}}ee=B.matches}let rt=ie||de,{dsMatches:nt,revalidatingFetchers:at}=getMatchesToLoad(j,le,ae,ce,B.history,ut,ee,We,z,Re?[]:$,!0===Re,Ot,Dt,Jt,Xt,Kt,rt,fe,null!=B.patchRoutesOnNavigation,ze,qe);if(Zt=++zt,!B.dataStrategy&&!nt.some((B=>B.shouldLoad))&&!nt.some((B=>B.route.middleware&&B.route.middleware.length>0))&&0===at.length){let B=markFetchRedirectsDone();return completeNavigation(z,{matches:ee,loaderData:{},errors:ze&&isErrorResult(ze[1])?{[ze[0]]:ze[1].error}:null,...getActionDataForCommit(ze),...B?{fetchers:new Map(ut.fetchers)}:{}},{flushSync:He}),{shortCircuited:!0}}if(tt){let B={};if(!be){B.navigation=$e;let j=getUpdatedActionData(ze);void 0!==j&&(B.actionData=j)}at.length>0&&(B.fetchers=function getUpdatedRevalidatingFetchers(B){return B.forEach((B=>{let j=ut.fetchers.get(B.key),z=getLoadingFetcher(void 0,j?j.data:void 0);ut.fetchers.set(B.key,z)})),new Map(ut.fetchers)}(at)),updateState(B,{flushSync:He})}at.forEach((B=>{abortFetcher(B.key),B.controller&&Ft.set(B.key,B.controller)}));let abortPendingFetchRevalidations=()=>at.forEach((B=>abortFetcher(B.key)));ot&&ot.signal.addEventListener("abort",abortPendingFetchRevalidations);let{loaderResults:it,fetcherResults:lt}=await callLoadersAndMaybeResolveData(nt,at,j,le);if(j.signal.aborted)return{shortCircuited:!0};ot&&ot.signal.removeEventListener("abort",abortPendingFetchRevalidations);at.forEach((B=>Ft.delete(B.key)));let st=findRedirect(it);if(st)return await startRedirectNavigation(j,st.result,!0,{replace:Te}),{shortCircuited:!0};if(st=findRedirect(lt),st)return Kt.add(st.key),await startRedirectNavigation(j,st.result,!0,{replace:Te}),{shortCircuited:!0};let{loaderData:ct,errors:dt}=processLoaderData(ut,ee,it,ze,at,lt);Re&&ut.errors&&(dt={...ut.errors,...dt});let mt=markFetchRedirectsDone(),ft=abortStaleFetchLoads(Zt),ht=mt||ft||at.length>0;return{matches:ee,loaderData:ct,errors:dt,...ht?{fetchers:new Map(ut.fetchers)}:{}}}(ze,z,we,qe,Te.active,ye,ee&&ee.submission,ee&&ee.fetcherSubmission,ee&&ee.replace,ee&&!0===ee.initialHydration,Se,Re,ee&&ee.callSiteDefaultShouldRevalidate);We||(ot=null,completeNavigation(z,{matches:tt||we,...getActionDataForCommit(Re),loaderData:nt,errors:at}))}function getUpdatedActionData(B){return B&&!isErrorResult(B[1])?{[B[0]]:B[1].data}:ut.actionData?0===Object.keys(ut.actionData).length?null:ut.actionData:void 0}async function startRedirectNavigation($,ee,ae,{submission:ie,fetcherSubmission:le,preventScrollReset:ce,replace:de}={}){ae||(ft?.resolve(),ft=null),ee.response.headers.has("X-Remix-Revalidate")&&(Ot=!0);let be=ee.response.headers.get("Location");invariant(be,"Expected a Location header on the redirect Response"),be=normalizeRedirectLocation(be,new URL($.url),fe,B.history);let ye=createLocation(ut.location,be,{_isRedirect:!0});if(z){let B=!1;if(ee.response.headers.has("X-Remix-Reload-Document"))B=!0;else if(isAbsoluteUrl(be)){const z=createBrowserURLImpl(be,!0);B=z.origin!==j.location.origin||null==stripBasename(z.pathname,fe)}if(B)return void(de?j.location.replace(be):j.location.assign(be))}ot=null;let we=!0===de||ee.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Se,formAction:Te,formEncType:Re}=ut.navigation;!ie&&!le&&Se&&Te&&Re&&(ie=getSubmissionFromNavigation(ut.navigation));let He=ie||le;if(at.has(ee.response.status)&&He&&isMutationMethod(He.formMethod))await startNavigation(we,ye,{submission:{...He,formAction:be},preventScrollReset:ce||ht,enableViewTransition:ae?xt:void 0});else{let B=getLoadingNavigation(ye,ie);await startNavigation(we,ye,{overrideNavigation:B,fetcherSubmission:le,preventScrollReset:ce||ht,enableViewTransition:ae?xt:void 0})}}async function callDataStrategy(B,j,z,$){let ee,ae={};try{ee=await callDataStrategyImpl(we,B,j,$,z,!1)}catch(ie){return j.filter((B=>B.shouldLoad)).forEach((B=>{ae[B.route.id]={type:"error",error:ie}})),ae}if(B.signal.aborted)return ae;if(!isMutationMethod(B.method))for(let le of j){if("error"===ee[le.route.id]?.type)break;ee.hasOwnProperty(le.route.id)||ut.loaderData.hasOwnProperty(le.route.id)||ut.errors&&ut.errors.hasOwnProperty(le.route.id)||!le.shouldCallHandler()||(ee[le.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${le.route.id}`)})}for(let[le,ce]of Object.entries(ee))if(isRedirectDataStrategyResult(ce)){let z=ce.result;ae[le]={type:"redirect",response:normalizeRelativeRoutingRedirectResponse(z,B,le,j,fe)}}else ae[le]=await convertDataStrategyResultToDataResult(ce);return ae}async function callLoadersAndMaybeResolveData(B,j,z,$){let ee=callDataStrategy(z,B,$,null),ae=Promise.all(j.map((async B=>{if(B.matches&&B.match&&B.request&&B.controller){let j=(await callDataStrategy(B.request,B.matches,$,B.key))[B.match.route.id];return{[B.key]:j}}return Promise.resolve({[B.key]:{type:"error",error:getInternalRouterError(404,{pathname:B.path})}})})));return{loaderResults:await ee,fetcherResults:(await ae).reduce(((B,j)=>Object.assign(B,j)),{})}}function interruptActiveLoads(){Ot=!0,Xt.forEach(((B,j)=>{Ft.has(j)&&Dt.add(j),abortFetcher(j)}))}function updateFetcherState(B,j,z={}){ut.fetchers.set(B,j),updateState({fetchers:new Map(ut.fetchers)},{flushSync:!0===(z&&z.flushSync)})}function setFetcherError(B,j,z,$={}){let ee=findNearestBoundary(ut.matches,j);deleteFetcher(B),updateState({errors:{[ee.route.id]:z},fetchers:new Map(ut.fetchers)},{flushSync:!0===($&&$.flushSync)})}function getFetcher(B){return Qt.set(B,(Qt.get(B)||0)+1),Jt.has(B)&&Jt.delete(B),ut.fetchers.get(B)||lt}function deleteFetcher(B){let j=ut.fetchers.get(B);!Ft.has(B)||j&&"loading"===j.state&&Wt.has(B)||abortFetcher(B),Xt.delete(B),Wt.delete(B),Kt.delete(B),Jt.delete(B),Dt.delete(B),ut.fetchers.delete(B)}function abortFetcher(B,j){let z=Ft.get(B);z&&(z.abort(j),Ft.delete(B))}function markFetchersDone(B){for(let j of B){let B=getDoneFetcher(getFetcher(j).data);ut.fetchers.set(j,B)}}function markFetchRedirectsDone(){let B=[],j=!1;for(let z of Kt){let $=ut.fetchers.get(z);invariant($,`Expected fetcher: ${z}`),"loading"===$.state&&(Kt.delete(z),B.push(z),j=!0)}return markFetchersDone(B),j}function abortStaleFetchLoads(B){let j=[];for(let[z,$]of Wt)if($0}function deleteBlocker(B){ut.blockers.delete(B),rr.delete(B)}function updateBlocker(B,j){let z=ut.blockers.get(B)||st;invariant("unblocked"===z.state&&"blocked"===j.state||"blocked"===z.state&&"blocked"===j.state||"blocked"===z.state&&"proceeding"===j.state||"blocked"===z.state&&"unblocked"===j.state||"proceeding"===z.state&&"unblocked"===j.state,`Invalid blocker state transition: ${z.state} -> ${j.state}`);let $=new Map(ut.blockers);$.set(B,j),updateState({blockers:$})}function shouldBlockNavigation({currentLocation:B,nextLocation:j,historyAction:z}){if(0===rr.size)return;rr.size>1&&warning(!1,"A router only supports one blocker at a time");let $=Array.from(rr.entries()),[ee,ae]=$[$.length-1],ie=ut.blockers.get(ee);return ie&&"proceeding"===ie.state?void 0:ae({currentLocation:B,nextLocation:j,historyAction:z})?ee:void 0}function handleNavigational404(B){let j=getInternalRouterError(404,{pathname:B}),z=ie||de,{matches:$,route:ee}=getShortCircuitMatches(z);return{notFoundMatches:$,route:ee,error:j}}function getScrollKey(B,j){if(ze){return ze(B,j.map((B=>convertRouteMatchToUiMatch(B,ut.loaderData))))||B.key}return B.key}function getSavedScrollPosition(B,j){if(He){let z=getScrollKey(B,j),$=He[z];if("number"==typeof $)return $}return null}function checkFogOfWar(j,z,$){if(B.patchRoutesOnNavigation){if(!j){return{active:!0,matches:matchRoutesImpl(z,$,fe,!0)||[]}}if(Object.keys(j[0].params).length>0){return{active:!0,matches:matchRoutesImpl(z,$,fe,!0)}}}return{active:!1,matches:null}}async function discoverRoutes(j,z,$,ee){if(!B.patchRoutesOnNavigation)return{type:"success",matches:j};let le=j;for(;;){let j=null==ie,ye=ie||de,we=ce;try{await B.patchRoutesOnNavigation({signal:$,path:z,matches:le,fetcherKey:ee,patch:(B,j)=>{$.aborted||patchRoutesImpl(B,j,ye,we,ae,!1)}})}catch(be){return{type:"error",error:be,partialMatches:le}}finally{j&&!$.aborted&&(de=[...de])}if($.aborted)return{type:"aborted"};let Se=matchRoutes(ye,z,fe),Te=null;if(Se){if(0===Object.keys(Se[0].params).length)return{type:"success",matches:Se};if(Te=matchRoutesImpl(ye,z,fe,!0),!(Te&&le.lengthB.route.id===j[z].route.id))}return ye={get basename(){return fe},get future(){return Se},get state(){return ut},get routes(){return de},get window(){return j},initialize:function initialize(){if(Te=B.history.listen((({action:j,location:z,delta:$})=>{if(dt)return dt(),void(dt=void 0);warning(0===rr.size||null!=$,"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 ee=shouldBlockNavigation({currentLocation:ut.location,nextLocation:z,historyAction:j});if(ee&&null!=$){let j=new Promise((B=>{dt=B}));return B.history.go(-1*$),updateBlocker(ee,{state:"blocked",location:z,proceed(){updateBlocker(ee,{state:"proceeding",proceed:void 0,reset:void 0,location:z}),j.then((()=>B.history.go($)))},reset(){let B=new Map(ut.blockers);B.set(ee,st),updateState({blockers:B})}}),ft?.resolve(),void(ft=null)}return startNavigation(j,z)})),z){!function restoreAppliedTransitions(B,j){try{let z=B.sessionStorage.getItem(ct);if(z){let B=JSON.parse(z);for(let[z,$]of Object.entries(B||{}))$&&Array.isArray($)&&j.set(z,new Set($||[]))}}catch(z){}}(j,Bt);let _saveAppliedTransitions=()=>function persistAppliedTransitions(B,j){if(j.size>0){let $={};for(let[B,z]of j)$[B]=[...z];try{B.sessionStorage.setItem(ct,JSON.stringify($))}catch(z){warning(!1,`Failed to save applied view transitions in sessionStorage (${z}).`)}}}(j,Bt);j.addEventListener("pagehide",_saveAppliedTransitions),wt=()=>j.removeEventListener("pagehide",_saveAppliedTransitions)}return ut.initialized||startNavigation("POP",ut.location,{initialHydration:!0}),ye},subscribe:function subscribe(B){return Re.add(B),()=>Re.delete(B)},enableScrollRestoration:function enableScrollRestoration(B,j,z){if(He=B,$e=j,ze=z||null,!We&&ut.navigation===it){We=!0;let B=getSavedScrollPosition(ut.location,ut.matches);null!=B&&updateState({restoreScrollPosition:B})}return()=>{He=null,$e=null,ze=null}},navigate:async function navigate(j,z){if(ft?.resolve(),ft=null,"number"==typeof j){ft||(ft=createDeferred());let z=ft.promise;return B.history.go(j),z}let $=normalizeTo(ut.location,ut.matches,fe,j,z?.fromRouteId,z?.relative),{path:ee,submission:ae,error:ie}=normalizeNavigateOptions(!1,$,z),le=ut.location,ce=createLocation(ut.location,ee,z&&z.state);ce={...ce,...B.history.encodeLocation(ce)};let de=z&&null!=z.replace?z.replace:void 0,be="PUSH";!0===de?be="REPLACE":!1===de||null!=ae&&isMutationMethod(ae.formMethod)&&ae.formAction===ut.location.pathname+ut.location.search&&(be="REPLACE");let ye=z&&"preventScrollReset"in z?!0===z.preventScrollReset:void 0,we=!0===(z&&z.flushSync),Se=shouldBlockNavigation({currentLocation:le,nextLocation:ce,historyAction:be});Se?updateBlocker(Se,{state:"blocked",location:ce,proceed(){updateBlocker(Se,{state:"proceeding",proceed:void 0,reset:void 0,location:ce}),navigate(j,z)},reset(){let B=new Map(ut.blockers);B.set(Se,st),updateState({blockers:B})}}):await startNavigation(be,ce,{submission:ae,pendingError:ie,preventScrollReset:ye,replace:z&&z.replace,enableViewTransition:z&&z.viewTransition,flushSync:we,callSiteDefaultShouldRevalidate:z&&z.unstable_defaultShouldRevalidate})},fetch:async function fetch2(j,z,ee,be){abortFetcher(j);let ye=!0===(be&&be.flushSync),we=ie||de,Se=normalizeTo(ut.location,ut.matches,fe,ee,z,be?.relative),Te=matchRoutes(we,Se,fe),Re=checkFogOfWar(Te,we,Se);if(Re.active&&Re.matches&&(Te=Re.matches),!Te)return void setFetcherError(j,z,getInternalRouterError(404,{pathname:Se}),{flushSync:ye});let{path:He,submission:ze,error:qe}=normalizeNavigateOptions(!0,Se,be);if(qe)return void setFetcherError(j,z,qe,{flushSync:ye});let $e=B.getContext?await B.getContext():new le,We=!0===(be&&be.preventScrollReset);ze&&isMutationMethod(ze.formMethod)?await async function handleFetcherAction(j,z,ee,le,be,ye,we,Se,Te,Re){interruptActiveLoads(),Xt.delete(j);let He=ut.fetchers.get(j);updateFetcherState(j,function getSubmittingFetcher(B,j){let z={state:"submitting",formMethod:B.formMethod,formAction:B.formAction,formEncType:B.formEncType,formData:B.formData,json:B.json,text:B.text,data:j?j.data:void 0};return z}(Te,He),{flushSync:we});let ze=new AbortController,qe=createClientSideRequest(B.history,ee,ze.signal,Te);if(ye){let B=await discoverRoutes(le,new URL(qe.url).pathname,qe.signal,j);if("aborted"===B.type)return;if("error"===B.type)return void setFetcherError(j,z,B.error,{flushSync:we});if(!B.matches)return void setFetcherError(j,z,getInternalRouterError(404,{pathname:ee}),{flushSync:we});le=B.matches}let $e=getTargetMatch(le,ee);if(!$e.route.action&&!$e.route.lazy){let B=getInternalRouterError(405,{method:Te.formMethod,pathname:ee,routeId:z});return void setFetcherError(j,z,B,{flushSync:we})}Ft.set(j,ze);let We=zt,tt=getTargetedDataStrategyMatches(ae,ce,qe,le,$e,$,be),rt=await callDataStrategy(qe,tt,be,j),nt=rt[$e.route.id];if(!nt)for(let B of tt)if(rt[B.route.id]){nt=rt[B.route.id];break}if(qe.signal.aborted)return void(Ft.get(j)===ze&&Ft.delete(j));if(Jt.has(j)){if(isRedirectResult(nt)||isErrorResult(nt))return void updateFetcherState(j,getDoneFetcher(void 0))}else{if(isRedirectResult(nt))return Ft.delete(j),Zt>We?void updateFetcherState(j,getDoneFetcher(void 0)):(Kt.add(j),updateFetcherState(j,getLoadingFetcher(Te)),startRedirectNavigation(qe,nt,!1,{fetcherSubmission:Te,preventScrollReset:Se}));if(isErrorResult(nt))return void setFetcherError(j,z,nt.error)}let at=ut.navigation.location||ut.location,it=createClientSideRequest(B.history,at,ze.signal),lt=ie||de,st="idle"!==ut.navigation.state?matchRoutes(lt,ut.navigation.location,fe):ut.matches;invariant(st,"Didn't find any matches after fetcher action");let ct=++zt;Wt.set(j,ct);let dt=getLoadingFetcher(Te,nt.data);ut.fetchers.set(j,dt);let{dsMatches:ft,revalidatingFetchers:ht}=getMatchesToLoad(it,be,ae,ce,B.history,ut,st,Te,at,$,!1,Ot,Dt,Jt,Xt,Kt,lt,fe,null!=B.patchRoutesOnNavigation,[$e.route.id,nt],Re);ht.filter((B=>B.key!==j)).forEach((B=>{let j=B.key,z=ut.fetchers.get(j),$=getLoadingFetcher(void 0,z?z.data:void 0);ut.fetchers.set(j,$),abortFetcher(j),B.controller&&Ft.set(j,B.controller)})),updateState({fetchers:new Map(ut.fetchers)});let abortPendingFetchRevalidations=()=>ht.forEach((B=>abortFetcher(B.key)));ze.signal.addEventListener("abort",abortPendingFetchRevalidations);let{loaderResults:xt,fetcherResults:Bt}=await callLoadersAndMaybeResolveData(ft,ht,it,be);if(ze.signal.aborted)return;if(ze.signal.removeEventListener("abort",abortPendingFetchRevalidations),Wt.delete(j),Ft.delete(j),ht.forEach((B=>Ft.delete(B.key))),ut.fetchers.has(j)){let B=getDoneFetcher(nt.data);ut.fetchers.set(j,B)}let wt=findRedirect(xt);if(wt)return startRedirectNavigation(it,wt.result,!1,{preventScrollReset:Se});if(wt=findRedirect(Bt),wt)return Kt.add(wt.key),startRedirectNavigation(it,wt.result,!1,{preventScrollReset:Se});let{loaderData:Pt,errors:Qt}=processLoaderData(ut,st,xt,void 0,ht,Bt);abortStaleFetchLoads(ct),"loading"===ut.navigation.state&&ct>Zt?(invariant(mt,"Expected pending action"),ot&&ot.abort(),completeNavigation(ut.navigation.location,{matches:st,loaderData:Pt,errors:Qt,fetchers:new Map(ut.fetchers)})):(updateState({errors:Qt,loaderData:mergeLoaderData(ut.loaderData,Pt,st,Qt),fetchers:new Map(ut.fetchers)}),Ot=!1)}(j,z,He,Te,$e,Re.active,ye,We,ze,be&&be.unstable_defaultShouldRevalidate):(Xt.set(j,{routeId:z,path:He}),await async function handleFetcherLoader(j,z,ee,ie,le,de,fe,be,ye){let we=ut.fetchers.get(j);updateFetcherState(j,getLoadingFetcher(ye,we?we.data:void 0),{flushSync:fe});let Se=new AbortController,Te=createClientSideRequest(B.history,ee,Se.signal);if(de){let B=await discoverRoutes(ie,new URL(Te.url).pathname,Te.signal,j);if("aborted"===B.type)return;if("error"===B.type)return void setFetcherError(j,z,B.error,{flushSync:fe});if(!B.matches)return void setFetcherError(j,z,getInternalRouterError(404,{pathname:ee}),{flushSync:fe});ie=B.matches}let Re=getTargetMatch(ie,ee);Ft.set(j,Se);let He=zt,ze=getTargetedDataStrategyMatches(ae,ce,Te,ie,Re,$,le),qe=await callDataStrategy(Te,ze,le,j),$e=qe[Re.route.id];Ft.get(j)===Se&&Ft.delete(j);if(Te.signal.aborted)return;if(Jt.has(j))return void updateFetcherState(j,getDoneFetcher(void 0));if(isRedirectResult($e))return Zt>He?void updateFetcherState(j,getDoneFetcher(void 0)):(Kt.add(j),void(await startRedirectNavigation(Te,$e,!1,{preventScrollReset:be})));if(isErrorResult($e))return void setFetcherError(j,z,$e.error);updateFetcherState(j,getDoneFetcher($e.data))}(j,z,He,Te,$e,Re.active,ye,We,ze))},revalidate:function revalidate(){or||(or=createDeferred()),interruptActiveLoads(),updateState({revalidation:"loading"});let B=or.promise;return"submitting"===ut.navigation.state?B:"idle"===ut.navigation.state?(startNavigation(ut.historyAction,ut.location,{startUninterruptedRevalidation:!0}),B):(startNavigation(mt||ut.historyAction,ut.navigation.location,{overrideNavigation:ut.navigation,enableViewTransition:!0===xt}),B)},createHref:j=>B.history.createHref(j),encodeLocation:j=>B.history.encodeLocation(j),getFetcher,resetFetcher:function resetFetcher(B,j){abortFetcher(B,j?.reason),updateFetcherState(B,getDoneFetcher(null))},deleteFetcher:function queueFetcherForDeletion(B){let j=(Qt.get(B)||0)-1;j<=0?(Qt.delete(B),Jt.add(B)):Qt.set(B,j),updateState({fetchers:new Map(ut.fetchers)})},dispose:function dispose(){Te&&Te(),wt&&wt(),Re.clear(),ot&&ot.abort(),ut.fetchers.forEach(((B,j)=>deleteFetcher(j))),ut.blockers.forEach(((B,j)=>deleteBlocker(j)))},getBlocker:function getBlocker(B,j){let z=ut.blockers.get(B)||st;return rr.get(B)!==j&&rr.set(B,j),z},deleteBlocker,patchRoutes:function patchRoutes(B,j,z=!1){let $=null==ie;patchRoutesImpl(B,j,ie||de,ce,ae,z),$&&(de=[...de],updateState({}))},_internalFetchControllers:Ft,_internalSetRoutes:function _internalSetRoutes(B){ce={},ie=convertRoutesToDataRoutes(B,ae,void 0,ce)},_internalSetStateDoNotUseOrYouWillBreakYourApp(B){updateState(B)}},B.unstable_instrumentations&&(ye=function instrumentClientSideRouter(B,j){let z={navigate:[],fetch:[]};if(j.forEach((B=>B({instrument(B){let j=Object.keys(B);for(let $ of j)B[$]&&z[$].push(B[$])}}))),z.navigate.length>0){let j=B.navigate[qe]??B.navigate,$=wrapImpl(z.navigate,j,((...j)=>{let[z,$]=j;return{to:"number"==typeof z||"string"==typeof z?z:z?createPath(z):".",...getRouterInfo(B,$??{})}}));$&&($[qe]=j,B.navigate=$)}if(z.fetch.length>0){let j=B.fetch[qe]??B.fetch,$=wrapImpl(z.fetch,j,((...j)=>{let[z,,$,ee]=j;return{href:$??".",fetcherKey:z,...getRouterInfo(B,ee??{})}}));$&&($[qe]=j,B.fetch=$)}return B}(ye,B.unstable_instrumentations.map((B=>B.router)).filter(Boolean))),ye}function normalizeTo(B,j,z,$,ee,ae){let ie,le;if(ee){ie=[];for(let B of j)if(ie.push(B),B.route.id===ee){le=B;break}}else ie=j,le=j[j.length-1];let ce=resolveTo($||".",getResolveToMatches(ie),stripBasename(B.pathname,z)||B.pathname,"path"===ae);if(null==$&&(ce.search=B.search,ce.hash=B.hash),(null==$||""===$||"."===$)&&le){let B=hasNakedIndexQuery(ce.search);if(le.route.index&&!B)ce.search=ce.search?ce.search.replace(/^\?/,"?index&"):"?index";else if(!le.route.index&&B){let B=new URLSearchParams(ce.search),j=B.getAll("index");B.delete("index"),j.filter((B=>B)).forEach((j=>B.append("index",j)));let z=B.toString();ce.search=z?`?${z}`:""}}return"/"!==z&&(ce.pathname=function prependBasename({basename:B,pathname:j}){return"/"===j?B:joinPaths([B,j])}({basename:z,pathname:ce.pathname})),createPath(ce)}function normalizeNavigateOptions(B,j,z){if(!z||!function isSubmissionNavigation(B){return null!=B&&("formData"in B&&null!=B.formData||"body"in B&&void 0!==B.body)}(z))return{path:j};if(z.formMethod&&!isValidMethod(z.formMethod))return{path:j,error:getInternalRouterError(405,{method:z.formMethod})};let $,ee,getInvalidBodyError=()=>({path:j,error:getInternalRouterError(400,{type:"invalid-body"})}),ae=(z.formMethod||"get").toUpperCase(),ie=stripHashFromPath(j);if(void 0!==z.body){if("text/plain"===z.formEncType){if(!isMutationMethod(ae))return getInvalidBodyError();let B="string"==typeof z.body?z.body:z.body instanceof FormData||z.body instanceof URLSearchParams?Array.from(z.body.entries()).reduce(((B,[j,z])=>`${B}${j}=${z}\n`),""):String(z.body);return{path:j,submission:{formMethod:ae,formAction:ie,formEncType:z.formEncType,formData:void 0,json:void 0,text:B}}}if("application/json"===z.formEncType){if(!isMutationMethod(ae))return getInvalidBodyError();try{let B="string"==typeof z.body?JSON.parse(z.body):z.body;return{path:j,submission:{formMethod:ae,formAction:ie,formEncType:z.formEncType,formData:void 0,json:B,text:void 0}}}catch(de){return getInvalidBodyError()}}}if(invariant("function"==typeof FormData,"FormData is not available in this environment"),z.formData)$=convertFormDataToSearchParams(z.formData),ee=z.formData;else if(z.body instanceof FormData)$=convertFormDataToSearchParams(z.body),ee=z.body;else if(z.body instanceof URLSearchParams)$=z.body,ee=convertSearchParamsToFormData($);else if(null==z.body)$=new URLSearchParams,ee=new FormData;else try{$=new URLSearchParams(z.body),ee=convertSearchParamsToFormData($)}catch(de){return getInvalidBodyError()}let le={formMethod:ae,formAction:ie,formEncType:z&&z.formEncType||"application/x-www-form-urlencoded",formData:ee,json:void 0,text:void 0};if(isMutationMethod(le.formMethod))return{path:j,submission:le};let ce=parsePath(j);return B&&ce.search&&hasNakedIndexQuery(ce.search)&&$.append("index",""),ce.search=`?${$}`,{path:createPath(ce),submission:le}}function getMatchesToLoad(B,j,z,$,ee,ae,ie,le,ce,de,fe,be,ye,we,Se,Te,Re,He,ze,qe,$e){let We,tt=qe?isErrorResult(qe[1])?qe[1].error:qe[1].data:void 0,rt=ee.createURL(ae.location),nt=ee.createURL(ce);if(fe&&ae.errors){let B=Object.keys(ae.errors)[0];We=ie.findIndex((j=>j.route.id===B))}else if(qe&&isErrorResult(qe[1])){let B=qe[0];We=ie.findIndex((j=>j.route.id===B))-1}let ot=qe?qe[1].statusCode:void 0,at=ot&&ot>=400,it={currentUrl:rt,currentParams:ae.matches[0]?.params||{},nextUrl:nt,nextParams:ie[0].params,...le,actionResult:tt,actionStatus:ot},lt=getRoutePattern(ie),st=ie.map(((ee,ie)=>{let{route:le}=ee,ce=null;if(null!=We&&ie>We?ce=!1:le.lazy?ce=!0:routeHasLoaderOrMiddleware(le)?fe?ce=shouldLoadRouteOnHydration(le,ae.loaderData,ae.errors):function isNewLoader(B,j,z){let $=!j||z.route.id!==j.route.id,ee=!B.hasOwnProperty(z.route.id);return $||ee}(ae.loaderData,ae.matches[ie],ee)&&(ce=!0):ce=!1,null!==ce)return getDataStrategyMatch(z,$,B,lt,ee,de,j,ce);let ye=!1;"boolean"==typeof $e?ye=$e:at?ye=!1:(be||rt.pathname+rt.search===nt.pathname+nt.search||rt.search!==nt.search||function isNewRouteInstance(B,j){let z=B.route.path;return B.pathname!==j.pathname||null!=z&&z.endsWith("*")&&B.params["*"]!==j.params["*"]}(ae.matches[ie],ee))&&(ye=!0);let we={...it,defaultShouldRevalidate:ye},Se=shouldRevalidateLoader(ee,we);return getDataStrategyMatch(z,$,B,lt,ee,de,j,Se,we,$e)})),ct=[];return Se.forEach(((B,le)=>{if(fe||!ie.some((j=>j.route.id===B.routeId))||we.has(le))return;let ce=ae.fetchers.get(le),Se=ce&&"idle"!==ce.state&&void 0===ce.data,qe=matchRoutes(Re,B.path,He);if(!qe){if(ze&&Se)return;return void ct.push({key:le,routeId:B.routeId,path:B.path,matches:null,match:null,request:null,controller:null})}if(Te.has(le))return;let We=getTargetMatch(qe,B.path),tt=new AbortController,rt=createClientSideRequest(ee,B.path,tt.signal),nt=null;if(ye.has(le))ye.delete(le),nt=getTargetedDataStrategyMatches(z,$,rt,qe,We,de,j);else if(Se)be&&(nt=getTargetedDataStrategyMatches(z,$,rt,qe,We,de,j));else{let B;B="boolean"==typeof $e?$e:!at&&be;let ee={...it,defaultShouldRevalidate:B};shouldRevalidateLoader(We,ee)&&(nt=getTargetedDataStrategyMatches(z,$,rt,qe,We,de,j,ee))}nt&&ct.push({key:le,routeId:B.routeId,path:B.path,matches:nt,match:We,request:rt,controller:tt})})),{dsMatches:st,revalidatingFetchers:ct}}function routeHasLoaderOrMiddleware(B){return null!=B.loader||null!=B.middleware&&B.middleware.length>0}function shouldLoadRouteOnHydration(B,j,z){if(B.lazy)return!0;if(!routeHasLoaderOrMiddleware(B))return!1;let $=null!=j&&B.id in j,ee=null!=z&&void 0!==z[B.id];return!(!$&&ee)&&("function"==typeof B.loader&&!0===B.loader.hydrate||!$&&!ee)}function shouldRevalidateLoader(B,j){if(B.route.shouldRevalidate){let z=B.route.shouldRevalidate(j);if("boolean"==typeof z)return z}return j.defaultShouldRevalidate}function patchRoutesImpl(B,j,z,$,ee,ae){let ie;if(B){let j=$[B];invariant(j,`No route found to patch children into: routeId = ${B}`),j.children||(j.children=[]),ie=j.children}else ie=z;let le=[],ce=[];if(j.forEach((B=>{let j=ie.find((j=>isSameRoute(B,j)));j?ce.push({existingRoute:j,newRoute:B}):le.push(B)})),le.length>0){let j=convertRoutesToDataRoutes(le,ee,[B||"_","patch",String(ie?.length||"0")],$);ie.push(...j)}if(ae&&ce.length>0)for(let de=0;dej.children?.some((j=>isSameRoute(B,j))))))}var ut=new WeakMap,loadLazyRouteProperty=({key:B,route:j,manifest:z,mapRouteProperties:$})=>{let ee=z[j.id];if(invariant(ee,"No route found in manifest"),!ee.lazy||"object"!=typeof ee.lazy)return;let ae=ee.lazy[B];if(!ae)return;let ie=ut.get(ee);ie||(ie={},ut.set(ee,ie));let le=ie[B];if(le)return le;let de=(async()=>{let j=function isUnsupportedLazyRouteObjectKey(B){return ce.has(B)}(B),z=void 0!==ee[B]&&"hasErrorBoundary"!==B;if(j)warning(!j,"Route property "+B+" is not a supported lazy route property. This property will be ignored."),ie[B]=Promise.resolve();else if(z)warning(!1,`Route "${ee.id}" has a static property "${B}" defined. The lazy property will be ignored.`);else{let j=await ae();null!=j&&(Object.assign(ee,{[B]:j}),Object.assign(ee,$(ee)))}"object"==typeof ee.lazy&&(ee.lazy[B]=void 0,Object.values(ee.lazy).every((B=>void 0===B))&&(ee.lazy=void 0))})();return ie[B]=de,de},mt=new WeakMap;async function defaultDataStrategy(B){let j=B.matches.filter((B=>B.shouldLoad)),z={};return(await Promise.all(j.map((B=>B.resolve())))).forEach(((B,$)=>{z[j[$].route.id]=B})),z}async function defaultDataStrategyWithMiddleware(B){return B.matches.some((B=>B.route.middleware))?runClientMiddlewarePipeline(B,(()=>defaultDataStrategy(B))):defaultDataStrategy(B)}function runClientMiddlewarePipeline(B,j){return runMiddlewarePipeline(B,j,(B=>{if(isRedirectResponse(B))throw B;return B}),isDataStrategyResults,(function errorHandler(j,z,$){if($)return Promise.resolve(Object.assign($.value,{[z]:{type:"error",result:j}}));{let{matches:$}=B,ee=Math.min(Math.max($.findIndex((B=>B.route.id===z)),0),Math.max($.findIndex((B=>B.shouldCallHandler())),0)),ae=findNearestBoundary($,$[ee].route.id).route.id;return Promise.resolve({[ae]:{type:"error",result:j}})}}))}async function runMiddlewarePipeline(B,j,z,$,ee){let{matches:ae,request:ie,params:le,context:ce,unstable_pattern:de}=B,fe=ae.flatMap((B=>B.route.middleware?B.route.middleware.map((j=>[B.route.id,j])):[]));return await callRouteMiddleware({request:ie,params:le,context:ce,unstable_pattern:de},fe,j,z,$,ee)}async function callRouteMiddleware(B,j,z,$,ee,ae,ie=0){let{request:le}=B;if(le.signal.aborted)throw le.signal.reason??new Error(`Request aborted: ${le.method} ${le.url}`);let ce=j[ie];if(!ce){return await z()}let de,[fe,be]=ce,next=async()=>{if(de)throw new Error("You may only call `next()` once per middleware");try{let le=await callRouteMiddleware(B,j,z,$,ee,ae,ie+1);return de={value:le},de.value}catch(le){return de={value:await ae(le,fe,de)},de.value}};try{let j=await be(B,next),z=null!=j?$(j):void 0;return ee(z)?z:de?z??de.value:(de={value:await next()},de.value)}catch(ye){return await ae(ye,fe,de)}}function getDataStrategyMatchLazyPromises(B,j,z,$,ee){let ae=loadLazyRouteProperty({key:"middleware",route:$.route,manifest:j,mapRouteProperties:B}),ie=function loadLazyRoute(B,j,z,$,ee){let ae=z[B.id];if(invariant(ae,"No route found in manifest"),!B.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if("function"==typeof B.lazy){let j=mt.get(ae);if(j)return{lazyRoutePromise:j,lazyHandlerPromise:j};let z=(async()=>{invariant("function"==typeof B.lazy,"No lazy route function found");let j=await B.lazy(),z={};for(let B in j){let $=j[B];if(void 0===$)continue;let ie=(ee=B,de.has(ee)),le=void 0!==ae[B]&&"hasErrorBoundary"!==B;ie?warning(!ie,"Route property "+B+" is not a supported property to be returned from a lazy route function. This property will be ignored."):le?warning(!le,`Route "${ae.id}" has a static property "${B}" defined but its lazy function is also returning a value for this property. The lazy route property "${B}" will be ignored.`):z[B]=$}var ee;Object.assign(ae,z),Object.assign(ae,{...$(ae),lazy:void 0})})();return mt.set(ae,z),z.catch((()=>{})),{lazyRoutePromise:z,lazyHandlerPromise:z}}let ie,le=Object.keys(B.lazy),ce=[];for(let de of le){if(ee&&ee.includes(de))continue;let ae=loadLazyRouteProperty({key:de,route:B,manifest:z,mapRouteProperties:$});ae&&(ce.push(ae),de===j&&(ie=ae))}let fe=ce.length>0?Promise.all(ce).then((()=>{})):void 0;return fe?.catch((()=>{})),ie?.catch((()=>{})),{lazyRoutePromise:fe,lazyHandlerPromise:ie}}($.route,isMutationMethod(z.method)?"action":"loader",j,B,ee);return{middleware:ae,route:ie.lazyRoutePromise,handler:ie.lazyHandlerPromise}}function getDataStrategyMatch(B,j,z,$,ee,ae,ie,le,ce=null,de){let fe=!1,be=getDataStrategyMatchLazyPromises(B,j,z,ee,ae);return{...ee,_lazyPromises:be,shouldLoad:le,shouldRevalidateArgs:ce,shouldCallHandler:B=>(fe=!0,ce?shouldRevalidateLoader(ee,"boolean"==typeof de?{...ce,defaultShouldRevalidate:de}:"boolean"==typeof B?{...ce,defaultShouldRevalidate:B}:ce):le),resolve(B){let{lazy:j,loader:ae,middleware:ce}=ee.route,de=fe||le||B&&!isMutationMethod(z.method)&&(j||ae),ye=ce&&ce.length>0&&!ae&&!j;return!de||!isMutationMethod(z.method)&&ye?Promise.resolve({type:"data",result:void 0}):async function callLoaderOrAction({request:B,unstable_pattern:j,match:z,lazyHandlerPromise:$,lazyRoutePromise:ee,handlerOverride:ae,scopedContext:ie}){let le,ce,de=isMutationMethod(B.method),fe=de?"action":"loader",runHandler=$=>{let ee,le=new Promise(((B,j)=>ee=j));ce=()=>ee(),B.signal.addEventListener("abort",ce);let actualHandler=ee=>"function"!=typeof $?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${fe}" [routeId: ${z.route.id}]`)):$({request:B,unstable_pattern:j,params:z.params,context:ie},...void 0!==ee?[ee]:[]),de=(async()=>{try{return{type:"data",result:await(ae?ae((B=>actualHandler(B))):actualHandler())}}catch(B){return{type:"error",result:B}}})();return Promise.race([de,le])};try{let j=de?z.route.action:z.route.loader;if($||ee)if(j){let B,[z]=await Promise.all([runHandler(j).catch((j=>{B=j})),$,ee]);if(void 0!==B)throw B;le=z}else{await $;let j=de?z.route.action:z.route.loader;if(!j){if("action"===fe){let j=new URL(B.url),$=j.pathname+j.search;throw getInternalRouterError(405,{method:B.method,pathname:$,routeId:z.route.id})}return{type:"data",result:void 0}}[le]=await Promise.all([runHandler(j),ee])}else{if(!j){let j=new URL(B.url);throw getInternalRouterError(404,{pathname:j.pathname+j.search})}le=await runHandler(j)}}catch(be){return{type:"error",result:be}}finally{ce&&B.signal.removeEventListener("abort",ce)}return le}({request:z,unstable_pattern:$,match:ee,lazyHandlerPromise:be?.handler,lazyRoutePromise:be?.route,handlerOverride:B,scopedContext:ie})}}}function getTargetedDataStrategyMatches(B,j,z,$,ee,ae,ie,le=null){return $.map((ce=>ce.route.id!==ee.route.id?{...ce,shouldLoad:!1,shouldRevalidateArgs:le,shouldCallHandler:()=>!1,_lazyPromises:getDataStrategyMatchLazyPromises(B,j,z,ce,ae),resolve:()=>Promise.resolve({type:"data",result:void 0})}:getDataStrategyMatch(B,j,z,getRoutePattern($),ce,ae,ie,!0,le)))}async function callDataStrategyImpl(B,j,z,$,ee,ae){z.some((B=>B._lazyPromises?.middleware))&&await Promise.all(z.map((B=>B._lazyPromises?.middleware)));let ie={request:j,unstable_pattern:getRoutePattern(z),params:z[0].params,context:ee,matches:z},le=ae?()=>{throw new Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:B=>{let j=ie;return runClientMiddlewarePipeline(j,(()=>B({...j,fetcherKey:$,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}})))},ce=await B({...ie,fetcherKey:$,runClientMiddleware:le});try{await Promise.all(z.flatMap((B=>[B._lazyPromises?.handler,B._lazyPromises?.route])))}catch(de){}return ce}async function parseResponseBody(B){let j=B.headers.get("Content-Type");return j&&/\bapplication\/json\b/.test(j)?null==B.body?null:B.json():B.text()}async function convertDataStrategyResultToDataResult(B){let{result:j,type:z}=B;if(isResponse(j)){let B;try{B=await parseResponseBody(j)}catch($){return{type:"error",error:$}}return"error"===z?{type:"error",error:new He(j.status,j.statusText,B),statusCode:j.status,headers:j.headers}:{type:"data",data:B,statusCode:j.status,headers:j.headers}}return"error"===z?isDataWithResponseInit(j)?j.data instanceof Error?{type:"error",error:j.data,statusCode:j.init?.status,headers:j.init?.headers?new Headers(j.init.headers):void 0}:{type:"error",error:dataWithResponseInitToErrorResponse(j),statusCode:isRouteErrorResponse(j)?j.status:void 0,headers:j.init?.headers?new Headers(j.init.headers):void 0}:{type:"error",error:j,statusCode:isRouteErrorResponse(j)?j.status:void 0}:isDataWithResponseInit(j)?{type:"data",data:j.data,statusCode:j.init?.status,headers:j.init?.headers?new Headers(j.init.headers):void 0}:{type:"data",data:j}}function normalizeRelativeRoutingRedirectResponse(B,j,z,$,ee){let ae=B.headers.get("Location");if(invariant(ae,"Redirects returned/thrown from loaders/actions must have a Location header"),!isAbsoluteUrl(ae)){let ie=$.slice(0,$.findIndex((B=>B.route.id===z))+1);ae=normalizeTo(new URL(j.url),ie,ee,ae),B.headers.set("Location",ae)}return B}function normalizeRedirectLocation(B,j,z,$){let ee=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(isAbsoluteUrl(B)){let $=B,ae=$.startsWith("//")?new URL(j.protocol+$):new URL($);if(ee.includes(ae.protocol))throw new Error("Invalid redirect location");let ie=null!=stripBasename(ae.pathname,z);if(ae.origin===j.origin&&ie)return ae.pathname+ae.search+ae.hash}try{let j=$.createURL(B);if(ee.includes(j.protocol))throw new Error("Invalid redirect location")}catch(ae){}return B}function createClientSideRequest(B,j,z,$){let ee=B.createURL(stripHashFromPath(j)).toString(),ae={signal:z};if($&&isMutationMethod($.formMethod)){let{formMethod:B,formEncType:j}=$;ae.method=B.toUpperCase(),"application/json"===j?(ae.headers=new Headers({"Content-Type":j}),ae.body=JSON.stringify($.json)):"text/plain"===j?ae.body=$.text:"application/x-www-form-urlencoded"===j&&$.formData?ae.body=convertFormDataToSearchParams($.formData):ae.body=$.formData}return new Request(ee,ae)}function convertFormDataToSearchParams(B){let j=new URLSearchParams;for(let[z,$]of B.entries())j.append(z,"string"==typeof $?$:$.name);return j}function convertSearchParamsToFormData(B){let j=new FormData;for(let[z,$]of B.entries())j.append(z,$);return j}function processRouteLoaderData(B,j,z,$=!1,ee=!1){let ae,ie={},le=null,ce=!1,de={},fe=z&&isErrorResult(z[1])?z[1].error:void 0;return B.forEach((z=>{if(!(z.route.id in j))return;let be=z.route.id,ye=j[be];if(invariant(!isRedirectResult(ye),"Cannot handle redirect results in processLoaderData"),isErrorResult(ye)){let j=ye.error;if(void 0!==fe&&(j=fe,fe=void 0),le=le||{},ee)le[be]=j;else{let z=findNearestBoundary(B,be);null==le[z.route.id]&&(le[z.route.id]=j)}$||(ie[be]=dt),ce||(ce=!0,ae=isRouteErrorResponse(ye.error)?ye.error.status:500),ye.headers&&(de[be]=ye.headers)}else ie[be]=ye.data,ye.statusCode&&200!==ye.statusCode&&!ce&&(ae=ye.statusCode),ye.headers&&(de[be]=ye.headers)})),void 0!==fe&&z&&(le={[z[0]]:fe},z[2]&&(ie[z[2]]=void 0)),{loaderData:ie,errors:le,statusCode:ae||200,loaderHeaders:de}}function processLoaderData(B,j,z,$,ee,ae){let{loaderData:ie,errors:le}=processRouteLoaderData(j,z,$);return ee.filter((B=>!B.matches||B.matches.some((B=>B.shouldLoad)))).forEach((j=>{let{key:z,match:$,controller:ee}=j;if(ee&&ee.signal.aborted)return;let ie=ae[z];if(invariant(ie,"Did not find corresponding fetcher result"),isErrorResult(ie)){let j=findNearestBoundary(B.matches,$?.route.id);le&&le[j.route.id]||(le={...le,[j.route.id]:ie.error}),B.fetchers.delete(z)}else if(isRedirectResult(ie))invariant(!1,"Unhandled fetcher revalidation redirect");else{let j=getDoneFetcher(ie.data);B.fetchers.set(z,j)}})),{loaderData:ie,errors:le}}function mergeLoaderData(B,j,z,$){let ee=Object.entries(j).filter((([,B])=>B!==dt)).reduce(((B,[j,z])=>(B[j]=z,B)),{});for(let ae of z){let z=ae.route.id;if(!j.hasOwnProperty(z)&&B.hasOwnProperty(z)&&ae.route.loader&&(ee[z]=B[z]),$&&$.hasOwnProperty(z))break}return ee}function getActionDataForCommit(B){return B?isErrorResult(B[1])?{actionData:{}}:{actionData:{[B[0]]:B[1].data}}:{}}function findNearestBoundary(B,j){return(j?B.slice(0,B.findIndex((B=>B.route.id===j))+1):[...B]).reverse().find((B=>!0===B.route.hasErrorBoundary))||B[0]}function getShortCircuitMatches(B){let j=1===B.length?B[0]:B.find((B=>B.index||!B.path||"/"===B.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:j}],route:j}}function getInternalRouterError(B,{pathname:j,routeId:z,method:$,type:ee,message:ae}={}){let ie="Unknown Server Error",le="Unknown @remix-run/router error";return 400===B?(ie="Bad Request",$&&j&&z?le=`You made a ${$} request to "${j}" but did not provide a \`loader\` for route "${z}", so there is no way to handle the request.`:"invalid-body"===ee&&(le="Unable to encode submission body")):403===B?(ie="Forbidden",le=`Route "${z}" does not match URL "${j}"`):404===B?(ie="Not Found",le=`No route matches URL "${j}"`):405===B&&(ie="Method Not Allowed",$&&j&&z?le=`You made a ${$.toUpperCase()} request to "${j}" but did not provide an \`action\` for route "${z}", so there is no way to handle the request.`:$&&(le=`Invalid request method "${$.toUpperCase()}"`)),new He(B||500,ie,new Error(le),!0)}function findRedirect(B){let j=Object.entries(B);for(let z=j.length-1;z>=0;z--){let[B,$]=j[z];if(isRedirectResult($))return{key:B,result:$}}}function stripHashFromPath(B){return createPath({..."string"==typeof B?parsePath(B):B,hash:""})}function dataWithResponseInitToErrorResponse(B){return new He(B.init?.status??500,B.init?.statusText??"Internal Server Error",B.data)}function isDataStrategyResults(B){return null!=B&&"object"==typeof B&&Object.entries(B).every((([B,j])=>"string"==typeof B&&isDataStrategyResult(j)))}function isDataStrategyResult(B){return null!=B&&"object"==typeof B&&"type"in B&&"result"in B&&("data"===B.type||"error"===B.type)}function isRedirectDataStrategyResult(B){return isResponse(B.result)&&ot.has(B.result.status)}function isErrorResult(B){return"error"===B.type}function isRedirectResult(B){return"redirect"===(B&&B.type)}function isDataWithResponseInit(B){return"object"==typeof B&&null!=B&&"type"in B&&"data"in B&&"init"in B&&"DataWithResponseInit"===B.type}function isResponse(B){return null!=B&&"number"==typeof B.status&&"string"==typeof B.statusText&&"object"==typeof B.headers&&void 0!==B.body}function isRedirectResponse(B){return isResponse(B)&&function isRedirectStatusCode(B){return ot.has(B)}(B.status)&&B.headers.has("Location")}function isValidMethod(B){return nt.has(B.toUpperCase())}function isMutationMethod(B){return tt.has(B.toUpperCase())}function hasNakedIndexQuery(B){return new URLSearchParams(B).getAll("index").some((B=>""===B))}function getTargetMatch(B,j){let z="string"==typeof j?parsePath(j).search:j.search;if(B[B.length-1].route.index&&hasNakedIndexQuery(z||""))return B[B.length-1];let $=getPathContributingMatches(B);return $[$.length-1]}function getSubmissionFromNavigation(B){let{formMethod:j,formAction:z,formEncType:$,text:ee,formData:ae,json:ie}=B;if(j&&z&&$)return null!=ee?{formMethod:j,formAction:z,formEncType:$,formData:void 0,json:void 0,text:ee}:null!=ae?{formMethod:j,formAction:z,formEncType:$,formData:ae,json:void 0,text:void 0}:void 0!==ie?{formMethod:j,formAction:z,formEncType:$,formData:void 0,json:ie,text:void 0}:void 0}function getLoadingNavigation(B,j){if(j){return{state:"loading",location:B,formMethod:j.formMethod,formAction:j.formAction,formEncType:j.formEncType,formData:j.formData,json:j.json,text:j.text}}return{state:"loading",location:B,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function getLoadingFetcher(B,j){if(B){return{state:"loading",formMethod:B.formMethod,formAction:B.formAction,formEncType:B.formEncType,formData:B.formData,json:B.json,text:B.text,data:j}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:j}}function getDoneFetcher(B){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:B}}function createDeferred(){let B,j,z=new Promise((($,ee)=>{B=async B=>{$(B);try{await z}catch(j){}},j=async B=>{ee(B);try{await z}catch(j){}}}));return{promise:z,resolve:B,reject:j}}var ft=ae.createContext(null);ft.displayName="DataRouter";var ht=ae.createContext(null);ht.displayName="DataRouterState";var xt=ae.createContext(!1);function useIsRSCRouterContext(){return ae.useContext(xt)}var Bt=ae.createContext({isTransitioning:!1});Bt.displayName="ViewTransition";var wt=ae.createContext(new Map);wt.displayName="Fetchers";var Pt=ae.createContext(null);Pt.displayName="Await";var Ot=ae.createContext(null);Ot.displayName="Navigation";var Dt=ae.createContext(null);Dt.displayName="Location";var Ft=ae.createContext({outlet:null,matches:[],isDataRoute:!1});Ft.displayName="Route";var zt=ae.createContext(null);zt.displayName="RouteError";var Zt=!0,Wt="REACT_ROUTER_ERROR";function useInRouterContext(){return null!=ae.useContext(Dt)}function useLocation(){return invariant(useInRouterContext(),"useLocation() may be used only in the context of a component."),ae.useContext(Dt).location}function useNavigationType(){return ae.useContext(Dt).navigationType}var Kt="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function useIsomorphicLayoutEffect(B){ae.useContext(Ot).static||ae.useLayoutEffect(B)}function useNavigate(){let{isDataRoute:B}=ae.useContext(Ft);return B?function useNavigateStable(){let{router:B}=useDataRouterContext("useNavigate"),j=useCurrentRouteId("useNavigate"),z=ae.useRef(!1);return useIsomorphicLayoutEffect((()=>{z.current=!0})),ae.useCallback((async($,ee={})=>{warning(z.current,Kt),z.current&&("number"==typeof $?await B.navigate($):await B.navigate($,{fromRouteId:j,...ee}))}),[B,j])}():function useNavigateUnstable(){invariant(useInRouterContext(),"useNavigate() may be used only in the context of a component.");let B=ae.useContext(ft),{basename:j,navigator:z}=ae.useContext(Ot),{matches:$}=ae.useContext(Ft),{pathname:ee}=useLocation(),ie=JSON.stringify(getResolveToMatches($)),le=ae.useRef(!1);return useIsomorphicLayoutEffect((()=>{le.current=!0})),ae.useCallback((($,ae={})=>{if(warning(le.current,Kt),!le.current)return;if("number"==typeof $)return void z.go($);let ce=resolveTo($,JSON.parse(ie),ee,"path"===ae.relative);null==B&&"/"!==j&&(ce.pathname="/"===ce.pathname?j:joinPaths([j,ce.pathname])),(ae.replace?z.replace:z.push)(ce,ae.state,ae)}),[j,z,ie,ee,B])}()}var Xt=ae.createContext(null);function useParams(){let{matches:B}=ae.useContext(Ft),j=B[B.length-1];return j?j.params:{}}function useResolvedPath(B,{relative:j}={}){let{matches:z}=ae.useContext(Ft),{pathname:$}=useLocation(),ee=JSON.stringify(getResolveToMatches(z));return ae.useMemo((()=>resolveTo(B,JSON.parse(ee),$,"path"===j)),[B,ee,$,j])}function useRoutesImpl(B,j,z,$,ee){invariant(useInRouterContext(),"useRoutes() may be used only in the context of a component.");let{navigator:ie}=ae.useContext(Ot),{matches:le}=ae.useContext(Ft),ce=le[le.length-1],de=ce?ce.params:{},fe=ce?ce.pathname:"/",be=ce?ce.pathnameBase:"/",ye=ce&&ce.route;if(Zt){let B=ye&&ye.path||"";warningOnce(fe,!ye||B.endsWith("*")||B.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${fe}" (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.\n\nPlease change the parent to .`)}let we,Se=useLocation();if(j){let B="string"==typeof j?parsePath(j):j;invariant("/"===be||B.pathname?.startsWith(be),`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 "${be}" but pathname "${B.pathname}" was given in the \`location\` prop.`),we=B}else we=Se;let Te=we.pathname||"/",Re=Te;if("/"!==be){let B=be.replace(/^\//,"").split("/");Re="/"+Te.replace(/^\//,"").split("/").slice(B.length).join("/")}let He=matchRoutes(B,{pathname:Re});Zt&&(warning(ye||null!=He,`No routes matched location "${we.pathname}${we.search}${we.hash}" `),warning(null==He||void 0!==He[He.length-1].route.element||void 0!==He[He.length-1].route.Component||void 0!==He[He.length-1].route.lazy,`Matched leaf route at location "${we.pathname}${we.search}${we.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 ze=_renderMatches(He&&He.map((B=>Object.assign({},B,{params:Object.assign({},de,B.params),pathname:joinPaths([be,ie.encodeLocation?ie.encodeLocation(B.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:B.pathname]),pathnameBase:"/"===B.pathnameBase?be:joinPaths([be,ie.encodeLocation?ie.encodeLocation(B.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:B.pathnameBase])}))),le,z,$,ee);return j&&ze?ae.createElement(Dt.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...we},navigationType:"POP"}},ze):ze}function DefaultErrorComponent(){let B=useRouteError(),j=isRouteErrorResponse(B)?`${B.status} ${B.statusText}`:B instanceof Error?B.message:JSON.stringify(B),z=B instanceof Error?B.stack:null,$="rgba(200,200,200, 0.5)",ee={padding:"0.5rem",backgroundColor:$},ie={padding:"2px 4px",backgroundColor:$},le=null;return Zt&&(le=ae.createElement(ae.Fragment,null,ae.createElement("p",null,"💿 Hey developer 👋"),ae.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",ae.createElement("code",{style:ie},"ErrorBoundary")," or"," ",ae.createElement("code",{style:ie},"errorElement")," prop on your route."))),ae.createElement(ae.Fragment,null,ae.createElement("h2",null,"Unexpected Application Error!"),ae.createElement("h3",{style:{fontStyle:"italic"}},j),z?ae.createElement("pre",{style:ee},z):null,le)}var Qt=ae.createElement(DefaultErrorComponent,null),Jt=class extends ae.Component{constructor(B){super(B),this.state={location:B.location,revalidation:B.revalidation,error:B.error}}static getDerivedStateFromError(B){return{error:B}}static getDerivedStateFromProps(B,j){return j.location!==B.location||"idle"!==j.revalidation&&"idle"===B.revalidation?{error:B.error,location:B.location,revalidation:B.revalidation}:{error:void 0!==B.error?B.error:j.error,location:j.location,revalidation:B.revalidation||j.revalidation}}componentDidCatch(B,j){this.props.onError&&this.props.onError(B,j)}render(){let B=this.state.error;if(this.context&&"object"==typeof B&&B&&"digest"in B&&"string"==typeof B.digest){const j=function decodeRouteErrorResponseDigest(B){if(B.startsWith(`${Wt}:ROUTE_ERROR_RESPONSE:{`))try{let j=JSON.parse(B.slice(40));if("object"==typeof j&&j&&"number"==typeof j.status&&"string"==typeof j.statusText)return new He(j.status,j.statusText,j.data)}catch{}}(B.digest);j&&(B=j)}let j=void 0!==B?ae.createElement(Ft.Provider,{value:this.props.routeContext},ae.createElement(zt.Provider,{value:B,children:this.props.component})):this.props.children;return this.context?ae.createElement(RSCErrorHandler,{error:B},j):j}};Jt.contextType=xt;var rr=new WeakMap;function RSCErrorHandler({children:B,error:j}){let{basename:z}=ae.useContext(Ot);if("object"==typeof j&&j&&"digest"in j&&"string"==typeof j.digest){let B=function decodeRedirectErrorDigest(B){if(B.startsWith(`${Wt}:REDIRECT:{`))try{let j=JSON.parse(B.slice(28));if("object"==typeof j&&j&&"number"==typeof j.status&&"string"==typeof j.statusText&&"string"==typeof j.location&&"boolean"==typeof j.reloadDocument&&"boolean"==typeof j.replace)return j}catch{}}(j.digest);if(B){let $=rr.get(j);if($)throw $;let ee=parseToInfo(B.location,z);if(ze&&!rr.get(j)){if(!ee.isExternal&&!B.reloadDocument){const z=Promise.resolve().then((()=>window.__reactRouterDataRouter.navigate(ee.to,{replace:B.replace})));throw rr.set(j,z),z}window.location.href=ee.absoluteURL||ee.to}return ae.createElement("meta",{httpEquiv:"refresh",content:`0;url=${ee.absoluteURL||ee.to}`})}}return B}function RenderedRoute({routeContext:B,match:j,children:z}){let $=ae.useContext(ft);return $&&$.static&&$.staticContext&&(j.route.errorElement||j.route.ErrorBoundary)&&($.staticContext._deepestRenderedBoundaryId=j.route.id),ae.createElement(Ft.Provider,{value:B},z)}function _renderMatches(B,j=[],z=null,$=null,ee=null){if(null==B){if(!z)return null;if(z.errors)B=z.matches;else{if(0!==j.length||z.initialized||!(z.matches.length>0))return null;B=z.matches}}let ie=B,le=z?.errors;if(null!=le){let B=ie.findIndex((B=>B.route.id&&void 0!==le?.[B.route.id]));invariant(B>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(le).join(",")}`),ie=ie.slice(0,Math.min(ie.length,B+1))}let ce=!1,de=-1;if(z)for(let ae=0;ae=0?ie.slice(0,de+1):[ie[0]];break}}}let fe=z&&$?(B,j)=>{$(B,{location:z.location,params:z.matches?.[0]?.params??{},unstable_pattern:getRoutePattern(z.matches),errorInfo:j})}:void 0;return ie.reduceRight(((B,$,ee)=>{let be,ye=!1,we=null,Se=null;z&&(be=le&&$.route.id?le[$.route.id]:void 0,we=$.route.errorElement||Qt,ce&&(de<0&&0===ee?(warningOnce("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),ye=!0,Se=null):de===ee&&(ye=!0,Se=$.route.hydrateFallbackElement||null)));let Te=j.concat(ie.slice(0,ee+1)),getChildren=()=>{let j;return j=be?we:ye?Se:$.route.Component?ae.createElement($.route.Component,null):$.route.element?$.route.element:B,ae.createElement(RenderedRoute,{match:$,routeContext:{outlet:B,matches:Te,isDataRoute:null!=z},children:j})};return z&&($.route.ErrorBoundary||$.route.errorElement||0===ee)?ae.createElement(Jt,{location:z.location,revalidation:z.revalidation,component:we,error:be,children:getChildren(),routeContext:{outlet:null,matches:Te,isDataRoute:!0},onError:fe}):getChildren()}),null)}function getDataRouterConsoleError(B){return`${B} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function useDataRouterContext(B){let j=ae.useContext(ft);return invariant(j,getDataRouterConsoleError(B)),j}function useDataRouterState(B){let j=ae.useContext(ht);return invariant(j,getDataRouterConsoleError(B)),j}function useCurrentRouteId(B){let j=function useRouteContext(B){let j=ae.useContext(Ft);return invariant(j,getDataRouterConsoleError(B)),j}(B),z=j.matches[j.matches.length-1];return invariant(z.route.id,`${B} can only be used on routes that contain a unique "id"`),z.route.id}function useLoaderData(){let B=useDataRouterState("useLoaderData"),j=useCurrentRouteId("useLoaderData");return B.loaderData[j]}function useRouteLoaderData(B){return useDataRouterState("useRouteLoaderData").loaderData[B]}function useRouteError(){let B=ae.useContext(zt),j=useDataRouterState("useRouteError"),z=useCurrentRouteId("useRouteError");return void 0!==B?B:j.errors?.[z]}var or={};function warningOnce(B,j,z){j||or[B]||(or[B]=!0,warning(!1,z))}var sr={};function warnOnce(B,j){B||sr[j]||(sr[j]=!0)}var cr=($||($=z.t(ae,2))).useOptimistic,stableUseOptimisticSetter=()=>{};function mapRouteProperties(B){let j={hasErrorBoundary:B.hasErrorBoundary||null!=B.ErrorBoundary||null!=B.errorElement};return B.Component&&(Zt&&B.element&&warning(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(j,{element:ae.createElement(B.Component),Component:void 0})),B.HydrateFallback&&(Zt&&B.hydrateFallbackElement&&warning(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(j,{hydrateFallbackElement:ae.createElement(B.HydrateFallback),HydrateFallback:void 0})),B.ErrorBoundary&&(Zt&&B.errorElement&&warning(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(j,{errorElement:ae.createElement(B.ErrorBoundary),ErrorBoundary:void 0})),j}var ur=["HydrateFallback","hydrateFallbackElement"];var mr=class{constructor(){this.status="pending",this.promise=new Promise(((B,j)=>{this.resolve=j=>{"pending"===this.status&&(this.status="resolved",B(j))},this.reject=B=>{"pending"===this.status&&(this.status="rejected",j(B))}}))}};function RouterProvider({router:B,flushSync:j,onError:z,unstable_useTransitions:$}){let ee=useIsRSCRouterContext();$=ee||$;let[ie,le]=ae.useState(B.state),[ce,de]=function useOptimisticSafe(B){return cr?cr(B):[B,stableUseOptimisticSetter]}(ie),[fe,be]=ae.useState(),[ye,we]=ae.useState({isTransitioning:!1}),[Se,Te]=ae.useState(),[Re,He]=ae.useState(),[ze,qe]=ae.useState(),$e=ae.useRef(new Map),We=ae.useCallback(((ee,{deletedFetchers:ie,newErrors:ce,flushSync:fe,viewTransitionOpts:ye})=>{ce&&z&&Object.values(ce).forEach((B=>z(B,{location:ee.location,params:ee.matches[0]?.params??{},unstable_pattern:getRoutePattern(ee.matches)}))),ee.fetchers.forEach(((B,j)=>{void 0!==B.data&&$e.current.set(j,B.data)})),ie.forEach((B=>$e.current.delete(B))),warnOnce(!1===fe||null!=j,'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let ze=null!=B.window&&null!=B.window.document&&"function"==typeof B.window.document.startViewTransition;if(warnOnce(null==ye||ze,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),ye&&ze){if(j&&fe){j((()=>{Re&&(Se?.resolve(),Re.skipTransition()),we({isTransitioning:!0,flushSync:!0,currentLocation:ye.currentLocation,nextLocation:ye.nextLocation})}));let z=B.window.document.startViewTransition((()=>{j((()=>le(ee)))}));return z.finished.finally((()=>{j((()=>{Te(void 0),He(void 0),be(void 0),we({isTransitioning:!1})}))})),void j((()=>He(z)))}Re?(Se?.resolve(),Re.skipTransition(),qe({state:ee,currentLocation:ye.currentLocation,nextLocation:ye.nextLocation})):(be(ee),we({isTransitioning:!0,flushSync:!1,currentLocation:ye.currentLocation,nextLocation:ye.nextLocation}))}else j&&fe?j((()=>le(ee))):!1===$?le(ee):ae.startTransition((()=>{!0===$&&de((B=>getOptimisticRouterState(B,ee))),le(ee)}))}),[B.window,j,Re,Se,$,de,z]);ae.useLayoutEffect((()=>B.subscribe(We)),[B,We]),ae.useEffect((()=>{ye.isTransitioning&&!ye.flushSync&&Te(new mr)}),[ye]),ae.useEffect((()=>{if(Se&&fe&&B.window){let j=fe,z=Se.promise,ee=B.window.document.startViewTransition((async()=>{!1===$?le(j):ae.startTransition((()=>{!0===$&&de((B=>getOptimisticRouterState(B,j))),le(j)})),await z}));ee.finished.finally((()=>{Te(void 0),He(void 0),be(void 0),we({isTransitioning:!1})})),He(ee)}}),[fe,Se,B.window,$,de]),ae.useEffect((()=>{Se&&fe&&ce.location.key===fe.location.key&&Se.resolve()}),[Se,Re,ce.location,fe]),ae.useEffect((()=>{!ye.isTransitioning&&ze&&(be(ze.state),we({isTransitioning:!0,flushSync:!1,currentLocation:ze.currentLocation,nextLocation:ze.nextLocation}),qe(void 0))}),[ye.isTransitioning,ze]);let tt=ae.useMemo((()=>({createHref:B.createHref,encodeLocation:B.encodeLocation,go:j=>B.navigate(j),push:(j,z,$)=>B.navigate(j,{state:z,preventScrollReset:$?.preventScrollReset}),replace:(j,z,$)=>B.navigate(j,{replace:!0,state:z,preventScrollReset:$?.preventScrollReset})})),[B]),rt=B.basename||"/",nt=ae.useMemo((()=>({router:B,navigator:tt,static:!1,basename:rt,onError:z})),[B,tt,rt,z]);return ae.createElement(ae.Fragment,null,ae.createElement(ft.Provider,{value:nt},ae.createElement(ht.Provider,{value:ce},ae.createElement(wt.Provider,{value:$e.current},ae.createElement(Bt.Provider,{value:ye},ae.createElement(Router,{basename:rt,location:ce.location,navigationType:ce.historyAction,navigator:tt,unstable_useTransitions:$},ae.createElement(_r,{routes:B.routes,future:B.future,state:ce,onError:z})))))),null)}function getOptimisticRouterState(B,j){return{...B,navigation:"idle"!==j.navigation.state?j.navigation:B.navigation,revalidation:"idle"!==j.revalidation?j.revalidation:B.revalidation,actionData:"submitting"!==j.navigation.state?j.actionData:B.actionData,fetchers:j.fetchers}}var _r=ae.memo((function DataRoutes({routes:B,future:j,state:z,onError:$}){return useRoutesImpl(B,void 0,z,$,j)}));function Navigate({to:B,replace:j,state:z,relative:$}){invariant(useInRouterContext()," may be used only in the context of a component.");let{static:ee}=ae.useContext(Ot);warning(!ee," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:ie}=ae.useContext(Ft),{pathname:le}=useLocation(),ce=useNavigate(),de=resolveTo(B,getResolveToMatches(ie),le,"path"===$),fe=JSON.stringify(de);return ae.useEffect((()=>{ce(JSON.parse(fe),{replace:j,state:z,relative:$})}),[ce,fe,$,j,z]),null}function Outlet(B){return function useOutlet(B){let j=ae.useContext(Ft).outlet;return ae.useMemo((()=>j&&ae.createElement(Xt.Provider,{value:B},j)),[j,B])}(B.context)}function Router({basename:B="/",children:j=null,location:z,navigationType:$="POP",navigator:ee,static:ie=!1,unstable_useTransitions:le}){invariant(!useInRouterContext(),"You cannot render a inside another . You should never have more than one in your app.");let ce=B.replace(/^\/*/,"/"),de=ae.useMemo((()=>({basename:ce,navigator:ee,static:ie,unstable_useTransitions:le,future:{}})),[ce,ee,ie,le]);"string"==typeof z&&(z=parsePath(z));let{pathname:fe="/",search:be="",hash:ye="",state:we=null,key:Se="default"}=z,Te=ae.useMemo((()=>{let B=stripBasename(fe,ce);return null==B?null:{location:{pathname:B,search:be,hash:ye,state:we,key:Se},navigationType:$}}),[ce,fe,be,ye,we,Se,$]);return warning(null!=Te,` is not able to match the URL "${fe}${be}${ye}" because it does not start with the basename, so the won't render anything.`),null==Te?null:ae.createElement(Ot.Provider,{value:de},ae.createElement(Dt.Provider,{children:j,value:Te}))}function Await({children:B,errorElement:j,resolve:z}){let $=ae.useContext(ft),ee=ae.useContext(ht),ie=ae.useCallback(((B,j)=>{$&&$.onError&&ee&&$.onError(B,{location:ee.location,params:ee.matches[0]?.params||{},unstable_pattern:getRoutePattern(ee.matches),errorInfo:j})}),[$,ee]);return ae.createElement(pr,{resolve:z,errorElement:j,onError:ie},ae.createElement(ResolveAwait,null,B))}var pr=class extends ae.Component{constructor(B){super(B),this.state={error:null}}static getDerivedStateFromError(B){return{error:B}}componentDidCatch(B,j){this.props.onError&&this.props.onError(B,j)}render(){let{children:B,errorElement:j,resolve:z}=this.props,$=null,ee=0;if(z instanceof Promise)if(this.state.error){ee=2;let B=this.state.error;$=Promise.reject().catch((()=>{})),Object.defineProperty($,"_tracked",{get:()=>!0}),Object.defineProperty($,"_error",{get:()=>B})}else z._tracked?($=z,ee="_error"in $?2:"_data"in $?1:0):(ee=0,Object.defineProperty(z,"_tracked",{get:()=>!0}),$=z.then((B=>Object.defineProperty(z,"_data",{get:()=>B})),(B=>{this.props.onError?.(B),Object.defineProperty(z,"_error",{get:()=>B})})));else ee=1,$=Promise.resolve(),Object.defineProperty($,"_tracked",{get:()=>!0}),Object.defineProperty($,"_data",{get:()=>z});if(2===ee&&!j)throw $._error;if(2===ee)return ae.createElement(Pt.Provider,{value:$,children:j});if(1===ee)return ae.createElement(Pt.Provider,{value:$,children:B});throw $}};function ResolveAwait({children:B}){let j=function useAsyncValue(){let B=ae.useContext(Pt);return B?._data}(),z="function"==typeof B?B(j):B;return ae.createElement(ae.Fragment,null,z)}var gr="get",yr="application/x-www-form-urlencoded";function isHtmlElement(B){return"undefined"!=typeof HTMLElement&&B instanceof HTMLElement}function createSearchParams(B=""){return new URLSearchParams("string"==typeof B||Array.isArray(B)||B instanceof URLSearchParams?B:Object.keys(B).reduce(((j,z)=>{let $=B[z];return j.concat(Array.isArray($)?$.map((B=>[z,B])):[[z,$]])}),[]))}var xr=null;var Br=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function getFormEncType(B){return null==B||Br.has(B)?B:(warning(!1,`"${B}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${yr}"`),null)}function getFormSubmissionInfo(B,j){let z,$,ee,ae,ie;if(function isFormElement(B){return isHtmlElement(B)&&"form"===B.tagName.toLowerCase()}(B)){let ie=B.getAttribute("action");$=ie?stripBasename(ie,j):null,z=B.getAttribute("method")||gr,ee=getFormEncType(B.getAttribute("enctype"))||yr,ae=new FormData(B)}else if(function isButtonElement(B){return isHtmlElement(B)&&"button"===B.tagName.toLowerCase()}(B)||function isInputElement(B){return isHtmlElement(B)&&"input"===B.tagName.toLowerCase()}(B)&&("submit"===B.type||"image"===B.type)){let ie=B.form;if(null==ie)throw new Error('Cannot submit a