forstok-ui-lib 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +25 -2
- package/dist/index.js +111 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +111 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -3
- package/rollup.config.js +8 -5
- package/src/assets/stylesheets/bases.styles.ts +62 -0
- package/src/components/index.ts +2 -0
- package/src/components/link/link.styles.ts +162 -0
- package/src/components/link/link.tsx +38 -0
- package/src/components/link/link_route.tsx +21 -0
- package/src/index.ts +1 -2
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from"react";import r,{css as
|
|
1
|
+
import*as e from"react";import t from"react";import r,{css as n}from"styled-components";function o(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}"function"==typeof SuppressedError&&SuppressedError;var a,i={exports:{}},l={};var s,c,u={};
|
|
2
2
|
/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.development.js
|
|
@@ -7,19 +7,125 @@ import e from"react";import r,{css as t}from"styled-components";"function"==type
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/function
|
|
10
|
+
*/function p(){return s||(s=1,"production"!==process.env.NODE_ENV&&function(){function e(t){if(null==t)return null;if("function"==typeof t)return t.$$typeof===F?null:t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case C:return"Fragment";case S:return"Portal";case R:return"Profiler";case E:return"StrictMode";case N:return"Suspense";case T:return"SuspenseList"}if("object"==typeof t)switch("number"==typeof t.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),t.$$typeof){case O:return(t.displayName||"Context")+".Provider";case _:return(t._context.displayName||"Context")+".Consumer";case j:var r=t.render;return(t=t.displayName)||(t=""!==(t=r.displayName||r.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case P:return null!==(r=t.displayName||null)?r:e(t.type)||"Memo";case L:r=t._payload,t=t._init;try{return e(t(r))}catch(e){}}return null}function r(e){return""+e}function n(e){try{r(e);var t=!1}catch(e){t=!0}if(t){var n=(t=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n.call(t,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),r(e)}}function o(){}function a(e){if(void 0===H)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);H=t&&t[1]||"",J=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+H+e+J}function i(e,t){if(!e||Y)return"";var r=V.get(e);if(void 0!==r)return r;Y=!0,r=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var n;n=M.H,M.H=null,function(){if(0===B){m=console.log,v=console.info,y=console.warn,g=console.error,b=console.group,w=console.groupCollapsed,x=console.groupEnd;var e={configurable:!0,enumerable:!0,value:o,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}B++}();try{var i={DetermineComponentFrameRoot:function(){try{if(t){var r=function(){throw Error()};if(Object.defineProperty(r.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(r,[])}catch(e){var n=e}Reflect.construct(e,[],r)}else{try{r.call()}catch(e){n=e}e.call(r.prototype)}}else{try{throw Error()}catch(e){n=e}(r=e())&&"function"==typeof r.catch&&r.catch((function(){}))}}catch(e){if(e&&n&&"string"==typeof e.stack)return[e.stack,n.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=i.DetermineComponentFrameRoot(),c=s[0],u=s[1];if(c&&u){var p=c.split("\n"),d=u.split("\n");for(s=l=0;l<p.length&&!p[l].includes("DetermineComponentFrameRoot");)l++;for(;s<d.length&&!d[s].includes("DetermineComponentFrameRoot");)s++;if(l===p.length||s===d.length)for(l=p.length-1,s=d.length-1;1<=l&&0<=s&&p[l]!==d[s];)s--;for(;1<=l&&0<=s;l--,s--)if(p[l]!==d[s]){if(1!==l||1!==s)do{if(l--,0>--s||p[l]!==d[s]){var f="\n"+p[l].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&V.set(e,f),f}}while(1<=l&&0<=s);break}}}finally{Y=!1,M.H=n,function(){if(0==--B){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:z({},e,{value:m}),info:z({},e,{value:v}),warn:z({},e,{value:y}),error:z({},e,{value:g}),group:z({},e,{value:b}),groupCollapsed:z({},e,{value:w}),groupEnd:z({},e,{value:x})})}0>B&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=r}return p=(p=e?e.displayName||e.name:"")?a(p):"","function"==typeof e&&V.set(e,p),p}function l(e){if(null==e)return"";if("function"==typeof e){var t=e.prototype;return i(e,!(!t||!t.isReactComponent))}if("string"==typeof e)return a(e);switch(e){case N:return a("Suspense");case T:return a("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case j:return e=i(e.render,!1);case P:return l(e.type);case L:t=e._payload,e=e._init;try{return l(e(t))}catch(e){}}return""}function s(){var e=M.A;return null===e?null:e.getOwner()}function c(){var t=e(this.type);return q[t]||(q[t]=!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.")),void 0!==(t=this.props.ref)?t:null}function p(t,r,o,a,i,l){if("string"==typeof t||"function"==typeof t||t===C||t===R||t===E||t===N||t===T||t===D||"object"==typeof t&&null!==t&&(t.$$typeof===L||t.$$typeof===P||t.$$typeof===O||t.$$typeof===_||t.$$typeof===j||t.$$typeof===U||void 0!==t.getModuleId)){var u=r.children;if(void 0!==u)if(a)if(I(u)){for(a=0;a<u.length;a++)d(u[a],t);Object.freeze&&Object.freeze(u)}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 d(u,t)}else u="",(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(u+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),null===t?a="null":I(t)?a="array":void 0!==t&&t.$$typeof===$?(a="<"+(e(t.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):a=typeof t,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",a,u);if(W.call(r,"key")){u=e(t);var p=Object.keys(r).filter((function(e){return"key"!==e}));a=0<p.length?"{key: someKey, "+p.join(": ..., ")+": ...}":"{key: someKey}",G[u+a]||(p=0<p.length?"{"+p.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',a,u,p,u),G[u+a]=!0)}if(u=null,void 0!==o&&(n(o),u=""+o),function(e){if(W.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(r)&&(n(r.key),u=""+r.key),"key"in r)for(var f in o={},r)"key"!==f&&(o[f]=r[f]);else o=r;return u&&function(e,t){function r(){K||(K=!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)",t))}r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}(o,"function"==typeof t?t.displayName||t.name||"Unknown":t),function(e,t,r,n,o,a){return r=a.ref,e={$$typeof:$,type:e,key:t,props:a,_owner:o},null!==(void 0!==r?r:null)?Object.defineProperty(e,"ref",{enumerable:!1,get:c}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(t,u,l,0,s(),o)}function d(e,t){if("object"==typeof e&&e&&e.$$typeof!==X)if(I(e))for(var r=0;r<e.length;r++){var n=e[r];f(n)&&h(n,t)}else if(f(e))e._store&&(e._store.validated=1);else if(null===e||"object"!=typeof e?r=null:r="function"==typeof(r=A&&e[A]||e["@@iterator"])?r:null,"function"==typeof r&&r!==e.entries&&(r=r.call(e))!==e)for(;!(e=r.next()).done;)f(e.value)&&h(e.value,t)}function f(e){return"object"==typeof e&&null!==e&&e.$$typeof===$}function h(t,r){if(t._store&&!t._store.validated&&null==t.key&&(t._store.validated=1,r=function(t){var r="",n=s();return n&&(n=e(n.type))&&(r="\n\nCheck the render method of `"+n+"`."),r||(t=e(t))&&(r="\n\nCheck the top-level render call using <"+t+">."),r}(r),!Q[r])){Q[r]=!0;var n="";t&&null!=t._owner&&t._owner!==s()&&(n=null,"number"==typeof t._owner.tag?n=e(t._owner.type):"string"==typeof t._owner.name&&(n=t._owner.name),n=" It was passed a child from "+n+".");var o=M.getCurrentStack;M.getCurrentStack=function(){var e=l(t.type);return o&&(e+=o()||""),e},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',r,n),M.getCurrentStack=o}}var m,v,y,g,b,w,x,k=t,$=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),O=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),A=Symbol.iterator,F=Symbol.for("react.client.reference"),M=k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=Object.prototype.hasOwnProperty,z=Object.assign,U=Symbol.for("react.client.reference"),I=Array.isArray,B=0;o.__reactDisabledLog=!0;var H,J,K,Y=!1,V=new("function"==typeof WeakMap?WeakMap:Map),X=Symbol.for("react.client.reference"),q={},G={},Q={};u.Fragment=C,u.jsx=function(e,t,r,n,o){return p(e,t,r,!1,0,o)},u.jsxs=function(e,t,r,n,o){return p(e,t,r,!0,0,o)}}()),u}var d=(c||(c=1,"production"===process.env.NODE_ENV?i.exports=function(){if(a)return l;a=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(t,r,n){var o=null;if(void 0!==n&&(o=""+n),void 0!==r.key&&(o=""+r.key),"key"in r)for(var a in n={},r)"key"!==a&&(n[a]=r[a]);else n=r;return r=n.ref,{$$typeof:e,type:t,key:o,ref:void 0!==r?r:null,props:n}}return l.Fragment=t,l.jsx=r,l.jsxs=r,l}():i.exports=p()),i.exports);const f=n`
|
|
11
11
|
overflow: hidden;
|
|
12
12
|
text-overflow: ellipsis;
|
|
13
13
|
white-space: nowrap;
|
|
14
14
|
display: block;
|
|
15
15
|
max-width: 100%;
|
|
16
16
|
width: auto;
|
|
17
|
-
`,
|
|
17
|
+
`,h=r.span`
|
|
18
18
|
display: grid;
|
|
19
19
|
i {
|
|
20
20
|
display: inline-block;
|
|
21
21
|
margin-left: 5px;
|
|
22
22
|
}
|
|
23
|
-
${({$color:e,$elipsis:
|
|
24
|
-
`,
|
|
23
|
+
${({$color:e,$elipsis:t})=>{let r="";return"mute"===e?r+="\n color: var(--mt-clr);\n ":"blue"===e?r+="\n color: var(--pri-clr-lnk__hvr);\n ":"green"===e?r+="\n color: green;\n ":"red"===e?r+="\n color: var(--sta-clr);\n ":"grey"===e||"darkgrey"===e?r+="\n color: var(--mt-clr);\n ":"supergrey"===e?r+="\n color: #929291;\n ":"orange"===e?r+="\n color: orange;\n ":"black"===e?r+="\n color: #000000;\n ":"lightgreen"===e?r+="\n color: #21BA45;\n ":"mate"===e?r+="\n color: #495057;\n ":"initial"===e&&(r+="\n color: var(--pri-clr);\n "),t&&(r+=f),r}}
|
|
24
|
+
`,m=e=>{var{children:t,$color:r,$elipsis:n=!0}=e,a=o(e,["children","$color","$elipsis"]);return d.jsx(h,Object.assign({$elipsis:!!n,$color:r},a,{children:t}))};var v,y={};
|
|
25
|
+
/**
|
|
26
|
+
* react-router v7.1.5
|
|
27
|
+
*
|
|
28
|
+
* Copyright (c) Remix Software Inc.
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the MIT license found in the
|
|
31
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
32
|
+
*
|
|
33
|
+
* @license MIT
|
|
34
|
+
*/
|
|
35
|
+
function g(e,t){if(!1===e||null==e)throw new Error(t)}function b(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function w({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 x(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function k(e,t,r="/"){return function(e,t,r,n){let o="string"==typeof t?x(t):t,a=A(o.pathname||"/",r);if(null==a)return null;let i=$(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]));return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let l=null;for(let e=0;null==l&&e<i.length;++e){let t=D(a);l=P(i[e],t,n)}return l}(e,t,r,!1)}function $(e,t=[],r=[],n=""){let o=(e,o,a)=>{let i={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};i.relativePath.startsWith("/")&&(g(i.relativePath.startsWith(n),`Absolute route path "${i.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),i.relativePath=i.relativePath.slice(n.length));let l=z([n,i.relativePath]),s=r.concat(i);e.children&&e.children.length>0&&(g(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),$(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:T(l,e.index),routesMeta:s})};return e.forEach(((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let r of S(e.path))o(e,t,r);else o(e,t)})),t}function S(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(0===n.length)return o?[a,""]:[a];let i=S(n.join("/")),l=[];return l.push(...i.map((e=>""===e?a:[a,e].join("/")))),o&&l.push(...i),l.map((t=>e.startsWith("/")&&""===t?"/":t))}!function(){if(v)return y;v=1,Object.defineProperty(y,"__esModule",{value:!0}),y.parse=function(e,t){const r=new a,n=e.length;if(n<2)return r;const o=t?.decode||s;let c=0;do{const t=e.indexOf("=",c);if(-1===t)break;const a=e.indexOf(";",c),s=-1===a?n:a;if(t>s){c=e.lastIndexOf(";",t-1)+1;continue}const u=i(e,c,t),p=l(e,t,u),d=e.slice(u,p);if(void 0===r[d]){let n=i(e,t+1,s),a=l(e,s,n);const c=o(e.slice(n,a));r[d]=c}c=s+1}while(c<n);return r},y.serialize=function(a,i,l){const s=l?.encode||encodeURIComponent;if(!e.test(a))throw new TypeError(`argument name is invalid: ${a}`);const c=s(i);if(!t.test(c))throw new TypeError(`argument val is invalid: ${i}`);let u=a+"="+c;if(!l)return u;if(void 0!==l.maxAge){if(!Number.isInteger(l.maxAge))throw new TypeError(`option maxAge is invalid: ${l.maxAge}`);u+="; Max-Age="+l.maxAge}if(l.domain){if(!r.test(l.domain))throw new TypeError(`option domain is invalid: ${l.domain}`);u+="; Domain="+l.domain}if(l.path){if(!n.test(l.path))throw new TypeError(`option path is invalid: ${l.path}`);u+="; Path="+l.path}if(l.expires){if(!function(e){return"[object Date]"===o.call(e)}(l.expires)||!Number.isFinite(l.expires.valueOf()))throw new TypeError(`option expires is invalid: ${l.expires}`);u+="; Expires="+l.expires.toUTCString()}l.httpOnly&&(u+="; HttpOnly");l.secure&&(u+="; Secure");l.partitioned&&(u+="; Partitioned");if(l.priority){switch("string"==typeof l.priority?l.priority.toLowerCase():void 0){case"low":u+="; Priority=Low";break;case"medium":u+="; Priority=Medium";break;case"high":u+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${l.priority}`)}}if(l.sameSite){switch("string"==typeof l.sameSite?l.sameSite.toLowerCase():l.sameSite){case!0:case"strict":u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"none":u+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${l.sameSite}`)}}return 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,n=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,a=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function i(e,t,r){do{const r=e.charCodeAt(t);if(32!==r&&9!==r)return t}while(++t<r);return r}function l(e,t,r){for(;t>r;){const r=e.charCodeAt(--t);if(32!==r&&9!==r)return t+1}return r}function s(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}}();var C=/^:[\w-]+$/,E=3,R=2,_=1,O=10,j=-2,N=e=>"*"===e;function T(e,t){let r=e.split("/"),n=r.length;return r.some(N)&&(n+=j),t&&(n+=R),r.filter((e=>!N(e))).reduce(((e,t)=>e+(C.test(t)?E:""===t?_:O)),n)}function P(e,t,r=!1){let{routesMeta:n}=e,o={},a="/",i=[];for(let e=0;e<n.length;++e){let l=n[e],s=e===n.length-1,c="/"===a?t:t.slice(a.length)||"/",u=L({path:l.relativePath,caseSensitive:l.caseSensitive,end:s},c),p=l.route;if(!u&&s&&r&&!n[n.length-1].route.index&&(u=L({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!u)return null;Object.assign(o,u.params),i.push({params:o,pathname:z([a,u.pathname]),pathnameBase:U(z([a,u.pathnameBase])),route:p}),"/"!==u.pathnameBase&&(a=z([a,u.pathnameBase]))}return i}function L(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t=!1,r=!0){b("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(n.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let a=new RegExp(o,t?void 0:"i");return[a,n]}(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:n.reduce(((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=l[n]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const o=l[n];return e[t]=r&&!o?void 0:(o||"").replace(/%2F/g,"/"),e}),{}),pathname:a,pathnameBase:i,pattern:e}}function D(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return b(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function A(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function F(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. 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 M(e){let t=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t.map(((e,r)=>r===t.length-1?e.pathname:e.pathnameBase))}function W(e,t,r,n=!1){let o;"string"==typeof e?o=x(e):(o={...e},g(!o.pathname||!o.pathname.includes("?"),F("?","pathname","search",o)),g(!o.pathname||!o.pathname.includes("#"),F("#","pathname","hash",o)),g(!o.search||!o.search.includes("#"),F("#","search","hash",o)));let a,i=""===e||""===o.pathname,l=i?"/":o.pathname;if(null==l)a=r;else{let e=t.length-1;if(!n&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let s=function(e,t="/"){let{pathname:r,search:n="",hash:o=""}="string"==typeof e?x(e):e,a=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:a,search:I(n),hash:B(o)}}(o,a),c=l&&"/"!==l&&l.endsWith("/"),u=(i||"."===l)&&r.endsWith("/");return s.pathname.endsWith("/")||!c&&!u||(s.pathname+="/"),s}var z=e=>e.join("/").replace(/\/\/+/g,"/"),U=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),I=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",B=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var H=["POST","PUT","PATCH","DELETE"];new Set(H);var J=["GET",...H];new Set(J);var K=e.createContext(null);K.displayName="DataRouter";var Y=e.createContext(null);Y.displayName="DataRouterState";var V=e.createContext({isTransitioning:!1});V.displayName="ViewTransition",e.createContext(new Map).displayName="Fetchers",e.createContext(null).displayName="Await";var X=e.createContext(null);X.displayName="Navigation";var q=e.createContext(null);q.displayName="Location";var G=e.createContext({outlet:null,matches:[],isDataRoute:!1});G.displayName="Route";var Q=e.createContext(null);function Z(){return null!=e.useContext(q)}function ee(){return g(Z(),"useLocation() may be used only in the context of a <Router> component."),e.useContext(q).location}Q.displayName="RouteError";var te="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function re(t){e.useContext(X).static||e.useLayoutEffect(t)}function ne(){let{isDataRoute:t}=e.useContext(G);return t?function(){let{router:t}=function(t){let r=e.useContext(K);return g(r,ue(t)),r}("useNavigate"),r=pe("useNavigate"),n=e.useRef(!1);return re((()=>{n.current=!0})),e.useCallback((async(e,o={})=>{b(n.current,te),n.current&&("number"==typeof e?t.navigate(e):await t.navigate(e,{fromRouteId:r,...o}))}),[t,r])}():function(){g(Z(),"useNavigate() may be used only in the context of a <Router> component.");let t=e.useContext(K),{basename:r,navigator:n}=e.useContext(X),{matches:o}=e.useContext(G),{pathname:a}=ee(),i=JSON.stringify(M(o)),l=e.useRef(!1);return re((()=>{l.current=!0})),e.useCallback(((e,o={})=>{if(b(l.current,te),!l.current)return;if("number"==typeof e)return void n.go(e);let s=W(e,JSON.parse(i),a,"path"===o.relative);null==t&&"/"!==r&&(s.pathname="/"===s.pathname?r:z([r,s.pathname])),(o.replace?n.replace:n.push)(s,o.state,o)}),[r,n,i,a,t])}()}function oe(t,{relative:r}={}){let{matches:n}=e.useContext(G),{pathname:o}=ee(),a=JSON.stringify(M(n));return e.useMemo((()=>W(t,JSON.parse(a),o,"path"===r)),[t,a,o,r])}function ae(t,r,n,o){g(Z(),"useRoutes() may be used only in the context of a <Router> component.");let a,{navigator:i,static:l}=e.useContext(X),{matches:s}=e.useContext(G),c=s[s.length-1],u=c?c.params:{},p=c?c.pathname:"/",d=c?c.pathnameBase:"/",f=c&&c.route;{let e=f&&f.path||"";fe(p,!f||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}a=ee();let h=a.pathname||"/",m=h;if("/"!==d){let e=d.replace(/^\//,"").split("/");m="/"+h.replace(/^\//,"").split("/").slice(e.length).join("/")}let v=!l&&n&&n.matches&&n.matches.length>0?n.matches:k(t,{pathname:m});b(f||null!=v,`No routes matched location "${a.pathname}${a.search}${a.hash}" `),b(null==v||void 0!==v[v.length-1].route.element||void 0!==v[v.length-1].route.Component||void 0!==v[v.length-1].route.lazy,`Matched leaf route at location "${a.pathname}${a.search}${a.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 y=function(t,r=[],n=null){if(null==t){if(!n)return null;if(n.errors)t=n.matches;else{if(0!==r.length||n.initialized||!(n.matches.length>0))return null;t=n.matches}}let o=t,a=n?.errors;if(null!=a){let e=o.findIndex((e=>e.route.id&&void 0!==a?.[e.route.id]));g(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),o=o.slice(0,Math.min(o.length,e+1))}let i=!1,l=-1;if(n)for(let e=0;e<o.length;e++){let t=o[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:r}=n,a=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||void 0===r[t.route.id]);if(t.route.lazy||a){i=!0,o=l>=0?o.slice(0,l+1):[o[0]];break}}}return o.reduceRight(((t,s,c)=>{let u,p=!1,d=null,f=null;n&&(u=a&&s.route.id?a[s.route.id]:void 0,d=s.route.errorElement||le,i&&(l<0&&0===c?(fe("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,f=null):l===c&&(p=!0,f=s.route.hydrateFallbackElement||null)));let h=r.concat(o.slice(0,c+1)),m=()=>{let r;return r=u?d:p?f:s.route.Component?e.createElement(s.route.Component,null):s.route.element?s.route.element:t,e.createElement(ce,{match:s,routeContext:{outlet:t,matches:h,isDataRoute:null!=n},children:r})};return n&&(s.route.ErrorBoundary||s.route.errorElement||0===c)?e.createElement(se,{location:n.location,revalidation:n.revalidation,component:d,error:u,children:m(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):m()}),null)}(v&&v.map((e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:z([d,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?d:z([d,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),s,n,o);return y}function ie(){let t=function(){let t=e.useContext(Q),r=function(t){let r=e.useContext(Y);return g(r,ue(t)),r}("useRouteError"),n=pe("useRouteError");if(void 0!==t)return t;return r.errors?.[n]}(),r=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,o="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:o},i={padding:"2px 4px",backgroundColor:o},l=null;return console.error("Error handled by React Router default ErrorBoundary:",t),l=e.createElement(e.Fragment,null,e.createElement("p",null,"💿 Hey developer 👋"),e.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",e.createElement("code",{style:i},"ErrorBoundary")," or"," ",e.createElement("code",{style:i},"errorElement")," prop on your route.")),e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},r),n?e.createElement("pre",{style:a},n):null,l)}e.createContext(null);var le=e.createElement(ie,null),se=class extends e.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?e.createElement(G.Provider,{value:this.props.routeContext},e.createElement(Q.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function ce({routeContext:t,match:r,children:n}){let o=e.useContext(K);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),e.createElement(G.Provider,{value:t},n)}function ue(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function pe(t){let r=function(t){let r=e.useContext(G);return g(r,ue(t)),r}(t),n=r.matches[r.matches.length-1];return g(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}var de={};function fe(e,t,r){t||de[e]||(de[e]=!0,b(!1,r))}e.memo((function({routes:e,future:t,state:r}){return ae(e,0,r,t)}));var he="get",me="application/x-www-form-urlencoded";function ve(e){return null!=e&&"string"==typeof e.tagName}var ye=null;var ge=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function be(e){return null==e||ge.has(e)?e:(b(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${me}"`),null)}function we(e,t){let r,n,o,a,i;if(ve(l=e)&&"form"===l.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?A(i,t):null,r=e.getAttribute("method")||he,o=be(e.getAttribute("enctype"))||me,a=new FormData(e)}else if(function(e){return ve(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return ve(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(n=l?A(l,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||he,o=be(e.getAttribute("formenctype"))||be(i.getAttribute("enctype"))||me,a=new FormData(i,e),!function(){if(null===ye)try{new FormData(document.createElement("form"),0),ye=!1}catch(e){ye=!0}return ye}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";a.append(`${e}x`,"0"),a.append(`${e}y`,"0")}else t&&a.append(t,n)}}else{if(ve(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=he,n=null,o=me,i=e}var l;return a&&"text/plain"===o&&(i=a,a=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:a,body:i}}function xe(e,t){if(!1===e||null==e)throw new Error(t)}function ke(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function $e(e,t,r){return function(e,t){let r=new Set;return new Set(t),e.reduce(((e,t)=>{let n=JSON.stringify(function(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}(t));return r.has(n)||(r.add(n),e.push({key:n,link:t})),e}),[])}((await Promise.all(e.map((async e=>{let n=t.routes[e.route.id];if(n){let e=await async function(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(t){if(console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode&&import.meta.hot)throw t;return window.location.reload(),new Promise((()=>{}))}}(n,r);return e.links?e.links():[]}return[]})))).flat(1).filter(ke).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}function Se(e,t,r,n,o,a){let i=(e,t)=>!r[t]||e.route.id!==r[t].route.id,l=(e,t)=>r[t].pathname!==e.pathname||r[t].route.path?.endsWith("*")&&r[t].params["*"]!==e.params["*"];return"assets"===a?t.filter(((e,t)=>i(e,t)||l(e,t))):"data"===a?t.filter(((t,a)=>{let s=n.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(i(t,a)||l(t,a))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0})):[]}function Ce(e,t){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let n=[r.module];return r.imports&&(n=n.concat(r.imports)),n})).flat(1),[...new Set(r)];var r}var Ee=e.createContext(void 0);function Re(){let t=e.useContext(Ee);return xe(t,"You must render this element inside a <HydratedRouter> element"),t}function _e(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Oe({page:t,...r}){let{router:n}=function(){let t=e.useContext(K);return xe(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}(),o=e.useMemo((()=>k(n.routes,t,n.basename)),[n.routes,t,n.basename]);return o?e.createElement(je,{page:t,matches:o,...r}):null}function je({page:t,matches:r,...n}){let o=ee(),{manifest:a,routeModules:i}=Re(),{loaderData:l,matches:s}=function(){let t=e.useContext(Y);return xe(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}(),c=e.useMemo((()=>Se(t,r,s,a,o,"data")),[t,r,s,a,o]),u=e.useMemo((()=>Se(t,r,s,a,o,"assets")),[t,r,s,a,o]),p=e.useMemo((()=>{if(t===o.pathname+o.search+o.hash)return[];let e=new Set,n=!1;if(r.forEach((t=>{let r=a.routes[t.route.id];r&&r.hasLoader&&(!c.some((e=>e.route.id===t.route.id))&&t.route.id in l&&i[t.route.id]?.shouldRevalidate||r.hasClientLoader?n=!0:e.add(t.route.id))})),0===e.size)return[];let s=function(e){let t="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===t.pathname?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}(t);return n&&e.size>0&&s.searchParams.set("_routes",r.filter((t=>e.has(t.route.id))).map((e=>e.route.id)).join(",")),[s.pathname+s.search]}),[l,o,a,c,r,t,i]),d=e.useMemo((()=>Ce(u,a)),[u,a]),f=function(t){let{manifest:r,routeModules:n}=Re(),[o,a]=e.useState([]);return e.useEffect((()=>{let e=!1;return $e(t,r,n).then((t=>{e||a(t)})),()=>{e=!0}}),[t,r,n]),o}(u);return e.createElement(e.Fragment,null,p.map((t=>e.createElement("link",{key:t,rel:"prefetch",as:"fetch",href:t,...n}))),d.map((t=>e.createElement("link",{key:t,rel:"modulepreload",href:t,...n}))),f.map((({key:t,link:r})=>e.createElement("link",{key:t,...r}))))}function Ne(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}Ee.displayName="FrameworkContext";var Te="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Te&&(window.__reactRouterVersion="7.1.5")}catch(e){}var Pe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Le=e.forwardRef((function({onClick:t,discover:r="render",prefetch:n="none",relative:o,reloadDocument:a,replace:i,state:l,target:s,to:c,preventScrollReset:u,viewTransition:p,...d},f){let h,{basename:m}=e.useContext(X),v="string"==typeof c&&Pe.test(c),y=!1;if("string"==typeof c&&v&&(h=c,Te))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),r=A(t.pathname,m);t.origin===e.origin&&null!=r?c=r+t.search+t.hash:y=!0}catch(e){b(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let x=function(t,{relative:r}={}){g(Z(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:o}=e.useContext(X),{hash:a,pathname:i,search:l}=oe(t,{relative:r}),s=i;return"/"!==n&&(s="/"===i?n:z([n,i])),o.createHref({pathname:s,search:l,hash:a})}(c,{relative:o}),[k,$,S]=function(t,r){let n=e.useContext(Ee),[o,a]=e.useState(!1),[i,l]=e.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:u,onMouseLeave:p,onTouchStart:d}=r,f=e.useRef(null);e.useEffect((()=>{if("render"===t&&l(!0),"viewport"===t){let e=new IntersectionObserver((e=>{e.forEach((e=>{l(e.isIntersecting)}))}),{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}}),[t]),e.useEffect((()=>{if(o){let e=setTimeout((()=>{l(!0)}),100);return()=>{clearTimeout(e)}}}),[o]);let h=()=>{a(!0)},m=()=>{a(!1),l(!1)};return n?"intent"!==t?[i,f,{}]:[i,f,{onFocus:_e(s,h),onBlur:_e(c,m),onMouseEnter:_e(u,h),onMouseLeave:_e(p,m),onTouchStart:_e(d,h)}]:[!1,f,{}]}(n,d),C=function(t,{target:r,replace:n,state:o,preventScrollReset:a,relative:i,viewTransition:l}={}){let s=ne(),c=ee(),u=oe(t,{relative:i});return e.useCallback((e=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(e,r)){e.preventDefault();let r=void 0!==n?n:w(c)===w(u);s(t,{replace:r,state:o,preventScrollReset:a,relative:i,viewTransition:l})}}),[c,s,u,n,o,r,t,a,i,l])}(c,{replace:i,state:l,target:s,preventScrollReset:u,relative:o,viewTransition:p});let E=e.createElement("a",{...d,...S,href:h||x,onClick:y||a?t:function(e){t&&t(e),e.defaultPrevented||C(e)},ref:Ne(f,$),target:s,"data-discover":v||"render"!==r?void 0:"true"});return k&&!v?e.createElement(e.Fragment,null,E,e.createElement(Oe,{page:x})):E}));function De(t){let r=e.useContext(K);return g(r,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(t)),r}Le.displayName="Link",e.forwardRef((function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:o=!1,style:a,to:i,viewTransition:l,children:s,...c},u){let p=oe(i,{relative:c.relative}),d=ee(),f=e.useContext(Y),{navigator:h,basename:m}=e.useContext(X),v=null!=f&&function(t,r={}){let n=e.useContext(V);g(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=De("useViewTransitionState"),a=oe(t,{relative:r.relative});if(!n.isTransitioning)return!1;let i=A(n.currentLocation.pathname,o)||n.currentLocation.pathname,l=A(n.nextLocation.pathname,o)||n.nextLocation.pathname;return null!=L(a.pathname,l)||null!=L(a.pathname,i)}(p)&&!0===l,y=h.encodeLocation?h.encodeLocation(p).pathname:p.pathname,b=d.pathname,w=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;r||(b=b.toLowerCase(),w=w?w.toLowerCase():null,y=y.toLowerCase()),w&&m&&(w=A(w,m)||w);const x="/"!==y&&y.endsWith("/")?y.length-1:y.length;let k,$=b===y||!o&&b.startsWith(y)&&"/"===b.charAt(x),S=null!=w&&(w===y||!o&&w.startsWith(y)&&"/"===w.charAt(y.length)),C={isActive:$,isPending:S,isTransitioning:v},E=$?t:void 0;k="function"==typeof n?n(C):[n,$?"active":null,S?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let R="function"==typeof a?a(C):a;return e.createElement(Le,{...c,"aria-current":E,className:k,ref:u,style:R,to:i,viewTransition:l},"function"==typeof s?s(C):s)})).displayName="NavLink",e.forwardRef((({discover:t="render",fetcherKey:r,navigate:n,reloadDocument:o,replace:a,state:i,method:l=he,action:s,onSubmit:c,relative:u,preventScrollReset:p,viewTransition:d,...f},h)=>{let m=function(){let{router:t}=De("useSubmit"),{basename:r}=e.useContext(X),n=pe("useRouteId");return e.useCallback((async(e,o={})=>{let{action:a,method:i,encType:l,formData:s,body:c}=we(e,r);if(!1===o.navigate){let e=o.fetcherKey||Fe();await t.fetch(e,n,o.action||a,{preventScrollReset:o.preventScrollReset,formData:s,body:c,formMethod:o.method||i,formEncType:o.encType||l,flushSync:o.flushSync})}else await t.navigate(o.action||a,{preventScrollReset:o.preventScrollReset,formData:s,body:c,formMethod:o.method||i,formEncType:o.encType||l,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})}),[t,r,n])}(),v=function(t,{relative:r}={}){let{basename:n}=e.useContext(X),o=e.useContext(G);g(o,"useFormAction must be used inside a RouteContext");let[a]=o.matches.slice(-1),i={...oe(t||".",{relative:r})},l=ee();if(null==t){i.search=l.search;let e=new URLSearchParams(i.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let r=e.toString();i.search=r?`?${r}`:""}}t&&"."!==t||!a.route.index||(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(i.pathname="/"===i.pathname?n:z([n,i.pathname]));return w(i)}(s,{relative:u}),y="get"===l.toLowerCase()?"get":"post",b="string"==typeof s&&Pe.test(s);return e.createElement("form",{ref:h,method:y,action:v,onSubmit:o?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,o=t?.getAttribute("formmethod")||l;m(t||e.currentTarget,{fetcherKey:r,method:o,navigate:n,replace:a,state:i,relative:u,preventScrollReset:p,viewTransition:d})},...f,"data-discover":b||"render"!==t?void 0:"true"})})).displayName="Form";var Ae=0,Fe=()=>`__${String(++Ae)}__`;new TextEncoder,n`
|
|
36
|
+
list-style: none;
|
|
37
|
+
padding: 0;
|
|
38
|
+
margin: 0;
|
|
39
|
+
`,n`
|
|
40
|
+
width: 100%;
|
|
41
|
+
`,n`
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
text-overflow: ellipsis;
|
|
44
|
+
white-space: nowrap;
|
|
45
|
+
display: block;
|
|
46
|
+
max-width: 100%;
|
|
47
|
+
width: auto;
|
|
48
|
+
`;const Me=n`
|
|
49
|
+
display: -webkit-box !important;
|
|
50
|
+
-webkit-line-clamp: 2;
|
|
51
|
+
-webkit-box-orient: vertical;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
white-space: pre-wrap;
|
|
54
|
+
overflow-wrap: anywhere;
|
|
55
|
+
word-break: break-all;
|
|
56
|
+
line-height: 16px;
|
|
57
|
+
`;n`
|
|
58
|
+
display: -webkit-box !important;
|
|
59
|
+
-webkit-line-clamp: 3 !important;
|
|
60
|
+
-webkit-box-orient: vertical !important;
|
|
61
|
+
overflow: hidden !important;
|
|
62
|
+
white-space: pre-wrap !important;
|
|
63
|
+
overflow-wrap: anywhere !important;
|
|
64
|
+
word-break: break-word !important;
|
|
65
|
+
line-height: 16px;
|
|
66
|
+
`,n`
|
|
67
|
+
background-color: var(--pri-clr-bg);
|
|
68
|
+
box-shadow: var(--pri-shd-bx);
|
|
69
|
+
border-radius: var(--pri-rd);
|
|
70
|
+
border: 1px solid var(--lay-clr-ln);
|
|
71
|
+
`,n`
|
|
72
|
+
background-color: var(--pri-clr-bg);
|
|
73
|
+
border: 1px solid var(--sec-clr-ln);
|
|
74
|
+
box-shadow: var(--sec-shd-bx);
|
|
75
|
+
border-radius: var(--sec-rd);
|
|
76
|
+
`,n`
|
|
77
|
+
font-size: 12px;
|
|
78
|
+
font-weight: 600;
|
|
79
|
+
letter-spacing: 0.3px;
|
|
80
|
+
text-transform: capitalize;
|
|
81
|
+
`,n`
|
|
82
|
+
color: var(--hd-clr);
|
|
83
|
+
font-weight: 600;
|
|
84
|
+
font-size: 13px;
|
|
85
|
+
text-transform: capitalize;
|
|
86
|
+
`;const We=n`
|
|
87
|
+
color: var(--pri-clr-lnk);
|
|
88
|
+
&,
|
|
89
|
+
&:hover {
|
|
90
|
+
text-decoration: none;
|
|
91
|
+
}
|
|
92
|
+
&:hover {
|
|
93
|
+
color: var(--pri-clr-lnk__hvr);
|
|
94
|
+
}
|
|
95
|
+
`,ze=n`
|
|
96
|
+
color: var(--pri-clr-lnk);
|
|
97
|
+
&,
|
|
98
|
+
&:hover {
|
|
99
|
+
text-decoration: none;
|
|
100
|
+
}
|
|
101
|
+
&:hover {
|
|
102
|
+
color: var(--sec-clr-lnk__hvr);
|
|
103
|
+
}
|
|
104
|
+
`,Ue=n`
|
|
105
|
+
position: relative;
|
|
106
|
+
display: inline-grid;
|
|
107
|
+
padding: 0 16px;
|
|
108
|
+
border-radius: var(--sec-rd);
|
|
109
|
+
outline: none;
|
|
110
|
+
height: 30px;
|
|
111
|
+
align-items: center;
|
|
112
|
+
transform-origin: 100% 0%;
|
|
113
|
+
transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;
|
|
114
|
+
&,
|
|
115
|
+
&:hover {
|
|
116
|
+
text-decoration: none;
|
|
117
|
+
}
|
|
118
|
+
`,Ie=({mode:e,$elipsis:t,$activated:r,$shadow:n,disabled:o})=>{let a="";return"clear"===e?a+=We:"clearR"===e?a+=ze:"blue"===e?a+="\n &, &:hover {\n color: var(--pri-clr-lnk__hvr);\n text-decoration: none;\n }\n ":"trans"===e?a+=Ue+"\n height: auto;\n padding: 0;\n opacity: 1;\n &, \n &:hover { \n color: var(--pri-clr-lnk__hvr);\n text-decoration: none;\n } \n &:hover {\n opacity: .9; \n }\n ":"hover"===e?a+=Ue+"\n height: auto;\n width: max-content;\n padding: 3px 6px;\n position: relative;\n left: -6px;\n color: initial;\n grid-gap: 4px;\n &:hover { \n border-radius: var(--ter-rd);\n box-shadow: 1px 1px var(--pri-clr-ln);\n background-color: var(--mt-clr-bg__fc);\n text-decoration: none;\n }\n ":"whiteB"===e?a+=Ue+"\n color: var(--ter-clr);\n background-color: var(--cl-clr-bg);\n border: 1px solid var(--sec-clr-ln);\n &, \n &:hover { \n background-color: var(--cl-clr-bg__hvr);\n } \n ":"redB"===e?a+=Ue+"\n color: var(--act-clr);\n background-color: var(--act-clr-bg);\n &:hover {\n background-color: var(--act-clr-bg__hvr);\n } \n ":"greyB"===e&&(a+=Ue+"\n color: var(--act-clr);\n background-color: var(--mt-clr-bg__fc);\n &:hover {\n background-color: var(--cl-clr-bg__hvr);\n } \n "),r&&(a+="\n color: var(--sta-clr);\n font-weight: 400;\n ","clear"!==e&&"clearR"!==e||(a+="\n color: var(--pri-clr-lnk__act);\n font-weight: 600;\n ")),t&&(a+=`\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: block;\n max-width: 100%;\n width: auto;\n ${Me}\n `),n&&(a+="\n box-shadow: var(--act-shd-bx);\n "),o&&(a+="\n color: #A9A9A9;\n opacity: 0.7;\n pointer-events: none;\n "),a},Be=r(Le)`
|
|
119
|
+
&._refHoverLink {
|
|
120
|
+
padding: 3px 0px 0px 6px;
|
|
121
|
+
position: relative;
|
|
122
|
+
top: -3px;
|
|
123
|
+
}
|
|
124
|
+
${Ie}
|
|
125
|
+
`,He=r.a`
|
|
126
|
+
${Ie}
|
|
127
|
+
`,Je=r.span`
|
|
128
|
+
cursor:pointer;
|
|
129
|
+
${Ie}
|
|
130
|
+
`,Ke=e=>{var{children:t,mode:r,$activated:n,$elipsis:a,to:i,$shadow:l,disabled:s}=e,c=o(e,["children","mode","$activated","$elipsis","to","$shadow","disabled"]);return d.jsx(Be,Object.assign({className:"_refLink",to:i,mode:r,$activated:!!n,$elipsis:!!a,$shadow:!!l,disabled:!!s},c,{children:t}))},Ye=e=>{var{children:t,mode:r,$activated:n=!1,href:a,to:i,$elipsis:l=!1,$shadow:s=!1,disabled:c=!1}=e,u=o(e,["children","mode","$activated","href","to","$elipsis","$shadow","disabled"]);const{onClick:p}=u;return a?d.jsx(He,Object.assign({className:"_refLink",mode:r,$activated:!!n,$elipsis:!!l,$shadow:!!s,disabled:!!c,href:a},u,{children:t})):i?d.jsx(Ke,Object.assign({to:i,className:"_refLink",mode:r,$activated:n&&!0,$elipsis:!!l,$shadow:!!s,disabled:!!c},u,{children:t})):d.jsx(Je,Object.assign({className:"_refLink",mode:r,$activated:!!n,$elipsis:!!l,$shadow:!!s,disabled:!!c,onClick:p},u,{children:t}))};export{Ye as LinkComponent,m as TextComponent};
|
|
25
131
|
//# sourceMappingURL=index.mjs.map
|