@eliseubatista99/react-scaffold-core 0.1.1 → 0.1.3
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/README.md +21 -21
- package/dist/components/button/button.d.ts +7 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/button/stories/button.stories.d.ts +18 -0
- package/dist/components/drawer/drawer.hook.d.ts +0 -3
- package/dist/components/form/form.d.ts +20 -0
- package/dist/components/form/form.hook.d.ts +8 -0
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/form/stories/form.stories.d.ts +25 -0
- package/dist/components/image/image.d.ts +8 -0
- package/dist/components/image/index.d.ts +1 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/components/inputField/index.d.ts +1 -0
- package/dist/components/inputField/inputField.d.ts +18 -0
- package/dist/components/inputField/stories/inputField.stories.d.ts +20 -0
- package/dist/components/loader/index.d.ts +1 -0
- package/dist/components/loader/loader.d.ts +6 -0
- package/dist/components/loader/stories/loader.stories.d.ts +19 -0
- package/dist/components/loader/stories/setup.d.ts +2 -0
- package/dist/components/pageLayout/index.d.ts +1 -0
- package/dist/components/pageLayout/pageLayout.d.ts +15 -0
- package/dist/components/pageLayout/stories/pageLayout.stories.d.ts +19 -0
- package/dist/components/pageLayout/stories/setup.d.ts +2 -0
- package/dist/components/svgImage/index.d.ts +1 -0
- package/dist/components/svgImage/svgImage.d.ts +14 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useDrag/index.d.ts +1 -0
- package/dist/hooks/useDrag/useDrag.d.ts +17 -0
- package/dist/hooks/usePointer/index.d.ts +1 -0
- package/dist/hooks/usePointer/usePointer.d.ts +8 -0
- package/dist/hooks/useResponsive/useResponsive.d.ts +1 -0
- package/dist/index.cjs.js +24 -6
- package/dist/index.es.js +2684 -1160
- package/package.json +3 -2
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react");function cr(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 p=cr(w);var we={exports:{}},se={};/**
|
|
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
|
|
9
|
+
*/var ut;function fr(){if(ut)return se;ut=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(a,n,i){var o=null;if(i!==void 0&&(o=""+i),n.key!==void 0&&(o=""+n.key),"key"in n){i={};for(var l in n)l!=="key"&&(i[l]=n[l])}else i=n;return n=i.ref,{$$typeof:e,type:a,key:o,ref:n!==void 0?n:null,props:i}}return se.Fragment=t,se.jsx=r,se.jsxs=r,se}var le={};/**
|
|
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
|
|
17
|
+
*/var ct;function dr(){return ct||(ct=1,process.env.NODE_ENV!=="production"&&function(){function e(y){if(y==null)return null;if(typeof y=="function")return y.$$typeof===M?null:y.displayName||y.name||null;if(typeof y=="string")return y;switch(y){case h:return"Fragment";case d:return"Profiler";case v:return"StrictMode";case I:return"Suspense";case O:return"SuspenseList";case $:return"Activity"}if(typeof y=="object")switch(typeof y.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),y.$$typeof){case f:return"Portal";case R:return(y.displayName||"Context")+".Provider";case b:return(y._context.displayName||"Context")+".Consumer";case T:var k=y.render;return y=y.displayName,y||(y=k.displayName||k.name||"",y=y!==""?"ForwardRef("+y+")":"ForwardRef"),y;case C:return k=y.displayName||null,k!==null?k:e(y.type)||"Memo";case z:k=y._payload,y=y._init;try{return e(y(k))}catch{}}return null}function t(y){return""+y}function r(y){try{t(y);var k=!1}catch{k=!0}if(k){k=console;var A=k.error,F=typeof Symbol=="function"&&Symbol.toStringTag&&y[Symbol.toStringTag]||y.constructor.name||"Object";return A.call(k,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",F),t(y)}}function a(y){if(y===h)return"<>";if(typeof y=="object"&&y!==null&&y.$$typeof===z)return"<...>";try{var k=e(y);return k?"<"+k+">":"<...>"}catch{return"<...>"}}function n(){var y=B.A;return y===null?null:y.getOwner()}function i(){return Error("react-stack-top-frame")}function o(y){if(nt.call(y,"key")){var k=Object.getOwnPropertyDescriptor(y,"key").get;if(k&&k.isReactWarning)return!1}return y.key!==void 0}function l(y,k){function A(){at||(at=!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)",k))}A.isReactWarning=!0,Object.defineProperty(y,"key",{get:A,configurable:!0})}function s(){var y=e(this.type);return it[y]||(it[y]=!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.")),y=this.props.ref,y!==void 0?y:null}function u(y,k,A,F,Q,W,je,Ne){return A=W.ref,y={$$typeof:x,type:y,key:k,props:W,_owner:Q},(A!==void 0?A:null)!==null?Object.defineProperty(y,"ref",{enumerable:!1,get:s}):Object.defineProperty(y,"ref",{enumerable:!1,value:null}),y._store={},Object.defineProperty(y._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(y,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(y,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:je}),Object.defineProperty(y,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Ne}),Object.freeze&&(Object.freeze(y.props),Object.freeze(y)),y}function c(y,k,A,F,Q,W,je,Ne){var j=k.children;if(j!==void 0)if(F)if(lr(j)){for(F=0;F<j.length;F++)g(j[F]);Object.freeze&&Object.freeze(j)}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(j);if(nt.call(k,"key")){j=e(y);var te=Object.keys(k).filter(function(ur){return ur!=="key"});F=0<te.length?"{key: someKey, "+te.join(": ..., ")+": ...}":"{key: someKey}",lt[j+F]||(te=0<te.length?"{"+te.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} />`,
|
|
22
|
+
<%s key={someKey} {...props} />`,F,j,te,j),lt[j+F]=!0)}if(j=null,A!==void 0&&(r(A),j=""+A),o(k)&&(r(k.key),j=""+k.key),"key"in k){A={};for(var Me in k)Me!=="key"&&(A[Me]=k[Me])}else A=k;return j&&l(A,typeof y=="function"?y.displayName||y.name||"Unknown":y),u(y,j,W,Q,n(),A,je,Ne)}function g(y){typeof y=="object"&&y!==null&&y.$$typeof===x&&y._store&&(y._store.validated=1)}var m=w,x=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),R=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),M=Symbol.for("react.client.reference"),B=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,nt=Object.prototype.hasOwnProperty,lr=Array.isArray,Fe=console.createTask?console.createTask:function(){return null};m={"react-stack-bottom-frame":function(y){return y()}};var at,it={},ot=m["react-stack-bottom-frame"].bind(m,i)(),st=Fe(a(i)),lt={};le.Fragment=h,le.jsx=function(y,k,A,F,Q){var W=1e4>B.recentlyCreatedOwnerStacks++;return c(y,k,A,!1,F,Q,W?Error("react-stack-top-frame"):ot,W?Fe(a(y)):st)},le.jsxs=function(y,k,A,F,Q){var W=1e4>B.recentlyCreatedOwnerStacks++;return c(y,k,A,!0,F,Q,W?Error("react-stack-top-frame"):ot,W?Fe(a(y)):st)}}()),le}var ft;function hr(){return ft||(ft=1,process.env.NODE_ENV==="production"?we.exports=fr():we.exports=dr()),we.exports}var E=hr();const pr=({children:e,onClick:t,styles:r})=>E.jsx("button",{style:{border:"none",borderRadius:"1000px",background:"#d6d6d6ff",padding:"12px 18px",fontSize:"16px",width:"fit-content",alignItems:"center",justifyContent:"center",display:"flex",flexDirection:"row",...r},onClick:()=>t?.(),children:e}),mr=e=>w.useEffect(e,[]),Pt=()=>{const[e,t]=w.useState({}),[r,a]=w.useState(!1);return w.useEffect(()=>{const n=l=>{t({x:l.clientX,y:l.clientY})},i=l=>{a(!0)},o=l=>{a(!1)};return window.addEventListener("pointermove",n),window.addEventListener("pointerdown",i),window.addEventListener("pointerup",o),()=>{window.removeEventListener("pointermove",n),window.removeEventListener("pointerdown",i),window.removeEventListener("pointerup",o)}},[]),{pointerPosition:e,isPointerDown:r}},Tt=({ref:e,onDrag:t,onDragStart:r,onDragEnd:a})=>{const n=w.useRef(!1),i=w.useRef(!1),{pointerPosition:o,isPointerDown:l}=Pt(),s=w.useRef({isDragging:!1}),u=w.useCallback(f=>{if(!e||!e.current||!s.current)return;const h={...s.current};return h.posY=f.y,h.posX=f.x,s.current.startPosX&&s.current.posX&&(h.distanceX=s.current.startPosX-s.current.posX),s.current.startPosY&&s.current.posY&&(h.distanceY=-(s.current.startPosY-s.current.posY)),h},[]),c=w.useCallback(f=>{f.preventDefault(),f.stopPropagation(),s.current.isDragging=!0,s.current.startPosY=f.clientY,s.current.startPosX=f.clientX;const h=u({x:f.clientX,y:f.clientY});h&&(s.current=h,r?.(h))},[u]),g=w.useCallback(f=>{s.current.isDragging=!1;const h=u(o);h&&(a?.(h),h.startPosX=void 0,h.startPosY=void 0,s.current=h)},[u,o]),m=w.useCallback(f=>{if(console.debug("useDrag > onPointerMove > Is Dragging >",s.current.isDragging),!s.current.isDragging)return;const h=u(o);console.debug("useDrag > onPointerMove > Drag Result >",h),h&&(t?.(h),s.current=h)},[u,o]),x=w.useCallback(async()=>{if(!n.current){for(;!e?.current;)await new Promise(f=>setTimeout(f,300));n.current=!0,e.current.onpointerdown=c,e.current.style.touchAction="none"}},[e?.current,c]);w.useEffect(()=>{x()},[x]),w.useEffect(()=>{m()},[o]),w.useEffect(()=>{l!==i.current&&(i.current=l,l||g())},[l,i.current])},gr=()=>{const e=(r,a)=>{let n=0,i=`${r}?`;for(const o in a){const l=a[o];n>0&&(i=`${i}&`),i=`${i}${o}=${l}`,n++}return i};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},yr=e=>{const t={...It,...e?.breakpointConfiguration},[r,a]=w.useState(dt(t)),n=()=>{a(dt(t))};return w.useEffect(()=>(window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}),[]),w.useMemo(()=>r,[r])},vr=(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",dt=e=>{const t=window.innerWidth,r=window.innerHeight,a=vr(t,e),n=xr(t,e);return{currentWidth:t,currentHeight:r,currentBreakpoint:a,currentSize:n}},br=e=>{const t=e.translations,r=e.language,a=i=>i[r];return{t:i=>t[i]?a(t[i]):i,getTranslation:a}};var ue={},ht;function wr(){if(ht)return ue;ht=1,Object.defineProperty(ue,"__esModule",{value:!0}),ue.parse=o,ue.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,i=(()=>{const m=function(){};return m.prototype=Object.create(null),m})();function o(m,x){const f=new i,h=m.length;if(h<2)return f;const v=x?.decode||c;let d=0;do{const b=m.indexOf("=",d);if(b===-1)break;const R=m.indexOf(";",d),T=R===-1?h:R;if(b>T){d=m.lastIndexOf(";",b-1)+1;continue}const I=l(m,d,b),O=s(m,b,I),C=m.slice(I,O);if(f[C]===void 0){let z=l(m,b+1,T),$=s(m,T,z);const M=v(m.slice(z,$));f[C]=M}d=T+1}while(d<h);return f}function l(m,x,f){do{const h=m.charCodeAt(x);if(h!==32&&h!==9)return x}while(++x<f);return f}function s(m,x,f){for(;x>f;){const h=m.charCodeAt(--x);if(h!==32&&h!==9)return x+1}return f}function u(m,x,f){const h=f?.encode||encodeURIComponent;if(!e.test(m))throw new TypeError(`argument name is invalid: ${m}`);const v=h(x);if(!t.test(v))throw new TypeError(`argument val is invalid: ${x}`);let d=m+"="+v;if(!f)return d;if(f.maxAge!==void 0){if(!Number.isInteger(f.maxAge))throw new TypeError(`option maxAge is invalid: ${f.maxAge}`);d+="; Max-Age="+f.maxAge}if(f.domain){if(!r.test(f.domain))throw new TypeError(`option domain is invalid: ${f.domain}`);d+="; Domain="+f.domain}if(f.path){if(!a.test(f.path))throw new TypeError(`option path is invalid: ${f.path}`);d+="; Path="+f.path}if(f.expires){if(!g(f.expires)||!Number.isFinite(f.expires.valueOf()))throw new TypeError(`option expires is invalid: ${f.expires}`);d+="; Expires="+f.expires.toUTCString()}if(f.httpOnly&&(d+="; HttpOnly"),f.secure&&(d+="; Secure"),f.partitioned&&(d+="; Partitioned"),f.priority)switch(typeof f.priority=="string"?f.priority.toLowerCase():void 0){case"low":d+="; Priority=Low";break;case"medium":d+="; Priority=Medium";break;case"high":d+="; 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":d+="; SameSite=Strict";break;case"lax":d+="; SameSite=Lax";break;case"none":d+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${f.sameSite}`)}return d}function c(m){if(m.indexOf("%")===-1)return m;try{return decodeURIComponent(m)}catch{return m}}function g(m){return n.call(m)==="[object Date]"}return ue}wr();/**
|
|
23
23
|
* react-router v7.6.3
|
|
24
24
|
*
|
|
25
25
|
* Copyright (c) Remix Software Inc.
|
|
@@ -28,6 +28,24 @@ 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 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.
|
|
31
|
+
*/var pt="popstate";function Rr(e={}){function t(a,n){let{pathname:i,search:o,hash:l}=a.location;return Be("",{pathname:i,search:o,hash:l},n.state&&n.state.usr||null,n.state&&n.state.key||"default")}function r(a,n){return typeof n=="string"?n:de(n)}return kr(t,r,null,e)}function L(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function X(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Cr(){return Math.random().toString(36).substring(2,10)}function mt(e,t){return{usr:e.state,key:e.key,idx:t}}function Be(e,t,r=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ae(t):t,state:r,key:t&&t.key||a||Cr()}}function de({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 ae(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 kr(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:i=!1}=a,o=n.history,l="POP",s=null,u=c();u==null&&(u=0,o.replaceState({...o.state,idx:u},""));function c(){return(o.state||{idx:null}).idx}function g(){l="POP";let v=c(),d=v==null?null:v-u;u=v,s&&s({action:l,location:h.location,delta:d})}function m(v,d){l="PUSH";let b=Be(h.location,v,d);u=c()+1;let R=mt(b,u),T=h.createHref(b);try{o.pushState(R,"",T)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;n.location.assign(T)}i&&s&&s({action:l,location:h.location,delta:1})}function x(v,d){l="REPLACE";let b=Be(h.location,v,d);u=c();let R=mt(b,u),T=h.createHref(b);o.replaceState(R,"",T),i&&s&&s({action:l,location:h.location,delta:0})}function f(v){return Er(v)}let h={get action(){return l},get location(){return e(n,o)},listen(v){if(s)throw new Error("A history only accepts one active listener");return n.addEventListener(pt,g),s=v,()=>{n.removeEventListener(pt,g),s=null}},createHref(v){return t(n,v)},createURL:f,encodeLocation(v){let d=f(v);return{pathname:d.pathname,search:d.search,hash:d.hash}},push:m,replace:x,go(v){return o.go(v)}};return h}function Er(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),L(r,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:de(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=r+a),new URL(a,r)}function Ot(e,t,r="/"){return Sr(e,t,r,!1)}function Sr(e,t,r,a){let n=typeof t=="string"?ae(t):t,i=K(n.pathname||"/",r);if(i==null)return null;let o=At(e);Pr(o);let l=null;for(let s=0;l==null&&s<o.length;++s){let u=Nr(i);l=Fr(o[s],u,a)}return l}function At(e,t=[],r=[],a=""){let n=(i,o,l)=>{let s={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};s.relativePath.startsWith("/")&&(L(s.relativePath.startsWith(a),`Absolute route path "${s.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(a.length));let u=J([a,s.relativePath]),c=r.concat(s);i.children&&i.children.length>0&&(L(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),At(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:$r(u,i.index),routesMeta:c})};return e.forEach((i,o)=>{if(i.path===""||!i.path?.includes("?"))n(i,o);else for(let l of Lt(i.path))n(i,o,l)}),t}function Lt(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,n=r.endsWith("?"),i=r.replace(/\?$/,"");if(a.length===0)return n?[i,""]:[i];let o=Lt(a.join("/")),l=[];return l.push(...o.map(s=>s===""?i:[i,s].join("/"))),n&&l.push(...o),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function Pr(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Dr(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var Tr=/^:[\w-]+$/,Ir=3,Or=2,Ar=1,Lr=10,_r=-2,gt=e=>e==="*";function $r(e,t){let r=e.split("/"),a=r.length;return r.some(gt)&&(a+=_r),t&&(a+=Or),r.filter(n=>!gt(n)).reduce((n,i)=>n+(Tr.test(i)?Ir:i===""?Ar:Lr),a)}function Dr(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 Fr(e,t,r=!1){let{routesMeta:a}=e,n={},i="/",o=[];for(let l=0;l<a.length;++l){let s=a[l],u=l===a.length-1,c=i==="/"?t:t.slice(i.length)||"/",g=Ie({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},c),m=s.route;if(!g&&u&&r&&!a[a.length-1].route.index&&(g=Ie({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!g)return null;Object.assign(n,g.params),o.push({params:n,pathname:J([i,g.pathname]),pathnameBase:Ur(J([i,g.pathnameBase])),route:m}),g.pathnameBase!=="/"&&(i=J([i,g.pathnameBase]))}return o}function Ie(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=jr(e.path,e.caseSensitive,e.end),n=t.match(r);if(!n)return null;let i=n[0],o=i.replace(/(.)\/+$/,"$1"),l=n.slice(1);return{params:a.reduce((u,{paramName:c,isOptional:g},m)=>{if(c==="*"){let f=l[m]||"";o=i.slice(0,i.length-f.length).replace(/(.)\/+$/,"$1")}const x=l[m];return g&&!x?u[c]=void 0:u[c]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function jr(e,t=!1,r=!0){X(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,(o,l,s)=>(a.push({paramName:l,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function Nr(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return X(!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 K(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 Mr(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?ae(e):e;return{pathname:r?r.startsWith("/")?r:Hr(r,t):t,search:Br(a),hash:Wr(n)}}function Hr(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 He(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 zr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function _t(e){let t=zr(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function $t(e,t,r,a=!1){let n;typeof e=="string"?n=ae(e):(n={...e},L(!n.pathname||!n.pathname.includes("?"),He("?","pathname","search",n)),L(!n.pathname||!n.pathname.includes("#"),He("#","pathname","hash",n)),L(!n.search||!n.search.includes("#"),He("#","search","hash",n)));let i=e===""||n.pathname==="",o=i?"/":n.pathname,l;if(o==null)l=r;else{let g=t.length-1;if(!a&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),g-=1;n.pathname=m.join("/")}l=g>=0?t[g]:"/"}let s=Mr(n,l),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}var J=e=>e.join("/").replace(/\/\/+/g,"/"),Ur=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Br=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Wr=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Vr(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var Dt=["POST","PUT","PATCH","DELETE"];new Set(Dt);var Yr=["GET",...Dt];new Set(Yr);var ie=p.createContext(null);ie.displayName="DataRouter";var Ae=p.createContext(null);Ae.displayName="DataRouterState";var Ft=p.createContext({isTransitioning:!1});Ft.displayName="ViewTransition";var qr=p.createContext(new Map);qr.displayName="Fetchers";var Xr=p.createContext(null);Xr.displayName="Await";var G=p.createContext(null);G.displayName="Navigation";var ge=p.createContext(null);ge.displayName="Location";var Z=p.createContext({outlet:null,matches:[],isDataRoute:!1});Z.displayName="Route";var Ge=p.createContext(null);Ge.displayName="RouteError";function Gr(e,{relative:t}={}){L(ye(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=p.useContext(G),{hash:n,pathname:i,search:o}=ve(e,{relative:t}),l=i;return r!=="/"&&(l=i==="/"?r:J([r,i])),a.createHref({pathname:l,search:o,hash:n})}function ye(){return p.useContext(ge)!=null}function ee(){return L(ye(),"useLocation() may be used only in the context of a <Router> component."),p.useContext(ge).location}var jt="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Nt(e){p.useContext(G).static||p.useLayoutEffect(e)}function Mt(){let{isDataRoute:e}=p.useContext(Z);return e?un():Jr()}function Jr(){L(ye(),"useNavigate() may be used only in the context of a <Router> component.");let e=p.useContext(ie),{basename:t,navigator:r}=p.useContext(G),{matches:a}=p.useContext(Z),{pathname:n}=ee(),i=JSON.stringify(_t(a)),o=p.useRef(!1);return Nt(()=>{o.current=!0}),p.useCallback((s,u={})=>{if(X(o.current,jt),!o.current)return;if(typeof s=="number"){r.go(s);return}let c=$t(s,JSON.parse(i),n,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:J([t,c.pathname])),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,i,n,e])}p.createContext(null);function ve(e,{relative:t}={}){let{matches:r}=p.useContext(Z),{pathname:a}=ee(),n=JSON.stringify(_t(r));return p.useMemo(()=>$t(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function Kr(e,t){return Ht(e,t)}function Ht(e,t,r,a){L(ye(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=p.useContext(G),{matches:i}=p.useContext(Z),o=i[i.length-1],l=o?o.params:{},s=o?o.pathname:"/",u=o?o.pathnameBase:"/",c=o&&o.route;{let d=c&&c.path||"";zt(s,!c||d.endsWith("*")||d.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${d}">) 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 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;
|
|
33
|
+
Please change the parent <Route path="${d}"> to <Route path="${d==="/"?"*":`${d}/*`}">.`)}let g=ee(),m;if(t){let d=typeof t=="string"?ae(t):t;L(u==="/"||d.pathname?.startsWith(u),`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 "${u}" but pathname "${d.pathname}" was given in the \`location\` prop.`),m=d}else m=g;let x=m.pathname||"/",f=x;if(u!=="/"){let d=u.replace(/^\//,"").split("/");f="/"+x.replace(/^\//,"").split("/").slice(d.length).join("/")}let h=Ot(e,{pathname:f});X(c||h!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),X(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.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 v=rn(h&&h.map(d=>Object.assign({},d,{params:Object.assign({},l,d.params),pathname:J([u,n.encodeLocation?n.encodeLocation(d.pathname).pathname:d.pathname]),pathnameBase:d.pathnameBase==="/"?u:J([u,n.encodeLocation?n.encodeLocation(d.pathnameBase).pathname:d.pathnameBase])})),i,r,a);return t&&v?p.createElement(ge.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...m},navigationType:"POP"}},v):v}function Zr(){let e=ln(),t=Vr(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},i={padding:"2px 4px",backgroundColor:a},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=p.createElement(p.Fragment,null,p.createElement("p",null,"💿 Hey developer 👋"),p.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",p.createElement("code",{style:i},"ErrorBoundary")," or"," ",p.createElement("code",{style:i},"errorElement")," prop on your route.")),p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),r?p.createElement("pre",{style:n},r):null,o)}var Qr=p.createElement(Zr,null),en=class extends p.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?p.createElement(Z.Provider,{value:this.props.routeContext},p.createElement(Ge.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function tn({routeContext:e,match:t,children:r}){let a=p.useContext(ie);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),p.createElement(Z.Provider,{value:e},r)}function rn(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,i=r?.errors;if(i!=null){let s=n.findIndex(u=>u.route.id&&i?.[u.route.id]!==void 0);L(s>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),n=n.slice(0,Math.min(n.length,s+1))}let o=!1,l=-1;if(r)for(let s=0;s<n.length;s++){let u=n[s];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(l=s),u.route.id){let{loaderData:c,errors:g}=r,m=u.route.loader&&!c.hasOwnProperty(u.route.id)&&(!g||g[u.route.id]===void 0);if(u.route.lazy||m){o=!0,l>=0?n=n.slice(0,l+1):n=[n[0]];break}}}return n.reduceRight((s,u,c)=>{let g,m=!1,x=null,f=null;r&&(g=i&&u.route.id?i[u.route.id]:void 0,x=u.route.errorElement||Qr,o&&(l<0&&c===0?(zt("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,f=null):l===c&&(m=!0,f=u.route.hydrateFallbackElement||null)));let h=t.concat(n.slice(0,c+1)),v=()=>{let d;return g?d=x:m?d=f:u.route.Component?d=p.createElement(u.route.Component,null):u.route.element?d=u.route.element:d=s,p.createElement(tn,{match:u,routeContext:{outlet:s,matches:h,isDataRoute:r!=null},children:d})};return r&&(u.route.ErrorBoundary||u.route.errorElement||c===0)?p.createElement(en,{location:r.location,revalidation:r.revalidation,component:x,error:g,children:v(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):v()},null)}function Je(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nn(e){let t=p.useContext(ie);return L(t,Je(e)),t}function an(e){let t=p.useContext(Ae);return L(t,Je(e)),t}function on(e){let t=p.useContext(Z);return L(t,Je(e)),t}function Ke(e){let t=on(e),r=t.matches[t.matches.length-1];return L(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function sn(){return Ke("useRouteId")}function ln(){let e=p.useContext(Ge),t=an("useRouteError"),r=Ke("useRouteError");return e!==void 0?e:t.errors?.[r]}function un(){let{router:e}=nn("useNavigate"),t=Ke("useNavigate"),r=p.useRef(!1);return Nt(()=>{r.current=!0}),p.useCallback(async(n,i={})=>{X(r.current,jt),r.current&&(typeof n=="number"?e.navigate(n):await e.navigate(n,{fromRouteId:t,...i}))},[e,t])}var yt={};function zt(e,t,r){!t&&!yt[e]&&(yt[e]=!0,X(!1,r))}p.memo(cn);function cn({routes:e,future:t,state:r}){return Ht(e,void 0,r,t)}function Ut(e){L(!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 fn({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:i=!1}){L(!ye(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),l=p.useMemo(()=>({basename:o,navigator:n,static:i,future:{}}),[o,n,i]);typeof r=="string"&&(r=ae(r));let{pathname:s="/",search:u="",hash:c="",state:g=null,key:m="default"}=r,x=p.useMemo(()=>{let f=K(s,o);return f==null?null:{location:{pathname:f,search:u,hash:c,state:g,key:m},navigationType:a}},[o,s,u,c,g,m,a]);return X(x!=null,`<Router basename="${o}"> is not able to match the URL "${s}${u}${c}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:p.createElement(G.Provider,{value:l},p.createElement(ge.Provider,{children:t,value:x}))}function dn({children:e,location:t}){return Kr(We(e),t)}function We(e,t=[]){let r=[];return p.Children.forEach(e,(a,n)=>{if(!p.isValidElement(a))return;let i=[...t,n];if(a.type===p.Fragment){r.push.apply(r,We(a.props.children,i));return}L(a.type===Ut,`[${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>`),L(!a.props.index||!a.props.children,"An index route cannot have child routes.");let o={id:a.props.id||i.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&&(o.children=We(a.props.children,i)),r.push(o)}),r}var ke="get",Ee="application/x-www-form-urlencoded";function Le(e){return e!=null&&typeof e.tagName=="string"}function hn(e){return Le(e)&&e.tagName.toLowerCase()==="button"}function pn(e){return Le(e)&&e.tagName.toLowerCase()==="form"}function mn(e){return Le(e)&&e.tagName.toLowerCase()==="input"}function gn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function yn(e,t){return e.button===0&&(!t||t==="_self")&&!gn(e)}var Re=null;function vn(){if(Re===null)try{new FormData(document.createElement("form"),0),Re=!1}catch{Re=!0}return Re}var xn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ze(e){return e!=null&&!xn.has(e)?(X(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ee}"`),null):e}function bn(e,t){let r,a,n,i,o;if(pn(e)){let l=e.getAttribute("action");a=l?K(l,t):null,r=e.getAttribute("method")||ke,n=ze(e.getAttribute("enctype"))||Ee,i=new FormData(e)}else if(hn(e)||mn(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(a=s?K(s,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||ke,n=ze(e.getAttribute("formenctype"))||ze(l.getAttribute("enctype"))||Ee,i=new FormData(l,e),!vn()){let{name:u,type:c,value:g}=e;if(c==="image"){let m=u?`${u}.`:"";i.append(`${m}x`,"0"),i.append(`${m}y`,"0")}else u&&i.append(u,g)}}else{if(Le(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ke,a=null,n=Ee,o=e}return i&&n==="text/plain"&&(o=i,i=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:i,body:o}}function Ze(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function wn(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 Rn(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 Cn(e,t,r){let a=await Promise.all(e.map(async n=>{let i=t.routes[n.route.id];if(i){let o=await wn(i,r);return o.links?o.links():[]}return[]}));return Pn(a.flat(1).filter(Rn).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function vt(e,t,r,a,n,i){let o=(s,u)=>r[u]?s.route.id!==r[u].route.id:!0,l=(s,u)=>r[u].pathname!==s.pathname||r[u].route.path?.endsWith("*")&&r[u].params["*"]!==s.params["*"];return i==="assets"?t.filter((s,u)=>o(s,u)||l(s,u)):i==="data"?t.filter((s,u)=>{let c=a.routes[s.route.id];if(!c||!c.hasLoader)return!1;if(o(s,u)||l(s,u))return!0;if(s.route.shouldRevalidate){let g=s.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function kn(e,t,{includeHydrateFallback:r}={}){return En(e.map(a=>{let n=t.routes[a.route.id];if(!n)return[];let i=[n.module];return n.clientActionModule&&(i=i.concat(n.clientActionModule)),n.clientLoaderModule&&(i=i.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(i=i.concat(n.hydrateFallbackModule)),n.imports&&(i=i.concat(n.imports)),i}).flat(1))}function En(e){return[...new Set(e)]}function Sn(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function Pn(e,t){let r=new Set;return new Set(t),e.reduce((a,n)=>{let i=JSON.stringify(Sn(n));return r.has(i)||(r.add(i),a.push({key:i,link:n})),a},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Tn=new Set([100,101,204,205]);function In(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&&K(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function Bt(){let e=p.useContext(ie);return Ze(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function On(){let e=p.useContext(Ae);return Ze(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Qe=p.createContext(void 0);Qe.displayName="FrameworkContext";function Wt(){let e=p.useContext(Qe);return Ze(e,"You must render this element inside a <HydratedRouter> element"),e}function An(e,t){let r=p.useContext(Qe),[a,n]=p.useState(!1),[i,o]=p.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:c,onTouchStart:g}=t,m=p.useRef(null);p.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let h=d=>{d.forEach(b=>{o(b.isIntersecting)})},v=new IntersectionObserver(h,{threshold:.5});return m.current&&v.observe(m.current),()=>{v.disconnect()}}},[e]),p.useEffect(()=>{if(a){let h=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(h)}}},[a]);let x=()=>{n(!0)},f=()=>{n(!1),o(!1)};return r?e!=="intent"?[i,m,{}]:[i,m,{onFocus:ce(l,x),onBlur:ce(s,f),onMouseEnter:ce(u,x),onMouseLeave:ce(c,f),onTouchStart:ce(g,x)}]:[!1,m,{}]}function ce(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Ln({page:e,...t}){let{router:r}=Bt(),a=p.useMemo(()=>Ot(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?p.createElement($n,{page:e,matches:a,...t}):null}function _n(e){let{manifest:t,routeModules:r}=Wt(),[a,n]=p.useState([]);return p.useEffect(()=>{let i=!1;return Cn(e,t,r).then(o=>{i||n(o)}),()=>{i=!0}},[e,t,r]),a}function $n({page:e,matches:t,...r}){let a=ee(),{manifest:n,routeModules:i}=Wt(),{basename:o}=Bt(),{loaderData:l,matches:s}=On(),u=p.useMemo(()=>vt(e,t,s,n,a,"data"),[e,t,s,n,a]),c=p.useMemo(()=>vt(e,t,s,n,a,"assets"),[e,t,s,n,a]),g=p.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let f=new Set,h=!1;if(t.forEach(d=>{let b=n.routes[d.route.id];!b||!b.hasLoader||(!u.some(R=>R.route.id===d.route.id)&&d.route.id in l&&i[d.route.id]?.shouldRevalidate||b.hasClientLoader?h=!0:f.add(d.route.id))}),f.size===0)return[];let v=In(e,o);return h&&f.size>0&&v.searchParams.set("_routes",t.filter(d=>f.has(d.route.id)).map(d=>d.route.id).join(",")),[v.pathname+v.search]},[o,l,a,n,u,t,e,i]),m=p.useMemo(()=>kn(c,n),[c,n]),x=_n(c);return p.createElement(p.Fragment,null,g.map(f=>p.createElement("link",{key:f,rel:"prefetch",as:"fetch",href:f,...r})),m.map(f=>p.createElement("link",{key:f,rel:"modulepreload",href:f,...r})),x.map(({key:f,link:h})=>p.createElement("link",{key:f,...h})))}function Dn(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Vt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Vt&&(window.__reactRouterVersion="7.6.3")}catch{}function Fn({basename:e,children:t,window:r}){let a=p.useRef();a.current==null&&(a.current=Rr({window:r,v5Compat:!0}));let n=a.current,[i,o]=p.useState({action:n.action,location:n.location}),l=p.useCallback(s=>{p.startTransition(()=>o(s))},[o]);return p.useLayoutEffect(()=>n.listen(l),[n,l]),p.createElement(fn,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n})}var Yt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,qt=p.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:n,reloadDocument:i,replace:o,state:l,target:s,to:u,preventScrollReset:c,viewTransition:g,...m},x){let{basename:f}=p.useContext(G),h=typeof u=="string"&&Yt.test(u),v,d=!1;if(typeof u=="string"&&h&&(v=u,Vt))try{let $=new URL(window.location.href),M=u.startsWith("//")?new URL($.protocol+u):new URL(u),B=K(M.pathname,f);M.origin===$.origin&&B!=null?u=B+M.search+M.hash:d=!0}catch{X(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let b=Gr(u,{relative:n}),[R,T,I]=An(a,m),O=Hn(u,{replace:o,state:l,target:s,preventScrollReset:c,relative:n,viewTransition:g});function C($){t&&t($),$.defaultPrevented||O($)}let z=p.createElement("a",{...m,...I,href:v||b,onClick:d||i?t:C,ref:Dn(x,T),target:s,"data-discover":!h&&r==="render"?"true":void 0});return R&&!h?p.createElement(p.Fragment,null,z,p.createElement(Ln,{page:b})):z});qt.displayName="Link";var jn=p.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:n=!1,style:i,to:o,viewTransition:l,children:s,...u},c){let g=ve(o,{relative:u.relative}),m=ee(),x=p.useContext(Ae),{navigator:f,basename:h}=p.useContext(G),v=x!=null&&Vn(g)&&l===!0,d=f.encodeLocation?f.encodeLocation(g).pathname:g.pathname,b=m.pathname,R=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;r||(b=b.toLowerCase(),R=R?R.toLowerCase():null,d=d.toLowerCase()),R&&h&&(R=K(R,h)||R);const T=d!=="/"&&d.endsWith("/")?d.length-1:d.length;let I=b===d||!n&&b.startsWith(d)&&b.charAt(T)==="/",O=R!=null&&(R===d||!n&&R.startsWith(d)&&R.charAt(d.length)==="/"),C={isActive:I,isPending:O,isTransitioning:v},z=I?t:void 0,$;typeof a=="function"?$=a(C):$=[a,I?"active":null,O?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let M=typeof i=="function"?i(C):i;return p.createElement(qt,{...u,"aria-current":z,className:$,ref:c,style:M,to:o,viewTransition:l},typeof s=="function"?s(C):s)});jn.displayName="NavLink";var Nn=p.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:n,state:i,method:o=ke,action:l,onSubmit:s,relative:u,preventScrollReset:c,viewTransition:g,...m},x)=>{let f=Bn(),h=Wn(l,{relative:u}),v=o.toLowerCase()==="get"?"get":"post",d=typeof l=="string"&&Yt.test(l),b=R=>{if(s&&s(R),R.defaultPrevented)return;R.preventDefault();let T=R.nativeEvent.submitter,I=T?.getAttribute("formmethod")||o;f(T||R.currentTarget,{fetcherKey:t,method:I,navigate:r,replace:n,state:i,relative:u,preventScrollReset:c,viewTransition:g})};return p.createElement("form",{ref:x,method:v,action:h,onSubmit:a?s:b,...m,"data-discover":!d&&e==="render"?"true":void 0})});Nn.displayName="Form";function Mn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Xt(e){let t=p.useContext(ie);return L(t,Mn(e)),t}function Hn(e,{target:t,replace:r,state:a,preventScrollReset:n,relative:i,viewTransition:o}={}){let l=Mt(),s=ee(),u=ve(e,{relative:i});return p.useCallback(c=>{if(yn(c,t)){c.preventDefault();let g=r!==void 0?r:de(s)===de(u);l(e,{replace:g,state:a,preventScrollReset:n,relative:i,viewTransition:o})}},[s,l,u,r,a,t,e,n,i,o])}var zn=0,Un=()=>`__${String(++zn)}__`;function Bn(){let{router:e}=Xt("useSubmit"),{basename:t}=p.useContext(G),r=sn();return p.useCallback(async(a,n={})=>{let{action:i,method:o,encType:l,formData:s,body:u}=bn(a,t);if(n.navigate===!1){let c=n.fetcherKey||Un();await e.fetch(c,r,n.action||i,{preventScrollReset:n.preventScrollReset,formData:s,body:u,formMethod:n.method||o,formEncType:n.encType||l,flushSync:n.flushSync})}else await e.navigate(n.action||i,{preventScrollReset:n.preventScrollReset,formData:s,body:u,formMethod:n.method||o,formEncType:n.encType||l,replace:n.replace,state:n.state,fromRouteId:r,flushSync:n.flushSync,viewTransition:n.viewTransition})},[e,t,r])}function Wn(e,{relative:t}={}){let{basename:r}=p.useContext(G),a=p.useContext(Z);L(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),i={...ve(e||".",{relative:t})},o=ee();if(e==null){i.search=o.search;let l=new URLSearchParams(i.search),s=l.getAll("index");if(s.some(c=>c==="")){l.delete("index"),s.filter(g=>g).forEach(g=>l.append("index",g));let c=l.toString();i.search=c?`?${c}`:""}}return(!e||e===".")&&n.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:J([r,i.pathname])),de(i)}function Vn(e,t={}){let r=p.useContext(Ft);L(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Xt("useViewTransitionState"),n=ve(e,{relative:t.relative});if(!r.isTransitioning)return!1;let i=K(r.currentLocation.pathname,a)||r.currentLocation.pathname,o=K(r.nextLocation.pathname,a)||r.nextLocation.pathname;return Ie(n.pathname,o)!=null||Ie(n.pathname,i)!=null}[...Tn];const Gt=w.createContext({history:[],addToHistory:()=>{},popFromHistory:()=>"",replaceHistory:()=>{}}),Yn=({routes:e,children:t})=>{const r=w.useRef(["/"]),[a,n]=w.useState(["/"]),i=w.useCallback(c=>{r.current=c,n(c)},[]),o=c=>{i([...r.current,c])},l=c=>{let g="",m=[];return r.current.length===0?"/":(r.current.length<=c?(g=r.current[0],m=[g]):(m=r.current.slice(0,r.current.length-c),g=m[m.length-1]),i(m),g)},s=c=>{i(c)},u=e.map(c=>E.jsx(Ut,{path:c.path,element:c.render}));return E.jsx(Gt.Provider,{value:{history:a,addToHistory:o,popFromHistory:l,replaceHistory:s},children:E.jsxs(Fn,{children:[t,E.jsx(dn,{children:u})]})})},qn=()=>{const e=Mt(),t=ee(),r=w.useContext(Gt),a=w.useCallback((o,l=!0)=>{o!==t.pathname&&e(o,{replace:!0}),l&&r.addToHistory(o)},[t.pathname,e,r]),n=w.useCallback(o=>{const l=o||1,s=r.popFromHistory(l);a(s,!1)},[a,r]),i=w.useCallback(o=>{r.replaceHistory(o)},[r]);return{currentPath:t.pathname,history:r.history,goBack:n,goTo:a,replaceHistory:i}},Jt=w.createContext({visibleItems:[],isItemVisible:()=>!1,showItem:()=>{},hideItem:()=>{}}),Xn=({children:e})=>{const t=w.useRef([]),[r,a]=w.useState([]),n=w.useCallback(s=>{t.current=s,a(s)},[]),i=w.useCallback(s=>t.current.some(u=>u===s),[]),o=w.useCallback(s=>{i(s)||n([...t.current,s])},[i,n]),l=w.useCallback(s=>{i(s)&&n(t.current.filter(c=>c!==s))},[i,n]);return E.jsx(Jt.Provider,{value:{visibleItems:r,isItemVisible:i,showItem:o,hideItem:l},children:e})},xe=()=>{const e=w.useContext(Jt),t=n=>e.visibleItems.some(i=>i===n),r=n=>{e.showItem(n)},a=n=>{e.hideItem(n)};return{visibleItems:e.visibleItems,isItemVisible:t,showItem:r,hideItem:a}},Gn=({id:e,onCloseDrawer:t,drawerCloseOffset:r=15})=>{const{isItemVisible:a}=xe(),[n,i]=w.useState({isDragging:!1}),o=w.useRef(null),l=w.useRef(null),s=w.useRef(null),[u,c]=w.useState(0),g=f=>{i(f)},m=f=>{i(f),c(0)};return Tt({ref:s,onDrag:f=>{i(f);const h=l.current?.clientHeight||0;f.distanceY&&(c(f.distanceY<0?0:-f.distanceY),f.distanceY>=h-r&&(t?.(),m(f)))},onDragEnd:m,onDragStart:g}),{isVisible:a(e),drawerParentRef:o,drawerRef:l,drawerBottomDistance:u,handleRef:s}},Jn=e=>{const{children:t,backgroundStyles:r,contentStyles:a,handle:n}=e,{isVisible:i,drawerParentRef:o,drawerRef:l,handleRef:s,drawerBottomDistance:u}=Gn(e);return E.jsx(E.Fragment,{children:i&&E.jsx("div",{ref:o,style:{width:"100%",height:"100%",minHeight:"100vh",left:0,top:0,background:"#00000068",position:"fixed",zIndex:1e3,display:"flex",flexDirection:"column",touchAction:"none",...r},children:E.jsxs("div",{ref:l,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:`${u}px`,...a},onClick:c=>{c.stopPropagation()},children:[E.jsx("div",{ref:s,style:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0px",height:"24px",width:"100%",cursor:"pointer",...n?.styles},children:n?.render}),t]})})})},Kn=({onSubmit:e,fields:t})=>{const r=w.useRef(null),a=w.useCallback(o=>{var l=Object.keys(o.currentTarget.elements),s=Object.values(o.currentTarget.elements),u=[];for(let c=0;c<l.length;c++){const g=l[c];if(t.findIndex(x=>x.name===g)===-1)continue;const m=s[c].value;u.push({name:g,value:m})}return u},[e]),n=w.useCallback(o=>{o.preventDefault();const l=a(o);e?.(l)},[e]);return{ref:r,submitForm:o=>{o.preventDefault(),o.stopPropagation(),r.current&&r.current.requestSubmit()},handleFormSubmission:n}},Zn=e=>{const{fields:t,styles:r,submitButton:a}=e,{ref:n,handleFormSubmission:i,submitForm:o}=Kn(e),l=w.useCallback(()=>t.map(s=>({...s.content,key:s.name})),[t]);return E.jsxs("form",{ref:n,onSubmit:i,style:{width:"100%",display:"flex",flexDirection:"column",gap:"8px",flex:1,...r},children:[l(),E.jsx("div",{onClick:o,style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"center",...a.styles},children:a.content})]})},Qn=({src:e,alt:t="",onClick:r,styles:a})=>E.jsx("img",{src:e,alt:t,style:{overflow:"hidden",position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",objectFit:"cover",...a},onClick:()=>r?.()});function Ve(){return Ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},Ve.apply(null,arguments)}function ea(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function ta(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var ra=function(){function e(r){var a=this;this._insertTag=function(n){var i;a.tags.length===0?a.insertionPoint?i=a.insertionPoint.nextSibling:a.prepend?i=a.container.firstChild:i=a.before:i=a.tags[a.tags.length-1].nextSibling,a.container.insertBefore(n,i),a.tags.push(n)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(a){a.forEach(this._insertTag)},t.insert=function(a){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(ta(this));var n=this.tags[this.tags.length-1];if(this.isSpeedy){var i=ea(n);try{i.insertRule(a,i.cssRules.length)}catch{}}else n.appendChild(document.createTextNode(a));this.ctr++},t.flush=function(){this.tags.forEach(function(a){var n;return(n=a.parentNode)==null?void 0:n.removeChild(a)}),this.tags=[],this.ctr=0},e}(),N="-ms-",Oe="-moz-",S="-webkit-",Kt="comm",et="rule",tt="decl",na="@import",Zt="@keyframes",aa="@layer",ia=Math.abs,_e=String.fromCharCode,oa=Object.assign;function sa(e,t){return D(e,0)^45?(((t<<2^D(e,0))<<2^D(e,1))<<2^D(e,2))<<2^D(e,3):0}function Qt(e){return e.trim()}function la(e,t){return(e=t.exec(e))?e[0]:e}function P(e,t,r){return e.replace(t,r)}function Ye(e,t){return e.indexOf(t)}function D(e,t){return e.charCodeAt(t)|0}function he(e,t,r){return e.slice(t,r)}function V(e){return e.length}function rt(e){return e.length}function Ce(e,t){return t.push(e),e}function ua(e,t){return e.map(t).join("")}var $e=1,ne=1,er=0,H=0,_=0,oe="";function De(e,t,r,a,n,i,o){return{value:e,root:t,parent:r,type:a,props:n,children:i,line:$e,column:ne,length:o,return:""}}function fe(e,t){return oa(De("",null,null,"",null,null,0),e,{length:-e.length},t)}function ca(){return _}function fa(){return _=H>0?D(oe,--H):0,ne--,_===10&&(ne=1,$e--),_}function U(){return _=H<er?D(oe,H++):0,ne++,_===10&&(ne=1,$e++),_}function q(){return D(oe,H)}function Se(){return H}function be(e,t){return he(oe,e,t)}function pe(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function tr(e){return $e=ne=1,er=V(oe=e),H=0,[]}function rr(e){return oe="",e}function Pe(e){return Qt(be(H-1,qe(e===91?e+2:e===40?e+1:e)))}function da(e){for(;(_=q())&&_<33;)U();return pe(e)>2||pe(_)>3?"":" "}function ha(e,t){for(;--t&&U()&&!(_<48||_>102||_>57&&_<65||_>70&&_<97););return be(e,Se()+(t<6&&q()==32&&U()==32))}function qe(e){for(;U();)switch(_){case e:return H;case 34:case 39:e!==34&&e!==39&&qe(_);break;case 40:e===41&&qe(e);break;case 92:U();break}return H}function pa(e,t){for(;U()&&e+_!==57;)if(e+_===84&&q()===47)break;return"/*"+be(t,H-1)+"*"+_e(e===47?e:U())}function ma(e){for(;!pe(q());)U();return be(e,H)}function ga(e){return rr(Te("",null,null,null,[""],e=tr(e),0,[0],e))}function Te(e,t,r,a,n,i,o,l,s){for(var u=0,c=0,g=o,m=0,x=0,f=0,h=1,v=1,d=1,b=0,R="",T=n,I=i,O=a,C=R;v;)switch(f=b,b=U()){case 40:if(f!=108&&D(C,g-1)==58){Ye(C+=P(Pe(b),"&","&\f"),"&\f")!=-1&&(d=-1);break}case 34:case 39:case 91:C+=Pe(b);break;case 9:case 10:case 13:case 32:C+=da(f);break;case 92:C+=ha(Se()-1,7);continue;case 47:switch(q()){case 42:case 47:Ce(ya(pa(U(),Se()),t,r),s);break;default:C+="/"}break;case 123*h:l[u++]=V(C)*d;case 125*h:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+c:d==-1&&(C=P(C,/\f/g,"")),x>0&&V(C)-g&&Ce(x>32?bt(C+";",a,r,g-1):bt(P(C," ","")+";",a,r,g-2),s);break;case 59:C+=";";default:if(Ce(O=xt(C,t,r,u,c,n,l,R,T=[],I=[],g),i),b===123)if(c===0)Te(C,t,O,O,T,i,g,l,I);else switch(m===99&&D(C,3)===110?100:m){case 100:case 108:case 109:case 115:Te(e,O,O,a&&Ce(xt(e,O,O,0,0,n,l,R,n,T=[],g),I),n,I,g,l,a?T:I);break;default:Te(C,O,O,O,[""],I,0,l,I)}}u=c=x=0,h=d=1,R=C="",g=o;break;case 58:g=1+V(C),x=f;default:if(h<1){if(b==123)--h;else if(b==125&&h++==0&&fa()==125)continue}switch(C+=_e(b),b*h){case 38:d=c>0?1:(C+="\f",-1);break;case 44:l[u++]=(V(C)-1)*d,d=1;break;case 64:q()===45&&(C+=Pe(U())),m=q(),c=g=V(R=C+=ma(Se())),b++;break;case 45:f===45&&V(C)==2&&(h=0)}}return i}function xt(e,t,r,a,n,i,o,l,s,u,c){for(var g=n-1,m=n===0?i:[""],x=rt(m),f=0,h=0,v=0;f<a;++f)for(var d=0,b=he(e,g+1,g=ia(h=o[f])),R=e;d<x;++d)(R=Qt(h>0?m[d]+" "+b:P(b,/&\f/g,m[d])))&&(s[v++]=R);return De(e,t,r,n===0?et:l,s,u,c)}function ya(e,t,r){return De(e,t,r,Kt,_e(ca()),he(e,2,-2),0)}function bt(e,t,r,a){return De(e,t,r,tt,he(e,0,a),he(e,a+1,-1),a)}function re(e,t){for(var r="",a=rt(e),n=0;n<a;n++)r+=t(e[n],n,e,t)||"";return r}function va(e,t,r,a){switch(e.type){case aa:if(e.children.length)break;case na:case tt:return e.return=e.return||e.value;case Kt:return"";case Zt:return e.return=e.value+"{"+re(e.children,a)+"}";case et:e.value=e.props.join(",")}return V(r=re(e.children,a))?e.return=e.value+"{"+r+"}":""}function xa(e){var t=rt(e);return function(r,a,n,i){for(var o="",l=0;l<t;l++)o+=e[l](r,a,n,i)||"";return o}}function ba(e){return function(t){t.root||(t=t.return)&&e(t)}}function nr(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var wa=function(t,r,a){for(var n=0,i=0;n=i,i=q(),n===38&&i===12&&(r[a]=1),!pe(i);)U();return be(t,H)},Ra=function(t,r){var a=-1,n=44;do switch(pe(n)){case 0:n===38&&q()===12&&(r[a]=1),t[a]+=wa(H-1,r,a);break;case 2:t[a]+=Pe(n);break;case 4:if(n===44){t[++a]=q()===58?"&\f":"",r[a]=t[a].length;break}default:t[a]+=_e(n)}while(n=U());return t},Ca=function(t,r){return rr(Ra(tr(t),r))},wt=new WeakMap,ka=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,a=t.parent,n=t.column===a.column&&t.line===a.line;a.type!=="rule";)if(a=a.parent,!a)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!wt.get(a))&&!n){wt.set(t,!0);for(var i=[],o=Ca(r,i),l=a.props,s=0,u=0;s<o.length;s++)for(var c=0;c<l.length;c++,u++)t.props[u]=i[s]?o[s].replace(/&\f/g,l[c]):l[c]+" "+o[s]}}},Ea=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function ar(e,t){switch(sa(e,t)){case 5103:return S+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return S+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return S+e+Oe+e+N+e+e;case 6828:case 4268:return S+e+N+e+e;case 6165:return S+e+N+"flex-"+e+e;case 5187:return S+e+P(e,/(\w+).+(:[^]+)/,S+"box-$1$2"+N+"flex-$1$2")+e;case 5443:return S+e+N+"flex-item-"+P(e,/flex-|-self/,"")+e;case 4675:return S+e+N+"flex-line-pack"+P(e,/align-content|flex-|-self/,"")+e;case 5548:return S+e+N+P(e,"shrink","negative")+e;case 5292:return S+e+N+P(e,"basis","preferred-size")+e;case 6060:return S+"box-"+P(e,"-grow","")+S+e+N+P(e,"grow","positive")+e;case 4554:return S+P(e,/([^-])(transform)/g,"$1"+S+"$2")+e;case 6187:return P(P(P(e,/(zoom-|grab)/,S+"$1"),/(image-set)/,S+"$1"),e,"")+e;case 5495:case 3959:return P(e,/(image-set\([^]*)/,S+"$1$`$1");case 4968:return P(P(e,/(.+:)(flex-)?(.*)/,S+"box-pack:$3"+N+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+S+e+e;case 4095:case 3583:case 4068:case 2532:return P(e,/(.+)-inline(.+)/,S+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(V(e)-1-t>6)switch(D(e,t+1)){case 109:if(D(e,t+4)!==45)break;case 102:return P(e,/(.+:)(.+)-([^]+)/,"$1"+S+"$2-$3$1"+Oe+(D(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ye(e,"stretch")?ar(P(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(D(e,t+1)!==115)break;case 6444:switch(D(e,V(e)-3-(~Ye(e,"!important")&&10))){case 107:return P(e,":",":"+S)+e;case 101:return P(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+S+(D(e,14)===45?"inline-":"")+"box$3$1"+S+"$2$3$1"+N+"$2box$3")+e}break;case 5936:switch(D(e,t+11)){case 114:return S+e+N+P(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return S+e+N+P(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return S+e+N+P(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return S+e+N+e+e}return e}var Sa=function(t,r,a,n){if(t.length>-1&&!t.return)switch(t.type){case tt:t.return=ar(t.value,t.length);break;case Zt:return re([fe(t,{value:P(t.value,"@","@"+S)})],n);case et:if(t.length)return ua(t.props,function(i){switch(la(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return re([fe(t,{props:[P(i,/:(read-\w+)/,":"+Oe+"$1")]})],n);case"::placeholder":return re([fe(t,{props:[P(i,/:(plac\w+)/,":"+S+"input-$1")]}),fe(t,{props:[P(i,/:(plac\w+)/,":"+Oe+"$1")]}),fe(t,{props:[P(i,/:(plac\w+)/,N+"input-$1")]})],n)}return""})}},Pa=[Sa],Ta=function(t){var r=t.key;if(r==="css"){var a=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(a,function(h){var v=h.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var n=t.stylisPlugins||Pa,i={},o,l=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(h){for(var v=h.getAttribute("data-emotion").split(" "),d=1;d<v.length;d++)i[v[d]]=!0;l.push(h)});var s,u=[ka,Ea];{var c,g=[va,ba(function(h){c.insert(h)})],m=xa(u.concat(n,g)),x=function(v){return re(ga(v),m)};s=function(v,d,b,R){c=b,x(v?v+"{"+d.styles+"}":d.styles),R&&(f.inserted[d.name]=!0)}}var f={key:r,sheet:new ra({key:r,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:s};return f.sheet.hydrate(l),f},Ia=!0;function Oa(e,t,r){var a="";return r.split(" ").forEach(function(n){e[n]!==void 0?t.push(e[n]+";"):n&&(a+=n+" ")}),a}var ir=function(t,r,a){var n=t.key+"-"+r.name;(a===!1||Ia===!1)&&t.registered[n]===void 0&&(t.registered[n]=r.styles)},Aa=function(t,r,a){ir(t,r,a);var n=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var i=r;do t.insert(r===i?"."+n:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function La(e){for(var t=0,r,a=0,n=e.length;n>=4;++a,n-=4)r=e.charCodeAt(a)&255|(e.charCodeAt(++a)&255)<<8|(e.charCodeAt(++a)&255)<<16|(e.charCodeAt(++a)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(n){case 3:t^=(e.charCodeAt(a+2)&255)<<16;case 2:t^=(e.charCodeAt(a+1)&255)<<8;case 1:t^=e.charCodeAt(a)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var _a={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},$a=/[A-Z]|^ms/g,Da=/_EMO_([^_]+?)_([^]*?)_EMO_/g,or=function(t){return t.charCodeAt(1)===45},Rt=function(t){return t!=null&&typeof t!="boolean"},Ue=nr(function(e){return or(e)?e:e.replace($a,"-$&").toLowerCase()}),Ct=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Da,function(a,n,i){return Y={name:n,styles:i,next:Y},n})}return _a[t]!==1&&!or(t)&&typeof r=="number"&&r!==0?r+"px":r};function me(e,t,r){if(r==null)return"";var a=r;if(a.__emotion_styles!==void 0)return a;switch(typeof r){case"boolean":return"";case"object":{var n=r;if(n.anim===1)return Y={name:n.name,styles:n.styles,next:Y},n.name;var i=r;if(i.styles!==void 0){var o=i.next;if(o!==void 0)for(;o!==void 0;)Y={name:o.name,styles:o.styles,next:Y},o=o.next;var l=i.styles+";";return l}return Fa(e,t,r)}case"function":{if(e!==void 0){var s=Y,u=r(e);return Y=s,me(e,t,u)}break}}var c=r;if(t==null)return c;var g=t[c];return g!==void 0?g:c}function Fa(e,t,r){var a="";if(Array.isArray(r))for(var n=0;n<r.length;n++)a+=me(e,t,r[n])+";";else for(var i in r){var o=r[i];if(typeof o!="object"){var l=o;t!=null&&t[l]!==void 0?a+=i+"{"+t[l]+"}":Rt(l)&&(a+=Ue(i)+":"+Ct(i,l)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var s=0;s<o.length;s++)Rt(o[s])&&(a+=Ue(i)+":"+Ct(i,o[s])+";");else{var u=me(e,t,o);switch(i){case"animation":case"animationName":{a+=Ue(i)+":"+u+";";break}default:a+=i+"{"+u+"}"}}}return a}var kt=/label:\s*([^\s;{]+)\s*(;|$)/g,Y;function ja(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var a=!0,n="";Y=void 0;var i=e[0];if(i==null||i.raw===void 0)a=!1,n+=me(r,t,i);else{var o=i;n+=o[0]}for(var l=1;l<e.length;l++)if(n+=me(r,t,e[l]),a){var s=i;n+=s[l]}kt.lastIndex=0;for(var u="",c;(c=kt.exec(n))!==null;)u+="-"+c[1];var g=La(n)+u;return{name:g,styles:n,next:Y}}var Na=function(t){return t()},Ma=p.useInsertionEffect?p.useInsertionEffect:!1,Ha=Ma||Na,sr=p.createContext(typeof HTMLElement<"u"?Ta({key:"css"}):null);sr.Provider;var za=function(t){return w.forwardRef(function(r,a){var n=w.useContext(sr);return t(r,n,a)})},Ua=p.createContext({}),Ba=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Wa=nr(function(e){return Ba.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Va=Wa,Ya=function(t){return t!=="theme"},Et=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Va:Ya},St=function(t,r,a){var n;if(r){var i=r.shouldForwardProp;n=t.__emotion_forwardProp&&i?function(o){return t.__emotion_forwardProp(o)&&i(o)}:i}return typeof n!="function"&&a&&(n=t.__emotion_forwardProp),n},qa=function(t){var r=t.cache,a=t.serialized,n=t.isStringTag;return ir(r,a,n),Ha(function(){return Aa(r,a,n)}),null},Xa=function e(t,r){var a=t.__emotion_real===t,n=a&&t.__emotion_base||t,i,o;r!==void 0&&(i=r.label,o=r.target);var l=St(t,r,a),s=l||Et(n),u=!s("as");return function(){var c=arguments,g=a&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&g.push("label:"+i+";"),c[0]==null||c[0].raw===void 0)g.push.apply(g,c);else{var m=c[0];g.push(m[0]);for(var x=c.length,f=1;f<x;f++)g.push(c[f],m[f])}var h=za(function(v,d,b){var R=u&&v.as||n,T="",I=[],O=v;if(v.theme==null){O={};for(var C in v)O[C]=v[C];O.theme=p.useContext(Ua)}typeof v.className=="string"?T=Oa(d.registered,I,v.className):v.className!=null&&(T=v.className+" ");var z=ja(g.concat(I),d.registered,O);T+=d.key+"-"+z.name,o!==void 0&&(T+=" "+o);var $=u&&l===void 0?Et(R):s,M={};for(var B in v)u&&B==="as"||$(B)&&(M[B]=v[B]);return M.className=T,b&&(M.ref=b),p.createElement(p.Fragment,null,p.createElement(qa,{cache:d,serialized:z,isStringTag:typeof R=="string"}),p.createElement(R,M))});return h.displayName=i!==void 0?i:"Styled("+(typeof n=="string"?n:n.displayName||n.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=n,h.__emotion_styles=g,h.__emotion_forwardProp=l,Object.defineProperty(h,"toString",{value:function(){return"."+o}}),h.withComponent=function(v,d){var b=e(v,Ve({},r,d,{shouldForwardProp:St(h,d,!0)}));return b.apply(void 0,g)},h}},Ga=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Xe=Xa.bind(null);Ga.forEach(function(e){Xe[e]=Xe(e)});const Ja=Xe.div`
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
font-family: inherit;
|
|
37
|
+
|
|
38
|
+
input:focus {
|
|
39
|
+
border: none;
|
|
40
|
+
outline: none;
|
|
41
|
+
background: none;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
input:autofill {
|
|
45
|
+
background-color: #00000000;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
input:-webkit-autofill {
|
|
49
|
+
background-color: #00000000;
|
|
50
|
+
}
|
|
51
|
+
`,Ka=({name:e,label:t,leftIcon:r,rightIcon:a,bottomMessage:n,placeHolder:i,autoComplete:o="off",value:l,initialValue:s,type:u="text",onChange:c,inputStyles:g,containerProps:m,step:x})=>{const f=h=>{c?.(h.currentTarget.value)};return E.jsxs(Ja,{style:{width:"100%",maxWidth:"357px",gap:"8px",...m},children:[t,E.jsxs("div",{style:{display:"flex",flexDirection:"row",width:"100%",height:"47px",margin:"8px auto 0 auto",border:"2px solid #000000",borderRadius:"5px",padding:"5px 15px",color:"#000000",fontFamily:"Poppins",fontStyle:"normal",fontWeight:400,fontSize:"16px",lineHeight:"24px",outline:"none",alignItems:"center",gap:"10px",...g},children:[r,E.jsx("input",{name:e,type:u,autoComplete:o,step:x,style:{flex:1,border:"none",color:"inherit",fontFamily:"inherit",fontStyle:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",outline:"inherit",background:"none"},placeholder:i,value:l,defaultValue:s,onChange:f}),a]}),n]})},Za=({id:e,styles:t,children:r})=>{const{isItemVisible:a}=xe();return E.jsx(E.Fragment,{children:a(e)&&E.jsx("div",{style:{width:"100%",minHeight:"100%",left:0,top:0,position:"fixed",zIndex:1e3,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",...t},children:r})})},Qa=({id:e,children:t,backgroundStyles:r,contentStyles:a,onClickOutsideModal:n})=>{const{isItemVisible:i}=xe();return E.jsx(E.Fragment,{children:i(e)&&E.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:E.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:o=>{o.stopPropagation()},children:t})})})},ei=({header:e,containerStyles:t,pageStyles:r,children:a,allowScroll:n=!0,footer:i,floatingContent:o})=>E.jsxs("div",{"data-testid":"page-container",style:{minHeight:"100vh",width:"100%",minWidth:"100%",overflow:"hidden",position:"relative",boxSizing:"border-box",top:0,bottom:0,left:0,right:0,display:"flex",flexDirection:"column",...t},children:[E.jsxs("div",{"data-testid":"page-layout",style:{minHeight:"100%",width:"100%",overflowY:n?"auto":"hidden",display:"flex",flexDirection:"column",boxSizing:"border-box"},children:[e&&E.jsx("div",{"data-testid":"page-header",style:{width:"100%",zIndex:99,position:e.visibility==="fixed"?"relative":"fixed",top:0,left:0,right:0,display:"flex",flexDirection:"row",height:"fit-content",boxSizing:"border-box",...e.styles},children:e.content}),E.jsx("div",{style:{width:"100%",flex:1,minHeight:"fit-content",padding:"24px",boxSizing:"border-box",overflowY:n?void 0:"hidden",...r},children:a})]}),i&&E.jsx("div",{"data-testid":"page-footer",style:{width:"100%",zIndex:99,position:i.visibility==="fixed"?"relative":"fixed",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",height:"fit-content",boxSizing:"border-box",...i.styles},children:i.content})]}),ti=({src:e,width:t="22",height:r="28",stroke:a,viewBox:n="0 0 22 28",fill:i="#000000",alt:o="",onClick:l,styles:s})=>E.jsx("div",{style:{width:"fit-content",height:"fit-content",display:"flex",alignItems:"center",justifyContent:"center",...s},onClick:()=>l?.(),children:E.jsx("svg",{width:t,height:r,viewBox:n,fill:i,stroke:a,xmlns:"http://www.w3.org/2000/svg",style:{display:"flex"},children:e})}),ri=({id:e,children:t,styles:r,durationInSeconds:a=3})=>{const n=w.useRef(!1),{isItemVisible:i,hideItem:o}=xe();return w.useEffect(()=>{const l=i(e);n.current!==l&&(n.current=l,l&&setTimeout(()=>o(e),a*1e3))},[n,i,o]),E.jsx(E.Fragment,{children:i(e)&&E.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:l=>{l.stopPropagation()},children:t})})},ni=({overflowEllipsis:e,children:t,styles:r})=>E.jsx("p",{style:{fontFamily:"inherit",maxWidth:"100%",overflow:"hidden",whiteSpace:e?"nowrap":"normal",textOverflow:"ellipsis",fontSize:"16px",fontStyle:"normal",lineHeight:"normal",color:"#000000",...r},children:t});class ai{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 ii{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()}exports.Button=pr;exports.Drawer=Jn;exports.FeedbackProvider=Xn;exports.Form=Zn;exports.Image=Qn;exports.InputField=Ka;exports.Loader=Za;exports.Modal=Qa;exports.NavigationProvider=Yn;exports.PageLayout=ei;exports.ScrollHelper=ai;exports.SvgImage=ti;exports.TextHelper=ii;exports.Toast=ri;exports.Typography=ni;exports.defaultBreakpoints=It;exports.useDidMount=mr;exports.useDrag=Tt;exports.useFeedback=xe;exports.useFetch=gr;exports.useNavigation=qn;exports.usePointer=Pt;exports.useResponsive=yr;exports.useTranslations=br;
|