@eliseubatista99/react-scaffold-core 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
1
  export * from './useDidMount';
2
2
  export * from './useFetch';
3
3
  export * from './useResponsive';
4
+ export * from './useTranslations';
@@ -1 +1,2 @@
1
- export declare const UseResponsiveStoriesSetup: () => import("react/jsx-runtime").JSX.Element;
1
+ import { UseResponsiveInput } from '../useResponsive';
2
+ export declare const UseResponsiveStoriesSetup: (input?: UseResponsiveInput) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { StoryObj } from '@storybook/react-vite';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: () => import("react/jsx-runtime").JSX.Element;
4
+ component: (input?: import('../useResponsive').UseResponsiveInput) => import("react/jsx-runtime").JSX.Element;
5
5
  parameters: {
6
6
  layout: string;
7
7
  };
@@ -10,4 +10,5 @@ declare const meta: {
10
10
  };
11
11
  export default meta;
12
12
  type Story = StoryObj<typeof meta>;
13
- export declare const JsonPlaceholder: Story;
13
+ export declare const Default: Story;
14
+ export declare const CustomBreakpoint: Story;
@@ -1,4 +1,13 @@
1
- export type Device = "mobile" | "tablet" | "desktop";
2
- export declare const useResponsive: () => {
3
- device: Device;
4
- };
1
+ export type Breakpoint = "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
2
+ export type Size = "mobile" | "tablet" | "desktop";
3
+ export type BreakpointConfiguration = Record<Breakpoint, number>;
4
+ export declare const defaultBreakpoints: BreakpointConfiguration;
5
+ export interface UseResponsiveOutput {
6
+ currentWidth: number;
7
+ currentBreakpoint: Breakpoint;
8
+ currentSize: Size;
9
+ }
10
+ export interface UseResponsiveInput {
11
+ breakpointConfiguration?: BreakpointConfiguration;
12
+ }
13
+ export declare const useResponsive: (input?: UseResponsiveInput) => UseResponsiveOutput;
@@ -0,0 +1 @@
1
+ export * from './useTranslations';
@@ -0,0 +1,2 @@
1
+ import { UseTranslationsInput } from '../useTranslations';
2
+ export declare const UseTranslationsStoriesSetup: (input: UseTranslationsInput) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ import { UseTranslationsInput } from '../useTranslations';
3
+ declare const meta: {
4
+ title: string;
5
+ component: (input: UseTranslationsInput) => import("react/jsx-runtime").JSX.Element;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ args: {
11
+ language: import('../useTranslations').Language;
12
+ translations: import('../useTranslations').TranslationList;
13
+ };
14
+ };
15
+ export default meta;
16
+ type Story = StoryObj<typeof meta>;
17
+ export declare const English: Story;
18
+ export declare const Portuguese: Story;
@@ -0,0 +1,14 @@
1
+ export type Language = string;
2
+ export type Translation = Record<Language, string>;
3
+ export declare type TranslationList = {
4
+ [key: string]: Translation;
5
+ };
6
+ export interface UseTranslationsOutput {
7
+ t: (key: string) => string;
8
+ getTranslation: (translation: Translation) => string;
9
+ }
10
+ export interface UseTranslationsInput {
11
+ language: Language;
12
+ translations: TranslationList;
13
+ }
14
+ export declare const useTranslations: (input: UseTranslationsInput) => UseTranslationsOutput;
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react");function lt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const c=lt(E);var re={exports:{}},q={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react");function ut(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const c=ut(E);var re={exports:{}},q={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Ie;function st(){if(Ie)return q;Ie=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(a,n,o){var i=null;if(o!==void 0&&(i=""+o),n.key!==void 0&&(i=""+n.key),"key"in n){o={};for(var u in n)u!=="key"&&(o[u]=n[u])}else o=n;return n=o.ref,{$$typeof:e,type:a,key:i,ref:n!==void 0?n:null,props:o}}return q.Fragment=t,q.jsx=r,q.jsxs=r,q}var G={};/**
9
+ */var Ie;function ct(){if(Ie)return q;Ie=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(a,n,o){var i=null;if(o!==void 0&&(i=""+o),n.key!==void 0&&(i=""+n.key),"key"in n){o={};for(var u in n)u!=="key"&&(o[u]=n[u])}else o=n;return n=o.ref,{$$typeof:e,type:a,key:i,ref:n!==void 0?n:null,props:o}}return q.Fragment=t,q.jsx=r,q.jsxs=r,q}var G={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,12 +14,12 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Le;function ut(){return Le||(Le=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(m==null)return null;if(typeof m=="function")return m.$$typeof===A?null:m.displayName||m.name||null;if(typeof m=="string")return m;switch(m){case g:return"Fragment";case f:return"Profiler";case w:return"StrictMode";case T:return"Suspense";case U:return"SuspenseList";case O:return"Activity"}if(typeof m=="object")switch(typeof m.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),m.$$typeof){case p:return"Portal";case R:return(m.displayName||"Context")+".Provider";case b:return(m._context.displayName||"Context")+".Consumer";case k:var x=m.render;return m=m.displayName,m||(m=x.displayName||x.name||"",m=m!==""?"ForwardRef("+m+")":"ForwardRef"),m;case $:return x=m.displayName||null,x!==null?x:e(m.type)||"Memo";case _:x=m._payload,m=m._init;try{return e(m(x))}catch{}}return null}function t(m){return""+m}function r(m){try{t(m);var x=!1}catch{x=!0}if(x){x=console;var C=x.error,I=typeof Symbol=="function"&&Symbol.toStringTag&&m[Symbol.toStringTag]||m.constructor.name||"Object";return C.call(x,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",I),t(m)}}function a(m){if(m===g)return"<>";if(typeof m=="object"&&m!==null&&m.$$typeof===_)return"<...>";try{var x=e(m);return x?"<"+x+">":"<...>"}catch{return"<...>"}}function n(){var m=V.A;return m===null?null:m.getOwner()}function o(){return Error("react-stack-top-frame")}function i(m){if(Ee.call(m,"key")){var x=Object.getOwnPropertyDescriptor(m,"key").get;if(x&&x.isReactWarning)return!1}return m.key!==void 0}function u(m,x){function C(){Ce||(Ce=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",x))}C.isReactWarning=!0,Object.defineProperty(m,"key",{get:C,configurable:!0})}function l(){var m=e(this.type);return Se[m]||(Se[m]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),m=this.props.ref,m!==void 0?m:null}function s(m,x,C,I,B,D,fe,de){return C=D.ref,m={$$typeof:v,type:m,key:x,props:D,_owner:B},(C!==void 0?C:null)!==null?Object.defineProperty(m,"ref",{enumerable:!1,get:l}):Object.defineProperty(m,"ref",{enumerable:!1,value:null}),m._store={},Object.defineProperty(m._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(m,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(m,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:fe}),Object.defineProperty(m,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:de}),Object.freeze&&(Object.freeze(m.props),Object.freeze(m)),m}function h(m,x,C,I,B,D,fe,de){var L=x.children;if(L!==void 0)if(I)if(ot(L)){for(I=0;I<L.length;I++)y(L[I]);Object.freeze&&Object.freeze(L)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else y(L);if(Ee.call(x,"key")){L=e(m);var z=Object.keys(x).filter(function(it){return it!=="key"});I=0<z.length?"{key: someKey, "+z.join(": ..., ")+": ...}":"{key: someKey}",Te[L+I]||(z=0<z.length?"{"+z.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var Le;function ft(){return Le||(Le=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(m==null)return null;if(typeof m=="function")return m.$$typeof===A?null:m.displayName||m.name||null;if(typeof m=="string")return m;switch(m){case y:return"Fragment";case f:return"Profiler";case w:return"StrictMode";case T:return"Suspense";case U:return"SuspenseList";case O:return"Activity"}if(typeof m=="object")switch(typeof m.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),m.$$typeof){case p:return"Portal";case R:return(m.displayName||"Context")+".Provider";case b:return(m._context.displayName||"Context")+".Consumer";case k:var x=m.render;return m=m.displayName,m||(m=x.displayName||x.name||"",m=m!==""?"ForwardRef("+m+")":"ForwardRef"),m;case $:return x=m.displayName||null,x!==null?x:e(m.type)||"Memo";case _:x=m._payload,m=m._init;try{return e(m(x))}catch{}}return null}function t(m){return""+m}function r(m){try{t(m);var x=!1}catch{x=!0}if(x){x=console;var C=x.error,I=typeof Symbol=="function"&&Symbol.toStringTag&&m[Symbol.toStringTag]||m.constructor.name||"Object";return C.call(x,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",I),t(m)}}function a(m){if(m===y)return"<>";if(typeof m=="object"&&m!==null&&m.$$typeof===_)return"<...>";try{var x=e(m);return x?"<"+x+">":"<...>"}catch{return"<...>"}}function n(){var m=W.A;return m===null?null:m.getOwner()}function o(){return Error("react-stack-top-frame")}function i(m){if(Ee.call(m,"key")){var x=Object.getOwnPropertyDescriptor(m,"key").get;if(x&&x.isReactWarning)return!1}return m.key!==void 0}function u(m,x){function C(){Ce||(Ce=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",x))}C.isReactWarning=!0,Object.defineProperty(m,"key",{get:C,configurable:!0})}function l(){var m=e(this.type);return Se[m]||(Se[m]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),m=this.props.ref,m!==void 0?m:null}function s(m,x,C,I,B,D,fe,de){return C=D.ref,m={$$typeof:v,type:m,key:x,props:D,_owner:B},(C!==void 0?C:null)!==null?Object.defineProperty(m,"ref",{enumerable:!1,get:l}):Object.defineProperty(m,"ref",{enumerable:!1,value:null}),m._store={},Object.defineProperty(m._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(m,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(m,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:fe}),Object.defineProperty(m,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:de}),Object.freeze&&(Object.freeze(m.props),Object.freeze(m)),m}function h(m,x,C,I,B,D,fe,de){var L=x.children;if(L!==void 0)if(I)if(lt(L)){for(I=0;I<L.length;I++)g(L[I]);Object.freeze&&Object.freeze(L)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else g(L);if(Ee.call(x,"key")){L=e(m);var z=Object.keys(x).filter(function(st){return st!=="key"});I=0<z.length?"{key: someKey, "+z.join(": ..., ")+": ...}":"{key: someKey}",Te[L+I]||(z=0<z.length?"{"+z.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,I,L,z,L),Te[L+I]=!0)}if(L=null,C!==void 0&&(r(C),L=""+C),i(x)&&(r(x.key),L=""+x.key),"key"in x){C={};for(var he in x)he!=="key"&&(C[he]=x[he])}else C=x;return L&&u(C,typeof m=="function"?m.displayName||m.name||"Unknown":m),s(m,L,D,B,n(),C,fe,de)}function y(m){typeof m=="object"&&m!==null&&m.$$typeof===v&&m._store&&(m._store.validated=1)}var d=E,v=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),R=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),O=Symbol.for("react.activity"),A=Symbol.for("react.client.reference"),V=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ee=Object.prototype.hasOwnProperty,ot=Array.isArray,ce=console.createTask?console.createTask:function(){return null};d={"react-stack-bottom-frame":function(m){return m()}};var Ce,Se={},ke=d["react-stack-bottom-frame"].bind(d,o)(),Pe=ce(a(o)),Te={};G.Fragment=g,G.jsx=function(m,x,C,I,B){var D=1e4>V.recentlyCreatedOwnerStacks++;return h(m,x,C,!1,I,B,D?Error("react-stack-top-frame"):ke,D?ce(a(m)):Pe)},G.jsxs=function(m,x,C,I,B){var D=1e4>V.recentlyCreatedOwnerStacks++;return h(m,x,C,!0,I,B,D?Error("react-stack-top-frame"):ke,D?ce(a(m)):Pe)}}()),G}var Oe;function ct(){return Oe||(Oe=1,process.env.NODE_ENV==="production"?re.exports=st():re.exports=ut()),re.exports}var P=ct(),K={},$e;function ft(){if($e)return K;$e=1,Object.defineProperty(K,"__esModule",{value:!0}),K.parse=i,K.serialize=s;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,a=/^[\u0020-\u003A\u003D-\u007E]*$/,n=Object.prototype.toString,o=(()=>{const d=function(){};return d.prototype=Object.create(null),d})();function i(d,v){const p=new o,g=d.length;if(g<2)return p;const w=v?.decode||h;let f=0;do{const b=d.indexOf("=",f);if(b===-1)break;const R=d.indexOf(";",f),k=R===-1?g:R;if(b>k){f=d.lastIndexOf(";",b-1)+1;continue}const T=u(d,f,b),U=l(d,b,T),$=d.slice(T,U);if(p[$]===void 0){let _=u(d,b+1,k),O=l(d,k,_);const A=w(d.slice(_,O));p[$]=A}f=k+1}while(f<g);return p}function u(d,v,p){do{const g=d.charCodeAt(v);if(g!==32&&g!==9)return v}while(++v<p);return p}function l(d,v,p){for(;v>p;){const g=d.charCodeAt(--v);if(g!==32&&g!==9)return v+1}return p}function s(d,v,p){const g=p?.encode||encodeURIComponent;if(!e.test(d))throw new TypeError(`argument name is invalid: ${d}`);const w=g(v);if(!t.test(w))throw new TypeError(`argument val is invalid: ${v}`);let f=d+"="+w;if(!p)return f;if(p.maxAge!==void 0){if(!Number.isInteger(p.maxAge))throw new TypeError(`option maxAge is invalid: ${p.maxAge}`);f+="; Max-Age="+p.maxAge}if(p.domain){if(!r.test(p.domain))throw new TypeError(`option domain is invalid: ${p.domain}`);f+="; Domain="+p.domain}if(p.path){if(!a.test(p.path))throw new TypeError(`option path is invalid: ${p.path}`);f+="; Path="+p.path}if(p.expires){if(!y(p.expires)||!Number.isFinite(p.expires.valueOf()))throw new TypeError(`option expires is invalid: ${p.expires}`);f+="; Expires="+p.expires.toUTCString()}if(p.httpOnly&&(f+="; HttpOnly"),p.secure&&(f+="; Secure"),p.partitioned&&(f+="; Partitioned"),p.priority)switch(typeof p.priority=="string"?p.priority.toLowerCase():void 0){case"low":f+="; Priority=Low";break;case"medium":f+="; Priority=Medium";break;case"high":f+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${p.priority}`)}if(p.sameSite)switch(typeof p.sameSite=="string"?p.sameSite.toLowerCase():p.sameSite){case!0:case"strict":f+="; SameSite=Strict";break;case"lax":f+="; SameSite=Lax";break;case"none":f+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${p.sameSite}`)}return f}function h(d){if(d.indexOf("%")===-1)return d;try{return decodeURIComponent(d)}catch{return d}}function y(d){return n.call(d)==="[object Date]"}return K}ft();/**
22
+ <%s key={someKey} {...props} />`,I,L,z,L),Te[L+I]=!0)}if(L=null,C!==void 0&&(r(C),L=""+C),i(x)&&(r(x.key),L=""+x.key),"key"in x){C={};for(var he in x)he!=="key"&&(C[he]=x[he])}else C=x;return L&&u(C,typeof m=="function"?m.displayName||m.name||"Unknown":m),s(m,L,D,B,n(),C,fe,de)}function g(m){typeof m=="object"&&m!==null&&m.$$typeof===v&&m._store&&(m._store.validated=1)}var d=E,v=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),R=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),O=Symbol.for("react.activity"),A=Symbol.for("react.client.reference"),W=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ee=Object.prototype.hasOwnProperty,lt=Array.isArray,ce=console.createTask?console.createTask:function(){return null};d={"react-stack-bottom-frame":function(m){return m()}};var Ce,Se={},ke=d["react-stack-bottom-frame"].bind(d,o)(),Pe=ce(a(o)),Te={};G.Fragment=y,G.jsx=function(m,x,C,I,B){var D=1e4>W.recentlyCreatedOwnerStacks++;return h(m,x,C,!1,I,B,D?Error("react-stack-top-frame"):ke,D?ce(a(m)):Pe)},G.jsxs=function(m,x,C,I,B){var D=1e4>W.recentlyCreatedOwnerStacks++;return h(m,x,C,!0,I,B,D?Error("react-stack-top-frame"):ke,D?ce(a(m)):Pe)}}()),G}var Oe;function dt(){return Oe||(Oe=1,process.env.NODE_ENV==="production"?re.exports=ct():re.exports=ft()),re.exports}var P=dt(),K={},$e;function ht(){if($e)return K;$e=1,Object.defineProperty(K,"__esModule",{value:!0}),K.parse=i,K.serialize=s;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,a=/^[\u0020-\u003A\u003D-\u007E]*$/,n=Object.prototype.toString,o=(()=>{const d=function(){};return d.prototype=Object.create(null),d})();function i(d,v){const p=new o,y=d.length;if(y<2)return p;const w=v?.decode||h;let f=0;do{const b=d.indexOf("=",f);if(b===-1)break;const R=d.indexOf(";",f),k=R===-1?y:R;if(b>k){f=d.lastIndexOf(";",b-1)+1;continue}const T=u(d,f,b),U=l(d,b,T),$=d.slice(T,U);if(p[$]===void 0){let _=u(d,b+1,k),O=l(d,k,_);const A=w(d.slice(_,O));p[$]=A}f=k+1}while(f<y);return p}function u(d,v,p){do{const y=d.charCodeAt(v);if(y!==32&&y!==9)return v}while(++v<p);return p}function l(d,v,p){for(;v>p;){const y=d.charCodeAt(--v);if(y!==32&&y!==9)return v+1}return p}function s(d,v,p){const y=p?.encode||encodeURIComponent;if(!e.test(d))throw new TypeError(`argument name is invalid: ${d}`);const w=y(v);if(!t.test(w))throw new TypeError(`argument val is invalid: ${v}`);let f=d+"="+w;if(!p)return f;if(p.maxAge!==void 0){if(!Number.isInteger(p.maxAge))throw new TypeError(`option maxAge is invalid: ${p.maxAge}`);f+="; Max-Age="+p.maxAge}if(p.domain){if(!r.test(p.domain))throw new TypeError(`option domain is invalid: ${p.domain}`);f+="; Domain="+p.domain}if(p.path){if(!a.test(p.path))throw new TypeError(`option path is invalid: ${p.path}`);f+="; Path="+p.path}if(p.expires){if(!g(p.expires)||!Number.isFinite(p.expires.valueOf()))throw new TypeError(`option expires is invalid: ${p.expires}`);f+="; Expires="+p.expires.toUTCString()}if(p.httpOnly&&(f+="; HttpOnly"),p.secure&&(f+="; Secure"),p.partitioned&&(f+="; Partitioned"),p.priority)switch(typeof p.priority=="string"?p.priority.toLowerCase():void 0){case"low":f+="; Priority=Low";break;case"medium":f+="; Priority=Medium";break;case"high":f+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${p.priority}`)}if(p.sameSite)switch(typeof p.sameSite=="string"?p.sameSite.toLowerCase():p.sameSite){case!0:case"strict":f+="; SameSite=Strict";break;case"lax":f+="; SameSite=Lax";break;case"none":f+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${p.sameSite}`)}return f}function h(d){if(d.indexOf("%")===-1)return d;try{return decodeURIComponent(d)}catch{return d}}function g(d){return n.call(d)==="[object Date]"}return K}ht();/**
23
23
  * react-router v7.6.3
24
24
  *
25
25
  * Copyright (c) Remix Software Inc.
@@ -28,6 +28,6 @@ React keys must be passed directly to JSX without using spread:
28
28
  * LICENSE.md file in the root directory of this source tree.
29
29
  *
30
30
  * @license MIT
31
- */var _e="popstate";function dt(e={}){function t(a,n){let{pathname:o,search:i,hash:u}=a.location;return ye("",{pathname:o,search:i,hash:u},n.state&&n.state.usr||null,n.state&&n.state.key||"default")}function r(a,n){return typeof n=="string"?n:Z(n)}return mt(t,r,null,e)}function S(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function N(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ht(){return Math.random().toString(36).substring(2,10)}function Ae(e,t){return{usr:e.state,key:e.key,idx:t}}function ye(e,t,r=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Y(t):t,state:r,key:t&&t.key||a||ht()}}function Z({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Y(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function mt(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:o=!1}=a,i=n.history,u="POP",l=null,s=h();s==null&&(s=0,i.replaceState({...i.state,idx:s},""));function h(){return(i.state||{idx:null}).idx}function y(){u="POP";let w=h(),f=w==null?null:w-s;s=w,l&&l({action:u,location:g.location,delta:f})}function d(w,f){u="PUSH";let b=ye(g.location,w,f);s=h()+1;let R=Ae(b,s),k=g.createHref(b);try{i.pushState(R,"",k)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;n.location.assign(k)}o&&l&&l({action:u,location:g.location,delta:1})}function v(w,f){u="REPLACE";let b=ye(g.location,w,f);s=h();let R=Ae(b,s),k=g.createHref(b);i.replaceState(R,"",k),o&&l&&l({action:u,location:g.location,delta:0})}function p(w){return pt(w)}let g={get action(){return u},get location(){return e(n,i)},listen(w){if(l)throw new Error("A history only accepts one active listener");return n.addEventListener(_e,y),l=w,()=>{n.removeEventListener(_e,y),l=null}},createHref(w){return t(n,w)},createURL:p,encodeLocation(w){let f=p(w);return{pathname:f.pathname,search:f.search,hash:f.hash}},push:d,replace:v,go(w){return i.go(w)}};return g}function pt(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),S(r,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:Z(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=r+a),new URL(a,r)}function je(e,t,r="/"){return yt(e,t,r,!1)}function yt(e,t,r,a){let n=typeof t=="string"?Y(t):t,o=M(n.pathname||"/",r);if(o==null)return null;let i=Me(e);gt(i);let u=null;for(let l=0;u==null&&l<i.length;++l){let s=Tt(o);u=kt(i[l],s,a)}return u}function Me(e,t=[],r=[],a=""){let n=(o,i,u)=>{let l={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};l.relativePath.startsWith("/")&&(S(l.relativePath.startsWith(a),`Absolute route path "${l.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(a.length));let s=j([a,l.relativePath]),h=r.concat(l);o.children&&o.children.length>0&&(S(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${s}".`),Me(o.children,t,h,s)),!(o.path==null&&!o.index)&&t.push({path:s,score:Ct(s,o.index),routesMeta:h})};return e.forEach((o,i)=>{if(o.path===""||!o.path?.includes("?"))n(o,i);else for(let u of He(o.path))n(o,i,u)}),t}function He(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,n=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return n?[o,""]:[o];let i=He(a.join("/")),u=[];return u.push(...i.map(l=>l===""?o:[o,l].join("/"))),n&&u.push(...i),u.map(l=>e.startsWith("/")&&l===""?"/":l)}function gt(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:St(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var vt=/^:[\w-]+$/,wt=3,xt=2,bt=1,Rt=10,Et=-2,De=e=>e==="*";function Ct(e,t){let r=e.split("/"),a=r.length;return r.some(De)&&(a+=Et),t&&(a+=xt),r.filter(n=>!De(n)).reduce((n,o)=>n+(vt.test(o)?wt:o===""?bt:Rt),a)}function St(e,t){return e.length===t.length&&e.slice(0,-1).every((a,n)=>a===t[n])?e[e.length-1]-t[t.length-1]:0}function kt(e,t,r=!1){let{routesMeta:a}=e,n={},o="/",i=[];for(let u=0;u<a.length;++u){let l=a[u],s=u===a.length-1,h=o==="/"?t:t.slice(o.length)||"/",y=ie({path:l.relativePath,caseSensitive:l.caseSensitive,end:s},h),d=l.route;if(!y&&s&&r&&!a[a.length-1].route.index&&(y=ie({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},h)),!y)return null;Object.assign(n,y.params),i.push({params:n,pathname:j([o,y.pathname]),pathnameBase:$t(j([o,y.pathnameBase])),route:d}),y.pathnameBase!=="/"&&(o=j([o,y.pathnameBase]))}return i}function ie(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=Pt(e.path,e.caseSensitive,e.end),n=t.match(r);if(!n)return null;let o=n[0],i=o.replace(/(.)\/+$/,"$1"),u=n.slice(1);return{params:a.reduce((s,{paramName:h,isOptional:y},d)=>{if(h==="*"){let p=u[d]||"";i=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}const v=u[d];return y&&!v?s[h]=void 0:s[h]=(v||"").replace(/%2F/g,"/"),s},{}),pathname:o,pathnameBase:i,pattern:e}}function Pt(e,t=!1,r=!0){N(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,u,l)=>(a.push({paramName:u,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function Tt(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return N(!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 M(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function It(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?Y(e):e;return{pathname:r?r.startsWith("/")?r:Lt(r,t):t,search:_t(a),hash:At(n)}}function Lt(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function me(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ot(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Ue(e){let t=Ot(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function Be(e,t,r,a=!1){let n;typeof e=="string"?n=Y(e):(n={...e},S(!n.pathname||!n.pathname.includes("?"),me("?","pathname","search",n)),S(!n.pathname||!n.pathname.includes("#"),me("#","pathname","hash",n)),S(!n.search||!n.search.includes("#"),me("#","search","hash",n)));let o=e===""||n.pathname==="",i=o?"/":n.pathname,u;if(i==null)u=r;else{let y=t.length-1;if(!a&&i.startsWith("..")){let d=i.split("/");for(;d[0]==="..";)d.shift(),y-=1;n.pathname=d.join("/")}u=y>=0?t[y]:"/"}let l=It(n,u),s=i&&i!=="/"&&i.endsWith("/"),h=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(s||h)&&(l.pathname+="/"),l}var j=e=>e.join("/").replace(/\/\/+/g,"/"),$t=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_t=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,At=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Dt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var We=["POST","PUT","PATCH","DELETE"];new Set(We);var Nt=["GET",...We];new Set(Nt);var J=c.createContext(null);J.displayName="DataRouter";var le=c.createContext(null);le.displayName="DataRouterState";var Ve=c.createContext({isTransitioning:!1});Ve.displayName="ViewTransition";var Ft=c.createContext(new Map);Ft.displayName="Fetchers";var jt=c.createContext(null);jt.displayName="Await";var F=c.createContext(null);F.displayName="Navigation";var Q=c.createContext(null);Q.displayName="Location";var H=c.createContext({outlet:null,matches:[],isDataRoute:!1});H.displayName="Route";var ve=c.createContext(null);ve.displayName="RouteError";function Mt(e,{relative:t}={}){S(ee(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=c.useContext(F),{hash:n,pathname:o,search:i}=te(e,{relative:t}),u=o;return r!=="/"&&(u=o==="/"?r:j([r,o])),a.createHref({pathname:u,search:i,hash:n})}function ee(){return c.useContext(Q)!=null}function W(){return S(ee(),"useLocation() may be used only in the context of a <Router> component."),c.useContext(Q).location}var ze="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ye(e){c.useContext(F).static||c.useLayoutEffect(e)}function Je(){let{isDataRoute:e}=c.useContext(H);return e?Zt():Ht()}function Ht(){S(ee(),"useNavigate() may be used only in the context of a <Router> component.");let e=c.useContext(J),{basename:t,navigator:r}=c.useContext(F),{matches:a}=c.useContext(H),{pathname:n}=W(),o=JSON.stringify(Ue(a)),i=c.useRef(!1);return Ye(()=>{i.current=!0}),c.useCallback((l,s={})=>{if(N(i.current,ze),!i.current)return;if(typeof l=="number"){r.go(l);return}let h=Be(l,JSON.parse(o),n,s.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:j([t,h.pathname])),(s.replace?r.replace:r.push)(h,s.state,s)},[t,r,o,n,e])}c.createContext(null);function te(e,{relative:t}={}){let{matches:r}=c.useContext(H),{pathname:a}=W(),n=JSON.stringify(Ue(r));return c.useMemo(()=>Be(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function Ut(e,t){return qe(e,t)}function qe(e,t,r,a){S(ee(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=c.useContext(F),{matches:o}=c.useContext(H),i=o[o.length-1],u=i?i.params:{},l=i?i.pathname:"/",s=i?i.pathnameBase:"/",h=i&&i.route;{let f=h&&h.path||"";Ge(l,!h||f.endsWith("*")||f.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${f}">) 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.
31
+ */var _e="popstate";function mt(e={}){function t(a,n){let{pathname:o,search:i,hash:u}=a.location;return ge("",{pathname:o,search:i,hash:u},n.state&&n.state.usr||null,n.state&&n.state.key||"default")}function r(a,n){return typeof n=="string"?n:Z(n)}return gt(t,r,null,e)}function S(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function N(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function pt(){return Math.random().toString(36).substring(2,10)}function Ae(e,t){return{usr:e.state,key:e.key,idx:t}}function ge(e,t,r=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Y(t):t,state:r,key:t&&t.key||a||pt()}}function Z({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Y(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function gt(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:o=!1}=a,i=n.history,u="POP",l=null,s=h();s==null&&(s=0,i.replaceState({...i.state,idx:s},""));function h(){return(i.state||{idx:null}).idx}function g(){u="POP";let w=h(),f=w==null?null:w-s;s=w,l&&l({action:u,location:y.location,delta:f})}function d(w,f){u="PUSH";let b=ge(y.location,w,f);s=h()+1;let R=Ae(b,s),k=y.createHref(b);try{i.pushState(R,"",k)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;n.location.assign(k)}o&&l&&l({action:u,location:y.location,delta:1})}function v(w,f){u="REPLACE";let b=ge(y.location,w,f);s=h();let R=Ae(b,s),k=y.createHref(b);i.replaceState(R,"",k),o&&l&&l({action:u,location:y.location,delta:0})}function p(w){return yt(w)}let y={get action(){return u},get location(){return e(n,i)},listen(w){if(l)throw new Error("A history only accepts one active listener");return n.addEventListener(_e,g),l=w,()=>{n.removeEventListener(_e,g),l=null}},createHref(w){return t(n,w)},createURL:p,encodeLocation(w){let f=p(w);return{pathname:f.pathname,search:f.search,hash:f.hash}},push:d,replace:v,go(w){return i.go(w)}};return y}function yt(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),S(r,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:Z(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=r+a),new URL(a,r)}function Me(e,t,r="/"){return vt(e,t,r,!1)}function vt(e,t,r,a){let n=typeof t=="string"?Y(t):t,o=M(n.pathname||"/",r);if(o==null)return null;let i=He(e);wt(i);let u=null;for(let l=0;u==null&&l<i.length;++l){let s=Lt(o);u=Tt(i[l],s,a)}return u}function He(e,t=[],r=[],a=""){let n=(o,i,u)=>{let l={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};l.relativePath.startsWith("/")&&(S(l.relativePath.startsWith(a),`Absolute route path "${l.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(a.length));let s=j([a,l.relativePath]),h=r.concat(l);o.children&&o.children.length>0&&(S(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${s}".`),He(o.children,t,h,s)),!(o.path==null&&!o.index)&&t.push({path:s,score:kt(s,o.index),routesMeta:h})};return e.forEach((o,i)=>{if(o.path===""||!o.path?.includes("?"))n(o,i);else for(let u of Ue(o.path))n(o,i,u)}),t}function Ue(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,n=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return n?[o,""]:[o];let i=Ue(a.join("/")),u=[];return u.push(...i.map(l=>l===""?o:[o,l].join("/"))),n&&u.push(...i),u.map(l=>e.startsWith("/")&&l===""?"/":l)}function wt(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Pt(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var xt=/^:[\w-]+$/,bt=3,Rt=2,Et=1,Ct=10,St=-2,De=e=>e==="*";function kt(e,t){let r=e.split("/"),a=r.length;return r.some(De)&&(a+=St),t&&(a+=Rt),r.filter(n=>!De(n)).reduce((n,o)=>n+(xt.test(o)?bt:o===""?Et:Ct),a)}function Pt(e,t){return e.length===t.length&&e.slice(0,-1).every((a,n)=>a===t[n])?e[e.length-1]-t[t.length-1]:0}function Tt(e,t,r=!1){let{routesMeta:a}=e,n={},o="/",i=[];for(let u=0;u<a.length;++u){let l=a[u],s=u===a.length-1,h=o==="/"?t:t.slice(o.length)||"/",g=ie({path:l.relativePath,caseSensitive:l.caseSensitive,end:s},h),d=l.route;if(!g&&s&&r&&!a[a.length-1].route.index&&(g=ie({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},h)),!g)return null;Object.assign(n,g.params),i.push({params:n,pathname:j([o,g.pathname]),pathnameBase:At(j([o,g.pathnameBase])),route:d}),g.pathnameBase!=="/"&&(o=j([o,g.pathnameBase]))}return i}function ie(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=It(e.path,e.caseSensitive,e.end),n=t.match(r);if(!n)return null;let o=n[0],i=o.replace(/(.)\/+$/,"$1"),u=n.slice(1);return{params:a.reduce((s,{paramName:h,isOptional:g},d)=>{if(h==="*"){let p=u[d]||"";i=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}const v=u[d];return g&&!v?s[h]=void 0:s[h]=(v||"").replace(/%2F/g,"/"),s},{}),pathname:o,pathnameBase:i,pattern:e}}function It(e,t=!1,r=!0){N(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,u,l)=>(a.push({paramName:u,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function Lt(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return N(!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 M(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function Ot(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?Y(e):e;return{pathname:r?r.startsWith("/")?r:$t(r,t):t,search:Dt(a),hash:Nt(n)}}function $t(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function me(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function _t(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Be(e){let t=_t(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function Ve(e,t,r,a=!1){let n;typeof e=="string"?n=Y(e):(n={...e},S(!n.pathname||!n.pathname.includes("?"),me("?","pathname","search",n)),S(!n.pathname||!n.pathname.includes("#"),me("#","pathname","hash",n)),S(!n.search||!n.search.includes("#"),me("#","search","hash",n)));let o=e===""||n.pathname==="",i=o?"/":n.pathname,u;if(i==null)u=r;else{let g=t.length-1;if(!a&&i.startsWith("..")){let d=i.split("/");for(;d[0]==="..";)d.shift(),g-=1;n.pathname=d.join("/")}u=g>=0?t[g]:"/"}let l=Ot(n,u),s=i&&i!=="/"&&i.endsWith("/"),h=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(s||h)&&(l.pathname+="/"),l}var j=e=>e.join("/").replace(/\/\/+/g,"/"),At=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Dt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Nt=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Ft(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var We=["POST","PUT","PATCH","DELETE"];new Set(We);var jt=["GET",...We];new Set(jt);var J=c.createContext(null);J.displayName="DataRouter";var le=c.createContext(null);le.displayName="DataRouterState";var ze=c.createContext({isTransitioning:!1});ze.displayName="ViewTransition";var Mt=c.createContext(new Map);Mt.displayName="Fetchers";var Ht=c.createContext(null);Ht.displayName="Await";var F=c.createContext(null);F.displayName="Navigation";var Q=c.createContext(null);Q.displayName="Location";var H=c.createContext({outlet:null,matches:[],isDataRoute:!1});H.displayName="Route";var ve=c.createContext(null);ve.displayName="RouteError";function Ut(e,{relative:t}={}){S(ee(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=c.useContext(F),{hash:n,pathname:o,search:i}=te(e,{relative:t}),u=o;return r!=="/"&&(u=o==="/"?r:j([r,o])),a.createHref({pathname:u,search:i,hash:n})}function ee(){return c.useContext(Q)!=null}function V(){return S(ee(),"useLocation() may be used only in the context of a <Router> component."),c.useContext(Q).location}var Ye="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Je(e){c.useContext(F).static||c.useLayoutEffect(e)}function qe(){let{isDataRoute:e}=c.useContext(H);return e?er():Bt()}function Bt(){S(ee(),"useNavigate() may be used only in the context of a <Router> component.");let e=c.useContext(J),{basename:t,navigator:r}=c.useContext(F),{matches:a}=c.useContext(H),{pathname:n}=V(),o=JSON.stringify(Be(a)),i=c.useRef(!1);return Je(()=>{i.current=!0}),c.useCallback((l,s={})=>{if(N(i.current,Ye),!i.current)return;if(typeof l=="number"){r.go(l);return}let h=Ve(l,JSON.parse(o),n,s.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:j([t,h.pathname])),(s.replace?r.replace:r.push)(h,s.state,s)},[t,r,o,n,e])}c.createContext(null);function te(e,{relative:t}={}){let{matches:r}=c.useContext(H),{pathname:a}=V(),n=JSON.stringify(Be(r));return c.useMemo(()=>Ve(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function Vt(e,t){return Ge(e,t)}function Ge(e,t,r,a){S(ee(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=c.useContext(F),{matches:o}=c.useContext(H),i=o[o.length-1],u=i?i.params:{},l=i?i.pathname:"/",s=i?i.pathnameBase:"/",h=i&&i.route;{let f=h&&h.path||"";Ke(l,!h||f.endsWith("*")||f.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${f}">) 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.
32
32
 
33
- Please change the parent <Route path="${f}"> to <Route path="${f==="/"?"*":`${f}/*`}">.`)}let y=W(),d;if(t){let f=typeof t=="string"?Y(t):t;S(s==="/"||f.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` 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 "${s}" but pathname "${f.pathname}" was given in the \`location\` prop.`),d=f}else d=y;let v=d.pathname||"/",p=v;if(s!=="/"){let f=s.replace(/^\//,"").split("/");p="/"+v.replace(/^\//,"").split("/").slice(f.length).join("/")}let g=je(e,{pathname:p});N(h||g!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),N(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=Yt(g&&g.map(f=>Object.assign({},f,{params:Object.assign({},u,f.params),pathname:j([s,n.encodeLocation?n.encodeLocation(f.pathname).pathname:f.pathname]),pathnameBase:f.pathnameBase==="/"?s:j([s,n.encodeLocation?n.encodeLocation(f.pathnameBase).pathname:f.pathnameBase])})),o,r,a);return t&&w?c.createElement(Q.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...d},navigationType:"POP"}},w):w}function Bt(){let e=Xt(),t=Dt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=c.createElement(c.Fragment,null,c.createElement("p",null,"💿 Hey developer 👋"),c.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",c.createElement("code",{style:o},"ErrorBoundary")," or"," ",c.createElement("code",{style:o},"errorElement")," prop on your route.")),c.createElement(c.Fragment,null,c.createElement("h2",null,"Unexpected Application Error!"),c.createElement("h3",{style:{fontStyle:"italic"}},t),r?c.createElement("pre",{style:n},r):null,i)}var Wt=c.createElement(Bt,null),Vt=class extends c.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?c.createElement(H.Provider,{value:this.props.routeContext},c.createElement(ve.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function zt({routeContext:e,match:t,children:r}){let a=c.useContext(J);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),c.createElement(H.Provider,{value:e},r)}function Yt(e,t=[],r=null,a=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let n=e,o=r?.errors;if(o!=null){let l=n.findIndex(s=>s.route.id&&o?.[s.route.id]!==void 0);S(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),n=n.slice(0,Math.min(n.length,l+1))}let i=!1,u=-1;if(r)for(let l=0;l<n.length;l++){let s=n[l];if((s.route.HydrateFallback||s.route.hydrateFallbackElement)&&(u=l),s.route.id){let{loaderData:h,errors:y}=r,d=s.route.loader&&!h.hasOwnProperty(s.route.id)&&(!y||y[s.route.id]===void 0);if(s.route.lazy||d){i=!0,u>=0?n=n.slice(0,u+1):n=[n[0]];break}}}return n.reduceRight((l,s,h)=>{let y,d=!1,v=null,p=null;r&&(y=o&&s.route.id?o[s.route.id]:void 0,v=s.route.errorElement||Wt,i&&(u<0&&h===0?(Ge("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):u===h&&(d=!0,p=s.route.hydrateFallbackElement||null)));let g=t.concat(n.slice(0,h+1)),w=()=>{let f;return y?f=v:d?f=p:s.route.Component?f=c.createElement(s.route.Component,null):s.route.element?f=s.route.element:f=l,c.createElement(zt,{match:s,routeContext:{outlet:l,matches:g,isDataRoute:r!=null},children:f})};return r&&(s.route.ErrorBoundary||s.route.errorElement||h===0)?c.createElement(Vt,{location:r.location,revalidation:r.revalidation,component:v,error:y,children:w(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):w()},null)}function we(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Jt(e){let t=c.useContext(J);return S(t,we(e)),t}function qt(e){let t=c.useContext(le);return S(t,we(e)),t}function Gt(e){let t=c.useContext(H);return S(t,we(e)),t}function xe(e){let t=Gt(e),r=t.matches[t.matches.length-1];return S(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Kt(){return xe("useRouteId")}function Xt(){let e=c.useContext(ve),t=qt("useRouteError"),r=xe("useRouteError");return e!==void 0?e:t.errors?.[r]}function Zt(){let{router:e}=Jt("useNavigate"),t=xe("useNavigate"),r=c.useRef(!1);return Ye(()=>{r.current=!0}),c.useCallback(async(n,o={})=>{N(r.current,ze),r.current&&(typeof n=="number"?e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}var Ne={};function Ge(e,t,r){!t&&!Ne[e]&&(Ne[e]=!0,N(!1,r))}c.memo(Qt);function Qt({routes:e,future:t,state:r}){return qe(e,void 0,r,t)}function Ke(e){S(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function er({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:o=!1}){S(!ee(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let i=e.replace(/^\/*/,"/"),u=c.useMemo(()=>({basename:i,navigator:n,static:o,future:{}}),[i,n,o]);typeof r=="string"&&(r=Y(r));let{pathname:l="/",search:s="",hash:h="",state:y=null,key:d="default"}=r,v=c.useMemo(()=>{let p=M(l,i);return p==null?null:{location:{pathname:p,search:s,hash:h,state:y,key:d},navigationType:a}},[i,l,s,h,y,d,a]);return N(v!=null,`<Router basename="${i}"> is not able to match the URL "${l}${s}${h}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:c.createElement(F.Provider,{value:u},c.createElement(Q.Provider,{children:t,value:v}))}function tr({children:e,location:t}){return Ut(ge(e),t)}function ge(e,t=[]){let r=[];return c.Children.forEach(e,(a,n)=>{if(!c.isValidElement(a))return;let o=[...t,n];if(a.type===c.Fragment){r.push.apply(r,ge(a.props.children,o));return}S(a.type===Ke,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),S(!a.props.index||!a.props.children,"An index route cannot have child routes.");let i={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(i.children=ge(a.props.children,o)),r.push(i)}),r}var ae="get",oe="application/x-www-form-urlencoded";function se(e){return e!=null&&typeof e.tagName=="string"}function rr(e){return se(e)&&e.tagName.toLowerCase()==="button"}function nr(e){return se(e)&&e.tagName.toLowerCase()==="form"}function ar(e){return se(e)&&e.tagName.toLowerCase()==="input"}function or(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ir(e,t){return e.button===0&&(!t||t==="_self")&&!or(e)}var ne=null;function lr(){if(ne===null)try{new FormData(document.createElement("form"),0),ne=!1}catch{ne=!0}return ne}var sr=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function pe(e){return e!=null&&!sr.has(e)?(N(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${oe}"`),null):e}function ur(e,t){let r,a,n,o,i;if(nr(e)){let u=e.getAttribute("action");a=u?M(u,t):null,r=e.getAttribute("method")||ae,n=pe(e.getAttribute("enctype"))||oe,o=new FormData(e)}else if(rr(e)||ar(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||u.getAttribute("action");if(a=l?M(l,t):null,r=e.getAttribute("formmethod")||u.getAttribute("method")||ae,n=pe(e.getAttribute("formenctype"))||pe(u.getAttribute("enctype"))||oe,o=new FormData(u,e),!lr()){let{name:s,type:h,value:y}=e;if(h==="image"){let d=s?`${s}.`:"";o.append(`${d}x`,"0"),o.append(`${d}y`,"0")}else s&&o.append(s,y)}}else{if(se(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ae,a=null,n=oe,i=e}return o&&n==="text/plain"&&(i=o,o=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:o,body:i}}function be(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function cr(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function fr(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function dr(e,t,r){let a=await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let i=await cr(o,r);return i.links?i.links():[]}return[]}));return yr(a.flat(1).filter(fr).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function Fe(e,t,r,a,n,o){let i=(l,s)=>r[s]?l.route.id!==r[s].route.id:!0,u=(l,s)=>r[s].pathname!==l.pathname||r[s].route.path?.endsWith("*")&&r[s].params["*"]!==l.params["*"];return o==="assets"?t.filter((l,s)=>i(l,s)||u(l,s)):o==="data"?t.filter((l,s)=>{let h=a.routes[l.route.id];if(!h||!h.hasLoader)return!1;if(i(l,s)||u(l,s))return!0;if(l.route.shouldRevalidate){let y=l.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function hr(e,t,{includeHydrateFallback:r}={}){return mr(e.map(a=>{let n=t.routes[a.route.id];if(!n)return[];let o=[n.module];return n.clientActionModule&&(o=o.concat(n.clientActionModule)),n.clientLoaderModule&&(o=o.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(o=o.concat(n.hydrateFallbackModule)),n.imports&&(o=o.concat(n.imports)),o}).flat(1))}function mr(e){return[...new Set(e)]}function pr(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function yr(e,t){let r=new Set;return new Set(t),e.reduce((a,n)=>{let o=JSON.stringify(pr(n));return r.has(o)||(r.add(o),a.push({key:o,link:n})),a},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var gr=new Set([100,101,204,205]);function vr(e,t){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname="_root.data":t&&M(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function Xe(){let e=c.useContext(J);return be(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function wr(){let e=c.useContext(le);return be(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Re=c.createContext(void 0);Re.displayName="FrameworkContext";function Ze(){let e=c.useContext(Re);return be(e,"You must render this element inside a <HydratedRouter> element"),e}function xr(e,t){let r=c.useContext(Re),[a,n]=c.useState(!1),[o,i]=c.useState(!1),{onFocus:u,onBlur:l,onMouseEnter:s,onMouseLeave:h,onTouchStart:y}=t,d=c.useRef(null);c.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let g=f=>{f.forEach(b=>{i(b.isIntersecting)})},w=new IntersectionObserver(g,{threshold:.5});return d.current&&w.observe(d.current),()=>{w.disconnect()}}},[e]),c.useEffect(()=>{if(a){let g=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(g)}}},[a]);let v=()=>{n(!0)},p=()=>{n(!1),i(!1)};return r?e!=="intent"?[o,d,{}]:[o,d,{onFocus:X(u,v),onBlur:X(l,p),onMouseEnter:X(s,v),onMouseLeave:X(h,p),onTouchStart:X(y,v)}]:[!1,d,{}]}function X(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function br({page:e,...t}){let{router:r}=Xe(),a=c.useMemo(()=>je(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?c.createElement(Er,{page:e,matches:a,...t}):null}function Rr(e){let{manifest:t,routeModules:r}=Ze(),[a,n]=c.useState([]);return c.useEffect(()=>{let o=!1;return dr(e,t,r).then(i=>{o||n(i)}),()=>{o=!0}},[e,t,r]),a}function Er({page:e,matches:t,...r}){let a=W(),{manifest:n,routeModules:o}=Ze(),{basename:i}=Xe(),{loaderData:u,matches:l}=wr(),s=c.useMemo(()=>Fe(e,t,l,n,a,"data"),[e,t,l,n,a]),h=c.useMemo(()=>Fe(e,t,l,n,a,"assets"),[e,t,l,n,a]),y=c.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let p=new Set,g=!1;if(t.forEach(f=>{let b=n.routes[f.route.id];!b||!b.hasLoader||(!s.some(R=>R.route.id===f.route.id)&&f.route.id in u&&o[f.route.id]?.shouldRevalidate||b.hasClientLoader?g=!0:p.add(f.route.id))}),p.size===0)return[];let w=vr(e,i);return g&&p.size>0&&w.searchParams.set("_routes",t.filter(f=>p.has(f.route.id)).map(f=>f.route.id).join(",")),[w.pathname+w.search]},[i,u,a,n,s,t,e,o]),d=c.useMemo(()=>hr(h,n),[h,n]),v=Rr(h);return c.createElement(c.Fragment,null,y.map(p=>c.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...r})),d.map(p=>c.createElement("link",{key:p,rel:"modulepreload",href:p,...r})),v.map(({key:p,link:g})=>c.createElement("link",{key:p,...g})))}function Cr(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Qe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Qe&&(window.__reactRouterVersion="7.6.3")}catch{}function Sr({basename:e,children:t,window:r}){let a=c.useRef();a.current==null&&(a.current=dt({window:r,v5Compat:!0}));let n=a.current,[o,i]=c.useState({action:n.action,location:n.location}),u=c.useCallback(l=>{c.startTransition(()=>i(l))},[i]);return c.useLayoutEffect(()=>n.listen(u),[n,u]),c.createElement(er,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:n})}var et=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tt=c.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:n,reloadDocument:o,replace:i,state:u,target:l,to:s,preventScrollReset:h,viewTransition:y,...d},v){let{basename:p}=c.useContext(F),g=typeof s=="string"&&et.test(s),w,f=!1;if(typeof s=="string"&&g&&(w=s,Qe))try{let O=new URL(window.location.href),A=s.startsWith("//")?new URL(O.protocol+s):new URL(s),V=M(A.pathname,p);A.origin===O.origin&&V!=null?s=V+A.search+A.hash:f=!0}catch{N(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let b=Mt(s,{relative:n}),[R,k,T]=xr(a,d),U=Ir(s,{replace:i,state:u,target:l,preventScrollReset:h,relative:n,viewTransition:y});function $(O){t&&t(O),O.defaultPrevented||U(O)}let _=c.createElement("a",{...d,...T,href:w||b,onClick:f||o?t:$,ref:Cr(v,k),target:l,"data-discover":!g&&r==="render"?"true":void 0});return R&&!g?c.createElement(c.Fragment,null,_,c.createElement(br,{page:b})):_});tt.displayName="Link";var kr=c.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:n=!1,style:o,to:i,viewTransition:u,children:l,...s},h){let y=te(i,{relative:s.relative}),d=W(),v=c.useContext(le),{navigator:p,basename:g}=c.useContext(F),w=v!=null&&Ar(y)&&u===!0,f=p.encodeLocation?p.encodeLocation(y).pathname:y.pathname,b=d.pathname,R=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(b=b.toLowerCase(),R=R?R.toLowerCase():null,f=f.toLowerCase()),R&&g&&(R=M(R,g)||R);const k=f!=="/"&&f.endsWith("/")?f.length-1:f.length;let T=b===f||!n&&b.startsWith(f)&&b.charAt(k)==="/",U=R!=null&&(R===f||!n&&R.startsWith(f)&&R.charAt(f.length)==="/"),$={isActive:T,isPending:U,isTransitioning:w},_=T?t:void 0,O;typeof a=="function"?O=a($):O=[a,T?"active":null,U?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let A=typeof o=="function"?o($):o;return c.createElement(tt,{...s,"aria-current":_,className:O,ref:h,style:A,to:i,viewTransition:u},typeof l=="function"?l($):l)});kr.displayName="NavLink";var Pr=c.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:n,state:o,method:i=ae,action:u,onSubmit:l,relative:s,preventScrollReset:h,viewTransition:y,...d},v)=>{let p=$r(),g=_r(u,{relative:s}),w=i.toLowerCase()==="get"?"get":"post",f=typeof u=="string"&&et.test(u),b=R=>{if(l&&l(R),R.defaultPrevented)return;R.preventDefault();let k=R.nativeEvent.submitter,T=k?.getAttribute("formmethod")||i;p(k||R.currentTarget,{fetcherKey:t,method:T,navigate:r,replace:n,state:o,relative:s,preventScrollReset:h,viewTransition:y})};return c.createElement("form",{ref:v,method:w,action:g,onSubmit:a?l:b,...d,"data-discover":!f&&e==="render"?"true":void 0})});Pr.displayName="Form";function Tr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function rt(e){let t=c.useContext(J);return S(t,Tr(e)),t}function Ir(e,{target:t,replace:r,state:a,preventScrollReset:n,relative:o,viewTransition:i}={}){let u=Je(),l=W(),s=te(e,{relative:o});return c.useCallback(h=>{if(ir(h,t)){h.preventDefault();let y=r!==void 0?r:Z(l)===Z(s);u(e,{replace:y,state:a,preventScrollReset:n,relative:o,viewTransition:i})}},[l,u,s,r,a,t,e,n,o,i])}var Lr=0,Or=()=>`__${String(++Lr)}__`;function $r(){let{router:e}=rt("useSubmit"),{basename:t}=c.useContext(F),r=Kt();return c.useCallback(async(a,n={})=>{let{action:o,method:i,encType:u,formData:l,body:s}=ur(a,t);if(n.navigate===!1){let h=n.fetcherKey||Or();await e.fetch(h,r,n.action||o,{preventScrollReset:n.preventScrollReset,formData:l,body:s,formMethod:n.method||i,formEncType:n.encType||u,flushSync:n.flushSync})}else await e.navigate(n.action||o,{preventScrollReset:n.preventScrollReset,formData:l,body:s,formMethod:n.method||i,formEncType:n.encType||u,replace:n.replace,state:n.state,fromRouteId:r,flushSync:n.flushSync,viewTransition:n.viewTransition})},[e,t,r])}function _r(e,{relative:t}={}){let{basename:r}=c.useContext(F),a=c.useContext(H);S(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),o={...te(e||".",{relative:t})},i=W();if(e==null){o.search=i.search;let u=new URLSearchParams(o.search),l=u.getAll("index");if(l.some(h=>h==="")){u.delete("index"),l.filter(y=>y).forEach(y=>u.append("index",y));let h=u.toString();o.search=h?`?${h}`:""}}return(!e||e===".")&&n.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:j([r,o.pathname])),Z(o)}function Ar(e,t={}){let r=c.useContext(Ve);S(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=rt("useViewTransitionState"),n=te(e,{relative:t.relative});if(!r.isTransitioning)return!1;let o=M(r.currentLocation.pathname,a)||r.currentLocation.pathname,i=M(r.nextLocation.pathname,a)||r.nextLocation.pathname;return ie(n.pathname,i)!=null||ie(n.pathname,o)!=null}[...gr];const nt=E.createContext({history:[],addToHistory:()=>{},popFromHistory:()=>"",replaceHistory:()=>{}}),Dr=({routes:e,children:t})=>{const r=E.useRef(["/"]),[a,n]=E.useState(["/"]),o=E.useCallback(h=>{r.current=h,n(h)},[]),i=h=>{o([...r.current,h])},u=h=>{let y="",d=[];return r.current.length===0?"/":(r.current.length<=h?(y=r.current[0],d=[y]):(d=r.current.slice(0,r.current.length-h),y=d[d.length-1]),o(d),y)},l=h=>{o(h)},s=e.map(h=>P.jsx(Ke,{path:h.path,element:h.render}));return P.jsx(nt.Provider,{value:{history:a,addToHistory:i,popFromHistory:u,replaceHistory:l},children:P.jsxs(Sr,{children:[t,P.jsx(tr,{children:s})]})})},Nr=()=>{const e=Je(),t=W(),r=E.useContext(nt),a=E.useCallback((i,u=!0)=>{i!==t.pathname&&e(i,{replace:!0}),u&&r.addToHistory(i)},[t.pathname,e,r]),n=E.useCallback(i=>{const u=i||1,l=r.popFromHistory(u);a(l,!1)},[a,r]),o=E.useCallback(i=>{r.replaceHistory(i)},[r]);return{currentPath:t.pathname,history:r.history,goBack:n,goTo:a,replaceHistory:o}},at=E.createContext({visibleItems:[],isItemVisible:()=>!1,showItem:()=>{},hideItem:()=>{}}),Fr=({children:e})=>{const t=E.useRef([]),[r,a]=E.useState([]),n=E.useCallback(l=>{console.log("ZAU UPDATING VISIBLE ITEMS",l),t.current=l,a(l)},[]),o=E.useCallback(l=>t.current.some(s=>s===l),[]),i=E.useCallback(l=>{o(l)||n([...t.current,l])},[o,n]),u=E.useCallback(l=>{o(l)&&n(t.current.filter(h=>h!==l))},[o,n]);return P.jsx(at.Provider,{value:{visibleItems:r,isItemVisible:o,showItem:i,hideItem:u},children:e})},ue=()=>{const e=E.useContext(at),t=n=>e.visibleItems.some(o=>o===n),r=n=>{e.showItem(n)},a=n=>{e.hideItem(n)};return{visibleItems:e.visibleItems,isItemVisible:t,showItem:r,hideItem:a}},jr=({id:e,onCloseDrawer:t,drawerCloseOffset:r=15})=>{const{isItemVisible:a}=ue(),n=E.useRef(!1),o=E.useRef(null),i=E.useRef(null),u=E.useRef(null),[l,s]=E.useState(0),h=E.useRef(void 0),y=p=>{n.current=!0;const g=p.clientY;h.current=g},d=p=>{n.current=!1,h.current=void 0,s(0)},v=p=>{if(!(!o||!i||!u)&&n.current&&h.current!==void 0){const g=p.clientY,w=i.current?.clientHeight||0;let f=h.current-g;f=-f,s(f<0?0:-f),f>=w-r&&(t?.(),d())}};return{isVisible:a(e),drawerParentRef:o,drawerRef:i,drawerBottomDistance:l,handleRef:u,onDragStart:y,onDrag:v,onDragEnd:d}},Mr=e=>{const{children:t,backgroundStyles:r,contentStyles:a,handle:n}=e,{isVisible:o,drawerParentRef:i,drawerRef:u,handleRef:l,drawerBottomDistance:s,onDragStart:h,onDrag:y,onDragEnd:d}=jr(e);return P.jsx(P.Fragment,{children:o&&P.jsx("div",{ref:i,style:{width:"100%",height:"100%",minHeight:"100vh",left:0,top:0,background:"#00000068",position:"fixed",zIndex:1e3,display:"flex",flexDirection:"column",touchAction:"none",...r},onPointerUp:d,onPointerMoveCapture:y,children:P.jsxs("div",{ref:u,style:{width:"100%",height:"fit-content",minHeight:"80px",maxHeight:"90%",background:"#ffffff",borderTopLeftRadius:"16px",borderTopRightRadius:"16px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"24px",zIndex:1001,position:"absolute",bottom:`${s}px`,...a},onClick:v=>{v.stopPropagation()},children:[P.jsx("div",{ref:l,style:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0px",height:"24px",width:"100%",cursor:"pointer",...n?.styles},onPointerDown:h,children:n?.render}),t]})})})},Hr=({id:e,children:t,backgroundStyles:r,contentStyles:a,onClickOutsideModal:n})=>{const{isItemVisible:o}=ue();return P.jsx(P.Fragment,{children:o(e)&&P.jsx("div",{style:{width:"100%",height:"100%",minHeight:"100vh",background:"#00000068",position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:1e3,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",...r},onClick:()=>{n?.()},children:P.jsx("div",{style:{width:"90%",maxWidth:"375px",height:"fit-content",minHeight:"80px",maxHeight:"50%",background:"#ffffff",borderRadius:"16px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",zIndex:1001,position:"relative",padding:"24px",...a},onClick:i=>{i.stopPropagation()},children:t})})})},Ur=({id:e,children:t,styles:r,durationInSeconds:a=3})=>{const n=E.useRef(!1),{isItemVisible:o,hideItem:i}=ue();return E.useEffect(()=>{const u=o(e);n.current!==u&&(n.current=u,u&&setTimeout(()=>i(e),a*1e3))},[n,o,i]),P.jsx(P.Fragment,{children:o(e)&&P.jsx("div",{style:{width:"100px",height:"40px",background:"#534a4aff",color:"#ffffff",position:"fixed",top:"10px",left:"50%",transform:"translateX(-50%)",zIndex:1e3,borderRadius:"20px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",border:"solid 3px #000000ff",...r},onClick:u=>{u.stopPropagation()},children:t})})},Br=({overflowEllipsis:e,children:t,styles:r})=>P.jsx("p",{style:{maxWidth:"100%",overflow:"hidden",whiteSpace:e?"nowrap":"normal",textOverflow:"ellipsis",fontSize:"16px",fontStyle:"normal",lineHeight:"normal",color:"inherit",...r},children:t});class Wr{static isScrollEnabled=()=>document.body.style.overflow==="unset"||document.body.style.overflow==="auto";static disableScroll=()=>{document.body.style.overflow="hidden"};static enableScroll=()=>{document.body.style.overflow="unset"}}class Vr{static getPascalCase=t=>t.replace(/\w+/g,function(r){return r[0].toUpperCase()+r.slice(1).toLowerCase()});static isEqual=(t,r,a=!0)=>a?t===r:t.toUpperCase()===r.toUpperCase()}const zr=e=>E.useEffect(e,[]),Yr=()=>{const e=(r,a)=>{let n=0,o=`${r}?`;for(const i in a){const u=a[i];n>0&&(o=`${o}&`),o=`${o}${i}=${u}`,n++}return o};return async(r,a)=>{const n=e(r,a);return await(await fetch(n)).json()}},Jr=480,qr=768,Gr=()=>{const[e,t]=E.useState("desktop");return E.useEffect(()=>{const r=()=>{window.innerWidth<=Jr?t("mobile"):window.innerWidth<=qr?t("tablet"):t("desktop")};return window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[]),{device:e}};exports.Drawer=Mr;exports.FeedbackProvider=Fr;exports.Modal=Hr;exports.NavigationProvider=Dr;exports.ScrollHelper=Wr;exports.TextHelper=Vr;exports.Toast=Ur;exports.Typography=Br;exports.useDidMount=zr;exports.useFeedback=ue;exports.useFetch=Yr;exports.useNavigation=Nr;exports.useResponsive=Gr;
33
+ Please change the parent <Route path="${f}"> to <Route path="${f==="/"?"*":`${f}/*`}">.`)}let g=V(),d;if(t){let f=typeof t=="string"?Y(t):t;S(s==="/"||f.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` 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 "${s}" but pathname "${f.pathname}" was given in the \`location\` prop.`),d=f}else d=g;let v=d.pathname||"/",p=v;if(s!=="/"){let f=s.replace(/^\//,"").split("/");p="/"+v.replace(/^\//,"").split("/").slice(f.length).join("/")}let y=Me(e,{pathname:p});N(h||y!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),N(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=qt(y&&y.map(f=>Object.assign({},f,{params:Object.assign({},u,f.params),pathname:j([s,n.encodeLocation?n.encodeLocation(f.pathname).pathname:f.pathname]),pathnameBase:f.pathnameBase==="/"?s:j([s,n.encodeLocation?n.encodeLocation(f.pathnameBase).pathname:f.pathnameBase])})),o,r,a);return t&&w?c.createElement(Q.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...d},navigationType:"POP"}},w):w}function Wt(){let e=Qt(),t=Ft(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=c.createElement(c.Fragment,null,c.createElement("p",null,"💿 Hey developer 👋"),c.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",c.createElement("code",{style:o},"ErrorBoundary")," or"," ",c.createElement("code",{style:o},"errorElement")," prop on your route.")),c.createElement(c.Fragment,null,c.createElement("h2",null,"Unexpected Application Error!"),c.createElement("h3",{style:{fontStyle:"italic"}},t),r?c.createElement("pre",{style:n},r):null,i)}var zt=c.createElement(Wt,null),Yt=class extends c.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?c.createElement(H.Provider,{value:this.props.routeContext},c.createElement(ve.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Jt({routeContext:e,match:t,children:r}){let a=c.useContext(J);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),c.createElement(H.Provider,{value:e},r)}function qt(e,t=[],r=null,a=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let n=e,o=r?.errors;if(o!=null){let l=n.findIndex(s=>s.route.id&&o?.[s.route.id]!==void 0);S(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),n=n.slice(0,Math.min(n.length,l+1))}let i=!1,u=-1;if(r)for(let l=0;l<n.length;l++){let s=n[l];if((s.route.HydrateFallback||s.route.hydrateFallbackElement)&&(u=l),s.route.id){let{loaderData:h,errors:g}=r,d=s.route.loader&&!h.hasOwnProperty(s.route.id)&&(!g||g[s.route.id]===void 0);if(s.route.lazy||d){i=!0,u>=0?n=n.slice(0,u+1):n=[n[0]];break}}}return n.reduceRight((l,s,h)=>{let g,d=!1,v=null,p=null;r&&(g=o&&s.route.id?o[s.route.id]:void 0,v=s.route.errorElement||zt,i&&(u<0&&h===0?(Ke("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):u===h&&(d=!0,p=s.route.hydrateFallbackElement||null)));let y=t.concat(n.slice(0,h+1)),w=()=>{let f;return g?f=v:d?f=p:s.route.Component?f=c.createElement(s.route.Component,null):s.route.element?f=s.route.element:f=l,c.createElement(Jt,{match:s,routeContext:{outlet:l,matches:y,isDataRoute:r!=null},children:f})};return r&&(s.route.ErrorBoundary||s.route.errorElement||h===0)?c.createElement(Yt,{location:r.location,revalidation:r.revalidation,component:v,error:g,children:w(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):w()},null)}function we(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Gt(e){let t=c.useContext(J);return S(t,we(e)),t}function Kt(e){let t=c.useContext(le);return S(t,we(e)),t}function Xt(e){let t=c.useContext(H);return S(t,we(e)),t}function xe(e){let t=Xt(e),r=t.matches[t.matches.length-1];return S(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Zt(){return xe("useRouteId")}function Qt(){let e=c.useContext(ve),t=Kt("useRouteError"),r=xe("useRouteError");return e!==void 0?e:t.errors?.[r]}function er(){let{router:e}=Gt("useNavigate"),t=xe("useNavigate"),r=c.useRef(!1);return Je(()=>{r.current=!0}),c.useCallback(async(n,o={})=>{N(r.current,Ye),r.current&&(typeof n=="number"?e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}var Ne={};function Ke(e,t,r){!t&&!Ne[e]&&(Ne[e]=!0,N(!1,r))}c.memo(tr);function tr({routes:e,future:t,state:r}){return Ge(e,void 0,r,t)}function Xe(e){S(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function rr({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:o=!1}){S(!ee(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let i=e.replace(/^\/*/,"/"),u=c.useMemo(()=>({basename:i,navigator:n,static:o,future:{}}),[i,n,o]);typeof r=="string"&&(r=Y(r));let{pathname:l="/",search:s="",hash:h="",state:g=null,key:d="default"}=r,v=c.useMemo(()=>{let p=M(l,i);return p==null?null:{location:{pathname:p,search:s,hash:h,state:g,key:d},navigationType:a}},[i,l,s,h,g,d,a]);return N(v!=null,`<Router basename="${i}"> is not able to match the URL "${l}${s}${h}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:c.createElement(F.Provider,{value:u},c.createElement(Q.Provider,{children:t,value:v}))}function nr({children:e,location:t}){return Vt(ye(e),t)}function ye(e,t=[]){let r=[];return c.Children.forEach(e,(a,n)=>{if(!c.isValidElement(a))return;let o=[...t,n];if(a.type===c.Fragment){r.push.apply(r,ye(a.props.children,o));return}S(a.type===Xe,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),S(!a.props.index||!a.props.children,"An index route cannot have child routes.");let i={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(i.children=ye(a.props.children,o)),r.push(i)}),r}var ae="get",oe="application/x-www-form-urlencoded";function se(e){return e!=null&&typeof e.tagName=="string"}function ar(e){return se(e)&&e.tagName.toLowerCase()==="button"}function or(e){return se(e)&&e.tagName.toLowerCase()==="form"}function ir(e){return se(e)&&e.tagName.toLowerCase()==="input"}function lr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function sr(e,t){return e.button===0&&(!t||t==="_self")&&!lr(e)}var ne=null;function ur(){if(ne===null)try{new FormData(document.createElement("form"),0),ne=!1}catch{ne=!0}return ne}var cr=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function pe(e){return e!=null&&!cr.has(e)?(N(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${oe}"`),null):e}function fr(e,t){let r,a,n,o,i;if(or(e)){let u=e.getAttribute("action");a=u?M(u,t):null,r=e.getAttribute("method")||ae,n=pe(e.getAttribute("enctype"))||oe,o=new FormData(e)}else if(ar(e)||ir(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||u.getAttribute("action");if(a=l?M(l,t):null,r=e.getAttribute("formmethod")||u.getAttribute("method")||ae,n=pe(e.getAttribute("formenctype"))||pe(u.getAttribute("enctype"))||oe,o=new FormData(u,e),!ur()){let{name:s,type:h,value:g}=e;if(h==="image"){let d=s?`${s}.`:"";o.append(`${d}x`,"0"),o.append(`${d}y`,"0")}else s&&o.append(s,g)}}else{if(se(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ae,a=null,n=oe,i=e}return o&&n==="text/plain"&&(i=o,o=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:o,body:i}}function be(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function dr(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function hr(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function mr(e,t,r){let a=await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let i=await dr(o,r);return i.links?i.links():[]}return[]}));return vr(a.flat(1).filter(hr).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function Fe(e,t,r,a,n,o){let i=(l,s)=>r[s]?l.route.id!==r[s].route.id:!0,u=(l,s)=>r[s].pathname!==l.pathname||r[s].route.path?.endsWith("*")&&r[s].params["*"]!==l.params["*"];return o==="assets"?t.filter((l,s)=>i(l,s)||u(l,s)):o==="data"?t.filter((l,s)=>{let h=a.routes[l.route.id];if(!h||!h.hasLoader)return!1;if(i(l,s)||u(l,s))return!0;if(l.route.shouldRevalidate){let g=l.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function pr(e,t,{includeHydrateFallback:r}={}){return gr(e.map(a=>{let n=t.routes[a.route.id];if(!n)return[];let o=[n.module];return n.clientActionModule&&(o=o.concat(n.clientActionModule)),n.clientLoaderModule&&(o=o.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(o=o.concat(n.hydrateFallbackModule)),n.imports&&(o=o.concat(n.imports)),o}).flat(1))}function gr(e){return[...new Set(e)]}function yr(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function vr(e,t){let r=new Set;return new Set(t),e.reduce((a,n)=>{let o=JSON.stringify(yr(n));return r.has(o)||(r.add(o),a.push({key:o,link:n})),a},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var wr=new Set([100,101,204,205]);function xr(e,t){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname="_root.data":t&&M(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function Ze(){let e=c.useContext(J);return be(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function br(){let e=c.useContext(le);return be(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Re=c.createContext(void 0);Re.displayName="FrameworkContext";function Qe(){let e=c.useContext(Re);return be(e,"You must render this element inside a <HydratedRouter> element"),e}function Rr(e,t){let r=c.useContext(Re),[a,n]=c.useState(!1),[o,i]=c.useState(!1),{onFocus:u,onBlur:l,onMouseEnter:s,onMouseLeave:h,onTouchStart:g}=t,d=c.useRef(null);c.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let y=f=>{f.forEach(b=>{i(b.isIntersecting)})},w=new IntersectionObserver(y,{threshold:.5});return d.current&&w.observe(d.current),()=>{w.disconnect()}}},[e]),c.useEffect(()=>{if(a){let y=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(y)}}},[a]);let v=()=>{n(!0)},p=()=>{n(!1),i(!1)};return r?e!=="intent"?[o,d,{}]:[o,d,{onFocus:X(u,v),onBlur:X(l,p),onMouseEnter:X(s,v),onMouseLeave:X(h,p),onTouchStart:X(g,v)}]:[!1,d,{}]}function X(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Er({page:e,...t}){let{router:r}=Ze(),a=c.useMemo(()=>Me(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?c.createElement(Sr,{page:e,matches:a,...t}):null}function Cr(e){let{manifest:t,routeModules:r}=Qe(),[a,n]=c.useState([]);return c.useEffect(()=>{let o=!1;return mr(e,t,r).then(i=>{o||n(i)}),()=>{o=!0}},[e,t,r]),a}function Sr({page:e,matches:t,...r}){let a=V(),{manifest:n,routeModules:o}=Qe(),{basename:i}=Ze(),{loaderData:u,matches:l}=br(),s=c.useMemo(()=>Fe(e,t,l,n,a,"data"),[e,t,l,n,a]),h=c.useMemo(()=>Fe(e,t,l,n,a,"assets"),[e,t,l,n,a]),g=c.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let p=new Set,y=!1;if(t.forEach(f=>{let b=n.routes[f.route.id];!b||!b.hasLoader||(!s.some(R=>R.route.id===f.route.id)&&f.route.id in u&&o[f.route.id]?.shouldRevalidate||b.hasClientLoader?y=!0:p.add(f.route.id))}),p.size===0)return[];let w=xr(e,i);return y&&p.size>0&&w.searchParams.set("_routes",t.filter(f=>p.has(f.route.id)).map(f=>f.route.id).join(",")),[w.pathname+w.search]},[i,u,a,n,s,t,e,o]),d=c.useMemo(()=>pr(h,n),[h,n]),v=Cr(h);return c.createElement(c.Fragment,null,g.map(p=>c.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...r})),d.map(p=>c.createElement("link",{key:p,rel:"modulepreload",href:p,...r})),v.map(({key:p,link:y})=>c.createElement("link",{key:p,...y})))}function kr(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var et=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{et&&(window.__reactRouterVersion="7.6.3")}catch{}function Pr({basename:e,children:t,window:r}){let a=c.useRef();a.current==null&&(a.current=mt({window:r,v5Compat:!0}));let n=a.current,[o,i]=c.useState({action:n.action,location:n.location}),u=c.useCallback(l=>{c.startTransition(()=>i(l))},[i]);return c.useLayoutEffect(()=>n.listen(u),[n,u]),c.createElement(rr,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:n})}var tt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rt=c.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:n,reloadDocument:o,replace:i,state:u,target:l,to:s,preventScrollReset:h,viewTransition:g,...d},v){let{basename:p}=c.useContext(F),y=typeof s=="string"&&tt.test(s),w,f=!1;if(typeof s=="string"&&y&&(w=s,et))try{let O=new URL(window.location.href),A=s.startsWith("//")?new URL(O.protocol+s):new URL(s),W=M(A.pathname,p);A.origin===O.origin&&W!=null?s=W+A.search+A.hash:f=!0}catch{N(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let b=Ut(s,{relative:n}),[R,k,T]=Rr(a,d),U=Or(s,{replace:i,state:u,target:l,preventScrollReset:h,relative:n,viewTransition:g});function $(O){t&&t(O),O.defaultPrevented||U(O)}let _=c.createElement("a",{...d,...T,href:w||b,onClick:f||o?t:$,ref:kr(v,k),target:l,"data-discover":!y&&r==="render"?"true":void 0});return R&&!y?c.createElement(c.Fragment,null,_,c.createElement(Er,{page:b})):_});rt.displayName="Link";var Tr=c.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:n=!1,style:o,to:i,viewTransition:u,children:l,...s},h){let g=te(i,{relative:s.relative}),d=V(),v=c.useContext(le),{navigator:p,basename:y}=c.useContext(F),w=v!=null&&Nr(g)&&u===!0,f=p.encodeLocation?p.encodeLocation(g).pathname:g.pathname,b=d.pathname,R=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(b=b.toLowerCase(),R=R?R.toLowerCase():null,f=f.toLowerCase()),R&&y&&(R=M(R,y)||R);const k=f!=="/"&&f.endsWith("/")?f.length-1:f.length;let T=b===f||!n&&b.startsWith(f)&&b.charAt(k)==="/",U=R!=null&&(R===f||!n&&R.startsWith(f)&&R.charAt(f.length)==="/"),$={isActive:T,isPending:U,isTransitioning:w},_=T?t:void 0,O;typeof a=="function"?O=a($):O=[a,T?"active":null,U?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let A=typeof o=="function"?o($):o;return c.createElement(rt,{...s,"aria-current":_,className:O,ref:h,style:A,to:i,viewTransition:u},typeof l=="function"?l($):l)});Tr.displayName="NavLink";var Ir=c.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:n,state:o,method:i=ae,action:u,onSubmit:l,relative:s,preventScrollReset:h,viewTransition:g,...d},v)=>{let p=Ar(),y=Dr(u,{relative:s}),w=i.toLowerCase()==="get"?"get":"post",f=typeof u=="string"&&tt.test(u),b=R=>{if(l&&l(R),R.defaultPrevented)return;R.preventDefault();let k=R.nativeEvent.submitter,T=k?.getAttribute("formmethod")||i;p(k||R.currentTarget,{fetcherKey:t,method:T,navigate:r,replace:n,state:o,relative:s,preventScrollReset:h,viewTransition:g})};return c.createElement("form",{ref:v,method:w,action:y,onSubmit:a?l:b,...d,"data-discover":!f&&e==="render"?"true":void 0})});Ir.displayName="Form";function Lr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nt(e){let t=c.useContext(J);return S(t,Lr(e)),t}function Or(e,{target:t,replace:r,state:a,preventScrollReset:n,relative:o,viewTransition:i}={}){let u=qe(),l=V(),s=te(e,{relative:o});return c.useCallback(h=>{if(sr(h,t)){h.preventDefault();let g=r!==void 0?r:Z(l)===Z(s);u(e,{replace:g,state:a,preventScrollReset:n,relative:o,viewTransition:i})}},[l,u,s,r,a,t,e,n,o,i])}var $r=0,_r=()=>`__${String(++$r)}__`;function Ar(){let{router:e}=nt("useSubmit"),{basename:t}=c.useContext(F),r=Zt();return c.useCallback(async(a,n={})=>{let{action:o,method:i,encType:u,formData:l,body:s}=fr(a,t);if(n.navigate===!1){let h=n.fetcherKey||_r();await e.fetch(h,r,n.action||o,{preventScrollReset:n.preventScrollReset,formData:l,body:s,formMethod:n.method||i,formEncType:n.encType||u,flushSync:n.flushSync})}else await e.navigate(n.action||o,{preventScrollReset:n.preventScrollReset,formData:l,body:s,formMethod:n.method||i,formEncType:n.encType||u,replace:n.replace,state:n.state,fromRouteId:r,flushSync:n.flushSync,viewTransition:n.viewTransition})},[e,t,r])}function Dr(e,{relative:t}={}){let{basename:r}=c.useContext(F),a=c.useContext(H);S(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),o={...te(e||".",{relative:t})},i=V();if(e==null){o.search=i.search;let u=new URLSearchParams(o.search),l=u.getAll("index");if(l.some(h=>h==="")){u.delete("index"),l.filter(g=>g).forEach(g=>u.append("index",g));let h=u.toString();o.search=h?`?${h}`:""}}return(!e||e===".")&&n.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:j([r,o.pathname])),Z(o)}function Nr(e,t={}){let r=c.useContext(ze);S(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=nt("useViewTransitionState"),n=te(e,{relative:t.relative});if(!r.isTransitioning)return!1;let o=M(r.currentLocation.pathname,a)||r.currentLocation.pathname,i=M(r.nextLocation.pathname,a)||r.nextLocation.pathname;return ie(n.pathname,i)!=null||ie(n.pathname,o)!=null}[...wr];const at=E.createContext({history:[],addToHistory:()=>{},popFromHistory:()=>"",replaceHistory:()=>{}}),Fr=({routes:e,children:t})=>{const r=E.useRef(["/"]),[a,n]=E.useState(["/"]),o=E.useCallback(h=>{r.current=h,n(h)},[]),i=h=>{o([...r.current,h])},u=h=>{let g="",d=[];return r.current.length===0?"/":(r.current.length<=h?(g=r.current[0],d=[g]):(d=r.current.slice(0,r.current.length-h),g=d[d.length-1]),o(d),g)},l=h=>{o(h)},s=e.map(h=>P.jsx(Xe,{path:h.path,element:h.render}));return P.jsx(at.Provider,{value:{history:a,addToHistory:i,popFromHistory:u,replaceHistory:l},children:P.jsxs(Pr,{children:[t,P.jsx(nr,{children:s})]})})},jr=()=>{const e=qe(),t=V(),r=E.useContext(at),a=E.useCallback((i,u=!0)=>{i!==t.pathname&&e(i,{replace:!0}),u&&r.addToHistory(i)},[t.pathname,e,r]),n=E.useCallback(i=>{const u=i||1,l=r.popFromHistory(u);a(l,!1)},[a,r]),o=E.useCallback(i=>{r.replaceHistory(i)},[r]);return{currentPath:t.pathname,history:r.history,goBack:n,goTo:a,replaceHistory:o}},ot=E.createContext({visibleItems:[],isItemVisible:()=>!1,showItem:()=>{},hideItem:()=>{}}),Mr=({children:e})=>{const t=E.useRef([]),[r,a]=E.useState([]),n=E.useCallback(l=>{console.log("ZAU UPDATING VISIBLE ITEMS",l),t.current=l,a(l)},[]),o=E.useCallback(l=>t.current.some(s=>s===l),[]),i=E.useCallback(l=>{o(l)||n([...t.current,l])},[o,n]),u=E.useCallback(l=>{o(l)&&n(t.current.filter(h=>h!==l))},[o,n]);return P.jsx(ot.Provider,{value:{visibleItems:r,isItemVisible:o,showItem:i,hideItem:u},children:e})},ue=()=>{const e=E.useContext(ot),t=n=>e.visibleItems.some(o=>o===n),r=n=>{e.showItem(n)},a=n=>{e.hideItem(n)};return{visibleItems:e.visibleItems,isItemVisible:t,showItem:r,hideItem:a}},Hr=({id:e,onCloseDrawer:t,drawerCloseOffset:r=15})=>{const{isItemVisible:a}=ue(),n=E.useRef(!1),o=E.useRef(null),i=E.useRef(null),u=E.useRef(null),[l,s]=E.useState(0),h=E.useRef(void 0),g=p=>{n.current=!0;const y=p.clientY;h.current=y},d=p=>{n.current=!1,h.current=void 0,s(0)},v=p=>{if(!(!o||!i||!u)&&n.current&&h.current!==void 0){const y=p.clientY,w=i.current?.clientHeight||0;let f=h.current-y;f=-f,s(f<0?0:-f),f>=w-r&&(t?.(),d())}};return{isVisible:a(e),drawerParentRef:o,drawerRef:i,drawerBottomDistance:l,handleRef:u,onDragStart:g,onDrag:v,onDragEnd:d}},Ur=e=>{const{children:t,backgroundStyles:r,contentStyles:a,handle:n}=e,{isVisible:o,drawerParentRef:i,drawerRef:u,handleRef:l,drawerBottomDistance:s,onDragStart:h,onDrag:g,onDragEnd:d}=Hr(e);return P.jsx(P.Fragment,{children:o&&P.jsx("div",{ref:i,style:{width:"100%",height:"100%",minHeight:"100vh",left:0,top:0,background:"#00000068",position:"fixed",zIndex:1e3,display:"flex",flexDirection:"column",touchAction:"none",...r},onPointerUp:d,onPointerMoveCapture:g,children:P.jsxs("div",{ref:u,style:{width:"100%",height:"fit-content",minHeight:"80px",maxHeight:"90%",background:"#ffffff",borderTopLeftRadius:"16px",borderTopRightRadius:"16px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"24px",zIndex:1001,position:"absolute",bottom:`${s}px`,...a},onClick:v=>{v.stopPropagation()},children:[P.jsx("div",{ref:l,style:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0px",height:"24px",width:"100%",cursor:"pointer",...n?.styles},onPointerDown:h,children:n?.render}),t]})})})},Br=({id:e,children:t,backgroundStyles:r,contentStyles:a,onClickOutsideModal:n})=>{const{isItemVisible:o}=ue();return P.jsx(P.Fragment,{children:o(e)&&P.jsx("div",{style:{width:"100%",height:"100%",minHeight:"100vh",background:"#00000068",position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:1e3,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",...r},onClick:()=>{n?.()},children:P.jsx("div",{style:{width:"90%",maxWidth:"375px",height:"fit-content",minHeight:"80px",maxHeight:"50%",background:"#ffffff",borderRadius:"16px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",zIndex:1001,position:"relative",padding:"24px",...a},onClick:i=>{i.stopPropagation()},children:t})})})},Vr=({id:e,children:t,styles:r,durationInSeconds:a=3})=>{const n=E.useRef(!1),{isItemVisible:o,hideItem:i}=ue();return E.useEffect(()=>{const u=o(e);n.current!==u&&(n.current=u,u&&setTimeout(()=>i(e),a*1e3))},[n,o,i]),P.jsx(P.Fragment,{children:o(e)&&P.jsx("div",{style:{width:"100px",height:"40px",background:"#534a4aff",color:"#ffffff",position:"fixed",top:"10px",left:"50%",transform:"translateX(-50%)",zIndex:1e3,borderRadius:"20px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",border:"solid 3px #000000ff",...r},onClick:u=>{u.stopPropagation()},children:t})})},Wr=({overflowEllipsis:e,children:t,styles:r})=>P.jsx("p",{style:{maxWidth:"100%",overflow:"hidden",whiteSpace:e?"nowrap":"normal",textOverflow:"ellipsis",fontSize:"16px",fontStyle:"normal",lineHeight:"normal",color:"inherit",...r},children:t});class zr{static isScrollEnabled=()=>document.body.style.overflow==="unset"||document.body.style.overflow==="auto";static disableScroll=()=>{document.body.style.overflow="hidden"};static enableScroll=()=>{document.body.style.overflow="unset"}}class Yr{static getPascalCase=t=>t.replace(/\w+/g,function(r){return r[0].toUpperCase()+r.slice(1).toLowerCase()});static isEqual=(t,r,a=!0)=>a?t===r:t.toUpperCase()===r.toUpperCase()}const Jr=e=>E.useEffect(e,[]),qr=()=>{const e=(r,a)=>{let n=0,o=`${r}?`;for(const i in a){const u=a[i];n>0&&(o=`${o}&`),o=`${o}${i}=${u}`,n++}return o};return async(r,a)=>{const n=e(r,a);return await(await fetch(n)).json()}},it={xs:0,sm:420,md:768,lg:991,xl:1200,xxl:1440},Gr=e=>{const t={...it,...e?.breakpointConfiguration},[r,a]=E.useState(je(t)),n=()=>{a(je(t))};return E.useEffect(()=>(window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}),[]),E.useMemo(()=>r,[r])},Kr=(e,t)=>e<t.sm?"xs":e<t.md?"sm":e<t.lg?"md":e<t.xl?"lg":e<t.xxl?"xl":"xxl",Xr=(e,t)=>e<=t.sm?"mobile":e<=t.md?"tablet":"desktop",je=e=>{const t=window.innerWidth,r=Kr(t,e),a=Xr(t,e);return{currentWidth:t,currentBreakpoint:r,currentSize:a}},Zr=e=>{const t=e.translations,r=e.language,a=o=>o[r];return{t:o=>t[o]?a(t[o]):o,getTranslation:a}};exports.Drawer=Ur;exports.FeedbackProvider=Mr;exports.Modal=Br;exports.NavigationProvider=Fr;exports.ScrollHelper=zr;exports.TextHelper=Yr;exports.Toast=Vr;exports.Typography=Wr;exports.defaultBreakpoints=it;exports.useDidMount=Jr;exports.useFeedback=ue;exports.useFetch=qr;exports.useNavigation=jr;exports.useResponsive=Gr;exports.useTranslations=Zr;