From cc717d0e33ca1e9c30030d3b0ae8bada14b16ffb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Feb 2026 01:52:24 +0000 Subject: [PATCH 01/14] build(deps): bump actions/upload-artifact from 6 to 7 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/e2e-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index e1306643fc..f79d1dbf2e 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -59,7 +59,7 @@ jobs: npm run dev:stop - name: Archive E2E results - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 if: failure() with: name: test-results From 51365a55a5948b718ec53bff3a468a7a7a424b21 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 01:52:21 +0000 Subject: [PATCH 02/14] build(deps): bump ramsey/composer-install from 3 to 4 Bumps [ramsey/composer-install](https://github.com/ramsey/composer-install) from 3 to 4. - [Release notes](https://github.com/ramsey/composer-install/releases) - [Commits](https://github.com/ramsey/composer-install/compare/v3...v4) --- updated-dependencies: - dependency-name: ramsey/composer-install dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/cs-lint.yml | 2 +- .github/workflows/integration-tests.yml | 2 +- .github/workflows/unit-tests.yml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cs-lint.yml b/.github/workflows/cs-lint.yml index f424fd035c..1f6a8cf8a2 100644 --- a/.github/workflows/cs-lint.yml +++ b/.github/workflows/cs-lint.yml @@ -53,7 +53,7 @@ jobs: # Install dependencies and handle caching in one go. # @link https://github.com/marketplace/actions/install-composer-dependencies - name: Install Composer dependencies - uses: ramsey/composer-install@v3 + uses: ramsey/composer-install@v4 # Lint PHP. - name: Lint PHP against parse errors diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index a41be748a6..a05e354437 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -63,7 +63,7 @@ jobs: run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - name: Install Composer dependencies - uses: ramsey/composer-install@v3 + uses: ramsey/composer-install@v4 - name: Install Subversion run: | diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 3de2c5ac2a..54c86908a2 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -63,11 +63,11 @@ jobs: - name: Install Composer dependencies for PHP < 8.2 if: ${{ matrix.php < 8.2 }} - uses: ramsey/composer-install@v3 + uses: ramsey/composer-install@v4 - name: Install Composer dependencies for PHP >= 8.2 if: ${{ matrix.php >= 8.2 }} - uses: ramsey/composer-install@v3 + uses: ramsey/composer-install@v4 with: composer-options: --ignore-platform-reqs From 73a2aed60d4a8a9092c3e0f16772b49260a784b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 01:52:30 +0000 Subject: [PATCH 03/14] build(deps): bump actions/dependency-review-action from 4 to 5 Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 4 to 5. - [Release notes](https://github.com/actions/dependency-review-action/releases) - [Commits](https://github.com/actions/dependency-review-action/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/dependency-review-action dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/dependency-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 1b9849d16f..78b4e8a4a8 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -19,4 +19,4 @@ jobs: # Checks for dependencies with known vulnerabilities - name: Review dependencies - uses: actions/dependency-review-action@v4 + uses: actions/dependency-review-action@v5 From 41005add2da5cea97ceefe0646af72eeae3219f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jun 2026 04:00:26 +0000 Subject: [PATCH 04/14] build(deps-dev): bump react-router from 7.12.0 to 7.16.0 Bumps [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) from 7.12.0 to 7.16.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router@7.16.0/packages/react-router) --- updated-dependencies: - dependency-name: react-router dependency-version: 7.16.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3f00423832..585d28cf93 100644 --- a/package-lock.json +++ b/package-lock.json @@ -54,7 +54,7 @@ "husky": "^9.1.7", "lodash.debounce": "^4.0.8", "prettier": "^3.7.4", - "react-router": "^7.12.0", + "react-router": "^7.16.0", "ts-loader": "^9.5.4", "typescript": "^5.9.3" }, @@ -23999,9 +23999,9 @@ } }, "node_modules/react-router": { - "version": "7.12.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.12.0.tgz", - "integrity": "sha512-kTPDYPFzDVGIIGNLS5VJykK0HfHLY5MF3b+xj0/tTyNYL1gF1qs7u67Z9jEhQk2sQ98SUaHxlG31g1JtF7IfVw==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.16.0.tgz", + "integrity": "sha512-wArC8lVyJb3+jM9OpDyW6hLCizACWkvQR/sSGqSs+o5uEXEtGlqdZ4v8hENR3Jad6i+LRkK93q/+bQAcvl6V1A==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 6bec5fd1e5..9ef7b66c7b 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "husky": "^9.1.7", "lodash.debounce": "^4.0.8", "prettier": "^3.7.4", - "react-router": "^7.12.0", + "react-router": "^7.16.0", "ts-loader": "^9.5.4", "typescript": "^5.9.3" }, From 9d072cf9b4e27f70cbe9d4c97d08e538f1c6147a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 4 Jun 2026 11:32:41 +0000 Subject: [PATCH 05/14] build: regenerate dashboard-page assets --- build/content-helper/dashboard-page.asset.php | 2 +- build/content-helper/dashboard-page.js | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/build/content-helper/dashboard-page.asset.php b/build/content-helper/dashboard-page.asset.php index 48a192161b..a5f9b0e613 100644 --- a/build/content-helper/dashboard-page.asset.php +++ b/build/content-helper/dashboard-page.asset.php @@ -1 +1 @@ - array('react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '89926571b1fa95966f9f'); + array('react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => 'dd1333cd2b40cc297d15'); diff --git a/build/content-helper/dashboard-page.js b/build/content-helper/dashboard-page.js index b579788758..92a7bd01d5 100644 --- a/build/content-helper/dashboard-page.js +++ b/build/content-helper/dashboard-page.js @@ -1,9 +1,9 @@ -!function(){"use strict";var e,t,n={20:function(e,t,n){var r=n(609),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:s.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},848:function(e,t,n){e.exports=n(20)},609:function(e){e.exports=window.React}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e](i,i.exports,o),i.exports}o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);o.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((function(e){a[e]=function(){return n[e]}}));return a.default=function(){return n},o.d(i,a),i},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e=o(848),t=o(609),n=o.t(t,2),r="popstate";function i(e={}){return function(e,t,n,o={}){let{window:i=document.defaultView,v5Compat:s=!1}=o,d=i.history,p="POP",f=null,h=g();function g(){return(d.state||{idx:null}).idx}function v(){p="POP";let e=g(),t=null==e?null:e-h;h=e,f&&f({action:p,location:y.location,delta:t})}function m(e){return function(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),a(n,"No window.location.(origin|href) available to create URL");let r="string"==typeof e?e:u(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}(e)}null==h&&(h=0,d.replaceState({...d.state,idx:h},""));let y={get action(){return p},get location(){return e(i,d)},listen(e){if(f)throw new Error("A history only accepts one active listener");return i.addEventListener(r,v),f=e,()=>{i.removeEventListener(r,v),f=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){p="PUSH";let r=c(y.location,e,t);n&&n(r,e),h=g()+1;let o=l(r,h),a=y.createHref(r);try{d.pushState(o,"",a)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;i.location.assign(a)}s&&f&&f({action:p,location:y.location,delta:1})},replace:function(e,t){p="REPLACE";let r=c(y.location,e,t);n&&n(r,e),h=g();let o=l(r,h),i=y.createHref(r);d.replaceState(o,"",i),s&&f&&f({action:p,location:y.location,delta:0})},go(e){return d.go(e)}};return y}((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=d(e.location.hash.substring(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),c("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:u(t))}),(function(e,t){s("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}),e)}function a(e,t){if(!1===e||null==e)throw new Error(t)}function s(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function l(e,t){return{usr:e.state,key:e.key,idx:t}}function c(e,t,n=null,r){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?d(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)}}function u({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function d(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function p(e,t,n="/"){return function(e,t,n,r){let o=L(("string"==typeof t?d(t):t).pathname||"/",n);if(null==o)return null;let i=f(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let a=null;for(let e=0;null==a&&e{let c={relativePath:void 0===l?e.path||"":l,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(r)&&s)return;a(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let u=R([r,c.relativePath]),d=n.concat(c);e.children&&e.children.length>0&&(a(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),f(e.children,t,d,u,s)),(null!=e.path||e.index)&&t.push({path:u,score:_(u,e.index),routesMeta:d})};return e.forEach(((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of h(e.path))i(e,t,!0,n);else i(e,t)})),t}function h(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=h(r.join("/")),s=[];return s.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}new WeakMap;var g=/^:[\w-]+$/,v=3,m=2,y=1,b=10,w=-2,x=e=>"*"===e;function _(e,t){let n=e.split("/"),r=n.length;return n.some(x)&&(r+=w),t&&(r+=m),n.filter((e=>!x(e))).reduce(((e,t)=>e+(g.test(t)?v:""===t?y:b)),r)}function k(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",a=[];for(let e=0;e(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)"))).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce(((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=l[r]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const o=l[r];return e[t]=n&&!o?void 0:(o||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function E(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return s(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function L(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}var P=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function T(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}function j(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function C(e){let t=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t.map(((e,n)=>n===t.length-1?e.pathname:e.pathnameBase))}function N(e,t,n,r=!1){let o;"string"==typeof e?o=d(e):(o={...e},a(!o.pathname||!o.pathname.includes("?"),j("?","pathname","search",o)),a(!o.pathname||!o.pathname.includes("#"),j("#","pathname","hash",o)),a(!o.search||!o.search.includes("#"),j("#","search","hash",o)));let i,l=""===e||""===o.pathname,c=l?"/":o.pathname;if(null==c)i=n;else{let e=t.length-1;if(!r&&c.startsWith("..")){let t=c.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let u=function(e,t="/"){let n,{pathname:r,search:o="",hash:i=""}="string"==typeof e?d(e):e;if(r)if(a=r,P.test(a))n=r;else{if(r.includes("//")){let e=r;r=r.replace(/\/\/+/g,"/"),s(!1,`Pathnames cannot have embedded double slashes - normalizing ${e} -> ${r}`)}n=r.startsWith("/")?T(r.substring(1),"/"):T(r,t)}else n=t;var a;return{pathname:n,search:A(o),hash:O(i)}}(o,i),p=c&&"/"!==c&&c.endsWith("/"),f=(l||"."===c)&&n.endsWith("/");return u.pathname.endsWith("/")||!p&&!f||(u.pathname+="/"),u}var R=e=>e.join("/").replace(/\/\/+/g,"/"),I=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),A=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",O=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",D=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function B(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function M(e){return e.map((e=>e.route.path)).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var G="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function U(e,t){let n=e;if("string"!=typeof n||!P.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(G)try{let e=new URL(window.location.href),r=n.startsWith("//")?new URL(e.protocol+n):new URL(n),i=L(r.pathname,t);r.origin===e.origin&&null!=i?n=i+r.search+r.hash:o=!0}catch(e){s(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:n}}Symbol("Uninstrumented"),Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var F=["POST","PUT","PATCH","DELETE"],H=(new Set(F),["GET",...F]);new Set(H),Symbol("ResetLoaderData");var V=t.createContext(null);V.displayName="DataRouter";var $=t.createContext(null);$.displayName="DataRouterState";var W=t.createContext(!1);var z=t.createContext({isTransitioning:!1});z.displayName="ViewTransition",t.createContext(new Map).displayName="Fetchers",t.createContext(null).displayName="Await";var q=t.createContext(null);q.displayName="Navigation";var Z=t.createContext(null);Z.displayName="Location";var K=t.createContext({outlet:null,matches:[],isDataRoute:!1});K.displayName="Route";var Y=t.createContext(null);Y.displayName="RouteError";var J="REACT_ROUTER_ERROR";function X(){return null!=t.useContext(Z)}function Q(){return a(X(),"useLocation() may be used only in the context of a component."),t.useContext(Z).location}var ee="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function te(e){t.useContext(q).static||t.useLayoutEffect(e)}function ne(){let{isDataRoute:e}=t.useContext(K);return e?function(){let{router:e}=function(e){let n=t.useContext(V);return a(n,pe(e)),n}("useNavigate"),n=fe("useNavigate"),r=t.useRef(!1);return te((()=>{r.current=!0})),t.useCallback((async(t,o={})=>{s(r.current,ee),r.current&&("number"==typeof t?await e.navigate(t):await e.navigate(t,{fromRouteId:n,...o}))}),[e,n])}():function(){a(X(),"useNavigate() may be used only in the context of a component.");let e=t.useContext(V),{basename:n,navigator:r}=t.useContext(q),{matches:o}=t.useContext(K),{pathname:i}=Q(),l=JSON.stringify(C(o)),c=t.useRef(!1);return te((()=>{c.current=!0})),t.useCallback(((t,o={})=>{if(s(c.current,ee),!c.current)return;if("number"==typeof t)return void r.go(t);let a=N(t,JSON.parse(l),i,"path"===o.relative);null==e&&"/"!==n&&(a.pathname="/"===a.pathname?n:R([n,a.pathname])),(o.replace?r.replace:r.push)(a,o.state,o)}),[n,r,l,i,e])}()}function re(){let{matches:e}=t.useContext(K),n=e[e.length-1];return n?n.params:{}}function oe(e,{relative:n}={}){let{matches:r}=t.useContext(K),{pathname:o}=Q(),i=JSON.stringify(C(r));return t.useMemo((()=>N(e,JSON.parse(i),o,"path"===n)),[e,i,o,n])}function ie(e,n,r,o,i){a(X(),"useRoutes() may be used only in the context of a component.");let{navigator:l}=t.useContext(q),{matches:c}=t.useContext(K),u=c[c.length-1],f=u?u.params:{},h=u?u.pathname:"/",g=u?u.pathnameBase:"/",v=u&&u.route;{let e=v&&v.path||"";ge(h,!v||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${h}" (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 m,y=Q();if(n){let e="string"==typeof n?d(n):n;a("/"===g||e.pathname?.startsWith(g),`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 "${g}" but pathname "${e.pathname}" was given in the \`location\` prop.`),m=e}else m=y;let b=m.pathname||"/",w=b;if("/"!==g){let e=g.replace(/^\//,"").split("/");w="/"+b.replace(/^\//,"").split("/").slice(e.length).join("/")}let x=p(e,{pathname:w});s(v||null!=x,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),s(null==x||void 0!==x[x.length-1].route.element||void 0!==x[x.length-1].route.Component||void 0!==x[x.length-1].route.lazy,`Matched leaf route at location "${m.pathname}${m.search}${m.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 _=function(e,n=[],r=null,o=null){if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==n.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let i=e,s=r?.errors;if(null!=s){let e=i.findIndex((e=>e.route.id&&void 0!==s?.[e.route.id]));a(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,e+1))}let l=!1,c=-1;if(r)for(let e=0;e=0?i.slice(0,c+1):[i[0]];break}}}let u=r&&o?(e,t)=>{o(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:M(r.matches),errorInfo:t})}:void 0;return i.reduceRight(((e,o,a)=>{let d,p=!1,f=null,h=null;r&&(d=s&&o.route.id?s[o.route.id]:void 0,f=o.route.errorElement||se,l&&(c<0&&0===a?(ge("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,h=null):c===a&&(p=!0,h=o.route.hydrateFallbackElement||null)));let g=n.concat(i.slice(0,a+1)),v=()=>{let n;return n=d?f:p?h:o.route.Component?t.createElement(o.route.Component,null):o.route.element?o.route.element:e,t.createElement(de,{match:o,routeContext:{outlet:e,matches:g,isDataRoute:null!=r},children:n})};return r&&(o.route.ErrorBoundary||o.route.errorElement||0===a)?t.createElement(le,{location:r.location,revalidation:r.revalidation,component:f,error:d,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0},onError:u}):v()}),null)}(x&&x.map((e=>Object.assign({},e,{params:Object.assign({},f,e.params),pathname:R([g,l.encodeLocation?l.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?g:R([g,l.encodeLocation?l.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])}))),c,r,o,i);return n&&_?t.createElement(Z.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...m},navigationType:"POP"}},_):_}function ae(){let e=function(){let e=t.useContext(Y),n=function(e){let n=t.useContext($);return a(n,pe(e)),n}("useRouteError"),r=fe("useRouteError");return void 0!==e?e:n.errors?.[r]}(),n=B(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:o},s={padding:"2px 4px",backgroundColor:o},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=t.createElement(t.Fragment,null,t.createElement("p",null,"đź’ż Hey developer đź‘‹"),t.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",t.createElement("code",{style:s},"ErrorBoundary")," or"," ",t.createElement("code",{style:s},"errorElement")," prop on your route.")),t.createElement(t.Fragment,null,t.createElement("h2",null,"Unexpected Application Error!"),t.createElement("h3",{style:{fontStyle:"italic"}},n),r?t.createElement("pre",{style:i},r):null,l)}t.createContext(null);var se=t.createElement(ae,null),le=class extends t.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith(`${J}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new D(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let n=void 0!==e?t.createElement(K.Provider,{value:this.props.routeContext},t.createElement(Y.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?t.createElement(ue,{error:e},n):n}};le.contextType=W;var ce=new WeakMap;function ue({children:e,error:n}){let{basename:r}=t.useContext(q);if("object"==typeof n&&n&&"digest"in n&&"string"==typeof n.digest){let e=function(e){if(e.startsWith(`${J}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(n.digest);if(e){let o=ce.get(n);if(o)throw o;let i=U(e.location,r);if(G&&!ce.get(n)){if(!i.isExternal&&!e.reloadDocument){const t=Promise.resolve().then((()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace})));throw ce.set(n,t),t}window.location.href=i.absoluteURL||i.to}return t.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function de({routeContext:e,match:n,children:r}){let o=t.useContext(V);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),t.createElement(K.Provider,{value:e},r)}function pe(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function fe(e){let n=function(e){let n=t.useContext(K);return a(n,pe(e)),n}(e),r=n.matches[n.matches.length-1];return a(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}var he={};function ge(e,t,n){t||he[e]||(he[e]=!0,s(!1,n))}function ve({to:e,replace:n,state:r,relative:o}){a(X()," may be used only in the context of a component.");let{static:i}=t.useContext(q);s(!i," 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:l}=t.useContext(K),{pathname:c}=Q(),u=ne(),d=N(e,C(l),c,"path"===o),p=JSON.stringify(d);return t.useEffect((()=>{u(JSON.parse(p),{replace:n,state:r,relative:o})}),[u,p,o,n,r]),null}function me(e){a(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function ye({basename:e="/",children:n=null,location:r,navigationType:o="POP",navigator:i,static:l=!1,unstable_useTransitions:c}){a(!X(),"You cannot render a inside another . You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),p=t.useMemo((()=>({basename:u,navigator:i,static:l,unstable_useTransitions:c,future:{}})),[u,i,l,c]);"string"==typeof r&&(r=d(r));let{pathname:f="/",search:h="",hash:g="",state:v=null,key:m="default"}=r,y=t.useMemo((()=>{let e=L(f,u);return null==e?null:{location:{pathname:e,search:h,hash:g,state:v,key:m},navigationType:o}}),[u,f,h,g,v,m,o]);return s(null!=y,` is not able to match the URL "${f}${h}${g}" because it does not start with the basename, so the won't render anything.`),null==y?null:t.createElement(q.Provider,{value:p},t.createElement(Z.Provider,{children:n,value:y}))}function be({children:e,location:t}){return ie(we(e),t)}function we(e,n=[]){let r=[];return t.Children.forEach(e,((e,o)=>{if(!t.isValidElement(e))return;let i=[...n,o];if(e.type===t.Fragment)return void r.push.apply(r,we(e.props.children,i));a(e.type===me,`[${"string"==typeof e.type?e.type:e.type.name}] is not a component. All component children of must be a or `),a(!e.props.index||!e.props.children,"An index route cannot have child routes.");let s={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(s.children=we(e.props.children,i)),r.push(s)})),r}n.useOptimistic,t.memo((function({routes:e,future:t,state:n,onError:r}){return ie(e,void 0,n,r,t)})),t.Component;var xe="get",_e="application/x-www-form-urlencoded";function ke(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}var Se=null,Ee=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Le(e){return null==e||Ee.has(e)?e:(s(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${_e}"`),null)}function Pe(e,t){if(!1===e||null==e)throw new Error(t)}function Te(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function je(e,t,n,r,o,i){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===i?t.filter(((e,t)=>a(e,t)||s(e,t))):"data"===i?t.filter(((t,i)=>{let l=r.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(a(t,i)||s(t,i))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0})):[]}function Ce(e,t,{includeHydrateFallback:n}={}){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let o=[r.module];return r.clientActionModule&&(o=o.concat(r.clientActionModule)),r.clientLoaderModule&&(o=o.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(o=o.concat(r.hydrateFallbackModule)),r.imports&&(o=o.concat(r.imports)),o})).flat(1),[...new Set(r)];var r}function Ne(){let e=t.useContext(V);return Pe(e,"You must render this element inside a element"),e}function Re(){let e=t.useContext($);return Pe(e,"You must render this element inside a element"),e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),"undefined"!=typeof window?window:"undefined"!=typeof globalThis&&globalThis,Symbol("SingleFetchRedirect");var Ie=t.createContext(void 0);function Ae(){let e=t.useContext(Ie);return Pe(e,"You must render this element inside a element"),e}function Oe(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function De({page:e,...n}){let{router:r}=Ne(),o=t.useMemo((()=>p(r.routes,e,r.basename)),[r.routes,e,r.basename]);return o?t.createElement(Me,{page:e,matches:o,...n}):null}function Be(e){let{manifest:n,routeModules:r}=Ae(),[o,i]=t.useState([]);return t.useEffect((()=>{let t=!1;return async function(e,t,n){return function(e,t){let n=new Set,r=new Set(t);return e.reduce(((e,o)=>{if(t&&(null==(i=o)||"string"!=typeof i.page)&&"script"===o.as&&o.href&&r.has(o.href))return e;var i;let a=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(o));return n.has(a)||(n.add(a),e.push({key:a,link:o})),e}),[])}((await Promise.all(e.map((async e=>{let r=t.routes[e.route.id];if(r){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise((()=>{}))}}(r,n);return e.links?e.links():[]}return[]})))).flat(1).filter(Te).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}(e,n,r).then((e=>{t||i(e)})),()=>{t=!0}}),[e,n,r]),o}function Me({page:e,matches:n,...r}){let o=Q(),{future:i,manifest:a,routeModules:s}=Ae(),{basename:l}=Ne(),{loaderData:c,matches:u}=Re(),d=t.useMemo((()=>je(e,n,u,a,o,"data")),[e,n,u,a,o]),p=t.useMemo((()=>je(e,n,u,a,o,"assets")),[e,n,u,a,o]),f=t.useMemo((()=>{if(e===o.pathname+o.search+o.hash)return[];let t=new Set,r=!1;if(n.forEach((e=>{let n=a.routes[e.route.id];n&&n.hasLoader&&(!d.some((t=>t.route.id===e.route.id))&&e.route.id in c&&s[e.route.id]?.shouldRevalidate||n.hasClientLoader?r=!0:t.add(e.route.id))})),0===t.size)return[];let u=function(e,t,n,r){let o="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:"/"===o.pathname?o.pathname=`_root.${r}`:t&&"/"===L(o.pathname,t)?o.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}(e,l,i.unstable_trailingSlashAwareDataRequests,"data");return r&&t.size>0&&u.searchParams.set("_routes",n.filter((e=>t.has(e.route.id))).map((e=>e.route.id)).join(",")),[u.pathname+u.search]}),[l,i.unstable_trailingSlashAwareDataRequests,c,o,a,d,n,e,s]),h=t.useMemo((()=>Ce(p,a)),[p,a]),g=Be(p);return t.createElement(t.Fragment,null,f.map((e=>t.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r}))),h.map((e=>t.createElement("link",{key:e,rel:"modulepreload",href:e,...r}))),g.map((({key:e,link:n})=>t.createElement("link",{key:e,nonce:r.nonce,...n}))))}Ie.displayName="FrameworkContext";function Ge(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}t.Component;var Ue="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Ue&&(window.__reactRouterVersion="7.12.0")}catch(e){}function Fe({basename:e,children:n,unstable_useTransitions:r,window:o}){let a=t.useRef();null==a.current&&(a.current=i({window:o,v5Compat:!0}));let s=a.current,[l,c]=t.useState({action:s.action,location:s.location}),u=t.useCallback((e=>{!1===r?c(e):t.startTransition((()=>c(e)))}),[r]);return t.useLayoutEffect((()=>s.listen(u)),[s,u]),t.createElement(ye,{basename:e,children:n,location:l.location,navigationType:l.action,navigator:s,unstable_useTransitions:r})}var He=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ve=t.forwardRef((function({onClick:e,discover:n="render",prefetch:r="none",relative:o,reloadDocument:i,replace:s,state:l,target:c,to:d,preventScrollReset:p,viewTransition:f,unstable_defaultShouldRevalidate:h,...g},v){let{basename:m,unstable_useTransitions:y}=t.useContext(q),b="string"==typeof d&&He.test(d),w=U(d,m),x=function(e,{relative:n}={}){a(X(),"useHref() may be used only in the context of a component.");let{basename:r,navigator:o}=t.useContext(q),{hash:i,pathname:s,search:l}=oe(e,{relative:n}),c=s;return"/"!==r&&(c="/"===s?r:R([r,s])),o.createHref({pathname:c,search:l,hash:i})}(d=w.to,{relative:o}),[_,k,S]=function(e,n){let r=t.useContext(Ie),[o,i]=t.useState(!1),[a,s]=t.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:p}=n,f=t.useRef(null);t.useEffect((()=>{if("render"===e&&s(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{s(e.isIntersecting)}))}),{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}}),[e]),t.useEffect((()=>{if(o){let e=setTimeout((()=>{s(!0)}),100);return()=>{clearTimeout(e)}}}),[o]);let h=()=>{i(!0)},g=()=>{i(!1),s(!1)};return r?"intent"!==e?[a,f,{}]:[a,f,{onFocus:Oe(l,h),onBlur:Oe(c,g),onMouseEnter:Oe(u,h),onMouseLeave:Oe(d,g),onTouchStart:Oe(p,h)}]:[!1,f,{}]}(r,g),E=function(e,{target:n,replace:r,state:o,preventScrollReset:i,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:l,unstable_useTransitions:c}={}){let d=ne(),p=Q(),f=oe(e,{relative:a});return t.useCallback((h=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(h,n)){h.preventDefault();let n=void 0!==r?r:u(p)===u(f),g=()=>d(e,{replace:n,state:o,preventScrollReset:i,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:l});c?t.startTransition((()=>g())):g()}}),[p,d,f,r,o,n,e,i,a,s,l,c])}(d,{replace:s,state:l,target:c,preventScrollReset:p,relative:o,viewTransition:f,unstable_defaultShouldRevalidate:h,unstable_useTransitions:y}),L=t.createElement("a",{...g,...S,href:w.absoluteURL||x,onClick:w.isExternal||i?e:function(t){e&&e(t),t.defaultPrevented||E(t)},ref:Ge(v,k),target:c,"data-discover":b||"render"!==n?void 0:"true"});return _&&!b?t.createElement(t.Fragment,null,L,t.createElement(De,{page:x})):L}));function $e(e){let n=t.useContext(V);return a(n,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),n}Ve.displayName="Link",t.forwardRef((function({"aria-current":e="page",caseSensitive:n=!1,className:r="",end:o=!1,style:i,to:s,viewTransition:l,children:c,...u},d){let p=oe(s,{relative:u.relative}),f=Q(),h=t.useContext($),{navigator:g,basename:v}=t.useContext(q),m=null!=h&&function(e,{relative:n}={}){let r=t.useContext(z);a(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=$e("useViewTransitionState"),i=oe(e,{relative:n});if(!r.isTransitioning)return!1;let s=L(r.currentLocation.pathname,o)||r.currentLocation.pathname,l=L(r.nextLocation.pathname,o)||r.nextLocation.pathname;return null!=S(i.pathname,l)||null!=S(i.pathname,s)}(p)&&!0===l,y=g.encodeLocation?g.encodeLocation(p).pathname:p.pathname,b=f.pathname,w=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;n||(b=b.toLowerCase(),w=w?w.toLowerCase():null,y=y.toLowerCase()),w&&v&&(w=L(w,v)||w);const x="/"!==y&&y.endsWith("/")?y.length-1:y.length;let _,k=b===y||!o&&b.startsWith(y)&&"/"===b.charAt(x),E=null!=w&&(w===y||!o&&w.startsWith(y)&&"/"===w.charAt(y.length)),P={isActive:k,isPending:E,isTransitioning:m},T=k?e:void 0;_="function"==typeof r?r(P):[r,k?"active":null,E?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let j="function"==typeof i?i(P):i;return t.createElement(Ve,{...u,"aria-current":T,className:_,ref:d,style:j,to:s,viewTransition:l},"function"==typeof c?c(P):c)})).displayName="NavLink",t.forwardRef((({discover:e="render",fetcherKey:n,navigate:r,reloadDocument:o,replace:i,state:s,method:l=xe,action:c,onSubmit:d,relative:p,preventScrollReset:f,viewTransition:h,unstable_defaultShouldRevalidate:g,...v},m)=>{let{unstable_useTransitions:y}=t.useContext(q),b=function(){let{router:e}=$e("useSubmit"),{basename:n}=t.useContext(q),r=fe("useRouteId"),o=e.fetch,i=e.navigate;return t.useCallback((async(e,t={})=>{let{action:a,method:s,encType:l,formData:c,body:u}=function(e,t){let n,r,o,i,a;if(ke(s=e)&&"form"===s.tagName.toLowerCase()){let a=e.getAttribute("action");r=a?L(a,t):null,n=e.getAttribute("method")||xe,o=Le(e.getAttribute("enctype"))||_e,i=new FormData(e)}else if(function(e){return ke(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return ke(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a