@spencerboucher/switchyard 0.0.0-stage → 0.4.0
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/LICENSE +21 -0
- package/README.md +161 -2
- package/dist/bridge/switchyard-bridge.js +105 -0
- package/dist/switchyard.mjs +18708 -0
- package/package.json +52 -4
- package/web-dist/apple-touch-icon.png +0 -0
- package/web-dist/assets/AutomationView-BhEfjAtI.js +2 -0
- package/web-dist/assets/AutomationView-BhEfjAtI.js.map +1 -0
- package/web-dist/assets/InteractionCard-DxEZUNrD.js +4 -0
- package/web-dist/assets/InteractionCard-DxEZUNrD.js.map +1 -0
- package/web-dist/assets/Markdown-jXkvZeRp.js +31 -0
- package/web-dist/assets/Markdown-jXkvZeRp.js.map +1 -0
- package/web-dist/assets/Menu-C4GUY_ym.js +2 -0
- package/web-dist/assets/Menu-C4GUY_ym.js.map +1 -0
- package/web-dist/assets/Overlay-C-GqmwUn.js +2 -0
- package/web-dist/assets/Overlay-C-GqmwUn.js.map +1 -0
- package/web-dist/assets/SegmentedControl-ChdVilXb.js +2 -0
- package/web-dist/assets/SegmentedControl-ChdVilXb.js.map +1 -0
- package/web-dist/assets/TextArea-BsQHOQMe.js +2 -0
- package/web-dist/assets/TextArea-BsQHOQMe.js.map +1 -0
- package/web-dist/assets/arrow-left-C6YWM6y6.js +2 -0
- package/web-dist/assets/arrow-left-C6YWM6y6.js.map +1 -0
- package/web-dist/assets/attention-Dzqdk9Gz.js +2 -0
- package/web-dist/assets/attention-Dzqdk9Gz.js.map +1 -0
- package/web-dist/assets/automations-DzTTwxBl.js +2 -0
- package/web-dist/assets/automations-DzTTwxBl.js.map +1 -0
- package/web-dist/assets/board-C5mG_8rg.js +10 -0
- package/web-dist/assets/board-C5mG_8rg.js.map +1 -0
- package/web-dist/assets/calendar-clock-B8zE4JsX.js +2 -0
- package/web-dist/assets/calendar-clock-B8zE4JsX.js.map +1 -0
- package/web-dist/assets/chevron-right-evVLS6hq.js +2 -0
- package/web-dist/assets/chevron-right-evVLS6hq.js.map +1 -0
- package/web-dist/assets/code-9shyh1Gw.js +8 -0
- package/web-dist/assets/code-9shyh1Gw.js.map +1 -0
- package/web-dist/assets/copy-oWgGHmkS.js +2 -0
- package/web-dist/assets/copy-oWgGHmkS.js.map +1 -0
- package/web-dist/assets/describe-BbCZVvJP.js +5 -0
- package/web-dist/assets/describe-BbCZVvJP.js.map +1 -0
- package/web-dist/assets/dist-PaQekTP8.js +56 -0
- package/web-dist/assets/dist-PaQekTP8.js.map +1 -0
- package/web-dist/assets/enroll-DWJANJtw.js +2 -0
- package/web-dist/assets/enroll-DWJANJtw.js.map +1 -0
- package/web-dist/assets/external-link-3jjTxo92.js +2 -0
- package/web-dist/assets/external-link-3jjTxo92.js.map +1 -0
- package/web-dist/assets/hand-UPoHamrn.js +2 -0
- package/web-dist/assets/hand-UPoHamrn.js.map +1 -0
- package/web-dist/assets/index-ByiuDoG0.css +2 -0
- package/web-dist/assets/index-afOJ8NRR.js +11 -0
- package/web-dist/assets/index-afOJ8NRR.js.map +1 -0
- package/web-dist/assets/jsx-runtime-D13aM9HY.js +2 -0
- package/web-dist/assets/jsx-runtime-D13aM9HY.js.map +1 -0
- package/web-dist/assets/key-round-VDbE9E4X.js +2 -0
- package/web-dist/assets/key-round-VDbE9E4X.js.map +1 -0
- package/web-dist/assets/link-2-CaMlUDRG.js +2 -0
- package/web-dist/assets/link-2-CaMlUDRG.js.map +1 -0
- package/web-dist/assets/logic-D_Eq9DMW.js +2 -0
- package/web-dist/assets/logic-D_Eq9DMW.js.map +1 -0
- package/web-dist/assets/more-B6qxC6M-.js +2 -0
- package/web-dist/assets/more-B6qxC6M-.js.map +1 -0
- package/web-dist/assets/now-BOWxgbt3.js +2 -0
- package/web-dist/assets/now-BOWxgbt3.js.map +1 -0
- package/web-dist/assets/pencil-DI8QbCN8.js +2 -0
- package/web-dist/assets/pencil-DI8QbCN8.js.map +1 -0
- package/web-dist/assets/play-CjoDg3ws.js +2 -0
- package/web-dist/assets/play-CjoDg3ws.js.map +1 -0
- package/web-dist/assets/plus-BLP-wIYD.js +2 -0
- package/web-dist/assets/plus-BLP-wIYD.js.map +1 -0
- package/web-dist/assets/presence-05bJD5G3.js +2 -0
- package/web-dist/assets/presence-05bJD5G3.js.map +1 -0
- package/web-dist/assets/save-DEvZPWlS.js +2 -0
- package/web-dist/assets/save-DEvZPWlS.js.map +1 -0
- package/web-dist/assets/search-C6cn5WOo.js +2 -0
- package/web-dist/assets/search-C6cn5WOo.js.map +1 -0
- package/web-dist/assets/server-SxFxIScj.js +2 -0
- package/web-dist/assets/server-SxFxIScj.js.map +1 -0
- package/web-dist/assets/settings-BpkmIv_4.js +8 -0
- package/web-dist/assets/settings-BpkmIv_4.js.map +1 -0
- package/web-dist/assets/sliders-horizontal-S3tmwxsP.js +2 -0
- package/web-dist/assets/sliders-horizontal-S3tmwxsP.js.map +1 -0
- package/web-dist/assets/states-DrTQuYXw.js +2 -0
- package/web-dist/assets/states-DrTQuYXw.js.map +1 -0
- package/web-dist/assets/trash-C6X2OLrI.js +2 -0
- package/web-dist/assets/trash-C6X2OLrI.js.map +1 -0
- package/web-dist/assets/useNow-D9Zxr5Jb.js +2 -0
- package/web-dist/assets/useNow-D9Zxr5Jb.js.map +1 -0
- package/web-dist/icon-192.png +0 -0
- package/web-dist/icon-512.png +0 -0
- package/web-dist/icon.svg +12 -0
- package/web-dist/index.html +25 -0
- package/web-dist/manifest.webmanifest +1 -0
- package/web-dist/maskable-512.png +0 -0
- package/web-dist/registerSW.js +1 -0
- package/web-dist/sw.js +2 -0
- package/web-dist/sw.js.map +1 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},ee=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function te(e,t){return E(e.type,t,e.props)}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function O(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?O(``+e.key):t.toString(36)}function ne(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,j(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(k,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=te(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+A(a,u),c+=j(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+A(a,u++),c+=j(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return j(ne(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function M(e,t,n){if(e==null)return e;var r=[],i=0;return j(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function re(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var ie=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function ae(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,ie)}catch(e){ie(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function oe(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else ae(oe.bind(null,e))}var se={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=se,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=oe,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!ee.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)ee.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:re}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ae,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,p=/^[\\/]{2}/;function m(e,t){return t+e.replace(/\\/g,`/`)}var h=`popstate`;function g(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function _(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return S(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:C(t)}return T(t,n,null,e)}function v(e,t){if(e===!1||e==null)throw Error(t)}function y(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function b(){return Math.random().toString(36).substring(2,10)}function x(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function S(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?w(t):t,state:n,key:t&&t.key||r||b(),mask:i}}function C({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function w(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function T(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:_.location,delta:t})}function f(e,t){s=`PUSH`;let r=g(e)?e:S(_.location,e,t);n&&n(r,e),l=u()+1;let d=x(r,l),f=_.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:_.location,delta:1})}function p(e,t){s=`REPLACE`;let r=g(e)?e:S(_.location,e,t);n&&n(r,e),l=u();let i=x(r,l),d=_.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:_.location,delta:0})}function m(e){return ee(i,e)}let _={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(h,d),c=e,()=>{i.removeEventListener(h,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return _}function ee(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),v(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:C(t);return i=i.replace(/ $/,`%20`),!n&&p.test(i)&&(i=r+i),new URL(i,r)}var E=l(d(),1);function te(e,t,n=`/`){return D(e,t,n,!1)}function D(e,t,n,r,i){let a=P((typeof t==`string`?w(t):t).pathname||`/`,n);if(a==null)return null;let o=i??O(e),s=null,c=he(a);for(let e=0;s==null&&e<o.length;++e)s=fe(o[e],c,r);return s}function O(e){let t=k(e);return ne(t),t}function k(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;v(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=F([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(v(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),k(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:ue(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=me(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of A(e.path))a(e,t,!0,n)}),t}function A(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=A(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function ne(e){e.sort((e,t)=>e.score===t.score?de(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var j=/^:[\w-]+$/,M=/^:[\w-]+/,re=3.5,ie=3,ae=2,oe=1,se=10,ce=-2,le=e=>e===`*`;function ue(e,t){let n=e.split(`/`),r=n.length;return n.some(le)&&(r+=ce),t&&(r+=ae),n.filter(e=>!le(e)).reduce((e,t)=>e+(j.test(t)?ie:M.test(t)?re:t===``?oe:se),r)}function de(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function fe(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?pe(u,l,s.matcher,s.compiledParams):N(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=N({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:F([a,d.pathname]),pathnameBase:Ce(F([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=F([a,d.pathnameBase]))}return o}function N(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=me(e.path,e.caseSensitive,e.end);return pe(e,t,n,r)}function pe(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=I(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=I(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function me(e,t=!1,n=!0){y(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 r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/((?:[^/?()[\]*^\\]|\\.)+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function he(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return y(!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 P(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function ge(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?w(e):e,a;return n?(n=Se(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?_e(n.substring(1),`/`):_e(n,t)):a=t,{pathname:a,search:we(r),hash:Te(i)}}function _e(e,t){let n=I(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function ve(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ye(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function be(e){let t=ye(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function xe(e,t,n,r=!1){let i;typeof e==`string`?i=w(e):(i={...e},v(!i.pathname||!i.pathname.includes(`?`),ve(`?`,`pathname`,`search`,i)),v(!i.pathname||!i.pathname.includes(`#`),ve(`#`,`pathname`,`hash`,i)),v(!i.search||!i.search.includes(`#`),ve(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=ge(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Se=e=>e.replace(/[\\/]{2,}/g,`/`),F=e=>Se(e.join(`/`));function I(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var Ce=e=>I(e).replace(/^\/*/,`/`),we=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Te=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Ee=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function De(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Oe(e){return F(e.map(e=>e.route.path).filter(Boolean))||`/`}var ke=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ae(e,t){let n=e;if(typeof n!=`string`||!f.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(ke)try{let e=new URL(window.location.href),r=p.test(n)?new URL(m(n,e.protocol)):new URL(n),a=P(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{y(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var je=new URL(`http://localhost`);function Me(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),je)}catch{return je}}function Ne(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function Pe(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function Fe(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!Ne(i,n),s=!Ne(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!Pe(e,i)||!Ne(i,a)))throw Error(`External navigation is not allowed`)}var Ie=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Ie);var Le=[`GET`,...Ie];new Set(Le);var Re=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function ze(e){try{return Re.includes(new URL(e).protocol)}catch{return!1}}var L=E.createContext(null);L.displayName=`DataRouter`;var Be=E.createContext(null);Be.displayName=`DataRouterState`;var Ve=E.createContext(null);Ve.displayName=`DataRouterData`;var He=E.createContext(null);He.displayName=`DataRouterNavigation`;var Ue=E.createContext(!1);function We(){return E.useContext(Ue)}var Ge=E.createContext({isTransitioning:!1});Ge.displayName=`ViewTransition`;var Ke=E.createContext(null);Ke.displayName=`Fetchers`;var qe=E.createContext(null);qe.displayName=`Await`;var R=E.createContext(null);R.displayName=`Navigation`;var z=E.createContext(null);z.displayName=`Location`;var B=E.createContext({outlet:null,matches:[],isDataRoute:!1});B.displayName=`Route`;var V=E.createContext(!1);V.displayName=`IsDataRoute`;var H=E.createContext(void 0);H.displayName=`RouteId`;var Je=E.createContext(null);Je.displayName=`RouteError`;var Ye=`REACT_ROUTER_ERROR`,Xe=`REDIRECT`,Ze=`ROUTE_ERROR_RESPONSE`;function Qe(e){if(e.startsWith(`${Ye}:${Xe}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function $e(e){if(e.startsWith(`${Ye}:${Ze}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Ee(t.status,t.statusText,t.data)}catch{}}function et(e,{relative:t}={}){v(U(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=E.useContext(R),{hash:i,pathname:a,search:o}=K(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:F([n,a])),r.createHref({pathname:s,search:o,hash:i})}function U(){return E.useContext(z)!=null}function W(){return v(U(),`useLocation() may be used only in the context of a <Router> component.`),E.useContext(z).location}function tt(e){v(U(),`useMatch() may be used only in the context of a <Router> component.`);let{pathname:t}=W();return E.useMemo(()=>N(e,he(t)),[t,e])}var nt=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function G(){return E.useContext(V)?xt():rt()}function rt(){v(U(),`useNavigate() may be used only in the context of a <Router> component.`);let e=E.useContext(L),{basename:t,navigator:n}=E.useContext(R),{matches:r}=E.useContext(B),{pathname:i}=W(),a=JSON.stringify(be(r)),o=E.useRef(!1);return E.useLayoutEffect(()=>{o.current=!0}),E.useCallback((r,s={})=>{if(y(o.current,nt),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=xe(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:F([t,c.pathname])),Fe(typeof r==`string`?r:C(r),n.createHref(c),Me(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var it=E.createContext(null);function at(e){let t=E.useContext(B).outlet;return E.useMemo(()=>t&&E.createElement(it.Provider,{value:e},t),[t,e])}function ot(){let{matches:e}=E.useContext(B);return e[e.length-1]?.params??{}}function K(e,{relative:t}={}){let{matches:n}=E.useContext(B),{pathname:r}=W(),i=JSON.stringify(be(n));return E.useMemo(()=>xe(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function st(e,t){return ct(e,t)}function ct(e,t,n){v(U(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=E.useContext(R),{matches:i}=E.useContext(B),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=W(),l;if(t){let e=typeof t==`string`?w(t):t;v(s===`/`||e.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 "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f;f=n?n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):n.router.match(n.state.location):te(e,{pathname:d});let p=ht(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:F([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:F([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?E.createElement(z.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function lt(){let e=bt(),t=De(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return E.createElement(E.Fragment,null,E.createElement(`h2`,null,`Unexpected Application Error!`),E.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?E.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var ut=E.createElement(lt,null),dt=class extends E.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=Ue;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?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=$e(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:E.createElement(B.Provider,{value:this.props.routeContext},E.createElement(V.Provider,{value:this.props.routeContext.isDataRoute},E.createElement(H.Provider,{value:this.props.routeContext.matches[this.props.routeContext.matches.length-1]?.route.id},E.createElement(Je.Provider,{value:e,children:this.props.component}))));return this.context?E.createElement(pt,{error:e},t):t}},ft=new WeakMap;function pt({children:e,error:t}){let{basename:n,navigator:r}=E.useContext(R);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Qe(t.digest);if(e){let i=ft.get(t);if(i)throw i;let a=Ae(e.location,n),o=a.absoluteURL||a.to;if(Fe(e.location,o,Me(r),`allow-explicit`),ze(o))throw Error(`Invalid redirect location`);if(ke&&!ft.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw ft.set(t,n),n}}return E.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function mt({routeContext:e,match:t,children:n}){let r=E.useContext(L);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),E.createElement(B.Provider,{value:e},E.createElement(V.Provider,{value:e.isDataRoute},E.createElement(H.Provider,{value:t.route.id},n)))}function ht(e,t=[],n){let r=n?.state;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 i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);v(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Oe(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||ut,o&&(s<0&&c===0?(Ct(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?E.createElement(n.route.Component,null):n.route.element?n.route.element:e,E.createElement(mt,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?E.createElement(dt,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function gt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function q(e){let t=E.useContext(L);return v(t,gt(e)),t}function _t(e){let t=E.useContext(Be);return v(t,gt(e)),t}function vt(e){let t=E.useContext(Ve);return v(t,gt(e)),t}function yt(e){let t=E.useContext(H);return v(t,`${e} can only be used on routes that contain a unique "id"`),t}function bt(){let e=E.useContext(Je),t=vt(`useRouteError`),n=yt(`useRouteError`);return e===void 0?t.errors?.[n]:e}function xt(){let{router:e}=q(`useNavigate`),t=yt(`useNavigate`),n=E.useRef(!1);return E.useLayoutEffect(()=>{n.current=!0}),E.useCallback(async(r,i={})=>{y(n.current,nt),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var St={};function Ct(e,t,n){!t&&!St[e]&&(St[e]=!0,y(!1,n))}function wt(e,t){if(e===!1||e==null)throw Error(t)}function Tt(e,t,n){let r=typeof e==`string`?new URL(e,n??(typeof window>`u`?`server://singlefetch/`:window.location.origin)):new URL(e);return n&&r.origin!==n&&(r=new URL(r.pathname+r.search+r.hash,n)),r.pathname.endsWith(`/`)?r.pathname=`${r.pathname}_.${t}`:r.pathname=`${r.pathname}.${t}`,r}async function Et(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Dt(e){return e!=null&&typeof e.page==`string`}function Ot(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 kt(e,t,n){return Pt((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Et(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Ot).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function At(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function jt(e,t,{includeHydrateFallback:n}={}){return Mt(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Mt(e){return[...new Set(e)]}function Nt(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Pt(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Dt(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Nt(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}var J=E.createContext(void 0);J.displayName=`FrameworkContext`;function Y(){let e=E.useContext(J);return wt(e,`You must render this element inside a <HydratedRouter> element`),e}function Ft(e,t){let n=E.useContext(J),[r,i]=E.useState(!1),[a,o]=E.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=E.useRef(null);E.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),E.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:X(s,p),onBlur:X(c,m),onMouseEnter:X(l,p),onMouseLeave:X(u,m),onTouchStart:X(d,p)}]:[a,f,{}]:[!1,f,{}]}function X(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function It({page:e,...t}){let n=We(),{nonce:r}=Y(),{router:i}=q(`PrefetchPageLinks`),a=E.useMemo(()=>i.match(e),[i,i.routes,e]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?E.createElement(Rt,{page:e,matches:a,...t}):E.createElement(zt,{page:e,matches:a,...t})):null}function Lt(e){let{manifest:t,routeModules:n}=Y(),[r,i]=E.useState([]);return E.useEffect(()=>{let r=!1;return kt(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Rt({page:e,matches:t,...n}){let r=W(),{unstable_apiServerOrigin:i}=Y(),a=E.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Tt(e,`rsc`,i),a=!1,o=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?a=!0:o.push(e.route.id);return a&&o.length>0&&n.searchParams.set(`_routes`,o.join(`,`)),[i?n.toString():n.pathname+n.search]},[e,r,t,i]);return E.createElement(E.Fragment,null,a.map(e=>E.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function zt({page:e,matches:t,...n}){let r=W(),{manifest:i,routeModules:a,unstable_apiServerOrigin:o}=Y(),{matches:s}=_t(`PrefetchPageLinks`),{loaderData:c}=vt(`PrefetchPageLinks`),l=E.useMemo(()=>At(e,t,s,i,r,`data`),[e,t,s,i,r]),u=E.useMemo(()=>At(e,t,s,i,r,`assets`),[e,t,s,i,r]),d=E.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];t&&t.hasLoader&&(!l.some(t=>t.route.id===e.route.id)&&e.route.id in c&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let u=Tt(e,`data`,o);return s&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[o?u.toString():u.pathname+u.search]},[c,r,i,l,t,e,a,o]),f=E.useMemo(()=>jt(u,i),[u,i]),p=Lt(u);return E.createElement(E.Fragment,null,d.map(e=>E.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),f.map(e=>E.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),p.map(({key:e,link:t})=>E.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Bt(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}E.memo(Vt);function Vt({routes:e,manifest:t,state:n,isStatic:r,onError:i}){let a=E.useContext(L);v(a,`You must render this element inside a <DataRouterContext.Provider> element`);let o=E.useContext(J)?.routeDiscoveryRuntime;return E.useEffect(()=>{n.initialized&&o?.markReady()},[n.initialized,o]),ct(e,void 0,{router:a.router,manifest:t,state:n,isStatic:r,onError:i})}function Ht({to:e,replace:t,state:n,relative:r}){v(U(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i,navigator:a}=E.useContext(R);y(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:o}=E.useContext(B),{pathname:s}=W(),c=G(),l=xe(e,be(o),s,r===`path`);Fe(typeof e==`string`?e:C(e),a.createHref(l),Me(a),`reject`);let u=JSON.stringify(l);return E.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function Ut(e){return at(e.context)}function Wt(e){v(!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 Gt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){v(!U(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=E.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=w(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=E.useMemo(()=>{let e=P(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return y(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:E.createElement(R.Provider,{value:c},E.createElement(z.Provider,{children:t,value:h}))}function Kt({children:e,location:t}){return st(qt(e),t)}E.Component;function qt(e,t=[]){let n=[];return E.Children.forEach(e,(e,r)=>{if(!E.isValidElement(e))return;let i=[...t,r];if(e.type===E.Fragment){n.push.apply(n,qt(e.props.children,i));return}v(e.type===Wt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`);let a=e.props;v(!a.index||!a.children,`An index route cannot have child routes.`);let o={id:a.id||i.join(`-`),caseSensitive:a.caseSensitive,element:a.element,Component:a.Component,index:a.index,path:a.path,middleware:a.middleware,loader:a.loader,action:a.action,hydrateFallbackElement:a.hydrateFallbackElement,HydrateFallback:a.HydrateFallback,errorElement:a.errorElement,ErrorBoundary:a.ErrorBoundary,shouldRevalidate:a.shouldRevalidate,handle:a.handle,lazy:a.lazy};a.children&&(o.children=qt(a.children,i)),n.push(o)}),n}var Z=`application/x-www-form-urlencoded`;function Q(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Jt(e){return Q(e)&&e.tagName.toLowerCase()===`button`}function Yt(e){return Q(e)&&e.tagName.toLowerCase()===`form`}function Xt(e){return Q(e)&&e.tagName.toLowerCase()===`input`}function Zt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Qt(e,t){return e.button===0&&(!t||t===`_self`)&&!Zt(e)}function $t(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function en(e,t){let n=$t(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var tn=null;function nn(){if(tn===null)try{new FormData(document.createElement(`form`),0),tn=!1}catch{tn=!0}return tn}var rn=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function an(e){return e!=null&&!rn.has(e)?(y(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Z}"`),null):e}function on(e,t){let n,r,i,a,o;if(Yt(e)){let o=e.getAttribute(`action`);r=o?P(o,t):null,n=e.getAttribute(`method`)||`get`,i=an(e.getAttribute(`enctype`))||Z,a=new FormData(e)}else if(Jt(e)||Xt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?P(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=an(e.getAttribute(`formenctype`))||an(o.getAttribute(`enctype`))||Z,a=new FormData(o,e),!nn()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Q(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=Z,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}var sn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{sn&&(window.__reactRouterVersion=`8`)}catch{}function cn({basename:e,children:t,useTransitions:n,window:r}){let i=E.useRef(null);i.current??=_({window:r,v5Compat:!0});let a=i.current,[o,s]=E.useState({action:a.action,location:a.location}),c=E.useCallback(e=>{n===!1?s(e):E.startTransition(()=>s(e))},[n]);return E.useLayoutEffect(()=>a.listen(c),[a,c]),E.createElement(Gt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}var ln=E.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:p,...m},h){let{basename:g,navigator:_,useTransitions:v}=E.useContext(R),y=typeof l==`string`&&f.test(l),b=Ae(l,g);l=b.to;let x=et(l,{relative:r}),S=W(),C=null;if(o){let e=xe(o,[],S.mask?S.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:F([g,e.pathname])),C=_.createHref(e)}let[w,T,ee]=Ft(n,m),te=fn(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:p,useTransitions:v});function D(t){e&&e(t),t.defaultPrevented||te(t)}let O=!(b.isExternal||i),k=E.createElement(`a`,{...m,...ee,href:(O?C:void 0)||b.absoluteURL||x,onClick:O?D:e,ref:Bt(h,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?E.createElement(E.Fragment,null,k,E.createElement(It,{page:x})):k});ln.displayName=`Link`;var un=E.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=K(a,{relative:c.relative}),d=W(),f=E.useContext(He),{navigator:p,basename:m}=E.useContext(R),h=f!=null&&vn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f?.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=P(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(y)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return E.createElement(ln,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});un.displayName=`NavLink`;var dn=E.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:p,...m},h)=>{let{useTransitions:g}=E.useContext(R),_=gn(),v=_n(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&f.test(s);return E.createElement(`form`,{ref:h,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,f=()=>_(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:p});g&&n!==!1?E.startTransition(()=>f()):f()},...m,"data-discover":!b&&e===`render`?`true`:void 0})});dn.displayName=`Form`;function fn(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=G(),d=W(),f=K(e,{relative:o});return E.useCallback(p=>{if(Qt(p,t)){p.preventDefault();let t=n===void 0?C(d)===C(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?E.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function pn(e){y(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=E.useRef($t(e)),n=E.useRef(!1),r=W(),i=E.useMemo(()=>en(r.search,n.current?null:t.current),[r.search]),a=G();return[i,E.useCallback((e,t)=>{let r=$t(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var mn=0,hn=()=>`__${String(++mn)}__`;function gn(){let{router:e}=q(`useSubmit`),{basename:t}=E.useContext(R),n=yt(`useSubmit`),r=e.fetch,i=e.navigate;return E.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=on(e,t);a.navigate===!1?await r(a.fetcherKey||hn(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function _n(e,{relative:t}={}){let{basename:n}=E.useContext(R),r=E.useContext(B);v(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...K(e||`.`,{relative:t})},o=W();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:F([n,a.pathname])),C(a)}function vn(e,{relative:t}={}){let n=E.useContext(Ge);v(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=q(`useViewTransitionState`),i=K(e,{relative:t});if(!n.isTransitioning)return!1;let a=P(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=P(n.nextLocation.pathname,r)||n.nextLocation.pathname;return N(i.pathname,o)!=null||N(i.pathname,a)!=null}var yn=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function bn(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:yn(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var xn=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},Sn=e=>{let t=xn(e);return t.charAt(0).toUpperCase()+t.slice(1)},Cn=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),$={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function wn(e){return e!=null}function Tn(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??$.width,a=e.size??e.height??$.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Cn(...c):Cn(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??$[`stroke-width`])*Number(e.size??e.width??$.width)/Number(t.size??t.width??$.width):t.strokeWidth??$[`stroke-width`];return[`svg`,{...Object.entries($).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&wn(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&wn(t.width)&&{[r(`width`)]:t.width},...`height`in t&&wn(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function En(e,t={}){return Tn(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Dn=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},On=(0,E.createContext)({}),kn=()=>(0,E.useContext)(On),An=(0,E.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=kn()??{},y=!!c||Dn(d),[b,x,S=[]]=En(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:Cn(v,s),hasA11yProp:y,attributes:d});return(0,E.createElement)(b,{ref:f,...x},[...S.map(([e,t])=>(0,E.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function jn(e,t=[],n=[]){let r=typeof e==`string`?bn(e,t,n):e,i=(0,E.forwardRef)(({className:e,...t},n)=>(0,E.createElement)(An,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Sn(r.name)),i}var Mn=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Nn=o(((e,t)=>{t.exports=Mn()}));export{l as _,pn as a,Wt as c,tt as d,G as f,s as g,o as h,ln as i,Kt as l,d as m,jn as n,Ht as o,ot as p,cn as r,Ut as s,Nn as t,W as u};
|
|
2
|
+
//# sourceMappingURL=jsx-runtime-D13aM9HY.js.map
|