ecars-web-lib 1.0.0 → 1.0.2
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.
- package/dist/components/Slider/constants.d.ts +0 -3
- package/dist/components/Slider/index.d.ts +3 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +191 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/PaginationComponent-BM_GD3t6.cjs +0 -2
- package/dist/PaginationComponent-BM_GD3t6.cjs.map +0 -1
- package/dist/PaginationComponent-_iwGlFdM.js +0 -65
- package/dist/PaginationComponent-_iwGlFdM.js.map +0 -1
- package/dist/SelectComponent-CGBwJBns.cjs +0 -2
- package/dist/SelectComponent-CGBwJBns.cjs.map +0 -1
- package/dist/SelectComponent-DJi5yeVI.js +0 -98
- package/dist/SelectComponent-DJi5yeVI.js.map +0 -1
- package/dist/_commonjsHelpers-DKOUU3wS.cjs +0 -2
- package/dist/_commonjsHelpers-DKOUU3wS.cjs.map +0 -1
- package/dist/_commonjsHelpers-DaMA6jEr.js +0 -9
- package/dist/_commonjsHelpers-DaMA6jEr.js.map +0 -1
- package/dist/chunk-KNED5TY2-9zjBD6gF.js +0 -1659
- package/dist/chunk-KNED5TY2-9zjBD6gF.js.map +0 -1
- package/dist/chunk-KNED5TY2-BcFuRn3Q.cjs +0 -13
- package/dist/chunk-KNED5TY2-BcFuRn3Q.cjs.map +0 -1
- package/dist/components/Accordion/AccordionComponent.js +0 -6
- package/dist/components/Accordion/AccordionComponent.js.map +0 -1
- package/dist/components/Accordion/AccordionComponent.test.d.ts +0 -1
- package/dist/components/Accordion/AccordionComponent.test.js +0 -32
- package/dist/components/Accordion/AccordionComponent.test.js.map +0 -1
- package/dist/components/Accordion/components/AccordionArrow.js +0 -7
- package/dist/components/Accordion/components/AccordionArrow.js.map +0 -1
- package/dist/components/Accordion/components/AccordionBlock.js +0 -6
- package/dist/components/Accordion/components/AccordionBlock.js.map +0 -1
- package/dist/components/Accordion/components/AccordionButton.js +0 -14
- package/dist/components/Accordion/components/AccordionButton.js.map +0 -1
- package/dist/components/Accordion/components/AccordionContent.js +0 -24
- package/dist/components/Accordion/components/AccordionContent.js.map +0 -1
- package/dist/components/Accordion/components/AccordionLayout.js +0 -17
- package/dist/components/Accordion/components/AccordionLayout.js.map +0 -1
- package/dist/components/Accordion/components/AccordionTitle.js +0 -6
- package/dist/components/Accordion/components/AccordionTitle.js.map +0 -1
- package/dist/components/Accordion/constants.js +0 -5
- package/dist/components/Accordion/constants.js.map +0 -1
- package/dist/components/Accordion/index.js +0 -10
- package/dist/components/Accordion/index.js.map +0 -1
- package/dist/components/Button/Button.js +0 -34
- package/dist/components/Button/Button.js.map +0 -1
- package/dist/components/Button/Button.test.d.ts +0 -1
- package/dist/components/Button/Button.test.js +0 -101
- package/dist/components/Button/Button.test.js.map +0 -1
- package/dist/components/Button/constants.js +0 -15
- package/dist/components/Button/constants.js.map +0 -1
- package/dist/components/ButtonWithIcon/ButtonWithIcon.js +0 -37
- package/dist/components/ButtonWithIcon/ButtonWithIcon.js.map +0 -1
- package/dist/components/ButtonWithIcon/ButtonWithIcon.test.d.ts +0 -1
- package/dist/components/ButtonWithIcon/ButtonWithIcon.test.js +0 -55
- package/dist/components/ButtonWithIcon/ButtonWithIcon.test.js.map +0 -1
- package/dist/components/ButtonWithIcon/constants.js +0 -6
- package/dist/components/ButtonWithIcon/constants.js.map +0 -1
- package/dist/components/Category/Category.js +0 -18
- package/dist/components/Category/Category.js.map +0 -1
- package/dist/components/Category/Category.test.d.ts +0 -1
- package/dist/components/Category/Category.test.js +0 -14
- package/dist/components/Category/Category.test.js.map +0 -1
- package/dist/components/Category/constants.js +0 -10
- package/dist/components/Category/constants.js.map +0 -1
- package/dist/components/Checkbox/CheckboxComponent.js +0 -6
- package/dist/components/Checkbox/CheckboxComponent.js.map +0 -1
- package/dist/components/Checkbox/CheckboxComponent.test.d.ts +0 -1
- package/dist/components/Checkbox/CheckboxComponent.test.js +0 -31
- package/dist/components/Checkbox/CheckboxComponent.test.js.map +0 -1
- package/dist/components/Checkbox/components/CheckboxBlock.js +0 -19
- package/dist/components/Checkbox/components/CheckboxBlock.js.map +0 -1
- package/dist/components/Checkbox/components/CheckboxIndicator.js +0 -7
- package/dist/components/Checkbox/components/CheckboxIndicator.js.map +0 -1
- package/dist/components/Checkbox/components/CheckboxInput.js +0 -34
- package/dist/components/Checkbox/components/CheckboxInput.js.map +0 -1
- package/dist/components/Checkbox/constants.js +0 -6
- package/dist/components/Checkbox/constants.js.map +0 -1
- package/dist/components/Checkbox/index.js +0 -8
- package/dist/components/Checkbox/index.js.map +0 -1
- package/dist/components/Dropdown/Dropdown.test.d.ts +0 -1
- package/dist/components/Dropdown/Dropdown.test.js +0 -57
- package/dist/components/Dropdown/Dropdown.test.js.map +0 -1
- package/dist/components/Dropdown/DropdownComponent.js +0 -9
- package/dist/components/Dropdown/DropdownComponent.js.map +0 -1
- package/dist/components/Dropdown/components/DropdownBlock.js +0 -6
- package/dist/components/Dropdown/components/DropdownBlock.js.map +0 -1
- package/dist/components/Dropdown/components/DropdownCategory.js +0 -18
- package/dist/components/Dropdown/components/DropdownCategory.js.map +0 -1
- package/dist/components/Dropdown/components/DropdownList.js +0 -6
- package/dist/components/Dropdown/components/DropdownList.js.map +0 -1
- package/dist/components/Dropdown/components/DropdownOption.js +0 -22
- package/dist/components/Dropdown/components/DropdownOption.js.map +0 -1
- package/dist/components/Dropdown/constants.js +0 -5
- package/dist/components/Dropdown/constants.js.map +0 -1
- package/dist/components/Dropdown/index.js +0 -8
- package/dist/components/Dropdown/index.js.map +0 -1
- package/dist/components/FavButton/FavButton.js +0 -30
- package/dist/components/FavButton/FavButton.js.map +0 -1
- package/dist/components/FavButton/FavButton.test.d.ts +0 -1
- package/dist/components/FavButton/FavButton.test.js +0 -81
- package/dist/components/FavButton/FavButton.test.js.map +0 -1
- package/dist/components/FavButton/constants.js +0 -9
- package/dist/components/FavButton/constants.js.map +0 -1
- package/dist/components/Field/FieldComponent.js +0 -9
- package/dist/components/Field/FieldComponent.js.map +0 -1
- package/dist/components/Field/FieldComponent.test.d.ts +0 -1
- package/dist/components/Field/FieldComponent.test.js +0 -31
- package/dist/components/Field/FieldComponent.test.js.map +0 -1
- package/dist/components/Field/components/FieldError.js +0 -6
- package/dist/components/Field/components/FieldError.js.map +0 -1
- package/dist/components/Field/components/FieldLabel.js +0 -15
- package/dist/components/Field/components/FieldLabel.js.map +0 -1
- package/dist/components/Field/constants.js +0 -6
- package/dist/components/Field/constants.js.map +0 -1
- package/dist/components/Field/index.js +0 -7
- package/dist/components/Field/index.js.map +0 -1
- package/dist/components/FilterAccordion/FilterAccordionComponent.js +0 -7
- package/dist/components/FilterAccordion/FilterAccordionComponent.js.map +0 -1
- package/dist/components/FilterAccordion/FilterAccordionComponent.test.d.ts +0 -1
- package/dist/components/FilterAccordion/FilterAccordionComponent.test.js +0 -34
- package/dist/components/FilterAccordion/FilterAccordionComponent.test.js.map +0 -1
- package/dist/components/FilterAccordion/components/FilterAccordionArrow.js +0 -14
- package/dist/components/FilterAccordion/components/FilterAccordionArrow.js.map +0 -1
- package/dist/components/FilterAccordion/components/FilterAccordionBlock.js +0 -6
- package/dist/components/FilterAccordion/components/FilterAccordionBlock.js.map +0 -1
- package/dist/components/FilterAccordion/components/FilterAccordionContent.js +0 -18
- package/dist/components/FilterAccordion/components/FilterAccordionContent.js.map +0 -1
- package/dist/components/FilterAccordion/components/FilterAccordionLayout.js +0 -17
- package/dist/components/FilterAccordion/components/FilterAccordionLayout.js.map +0 -1
- package/dist/components/FilterAccordion/components/FilterAccordionReset.js +0 -16
- package/dist/components/FilterAccordion/components/FilterAccordionReset.js.map +0 -1
- package/dist/components/FilterAccordion/constants.js +0 -9
- package/dist/components/FilterAccordion/constants.js.map +0 -1
- package/dist/components/FilterAccordion/index.js +0 -10
- package/dist/components/FilterAccordion/index.js.map +0 -1
- package/dist/components/FilterButton/FilterButton.js +0 -20
- package/dist/components/FilterButton/FilterButton.js.map +0 -1
- package/dist/components/FilterButton/FilterButton.test.d.ts +0 -1
- package/dist/components/FilterButton/FilterButton.test.js +0 -18
- package/dist/components/FilterButton/FilterButton.test.js.map +0 -1
- package/dist/components/Gallery/Gallery.js +0 -1094
- package/dist/components/Gallery/Gallery.js.map +0 -1
- package/dist/components/Gallery/Gallery.test.d.ts +0 -0
- package/dist/components/Gallery/Gallery.test.js +0 -25
- package/dist/components/Gallery/Gallery.test.js.map +0 -1
- package/dist/components/Gallery/constants.js +0 -5
- package/dist/components/Gallery/constants.js.map +0 -1
- package/dist/components/Input/Input.js +0 -43
- package/dist/components/Input/Input.js.map +0 -1
- package/dist/components/Input/Input.test.d.ts +0 -1
- package/dist/components/Input/Input.test.js +0 -46
- package/dist/components/Input/Input.test.js.map +0 -1
- package/dist/components/Input/constants.js +0 -5
- package/dist/components/Input/constants.js.map +0 -1
- package/dist/components/LinkWithIcon/LinkWithIcon.js +0 -19
- package/dist/components/LinkWithIcon/LinkWithIcon.js.map +0 -1
- package/dist/components/LinkWithIcon/LinkWithIcon.test.d.ts +0 -1
- package/dist/components/LinkWithIcon/LinkWithIcon.test.js +0 -55
- package/dist/components/LinkWithIcon/LinkWithIcon.test.js.map +0 -1
- package/dist/components/LinkWithIcon/constants.js +0 -6
- package/dist/components/LinkWithIcon/constants.js.map +0 -1
- package/dist/components/NavLink/NavLink.js +0 -20
- package/dist/components/NavLink/NavLink.js.map +0 -1
- package/dist/components/NavLink/NavLink.test.d.ts +0 -1
- package/dist/components/NavLink/NavLink.test.js +0 -30
- package/dist/components/NavLink/NavLink.test.js.map +0 -1
- package/dist/components/NavLink/constants.js +0 -5
- package/dist/components/NavLink/constants.js.map +0 -1
- package/dist/components/Pagination/Pagination.test.d.ts +0 -1
- package/dist/components/Pagination/Pagination.test.js +0 -79
- package/dist/components/Pagination/Pagination.test.js.map +0 -1
- package/dist/components/Pagination/PaginationComponent.js +0 -8
- package/dist/components/Pagination/PaginationComponent.js.map +0 -1
- package/dist/components/Pagination/components/PaginationArrow.js +0 -29
- package/dist/components/Pagination/components/PaginationArrow.js.map +0 -1
- package/dist/components/Pagination/components/PaginationBody.js +0 -6
- package/dist/components/Pagination/components/PaginationBody.js.map +0 -1
- package/dist/components/Pagination/components/PaginationPage.js +0 -17
- package/dist/components/Pagination/components/PaginationPage.js.map +0 -1
- package/dist/components/Pagination/constants.js +0 -11
- package/dist/components/Pagination/constants.js.map +0 -1
- package/dist/components/Pagination/index.js +0 -7
- package/dist/components/Pagination/index.js.map +0 -1
- package/dist/components/RangeSlider/RangeSlider.js +0 -1072
- package/dist/components/RangeSlider/RangeSlider.js.map +0 -1
- package/dist/components/RangeSlider/RangeSlider.test.d.ts +0 -1
- package/dist/components/RangeSlider/RangeSlider.test.js +0 -15
- package/dist/components/RangeSlider/RangeSlider.test.js.map +0 -1
- package/dist/components/RouterLink/RouterLink.js +0 -32
- package/dist/components/RouterLink/RouterLink.js.map +0 -1
- package/dist/components/RouterLink/RouterLink.test.d.ts +0 -1
- package/dist/components/RouterLink/RouterLink.test.js +0 -68
- package/dist/components/RouterLink/RouterLink.test.js.map +0 -1
- package/dist/components/RouterLink/constants.js +0 -11
- package/dist/components/RouterLink/constants.js.map +0 -1
- package/dist/components/Select/Select.test.d.ts +0 -1
- package/dist/components/Select/Select.test.js +0 -100
- package/dist/components/Select/Select.test.js.map +0 -1
- package/dist/components/Select/SelectComponent.js +0 -7
- package/dist/components/Select/SelectComponent.js.map +0 -1
- package/dist/components/Select/components/SelectArrow.js +0 -7
- package/dist/components/Select/components/SelectArrow.js.map +0 -1
- package/dist/components/Select/components/SelectBlock.js +0 -13
- package/dist/components/Select/components/SelectBlock.js.map +0 -1
- package/dist/components/Select/components/SelectInput.js +0 -15
- package/dist/components/Select/components/SelectInput.js.map +0 -1
- package/dist/components/Select/components/SelectList.js +0 -6
- package/dist/components/Select/components/SelectList.js.map +0 -1
- package/dist/components/Select/components/SelectOption.js +0 -16
- package/dist/components/Select/components/SelectOption.js.map +0 -1
- package/dist/components/Select/components/SelectWrapper.js +0 -23
- package/dist/components/Select/components/SelectWrapper.js.map +0 -1
- package/dist/components/Select/constants.js +0 -8
- package/dist/components/Select/constants.js.map +0 -1
- package/dist/components/Select/index.js +0 -10
- package/dist/components/Select/index.js.map +0 -1
- package/dist/components/Slider/SliderComponent.js +0 -7
- package/dist/components/Slider/SliderComponent.js.map +0 -1
- package/dist/components/Slider/constants.js +0 -2803
- package/dist/components/Slider/constants.js.map +0 -1
- package/dist/components/SliderNavigate/SliderNavigate.js +0 -21
- package/dist/components/SliderNavigate/SliderNavigate.js.map +0 -1
- package/dist/components/SliderNavigate/SliderNavigate.test.d.ts +0 -1
- package/dist/components/SliderNavigate/SliderNavigate.test.js +0 -24
- package/dist/components/SliderNavigate/SliderNavigate.test.js.map +0 -1
- package/dist/components/SliderNavigate/components/NavigateButton.js +0 -19
- package/dist/components/SliderNavigate/components/NavigateButton.js.map +0 -1
- package/dist/components/SliderNavigate/constants.js +0 -10
- package/dist/components/SliderNavigate/constants.js.map +0 -1
- package/dist/iconBase-C4boY5mo.cjs +0 -2
- package/dist/iconBase-C4boY5mo.cjs.map +0 -1
- package/dist/iconBase-DSKTHwal.js +0 -113
- package/dist/iconBase-DSKTHwal.js.map +0 -1
- package/dist/index-6k1-qYX7.cjs +0 -2
- package/dist/index-6k1-qYX7.cjs.map +0 -1
- package/dist/index-BHJQkg-z.js +0 -39
- package/dist/index-BHJQkg-z.js.map +0 -1
- package/dist/index-BeUY6TnM.js +0 -68
- package/dist/index-BeUY6TnM.js.map +0 -1
- package/dist/index-C55-7-85.cjs +0 -2
- package/dist/index-C55-7-85.cjs.map +0 -1
- package/dist/index-C9UV8B4g.cjs +0 -2
- package/dist/index-C9UV8B4g.cjs.map +0 -1
- package/dist/index-CGl3Xo_k.js +0 -19135
- package/dist/index-CGl3Xo_k.js.map +0 -1
- package/dist/index-D9bMq-6v.cjs +0 -2
- package/dist/index-D9bMq-6v.cjs.map +0 -1
- package/dist/index-DgPeknFG.cjs +0 -2
- package/dist/index-DgPeknFG.cjs.map +0 -1
- package/dist/index-DpGIQZJ3.js +0 -35
- package/dist/index-DpGIQZJ3.js.map +0 -1
- package/dist/index-DtO1atyA.js +0 -30
- package/dist/index-DtO1atyA.js.map +0 -1
- package/dist/index-YTr4A0AR.js +0 -25
- package/dist/index-YTr4A0AR.js.map +0 -1
- package/dist/index-vOj_CXk2.cjs +0 -175
- package/dist/index-vOj_CXk2.cjs.map +0 -1
- package/dist/react.esm-C2dSWZxI.cjs +0 -91
- package/dist/react.esm-C2dSWZxI.cjs.map +0 -1
- package/dist/react.esm-DeOc63_l.js +0 -11455
- package/dist/react.esm-DeOc63_l.js.map +0 -1
- package/dist/services/helpers.js +0 -21
- package/dist/services/helpers.js.map +0 -1
- package/dist/services/hoc/withBlockClass.js +0 -22
- package/dist/services/hoc/withBlockClass.js.map +0 -1
- package/dist/services/hooks/useAccordionHeight.js +0 -17
- package/dist/services/hooks/useAccordionHeight.js.map +0 -1
- package/dist/services/hooks/useClickOutside.js +0 -17
- package/dist/services/hooks/useClickOutside.js.map +0 -1
- package/dist/services/hooks/useMatchMedia.js +0 -18
- package/dist/services/hooks/useMatchMedia.js.map +0 -1
- package/dist/services/icons.js +0 -27
- package/dist/services/icons.js.map +0 -1
- package/dist/services/mocks.js +0 -21
- package/dist/services/mocks.js.map +0 -1
- package/dist/services/types.js +0 -2
- package/dist/services/types.js.map +0 -1
- package/dist/setupTests.d.ts +0 -0
- package/dist/setupTests.js +0 -10217
- package/dist/setupTests.js.map +0 -1
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";const ke=require("react");function Le(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 l=Le(ke);var A={},oe;function $e(){if(oe)return A;oe=1,Object.defineProperty(A,"__esModule",{value:!0}),A.parse=s,A.serialize=u;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 m=function(){};return m.prototype=Object.create(null),m})();function s(m,d){const f=new o,g=m.length;if(g<2)return f;const x=(d==null?void 0:d.decode)||h;let p=0;do{const w=m.indexOf("=",p);if(w===-1)break;const v=m.indexOf(";",p),R=v===-1?g:v;if(w>R){p=m.lastIndexOf(";",w-1)+1;continue}const P=c(m,p,w),N=i(m,w,P),I=m.slice(P,N);if(f[I]===void 0){let T=c(m,w+1,R),C=i(m,R,T);const F=x(m.slice(T,C));f[I]=F}p=R+1}while(p<g);return f}function c(m,d,f){do{const g=m.charCodeAt(d);if(g!==32&&g!==9)return d}while(++d<f);return f}function i(m,d,f){for(;d>f;){const g=m.charCodeAt(--d);if(g!==32&&g!==9)return d+1}return f}function u(m,d,f){const g=(f==null?void 0:f.encode)||encodeURIComponent;if(!e.test(m))throw new TypeError(`argument name is invalid: ${m}`);const x=g(d);if(!t.test(x))throw new TypeError(`argument val is invalid: ${d}`);let p=m+"="+x;if(!f)return p;if(f.maxAge!==void 0){if(!Number.isInteger(f.maxAge))throw new TypeError(`option maxAge is invalid: ${f.maxAge}`);p+="; Max-Age="+f.maxAge}if(f.domain){if(!r.test(f.domain))throw new TypeError(`option domain is invalid: ${f.domain}`);p+="; Domain="+f.domain}if(f.path){if(!a.test(f.path))throw new TypeError(`option path is invalid: ${f.path}`);p+="; Path="+f.path}if(f.expires){if(!y(f.expires)||!Number.isFinite(f.expires.valueOf()))throw new TypeError(`option expires is invalid: ${f.expires}`);p+="; Expires="+f.expires.toUTCString()}if(f.httpOnly&&(p+="; HttpOnly"),f.secure&&(p+="; Secure"),f.partitioned&&(p+="; Partitioned"),f.priority)switch(typeof f.priority=="string"?f.priority.toLowerCase():void 0){case"low":p+="; Priority=Low";break;case"medium":p+="; Priority=Medium";break;case"high":p+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${f.priority}`)}if(f.sameSite)switch(typeof f.sameSite=="string"?f.sameSite.toLowerCase():f.sameSite){case!0:case"strict":p+="; SameSite=Strict";break;case"lax":p+="; SameSite=Lax";break;case"none":p+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${f.sameSite}`)}return p}function h(m){if(m.indexOf("%")===-1)return m;try{return decodeURIComponent(m)}catch{return m}}function y(m){return n.call(m)==="[object Date]"}return A}$e();/**
|
|
2
|
-
* react-router v7.5.0
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) Remix Software Inc.
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the MIT license found in the
|
|
7
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
8
|
-
*
|
|
9
|
-
* @license MIT
|
|
10
|
-
*/function Ie(e={}){let{initialEntries:t=["/"],initialIndex:r,v5Compat:a=!1}=e,n;n=t.map((d,f)=>h(d,typeof d=="string"?null:d.state,f===0?"default":void 0));let o=i(r??n.length-1),s="POP",c=null;function i(d){return Math.min(Math.max(d,0),n.length-1)}function u(){return n[o]}function h(d,f=null,g){let x=Te(n?u().pathname:"/",d,f,g);return b(x.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(d)}`),x}function y(d){return typeof d=="string"?d:V(d)}return{get index(){return o},get action(){return s},get location(){return u()},createHref:y,createURL(d){return new URL(y(d),"http://localhost")},encodeLocation(d){let f=typeof d=="string"?M(d):d;return{pathname:f.pathname||"",search:f.search||"",hash:f.hash||""}},push(d,f){s="PUSH";let g=h(d,f);o+=1,n.splice(o,n.length,g),a&&c&&c({action:s,location:g,delta:1})},replace(d,f){s="REPLACE";let g=h(d,f);n[o]=g,a&&c&&c({action:s,location:g,delta:0})},go(d){s="POP";let f=i(o+d),g=n[f];o=f,c&&c({action:s,location:g,delta:d})},listen(d){return c=d,()=>{c=null}}}}function E(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function b(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Fe(){return Math.random().toString(36).substring(2,10)}function Te(e,t,r=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?M(t):t,state:r,key:t&&t.key||a||Fe()}}function V({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 M(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 se(e,t,r="/"){return Me(e,t,r,!1)}function Me(e,t,r,a){let n=typeof t=="string"?M(t):t,o=L(n.pathname||"/",r);if(o==null)return null;let s=ce(e);De(s);let c=null;for(let i=0;c==null&&i<s.length;++i){let u=Ve(o);c=ze(s[i],u,a)}return c}function ce(e,t=[],r=[],a=""){let n=(o,s,c)=>{let i={relativePath:c===void 0?o.path||"":c,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};i.relativePath.startsWith("/")&&(E(i.relativePath.startsWith(a),`Absolute route path "${i.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),i.relativePath=i.relativePath.slice(a.length));let u=k([a,i.relativePath]),h=r.concat(i);o.children&&o.children.length>0&&(E(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),ce(o.children,t,h,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:He(u,o.index),routesMeta:h})};return e.forEach((o,s)=>{var c;if(o.path===""||!((c=o.path)!=null&&c.includes("?")))n(o,s);else for(let i of fe(o.path))n(o,s,i)}),t}function fe(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 s=fe(a.join("/")),c=[];return c.push(...s.map(i=>i===""?o:[o,i].join("/"))),n&&c.push(...s),c.map(i=>e.startsWith("/")&&i===""?"/":i)}function De(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:_e(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var Ne=/^:[\w-]+$/,Oe=3,Ae=2,Be=1,Ue=10,We=-2,ie=e=>e==="*";function He(e,t){let r=e.split("/"),a=r.length;return r.some(ie)&&(a+=We),t&&(a+=Ae),r.filter(n=>!ie(n)).reduce((n,o)=>n+(Ne.test(o)?Oe:o===""?Be:Ue),a)}function _e(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 ze(e,t,r=!1){let{routesMeta:a}=e,n={},o="/",s=[];for(let c=0;c<a.length;++c){let i=a[c],u=c===a.length-1,h=o==="/"?t:t.slice(o.length)||"/",y=J({path:i.relativePath,caseSensitive:i.caseSensitive,end:u},h),m=i.route;if(!y&&u&&r&&!a[a.length-1].route.index&&(y=J({path:i.relativePath,caseSensitive:i.caseSensitive,end:!1},h)),!y)return null;Object.assign(n,y.params),s.push({params:n,pathname:k([o,y.pathname]),pathnameBase:qe(k([o,y.pathnameBase])),route:m}),y.pathnameBase!=="/"&&(o=k([o,y.pathnameBase]))}return s}function J(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=je(e.path,e.caseSensitive,e.end),n=t.match(r);if(!n)return null;let o=n[0],s=o.replace(/(.)\/+$/,"$1"),c=n.slice(1);return{params:a.reduce((u,{paramName:h,isOptional:y},m)=>{if(h==="*"){let f=c[m]||"";s=o.slice(0,o.length-f.length).replace(/(.)\/+$/,"$1")}const d=c[m];return y&&!d?u[h]=void 0:u[h]=(d||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:s,pattern:e}}function je(e,t=!1,r=!0){b(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,(s,c,i)=>(a.push({paramName:c,isOptional:i!=null}),i?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function Ve(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return b(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function L(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function Je(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?M(e):e;return{pathname:r?r.startsWith("/")?r:Ke(r,t):t,search:Ge(a),hash:Xe(n)}}function Ke(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 q(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 Ye(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function de(e){let t=Ye(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function he(e,t,r,a=!1){let n;typeof e=="string"?n=M(e):(n={...e},E(!n.pathname||!n.pathname.includes("?"),q("?","pathname","search",n)),E(!n.pathname||!n.pathname.includes("#"),q("#","pathname","hash",n)),E(!n.search||!n.search.includes("#"),q("#","search","hash",n)));let o=e===""||n.pathname==="",s=o?"/":n.pathname,c;if(s==null)c=r;else{let y=t.length-1;if(!a&&s.startsWith("..")){let m=s.split("/");for(;m[0]==="..";)m.shift(),y-=1;n.pathname=m.join("/")}c=y>=0?t[y]:"/"}let i=Je(n,c),u=s&&s!=="/"&&s.endsWith("/"),h=(o||s===".")&&r.endsWith("/");return!i.pathname.endsWith("/")&&(u||h)&&(i.pathname+="/"),i}var k=e=>e.join("/").replace(/\/\/+/g,"/"),qe=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ge=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Xe=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Qe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var me=["POST","PUT","PATCH","DELETE"];new Set(me);var Ze=["GET",...me];new Set(Ze);var O=l.createContext(null);O.displayName="DataRouter";var K=l.createContext(null);K.displayName="DataRouterState";var pe=l.createContext({isTransitioning:!1});pe.displayName="ViewTransition";var et=l.createContext(new Map);et.displayName="Fetchers";var tt=l.createContext(null);tt.displayName="Await";var S=l.createContext(null);S.displayName="Navigation";var U=l.createContext(null);U.displayName="Location";var $=l.createContext({outlet:null,matches:[],isDataRoute:!1});$.displayName="Route";var Q=l.createContext(null);Q.displayName="RouteError";function rt(e,{relative:t}={}){E(W(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=l.useContext(S),{hash:n,pathname:o,search:s}=H(e,{relative:t}),c=o;return r!=="/"&&(c=o==="/"?r:k([r,o])),a.createHref({pathname:c,search:s,hash:n})}function W(){return l.useContext(U)!=null}function D(){return E(W(),"useLocation() may be used only in the context of a <Router> component."),l.useContext(U).location}var ye="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ge(e){l.useContext(S).static||l.useLayoutEffect(e)}function nt(){let{isDataRoute:e}=l.useContext($);return e?yt():at()}function at(){E(W(),"useNavigate() may be used only in the context of a <Router> component.");let e=l.useContext(O),{basename:t,navigator:r}=l.useContext(S),{matches:a}=l.useContext($),{pathname:n}=D(),o=JSON.stringify(de(a)),s=l.useRef(!1);return ge(()=>{s.current=!0}),l.useCallback((i,u={})=>{if(b(s.current,ye),!s.current)return;if(typeof i=="number"){r.go(i);return}let h=he(i,JSON.parse(o),n,u.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:k([t,h.pathname])),(u.replace?r.replace:r.push)(h,u.state,u)},[t,r,o,n,e])}l.createContext(null);function H(e,{relative:t}={}){let{matches:r}=l.useContext($),{pathname:a}=D(),n=JSON.stringify(de(r));return l.useMemo(()=>he(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function ot(e,t){return ve(e,t)}function ve(e,t,r,a){var w;E(W(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n,static:o}=l.useContext(S),{matches:s}=l.useContext($),c=s[s.length-1],i=c?c.params:{},u=c?c.pathname:"/",h=c?c.pathnameBase:"/",y=c&&c.route;{let v=y&&y.path||"";xe(u,!y||v.endsWith("*")||v.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${v}">) 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.
|
|
11
|
-
|
|
12
|
-
Please change the parent <Route path="${v}"> to <Route path="${v==="/"?"*":`${v}/*`}">.`)}let m=D(),d;if(t){let v=typeof t=="string"?M(t):t;E(h==="/"||((w=v.pathname)==null?void 0:w.startsWith(h)),`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 "${h}" but pathname "${v.pathname}" was given in the \`location\` prop.`),d=v}else d=m;let f=d.pathname||"/",g=f;if(h!=="/"){let v=h.replace(/^\//,"").split("/");g="/"+f.replace(/^\//,"").split("/").slice(v.length).join("/")}let x=!o&&r&&r.matches&&r.matches.length>0?r.matches:se(e,{pathname:g});b(y||x!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),b(x==null||x[x.length-1].route.element!==void 0||x[x.length-1].route.Component!==void 0||x[x.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 p=ct(x&&x.map(v=>Object.assign({},v,{params:Object.assign({},i,v.params),pathname:k([h,n.encodeLocation?n.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?h:k([h,n.encodeLocation?n.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),s,r,a);return t&&p?l.createElement(U.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...d},navigationType:"POP"}},p):p}function it(){let e=pt(),t=Qe(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},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=l.createElement(l.Fragment,null,l.createElement("p",null,"💿 Hey developer 👋"),l.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",l.createElement("code",{style:o},"ErrorBoundary")," or"," ",l.createElement("code",{style:o},"errorElement")," prop on your route.")),l.createElement(l.Fragment,null,l.createElement("h2",null,"Unexpected Application Error!"),l.createElement("h3",{style:{fontStyle:"italic"}},t),r?l.createElement("pre",{style:n},r):null,s)}var lt=l.createElement(it,null),ut=class extends l.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?l.createElement($.Provider,{value:this.props.routeContext},l.createElement(Q.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function st({routeContext:e,match:t,children:r}){let a=l.useContext(O);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),l.createElement($.Provider,{value:e},r)}function ct(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==null?void 0:r.errors;if(o!=null){let i=n.findIndex(u=>u.route.id&&(o==null?void 0:o[u.route.id])!==void 0);E(i>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),n=n.slice(0,Math.min(n.length,i+1))}let s=!1,c=-1;if(r)for(let i=0;i<n.length;i++){let u=n[i];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(c=i),u.route.id){let{loaderData:h,errors:y}=r,m=u.route.loader&&!h.hasOwnProperty(u.route.id)&&(!y||y[u.route.id]===void 0);if(u.route.lazy||m){s=!0,c>=0?n=n.slice(0,c+1):n=[n[0]];break}}}return n.reduceRight((i,u,h)=>{let y,m=!1,d=null,f=null;r&&(y=o&&u.route.id?o[u.route.id]:void 0,d=u.route.errorElement||lt,s&&(c<0&&h===0?(xe("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,f=null):c===h&&(m=!0,f=u.route.hydrateFallbackElement||null)));let g=t.concat(n.slice(0,h+1)),x=()=>{let p;return y?p=d:m?p=f:u.route.Component?p=l.createElement(u.route.Component,null):u.route.element?p=u.route.element:p=i,l.createElement(st,{match:u,routeContext:{outlet:i,matches:g,isDataRoute:r!=null},children:p})};return r&&(u.route.ErrorBoundary||u.route.errorElement||h===0)?l.createElement(ut,{location:r.location,revalidation:r.revalidation,component:d,error:y,children:x(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):x()},null)}function Z(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ft(e){let t=l.useContext(O);return E(t,Z(e)),t}function dt(e){let t=l.useContext(K);return E(t,Z(e)),t}function ht(e){let t=l.useContext($);return E(t,Z(e)),t}function ee(e){let t=ht(e),r=t.matches[t.matches.length-1];return E(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function mt(){return ee("useRouteId")}function pt(){var a;let e=l.useContext(Q),t=dt("useRouteError"),r=ee("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[r]}function yt(){let{router:e}=ft("useNavigate"),t=ee("useNavigate"),r=l.useRef(!1);return ge(()=>{r.current=!0}),l.useCallback(async(n,o={})=>{b(r.current,ye),r.current&&(typeof n=="number"?e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}var le={};function xe(e,t,r){!t&&!le[e]&&(le[e]=!0,b(!1,r))}l.memo(gt);function gt({routes:e,future:t,state:r}){return ve(e,void 0,r,t)}function vt({basename:e,children:t,initialEntries:r,initialIndex:a}){let n=l.useRef();n.current==null&&(n.current=Ie({initialEntries:r,initialIndex:a,v5Compat:!0}));let o=n.current,[s,c]=l.useState({action:o.action,location:o.location}),i=l.useCallback(u=>{l.startTransition(()=>c(u))},[c]);return l.useLayoutEffect(()=>o.listen(i),[o,i]),l.createElement(xt,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:o})}function we(e){E(!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 xt({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:o=!1}){E(!W(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),c=l.useMemo(()=>({basename:s,navigator:n,static:o,future:{}}),[s,n,o]);typeof r=="string"&&(r=M(r));let{pathname:i="/",search:u="",hash:h="",state:y=null,key:m="default"}=r,d=l.useMemo(()=>{let f=L(i,s);return f==null?null:{location:{pathname:f,search:u,hash:h,state:y,key:m},navigationType:a}},[s,i,u,h,y,m,a]);return b(d!=null,`<Router basename="${s}"> is not able to match the URL "${i}${u}${h}" because it does not start with the basename, so the <Router> won't render anything.`),d==null?null:l.createElement(S.Provider,{value:c},l.createElement(U.Provider,{children:t,value:d}))}function wt({children:e,location:t}){return ot(X(e),t)}function X(e,t=[]){let r=[];return l.Children.forEach(e,(a,n)=>{if(!l.isValidElement(a))return;let o=[...t,n];if(a.type===l.Fragment){r.push.apply(r,X(a.props.children,o));return}E(a.type===we,`[${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>`),E(!a.props.index||!a.props.children,"An index route cannot have child routes.");let s={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&&(s.children=X(a.props.children,o)),r.push(s)}),r}var z="get",j="application/x-www-form-urlencoded";function Y(e){return e!=null&&typeof e.tagName=="string"}function Et(e){return Y(e)&&e.tagName.toLowerCase()==="button"}function Rt(e){return Y(e)&&e.tagName.toLowerCase()==="form"}function Ct(e){return Y(e)&&e.tagName.toLowerCase()==="input"}function bt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Pt(e,t){return e.button===0&&(!t||t==="_self")&&!bt(e)}var _=null;function St(){if(_===null)try{new FormData(document.createElement("form"),0),_=!1}catch{_=!0}return _}var kt=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function G(e){return e!=null&&!kt.has(e)?(b(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${j}"`),null):e}function Lt(e,t){let r,a,n,o,s;if(Rt(e)){let c=e.getAttribute("action");a=c?L(c,t):null,r=e.getAttribute("method")||z,n=G(e.getAttribute("enctype"))||j,o=new FormData(e)}else if(Et(e)||Ct(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let i=e.getAttribute("formaction")||c.getAttribute("action");if(a=i?L(i,t):null,r=e.getAttribute("formmethod")||c.getAttribute("method")||z,n=G(e.getAttribute("formenctype"))||G(c.getAttribute("enctype"))||j,o=new FormData(c,e),!St()){let{name:u,type:h,value:y}=e;if(h==="image"){let m=u?`${u}.`:"";o.append(`${m}x`,"0"),o.append(`${m}y`,"0")}else u&&o.append(u,y)}}else{if(Y(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=z,a=null,n=j,s=e}return o&&n==="text/plain"&&(s=o,o=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:o,body:s}}function te(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function $t(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 It(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 Ft(e,t,r){let a=await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let s=await $t(o,r);return s.links?s.links():[]}return[]}));return Nt(a.flat(1).filter(It).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function ue(e,t,r,a,n,o){let s=(i,u)=>r[u]?i.route.id!==r[u].route.id:!0,c=(i,u)=>{var h;return r[u].pathname!==i.pathname||((h=r[u].route.path)==null?void 0:h.endsWith("*"))&&r[u].params["*"]!==i.params["*"]};return o==="assets"?t.filter((i,u)=>s(i,u)||c(i,u)):o==="data"?t.filter((i,u)=>{var y;let h=a.routes[i.route.id];if(!h||!h.hasLoader)return!1;if(s(i,u)||c(i,u))return!0;if(i.route.shouldRevalidate){let m=i.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:((y=r[0])==null?void 0:y.params)||{},nextUrl:new URL(e,window.origin),nextParams:i.params,defaultShouldRevalidate:!0});if(typeof m=="boolean")return m}return!0}):[]}function Tt(e,t,{includeHydrateFallback:r}={}){return Mt(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 Mt(e){return[...new Set(e)]}function Dt(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function Nt(e,t){let r=new Set;return new Set(t),e.reduce((a,n)=>{let o=JSON.stringify(Dt(n));return r.has(o)||(r.add(o),a.push({key:o,link:n})),a},[])}function Ot(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&&L(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function Ee(){let e=l.useContext(O);return te(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function At(){let e=l.useContext(K);return te(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var re=l.createContext(void 0);re.displayName="FrameworkContext";function Re(){let e=l.useContext(re);return te(e,"You must render this element inside a <HydratedRouter> element"),e}function Bt(e,t){let r=l.useContext(re),[a,n]=l.useState(!1),[o,s]=l.useState(!1),{onFocus:c,onBlur:i,onMouseEnter:u,onMouseLeave:h,onTouchStart:y}=t,m=l.useRef(null);l.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let g=p=>{p.forEach(w=>{s(w.isIntersecting)})},x=new IntersectionObserver(g,{threshold:.5});return m.current&&x.observe(m.current),()=>{x.disconnect()}}},[e]),l.useEffect(()=>{if(a){let g=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(g)}}},[a]);let d=()=>{n(!0)},f=()=>{n(!1),s(!1)};return r?e!=="intent"?[o,m,{}]:[o,m,{onFocus:B(c,d),onBlur:B(i,f),onMouseEnter:B(u,d),onMouseLeave:B(h,f),onTouchStart:B(y,d)}]:[!1,m,{}]}function B(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Ut({page:e,...t}){let{router:r}=Ee(),a=l.useMemo(()=>se(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?l.createElement(Ht,{page:e,matches:a,...t}):null}function Wt(e){let{manifest:t,routeModules:r}=Re(),[a,n]=l.useState([]);return l.useEffect(()=>{let o=!1;return Ft(e,t,r).then(s=>{o||n(s)}),()=>{o=!0}},[e,t,r]),a}function Ht({page:e,matches:t,...r}){let a=D(),{manifest:n,routeModules:o}=Re(),{basename:s}=Ee(),{loaderData:c,matches:i}=At(),u=l.useMemo(()=>ue(e,t,i,n,a,"data"),[e,t,i,n,a]),h=l.useMemo(()=>ue(e,t,i,n,a,"assets"),[e,t,i,n,a]),y=l.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let f=new Set,g=!1;if(t.forEach(p=>{var v;let w=n.routes[p.route.id];!w||!w.hasLoader||(!u.some(R=>R.route.id===p.route.id)&&p.route.id in c&&((v=o[p.route.id])!=null&&v.shouldRevalidate)||w.hasClientLoader?g=!0:f.add(p.route.id))}),f.size===0)return[];let x=Ot(e,s);return g&&f.size>0&&x.searchParams.set("_routes",t.filter(p=>f.has(p.route.id)).map(p=>p.route.id).join(",")),[x.pathname+x.search]},[s,c,a,n,u,t,e,o]),m=l.useMemo(()=>Tt(h,n),[h,n]),d=Wt(h);return l.createElement(l.Fragment,null,y.map(f=>l.createElement("link",{key:f,rel:"prefetch",as:"fetch",href:f,...r})),m.map(f=>l.createElement("link",{key:f,rel:"modulepreload",href:f,...r})),d.map(({key:f,link:g})=>l.createElement("link",{key:f,...g})))}function _t(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Ce=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ce&&(window.__reactRouterVersion="7.5.0")}catch{}var be=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ne=l.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:n,reloadDocument:o,replace:s,state:c,target:i,to:u,preventScrollReset:h,viewTransition:y,...m},d){let{basename:f}=l.useContext(S),g=typeof u=="string"&&be.test(u),x,p=!1;if(typeof u=="string"&&g&&(x=u,Ce))try{let C=new URL(window.location.href),F=u.startsWith("//")?new URL(C.protocol+u):new URL(u),ae=L(F.pathname,f);F.origin===C.origin&&ae!=null?u=ae+F.search+F.hash:p=!0}catch{b(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let w=rt(u,{relative:n}),[v,R,P]=Bt(a,m),N=Vt(u,{replace:s,state:c,target:i,preventScrollReset:h,relative:n,viewTransition:y});function I(C){t&&t(C),C.defaultPrevented||N(C)}let T=l.createElement("a",{...m,...P,href:x||w,onClick:p||o?t:I,ref:_t(d,R),target:i,"data-discover":!g&&r==="render"?"true":void 0});return v&&!g?l.createElement(l.Fragment,null,T,l.createElement(Ut,{page:w})):T});ne.displayName="Link";var Pe=l.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:n=!1,style:o,to:s,viewTransition:c,children:i,...u},h){let y=H(s,{relative:u.relative}),m=D(),d=l.useContext(K),{navigator:f,basename:g}=l.useContext(S),x=d!=null&&Gt(y)&&c===!0,p=f.encodeLocation?f.encodeLocation(y).pathname:y.pathname,w=m.pathname,v=d&&d.navigation&&d.navigation.location?d.navigation.location.pathname:null;r||(w=w.toLowerCase(),v=v?v.toLowerCase():null,p=p.toLowerCase()),v&&g&&(v=L(v,g)||v);const R=p!=="/"&&p.endsWith("/")?p.length-1:p.length;let P=w===p||!n&&w.startsWith(p)&&w.charAt(R)==="/",N=v!=null&&(v===p||!n&&v.startsWith(p)&&v.charAt(p.length)==="/"),I={isActive:P,isPending:N,isTransitioning:x},T=P?t:void 0,C;typeof a=="function"?C=a(I):C=[a,P?"active":null,N?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let F=typeof o=="function"?o(I):o;return l.createElement(ne,{...u,"aria-current":T,className:C,ref:h,style:F,to:s,viewTransition:c},typeof i=="function"?i(I):i)});Pe.displayName="NavLink";var zt=l.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:n,state:o,method:s=z,action:c,onSubmit:i,relative:u,preventScrollReset:h,viewTransition:y,...m},d)=>{let f=Yt(),g=qt(c,{relative:u}),x=s.toLowerCase()==="get"?"get":"post",p=typeof c=="string"&&be.test(c),w=v=>{if(i&&i(v),v.defaultPrevented)return;v.preventDefault();let R=v.nativeEvent.submitter,P=(R==null?void 0:R.getAttribute("formmethod"))||s;f(R||v.currentTarget,{fetcherKey:t,method:P,navigate:r,replace:n,state:o,relative:u,preventScrollReset:h,viewTransition:y})};return l.createElement("form",{ref:d,method:x,action:g,onSubmit:a?i:w,...m,"data-discover":!p&&e==="render"?"true":void 0})});zt.displayName="Form";function jt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Se(e){let t=l.useContext(O);return E(t,jt(e)),t}function Vt(e,{target:t,replace:r,state:a,preventScrollReset:n,relative:o,viewTransition:s}={}){let c=nt(),i=D(),u=H(e,{relative:o});return l.useCallback(h=>{if(Pt(h,t)){h.preventDefault();let y=r!==void 0?r:V(i)===V(u);c(e,{replace:y,state:a,preventScrollReset:n,relative:o,viewTransition:s})}},[i,c,u,r,a,t,e,n,o,s])}var Jt=0,Kt=()=>`__${String(++Jt)}__`;function Yt(){let{router:e}=Se("useSubmit"),{basename:t}=l.useContext(S),r=mt();return l.useCallback(async(a,n={})=>{let{action:o,method:s,encType:c,formData:i,body:u}=Lt(a,t);if(n.navigate===!1){let h=n.fetcherKey||Kt();await e.fetch(h,r,n.action||o,{preventScrollReset:n.preventScrollReset,formData:i,body:u,formMethod:n.method||s,formEncType:n.encType||c,flushSync:n.flushSync})}else await e.navigate(n.action||o,{preventScrollReset:n.preventScrollReset,formData:i,body:u,formMethod:n.method||s,formEncType:n.encType||c,replace:n.replace,state:n.state,fromRouteId:r,flushSync:n.flushSync,viewTransition:n.viewTransition})},[e,t,r])}function qt(e,{relative:t}={}){let{basename:r}=l.useContext(S),a=l.useContext($);E(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),o={...H(e||".",{relative:t})},s=D();if(e==null){o.search=s.search;let c=new URLSearchParams(o.search),i=c.getAll("index");if(i.some(h=>h==="")){c.delete("index"),i.filter(y=>y).forEach(y=>c.append("index",y));let h=c.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:k([r,o.pathname])),V(o)}function Gt(e,t={}){let r=l.useContext(pe);E(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Se("useViewTransitionState"),n=H(e,{relative:t.relative});if(!r.isTransitioning)return!1;let o=L(r.currentLocation.pathname,a)||r.currentLocation.pathname,s=L(r.nextLocation.pathname,a)||r.nextLocation.pathname;return J(n.pathname,s)!=null||J(n.pathname,o)!=null}new TextEncoder;exports.Link=ne;exports.MemoryRouter=vt;exports.NavLink=Pe;exports.Route=we;exports.Routes=wt;
|
|
13
|
-
//# sourceMappingURL=chunk-KNED5TY2-BcFuRn3Q.cjs.map
|