@revisium/admin 2.4.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/assets/index-BYCbxdf3.css +1 -0
- package/dist/assets/index-DAEpOqIo.js +1891 -0
- package/dist/assets/{vendor-chakra-81WUgB9u.js → vendor-chakra-CRwsfTJx.js} +6 -6
- package/dist/assets/{vendor-graphql-BN0-5miB.js → vendor-graphql-Bj88fl81.js} +1 -1
- package/dist/assets/{vendor-mobx-RTHsWS6u.js → vendor-mobx-BJ-2j-ZD.js} +2 -2
- package/dist/assets/vendor-react-DBJkD57A.js +2 -0
- package/dist/index.html +6 -6
- package/package.json +6 -4
- package/dist/assets/index-Bm4gz4e7.js +0 -1885
- package/dist/assets/index-D4XFaIWw.css +0 -1
- package/dist/assets/vendor-react-B-wSUMrZ.js +0 -2
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._JsonCard_15gzu_1 ._CopyButton_15gzu_1{visibility:hidden}._JsonCard_15gzu_1:hover ._CopyButton_15gzu_1{visibility:visible}._Root_t8kot_1 ._Action_t8kot_1{visibility:hidden}._Root_t8kot_1:hover ._Action_t8kot_1{visibility:visible}.react-flow{direction:ltr;--xy-edge-stroke-default: #b1b1b7;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #555;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(255, 255, 255, .5);--xy-minimap-background-color-default: #fff;--xy-minimap-mask-background-color-default: rgba(240, 240, 240, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #e2e2e2;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: transparent;--xy-background-pattern-dots-color-default: #91919a;--xy-background-pattern-lines-color-default: #eee;--xy-background-pattern-cross-color-default: #e2e2e2;background-color:var(--xy-background-color, var(--xy-background-color-default));--xy-node-color-default: inherit;--xy-node-border-default: 1px solid #1a192b;--xy-node-background-color-default: #fff;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #1a192b;--xy-node-border-radius-default: 3px;--xy-handle-background-color-default: #1a192b;--xy-handle-border-color-default: #fff;--xy-selection-background-color-default: rgba(0, 89, 220, .08);--xy-selection-border-default: 1px dotted rgba(0, 89, 220, .8);--xy-controls-button-background-color-default: #fefefe;--xy-controls-button-background-color-hover-default: #f4f4f4;--xy-controls-button-color-default: inherit;--xy-controls-button-color-hover-default: inherit;--xy-controls-button-border-color-default: #eee;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #ffffff;--xy-edge-label-color-default: inherit;--xy-resize-background-color-default: #3367d9}.react-flow.dark{--xy-edge-stroke-default: #3e3e3e;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #727272;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(150, 150, 150, .25);--xy-minimap-background-color-default: #141414;--xy-minimap-mask-background-color-default: rgba(60, 60, 60, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #2b2b2b;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: #141414;--xy-background-pattern-dots-color-default: #777;--xy-background-pattern-lines-color-default: #777;--xy-background-pattern-cross-color-default: #777;--xy-node-color-default: #f8f8f8;--xy-node-border-default: 1px solid #3c3c3c;--xy-node-background-color-default: #1e1e1e;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #999;--xy-handle-background-color-default: #bebebe;--xy-handle-border-color-default: #1e1e1e;--xy-selection-background-color-default: rgba(200, 200, 220, .08);--xy-selection-border-default: 1px dotted rgba(200, 200, 220, .8);--xy-controls-button-background-color-default: #2b2b2b;--xy-controls-button-background-color-hover-default: #3e3e3e;--xy-controls-button-color-default: #f8f8f8;--xy-controls-button-color-hover-default: #fff;--xy-controls-button-border-color-default: #5b5b5b;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #141414;--xy-edge-label-color-default: #f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{overflow:visible;position:absolute;pointer-events:none}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}svg.react-flow__connectionline{z-index:1001;overflow:visible;position:absolute}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background-color:var(--xy-handle-background-color, var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));border-radius:100%}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:0;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px) translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px) translateY(-50%)}.react-flow__attribution{font-size:10px;background:var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;left:0;top:0}.react-flow__viewport-portal{position:absolute;width:100%;height:100%;left:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__minimap{background:var( --xy-minimap-background-color-props, var(--xy-minimap-background-color, var(--xy-minimap-background-color-default)) )}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var( --xy-minimap-mask-background-color-props, var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default)) );stroke:var( --xy-minimap-mask-stroke-color-props, var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default)) );stroke-width:var( --xy-minimap-mask-stroke-width-props, var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default)) )}.react-flow__minimap-node{fill:var( --xy-minimap-node-background-color-props, var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default)) );stroke:var( --xy-minimap-node-stroke-color-props, var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default)) );stroke-width:var( --xy-minimap-node-stroke-width-props, var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default)) )}.react-flow__background-pattern.dots{fill:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default)) )}.react-flow__background-pattern.lines{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default)) )}.react-flow__background-pattern.cross{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default)) )}.react-flow__controls{display:flex;flex-direction:column;box-shadow:var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default))}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{display:flex;justify-content:center;align-items:center;height:26px;width:26px;padding:4px;border:none;background:var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));border-bottom:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) );color:var( --xy-controls-button-color-props, var(--xy-controls-button-color, var(--xy-controls-button-color-default)) );cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px;fill:currentColor}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:var(--xy-node-border-radius, var(--xy-node-border-radius-default));width:150px;font-size:12px;color:var(--xy-node-color, var(--xy-node-color-default));text-align:center;border:var(--xy-node-border, var(--xy-node-border-default));background-color:var(--xy-node-background-color, var(--xy-node-background-color-default))}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color, var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color, var(--xy-selection-background-color-default));border:var(--xy-selection-border, var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var( --xy-controls-button-background-color-hover-props, var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default)) );color:var( --xy-controls-button-color-hover-props, var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default)) )}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__controls.horizontal .react-flow__controls-button{border-bottom:none;border-right:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) )}.react-flow__controls.horizontal .react-flow__controls-button:last-child{border-right:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:5px;height:5px;border:1px solid #fff;border-radius:1px;background-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));translate:-50% -50%}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color, var(--xy-edge-label-color-default))}._Row_14e1q_1 ._Actions_14e1q_1{visibility:hidden}._Row_14e1q_1:hover ._Actions_14e1q_1{visibility:visible}._Row_5zyqz_1 ._Actions_5zyqz_1{opacity:0}._Row_5zyqz_1:hover ._Actions_5zyqz_1{opacity:1}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as g,c as Xr,d as Qr}from"./vendor-chakra-81WUgB9u.js";function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},H.apply(this,arguments)}var X;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(X||(X={}));const Kt="popstate";function Zr(e){e===void 0&&(e={});function t(n,a){let{pathname:l,search:o,hash:c}=n.location;return Ge("",{pathname:l,search:o,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:Me(a)}return en(t,r,null,e)}function _(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ye(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function qr(){return Math.random().toString(36).substr(2,8)}function Jt(e,t){return{usr:e.state,key:e.key,idx:t}}function Ge(e,t,r,n){return r===void 0&&(r=null),H({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?we(t):t,{state:r,key:t&&t.key||n||qr()})}function Me(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function we(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function en(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:l=!1}=n,o=a.history,c=X.Pop,u=null,h=p();h==null&&(h=0,o.replaceState(H({},o.state,{idx:h}),""));function p(){return(o.state||{idx:null}).idx}function f(){c=X.Pop;let C=p(),A=C==null?null:C-h;h=C,u&&u({action:c,location:E.location,delta:A})}function y(C,A){c=X.Push;let M=Ge(E.location,C,A);h=p()+1;let z=Jt(M,h),K=E.createHref(M);try{o.pushState(z,"",K)}catch(J){if(J instanceof DOMException&&J.name==="DataCloneError")throw J;a.location.assign(K)}l&&u&&u({action:c,location:E.location,delta:1})}function w(C,A){c=X.Replace;let M=Ge(E.location,C,A);h=p();let z=Jt(M,h),K=E.createHref(M);o.replaceState(z,"",K),l&&u&&u({action:c,location:E.location,delta:0})}function L(C){let A=a.location.origin!=="null"?a.location.origin:a.location.href,M=typeof C=="string"?C:Me(C);return M=M.replace(/ $/,"%20"),_(A,"No window.location.(origin|href) available to create URL for href: "+M),new URL(M,A)}let E={get action(){return c},get location(){return e(a,o)},listen(C){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(Kt,f),u=C,()=>{a.removeEventListener(Kt,f),u=null}},createHref(C){return t(a,C)},createURL:L,encodeLocation(C){let A=L(C);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:y,replace:w,go(C){return o.go(C)}};return E}var B;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(B||(B={}));const tn=new Set(["lazy","caseSensitive","path","id","index","children"]);function rn(e){return e.index===!0}function ft(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,l)=>{let o=[...r,String(l)],c=typeof a.id=="string"?a.id:o.join("-");if(_(a.index!==!0||!a.children,"Cannot specify children on an index route"),_(!n[c],'Found a route id collision on id "'+c+`". Route id's must be globally unique within Data Router usages`),rn(a)){let u=H({},a,t(a),{id:c});return n[c]=u,u}else{let u=H({},a,t(a),{id:c,children:void 0});return n[c]=u,a.children&&(u.children=ft(a.children,t,o,n)),u}})}function Le(e,t,r){return r===void 0&&(r="/"),dt(e,t,r,!1)}function dt(e,t,r,n){let a=typeof t=="string"?we(t):t,l=Ae(a.pathname||"/",r);if(l==null)return null;let o=vr(e);nn(o);let c=null;for(let u=0;c==null&&u<o.length;++u){let h=pn(l);c=hn(o[u],h,n)}return c}function pr(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}function vr(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(l,o,c)=>{let u={relativePath:c===void 0?l.path||"":c,caseSensitive:l.caseSensitive===!0,childrenIndex:o,route:l};u.relativePath.startsWith("/")&&(_(u.relativePath.startsWith(n),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(n.length));let h=fe([n,u.relativePath]),p=r.concat(u);l.children&&l.children.length>0&&(_(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),vr(l.children,t,p,h)),!(l.path==null&&!l.index)&&t.push({path:h,score:dn(h,l.index),routesMeta:p})};return e.forEach((l,o)=>{var c;if(l.path===""||!((c=l.path)!=null&&c.includes("?")))a(l,o);else for(let u of gr(l.path))a(l,o,u)}),t}function gr(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),l=r.replace(/\?$/,"");if(n.length===0)return a?[l,""]:[l];let o=gr(n.join("/")),c=[];return c.push(...o.map(u=>u===""?l:[l,u].join("/"))),a&&c.push(...o),c.map(u=>e.startsWith("/")&&u===""?"/":u)}function nn(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:fn(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const an=/^:[\w-]+$/,on=3,ln=2,sn=1,un=10,cn=-2,Yt=e=>e==="*";function dn(e,t){let r=e.split("/"),n=r.length;return r.some(Yt)&&(n+=cn),t&&(n+=ln),r.filter(a=>!Yt(a)).reduce((a,l)=>a+(an.test(l)?on:l===""?sn:un),n)}function fn(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function hn(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,a={},l="/",o=[];for(let c=0;c<n.length;++c){let u=n[c],h=c===n.length-1,p=l==="/"?t:t.slice(l.length)||"/",f=Gt({path:u.relativePath,caseSensitive:u.caseSensitive,end:h},p),y=u.route;if(!f&&h&&r&&!n[n.length-1].route.index&&(f=Gt({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},p)),!f)return null;Object.assign(a,f.params),o.push({params:a,pathname:fe([l,f.pathname]),pathnameBase:wn(fe([l,f.pathnameBase])),route:y}),f.pathnameBase!=="/"&&(l=fe([l,f.pathnameBase]))}return o}function _a(e,t){t===void 0&&(t={});let r=e;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(ye(!1,'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".')),r=r.replace(/\*$/,"/*"));const n=r.startsWith("/")?"/":"",a=o=>o==null?"":typeof o=="string"?o:String(o),l=r.split(/\/+/).map((o,c,u)=>{if(c===u.length-1&&o==="*")return a(t["*"]);const p=o.match(/^:([\w-]+)(\??)$/);if(p){const[,f,y]=p;let w=t[f];return _(y==="?"||w!=null,'Missing ":'+f+'" param'),a(w)}return o.replace(/\?$/g,"")}).filter(o=>!!o);return n+l.join("/")}function Gt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=mn(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let l=a[0],o=l.replace(/(.)\/+$/,"$1"),c=a.slice(1);return{params:n.reduce((h,p,f)=>{let{paramName:y,isOptional:w}=p;if(y==="*"){let E=c[f]||"";o=l.slice(0,l.length-E.length).replace(/(.)\/+$/,"$1")}const L=c[f];return w&&!L?h[y]=void 0:h[y]=(L||"").replace(/%2F/g,"/"),h},{}),pathname:l,pathnameBase:o,pattern:e}}function mn(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),ye(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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,c,u)=>(n.push({paramName:c,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function pn(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ye(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ae(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)||"/"}const vn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gn=e=>vn.test(e);function yn(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?we(e):e,l;if(r)if(gn(r))l=r;else{if(r.includes("//")){let o=r;r=r.replace(/\/\/+/g,"/"),ye(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+r))}r.startsWith("/")?l=Xt(r.substring(1),"/"):l=Xt(r,t)}else l=t;return{pathname:l,search:bn(n),hash:Rn(a)}}function Xt(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function bt(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 yr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Dt(e,t){let r=yr(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Ct(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=we(e):(a=H({},e),_(!a.pathname||!a.pathname.includes("?"),bt("?","pathname","search",a)),_(!a.pathname||!a.pathname.includes("#"),bt("#","pathname","hash",a)),_(!a.search||!a.search.includes("#"),bt("#","search","hash",a)));let l=e===""||a.pathname==="",o=l?"/":a.pathname,c;if(o==null)c=r;else{let f=t.length-1;if(!n&&o.startsWith("..")){let y=o.split("/");for(;y[0]==="..";)y.shift(),f-=1;a.pathname=y.join("/")}c=f>=0?t[f]:"/"}let u=yn(a,c),h=o&&o!=="/"&&o.endsWith("/"),p=(l||o===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(h||p)&&(u.pathname+="/"),u}const fe=e=>e.join("/").replace(/\/\/+/g,"/"),wn=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),bn=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Rn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Oa=function(t,r){r===void 0&&(r=302);let n=r;typeof n=="number"?n={status:n}:typeof n.status>"u"&&(n.status=302);let a=new Headers(n.headers);return a.set("Location",t),new Response(null,H({},n,{headers:a}))};class ht{constructor(t,r,n,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function Xe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const wr=["post","put","patch","delete"],En=new Set(wr),Sn=["get",...wr],xn=new Set(Sn),Pn=new Set([301,302,303,307,308]),Ln=new Set([307,308]),Rt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Dn={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},$e={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Mt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Cn=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),br="remix-router-transitions";function Mn(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;_(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let i=e.detectErrorBoundary;a=s=>({hasErrorBoundary:i(s)})}else a=Cn;let l={},o=ft(e.routes,a,void 0,l),c,u=e.basename||"/",h=e.dataStrategy||_n,p=e.patchRoutesOnNavigation,f=H({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),y=null,w=new Set,L=null,E=null,C=null,A=e.hydrationData!=null,M=Le(o,e.history.location,u),z=!1,K=null;if(M==null&&!p){let i=re(404,{pathname:e.history.location.pathname}),{matches:s,route:d}=lr(o);M=s,K={[d.id]:i}}M&&!e.hydrationData&&ot(M,o,e.history.location.pathname).active&&(M=null);let J;if(M)if(M.some(i=>i.route.lazy))J=!1;else if(!M.some(i=>i.route.loader))J=!0;else if(f.v7_partialHydration){let i=e.hydrationData?e.hydrationData.loaderData:null,s=e.hydrationData?e.hydrationData.errors:null;if(s){let d=M.findIndex(v=>s[v.route.id]!==void 0);J=M.slice(0,d+1).every(v=>!xt(v.route,i,s))}else J=M.every(d=>!xt(d.route,i,s))}else J=e.hydrationData!=null;else if(J=!1,M=[],f.v7_partialHydration){let i=ot(null,o,e.history.location.pathname);i.active&&i.matches&&(z=!0,M=i.matches)}let be,m={historyAction:e.history.action,location:e.history.location,matches:M,initialized:J,navigation:Rt,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||K,fetchers:new Map,blockers:new Map},U=X.Pop,W=!1,O,q=!1,Y=new Map,ne=null,te=!1,se=!1,et=[],tt=new Set,Q=new Map,rt=0,Be=-1,Ue=new Map,ue=new Set,Fe=new Map,ze=new Map,ie=new Set,Re=new Map,Ee=new Map,nt;function _r(){if(y=e.history.listen(i=>{let{action:s,location:d,delta:v}=i;if(nt){nt(),nt=void 0;return}ye(Ee.size===0||v!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let b=Ht({currentLocation:m.location,nextLocation:d,historyAction:s});if(b&&v!=null){let D=new Promise(T=>{nt=T});e.history.go(v*-1),it(b,{state:"blocked",location:d,proceed(){it(b,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),D.then(()=>e.history.go(v))},reset(){let T=new Map(m.blockers);T.set(b,$e),ee({blockers:T})}});return}return Se(s,d)}),r){Jn(t,Y);let i=()=>Yn(t,Y);t.addEventListener("pagehide",i),ne=()=>t.removeEventListener("pagehide",i)}return m.initialized||Se(X.Pop,m.location,{initialHydration:!0}),be}function Or(){y&&y(),ne&&ne(),w.clear(),O&&O.abort(),m.fetchers.forEach((i,s)=>at(s)),m.blockers.forEach((i,s)=>kt(s))}function jr(i){return w.add(i),()=>w.delete(i)}function ee(i,s){s===void 0&&(s={}),m=H({},m,i);let d=[],v=[];f.v7_fetcherPersist&&m.fetchers.forEach((b,D)=>{b.state==="idle"&&(ie.has(D)?v.push(D):d.push(D))}),ie.forEach(b=>{!m.fetchers.has(b)&&!Q.has(b)&&v.push(b)}),[...w].forEach(b=>b(m,{deletedFetchers:v,viewTransitionOpts:s.viewTransitionOpts,flushSync:s.flushSync===!0})),f.v7_fetcherPersist?(d.forEach(b=>m.fetchers.delete(b)),v.forEach(b=>at(b))):v.forEach(b=>ie.delete(b))}function _e(i,s,d){var v,b;let{flushSync:D}=d===void 0?{}:d,T=m.actionData!=null&&m.navigation.formMethod!=null&&oe(m.navigation.formMethod)&&m.navigation.state==="loading"&&((v=i.state)==null?void 0:v._isRedirect)!==!0,S;s.actionData?Object.keys(s.actionData).length>0?S=s.actionData:S=null:T?S=m.actionData:S=null;let x=s.loaderData?ir(m.loaderData,s.loaderData,s.matches||[],s.errors):m.loaderData,R=m.blockers;R.size>0&&(R=new Map(R),R.forEach((j,Z)=>R.set(Z,$e)));let P=W===!0||m.navigation.formMethod!=null&&oe(m.navigation.formMethod)&&((b=i.state)==null?void 0:b._isRedirect)!==!0;c&&(o=c,c=void 0),te||U===X.Pop||(U===X.Push?e.history.push(i,i.state):U===X.Replace&&e.history.replace(i,i.state));let F;if(U===X.Pop){let j=Y.get(m.location.pathname);j&&j.has(i.pathname)?F={currentLocation:m.location,nextLocation:i}:Y.has(i.pathname)&&(F={currentLocation:i,nextLocation:m.location})}else if(q){let j=Y.get(m.location.pathname);j?j.add(i.pathname):(j=new Set([i.pathname]),Y.set(m.location.pathname,j)),F={currentLocation:m.location,nextLocation:i}}ee(H({},s,{actionData:S,loaderData:x,historyAction:U,location:i,initialized:!0,navigation:Rt,revalidation:"idle",restoreScrollPosition:Vt(i,s.matches||m.matches),preventScrollReset:P,blockers:R}),{viewTransitionOpts:F,flushSync:D===!0}),U=X.Pop,W=!1,q=!1,te=!1,se=!1,et=[]}async function Ot(i,s){if(typeof i=="number"){e.history.go(i);return}let d=St(m.location,m.matches,u,f.v7_prependBasename,i,f.v7_relativeSplatPath,s?.fromRouteId,s?.relative),{path:v,submission:b,error:D}=Qt(f.v7_normalizeFormMethod,!1,d,s),T=m.location,S=Ge(m.location,v,s&&s.state);S=H({},S,e.history.encodeLocation(S));let x=s&&s.replace!=null?s.replace:void 0,R=X.Push;x===!0?R=X.Replace:x===!1||b!=null&&oe(b.formMethod)&&b.formAction===m.location.pathname+m.location.search&&(R=X.Replace);let P=s&&"preventScrollReset"in s?s.preventScrollReset===!0:void 0,F=(s&&s.flushSync)===!0,j=Ht({currentLocation:T,nextLocation:S,historyAction:R});if(j){it(j,{state:"blocked",location:S,proceed(){it(j,{state:"proceeding",proceed:void 0,reset:void 0,location:S}),Ot(i,s)},reset(){let Z=new Map(m.blockers);Z.set(j,$e),ee({blockers:Z})}});return}return await Se(R,S,{submission:b,pendingError:D,preventScrollReset:P,replace:s&&s.replace,enableViewTransition:s&&s.viewTransition,flushSync:F})}function Ir(){if(vt(),ee({revalidation:"loading"}),m.navigation.state!=="submitting"){if(m.navigation.state==="idle"){Se(m.historyAction,m.location,{startUninterruptedRevalidation:!0});return}Se(U||m.historyAction,m.navigation.location,{overrideNavigation:m.navigation,enableViewTransition:q===!0})}}async function Se(i,s,d){O&&O.abort(),O=null,U=i,te=(d&&d.startUninterruptedRevalidation)===!0,Kr(m.location,m.matches),W=(d&&d.preventScrollReset)===!0,q=(d&&d.enableViewTransition)===!0;let v=c||o,b=d&&d.overrideNavigation,D=d!=null&&d.initialHydration&&m.matches&&m.matches.length>0&&!z?m.matches:Le(v,s,u),T=(d&&d.flushSync)===!0;if(D&&m.initialized&&!se&&Bn(m.location,s)&&!(d&&d.submission&&oe(d.submission.formMethod))){_e(s,{matches:D},{flushSync:T});return}let S=ot(D,v,s.pathname);if(S.active&&S.matches&&(D=S.matches),!D){let{error:k,notFoundMatches:N,route:V}=gt(s.pathname);_e(s,{matches:N,loaderData:{},errors:{[V.id]:k}},{flushSync:T});return}O=new AbortController;let x=Ne(e.history,s,O.signal,d&&d.submission),R;if(d&&d.pendingError)R=[De(D).route.id,{type:B.error,error:d.pendingError}];else if(d&&d.submission&&oe(d.submission.formMethod)){let k=await Nr(x,s,d.submission,D,S.active,{replace:d.replace,flushSync:T});if(k.shortCircuited)return;if(k.pendingActionResult){let[N,V]=k.pendingActionResult;if(ae(V)&&Xe(V.error)&&V.error.status===404){O=null,_e(s,{matches:k.matches,loaderData:{},errors:{[N]:V.error}});return}}D=k.matches||D,R=k.pendingActionResult,b=Et(s,d.submission),T=!1,S.active=!1,x=Ne(e.history,x.url,x.signal)}let{shortCircuited:P,matches:F,loaderData:j,errors:Z}=await Ar(x,s,D,S.active,b,d&&d.submission,d&&d.fetcherSubmission,d&&d.replace,d&&d.initialHydration===!0,T,R);P||(O=null,_e(s,H({matches:F||D},or(R),{loaderData:j,errors:Z})))}async function Nr(i,s,d,v,b,D){D===void 0&&(D={}),vt();let T=$n(s,d);if(ee({navigation:T},{flushSync:D.flushSync===!0}),b){let R=await lt(v,s.pathname,i.signal);if(R.type==="aborted")return{shortCircuited:!0};if(R.type==="error"){let P=De(R.partialMatches).route.id;return{matches:R.partialMatches,pendingActionResult:[P,{type:B.error,error:R.error}]}}else if(R.matches)v=R.matches;else{let{notFoundMatches:P,error:F,route:j}=gt(s.pathname);return{matches:P,pendingActionResult:[j.id,{type:B.error,error:F}]}}}let S,x=Ye(v,s);if(!x.route.action&&!x.route.lazy)S={type:B.error,error:re(405,{method:i.method,pathname:s.pathname,routeId:x.route.id})};else if(S=(await ke("action",m,i,[x],v,null))[x.route.id],i.signal.aborted)return{shortCircuited:!0};if(Ce(S)){let R;return D&&D.replace!=null?R=D.replace:R=rr(S.response.headers.get("Location"),new URL(i.url),u,e.history)===m.location.pathname+m.location.search,await xe(i,S,!0,{submission:d,replace:R}),{shortCircuited:!0}}if(ge(S))throw re(400,{type:"defer-action"});if(ae(S)){let R=De(v,x.route.id);return(D&&D.replace)!==!0&&(U=X.Push),{matches:v,pendingActionResult:[R.route.id,S]}}return{matches:v,pendingActionResult:[x.route.id,S]}}async function Ar(i,s,d,v,b,D,T,S,x,R,P){let F=b||Et(s,D),j=D||T||ur(F),Z=!te&&(!f.v7_partialHydration||!x);if(v){if(Z){let $=jt(P);ee(H({navigation:F},$!==void 0?{actionData:$}:{}),{flushSync:R})}let I=await lt(d,s.pathname,i.signal);if(I.type==="aborted")return{shortCircuited:!0};if(I.type==="error"){let $=De(I.partialMatches).route.id;return{matches:I.partialMatches,loaderData:{},errors:{[$]:I.error}}}else if(I.matches)d=I.matches;else{let{error:$,notFoundMatches:je,route:Ve}=gt(s.pathname);return{matches:je,loaderData:{},errors:{[Ve.id]:$}}}}let k=c||o,[N,V]=qt(e.history,m,d,j,s,f.v7_partialHydration&&x===!0,f.v7_skipActionErrorRevalidation,se,et,tt,ie,Fe,ue,k,u,P);if(yt(I=>!(d&&d.some($=>$.route.id===I))||N&&N.some($=>$.route.id===I)),Be=++rt,N.length===0&&V.length===0){let I=Bt();return _e(s,H({matches:d,loaderData:{},errors:P&&ae(P[1])?{[P[0]]:P[1].error}:null},or(P),I?{fetchers:new Map(m.fetchers)}:{}),{flushSync:R}),{shortCircuited:!0}}if(Z){let I={};if(!v){I.navigation=F;let $=jt(P);$!==void 0&&(I.actionData=$)}V.length>0&&(I.fetchers=Br(V)),ee(I,{flushSync:R})}V.forEach(I=>{pe(I.key),I.controller&&Q.set(I.key,I.controller)});let Oe=()=>V.forEach(I=>pe(I.key));O&&O.signal.addEventListener("abort",Oe);let{loaderResults:He,fetcherResults:de}=await It(m,d,N,V,i);if(i.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener("abort",Oe),V.forEach(I=>Q.delete(I.key));let le=ct(He);if(le)return await xe(i,le.result,!0,{replace:S}),{shortCircuited:!0};if(le=ct(de),le)return ue.add(le.key),await xe(i,le.result,!0,{replace:S}),{shortCircuited:!0};let{loaderData:wt,errors:We}=ar(m,d,He,P,V,de,Re);Re.forEach((I,$)=>{I.subscribe(je=>{(je||I.done)&&Re.delete($)})}),f.v7_partialHydration&&x&&m.errors&&(We=H({},m.errors,We));let Pe=Bt(),st=zt(Be),ut=Pe||st||V.length>0;return H({matches:d,loaderData:wt,errors:We},ut?{fetchers:new Map(m.fetchers)}:{})}function jt(i){if(i&&!ae(i[1]))return{[i[0]]:i[1].data};if(m.actionData)return Object.keys(m.actionData).length===0?null:m.actionData}function Br(i){return i.forEach(s=>{let d=m.fetchers.get(s.key),v=Ke(void 0,d?d.data:void 0);m.fetchers.set(s.key,v)}),new Map(m.fetchers)}function zr(i,s,d,v){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");pe(i);let b=(v&&v.flushSync)===!0,D=c||o,T=St(m.location,m.matches,u,f.v7_prependBasename,d,f.v7_relativeSplatPath,s,v?.relative),S=Le(D,T,u),x=ot(S,D,T);if(x.active&&x.matches&&(S=x.matches),!S){ce(i,s,re(404,{pathname:T}),{flushSync:b});return}let{path:R,submission:P,error:F}=Qt(f.v7_normalizeFormMethod,!0,T,v);if(F){ce(i,s,F,{flushSync:b});return}let j=Ye(S,R),Z=(v&&v.preventScrollReset)===!0;if(P&&oe(P.formMethod)){kr(i,s,R,j,S,x.active,b,Z,P);return}Fe.set(i,{routeId:s,path:R}),Hr(i,s,R,j,S,x.active,b,Z,P)}async function kr(i,s,d,v,b,D,T,S,x){vt(),Fe.delete(i);function R(G){if(!G.route.action&&!G.route.lazy){let Ie=re(405,{method:x.formMethod,pathname:d,routeId:s});return ce(i,s,Ie,{flushSync:T}),!0}return!1}if(!D&&R(v))return;let P=m.fetchers.get(i);me(i,Kn(x,P),{flushSync:T});let F=new AbortController,j=Ne(e.history,d,F.signal,x);if(D){let G=await lt(b,new URL(j.url).pathname,j.signal,i);if(G.type==="aborted")return;if(G.type==="error"){ce(i,s,G.error,{flushSync:T});return}else if(G.matches){if(b=G.matches,v=Ye(b,d),R(v))return}else{ce(i,s,re(404,{pathname:d}),{flushSync:T});return}}Q.set(i,F);let Z=rt,N=(await ke("action",m,j,[v],b,i))[v.route.id];if(j.signal.aborted){Q.get(i)===F&&Q.delete(i);return}if(f.v7_fetcherPersist&&ie.has(i)){if(Ce(N)||ae(N)){me(i,ve(void 0));return}}else{if(Ce(N))if(Q.delete(i),Be>Z){me(i,ve(void 0));return}else return ue.add(i),me(i,Ke(x)),xe(j,N,!1,{fetcherSubmission:x,preventScrollReset:S});if(ae(N)){ce(i,s,N.error);return}}if(ge(N))throw re(400,{type:"defer-action"});let V=m.navigation.location||m.location,Oe=Ne(e.history,V,F.signal),He=c||o,de=m.navigation.state!=="idle"?Le(He,m.navigation.location,u):m.matches;_(de,"Didn't find any matches after fetcher action");let le=++rt;Ue.set(i,le);let wt=Ke(x,N.data);m.fetchers.set(i,wt);let[We,Pe]=qt(e.history,m,de,x,V,!1,f.v7_skipActionErrorRevalidation,se,et,tt,ie,Fe,ue,He,u,[v.route.id,N]);Pe.filter(G=>G.key!==i).forEach(G=>{let Ie=G.key,$t=m.fetchers.get(Ie),Gr=Ke(void 0,$t?$t.data:void 0);m.fetchers.set(Ie,Gr),pe(Ie),G.controller&&Q.set(Ie,G.controller)}),ee({fetchers:new Map(m.fetchers)});let st=()=>Pe.forEach(G=>pe(G.key));F.signal.addEventListener("abort",st);let{loaderResults:ut,fetcherResults:I}=await It(m,de,We,Pe,Oe);if(F.signal.aborted)return;F.signal.removeEventListener("abort",st),Ue.delete(i),Q.delete(i),Pe.forEach(G=>Q.delete(G.key));let $=ct(ut);if($)return xe(Oe,$.result,!1,{preventScrollReset:S});if($=ct(I),$)return ue.add($.key),xe(Oe,$.result,!1,{preventScrollReset:S});let{loaderData:je,errors:Ve}=ar(m,de,ut,void 0,Pe,I,Re);if(m.fetchers.has(i)){let G=ve(N.data);m.fetchers.set(i,G)}zt(le),m.navigation.state==="loading"&&le>Be?(_(U,"Expected pending action"),O&&O.abort(),_e(m.navigation.location,{matches:de,loaderData:je,errors:Ve,fetchers:new Map(m.fetchers)})):(ee({errors:Ve,loaderData:ir(m.loaderData,je,de,Ve),fetchers:new Map(m.fetchers)}),se=!1)}async function Hr(i,s,d,v,b,D,T,S,x){let R=m.fetchers.get(i);me(i,Ke(x,R?R.data:void 0),{flushSync:T});let P=new AbortController,F=Ne(e.history,d,P.signal);if(D){let N=await lt(b,new URL(F.url).pathname,F.signal,i);if(N.type==="aborted")return;if(N.type==="error"){ce(i,s,N.error,{flushSync:T});return}else if(N.matches)b=N.matches,v=Ye(b,d);else{ce(i,s,re(404,{pathname:d}),{flushSync:T});return}}Q.set(i,P);let j=rt,k=(await ke("loader",m,F,[v],b,i))[v.route.id];if(ge(k)&&(k=await Tt(k,F.signal,!0)||k),Q.get(i)===P&&Q.delete(i),!F.signal.aborted){if(ie.has(i)){me(i,ve(void 0));return}if(Ce(k))if(Be>j){me(i,ve(void 0));return}else{ue.add(i),await xe(F,k,!1,{preventScrollReset:S});return}if(ae(k)){ce(i,s,k.error);return}_(!ge(k),"Unhandled fetcher deferred data"),me(i,ve(k.data))}}async function xe(i,s,d,v){let{submission:b,fetcherSubmission:D,preventScrollReset:T,replace:S}=v===void 0?{}:v;s.response.headers.has("X-Remix-Revalidate")&&(se=!0);let x=s.response.headers.get("Location");_(x,"Expected a Location header on the redirect Response"),x=rr(x,new URL(i.url),u,e.history);let R=Ge(m.location,x,{_isRedirect:!0});if(r){let N=!1;if(s.response.headers.has("X-Remix-Reload-Document"))N=!0;else if(Mt.test(x)){const V=e.history.createURL(x);N=V.origin!==t.location.origin||Ae(V.pathname,u)==null}if(N){S?t.location.replace(x):t.location.assign(x);return}}O=null;let P=S===!0||s.response.headers.has("X-Remix-Replace")?X.Replace:X.Push,{formMethod:F,formAction:j,formEncType:Z}=m.navigation;!b&&!D&&F&&j&&Z&&(b=ur(m.navigation));let k=b||D;if(Ln.has(s.response.status)&&k&&oe(k.formMethod))await Se(P,R,{submission:H({},k,{formAction:x}),preventScrollReset:T||W,enableViewTransition:d?q:void 0});else{let N=Et(R,b);await Se(P,R,{overrideNavigation:N,fetcherSubmission:D,preventScrollReset:T||W,enableViewTransition:d?q:void 0})}}async function ke(i,s,d,v,b,D){let T,S={};try{T=await On(h,i,s,d,v,b,D,l,a)}catch(x){return v.forEach(R=>{S[R.route.id]={type:B.error,error:x}}),S}for(let[x,R]of Object.entries(T))if(zn(R)){let P=R.result;S[x]={type:B.redirect,response:Nn(P,d,x,b,u,f.v7_relativeSplatPath)}}else S[x]=await In(R);return S}async function It(i,s,d,v,b){let D=i.matches,T=ke("loader",i,b,d,s,null),S=Promise.all(v.map(async P=>{if(P.matches&&P.match&&P.controller){let j=(await ke("loader",i,Ne(e.history,P.path,P.controller.signal),[P.match],P.matches,P.key))[P.match.route.id];return{[P.key]:j}}else return Promise.resolve({[P.key]:{type:B.error,error:re(404,{pathname:P.path})}})})),x=await T,R=(await S).reduce((P,F)=>Object.assign(P,F),{});return await Promise.all([Wn(s,x,b.signal,D,i.loaderData),Vn(s,R,v)]),{loaderResults:x,fetcherResults:R}}function vt(){se=!0,et.push(...yt()),Fe.forEach((i,s)=>{Q.has(s)&&tt.add(s),pe(s)})}function me(i,s,d){d===void 0&&(d={}),m.fetchers.set(i,s),ee({fetchers:new Map(m.fetchers)},{flushSync:(d&&d.flushSync)===!0})}function ce(i,s,d,v){v===void 0&&(v={});let b=De(m.matches,s);at(i),ee({errors:{[b.route.id]:d},fetchers:new Map(m.fetchers)},{flushSync:(v&&v.flushSync)===!0})}function Nt(i){return ze.set(i,(ze.get(i)||0)+1),ie.has(i)&&ie.delete(i),m.fetchers.get(i)||Dn}function at(i){let s=m.fetchers.get(i);Q.has(i)&&!(s&&s.state==="loading"&&Ue.has(i))&&pe(i),Fe.delete(i),Ue.delete(i),ue.delete(i),f.v7_fetcherPersist&&ie.delete(i),tt.delete(i),m.fetchers.delete(i)}function Wr(i){let s=(ze.get(i)||0)-1;s<=0?(ze.delete(i),ie.add(i),f.v7_fetcherPersist||at(i)):ze.set(i,s),ee({fetchers:new Map(m.fetchers)})}function pe(i){let s=Q.get(i);s&&(s.abort(),Q.delete(i))}function At(i){for(let s of i){let d=Nt(s),v=ve(d.data);m.fetchers.set(s,v)}}function Bt(){let i=[],s=!1;for(let d of ue){let v=m.fetchers.get(d);_(v,"Expected fetcher: "+d),v.state==="loading"&&(ue.delete(d),i.push(d),s=!0)}return At(i),s}function zt(i){let s=[];for(let[d,v]of Ue)if(v<i){let b=m.fetchers.get(d);_(b,"Expected fetcher: "+d),b.state==="loading"&&(pe(d),Ue.delete(d),s.push(d))}return At(s),s.length>0}function Vr(i,s){let d=m.blockers.get(i)||$e;return Ee.get(i)!==s&&Ee.set(i,s),d}function kt(i){m.blockers.delete(i),Ee.delete(i)}function it(i,s){let d=m.blockers.get(i)||$e;_(d.state==="unblocked"&&s.state==="blocked"||d.state==="blocked"&&s.state==="blocked"||d.state==="blocked"&&s.state==="proceeding"||d.state==="blocked"&&s.state==="unblocked"||d.state==="proceeding"&&s.state==="unblocked","Invalid blocker state transition: "+d.state+" -> "+s.state);let v=new Map(m.blockers);v.set(i,s),ee({blockers:v})}function Ht(i){let{currentLocation:s,nextLocation:d,historyAction:v}=i;if(Ee.size===0)return;Ee.size>1&&ye(!1,"A router only supports one blocker at a time");let b=Array.from(Ee.entries()),[D,T]=b[b.length-1],S=m.blockers.get(D);if(!(S&&S.state==="proceeding")&&T({currentLocation:s,nextLocation:d,historyAction:v}))return D}function gt(i){let s=re(404,{pathname:i}),d=c||o,{matches:v,route:b}=lr(d);return yt(),{notFoundMatches:v,route:b,error:s}}function yt(i){let s=[];return Re.forEach((d,v)=>{(!i||i(v))&&(d.cancel(),s.push(v),Re.delete(v))}),s}function $r(i,s,d){if(L=i,C=s,E=d||null,!A&&m.navigation===Rt){A=!0;let v=Vt(m.location,m.matches);v!=null&&ee({restoreScrollPosition:v})}return()=>{L=null,C=null,E=null}}function Wt(i,s){return E&&E(i,s.map(v=>pr(v,m.loaderData)))||i.key}function Kr(i,s){if(L&&C){let d=Wt(i,s);L[d]=C()}}function Vt(i,s){if(L){let d=Wt(i,s),v=L[d];if(typeof v=="number")return v}return null}function ot(i,s,d){if(p)if(i){if(Object.keys(i[0].params).length>0)return{active:!0,matches:dt(s,d,u,!0)}}else return{active:!0,matches:dt(s,d,u,!0)||[]};return{active:!1,matches:null}}async function lt(i,s,d,v){if(!p)return{type:"success",matches:i};let b=i;for(;;){let D=c==null,T=c||o,S=l;try{await p({signal:d,path:s,matches:b,fetcherKey:v,patch:(P,F)=>{d.aborted||tr(P,F,T,S,a)}})}catch(P){return{type:"error",error:P,partialMatches:b}}finally{D&&!d.aborted&&(o=[...o])}if(d.aborted)return{type:"aborted"};let x=Le(T,s,u);if(x)return{type:"success",matches:x};let R=dt(T,s,u,!0);if(!R||b.length===R.length&&b.every((P,F)=>P.route.id===R[F].route.id))return{type:"success",matches:null};b=R}}function Jr(i){l={},c=ft(i,a,void 0,l)}function Yr(i,s){let d=c==null;tr(i,s,c||o,l,a),d&&(o=[...o],ee({}))}return be={get basename(){return u},get future(){return f},get state(){return m},get routes(){return o},get window(){return t},initialize:_r,subscribe:jr,enableScrollRestoration:$r,navigate:Ot,fetch:zr,revalidate:Ir,createHref:i=>e.history.createHref(i),encodeLocation:i=>e.history.encodeLocation(i),getFetcher:Nt,deleteFetcher:Wr,dispose:Or,getBlocker:Vr,deleteBlocker:kt,patchRoutes:Yr,_internalFetchControllers:Q,_internalActiveDeferreds:Re,_internalSetRoutes:Jr},be}function Tn(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function St(e,t,r,n,a,l,o,c){let u,h;if(o){u=[];for(let f of t)if(u.push(f),f.route.id===o){h=f;break}}else u=t,h=t[t.length-1];let p=Ct(a||".",Dt(u,l),Ae(e.pathname,r)||e.pathname,c==="path");if(a==null&&(p.search=e.search,p.hash=e.hash),(a==null||a===""||a===".")&&h){let f=Ut(p.search);if(h.route.index&&!f)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!h.route.index&&f){let y=new URLSearchParams(p.search),w=y.getAll("index");y.delete("index"),w.filter(E=>E).forEach(E=>y.append("index",E));let L=y.toString();p.search=L?"?"+L:""}}return n&&r!=="/"&&(p.pathname=p.pathname==="/"?r:fe([r,p.pathname])),Me(p)}function Qt(e,t,r,n){if(!n||!Tn(n))return{path:r};if(n.formMethod&&!Hn(n.formMethod))return{path:r,error:re(405,{method:n.formMethod})};let a=()=>({path:r,error:re(400,{type:"invalid-body"})}),l=n.formMethod||"get",o=e?l.toUpperCase():l.toLowerCase(),c=Sr(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!oe(o))return a();let y=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((w,L)=>{let[E,C]=L;return""+w+E+"="+C+`
|
|
2
|
-
`},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:y}}}else if(n.formEncType==="application/json"){if(!oe(o))return a();try{let y=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:c,formEncType:n.formEncType,formData:void 0,json:y,text:void 0}}}catch{return a()}}}_(typeof FormData=="function","FormData is not available in this environment");let u,h;if(n.formData)u=Pt(n.formData),h=n.formData;else if(n.body instanceof FormData)u=Pt(n.body),h=n.body;else if(n.body instanceof URLSearchParams)u=n.body,h=nr(u);else if(n.body==null)u=new URLSearchParams,h=new FormData;else try{u=new URLSearchParams(n.body),h=nr(u)}catch{return a()}let p={formMethod:o,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:h,json:void 0,text:void 0};if(oe(p.formMethod))return{path:r,submission:p};let f=we(r);return t&&f.search&&Ut(f.search)&&u.append("index",""),f.search="?"+u,{path:Me(f),submission:p}}function Zt(e,t,r){r===void 0&&(r=!1);let n=e.findIndex(a=>a.route.id===t);return n>=0?e.slice(0,r?n+1:n):e}function qt(e,t,r,n,a,l,o,c,u,h,p,f,y,w,L,E){let C=E?ae(E[1])?E[1].error:E[1].data:void 0,A=e.createURL(t.location),M=e.createURL(a),z=r;l&&t.errors?z=Zt(r,Object.keys(t.errors)[0],!0):E&&ae(E[1])&&(z=Zt(r,E[0]));let K=E?E[1].statusCode:void 0,J=o&&K&&K>=400,be=z.filter((U,W)=>{let{route:O}=U;if(O.lazy)return!0;if(O.loader==null)return!1;if(l)return xt(O,t.loaderData,t.errors);if(Un(t.loaderData,t.matches[W],U)||u.some(ne=>ne===U.route.id))return!0;let q=t.matches[W],Y=U;return er(U,H({currentUrl:A,currentParams:q.params,nextUrl:M,nextParams:Y.params},n,{actionResult:C,actionStatus:K,defaultShouldRevalidate:J?!1:c||A.pathname+A.search===M.pathname+M.search||A.search!==M.search||Rr(q,Y)}))}),m=[];return f.forEach((U,W)=>{if(l||!r.some(te=>te.route.id===U.routeId)||p.has(W))return;let O=Le(w,U.path,L);if(!O){m.push({key:W,routeId:U.routeId,path:U.path,matches:null,match:null,controller:null});return}let q=t.fetchers.get(W),Y=Ye(O,U.path),ne=!1;y.has(W)?ne=!1:h.has(W)?(h.delete(W),ne=!0):q&&q.state!=="idle"&&q.data===void 0?ne=c:ne=er(Y,H({currentUrl:A,currentParams:t.matches[t.matches.length-1].params,nextUrl:M,nextParams:r[r.length-1].params},n,{actionResult:C,actionStatus:K,defaultShouldRevalidate:J?!1:c})),ne&&m.push({key:W,routeId:U.routeId,path:U.path,matches:O,match:Y,controller:new AbortController})}),[be,m]}function xt(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=t!=null&&t[e.id]!==void 0,a=r!=null&&r[e.id]!==void 0;return!n&&a?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!n&&!a}function Un(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function Rr(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function er(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function tr(e,t,r,n,a){var l;let o;if(e){let h=n[e];_(h,"No route found to patch children into: routeId = "+e),h.children||(h.children=[]),o=h.children}else o=r;let c=t.filter(h=>!o.some(p=>Er(h,p))),u=ft(c,a,[e||"_","patch",String(((l=o)==null?void 0:l.length)||"0")],n);o.push(...u)}function Er(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((r,n)=>{var a;return(a=t.children)==null?void 0:a.some(l=>Er(r,l))}):!1}async function Fn(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];_(a,"No route found in manifest");let l={};for(let o in n){let u=a[o]!==void 0&&o!=="hasErrorBoundary";ye(!u,'Route "'+a.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!u&&!tn.has(o)&&(l[o]=n[o])}Object.assign(a,l),Object.assign(a,H({},t(a),{lazy:void 0}))}async function _n(e){let{matches:t}=e,r=t.filter(a=>a.shouldLoad);return(await Promise.all(r.map(a=>a.resolve()))).reduce((a,l,o)=>Object.assign(a,{[r[o].route.id]:l}),{})}async function On(e,t,r,n,a,l,o,c,u,h){let p=l.map(w=>w.route.lazy?Fn(w.route,u,c):void 0),f=l.map((w,L)=>{let E=p[L],C=a.some(M=>M.route.id===w.route.id);return H({},w,{shouldLoad:C,resolve:async M=>(M&&n.method==="GET"&&(w.route.lazy||w.route.loader)&&(C=!0),C?jn(t,n,w,E,M,h):Promise.resolve({type:B.data,result:void 0}))})}),y=await e({matches:f,request:n,params:l[0].params,fetcherKey:o,context:h});try{await Promise.all(p)}catch{}return y}async function jn(e,t,r,n,a,l){let o,c,u=h=>{let p,f=new Promise((L,E)=>p=E);c=()=>p(),t.signal.addEventListener("abort",c);let y=L=>typeof h!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):h({request:t,params:r.params,context:l},...L!==void 0?[L]:[]),w=(async()=>{try{return{type:"data",result:await(a?a(E=>y(E)):y())}}catch(L){return{type:"error",result:L}}})();return Promise.race([w,f])};try{let h=r.route[e];if(n)if(h){let p,[f]=await Promise.all([u(h).catch(y=>{p=y}),n]);if(p!==void 0)throw p;o=f}else if(await n,h=r.route[e],h)o=await u(h);else if(e==="action"){let p=new URL(t.url),f=p.pathname+p.search;throw re(405,{method:t.method,pathname:f,routeId:r.route.id})}else return{type:B.data,result:void 0};else if(h)o=await u(h);else{let p=new URL(t.url),f=p.pathname+p.search;throw re(404,{pathname:f})}_(o.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(h){return{type:B.error,result:h}}finally{c&&t.signal.removeEventListener("abort",c)}return o}async function In(e){let{result:t,type:r}=e;if(xr(t)){let f;try{let y=t.headers.get("Content-Type");y&&/\bapplication\/json\b/.test(y)?t.body==null?f=null:f=await t.json():f=await t.text()}catch(y){return{type:B.error,error:y}}return r===B.error?{type:B.error,error:new ht(t.status,t.statusText,f),statusCode:t.status,headers:t.headers}:{type:B.data,data:f,statusCode:t.status,headers:t.headers}}if(r===B.error){if(sr(t)){var n,a;if(t.data instanceof Error){var l,o;return{type:B.error,error:t.data,statusCode:(l=t.init)==null?void 0:l.status,headers:(o=t.init)!=null&&o.headers?new Headers(t.init.headers):void 0}}return{type:B.error,error:new ht(((n=t.init)==null?void 0:n.status)||500,void 0,t.data),statusCode:Xe(t)?t.status:void 0,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}}return{type:B.error,error:t,statusCode:Xe(t)?t.status:void 0}}if(kn(t)){var c,u;return{type:B.deferred,deferredData:t,statusCode:(c=t.init)==null?void 0:c.status,headers:((u=t.init)==null?void 0:u.headers)&&new Headers(t.init.headers)}}if(sr(t)){var h,p;return{type:B.data,data:t.data,statusCode:(h=t.init)==null?void 0:h.status,headers:(p=t.init)!=null&&p.headers?new Headers(t.init.headers):void 0}}return{type:B.data,data:t}}function Nn(e,t,r,n,a,l){let o=e.headers.get("Location");if(_(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!Mt.test(o)){let c=n.slice(0,n.findIndex(u=>u.route.id===r)+1);o=St(new URL(t.url),c,a,!0,o,l),e.headers.set("Location",o)}return e}function rr(e,t,r,n){let a=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Mt.test(e)){let l=e,o=l.startsWith("//")?new URL(t.protocol+l):new URL(l);if(a.includes(o.protocol))throw new Error("Invalid redirect location");let c=Ae(o.pathname,r)!=null;if(o.origin===t.origin&&c)return o.pathname+o.search+o.hash}try{let l=n.createURL(e);if(a.includes(l.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Ne(e,t,r,n){let a=e.createURL(Sr(t)).toString(),l={signal:r};if(n&&oe(n.formMethod)){let{formMethod:o,formEncType:c}=n;l.method=o.toUpperCase(),c==="application/json"?(l.headers=new Headers({"Content-Type":c}),l.body=JSON.stringify(n.json)):c==="text/plain"?l.body=n.text:c==="application/x-www-form-urlencoded"&&n.formData?l.body=Pt(n.formData):l.body=n.formData}return new Request(a,l)}function Pt(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function nr(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function An(e,t,r,n,a){let l={},o=null,c,u=!1,h={},p=r&&ae(r[1])?r[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let y=f.route.id,w=t[y];if(_(!Ce(w),"Cannot handle redirect results in processLoaderData"),ae(w)){let L=w.error;p!==void 0&&(L=p,p=void 0),o=o||{};{let E=De(e,y);o[E.route.id]==null&&(o[E.route.id]=L)}l[y]=void 0,u||(u=!0,c=Xe(w.error)?w.error.status:500),w.headers&&(h[y]=w.headers)}else ge(w)?(n.set(y,w.deferredData),l[y]=w.deferredData.data,w.statusCode!=null&&w.statusCode!==200&&!u&&(c=w.statusCode),w.headers&&(h[y]=w.headers)):(l[y]=w.data,w.statusCode&&w.statusCode!==200&&!u&&(c=w.statusCode),w.headers&&(h[y]=w.headers))}),p!==void 0&&r&&(o={[r[0]]:p},l[r[0]]=void 0),{loaderData:l,errors:o,statusCode:c||200,loaderHeaders:h}}function ar(e,t,r,n,a,l,o){let{loaderData:c,errors:u}=An(t,r,n,o);return a.forEach(h=>{let{key:p,match:f,controller:y}=h,w=l[p];if(_(w,"Did not find corresponding fetcher result"),!(y&&y.signal.aborted))if(ae(w)){let L=De(e.matches,f?.route.id);u&&u[L.route.id]||(u=H({},u,{[L.route.id]:w.error})),e.fetchers.delete(p)}else if(Ce(w))_(!1,"Unhandled fetcher revalidation redirect");else if(ge(w))_(!1,"Unhandled fetcher deferred data");else{let L=ve(w.data);e.fetchers.set(p,L)}}),{loaderData:c,errors:u}}function ir(e,t,r,n){let a=H({},t);for(let l of r){let o=l.route.id;if(t.hasOwnProperty(o)?t[o]!==void 0&&(a[o]=t[o]):e[o]!==void 0&&l.route.loader&&(a[o]=e[o]),n&&n.hasOwnProperty(o))break}return a}function or(e){return e?ae(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function De(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function lr(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function re(e,t){let{pathname:r,routeId:n,method:a,type:l,message:o}=t===void 0?{}:t,c="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(c="Bad Request",a&&r&&n?u="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":l==="defer-action"?u="defer() is not supported in actions":l==="invalid-body"&&(u="Unable to encode submission body")):e===403?(c="Forbidden",u='Route "'+n+'" does not match URL "'+r+'"'):e===404?(c="Not Found",u='No route matches URL "'+r+'"'):e===405&&(c="Method Not Allowed",a&&r&&n?u="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":a&&(u='Invalid request method "'+a.toUpperCase()+'"')),new ht(e||500,c,new Error(u),!0)}function ct(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(Ce(a))return{key:n,result:a}}}function Sr(e){let t=typeof e=="string"?we(e):e;return Me(H({},t,{hash:""}))}function Bn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function zn(e){return xr(e.result)&&Pn.has(e.result.status)}function ge(e){return e.type===B.deferred}function ae(e){return e.type===B.error}function Ce(e){return(e&&e.type)===B.redirect}function sr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function kn(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function xr(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Hn(e){return xn.has(e.toLowerCase())}function oe(e){return En.has(e.toLowerCase())}async function Wn(e,t,r,n,a){let l=Object.entries(t);for(let o=0;o<l.length;o++){let[c,u]=l[o],h=e.find(y=>y?.route.id===c);if(!h)continue;let p=n.find(y=>y.route.id===h.route.id),f=p!=null&&!Rr(p,h)&&(a&&a[h.route.id])!==void 0;ge(u)&&f&&await Tt(u,r,!1).then(y=>{y&&(t[c]=y)})}}async function Vn(e,t,r){for(let n=0;n<r.length;n++){let{key:a,routeId:l,controller:o}=r[n],c=t[a];e.find(h=>h?.route.id===l)&&ge(c)&&(_(o,"Expected an AbortController for revalidating fetcher deferred result"),await Tt(c,o.signal,!0).then(h=>{h&&(t[a]=h)}))}}async function Tt(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:B.data,data:e.deferredData.unwrappedData}}catch(a){return{type:B.error,error:a}}return{type:B.data,data:e.deferredData.data}}}function Ut(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ye(e,t){let r=typeof t=="string"?we(t).search:t.search;if(e[e.length-1].route.index&&Ut(r||""))return e[e.length-1];let n=yr(e);return n[n.length-1]}function ur(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:l,json:o}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(l!=null)return{formMethod:t,formAction:r,formEncType:n,formData:l,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function Et(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function $n(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Ke(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Kn(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function ve(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Jn(e,t){try{let r=e.sessionStorage.getItem(br);if(r){let n=JSON.parse(r);for(let[a,l]of Object.entries(n||{}))l&&Array.isArray(l)&&t.set(a,new Set(l||[]))}}catch{}}function Yn(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(br,JSON.stringify(r))}catch(n){ye(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}function mt(){return mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mt.apply(this,arguments)}const pt=g.createContext(null),Pr=g.createContext(null),Te=g.createContext(null),Ft=g.createContext(null),he=g.createContext({outlet:null,matches:[],isDataRoute:!1}),Lr=g.createContext(null);function Gn(e,t){let{relative:r}=t===void 0?{}:t;Ze()||_(!1);let{basename:n,navigator:a}=g.useContext(Te),{hash:l,pathname:o,search:c}=Mr(e,{relative:r}),u=o;return n!=="/"&&(u=o==="/"?n:fe([n,o])),a.createHref({pathname:u,search:c,hash:l})}function Ze(){return g.useContext(Ft)!=null}function qe(){return Ze()||_(!1),g.useContext(Ft).location}function Dr(e){g.useContext(Te).static||g.useLayoutEffect(e)}function Cr(){let{isDataRoute:e}=g.useContext(he);return e?sa():Xn()}function Xn(){Ze()||_(!1);let e=g.useContext(pt),{basename:t,future:r,navigator:n}=g.useContext(Te),{matches:a}=g.useContext(he),{pathname:l}=qe(),o=JSON.stringify(Dt(a,r.v7_relativeSplatPath)),c=g.useRef(!1);return Dr(()=>{c.current=!0}),g.useCallback(function(h,p){if(p===void 0&&(p={}),!c.current)return;if(typeof h=="number"){n.go(h);return}let f=Ct(h,JSON.parse(o),l,p.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:fe([t,f.pathname])),(p.replace?n.replace:n.push)(f,p.state,p)},[t,n,o,l,e])}const Qn=g.createContext(null);function Zn(e){let t=g.useContext(he).outlet;return t&&g.createElement(Qn.Provider,{value:e},t)}function ja(){let{matches:e}=g.useContext(he),t=e[e.length-1];return t?t.params:{}}function Mr(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=g.useContext(Te),{matches:a}=g.useContext(he),{pathname:l}=qe(),o=JSON.stringify(Dt(a,n.v7_relativeSplatPath));return g.useMemo(()=>Ct(e,JSON.parse(o),l,r==="path"),[e,o,l,r])}function qn(e,t,r,n){Ze()||_(!1);let{navigator:a}=g.useContext(Te),{matches:l}=g.useContext(he),o=l[l.length-1],c=o?o.params:{};o&&o.pathname;let u=o?o.pathnameBase:"/";o&&o.route;let h=qe(),p;p=h;let f=p.pathname||"/",y=f;if(u!=="/"){let E=u.replace(/^\//,"").split("/");y="/"+f.replace(/^\//,"").split("/").slice(E.length).join("/")}let w=Le(e,{pathname:y});return aa(w&&w.map(E=>Object.assign({},E,{params:Object.assign({},c,E.params),pathname:fe([u,a.encodeLocation?a.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?u:fe([u,a.encodeLocation?a.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),l,r,n)}function ea(){let e=la(),t=Xe(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),r?g.createElement("pre",{style:a},r):null,null)}const ta=g.createElement(ea,null);class ra extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?g.createElement(he.Provider,{value:this.props.routeContext},g.createElement(Lr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function na(e){let{routeContext:t,match:r,children:n}=e,a=g.useContext(pt);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),g.createElement(he.Provider,{value:t},n)}function aa(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var l;if(!r)return null;if(r.errors)e=r.matches;else if((l=n)!=null&&l.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,c=(a=r)==null?void 0:a.errors;if(c!=null){let p=o.findIndex(f=>f.route.id&&c?.[f.route.id]!==void 0);p>=0||_(!1),o=o.slice(0,Math.min(o.length,p+1))}let u=!1,h=-1;if(r&&n&&n.v7_partialHydration)for(let p=0;p<o.length;p++){let f=o[p];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(h=p),f.route.id){let{loaderData:y,errors:w}=r,L=f.route.loader&&y[f.route.id]===void 0&&(!w||w[f.route.id]===void 0);if(f.route.lazy||L){u=!0,h>=0?o=o.slice(0,h+1):o=[o[0]];break}}}return o.reduceRight((p,f,y)=>{let w,L=!1,E=null,C=null;r&&(w=c&&f.route.id?c[f.route.id]:void 0,E=f.route.errorElement||ta,u&&(h<0&&y===0?(ua("route-fallback"),L=!0,C=null):h===y&&(L=!0,C=f.route.hydrateFallbackElement||null)));let A=t.concat(o.slice(0,y+1)),M=()=>{let z;return w?z=E:L?z=C:f.route.Component?z=g.createElement(f.route.Component,null):f.route.element?z=f.route.element:z=p,g.createElement(na,{match:f,routeContext:{outlet:p,matches:A,isDataRoute:r!=null},children:z})};return r&&(f.route.ErrorBoundary||f.route.errorElement||y===0)?g.createElement(ra,{location:r.location,revalidation:r.revalidation,component:E,error:w,children:M(),routeContext:{outlet:null,matches:A,isDataRoute:!0}}):M()},null)}var Tr=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(Tr||{}),Ur=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(Ur||{});function ia(e){let t=g.useContext(pt);return t||_(!1),t}function _t(e){let t=g.useContext(Pr);return t||_(!1),t}function oa(e){let t=g.useContext(he);return t||_(!1),t}function Fr(e){let t=oa(),r=t.matches[t.matches.length-1];return r.route.id||_(!1),r.route.id}function Ia(){return _t().navigation}function Na(){let{matches:e,loaderData:t}=_t();return g.useMemo(()=>e.map(r=>pr(r,t)),[e,t])}function la(){var e;let t=g.useContext(Lr),r=_t(),n=Fr();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function sa(){let{router:e}=ia(Tr.UseNavigateStable),t=Fr(Ur.UseNavigateStable),r=g.useRef(!1);return Dr(()=>{r.current=!0}),g.useCallback(function(a,l){l===void 0&&(l={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,mt({fromRouteId:t},l)))},[e,t])}const cr={};function ua(e,t,r){cr[e]||(cr[e]=!0)}function ca(e,t){e?.v7_startTransition,e?.v7_relativeSplatPath===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function Aa(e){return Zn(e.context)}function da(e){let{basename:t="/",children:r=null,location:n,navigationType:a=X.Pop,navigator:l,static:o=!1,future:c}=e;Ze()&&_(!1);let u=t.replace(/^\/*/,"/"),h=g.useMemo(()=>({basename:u,navigator:l,static:o,future:mt({v7_relativeSplatPath:!1},c)}),[u,c,l,o]);typeof n=="string"&&(n=we(n));let{pathname:p="/",search:f="",hash:y="",state:w=null,key:L="default"}=n,E=g.useMemo(()=>{let C=Ae(p,u);return C==null?null:{location:{pathname:C,search:f,hash:y,state:w,key:L},navigationType:a}},[u,p,f,y,w,L,a]);return E==null?null:g.createElement(Te.Provider,{value:h},g.createElement(Ft.Provider,{children:r,value:E}))}new Promise(()=>{});function fa(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:g.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:g.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:g.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function Qe(){return Qe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qe.apply(this,arguments)}function ha(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,l;for(l=0;l<n.length;l++)a=n[l],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function ma(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function pa(e,t){return e.button===0&&(!t||t==="_self")&&!ma(e)}function Lt(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function va(e,t){let r=Lt(e);return t&&t.forEach((n,a)=>{r.has(a)||t.getAll(a).forEach(l=>{r.append(a,l)})}),r}const ga=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],ya="6";try{window.__reactRouterVersion=ya}catch{}function Ba(e,t){return Mn({basename:void 0,future:Qe({},void 0,{v7_prependBasename:!0}),history:Zr({window:void 0}),hydrationData:wa(),routes:e,mapRouteProperties:fa,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function wa(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Qe({},t,{errors:ba(t.errors)})),t}function ba(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&a.__type==="RouteErrorResponse")r[n]=new ht(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let l=window[a.__subType];if(typeof l=="function")try{let o=new l(a.message);o.stack="",r[n]=o}catch{}}if(r[n]==null){let l=new Error(a.message);l.stack="",r[n]=l}}else r[n]=a;return r}const Ra=g.createContext({isTransitioning:!1}),Ea=g.createContext(new Map),Sa="startTransition",dr=Xr[Sa],xa="flushSync",fr=Qr[xa];function Pa(e){dr?dr(e):e()}function Je(e){fr?fr(e):e()}class La{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function za(e){let{fallbackElement:t,router:r,future:n}=e,[a,l]=g.useState(r.state),[o,c]=g.useState(),[u,h]=g.useState({isTransitioning:!1}),[p,f]=g.useState(),[y,w]=g.useState(),[L,E]=g.useState(),C=g.useRef(new Map),{v7_startTransition:A}=n||{},M=g.useCallback(U=>{A?Pa(U):U()},[A]),z=g.useCallback((U,W)=>{let{deletedFetchers:O,flushSync:q,viewTransitionOpts:Y}=W;U.fetchers.forEach((te,se)=>{te.data!==void 0&&C.current.set(se,te.data)}),O.forEach(te=>C.current.delete(te));let ne=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!Y||ne){q?Je(()=>l(U)):M(()=>l(U));return}if(q){Je(()=>{y&&(p&&p.resolve(),y.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation})});let te=r.window.document.startViewTransition(()=>{Je(()=>l(U))});te.finished.finally(()=>{Je(()=>{f(void 0),w(void 0),c(void 0),h({isTransitioning:!1})})}),Je(()=>w(te));return}y?(p&&p.resolve(),y.skipTransition(),E({state:U,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation})):(c(U),h({isTransitioning:!0,flushSync:!1,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation}))},[r.window,y,p,C,M]);g.useLayoutEffect(()=>r.subscribe(z),[r,z]),g.useEffect(()=>{u.isTransitioning&&!u.flushSync&&f(new La)},[u]),g.useEffect(()=>{if(p&&o&&r.window){let U=o,W=p.promise,O=r.window.document.startViewTransition(async()=>{M(()=>l(U)),await W});O.finished.finally(()=>{f(void 0),w(void 0),c(void 0),h({isTransitioning:!1})}),w(O)}},[M,o,p,r.window]),g.useEffect(()=>{p&&o&&a.location.key===o.location.key&&p.resolve()},[p,y,a.location,o]),g.useEffect(()=>{!u.isTransitioning&&L&&(c(L.state),h({isTransitioning:!0,flushSync:!1,currentLocation:L.currentLocation,nextLocation:L.nextLocation}),E(void 0))},[u.isTransitioning,L]),g.useEffect(()=>{},[]);let K=g.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:U=>r.navigate(U),push:(U,W,O)=>r.navigate(U,{state:W,preventScrollReset:O?.preventScrollReset}),replace:(U,W,O)=>r.navigate(U,{replace:!0,state:W,preventScrollReset:O?.preventScrollReset})}),[r]),J=r.basename||"/",be=g.useMemo(()=>({router:r,navigator:K,static:!1,basename:J}),[r,K,J]),m=g.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return g.useEffect(()=>ca(n,r.future),[n,r.future]),g.createElement(g.Fragment,null,g.createElement(pt.Provider,{value:be},g.createElement(Pr.Provider,{value:a},g.createElement(Ea.Provider,{value:C.current},g.createElement(Ra.Provider,{value:u},g.createElement(da,{basename:J,location:a.location,navigationType:a.historyAction,navigator:K,future:m},a.initialized||r.future.v7_partialHydration?g.createElement(Da,{routes:r.routes,future:r.future,state:a}):t))))),null)}const Da=g.memo(Ca);function Ca(e){let{routes:t,future:r,state:n}=e;return qn(t,void 0,n,r)}const Ma=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ta=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ka=g.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:l,replace:o,state:c,target:u,to:h,preventScrollReset:p,viewTransition:f}=t,y=ha(t,ga),{basename:w}=g.useContext(Te),L,E=!1;if(typeof h=="string"&&Ta.test(h)&&(L=h,Ma))try{let z=new URL(window.location.href),K=h.startsWith("//")?new URL(z.protocol+h):new URL(h),J=Ae(K.pathname,w);K.origin===z.origin&&J!=null?h=J+K.search+K.hash:E=!0}catch{}let C=Gn(h,{relative:a}),A=Ua(h,{replace:o,state:c,target:u,preventScrollReset:p,relative:a,viewTransition:f});function M(z){n&&n(z),z.defaultPrevented||A(z)}return g.createElement("a",Qe({},y,{href:L||C,onClick:E||l?n:M,ref:r,target:u}))});var hr;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(hr||(hr={}));var mr;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(mr||(mr={}));function Ua(e,t){let{target:r,replace:n,state:a,preventScrollReset:l,relative:o,viewTransition:c}=t===void 0?{}:t,u=Cr(),h=qe(),p=Mr(e,{relative:o});return g.useCallback(f=>{if(pa(f,r)){f.preventDefault();let y=n!==void 0?n:Me(h)===Me(p);u(e,{replace:y,state:a,preventScrollReset:l,relative:o,viewTransition:c})}},[h,u,p,n,a,r,e,l,o,c])}function Ha(e){let t=g.useRef(Lt(e)),r=g.useRef(!1),n=qe(),a=g.useMemo(()=>va(n.search,r.current?null:t.current),[n.search]),l=Cr(),o=g.useCallback((c,u)=>{const h=Lt(typeof c=="function"?c(a):c);r.current=!0,l("?"+h,u)},[l,a]);return[a,o]}export{ka as L,Aa as O,za as R,Cr as a,ja as b,Ha as c,Na as d,la as e,Ia as f,_a as g,Ba as h,Le as m,Oa as r,qe as u};
|