From 039f107608287b49f22b6dffad2966b3197f1d42 Mon Sep 17 00:00:00 2001 From: yafimski Date: Mon, 8 Jul 2024 16:16:18 +0300 Subject: [PATCH] Updates --- ...U.js => IngredientGalleryItem-CC4bRH7R.js} | 2 +- .../{index-DqEEvrmF.js => index-DCJmriXu.js} | 28 +++++++++---------- index.html | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) rename assets/{IngredientGalleryItem-BtTyqPlU.js => IngredientGalleryItem-CC4bRH7R.js} (94%) rename assets/{index-DqEEvrmF.js => index-DCJmriXu.js} (93%) diff --git a/assets/IngredientGalleryItem-BtTyqPlU.js b/assets/IngredientGalleryItem-CC4bRH7R.js similarity index 94% rename from assets/IngredientGalleryItem-BtTyqPlU.js rename to assets/IngredientGalleryItem-CC4bRH7R.js index ad3b5d7..1102d40 100644 --- a/assets/IngredientGalleryItem-BtTyqPlU.js +++ b/assets/IngredientGalleryItem-CC4bRH7R.js @@ -1 +1 @@ -import{u as a,a as u,j as s,s as m,h as x,F as g,f,b as o,c as h}from"./index-DqEEvrmF.js";function w({item:c}){const{itemName:e}=c,l=a(t=>t.groups.ingredientsGroups),r=a(t=>t.recipe.currentGroupName),n=u(),d=()=>{var t;if(!r)n(o("Ingredient group cannot be empty"));else{const p=(t=l.filter(i=>i.groupName===r)[0])==null?void 0:t.items.filter(i=>i.itemName===e)[0];n(p?o("Ingredient is already in the group!"):h({groupName:r,itemName:e}))}};return s.jsx("div",{className:"flex flex-row","data-testid":`${e}_gallery`,children:s.jsxs("div",{className:"relative flex flex-col print-rounded card-shadow w-cw aspect-videoReverse",children:[s.jsx("img",{src:`${m}/assets/ingredients/${e.toLowerCase()}.webp`,alt:e,className:"print-rounded-img"}),s.jsx("div",{className:"absolute inset-0 flex center bg-white print-rounded bg-opacity-70 opacity-0 hover:opacity-100 hover:cursor-pointer transition-opacity",onClick:()=>d(),onKeyDown:x,children:s.jsx(g,{icon:f,className:"cursor-pointer text-4xl text-green-600"})}),s.jsx("p",{className:"flex flex-grow rounded-b-2xl center px-4 text-center text-fluidPrintTitle",children:e})]})})}export{w as default}; +import{u as a,a as u,j as s,s as m,h as x,F as g,f,b as o,c as h}from"./index-DCJmriXu.js";function w({item:c}){const{itemName:e}=c,l=a(t=>t.groups.ingredientsGroups),r=a(t=>t.recipe.currentGroupName),n=u(),d=()=>{var t;if(!r)n(o("Ingredient group cannot be empty"));else{const p=(t=l.filter(i=>i.groupName===r)[0])==null?void 0:t.items.filter(i=>i.itemName===e)[0];n(p?o("Ingredient is already in the group!"):h({groupName:r,itemName:e}))}};return s.jsx("div",{className:"flex flex-row","data-testid":`${e}_gallery`,children:s.jsxs("div",{className:"relative flex flex-col print-rounded card-shadow w-cw aspect-videoReverse",children:[s.jsx("img",{src:`${m}/assets/ingredients/${e.toLowerCase()}.webp`,alt:e,className:"print-rounded-img"}),s.jsx("div",{className:"absolute inset-0 flex center bg-white print-rounded bg-opacity-70 opacity-0 hover:opacity-100 hover:cursor-pointer transition-opacity",onClick:()=>d(),onKeyDown:x,children:s.jsx(g,{icon:f,className:"cursor-pointer text-4xl text-green-600"})}),s.jsx("p",{className:"flex flex-grow rounded-b-2xl center px-4 text-center text-fluidPrintTitle",children:e})]})})}export{w as default}; diff --git a/assets/index-DqEEvrmF.js b/assets/index-DCJmriXu.js similarity index 93% rename from assets/index-DqEEvrmF.js rename to assets/index-DCJmriXu.js index 2ec924c..4948e1f 100644 --- a/assets/index-DqEEvrmF.js +++ b/assets/index-DCJmriXu.js @@ -22,7 +22,7 @@ function Xx(e,t){for(var n=0;n{throw new Error("uSES not initialized!")};function cv(e=mo){return function(){return Gn.useContext(e)}}var cb=cv(),fb=nI,rI=e=>{fb=e},iI=(e,t)=>e===t;function oI(e=mo){const t=e===mo?cb:cv(e),n=(r,o={})=>{const{equalityFn:l=iI,devModeChecks:s={}}=typeof o=="function"?{equalityFn:o}:o,{store:c,subscription:f,getServerState:h,stabilityCheck:p,identityFunctionCheck:m}=t();Gn.useRef(!0);const v=Gn.useCallback({[r.name](C){return r(C)}}[r.name],[r,p,s.stabilityCheck]),S=fb(f.addNestedSub,c.getState,h||c.getState,v,l);return Gn.useDebugValue(S),S};return Object.assign(n,{withTypes:()=>n}),n}var He=oI();function aI(e){e()}function lI(){let e=null,t=null;return{clear(){e=null,t=null},notify(){aI(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var m1={notify(){},get:()=>[]};function sI(e,t){let n,r=m1,o=0,l=!1;function s(N){p();const T=r.subscribe(N);let _=!1;return()=>{_||(_=!0,T(),m())}}function c(){r.notify()}function f(){C.onStateChange&&C.onStateChange()}function h(){return l}function p(){o++,n||(n=e.subscribe(f),r=lI())}function m(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=m1)}function v(){l||(l=!0,p())}function S(){l&&(l=!1,m())}const C={addNestedSub:s,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:h,trySubscribe:v,tryUnsubscribe:S,getListeners:()=>r};return C}var uI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",cI=typeof navigator<"u"&&navigator.product==="ReactNative",fI=uI||cI?Gn.useLayoutEffect:Gn.useEffect;function dI({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:l="once"}){const s=Gn.useMemo(()=>{const h=sI(e);return{store:e,subscription:h,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:l}},[e,r,o,l]),c=Gn.useMemo(()=>e.getState(),[e]);fI(()=>{const{subscription:h}=s;return h.onStateChange=h.notifyNestedSubs,h.trySubscribe(),c!==e.getState()&&h.notifyNestedSubs(),()=>{h.tryUnsubscribe(),h.onStateChange=void 0}},[s,c]);const f=t||mo;return Gn.createElement(f.Provider,{value:s},n)}var pI=dI;function db(e=mo){const t=e===mo?cb:cv(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var hI=db();function mI(e=mo){const t=e===mo?hI:db(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var wn=mI();rI(eI.useSyncExternalStoreWithSelector);var Ih={},pb={exports:{}},Qn={},hb={exports:{}},mb={};/** + */var au=R;function YT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var VT=typeof Object.is=="function"?Object.is:YT,qT=au.useSyncExternalStore,XT=au.useRef,QT=au.useEffect,ZT=au.useMemo,JT=au.useDebugValue;ub.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var l=XT(null);if(l.current===null){var s={hasValue:!1,value:null};l.current=s}else s=l.current;l=ZT(function(){function f(S){if(!h){if(h=!0,p=S,S=r(S),o!==void 0&&s.hasValue){var C=s.value;if(o(C,S))return m=C}return m=S}if(C=m,VT(p,S))return C;var N=r(S);return o!==void 0&&o(C,N)?C:(p=S,m=N)}var h=!1,p,m,v=n===void 0?null:n;return[function(){return f(t())},v===null?void 0:function(){return f(v())}]},[t,n,r,o]);var c=qT(e,l[0],l[1]);return QT(function(){s.hasValue=!0,s.value=c},[c]),JT(c),c};sb.exports=ub;var eI=sb.exports,Hn="default"in Th?Qe:Th,p1=Symbol.for("react-redux-context"),h1=typeof globalThis<"u"?globalThis:{};function tI(){if(!Hn.createContext)return{};const e=h1[p1]??(h1[p1]=new Map);let t=e.get(Hn.createContext);return t||(t=Hn.createContext(null),e.set(Hn.createContext,t)),t}var mo=tI(),nI=()=>{throw new Error("uSES not initialized!")};function cv(e=mo){return function(){return Hn.useContext(e)}}var cb=cv(),fb=nI,rI=e=>{fb=e},iI=(e,t)=>e===t;function oI(e=mo){const t=e===mo?cb:cv(e),n=(r,o={})=>{const{equalityFn:l=iI,devModeChecks:s={}}=typeof o=="function"?{equalityFn:o}:o,{store:c,subscription:f,getServerState:h,stabilityCheck:p,identityFunctionCheck:m}=t();Hn.useRef(!0);const v=Hn.useCallback({[r.name](C){return r(C)}}[r.name],[r,p,s.stabilityCheck]),S=fb(f.addNestedSub,c.getState,h||c.getState,v,l);return Hn.useDebugValue(S),S};return Object.assign(n,{withTypes:()=>n}),n}var He=oI();function aI(e){e()}function lI(){let e=null,t=null;return{clear(){e=null,t=null},notify(){aI(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var m1={notify(){},get:()=>[]};function sI(e,t){let n,r=m1,o=0,l=!1;function s(N){p();const T=r.subscribe(N);let _=!1;return()=>{_||(_=!0,T(),m())}}function c(){r.notify()}function f(){C.onStateChange&&C.onStateChange()}function h(){return l}function p(){o++,n||(n=e.subscribe(f),r=lI())}function m(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=m1)}function v(){l||(l=!0,p())}function S(){l&&(l=!1,m())}const C={addNestedSub:s,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:h,trySubscribe:v,tryUnsubscribe:S,getListeners:()=>r};return C}var uI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",cI=typeof navigator<"u"&&navigator.product==="ReactNative",fI=uI||cI?Hn.useLayoutEffect:Hn.useEffect;function dI({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:l="once"}){const s=Hn.useMemo(()=>{const h=sI(e);return{store:e,subscription:h,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:l}},[e,r,o,l]),c=Hn.useMemo(()=>e.getState(),[e]);fI(()=>{const{subscription:h}=s;return h.onStateChange=h.notifyNestedSubs,h.trySubscribe(),c!==e.getState()&&h.notifyNestedSubs(),()=>{h.tryUnsubscribe(),h.onStateChange=void 0}},[s,c]);const f=t||mo;return Hn.createElement(f.Provider,{value:s},n)}var pI=dI;function db(e=mo){const t=e===mo?cb:cv(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var hI=db();function mI(e=mo){const t=e===mo?hI:db(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var wn=mI();rI(eI.useSyncExternalStoreWithSelector);var Ih={},pb={exports:{}},Qn={},hb={exports:{}},mb={};/** * @license React * scheduler.production.min.js * @@ -38,14 +38,14 @@ function Xx(e,t){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ah=Object.prototype.hasOwnProperty,yI=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,v1={},g1={};function wI(e){return Ah.call(g1,e)?!0:Ah.call(v1,e)?!1:yI.test(e)?g1[e]=!0:(v1[e]=!0,!1)}function xI(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function bI(e,t,n,r){if(t===null||typeof t>"u"||xI(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function xn(e,t,n,r,o,l,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=s}var Jt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Jt[e]=new xn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Jt[t]=new xn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Jt[e]=new xn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Jt[e]=new xn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Jt[e]=new xn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Jt[e]=new xn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Jt[e]=new xn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Jt[e]=new xn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Jt[e]=new xn(e,5,!1,e.toLowerCase(),null,!1,!1)});var fv=/[\-:]([a-z])/g;function dv(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(fv,dv);Jt[t]=new xn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(fv,dv);Jt[t]=new xn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(fv,dv);Jt[t]=new xn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Jt[e]=new xn(e,1,!1,e.toLowerCase(),null,!1,!1)});Jt.xlinkHref=new xn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Jt[e]=new xn(e,1,!1,e.toLowerCase(),null,!0,!0)});function pv(e,t,n,r){var o=Jt.hasOwnProperty(t)?Jt[t]:null;(o!==null?o.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ah=Object.prototype.hasOwnProperty,yI=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,v1={},g1={};function wI(e){return Ah.call(g1,e)?!0:Ah.call(v1,e)?!1:yI.test(e)?g1[e]=!0:(v1[e]=!0,!1)}function xI(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function bI(e,t,n,r){if(t===null||typeof t>"u"||xI(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function xn(e,t,n,r,o,l,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=s}var Jt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Jt[e]=new xn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Jt[t]=new xn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Jt[e]=new xn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Jt[e]=new xn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Jt[e]=new xn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Jt[e]=new xn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Jt[e]=new xn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Jt[e]=new xn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Jt[e]=new xn(e,5,!1,e.toLowerCase(),null,!1,!1)});var fv=/[\-:]([a-z])/g;function dv(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(fv,dv);Jt[t]=new xn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(fv,dv);Jt[t]=new xn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(fv,dv);Jt[t]=new xn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Jt[e]=new xn(e,1,!1,e.toLowerCase(),null,!1,!1)});Jt.xlinkHref=new xn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Jt[e]=new xn(e,1,!1,e.toLowerCase(),null,!0,!0)});function pv(e,t,n,r){var o=Jt.hasOwnProperty(t)?Jt[t]:null;(o!==null?o.type!==0:r||!(2c||o[s]!==l[c]){var f=` -`+o[s].replace(" at new "," at ");return e.displayName&&f.includes("")&&(f=f.replace("",e.displayName)),f}while(1<=s&&0<=c);break}}}finally{Gp=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?as(e):""}function SI(e){switch(e.tag){case 5:return as(e.type);case 16:return as("Lazy");case 13:return as("Suspense");case 19:return as("SuspenseList");case 0:case 2:case 15:return e=Kp(e.type,!1),e;case 11:return e=Kp(e.type.render,!1),e;case 1:return e=Kp(e.type,!0),e;default:return""}}function jh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Fa:return"Fragment";case ja:return"Portal";case Dh:return"Profiler";case hv:return"StrictMode";case Lh:return"Suspense";case Mh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case yb:return(e.displayName||"Context")+".Consumer";case gb:return(e._context.displayName||"Context")+".Provider";case mv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case vv:return t=e.displayName||null,t!==null?t:jh(e.type)||"Memo";case Qi:t=e._payload,e=e._init;try{return jh(e(t))}catch{}}return null}function _I(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return jh(t);case 8:return t===hv?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function vo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xb(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function EI(e){var t=xb(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,l.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function cc(e){e._valueTracker||(e._valueTracker=EI(e))}function bb(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=xb(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function nf(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Fh(e,t){var n=t.checked;return gt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function w1(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=vo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Sb(e,t){t=t.checked,t!=null&&pv(e,"checked",t,!1)}function zh(e,t){Sb(e,t);var n=vo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Uh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Uh(e,t.type,vo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function x1(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Uh(e,t,n){(t!=="number"||nf(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ls=Array.isArray;function el(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=fc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ps(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ds={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},CI=["Webkit","ms","Moz","O"];Object.keys(ds).forEach(function(e){CI.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ds[t]=ds[e]})});function Nb(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ds.hasOwnProperty(e)&&ds[e]?(""+t).trim():t+"px"}function kb(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Nb(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var NI=gt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Wh(e,t){if(t){if(NI[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Q(62))}}function Hh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Gh=null;function gv(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kh=null,tl=null,nl=null;function _1(e){if(e=uu(e)){if(typeof Kh!="function")throw Error(Q(280));var t=e.stateNode;t&&(t=td(t),Kh(e.stateNode,e.type,t))}}function Rb(e){tl?nl?nl.push(e):nl=[e]:tl=e}function Ob(){if(tl){var e=tl,t=nl;if(nl=tl=null,_1(e),t)for(e=0;e>>=0,e===0?32:31-(jI(e)/FI|0)|0}var dc=64,pc=4194304;function ss(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function lf(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,l=e.pingedLanes,s=n&268435455;if(s!==0){var c=s&~o;c!==0?r=ss(c):(l&=s,l!==0&&(r=ss(l)))}else s=n&~o,s!==0?r=ss(s):l!==0&&(r=ss(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,l=t&-t,o>=l||o===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function lu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-jr(t),e[t]=n}function BI(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=hs),I1=" ",A1=!1;function qb(e,t){switch(e){case"keyup":return vA.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xb(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var za=!1;function yA(e,t){switch(e){case"compositionend":return Xb(t);case"keypress":return t.which!==32?null:(A1=!0,I1);case"textInput":return e=t.data,e===I1&&A1?null:e;default:return null}}function wA(e,t){if(za)return e==="compositionend"||!Cv&&qb(e,t)?(e=Yb(),Wc=Sv=ro=null,za=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=j1(n)}}function eS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?eS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tS(){for(var e=window,t=nf();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=nf(e.document)}return t}function Nv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function RA(e){var t=tS(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&eS(n.ownerDocument.documentElement,n)){if(r!==null&&Nv(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,l=Math.min(r.start,o);r=r.end===void 0?l:Math.min(r.end,o),!e.extend&&l>r&&(o=r,r=l,l=o),o=F1(n,l);var s=F1(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ua=null,Zh=null,vs=null,Jh=!1;function z1(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Jh||Ua==null||Ua!==nf(r)||(r=Ua,"selectionStart"in r&&Nv(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),vs&&Ms(vs,r)||(vs=r,r=cf(Zh,"onSelect"),0Wa||(e.current=om[Wa],om[Wa]=null,Wa--)}function et(e,t){Wa++,om[Wa]=e.current,e.current=t}var go={},fn=_o(go),Tn=_o(!1),na=go;function ul(e,t){var n=e.type.contextTypes;if(!n)return go;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},l;for(l in n)o[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function In(e){return e=e.childContextTypes,e!=null}function df(){at(Tn),at(fn)}function K1(e,t,n){if(fn.current!==go)throw Error(Q(168));et(fn,t),et(Tn,n)}function cS(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(Q(108,_I(e)||"Unknown",o));return gt({},n,r)}function pf(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||go,na=fn.current,et(fn,e),et(Tn,Tn.current),!0}function Y1(e,t,n){var r=e.stateNode;if(!r)throw Error(Q(169));n?(e=cS(e,t,na),r.__reactInternalMemoizedMergedChildContext=e,at(Tn),at(fn),et(fn,e)):at(Tn),et(Tn,n)}var mi=null,nd=!1,ah=!1;function fS(e){mi===null?mi=[e]:mi.push(e)}function UA(e){nd=!0,fS(e)}function Eo(){if(!ah&&mi!==null){ah=!0;var e=0,t=Ye;try{var n=mi;for(Ye=1;e>=s,o-=s,vi=1<<32-jr(t)+o|n<B?(U=k,k=null):U=k.sibling;var K=v(_,k,E[B],I);if(K===null){k===null&&(k=U);break}e&&k&&K.alternate===null&&t(_,k),b=l(K,b,B),G===null?M=K:G.sibling=K,G=K,k=U}if(B===E.length)return n(_,k),ft&&$o(_,B),M;if(k===null){for(;BB?(U=k,k=null):U=k.sibling;var Z=v(_,k,K.value,I);if(Z===null){k===null&&(k=U);break}e&&k&&Z.alternate===null&&t(_,k),b=l(Z,b,B),G===null?M=Z:G.sibling=Z,G=Z,k=U}if(K.done)return n(_,k),ft&&$o(_,B),M;if(k===null){for(;!K.done;B++,K=E.next())K=m(_,K.value,I),K!==null&&(b=l(K,b,B),G===null?M=K:G.sibling=K,G=K);return ft&&$o(_,B),M}for(k=r(_,k);!K.done;B++,K=E.next())K=S(k,_,B,K.value,I),K!==null&&(e&&K.alternate!==null&&k.delete(K.key===null?B:K.key),b=l(K,b,B),G===null?M=K:G.sibling=K,G=K);return e&&k.forEach(function(he){return t(_,he)}),ft&&$o(_,B),M}function T(_,b,E,I){if(typeof E=="object"&&E!==null&&E.type===Fa&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case uc:e:{for(var M=E.key,G=b;G!==null;){if(G.key===M){if(M=E.type,M===Fa){if(G.tag===7){n(_,G.sibling),b=o(G,E.props.children),b.return=_,_=b;break e}}else if(G.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===Qi&&X1(M)===G.type){n(_,G.sibling),b=o(G,E.props),b.ref=Jl(_,G,E),b.return=_,_=b;break e}n(_,G);break}else t(_,G);G=G.sibling}E.type===Fa?(b=ea(E.props.children,_.mode,I,E.key),b.return=_,_=b):(I=Qc(E.type,E.key,E.props,null,_.mode,I),I.ref=Jl(_,b,E),I.return=_,_=I)}return s(_);case ja:e:{for(G=E.key;b!==null;){if(b.key===G)if(b.tag===4&&b.stateNode.containerInfo===E.containerInfo&&b.stateNode.implementation===E.implementation){n(_,b.sibling),b=o(b,E.children||[]),b.return=_,_=b;break e}else{n(_,b);break}else t(_,b);b=b.sibling}b=hh(E,_.mode,I),b.return=_,_=b}return s(_);case Qi:return G=E._init,T(_,b,G(E._payload),I)}if(ls(E))return C(_,b,E,I);if(Vl(E))return N(_,b,E,I);xc(_,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,b!==null&&b.tag===6?(n(_,b.sibling),b=o(b,E),b.return=_,_=b):(n(_,b),b=ph(E,_.mode,I),b.return=_,_=b),s(_)):n(_,b)}return T}var fl=mS(!0),vS=mS(!1),vf=_o(null),gf=null,Ka=null,Pv=null;function Tv(){Pv=Ka=gf=null}function Iv(e){var t=vf.current;at(vf),e._currentValue=t}function sm(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function il(e,t){gf=e,Pv=Ka=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Pn=!0),e.firstContext=null)}function xr(e){var t=e._currentValue;if(Pv!==e)if(e={context:e,memoizedValue:t,next:null},Ka===null){if(gf===null)throw Error(Q(308));Ka=e,gf.dependencies={lanes:0,firstContext:e}}else Ka=Ka.next=e;return t}var Yo=null;function Av(e){Yo===null?Yo=[e]:Yo.push(e)}function gS(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Av(t)):(n.next=o.next,o.next=n),t.interleaved=n,Si(e,r)}function Si(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Zi=!1;function Dv(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function yS(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function yi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function co(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ze&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Si(e,n)}return o=r.interleaved,o===null?(t.next=t,Av(r)):(t.next=o.next,o.next=t),r.interleaved=t,Si(e,n)}function Gc(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wv(e,n)}}function Q1(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?o=l=s:l=l.next=s,n=n.next}while(n!==null);l===null?o=l=t:l=l.next=t}else o=l=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function yf(e,t,n,r){var o=e.updateQueue;Zi=!1;var l=o.firstBaseUpdate,s=o.lastBaseUpdate,c=o.shared.pending;if(c!==null){o.shared.pending=null;var f=c,h=f.next;f.next=null,s===null?l=h:s.next=h,s=f;var p=e.alternate;p!==null&&(p=p.updateQueue,c=p.lastBaseUpdate,c!==s&&(c===null?p.firstBaseUpdate=h:c.next=h,p.lastBaseUpdate=f))}if(l!==null){var m=o.baseState;s=0,p=h=f=null,c=l;do{var v=c.lane,S=c.eventTime;if((r&v)===v){p!==null&&(p=p.next={eventTime:S,lane:0,tag:c.tag,payload:c.payload,callback:c.callback,next:null});e:{var C=e,N=c;switch(v=t,S=n,N.tag){case 1:if(C=N.payload,typeof C=="function"){m=C.call(S,m,v);break e}m=C;break e;case 3:C.flags=C.flags&-65537|128;case 0:if(C=N.payload,v=typeof C=="function"?C.call(S,m,v):C,v==null)break e;m=gt({},m,v);break e;case 2:Zi=!0}}c.callback!==null&&c.lane!==0&&(e.flags|=64,v=o.effects,v===null?o.effects=[c]:v.push(c))}else S={eventTime:S,lane:v,tag:c.tag,payload:c.payload,callback:c.callback,next:null},p===null?(h=p=S,f=m):p=p.next=S,s|=v;if(c=c.next,c===null){if(c=o.shared.pending,c===null)break;v=c,c=v.next,v.next=null,o.lastBaseUpdate=v,o.shared.pending=null}}while(!0);if(p===null&&(f=m),o.baseState=f,o.firstBaseUpdate=h,o.lastBaseUpdate=p,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else l===null&&(o.shared.lanes=0);oa|=s,e.lanes=s,e.memoizedState=m}}function Z1(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=sh.transition;sh.transition={};try{e(!1),t()}finally{Ye=n,sh.transition=r}}function LS(){return br().memoizedState}function HA(e,t,n){var r=po(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},MS(e))jS(t,n);else if(n=gS(e,t,n,r),n!==null){var o=gn();Fr(n,e,r,o),FS(n,t,r)}}function GA(e,t,n){var r=po(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(MS(e))jS(t,o);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var s=t.lastRenderedState,c=l(s,n);if(o.hasEagerState=!0,o.eagerState=c,Ur(c,s)){var f=t.interleaved;f===null?(o.next=o,Av(t)):(o.next=f.next,f.next=o),t.interleaved=o;return}}catch{}finally{}n=gS(e,t,o,r),n!==null&&(o=gn(),Fr(n,e,r,o),FS(n,t,r))}}function MS(e){var t=e.alternate;return e===vt||t!==null&&t===vt}function jS(e,t){gs=xf=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function FS(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wv(e,n)}}var bf={readContext:xr,useCallback:ln,useContext:ln,useEffect:ln,useImperativeHandle:ln,useInsertionEffect:ln,useLayoutEffect:ln,useMemo:ln,useReducer:ln,useRef:ln,useState:ln,useDebugValue:ln,useDeferredValue:ln,useTransition:ln,useMutableSource:ln,useSyncExternalStore:ln,useId:ln,unstable_isNewReconciler:!1},KA={readContext:xr,useCallback:function(e,t){return Xr().memoizedState=[e,t===void 0?null:t],e},useContext:xr,useEffect:ew,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Yc(4194308,4,PS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Yc(4194308,4,e,t)},useInsertionEffect:function(e,t){return Yc(4,2,e,t)},useMemo:function(e,t){var n=Xr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Xr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=HA.bind(null,vt,e),[r.memoizedState,e]},useRef:function(e){var t=Xr();return e={current:e},t.memoizedState=e},useState:J1,useDebugValue:Bv,useDeferredValue:function(e){return Xr().memoizedState=e},useTransition:function(){var e=J1(!1),t=e[0];return e=WA.bind(null,e[1]),Xr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=vt,o=Xr();if(ft){if(n===void 0)throw Error(Q(407));n=n()}else{if(n=t(),Ht===null)throw Error(Q(349));ia&30||SS(r,t,n)}o.memoizedState=n;var l={value:n,getSnapshot:t};return o.queue=l,ew(ES.bind(null,r,l,e),[e]),r.flags|=2048,Hs(9,_S.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=Xr(),t=Ht.identifierPrefix;if(ft){var n=gi,r=vi;n=(r&~(1<<32-jr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Bs++,0")&&(f=f.replace("",e.displayName)),f}while(1<=s&&0<=c);break}}}finally{Gp=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?as(e):""}function SI(e){switch(e.tag){case 5:return as(e.type);case 16:return as("Lazy");case 13:return as("Suspense");case 19:return as("SuspenseList");case 0:case 2:case 15:return e=Kp(e.type,!1),e;case 11:return e=Kp(e.type.render,!1),e;case 1:return e=Kp(e.type,!0),e;default:return""}}function jh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Fa:return"Fragment";case ja:return"Portal";case Dh:return"Profiler";case hv:return"StrictMode";case Lh:return"Suspense";case Mh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case yb:return(e.displayName||"Context")+".Consumer";case gb:return(e._context.displayName||"Context")+".Provider";case mv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case vv:return t=e.displayName||null,t!==null?t:jh(e.type)||"Memo";case Qi:t=e._payload,e=e._init;try{return jh(e(t))}catch{}}return null}function _I(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return jh(t);case 8:return t===hv?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function vo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xb(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function EI(e){var t=xb(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,l.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function cc(e){e._valueTracker||(e._valueTracker=EI(e))}function bb(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=xb(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function nf(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Fh(e,t){var n=t.checked;return gt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function w1(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=vo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Sb(e,t){t=t.checked,t!=null&&pv(e,"checked",t,!1)}function zh(e,t){Sb(e,t);var n=vo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Uh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Uh(e,t.type,vo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function x1(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Uh(e,t,n){(t!=="number"||nf(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ls=Array.isArray;function el(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=fc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ps(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ds={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},CI=["Webkit","ms","Moz","O"];Object.keys(ds).forEach(function(e){CI.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ds[t]=ds[e]})});function Nb(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ds.hasOwnProperty(e)&&ds[e]?(""+t).trim():t+"px"}function kb(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Nb(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var NI=gt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Wh(e,t){if(t){if(NI[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Q(62))}}function Hh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Gh=null;function gv(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kh=null,tl=null,nl=null;function _1(e){if(e=uu(e)){if(typeof Kh!="function")throw Error(Q(280));var t=e.stateNode;t&&(t=td(t),Kh(e.stateNode,e.type,t))}}function Rb(e){tl?nl?nl.push(e):nl=[e]:tl=e}function Ob(){if(tl){var e=tl,t=nl;if(nl=tl=null,_1(e),t)for(e=0;e>>=0,e===0?32:31-(jI(e)/FI|0)|0}var dc=64,pc=4194304;function ss(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function lf(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,l=e.pingedLanes,s=n&268435455;if(s!==0){var c=s&~o;c!==0?r=ss(c):(l&=s,l!==0&&(r=ss(l)))}else s=n&~o,s!==0?r=ss(s):l!==0&&(r=ss(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,l=t&-t,o>=l||o===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function lu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-jr(t),e[t]=n}function BI(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=hs),I1=" ",A1=!1;function qb(e,t){switch(e){case"keyup":return vA.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xb(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var za=!1;function yA(e,t){switch(e){case"compositionend":return Xb(t);case"keypress":return t.which!==32?null:(A1=!0,I1);case"textInput":return e=t.data,e===I1&&A1?null:e;default:return null}}function wA(e,t){if(za)return e==="compositionend"||!Cv&&qb(e,t)?(e=Yb(),Wc=Sv=ro=null,za=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=j1(n)}}function eS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?eS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tS(){for(var e=window,t=nf();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=nf(e.document)}return t}function Nv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function RA(e){var t=tS(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&eS(n.ownerDocument.documentElement,n)){if(r!==null&&Nv(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,l=Math.min(r.start,o);r=r.end===void 0?l:Math.min(r.end,o),!e.extend&&l>r&&(o=r,r=l,l=o),o=F1(n,l);var s=F1(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ua=null,Zh=null,vs=null,Jh=!1;function z1(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Jh||Ua==null||Ua!==nf(r)||(r=Ua,"selectionStart"in r&&Nv(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),vs&&Ms(vs,r)||(vs=r,r=cf(Zh,"onSelect"),0Wa||(e.current=om[Wa],om[Wa]=null,Wa--)}function et(e,t){Wa++,om[Wa]=e.current,e.current=t}var go={},fn=_o(go),Tn=_o(!1),na=go;function ul(e,t){var n=e.type.contextTypes;if(!n)return go;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},l;for(l in n)o[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function In(e){return e=e.childContextTypes,e!=null}function df(){at(Tn),at(fn)}function K1(e,t,n){if(fn.current!==go)throw Error(Q(168));et(fn,t),et(Tn,n)}function cS(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(Q(108,_I(e)||"Unknown",o));return gt({},n,r)}function pf(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||go,na=fn.current,et(fn,e),et(Tn,Tn.current),!0}function Y1(e,t,n){var r=e.stateNode;if(!r)throw Error(Q(169));n?(e=cS(e,t,na),r.__reactInternalMemoizedMergedChildContext=e,at(Tn),at(fn),et(fn,e)):at(Tn),et(Tn,n)}var mi=null,nd=!1,ah=!1;function fS(e){mi===null?mi=[e]:mi.push(e)}function UA(e){nd=!0,fS(e)}function Eo(){if(!ah&&mi!==null){ah=!0;var e=0,t=Ye;try{var n=mi;for(Ye=1;e>=s,o-=s,vi=1<<32-jr(t)+o|n<B?(U=k,k=null):U=k.sibling;var K=v(_,k,E[B],I);if(K===null){k===null&&(k=U);break}e&&k&&K.alternate===null&&t(_,k),b=l(K,b,B),G===null?M=K:G.sibling=K,G=K,k=U}if(B===E.length)return n(_,k),ft&&$o(_,B),M;if(k===null){for(;BB?(U=k,k=null):U=k.sibling;var Z=v(_,k,K.value,I);if(Z===null){k===null&&(k=U);break}e&&k&&Z.alternate===null&&t(_,k),b=l(Z,b,B),G===null?M=Z:G.sibling=Z,G=Z,k=U}if(K.done)return n(_,k),ft&&$o(_,B),M;if(k===null){for(;!K.done;B++,K=E.next())K=m(_,K.value,I),K!==null&&(b=l(K,b,B),G===null?M=K:G.sibling=K,G=K);return ft&&$o(_,B),M}for(k=r(_,k);!K.done;B++,K=E.next())K=S(k,_,B,K.value,I),K!==null&&(e&&K.alternate!==null&&k.delete(K.key===null?B:K.key),b=l(K,b,B),G===null?M=K:G.sibling=K,G=K);return e&&k.forEach(function(he){return t(_,he)}),ft&&$o(_,B),M}function T(_,b,E,I){if(typeof E=="object"&&E!==null&&E.type===Fa&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case uc:e:{for(var M=E.key,G=b;G!==null;){if(G.key===M){if(M=E.type,M===Fa){if(G.tag===7){n(_,G.sibling),b=o(G,E.props.children),b.return=_,_=b;break e}}else if(G.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===Qi&&X1(M)===G.type){n(_,G.sibling),b=o(G,E.props),b.ref=Jl(_,G,E),b.return=_,_=b;break e}n(_,G);break}else t(_,G);G=G.sibling}E.type===Fa?(b=ea(E.props.children,_.mode,I,E.key),b.return=_,_=b):(I=Qc(E.type,E.key,E.props,null,_.mode,I),I.ref=Jl(_,b,E),I.return=_,_=I)}return s(_);case ja:e:{for(G=E.key;b!==null;){if(b.key===G)if(b.tag===4&&b.stateNode.containerInfo===E.containerInfo&&b.stateNode.implementation===E.implementation){n(_,b.sibling),b=o(b,E.children||[]),b.return=_,_=b;break e}else{n(_,b);break}else t(_,b);b=b.sibling}b=hh(E,_.mode,I),b.return=_,_=b}return s(_);case Qi:return G=E._init,T(_,b,G(E._payload),I)}if(ls(E))return C(_,b,E,I);if(Vl(E))return N(_,b,E,I);xc(_,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,b!==null&&b.tag===6?(n(_,b.sibling),b=o(b,E),b.return=_,_=b):(n(_,b),b=ph(E,_.mode,I),b.return=_,_=b),s(_)):n(_,b)}return T}var fl=mS(!0),vS=mS(!1),vf=_o(null),gf=null,Ka=null,Pv=null;function Tv(){Pv=Ka=gf=null}function Iv(e){var t=vf.current;at(vf),e._currentValue=t}function sm(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function il(e,t){gf=e,Pv=Ka=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Pn=!0),e.firstContext=null)}function xr(e){var t=e._currentValue;if(Pv!==e)if(e={context:e,memoizedValue:t,next:null},Ka===null){if(gf===null)throw Error(Q(308));Ka=e,gf.dependencies={lanes:0,firstContext:e}}else Ka=Ka.next=e;return t}var Yo=null;function Av(e){Yo===null?Yo=[e]:Yo.push(e)}function gS(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Av(t)):(n.next=o.next,o.next=n),t.interleaved=n,Si(e,r)}function Si(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Zi=!1;function Dv(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function yS(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function yi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function co(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ze&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Si(e,n)}return o=r.interleaved,o===null?(t.next=t,Av(r)):(t.next=o.next,o.next=t),r.interleaved=t,Si(e,n)}function Gc(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wv(e,n)}}function Q1(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?o=l=s:l=l.next=s,n=n.next}while(n!==null);l===null?o=l=t:l=l.next=t}else o=l=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function yf(e,t,n,r){var o=e.updateQueue;Zi=!1;var l=o.firstBaseUpdate,s=o.lastBaseUpdate,c=o.shared.pending;if(c!==null){o.shared.pending=null;var f=c,h=f.next;f.next=null,s===null?l=h:s.next=h,s=f;var p=e.alternate;p!==null&&(p=p.updateQueue,c=p.lastBaseUpdate,c!==s&&(c===null?p.firstBaseUpdate=h:c.next=h,p.lastBaseUpdate=f))}if(l!==null){var m=o.baseState;s=0,p=h=f=null,c=l;do{var v=c.lane,S=c.eventTime;if((r&v)===v){p!==null&&(p=p.next={eventTime:S,lane:0,tag:c.tag,payload:c.payload,callback:c.callback,next:null});e:{var C=e,N=c;switch(v=t,S=n,N.tag){case 1:if(C=N.payload,typeof C=="function"){m=C.call(S,m,v);break e}m=C;break e;case 3:C.flags=C.flags&-65537|128;case 0:if(C=N.payload,v=typeof C=="function"?C.call(S,m,v):C,v==null)break e;m=gt({},m,v);break e;case 2:Zi=!0}}c.callback!==null&&c.lane!==0&&(e.flags|=64,v=o.effects,v===null?o.effects=[c]:v.push(c))}else S={eventTime:S,lane:v,tag:c.tag,payload:c.payload,callback:c.callback,next:null},p===null?(h=p=S,f=m):p=p.next=S,s|=v;if(c=c.next,c===null){if(c=o.shared.pending,c===null)break;v=c,c=v.next,v.next=null,o.lastBaseUpdate=v,o.shared.pending=null}}while(!0);if(p===null&&(f=m),o.baseState=f,o.firstBaseUpdate=h,o.lastBaseUpdate=p,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else l===null&&(o.shared.lanes=0);oa|=s,e.lanes=s,e.memoizedState=m}}function Z1(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=sh.transition;sh.transition={};try{e(!1),t()}finally{Ye=n,sh.transition=r}}function LS(){return br().memoizedState}function HA(e,t,n){var r=po(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},MS(e))jS(t,n);else if(n=gS(e,t,n,r),n!==null){var o=gn();Fr(n,e,r,o),FS(n,t,r)}}function GA(e,t,n){var r=po(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(MS(e))jS(t,o);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var s=t.lastRenderedState,c=l(s,n);if(o.hasEagerState=!0,o.eagerState=c,Ur(c,s)){var f=t.interleaved;f===null?(o.next=o,Av(t)):(o.next=f.next,f.next=o),t.interleaved=o;return}}catch{}finally{}n=gS(e,t,o,r),n!==null&&(o=gn(),Fr(n,e,r,o),FS(n,t,r))}}function MS(e){var t=e.alternate;return e===vt||t!==null&&t===vt}function jS(e,t){gs=xf=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function FS(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wv(e,n)}}var bf={readContext:xr,useCallback:ln,useContext:ln,useEffect:ln,useImperativeHandle:ln,useInsertionEffect:ln,useLayoutEffect:ln,useMemo:ln,useReducer:ln,useRef:ln,useState:ln,useDebugValue:ln,useDeferredValue:ln,useTransition:ln,useMutableSource:ln,useSyncExternalStore:ln,useId:ln,unstable_isNewReconciler:!1},KA={readContext:xr,useCallback:function(e,t){return Xr().memoizedState=[e,t===void 0?null:t],e},useContext:xr,useEffect:ew,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Yc(4194308,4,PS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Yc(4194308,4,e,t)},useInsertionEffect:function(e,t){return Yc(4,2,e,t)},useMemo:function(e,t){var n=Xr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Xr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=HA.bind(null,vt,e),[r.memoizedState,e]},useRef:function(e){var t=Xr();return e={current:e},t.memoizedState=e},useState:J1,useDebugValue:Bv,useDeferredValue:function(e){return Xr().memoizedState=e},useTransition:function(){var e=J1(!1),t=e[0];return e=WA.bind(null,e[1]),Xr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=vt,o=Xr();if(ft){if(n===void 0)throw Error(Q(407));n=n()}else{if(n=t(),Ht===null)throw Error(Q(349));ia&30||SS(r,t,n)}o.memoizedState=n;var l={value:n,getSnapshot:t};return o.queue=l,ew(ES.bind(null,r,l,e),[e]),r.flags|=2048,Hs(9,_S.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=Xr(),t=Ht.identifierPrefix;if(ft){var n=gi,r=vi;n=(r&~(1<<32-jr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Bs++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Zr]=t,e[zs]=r,VS(e,t,!1,!1),t.stateNode=e;e:{switch(s=Hh(n,r),n){case"dialog":it("cancel",e),it("close",e),o=r;break;case"iframe":case"object":case"embed":it("load",e),o=r;break;case"video":case"audio":for(o=0;ohl&&(t.flags|=128,r=!0,es(l,!1),t.lanes=4194304)}else{if(!r)if(e=wf(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),es(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!ft)return sn(t),null}else 2*Ct()-l.renderingStartTime>hl&&n!==1073741824&&(t.flags|=128,r=!0,es(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(n=l.last,n!==null?n.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Ct(),t.sibling=null,n=mt.current,et(mt,r?n&1|2:n&1),t):(sn(t),null);case 22:case 23:return Vv(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Hn&1073741824&&(sn(t),t.subtreeFlags&6&&(t.flags|=8192)):sn(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function e3(e,t){switch(Rv(t),t.tag){case 1:return In(t.type)&&df(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return dl(),at(Tn),at(fn),jv(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Mv(t),null;case 13:if(at(mt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));cl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return at(mt),null;case 4:return dl(),null;case 10:return Iv(t.type._context),null;case 22:case 23:return Vv(),null;case 24:return null;default:return null}}var Sc=!1,cn=!1,t3=typeof WeakSet=="function"?WeakSet:Set,ue=null;function Ya(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wt(e,t,r)}else n.current=null}function gm(e,t,n){try{n()}catch(r){wt(e,t,r)}}var fw=!1;function n3(e,t){if(em=sf,e=tS(),Nv(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var s=0,c=-1,f=-1,h=0,p=0,m=e,v=null;t:for(;;){for(var S;m!==n||o!==0&&m.nodeType!==3||(c=s+o),m!==l||r!==0&&m.nodeType!==3||(f=s+r),m.nodeType===3&&(s+=m.nodeValue.length),(S=m.firstChild)!==null;)v=m,m=S;for(;;){if(m===e)break t;if(v===n&&++h===o&&(c=s),v===l&&++p===r&&(f=s),(S=m.nextSibling)!==null)break;m=v,v=m.parentNode}m=S}n=c===-1||f===-1?null:{start:c,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(tm={focusedElem:e,selectionRange:n},sf=!1,ue=t;ue!==null;)if(t=ue,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ue=e;else for(;ue!==null;){t=ue;try{var C=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(C!==null){var N=C.memoizedProps,T=C.memoizedState,_=t.stateNode,b=_.getSnapshotBeforeUpdate(t.elementType===t.type?N:Or(t.type,N),T);_.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(I){wt(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,ue=e;break}ue=t.return}return C=fw,fw=!1,C}function ys(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var l=o.destroy;o.destroy=void 0,l!==void 0&&gm(t,n,l)}o=o.next}while(o!==r)}}function od(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ym(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function QS(e){var t=e.alternate;t!==null&&(e.alternate=null,QS(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Zr],delete t[zs],delete t[im],delete t[FA],delete t[zA])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ZS(e){return e.tag===5||e.tag===3||e.tag===4}function dw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ZS(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function wm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ff));else if(r!==4&&(e=e.child,e!==null))for(wm(e,t,n),e=e.sibling;e!==null;)wm(e,t,n),e=e.sibling}function xm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(xm(e,t,n),e=e.sibling;e!==null;)xm(e,t,n),e=e.sibling}var Qt=null,Tr=!1;function Vi(e,t,n){for(n=n.child;n!==null;)JS(e,t,n),n=n.sibling}function JS(e,t,n){if(ti&&typeof ti.onCommitFiberUnmount=="function")try{ti.onCommitFiberUnmount(Qf,n)}catch{}switch(n.tag){case 5:cn||Ya(n,t);case 6:var r=Qt,o=Tr;Qt=null,Vi(e,t,n),Qt=r,Tr=o,Qt!==null&&(Tr?(e=Qt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Qt.removeChild(n.stateNode));break;case 18:Qt!==null&&(Tr?(e=Qt,n=n.stateNode,e.nodeType===8?oh(e.parentNode,n):e.nodeType===1&&oh(e,n),Ds(e)):oh(Qt,n.stateNode));break;case 4:r=Qt,o=Tr,Qt=n.stateNode.containerInfo,Tr=!0,Vi(e,t,n),Qt=r,Tr=o;break;case 0:case 11:case 14:case 15:if(!cn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var l=o,s=l.destroy;l=l.tag,s!==void 0&&(l&2||l&4)&&gm(n,t,s),o=o.next}while(o!==r)}Vi(e,t,n);break;case 1:if(!cn&&(Ya(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(c){wt(n,t,c)}Vi(e,t,n);break;case 21:Vi(e,t,n);break;case 22:n.mode&1?(cn=(r=cn)||n.memoizedState!==null,Vi(e,t,n),cn=r):Vi(e,t,n);break;default:Vi(e,t,n)}}function pw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new t3),t.forEach(function(r){var o=f3.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Rr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~l}if(r=o,r=Ct()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*i3(r/1960))-r,10e?16:e,io===null)var r=!1;else{if(e=io,io=null,Ef=0,ze&6)throw Error(Q(331));var o=ze;for(ze|=4,ue=e.current;ue!==null;){var l=ue,s=l.child;if(ue.flags&16){var c=l.deletions;if(c!==null){for(var f=0;fCt()-Kv?Jo(e,0):Gv|=n),An(e,t)}function l_(e,t){t===0&&(e.mode&1?(t=pc,pc<<=1,!(pc&130023424)&&(pc=4194304)):t=1);var n=gn();e=Si(e,t),e!==null&&(lu(e,t,n),An(e,n))}function c3(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),l_(e,n)}function f3(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Q(314))}r!==null&&r.delete(t),l_(e,n)}var s_;s_=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Tn.current)Pn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Pn=!1,ZA(e,t,n);Pn=!!(e.flags&131072)}else Pn=!1,ft&&t.flags&1048576&&dS(t,mf,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vc(e,t),e=t.pendingProps;var o=ul(t,fn.current);il(t,n),o=zv(null,t,r,e,o,n);var l=Uv();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,In(r)?(l=!0,pf(t)):l=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Dv(t),o.updater=id,t.stateNode=o,o._reactInternals=t,cm(t,r,e,n),t=pm(null,t,r,!0,l,n)):(t.tag=0,ft&&l&&kv(t),vn(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vc(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=p3(r),e=Or(r,e),o){case 0:t=dm(null,t,r,e,n);break e;case 1:t=sw(null,t,r,e,n);break e;case 11:t=aw(null,t,r,e,n);break e;case 14:t=lw(null,t,r,Or(r.type,e),n);break e}throw Error(Q(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Or(r,o),dm(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Or(r,o),sw(e,t,r,o,n);case 3:e:{if(GS(t),e===null)throw Error(Q(387));r=t.pendingProps,l=t.memoizedState,o=l.element,yS(e,t),yf(t,r,null,n);var s=t.memoizedState;if(r=s.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){o=pl(Error(Q(423)),t),t=uw(e,t,r,n,o);break e}else if(r!==o){o=pl(Error(Q(424)),t),t=uw(e,t,r,n,o);break e}else for(Kn=uo(t.stateNode.containerInfo.firstChild),Yn=t,ft=!0,Ar=null,n=vS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(cl(),r===o){t=_i(e,t,n);break e}vn(e,t,r,n)}t=t.child}return t;case 5:return wS(t),e===null&&lm(t),r=t.type,o=t.pendingProps,l=e!==null?e.memoizedProps:null,s=o.children,nm(r,o)?s=null:l!==null&&nm(r,l)&&(t.flags|=32),HS(e,t),vn(e,t,s,n),t.child;case 6:return e===null&&lm(t),null;case 13:return KS(e,t,n);case 4:return Lv(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=fl(t,null,r,n):vn(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Or(r,o),aw(e,t,r,o,n);case 7:return vn(e,t,t.pendingProps,n),t.child;case 8:return vn(e,t,t.pendingProps.children,n),t.child;case 12:return vn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,l=t.memoizedProps,s=o.value,et(vf,r._currentValue),r._currentValue=s,l!==null)if(Ur(l.value,s)){if(l.children===o.children&&!Tn.current){t=_i(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var c=l.dependencies;if(c!==null){s=l.child;for(var f=c.firstContext;f!==null;){if(f.context===r){if(l.tag===1){f=yi(-1,n&-n),f.tag=2;var h=l.updateQueue;if(h!==null){h=h.shared;var p=h.pending;p===null?f.next=f:(f.next=p.next,p.next=f),h.pending=f}}l.lanes|=n,f=l.alternate,f!==null&&(f.lanes|=n),sm(l.return,n,t),c.lanes|=n;break}f=f.next}}else if(l.tag===10)s=l.type===t.type?null:l.child;else if(l.tag===18){if(s=l.return,s===null)throw Error(Q(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),sm(s,n,t),s=l.sibling}else s=l.child;if(s!==null)s.return=l;else for(s=l;s!==null;){if(s===t){s=null;break}if(l=s.sibling,l!==null){l.return=s.return,s=l;break}s=s.return}l=s}vn(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,il(t,n),o=xr(o),r=r(o),t.flags|=1,vn(e,t,r,n),t.child;case 14:return r=t.type,o=Or(r,t.pendingProps),o=Or(r.type,o),lw(e,t,r,o,n);case 15:return BS(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Or(r,o),Vc(e,t),t.tag=1,In(r)?(e=!0,pf(t)):e=!1,il(t,n),zS(t,r,o),cm(t,r,o,n),pm(null,t,r,!0,e,n);case 19:return YS(e,t,n);case 22:return WS(e,t,n)}throw Error(Q(156,t.tag))};function u_(e,t){return Mb(e,t)}function d3(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yr(e,t,n,r){return new d3(e,t,n,r)}function Xv(e){return e=e.prototype,!(!e||!e.isReactComponent)}function p3(e){if(typeof e=="function")return Xv(e)?1:0;if(e!=null){if(e=e.$$typeof,e===mv)return 11;if(e===vv)return 14}return 2}function ho(e,t){var n=e.alternate;return n===null?(n=yr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Qc(e,t,n,r,o,l){var s=2;if(r=e,typeof e=="function")Xv(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Fa:return ea(n.children,o,l,t);case hv:s=8,o|=8;break;case Dh:return e=yr(12,n,t,o|2),e.elementType=Dh,e.lanes=l,e;case Lh:return e=yr(13,n,t,o),e.elementType=Lh,e.lanes=l,e;case Mh:return e=yr(19,n,t,o),e.elementType=Mh,e.lanes=l,e;case wb:return ld(n,o,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gb:s=10;break e;case yb:s=9;break e;case mv:s=11;break e;case vv:s=14;break e;case Qi:s=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=yr(s,n,t,o),t.elementType=e,t.type=r,t.lanes=l,t}function ea(e,t,n,r){return e=yr(7,e,r,t),e.lanes=n,e}function ld(e,t,n,r){return e=yr(22,e,r,t),e.elementType=wb,e.lanes=n,e.stateNode={isHidden:!1},e}function ph(e,t,n){return e=yr(6,e,null,t),e.lanes=n,e}function hh(e,t,n){return t=yr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function h3(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Vp(0),this.expirationTimes=Vp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vp(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Qv(e,t,n,r,o,l,s,c,f){return e=new h3(e,t,n,c,f),t===1?(t=1,l===!0&&(t|=8)):t=0,l=yr(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Dv(l),e}function m3(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(p_)}catch(e){console.error(e)}}p_(),pb.exports=Qn;var Jr=pb.exports;const x3=qf(Jr),b3=Xx({__proto__:null,default:x3},[Jr]);var bw=Jr;Ih.createRoot=bw.createRoot,Ih.hydrateRoot=bw.hydrateRoot;/** +`+l.stack}return{value:e,source:t,stack:o,digest:null}}function fh(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function fm(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var qA=typeof WeakMap=="function"?WeakMap:Map;function US(e,t,n){n=yi(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){_f||(_f=!0,bm=r),fm(e,t)},n}function $S(e,t,n){n=yi(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){fm(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){fm(e,t),typeof r!="function"&&(fo===null?fo=new Set([this]):fo.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function rw(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new qA;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=u3.bind(null,e,t,n),t.then(e,e))}function iw(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function ow(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=yi(-1,1),t.tag=2,co(n,t,1))),n.lanes|=1),e)}var XA=Oi.ReactCurrentOwner,Pn=!1;function vn(e,t,n,r){t.child=e===null?vS(t,null,n,r):fl(t,e.child,n,r)}function aw(e,t,n,r,o){n=n.render;var l=t.ref;return il(t,o),r=zv(e,t,n,r,l,o),n=Uv(),e!==null&&!Pn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,_i(e,t,o)):(ft&&n&&kv(t),t.flags|=1,vn(e,t,r,o),t.child)}function lw(e,t,n,r,o){if(e===null){var l=n.type;return typeof l=="function"&&!Xv(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,BS(e,t,l,r,o)):(e=Qc(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&o)){var s=l.memoizedProps;if(n=n.compare,n=n!==null?n:Ms,n(s,r)&&e.ref===t.ref)return _i(e,t,o)}return t.flags|=1,e=ho(l,r),e.ref=t.ref,e.return=t,t.child=e}function BS(e,t,n,r,o){if(e!==null){var l=e.memoizedProps;if(Ms(l,r)&&e.ref===t.ref)if(Pn=!1,t.pendingProps=r=l,(e.lanes&o)!==0)e.flags&131072&&(Pn=!0);else return t.lanes=e.lanes,_i(e,t,o)}return dm(e,t,n,r,o)}function WS(e,t,n){var r=t.pendingProps,o=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},et(Va,Wn),Wn|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,et(Va,Wn),Wn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,et(Va,Wn),Wn|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,et(Va,Wn),Wn|=r;return vn(e,t,o,n),t.child}function HS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function dm(e,t,n,r,o){var l=In(n)?na:fn.current;return l=ul(t,l),il(t,o),n=zv(e,t,n,r,l,o),r=Uv(),e!==null&&!Pn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,_i(e,t,o)):(ft&&r&&kv(t),t.flags|=1,vn(e,t,n,o),t.child)}function sw(e,t,n,r,o){if(In(n)){var l=!0;pf(t)}else l=!1;if(il(t,o),t.stateNode===null)Vc(e,t),zS(t,n,r),cm(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,c=t.memoizedProps;s.props=c;var f=s.context,h=n.contextType;typeof h=="object"&&h!==null?h=xr(h):(h=In(n)?na:fn.current,h=ul(t,h));var p=n.getDerivedStateFromProps,m=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function";m||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(c!==r||f!==h)&&nw(t,s,r,h),Zi=!1;var v=t.memoizedState;s.state=v,yf(t,r,s,o),f=t.memoizedState,c!==r||v!==f||Tn.current||Zi?(typeof p=="function"&&(um(t,n,p,r),f=t.memoizedState),(c=Zi||tw(t,n,c,r,v,f,h))?(m||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=f),s.props=r,s.state=f,s.context=h,r=c):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,yS(e,t),c=t.memoizedProps,h=t.type===t.elementType?c:Or(t.type,c),s.props=h,m=t.pendingProps,v=s.context,f=n.contextType,typeof f=="object"&&f!==null?f=xr(f):(f=In(n)?na:fn.current,f=ul(t,f));var S=n.getDerivedStateFromProps;(p=typeof S=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(c!==m||v!==f)&&nw(t,s,r,f),Zi=!1,v=t.memoizedState,s.state=v,yf(t,r,s,o);var C=t.memoizedState;c!==m||v!==C||Tn.current||Zi?(typeof S=="function"&&(um(t,n,S,r),C=t.memoizedState),(h=Zi||tw(t,n,h,r,v,C,f)||!1)?(p||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,C,f),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,C,f)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||c===e.memoizedProps&&v===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&v===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=C),s.props=r,s.state=C,s.context=f,r=h):(typeof s.componentDidUpdate!="function"||c===e.memoizedProps&&v===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&v===e.memoizedState||(t.flags|=1024),r=!1)}return pm(e,t,n,r,l,o)}function pm(e,t,n,r,o,l){HS(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&Y1(t,n,!1),_i(e,t,l);r=t.stateNode,XA.current=t;var c=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=fl(t,e.child,null,l),t.child=fl(t,null,c,l)):vn(e,t,c,l),t.memoizedState=r.state,o&&Y1(t,n,!0),t.child}function GS(e){var t=e.stateNode;t.pendingContext?K1(e,t.pendingContext,t.pendingContext!==t.context):t.context&&K1(e,t.context,!1),Lv(e,t.containerInfo)}function uw(e,t,n,r,o){return cl(),Ov(o),t.flags|=256,vn(e,t,n,r),t.child}var hm={dehydrated:null,treeContext:null,retryLane:0};function mm(e){return{baseLanes:e,cachePool:null,transitions:null}}function KS(e,t,n){var r=t.pendingProps,o=mt.current,l=!1,s=(t.flags&128)!==0,c;if((c=s)||(c=e!==null&&e.memoizedState===null?!1:(o&2)!==0),c?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),et(mt,o&1),e===null)return lm(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,l?(r=t.mode,l=t.child,s={mode:"hidden",children:s},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=s):l=ld(s,r,0,null),e=ea(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=mm(n),t.memoizedState=hm,e):Wv(t,s));if(o=e.memoizedState,o!==null&&(c=o.dehydrated,c!==null))return QA(e,t,s,r,c,o,n);if(l){l=r.fallback,s=t.mode,o=e.child,c=o.sibling;var f={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=f,t.deletions=null):(r=ho(o,f),r.subtreeFlags=o.subtreeFlags&14680064),c!==null?l=ho(c,l):(l=ea(l,s,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,s=e.child.memoizedState,s=s===null?mm(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},l.memoizedState=s,l.childLanes=e.childLanes&~n,t.memoizedState=hm,r}return l=e.child,e=l.sibling,r=ho(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Wv(e,t){return t=ld({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function bc(e,t,n,r){return r!==null&&Ov(r),fl(t,e.child,null,n),e=Wv(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function QA(e,t,n,r,o,l,s){if(n)return t.flags&256?(t.flags&=-257,r=fh(Error(Q(422))),bc(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,o=t.mode,r=ld({mode:"visible",children:r.children},o,0,null),l=ea(l,o,s,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&fl(t,e.child,null,s),t.child.memoizedState=mm(s),t.memoizedState=hm,l);if(!(t.mode&1))return bc(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var c=r.dgst;return r=c,l=Error(Q(419)),r=fh(l,r,void 0),bc(e,t,s,r)}if(c=(s&e.childLanes)!==0,Pn||c){if(r=Ht,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==l.retryLane&&(l.retryLane=o,Si(e,o),Fr(r,e,o,-1))}return qv(),r=fh(Error(Q(421))),bc(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=c3.bind(null,e),o._reactRetry=t,null):(e=l.treeContext,Gn=uo(o.nextSibling),Kn=t,ft=!0,Ar=null,e!==null&&(mr[vr++]=vi,mr[vr++]=gi,mr[vr++]=ra,vi=e.id,gi=e.overflow,ra=t),t=Wv(t,r.children),t.flags|=4096,t)}function cw(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),sm(e.return,t,n)}function dh(e,t,n,r,o){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=o)}function YS(e,t,n){var r=t.pendingProps,o=r.revealOrder,l=r.tail;if(vn(e,t,r.children,n),r=mt.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&cw(e,n,t);else if(e.tag===19)cw(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(et(mt,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&wf(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),dh(t,!1,o,n,l);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&wf(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}dh(t,!0,n,null,l);break;case"together":dh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Vc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function _i(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),oa|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Q(153));if(t.child!==null){for(e=t.child,n=ho(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ho(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ZA(e,t,n){switch(t.tag){case 3:GS(t),cl();break;case 5:wS(t);break;case 1:In(t.type)&&pf(t);break;case 4:Lv(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;et(vf,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(et(mt,mt.current&1),t.flags|=128,null):n&t.child.childLanes?KS(e,t,n):(et(mt,mt.current&1),e=_i(e,t,n),e!==null?e.sibling:null);et(mt,mt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return YS(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),et(mt,mt.current),r)break;return null;case 22:case 23:return t.lanes=0,WS(e,t,n)}return _i(e,t,n)}var VS,vm,qS,XS;VS=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};vm=function(){};qS=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Vo(ni.current);var l=null;switch(n){case"input":o=Fh(e,o),r=Fh(e,r),l=[];break;case"select":o=gt({},o,{value:void 0}),r=gt({},r,{value:void 0}),l=[];break;case"textarea":o=$h(e,o),r=$h(e,r),l=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ff)}Wh(n,r);var s;n=null;for(h in o)if(!r.hasOwnProperty(h)&&o.hasOwnProperty(h)&&o[h]!=null)if(h==="style"){var c=o[h];for(s in c)c.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else h!=="dangerouslySetInnerHTML"&&h!=="children"&&h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&h!=="autoFocus"&&(Os.hasOwnProperty(h)?l||(l=[]):(l=l||[]).push(h,null));for(h in r){var f=r[h];if(c=o!=null?o[h]:void 0,r.hasOwnProperty(h)&&f!==c&&(f!=null||c!=null))if(h==="style")if(c){for(s in c)!c.hasOwnProperty(s)||f&&f.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in f)f.hasOwnProperty(s)&&c[s]!==f[s]&&(n||(n={}),n[s]=f[s])}else n||(l||(l=[]),l.push(h,n)),n=f;else h==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,c=c?c.__html:void 0,f!=null&&c!==f&&(l=l||[]).push(h,f)):h==="children"?typeof f!="string"&&typeof f!="number"||(l=l||[]).push(h,""+f):h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&(Os.hasOwnProperty(h)?(f!=null&&h==="onScroll"&&it("scroll",e),l||c===f||(l=[])):(l=l||[]).push(h,f))}n&&(l=l||[]).push("style",n);var h=l;(t.updateQueue=h)&&(t.flags|=4)}};XS=function(e,t,n,r){n!==r&&(t.flags|=4)};function es(e,t){if(!ft)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function sn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function JA(e,t,n){var r=t.pendingProps;switch(Rv(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return sn(t),null;case 1:return In(t.type)&&df(),sn(t),null;case 3:return r=t.stateNode,dl(),at(Tn),at(fn),jv(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(wc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ar!==null&&(Em(Ar),Ar=null))),vm(e,t),sn(t),null;case 5:Mv(t);var o=Vo($s.current);if(n=t.type,e!==null&&t.stateNode!=null)qS(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Q(166));return sn(t),null}if(e=Vo(ni.current),wc(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[Zr]=t,r[zs]=l,e=(t.mode&1)!==0,n){case"dialog":it("cancel",r),it("close",r);break;case"iframe":case"object":case"embed":it("load",r);break;case"video":case"audio":for(o=0;o<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Zr]=t,e[zs]=r,VS(e,t,!1,!1),t.stateNode=e;e:{switch(s=Hh(n,r),n){case"dialog":it("cancel",e),it("close",e),o=r;break;case"iframe":case"object":case"embed":it("load",e),o=r;break;case"video":case"audio":for(o=0;ohl&&(t.flags|=128,r=!0,es(l,!1),t.lanes=4194304)}else{if(!r)if(e=wf(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),es(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!ft)return sn(t),null}else 2*Ct()-l.renderingStartTime>hl&&n!==1073741824&&(t.flags|=128,r=!0,es(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(n=l.last,n!==null?n.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Ct(),t.sibling=null,n=mt.current,et(mt,r?n&1|2:n&1),t):(sn(t),null);case 22:case 23:return Vv(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Wn&1073741824&&(sn(t),t.subtreeFlags&6&&(t.flags|=8192)):sn(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function e3(e,t){switch(Rv(t),t.tag){case 1:return In(t.type)&&df(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return dl(),at(Tn),at(fn),jv(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Mv(t),null;case 13:if(at(mt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));cl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return at(mt),null;case 4:return dl(),null;case 10:return Iv(t.type._context),null;case 22:case 23:return Vv(),null;case 24:return null;default:return null}}var Sc=!1,cn=!1,t3=typeof WeakSet=="function"?WeakSet:Set,ue=null;function Ya(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wt(e,t,r)}else n.current=null}function gm(e,t,n){try{n()}catch(r){wt(e,t,r)}}var fw=!1;function n3(e,t){if(em=sf,e=tS(),Nv(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var s=0,c=-1,f=-1,h=0,p=0,m=e,v=null;t:for(;;){for(var S;m!==n||o!==0&&m.nodeType!==3||(c=s+o),m!==l||r!==0&&m.nodeType!==3||(f=s+r),m.nodeType===3&&(s+=m.nodeValue.length),(S=m.firstChild)!==null;)v=m,m=S;for(;;){if(m===e)break t;if(v===n&&++h===o&&(c=s),v===l&&++p===r&&(f=s),(S=m.nextSibling)!==null)break;m=v,v=m.parentNode}m=S}n=c===-1||f===-1?null:{start:c,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(tm={focusedElem:e,selectionRange:n},sf=!1,ue=t;ue!==null;)if(t=ue,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ue=e;else for(;ue!==null;){t=ue;try{var C=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(C!==null){var N=C.memoizedProps,T=C.memoizedState,_=t.stateNode,b=_.getSnapshotBeforeUpdate(t.elementType===t.type?N:Or(t.type,N),T);_.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(I){wt(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,ue=e;break}ue=t.return}return C=fw,fw=!1,C}function ys(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var l=o.destroy;o.destroy=void 0,l!==void 0&&gm(t,n,l)}o=o.next}while(o!==r)}}function od(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ym(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function QS(e){var t=e.alternate;t!==null&&(e.alternate=null,QS(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Zr],delete t[zs],delete t[im],delete t[FA],delete t[zA])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ZS(e){return e.tag===5||e.tag===3||e.tag===4}function dw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ZS(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function wm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ff));else if(r!==4&&(e=e.child,e!==null))for(wm(e,t,n),e=e.sibling;e!==null;)wm(e,t,n),e=e.sibling}function xm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(xm(e,t,n),e=e.sibling;e!==null;)xm(e,t,n),e=e.sibling}var Qt=null,Tr=!1;function Vi(e,t,n){for(n=n.child;n!==null;)JS(e,t,n),n=n.sibling}function JS(e,t,n){if(ti&&typeof ti.onCommitFiberUnmount=="function")try{ti.onCommitFiberUnmount(Qf,n)}catch{}switch(n.tag){case 5:cn||Ya(n,t);case 6:var r=Qt,o=Tr;Qt=null,Vi(e,t,n),Qt=r,Tr=o,Qt!==null&&(Tr?(e=Qt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Qt.removeChild(n.stateNode));break;case 18:Qt!==null&&(Tr?(e=Qt,n=n.stateNode,e.nodeType===8?oh(e.parentNode,n):e.nodeType===1&&oh(e,n),Ds(e)):oh(Qt,n.stateNode));break;case 4:r=Qt,o=Tr,Qt=n.stateNode.containerInfo,Tr=!0,Vi(e,t,n),Qt=r,Tr=o;break;case 0:case 11:case 14:case 15:if(!cn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var l=o,s=l.destroy;l=l.tag,s!==void 0&&(l&2||l&4)&&gm(n,t,s),o=o.next}while(o!==r)}Vi(e,t,n);break;case 1:if(!cn&&(Ya(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(c){wt(n,t,c)}Vi(e,t,n);break;case 21:Vi(e,t,n);break;case 22:n.mode&1?(cn=(r=cn)||n.memoizedState!==null,Vi(e,t,n),cn=r):Vi(e,t,n);break;default:Vi(e,t,n)}}function pw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new t3),t.forEach(function(r){var o=f3.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Rr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~l}if(r=o,r=Ct()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*i3(r/1960))-r,10e?16:e,io===null)var r=!1;else{if(e=io,io=null,Ef=0,ze&6)throw Error(Q(331));var o=ze;for(ze|=4,ue=e.current;ue!==null;){var l=ue,s=l.child;if(ue.flags&16){var c=l.deletions;if(c!==null){for(var f=0;fCt()-Kv?Jo(e,0):Gv|=n),An(e,t)}function l_(e,t){t===0&&(e.mode&1?(t=pc,pc<<=1,!(pc&130023424)&&(pc=4194304)):t=1);var n=gn();e=Si(e,t),e!==null&&(lu(e,t,n),An(e,n))}function c3(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),l_(e,n)}function f3(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Q(314))}r!==null&&r.delete(t),l_(e,n)}var s_;s_=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Tn.current)Pn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Pn=!1,ZA(e,t,n);Pn=!!(e.flags&131072)}else Pn=!1,ft&&t.flags&1048576&&dS(t,mf,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vc(e,t),e=t.pendingProps;var o=ul(t,fn.current);il(t,n),o=zv(null,t,r,e,o,n);var l=Uv();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,In(r)?(l=!0,pf(t)):l=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Dv(t),o.updater=id,t.stateNode=o,o._reactInternals=t,cm(t,r,e,n),t=pm(null,t,r,!0,l,n)):(t.tag=0,ft&&l&&kv(t),vn(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vc(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=p3(r),e=Or(r,e),o){case 0:t=dm(null,t,r,e,n);break e;case 1:t=sw(null,t,r,e,n);break e;case 11:t=aw(null,t,r,e,n);break e;case 14:t=lw(null,t,r,Or(r.type,e),n);break e}throw Error(Q(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Or(r,o),dm(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Or(r,o),sw(e,t,r,o,n);case 3:e:{if(GS(t),e===null)throw Error(Q(387));r=t.pendingProps,l=t.memoizedState,o=l.element,yS(e,t),yf(t,r,null,n);var s=t.memoizedState;if(r=s.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){o=pl(Error(Q(423)),t),t=uw(e,t,r,n,o);break e}else if(r!==o){o=pl(Error(Q(424)),t),t=uw(e,t,r,n,o);break e}else for(Gn=uo(t.stateNode.containerInfo.firstChild),Kn=t,ft=!0,Ar=null,n=vS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(cl(),r===o){t=_i(e,t,n);break e}vn(e,t,r,n)}t=t.child}return t;case 5:return wS(t),e===null&&lm(t),r=t.type,o=t.pendingProps,l=e!==null?e.memoizedProps:null,s=o.children,nm(r,o)?s=null:l!==null&&nm(r,l)&&(t.flags|=32),HS(e,t),vn(e,t,s,n),t.child;case 6:return e===null&&lm(t),null;case 13:return KS(e,t,n);case 4:return Lv(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=fl(t,null,r,n):vn(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Or(r,o),aw(e,t,r,o,n);case 7:return vn(e,t,t.pendingProps,n),t.child;case 8:return vn(e,t,t.pendingProps.children,n),t.child;case 12:return vn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,l=t.memoizedProps,s=o.value,et(vf,r._currentValue),r._currentValue=s,l!==null)if(Ur(l.value,s)){if(l.children===o.children&&!Tn.current){t=_i(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var c=l.dependencies;if(c!==null){s=l.child;for(var f=c.firstContext;f!==null;){if(f.context===r){if(l.tag===1){f=yi(-1,n&-n),f.tag=2;var h=l.updateQueue;if(h!==null){h=h.shared;var p=h.pending;p===null?f.next=f:(f.next=p.next,p.next=f),h.pending=f}}l.lanes|=n,f=l.alternate,f!==null&&(f.lanes|=n),sm(l.return,n,t),c.lanes|=n;break}f=f.next}}else if(l.tag===10)s=l.type===t.type?null:l.child;else if(l.tag===18){if(s=l.return,s===null)throw Error(Q(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),sm(s,n,t),s=l.sibling}else s=l.child;if(s!==null)s.return=l;else for(s=l;s!==null;){if(s===t){s=null;break}if(l=s.sibling,l!==null){l.return=s.return,s=l;break}s=s.return}l=s}vn(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,il(t,n),o=xr(o),r=r(o),t.flags|=1,vn(e,t,r,n),t.child;case 14:return r=t.type,o=Or(r,t.pendingProps),o=Or(r.type,o),lw(e,t,r,o,n);case 15:return BS(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Or(r,o),Vc(e,t),t.tag=1,In(r)?(e=!0,pf(t)):e=!1,il(t,n),zS(t,r,o),cm(t,r,o,n),pm(null,t,r,!0,e,n);case 19:return YS(e,t,n);case 22:return WS(e,t,n)}throw Error(Q(156,t.tag))};function u_(e,t){return Mb(e,t)}function d3(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yr(e,t,n,r){return new d3(e,t,n,r)}function Xv(e){return e=e.prototype,!(!e||!e.isReactComponent)}function p3(e){if(typeof e=="function")return Xv(e)?1:0;if(e!=null){if(e=e.$$typeof,e===mv)return 11;if(e===vv)return 14}return 2}function ho(e,t){var n=e.alternate;return n===null?(n=yr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Qc(e,t,n,r,o,l){var s=2;if(r=e,typeof e=="function")Xv(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Fa:return ea(n.children,o,l,t);case hv:s=8,o|=8;break;case Dh:return e=yr(12,n,t,o|2),e.elementType=Dh,e.lanes=l,e;case Lh:return e=yr(13,n,t,o),e.elementType=Lh,e.lanes=l,e;case Mh:return e=yr(19,n,t,o),e.elementType=Mh,e.lanes=l,e;case wb:return ld(n,o,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gb:s=10;break e;case yb:s=9;break e;case mv:s=11;break e;case vv:s=14;break e;case Qi:s=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return t=yr(s,n,t,o),t.elementType=e,t.type=r,t.lanes=l,t}function ea(e,t,n,r){return e=yr(7,e,r,t),e.lanes=n,e}function ld(e,t,n,r){return e=yr(22,e,r,t),e.elementType=wb,e.lanes=n,e.stateNode={isHidden:!1},e}function ph(e,t,n){return e=yr(6,e,null,t),e.lanes=n,e}function hh(e,t,n){return t=yr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function h3(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Vp(0),this.expirationTimes=Vp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vp(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Qv(e,t,n,r,o,l,s,c,f){return e=new h3(e,t,n,c,f),t===1?(t=1,l===!0&&(t|=8)):t=0,l=yr(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Dv(l),e}function m3(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(p_)}catch(e){console.error(e)}}p_(),pb.exports=Qn;var Jr=pb.exports;const x3=qf(Jr),b3=Xx({__proto__:null,default:x3},[Jr]);var bw=Jr;Ih.createRoot=bw.createRoot,Ih.hydrateRoot=bw.hydrateRoot;/** * @remix-run/router v1.16.1 * * Copyright (c) Remix Software Inc. @@ -54,7 +54,7 @@ Error generating stack: `+l.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function ht(){return ht=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function ml(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function _3(){return Math.random().toString(36).substr(2,8)}function _w(e,t){return{usr:e.state,key:e.key,idx:t}}function Ks(e,t,n,r){return n===void 0&&(n=null),ht({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Co(t):t,{state:n,key:t&&t.key||r||_3()})}function la(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Co(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function E3(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:l=!1}=r,s=o.history,c=kt.Pop,f=null,h=p();h==null&&(h=0,s.replaceState(ht({},s.state,{idx:h}),""));function p(){return(s.state||{idx:null}).idx}function m(){c=kt.Pop;let T=p(),_=T==null?null:T-h;h=T,f&&f({action:c,location:N.location,delta:_})}function v(T,_){c=kt.Push;let b=Ks(N.location,T,_);h=p()+1;let E=_w(b,h),I=N.createHref(b);try{s.pushState(E,"",I)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;o.location.assign(I)}l&&f&&f({action:c,location:N.location,delta:1})}function S(T,_){c=kt.Replace;let b=Ks(N.location,T,_);h=p();let E=_w(b,h),I=N.createHref(b);s.replaceState(E,"",I),l&&f&&f({action:c,location:N.location,delta:0})}function C(T){let _=o.location.origin!=="null"?o.location.origin:o.location.href,b=typeof T=="string"?T:la(T);return b=b.replace(/ $/,"%20"),Ae(_,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,_)}let N={get action(){return c},get location(){return e(o,s)},listen(T){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(Sw,m),f=T,()=>{o.removeEventListener(Sw,m),f=null}},createHref(T){return t(o,T)},createURL:C,encodeLocation(T){let _=C(T);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:v,replace:S,go(T){return s.go(T)}};return N}var ct;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ct||(ct={}));const C3=new Set(["lazy","caseSensitive","path","id","index","children"]);function N3(e){return e.index===!0}function Cm(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,l)=>{let s=[...n,l],c=typeof o.id=="string"?o.id:s.join("-");if(Ae(o.index!==!0||!o.children,"Cannot specify children on an index route"),Ae(!r[c],'Found a route id collision on id "'+c+`". Route id's must be globally unique within Data Router usages`),N3(o)){let f=ht({},o,t(o),{id:c});return r[c]=f,f}else{let f=ht({},o,t(o),{id:c,children:void 0});return r[c]=f,o.children&&(f.children=Cm(o.children,t,s,r)),f}})}function qa(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Co(t):t,o=El(r.pathname||"/",n);if(o==null)return null;let l=h_(e);R3(l);let s=null;for(let c=0;s==null&&c{let f={relativePath:c===void 0?l.path||"":c,caseSensitive:l.caseSensitive===!0,childrenIndex:s,route:l};f.relativePath.startsWith("/")&&(Ae(f.relativePath.startsWith(r),'Absolute route path "'+f.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),f.relativePath=f.relativePath.slice(r.length));let h=wi([r,f.relativePath]),p=n.concat(f);l.children&&l.children.length>0&&(Ae(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),h_(l.children,t,p,h)),!(l.path==null&&!l.index)&&t.push({path:h,score:L3(h,l.index),routesMeta:p})};return e.forEach((l,s)=>{var c;if(l.path===""||!((c=l.path)!=null&&c.includes("?")))o(l,s);else for(let f of m_(l.path))o(l,s,f)}),t}function m_(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),l=n.replace(/\?$/,"");if(r.length===0)return o?[l,""]:[l];let s=m_(r.join("/")),c=[];return c.push(...s.map(f=>f===""?l:[l,f].join("/"))),o&&c.push(...s),c.map(f=>e.startsWith("/")&&f===""?"/":f)}function R3(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:M3(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const O3=/^:[\w-]+$/,P3=3,T3=2,I3=1,A3=10,D3=-2,Ew=e=>e==="*";function L3(e,t){let n=e.split("/"),r=n.length;return n.some(Ew)&&(r+=D3),t&&(r+=T3),n.filter(o=>!Ew(o)).reduce((o,l)=>o+(O3.test(l)?P3:l===""?I3:A3),r)}function M3(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function j3(e,t){let{routesMeta:n}=e,r={},o="/",l=[];for(let s=0;s{let{paramName:v,isOptional:S}=p;if(v==="*"){let N=c[m]||"";s=l.slice(0,l.length-N.length).replace(/(.)\/+$/,"$1")}const C=c[m];return S&&!C?h[v]=void 0:h[v]=(C||"").replace(/%2F/g,"/"),h},{}),pathname:l,pathnameBase:s,pattern:e}}function z3(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ml(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=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,c,f)=>(r.push({paramName:c,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function U3(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ml(!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 El(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 $3(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Co(e):e;return{pathname:n?n.startsWith("/")?n:B3(n,t):t,search:H3(r),hash:G3(o)}}function B3(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function mh(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 and the router will parse it for you.'}function v_(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function tg(e,t){let n=v_(e);return t?n.map((r,o)=>o===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function ng(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=Co(e):(o=ht({},e),Ae(!o.pathname||!o.pathname.includes("?"),mh("?","pathname","search",o)),Ae(!o.pathname||!o.pathname.includes("#"),mh("#","pathname","hash",o)),Ae(!o.search||!o.search.includes("#"),mh("#","search","hash",o)));let l=e===""||o.pathname==="",s=l?"/":o.pathname,c;if(s==null)c=n;else{let m=t.length-1;if(!r&&s.startsWith("..")){let v=s.split("/");for(;v[0]==="..";)v.shift(),m-=1;o.pathname=v.join("/")}c=m>=0?t[m]:"/"}let f=$3(o,c),h=s&&s!=="/"&&s.endsWith("/"),p=(l||s===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(h||p)&&(f.pathname+="/"),f}const wi=e=>e.join("/").replace(/\/\/+/g,"/"),W3=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),H3=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,G3=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class rg{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function ig(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const g_=["post","put","patch","delete"],K3=new Set(g_),Y3=["get",...g_],V3=new Set(Y3),q3=new Set([301,302,303,307,308]),X3=new Set([307,308]),vh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Q3={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ns={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},og=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Z3=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),y_="remix-router-transitions";function J3(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;Ae(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let A=e.detectErrorBoundary;o=j=>({hasErrorBoundary:A(j)})}else o=Z3;let l={},s=Cm(e.routes,o,void 0,l),c,f=e.basename||"/",h=e.unstable_dataStrategy||r4,p=ht({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),m=null,v=new Set,S=null,C=null,N=null,T=e.hydrationData!=null,_=qa(s,e.history.location,f),b=null;if(_==null){let A=dr(404,{pathname:e.history.location.pathname}),{matches:j,route:W}=Dw(s);_=j,b={[W.id]:A}}let E,I=_.some(A=>A.route.lazy),M=_.some(A=>A.route.loader);if(I)E=!1;else if(!M)E=!0;else if(p.v7_partialHydration){let A=e.hydrationData?e.hydrationData.loaderData:null,j=e.hydrationData?e.hydrationData.errors:null,W=X=>X.route.loader?typeof X.route.loader=="function"&&X.route.loader.hydrate===!0?!1:A&&A[X.route.id]!==void 0||j&&j[X.route.id]!==void 0:!0;if(j){let X=_.findIndex(ee=>j[ee.route.id]!==void 0);E=_.slice(0,X+1).every(W)}else E=_.every(W)}else E=e.hydrationData!=null;let G,k={historyAction:e.history.action,location:e.history.location,matches:_,initialized:E,navigation:vh,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||b,fetchers:new Map,blockers:new Map},B=kt.Pop,U=!1,K,Z=!1,he=new Map,be=null,J=!1,oe=!1,Ne=[],F=[],z=new Map,te=0,ne=-1,ae=new Map,pe=new Set,Fe=new Map,Ve=new Map,qe=new Set,Me=new Map,bt=new Map,Mt=!1;function Gt(){if(m=e.history.listen(A=>{let{action:j,location:W,delta:X}=A;if(Mt){Mt=!1;return}ml(bt.size===0||X!=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 ee=ga({currentLocation:k.location,nextLocation:W,historyAction:j});if(ee&&X!=null){Mt=!0,e.history.go(X*-1),_r(ee,{state:"blocked",location:W,proceed(){_r(ee,{state:"proceeding",proceed:void 0,reset:void 0,location:W}),e.history.go(X)},reset(){let ge=new Map(k.blockers);ge.set(ee,ns),Ge({blockers:ge})}});return}return en(j,W)}),n){m4(t,he);let A=()=>v4(t,he);t.addEventListener("pagehide",A),be=()=>t.removeEventListener("pagehide",A)}return k.initialized||en(kt.Pop,k.location,{initialHydration:!0}),G}function Ue(){m&&m(),be&&be(),v.clear(),K&&K.abort(),k.fetchers.forEach((A,j)=>En(j)),k.blockers.forEach((A,j)=>Mi(j))}function er(A){return v.add(A),()=>v.delete(A)}function Ge(A,j){j===void 0&&(j={}),k=ht({},k,A);let W=[],X=[];p.v7_fetcherPersist&&k.fetchers.forEach((ee,ge)=>{ee.state==="idle"&&(qe.has(ge)?X.push(ge):W.push(ge))}),[...v].forEach(ee=>ee(k,{deletedFetchers:X,unstable_viewTransitionOpts:j.viewTransitionOpts,unstable_flushSync:j.flushSync===!0})),p.v7_fetcherPersist&&(W.forEach(ee=>k.fetchers.delete(ee)),X.forEach(ee=>En(ee)))}function dn(A,j,W){var X,ee;let{flushSync:ge}=W===void 0?{}:W,ce=k.actionData!=null&&k.navigation.formMethod!=null&&Ir(k.navigation.formMethod)&&k.navigation.state==="loading"&&((X=A.state)==null?void 0:X._isRedirect)!==!0,ie;j.actionData?Object.keys(j.actionData).length>0?ie=j.actionData:ie=null:ce?ie=k.actionData:ie=null;let ye=j.loaderData?Iw(k.loaderData,j.loaderData,j.matches||[],j.errors):k.loaderData,Se=k.blockers;Se.size>0&&(Se=new Map(Se),Se.forEach((me,Ze)=>Se.set(Ze,ns)));let tt=U===!0||k.navigation.formMethod!=null&&Ir(k.navigation.formMethod)&&((ee=A.state)==null?void 0:ee._isRedirect)!==!0;c&&(s=c,c=void 0),J||B===kt.Pop||(B===kt.Push?e.history.push(A,A.state):B===kt.Replace&&e.history.replace(A,A.state));let nt;if(B===kt.Pop){let me=he.get(k.location.pathname);me&&me.has(A.pathname)?nt={currentLocation:k.location,nextLocation:A}:he.has(A.pathname)&&(nt={currentLocation:A,nextLocation:k.location})}else if(Z){let me=he.get(k.location.pathname);me?me.add(A.pathname):(me=new Set([A.pathname]),he.set(k.location.pathname,me)),nt={currentLocation:k.location,nextLocation:A}}Ge(ht({},j,{actionData:ie,loaderData:ye,historyAction:B,location:A,initialized:!0,navigation:vh,revalidation:"idle",restoreScrollPosition:Ut(A,j.matches||k.matches),preventScrollReset:tt,blockers:Se}),{viewTransitionOpts:nt,flushSync:ge===!0}),B=kt.Pop,U=!1,Z=!1,J=!1,oe=!1,Ne=[],F=[]}async function st(A,j){if(typeof A=="number"){e.history.go(A);return}let W=Nm(k.location,k.matches,f,p.v7_prependBasename,A,p.v7_relativeSplatPath,j==null?void 0:j.fromRouteId,j==null?void 0:j.relative),{path:X,submission:ee,error:ge}=Cw(p.v7_normalizeFormMethod,!1,W,j),ce=k.location,ie=Ks(k.location,X,j&&j.state);ie=ht({},ie,e.history.encodeLocation(ie));let ye=j&&j.replace!=null?j.replace:void 0,Se=kt.Push;ye===!0?Se=kt.Replace:ye===!1||ee!=null&&Ir(ee.formMethod)&&ee.formAction===k.location.pathname+k.location.search&&(Se=kt.Replace);let tt=j&&"preventScrollReset"in j?j.preventScrollReset===!0:void 0,nt=(j&&j.unstable_flushSync)===!0,me=ga({currentLocation:ce,nextLocation:ie,historyAction:Se});if(me){_r(me,{state:"blocked",location:ie,proceed(){_r(me,{state:"proceeding",proceed:void 0,reset:void 0,location:ie}),st(A,j)},reset(){let Ze=new Map(k.blockers);Ze.set(me,ns),Ge({blockers:Ze})}});return}return await en(Se,ie,{submission:ee,pendingError:ge,preventScrollReset:tt,replace:j&&j.replace,enableViewTransition:j&&j.unstable_viewTransition,flushSync:nt})}function Sn(){if(Sr(),Ge({revalidation:"loading"}),k.navigation.state!=="submitting"){if(k.navigation.state==="idle"){en(k.historyAction,k.location,{startUninterruptedRevalidation:!0});return}en(B||k.historyAction,k.navigation.location,{overrideNavigation:k.navigation})}}async function en(A,j,W){K&&K.abort(),K=null,B=A,J=(W&&W.startUninterruptedRevalidation)===!0,zt(k.location,k.matches),U=(W&&W.preventScrollReset)===!0,Z=(W&&W.enableViewTransition)===!0;let X=c||s,ee=W&&W.overrideNavigation,ge=qa(X,j,f),ce=(W&&W.flushSync)===!0;if(!ge){let me=dr(404,{pathname:j.pathname}),{matches:Ze,route:Nt}=Dw(X);Oo(),dn(j,{matches:Ze,loaderData:{},errors:{[Nt.id]:me}},{flushSync:ce});return}if(k.initialized&&!oe&&u4(k.location,j)&&!(W&&W.submission&&Ir(W.submission.formMethod))){dn(j,{matches:ge},{flushSync:ce});return}K=new AbortController;let ie=Ma(e.history,j,K.signal,W&&W.submission),ye;if(W&&W.pendingError)ye=[bs(ge).route.id,{type:ct.error,error:W.pendingError}];else if(W&&W.submission&&Ir(W.submission.formMethod)){let me=await _n(ie,j,W.submission,ge,{replace:W.replace,flushSync:ce});if(me.shortCircuited)return;ye=me.pendingActionResult,ee=gh(j,W.submission),ce=!1,ie=Ma(e.history,ie.url,ie.signal)}let{shortCircuited:Se,loaderData:tt,errors:nt}=await No(ie,j,ge,ee,W&&W.submission,W&&W.fetcherSubmission,W&&W.replace,W&&W.initialHydration===!0,ce,ye);Se||(K=null,dn(j,ht({matches:ge},Aw(ye),{loaderData:tt,errors:nt})))}async function _n(A,j,W,X,ee){ee===void 0&&(ee={}),Sr();let ge=p4(j,W);Ge({navigation:ge},{flushSync:ee.flushSync===!0});let ce,ie=Rm(X,j);if(!ie.route.action&&!ie.route.lazy)ce={type:ct.error,error:dr(405,{method:A.method,pathname:j.pathname,routeId:ie.route.id})};else if(ce=(await jn("action",A,[ie],X))[0],A.signal.aborted)return{shortCircuited:!0};if(Xo(ce)){let ye;return ee&&ee.replace!=null?ye=ee.replace:ye=Ow(ce.response.headers.get("Location"),new URL(A.url),f)===k.location.pathname+k.location.search,await nn(A,ce,{submission:W,replace:ye}),{shortCircuited:!0}}if(qo(ce))throw dr(400,{type:"defer-action"});if(gr(ce)){let ye=bs(X,ie.route.id);return(ee&&ee.replace)!==!0&&(B=kt.Push),{pendingActionResult:[ye.route.id,ce]}}return{pendingActionResult:[ie.route.id,ce]}}async function No(A,j,W,X,ee,ge,ce,ie,ye,Se){let tt=X||gh(j,ee),nt=ee||ge||jw(tt),me=c||s,[Ze,Nt]=Nw(e.history,k,W,nt,j,p.v7_partialHydration&&ie===!0,p.unstable_skipActionErrorRevalidation,oe,Ne,F,qe,Fe,pe,me,f,Se);if(Oo(Oe=>!(W&&W.some(Kt=>Kt.route.id===Oe))||Ze&&Ze.some(Kt=>Kt.route.id===Oe)),ne=++te,Ze.length===0&&Nt.length===0){let Oe=Ai();return dn(j,ht({matches:W,loaderData:{},errors:Se&&gr(Se[1])?{[Se[0]]:Se[1].error}:null},Aw(Se),Oe?{fetchers:new Map(k.fetchers)}:{}),{flushSync:ye}),{shortCircuited:!0}}if(!J&&(!p.v7_partialHydration||!ie)){Nt.forEach(Kt=>{let Yt=k.fetchers.get(Kt.key),Ot=rs(void 0,Yt?Yt.data:void 0);k.fetchers.set(Kt.key,Ot)});let Oe;Se&&!gr(Se[1])?Oe={[Se[0]]:Se[1].data}:k.actionData&&(Object.keys(k.actionData).length===0?Oe=null:Oe=k.actionData),Ge(ht({navigation:tt},Oe!==void 0?{actionData:Oe}:{},Nt.length>0?{fetchers:new Map(k.fetchers)}:{}),{flushSync:ye})}Nt.forEach(Oe=>{z.has(Oe.key)&&St(Oe.key),Oe.controller&&z.set(Oe.key,Oe.controller)});let Po=()=>Nt.forEach(Oe=>St(Oe.key));K&&K.signal.addEventListener("abort",Po);let{loaderResults:Gr,fetcherResults:ii}=await Ro(k.matches,W,Ze,Nt,A);if(A.signal.aborted)return{shortCircuited:!0};K&&K.signal.removeEventListener("abort",Po),Nt.forEach(Oe=>z.delete(Oe.key));let ji=Lw([...Gr,...ii]);if(ji){if(ji.idx>=Ze.length){let Oe=Nt[ji.idx-Ze.length].key;pe.add(Oe)}return await nn(A,ji.result,{replace:ce}),{shortCircuited:!0}}let{loaderData:Fi,errors:rr}=Tw(k,W,Ze,Gr,Se,Nt,ii,Me);Me.forEach((Oe,Kt)=>{Oe.subscribe(Yt=>{(Yt||Oe.done)&&Me.delete(Kt)})}),p.v7_partialHydration&&ie&&k.errors&&Object.entries(k.errors).filter(Oe=>{let[Kt]=Oe;return!Ze.some(Yt=>Yt.route.id===Kt)}).forEach(Oe=>{let[Kt,Yt]=Oe;rr=Object.assign(rr||{},{[Kt]:Yt})});let ya=Ai(),wa=Di(ne),xa=ya||wa||Nt.length>0;return ht({loaderData:Fi,errors:rr},xa?{fetchers:new Map(k.fetchers)}:{})}function ko(A,j,W,X){if(r)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.");z.has(A)&&St(A);let ee=(X&&X.unstable_flushSync)===!0,ge=c||s,ce=Nm(k.location,k.matches,f,p.v7_prependBasename,W,p.v7_relativeSplatPath,j,X==null?void 0:X.relative),ie=qa(ge,ce,f);if(!ie){Ft(A,j,dr(404,{pathname:ce}),{flushSync:ee});return}let{path:ye,submission:Se,error:tt}=Cw(p.v7_normalizeFormMethod,!0,ce,X);if(tt){Ft(A,j,tt,{flushSync:ee});return}let nt=Rm(ie,ye);if(U=(X&&X.preventScrollReset)===!0,Se&&Ir(Se.formMethod)){tn(A,j,ye,nt,ie,ee,Se);return}Fe.set(A,{routeId:j,path:ye}),jt(A,j,ye,nt,ie,ee,Se)}async function tn(A,j,W,X,ee,ge,ce){if(Sr(),Fe.delete(A),!X.route.action&&!X.route.lazy){let Ot=dr(405,{method:ce.formMethod,pathname:W,routeId:j});Ft(A,j,Ot,{flushSync:ge});return}let ie=k.fetchers.get(A);tr(A,h4(ce,ie),{flushSync:ge});let ye=new AbortController,Se=Ma(e.history,W,ye.signal,ce);z.set(A,ye);let tt=te,me=(await jn("action",Se,[X],ee))[0];if(Se.signal.aborted){z.get(A)===ye&&z.delete(A);return}if(p.v7_fetcherPersist&&qe.has(A)){if(Xo(me)||gr(me)){tr(A,Xi(void 0));return}}else{if(Xo(me))if(z.delete(A),ne>tt){tr(A,Xi(void 0));return}else return pe.add(A),tr(A,rs(ce)),nn(Se,me,{fetcherSubmission:ce});if(gr(me)){Ft(A,j,me.error);return}}if(qo(me))throw dr(400,{type:"defer-action"});let Ze=k.navigation.location||k.location,Nt=Ma(e.history,Ze,ye.signal),Po=c||s,Gr=k.navigation.state!=="idle"?qa(Po,k.navigation.location,f):k.matches;Ae(Gr,"Didn't find any matches after fetcher action");let ii=++te;ae.set(A,ii);let ji=rs(ce,me.data);k.fetchers.set(A,ji);let[Fi,rr]=Nw(e.history,k,Gr,ce,Ze,!1,p.unstable_skipActionErrorRevalidation,oe,Ne,F,qe,Fe,pe,Po,f,[X.route.id,me]);rr.filter(Ot=>Ot.key!==A).forEach(Ot=>{let To=Ot.key,xu=k.fetchers.get(To),bu=rs(void 0,xu?xu.data:void 0);k.fetchers.set(To,bu),z.has(To)&&St(To),Ot.controller&&z.set(To,Ot.controller)}),Ge({fetchers:new Map(k.fetchers)});let ya=()=>rr.forEach(Ot=>St(Ot.key));ye.signal.addEventListener("abort",ya);let{loaderResults:wa,fetcherResults:xa}=await Ro(k.matches,Gr,Fi,rr,Nt);if(ye.signal.aborted)return;ye.signal.removeEventListener("abort",ya),ae.delete(A),z.delete(A),rr.forEach(Ot=>z.delete(Ot.key));let Oe=Lw([...wa,...xa]);if(Oe){if(Oe.idx>=Fi.length){let Ot=rr[Oe.idx-Fi.length].key;pe.add(Ot)}return nn(Nt,Oe.result)}let{loaderData:Kt,errors:Yt}=Tw(k,k.matches,Fi,wa,void 0,rr,xa,Me);if(k.fetchers.has(A)){let Ot=Xi(me.data);k.fetchers.set(A,Ot)}Di(ii),k.navigation.state==="loading"&&ii>ne?(Ae(B,"Expected pending action"),K&&K.abort(),dn(k.navigation.location,{matches:Gr,loaderData:Kt,errors:Yt,fetchers:new Map(k.fetchers)})):(Ge({errors:Yt,loaderData:Iw(k.loaderData,Kt,Gr,Yt),fetchers:new Map(k.fetchers)}),oe=!1)}async function jt(A,j,W,X,ee,ge,ce){let ie=k.fetchers.get(A);tr(A,rs(ce,ie?ie.data:void 0),{flushSync:ge});let ye=new AbortController,Se=Ma(e.history,W,ye.signal);z.set(A,ye);let tt=te,me=(await jn("loader",Se,[X],ee))[0];if(qo(me)&&(me=await S_(me,Se.signal,!0)||me),z.get(A)===ye&&z.delete(A),!Se.signal.aborted){if(qe.has(A)){tr(A,Xi(void 0));return}if(Xo(me))if(ne>tt){tr(A,Xi(void 0));return}else{pe.add(A),await nn(Se,me);return}if(gr(me)){Ft(A,j,me.error);return}Ae(!qo(me),"Unhandled fetcher deferred data"),tr(A,Xi(me.data))}}async function nn(A,j,W){let{submission:X,fetcherSubmission:ee,replace:ge}=W===void 0?{}:W;j.response.headers.has("X-Remix-Revalidate")&&(oe=!0);let ce=j.response.headers.get("Location");Ae(ce,"Expected a Location header on the redirect Response"),ce=Ow(ce,new URL(A.url),f);let ie=Ks(k.location,ce,{_isRedirect:!0});if(n){let Ze=!1;if(j.response.headers.has("X-Remix-Reload-Document"))Ze=!0;else if(og.test(ce)){const Nt=e.history.createURL(ce);Ze=Nt.origin!==t.location.origin||El(Nt.pathname,f)==null}if(Ze){ge?t.location.replace(ce):t.location.assign(ce);return}}K=null;let ye=ge===!0?kt.Replace:kt.Push,{formMethod:Se,formAction:tt,formEncType:nt}=k.navigation;!X&&!ee&&Se&&tt&&nt&&(X=jw(k.navigation));let me=X||ee;if(X3.has(j.response.status)&&me&&Ir(me.formMethod))await en(ye,ie,{submission:ht({},me,{formAction:ce}),preventScrollReset:U});else{let Ze=gh(ie,X);await en(ye,ie,{overrideNavigation:Ze,fetcherSubmission:ee,preventScrollReset:U})}}async function jn(A,j,W,X){try{let ee=await i4(h,A,j,W,X,l,o);return await Promise.all(ee.map((ge,ce)=>{if(c4(ge)){let ie=ge.result;return{type:ct.redirect,response:l4(ie,j,W[ce].route.id,X,f,p.v7_relativeSplatPath)}}return a4(ge)}))}catch(ee){return W.map(()=>({type:ct.error,error:ee}))}}async function Ro(A,j,W,X,ee){let[ge,...ce]=await Promise.all([W.length?jn("loader",ee,W,j):[],...X.map(ie=>{if(ie.matches&&ie.match&&ie.controller){let ye=Ma(e.history,ie.path,ie.controller.signal);return jn("loader",ye,[ie.match],ie.matches).then(Se=>Se[0])}else return Promise.resolve({type:ct.error,error:dr(404,{pathname:ie.path})})})]);return await Promise.all([Mw(A,W,ge,ge.map(()=>ee.signal),!1,k.loaderData),Mw(A,X.map(ie=>ie.match),ce,X.map(ie=>ie.controller?ie.controller.signal:null),!0)]),{loaderResults:ge,fetcherResults:ce}}function Sr(){oe=!0,Ne.push(...Oo()),Fe.forEach((A,j)=>{z.has(j)&&(F.push(j),St(j))})}function tr(A,j,W){W===void 0&&(W={}),k.fetchers.set(A,j),Ge({fetchers:new Map(k.fetchers)},{flushSync:(W&&W.flushSync)===!0})}function Ft(A,j,W,X){X===void 0&&(X={});let ee=bs(k.matches,j);En(A),Ge({errors:{[ee.route.id]:W},fetchers:new Map(k.fetchers)},{flushSync:(X&&X.flushSync)===!0})}function rn(A){return p.v7_fetcherPersist&&(Ve.set(A,(Ve.get(A)||0)+1),qe.has(A)&&qe.delete(A)),k.fetchers.get(A)||Q3}function En(A){let j=k.fetchers.get(A);z.has(A)&&!(j&&j.state==="loading"&&ae.has(A))&&St(A),Fe.delete(A),ae.delete(A),pe.delete(A),qe.delete(A),k.fetchers.delete(A)}function Ii(A){if(p.v7_fetcherPersist){let j=(Ve.get(A)||0)-1;j<=0?(Ve.delete(A),qe.add(A)):Ve.set(A,j)}else En(A);Ge({fetchers:new Map(k.fetchers)})}function St(A){let j=z.get(A);Ae(j,"Expected fetch controller: "+A),j.abort(),z.delete(A)}function ri(A){for(let j of A){let W=rn(j),X=Xi(W.data);k.fetchers.set(j,X)}}function Ai(){let A=[],j=!1;for(let W of pe){let X=k.fetchers.get(W);Ae(X,"Expected fetcher: "+W),X.state==="loading"&&(pe.delete(W),A.push(W),j=!0)}return ri(A),j}function Di(A){let j=[];for(let[W,X]of ae)if(X0}function Li(A,j){let W=k.blockers.get(A)||ns;return bt.get(A)!==j&&bt.set(A,j),W}function Mi(A){k.blockers.delete(A),bt.delete(A)}function _r(A,j){let W=k.blockers.get(A)||ns;Ae(W.state==="unblocked"&&j.state==="blocked"||W.state==="blocked"&&j.state==="blocked"||W.state==="blocked"&&j.state==="proceeding"||W.state==="blocked"&&j.state==="unblocked"||W.state==="proceeding"&&j.state==="unblocked","Invalid blocker state transition: "+W.state+" -> "+j.state);let X=new Map(k.blockers);X.set(A,j),Ge({blockers:X})}function ga(A){let{currentLocation:j,nextLocation:W,historyAction:X}=A;if(bt.size===0)return;bt.size>1&&ml(!1,"A router only supports one blocker at a time");let ee=Array.from(bt.entries()),[ge,ce]=ee[ee.length-1],ie=k.blockers.get(ge);if(!(ie&&ie.state==="proceeding")&&ce({currentLocation:j,nextLocation:W,historyAction:X}))return ge}function Oo(A){let j=[];return Me.forEach((W,X)=>{(!A||A(X))&&(W.cancel(),j.push(X),Me.delete(X))}),j}function Tl(A,j,W){if(S=A,N=j,C=W||null,!T&&k.navigation===vh){T=!0;let X=Ut(k.location,k.matches);X!=null&&Ge({restoreScrollPosition:X})}return()=>{S=null,N=null,C=null}}function dt(A,j){return C&&C(A,j.map(X=>k3(X,k.loaderData)))||A.key}function zt(A,j){if(S&&N){let W=dt(A,j);S[W]=N()}}function Ut(A,j){if(S){let W=dt(A,j),X=S[W];if(typeof X=="number")return X}return null}function nr(A){l={},c=Cm(A,o,void 0,l)}return G={get basename(){return f},get future(){return p},get state(){return k},get routes(){return s},get window(){return t},initialize:Gt,subscribe:er,enableScrollRestoration:Tl,navigate:st,fetch:ko,revalidate:Sn,createHref:A=>e.history.createHref(A),encodeLocation:A=>e.history.encodeLocation(A),getFetcher:rn,deleteFetcher:Ii,dispose:Ue,getBlocker:Li,deleteBlocker:Mi,_internalFetchControllers:z,_internalActiveDeferreds:Me,_internalSetRoutes:nr},G}function e4(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Nm(e,t,n,r,o,l,s,c){let f,h;if(s){f=[];for(let m of t)if(f.push(m),m.route.id===s){h=m;break}}else f=t,h=t[t.length-1];let p=ng(o||".",tg(f,l),El(e.pathname,n)||e.pathname,c==="path");return o==null&&(p.search=e.search,p.hash=e.hash),(o==null||o===""||o===".")&&h&&h.route.index&&!ag(p.search)&&(p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(p.pathname=p.pathname==="/"?n:wi([n,p.pathname])),la(p)}function Cw(e,t,n,r){if(!r||!e4(r))return{path:n};if(r.formMethod&&!d4(r.formMethod))return{path:n,error:dr(405,{method:r.formMethod})};let o=()=>({path:n,error:dr(400,{type:"invalid-body"})}),l=r.formMethod||"get",s=e?l.toUpperCase():l.toLowerCase(),c=x_(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ir(s))return o();let v=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((S,C)=>{let[N,T]=C;return""+S+N+"="+T+` + */function ht(){return ht=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function ml(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function _3(){return Math.random().toString(36).substr(2,8)}function _w(e,t){return{usr:e.state,key:e.key,idx:t}}function Ks(e,t,n,r){return n===void 0&&(n=null),ht({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Co(t):t,{state:n,key:t&&t.key||r||_3()})}function la(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Co(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function E3(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:l=!1}=r,s=o.history,c=kt.Pop,f=null,h=p();h==null&&(h=0,s.replaceState(ht({},s.state,{idx:h}),""));function p(){return(s.state||{idx:null}).idx}function m(){c=kt.Pop;let T=p(),_=T==null?null:T-h;h=T,f&&f({action:c,location:N.location,delta:_})}function v(T,_){c=kt.Push;let b=Ks(N.location,T,_);h=p()+1;let E=_w(b,h),I=N.createHref(b);try{s.pushState(E,"",I)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;o.location.assign(I)}l&&f&&f({action:c,location:N.location,delta:1})}function S(T,_){c=kt.Replace;let b=Ks(N.location,T,_);h=p();let E=_w(b,h),I=N.createHref(b);s.replaceState(E,"",I),l&&f&&f({action:c,location:N.location,delta:0})}function C(T){let _=o.location.origin!=="null"?o.location.origin:o.location.href,b=typeof T=="string"?T:la(T);return b=b.replace(/ $/,"%20"),Ae(_,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,_)}let N={get action(){return c},get location(){return e(o,s)},listen(T){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(Sw,m),f=T,()=>{o.removeEventListener(Sw,m),f=null}},createHref(T){return t(o,T)},createURL:C,encodeLocation(T){let _=C(T);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:v,replace:S,go(T){return s.go(T)}};return N}var ct;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ct||(ct={}));const C3=new Set(["lazy","caseSensitive","path","id","index","children"]);function N3(e){return e.index===!0}function Cm(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,l)=>{let s=[...n,l],c=typeof o.id=="string"?o.id:s.join("-");if(Ae(o.index!==!0||!o.children,"Cannot specify children on an index route"),Ae(!r[c],'Found a route id collision on id "'+c+`". Route id's must be globally unique within Data Router usages`),N3(o)){let f=ht({},o,t(o),{id:c});return r[c]=f,f}else{let f=ht({},o,t(o),{id:c,children:void 0});return r[c]=f,o.children&&(f.children=Cm(o.children,t,s,r)),f}})}function qa(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Co(t):t,o=El(r.pathname||"/",n);if(o==null)return null;let l=h_(e);R3(l);let s=null;for(let c=0;s==null&&c{let f={relativePath:c===void 0?l.path||"":c,caseSensitive:l.caseSensitive===!0,childrenIndex:s,route:l};f.relativePath.startsWith("/")&&(Ae(f.relativePath.startsWith(r),'Absolute route path "'+f.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),f.relativePath=f.relativePath.slice(r.length));let h=wi([r,f.relativePath]),p=n.concat(f);l.children&&l.children.length>0&&(Ae(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),h_(l.children,t,p,h)),!(l.path==null&&!l.index)&&t.push({path:h,score:L3(h,l.index),routesMeta:p})};return e.forEach((l,s)=>{var c;if(l.path===""||!((c=l.path)!=null&&c.includes("?")))o(l,s);else for(let f of m_(l.path))o(l,s,f)}),t}function m_(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),l=n.replace(/\?$/,"");if(r.length===0)return o?[l,""]:[l];let s=m_(r.join("/")),c=[];return c.push(...s.map(f=>f===""?l:[l,f].join("/"))),o&&c.push(...s),c.map(f=>e.startsWith("/")&&f===""?"/":f)}function R3(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:M3(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const O3=/^:[\w-]+$/,P3=3,T3=2,I3=1,A3=10,D3=-2,Ew=e=>e==="*";function L3(e,t){let n=e.split("/"),r=n.length;return n.some(Ew)&&(r+=D3),t&&(r+=T3),n.filter(o=>!Ew(o)).reduce((o,l)=>o+(O3.test(l)?P3:l===""?I3:A3),r)}function M3(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function j3(e,t){let{routesMeta:n}=e,r={},o="/",l=[];for(let s=0;s{let{paramName:v,isOptional:S}=p;if(v==="*"){let N=c[m]||"";s=l.slice(0,l.length-N.length).replace(/(.)\/+$/,"$1")}const C=c[m];return S&&!C?h[v]=void 0:h[v]=(C||"").replace(/%2F/g,"/"),h},{}),pathname:l,pathnameBase:s,pattern:e}}function z3(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ml(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=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,c,f)=>(r.push({paramName:c,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function U3(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ml(!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 El(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 $3(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Co(e):e;return{pathname:n?n.startsWith("/")?n:B3(n,t):t,search:H3(r),hash:G3(o)}}function B3(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function mh(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 and the router will parse it for you.'}function v_(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function tg(e,t){let n=v_(e);return t?n.map((r,o)=>o===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function ng(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=Co(e):(o=ht({},e),Ae(!o.pathname||!o.pathname.includes("?"),mh("?","pathname","search",o)),Ae(!o.pathname||!o.pathname.includes("#"),mh("#","pathname","hash",o)),Ae(!o.search||!o.search.includes("#"),mh("#","search","hash",o)));let l=e===""||o.pathname==="",s=l?"/":o.pathname,c;if(s==null)c=n;else{let m=t.length-1;if(!r&&s.startsWith("..")){let v=s.split("/");for(;v[0]==="..";)v.shift(),m-=1;o.pathname=v.join("/")}c=m>=0?t[m]:"/"}let f=$3(o,c),h=s&&s!=="/"&&s.endsWith("/"),p=(l||s===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(h||p)&&(f.pathname+="/"),f}const wi=e=>e.join("/").replace(/\/\/+/g,"/"),W3=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),H3=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,G3=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class rg{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function ig(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const g_=["post","put","patch","delete"],K3=new Set(g_),Y3=["get",...g_],V3=new Set(Y3),q3=new Set([301,302,303,307,308]),X3=new Set([307,308]),vh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Q3={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ns={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},og=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Z3=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),y_="remix-router-transitions";function J3(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;Ae(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let A=e.detectErrorBoundary;o=j=>({hasErrorBoundary:A(j)})}else o=Z3;let l={},s=Cm(e.routes,o,void 0,l),c,f=e.basename||"/",h=e.unstable_dataStrategy||r4,p=ht({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),m=null,v=new Set,S=null,C=null,N=null,T=e.hydrationData!=null,_=qa(s,e.history.location,f),b=null;if(_==null){let A=dr(404,{pathname:e.history.location.pathname}),{matches:j,route:W}=Dw(s);_=j,b={[W.id]:A}}let E,I=_.some(A=>A.route.lazy),M=_.some(A=>A.route.loader);if(I)E=!1;else if(!M)E=!0;else if(p.v7_partialHydration){let A=e.hydrationData?e.hydrationData.loaderData:null,j=e.hydrationData?e.hydrationData.errors:null,W=X=>X.route.loader?typeof X.route.loader=="function"&&X.route.loader.hydrate===!0?!1:A&&A[X.route.id]!==void 0||j&&j[X.route.id]!==void 0:!0;if(j){let X=_.findIndex(ee=>j[ee.route.id]!==void 0);E=_.slice(0,X+1).every(W)}else E=_.every(W)}else E=e.hydrationData!=null;let G,k={historyAction:e.history.action,location:e.history.location,matches:_,initialized:E,navigation:vh,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||b,fetchers:new Map,blockers:new Map},B=kt.Pop,U=!1,K,Z=!1,he=new Map,be=null,J=!1,oe=!1,Ne=[],F=[],z=new Map,te=0,ne=-1,ae=new Map,pe=new Set,Fe=new Map,Ve=new Map,qe=new Set,Me=new Map,bt=new Map,Mt=!1;function Gt(){if(m=e.history.listen(A=>{let{action:j,location:W,delta:X}=A;if(Mt){Mt=!1;return}ml(bt.size===0||X!=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 ee=ga({currentLocation:k.location,nextLocation:W,historyAction:j});if(ee&&X!=null){Mt=!0,e.history.go(X*-1),_r(ee,{state:"blocked",location:W,proceed(){_r(ee,{state:"proceeding",proceed:void 0,reset:void 0,location:W}),e.history.go(X)},reset(){let ge=new Map(k.blockers);ge.set(ee,ns),Ge({blockers:ge})}});return}return en(j,W)}),n){m4(t,he);let A=()=>v4(t,he);t.addEventListener("pagehide",A),be=()=>t.removeEventListener("pagehide",A)}return k.initialized||en(kt.Pop,k.location,{initialHydration:!0}),G}function Ue(){m&&m(),be&&be(),v.clear(),K&&K.abort(),k.fetchers.forEach((A,j)=>En(j)),k.blockers.forEach((A,j)=>Mi(j))}function er(A){return v.add(A),()=>v.delete(A)}function Ge(A,j){j===void 0&&(j={}),k=ht({},k,A);let W=[],X=[];p.v7_fetcherPersist&&k.fetchers.forEach((ee,ge)=>{ee.state==="idle"&&(qe.has(ge)?X.push(ge):W.push(ge))}),[...v].forEach(ee=>ee(k,{deletedFetchers:X,unstable_viewTransitionOpts:j.viewTransitionOpts,unstable_flushSync:j.flushSync===!0})),p.v7_fetcherPersist&&(W.forEach(ee=>k.fetchers.delete(ee)),X.forEach(ee=>En(ee)))}function dn(A,j,W){var X,ee;let{flushSync:ge}=W===void 0?{}:W,ce=k.actionData!=null&&k.navigation.formMethod!=null&&Ir(k.navigation.formMethod)&&k.navigation.state==="loading"&&((X=A.state)==null?void 0:X._isRedirect)!==!0,ie;j.actionData?Object.keys(j.actionData).length>0?ie=j.actionData:ie=null:ce?ie=k.actionData:ie=null;let ye=j.loaderData?Iw(k.loaderData,j.loaderData,j.matches||[],j.errors):k.loaderData,Se=k.blockers;Se.size>0&&(Se=new Map(Se),Se.forEach((me,Ze)=>Se.set(Ze,ns)));let tt=U===!0||k.navigation.formMethod!=null&&Ir(k.navigation.formMethod)&&((ee=A.state)==null?void 0:ee._isRedirect)!==!0;c&&(s=c,c=void 0),J||B===kt.Pop||(B===kt.Push?e.history.push(A,A.state):B===kt.Replace&&e.history.replace(A,A.state));let nt;if(B===kt.Pop){let me=he.get(k.location.pathname);me&&me.has(A.pathname)?nt={currentLocation:k.location,nextLocation:A}:he.has(A.pathname)&&(nt={currentLocation:A,nextLocation:k.location})}else if(Z){let me=he.get(k.location.pathname);me?me.add(A.pathname):(me=new Set([A.pathname]),he.set(k.location.pathname,me)),nt={currentLocation:k.location,nextLocation:A}}Ge(ht({},j,{actionData:ie,loaderData:ye,historyAction:B,location:A,initialized:!0,navigation:vh,revalidation:"idle",restoreScrollPosition:Ut(A,j.matches||k.matches),preventScrollReset:tt,blockers:Se}),{viewTransitionOpts:nt,flushSync:ge===!0}),B=kt.Pop,U=!1,Z=!1,J=!1,oe=!1,Ne=[],F=[]}async function st(A,j){if(typeof A=="number"){e.history.go(A);return}let W=Nm(k.location,k.matches,f,p.v7_prependBasename,A,p.v7_relativeSplatPath,j==null?void 0:j.fromRouteId,j==null?void 0:j.relative),{path:X,submission:ee,error:ge}=Cw(p.v7_normalizeFormMethod,!1,W,j),ce=k.location,ie=Ks(k.location,X,j&&j.state);ie=ht({},ie,e.history.encodeLocation(ie));let ye=j&&j.replace!=null?j.replace:void 0,Se=kt.Push;ye===!0?Se=kt.Replace:ye===!1||ee!=null&&Ir(ee.formMethod)&&ee.formAction===k.location.pathname+k.location.search&&(Se=kt.Replace);let tt=j&&"preventScrollReset"in j?j.preventScrollReset===!0:void 0,nt=(j&&j.unstable_flushSync)===!0,me=ga({currentLocation:ce,nextLocation:ie,historyAction:Se});if(me){_r(me,{state:"blocked",location:ie,proceed(){_r(me,{state:"proceeding",proceed:void 0,reset:void 0,location:ie}),st(A,j)},reset(){let Ze=new Map(k.blockers);Ze.set(me,ns),Ge({blockers:Ze})}});return}return await en(Se,ie,{submission:ee,pendingError:ge,preventScrollReset:tt,replace:j&&j.replace,enableViewTransition:j&&j.unstable_viewTransition,flushSync:nt})}function Sn(){if(Sr(),Ge({revalidation:"loading"}),k.navigation.state!=="submitting"){if(k.navigation.state==="idle"){en(k.historyAction,k.location,{startUninterruptedRevalidation:!0});return}en(B||k.historyAction,k.navigation.location,{overrideNavigation:k.navigation})}}async function en(A,j,W){K&&K.abort(),K=null,B=A,J=(W&&W.startUninterruptedRevalidation)===!0,zt(k.location,k.matches),U=(W&&W.preventScrollReset)===!0,Z=(W&&W.enableViewTransition)===!0;let X=c||s,ee=W&&W.overrideNavigation,ge=qa(X,j,f),ce=(W&&W.flushSync)===!0;if(!ge){let me=dr(404,{pathname:j.pathname}),{matches:Ze,route:Nt}=Dw(X);Oo(),dn(j,{matches:Ze,loaderData:{},errors:{[Nt.id]:me}},{flushSync:ce});return}if(k.initialized&&!oe&&u4(k.location,j)&&!(W&&W.submission&&Ir(W.submission.formMethod))){dn(j,{matches:ge},{flushSync:ce});return}K=new AbortController;let ie=Ma(e.history,j,K.signal,W&&W.submission),ye;if(W&&W.pendingError)ye=[bs(ge).route.id,{type:ct.error,error:W.pendingError}];else if(W&&W.submission&&Ir(W.submission.formMethod)){let me=await _n(ie,j,W.submission,ge,{replace:W.replace,flushSync:ce});if(me.shortCircuited)return;ye=me.pendingActionResult,ee=gh(j,W.submission),ce=!1,ie=Ma(e.history,ie.url,ie.signal)}let{shortCircuited:Se,loaderData:tt,errors:nt}=await No(ie,j,ge,ee,W&&W.submission,W&&W.fetcherSubmission,W&&W.replace,W&&W.initialHydration===!0,ce,ye);Se||(K=null,dn(j,ht({matches:ge},Aw(ye),{loaderData:tt,errors:nt})))}async function _n(A,j,W,X,ee){ee===void 0&&(ee={}),Sr();let ge=p4(j,W);Ge({navigation:ge},{flushSync:ee.flushSync===!0});let ce,ie=Rm(X,j);if(!ie.route.action&&!ie.route.lazy)ce={type:ct.error,error:dr(405,{method:A.method,pathname:j.pathname,routeId:ie.route.id})};else if(ce=(await Mn("action",A,[ie],X))[0],A.signal.aborted)return{shortCircuited:!0};if(Xo(ce)){let ye;return ee&&ee.replace!=null?ye=ee.replace:ye=Ow(ce.response.headers.get("Location"),new URL(A.url),f)===k.location.pathname+k.location.search,await nn(A,ce,{submission:W,replace:ye}),{shortCircuited:!0}}if(qo(ce))throw dr(400,{type:"defer-action"});if(gr(ce)){let ye=bs(X,ie.route.id);return(ee&&ee.replace)!==!0&&(B=kt.Push),{pendingActionResult:[ye.route.id,ce]}}return{pendingActionResult:[ie.route.id,ce]}}async function No(A,j,W,X,ee,ge,ce,ie,ye,Se){let tt=X||gh(j,ee),nt=ee||ge||jw(tt),me=c||s,[Ze,Nt]=Nw(e.history,k,W,nt,j,p.v7_partialHydration&&ie===!0,p.unstable_skipActionErrorRevalidation,oe,Ne,F,qe,Fe,pe,me,f,Se);if(Oo(Oe=>!(W&&W.some(Kt=>Kt.route.id===Oe))||Ze&&Ze.some(Kt=>Kt.route.id===Oe)),ne=++te,Ze.length===0&&Nt.length===0){let Oe=Ai();return dn(j,ht({matches:W,loaderData:{},errors:Se&&gr(Se[1])?{[Se[0]]:Se[1].error}:null},Aw(Se),Oe?{fetchers:new Map(k.fetchers)}:{}),{flushSync:ye}),{shortCircuited:!0}}if(!J&&(!p.v7_partialHydration||!ie)){Nt.forEach(Kt=>{let Yt=k.fetchers.get(Kt.key),Ot=rs(void 0,Yt?Yt.data:void 0);k.fetchers.set(Kt.key,Ot)});let Oe;Se&&!gr(Se[1])?Oe={[Se[0]]:Se[1].data}:k.actionData&&(Object.keys(k.actionData).length===0?Oe=null:Oe=k.actionData),Ge(ht({navigation:tt},Oe!==void 0?{actionData:Oe}:{},Nt.length>0?{fetchers:new Map(k.fetchers)}:{}),{flushSync:ye})}Nt.forEach(Oe=>{z.has(Oe.key)&&St(Oe.key),Oe.controller&&z.set(Oe.key,Oe.controller)});let Po=()=>Nt.forEach(Oe=>St(Oe.key));K&&K.signal.addEventListener("abort",Po);let{loaderResults:Gr,fetcherResults:ii}=await Ro(k.matches,W,Ze,Nt,A);if(A.signal.aborted)return{shortCircuited:!0};K&&K.signal.removeEventListener("abort",Po),Nt.forEach(Oe=>z.delete(Oe.key));let ji=Lw([...Gr,...ii]);if(ji){if(ji.idx>=Ze.length){let Oe=Nt[ji.idx-Ze.length].key;pe.add(Oe)}return await nn(A,ji.result,{replace:ce}),{shortCircuited:!0}}let{loaderData:Fi,errors:rr}=Tw(k,W,Ze,Gr,Se,Nt,ii,Me);Me.forEach((Oe,Kt)=>{Oe.subscribe(Yt=>{(Yt||Oe.done)&&Me.delete(Kt)})}),p.v7_partialHydration&&ie&&k.errors&&Object.entries(k.errors).filter(Oe=>{let[Kt]=Oe;return!Ze.some(Yt=>Yt.route.id===Kt)}).forEach(Oe=>{let[Kt,Yt]=Oe;rr=Object.assign(rr||{},{[Kt]:Yt})});let ya=Ai(),wa=Di(ne),xa=ya||wa||Nt.length>0;return ht({loaderData:Fi,errors:rr},xa?{fetchers:new Map(k.fetchers)}:{})}function ko(A,j,W,X){if(r)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.");z.has(A)&&St(A);let ee=(X&&X.unstable_flushSync)===!0,ge=c||s,ce=Nm(k.location,k.matches,f,p.v7_prependBasename,W,p.v7_relativeSplatPath,j,X==null?void 0:X.relative),ie=qa(ge,ce,f);if(!ie){Ft(A,j,dr(404,{pathname:ce}),{flushSync:ee});return}let{path:ye,submission:Se,error:tt}=Cw(p.v7_normalizeFormMethod,!0,ce,X);if(tt){Ft(A,j,tt,{flushSync:ee});return}let nt=Rm(ie,ye);if(U=(X&&X.preventScrollReset)===!0,Se&&Ir(Se.formMethod)){tn(A,j,ye,nt,ie,ee,Se);return}Fe.set(A,{routeId:j,path:ye}),jt(A,j,ye,nt,ie,ee,Se)}async function tn(A,j,W,X,ee,ge,ce){if(Sr(),Fe.delete(A),!X.route.action&&!X.route.lazy){let Ot=dr(405,{method:ce.formMethod,pathname:W,routeId:j});Ft(A,j,Ot,{flushSync:ge});return}let ie=k.fetchers.get(A);tr(A,h4(ce,ie),{flushSync:ge});let ye=new AbortController,Se=Ma(e.history,W,ye.signal,ce);z.set(A,ye);let tt=te,me=(await Mn("action",Se,[X],ee))[0];if(Se.signal.aborted){z.get(A)===ye&&z.delete(A);return}if(p.v7_fetcherPersist&&qe.has(A)){if(Xo(me)||gr(me)){tr(A,Xi(void 0));return}}else{if(Xo(me))if(z.delete(A),ne>tt){tr(A,Xi(void 0));return}else return pe.add(A),tr(A,rs(ce)),nn(Se,me,{fetcherSubmission:ce});if(gr(me)){Ft(A,j,me.error);return}}if(qo(me))throw dr(400,{type:"defer-action"});let Ze=k.navigation.location||k.location,Nt=Ma(e.history,Ze,ye.signal),Po=c||s,Gr=k.navigation.state!=="idle"?qa(Po,k.navigation.location,f):k.matches;Ae(Gr,"Didn't find any matches after fetcher action");let ii=++te;ae.set(A,ii);let ji=rs(ce,me.data);k.fetchers.set(A,ji);let[Fi,rr]=Nw(e.history,k,Gr,ce,Ze,!1,p.unstable_skipActionErrorRevalidation,oe,Ne,F,qe,Fe,pe,Po,f,[X.route.id,me]);rr.filter(Ot=>Ot.key!==A).forEach(Ot=>{let To=Ot.key,xu=k.fetchers.get(To),bu=rs(void 0,xu?xu.data:void 0);k.fetchers.set(To,bu),z.has(To)&&St(To),Ot.controller&&z.set(To,Ot.controller)}),Ge({fetchers:new Map(k.fetchers)});let ya=()=>rr.forEach(Ot=>St(Ot.key));ye.signal.addEventListener("abort",ya);let{loaderResults:wa,fetcherResults:xa}=await Ro(k.matches,Gr,Fi,rr,Nt);if(ye.signal.aborted)return;ye.signal.removeEventListener("abort",ya),ae.delete(A),z.delete(A),rr.forEach(Ot=>z.delete(Ot.key));let Oe=Lw([...wa,...xa]);if(Oe){if(Oe.idx>=Fi.length){let Ot=rr[Oe.idx-Fi.length].key;pe.add(Ot)}return nn(Nt,Oe.result)}let{loaderData:Kt,errors:Yt}=Tw(k,k.matches,Fi,wa,void 0,rr,xa,Me);if(k.fetchers.has(A)){let Ot=Xi(me.data);k.fetchers.set(A,Ot)}Di(ii),k.navigation.state==="loading"&&ii>ne?(Ae(B,"Expected pending action"),K&&K.abort(),dn(k.navigation.location,{matches:Gr,loaderData:Kt,errors:Yt,fetchers:new Map(k.fetchers)})):(Ge({errors:Yt,loaderData:Iw(k.loaderData,Kt,Gr,Yt),fetchers:new Map(k.fetchers)}),oe=!1)}async function jt(A,j,W,X,ee,ge,ce){let ie=k.fetchers.get(A);tr(A,rs(ce,ie?ie.data:void 0),{flushSync:ge});let ye=new AbortController,Se=Ma(e.history,W,ye.signal);z.set(A,ye);let tt=te,me=(await Mn("loader",Se,[X],ee))[0];if(qo(me)&&(me=await S_(me,Se.signal,!0)||me),z.get(A)===ye&&z.delete(A),!Se.signal.aborted){if(qe.has(A)){tr(A,Xi(void 0));return}if(Xo(me))if(ne>tt){tr(A,Xi(void 0));return}else{pe.add(A),await nn(Se,me);return}if(gr(me)){Ft(A,j,me.error);return}Ae(!qo(me),"Unhandled fetcher deferred data"),tr(A,Xi(me.data))}}async function nn(A,j,W){let{submission:X,fetcherSubmission:ee,replace:ge}=W===void 0?{}:W;j.response.headers.has("X-Remix-Revalidate")&&(oe=!0);let ce=j.response.headers.get("Location");Ae(ce,"Expected a Location header on the redirect Response"),ce=Ow(ce,new URL(A.url),f);let ie=Ks(k.location,ce,{_isRedirect:!0});if(n){let Ze=!1;if(j.response.headers.has("X-Remix-Reload-Document"))Ze=!0;else if(og.test(ce)){const Nt=e.history.createURL(ce);Ze=Nt.origin!==t.location.origin||El(Nt.pathname,f)==null}if(Ze){ge?t.location.replace(ce):t.location.assign(ce);return}}K=null;let ye=ge===!0?kt.Replace:kt.Push,{formMethod:Se,formAction:tt,formEncType:nt}=k.navigation;!X&&!ee&&Se&&tt&&nt&&(X=jw(k.navigation));let me=X||ee;if(X3.has(j.response.status)&&me&&Ir(me.formMethod))await en(ye,ie,{submission:ht({},me,{formAction:ce}),preventScrollReset:U});else{let Ze=gh(ie,X);await en(ye,ie,{overrideNavigation:Ze,fetcherSubmission:ee,preventScrollReset:U})}}async function Mn(A,j,W,X){try{let ee=await i4(h,A,j,W,X,l,o);return await Promise.all(ee.map((ge,ce)=>{if(c4(ge)){let ie=ge.result;return{type:ct.redirect,response:l4(ie,j,W[ce].route.id,X,f,p.v7_relativeSplatPath)}}return a4(ge)}))}catch(ee){return W.map(()=>({type:ct.error,error:ee}))}}async function Ro(A,j,W,X,ee){let[ge,...ce]=await Promise.all([W.length?Mn("loader",ee,W,j):[],...X.map(ie=>{if(ie.matches&&ie.match&&ie.controller){let ye=Ma(e.history,ie.path,ie.controller.signal);return Mn("loader",ye,[ie.match],ie.matches).then(Se=>Se[0])}else return Promise.resolve({type:ct.error,error:dr(404,{pathname:ie.path})})})]);return await Promise.all([Mw(A,W,ge,ge.map(()=>ee.signal),!1,k.loaderData),Mw(A,X.map(ie=>ie.match),ce,X.map(ie=>ie.controller?ie.controller.signal:null),!0)]),{loaderResults:ge,fetcherResults:ce}}function Sr(){oe=!0,Ne.push(...Oo()),Fe.forEach((A,j)=>{z.has(j)&&(F.push(j),St(j))})}function tr(A,j,W){W===void 0&&(W={}),k.fetchers.set(A,j),Ge({fetchers:new Map(k.fetchers)},{flushSync:(W&&W.flushSync)===!0})}function Ft(A,j,W,X){X===void 0&&(X={});let ee=bs(k.matches,j);En(A),Ge({errors:{[ee.route.id]:W},fetchers:new Map(k.fetchers)},{flushSync:(X&&X.flushSync)===!0})}function rn(A){return p.v7_fetcherPersist&&(Ve.set(A,(Ve.get(A)||0)+1),qe.has(A)&&qe.delete(A)),k.fetchers.get(A)||Q3}function En(A){let j=k.fetchers.get(A);z.has(A)&&!(j&&j.state==="loading"&&ae.has(A))&&St(A),Fe.delete(A),ae.delete(A),pe.delete(A),qe.delete(A),k.fetchers.delete(A)}function Ii(A){if(p.v7_fetcherPersist){let j=(Ve.get(A)||0)-1;j<=0?(Ve.delete(A),qe.add(A)):Ve.set(A,j)}else En(A);Ge({fetchers:new Map(k.fetchers)})}function St(A){let j=z.get(A);Ae(j,"Expected fetch controller: "+A),j.abort(),z.delete(A)}function ri(A){for(let j of A){let W=rn(j),X=Xi(W.data);k.fetchers.set(j,X)}}function Ai(){let A=[],j=!1;for(let W of pe){let X=k.fetchers.get(W);Ae(X,"Expected fetcher: "+W),X.state==="loading"&&(pe.delete(W),A.push(W),j=!0)}return ri(A),j}function Di(A){let j=[];for(let[W,X]of ae)if(X0}function Li(A,j){let W=k.blockers.get(A)||ns;return bt.get(A)!==j&&bt.set(A,j),W}function Mi(A){k.blockers.delete(A),bt.delete(A)}function _r(A,j){let W=k.blockers.get(A)||ns;Ae(W.state==="unblocked"&&j.state==="blocked"||W.state==="blocked"&&j.state==="blocked"||W.state==="blocked"&&j.state==="proceeding"||W.state==="blocked"&&j.state==="unblocked"||W.state==="proceeding"&&j.state==="unblocked","Invalid blocker state transition: "+W.state+" -> "+j.state);let X=new Map(k.blockers);X.set(A,j),Ge({blockers:X})}function ga(A){let{currentLocation:j,nextLocation:W,historyAction:X}=A;if(bt.size===0)return;bt.size>1&&ml(!1,"A router only supports one blocker at a time");let ee=Array.from(bt.entries()),[ge,ce]=ee[ee.length-1],ie=k.blockers.get(ge);if(!(ie&&ie.state==="proceeding")&&ce({currentLocation:j,nextLocation:W,historyAction:X}))return ge}function Oo(A){let j=[];return Me.forEach((W,X)=>{(!A||A(X))&&(W.cancel(),j.push(X),Me.delete(X))}),j}function Tl(A,j,W){if(S=A,N=j,C=W||null,!T&&k.navigation===vh){T=!0;let X=Ut(k.location,k.matches);X!=null&&Ge({restoreScrollPosition:X})}return()=>{S=null,N=null,C=null}}function dt(A,j){return C&&C(A,j.map(X=>k3(X,k.loaderData)))||A.key}function zt(A,j){if(S&&N){let W=dt(A,j);S[W]=N()}}function Ut(A,j){if(S){let W=dt(A,j),X=S[W];if(typeof X=="number")return X}return null}function nr(A){l={},c=Cm(A,o,void 0,l)}return G={get basename(){return f},get future(){return p},get state(){return k},get routes(){return s},get window(){return t},initialize:Gt,subscribe:er,enableScrollRestoration:Tl,navigate:st,fetch:ko,revalidate:Sn,createHref:A=>e.history.createHref(A),encodeLocation:A=>e.history.encodeLocation(A),getFetcher:rn,deleteFetcher:Ii,dispose:Ue,getBlocker:Li,deleteBlocker:Mi,_internalFetchControllers:z,_internalActiveDeferreds:Me,_internalSetRoutes:nr},G}function e4(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Nm(e,t,n,r,o,l,s,c){let f,h;if(s){f=[];for(let m of t)if(f.push(m),m.route.id===s){h=m;break}}else f=t,h=t[t.length-1];let p=ng(o||".",tg(f,l),El(e.pathname,n)||e.pathname,c==="path");return o==null&&(p.search=e.search,p.hash=e.hash),(o==null||o===""||o===".")&&h&&h.route.index&&!ag(p.search)&&(p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(p.pathname=p.pathname==="/"?n:wi([n,p.pathname])),la(p)}function Cw(e,t,n,r){if(!r||!e4(r))return{path:n};if(r.formMethod&&!d4(r.formMethod))return{path:n,error:dr(405,{method:r.formMethod})};let o=()=>({path:n,error:dr(400,{type:"invalid-body"})}),l=r.formMethod||"get",s=e?l.toUpperCase():l.toLowerCase(),c=x_(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ir(s))return o();let v=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((S,C)=>{let[N,T]=C;return""+S+N+"="+T+` `},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:c,formEncType:r.formEncType,formData:void 0,json:void 0,text:v}}}else if(r.formEncType==="application/json"){if(!Ir(s))return o();try{let v=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:c,formEncType:r.formEncType,formData:void 0,json:v,text:void 0}}}catch{return o()}}}Ae(typeof FormData=="function","FormData is not available in this environment");let f,h;if(r.formData)f=km(r.formData),h=r.formData;else if(r.body instanceof FormData)f=km(r.body),h=r.body;else if(r.body instanceof URLSearchParams)f=r.body,h=Pw(f);else if(r.body==null)f=new URLSearchParams,h=new FormData;else try{f=new URLSearchParams(r.body),h=Pw(f)}catch{return o()}let p={formMethod:s,formAction:c,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:h,json:void 0,text:void 0};if(Ir(p.formMethod))return{path:n,submission:p};let m=Co(n);return t&&m.search&&ag(m.search)&&f.append("index",""),m.search="?"+f,{path:la(m),submission:p}}function t4(e,t){let n=e;if(t){let r=e.findIndex(o=>o.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function Nw(e,t,n,r,o,l,s,c,f,h,p,m,v,S,C,N){let T=N?gr(N[1])?N[1].error:N[1].data:void 0,_=e.createURL(t.location),b=e.createURL(o),E=N&&gr(N[1])?N[0]:void 0,I=E?t4(n,E):n,M=N?N[1].statusCode:void 0,G=s&&M&&M>=400,k=I.filter((U,K)=>{let{route:Z}=U;if(Z.lazy)return!0;if(Z.loader==null)return!1;if(l)return typeof Z.loader!="function"||Z.loader.hydrate?!0:t.loaderData[Z.id]===void 0&&(!t.errors||t.errors[Z.id]===void 0);if(n4(t.loaderData,t.matches[K],U)||f.some(J=>J===U.route.id))return!0;let he=t.matches[K],be=U;return kw(U,ht({currentUrl:_,currentParams:he.params,nextUrl:b,nextParams:be.params},r,{actionResult:T,unstable_actionStatus:M,defaultShouldRevalidate:G?!1:c||_.pathname+_.search===b.pathname+b.search||_.search!==b.search||w_(he,be)}))}),B=[];return m.forEach((U,K)=>{if(l||!n.some(oe=>oe.route.id===U.routeId)||p.has(K))return;let Z=qa(S,U.path,C);if(!Z){B.push({key:K,routeId:U.routeId,path:U.path,matches:null,match:null,controller:null});return}let he=t.fetchers.get(K),be=Rm(Z,U.path),J=!1;v.has(K)?J=!1:h.includes(K)?J=!0:he&&he.state!=="idle"&&he.data===void 0?J=c:J=kw(be,ht({currentUrl:_,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:n[n.length-1].params},r,{actionResult:T,unstable_actionStatus:M,defaultShouldRevalidate:G?!1:c})),J&&B.push({key:K,routeId:U.routeId,path:U.path,matches:Z,match:be,controller:new AbortController})}),[k,B]}function n4(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function w_(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function kw(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function Rw(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];Ae(o,"No route found in manifest");let l={};for(let s in r){let f=o[s]!==void 0&&s!=="hasErrorBoundary";ml(!f,'Route "'+o.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!f&&!C3.has(s)&&(l[s]=r[s])}Object.assign(o,l),Object.assign(o,ht({},t(o),{lazy:void 0}))}function r4(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function i4(e,t,n,r,o,l,s,c){let f=r.reduce((m,v)=>m.add(v.route.id),new Set),h=new Set,p=await e({matches:o.map(m=>{let v=f.has(m.route.id);return ht({},m,{shouldLoad:v,resolve:C=>(h.add(m.route.id),v?o4(t,n,m,l,s,C,c):Promise.resolve({type:ct.data,result:void 0}))})}),request:n,params:o[0].params,context:c});return o.forEach(m=>Ae(h.has(m.route.id),'`match.resolve()` was not called for route id "'+m.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),p.filter((m,v)=>f.has(o[v].route.id))}async function o4(e,t,n,r,o,l,s){let c,f,h=p=>{let m,v=new Promise((N,T)=>m=T);f=()=>m(),t.signal.addEventListener("abort",f);let S=N=>typeof p!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):p({request:t,params:n.params,context:s},...N!==void 0?[N]:[]),C;return l?C=l(N=>S(N)):C=(async()=>{try{return{type:"data",result:await S()}}catch(N){return{type:"error",result:N}}})(),Promise.race([C,v])};try{let p=n.route[e];if(n.route.lazy)if(p){let m,[v]=await Promise.all([h(p).catch(S=>{m=S}),Rw(n.route,o,r)]);if(m!==void 0)throw m;c=v}else if(await Rw(n.route,o,r),p=n.route[e],p)c=await h(p);else if(e==="action"){let m=new URL(t.url),v=m.pathname+m.search;throw dr(405,{method:t.method,pathname:v,routeId:n.route.id})}else return{type:ct.data,result:void 0};else if(p)c=await h(p);else{let m=new URL(t.url),v=m.pathname+m.search;throw dr(404,{pathname:v})}Ae(c.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(p){return{type:ct.error,result:p}}finally{f&&t.signal.removeEventListener("abort",f)}return c}async function a4(e){let{result:t,type:n,status:r}=e;if(b_(t)){let s;try{let c=t.headers.get("Content-Type");c&&/\bapplication\/json\b/.test(c)?t.body==null?s=null:s=await t.json():s=await t.text()}catch(c){return{type:ct.error,error:c}}return n===ct.error?{type:ct.error,error:new rg(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:ct.data,data:s,statusCode:t.status,headers:t.headers}}if(n===ct.error)return{type:ct.error,error:t,statusCode:ig(t)?t.status:r};if(f4(t)){var o,l;return{type:ct.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((l=t.init)==null?void 0:l.headers)&&new Headers(t.init.headers)}}return{type:ct.data,data:t,statusCode:r}}function l4(e,t,n,r,o,l){let s=e.headers.get("Location");if(Ae(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!og.test(s)){let c=r.slice(0,r.findIndex(f=>f.route.id===n)+1);s=Nm(new URL(t.url),c,o,!0,s,l),e.headers.set("Location",s)}return e}function Ow(e,t,n){if(og.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r),l=El(o.pathname,n)!=null;if(o.origin===t.origin&&l)return o.pathname+o.search+o.hash}return e}function Ma(e,t,n,r){let o=e.createURL(x_(t)).toString(),l={signal:n};if(r&&Ir(r.formMethod)){let{formMethod:s,formEncType:c}=r;l.method=s.toUpperCase(),c==="application/json"?(l.headers=new Headers({"Content-Type":c}),l.body=JSON.stringify(r.json)):c==="text/plain"?l.body=r.text:c==="application/x-www-form-urlencoded"&&r.formData?l.body=km(r.formData):l.body=r.formData}return new Request(o,l)}function km(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function Pw(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function s4(e,t,n,r,o,l){let s={},c=null,f,h=!1,p={},m=r&&gr(r[1])?r[1].error:void 0;return n.forEach((v,S)=>{let C=t[S].route.id;if(Ae(!Xo(v),"Cannot handle redirect results in processLoaderData"),gr(v)){let N=v.error;m!==void 0&&(N=m,m=void 0),c=c||{};{let T=bs(e,C);c[T.route.id]==null&&(c[T.route.id]=N)}s[C]=void 0,h||(h=!0,f=ig(v.error)?v.error.status:500),v.headers&&(p[C]=v.headers)}else qo(v)?(o.set(C,v.deferredData),s[C]=v.deferredData.data,v.statusCode!=null&&v.statusCode!==200&&!h&&(f=v.statusCode),v.headers&&(p[C]=v.headers)):(s[C]=v.data,v.statusCode&&v.statusCode!==200&&!h&&(f=v.statusCode),v.headers&&(p[C]=v.headers))}),m!==void 0&&r&&(c={[r[0]]:m},s[r[0]]=void 0),{loaderData:s,errors:c,statusCode:f||200,loaderHeaders:p}}function Tw(e,t,n,r,o,l,s,c){let{loaderData:f,errors:h}=s4(t,n,r,o,c);for(let p=0;pr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function Dw(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function dr(e,t){let{pathname:n,routeId:r,method:o,type:l}=t===void 0?{}:t,s="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(s="Bad Request",o&&n&&r?c="You made a "+o+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":l==="defer-action"?c="defer() is not supported in actions":l==="invalid-body"&&(c="Unable to encode submission body")):e===403?(s="Forbidden",c='Route "'+r+'" does not match URL "'+n+'"'):e===404?(s="Not Found",c='No route matches URL "'+n+'"'):e===405&&(s="Method Not Allowed",o&&n&&r?c="You made a "+o.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":o&&(c='Invalid request method "'+o.toUpperCase()+'"')),new rg(e||500,s,new Error(c),!0)}function Lw(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Xo(n))return{result:n,idx:t}}}function x_(e){let t=typeof e=="string"?Co(e):e;return la(ht({},t,{hash:""}))}function u4(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function c4(e){return b_(e.result)&&q3.has(e.result.status)}function qo(e){return e.type===ct.deferred}function gr(e){return e.type===ct.error}function Xo(e){return(e&&e.type)===ct.redirect}function f4(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 b_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function d4(e){return V3.has(e.toLowerCase())}function Ir(e){return K3.has(e.toLowerCase())}async function Mw(e,t,n,r,o,l){for(let s=0;sm.route.id===f.route.id),p=h!=null&&!w_(h,f)&&(l&&l[f.route.id])!==void 0;if(qo(c)&&(o||p)){let m=r[s];Ae(m,"Expected an AbortSignal for revalidating fetcher deferred result"),await S_(c,m,o).then(v=>{v&&(n[s]=v||n[s])})}}}async function S_(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:ct.data,data:e.deferredData.unwrappedData}}catch(o){return{type:ct.error,error:o}}return{type:ct.data,data:e.deferredData.data}}}function ag(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Rm(e,t){let n=typeof t=="string"?Co(t).search:t.search;if(e[e.length-1].route.index&&ag(n||""))return e[e.length-1];let r=v_(e);return r[r.length-1]}function jw(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:l,json:s}=e;if(!(!t||!n||!r)){if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o};if(l!=null)return{formMethod:t,formAction:n,formEncType:r,formData:l,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function gh(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 p4(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 rs(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 h4(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 Xi(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 m4(e,t){try{let n=e.sessionStorage.getItem(y_);if(n){let r=JSON.parse(n);for(let[o,l]of Object.entries(r||{}))l&&Array.isArray(l)&&t.set(o,new Set(l||[]))}}catch{}}function v4(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(y_,JSON.stringify(n))}catch(r){ml(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** * React Router v6.23.1 * @@ -73,23 +73,23 @@ Error generating stack: `+l.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Ys(){return Ys=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function D4(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function L4(e,t){return e.button===0&&(!t||t==="_self")&&!D4(e)}const M4=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],j4="6";try{window.__reactRouterVersion=j4}catch{}function F4(e,t){return J3({basename:void 0,future:Ys({},void 0,{v7_prependBasename:!0}),history:S3({window:void 0}),hydrationData:z4(),routes:e,mapRouteProperties:I4,unstable_dataStrategy:void 0,window:void 0}).initialize()}function z4(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Ys({},t,{errors:U4(t.errors)})),t}function U4(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&o.__type==="RouteErrorResponse")n[r]=new rg(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let l=window[o.__subType];if(typeof l=="function")try{let s=new l(o.message);s.stack="",n[r]=s}catch{}}if(n[r]==null){let l=new Error(o.message);l.stack="",n[r]=l}}else n[r]=o;return n}const $4=R.createContext({isTransitioning:!1}),B4=R.createContext(new Map),W4="startTransition",zw=Th[W4],H4="flushSync",Uw=b3[H4];function G4(e){zw?zw(e):e()}function is(e){Uw?Uw(e):e()}class K4{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function Y4(e){let{fallbackElement:t,router:n,future:r}=e,[o,l]=R.useState(n.state),[s,c]=R.useState(),[f,h]=R.useState({isTransitioning:!1}),[p,m]=R.useState(),[v,S]=R.useState(),[C,N]=R.useState(),T=R.useRef(new Map),{v7_startTransition:_}=r||{},b=R.useCallback(k=>{_?G4(k):k()},[_]),E=R.useCallback((k,B)=>{let{deletedFetchers:U,unstable_flushSync:K,unstable_viewTransitionOpts:Z}=B;U.forEach(be=>T.current.delete(be)),k.fetchers.forEach((be,J)=>{be.data!==void 0&&T.current.set(J,be.data)});let he=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!Z||he){K?is(()=>l(k)):b(()=>l(k));return}if(K){is(()=>{v&&(p&&p.resolve(),v.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation})});let be=n.window.document.startViewTransition(()=>{is(()=>l(k))});be.finished.finally(()=>{is(()=>{m(void 0),S(void 0),c(void 0),h({isTransitioning:!1})})}),is(()=>S(be));return}v?(p&&p.resolve(),v.skipTransition(),N({state:k,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation})):(c(k),h({isTransitioning:!0,flushSync:!1,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation}))},[n.window,v,p,T,b]);R.useLayoutEffect(()=>n.subscribe(E),[n,E]),R.useEffect(()=>{f.isTransitioning&&!f.flushSync&&m(new K4)},[f]),R.useEffect(()=>{if(p&&s&&n.window){let k=s,B=p.promise,U=n.window.document.startViewTransition(async()=>{b(()=>l(k)),await B});U.finished.finally(()=>{m(void 0),S(void 0),c(void 0),h({isTransitioning:!1})}),S(U)}},[b,s,p,n.window]),R.useEffect(()=>{p&&s&&o.location.key===s.location.key&&p.resolve()},[p,v,o.location,s]),R.useEffect(()=>{!f.isTransitioning&&C&&(c(C.state),h({isTransitioning:!0,flushSync:!1,currentLocation:C.currentLocation,nextLocation:C.nextLocation}),N(void 0))},[f.isTransitioning,C]),R.useEffect(()=>{},[]);let I=R.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:k=>n.navigate(k),push:(k,B,U)=>n.navigate(k,{state:B,preventScrollReset:U==null?void 0:U.preventScrollReset}),replace:(k,B,U)=>n.navigate(k,{replace:!0,state:B,preventScrollReset:U==null?void 0:U.preventScrollReset})}),[n]),M=n.basename||"/",G=R.useMemo(()=>({router:n,navigator:I,static:!1,basename:M}),[n,I,M]);return R.createElement(R.Fragment,null,R.createElement(dd.Provider,{value:G},R.createElement(__.Provider,{value:o},R.createElement(B4.Provider,{value:T.current},R.createElement($4.Provider,{value:f},R.createElement(T4,{basename:M,location:o.location,navigationType:o.historyAction,navigator:I,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},o.initialized||n.future.v7_partialHydration?R.createElement(V4,{routes:n.routes,future:n.future,state:o}):t))))),null)}function V4(e){let{routes:t,future:n,state:r}=e;return w4(t,void 0,r,n)}const q4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",X4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Q4=R.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:l,replace:s,state:c,target:f,to:h,preventScrollReset:p,unstable_viewTransition:m}=t,v=A4(t,M4),{basename:S}=R.useContext(ma),C,N=!1;if(typeof h=="string"&&X4.test(h)&&(C=h,q4))try{let E=new URL(window.location.href),I=h.startsWith("//")?new URL(E.protocol+h):new URL(h),M=El(I.pathname,S);I.origin===E.origin&&M!=null?h=M+I.search+I.hash:N=!0}catch{}let T=g4(h,{relative:o}),_=Z4(h,{replace:s,state:c,target:f,preventScrollReset:p,relative:o,unstable_viewTransition:m});function b(E){r&&r(E),E.defaultPrevented||_(E)}return R.createElement("a",Ys({},v,{href:C||T,onClick:N||l?r:b,ref:n,target:f}))});var $w;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})($w||($w={}));var Bw;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Bw||(Bw={}));function Z4(e,t){let{target:n,replace:r,state:o,preventScrollReset:l,relative:s,unstable_viewTransition:c}=t===void 0?{}:t,f=sg(),h=pd(),p=N_(e,{relative:s});return R.useCallback(m=>{if(L4(m,n)){m.preventDefault();let v=r!==void 0?r:la(h)===la(p);f(e,{replace:v,state:o,preventScrollReset:l,relative:s,unstable_viewTransition:c})}},[h,f,p,r,o,n,e,l,s,c])}function J4(){return x.jsxs("div",{className:"flex flex-col center h-screen",children:[x.jsx("h1",{className:"text-fluidTitle mb-4",children:"404 Page Not Found"}),x.jsx(Q4,{to:"/",style:{fontSize:20,textDecoration:"none"},children:"Back to a4recipe Home"})]})}const Pi=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),e.stopPropagation())},Zc=e=>{e.target.select()},vl="None",Mn="/a4recipe/";function Xt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var eD=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ww=eD,yh=()=>Math.random().toString(36).substring(7).split("").join("."),tD={INIT:`@@redux/INIT${yh()}`,REPLACE:`@@redux/REPLACE${yh()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${yh()}`},Of=tD;function ug(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function O_(e,t,n){if(typeof e!="function")throw new Error(Xt(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Xt(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Xt(1));return n(O_)(e,t)}let r=e,o=t,l=new Map,s=l,c=0,f=!1;function h(){s===l&&(s=new Map,l.forEach((T,_)=>{s.set(_,T)}))}function p(){if(f)throw new Error(Xt(3));return o}function m(T){if(typeof T!="function")throw new Error(Xt(4));if(f)throw new Error(Xt(5));let _=!0;h();const b=c++;return s.set(b,T),function(){if(_){if(f)throw new Error(Xt(6));_=!1,h(),s.delete(b),l=null}}}function v(T){if(!ug(T))throw new Error(Xt(7));if(typeof T.type>"u")throw new Error(Xt(8));if(typeof T.type!="string")throw new Error(Xt(17));if(f)throw new Error(Xt(9));try{f=!0,o=r(o,T)}finally{f=!1}return(l=s).forEach(b=>{b()}),T}function S(T){if(typeof T!="function")throw new Error(Xt(10));r=T,v({type:Of.REPLACE})}function C(){const T=m;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(Xt(11));function b(){const I=_;I.next&&I.next(p())}return b(),{unsubscribe:T(b)}},[Ww](){return this}}}return v({type:Of.INIT}),{dispatch:v,subscribe:m,getState:p,replaceReducer:S,[Ww]:C}}function nD(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Of.INIT})>"u")throw new Error(Xt(12));if(typeof n(void 0,{type:Of.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Xt(13))})}function rD(e){const t=Object.keys(e),n={};for(let l=0;l"u")throw c&&c.type,new Error(Xt(14));h[m]=C,f=f||C!==S}return f=f||r.length!==Object.keys(s).length,f?h:s}}function Pf(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function iD(...e){return t=>(n,r)=>{const o=t(n,r);let l=()=>{throw new Error(Xt(15))};const s={getState:o.getState,dispatch:(f,...h)=>l(f,...h)},c=e.map(f=>f(s));return l=Pf(...c)(o.dispatch),{...o,dispatch:l}}}function oD(e){return ug(e)&&"type"in e&&typeof e.type=="string"}var P_=Symbol.for("immer-nothing"),Hw=Symbol.for("immer-draftable"),qn=Symbol.for("immer-state");function Dr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var gl=Object.getPrototypeOf;function yo(e){return!!e&&!!e[qn]}function Ei(e){var t;return e?T_(e)||Array.isArray(e)||!!e[Hw]||!!((t=e.constructor)!=null&&t[Hw])||md(e)||vd(e):!1}var aD=Object.prototype.constructor.toString();function T_(e){if(!e||typeof e!="object")return!1;const t=gl(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===aD}function Tf(e,t){hd(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function hd(e){const t=e[qn];return t?t.type_:Array.isArray(e)?1:md(e)?2:vd(e)?3:0}function Om(e,t){return hd(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function I_(e,t,n){const r=hd(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function lD(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function md(e){return e instanceof Map}function vd(e){return e instanceof Set}function Wo(e){return e.copy_||e.base_}function Pm(e,t){if(md(e))return new Map(e);if(vd(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=T_(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[qn];let o=Reflect.ownKeys(r);for(let l=0;l1&&(e.set=e.add=e.clear=e.delete=sD),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>cg(r,!0))),e}function sD(){Dr(2)}function gd(e){return Object.isFrozen(e)}var uD={};function sa(e){const t=uD[e];return t||Dr(0,e),t}var Vs;function A_(){return Vs}function cD(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Gw(e,t){t&&(sa("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Tm(e){Im(e),e.drafts_.forEach(fD),e.drafts_=null}function Im(e){e===Vs&&(Vs=e.parent_)}function Kw(e){return Vs=cD(Vs,e)}function fD(e){const t=e[qn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Yw(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[qn].modified_&&(Tm(t),Dr(4)),Ei(e)&&(e=If(t,e),t.parent_||Af(t,e)),t.patches_&&sa("Patches").generateReplacementPatches_(n[qn].base_,e,t.patches_,t.inversePatches_)):e=If(t,n,[]),Tm(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==P_?e:void 0}function If(e,t,n){if(gd(t))return t;const r=t[qn];if(!r)return Tf(t,(o,l)=>Vw(e,r,t,o,l,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Af(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let l=o,s=!1;r.type_===3&&(l=new Set(o),o.clear(),s=!0),Tf(l,(c,f)=>Vw(e,r,o,c,f,n,s)),Af(e,o,!1),n&&e.patches_&&sa("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Vw(e,t,n,r,o,l,s){if(yo(o)){const c=l&&t&&t.type_!==3&&!Om(t.assigned_,r)?l.concat(r):void 0,f=If(e,o,c);if(I_(n,r,f),yo(f))e.canAutoFreeze_=!1;else return}else s&&n.add(o);if(Ei(o)&&!gd(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;If(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Af(e,o)}}function Af(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&cg(t,n)}function dD(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:A_(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,l=fg;n&&(o=[r],l=qs);const{revoke:s,proxy:c}=Proxy.revocable(o,l);return r.draft_=c,r.revoke_=s,c}var fg={get(e,t){if(t===qn)return e;const n=Wo(e);if(!Om(n,t))return pD(e,n,t);const r=n[t];return e.finalized_||!Ei(r)?r:r===wh(e.base_,t)?(xh(e),e.copy_[t]=Dm(r,e)):r},has(e,t){return t in Wo(e)},ownKeys(e){return Reflect.ownKeys(Wo(e))},set(e,t,n){const r=D_(Wo(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=wh(Wo(e),t),l=o==null?void 0:o[qn];if(l&&l.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(lD(n,o)&&(n!==void 0||Om(e.base_,t)))return!0;xh(e),Am(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return wh(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,xh(e),Am(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Wo(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Dr(11)},getPrototypeOf(e){return gl(e.base_)},setPrototypeOf(){Dr(12)}},qs={};Tf(fg,(e,t)=>{qs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});qs.deleteProperty=function(e,t){return qs.set.call(this,e,t,void 0)};qs.set=function(e,t,n){return fg.set.call(this,e[0],t,n,e[0])};function wh(e,t){const n=e[qn];return(n?Wo(n):e)[t]}function pD(e,t,n){var o;const r=D_(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function D_(e,t){if(!(t in e))return;let n=gl(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=gl(n)}}function Am(e){e.modified_||(e.modified_=!0,e.parent_&&Am(e.parent_))}function xh(e){e.copy_||(e.copy_=Pm(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var hD=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const l=n;n=t;const s=this;return function(f=l,...h){return s.produce(f,p=>n.call(this,p,...h))}}typeof n!="function"&&Dr(6),r!==void 0&&typeof r!="function"&&Dr(7);let o;if(Ei(t)){const l=Kw(this),s=Dm(t,void 0);let c=!0;try{o=n(s),c=!1}finally{c?Tm(l):Im(l)}return Gw(l,r),Yw(o,l)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===P_&&(o=void 0),this.autoFreeze_&&cg(o,!0),r){const l=[],s=[];sa("Patches").generateReplacementPatches_(t,o,l,s),r(l,s)}return o}else Dr(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...c)=>this.produceWithPatches(s,f=>t(f,...c));let r,o;return[this.produce(t,n,(s,c)=>{r=s,o=c}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Ei(e)||Dr(8),yo(e)&&(e=L_(e));const t=Kw(this),n=Dm(e,void 0);return n[qn].isManual_=!0,Im(t),n}finishDraft(e,t){const n=e&&e[qn];(!n||!n.isManual_)&&Dr(9);const{scope_:r}=n;return Gw(r,t),Yw(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=sa("Patches").applyPatches_;return yo(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Dm(e,t){const n=md(e)?sa("MapSet").proxyMap_(e,t):vd(e)?sa("MapSet").proxySet_(e,t):dD(e,t);return(t?t.scope_:A_()).drafts_.push(n),n}function L_(e){return yo(e)||Dr(10,e),M_(e)}function M_(e){if(!Ei(e)||gd(e))return e;const t=e[qn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Pm(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Pm(e,!0);return Tf(n,(r,o)=>{I_(n,r,M_(o))}),t&&(t.finalized_=!1),n}var Xn=new hD,j_=Xn.produce;Xn.produceWithPatches.bind(Xn);Xn.setAutoFreeze.bind(Xn);Xn.setUseStrictShallowCopy.bind(Xn);Xn.applyPatches.bind(Xn);Xn.createDraft.bind(Xn);Xn.finishDraft.bind(Xn);function mD(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function vD(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function gD(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var qw=e=>Array.isArray(e)?e:[e];function yD(e){const t=Array.isArray(e[0])?e[0]:e;return gD(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function wD(e,t){const n=[],{length:r}=e;for(let o=0;o{n=Cc(),s.resetResultsCount()},s.resultsCount=()=>l,s.resetResultsCount=()=>{l=0},s}function F_(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let l=0,s=0,c,f={},h=o.pop();typeof h=="object"&&(f=h,h=o.pop()),mD(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const p={...n,...f},{memoize:m,memoizeOptions:v=[],argsMemoize:S=dg,argsMemoizeOptions:C=[],devModeChecks:N={}}=p,T=qw(v),_=qw(C),b=yD(o),E=m(function(){return l++,h.apply(null,arguments)},...T),I=S(function(){s++;const G=wD(b,arguments);return c=E.apply(null,G),c},..._);return Object.assign(I,{resultFunc:h,memoizedResultFunc:E,dependencies:b,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>c,recomputations:()=>l,resetRecomputations:()=>{l=0},memoize:m,argsMemoize:S})};return Object.assign(r,{withTypes:()=>r}),r}var _D=F_(dg),ED=Object.assign((e,t=_D)=>{vD(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(l=>e[l]);return t(r,(...l)=>l.reduce((s,c,f)=>(s[n[f]]=c,s),{}))},{withTypes:()=>ED});function z_(e){return({dispatch:n,getState:r})=>o=>l=>typeof l=="function"?l(n,r,e):o(l)}var CD=z_(),ND=z_,kD=(...e)=>{const t=F_(...e),n=Object.assign((...r)=>{const o=t(...r),l=(s,...c)=>o(yo(s)?L_(s):s,...c);return Object.assign(l,o),l},{withTypes:()=>n});return n};kD(dg);var RD=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Pf:Pf.apply(null,arguments)};function yl(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(Dn(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>oD(r)&&r.type===e,n}var U_=class cs extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,cs.prototype)}static get[Symbol.species](){return cs}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new cs(...t[0].concat(this)):new cs(...t.concat(this))}};function Qw(e){return Ei(e)?j_(e,()=>{}):e}function Zw(e,t,n){if(e.has(t)){let o=e.get(t);return n.update&&(o=n.update(o,t,e),e.set(t,o)),o}if(!n.insert)throw new Error(Dn(10));const r=n.insert(t,e);return e.set(t,r),r}function OD(e){return typeof e=="boolean"}var PD=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:l=!0}=t??{};let s=new U_;return n&&(OD(n)?s.push(CD):s.push(ND(n.extraArgument))),s},TD="RTK_autoBatch",$_=e=>t=>{setTimeout(t,e)},ID=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:$_(10),AD=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,l=!1,s=!1;const c=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?ID:e.type==="callback"?e.queueNotification:$_(e.timeout),h=()=>{s=!1,l&&(l=!1,c.forEach(p=>p()))};return Object.assign({},r,{subscribe(p){const m=()=>o&&p(),v=r.subscribe(m);return c.add(p),()=>{v(),c.delete(p)}},dispatch(p){var m;try{return o=!((m=p==null?void 0:p.meta)!=null&&m[TD]),l=!o,l&&(s||(s=!0,f(h))),r.dispatch(p)}finally{o=!0}}})},DD=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new U_(e);return r&&o.push(AD(typeof r=="object"?r:void 0)),o},LD=!0;function MD(e){const t=PD(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:l=void 0,enhancers:s=void 0}=e||{};let c;if(typeof n=="function")c=n;else if(ug(n))c=rD(n);else throw new Error(Dn(1));let f;typeof r=="function"?f=r(t):f=t();let h=Pf;o&&(h=RD({trace:!LD,...typeof o=="object"&&o}));const p=iD(...f),m=DD(p);let v=typeof s=="function"?s(m):m();const S=h(...v);return O_(c,l,S)}function B_(e){const t={},n=[];let r;const o={addCase(l,s){const c=typeof l=="string"?l:l.type;if(!c)throw new Error(Dn(28));if(c in t)throw new Error(Dn(29));return t[c]=s,o},addMatcher(l,s){return n.push({matcher:l,reducer:s}),o},addDefaultCase(l){return r=l,o}};return e(o),[t,n,r]}function jD(e){return typeof e=="function"}function FD(e,t){let[n,r,o]=B_(t),l;if(jD(e))l=()=>Qw(e());else{const c=Qw(e);l=()=>c}function s(c=l(),f){let h=[n[f.type],...r.filter(({matcher:p})=>p(f)).map(({reducer:p})=>p)];return h.filter(p=>!!p).length===0&&(h=[o]),h.reduce((p,m)=>{if(m)if(yo(p)){const S=m(p,f);return S===void 0?p:S}else{if(Ei(p))return j_(p,v=>m(v,f));{const v=m(p,f);if(v===void 0){if(p===null)return p;throw new Error(Dn(9))}return v}}return p},c)}return s.getInitialState=l,s}var zD="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",UD=(e=21)=>{let t="",n=e;for(;n--;)t+=zD[Math.random()*64|0];return t},$D=Symbol.for("rtk-slice-createasyncthunk");function BD(e,t){return`${e}/${t}`}function WD({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[$D];return function(o){const{name:l,reducerPath:s=l}=o;if(!l)throw new Error(Dn(11));typeof process<"u";const c=(typeof o.reducers=="function"?o.reducers(GD()):o.reducers)||{},f=Object.keys(c),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(E,I){const M=typeof E=="string"?E:E.type;if(!M)throw new Error(Dn(12));if(M in h.sliceCaseReducersByType)throw new Error(Dn(13));return h.sliceCaseReducersByType[M]=I,p},addMatcher(E,I){return h.sliceMatchers.push({matcher:E,reducer:I}),p},exposeAction(E,I){return h.actionCreators[E]=I,p},exposeCaseReducer(E,I){return h.sliceCaseReducersByName[E]=I,p}};f.forEach(E=>{const I=c[E],M={reducerName:E,type:BD(l,E),createNotation:typeof o.reducers=="function"};YD(I)?qD(M,I,p,t):KD(M,I,p)});function m(){const[E={},I=[],M=void 0]=typeof o.extraReducers=="function"?B_(o.extraReducers):[o.extraReducers],G={...E,...h.sliceCaseReducersByType};return FD(o.initialState,k=>{for(let B in G)k.addCase(B,G[B]);for(let B of h.sliceMatchers)k.addMatcher(B.matcher,B.reducer);for(let B of I)k.addMatcher(B.matcher,B.reducer);M&&k.addDefaultCase(M)})}const v=E=>E,S=new Map;let C;function N(E,I){return C||(C=m()),C(E,I)}function T(){return C||(C=m()),C.getInitialState()}function _(E,I=!1){function M(k){let B=k[E];return typeof B>"u"&&I&&(B=T()),B}function G(k=v){const B=Zw(S,I,{insert:()=>new WeakMap});return Zw(B,k,{insert:()=>{const U={};for(const[K,Z]of Object.entries(o.selectors??{}))U[K]=HD(Z,k,T,I);return U}})}return{reducerPath:E,getSelectors:G,get selectors(){return G(M)},selectSlice:M}}const b={name:l,reducer:N,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:T,..._(s),injectInto(E,{reducerPath:I,...M}={}){const G=I??s;return E.inject({reducerPath:G,reducer:N},M),{...b,..._(G,!0)}}};return b}}function HD(e,t,n,r){function o(l,...s){let c=t(l);return typeof c>"u"&&r&&(c=n()),e(c,...s)}return o.unwrapped=e,o}var yd=WD();function GD(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function KD({type:e,reducerName:t,createNotation:n},r,o){let l,s;if("reducer"in r){if(n&&!VD(r))throw new Error(Dn(17));l=r.reducer,s=r.prepare}else l=r;o.addCase(e,l).exposeCaseReducer(t,l).exposeAction(t,s?yl(e,s):yl(e))}function YD(e){return e._reducerDefinitionType==="asyncThunk"}function VD(e){return e._reducerDefinitionType==="reducerWithPrepare"}function qD({type:e,reducerName:t},n,r,o){if(!o)throw new Error(Dn(18));const{payloadCreator:l,fulfilled:s,pending:c,rejected:f,settled:h,options:p}=n,m=o(e,l,p);r.exposeAction(t,m),s&&r.addCase(m.fulfilled,s),c&&r.addCase(m.pending,c),f&&r.addCase(m.rejected,f),h&&r.addMatcher(m.settled,h),r.exposeCaseReducer(t,{fulfilled:s||Nc,pending:c||Nc,rejected:f||Nc,settled:h||Nc})}function Nc(){}var XD=(e,t)=>{if(typeof e!="function")throw new Error(Dn(32))},pg="listenerMiddleware",QD=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:l}=e;if(t)o=yl(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(Dn(21));return XD(l),{predicate:o,type:t,effect:l}},ZD=Object.assign(e=>{const{type:t,predicate:n,effect:r}=QD(e);return{id:UD(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Dn(22))}}},{withTypes:()=>ZD}),JD=Object.assign(yl(`${pg}/add`),{withTypes:()=>JD});yl(`${pg}/removeAll`);var eL=Object.assign(yl(`${pg}/remove`),{withTypes:()=>eL});function Dn(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const tL={warning:""},W_=yd({name:"warning",initialState:tL,reducers:{setWarning:(e,t)=>{e.warning=t.payload}}}),{setWarning:Lr}=W_.actions,nL=W_.reducer;var Df={exports:{}};/** + */function Ys(){return Ys=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function D4(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function L4(e,t){return e.button===0&&(!t||t==="_self")&&!D4(e)}const M4=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],j4="6";try{window.__reactRouterVersion=j4}catch{}function F4(e,t){return J3({basename:void 0,future:Ys({},void 0,{v7_prependBasename:!0}),history:S3({window:void 0}),hydrationData:z4(),routes:e,mapRouteProperties:I4,unstable_dataStrategy:void 0,window:void 0}).initialize()}function z4(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Ys({},t,{errors:U4(t.errors)})),t}function U4(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&o.__type==="RouteErrorResponse")n[r]=new rg(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let l=window[o.__subType];if(typeof l=="function")try{let s=new l(o.message);s.stack="",n[r]=s}catch{}}if(n[r]==null){let l=new Error(o.message);l.stack="",n[r]=l}}else n[r]=o;return n}const $4=R.createContext({isTransitioning:!1}),B4=R.createContext(new Map),W4="startTransition",zw=Th[W4],H4="flushSync",Uw=b3[H4];function G4(e){zw?zw(e):e()}function is(e){Uw?Uw(e):e()}class K4{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function Y4(e){let{fallbackElement:t,router:n,future:r}=e,[o,l]=R.useState(n.state),[s,c]=R.useState(),[f,h]=R.useState({isTransitioning:!1}),[p,m]=R.useState(),[v,S]=R.useState(),[C,N]=R.useState(),T=R.useRef(new Map),{v7_startTransition:_}=r||{},b=R.useCallback(k=>{_?G4(k):k()},[_]),E=R.useCallback((k,B)=>{let{deletedFetchers:U,unstable_flushSync:K,unstable_viewTransitionOpts:Z}=B;U.forEach(be=>T.current.delete(be)),k.fetchers.forEach((be,J)=>{be.data!==void 0&&T.current.set(J,be.data)});let he=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!Z||he){K?is(()=>l(k)):b(()=>l(k));return}if(K){is(()=>{v&&(p&&p.resolve(),v.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation})});let be=n.window.document.startViewTransition(()=>{is(()=>l(k))});be.finished.finally(()=>{is(()=>{m(void 0),S(void 0),c(void 0),h({isTransitioning:!1})})}),is(()=>S(be));return}v?(p&&p.resolve(),v.skipTransition(),N({state:k,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation})):(c(k),h({isTransitioning:!0,flushSync:!1,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation}))},[n.window,v,p,T,b]);R.useLayoutEffect(()=>n.subscribe(E),[n,E]),R.useEffect(()=>{f.isTransitioning&&!f.flushSync&&m(new K4)},[f]),R.useEffect(()=>{if(p&&s&&n.window){let k=s,B=p.promise,U=n.window.document.startViewTransition(async()=>{b(()=>l(k)),await B});U.finished.finally(()=>{m(void 0),S(void 0),c(void 0),h({isTransitioning:!1})}),S(U)}},[b,s,p,n.window]),R.useEffect(()=>{p&&s&&o.location.key===s.location.key&&p.resolve()},[p,v,o.location,s]),R.useEffect(()=>{!f.isTransitioning&&C&&(c(C.state),h({isTransitioning:!0,flushSync:!1,currentLocation:C.currentLocation,nextLocation:C.nextLocation}),N(void 0))},[f.isTransitioning,C]),R.useEffect(()=>{},[]);let I=R.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:k=>n.navigate(k),push:(k,B,U)=>n.navigate(k,{state:B,preventScrollReset:U==null?void 0:U.preventScrollReset}),replace:(k,B,U)=>n.navigate(k,{replace:!0,state:B,preventScrollReset:U==null?void 0:U.preventScrollReset})}),[n]),M=n.basename||"/",G=R.useMemo(()=>({router:n,navigator:I,static:!1,basename:M}),[n,I,M]);return R.createElement(R.Fragment,null,R.createElement(dd.Provider,{value:G},R.createElement(__.Provider,{value:o},R.createElement(B4.Provider,{value:T.current},R.createElement($4.Provider,{value:f},R.createElement(T4,{basename:M,location:o.location,navigationType:o.historyAction,navigator:I,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},o.initialized||n.future.v7_partialHydration?R.createElement(V4,{routes:n.routes,future:n.future,state:o}):t))))),null)}function V4(e){let{routes:t,future:n,state:r}=e;return w4(t,void 0,r,n)}const q4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",X4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Q4=R.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:l,replace:s,state:c,target:f,to:h,preventScrollReset:p,unstable_viewTransition:m}=t,v=A4(t,M4),{basename:S}=R.useContext(ma),C,N=!1;if(typeof h=="string"&&X4.test(h)&&(C=h,q4))try{let E=new URL(window.location.href),I=h.startsWith("//")?new URL(E.protocol+h):new URL(h),M=El(I.pathname,S);I.origin===E.origin&&M!=null?h=M+I.search+I.hash:N=!0}catch{}let T=g4(h,{relative:o}),_=Z4(h,{replace:s,state:c,target:f,preventScrollReset:p,relative:o,unstable_viewTransition:m});function b(E){r&&r(E),E.defaultPrevented||_(E)}return R.createElement("a",Ys({},v,{href:C||T,onClick:N||l?r:b,ref:n,target:f}))});var $w;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})($w||($w={}));var Bw;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Bw||(Bw={}));function Z4(e,t){let{target:n,replace:r,state:o,preventScrollReset:l,relative:s,unstable_viewTransition:c}=t===void 0?{}:t,f=sg(),h=pd(),p=N_(e,{relative:s});return R.useCallback(m=>{if(L4(m,n)){m.preventDefault();let v=r!==void 0?r:la(h)===la(p);f(e,{replace:v,state:o,preventScrollReset:l,relative:s,unstable_viewTransition:c})}},[h,f,p,r,o,n,e,l,s,c])}function J4(){return x.jsxs("div",{className:"flex flex-col center h-screen",children:[x.jsx("h1",{className:"text-fluidTitle mb-4",children:"404 Page Not Found"}),x.jsx(Q4,{to:"/",style:{fontSize:20,textDecoration:"none"},children:"Back to a4recipe Home"})]})}const Pi=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),e.stopPropagation())},Zc=e=>{e.target.select()},vl="None",Vn="/a4recipe/";function Xt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var eD=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ww=eD,yh=()=>Math.random().toString(36).substring(7).split("").join("."),tD={INIT:`@@redux/INIT${yh()}`,REPLACE:`@@redux/REPLACE${yh()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${yh()}`},Of=tD;function ug(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function O_(e,t,n){if(typeof e!="function")throw new Error(Xt(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Xt(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Xt(1));return n(O_)(e,t)}let r=e,o=t,l=new Map,s=l,c=0,f=!1;function h(){s===l&&(s=new Map,l.forEach((T,_)=>{s.set(_,T)}))}function p(){if(f)throw new Error(Xt(3));return o}function m(T){if(typeof T!="function")throw new Error(Xt(4));if(f)throw new Error(Xt(5));let _=!0;h();const b=c++;return s.set(b,T),function(){if(_){if(f)throw new Error(Xt(6));_=!1,h(),s.delete(b),l=null}}}function v(T){if(!ug(T))throw new Error(Xt(7));if(typeof T.type>"u")throw new Error(Xt(8));if(typeof T.type!="string")throw new Error(Xt(17));if(f)throw new Error(Xt(9));try{f=!0,o=r(o,T)}finally{f=!1}return(l=s).forEach(b=>{b()}),T}function S(T){if(typeof T!="function")throw new Error(Xt(10));r=T,v({type:Of.REPLACE})}function C(){const T=m;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(Xt(11));function b(){const I=_;I.next&&I.next(p())}return b(),{unsubscribe:T(b)}},[Ww](){return this}}}return v({type:Of.INIT}),{dispatch:v,subscribe:m,getState:p,replaceReducer:S,[Ww]:C}}function nD(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Of.INIT})>"u")throw new Error(Xt(12));if(typeof n(void 0,{type:Of.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Xt(13))})}function rD(e){const t=Object.keys(e),n={};for(let l=0;l"u")throw c&&c.type,new Error(Xt(14));h[m]=C,f=f||C!==S}return f=f||r.length!==Object.keys(s).length,f?h:s}}function Pf(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function iD(...e){return t=>(n,r)=>{const o=t(n,r);let l=()=>{throw new Error(Xt(15))};const s={getState:o.getState,dispatch:(f,...h)=>l(f,...h)},c=e.map(f=>f(s));return l=Pf(...c)(o.dispatch),{...o,dispatch:l}}}function oD(e){return ug(e)&&"type"in e&&typeof e.type=="string"}var P_=Symbol.for("immer-nothing"),Hw=Symbol.for("immer-draftable"),qn=Symbol.for("immer-state");function Dr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var gl=Object.getPrototypeOf;function yo(e){return!!e&&!!e[qn]}function Ei(e){var t;return e?T_(e)||Array.isArray(e)||!!e[Hw]||!!((t=e.constructor)!=null&&t[Hw])||md(e)||vd(e):!1}var aD=Object.prototype.constructor.toString();function T_(e){if(!e||typeof e!="object")return!1;const t=gl(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===aD}function Tf(e,t){hd(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function hd(e){const t=e[qn];return t?t.type_:Array.isArray(e)?1:md(e)?2:vd(e)?3:0}function Om(e,t){return hd(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function I_(e,t,n){const r=hd(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function lD(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function md(e){return e instanceof Map}function vd(e){return e instanceof Set}function Wo(e){return e.copy_||e.base_}function Pm(e,t){if(md(e))return new Map(e);if(vd(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=T_(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[qn];let o=Reflect.ownKeys(r);for(let l=0;l1&&(e.set=e.add=e.clear=e.delete=sD),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>cg(r,!0))),e}function sD(){Dr(2)}function gd(e){return Object.isFrozen(e)}var uD={};function sa(e){const t=uD[e];return t||Dr(0,e),t}var Vs;function A_(){return Vs}function cD(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Gw(e,t){t&&(sa("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Tm(e){Im(e),e.drafts_.forEach(fD),e.drafts_=null}function Im(e){e===Vs&&(Vs=e.parent_)}function Kw(e){return Vs=cD(Vs,e)}function fD(e){const t=e[qn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Yw(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[qn].modified_&&(Tm(t),Dr(4)),Ei(e)&&(e=If(t,e),t.parent_||Af(t,e)),t.patches_&&sa("Patches").generateReplacementPatches_(n[qn].base_,e,t.patches_,t.inversePatches_)):e=If(t,n,[]),Tm(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==P_?e:void 0}function If(e,t,n){if(gd(t))return t;const r=t[qn];if(!r)return Tf(t,(o,l)=>Vw(e,r,t,o,l,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Af(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let l=o,s=!1;r.type_===3&&(l=new Set(o),o.clear(),s=!0),Tf(l,(c,f)=>Vw(e,r,o,c,f,n,s)),Af(e,o,!1),n&&e.patches_&&sa("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Vw(e,t,n,r,o,l,s){if(yo(o)){const c=l&&t&&t.type_!==3&&!Om(t.assigned_,r)?l.concat(r):void 0,f=If(e,o,c);if(I_(n,r,f),yo(f))e.canAutoFreeze_=!1;else return}else s&&n.add(o);if(Ei(o)&&!gd(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;If(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Af(e,o)}}function Af(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&cg(t,n)}function dD(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:A_(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,l=fg;n&&(o=[r],l=qs);const{revoke:s,proxy:c}=Proxy.revocable(o,l);return r.draft_=c,r.revoke_=s,c}var fg={get(e,t){if(t===qn)return e;const n=Wo(e);if(!Om(n,t))return pD(e,n,t);const r=n[t];return e.finalized_||!Ei(r)?r:r===wh(e.base_,t)?(xh(e),e.copy_[t]=Dm(r,e)):r},has(e,t){return t in Wo(e)},ownKeys(e){return Reflect.ownKeys(Wo(e))},set(e,t,n){const r=D_(Wo(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=wh(Wo(e),t),l=o==null?void 0:o[qn];if(l&&l.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(lD(n,o)&&(n!==void 0||Om(e.base_,t)))return!0;xh(e),Am(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return wh(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,xh(e),Am(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Wo(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Dr(11)},getPrototypeOf(e){return gl(e.base_)},setPrototypeOf(){Dr(12)}},qs={};Tf(fg,(e,t)=>{qs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});qs.deleteProperty=function(e,t){return qs.set.call(this,e,t,void 0)};qs.set=function(e,t,n){return fg.set.call(this,e[0],t,n,e[0])};function wh(e,t){const n=e[qn];return(n?Wo(n):e)[t]}function pD(e,t,n){var o;const r=D_(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function D_(e,t){if(!(t in e))return;let n=gl(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=gl(n)}}function Am(e){e.modified_||(e.modified_=!0,e.parent_&&Am(e.parent_))}function xh(e){e.copy_||(e.copy_=Pm(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var hD=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const l=n;n=t;const s=this;return function(f=l,...h){return s.produce(f,p=>n.call(this,p,...h))}}typeof n!="function"&&Dr(6),r!==void 0&&typeof r!="function"&&Dr(7);let o;if(Ei(t)){const l=Kw(this),s=Dm(t,void 0);let c=!0;try{o=n(s),c=!1}finally{c?Tm(l):Im(l)}return Gw(l,r),Yw(o,l)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===P_&&(o=void 0),this.autoFreeze_&&cg(o,!0),r){const l=[],s=[];sa("Patches").generateReplacementPatches_(t,o,l,s),r(l,s)}return o}else Dr(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...c)=>this.produceWithPatches(s,f=>t(f,...c));let r,o;return[this.produce(t,n,(s,c)=>{r=s,o=c}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Ei(e)||Dr(8),yo(e)&&(e=L_(e));const t=Kw(this),n=Dm(e,void 0);return n[qn].isManual_=!0,Im(t),n}finishDraft(e,t){const n=e&&e[qn];(!n||!n.isManual_)&&Dr(9);const{scope_:r}=n;return Gw(r,t),Yw(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=sa("Patches").applyPatches_;return yo(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Dm(e,t){const n=md(e)?sa("MapSet").proxyMap_(e,t):vd(e)?sa("MapSet").proxySet_(e,t):dD(e,t);return(t?t.scope_:A_()).drafts_.push(n),n}function L_(e){return yo(e)||Dr(10,e),M_(e)}function M_(e){if(!Ei(e)||gd(e))return e;const t=e[qn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Pm(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Pm(e,!0);return Tf(n,(r,o)=>{I_(n,r,M_(o))}),t&&(t.finalized_=!1),n}var Xn=new hD,j_=Xn.produce;Xn.produceWithPatches.bind(Xn);Xn.setAutoFreeze.bind(Xn);Xn.setUseStrictShallowCopy.bind(Xn);Xn.applyPatches.bind(Xn);Xn.createDraft.bind(Xn);Xn.finishDraft.bind(Xn);function mD(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function vD(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function gD(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var qw=e=>Array.isArray(e)?e:[e];function yD(e){const t=Array.isArray(e[0])?e[0]:e;return gD(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function wD(e,t){const n=[],{length:r}=e;for(let o=0;o{n=Cc(),s.resetResultsCount()},s.resultsCount=()=>l,s.resetResultsCount=()=>{l=0},s}function F_(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let l=0,s=0,c,f={},h=o.pop();typeof h=="object"&&(f=h,h=o.pop()),mD(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const p={...n,...f},{memoize:m,memoizeOptions:v=[],argsMemoize:S=dg,argsMemoizeOptions:C=[],devModeChecks:N={}}=p,T=qw(v),_=qw(C),b=yD(o),E=m(function(){return l++,h.apply(null,arguments)},...T),I=S(function(){s++;const G=wD(b,arguments);return c=E.apply(null,G),c},..._);return Object.assign(I,{resultFunc:h,memoizedResultFunc:E,dependencies:b,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>c,recomputations:()=>l,resetRecomputations:()=>{l=0},memoize:m,argsMemoize:S})};return Object.assign(r,{withTypes:()=>r}),r}var _D=F_(dg),ED=Object.assign((e,t=_D)=>{vD(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(l=>e[l]);return t(r,(...l)=>l.reduce((s,c,f)=>(s[n[f]]=c,s),{}))},{withTypes:()=>ED});function z_(e){return({dispatch:n,getState:r})=>o=>l=>typeof l=="function"?l(n,r,e):o(l)}var CD=z_(),ND=z_,kD=(...e)=>{const t=F_(...e),n=Object.assign((...r)=>{const o=t(...r),l=(s,...c)=>o(yo(s)?L_(s):s,...c);return Object.assign(l,o),l},{withTypes:()=>n});return n};kD(dg);var RD=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Pf:Pf.apply(null,arguments)};function yl(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(Dn(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>oD(r)&&r.type===e,n}var U_=class cs extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,cs.prototype)}static get[Symbol.species](){return cs}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new cs(...t[0].concat(this)):new cs(...t.concat(this))}};function Qw(e){return Ei(e)?j_(e,()=>{}):e}function Zw(e,t,n){if(e.has(t)){let o=e.get(t);return n.update&&(o=n.update(o,t,e),e.set(t,o)),o}if(!n.insert)throw new Error(Dn(10));const r=n.insert(t,e);return e.set(t,r),r}function OD(e){return typeof e=="boolean"}var PD=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:l=!0}=t??{};let s=new U_;return n&&(OD(n)?s.push(CD):s.push(ND(n.extraArgument))),s},TD="RTK_autoBatch",$_=e=>t=>{setTimeout(t,e)},ID=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:$_(10),AD=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,l=!1,s=!1;const c=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?ID:e.type==="callback"?e.queueNotification:$_(e.timeout),h=()=>{s=!1,l&&(l=!1,c.forEach(p=>p()))};return Object.assign({},r,{subscribe(p){const m=()=>o&&p(),v=r.subscribe(m);return c.add(p),()=>{v(),c.delete(p)}},dispatch(p){var m;try{return o=!((m=p==null?void 0:p.meta)!=null&&m[TD]),l=!o,l&&(s||(s=!0,f(h))),r.dispatch(p)}finally{o=!0}}})},DD=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new U_(e);return r&&o.push(AD(typeof r=="object"?r:void 0)),o},LD=!0;function MD(e){const t=PD(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:l=void 0,enhancers:s=void 0}=e||{};let c;if(typeof n=="function")c=n;else if(ug(n))c=rD(n);else throw new Error(Dn(1));let f;typeof r=="function"?f=r(t):f=t();let h=Pf;o&&(h=RD({trace:!LD,...typeof o=="object"&&o}));const p=iD(...f),m=DD(p);let v=typeof s=="function"?s(m):m();const S=h(...v);return O_(c,l,S)}function B_(e){const t={},n=[];let r;const o={addCase(l,s){const c=typeof l=="string"?l:l.type;if(!c)throw new Error(Dn(28));if(c in t)throw new Error(Dn(29));return t[c]=s,o},addMatcher(l,s){return n.push({matcher:l,reducer:s}),o},addDefaultCase(l){return r=l,o}};return e(o),[t,n,r]}function jD(e){return typeof e=="function"}function FD(e,t){let[n,r,o]=B_(t),l;if(jD(e))l=()=>Qw(e());else{const c=Qw(e);l=()=>c}function s(c=l(),f){let h=[n[f.type],...r.filter(({matcher:p})=>p(f)).map(({reducer:p})=>p)];return h.filter(p=>!!p).length===0&&(h=[o]),h.reduce((p,m)=>{if(m)if(yo(p)){const S=m(p,f);return S===void 0?p:S}else{if(Ei(p))return j_(p,v=>m(v,f));{const v=m(p,f);if(v===void 0){if(p===null)return p;throw new Error(Dn(9))}return v}}return p},c)}return s.getInitialState=l,s}var zD="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",UD=(e=21)=>{let t="",n=e;for(;n--;)t+=zD[Math.random()*64|0];return t},$D=Symbol.for("rtk-slice-createasyncthunk");function BD(e,t){return`${e}/${t}`}function WD({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[$D];return function(o){const{name:l,reducerPath:s=l}=o;if(!l)throw new Error(Dn(11));typeof process<"u";const c=(typeof o.reducers=="function"?o.reducers(GD()):o.reducers)||{},f=Object.keys(c),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(E,I){const M=typeof E=="string"?E:E.type;if(!M)throw new Error(Dn(12));if(M in h.sliceCaseReducersByType)throw new Error(Dn(13));return h.sliceCaseReducersByType[M]=I,p},addMatcher(E,I){return h.sliceMatchers.push({matcher:E,reducer:I}),p},exposeAction(E,I){return h.actionCreators[E]=I,p},exposeCaseReducer(E,I){return h.sliceCaseReducersByName[E]=I,p}};f.forEach(E=>{const I=c[E],M={reducerName:E,type:BD(l,E),createNotation:typeof o.reducers=="function"};YD(I)?qD(M,I,p,t):KD(M,I,p)});function m(){const[E={},I=[],M=void 0]=typeof o.extraReducers=="function"?B_(o.extraReducers):[o.extraReducers],G={...E,...h.sliceCaseReducersByType};return FD(o.initialState,k=>{for(let B in G)k.addCase(B,G[B]);for(let B of h.sliceMatchers)k.addMatcher(B.matcher,B.reducer);for(let B of I)k.addMatcher(B.matcher,B.reducer);M&&k.addDefaultCase(M)})}const v=E=>E,S=new Map;let C;function N(E,I){return C||(C=m()),C(E,I)}function T(){return C||(C=m()),C.getInitialState()}function _(E,I=!1){function M(k){let B=k[E];return typeof B>"u"&&I&&(B=T()),B}function G(k=v){const B=Zw(S,I,{insert:()=>new WeakMap});return Zw(B,k,{insert:()=>{const U={};for(const[K,Z]of Object.entries(o.selectors??{}))U[K]=HD(Z,k,T,I);return U}})}return{reducerPath:E,getSelectors:G,get selectors(){return G(M)},selectSlice:M}}const b={name:l,reducer:N,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:T,..._(s),injectInto(E,{reducerPath:I,...M}={}){const G=I??s;return E.inject({reducerPath:G,reducer:N},M),{...b,..._(G,!0)}}};return b}}function HD(e,t,n,r){function o(l,...s){let c=t(l);return typeof c>"u"&&r&&(c=n()),e(c,...s)}return o.unwrapped=e,o}var yd=WD();function GD(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function KD({type:e,reducerName:t,createNotation:n},r,o){let l,s;if("reducer"in r){if(n&&!VD(r))throw new Error(Dn(17));l=r.reducer,s=r.prepare}else l=r;o.addCase(e,l).exposeCaseReducer(t,l).exposeAction(t,s?yl(e,s):yl(e))}function YD(e){return e._reducerDefinitionType==="asyncThunk"}function VD(e){return e._reducerDefinitionType==="reducerWithPrepare"}function qD({type:e,reducerName:t},n,r,o){if(!o)throw new Error(Dn(18));const{payloadCreator:l,fulfilled:s,pending:c,rejected:f,settled:h,options:p}=n,m=o(e,l,p);r.exposeAction(t,m),s&&r.addCase(m.fulfilled,s),c&&r.addCase(m.pending,c),f&&r.addCase(m.rejected,f),h&&r.addMatcher(m.settled,h),r.exposeCaseReducer(t,{fulfilled:s||Nc,pending:c||Nc,rejected:f||Nc,settled:h||Nc})}function Nc(){}var XD=(e,t)=>{if(typeof e!="function")throw new Error(Dn(32))},pg="listenerMiddleware",QD=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:l}=e;if(t)o=yl(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(Dn(21));return XD(l),{predicate:o,type:t,effect:l}},ZD=Object.assign(e=>{const{type:t,predicate:n,effect:r}=QD(e);return{id:UD(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Dn(22))}}},{withTypes:()=>ZD}),JD=Object.assign(yl(`${pg}/add`),{withTypes:()=>JD});yl(`${pg}/removeAll`);var eL=Object.assign(yl(`${pg}/remove`),{withTypes:()=>eL});function Dn(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const tL={warning:""},W_=yd({name:"warning",initialState:tL,reducers:{setWarning:(e,t)=>{e.warning=t.payload}}}),{setWarning:Lr}=W_.actions,nL=W_.reducer;var Df={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */Df.exports;(function(e,t){(function(){var n,r="4.17.21",o=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",c="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",h=500,p="__lodash_placeholder__",m=1,v=2,S=4,C=1,N=2,T=1,_=2,b=4,E=8,I=16,M=32,G=64,k=128,B=256,U=512,K=30,Z="...",he=800,be=16,J=1,oe=2,Ne=3,F=1/0,z=9007199254740991,te=17976931348623157e292,ne=NaN,ae=4294967295,pe=ae-1,Fe=ae>>>1,Ve=[["ary",k],["bind",T],["bindKey",_],["curry",E],["curryRight",I],["flip",U],["partial",M],["partialRight",G],["rearg",B]],qe="[object Arguments]",Me="[object Array]",bt="[object AsyncFunction]",Mt="[object Boolean]",Gt="[object Date]",Ue="[object DOMException]",er="[object Error]",Ge="[object Function]",dn="[object GeneratorFunction]",st="[object Map]",Sn="[object Number]",en="[object Null]",_n="[object Object]",No="[object Promise]",ko="[object Proxy]",tn="[object RegExp]",jt="[object Set]",nn="[object String]",jn="[object Symbol]",Ro="[object Undefined]",Sr="[object WeakMap]",tr="[object WeakSet]",Ft="[object ArrayBuffer]",rn="[object DataView]",En="[object Float32Array]",Ii="[object Float64Array]",St="[object Int8Array]",ri="[object Int16Array]",Ai="[object Int32Array]",Di="[object Uint8Array]",Li="[object Uint8ClampedArray]",Mi="[object Uint16Array]",_r="[object Uint32Array]",ga=/\b__p \+= '';/g,Oo=/\b(__p \+=) '' \+/g,Tl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,dt=/&(?:amp|lt|gt|quot|#39);/g,zt=/[&<>"']/g,Ut=RegExp(dt.source),nr=RegExp(zt.source),A=/<%-([\s\S]+?)%>/g,j=/<%([\s\S]+?)%>/g,W=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ee=/^\w*$/,ge=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ce=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(ce.source),ye=/^\s+/,Se=/\s/,tt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,nt=/\{\n\/\* \[wrapped with (.+)\] \*/,me=/,? & /,Ze=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Nt=/[()=,{}\[\]\/\s]/,Po=/\\(\\)?/g,Gr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ii=/\w*$/,ji=/^[-+]0x[0-9a-f]+$/i,Fi=/^0b[01]+$/i,rr=/^\[object .+?Constructor\]$/,ya=/^0o[0-7]+$/i,wa=/^(?:0|[1-9]\d*)$/,xa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Oe=/($^)/,Kt=/['\n\r\u2028\u2029\\]/g,Yt="\\ud800-\\udfff",Ot="\\u0300-\\u036f",To="\\ufe20-\\ufe2f",xu="\\u20d0-\\u20ff",bu=Ot+To+xu,Ug="\\u2700-\\u27bf",$g="a-z\\xdf-\\xf6\\xf8-\\xff",bE="\\xac\\xb1\\xd7\\xf7",SE="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",_E="\\u2000-\\u206f",EE=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Bg="A-Z\\xc0-\\xd6\\xd8-\\xde",Wg="\\ufe0e\\ufe0f",Hg=bE+SE+_E+EE,Ad="['’]",CE="["+Yt+"]",Gg="["+Hg+"]",Su="["+bu+"]",Kg="\\d+",NE="["+Ug+"]",Yg="["+$g+"]",Vg="[^"+Yt+Hg+Kg+Ug+$g+Bg+"]",Dd="\\ud83c[\\udffb-\\udfff]",kE="(?:"+Su+"|"+Dd+")",qg="[^"+Yt+"]",Ld="(?:\\ud83c[\\udde6-\\uddff]){2}",Md="[\\ud800-\\udbff][\\udc00-\\udfff]",ba="["+Bg+"]",Xg="\\u200d",Qg="(?:"+Yg+"|"+Vg+")",RE="(?:"+ba+"|"+Vg+")",Zg="(?:"+Ad+"(?:d|ll|m|re|s|t|ve))?",Jg="(?:"+Ad+"(?:D|LL|M|RE|S|T|VE))?",ey=kE+"?",ty="["+Wg+"]?",OE="(?:"+Xg+"(?:"+[qg,Ld,Md].join("|")+")"+ty+ey+")*",PE="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",TE="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ny=ty+ey+OE,IE="(?:"+[NE,Ld,Md].join("|")+")"+ny,AE="(?:"+[qg+Su+"?",Su,Ld,Md,CE].join("|")+")",DE=RegExp(Ad,"g"),LE=RegExp(Su,"g"),jd=RegExp(Dd+"(?="+Dd+")|"+AE+ny,"g"),ME=RegExp([ba+"?"+Yg+"+"+Zg+"(?="+[Gg,ba,"$"].join("|")+")",RE+"+"+Jg+"(?="+[Gg,ba+Qg,"$"].join("|")+")",ba+"?"+Qg+"+"+Zg,ba+"+"+Jg,TE,PE,Kg,IE].join("|"),"g"),jE=RegExp("["+Xg+Yt+bu+Wg+"]"),FE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zE=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],UE=-1,rt={};rt[En]=rt[Ii]=rt[St]=rt[ri]=rt[Ai]=rt[Di]=rt[Li]=rt[Mi]=rt[_r]=!0,rt[qe]=rt[Me]=rt[Ft]=rt[Mt]=rt[rn]=rt[Gt]=rt[er]=rt[Ge]=rt[st]=rt[Sn]=rt[_n]=rt[tn]=rt[jt]=rt[nn]=rt[Sr]=!1;var Je={};Je[qe]=Je[Me]=Je[Ft]=Je[rn]=Je[Mt]=Je[Gt]=Je[En]=Je[Ii]=Je[St]=Je[ri]=Je[Ai]=Je[st]=Je[Sn]=Je[_n]=Je[tn]=Je[jt]=Je[nn]=Je[jn]=Je[Di]=Je[Li]=Je[Mi]=Je[_r]=!0,Je[er]=Je[Ge]=Je[Sr]=!1;var $E={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},BE={"&":"&","<":"<",">":">",'"':""","'":"'"},WE={"&":"&","<":"<",">":">",""":'"',"'":"'"},HE={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},GE=parseFloat,KE=parseInt,ry=typeof Yl=="object"&&Yl&&Yl.Object===Object&&Yl,YE=typeof self=="object"&&self&&self.Object===Object&&self,Vt=ry||YE||Function("return this")(),Fd=t&&!t.nodeType&&t,Io=Fd&&!0&&e&&!e.nodeType&&e,iy=Io&&Io.exports===Fd,zd=iy&&ry.process,ir=function(){try{var D=Io&&Io.require&&Io.require("util").types;return D||zd&&zd.binding&&zd.binding("util")}catch{}}(),oy=ir&&ir.isArrayBuffer,ay=ir&&ir.isDate,ly=ir&&ir.isMap,sy=ir&&ir.isRegExp,uy=ir&&ir.isSet,cy=ir&&ir.isTypedArray;function Fn(D,H,$){switch($.length){case 0:return D.call(H);case 1:return D.call(H,$[0]);case 2:return D.call(H,$[0],$[1]);case 3:return D.call(H,$[0],$[1],$[2])}return D.apply(H,$)}function VE(D,H,$,le){for(var _e=-1,$e=D==null?0:D.length;++_e<$e;){var Pt=D[_e];H(le,Pt,$(Pt),D)}return le}function or(D,H){for(var $=-1,le=D==null?0:D.length;++$-1}function Ud(D,H,$){for(var le=-1,_e=D==null?0:D.length;++le<_e;)if($(H,D[le]))return!0;return!1}function ut(D,H){for(var $=-1,le=D==null?0:D.length,_e=Array(le);++$-1;);return $}function yy(D,H){for(var $=D.length;$--&&Sa(H,D[$],0)>-1;);return $}function rC(D,H){for(var $=D.length,le=0;$--;)D[$]===H&&++le;return le}var iC=Hd($E),oC=Hd(BE);function aC(D){return"\\"+HE[D]}function lC(D,H){return D==null?n:D[H]}function _a(D){return jE.test(D)}function sC(D){return FE.test(D)}function uC(D){for(var H,$=[];!(H=D.next()).done;)$.push(H.value);return $}function Vd(D){var H=-1,$=Array(D.size);return D.forEach(function(le,_e){$[++H]=[_e,le]}),$}function wy(D,H){return function($){return D(H($))}}function $i(D,H){for(var $=-1,le=D.length,_e=0,$e=[];++$-1}function XC(i,a){var u=this.__data__,d=Uu(u,i);return d<0?(++this.size,u.push([i,a])):u[d][1]=a,this}oi.prototype.clear=KC,oi.prototype.delete=YC,oi.prototype.get=VC,oi.prototype.has=qC,oi.prototype.set=XC;function ai(i){var a=-1,u=i==null?0:i.length;for(this.clear();++a=a?i:a)),i}function sr(i,a,u,d,g,w){var O,P=a&m,L=a&v,Y=a&S;if(u&&(O=g?u(i,d,g,w):u(i)),O!==n)return O;if(!pt(i))return i;var V=Ce(i);if(V){if(O=ek(i),!P)return Cn(i,O)}else{var q=an(i),re=q==Ge||q==dn;if(Yi(i))return t0(i,P);if(q==_n||q==qe||re&&!g){if(O=L||re?{}:x0(i),!P)return L?WN(i,dN(O,i)):BN(i,Ty(O,i))}else{if(!Je[q])return g?i:{};O=tk(i,q,P)}}w||(w=new Cr);var fe=w.get(i);if(fe)return fe;w.set(i,O),q0(i)?i.forEach(function(xe){O.add(sr(xe,a,u,xe,i,w))}):Y0(i)&&i.forEach(function(xe,Te){O.set(Te,sr(xe,a,u,Te,i,w))});var we=Y?L?xp:wp:L?kn:$t,Re=V?n:we(i);return or(Re||i,function(xe,Te){Re&&(Te=xe,xe=i[Te]),Fl(O,Te,sr(xe,a,u,Te,i,w))}),O}function pN(i){var a=$t(i);return function(u){return Iy(u,i,a)}}function Iy(i,a,u){var d=u.length;if(i==null)return!d;for(i=Xe(i);d--;){var g=u[d],w=a[g],O=i[g];if(O===n&&!(g in i)||!w(O))return!1}return!0}function Ay(i,a,u){if(typeof i!="function")throw new ar(s);return Gl(function(){i.apply(n,u)},a)}function zl(i,a,u,d){var g=-1,w=_u,O=!0,P=i.length,L=[],Y=a.length;if(!P)return L;u&&(a=ut(a,zn(u))),d?(w=Ud,O=!1):a.length>=o&&(w=Il,O=!1,a=new Lo(a));e:for(;++gg?0:g+u),d=d===n||d>g?g:ke(d),d<0&&(d+=g),d=u>d?0:Q0(d);u0&&u(P)?a>1?qt(P,a-1,u,d,g):Ui(g,P):d||(g[g.length]=P)}return g}var tp=l0(),My=l0(!0);function Kr(i,a){return i&&tp(i,a,$t)}function np(i,a){return i&&My(i,a,$t)}function Bu(i,a){return zi(a,function(u){return fi(i[u])})}function jo(i,a){a=Gi(a,i);for(var u=0,d=a.length;i!=null&&ua}function vN(i,a){return i!=null&&Ke.call(i,a)}function gN(i,a){return i!=null&&a in Xe(i)}function yN(i,a,u){return i>=on(a,u)&&i=120&&V.length>=120)?new Lo(O&&V):n}V=i[0];var q=-1,re=P[0];e:for(;++q-1;)P!==i&&Au.call(P,L,1),Au.call(i,L,1);return i}function Yy(i,a){for(var u=i?a.length:0,d=u-1;u--;){var g=a[u];if(u==d||g!==w){var w=g;ci(g)?Au.call(i,g,1):dp(i,g)}}return i}function up(i,a){return i+Mu(ky()*(a-i+1))}function TN(i,a,u,d){for(var g=-1,w=Tt(Lu((a-i)/(u||1)),0),O=$(w);w--;)O[d?w:++g]=i,i+=u;return O}function cp(i,a){var u="";if(!i||a<1||a>z)return u;do a%2&&(u+=i),a=Mu(a/2),a&&(i+=i);while(a);return u}function Pe(i,a){return kp(_0(i,a,Rn),i+"")}function IN(i){return Py(Da(i))}function AN(i,a){var u=Da(i);return Ju(u,Mo(a,0,u.length))}function Bl(i,a,u,d){if(!pt(i))return i;a=Gi(a,i);for(var g=-1,w=a.length,O=w-1,P=i;P!=null&&++gg?0:g+a),u=u>g?g:u,u<0&&(u+=g),g=a>u?0:u-a>>>0,a>>>=0;for(var w=$(g);++d>>1,O=i[w];O!==null&&!$n(O)&&(u?O<=a:O=o){var Y=a?null:YN(i);if(Y)return Cu(Y);O=!1,g=Il,L=new Lo}else L=a?[]:P;e:for(;++d=d?i:ur(i,a,u)}var e0=EC||function(i){return Vt.clearTimeout(i)};function t0(i,a){if(a)return i.slice();var u=i.length,d=Sy?Sy(u):new i.constructor(u);return i.copy(d),d}function vp(i){var a=new i.constructor(i.byteLength);return new Tu(a).set(new Tu(i)),a}function FN(i,a){var u=a?vp(i.buffer):i.buffer;return new i.constructor(u,i.byteOffset,i.byteLength)}function zN(i){var a=new i.constructor(i.source,ii.exec(i));return a.lastIndex=i.lastIndex,a}function UN(i){return jl?Xe(jl.call(i)):{}}function n0(i,a){var u=a?vp(i.buffer):i.buffer;return new i.constructor(u,i.byteOffset,i.length)}function r0(i,a){if(i!==a){var u=i!==n,d=i===null,g=i===i,w=$n(i),O=a!==n,P=a===null,L=a===a,Y=$n(a);if(!P&&!Y&&!w&&i>a||w&&O&&L&&!P&&!Y||d&&O&&L||!u&&L||!g)return 1;if(!d&&!w&&!Y&&i=P)return L;var Y=u[d];return L*(Y=="desc"?-1:1)}}return i.index-a.index}function i0(i,a,u,d){for(var g=-1,w=i.length,O=u.length,P=-1,L=a.length,Y=Tt(w-O,0),V=$(L+Y),q=!d;++P1?u[g-1]:n,O=g>2?u[2]:n;for(w=i.length>3&&typeof w=="function"?(g--,w):n,O&&hn(u[0],u[1],O)&&(w=g<3?n:w,g=1),a=Xe(a);++d-1?g[w?a[O]:O]:n}}function c0(i){return ui(function(a){var u=a.length,d=u,g=lr.prototype.thru;for(i&&a.reverse();d--;){var w=a[d];if(typeof w!="function")throw new ar(s);if(g&&!O&&Qu(w)=="wrapper")var O=new lr([],!0)}for(d=O?d:u;++d1&&je.reverse(),V&&LP))return!1;var Y=w.get(i),V=w.get(a);if(Y&&V)return Y==a&&V==i;var q=-1,re=!0,fe=u&N?new Lo:n;for(w.set(i,a),w.set(a,i);++q1?"& ":"")+a[d],a=a.join(u>2?", ":" "),i.replace(tt,`{ + */Df.exports;(function(e,t){(function(){var n,r="4.17.21",o=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",c="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",h=500,p="__lodash_placeholder__",m=1,v=2,S=4,C=1,N=2,T=1,_=2,b=4,E=8,I=16,M=32,G=64,k=128,B=256,U=512,K=30,Z="...",he=800,be=16,J=1,oe=2,Ne=3,F=1/0,z=9007199254740991,te=17976931348623157e292,ne=NaN,ae=4294967295,pe=ae-1,Fe=ae>>>1,Ve=[["ary",k],["bind",T],["bindKey",_],["curry",E],["curryRight",I],["flip",U],["partial",M],["partialRight",G],["rearg",B]],qe="[object Arguments]",Me="[object Array]",bt="[object AsyncFunction]",Mt="[object Boolean]",Gt="[object Date]",Ue="[object DOMException]",er="[object Error]",Ge="[object Function]",dn="[object GeneratorFunction]",st="[object Map]",Sn="[object Number]",en="[object Null]",_n="[object Object]",No="[object Promise]",ko="[object Proxy]",tn="[object RegExp]",jt="[object Set]",nn="[object String]",Mn="[object Symbol]",Ro="[object Undefined]",Sr="[object WeakMap]",tr="[object WeakSet]",Ft="[object ArrayBuffer]",rn="[object DataView]",En="[object Float32Array]",Ii="[object Float64Array]",St="[object Int8Array]",ri="[object Int16Array]",Ai="[object Int32Array]",Di="[object Uint8Array]",Li="[object Uint8ClampedArray]",Mi="[object Uint16Array]",_r="[object Uint32Array]",ga=/\b__p \+= '';/g,Oo=/\b(__p \+=) '' \+/g,Tl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,dt=/&(?:amp|lt|gt|quot|#39);/g,zt=/[&<>"']/g,Ut=RegExp(dt.source),nr=RegExp(zt.source),A=/<%-([\s\S]+?)%>/g,j=/<%([\s\S]+?)%>/g,W=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ee=/^\w*$/,ge=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ce=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(ce.source),ye=/^\s+/,Se=/\s/,tt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,nt=/\{\n\/\* \[wrapped with (.+)\] \*/,me=/,? & /,Ze=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Nt=/[()=,{}\[\]\/\s]/,Po=/\\(\\)?/g,Gr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ii=/\w*$/,ji=/^[-+]0x[0-9a-f]+$/i,Fi=/^0b[01]+$/i,rr=/^\[object .+?Constructor\]$/,ya=/^0o[0-7]+$/i,wa=/^(?:0|[1-9]\d*)$/,xa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Oe=/($^)/,Kt=/['\n\r\u2028\u2029\\]/g,Yt="\\ud800-\\udfff",Ot="\\u0300-\\u036f",To="\\ufe20-\\ufe2f",xu="\\u20d0-\\u20ff",bu=Ot+To+xu,Ug="\\u2700-\\u27bf",$g="a-z\\xdf-\\xf6\\xf8-\\xff",bE="\\xac\\xb1\\xd7\\xf7",SE="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",_E="\\u2000-\\u206f",EE=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Bg="A-Z\\xc0-\\xd6\\xd8-\\xde",Wg="\\ufe0e\\ufe0f",Hg=bE+SE+_E+EE,Ad="['’]",CE="["+Yt+"]",Gg="["+Hg+"]",Su="["+bu+"]",Kg="\\d+",NE="["+Ug+"]",Yg="["+$g+"]",Vg="[^"+Yt+Hg+Kg+Ug+$g+Bg+"]",Dd="\\ud83c[\\udffb-\\udfff]",kE="(?:"+Su+"|"+Dd+")",qg="[^"+Yt+"]",Ld="(?:\\ud83c[\\udde6-\\uddff]){2}",Md="[\\ud800-\\udbff][\\udc00-\\udfff]",ba="["+Bg+"]",Xg="\\u200d",Qg="(?:"+Yg+"|"+Vg+")",RE="(?:"+ba+"|"+Vg+")",Zg="(?:"+Ad+"(?:d|ll|m|re|s|t|ve))?",Jg="(?:"+Ad+"(?:D|LL|M|RE|S|T|VE))?",ey=kE+"?",ty="["+Wg+"]?",OE="(?:"+Xg+"(?:"+[qg,Ld,Md].join("|")+")"+ty+ey+")*",PE="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",TE="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ny=ty+ey+OE,IE="(?:"+[NE,Ld,Md].join("|")+")"+ny,AE="(?:"+[qg+Su+"?",Su,Ld,Md,CE].join("|")+")",DE=RegExp(Ad,"g"),LE=RegExp(Su,"g"),jd=RegExp(Dd+"(?="+Dd+")|"+AE+ny,"g"),ME=RegExp([ba+"?"+Yg+"+"+Zg+"(?="+[Gg,ba,"$"].join("|")+")",RE+"+"+Jg+"(?="+[Gg,ba+Qg,"$"].join("|")+")",ba+"?"+Qg+"+"+Zg,ba+"+"+Jg,TE,PE,Kg,IE].join("|"),"g"),jE=RegExp("["+Xg+Yt+bu+Wg+"]"),FE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zE=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],UE=-1,rt={};rt[En]=rt[Ii]=rt[St]=rt[ri]=rt[Ai]=rt[Di]=rt[Li]=rt[Mi]=rt[_r]=!0,rt[qe]=rt[Me]=rt[Ft]=rt[Mt]=rt[rn]=rt[Gt]=rt[er]=rt[Ge]=rt[st]=rt[Sn]=rt[_n]=rt[tn]=rt[jt]=rt[nn]=rt[Sr]=!1;var Je={};Je[qe]=Je[Me]=Je[Ft]=Je[rn]=Je[Mt]=Je[Gt]=Je[En]=Je[Ii]=Je[St]=Je[ri]=Je[Ai]=Je[st]=Je[Sn]=Je[_n]=Je[tn]=Je[jt]=Je[nn]=Je[Mn]=Je[Di]=Je[Li]=Je[Mi]=Je[_r]=!0,Je[er]=Je[Ge]=Je[Sr]=!1;var $E={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},BE={"&":"&","<":"<",">":">",'"':""","'":"'"},WE={"&":"&","<":"<",">":">",""":'"',"'":"'"},HE={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},GE=parseFloat,KE=parseInt,ry=typeof Yl=="object"&&Yl&&Yl.Object===Object&&Yl,YE=typeof self=="object"&&self&&self.Object===Object&&self,Vt=ry||YE||Function("return this")(),Fd=t&&!t.nodeType&&t,Io=Fd&&!0&&e&&!e.nodeType&&e,iy=Io&&Io.exports===Fd,zd=iy&&ry.process,ir=function(){try{var D=Io&&Io.require&&Io.require("util").types;return D||zd&&zd.binding&&zd.binding("util")}catch{}}(),oy=ir&&ir.isArrayBuffer,ay=ir&&ir.isDate,ly=ir&&ir.isMap,sy=ir&&ir.isRegExp,uy=ir&&ir.isSet,cy=ir&&ir.isTypedArray;function jn(D,H,$){switch($.length){case 0:return D.call(H);case 1:return D.call(H,$[0]);case 2:return D.call(H,$[0],$[1]);case 3:return D.call(H,$[0],$[1],$[2])}return D.apply(H,$)}function VE(D,H,$,le){for(var _e=-1,$e=D==null?0:D.length;++_e<$e;){var Pt=D[_e];H(le,Pt,$(Pt),D)}return le}function or(D,H){for(var $=-1,le=D==null?0:D.length;++$-1}function Ud(D,H,$){for(var le=-1,_e=D==null?0:D.length;++le<_e;)if($(H,D[le]))return!0;return!1}function ut(D,H){for(var $=-1,le=D==null?0:D.length,_e=Array(le);++$-1;);return $}function yy(D,H){for(var $=D.length;$--&&Sa(H,D[$],0)>-1;);return $}function rC(D,H){for(var $=D.length,le=0;$--;)D[$]===H&&++le;return le}var iC=Hd($E),oC=Hd(BE);function aC(D){return"\\"+HE[D]}function lC(D,H){return D==null?n:D[H]}function _a(D){return jE.test(D)}function sC(D){return FE.test(D)}function uC(D){for(var H,$=[];!(H=D.next()).done;)$.push(H.value);return $}function Vd(D){var H=-1,$=Array(D.size);return D.forEach(function(le,_e){$[++H]=[_e,le]}),$}function wy(D,H){return function($){return D(H($))}}function $i(D,H){for(var $=-1,le=D.length,_e=0,$e=[];++$-1}function XC(i,a){var u=this.__data__,d=Uu(u,i);return d<0?(++this.size,u.push([i,a])):u[d][1]=a,this}oi.prototype.clear=KC,oi.prototype.delete=YC,oi.prototype.get=VC,oi.prototype.has=qC,oi.prototype.set=XC;function ai(i){var a=-1,u=i==null?0:i.length;for(this.clear();++a=a?i:a)),i}function sr(i,a,u,d,g,w){var O,P=a&m,L=a&v,Y=a&S;if(u&&(O=g?u(i,d,g,w):u(i)),O!==n)return O;if(!pt(i))return i;var V=Ce(i);if(V){if(O=ek(i),!P)return Cn(i,O)}else{var q=an(i),re=q==Ge||q==dn;if(Yi(i))return t0(i,P);if(q==_n||q==qe||re&&!g){if(O=L||re?{}:x0(i),!P)return L?WN(i,dN(O,i)):BN(i,Ty(O,i))}else{if(!Je[q])return g?i:{};O=tk(i,q,P)}}w||(w=new Cr);var fe=w.get(i);if(fe)return fe;w.set(i,O),q0(i)?i.forEach(function(xe){O.add(sr(xe,a,u,xe,i,w))}):Y0(i)&&i.forEach(function(xe,Te){O.set(Te,sr(xe,a,u,Te,i,w))});var we=Y?L?xp:wp:L?kn:$t,Re=V?n:we(i);return or(Re||i,function(xe,Te){Re&&(Te=xe,xe=i[Te]),Fl(O,Te,sr(xe,a,u,Te,i,w))}),O}function pN(i){var a=$t(i);return function(u){return Iy(u,i,a)}}function Iy(i,a,u){var d=u.length;if(i==null)return!d;for(i=Xe(i);d--;){var g=u[d],w=a[g],O=i[g];if(O===n&&!(g in i)||!w(O))return!1}return!0}function Ay(i,a,u){if(typeof i!="function")throw new ar(s);return Gl(function(){i.apply(n,u)},a)}function zl(i,a,u,d){var g=-1,w=_u,O=!0,P=i.length,L=[],Y=a.length;if(!P)return L;u&&(a=ut(a,Fn(u))),d?(w=Ud,O=!1):a.length>=o&&(w=Il,O=!1,a=new Lo(a));e:for(;++gg?0:g+u),d=d===n||d>g?g:ke(d),d<0&&(d+=g),d=u>d?0:Q0(d);u0&&u(P)?a>1?qt(P,a-1,u,d,g):Ui(g,P):d||(g[g.length]=P)}return g}var tp=l0(),My=l0(!0);function Kr(i,a){return i&&tp(i,a,$t)}function np(i,a){return i&&My(i,a,$t)}function Bu(i,a){return zi(a,function(u){return fi(i[u])})}function jo(i,a){a=Gi(a,i);for(var u=0,d=a.length;i!=null&&ua}function vN(i,a){return i!=null&&Ke.call(i,a)}function gN(i,a){return i!=null&&a in Xe(i)}function yN(i,a,u){return i>=on(a,u)&&i=120&&V.length>=120)?new Lo(O&&V):n}V=i[0];var q=-1,re=P[0];e:for(;++q-1;)P!==i&&Au.call(P,L,1),Au.call(i,L,1);return i}function Yy(i,a){for(var u=i?a.length:0,d=u-1;u--;){var g=a[u];if(u==d||g!==w){var w=g;ci(g)?Au.call(i,g,1):dp(i,g)}}return i}function up(i,a){return i+Mu(ky()*(a-i+1))}function TN(i,a,u,d){for(var g=-1,w=Tt(Lu((a-i)/(u||1)),0),O=$(w);w--;)O[d?w:++g]=i,i+=u;return O}function cp(i,a){var u="";if(!i||a<1||a>z)return u;do a%2&&(u+=i),a=Mu(a/2),a&&(i+=i);while(a);return u}function Pe(i,a){return kp(_0(i,a,Rn),i+"")}function IN(i){return Py(Da(i))}function AN(i,a){var u=Da(i);return Ju(u,Mo(a,0,u.length))}function Bl(i,a,u,d){if(!pt(i))return i;a=Gi(a,i);for(var g=-1,w=a.length,O=w-1,P=i;P!=null&&++gg?0:g+a),u=u>g?g:u,u<0&&(u+=g),g=a>u?0:u-a>>>0,a>>>=0;for(var w=$(g);++d>>1,O=i[w];O!==null&&!Un(O)&&(u?O<=a:O=o){var Y=a?null:YN(i);if(Y)return Cu(Y);O=!1,g=Il,L=new Lo}else L=a?[]:P;e:for(;++d=d?i:ur(i,a,u)}var e0=EC||function(i){return Vt.clearTimeout(i)};function t0(i,a){if(a)return i.slice();var u=i.length,d=Sy?Sy(u):new i.constructor(u);return i.copy(d),d}function vp(i){var a=new i.constructor(i.byteLength);return new Tu(a).set(new Tu(i)),a}function FN(i,a){var u=a?vp(i.buffer):i.buffer;return new i.constructor(u,i.byteOffset,i.byteLength)}function zN(i){var a=new i.constructor(i.source,ii.exec(i));return a.lastIndex=i.lastIndex,a}function UN(i){return jl?Xe(jl.call(i)):{}}function n0(i,a){var u=a?vp(i.buffer):i.buffer;return new i.constructor(u,i.byteOffset,i.length)}function r0(i,a){if(i!==a){var u=i!==n,d=i===null,g=i===i,w=Un(i),O=a!==n,P=a===null,L=a===a,Y=Un(a);if(!P&&!Y&&!w&&i>a||w&&O&&L&&!P&&!Y||d&&O&&L||!u&&L||!g)return 1;if(!d&&!w&&!Y&&i=P)return L;var Y=u[d];return L*(Y=="desc"?-1:1)}}return i.index-a.index}function i0(i,a,u,d){for(var g=-1,w=i.length,O=u.length,P=-1,L=a.length,Y=Tt(w-O,0),V=$(L+Y),q=!d;++P1?u[g-1]:n,O=g>2?u[2]:n;for(w=i.length>3&&typeof w=="function"?(g--,w):n,O&&hn(u[0],u[1],O)&&(w=g<3?n:w,g=1),a=Xe(a);++d-1?g[w?a[O]:O]:n}}function c0(i){return ui(function(a){var u=a.length,d=u,g=lr.prototype.thru;for(i&&a.reverse();d--;){var w=a[d];if(typeof w!="function")throw new ar(s);if(g&&!O&&Qu(w)=="wrapper")var O=new lr([],!0)}for(d=O?d:u;++d1&&je.reverse(),V&&LP))return!1;var Y=w.get(i),V=w.get(a);if(Y&&V)return Y==a&&V==i;var q=-1,re=!0,fe=u&N?new Lo:n;for(w.set(i,a),w.set(a,i);++q1?"& ":"")+a[d],a=a.join(u>2?", ":" "),i.replace(tt,`{ /* [wrapped with `+a+`] */ -`)}function rk(i){return Ce(i)||Uo(i)||!!(Cy&&i&&i[Cy])}function ci(i,a){var u=typeof i;return a=a??z,!!a&&(u=="number"||u!="symbol"&&wa.test(i))&&i>-1&&i%1==0&&i0){if(++a>=he)return arguments[0]}else a=0;return i.apply(n,arguments)}}function Ju(i,a){var u=-1,d=i.length,g=d-1;for(a=a===n?d:a;++u1?i[a-1]:n;return u=typeof u=="function"?(i.pop(),u):n,L0(i,u)});function M0(i){var a=y(i);return a.__chain__=!0,a}function hR(i,a){return a(i),i}function ec(i,a){return a(i)}var mR=ui(function(i){var a=i.length,u=a?i[0]:0,d=this.__wrapped__,g=function(w){return ep(w,i)};return a>1||this.__actions__.length||!(d instanceof Le)||!ci(u)?this.thru(g):(d=d.slice(u,+u+(a?1:0)),d.__actions__.push({func:ec,args:[g],thisArg:n}),new lr(d,this.__chain__).thru(function(w){return a&&!w.length&&w.push(n),w}))});function vR(){return M0(this)}function gR(){return new lr(this.value(),this.__chain__)}function yR(){this.__values__===n&&(this.__values__=X0(this.value()));var i=this.__index__>=this.__values__.length,a=i?n:this.__values__[this.__index__++];return{done:i,value:a}}function wR(){return this}function xR(i){for(var a,u=this;u instanceof zu;){var d=O0(u);d.__index__=0,d.__values__=n,a?g.__wrapped__=d:a=d;var g=d;u=u.__wrapped__}return g.__wrapped__=i,a}function bR(){var i=this.__wrapped__;if(i instanceof Le){var a=i;return this.__actions__.length&&(a=new Le(this)),a=a.reverse(),a.__actions__.push({func:ec,args:[Rp],thisArg:n}),new lr(a,this.__chain__)}return this.thru(Rp)}function SR(){return Zy(this.__wrapped__,this.__actions__)}var _R=Ku(function(i,a,u){Ke.call(i,u)?++i[u]:li(i,u,1)});function ER(i,a,u){var d=Ce(i)?fy:hN;return u&&hn(i,a,u)&&(a=n),d(i,ve(a,3))}function CR(i,a){var u=Ce(i)?zi:Ly;return u(i,ve(a,3))}var NR=u0(P0),kR=u0(T0);function RR(i,a){return qt(tc(i,a),1)}function OR(i,a){return qt(tc(i,a),F)}function PR(i,a,u){return u=u===n?1:ke(u),qt(tc(i,a),u)}function j0(i,a){var u=Ce(i)?or:Wi;return u(i,ve(a,3))}function F0(i,a){var u=Ce(i)?qE:Dy;return u(i,ve(a,3))}var TR=Ku(function(i,a,u){Ke.call(i,u)?i[u].push(a):li(i,u,[a])});function IR(i,a,u,d){i=Nn(i)?i:Da(i),u=u&&!d?ke(u):0;var g=i.length;return u<0&&(u=Tt(g+u,0)),ac(i)?u<=g&&i.indexOf(a,u)>-1:!!g&&Sa(i,a,u)>-1}var AR=Pe(function(i,a,u){var d=-1,g=typeof a=="function",w=Nn(i)?$(i.length):[];return Wi(i,function(O){w[++d]=g?Fn(a,O,u):Ul(O,a,u)}),w}),DR=Ku(function(i,a,u){li(i,u,a)});function tc(i,a){var u=Ce(i)?ut:$y;return u(i,ve(a,3))}function LR(i,a,u,d){return i==null?[]:(Ce(a)||(a=a==null?[]:[a]),u=d?n:u,Ce(u)||(u=u==null?[]:[u]),Gy(i,a,u))}var MR=Ku(function(i,a,u){i[u?0:1].push(a)},function(){return[[],[]]});function jR(i,a,u){var d=Ce(i)?$d:my,g=arguments.length<3;return d(i,ve(a,4),u,g,Wi)}function FR(i,a,u){var d=Ce(i)?XE:my,g=arguments.length<3;return d(i,ve(a,4),u,g,Dy)}function zR(i,a){var u=Ce(i)?zi:Ly;return u(i,ic(ve(a,3)))}function UR(i){var a=Ce(i)?Py:IN;return a(i)}function $R(i,a,u){(u?hn(i,a,u):a===n)?a=1:a=ke(a);var d=Ce(i)?uN:AN;return d(i,a)}function BR(i){var a=Ce(i)?cN:LN;return a(i)}function WR(i){if(i==null)return 0;if(Nn(i))return ac(i)?Ea(i):i.length;var a=an(i);return a==st||a==jt?i.size:ap(i).length}function HR(i,a,u){var d=Ce(i)?Bd:MN;return u&&hn(i,a,u)&&(a=n),d(i,ve(a,3))}var GR=Pe(function(i,a){if(i==null)return[];var u=a.length;return u>1&&hn(i,a[0],a[1])?a=[]:u>2&&hn(a[0],a[1],a[2])&&(a=[a[0]]),Gy(i,qt(a,1),[])}),nc=CC||function(){return Vt.Date.now()};function KR(i,a){if(typeof a!="function")throw new ar(s);return i=ke(i),function(){if(--i<1)return a.apply(this,arguments)}}function z0(i,a,u){return a=u?n:a,a=i&&a==null?i.length:a,si(i,k,n,n,n,n,a)}function U0(i,a){var u;if(typeof a!="function")throw new ar(s);return i=ke(i),function(){return--i>0&&(u=a.apply(this,arguments)),i<=1&&(a=n),u}}var Pp=Pe(function(i,a,u){var d=T;if(u.length){var g=$i(u,Ia(Pp));d|=M}return si(i,d,a,u,g)}),$0=Pe(function(i,a,u){var d=T|_;if(u.length){var g=$i(u,Ia($0));d|=M}return si(a,d,i,u,g)});function B0(i,a,u){a=u?n:a;var d=si(i,E,n,n,n,n,n,a);return d.placeholder=B0.placeholder,d}function W0(i,a,u){a=u?n:a;var d=si(i,I,n,n,n,n,n,a);return d.placeholder=W0.placeholder,d}function H0(i,a,u){var d,g,w,O,P,L,Y=0,V=!1,q=!1,re=!0;if(typeof i!="function")throw new ar(s);a=fr(a)||0,pt(u)&&(V=!!u.leading,q="maxWait"in u,w=q?Tt(fr(u.maxWait)||0,a):w,re="trailing"in u?!!u.trailing:re);function fe(Et){var kr=d,pi=g;return d=g=n,Y=Et,O=i.apply(pi,kr),O}function we(Et){return Y=Et,P=Gl(Te,a),V?fe(Et):O}function Re(Et){var kr=Et-L,pi=Et-Y,u1=a-kr;return q?on(u1,w-pi):u1}function xe(Et){var kr=Et-L,pi=Et-Y;return L===n||kr>=a||kr<0||q&&pi>=w}function Te(){var Et=nc();if(xe(Et))return je(Et);P=Gl(Te,Re(Et))}function je(Et){return P=n,re&&d?fe(Et):(d=g=n,O)}function Bn(){P!==n&&e0(P),Y=0,d=L=g=P=n}function mn(){return P===n?O:je(nc())}function Wn(){var Et=nc(),kr=xe(Et);if(d=arguments,g=this,L=Et,kr){if(P===n)return we(L);if(q)return e0(P),P=Gl(Te,a),fe(L)}return P===n&&(P=Gl(Te,a)),O}return Wn.cancel=Bn,Wn.flush=mn,Wn}var YR=Pe(function(i,a){return Ay(i,1,a)}),VR=Pe(function(i,a,u){return Ay(i,fr(a)||0,u)});function qR(i){return si(i,U)}function rc(i,a){if(typeof i!="function"||a!=null&&typeof a!="function")throw new ar(s);var u=function(){var d=arguments,g=a?a.apply(this,d):d[0],w=u.cache;if(w.has(g))return w.get(g);var O=i.apply(this,d);return u.cache=w.set(g,O)||w,O};return u.cache=new(rc.Cache||ai),u}rc.Cache=ai;function ic(i){if(typeof i!="function")throw new ar(s);return function(){var a=arguments;switch(a.length){case 0:return!i.call(this);case 1:return!i.call(this,a[0]);case 2:return!i.call(this,a[0],a[1]);case 3:return!i.call(this,a[0],a[1],a[2])}return!i.apply(this,a)}}function XR(i){return U0(2,i)}var QR=jN(function(i,a){a=a.length==1&&Ce(a[0])?ut(a[0],zn(ve())):ut(qt(a,1),zn(ve()));var u=a.length;return Pe(function(d){for(var g=-1,w=on(d.length,u);++g=a}),Uo=Fy(function(){return arguments}())?Fy:function(i){return yt(i)&&Ke.call(i,"callee")&&!Ey.call(i,"callee")},Ce=$.isArray,dO=oy?zn(oy):xN;function Nn(i){return i!=null&&oc(i.length)&&!fi(i)}function _t(i){return yt(i)&&Nn(i)}function pO(i){return i===!0||i===!1||yt(i)&&pn(i)==Mt}var Yi=kC||Bp,hO=ay?zn(ay):bN;function mO(i){return yt(i)&&i.nodeType===1&&!Kl(i)}function vO(i){if(i==null)return!0;if(Nn(i)&&(Ce(i)||typeof i=="string"||typeof i.splice=="function"||Yi(i)||Aa(i)||Uo(i)))return!i.length;var a=an(i);if(a==st||a==jt)return!i.size;if(Hl(i))return!ap(i).length;for(var u in i)if(Ke.call(i,u))return!1;return!0}function gO(i,a){return $l(i,a)}function yO(i,a,u){u=typeof u=="function"?u:n;var d=u?u(i,a):n;return d===n?$l(i,a,n,u):!!d}function Ip(i){if(!yt(i))return!1;var a=pn(i);return a==er||a==Ue||typeof i.message=="string"&&typeof i.name=="string"&&!Kl(i)}function wO(i){return typeof i=="number"&&Ny(i)}function fi(i){if(!pt(i))return!1;var a=pn(i);return a==Ge||a==dn||a==bt||a==ko}function K0(i){return typeof i=="number"&&i==ke(i)}function oc(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=z}function pt(i){var a=typeof i;return i!=null&&(a=="object"||a=="function")}function yt(i){return i!=null&&typeof i=="object"}var Y0=ly?zn(ly):_N;function xO(i,a){return i===a||op(i,a,Sp(a))}function bO(i,a,u){return u=typeof u=="function"?u:n,op(i,a,Sp(a),u)}function SO(i){return V0(i)&&i!=+i}function _O(i){if(ak(i))throw new _e(l);return zy(i)}function EO(i){return i===null}function CO(i){return i==null}function V0(i){return typeof i=="number"||yt(i)&&pn(i)==Sn}function Kl(i){if(!yt(i)||pn(i)!=_n)return!1;var a=Iu(i);if(a===null)return!0;var u=Ke.call(a,"constructor")&&a.constructor;return typeof u=="function"&&u instanceof u&&Ru.call(u)==bC}var Ap=sy?zn(sy):EN;function NO(i){return K0(i)&&i>=-z&&i<=z}var q0=uy?zn(uy):CN;function ac(i){return typeof i=="string"||!Ce(i)&&yt(i)&&pn(i)==nn}function $n(i){return typeof i=="symbol"||yt(i)&&pn(i)==jn}var Aa=cy?zn(cy):NN;function kO(i){return i===n}function RO(i){return yt(i)&&an(i)==Sr}function OO(i){return yt(i)&&pn(i)==tr}var PO=Xu(lp),TO=Xu(function(i,a){return i<=a});function X0(i){if(!i)return[];if(Nn(i))return ac(i)?Er(i):Cn(i);if(Al&&i[Al])return uC(i[Al]());var a=an(i),u=a==st?Vd:a==jt?Cu:Da;return u(i)}function di(i){if(!i)return i===0?i:0;if(i=fr(i),i===F||i===-F){var a=i<0?-1:1;return a*te}return i===i?i:0}function ke(i){var a=di(i),u=a%1;return a===a?u?a-u:a:0}function Q0(i){return i?Mo(ke(i),0,ae):0}function fr(i){if(typeof i=="number")return i;if($n(i))return ne;if(pt(i)){var a=typeof i.valueOf=="function"?i.valueOf():i;i=pt(a)?a+"":a}if(typeof i!="string")return i===0?i:+i;i=vy(i);var u=Fi.test(i);return u||ya.test(i)?KE(i.slice(2),u?2:8):ji.test(i)?ne:+i}function Z0(i){return Yr(i,kn(i))}function IO(i){return i?Mo(ke(i),-z,z):i===0?i:0}function Be(i){return i==null?"":Un(i)}var AO=Pa(function(i,a){if(Hl(a)||Nn(a)){Yr(a,$t(a),i);return}for(var u in a)Ke.call(a,u)&&Fl(i,u,a[u])}),J0=Pa(function(i,a){Yr(a,kn(a),i)}),lc=Pa(function(i,a,u,d){Yr(a,kn(a),i,d)}),DO=Pa(function(i,a,u,d){Yr(a,$t(a),i,d)}),LO=ui(ep);function MO(i,a){var u=Oa(i);return a==null?u:Ty(u,a)}var jO=Pe(function(i,a){i=Xe(i);var u=-1,d=a.length,g=d>2?a[2]:n;for(g&&hn(a[0],a[1],g)&&(d=1);++u1),w}),Yr(i,xp(i),u),d&&(u=sr(u,m|v|S,VN));for(var g=a.length;g--;)dp(u,a[g]);return u});function tP(i,a){return t1(i,ic(ve(a)))}var nP=ui(function(i,a){return i==null?{}:ON(i,a)});function t1(i,a){if(i==null)return{};var u=ut(xp(i),function(d){return[d]});return a=ve(a),Ky(i,u,function(d,g){return a(d,g[0])})}function rP(i,a,u){a=Gi(a,i);var d=-1,g=a.length;for(g||(g=1,i=n);++da){var d=i;i=a,a=d}if(u||i%1||a%1){var g=ky();return on(i+g*(a-i+GE("1e-"+((g+"").length-1))),a)}return up(i,a)}var hP=Ta(function(i,a,u){return a=a.toLowerCase(),i+(u?i1(a):a)});function i1(i){return Mp(Be(i).toLowerCase())}function o1(i){return i=Be(i),i&&i.replace(xa,iC).replace(LE,"")}function mP(i,a,u){i=Be(i),a=Un(a);var d=i.length;u=u===n?d:Mo(ke(u),0,d);var g=u;return u-=a.length,u>=0&&i.slice(u,g)==a}function vP(i){return i=Be(i),i&&nr.test(i)?i.replace(zt,oC):i}function gP(i){return i=Be(i),i&&ie.test(i)?i.replace(ce,"\\$&"):i}var yP=Ta(function(i,a,u){return i+(u?"-":"")+a.toLowerCase()}),wP=Ta(function(i,a,u){return i+(u?" ":"")+a.toLowerCase()}),xP=s0("toLowerCase");function bP(i,a,u){i=Be(i),a=ke(a);var d=a?Ea(i):0;if(!a||d>=a)return i;var g=(a-d)/2;return qu(Mu(g),u)+i+qu(Lu(g),u)}function SP(i,a,u){i=Be(i),a=ke(a);var d=a?Ea(i):0;return a&&d>>0,u?(i=Be(i),i&&(typeof a=="string"||a!=null&&!Ap(a))&&(a=Un(a),!a&&_a(i))?Ki(Er(i),0,u):i.split(a,u)):[]}var OP=Ta(function(i,a,u){return i+(u?" ":"")+Mp(a)});function PP(i,a,u){return i=Be(i),u=u==null?0:Mo(ke(u),0,i.length),a=Un(a),i.slice(u,u+a.length)==a}function TP(i,a,u){var d=y.templateSettings;u&&hn(i,a,u)&&(a=n),i=Be(i),a=lc({},a,d,m0);var g=lc({},a.imports,d.imports,m0),w=$t(g),O=Yd(g,w),P,L,Y=0,V=a.interpolate||Oe,q="__p += '",re=qd((a.escape||Oe).source+"|"+V.source+"|"+(V===W?Gr:Oe).source+"|"+(a.evaluate||Oe).source+"|$","g"),fe="//# sourceURL="+(Ke.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++UE+"]")+` -`;i.replace(re,function(xe,Te,je,Bn,mn,Wn){return je||(je=Bn),q+=i.slice(Y,Wn).replace(Kt,aC),Te&&(P=!0,q+=`' + +`)}function rk(i){return Ce(i)||Uo(i)||!!(Cy&&i&&i[Cy])}function ci(i,a){var u=typeof i;return a=a??z,!!a&&(u=="number"||u!="symbol"&&wa.test(i))&&i>-1&&i%1==0&&i0){if(++a>=he)return arguments[0]}else a=0;return i.apply(n,arguments)}}function Ju(i,a){var u=-1,d=i.length,g=d-1;for(a=a===n?d:a;++u1?i[a-1]:n;return u=typeof u=="function"?(i.pop(),u):n,L0(i,u)});function M0(i){var a=y(i);return a.__chain__=!0,a}function hR(i,a){return a(i),i}function ec(i,a){return a(i)}var mR=ui(function(i){var a=i.length,u=a?i[0]:0,d=this.__wrapped__,g=function(w){return ep(w,i)};return a>1||this.__actions__.length||!(d instanceof Le)||!ci(u)?this.thru(g):(d=d.slice(u,+u+(a?1:0)),d.__actions__.push({func:ec,args:[g],thisArg:n}),new lr(d,this.__chain__).thru(function(w){return a&&!w.length&&w.push(n),w}))});function vR(){return M0(this)}function gR(){return new lr(this.value(),this.__chain__)}function yR(){this.__values__===n&&(this.__values__=X0(this.value()));var i=this.__index__>=this.__values__.length,a=i?n:this.__values__[this.__index__++];return{done:i,value:a}}function wR(){return this}function xR(i){for(var a,u=this;u instanceof zu;){var d=O0(u);d.__index__=0,d.__values__=n,a?g.__wrapped__=d:a=d;var g=d;u=u.__wrapped__}return g.__wrapped__=i,a}function bR(){var i=this.__wrapped__;if(i instanceof Le){var a=i;return this.__actions__.length&&(a=new Le(this)),a=a.reverse(),a.__actions__.push({func:ec,args:[Rp],thisArg:n}),new lr(a,this.__chain__)}return this.thru(Rp)}function SR(){return Zy(this.__wrapped__,this.__actions__)}var _R=Ku(function(i,a,u){Ke.call(i,u)?++i[u]:li(i,u,1)});function ER(i,a,u){var d=Ce(i)?fy:hN;return u&&hn(i,a,u)&&(a=n),d(i,ve(a,3))}function CR(i,a){var u=Ce(i)?zi:Ly;return u(i,ve(a,3))}var NR=u0(P0),kR=u0(T0);function RR(i,a){return qt(tc(i,a),1)}function OR(i,a){return qt(tc(i,a),F)}function PR(i,a,u){return u=u===n?1:ke(u),qt(tc(i,a),u)}function j0(i,a){var u=Ce(i)?or:Wi;return u(i,ve(a,3))}function F0(i,a){var u=Ce(i)?qE:Dy;return u(i,ve(a,3))}var TR=Ku(function(i,a,u){Ke.call(i,u)?i[u].push(a):li(i,u,[a])});function IR(i,a,u,d){i=Nn(i)?i:Da(i),u=u&&!d?ke(u):0;var g=i.length;return u<0&&(u=Tt(g+u,0)),ac(i)?u<=g&&i.indexOf(a,u)>-1:!!g&&Sa(i,a,u)>-1}var AR=Pe(function(i,a,u){var d=-1,g=typeof a=="function",w=Nn(i)?$(i.length):[];return Wi(i,function(O){w[++d]=g?jn(a,O,u):Ul(O,a,u)}),w}),DR=Ku(function(i,a,u){li(i,u,a)});function tc(i,a){var u=Ce(i)?ut:$y;return u(i,ve(a,3))}function LR(i,a,u,d){return i==null?[]:(Ce(a)||(a=a==null?[]:[a]),u=d?n:u,Ce(u)||(u=u==null?[]:[u]),Gy(i,a,u))}var MR=Ku(function(i,a,u){i[u?0:1].push(a)},function(){return[[],[]]});function jR(i,a,u){var d=Ce(i)?$d:my,g=arguments.length<3;return d(i,ve(a,4),u,g,Wi)}function FR(i,a,u){var d=Ce(i)?XE:my,g=arguments.length<3;return d(i,ve(a,4),u,g,Dy)}function zR(i,a){var u=Ce(i)?zi:Ly;return u(i,ic(ve(a,3)))}function UR(i){var a=Ce(i)?Py:IN;return a(i)}function $R(i,a,u){(u?hn(i,a,u):a===n)?a=1:a=ke(a);var d=Ce(i)?uN:AN;return d(i,a)}function BR(i){var a=Ce(i)?cN:LN;return a(i)}function WR(i){if(i==null)return 0;if(Nn(i))return ac(i)?Ea(i):i.length;var a=an(i);return a==st||a==jt?i.size:ap(i).length}function HR(i,a,u){var d=Ce(i)?Bd:MN;return u&&hn(i,a,u)&&(a=n),d(i,ve(a,3))}var GR=Pe(function(i,a){if(i==null)return[];var u=a.length;return u>1&&hn(i,a[0],a[1])?a=[]:u>2&&hn(a[0],a[1],a[2])&&(a=[a[0]]),Gy(i,qt(a,1),[])}),nc=CC||function(){return Vt.Date.now()};function KR(i,a){if(typeof a!="function")throw new ar(s);return i=ke(i),function(){if(--i<1)return a.apply(this,arguments)}}function z0(i,a,u){return a=u?n:a,a=i&&a==null?i.length:a,si(i,k,n,n,n,n,a)}function U0(i,a){var u;if(typeof a!="function")throw new ar(s);return i=ke(i),function(){return--i>0&&(u=a.apply(this,arguments)),i<=1&&(a=n),u}}var Pp=Pe(function(i,a,u){var d=T;if(u.length){var g=$i(u,Ia(Pp));d|=M}return si(i,d,a,u,g)}),$0=Pe(function(i,a,u){var d=T|_;if(u.length){var g=$i(u,Ia($0));d|=M}return si(a,d,i,u,g)});function B0(i,a,u){a=u?n:a;var d=si(i,E,n,n,n,n,n,a);return d.placeholder=B0.placeholder,d}function W0(i,a,u){a=u?n:a;var d=si(i,I,n,n,n,n,n,a);return d.placeholder=W0.placeholder,d}function H0(i,a,u){var d,g,w,O,P,L,Y=0,V=!1,q=!1,re=!0;if(typeof i!="function")throw new ar(s);a=fr(a)||0,pt(u)&&(V=!!u.leading,q="maxWait"in u,w=q?Tt(fr(u.maxWait)||0,a):w,re="trailing"in u?!!u.trailing:re);function fe(Et){var kr=d,pi=g;return d=g=n,Y=Et,O=i.apply(pi,kr),O}function we(Et){return Y=Et,P=Gl(Te,a),V?fe(Et):O}function Re(Et){var kr=Et-L,pi=Et-Y,u1=a-kr;return q?on(u1,w-pi):u1}function xe(Et){var kr=Et-L,pi=Et-Y;return L===n||kr>=a||kr<0||q&&pi>=w}function Te(){var Et=nc();if(xe(Et))return je(Et);P=Gl(Te,Re(Et))}function je(Et){return P=n,re&&d?fe(Et):(d=g=n,O)}function $n(){P!==n&&e0(P),Y=0,d=L=g=P=n}function mn(){return P===n?O:je(nc())}function Bn(){var Et=nc(),kr=xe(Et);if(d=arguments,g=this,L=Et,kr){if(P===n)return we(L);if(q)return e0(P),P=Gl(Te,a),fe(L)}return P===n&&(P=Gl(Te,a)),O}return Bn.cancel=$n,Bn.flush=mn,Bn}var YR=Pe(function(i,a){return Ay(i,1,a)}),VR=Pe(function(i,a,u){return Ay(i,fr(a)||0,u)});function qR(i){return si(i,U)}function rc(i,a){if(typeof i!="function"||a!=null&&typeof a!="function")throw new ar(s);var u=function(){var d=arguments,g=a?a.apply(this,d):d[0],w=u.cache;if(w.has(g))return w.get(g);var O=i.apply(this,d);return u.cache=w.set(g,O)||w,O};return u.cache=new(rc.Cache||ai),u}rc.Cache=ai;function ic(i){if(typeof i!="function")throw new ar(s);return function(){var a=arguments;switch(a.length){case 0:return!i.call(this);case 1:return!i.call(this,a[0]);case 2:return!i.call(this,a[0],a[1]);case 3:return!i.call(this,a[0],a[1],a[2])}return!i.apply(this,a)}}function XR(i){return U0(2,i)}var QR=jN(function(i,a){a=a.length==1&&Ce(a[0])?ut(a[0],Fn(ve())):ut(qt(a,1),Fn(ve()));var u=a.length;return Pe(function(d){for(var g=-1,w=on(d.length,u);++g=a}),Uo=Fy(function(){return arguments}())?Fy:function(i){return yt(i)&&Ke.call(i,"callee")&&!Ey.call(i,"callee")},Ce=$.isArray,dO=oy?Fn(oy):xN;function Nn(i){return i!=null&&oc(i.length)&&!fi(i)}function _t(i){return yt(i)&&Nn(i)}function pO(i){return i===!0||i===!1||yt(i)&&pn(i)==Mt}var Yi=kC||Bp,hO=ay?Fn(ay):bN;function mO(i){return yt(i)&&i.nodeType===1&&!Kl(i)}function vO(i){if(i==null)return!0;if(Nn(i)&&(Ce(i)||typeof i=="string"||typeof i.splice=="function"||Yi(i)||Aa(i)||Uo(i)))return!i.length;var a=an(i);if(a==st||a==jt)return!i.size;if(Hl(i))return!ap(i).length;for(var u in i)if(Ke.call(i,u))return!1;return!0}function gO(i,a){return $l(i,a)}function yO(i,a,u){u=typeof u=="function"?u:n;var d=u?u(i,a):n;return d===n?$l(i,a,n,u):!!d}function Ip(i){if(!yt(i))return!1;var a=pn(i);return a==er||a==Ue||typeof i.message=="string"&&typeof i.name=="string"&&!Kl(i)}function wO(i){return typeof i=="number"&&Ny(i)}function fi(i){if(!pt(i))return!1;var a=pn(i);return a==Ge||a==dn||a==bt||a==ko}function K0(i){return typeof i=="number"&&i==ke(i)}function oc(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=z}function pt(i){var a=typeof i;return i!=null&&(a=="object"||a=="function")}function yt(i){return i!=null&&typeof i=="object"}var Y0=ly?Fn(ly):_N;function xO(i,a){return i===a||op(i,a,Sp(a))}function bO(i,a,u){return u=typeof u=="function"?u:n,op(i,a,Sp(a),u)}function SO(i){return V0(i)&&i!=+i}function _O(i){if(ak(i))throw new _e(l);return zy(i)}function EO(i){return i===null}function CO(i){return i==null}function V0(i){return typeof i=="number"||yt(i)&&pn(i)==Sn}function Kl(i){if(!yt(i)||pn(i)!=_n)return!1;var a=Iu(i);if(a===null)return!0;var u=Ke.call(a,"constructor")&&a.constructor;return typeof u=="function"&&u instanceof u&&Ru.call(u)==bC}var Ap=sy?Fn(sy):EN;function NO(i){return K0(i)&&i>=-z&&i<=z}var q0=uy?Fn(uy):CN;function ac(i){return typeof i=="string"||!Ce(i)&&yt(i)&&pn(i)==nn}function Un(i){return typeof i=="symbol"||yt(i)&&pn(i)==Mn}var Aa=cy?Fn(cy):NN;function kO(i){return i===n}function RO(i){return yt(i)&&an(i)==Sr}function OO(i){return yt(i)&&pn(i)==tr}var PO=Xu(lp),TO=Xu(function(i,a){return i<=a});function X0(i){if(!i)return[];if(Nn(i))return ac(i)?Er(i):Cn(i);if(Al&&i[Al])return uC(i[Al]());var a=an(i),u=a==st?Vd:a==jt?Cu:Da;return u(i)}function di(i){if(!i)return i===0?i:0;if(i=fr(i),i===F||i===-F){var a=i<0?-1:1;return a*te}return i===i?i:0}function ke(i){var a=di(i),u=a%1;return a===a?u?a-u:a:0}function Q0(i){return i?Mo(ke(i),0,ae):0}function fr(i){if(typeof i=="number")return i;if(Un(i))return ne;if(pt(i)){var a=typeof i.valueOf=="function"?i.valueOf():i;i=pt(a)?a+"":a}if(typeof i!="string")return i===0?i:+i;i=vy(i);var u=Fi.test(i);return u||ya.test(i)?KE(i.slice(2),u?2:8):ji.test(i)?ne:+i}function Z0(i){return Yr(i,kn(i))}function IO(i){return i?Mo(ke(i),-z,z):i===0?i:0}function Be(i){return i==null?"":zn(i)}var AO=Pa(function(i,a){if(Hl(a)||Nn(a)){Yr(a,$t(a),i);return}for(var u in a)Ke.call(a,u)&&Fl(i,u,a[u])}),J0=Pa(function(i,a){Yr(a,kn(a),i)}),lc=Pa(function(i,a,u,d){Yr(a,kn(a),i,d)}),DO=Pa(function(i,a,u,d){Yr(a,$t(a),i,d)}),LO=ui(ep);function MO(i,a){var u=Oa(i);return a==null?u:Ty(u,a)}var jO=Pe(function(i,a){i=Xe(i);var u=-1,d=a.length,g=d>2?a[2]:n;for(g&&hn(a[0],a[1],g)&&(d=1);++u1),w}),Yr(i,xp(i),u),d&&(u=sr(u,m|v|S,VN));for(var g=a.length;g--;)dp(u,a[g]);return u});function tP(i,a){return t1(i,ic(ve(a)))}var nP=ui(function(i,a){return i==null?{}:ON(i,a)});function t1(i,a){if(i==null)return{};var u=ut(xp(i),function(d){return[d]});return a=ve(a),Ky(i,u,function(d,g){return a(d,g[0])})}function rP(i,a,u){a=Gi(a,i);var d=-1,g=a.length;for(g||(g=1,i=n);++da){var d=i;i=a,a=d}if(u||i%1||a%1){var g=ky();return on(i+g*(a-i+GE("1e-"+((g+"").length-1))),a)}return up(i,a)}var hP=Ta(function(i,a,u){return a=a.toLowerCase(),i+(u?i1(a):a)});function i1(i){return Mp(Be(i).toLowerCase())}function o1(i){return i=Be(i),i&&i.replace(xa,iC).replace(LE,"")}function mP(i,a,u){i=Be(i),a=zn(a);var d=i.length;u=u===n?d:Mo(ke(u),0,d);var g=u;return u-=a.length,u>=0&&i.slice(u,g)==a}function vP(i){return i=Be(i),i&&nr.test(i)?i.replace(zt,oC):i}function gP(i){return i=Be(i),i&&ie.test(i)?i.replace(ce,"\\$&"):i}var yP=Ta(function(i,a,u){return i+(u?"-":"")+a.toLowerCase()}),wP=Ta(function(i,a,u){return i+(u?" ":"")+a.toLowerCase()}),xP=s0("toLowerCase");function bP(i,a,u){i=Be(i),a=ke(a);var d=a?Ea(i):0;if(!a||d>=a)return i;var g=(a-d)/2;return qu(Mu(g),u)+i+qu(Lu(g),u)}function SP(i,a,u){i=Be(i),a=ke(a);var d=a?Ea(i):0;return a&&d>>0,u?(i=Be(i),i&&(typeof a=="string"||a!=null&&!Ap(a))&&(a=zn(a),!a&&_a(i))?Ki(Er(i),0,u):i.split(a,u)):[]}var OP=Ta(function(i,a,u){return i+(u?" ":"")+Mp(a)});function PP(i,a,u){return i=Be(i),u=u==null?0:Mo(ke(u),0,i.length),a=zn(a),i.slice(u,u+a.length)==a}function TP(i,a,u){var d=y.templateSettings;u&&hn(i,a,u)&&(a=n),i=Be(i),a=lc({},a,d,m0);var g=lc({},a.imports,d.imports,m0),w=$t(g),O=Yd(g,w),P,L,Y=0,V=a.interpolate||Oe,q="__p += '",re=qd((a.escape||Oe).source+"|"+V.source+"|"+(V===W?Gr:Oe).source+"|"+(a.evaluate||Oe).source+"|$","g"),fe="//# sourceURL="+(Ke.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++UE+"]")+` +`;i.replace(re,function(xe,Te,je,$n,mn,Bn){return je||(je=$n),q+=i.slice(Y,Bn).replace(Kt,aC),Te&&(P=!0,q+=`' + __e(`+Te+`) + '`),mn&&(L=!0,q+=`'; `+mn+`; __p += '`),je&&(q+=`' + ((__t = (`+je+`)) == null ? '' : __t) + -'`),Y=Wn+xe.length,xe}),q+=`'; +'`),Y=Bn+xe.length,xe}),q+=`'; `;var we=Ke.call(a,"variable")&&a.variable;if(!we)q=`with (obj) { `+q+` } @@ -99,7 +99,7 @@ __p += '`),je&&(q+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+q+`return __p -}`;var Re=l1(function(){return $e(w,fe+"return "+q).apply(n,O)});if(Re.source=q,Ip(Re))throw Re;return Re}function IP(i){return Be(i).toLowerCase()}function AP(i){return Be(i).toUpperCase()}function DP(i,a,u){if(i=Be(i),i&&(u||a===n))return vy(i);if(!i||!(a=Un(a)))return i;var d=Er(i),g=Er(a),w=gy(d,g),O=yy(d,g)+1;return Ki(d,w,O).join("")}function LP(i,a,u){if(i=Be(i),i&&(u||a===n))return i.slice(0,xy(i)+1);if(!i||!(a=Un(a)))return i;var d=Er(i),g=yy(d,Er(a))+1;return Ki(d,0,g).join("")}function MP(i,a,u){if(i=Be(i),i&&(u||a===n))return i.replace(ye,"");if(!i||!(a=Un(a)))return i;var d=Er(i),g=gy(d,Er(a));return Ki(d,g).join("")}function jP(i,a){var u=K,d=Z;if(pt(a)){var g="separator"in a?a.separator:g;u="length"in a?ke(a.length):u,d="omission"in a?Un(a.omission):d}i=Be(i);var w=i.length;if(_a(i)){var O=Er(i);w=O.length}if(u>=w)return i;var P=u-Ea(d);if(P<1)return d;var L=O?Ki(O,0,P).join(""):i.slice(0,P);if(g===n)return L+d;if(O&&(P+=L.length-P),Ap(g)){if(i.slice(P).search(g)){var Y,V=L;for(g.global||(g=qd(g.source,Be(ii.exec(g))+"g")),g.lastIndex=0;Y=g.exec(V);)var q=Y.index;L=L.slice(0,q===n?P:q)}}else if(i.indexOf(Un(g),P)!=P){var re=L.lastIndexOf(g);re>-1&&(L=L.slice(0,re))}return L+d}function FP(i){return i=Be(i),i&&Ut.test(i)?i.replace(dt,pC):i}var zP=Ta(function(i,a,u){return i+(u?" ":"")+a.toUpperCase()}),Mp=s0("toUpperCase");function a1(i,a,u){return i=Be(i),a=u?n:a,a===n?sC(i)?vC(i):JE(i):i.match(a)||[]}var l1=Pe(function(i,a){try{return Fn(i,n,a)}catch(u){return Ip(u)?u:new _e(u)}}),UP=ui(function(i,a){return or(a,function(u){u=Vr(u),li(i,u,Pp(i[u],i))}),i});function $P(i){var a=i==null?0:i.length,u=ve();return i=a?ut(i,function(d){if(typeof d[1]!="function")throw new ar(s);return[u(d[0]),d[1]]}):[],Pe(function(d){for(var g=-1;++gz)return[];var u=ae,d=on(i,ae);a=ve(a),i-=ae;for(var g=Kd(d,a);++u0||a<0)?new Le(u):(i<0?u=u.takeRight(-i):i&&(u=u.drop(i)),a!==n&&(a=ke(a),u=a<0?u.dropRight(-a):u.take(a-i)),u)},Le.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Le.prototype.toArray=function(){return this.take(ae)},Kr(Le.prototype,function(i,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),d=/^(?:head|last)$/.test(a),g=y[d?"take"+(a=="last"?"Right":""):a],w=d||/^find/.test(a);g&&(y.prototype[a]=function(){var O=this.__wrapped__,P=d?[1]:arguments,L=O instanceof Le,Y=P[0],V=L||Ce(O),q=function(Te){var je=g.apply(y,Ui([Te],P));return d&&re?je[0]:je};V&&u&&typeof Y=="function"&&Y.length!=1&&(L=V=!1);var re=this.__chain__,fe=!!this.__actions__.length,we=w&&!re,Re=L&&!fe;if(!w&&V){O=Re?O:new Le(this);var xe=i.apply(O,P);return xe.__actions__.push({func:ec,args:[q],thisArg:n}),new lr(xe,re)}return we&&Re?i.apply(this,P):(xe=this.thru(q),we?d?xe.value()[0]:xe.value():xe)})}),or(["pop","push","shift","sort","splice","unshift"],function(i){var a=Nu[i],u=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",d=/^(?:pop|shift)$/.test(i);y.prototype[i]=function(){var g=arguments;if(d&&!this.__chain__){var w=this.value();return a.apply(Ce(w)?w:[],g)}return this[u](function(O){return a.apply(Ce(O)?O:[],g)})}}),Kr(Le.prototype,function(i,a){var u=y[a];if(u){var d=u.name+"";Ke.call(Ra,d)||(Ra[d]=[]),Ra[d].push({name:a,func:u})}}),Ra[Yu(n,_).name]=[{name:"wrapper",func:n}],Le.prototype.clone=FC,Le.prototype.reverse=zC,Le.prototype.value=UC,y.prototype.at=mR,y.prototype.chain=vR,y.prototype.commit=gR,y.prototype.next=yR,y.prototype.plant=xR,y.prototype.reverse=bR,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=SR,y.prototype.first=y.prototype.head,Al&&(y.prototype[Al]=wR),y},Ca=gC();Io?((Io.exports=Ca)._=Ca,Fd._=Ca):Vt._=Ca}).call(Yl)})(Df,Df.exports);var Go=Df.exports;const rL={chefInstructions:[],currentInstruction:null,availableItems:[]},H_=yd({name:"chefActions",initialState:rL,reducers:{resetChefInstructions:e=>{e.chefInstructions=[]},setCustomInstructionItem:(e,t)=>{const n=e.chefInstructions.find(r=>r.id===t.payload.id);n&&(n.customItem=t.payload.customItem)},addChefInstruction:(e,t)=>{e.chefInstructions.push(t.payload)},removeChefInstruction:(e,t)=>{e.chefInstructions.find(r=>Go.isEqual(r,t.payload))&&(e.chefInstructions=e.chefInstructions.filter(r=>!Go.isEqual(r,t.payload)))},updateChefInstructionItems:(e,t)=>{const n=e.chefInstructions.find(r=>r.id===t.payload.id);if(n){const r={...n,items:t.payload.items};e.chefInstructions=e.chefInstructions.filter(o=>!Go.isEqual(o,n)),e.chefInstructions.push(r)}},updateInstructionTime:(e,t)=>{const{instruction:n,time:r}=t.payload,o=e.chefInstructions.find(l=>Go.isEqual(l,n));o&&(o.action.time=r)},updateInstructionAction:(e,t)=>{const n=e.chefInstructions.find(r=>r.id===t.payload.id);n&&(n.action=t.payload.action)},updateInstructionNote:(e,t)=>{const n=e.chefInstructions.find(r=>r.id===t.payload.id);n&&(n.note=t.payload.note)},setAvailableItems:(e,t)=>{e.availableItems=t.payload},updateAvailableItem:(e,t)=>{const n=e.availableItems.findIndex(r=>Go.isEqual(r,t.payload));n===-1?e.availableItems.push(t.payload):e.availableItems.splice(n,1)},updateAvailableItems:(e,t)=>{e.availableItems.push(...t.payload)}}}),{resetChefInstructions:iL,setCustomInstructionItem:oL,addChefInstruction:aL,removeChefInstruction:lL,updateChefInstructionItems:G_,updateInstructionTime:sL,updateInstructionAction:uL,updateInstructionNote:kc,setAvailableItems:cL,updateAvailableItem:hg,updateAvailableItems:fL}=H_.actions,dL=H_.reducer;function ua({page:e,isNext:t}){const n=sg(),r=wn(),o=He(p=>p.recipe.title),l=He(p=>p.groups.ingredientsGroups),s=He(p=>p.actions.chefInstructions),c=async()=>{const p=l.flatMap(S=>S.items.flat()),m=p.every(S=>S.amount>0),v=p.every(S=>S.unit!==vl);return m&&v},f=async()=>{const p=s.every(v=>v.items.length>0||v.customItem),m=s.every(v=>v.action.time!==0);return s.length>0&&p&&m},h=async()=>{if(console.log("Current location:",location.pathname),console.log("Navigating to:",e),t){let p=!1,m="";if(e==="/quantities"&&(o.length>0&&l.length>0?p=!0:m="You must have a Recipe Title and ingredients!"),e==="/instructions")if(await c()){p=!0;const v=l.flatMap(S=>S.items.flat());r(cL(v))}else m="Fill in all quantities and units!";(e==="/print"||e==="/doublePrint")&&(await f()?p=!0:m="Create some instructions with ingredients!"),p?(r(Lr("")),n(e)):r(Lr(m))}else r(Lr("")),console.log("Replacing path to:",e),n(e,{replace:!0})};return x.jsx("div",{"data-testid":t?"next":"back",onKeyDown:Pi,onClick:h,children:t?x.jsx("button",{className:"go-to-button-arrow right-0 bg-green-500 hover:bg-green-400 hover:translate-x-4",type:"button",children:"NEXT"}):x.jsx("button",{className:"go-to-button-arrow left-0 bg-red-500 hover:bg-red-400 hover:-translate-x-4",type:"button",children:"BACK"})})}function K_(){return x.jsx("div",{"data-testid":"print",onKeyDown:Pi,onClick:()=>console.log("here"),children:x.jsxs("button",{type:"button",className:"print-to-a4-button",children:["PRINT",x.jsx("br",{}),"TO A4"]})})}const no=["All-purpose flour","Almond flour","Almond milk","Apples","Artichoke","Asparagus","Avocado","Bacon","Baguette","Baking powder","Baking soda","Banana","Barley","Basil","Bay leaves","Beans","Bean sprouts","Beets","Black beans","Black-eyed peas","Black olives","Black pepper","Blueberries","Bread","Bread buns","Bread crumbs","Bread flour","Broccoli","Brown butter","Brown lentils","Brown rice","Brown sugar","Brussels sprouts","Butter","Buttermilk","Cabbage","Cake flour","Candied ginger","Carrots","Cashew nuts","Cauliflower","Celery","Cheddar cheese","Cherries","Chia seeds","Chicken breasts","Chicken broth","Chickpeas","Chili powder","Cilantro","Cinnamon","Cloves","Cocoa nibs","Cocoa powder","Coconut milk","Coconut oil","Condensed milk","Cornmeal","Cornstarch","Corn syrup","Couscous","Cranberries","Cream cheese","Cumin","Dark chocolate","Dill","Eggs","Eggwhite","Fennel","Feta cheese","Fish sauce","Garlic","Gelatin","Ginger","Goat cheese","Grapes","Graham crackers","Greek yogurt","Green beans","Green lentils","Green olives","Ground beef","Ham","Hazelnuts","Heavy cream","Honey","Hot sauce","Kale","Ketchup","Leek","Lemon","Lemon juice","Lemon zest","Lentils","Lima beans","Lime","Macadamia nuts","Maple syrup","Marzipan","Mayonnaise","Milk","Molasses","Mozzarella cheese","Mung beans","Mushrooms","Mustard","Nutmeg","Oats","Olive oil","Onion","Orange","Oregano","Paprika","Parmesan cheese","Parsley","Pasta","Peas","Pecan flour","Pecans","Pecorino cheese","Pineapple","Pine nuts","Poppy seeds","Pork chop","Potatoes","Powdered sugar","Quinoa","Raisins","Raspberries","Red Bell Pepper","Red pepper flakes","Rice","Ricotta cheese","Rosemary","Salmon","Salt","Sausage","Seasoning","Shortening","Sliced bread","Sour cream","Soy sauce","Spinach","Sugar","Swiss cheese","Thyme","Tomato paste","Tomato sauce","Turkey","Vanilla bean","Vanilla extract","Vanilla sugar","Vegetable oil","Vinegar","Water","Walnuts","White chocolate","Whole wheat flour","Yeast","Yellow Bell Pepper","Yogurt","Yolk","Zucchini"],Rc=["mg","g","kg","ml","liter","whole","quart","pint","lbs","oz","tsp","tbsp","cup","can"],Jw=[vl,"gallon","piece","slice","strip","drop","dash","smidgen","bunch","jar","stick","clove","head","fillet","block","sheet","pack","packet","bag","bar","cube","handful","bottle","sprig","stalk","ear","bowl","scoop","dozen","pinch"],pL=[{actionName:"Add",time:-1,unit:"min",equipment:"hand"},{actionName:"Bake",time:20,unit:"min",equipment:"oven"},{actionName:"Blanch",time:1,unit:"min",equipment:"stove"},{actionName:"Blend",time:-1,unit:"min",equipment:"blender"},{actionName:"Boil",time:5,unit:"min",equipment:"stove"},{actionName:"Braise",time:10,unit:"min",equipment:"oven"},{actionName:"Broil",time:20,unit:"min",equipment:"broiler"},{actionName:"Chill",time:5,unit:"min",equipment:"hand"},{actionName:"Chop",time:-1,unit:"min",equipment:"knife"},{actionName:"Core",time:-1,unit:"min",equipment:"corer"},{actionName:"Cure",time:5,unit:"hours",equipment:"refrigerator"},{actionName:"Dice",time:-1,unit:"min",equipment:"knife"},{actionName:"Dress",time:-1,unit:"min",equipment:"none"},{actionName:"Emulsify",time:-1,unit:"min",equipment:"blender"},{actionName:"Fold",time:-1,unit:"min",equipment:"spatula"},{actionName:"Ferment",time:24,unit:"hours",equipment:"refrigerator"},{actionName:"Fry",time:5,unit:"min",equipment:"stove"},{actionName:"Garnish",time:-1,unit:"min",equipment:"none"},{actionName:"Glaze",time:-1,unit:"min",equipment:"brush"},{actionName:"Grate",time:-1,unit:"min",equipment:"grater"},{actionName:"Grill",time:20,unit:"min",equipment:"grill"},{actionName:"Infuse",time:-1,unit:"min",equipment:"stove"},{actionName:"Knead",time:10,unit:"min",equipment:"stand mixer"},{actionName:"Marinate",time:8,unit:"hours",equipment:"refrigerator"},{actionName:"Mince",time:-1,unit:"min",equipment:"knife"},{actionName:"Mix",time:-1,unit:"min",equipment:"bowl"},{actionName:"Peel",time:-1,unit:"min",equipment:"peeler"},{actionName:"Poach",time:8,unit:"min",equipment:"stove"},{actionName:"Purée",time:-1,unit:"min",equipment:"food processor"},{actionName:"Roast",time:20,unit:"min",equipment:"oven"},{actionName:"Sauté",time:5,unit:"min",equipment:"stove"},{actionName:"Score",time:-1,unit:"min",equipment:"knife"},{actionName:"Sear",time:2,unit:"min",equipment:"stove"},{actionName:"Season",time:-1,unit:"min",equipment:"none"},{actionName:"Shred",time:-1,unit:"min",equipment:"grater"},{actionName:"Sieve",time:-1,unit:"min",equipment:"sieve"},{actionName:"Simmer",time:30,unit:"min",equipment:"stove"},{actionName:"Slice",time:-1,unit:"min",equipment:"knife"},{actionName:"Smoke",time:2,unit:"hours",equipment:"smoker"},{actionName:"Steam",time:10,unit:"min",equipment:"steamer"},{actionName:"Stew",time:45,unit:"min",equipment:"slow cooker"},{actionName:"Strain",time:-1,unit:"min",equipment:"strainer"},{actionName:"Toast",time:2,unit:"min",equipment:"toaster"},{actionName:"Trim",time:-1,unit:"min",equipment:"knife"},{actionName:"Warm",time:5,unit:"min",equipment:"hand"},{actionName:"Whisk",time:5,unit:"min",equipment:"hand mixer"}],hL={title:"",currentItem:"",currentGroupName:"",possibleItems:no,batches:1,invalidState:!1},Y_=yd({name:"recipe",initialState:hL,reducers:{resetRecipe:e=>{e.title="",e.currentItem="",e.currentGroupName="",e.possibleItems=no,e.batches=1,e.invalidState=!1},toggleInvalidState:e=>{e.invalidState=!e.invalidState},nameRecipe:(e,t)=>{e.title=t.payload},nameGroup:(e,t)=>{e.currentGroupName=t.payload},setItem:(e,t)=>{e.currentItem=t.payload},updatePossibleItems:(e,t)=>{e.possibleItems=no.filter(n=>n.toLowerCase().includes(t.payload.toLowerCase()))},setBatches:(e,t)=>{e.batches=t.payload}}}),{nameRecipe:mL,nameGroup:V_,setItem:vL,updatePossibleItems:gL,setBatches:Q6,resetRecipe:q_,toggleInvalidState:Z6}=Y_.actions,yL=Y_.reducer,wL={ingredientsGroups:[]},X_=yd({name:"groups",initialState:wL,reducers:{resetIngredientsGroup:e=>{e.ingredientsGroups=[]},addItemToIngredientGroup:(e,t)=>{const{groupName:n,itemName:r,item:o}=t.payload,l=e.ingredientsGroups.find(s=>s.groupName===n);if(l)if(o)l.items.push(o);else{const s={itemName:r,amount:0,unit:vl};l.items.push(s)}else e.ingredientsGroups.push({groupName:n,items:[{itemName:r,amount:0,unit:vl}]})},removeItemFromIngredientGroup:(e,t)=>{const{groupName:n,itemName:r}=t.payload,o=e.ingredientsGroups.find(l=>l.groupName===n);if(o){const l=o.items.findIndex(s=>s.itemName===r);l!==-1&&o.items.splice(l,1),o.items.length===0&&(e.ingredientsGroups=e.ingredientsGroups.filter(s=>s.groupName!==n))}},updateAmount:(e,t)=>{const{groupName:n,itemName:r,amount:o}=t.payload,l=e.ingredientsGroups.find(c=>c.groupName===n),s=l==null?void 0:l.items.filter(c=>c.itemName===r);s&&(s[0].amount=o)},updateUnit:(e,t)=>{const{groupName:n,itemName:r,unit:o}=t.payload,l=e.ingredientsGroups.find(c=>c.groupName===n),s=l==null?void 0:l.items.filter(c=>c.itemName===r);s&&(s[0].unit=o)}}}),{addItemToIngredientGroup:Lm,removeItemFromIngredientGroup:Q_,updateAmount:os,updateUnit:Z_,resetIngredientsGroup:J_}=X_.actions,xL=X_.reducer;function e2(){const e=sg(),t=wn(),n=async()=>{t(q_()),t(Lr("")),t(J_()),t(iL()),e(`/${Mn}`)};return x.jsx("div",{"data-testid":"make_another",onKeyDown:Pi,onClick:n,children:x.jsx("button",{className:"go-to-button-arrow right-0 py-4 bg-green-500 hover:bg-green-400 hover:-translate-y-4",type:"button",children:"MAKE ANOTHER"})})}function bL(){return He(t=>t.groups.ingredientsGroups).map(t=>x.jsxs("div",{className:"flex flex-row items-center justify-between md:gap-x-1 lg:gap-x-2 sm:mb-1 md:mb-2 lg:mb-3 xl:mb-4",children:[x.jsx("p",{className:"group-chip-dead text-fluidPrintSubtitle leading-none px-1 mr-4 sm:max-w-6 md:max-w-8 lg:max-w-10 xl:max-w-12",children:t.groupName}),x.jsx("div",{className:"flex flex-row items-start sm:gap-1 md:gap-2 lg:gap-3",children:t.items.map(n=>x.jsxs("div",{className:"flex flex-col center print-rounded",children:[x.jsx("img",{src:`${Mn}/assets/ingredients/${n.itemName.toLowerCase()}.webp`,alt:n.itemName,className:"card-shadow print-rounded print-image"}),x.jsxs("div",{className:"py-2 h-fit",children:[x.jsx("p",{className:"text-fluidPrintSubtitle leading-tight max-w-6",children:n.itemName}),x.jsx("p",{className:"text-fluidPrintSubtitle leading-tight ",children:x.jsxs("b",{children:[n.amount,"  ",n.unit]})})]})]},`${t.groupName}_${n.itemName}`))})]},t.groupName))}function SL(){return He(t=>t.actions.chefInstructions).map((t,n)=>x.jsxs("div",{className:"flex flex-col md:mb-2 lg:mb-6 xl:mb-10 sm:w-5/6 md:w-5/6 lg:w-4/5 xl:w-full center items-start",children:[x.jsxs("div",{className:"relative flex flex-row md:gap-1 lg:gap-1 xl:gap-4 pointer-events-none items-center justify-start",children:[x.jsxs("span",{className:"instruction-print-text min-w-12",children:["Step ",n+1]}),x.jsx("div",{className:"a4scale-smaller",children:x.jsxs("div",{className:"bg-white card-shadow print-rounded print-image mr-2",children:[x.jsx("img",{draggable:"false",src:`${Mn}/assets/chefActions/${t.action.actionName}.webp`,alt:t.action.actionName,"data-testid":`${t.action.actionName}_action`,className:"print-rounded-img print-image"}),x.jsx("p",{className:"instruction-print-text py-0.5",children:t.action.actionName})]})}),x.jsx("span",{className:"instruction-print-text",children:"THE"}),t.customItem?x.jsx("b",{className:"instruction-print-text",children:t.customItem}):x.jsx("div",{className:"center justify-start sm:w-20 md:w-44 lg:w-52 xl:w-56 flex flex-row flex-wrap",children:t.items.map(r=>x.jsxs("div",{className:"flex center py-1 px-1",children:[x.jsx("img",{src:`${Mn}/assets/ingredients/${r.itemName.toLowerCase()}.webp`,alt:r.itemName,className:"card-shadow print-image print-rounded"})," "]},`${t.id}_${r.itemName}`))}),t.action.time!==-1&&x.jsxs("span",{className:"flex instruction-print-text min-w-12",children:["FOR ",x.jsx("br",{}),t.action.time," ",t.action.unit]})]}),x.jsx("span",{className:"instruction-print-text pt-0.5 lg:pt-1",children:t.note})]},`${t.id}`))}function _L(){const e=He(t=>t.recipe.title);return x.jsxs("div",{"data-testid":"doubleResultpage",className:"relative min-h-screen flex flex-col",children:[x.jsx(e2,{}),x.jsx(ua,{page:"/instructions",isNext:!1}),x.jsxs("div",{className:"flex flex-row center gap-x-8 mt-28 mb-16",children:[x.jsxs("div",{id:"a4_1",className:"relative flex flex-col a4ratio w-1/3 text-center input-border items-center",children:[x.jsx("h1",{className:"recipe-title",children:e}),x.jsx("h2",{className:"recipe-subtitle-text mb-1",children:"page 1"}),x.jsx("hr",{className:"w-1/2 border-gray-200 md:mb-2 lg:mb-4"}),x.jsx("h2",{className:"recipe-subtitle-text sm:mb-2 md:mb-4 lg:mb-8",children:"Ingredients:"}),x.jsx("div",{className:"flex flex-col justify-center",children:x.jsx(bL,{})})]}),x.jsxs("div",{id:"a4_2",className:"relative flex flex-col a4ratio w-1/3 text-center input-border items-center",children:[x.jsx("h1",{className:"recipe-title",children:e}),x.jsx("h2",{className:"recipe-subtitle-text mb-1",children:"page 2"}),x.jsx("hr",{className:"w-1/2 border-gray-200 mb-2"}),x.jsx("h2",{className:"recipe-subtitle-text lg:mb-1 xl:mb-4",children:"Steps:"}),x.jsx("div",{className:"flex flex-col justify-center",children:x.jsx("div",{className:"flex flex-col center",children:x.jsx(SL,{})})}),x.jsx("h2",{className:"recipe-subtitle-text mb-2",children:"Enjoy !"})]})]}),x.jsx("div",{className:"fixed bottom-0 right-0 go-to-button-arrow mb-0",children:x.jsx(K_,{})})]})}function mg(){const e=He(r=>r.warning.warning),t=wn();R.useEffect(()=>{const r=setTimeout(()=>{t(Lr(""))},4e3);return()=>clearTimeout(r)},[t]);const n=()=>{t(Lr(""))};return x.jsx("div",{className:"toast font-indie",onClick:n,onKeyDown:Pi,"data-testid":"snack",children:e})}function EL(){const e=wn(),t=He(p=>p.recipe.possibleItems),n=He(p=>p.recipe.currentGroupName),r=He(p=>p.recipe.currentItem),o=He(p=>p.recipe.title),l=He(p=>p.warning.warning),s=He(p=>p.groups.ingredientsGroups),c=(p,m,v)=>{if(p.preventDefault(),!m)e(Lr("Enter a group name!"));else if(!v)e(Lr("Search an ingredient!"));else if(t.length===0)e(Lr("No items found!"));else if(t.length===1){const S=s.filter(C=>C.groupName===m)[0];if(S)if(S.items.filter(N=>N.itemName===t[0])[0])e(Lr("Ingredient is already in the group!"));else{const N={groupName:m,itemName:t[0]};e(Lm(N))}else{const C={groupName:m,itemName:t[0]};e(Lm(C))}}else e(Lr("Too many ingredients at once!"))},f=p=>{const m=p.currentTarget.value;e(vL(m)),e(gL(m))},h=()=>{e(q_()),e(J_())};return x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"flex flex-col w-full h-1/4 center text-center",children:[x.jsx("h1",{className:"mt-4 text-fluidTitle font-shadowsLight",children:"Welcome to a4recipe"}),x.jsx("h3",{className:"pt-2 pb-2 text-fluidSubtitle",children:"Name your recipe and start adding ingredients!"}),x.jsx("input",{type:"text",required:!0,className:`w-inputs center input-border xl:w-96 ${o.length===0&&"required-element-border"}`,placeholder:"Give your recipe a name",value:o,onChange:p=>e(mL(p.target.value)),onKeyDown:p=>{p.key==="Enter"&&p.target.blur()},onFocus:Zc}),x.jsx("div",{className:"md:justify-between lg:justify-center gap-y-4",children:x.jsxs("form",{className:"pt-4 pb-2",children:[x.jsxs("div",{className:"flex flex-row center w-full mb-4 gap-4",children:[x.jsx("input",{type:"text",className:"input-border text-center w-96 lg:mr-8",placeholder:"Search ingredients",value:r,onInput:f,onFocus:Zc}),x.jsx("input",{type:"text",className:"input-border w-60",placeholder:"Give them a group name",value:n,onChange:p=>e(V_(p.target.value)),onFocus:Zc})]}),x.jsxs("div",{className:"flex flex-row justify-between",children:[x.jsx("button",{type:"button",className:"sexy-button bg-slate-500 hover:bg-white hover:text-slate-500 focus:text-slate-500 focus:bg-gray-200 text-gray-50",onClick:h,children:"RESET"}),x.jsx("button",{form:"addIngredientsSelect",type:"submit",className:"sexy-button bg-blue-500 hover:bg-white hover:text-blue-500 focus:text-blue-500 focus:bg-gray-200 text-gray-50",onClick:p=>c(p,n,r),children:"ADD"})]})]})})]}),l&&x.jsx(mg,{})]})}const CL="modulepreload",NL=function(e){return"/a4recipe/"+e},ex={},kL=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),s=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));o=Promise.all(n.map(c=>{if(c=NL(c),c in ex)return;ex[c]=!0;const f=c.endsWith(".css"),h=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${h}`))return;const p=document.createElement("link");if(p.rel=f?"stylesheet":CL,f||(p.as="script",p.crossOrigin=""),p.href=c,s&&p.setAttribute("nonce",s),document.head.appendChild(p),f)return new Promise((m,v)=>{p.addEventListener("load",m),p.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${c}`)))})}))}return o.then(()=>t()).catch(l=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=l,window.dispatchEvent(s),!s.defaultPrevented)throw l})};var RL={prefix:"fas",iconName:"ban",icon:[512,512,[128683,"cancel"],"f05e","M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},OL={prefix:"fas",iconName:"angles-right",icon:[512,512,[187,"angle-double-right"],"f101","M470.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 256 265.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z"]},t2={prefix:"fas",iconName:"minus",icon:[448,512,[8211,8722,10134,"subtract"],"f068","M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z"]},n2={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"]},PL={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},wd=PL,TL={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},IL={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},AL={prefix:"fas",iconName:"angles-left",icon:[512,512,[171,"angle-double-left"],"f100","M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160zm352-160l-160 160c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L301.3 256 438.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0z"]},J6={prefix:"fas",iconName:"circle-plus",icon:[512,512,["plus-circle"],"f055","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344V280H168c-13.3 0-24-10.7-24-24s10.7-24 24-24h64V168c0-13.3 10.7-24 24-24s24 10.7 24 24v64h64c13.3 0 24 10.7 24 24s-10.7 24-24 24H280v64c0 13.3-10.7 24-24 24s-24-10.7-24-24z"]};function tx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function se(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=w)return i;var P=u-Ea(d);if(P<1)return d;var L=O?Ki(O,0,P).join(""):i.slice(0,P);if(g===n)return L+d;if(O&&(P+=L.length-P),Ap(g)){if(i.slice(P).search(g)){var Y,V=L;for(g.global||(g=qd(g.source,Be(ii.exec(g))+"g")),g.lastIndex=0;Y=g.exec(V);)var q=Y.index;L=L.slice(0,q===n?P:q)}}else if(i.indexOf(zn(g),P)!=P){var re=L.lastIndexOf(g);re>-1&&(L=L.slice(0,re))}return L+d}function FP(i){return i=Be(i),i&&Ut.test(i)?i.replace(dt,pC):i}var zP=Ta(function(i,a,u){return i+(u?" ":"")+a.toUpperCase()}),Mp=s0("toUpperCase");function a1(i,a,u){return i=Be(i),a=u?n:a,a===n?sC(i)?vC(i):JE(i):i.match(a)||[]}var l1=Pe(function(i,a){try{return jn(i,n,a)}catch(u){return Ip(u)?u:new _e(u)}}),UP=ui(function(i,a){return or(a,function(u){u=Vr(u),li(i,u,Pp(i[u],i))}),i});function $P(i){var a=i==null?0:i.length,u=ve();return i=a?ut(i,function(d){if(typeof d[1]!="function")throw new ar(s);return[u(d[0]),d[1]]}):[],Pe(function(d){for(var g=-1;++gz)return[];var u=ae,d=on(i,ae);a=ve(a),i-=ae;for(var g=Kd(d,a);++u0||a<0)?new Le(u):(i<0?u=u.takeRight(-i):i&&(u=u.drop(i)),a!==n&&(a=ke(a),u=a<0?u.dropRight(-a):u.take(a-i)),u)},Le.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Le.prototype.toArray=function(){return this.take(ae)},Kr(Le.prototype,function(i,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),d=/^(?:head|last)$/.test(a),g=y[d?"take"+(a=="last"?"Right":""):a],w=d||/^find/.test(a);g&&(y.prototype[a]=function(){var O=this.__wrapped__,P=d?[1]:arguments,L=O instanceof Le,Y=P[0],V=L||Ce(O),q=function(Te){var je=g.apply(y,Ui([Te],P));return d&&re?je[0]:je};V&&u&&typeof Y=="function"&&Y.length!=1&&(L=V=!1);var re=this.__chain__,fe=!!this.__actions__.length,we=w&&!re,Re=L&&!fe;if(!w&&V){O=Re?O:new Le(this);var xe=i.apply(O,P);return xe.__actions__.push({func:ec,args:[q],thisArg:n}),new lr(xe,re)}return we&&Re?i.apply(this,P):(xe=this.thru(q),we?d?xe.value()[0]:xe.value():xe)})}),or(["pop","push","shift","sort","splice","unshift"],function(i){var a=Nu[i],u=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",d=/^(?:pop|shift)$/.test(i);y.prototype[i]=function(){var g=arguments;if(d&&!this.__chain__){var w=this.value();return a.apply(Ce(w)?w:[],g)}return this[u](function(O){return a.apply(Ce(O)?O:[],g)})}}),Kr(Le.prototype,function(i,a){var u=y[a];if(u){var d=u.name+"";Ke.call(Ra,d)||(Ra[d]=[]),Ra[d].push({name:a,func:u})}}),Ra[Yu(n,_).name]=[{name:"wrapper",func:n}],Le.prototype.clone=FC,Le.prototype.reverse=zC,Le.prototype.value=UC,y.prototype.at=mR,y.prototype.chain=vR,y.prototype.commit=gR,y.prototype.next=yR,y.prototype.plant=xR,y.prototype.reverse=bR,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=SR,y.prototype.first=y.prototype.head,Al&&(y.prototype[Al]=wR),y},Ca=gC();Io?((Io.exports=Ca)._=Ca,Fd._=Ca):Vt._=Ca}).call(Yl)})(Df,Df.exports);var Go=Df.exports;const rL={chefInstructions:[],currentInstruction:null,availableItems:[]},H_=yd({name:"chefActions",initialState:rL,reducers:{resetChefInstructions:e=>{e.chefInstructions=[]},setCustomInstructionItem:(e,t)=>{const n=e.chefInstructions.find(r=>r.id===t.payload.id);n&&(n.customItem=t.payload.customItem)},addChefInstruction:(e,t)=>{e.chefInstructions.push(t.payload)},removeChefInstruction:(e,t)=>{e.chefInstructions.find(r=>Go.isEqual(r,t.payload))&&(e.chefInstructions=e.chefInstructions.filter(r=>!Go.isEqual(r,t.payload)))},updateChefInstructionItems:(e,t)=>{const n=e.chefInstructions.find(r=>r.id===t.payload.id);if(n){const r={...n,items:t.payload.items};e.chefInstructions=e.chefInstructions.filter(o=>!Go.isEqual(o,n)),e.chefInstructions.push(r)}},updateInstructionTime:(e,t)=>{const{instruction:n,time:r}=t.payload,o=e.chefInstructions.find(l=>Go.isEqual(l,n));o&&(o.action.time=r)},updateInstructionAction:(e,t)=>{const n=e.chefInstructions.find(r=>r.id===t.payload.id);n&&(n.action=t.payload.action)},updateInstructionNote:(e,t)=>{const n=e.chefInstructions.find(r=>r.id===t.payload.id);n&&(n.note=t.payload.note)},setAvailableItems:(e,t)=>{e.availableItems=t.payload},updateAvailableItem:(e,t)=>{const n=e.availableItems.findIndex(r=>Go.isEqual(r,t.payload));n===-1?e.availableItems.push(t.payload):e.availableItems.splice(n,1)},updateAvailableItems:(e,t)=>{e.availableItems.push(...t.payload)}}}),{resetChefInstructions:iL,setCustomInstructionItem:oL,addChefInstruction:aL,removeChefInstruction:lL,updateChefInstructionItems:G_,updateInstructionTime:sL,updateInstructionAction:uL,updateInstructionNote:kc,setAvailableItems:cL,updateAvailableItem:hg,updateAvailableItems:fL}=H_.actions,dL=H_.reducer;function ua({page:e,isNext:t}){const n=sg(),r=wn(),o=He(p=>p.recipe.title),l=He(p=>p.groups.ingredientsGroups),s=He(p=>p.actions.chefInstructions),c=async()=>{const p=l.flatMap(S=>S.items.flat()),m=p.every(S=>S.amount>0),v=p.every(S=>S.unit!==vl);return m&&v},f=async()=>{const p=s.every(v=>v.items.length>0||v.customItem),m=s.every(v=>v.action.time!==0);return s.length>0&&p&&m},h=async()=>{if(t){let p=!1,m="";if(e==="/quantities"&&(o.length>0&&l.length>0?p=!0:m="You must have a Recipe Title and ingredients!"),e==="/instructions")if(await c()){p=!0;const v=l.flatMap(S=>S.items.flat());r(cL(v))}else m="Fill in all quantities and units!";(e==="/print"||e==="/doublePrint")&&(await f()?p=!0:m="Create some instructions with ingredients!"),p?(r(Lr("")),n(e)):r(Lr(m))}else r(Lr("")),n(e,{replace:!0})};return x.jsx("div",{"data-testid":t?"next":"back",onKeyDown:Pi,onClick:h,children:t?x.jsx("button",{className:"go-to-button-arrow right-0 bg-green-500 hover:bg-green-400 hover:translate-x-4",type:"button",children:"NEXT"}):x.jsx("button",{className:"go-to-button-arrow left-0 bg-red-500 hover:bg-red-400 hover:-translate-x-4",type:"button",children:"BACK"})})}function K_(){return x.jsx("div",{"data-testid":"print",onKeyDown:Pi,onClick:()=>console.log("here"),children:x.jsxs("button",{type:"button",className:"print-to-a4-button",children:["PRINT",x.jsx("br",{}),"TO A4"]})})}const no=["All-purpose flour","Almond flour","Almond milk","Apples","Artichoke","Asparagus","Avocado","Bacon","Baguette","Baking powder","Baking soda","Banana","Barley","Basil","Bay leaves","Beans","Bean sprouts","Beets","Black beans","Black-eyed peas","Black olives","Black pepper","Blueberries","Bread","Bread buns","Bread crumbs","Bread flour","Broccoli","Brown butter","Brown lentils","Brown rice","Brown sugar","Brussels sprouts","Butter","Buttermilk","Cabbage","Cake flour","Candied ginger","Carrots","Cashew nuts","Cauliflower","Celery","Cheddar cheese","Cherries","Chia seeds","Chicken breasts","Chicken broth","Chickpeas","Chili powder","Cilantro","Cinnamon","Cloves","Cocoa nibs","Cocoa powder","Coconut milk","Coconut oil","Condensed milk","Cornmeal","Cornstarch","Corn syrup","Couscous","Cranberries","Cream cheese","Cumin","Dark chocolate","Dill","Eggs","Eggwhite","Fennel","Feta cheese","Fish sauce","Garlic","Gelatin","Ginger","Goat cheese","Grapes","Graham crackers","Greek yogurt","Green beans","Green lentils","Green olives","Ground beef","Ham","Hazelnuts","Heavy cream","Honey","Hot sauce","Kale","Ketchup","Leek","Lemon","Lemon juice","Lemon zest","Lentils","Lima beans","Lime","Macadamia nuts","Maple syrup","Marzipan","Mayonnaise","Milk","Molasses","Mozzarella cheese","Mung beans","Mushrooms","Mustard","Nutmeg","Oats","Olive oil","Onion","Orange","Oregano","Paprika","Parmesan cheese","Parsley","Pasta","Peas","Pecan flour","Pecans","Pecorino cheese","Pineapple","Pine nuts","Poppy seeds","Pork chop","Potatoes","Powdered sugar","Quinoa","Raisins","Raspberries","Red Bell Pepper","Red pepper flakes","Rice","Ricotta cheese","Rosemary","Salmon","Salt","Sausage","Seasoning","Shortening","Sliced bread","Sour cream","Soy sauce","Spinach","Sugar","Swiss cheese","Thyme","Tomato paste","Tomato sauce","Turkey","Vanilla bean","Vanilla extract","Vanilla sugar","Vegetable oil","Vinegar","Water","Walnuts","White chocolate","Whole wheat flour","Yeast","Yellow Bell Pepper","Yogurt","Yolk","Zucchini"],Rc=["mg","g","kg","ml","liter","whole","quart","pint","lbs","oz","tsp","tbsp","cup","can"],Jw=[vl,"gallon","piece","slice","strip","drop","dash","smidgen","bunch","jar","stick","clove","head","fillet","block","sheet","pack","packet","bag","bar","cube","handful","bottle","sprig","stalk","ear","bowl","scoop","dozen","pinch"],pL=[{actionName:"Add",time:-1,unit:"min",equipment:"hand"},{actionName:"Bake",time:20,unit:"min",equipment:"oven"},{actionName:"Blanch",time:1,unit:"min",equipment:"stove"},{actionName:"Blend",time:-1,unit:"min",equipment:"blender"},{actionName:"Boil",time:5,unit:"min",equipment:"stove"},{actionName:"Braise",time:10,unit:"min",equipment:"oven"},{actionName:"Broil",time:20,unit:"min",equipment:"broiler"},{actionName:"Chill",time:5,unit:"min",equipment:"hand"},{actionName:"Chop",time:-1,unit:"min",equipment:"knife"},{actionName:"Core",time:-1,unit:"min",equipment:"corer"},{actionName:"Cure",time:5,unit:"hours",equipment:"refrigerator"},{actionName:"Dice",time:-1,unit:"min",equipment:"knife"},{actionName:"Dress",time:-1,unit:"min",equipment:"none"},{actionName:"Emulsify",time:-1,unit:"min",equipment:"blender"},{actionName:"Fold",time:-1,unit:"min",equipment:"spatula"},{actionName:"Ferment",time:24,unit:"hours",equipment:"refrigerator"},{actionName:"Fry",time:5,unit:"min",equipment:"stove"},{actionName:"Garnish",time:-1,unit:"min",equipment:"none"},{actionName:"Glaze",time:-1,unit:"min",equipment:"brush"},{actionName:"Grate",time:-1,unit:"min",equipment:"grater"},{actionName:"Grill",time:20,unit:"min",equipment:"grill"},{actionName:"Infuse",time:-1,unit:"min",equipment:"stove"},{actionName:"Knead",time:10,unit:"min",equipment:"stand mixer"},{actionName:"Marinate",time:8,unit:"hours",equipment:"refrigerator"},{actionName:"Mince",time:-1,unit:"min",equipment:"knife"},{actionName:"Mix",time:-1,unit:"min",equipment:"bowl"},{actionName:"Peel",time:-1,unit:"min",equipment:"peeler"},{actionName:"Poach",time:8,unit:"min",equipment:"stove"},{actionName:"Purée",time:-1,unit:"min",equipment:"food processor"},{actionName:"Roast",time:20,unit:"min",equipment:"oven"},{actionName:"Sauté",time:5,unit:"min",equipment:"stove"},{actionName:"Score",time:-1,unit:"min",equipment:"knife"},{actionName:"Sear",time:2,unit:"min",equipment:"stove"},{actionName:"Season",time:-1,unit:"min",equipment:"none"},{actionName:"Shred",time:-1,unit:"min",equipment:"grater"},{actionName:"Sieve",time:-1,unit:"min",equipment:"sieve"},{actionName:"Simmer",time:30,unit:"min",equipment:"stove"},{actionName:"Slice",time:-1,unit:"min",equipment:"knife"},{actionName:"Smoke",time:2,unit:"hours",equipment:"smoker"},{actionName:"Steam",time:10,unit:"min",equipment:"steamer"},{actionName:"Stew",time:45,unit:"min",equipment:"slow cooker"},{actionName:"Strain",time:-1,unit:"min",equipment:"strainer"},{actionName:"Toast",time:2,unit:"min",equipment:"toaster"},{actionName:"Trim",time:-1,unit:"min",equipment:"knife"},{actionName:"Warm",time:5,unit:"min",equipment:"hand"},{actionName:"Whisk",time:5,unit:"min",equipment:"hand mixer"}],hL={title:"",currentItem:"",currentGroupName:"",possibleItems:no,batches:1,invalidState:!1},Y_=yd({name:"recipe",initialState:hL,reducers:{resetRecipe:e=>{e.title="",e.currentItem="",e.currentGroupName="",e.possibleItems=no,e.batches=1,e.invalidState=!1},toggleInvalidState:e=>{e.invalidState=!e.invalidState},nameRecipe:(e,t)=>{e.title=t.payload},nameGroup:(e,t)=>{e.currentGroupName=t.payload},setItem:(e,t)=>{e.currentItem=t.payload},updatePossibleItems:(e,t)=>{e.possibleItems=no.filter(n=>n.toLowerCase().includes(t.payload.toLowerCase()))},setBatches:(e,t)=>{e.batches=t.payload}}}),{nameRecipe:mL,nameGroup:V_,setItem:vL,updatePossibleItems:gL,setBatches:Q6,resetRecipe:q_,toggleInvalidState:Z6}=Y_.actions,yL=Y_.reducer,wL={ingredientsGroups:[]},X_=yd({name:"groups",initialState:wL,reducers:{resetIngredientsGroup:e=>{e.ingredientsGroups=[]},addItemToIngredientGroup:(e,t)=>{const{groupName:n,itemName:r,item:o}=t.payload,l=e.ingredientsGroups.find(s=>s.groupName===n);if(l)if(o)l.items.push(o);else{const s={itemName:r,amount:0,unit:vl};l.items.push(s)}else e.ingredientsGroups.push({groupName:n,items:[{itemName:r,amount:0,unit:vl}]})},removeItemFromIngredientGroup:(e,t)=>{const{groupName:n,itemName:r}=t.payload,o=e.ingredientsGroups.find(l=>l.groupName===n);if(o){const l=o.items.findIndex(s=>s.itemName===r);l!==-1&&o.items.splice(l,1),o.items.length===0&&(e.ingredientsGroups=e.ingredientsGroups.filter(s=>s.groupName!==n))}},updateAmount:(e,t)=>{const{groupName:n,itemName:r,amount:o}=t.payload,l=e.ingredientsGroups.find(c=>c.groupName===n),s=l==null?void 0:l.items.filter(c=>c.itemName===r);s&&(s[0].amount=o)},updateUnit:(e,t)=>{const{groupName:n,itemName:r,unit:o}=t.payload,l=e.ingredientsGroups.find(c=>c.groupName===n),s=l==null?void 0:l.items.filter(c=>c.itemName===r);s&&(s[0].unit=o)}}}),{addItemToIngredientGroup:Lm,removeItemFromIngredientGroup:Q_,updateAmount:os,updateUnit:Z_,resetIngredientsGroup:J_}=X_.actions,xL=X_.reducer;function e2(){const e=sg(),t=wn(),n=async()=>{t(q_()),t(Lr("")),t(J_()),t(iL()),e(`/${Vn}`)};return x.jsx("div",{"data-testid":"make_another",onKeyDown:Pi,onClick:n,children:x.jsx("button",{className:"go-to-button-arrow right-0 py-4 bg-green-500 hover:bg-green-400 hover:-translate-y-4",type:"button",children:"MAKE ANOTHER"})})}function bL(){return He(t=>t.groups.ingredientsGroups).map(t=>x.jsxs("div",{className:"flex flex-row items-center justify-between md:gap-x-1 lg:gap-x-2 sm:mb-1 md:mb-2 lg:mb-3 xl:mb-4",children:[x.jsx("p",{className:"group-chip-dead text-fluidPrintSubtitle leading-none px-1 mr-4 sm:max-w-6 md:max-w-8 lg:max-w-10 xl:max-w-12",children:t.groupName}),x.jsx("div",{className:"flex flex-row items-start sm:gap-1 md:gap-2 lg:gap-3",children:t.items.map(n=>x.jsxs("div",{className:"flex flex-col center print-rounded",children:[x.jsx("img",{src:`${Vn}/assets/ingredients/${n.itemName.toLowerCase()}.webp`,alt:n.itemName,className:"card-shadow print-rounded print-image"}),x.jsxs("div",{className:"py-2 h-fit",children:[x.jsx("p",{className:"text-fluidPrintSubtitle leading-tight max-w-6",children:n.itemName}),x.jsx("p",{className:"text-fluidPrintSubtitle leading-tight ",children:x.jsxs("b",{children:[n.amount,"  ",n.unit]})})]})]},`${t.groupName}_${n.itemName}`))})]},t.groupName))}function SL(){return He(t=>t.actions.chefInstructions).map((t,n)=>x.jsxs("div",{className:"flex flex-col md:mb-2 lg:mb-6 xl:mb-10 sm:w-5/6 md:w-5/6 lg:w-4/5 xl:w-full center items-start",children:[x.jsxs("div",{className:"relative flex flex-row md:gap-1 lg:gap-1 xl:gap-4 pointer-events-none items-center justify-start",children:[x.jsxs("span",{className:"instruction-print-text min-w-12",children:["Step ",n+1]}),x.jsx("div",{className:"a4scale-smaller",children:x.jsxs("div",{className:"bg-white card-shadow print-rounded print-image mr-2",children:[x.jsx("img",{draggable:"false",src:`${Vn}/assets/chefActions/${t.action.actionName}.webp`,alt:t.action.actionName,"data-testid":`${t.action.actionName}_action`,className:"print-rounded-img print-image"}),x.jsx("p",{className:"instruction-print-text py-0.5",children:t.action.actionName})]})}),x.jsx("span",{className:"instruction-print-text",children:"THE"}),t.customItem?x.jsx("b",{className:"instruction-print-text",children:t.customItem}):x.jsx("div",{className:"center justify-start sm:w-20 md:w-44 lg:w-52 xl:w-56 flex flex-row flex-wrap",children:t.items.map(r=>x.jsxs("div",{className:"flex center py-1 px-1",children:[x.jsx("img",{src:`${Vn}/assets/ingredients/${r.itemName.toLowerCase()}.webp`,alt:r.itemName,className:"card-shadow print-image print-rounded"})," "]},`${t.id}_${r.itemName}`))}),t.action.time!==-1&&x.jsxs("span",{className:"flex instruction-print-text min-w-12",children:["FOR ",x.jsx("br",{}),t.action.time," ",t.action.unit]})]}),x.jsx("span",{className:"instruction-print-text pt-0.5 lg:pt-1",children:t.note})]},`${t.id}`))}function _L(){const e=He(t=>t.recipe.title);return x.jsxs("div",{"data-testid":"doubleResultpage",className:"relative min-h-screen flex flex-col",children:[x.jsx(e2,{}),x.jsx(ua,{page:"/instructions",isNext:!1}),x.jsxs("div",{className:"flex flex-row center gap-x-8 mt-28 mb-16",children:[x.jsxs("div",{id:"a4_1",className:"relative flex flex-col a4ratio w-1/3 text-center input-border items-center",children:[x.jsx("h1",{className:"recipe-title",children:e}),x.jsx("h2",{className:"recipe-subtitle-text mb-1",children:"page 1"}),x.jsx("hr",{className:"w-1/2 border-gray-200 md:mb-2 lg:mb-4"}),x.jsx("h2",{className:"recipe-subtitle-text sm:mb-2 md:mb-4 lg:mb-8",children:"Ingredients:"}),x.jsx("div",{className:"flex flex-col justify-center",children:x.jsx(bL,{})})]}),x.jsxs("div",{id:"a4_2",className:"relative flex flex-col a4ratio w-1/3 text-center input-border items-center",children:[x.jsx("h1",{className:"recipe-title",children:e}),x.jsx("h2",{className:"recipe-subtitle-text mb-1",children:"page 2"}),x.jsx("hr",{className:"w-1/2 border-gray-200 mb-2"}),x.jsx("h2",{className:"recipe-subtitle-text lg:mb-1 xl:mb-4",children:"Steps:"}),x.jsx("div",{className:"flex flex-col justify-center",children:x.jsx("div",{className:"flex flex-col center",children:x.jsx(SL,{})})}),x.jsx("h2",{className:"recipe-subtitle-text mb-2",children:"Enjoy !"})]})]}),x.jsx("div",{className:"fixed bottom-0 right-0 go-to-button-arrow mb-0",children:x.jsx(K_,{})})]})}function mg(){const e=He(r=>r.warning.warning),t=wn();R.useEffect(()=>{const r=setTimeout(()=>{t(Lr(""))},4e3);return()=>clearTimeout(r)},[t]);const n=()=>{t(Lr(""))};return x.jsx("div",{className:"toast font-indie",onClick:n,onKeyDown:Pi,"data-testid":"snack",children:e})}function EL(){const e=wn(),t=He(p=>p.recipe.possibleItems),n=He(p=>p.recipe.currentGroupName),r=He(p=>p.recipe.currentItem),o=He(p=>p.recipe.title),l=He(p=>p.warning.warning),s=He(p=>p.groups.ingredientsGroups),c=(p,m,v)=>{if(p.preventDefault(),!m)e(Lr("Enter a group name!"));else if(!v)e(Lr("Search an ingredient!"));else if(t.length===0)e(Lr("No items found!"));else if(t.length===1){const S=s.filter(C=>C.groupName===m)[0];if(S)if(S.items.filter(N=>N.itemName===t[0])[0])e(Lr("Ingredient is already in the group!"));else{const N={groupName:m,itemName:t[0]};e(Lm(N))}else{const C={groupName:m,itemName:t[0]};e(Lm(C))}}else e(Lr("Too many ingredients at once!"))},f=p=>{const m=p.currentTarget.value;e(vL(m)),e(gL(m))},h=()=>{e(q_()),e(J_())};return x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"flex flex-col w-full h-1/4 center text-center",children:[x.jsx("h1",{className:"mt-4 text-fluidTitle font-shadowsLight",children:"Welcome to a4recipe"}),x.jsx("h3",{className:"pt-2 pb-2 text-fluidSubtitle",children:"Name your recipe and start adding ingredients!"}),x.jsx("input",{type:"text",required:!0,className:`w-inputs center input-border xl:w-96 ${o.length===0&&"required-element-border"}`,placeholder:"Give your recipe a name",value:o,onChange:p=>e(mL(p.target.value)),onKeyDown:p=>{p.key==="Enter"&&p.target.blur()},onFocus:Zc}),x.jsx("div",{className:"md:justify-between lg:justify-center gap-y-4",children:x.jsxs("form",{className:"pt-4 pb-2",children:[x.jsxs("div",{className:"flex flex-row center w-full mb-4 gap-4",children:[x.jsx("input",{type:"text",className:"input-border text-center w-96 lg:mr-8",placeholder:"Search ingredients",value:r,onInput:f,onFocus:Zc}),x.jsx("input",{type:"text",className:"input-border w-60",placeholder:"Give them a group name",value:n,onChange:p=>e(V_(p.target.value)),onFocus:Zc})]}),x.jsxs("div",{className:"flex flex-row justify-between",children:[x.jsx("button",{type:"button",className:"sexy-button bg-slate-500 hover:bg-white hover:text-slate-500 focus:text-slate-500 focus:bg-gray-200 text-gray-50",onClick:h,children:"RESET"}),x.jsx("button",{form:"addIngredientsSelect",type:"submit",className:"sexy-button bg-blue-500 hover:bg-white hover:text-blue-500 focus:text-blue-500 focus:bg-gray-200 text-gray-50",onClick:p=>c(p,n,r),children:"ADD"})]})]})})]}),l&&x.jsx(mg,{})]})}const CL="modulepreload",NL=function(e){return"/a4recipe/"+e},ex={},kL=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),s=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));o=Promise.all(n.map(c=>{if(c=NL(c),c in ex)return;ex[c]=!0;const f=c.endsWith(".css"),h=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${h}`))return;const p=document.createElement("link");if(p.rel=f?"stylesheet":CL,f||(p.as="script",p.crossOrigin=""),p.href=c,s&&p.setAttribute("nonce",s),document.head.appendChild(p),f)return new Promise((m,v)=>{p.addEventListener("load",m),p.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${c}`)))})}))}return o.then(()=>t()).catch(l=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=l,window.dispatchEvent(s),!s.defaultPrevented)throw l})};var RL={prefix:"fas",iconName:"ban",icon:[512,512,[128683,"cancel"],"f05e","M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},OL={prefix:"fas",iconName:"angles-right",icon:[512,512,[187,"angle-double-right"],"f101","M470.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 256 265.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z"]},t2={prefix:"fas",iconName:"minus",icon:[448,512,[8211,8722,10134,"subtract"],"f068","M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z"]},n2={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"]},PL={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},wd=PL,TL={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},IL={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},AL={prefix:"fas",iconName:"angles-left",icon:[512,512,[171,"angle-double-left"],"f100","M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160zm352-160l-160 160c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L301.3 256 438.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0z"]},J6={prefix:"fas",iconName:"circle-plus",icon:[512,512,["plus-circle"],"f055","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344V280H168c-13.3 0-24-10.7-24-24s10.7-24 24-24h64V168c0-13.3 10.7-24 24-24s24 10.7 24 24v64h64c13.3 0 24 10.7 24 24s-10.7 24-24 24H280v64c0 13.3-10.7 24-24 24s-24-10.7-24-24z"]};function tx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function se(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1;o--){var l=n[o],s=(l.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(s)>-1&&(r=l)}return lt.head.insertBefore(t,r),e}}var oM="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function eu(){for(var e=12,t="";e-- >0;)t+=oM[Math.random()*62|0];return t}function Cl(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function bg(e){return e.classList?Cl(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function h2(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function aM(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(h2(e[n]),'" ')},"").trim()}function xd(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function Sg(e){return e.size!==ei.size||e.x!==ei.x||e.y!==ei.y||e.rotate!==ei.rotate||e.flipX||e.flipY}function lM(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,o={transform:"translate(".concat(n/2," 256)")},l="translate(".concat(t.x*32,", ").concat(t.y*32,") "),s="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),c="rotate(".concat(t.rotate," 0 0)"),f={transform:"".concat(l," ").concat(s," ").concat(c)},h={transform:"translate(".concat(r/2*-1," -256)")};return{outer:o,inner:f,path:h}}function sM(e){var t=e.transform,n=e.width,r=n===void 0?jm:n,o=e.height,l=o===void 0?jm:o,s=e.startCentered,c=s===void 0?!1:s,f="";return c&&l2?f+="translate(".concat(t.x/qi-r/2,"em, ").concat(t.y/qi-l/2,"em) "):c?f+="translate(calc(-50% + ".concat(t.x/qi,"em), calc(-50% + ").concat(t.y/qi,"em)) "):f+="translate(".concat(t.x/qi,"em, ").concat(t.y/qi,"em) "),f+="scale(".concat(t.size/qi*(t.flipX?-1:1),", ").concat(t.size/qi*(t.flipY?-1:1),") "),f+="rotate(".concat(t.rotate,"deg) "),f}var uM=`:root, :host { --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid"; @@ -883,8 +883,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `+o:"")+` The above lifecycles should be removed. Learn more about this warning here: -https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=U2,t.componentWillReceiveProps=$2),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=B2;var c=t.componentDidUpdate;t.componentDidUpdate=function(h,p,m){var v=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:m;c.call(this,h,p,v)}}return e}const bj=Object.freeze(Object.defineProperty({__proto__:null,polyfill:xj},Symbol.toStringTag,{value:"Module"})),Sj=CT(bj);Object.defineProperty(da,"__esModule",{value:!0});da.bodyOpenClassName=da.portalClassName=void 0;var Px=Object.assign||function(e){for(var t=1;t{r(c=>(c+1)%no.length)},[]),l=R.useCallback(()=>{r(c=>c===0?no.length-1:c-1)},[]),s=R.useCallback(c=>{c.key==="ArrowRight"?o():c.key==="ArrowLeft"&&l()},[o,l]);return R.useEffect(()=>(e?document.addEventListener("keydown",s):document.removeEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}),[e,s]),Mx.setAppElement(document.getElementById("root")),x.jsx(Mx,{isOpen:e,onRequestClose:()=>t(),className:"modal-container",overlayClassName:"modal-overlay",shouldCloseOnOverlayClick:!0,children:x.jsxs("div",{className:"modal-content",children:[x.jsx("button",{type:"button",className:"close-modal-button",onClick:()=>t(),children:x.jsx(Ln,{icon:wd,className:"nav-icon"})}),x.jsx("span",{className:"modal-image-title",children:no[n]}),x.jsx("img",{src:`${Mn}/assets/ingredients/${no[n].toLowerCase()}.webp`,alt:`${no[n]}`,className:"modal-image"}),x.jsxs("div",{className:"modal-nav-buttons",children:[x.jsx("button",{type:"button",className:"nav-button prev",onClick:l,children:x.jsx(Ln,{icon:TL,className:"nav-icon"})}),x.jsx("button",{type:"button",className:"nav-button next",onClick:o,children:x.jsx(Ln,{icon:IL,className:"nav-icon"})})]})]})})}const jj=R.lazy(()=>kL(()=>import("./IngredientGalleryItem-BtTyqPlU.js"),[]));function Fj(){const[e,t]=R.useState(!1),n=He(o=>o.recipe.possibleItems),r=n.length<5?"flex flex-row gap-x-8":"grid-autofill";return x.jsxs(x.Fragment,{children:[!e&&x.jsxs("div",{className:"modal-open-button",onClick:()=>t(!0),onKeyDown:Pi,children:["CLICK ME",x.jsx("br",{}),'to say "Wow"',x.jsx("br",{}),'and "Ooooh"']}),x.jsx(Mj,{isOpen:e,onClose:()=>t(!1)}),x.jsx("div",{className:"flex flex-row overflow-auto no-scrollbar justify-evenly",children:x.jsx("div",{className:`flex flex-row flex-wrap center gap-y-8 gap-x-4 ${r}`,children:n.map(o=>x.jsx(R.Suspense,{fallback:x.jsx("div",{className:"suspense-gallery-item","data-testid":`${o}_suspense`,children:""}),children:x.jsx(jj,{item:{itemName:o,amount:0,unit:vl}})},`${o}_suspense`))})})]})}function zj(){for(var e=arguments.length,t=new Array(e),n=0;nr=>{t.forEach(o=>o(r))},t)}const Cd=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Rl(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Ig(e){return"nodeType"in e}function bn(e){var t,n;return e?Rl(e)?e:Ig(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Ag(e){const{Document:t}=bn(e);return e instanceof t}function gu(e){return Rl(e)?!1:e instanceof bn(e).HTMLElement}function H2(e){return e instanceof bn(e).SVGElement}function Ol(e){return e?Rl(e)?e.document:Ig(e)?Ag(e)?e:gu(e)||H2(e)?e.ownerDocument:document:document:document}const $r=Cd?R.useLayoutEffect:R.useEffect;function Nd(e){const t=R.useRef(e);return $r(()=>{t.current=e}),R.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o{e.current=setInterval(r,o)},[]),n=R.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ru(e,t){t===void 0&&(t=[e]);const n=R.useRef(e);return $r(()=>{n.current!==e&&(n.current=e)},t),n}function yu(e,t){const n=R.useRef();return R.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Bf(e){const t=Nd(e),n=R.useRef(null),r=R.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function Wf(e){const t=R.useRef();return R.useEffect(()=>{t.current=e},[e]),t.current}let Nh={};function kd(e,t){return R.useMemo(()=>{if(t)return t;const n=Nh[e]==null?0:Nh[e]+1;return Nh[e]=n,e+"-"+n},[e,t])}function G2(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{const c=Object.entries(s);for(const[f,h]of c){const p=l[f];p!=null&&(l[f]=p+e*h)}return l},{...t})}}const ll=G2(1),Hf=G2(-1);function $j(e){return"clientX"in e&&"clientY"in e}function Rd(e){if(!e)return!1;const{KeyboardEvent:t}=bn(e.target);return t&&e instanceof t}function Bj(e){if(!e)return!1;const{TouchEvent:t}=bn(e.target);return t&&e instanceof t}function Gf(e){if(Bj(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return $j(e)?{x:e.clientX,y:e.clientY}:null}const Ri=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Ri.Translate.toString(e),Ri.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),jx="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Wj(e){return e.matches(jx)?e:e.querySelector(jx)}const Hj={display:"none"};function Gj(e){let{id:t,value:n}=e;return Qe.createElement("div",{id:t,style:Hj},n)}function Kj(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Qe.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Yj(){const[e,t]=R.useState("");return{announce:R.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const K2=R.createContext(null);function Vj(e){const t=R.useContext(K2);R.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function qj(){const[e]=R.useState(()=>new Set),t=R.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[R.useCallback(r=>{let{type:o,event:l}=r;e.forEach(s=>{var c;return(c=s[o])==null?void 0:c.call(s,l)})},[e]),t]}const Xj={draggable:` +https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=U2,t.componentWillReceiveProps=$2),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=B2;var c=t.componentDidUpdate;t.componentDidUpdate=function(h,p,m){var v=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:m;c.call(this,h,p,v)}}return e}const bj=Object.freeze(Object.defineProperty({__proto__:null,polyfill:xj},Symbol.toStringTag,{value:"Module"})),Sj=CT(bj);Object.defineProperty(da,"__esModule",{value:!0});da.bodyOpenClassName=da.portalClassName=void 0;var Px=Object.assign||function(e){for(var t=1;t{r(c=>(c+1)%no.length)},[]),l=R.useCallback(()=>{r(c=>c===0?no.length-1:c-1)},[]),s=R.useCallback(c=>{c.key==="ArrowRight"?o():c.key==="ArrowLeft"&&l()},[o,l]);return R.useEffect(()=>(e?document.addEventListener("keydown",s):document.removeEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}),[e,s]),Mx.setAppElement(document.getElementById("root")),x.jsx(Mx,{isOpen:e,onRequestClose:()=>t(),className:"modal-container",overlayClassName:"modal-overlay",shouldCloseOnOverlayClick:!0,children:x.jsxs("div",{className:"modal-content",children:[x.jsx("button",{type:"button",className:"close-modal-button",onClick:()=>t(),children:x.jsx(Ln,{icon:wd,className:"nav-icon"})}),x.jsx("span",{className:"modal-image-title",children:no[n]}),x.jsx("img",{src:`${Vn}/assets/ingredients/${no[n].toLowerCase()}.webp`,alt:`${no[n]}`,className:"modal-image"}),x.jsxs("div",{className:"modal-nav-buttons",children:[x.jsx("button",{type:"button",className:"nav-button prev",onClick:l,children:x.jsx(Ln,{icon:TL,className:"nav-icon"})}),x.jsx("button",{type:"button",className:"nav-button next",onClick:o,children:x.jsx(Ln,{icon:IL,className:"nav-icon"})})]})]})})}const jj=R.lazy(()=>kL(()=>import("./IngredientGalleryItem-CC4bRH7R.js"),[]));function Fj(){const[e,t]=R.useState(!1),n=He(o=>o.recipe.possibleItems),r=n.length<5?"flex flex-row gap-x-8":"grid-autofill";return x.jsxs(x.Fragment,{children:[!e&&x.jsxs("div",{className:"modal-open-button",onClick:()=>t(!0),onKeyDown:Pi,children:["CLICK ME",x.jsx("br",{}),'to say "Wow"',x.jsx("br",{}),'and "Ooooh"']}),x.jsx(Mj,{isOpen:e,onClose:()=>t(!1)}),x.jsx("div",{className:"flex flex-row overflow-auto no-scrollbar justify-evenly",children:x.jsx("div",{className:`flex flex-row flex-wrap center gap-y-8 gap-x-4 ${r}`,children:n.map(o=>x.jsx(R.Suspense,{fallback:x.jsx("div",{className:"suspense-gallery-item","data-testid":`${o}_suspense`,children:""}),children:x.jsx(jj,{item:{itemName:o,amount:0,unit:vl}})},`${o}_suspense`))})})]})}function zj(){for(var e=arguments.length,t=new Array(e),n=0;nr=>{t.forEach(o=>o(r))},t)}const Cd=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Rl(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Ig(e){return"nodeType"in e}function bn(e){var t,n;return e?Rl(e)?e:Ig(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Ag(e){const{Document:t}=bn(e);return e instanceof t}function gu(e){return Rl(e)?!1:e instanceof bn(e).HTMLElement}function H2(e){return e instanceof bn(e).SVGElement}function Ol(e){return e?Rl(e)?e.document:Ig(e)?Ag(e)?e:gu(e)||H2(e)?e.ownerDocument:document:document:document}const $r=Cd?R.useLayoutEffect:R.useEffect;function Nd(e){const t=R.useRef(e);return $r(()=>{t.current=e}),R.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o{e.current=setInterval(r,o)},[]),n=R.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ru(e,t){t===void 0&&(t=[e]);const n=R.useRef(e);return $r(()=>{n.current!==e&&(n.current=e)},t),n}function yu(e,t){const n=R.useRef();return R.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Bf(e){const t=Nd(e),n=R.useRef(null),r=R.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function Wf(e){const t=R.useRef();return R.useEffect(()=>{t.current=e},[e]),t.current}let Nh={};function kd(e,t){return R.useMemo(()=>{if(t)return t;const n=Nh[e]==null?0:Nh[e]+1;return Nh[e]=n,e+"-"+n},[e,t])}function G2(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{const c=Object.entries(s);for(const[f,h]of c){const p=l[f];p!=null&&(l[f]=p+e*h)}return l},{...t})}}const ll=G2(1),Hf=G2(-1);function $j(e){return"clientX"in e&&"clientY"in e}function Rd(e){if(!e)return!1;const{KeyboardEvent:t}=bn(e.target);return t&&e instanceof t}function Bj(e){if(!e)return!1;const{TouchEvent:t}=bn(e.target);return t&&e instanceof t}function Gf(e){if(Bj(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return $j(e)?{x:e.clientX,y:e.clientY}:null}const Ri=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Ri.Translate.toString(e),Ri.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),jx="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Wj(e){return e.matches(jx)?e:e.querySelector(jx)}const Hj={display:"none"};function Gj(e){let{id:t,value:n}=e;return Qe.createElement("div",{id:t,style:Hj},n)}function Kj(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Qe.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Yj(){const[e,t]=R.useState("");return{announce:R.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const K2=R.createContext(null);function Vj(e){const t=R.useContext(K2);R.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function qj(){const[e]=R.useState(()=>new Set),t=R.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[R.useCallback(r=>{let{type:o,event:l}=r;e.forEach(s=>{var c;return(c=s[o])==null?void 0:c.call(s,l)})},[e]),t]}const Xj={draggable:` To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel. - `},Qj={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Zj(e){let{announcements:t=Qj,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Xj}=e;const{announce:l,announcement:s}=Yj(),c=kd("DndLiveRegion"),[f,h]=R.useState(!1);if(R.useEffect(()=>{h(!0)},[]),Vj(R.useMemo(()=>({onDragStart(m){let{active:v}=m;l(t.onDragStart({active:v}))},onDragMove(m){let{active:v,over:S}=m;t.onDragMove&&l(t.onDragMove({active:v,over:S}))},onDragOver(m){let{active:v,over:S}=m;l(t.onDragOver({active:v,over:S}))},onDragEnd(m){let{active:v,over:S}=m;l(t.onDragEnd({active:v,over:S}))},onDragCancel(m){let{active:v,over:S}=m;l(t.onDragCancel({active:v,over:S}))}}),[l,t])),!f)return null;const p=Qe.createElement(Qe.Fragment,null,Qe.createElement(Gj,{id:r,value:o.draggable}),Qe.createElement(Kj,{id:c,announcement:s}));return n?Jr.createPortal(p,n):p}var At;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(At||(At={}));function Kf(){}function Yf(e,t){return R.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Y2(){for(var e=arguments.length,t=new Array(e),n=0;n[...t].filter(r=>r!=null),[...t])}const Br=Object.freeze({x:0,y:0});function V2(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Jj(e,t){const n=Gf(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function q2(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function eF(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function tv(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function tF(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}const X2=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=tv(t),l=[];for(const s of r){const{id:c}=s,f=n.get(c);if(f){const h=tv(f),p=o.reduce((v,S,C)=>v+V2(h[C],S),0),m=Number((p/4).toFixed(4));l.push({id:c,data:{droppableContainer:s,value:m}})}}return l.sort(q2)};function nF(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),l=Math.min(t.top+t.height,e.top+e.height),s=o-r,c=l-n;if(r{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const l of r){const{id:s}=l,c=n.get(s);if(c){const f=nF(c,t);f>0&&o.push({id:s,data:{droppableContainer:l,value:f}})}}return o.sort(eF)};function iF(e,t){const{top:n,left:r,bottom:o,right:l}=t;return n<=e.y&&e.y<=o&&r<=e.x&&e.x<=l}const Q2=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];const o=[];for(const l of t){const{id:s}=l,c=n.get(s);if(c&&iF(r,c)){const h=tv(c).reduce((m,v)=>m+V2(r,v),0),p=Number((h/4).toFixed(4));o.push({id:s,data:{droppableContainer:l,value:p}})}}return o.sort(q2)};function oF(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Z2(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Br}function aF(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),l=1;l({...s,top:s.top+e*c.y,bottom:s.bottom+e*c.y,left:s.left+e*c.x,right:s.right+e*c.x}),{...n})}}const lF=aF(1);function J2(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function sF(e,t,n){const r=J2(t);if(!r)return e;const{scaleX:o,scaleY:l,x:s,y:c}=r,f=e.left-s-(1-o)*parseFloat(n),h=e.top-c-(1-l)*parseFloat(n.slice(n.indexOf(" ")+1)),p=o?e.width/o:e.width,m=l?e.height/l:e.height;return{width:p,height:m,top:h,right:f+p,bottom:h+m,left:f}}const uF={ignoreTransform:!1};function Pl(e,t){t===void 0&&(t=uF);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:h,transformOrigin:p}=bn(e).getComputedStyle(e);h&&(n=sF(n,h,p))}const{top:r,left:o,width:l,height:s,bottom:c,right:f}=n;return{top:r,left:o,width:l,height:s,bottom:c,right:f}}function Fx(e){return Pl(e,{ignoreTransform:!0})}function cF(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function fF(e,t){return t===void 0&&(t=bn(e).getComputedStyle(e)),t.position==="fixed"}function dF(e,t){t===void 0&&(t=bn(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const l=t[o];return typeof l=="string"?n.test(l):!1})}function Dg(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(Ag(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!gu(o)||H2(o)||n.includes(o))return n;const l=bn(e).getComputedStyle(o);return o!==e&&dF(o,l)&&n.push(o),fF(o,l)?n:r(o.parentNode)}return e?r(e):n}function eE(e){const[t]=Dg(e,1);return t??null}function kh(e){return!Cd||!e?null:Rl(e)?e:Ig(e)?Ag(e)||e===Ol(e).scrollingElement?window:gu(e)?e:null:null}function tE(e){return Rl(e)?e.scrollX:e.scrollLeft}function nE(e){return Rl(e)?e.scrollY:e.scrollTop}function nv(e){return{x:tE(e),y:nE(e)}}var Wt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Wt||(Wt={}));function rE(e){return!Cd||!e?!1:e===document.scrollingElement}function iE(e){const t={x:0,y:0},n=rE(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,l=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,c=e.scrollLeft>=r.x;return{isTop:o,isLeft:l,isBottom:s,isRight:c,maxScroll:r,minScroll:t}}const pF={x:.2,y:.2};function hF(e,t,n,r,o){let{top:l,left:s,right:c,bottom:f}=n;r===void 0&&(r=10),o===void 0&&(o=pF);const{isTop:h,isBottom:p,isLeft:m,isRight:v}=iE(e),S={x:0,y:0},C={x:0,y:0},N={height:t.height*o.y,width:t.width*o.x};return!h&&l<=t.top+N.height?(S.y=Wt.Backward,C.y=r*Math.abs((t.top+N.height-l)/N.height)):!p&&f>=t.bottom-N.height&&(S.y=Wt.Forward,C.y=r*Math.abs((t.bottom-N.height-f)/N.height)),!v&&c>=t.right-N.width?(S.x=Wt.Forward,C.x=r*Math.abs((t.right-N.width-c)/N.width)):!m&&s<=t.left+N.width&&(S.x=Wt.Backward,C.x=r*Math.abs((t.left+N.width-s)/N.width)),{direction:S,speed:C}}function mF(e){if(e===document.scrollingElement){const{innerWidth:l,innerHeight:s}=window;return{top:0,left:0,right:l,bottom:s,width:l,height:s}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function oE(e){return e.reduce((t,n)=>ll(t,nv(n)),Br)}function vF(e){return e.reduce((t,n)=>t+tE(n),0)}function gF(e){return e.reduce((t,n)=>t+nE(n),0)}function aE(e,t){if(t===void 0&&(t=Pl),!e)return;const{top:n,left:r,bottom:o,right:l}=t(e);eE(e)&&(o<=0||l<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const yF=[["x",["left","right"],vF],["y",["top","bottom"],gF]];class Lg{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=Dg(n),o=oE(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[l,s,c]of yF)for(const f of s)Object.defineProperty(this,f,{get:()=>{const h=c(r),p=o[l]-h;return this.rect[f]+p},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Ns{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function wF(e){const{EventTarget:t}=bn(e);return e instanceof t?e:Ol(e)}function Rh(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var hr;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(hr||(hr={}));function zx(e){e.preventDefault()}function xF(e){e.stopPropagation()}var We;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(We||(We={}));const lE={start:[We.Space,We.Enter],cancel:[We.Esc],end:[We.Space,We.Enter]},bF=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case We.Right:return{...n,x:n.x+25};case We.Left:return{...n,x:n.x-25};case We.Down:return{...n,y:n.y+25};case We.Up:return{...n,y:n.y-25}}};class sE{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Ns(Ol(n)),this.windowListeners=new Ns(bn(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(hr.Resize,this.handleCancel),this.windowListeners.add(hr.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(hr.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&aE(r),n(Br)}handleKeyDown(t){if(Rd(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:l=lE,coordinateGetter:s=bF,scrollBehavior:c="smooth"}=o,{code:f}=t;if(l.end.includes(f)){this.handleEnd(t);return}if(l.cancel.includes(f)){this.handleCancel(t);return}const{collisionRect:h}=r.current,p=h?{x:h.left,y:h.top}:Br;this.referenceCoordinates||(this.referenceCoordinates=p);const m=s(t,{active:n,context:r.current,currentCoordinates:p});if(m){const v=Hf(m,p),S={x:0,y:0},{scrollableAncestors:C}=r.current;for(const N of C){const T=t.code,{isTop:_,isRight:b,isLeft:E,isBottom:I,maxScroll:M,minScroll:G}=iE(N),k=mF(N),B={x:Math.min(T===We.Right?k.right-k.width/2:k.right,Math.max(T===We.Right?k.left:k.left+k.width/2,m.x)),y:Math.min(T===We.Down?k.bottom-k.height/2:k.bottom,Math.max(T===We.Down?k.top:k.top+k.height/2,m.y))},U=T===We.Right&&!b||T===We.Left&&!E,K=T===We.Down&&!I||T===We.Up&&!_;if(U&&B.x!==m.x){const Z=N.scrollLeft+v.x,he=T===We.Right&&Z<=M.x||T===We.Left&&Z>=G.x;if(he&&!v.y){N.scrollTo({left:Z,behavior:c});return}he?S.x=N.scrollLeft-Z:S.x=T===We.Right?N.scrollLeft-M.x:N.scrollLeft-G.x,S.x&&N.scrollBy({left:-S.x,behavior:c});break}else if(K&&B.y!==m.y){const Z=N.scrollTop+v.y,he=T===We.Down&&Z<=M.y||T===We.Up&&Z>=G.y;if(he&&!v.x){N.scrollTo({top:Z,behavior:c});return}he?S.y=N.scrollTop-Z:S.y=T===We.Down?N.scrollTop-M.y:N.scrollTop-G.y,S.y&&N.scrollBy({top:-S.y,behavior:c});break}}this.handleMove(t,ll(Hf(m,this.referenceCoordinates),S))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}sE.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=lE,onActivation:o}=t,{active:l}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const c=l.activatorNode.current;return c&&e.target!==c?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function Ux(e){return!!(e&&"distance"in e)}function $x(e){return!!(e&&"delay"in e)}class Mg{constructor(t,n,r){var o;r===void 0&&(r=wF(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:l}=t,{target:s}=l;this.props=t,this.events=n,this.document=Ol(s),this.documentListeners=new Ns(this.document),this.listeners=new Ns(r),this.windowListeners=new Ns(bn(s)),this.initialCoordinates=(o=Gf(l))!=null?o:Br,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(hr.Resize,this.handleCancel),this.windowListeners.add(hr.DragStart,zx),this.windowListeners.add(hr.VisibilityChange,this.handleCancel),this.windowListeners.add(hr.ContextMenu,zx),this.documentListeners.add(hr.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if($x(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}if(Ux(n))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(hr.Click,xF,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(hr.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:l}=this,{onMove:s,options:{activationConstraint:c}}=l;if(!o)return;const f=(n=Gf(t))!=null?n:Br,h=Hf(o,f);if(!r&&c){if(Ux(c)){if(c.tolerance!=null&&Rh(h,c.tolerance))return this.handleCancel();if(Rh(h,c.distance))return this.handleStart()}return $x(c)&&Rh(h,c.tolerance)?this.handleCancel():void 0}t.cancelable&&t.preventDefault(),s(f)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===We.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const SF={move:{name:"pointermove"},end:{name:"pointerup"}};class uE extends Mg{constructor(t){const{event:n}=t,r=Ol(n.target);super(t,SF,r)}}uE.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const _F={move:{name:"mousemove"},end:{name:"mouseup"}};var rv;(function(e){e[e.RightClick=2]="RightClick"})(rv||(rv={}));class jg extends Mg{constructor(t){super(t,_F,Ol(t.event.target))}}jg.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===rv.RightClick?!1:(r==null||r({event:n}),!0)}}];const Oh={move:{name:"touchmove"},end:{name:"touchend"}};class Fg extends Mg{constructor(t){super(t,Oh)}static setup(){return window.addEventListener(Oh.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Oh.move.name,t)};function t(){}}}Fg.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var ks;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(ks||(ks={}));var Vf;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Vf||(Vf={}));function EF(e){let{acceleration:t,activator:n=ks.Pointer,canScroll:r,draggingRect:o,enabled:l,interval:s=5,order:c=Vf.TreeOrder,pointerCoordinates:f,scrollableAncestors:h,scrollableAncestorRects:p,delta:m,threshold:v}=e;const S=NF({delta:m,disabled:!l}),[C,N]=Uj(),T=R.useRef({x:0,y:0}),_=R.useRef({x:0,y:0}),b=R.useMemo(()=>{switch(n){case ks.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case ks.DraggableRect:return o}},[n,o,f]),E=R.useRef(null),I=R.useCallback(()=>{const G=E.current;if(!G)return;const k=T.current.x*_.current.x,B=T.current.y*_.current.y;G.scrollBy(k,B)},[]),M=R.useMemo(()=>c===Vf.TreeOrder?[...h].reverse():h,[c,h]);R.useEffect(()=>{if(!l||!h.length||!b){N();return}for(const G of M){if((r==null?void 0:r(G))===!1)continue;const k=h.indexOf(G),B=p[k];if(!B)continue;const{direction:U,speed:K}=hF(G,B,b,t,v);for(const Z of["x","y"])S[Z][U[Z]]||(K[Z]=0,U[Z]=0);if(K.x>0||K.y>0){N(),E.current=G,C(I,s),T.current=K,_.current=U;return}}T.current={x:0,y:0},_.current={x:0,y:0},N()},[t,I,r,N,l,s,JSON.stringify(b),JSON.stringify(S),C,h,M,p,JSON.stringify(v)])}const CF={x:{[Wt.Backward]:!1,[Wt.Forward]:!1},y:{[Wt.Backward]:!1,[Wt.Forward]:!1}};function NF(e){let{delta:t,disabled:n}=e;const r=Wf(t);return yu(o=>{if(n||!r||!o)return CF;const l={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Wt.Backward]:o.x[Wt.Backward]||l.x===-1,[Wt.Forward]:o.x[Wt.Forward]||l.x===1},y:{[Wt.Backward]:o.y[Wt.Backward]||l.y===-1,[Wt.Forward]:o.y[Wt.Forward]||l.y===1}}},[n,t,r])}function kF(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return yu(o=>{var l;return t===null?null:(l=r??o)!=null?l:null},[r,t])}function RF(e,t){return R.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,l=o.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...l]},[]),[e,t])}var iu;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(iu||(iu={}));var iv;(function(e){e.Optimized="optimized"})(iv||(iv={}));const Bx=new Map;function OF(e,t){let{dragging:n,dependencies:r,config:o}=t;const[l,s]=R.useState(null),{frequency:c,measure:f,strategy:h}=o,p=R.useRef(e),m=T(),v=ru(m),S=R.useCallback(function(_){_===void 0&&(_=[]),!v.current&&s(b=>b===null?_:b.concat(_.filter(E=>!b.includes(E))))},[v]),C=R.useRef(null),N=yu(_=>{if(m&&!n)return Bx;if(!_||_===Bx||p.current!==e||l!=null){const b=new Map;for(let E of e){if(!E)continue;if(l&&l.length>0&&!l.includes(E.id)&&E.rect.current){b.set(E.id,E.rect.current);continue}const I=E.node.current,M=I?new Lg(f(I),I):null;E.rect.current=M,M&&b.set(E.id,M)}return b}return _},[e,l,n,m,f]);return R.useEffect(()=>{p.current=e},[e]),R.useEffect(()=>{m||S()},[n,m]),R.useEffect(()=>{l&&l.length>0&&s(null)},[JSON.stringify(l)]),R.useEffect(()=>{m||typeof c!="number"||C.current!==null||(C.current=setTimeout(()=>{S(),C.current=null},c))},[c,m,S,...r]),{droppableRects:N,measureDroppableContainers:S,measuringScheduled:l!=null};function T(){switch(h){case iu.Always:return!1;case iu.BeforeDragging:return n;default:return!n}}}function zg(e,t){return yu(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function PF(e,t){return zg(e,t)}function TF(e){let{callback:t,disabled:n}=e;const r=Nd(t),o=R.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:l}=window;return new l(r)},[r,n]);return R.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Od(e){let{callback:t,disabled:n}=e;const r=Nd(t),o=R.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:l}=window;return new l(r)},[n]);return R.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function IF(e){return new Lg(Pl(e),e)}function Wx(e,t,n){t===void 0&&(t=IF);const[r,o]=R.useReducer(c,null),l=TF({callback(f){if(e)for(const h of f){const{type:p,target:m}=h;if(p==="childList"&&m instanceof HTMLElement&&m.contains(e)){o();break}}}}),s=Od({callback:o});return $r(()=>{o(),e?(s==null||s.observe(e),l==null||l.observe(document.body,{childList:!0,subtree:!0})):(s==null||s.disconnect(),l==null||l.disconnect())},[e]),r;function c(f){if(!e)return null;if(e.isConnected===!1){var h;return(h=f??n)!=null?h:null}const p=t(e);return JSON.stringify(f)===JSON.stringify(p)?f:p}}function AF(e){const t=zg(e);return Z2(e,t)}const Hx=[];function DF(e){const t=R.useRef(e),n=yu(r=>e?r&&r!==Hx&&e&&t.current&&e.parentNode===t.current.parentNode?r:Dg(e):Hx,[e]);return R.useEffect(()=>{t.current=e},[e]),n}function LF(e){const[t,n]=R.useState(null),r=R.useRef(e),o=R.useCallback(l=>{const s=kh(l.target);s&&n(c=>c?(c.set(s,nv(s)),new Map(c)):null)},[]);return R.useEffect(()=>{const l=r.current;if(e!==l){s(l);const c=e.map(f=>{const h=kh(f);return h?(h.addEventListener("scroll",o,{passive:!0}),[h,nv(h)]):null}).filter(f=>f!=null);n(c.length?new Map(c):null),r.current=e}return()=>{s(e),s(l)};function s(c){c.forEach(f=>{const h=kh(f);h==null||h.removeEventListener("scroll",o)})}},[o,e]),R.useMemo(()=>e.length?t?Array.from(t.values()).reduce((l,s)=>ll(l,s),Br):oE(e):Br,[e,t])}function Gx(e,t){t===void 0&&(t=[]);const n=R.useRef(null);return R.useEffect(()=>{n.current=null},t),R.useEffect(()=>{const r=e!==Br;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Hf(e,n.current):Br}function MF(e){R.useEffect(()=>{if(!Cd)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function jF(e,t){return R.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:l}=r;return n[o]=s=>{l(s,t)},n},{}),[e,t])}function cE(e){return R.useMemo(()=>e?cF(e):null,[e])}const Ph=[];function FF(e,t){t===void 0&&(t=Pl);const[n]=e,r=cE(n?bn(n):null),[o,l]=R.useReducer(c,Ph),s=Od({callback:l});return e.length>0&&o===Ph&&l(),$r(()=>{e.length?e.forEach(f=>s==null?void 0:s.observe(f)):(s==null||s.disconnect(),l())},[e]),o;function c(){return e.length?e.map(f=>rE(f)?r:new Lg(t(f),f)):Ph}}function fE(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return gu(t)?t:e}function zF(e){let{measure:t}=e;const[n,r]=R.useState(null),o=R.useCallback(h=>{for(const{target:p}of h)if(gu(p)){r(m=>{const v=t(p);return m?{...m,width:v.width,height:v.height}:v});break}},[t]),l=Od({callback:o}),s=R.useCallback(h=>{const p=fE(h);l==null||l.disconnect(),p&&(l==null||l.observe(p)),r(p?t(p):null)},[t,l]),[c,f]=Bf(s);return R.useMemo(()=>({nodeRef:c,rect:n,setRef:f}),[n,c,f])}const UF=[{sensor:uE,options:{}},{sensor:sE,options:{}}],$F={current:{}},tf={draggable:{measure:Fx},droppable:{measure:Fx,strategy:iu.WhileDragging,frequency:iv.Optimized},dragOverlay:{measure:Pl}};class Rs extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const BF={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Rs,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Kf},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:tf,measureDroppableContainers:Kf,windowRect:null,measuringScheduled:!1},dE={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Kf,draggableNodes:new Map,over:null,measureDroppableContainers:Kf},wu=R.createContext(dE),pE=R.createContext(BF);function WF(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Rs}}}function HF(e,t){switch(t.type){case At.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case At.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case At.DragEnd:case At.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case At.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Rs(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case At.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,l=e.droppable.containers.get(n);if(!l||r!==l.key)return e;const s=new Rs(e.droppable.containers);return s.set(n,{...l,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case At.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const l=new Rs(e.droppable.containers);return l.delete(n),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function GF(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=R.useContext(wu),l=Wf(r),s=Wf(n==null?void 0:n.id);return R.useEffect(()=>{if(!t&&!r&&l&&s!=null){if(!Rd(l)||document.activeElement===l.target)return;const c=o.get(s);if(!c)return;const{activatorNode:f,node:h}=c;if(!f.current&&!h.current)return;requestAnimationFrame(()=>{for(const p of[f.current,h.current]){if(!p)continue;const m=Wj(p);if(m){m.focus();break}}})}},[r,t,o,s,l]),null}function hE(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,l)=>l({transform:o,...r}),n):n}function KF(e){return R.useMemo(()=>({draggable:{...tf.draggable,...e==null?void 0:e.draggable},droppable:{...tf.droppable,...e==null?void 0:e.droppable},dragOverlay:{...tf.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function YF(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const l=R.useRef(!1),{x:s,y:c}=typeof o=="boolean"?{x:o,y:o}:o;$r(()=>{if(!s&&!c||!t){l.current=!1;return}if(l.current||!r)return;const h=t==null?void 0:t.node.current;if(!h||h.isConnected===!1)return;const p=n(h),m=Z2(p,r);if(s||(m.x=0),c||(m.y=0),l.current=!0,Math.abs(m.x)>0||Math.abs(m.y)>0){const v=eE(h);v&&v.scrollBy({top:m.y,left:m.x})}},[t,s,c,r,n])}const Pd=R.createContext({...Br,scaleX:1,scaleY:1});var Ji;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ji||(Ji={}));const mE=R.memo(function(t){var n,r,o,l;let{id:s,accessibility:c,autoScroll:f=!0,children:h,sensors:p=UF,collisionDetection:m=rF,measuring:v,modifiers:S,...C}=t;const N=R.useReducer(HF,void 0,WF),[T,_]=N,[b,E]=qj(),[I,M]=R.useState(Ji.Uninitialized),G=I===Ji.Initialized,{draggable:{active:k,nodes:B,translate:U},droppable:{containers:K}}=T,Z=k?B.get(k):null,he=R.useRef({initial:null,translated:null}),be=R.useMemo(()=>{var dt;return k!=null?{id:k,data:(dt=Z==null?void 0:Z.data)!=null?dt:$F,rect:he}:null},[k,Z]),J=R.useRef(null),[oe,Ne]=R.useState(null),[F,z]=R.useState(null),te=ru(C,Object.values(C)),ne=kd("DndDescribedBy",s),ae=R.useMemo(()=>K.getEnabled(),[K]),pe=KF(v),{droppableRects:Fe,measureDroppableContainers:Ve,measuringScheduled:qe}=OF(ae,{dragging:G,dependencies:[U.x,U.y],config:pe.droppable}),Me=kF(B,k),bt=R.useMemo(()=>F?Gf(F):null,[F]),Mt=Tl(),Gt=PF(Me,pe.draggable.measure);YF({activeNode:k?B.get(k):null,config:Mt.layoutShiftCompensation,initialRect:Gt,measure:pe.draggable.measure});const Ue=Wx(Me,pe.draggable.measure,Gt),er=Wx(Me?Me.parentElement:null),Ge=R.useRef({activatorEvent:null,active:null,activeNode:Me,collisionRect:null,collisions:null,droppableRects:Fe,draggableNodes:B,draggingNode:null,draggingNodeRect:null,droppableContainers:K,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),dn=K.getNodeFor((n=Ge.current.over)==null?void 0:n.id),st=zF({measure:pe.dragOverlay.measure}),Sn=(r=st.nodeRef.current)!=null?r:Me,en=G?(o=st.rect)!=null?o:Ue:null,_n=!!(st.nodeRef.current&&st.rect),No=AF(_n?null:Ue),ko=cE(Sn?bn(Sn):null),tn=DF(G?dn??Me:null),jt=FF(tn),nn=hE(S,{transform:{x:U.x-No.x,y:U.y-No.y,scaleX:1,scaleY:1},activatorEvent:F,active:be,activeNodeRect:Ue,containerNodeRect:er,draggingNodeRect:en,over:Ge.current.over,overlayNodeRect:st.rect,scrollableAncestors:tn,scrollableAncestorRects:jt,windowRect:ko}),jn=bt?ll(bt,U):null,Ro=LF(tn),Sr=Gx(Ro),tr=Gx(Ro,[Ue]),Ft=ll(nn,Sr),rn=en?lF(en,nn):null,En=be&&rn?m({active:be,collisionRect:rn,droppableRects:Fe,droppableContainers:ae,pointerCoordinates:jn}):null,Ii=tF(En,"id"),[St,ri]=R.useState(null),Ai=_n?nn:ll(nn,tr),Di=oF(Ai,(l=St==null?void 0:St.rect)!=null?l:null,Ue),Li=R.useCallback((dt,zt)=>{let{sensor:Ut,options:nr}=zt;if(J.current==null)return;const A=B.get(J.current);if(!A)return;const j=dt.nativeEvent,W=new Ut({active:J.current,activeNode:A,event:j,options:nr,context:Ge,onStart(ee){const ge=J.current;if(ge==null)return;const ce=B.get(ge);if(!ce)return;const{onDragStart:ie}=te.current,ye={active:{id:ge,data:ce.data,rect:he}};Jr.unstable_batchedUpdates(()=>{ie==null||ie(ye),M(Ji.Initializing),_({type:At.DragStart,initialCoordinates:ee,active:ge}),b({type:"onDragStart",event:ye})})},onMove(ee){_({type:At.DragMove,coordinates:ee})},onEnd:X(At.DragEnd),onCancel:X(At.DragCancel)});Jr.unstable_batchedUpdates(()=>{Ne(W),z(dt.nativeEvent)});function X(ee){return async function(){const{active:ce,collisions:ie,over:ye,scrollAdjustedTranslate:Se}=Ge.current;let tt=null;if(ce&&Se){const{cancelDrop:nt}=te.current;tt={activatorEvent:j,active:ce,collisions:ie,delta:Se,over:ye},ee===At.DragEnd&&typeof nt=="function"&&await Promise.resolve(nt(tt))&&(ee=At.DragCancel)}J.current=null,Jr.unstable_batchedUpdates(()=>{_({type:ee}),M(Ji.Uninitialized),ri(null),Ne(null),z(null);const nt=ee===At.DragEnd?"onDragEnd":"onDragCancel";if(tt){const me=te.current[nt];me==null||me(tt),b({type:nt,event:tt})}})}}},[B]),Mi=R.useCallback((dt,zt)=>(Ut,nr)=>{const A=Ut.nativeEvent,j=B.get(nr);if(J.current!==null||!j||A.dndKit||A.defaultPrevented)return;const W={active:j};dt(Ut,zt.options,W)===!0&&(A.dndKit={capturedBy:zt.sensor},J.current=nr,Li(Ut,zt))},[B,Li]),_r=RF(p,Mi);MF(p),$r(()=>{Ue&&I===Ji.Initializing&&M(Ji.Initialized)},[Ue,I]),R.useEffect(()=>{const{onDragMove:dt}=te.current,{active:zt,activatorEvent:Ut,collisions:nr,over:A}=Ge.current;if(!zt||!Ut)return;const j={active:zt,activatorEvent:Ut,collisions:nr,delta:{x:Ft.x,y:Ft.y},over:A};Jr.unstable_batchedUpdates(()=>{dt==null||dt(j),b({type:"onDragMove",event:j})})},[Ft.x,Ft.y]),R.useEffect(()=>{const{active:dt,activatorEvent:zt,collisions:Ut,droppableContainers:nr,scrollAdjustedTranslate:A}=Ge.current;if(!dt||J.current==null||!zt||!A)return;const{onDragOver:j}=te.current,W=nr.get(Ii),X=W&&W.rect.current?{id:W.id,rect:W.rect.current,data:W.data,disabled:W.disabled}:null,ee={active:dt,activatorEvent:zt,collisions:Ut,delta:{x:A.x,y:A.y},over:X};Jr.unstable_batchedUpdates(()=>{ri(X),j==null||j(ee),b({type:"onDragOver",event:ee})})},[Ii]),$r(()=>{Ge.current={activatorEvent:F,active:be,activeNode:Me,collisionRect:rn,collisions:En,droppableRects:Fe,draggableNodes:B,draggingNode:Sn,draggingNodeRect:en,droppableContainers:K,over:St,scrollableAncestors:tn,scrollAdjustedTranslate:Ft},he.current={initial:en,translated:rn}},[be,Me,En,rn,B,Sn,en,Fe,K,St,tn,Ft]),EF({...Mt,delta:U,draggingRect:rn,pointerCoordinates:jn,scrollableAncestors:tn,scrollableAncestorRects:jt});const ga=R.useMemo(()=>({active:be,activeNode:Me,activeNodeRect:Ue,activatorEvent:F,collisions:En,containerNodeRect:er,dragOverlay:st,draggableNodes:B,droppableContainers:K,droppableRects:Fe,over:St,measureDroppableContainers:Ve,scrollableAncestors:tn,scrollableAncestorRects:jt,measuringConfiguration:pe,measuringScheduled:qe,windowRect:ko}),[be,Me,Ue,F,En,er,st,B,K,Fe,St,Ve,tn,jt,pe,qe,ko]),Oo=R.useMemo(()=>({activatorEvent:F,activators:_r,active:be,activeNodeRect:Ue,ariaDescribedById:{draggable:ne},dispatch:_,draggableNodes:B,over:St,measureDroppableContainers:Ve}),[F,_r,be,Ue,_,ne,B,St,Ve]);return Qe.createElement(K2.Provider,{value:E},Qe.createElement(wu.Provider,{value:Oo},Qe.createElement(pE.Provider,{value:ga},Qe.createElement(Pd.Provider,{value:Di},h)),Qe.createElement(GF,{disabled:(c==null?void 0:c.restoreFocus)===!1})),Qe.createElement(Zj,{...c,hiddenTextDescribedById:ne}));function Tl(){const dt=(oe==null?void 0:oe.autoScrollEnabled)===!1,zt=typeof f=="object"?f.enabled===!1:f===!1,Ut=G&&!dt&&!zt;return typeof f=="object"?{...f,enabled:Ut}:{enabled:Ut}}}),VF=R.createContext(null),Kx="button",qF="Droppable";function XF(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const l=kd(qF),{activators:s,activatorEvent:c,active:f,activeNodeRect:h,ariaDescribedById:p,draggableNodes:m,over:v}=R.useContext(wu),{role:S=Kx,roleDescription:C="draggable",tabIndex:N=0}=o??{},T=(f==null?void 0:f.id)===t,_=R.useContext(T?Pd:VF),[b,E]=Bf(),[I,M]=Bf(),G=jF(s,t),k=ru(n);$r(()=>(m.set(t,{id:t,key:l,node:b,activatorNode:I,data:k}),()=>{const U=m.get(t);U&&U.key===l&&m.delete(t)}),[m,t]);const B=R.useMemo(()=>({role:S,tabIndex:N,"aria-disabled":r,"aria-pressed":T&&S===Kx?!0:void 0,"aria-roledescription":C,"aria-describedby":p.draggable}),[r,S,N,T,C,p.draggable]);return{active:f,activatorEvent:c,activeNodeRect:h,attributes:B,isDragging:T,listeners:r?void 0:G,node:b,over:v,setNodeRef:E,setActivatorNodeRef:M,transform:_}}function QF(){return R.useContext(pE)}const ZF="Droppable",JF={timeout:25};function Td(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const l=kd(ZF),{active:s,dispatch:c,over:f,measureDroppableContainers:h}=R.useContext(wu),p=R.useRef({disabled:n}),m=R.useRef(!1),v=R.useRef(null),S=R.useRef(null),{disabled:C,updateMeasurementsFor:N,timeout:T}={...JF,...o},_=ru(N??r),b=R.useCallback(()=>{if(!m.current){m.current=!0;return}S.current!=null&&clearTimeout(S.current),S.current=setTimeout(()=>{h(Array.isArray(_.current)?_.current:[_.current]),S.current=null},T)},[T]),E=Od({callback:b,disabled:C||!s}),I=R.useCallback((B,U)=>{E&&(U&&(E.unobserve(U),m.current=!1),B&&E.observe(B))},[E]),[M,G]=Bf(I),k=ru(t);return R.useEffect(()=>{!E||!M.current||(E.disconnect(),m.current=!1,E.observe(M.current))},[M,E]),$r(()=>(c({type:At.RegisterDroppable,element:{id:r,key:l,disabled:n,node:M,rect:v,data:k}}),()=>c({type:At.UnregisterDroppable,key:l,id:r})),[r]),R.useEffect(()=>{n!==p.current.disabled&&(c({type:At.SetDroppableDisabled,id:r,key:l,disabled:n}),p.current.disabled=n)},[r,l,n,c]),{active:s,rect:v,isOver:(f==null?void 0:f.id)===r,node:M,over:f,setNodeRef:G}}function e6(e){let{animation:t,children:n}=e;const[r,o]=R.useState(null),[l,s]=R.useState(null),c=Wf(n);return!n&&!r&&c&&o(c),$r(()=>{if(!l)return;const f=r==null?void 0:r.key,h=r==null?void 0:r.props.id;if(f==null||h==null){o(null);return}Promise.resolve(t(h,l)).then(()=>{o(null)})},[t,r,l]),Qe.createElement(Qe.Fragment,null,n,r?R.cloneElement(r,{ref:s}):null)}const t6={x:0,y:0,scaleX:1,scaleY:1};function n6(e){let{children:t}=e;return Qe.createElement(wu.Provider,{value:dE},Qe.createElement(Pd.Provider,{value:t6},t))}const r6={position:"fixed",touchAction:"none"},i6=e=>Rd(e)?"transform 250ms ease":void 0,o6=R.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:l,className:s,rect:c,style:f,transform:h,transition:p=i6}=e;if(!c)return null;const m=o?h:{...h,scaleX:1,scaleY:1},v={...r6,width:c.width,height:c.height,top:c.top,left:c.left,transform:Ri.Transform.toString(m),transformOrigin:o&&r?Jj(r,c):void 0,transition:typeof p=="function"?p(r):p,...f};return Qe.createElement(n,{className:s,style:v,ref:t},l)}),a6=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:l,className:s}=e;if(l!=null&&l.active)for(const[c,f]of Object.entries(l.active))f!==void 0&&(o[c]=n.node.style.getPropertyValue(c),n.node.style.setProperty(c,f));if(l!=null&&l.dragOverlay)for(const[c,f]of Object.entries(l.dragOverlay))f!==void 0&&r.node.style.setProperty(c,f);return s!=null&&s.active&&n.node.classList.add(s.active),s!=null&&s.dragOverlay&&r.node.classList.add(s.dragOverlay),function(){for(const[f,h]of Object.entries(o))n.node.style.setProperty(f,h);s!=null&&s.active&&n.node.classList.remove(s.active)}},l6=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Ri.Transform.toString(t)},{transform:Ri.Transform.toString(n)}]},s6={duration:250,easing:"ease",keyframes:l6,sideEffects:a6({styles:{active:{opacity:"0"}}})};function u6(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return Nd((l,s)=>{if(t===null)return;const c=n.get(l);if(!c)return;const f=c.node.current;if(!f)return;const h=fE(s);if(!h)return;const{transform:p}=bn(s).getComputedStyle(s),m=J2(p);if(!m)return;const v=typeof t=="function"?t:c6(t);return aE(f,o.draggable.measure),v({active:{id:l,data:c.data,node:f,rect:o.draggable.measure(f)},draggableNodes:n,dragOverlay:{node:s,rect:o.dragOverlay.measure(h)},droppableContainers:r,measuringConfiguration:o,transform:m})})}function c6(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...s6,...e};return l=>{let{active:s,dragOverlay:c,transform:f,...h}=l;if(!t)return;const p={x:c.rect.left-s.rect.left,y:c.rect.top-s.rect.top},m={scaleX:f.scaleX!==1?s.rect.width*f.scaleX/c.rect.width:1,scaleY:f.scaleY!==1?s.rect.height*f.scaleY/c.rect.height:1},v={x:f.x-p.x,y:f.y-p.y,...m},S=o({...h,active:s,dragOverlay:c,transform:{initial:f,final:v}}),[C]=S,N=S[S.length-1];if(JSON.stringify(C)===JSON.stringify(N))return;const T=r==null?void 0:r({active:s,dragOverlay:c,...h}),_=c.node.animate(S,{duration:t,easing:n,fill:"forwards"});return new Promise(b=>{_.onfinish=()=>{T==null||T(),b()}})}}let Yx=0;function f6(e){return R.useMemo(()=>{if(e!=null)return Yx++,Yx},[e])}const ov=Qe.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:o,transition:l,modifiers:s,wrapperElement:c="div",className:f,zIndex:h=999}=e;const{activatorEvent:p,active:m,activeNodeRect:v,containerNodeRect:S,draggableNodes:C,droppableContainers:N,dragOverlay:T,over:_,measuringConfiguration:b,scrollableAncestors:E,scrollableAncestorRects:I,windowRect:M}=QF(),G=R.useContext(Pd),k=f6(m==null?void 0:m.id),B=hE(s,{activatorEvent:p,active:m,activeNodeRect:v,containerNodeRect:S,draggingNodeRect:T.rect,over:_,overlayNodeRect:T.rect,scrollableAncestors:E,scrollableAncestorRects:I,transform:G,windowRect:M}),U=zg(v),K=u6({config:r,draggableNodes:C,droppableContainers:N,measuringConfiguration:b}),Z=U?T.setRef:void 0;return Qe.createElement(n6,null,Qe.createElement(e6,{animation:K},m&&k?Qe.createElement(o6,{key:k,id:m.id,ref:Z,as:c,activatorEvent:p,adjustScale:t,className:f,transition:l,rect:U,style:{zIndex:h,...o},transform:B},n):null))});function vE(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}const d6=e=>{let{draggingNodeRect:t,transform:n,scrollableAncestorRects:r}=e;const o=r[0];return!t||!o?n:vE(n,t,o)},p6=e=>{let{transform:t,draggingNodeRect:n,windowRect:r}=e;return!n||!r?t:vE(t,n,r)};function gE(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function zc(e){return e!==null&&e>=0}const h6=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const l=gE(t,r,n),s=t[o],c=l[o];return!c||!s?null:{x:c.left-s.left,y:c.top-s.top,scaleX:c.width/s.width,scaleY:c.height/s.height}},m6="Sortable",v6=Qe.createContext({activeIndex:-1,containerId:m6,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:h6,disabled:{draggable:!1,droppable:!1}}),g6=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return gE(n,r,o).indexOf(t)},y6=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:l,newIndex:s,previousItems:c,previousContainerId:f,transition:h}=e;return!h||!r||c!==l&&o===s?!1:n?!0:s!==o&&t===f},w6={duration:200,easing:"ease"},yE="transform",x6=Ri.Transition.toString({property:yE,duration:0,easing:"linear"}),b6={roleDescription:"sortable"};function S6(e){let{disabled:t,index:n,node:r,rect:o}=e;const[l,s]=R.useState(null),c=R.useRef(n);return $r(()=>{if(!t&&n!==c.current&&r.current){const f=o.current;if(f){const h=Pl(r.current,{ignoreTransform:!0}),p={x:f.left-h.left,y:f.top-h.top,scaleX:f.width/h.width,scaleY:f.height/h.height};(p.x||p.y)&&s(p)}}n!==c.current&&(c.current=n)},[t,n,r,o]),R.useEffect(()=>{l&&s(null)},[l]),l}function wE(e){let{animateLayoutChanges:t=y6,attributes:n,disabled:r,data:o,getNewIndex:l=g6,id:s,strategy:c,resizeObserverConfig:f,transition:h=w6}=e;const{items:p,containerId:m,activeIndex:v,disabled:S,disableTransforms:C,sortedRects:N,overIndex:T,useDragOverlay:_,strategy:b}=R.useContext(v6),E=_6(r,S),I=p.indexOf(s),M=R.useMemo(()=>({sortable:{containerId:m,index:I,items:p},...o}),[m,o,I,p]),G=R.useMemo(()=>p.slice(p.indexOf(s)),[p,s]),{rect:k,node:B,isOver:U,setNodeRef:K}=Td({id:s,data:M,disabled:E.droppable,resizeObserverConfig:{updateMeasurementsFor:G,...f}}),{active:Z,activatorEvent:he,activeNodeRect:be,attributes:J,setNodeRef:oe,listeners:Ne,isDragging:F,over:z,setActivatorNodeRef:te,transform:ne}=XF({id:s,data:M,attributes:{...b6,...n},disabled:E.draggable}),ae=zj(K,oe),pe=!!Z,Fe=pe&&!C&&zc(v)&&zc(T),Ve=!_&&F,qe=Ve&&Fe?ne:null,bt=Fe?qe??(c??b)({rects:N,activeNodeRect:be,activeIndex:v,overIndex:T,index:I}):null,Mt=zc(v)&&zc(T)?l({id:s,items:p,activeIndex:v,overIndex:T}):I,Gt=Z==null?void 0:Z.id,Ue=R.useRef({activeId:Gt,items:p,newIndex:Mt,containerId:m}),er=p!==Ue.current.items,Ge=t({active:Z,containerId:m,isDragging:F,isSorting:pe,id:s,index:I,items:p,newIndex:Ue.current.newIndex,previousItems:Ue.current.items,previousContainerId:Ue.current.containerId,transition:h,wasDragging:Ue.current.activeId!=null}),dn=S6({disabled:!Ge,index:I,node:B,rect:k});return R.useEffect(()=>{pe&&Ue.current.newIndex!==Mt&&(Ue.current.newIndex=Mt),m!==Ue.current.containerId&&(Ue.current.containerId=m),p!==Ue.current.items&&(Ue.current.items=p)},[pe,Mt,m,p]),R.useEffect(()=>{if(Gt===Ue.current.activeId)return;if(Gt&&!Ue.current.activeId){Ue.current.activeId=Gt;return}const Sn=setTimeout(()=>{Ue.current.activeId=Gt},50);return()=>clearTimeout(Sn)},[Gt]),{active:Z,activeIndex:v,attributes:J,data:M,rect:k,index:I,newIndex:Mt,items:p,isOver:U,isSorting:pe,isDragging:F,listeners:Ne,node:B,overIndex:T,over:z,setNodeRef:ae,setActivatorNodeRef:te,setDroppableNodeRef:K,setDraggableNodeRef:oe,transform:dn??bt,transition:st()};function st(){if(dn||er&&Ue.current.newIndex===I)return x6;if(!(Ve&&!Rd(he)||!h)&&(pe||Ge))return Ri.Transition.toString({...h,property:yE})}}function _6(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}We.Down,We.Right,We.Up,We.Left;function Id({groupName:e,item:t,allowRemove:n,onRemove:r}){const{attributes:o,listeners:l,setNodeRef:s,transform:c,transition:f}=wE({id:`${e}_${t.itemName}`,data:{type:"Ingredient",item:t,parentGroup:e}}),h={transition:f,transform:Ri.Translate.toString(c)};return x.jsxs("div",{ref:s,className:"relative print-rounded aspect-square w-clamp card-shadow center",style:h,...l,...o,children:[x.jsx("img",{src:`${Mn}/assets/ingredients/${t.itemName.toLowerCase()}.webp`,alt:t.itemName,"data-testid":`${e}_${t.itemName}_selected`,className:"print-rounded"}),n&&x.jsx("div",{className:"flex center rounded-2xl",children:x.jsx(Ln,{icon:wd,size:"sm",onClick:()=>r==null?void 0:r(),className:"absolute pointer-events-auto top-0 right-0 -m-2 cursor-pointer text-white bg-black bg-opacity-80 rounded-full px-1 py-1"})})]},`${e}_${t.itemName}`)}function E6({group:e,item:t}){const n=wn(),r=(o,l)=>{n(Q_({groupName:o,itemName:l}))};return x.jsx("div",{children:x.jsx("div",{className:"mx-2 hover:cursor-grabbing hover:scale-105",children:x.jsx(Id,{groupName:e.groupName,item:t,allowRemove:!0,onRemove:()=>r(e.groupName,t.itemName)})})})}function C6({group:e}){const{setNodeRef:t}=Td({id:e.groupName,data:{type:"Group",group:e}});return x.jsx(x.Fragment,{children:x.jsx("div",{ref:t,className:"flex flex-wrap justify-center gap-y-4 mb-12 center",children:e.items.map((n,r)=>x.jsx("div",{children:x.jsx(E6,{group:e,item:n})},`${n}${r.toString()}`))})})}function N6(){const e=wn();return He(n=>n.groups.ingredientsGroups).map((n,r)=>x.jsxs("div",{className:"flex flex-col center",children:[x.jsx("p",{onKeyDown:Pi,"data-testid":"chosen_group",onClick:()=>e(V_(n.groupName)),className:"group-chip text-fluidSubtitle",children:n.groupName}),x.jsx(C6,{group:n})]},`${n.groupName}_${r}`))}function k6(){const e=wn(),t=He(f=>f.groups.ingredientsGroups),[n,r]=R.useState(null),o=f=>{var h;r((h=f.active.data.current)==null?void 0:h.item)},l=f=>{var C,N,T,_;const{active:h,over:p}=f;if(!p)return;const m=((C=h.data.current)==null?void 0:C.type)==="Ingredient",v=((N=p.data.current)==null?void 0:N.type)==="Group",S=(T=h.data.current)==null?void 0:T.parentGroup;if(m&&v&&S!==p.id){const b=h.id.split("_")[1];if(t.filter(I=>I.groupName===p.id)[0].items.findIndex(I=>I.itemName===b)>-1)return;e(Q_({groupName:S,itemName:b})),e(Lm({groupName:p.id,itemName:b,item:(_=h.data.current)==null?void 0:_.item}))}r(null)},s=f=>{const h=Q2(f);return h.length>0?h.sort((m,v)=>{const S=f.droppableRects.get(m.id),C=f.droppableRects.get(v.id);if(S&&C){const N=S.width*S.height;return C.width*C.height-N}return 0}):X2(f)},c=Y2(Yf(jg,{activationConstraint:{distance:5}}),Yf(Fg,{activationConstraint:{distance:4}}));return x.jsxs(mE,{collisionDetection:s,modifiers:[d6],sensors:c,onDragEnd:l,onDragStart:o,children:[x.jsxs("div",{className:"relative px-4 pb-4 overflow-auto center text-center no-scrollbar overflow-x-hidden",children:[x.jsx("h2",{className:"mb-8 text-fluidSubtitle",children:"Selected ingredient groups"}),x.jsx(N6,{})]}),n&&x.jsx(ov,{children:x.jsx(Id,{groupName:`${n.itemName}_${Math.random().toString()}`,item:n,allowRemove:!1})})]})}function R6(){const e=He(t=>t.groups.ingredientsGroups);return x.jsxs("div",{"data-testid":"homepage",className:"max-h-screen flex flex-col",children:[x.jsx(ua,{page:"/quantities",isNext:!0}),x.jsx(EL,{}),x.jsxs("div",{className:"flex flex-grow md:p-2 lg:p-2 sm:gap-4 md:gap-4 lg:gap-8 mx-4",children:[x.jsx("div",{className:"main-gallery sm:w-2/3 md:w-4/5 lg:w-3/5",children:x.jsx(Fj,{})}),x.jsx("div",{className:`main-gallery sm:w-1/3 w-2/5 ${e.length===0&&"required-element-border"}`,children:x.jsx(k6,{})})]})]})}function O6(){const e=wn(),t=He(r=>r.actions.availableItems),n=r=>{e(hg(r))};return t.map((r,o)=>x.jsx("div",{"data-item-name":r.itemName,className:"mb-1 pb-2 lg:pb-4 print-rounded opacity-100 hover:scale-105",onKeyDown:Pi,children:x.jsx(Id,{groupName:o.toString(),item:r,allowRemove:!1,onRemove:()=>n(r)})},`${r.itemName}_shelf_${o}`))}function xE({action:e}){const{attributes:t,listeners:n,setNodeRef:r,transform:o,transition:l}=wE({id:e.actionName,data:{type:"Action",action:e}}),s={transition:l,transform:Ri.Translate.toString(o)},{actionName:c}=e;return x.jsx("div",{ref:r,style:s,...n,...t,children:x.jsxs("div",{className:"bg-white card-shadow print-rounded w-clamp",children:[x.jsx("img",{draggable:"false",src:`${Mn}/assets/chefActions/${c}.webp`,alt:c,"data-testid":`${c}_action`,className:"print-rounded-img rounded-t-lg w-clamp"}),x.jsx("p",{className:"text-fluidPrint py-2",children:c})]},c)})}function P6(){return pL.map(e=>x.jsx(R.Suspense,{fallback:x.jsx("div",{className:"suspense-gallery-action","data-testid":`${e.actionName}_suspense`,children:""}),children:x.jsx("div",{className:"bg-white mx-2 aspect-videoThin hover:scale-105",children:x.jsx(xE,{action:e})})},`${e.actionName}_suspense`))}function Vx({icon:e,onCaretClick:t}){return x.jsx("div",{className:"flex center max-h-short cursor-pointer hover:border-y-2 hover:border-black",onClick:()=>t(),onKeyDown:Pi,children:x.jsx(Ln,{icon:e,size:"lg"})})}function T6({instruction:e}){const t=R.useRef(null),n=wn(),[r,o]=R.useState(e.note),[l,s]=R.useState(null),c=v=>{r?n(kc({id:e.id,note:v})):(s(null),n(kc({id:e.id,note:""})))},f=()=>{s(null),o(""),n(kc({id:e.id,note:""}))},h=v=>{o(v.target.value)},p=l===e.id;R.useEffect(()=>{p&&t.current&&t.current.focus()},[p]);const m=(v,S)=>{if(v.key==="Enter"){const{id:C,note:N}=S;n(kc({id:C,note:N})),v.target.blur()}};return p||e.note?x.jsxs("div",{className:"flex justify-end items-center md:w-60 lg:w-96",children:[x.jsx("input",{type:"text",ref:t,className:"input-border w-full text-fluidSubtitle text-center md:-m-2 lg:-m-4 text-ellipsis whitespace-nowrap overflow-hidden sm:p-0 md:p-1",placeholder:"Add a note to this instruction",value:r,onChange:h,onBlur:v=>c(v.target.value),onKeyDown:v=>m(v,e)}),x.jsx(Ln,{icon:wd,size:"1x",className:"bg-white -ml-2 cursor-pointer",onClick:()=>f()})]}):x.jsx("button",{type:"button",className:"sexy-button md:px-1 lg:px-3 md:py-1 lg:py-2 -m-4 min-w-16 card-shadow border border-transparent bg-yellow-100 text-neutral-800 font-semibold rounded-lg text-xs hover:bg-white hover:border-2 hover:border-yellow-200",onClick:()=>s(e.id),children:x.jsx("span",{children:"Add Note"})})}function I6({instruction:e}){const t=wn(),[n,r]=R.useState(e.action.time),o=f=>{f.target.select()},l=f=>{Number.isNaN(f)?r(0):r(f)},s=()=>{n>0&&r(f=>f-1)},c=()=>{r(f=>f+1)};return R.useEffect(()=>{t(sL({instruction:e,time:n}))},[t,e,n]),x.jsxs("div",{className:"flex flex-row rounded-md mx-2",children:[x.jsx("button",{type:"button",onClick:s,children:x.jsx(Ln,{icon:t2,className:"num-input-icons"})}),x.jsx("input",{className:`sm:w-8 md:w-8 lg:w-16 p-0 md:mx-2 lg:mx-4 focus:outline-none text-center rounded-2xl sm:text-2xl md:text-3xl lg:text-4xl bg-transparent ${n===0&&"required-element-fill"}`,type:"number",id:"units-number-input",value:n,required:!0,onChange:f=>l(Number.parseFloat(f.target.value)),onFocus:o,onWheel:f=>f.target.blur()}),x.jsx("button",{type:"button",onClick:c,children:x.jsx(Ln,{icon:n2,className:"num-input-icons"})})]})}function A6({action:e}){const{actionName:t}=e;return x.jsxs("div",{className:"bg-white card-shadow print-rounded w-clamp",children:[x.jsx("img",{draggable:"false",src:`${Mn}/assets/chefActions/${t}.webp`,alt:t,"data-testid":`${t}_action`,className:"print-rounded-img md:w-clampSmall lg:w-clamp"}),x.jsx("p",{className:"text-fluidCard py-2",children:t})]},t)}function D6({groupName:e,item:t,onRemoveItem:n}){const r=()=>{n(t)};return x.jsxs("div",{className:"relative print-rounded aspect-square print-image card-shadow center",children:[x.jsx("img",{draggable:"false",src:`${Mn}/assets/ingredients/${t.itemName.toLowerCase()}.webp`,alt:t.itemName,"data-testid":`${e}_${t.itemName}_shelf`,className:"print-rounded print-image"}),x.jsx("div",{className:"flex center rounded-2xl",children:x.jsx(Ln,{icon:wd,size:"sm",onClick:r,className:"absolute pointer-events-auto top-0 right-0 -m-2 cursor-pointer text-white bg-black bg-opacity-80 rounded-full px-1 py-1"})})]},`${e}_${t.itemName}`)}function L6({instruction:e,refClick:t}){const[n,r]=R.useState(""),{setNodeRef:o}=Td({id:e.id,data:{type:"Instruction",instruction:e}}),l=wn(),s=(C,N)=>{const T=N.items.filter(_=>!Go.isEqual(_,C));l(G_({id:N.id,items:T})),l(hg(C))},c=C=>{l(lL(C)),l(fL(C.items))},f=(C,N)=>{l(oL({id:N.id,customItem:C.target.value})),C.target.blur()},h=C=>{r(C.target.value)},p=C=>{C.key===" "&&(C.preventDefault(),r(N=>`${N} `))},{id:m,action:v,items:S}=e;return x.jsxs("div",{ref:o,className:"z-50 flex flex-col mb-12 border-l-2 border-r-2 border-l-neutral-400 border-r-neutral-400 rounded-3xl lg:scale-90",children:[x.jsxs("div",{className:"flex items-center justify-between pl-6",children:[x.jsxs("div",{className:"flex justify-start w-full py-2",children:[x.jsxs("div",{draggable:"false",className:"flex center",onClick:()=>{t(e)},onKeyDown:Pi,children:[x.jsx(A6,{action:v}),x.jsx("span",{className:"md:text-xs text-fluidSubtitle ml-4",children:"THE"}),x.jsx("div",{className:"flex flex-row",children:x.jsx("div",{className:"center sm:w-36 md:w-44 lg:w-52 xl:w-56 flex flex-row flex-wrap",children:!n&&S.length>0?S.map(C=>x.jsx("div",{className:"px-2 py-2",children:x.jsx(D6,{groupName:m.toString(),item:C,onRemoveItem:N=>s(N,e)})},`${m}_${C.itemName}`)):x.jsxs("div",{className:"flex flex-col justify-between items-center sm:min-h-16 md:min-h-24",children:[x.jsx("span",{className:"text-fluidPrint",children:n?x.jsxs("b",{className:"text-neutral-400",children:["Drop Item ",x.jsx("br",{})," or"]}):x.jsxs("b",{children:["Drop Item ",x.jsx("br",{})," or"]})},m),x.jsx("input",{type:"text",className:"input-border sm:w-24 md:w-36 text-sm text-center text-ellipsis whitespace-nowrap overflow-hidden p-1",placeholder:"Custom text",value:n,onChange:C=>h(C),onKeyDown:p,onBlur:C=>f(C,e)})]})})})]}),v.time!==-1&&x.jsxs("div",{className:"flex center",children:[x.jsx("span",{className:"text-fluidSubtitle mx-2",children:"FOR"}),x.jsx(I6,{instruction:e}),x.jsx("span",{className:"text-fluidSubtitle md:ml-2 lg:ml-4",children:v.unit})]})]}),x.jsx("button",{type:"button",className:"px-4 md:ml-2 lg:ml-8 h-fit",onClick:()=>c(e),children:x.jsx(Ln,{icon:RL,size:"lg",color:"red",className:"cursor-pointer hover:text-black"})})]}),x.jsx("div",{className:"flex center sm:mt-4 md:mt-6",children:x.jsx(T6,{instruction:e})})]},`${m}_${v}`)}const M6=R.memo(({onRefClick:e})=>[...He(r=>r.actions.chefInstructions)].sort((r,o)=>r.id-o.id).map(r=>x.jsx("div",{"data-instruction":r.id,className:"pt-4",children:x.jsx(L6,{instruction:r,refClick:o=>e(o)})},r.id)));function j6({onInstructionClick:e}){const{setNodeRef:t}=Td({id:"steps_container",data:{type:"Steps"}}),n=He(s=>s.actions.chefInstructions),r=R.useRef(null),o=R.useRef(n.length),l=R.useCallback(()=>{const s=r.current;if(n.length===0)return;const c=n[n.length-1],f=s==null?void 0:s.querySelector(`[data-instruction="${c.id}"]`);f&&f.scrollIntoView({behavior:"smooth",inline:"center"})},[n]);return R.useEffect(()=>{n.length!==o.current&&(l(),o.current=n.length)},[n,l]),x.jsxs("div",{ref:s=>{t(s),r.current=s},className:`flex flex-col bg-slate-50 w-full md:ml-4 lg:ml-8 mb-1 max-h-semi overflow-scroll no-scrollbar ${n.length===0?"justify-center items-center":"justify-start items-center pt-2"} lg:overflow-x-auto`,children:[n.length===0&&x.jsxs("h2",{className:"text-fluidSubtitle text-gray-600",children:["Drag an action ",x.jsx("b",{children:"[ top ]"})," to this area ",x.jsx("br",{}),"and start adding ingredients ",x.jsx("b",{children:"[left ]"})," to it!",x.jsx("br",{}),x.jsx("br",{}),"To add more steps just",x.jsx("br",{}),"drag another action.",x.jsx("br",{}),x.jsx("br",{}),x.jsx("b",{children:"Replace an action by dragging a new one over it!"})]}),x.jsx(M6,{onRefClick:s=>e(s)})]})}function F6(){const e=R.useRef(null),t=R.useRef(null),[n,r]=R.useState(!1),[o,l]=R.useState(0),[s,c]=R.useState(0),[f,h]=R.useState(null),[p,m]=R.useState(null),[v,S]=R.useState(null),C=wn(),N=He(U=>U.actions.chefInstructions);R.useEffect(()=>{if(v){const U=v.current,K=Z=>{U&&(Z.preventDefault(),Z.deltaY<0?U.scrollLeft-=20:U.scrollLeft+=20)};return U&&U.addEventListener("wheel",K,{passive:!1}),()=>{U&&U.removeEventListener("wheel",K)}}},[v]);const T=U=>{if(v!=null&&v.current){const Z=v.current.firstChild.offsetWidth*4;v.current.scrollBy({left:U==="left"?-Z:Z,behavior:"smooth"})}},_=(U,K)=>{U.current&&(S(U),U.current&&(r(!0),l(K.pageX-U.current.offsetLeft),c(U.current.scrollLeft)))},b=(U,K)=>{if(!(!n||!U.current)&&(S(U),K.preventDefault(),U.current)){const he=K.pageX-U.current.offsetLeft-o;U.current.scrollLeft=s-he}},E=U=>{const K=e.current;let Z=null;Z=K==null?void 0:K.querySelector(`[data-action-name="${U.action.actionName}"]`),Z&&Z.scrollIntoView({behavior:"smooth",inline:"center"})},I=U=>{C(aL({id:N.length>0?Math.max(...N.map(K=>K.id))+1:0,note:"",action:U,items:[]}))},M=U=>{var K,Z,he,be;((K=U.active.data.current)==null?void 0:K.type)==="Action"?h((Z=U.active.data.current)==null?void 0:Z.action):h(null),((he=U.active.data.current)==null?void 0:he.type)==="Ingredient"?m((be=U.active.data.current)==null?void 0:be.item):m(null)},G=U=>{var J,oe,Ne,F,z,te;const{active:K,over:Z}=U;if(!Z)return;const he=(J=K.data.current)==null?void 0:J.type,be=(oe=Z.data.current)==null?void 0:oe.type;if(he==="Action"&&be==="Steps")I((Ne=K.data.current)==null?void 0:Ne.action);else if(be==="Instruction"){const ne=(F=Z.data.current)==null?void 0:F.instruction;if(he==="Action"){const ae=(z=K.data.current)==null?void 0:z.action;C(uL({id:ne.id,action:ae}))}else if(he==="Ingredient"){const ae=(te=K.data.current)==null?void 0:te.item;ne.items.find(Fe=>Go.isEqual(Fe,ae))||(C(G_({id:ne.id,items:[...ne.items,ae]})),C(hg(ae)))}}},k=U=>{const K=Q2(U);return K.length>0?K.sort((he,be)=>{const J=U.droppableRects.get(he.id),oe=U.droppableRects.get(be.id);if(J&&oe){const Ne=J.width*J.height,F=oe.width*oe.height;return Ne-F}return 0}):X2(U)},B=Y2(Yf(jg,{activationConstraint:{distance:0}}),Yf(Fg,{activationConstraint:{distance:10}}));return x.jsx(mE,{collisionDetection:k,modifiers:[p6],sensors:B,onDragEnd:G,onDragStart:M,children:x.jsxs("div",{className:"mt-16 max-h-5/6 w-11/12 input-gallery-border p-4",children:[x.jsx("h2",{className:"text-fluidSubtitle mb-2",children:"Plan the instructions and steps for this recipe!"}),x.jsxs("div",{className:"flex flex-row gap-2",children:[x.jsx(Vx,{icon:AL,onCaretClick:()=>T("left")}),x.jsx("div",{id:"actions-scrollbar",className:"flex w-full overflow-x-scroll py-4 pt-4 overflow-y-auto",ref:e,onMouseDown:U=>_(e,U),onMouseLeave:()=>r(!1),onMouseUp:()=>r(!1),onMouseMove:U=>b(e,U),children:x.jsx(P6,{})}),x.jsx(Vx,{icon:OL,onCaretClick:()=>T("right")}),f&&x.jsx(ov,{children:x.jsx(xE,{action:f})})]}),x.jsxs("div",{className:"flex w-full justify-between mt-8",children:[x.jsx("div",{ref:t,className:"flex flex-col min-w-fit sm:p-2 md:p-4 sm:mr-4 md:mr-2 max-h-half overflow-y-scroll scroll-normal",children:x.jsx("div",{className:"scroll-mirror",children:x.jsx(O6,{})})}),p&&x.jsx(ov,{children:x.jsx(Id,{groupName:Math.random().toString(),item:p,allowRemove:!1})}),x.jsx(j6,{onInstructionClick:U=>E(U)})]})]})})}function z6(){const e=He(l=>l.warning.warning),t=He(l=>l.groups.ingredientsGroups),n=He(l=>l.actions.chefInstructions);let r="/print";return(t.flatMap(l=>l.items).length>18||n.length>3)&&(r="/doublePrint"),x.jsxs("div",{"data-testid":"instructions",className:"min-h-screen flex flex-col",children:[x.jsx(ua,{page:r,isNext:!0}),x.jsx(ua,{page:"/quantities",isNext:!1}),x.jsx("div",{className:"flex h-screen justify-center text-center",children:x.jsx(F6,{})}),e&&x.jsx(mg,{})]})}function U6(){return He(t=>t.groups.ingredientsGroups).map(t=>x.jsxs("div",{className:"flex flex-row center md:gap-x-3 lg:gap-x-4 mb-2",children:[x.jsx("p",{className:"text-fluidSubtitle leading-none md:mr-2 lg:mr-4",children:t.groupName}),t.items.map(n=>x.jsxs("div",{className:"flex flex-col h-fit center md:rounded-md lg:rounded-lg",children:[x.jsx("img",{src:`${Mn}/assets/ingredients/${n.itemName.toLowerCase()}.webp`,alt:n.itemName,className:"card-shadow md:w-tinyImage lg:w-miniImage md:rounded-md lg:rounded-lg"}),x.jsxs("div",{className:"py-2 h-fit",children:[x.jsx("p",{className:"text-fluidPrintTitle leading-tight px-2",children:n.itemName}),x.jsx("p",{className:"text-fluidPrintTitle leading-tight",children:x.jsxs("b",{children:[n.amount,"  ",n.unit]})})]})]},`${t.groupName}_${n.itemName}`))]},t.groupName))}function $6(){return He(t=>t.actions.chefInstructions).map((t,n)=>x.jsxs("div",{className:"flex flex-col md:mb-2 lg:mb-6 md:w-5/6 lg:w-3/5 ",children:[x.jsxs("div",{className:"relative flex flex-row gap-4 pointer-events-none items-center justify-start ",children:[x.jsxs("span",{className:"md:text-xs lg:text-sm min-w-12",children:["Step ",n+1]}),x.jsx("div",{children:x.jsxs("div",{className:"bg-white card-shadow print-rounded w-tinyImage mr-2",children:[x.jsx("img",{draggable:"false",src:`${Mn}/assets/chefActions/${t.action.actionName}.webp`,alt:t.action.actionName,"data-testid":`${t.action.actionName}_action`,className:"print-rounded-img w-tinyImage"}),x.jsx("p",{className:"md:text-xs lg:text-sm py-0.5",children:t.action.actionName})]})}),x.jsx("span",{className:" md:text-xs lg:text-sm",children:"THE"}),t.customItem?x.jsx("b",{className:"md:text-xs lg:text-sm",children:t.customItem}):x.jsx("div",{className:"center justify-start md:w-44 lg:min-w-48 flex flex-row flex-wrap",children:t.items.map(r=>x.jsxs("div",{className:"flex center py-1 px-2",children:[x.jsx("img",{src:`${Mn}/assets/ingredients/${r.itemName.toLowerCase()}.webp`,alt:r.itemName,className:"card-shadow md:w-10 lg:w-12 print-rounded-img"})," "]},`${t.id}_${r.itemName}`))}),t.action.time!==-1&&x.jsxs("span",{className:"-bggreen-300 md:text-xs lg:text-sm min-w-12 md:-ml-4",children:["FOR ",x.jsx("br",{}),t.action.time," ",t.action.unit]})]}),x.jsx("div",{className:"flex w-full left-0",children:x.jsx("span",{className:"md:text-xs lg:text-sm md:pt-0.5 lg:pt-1",children:t.note})})]},`${t.id}`))}function B6(){const e=He(t=>t.recipe.title);return x.jsxs("div",{"data-testid":"resultpage",className:"relative min-h-screen flex flex-col",children:[x.jsx(e2,{}),x.jsx(ua,{page:"/instructions",isNext:!1}),x.jsx("div",{className:"flex flex-col center mt-28 mb-16",children:x.jsxs("div",{id:"a4",className:"relative flex flex-col a4ratio w-2/3 text-center input-border justify-between",children:[x.jsxs("div",{className:"flex flex-col h-fit justify-between items-center",children:[x.jsx("h1",{className:"text-fluidTitle font-shadowsLight md:mt-2 lg:mt-4",children:e}),x.jsx("hr",{className:"w-1/2 border-gray-200 md:mb-2 lg:mb-4"}),x.jsx("h2",{className:"text-fluidSubtitle mb-2",children:"Ingredients:"})]}),x.jsx("div",{className:"grid grid-rows-3 h-2/5",children:x.jsx(U6,{})}),x.jsx("div",{className:"h-fit justify-between items-center",children:x.jsx("h2",{className:"text-fluidSubtitle md:mt-2 lg:mt-8",children:"Steps:"})}),x.jsx("div",{className:"flex flex-col items-center justify-start h-3/5 md:mt-1 lg:mt-2",children:x.jsx($6,{})}),x.jsx("div",{className:"flex flex-col h-fit justify-between items-center pb-2",children:x.jsx("h2",{className:"text-fluidSubtitle sm:mb-1 md:mb-2 lg:mb-4",children:"Enjoy !"})})]})}),x.jsx("div",{className:"fixed bottom-0 right-0 go-to-button-arrow mb-0",children:x.jsx(K_,{})})]})}function qx({identifier:e,units:t}){var c;const n=He(f=>f.groups.ingredientsGroups),r=wn(),o=e.split("_")[0],l=e.split("_")[1],s=(c=n.find(f=>f.groupName===l))==null?void 0:c.items.filter(f=>f.itemName===o)[0];return s&&x.jsx("div",{className:"text-fluidCard",children:t.map(f=>x.jsx("button",{className:`unit-card my-1 md: text-xs lg:text-xl ${s.unit===f?"unit-card-chosen":null}`,type:"button",onClick:()=>r(Z_({groupName:l,itemName:o,unit:f})),children:f},`${e}_${f}`))})}function W6({item:e,groupName:t}){const n=wn(),[r,o]=R.useState(e.amount),l=p=>{p>=0&&o(p)},s=()=>{r>0&&(n(os({groupName:t,itemName:e.itemName,amount:r-1})),o(p=>p-1))},c=()=>{n(os({groupName:t,itemName:e.itemName,amount:r+1})),o(p=>p+1)},f=p=>{Number.isNaN(p)?o(0):p>=0&&o(p),n(os({groupName:t,itemName:e.itemName,amount:p}))},h=p=>{p.key==="Enter"?(f(r),n(os({groupName:t,itemName:e.itemName,amount:r}))):p.key==="Backspace"&&p.target.value.length===1&&(o(0),n(os({groupName:t,itemName:e.itemName,amount:0})))};return x.jsxs("div",{className:"flex flex-row rounded-md sm:mx-2 md:mx-4 lg:mx-6",children:[x.jsx("button",{type:"button",className:"lg:mx-2",onClick:s,children:x.jsx(Ln,{icon:t2,className:"num-input-icons"})}),x.jsx("input",{className:`sm:w-10 md:w-12 lg:w-16 p-0 py-1 focus:outline-none text-center font-roboto rounded-xl ${r===0&&"required-element-fill"}`,type:"number",id:"units-number-input",value:r,required:!0,onChange:p=>l(Number.parseFloat(p.target.value)),onFocus:Zc,onBlur:p=>f(Number.parseFloat(p.target.value)),onKeyDown:h,onWheel:p=>p.target.blur()}),x.jsx("button",{type:"button",className:"lg:mx-2",onClick:c,children:x.jsx(Ln,{icon:n2,className:"num-input-icons"})})]})}function H6({groupName:e,item:t}){const{itemName:n,unit:r}=t;return x.jsx("div",{"data-testid":"ingredientFullItem",className:"flex center",children:x.jsxs("div",{className:"aspect-videoWide flex flex-row h-clampSmall rounded-2xl card-shadow",children:[x.jsx("img",{src:`${Mn}/assets/ingredients/${n.toLowerCase()}.webp`,alt:n,className:"rounded-l-2xl"}),x.jsxs("div",{className:"flex flex-col center w-1/2 p-2 m-auto lg:gap-1",children:[x.jsx("p",{className:"text-fluidSubtitle",children:n}),x.jsx("hr",{className:"w-full border-gray-400 lg:my-2"}),x.jsx(W6,{item:t,groupName:e}),x.jsx("p",{className:`text-fluidSubtitle rounded-xl px-3 ${r===vl&&"required-element-fill"}`,children:r})]})]},`${e}_${n}`)})}function G6({groupName:e,items:t}){const n=wn(),r=(o,l)=>{n(Z_({groupName:e,itemName:o.itemName,unit:l}))};return x.jsxs("div",{className:"flex flex-col items-start mx-8",children:[x.jsx("p",{className:"group-chip-dead",children:e}),t.map(o=>x.jsxs("div",{className:"flex flex-row center mb-8",children:[x.jsx(H6,{groupName:e,item:o},`${e}_${o.itemName}_${o.amount}_${o.unit}}`),x.jsxs("div",{"data-testid":"unitsButtonsArray",className:"flex flex-col justify-start md:gap-y-2 sm:mx-6 md:mx-12 lg:mx-8",children:[x.jsx(qx,{identifier:`${o.itemName}_${e}_common1`,units:Rc.slice(0,Rc.length/2)}),x.jsx(qx,{identifier:`${o.itemName}_${e}_common2`,units:Rc.slice(Rc.length/2)})]}),x.jsx("form",{children:x.jsx("select",{className:`text-base md:w-20 lg:w-28 input-border rounded-md px-2 py-1 ${Jw.includes(o.unit)?"border-blue-500 border-1 bg-blue-300":null}`,value:o.unit,onChange:l=>r(o,l.target.value),children:Jw.map(l=>x.jsx("option",{value:l,children:l},l))})})]},`${e}_${o.itemName}}`))]})}function K6(){const e=He(t=>t.groups.ingredientsGroups);return x.jsx("div",{className:"flex flex-col justify-center",children:x.jsxs("div",{className:"flex flex-col h-5/6 w-fit input-gallery-border overflow-auto p-4 items-center",children:[x.jsx("h2",{className:"text-fluidSubtitle mb-4",children:"Select the Units and Quantities for each ingredient"}),e.map(t=>x.jsx("div",{className:"sm:mb-2 md:mb-4",children:x.jsx(G6,{groupName:t.groupName,items:t.items},t.groupName)},t.groupName))]})})}function Y6(){const e=He(t=>t.warning.warning);return x.jsxs("div",{"data-testid":"quantities",className:"max-h-screen flex flex-col",children:[x.jsx(ua,{page:"/instructions",isNext:!0}),x.jsx(ua,{page:`/${Mn}`,isNext:!1}),x.jsx("div",{className:"flex h-screen justify-center text-center mt-8",children:x.jsx(K6,{})}),e&&x.jsx(mg,{})]})}const V6=[{path:"/a4recipe/",element:x.jsx(R6,{}),errorElement:x.jsx(J4,{})},{path:"/quantities",element:x.jsx(Y6,{})},{path:"/instructions",element:x.jsx(z6,{})},{path:"/print",element:x.jsx(B6,{})},{path:"/doublePrint",element:x.jsx(_L,{})}],q6=MD({reducer:{recipe:yL,groups:xL,actions:dL,warning:nL}}),X6=F4(V6);Ih.createRoot(document.getElementById("root")).render(x.jsx(Qe.StrictMode,{children:x.jsx(pI,{store:q6,children:x.jsx(Y4,{router:X6})})}));export{Ln as F,wn as a,Lr as b,Lm as c,J6 as f,Pi as h,x as j,Mn as s,He as u}; + `},Qj={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Zj(e){let{announcements:t=Qj,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Xj}=e;const{announce:l,announcement:s}=Yj(),c=kd("DndLiveRegion"),[f,h]=R.useState(!1);if(R.useEffect(()=>{h(!0)},[]),Vj(R.useMemo(()=>({onDragStart(m){let{active:v}=m;l(t.onDragStart({active:v}))},onDragMove(m){let{active:v,over:S}=m;t.onDragMove&&l(t.onDragMove({active:v,over:S}))},onDragOver(m){let{active:v,over:S}=m;l(t.onDragOver({active:v,over:S}))},onDragEnd(m){let{active:v,over:S}=m;l(t.onDragEnd({active:v,over:S}))},onDragCancel(m){let{active:v,over:S}=m;l(t.onDragCancel({active:v,over:S}))}}),[l,t])),!f)return null;const p=Qe.createElement(Qe.Fragment,null,Qe.createElement(Gj,{id:r,value:o.draggable}),Qe.createElement(Kj,{id:c,announcement:s}));return n?Jr.createPortal(p,n):p}var At;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(At||(At={}));function Kf(){}function Yf(e,t){return R.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Y2(){for(var e=arguments.length,t=new Array(e),n=0;n[...t].filter(r=>r!=null),[...t])}const Br=Object.freeze({x:0,y:0});function V2(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Jj(e,t){const n=Gf(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function q2(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function eF(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function tv(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function tF(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}const X2=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=tv(t),l=[];for(const s of r){const{id:c}=s,f=n.get(c);if(f){const h=tv(f),p=o.reduce((v,S,C)=>v+V2(h[C],S),0),m=Number((p/4).toFixed(4));l.push({id:c,data:{droppableContainer:s,value:m}})}}return l.sort(q2)};function nF(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),l=Math.min(t.top+t.height,e.top+e.height),s=o-r,c=l-n;if(r{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const l of r){const{id:s}=l,c=n.get(s);if(c){const f=nF(c,t);f>0&&o.push({id:s,data:{droppableContainer:l,value:f}})}}return o.sort(eF)};function iF(e,t){const{top:n,left:r,bottom:o,right:l}=t;return n<=e.y&&e.y<=o&&r<=e.x&&e.x<=l}const Q2=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];const o=[];for(const l of t){const{id:s}=l,c=n.get(s);if(c&&iF(r,c)){const h=tv(c).reduce((m,v)=>m+V2(r,v),0),p=Number((h/4).toFixed(4));o.push({id:s,data:{droppableContainer:l,value:p}})}}return o.sort(q2)};function oF(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Z2(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Br}function aF(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),l=1;l({...s,top:s.top+e*c.y,bottom:s.bottom+e*c.y,left:s.left+e*c.x,right:s.right+e*c.x}),{...n})}}const lF=aF(1);function J2(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function sF(e,t,n){const r=J2(t);if(!r)return e;const{scaleX:o,scaleY:l,x:s,y:c}=r,f=e.left-s-(1-o)*parseFloat(n),h=e.top-c-(1-l)*parseFloat(n.slice(n.indexOf(" ")+1)),p=o?e.width/o:e.width,m=l?e.height/l:e.height;return{width:p,height:m,top:h,right:f+p,bottom:h+m,left:f}}const uF={ignoreTransform:!1};function Pl(e,t){t===void 0&&(t=uF);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:h,transformOrigin:p}=bn(e).getComputedStyle(e);h&&(n=sF(n,h,p))}const{top:r,left:o,width:l,height:s,bottom:c,right:f}=n;return{top:r,left:o,width:l,height:s,bottom:c,right:f}}function Fx(e){return Pl(e,{ignoreTransform:!0})}function cF(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function fF(e,t){return t===void 0&&(t=bn(e).getComputedStyle(e)),t.position==="fixed"}function dF(e,t){t===void 0&&(t=bn(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const l=t[o];return typeof l=="string"?n.test(l):!1})}function Dg(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(Ag(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!gu(o)||H2(o)||n.includes(o))return n;const l=bn(e).getComputedStyle(o);return o!==e&&dF(o,l)&&n.push(o),fF(o,l)?n:r(o.parentNode)}return e?r(e):n}function eE(e){const[t]=Dg(e,1);return t??null}function kh(e){return!Cd||!e?null:Rl(e)?e:Ig(e)?Ag(e)||e===Ol(e).scrollingElement?window:gu(e)?e:null:null}function tE(e){return Rl(e)?e.scrollX:e.scrollLeft}function nE(e){return Rl(e)?e.scrollY:e.scrollTop}function nv(e){return{x:tE(e),y:nE(e)}}var Wt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Wt||(Wt={}));function rE(e){return!Cd||!e?!1:e===document.scrollingElement}function iE(e){const t={x:0,y:0},n=rE(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,l=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,c=e.scrollLeft>=r.x;return{isTop:o,isLeft:l,isBottom:s,isRight:c,maxScroll:r,minScroll:t}}const pF={x:.2,y:.2};function hF(e,t,n,r,o){let{top:l,left:s,right:c,bottom:f}=n;r===void 0&&(r=10),o===void 0&&(o=pF);const{isTop:h,isBottom:p,isLeft:m,isRight:v}=iE(e),S={x:0,y:0},C={x:0,y:0},N={height:t.height*o.y,width:t.width*o.x};return!h&&l<=t.top+N.height?(S.y=Wt.Backward,C.y=r*Math.abs((t.top+N.height-l)/N.height)):!p&&f>=t.bottom-N.height&&(S.y=Wt.Forward,C.y=r*Math.abs((t.bottom-N.height-f)/N.height)),!v&&c>=t.right-N.width?(S.x=Wt.Forward,C.x=r*Math.abs((t.right-N.width-c)/N.width)):!m&&s<=t.left+N.width&&(S.x=Wt.Backward,C.x=r*Math.abs((t.left+N.width-s)/N.width)),{direction:S,speed:C}}function mF(e){if(e===document.scrollingElement){const{innerWidth:l,innerHeight:s}=window;return{top:0,left:0,right:l,bottom:s,width:l,height:s}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function oE(e){return e.reduce((t,n)=>ll(t,nv(n)),Br)}function vF(e){return e.reduce((t,n)=>t+tE(n),0)}function gF(e){return e.reduce((t,n)=>t+nE(n),0)}function aE(e,t){if(t===void 0&&(t=Pl),!e)return;const{top:n,left:r,bottom:o,right:l}=t(e);eE(e)&&(o<=0||l<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const yF=[["x",["left","right"],vF],["y",["top","bottom"],gF]];class Lg{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=Dg(n),o=oE(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[l,s,c]of yF)for(const f of s)Object.defineProperty(this,f,{get:()=>{const h=c(r),p=o[l]-h;return this.rect[f]+p},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Ns{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function wF(e){const{EventTarget:t}=bn(e);return e instanceof t?e:Ol(e)}function Rh(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var hr;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(hr||(hr={}));function zx(e){e.preventDefault()}function xF(e){e.stopPropagation()}var We;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(We||(We={}));const lE={start:[We.Space,We.Enter],cancel:[We.Esc],end:[We.Space,We.Enter]},bF=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case We.Right:return{...n,x:n.x+25};case We.Left:return{...n,x:n.x-25};case We.Down:return{...n,y:n.y+25};case We.Up:return{...n,y:n.y-25}}};class sE{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Ns(Ol(n)),this.windowListeners=new Ns(bn(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(hr.Resize,this.handleCancel),this.windowListeners.add(hr.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(hr.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&aE(r),n(Br)}handleKeyDown(t){if(Rd(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:l=lE,coordinateGetter:s=bF,scrollBehavior:c="smooth"}=o,{code:f}=t;if(l.end.includes(f)){this.handleEnd(t);return}if(l.cancel.includes(f)){this.handleCancel(t);return}const{collisionRect:h}=r.current,p=h?{x:h.left,y:h.top}:Br;this.referenceCoordinates||(this.referenceCoordinates=p);const m=s(t,{active:n,context:r.current,currentCoordinates:p});if(m){const v=Hf(m,p),S={x:0,y:0},{scrollableAncestors:C}=r.current;for(const N of C){const T=t.code,{isTop:_,isRight:b,isLeft:E,isBottom:I,maxScroll:M,minScroll:G}=iE(N),k=mF(N),B={x:Math.min(T===We.Right?k.right-k.width/2:k.right,Math.max(T===We.Right?k.left:k.left+k.width/2,m.x)),y:Math.min(T===We.Down?k.bottom-k.height/2:k.bottom,Math.max(T===We.Down?k.top:k.top+k.height/2,m.y))},U=T===We.Right&&!b||T===We.Left&&!E,K=T===We.Down&&!I||T===We.Up&&!_;if(U&&B.x!==m.x){const Z=N.scrollLeft+v.x,he=T===We.Right&&Z<=M.x||T===We.Left&&Z>=G.x;if(he&&!v.y){N.scrollTo({left:Z,behavior:c});return}he?S.x=N.scrollLeft-Z:S.x=T===We.Right?N.scrollLeft-M.x:N.scrollLeft-G.x,S.x&&N.scrollBy({left:-S.x,behavior:c});break}else if(K&&B.y!==m.y){const Z=N.scrollTop+v.y,he=T===We.Down&&Z<=M.y||T===We.Up&&Z>=G.y;if(he&&!v.x){N.scrollTo({top:Z,behavior:c});return}he?S.y=N.scrollTop-Z:S.y=T===We.Down?N.scrollTop-M.y:N.scrollTop-G.y,S.y&&N.scrollBy({top:-S.y,behavior:c});break}}this.handleMove(t,ll(Hf(m,this.referenceCoordinates),S))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}sE.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=lE,onActivation:o}=t,{active:l}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const c=l.activatorNode.current;return c&&e.target!==c?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function Ux(e){return!!(e&&"distance"in e)}function $x(e){return!!(e&&"delay"in e)}class Mg{constructor(t,n,r){var o;r===void 0&&(r=wF(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:l}=t,{target:s}=l;this.props=t,this.events=n,this.document=Ol(s),this.documentListeners=new Ns(this.document),this.listeners=new Ns(r),this.windowListeners=new Ns(bn(s)),this.initialCoordinates=(o=Gf(l))!=null?o:Br,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(hr.Resize,this.handleCancel),this.windowListeners.add(hr.DragStart,zx),this.windowListeners.add(hr.VisibilityChange,this.handleCancel),this.windowListeners.add(hr.ContextMenu,zx),this.documentListeners.add(hr.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if($x(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}if(Ux(n))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(hr.Click,xF,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(hr.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:l}=this,{onMove:s,options:{activationConstraint:c}}=l;if(!o)return;const f=(n=Gf(t))!=null?n:Br,h=Hf(o,f);if(!r&&c){if(Ux(c)){if(c.tolerance!=null&&Rh(h,c.tolerance))return this.handleCancel();if(Rh(h,c.distance))return this.handleStart()}return $x(c)&&Rh(h,c.tolerance)?this.handleCancel():void 0}t.cancelable&&t.preventDefault(),s(f)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===We.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const SF={move:{name:"pointermove"},end:{name:"pointerup"}};class uE extends Mg{constructor(t){const{event:n}=t,r=Ol(n.target);super(t,SF,r)}}uE.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const _F={move:{name:"mousemove"},end:{name:"mouseup"}};var rv;(function(e){e[e.RightClick=2]="RightClick"})(rv||(rv={}));class jg extends Mg{constructor(t){super(t,_F,Ol(t.event.target))}}jg.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===rv.RightClick?!1:(r==null||r({event:n}),!0)}}];const Oh={move:{name:"touchmove"},end:{name:"touchend"}};class Fg extends Mg{constructor(t){super(t,Oh)}static setup(){return window.addEventListener(Oh.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Oh.move.name,t)};function t(){}}}Fg.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var ks;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(ks||(ks={}));var Vf;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Vf||(Vf={}));function EF(e){let{acceleration:t,activator:n=ks.Pointer,canScroll:r,draggingRect:o,enabled:l,interval:s=5,order:c=Vf.TreeOrder,pointerCoordinates:f,scrollableAncestors:h,scrollableAncestorRects:p,delta:m,threshold:v}=e;const S=NF({delta:m,disabled:!l}),[C,N]=Uj(),T=R.useRef({x:0,y:0}),_=R.useRef({x:0,y:0}),b=R.useMemo(()=>{switch(n){case ks.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case ks.DraggableRect:return o}},[n,o,f]),E=R.useRef(null),I=R.useCallback(()=>{const G=E.current;if(!G)return;const k=T.current.x*_.current.x,B=T.current.y*_.current.y;G.scrollBy(k,B)},[]),M=R.useMemo(()=>c===Vf.TreeOrder?[...h].reverse():h,[c,h]);R.useEffect(()=>{if(!l||!h.length||!b){N();return}for(const G of M){if((r==null?void 0:r(G))===!1)continue;const k=h.indexOf(G),B=p[k];if(!B)continue;const{direction:U,speed:K}=hF(G,B,b,t,v);for(const Z of["x","y"])S[Z][U[Z]]||(K[Z]=0,U[Z]=0);if(K.x>0||K.y>0){N(),E.current=G,C(I,s),T.current=K,_.current=U;return}}T.current={x:0,y:0},_.current={x:0,y:0},N()},[t,I,r,N,l,s,JSON.stringify(b),JSON.stringify(S),C,h,M,p,JSON.stringify(v)])}const CF={x:{[Wt.Backward]:!1,[Wt.Forward]:!1},y:{[Wt.Backward]:!1,[Wt.Forward]:!1}};function NF(e){let{delta:t,disabled:n}=e;const r=Wf(t);return yu(o=>{if(n||!r||!o)return CF;const l={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Wt.Backward]:o.x[Wt.Backward]||l.x===-1,[Wt.Forward]:o.x[Wt.Forward]||l.x===1},y:{[Wt.Backward]:o.y[Wt.Backward]||l.y===-1,[Wt.Forward]:o.y[Wt.Forward]||l.y===1}}},[n,t,r])}function kF(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return yu(o=>{var l;return t===null?null:(l=r??o)!=null?l:null},[r,t])}function RF(e,t){return R.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,l=o.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...l]},[]),[e,t])}var iu;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(iu||(iu={}));var iv;(function(e){e.Optimized="optimized"})(iv||(iv={}));const Bx=new Map;function OF(e,t){let{dragging:n,dependencies:r,config:o}=t;const[l,s]=R.useState(null),{frequency:c,measure:f,strategy:h}=o,p=R.useRef(e),m=T(),v=ru(m),S=R.useCallback(function(_){_===void 0&&(_=[]),!v.current&&s(b=>b===null?_:b.concat(_.filter(E=>!b.includes(E))))},[v]),C=R.useRef(null),N=yu(_=>{if(m&&!n)return Bx;if(!_||_===Bx||p.current!==e||l!=null){const b=new Map;for(let E of e){if(!E)continue;if(l&&l.length>0&&!l.includes(E.id)&&E.rect.current){b.set(E.id,E.rect.current);continue}const I=E.node.current,M=I?new Lg(f(I),I):null;E.rect.current=M,M&&b.set(E.id,M)}return b}return _},[e,l,n,m,f]);return R.useEffect(()=>{p.current=e},[e]),R.useEffect(()=>{m||S()},[n,m]),R.useEffect(()=>{l&&l.length>0&&s(null)},[JSON.stringify(l)]),R.useEffect(()=>{m||typeof c!="number"||C.current!==null||(C.current=setTimeout(()=>{S(),C.current=null},c))},[c,m,S,...r]),{droppableRects:N,measureDroppableContainers:S,measuringScheduled:l!=null};function T(){switch(h){case iu.Always:return!1;case iu.BeforeDragging:return n;default:return!n}}}function zg(e,t){return yu(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function PF(e,t){return zg(e,t)}function TF(e){let{callback:t,disabled:n}=e;const r=Nd(t),o=R.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:l}=window;return new l(r)},[r,n]);return R.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Od(e){let{callback:t,disabled:n}=e;const r=Nd(t),o=R.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:l}=window;return new l(r)},[n]);return R.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function IF(e){return new Lg(Pl(e),e)}function Wx(e,t,n){t===void 0&&(t=IF);const[r,o]=R.useReducer(c,null),l=TF({callback(f){if(e)for(const h of f){const{type:p,target:m}=h;if(p==="childList"&&m instanceof HTMLElement&&m.contains(e)){o();break}}}}),s=Od({callback:o});return $r(()=>{o(),e?(s==null||s.observe(e),l==null||l.observe(document.body,{childList:!0,subtree:!0})):(s==null||s.disconnect(),l==null||l.disconnect())},[e]),r;function c(f){if(!e)return null;if(e.isConnected===!1){var h;return(h=f??n)!=null?h:null}const p=t(e);return JSON.stringify(f)===JSON.stringify(p)?f:p}}function AF(e){const t=zg(e);return Z2(e,t)}const Hx=[];function DF(e){const t=R.useRef(e),n=yu(r=>e?r&&r!==Hx&&e&&t.current&&e.parentNode===t.current.parentNode?r:Dg(e):Hx,[e]);return R.useEffect(()=>{t.current=e},[e]),n}function LF(e){const[t,n]=R.useState(null),r=R.useRef(e),o=R.useCallback(l=>{const s=kh(l.target);s&&n(c=>c?(c.set(s,nv(s)),new Map(c)):null)},[]);return R.useEffect(()=>{const l=r.current;if(e!==l){s(l);const c=e.map(f=>{const h=kh(f);return h?(h.addEventListener("scroll",o,{passive:!0}),[h,nv(h)]):null}).filter(f=>f!=null);n(c.length?new Map(c):null),r.current=e}return()=>{s(e),s(l)};function s(c){c.forEach(f=>{const h=kh(f);h==null||h.removeEventListener("scroll",o)})}},[o,e]),R.useMemo(()=>e.length?t?Array.from(t.values()).reduce((l,s)=>ll(l,s),Br):oE(e):Br,[e,t])}function Gx(e,t){t===void 0&&(t=[]);const n=R.useRef(null);return R.useEffect(()=>{n.current=null},t),R.useEffect(()=>{const r=e!==Br;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Hf(e,n.current):Br}function MF(e){R.useEffect(()=>{if(!Cd)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function jF(e,t){return R.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:l}=r;return n[o]=s=>{l(s,t)},n},{}),[e,t])}function cE(e){return R.useMemo(()=>e?cF(e):null,[e])}const Ph=[];function FF(e,t){t===void 0&&(t=Pl);const[n]=e,r=cE(n?bn(n):null),[o,l]=R.useReducer(c,Ph),s=Od({callback:l});return e.length>0&&o===Ph&&l(),$r(()=>{e.length?e.forEach(f=>s==null?void 0:s.observe(f)):(s==null||s.disconnect(),l())},[e]),o;function c(){return e.length?e.map(f=>rE(f)?r:new Lg(t(f),f)):Ph}}function fE(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return gu(t)?t:e}function zF(e){let{measure:t}=e;const[n,r]=R.useState(null),o=R.useCallback(h=>{for(const{target:p}of h)if(gu(p)){r(m=>{const v=t(p);return m?{...m,width:v.width,height:v.height}:v});break}},[t]),l=Od({callback:o}),s=R.useCallback(h=>{const p=fE(h);l==null||l.disconnect(),p&&(l==null||l.observe(p)),r(p?t(p):null)},[t,l]),[c,f]=Bf(s);return R.useMemo(()=>({nodeRef:c,rect:n,setRef:f}),[n,c,f])}const UF=[{sensor:uE,options:{}},{sensor:sE,options:{}}],$F={current:{}},tf={draggable:{measure:Fx},droppable:{measure:Fx,strategy:iu.WhileDragging,frequency:iv.Optimized},dragOverlay:{measure:Pl}};class Rs extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const BF={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Rs,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Kf},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:tf,measureDroppableContainers:Kf,windowRect:null,measuringScheduled:!1},dE={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Kf,draggableNodes:new Map,over:null,measureDroppableContainers:Kf},wu=R.createContext(dE),pE=R.createContext(BF);function WF(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Rs}}}function HF(e,t){switch(t.type){case At.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case At.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case At.DragEnd:case At.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case At.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Rs(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case At.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,l=e.droppable.containers.get(n);if(!l||r!==l.key)return e;const s=new Rs(e.droppable.containers);return s.set(n,{...l,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case At.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const l=new Rs(e.droppable.containers);return l.delete(n),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function GF(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=R.useContext(wu),l=Wf(r),s=Wf(n==null?void 0:n.id);return R.useEffect(()=>{if(!t&&!r&&l&&s!=null){if(!Rd(l)||document.activeElement===l.target)return;const c=o.get(s);if(!c)return;const{activatorNode:f,node:h}=c;if(!f.current&&!h.current)return;requestAnimationFrame(()=>{for(const p of[f.current,h.current]){if(!p)continue;const m=Wj(p);if(m){m.focus();break}}})}},[r,t,o,s,l]),null}function hE(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,l)=>l({transform:o,...r}),n):n}function KF(e){return R.useMemo(()=>({draggable:{...tf.draggable,...e==null?void 0:e.draggable},droppable:{...tf.droppable,...e==null?void 0:e.droppable},dragOverlay:{...tf.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function YF(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const l=R.useRef(!1),{x:s,y:c}=typeof o=="boolean"?{x:o,y:o}:o;$r(()=>{if(!s&&!c||!t){l.current=!1;return}if(l.current||!r)return;const h=t==null?void 0:t.node.current;if(!h||h.isConnected===!1)return;const p=n(h),m=Z2(p,r);if(s||(m.x=0),c||(m.y=0),l.current=!0,Math.abs(m.x)>0||Math.abs(m.y)>0){const v=eE(h);v&&v.scrollBy({top:m.y,left:m.x})}},[t,s,c,r,n])}const Pd=R.createContext({...Br,scaleX:1,scaleY:1});var Ji;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ji||(Ji={}));const mE=R.memo(function(t){var n,r,o,l;let{id:s,accessibility:c,autoScroll:f=!0,children:h,sensors:p=UF,collisionDetection:m=rF,measuring:v,modifiers:S,...C}=t;const N=R.useReducer(HF,void 0,WF),[T,_]=N,[b,E]=qj(),[I,M]=R.useState(Ji.Uninitialized),G=I===Ji.Initialized,{draggable:{active:k,nodes:B,translate:U},droppable:{containers:K}}=T,Z=k?B.get(k):null,he=R.useRef({initial:null,translated:null}),be=R.useMemo(()=>{var dt;return k!=null?{id:k,data:(dt=Z==null?void 0:Z.data)!=null?dt:$F,rect:he}:null},[k,Z]),J=R.useRef(null),[oe,Ne]=R.useState(null),[F,z]=R.useState(null),te=ru(C,Object.values(C)),ne=kd("DndDescribedBy",s),ae=R.useMemo(()=>K.getEnabled(),[K]),pe=KF(v),{droppableRects:Fe,measureDroppableContainers:Ve,measuringScheduled:qe}=OF(ae,{dragging:G,dependencies:[U.x,U.y],config:pe.droppable}),Me=kF(B,k),bt=R.useMemo(()=>F?Gf(F):null,[F]),Mt=Tl(),Gt=PF(Me,pe.draggable.measure);YF({activeNode:k?B.get(k):null,config:Mt.layoutShiftCompensation,initialRect:Gt,measure:pe.draggable.measure});const Ue=Wx(Me,pe.draggable.measure,Gt),er=Wx(Me?Me.parentElement:null),Ge=R.useRef({activatorEvent:null,active:null,activeNode:Me,collisionRect:null,collisions:null,droppableRects:Fe,draggableNodes:B,draggingNode:null,draggingNodeRect:null,droppableContainers:K,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),dn=K.getNodeFor((n=Ge.current.over)==null?void 0:n.id),st=zF({measure:pe.dragOverlay.measure}),Sn=(r=st.nodeRef.current)!=null?r:Me,en=G?(o=st.rect)!=null?o:Ue:null,_n=!!(st.nodeRef.current&&st.rect),No=AF(_n?null:Ue),ko=cE(Sn?bn(Sn):null),tn=DF(G?dn??Me:null),jt=FF(tn),nn=hE(S,{transform:{x:U.x-No.x,y:U.y-No.y,scaleX:1,scaleY:1},activatorEvent:F,active:be,activeNodeRect:Ue,containerNodeRect:er,draggingNodeRect:en,over:Ge.current.over,overlayNodeRect:st.rect,scrollableAncestors:tn,scrollableAncestorRects:jt,windowRect:ko}),Mn=bt?ll(bt,U):null,Ro=LF(tn),Sr=Gx(Ro),tr=Gx(Ro,[Ue]),Ft=ll(nn,Sr),rn=en?lF(en,nn):null,En=be&&rn?m({active:be,collisionRect:rn,droppableRects:Fe,droppableContainers:ae,pointerCoordinates:Mn}):null,Ii=tF(En,"id"),[St,ri]=R.useState(null),Ai=_n?nn:ll(nn,tr),Di=oF(Ai,(l=St==null?void 0:St.rect)!=null?l:null,Ue),Li=R.useCallback((dt,zt)=>{let{sensor:Ut,options:nr}=zt;if(J.current==null)return;const A=B.get(J.current);if(!A)return;const j=dt.nativeEvent,W=new Ut({active:J.current,activeNode:A,event:j,options:nr,context:Ge,onStart(ee){const ge=J.current;if(ge==null)return;const ce=B.get(ge);if(!ce)return;const{onDragStart:ie}=te.current,ye={active:{id:ge,data:ce.data,rect:he}};Jr.unstable_batchedUpdates(()=>{ie==null||ie(ye),M(Ji.Initializing),_({type:At.DragStart,initialCoordinates:ee,active:ge}),b({type:"onDragStart",event:ye})})},onMove(ee){_({type:At.DragMove,coordinates:ee})},onEnd:X(At.DragEnd),onCancel:X(At.DragCancel)});Jr.unstable_batchedUpdates(()=>{Ne(W),z(dt.nativeEvent)});function X(ee){return async function(){const{active:ce,collisions:ie,over:ye,scrollAdjustedTranslate:Se}=Ge.current;let tt=null;if(ce&&Se){const{cancelDrop:nt}=te.current;tt={activatorEvent:j,active:ce,collisions:ie,delta:Se,over:ye},ee===At.DragEnd&&typeof nt=="function"&&await Promise.resolve(nt(tt))&&(ee=At.DragCancel)}J.current=null,Jr.unstable_batchedUpdates(()=>{_({type:ee}),M(Ji.Uninitialized),ri(null),Ne(null),z(null);const nt=ee===At.DragEnd?"onDragEnd":"onDragCancel";if(tt){const me=te.current[nt];me==null||me(tt),b({type:nt,event:tt})}})}}},[B]),Mi=R.useCallback((dt,zt)=>(Ut,nr)=>{const A=Ut.nativeEvent,j=B.get(nr);if(J.current!==null||!j||A.dndKit||A.defaultPrevented)return;const W={active:j};dt(Ut,zt.options,W)===!0&&(A.dndKit={capturedBy:zt.sensor},J.current=nr,Li(Ut,zt))},[B,Li]),_r=RF(p,Mi);MF(p),$r(()=>{Ue&&I===Ji.Initializing&&M(Ji.Initialized)},[Ue,I]),R.useEffect(()=>{const{onDragMove:dt}=te.current,{active:zt,activatorEvent:Ut,collisions:nr,over:A}=Ge.current;if(!zt||!Ut)return;const j={active:zt,activatorEvent:Ut,collisions:nr,delta:{x:Ft.x,y:Ft.y},over:A};Jr.unstable_batchedUpdates(()=>{dt==null||dt(j),b({type:"onDragMove",event:j})})},[Ft.x,Ft.y]),R.useEffect(()=>{const{active:dt,activatorEvent:zt,collisions:Ut,droppableContainers:nr,scrollAdjustedTranslate:A}=Ge.current;if(!dt||J.current==null||!zt||!A)return;const{onDragOver:j}=te.current,W=nr.get(Ii),X=W&&W.rect.current?{id:W.id,rect:W.rect.current,data:W.data,disabled:W.disabled}:null,ee={active:dt,activatorEvent:zt,collisions:Ut,delta:{x:A.x,y:A.y},over:X};Jr.unstable_batchedUpdates(()=>{ri(X),j==null||j(ee),b({type:"onDragOver",event:ee})})},[Ii]),$r(()=>{Ge.current={activatorEvent:F,active:be,activeNode:Me,collisionRect:rn,collisions:En,droppableRects:Fe,draggableNodes:B,draggingNode:Sn,draggingNodeRect:en,droppableContainers:K,over:St,scrollableAncestors:tn,scrollAdjustedTranslate:Ft},he.current={initial:en,translated:rn}},[be,Me,En,rn,B,Sn,en,Fe,K,St,tn,Ft]),EF({...Mt,delta:U,draggingRect:rn,pointerCoordinates:Mn,scrollableAncestors:tn,scrollableAncestorRects:jt});const ga=R.useMemo(()=>({active:be,activeNode:Me,activeNodeRect:Ue,activatorEvent:F,collisions:En,containerNodeRect:er,dragOverlay:st,draggableNodes:B,droppableContainers:K,droppableRects:Fe,over:St,measureDroppableContainers:Ve,scrollableAncestors:tn,scrollableAncestorRects:jt,measuringConfiguration:pe,measuringScheduled:qe,windowRect:ko}),[be,Me,Ue,F,En,er,st,B,K,Fe,St,Ve,tn,jt,pe,qe,ko]),Oo=R.useMemo(()=>({activatorEvent:F,activators:_r,active:be,activeNodeRect:Ue,ariaDescribedById:{draggable:ne},dispatch:_,draggableNodes:B,over:St,measureDroppableContainers:Ve}),[F,_r,be,Ue,_,ne,B,St,Ve]);return Qe.createElement(K2.Provider,{value:E},Qe.createElement(wu.Provider,{value:Oo},Qe.createElement(pE.Provider,{value:ga},Qe.createElement(Pd.Provider,{value:Di},h)),Qe.createElement(GF,{disabled:(c==null?void 0:c.restoreFocus)===!1})),Qe.createElement(Zj,{...c,hiddenTextDescribedById:ne}));function Tl(){const dt=(oe==null?void 0:oe.autoScrollEnabled)===!1,zt=typeof f=="object"?f.enabled===!1:f===!1,Ut=G&&!dt&&!zt;return typeof f=="object"?{...f,enabled:Ut}:{enabled:Ut}}}),VF=R.createContext(null),Kx="button",qF="Droppable";function XF(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const l=kd(qF),{activators:s,activatorEvent:c,active:f,activeNodeRect:h,ariaDescribedById:p,draggableNodes:m,over:v}=R.useContext(wu),{role:S=Kx,roleDescription:C="draggable",tabIndex:N=0}=o??{},T=(f==null?void 0:f.id)===t,_=R.useContext(T?Pd:VF),[b,E]=Bf(),[I,M]=Bf(),G=jF(s,t),k=ru(n);$r(()=>(m.set(t,{id:t,key:l,node:b,activatorNode:I,data:k}),()=>{const U=m.get(t);U&&U.key===l&&m.delete(t)}),[m,t]);const B=R.useMemo(()=>({role:S,tabIndex:N,"aria-disabled":r,"aria-pressed":T&&S===Kx?!0:void 0,"aria-roledescription":C,"aria-describedby":p.draggable}),[r,S,N,T,C,p.draggable]);return{active:f,activatorEvent:c,activeNodeRect:h,attributes:B,isDragging:T,listeners:r?void 0:G,node:b,over:v,setNodeRef:E,setActivatorNodeRef:M,transform:_}}function QF(){return R.useContext(pE)}const ZF="Droppable",JF={timeout:25};function Td(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const l=kd(ZF),{active:s,dispatch:c,over:f,measureDroppableContainers:h}=R.useContext(wu),p=R.useRef({disabled:n}),m=R.useRef(!1),v=R.useRef(null),S=R.useRef(null),{disabled:C,updateMeasurementsFor:N,timeout:T}={...JF,...o},_=ru(N??r),b=R.useCallback(()=>{if(!m.current){m.current=!0;return}S.current!=null&&clearTimeout(S.current),S.current=setTimeout(()=>{h(Array.isArray(_.current)?_.current:[_.current]),S.current=null},T)},[T]),E=Od({callback:b,disabled:C||!s}),I=R.useCallback((B,U)=>{E&&(U&&(E.unobserve(U),m.current=!1),B&&E.observe(B))},[E]),[M,G]=Bf(I),k=ru(t);return R.useEffect(()=>{!E||!M.current||(E.disconnect(),m.current=!1,E.observe(M.current))},[M,E]),$r(()=>(c({type:At.RegisterDroppable,element:{id:r,key:l,disabled:n,node:M,rect:v,data:k}}),()=>c({type:At.UnregisterDroppable,key:l,id:r})),[r]),R.useEffect(()=>{n!==p.current.disabled&&(c({type:At.SetDroppableDisabled,id:r,key:l,disabled:n}),p.current.disabled=n)},[r,l,n,c]),{active:s,rect:v,isOver:(f==null?void 0:f.id)===r,node:M,over:f,setNodeRef:G}}function e6(e){let{animation:t,children:n}=e;const[r,o]=R.useState(null),[l,s]=R.useState(null),c=Wf(n);return!n&&!r&&c&&o(c),$r(()=>{if(!l)return;const f=r==null?void 0:r.key,h=r==null?void 0:r.props.id;if(f==null||h==null){o(null);return}Promise.resolve(t(h,l)).then(()=>{o(null)})},[t,r,l]),Qe.createElement(Qe.Fragment,null,n,r?R.cloneElement(r,{ref:s}):null)}const t6={x:0,y:0,scaleX:1,scaleY:1};function n6(e){let{children:t}=e;return Qe.createElement(wu.Provider,{value:dE},Qe.createElement(Pd.Provider,{value:t6},t))}const r6={position:"fixed",touchAction:"none"},i6=e=>Rd(e)?"transform 250ms ease":void 0,o6=R.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:l,className:s,rect:c,style:f,transform:h,transition:p=i6}=e;if(!c)return null;const m=o?h:{...h,scaleX:1,scaleY:1},v={...r6,width:c.width,height:c.height,top:c.top,left:c.left,transform:Ri.Transform.toString(m),transformOrigin:o&&r?Jj(r,c):void 0,transition:typeof p=="function"?p(r):p,...f};return Qe.createElement(n,{className:s,style:v,ref:t},l)}),a6=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:l,className:s}=e;if(l!=null&&l.active)for(const[c,f]of Object.entries(l.active))f!==void 0&&(o[c]=n.node.style.getPropertyValue(c),n.node.style.setProperty(c,f));if(l!=null&&l.dragOverlay)for(const[c,f]of Object.entries(l.dragOverlay))f!==void 0&&r.node.style.setProperty(c,f);return s!=null&&s.active&&n.node.classList.add(s.active),s!=null&&s.dragOverlay&&r.node.classList.add(s.dragOverlay),function(){for(const[f,h]of Object.entries(o))n.node.style.setProperty(f,h);s!=null&&s.active&&n.node.classList.remove(s.active)}},l6=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Ri.Transform.toString(t)},{transform:Ri.Transform.toString(n)}]},s6={duration:250,easing:"ease",keyframes:l6,sideEffects:a6({styles:{active:{opacity:"0"}}})};function u6(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return Nd((l,s)=>{if(t===null)return;const c=n.get(l);if(!c)return;const f=c.node.current;if(!f)return;const h=fE(s);if(!h)return;const{transform:p}=bn(s).getComputedStyle(s),m=J2(p);if(!m)return;const v=typeof t=="function"?t:c6(t);return aE(f,o.draggable.measure),v({active:{id:l,data:c.data,node:f,rect:o.draggable.measure(f)},draggableNodes:n,dragOverlay:{node:s,rect:o.dragOverlay.measure(h)},droppableContainers:r,measuringConfiguration:o,transform:m})})}function c6(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...s6,...e};return l=>{let{active:s,dragOverlay:c,transform:f,...h}=l;if(!t)return;const p={x:c.rect.left-s.rect.left,y:c.rect.top-s.rect.top},m={scaleX:f.scaleX!==1?s.rect.width*f.scaleX/c.rect.width:1,scaleY:f.scaleY!==1?s.rect.height*f.scaleY/c.rect.height:1},v={x:f.x-p.x,y:f.y-p.y,...m},S=o({...h,active:s,dragOverlay:c,transform:{initial:f,final:v}}),[C]=S,N=S[S.length-1];if(JSON.stringify(C)===JSON.stringify(N))return;const T=r==null?void 0:r({active:s,dragOverlay:c,...h}),_=c.node.animate(S,{duration:t,easing:n,fill:"forwards"});return new Promise(b=>{_.onfinish=()=>{T==null||T(),b()}})}}let Yx=0;function f6(e){return R.useMemo(()=>{if(e!=null)return Yx++,Yx},[e])}const ov=Qe.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:o,transition:l,modifiers:s,wrapperElement:c="div",className:f,zIndex:h=999}=e;const{activatorEvent:p,active:m,activeNodeRect:v,containerNodeRect:S,draggableNodes:C,droppableContainers:N,dragOverlay:T,over:_,measuringConfiguration:b,scrollableAncestors:E,scrollableAncestorRects:I,windowRect:M}=QF(),G=R.useContext(Pd),k=f6(m==null?void 0:m.id),B=hE(s,{activatorEvent:p,active:m,activeNodeRect:v,containerNodeRect:S,draggingNodeRect:T.rect,over:_,overlayNodeRect:T.rect,scrollableAncestors:E,scrollableAncestorRects:I,transform:G,windowRect:M}),U=zg(v),K=u6({config:r,draggableNodes:C,droppableContainers:N,measuringConfiguration:b}),Z=U?T.setRef:void 0;return Qe.createElement(n6,null,Qe.createElement(e6,{animation:K},m&&k?Qe.createElement(o6,{key:k,id:m.id,ref:Z,as:c,activatorEvent:p,adjustScale:t,className:f,transition:l,rect:U,style:{zIndex:h,...o},transform:B},n):null))});function vE(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}const d6=e=>{let{draggingNodeRect:t,transform:n,scrollableAncestorRects:r}=e;const o=r[0];return!t||!o?n:vE(n,t,o)},p6=e=>{let{transform:t,draggingNodeRect:n,windowRect:r}=e;return!n||!r?t:vE(t,n,r)};function gE(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function zc(e){return e!==null&&e>=0}const h6=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const l=gE(t,r,n),s=t[o],c=l[o];return!c||!s?null:{x:c.left-s.left,y:c.top-s.top,scaleX:c.width/s.width,scaleY:c.height/s.height}},m6="Sortable",v6=Qe.createContext({activeIndex:-1,containerId:m6,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:h6,disabled:{draggable:!1,droppable:!1}}),g6=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return gE(n,r,o).indexOf(t)},y6=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:l,newIndex:s,previousItems:c,previousContainerId:f,transition:h}=e;return!h||!r||c!==l&&o===s?!1:n?!0:s!==o&&t===f},w6={duration:200,easing:"ease"},yE="transform",x6=Ri.Transition.toString({property:yE,duration:0,easing:"linear"}),b6={roleDescription:"sortable"};function S6(e){let{disabled:t,index:n,node:r,rect:o}=e;const[l,s]=R.useState(null),c=R.useRef(n);return $r(()=>{if(!t&&n!==c.current&&r.current){const f=o.current;if(f){const h=Pl(r.current,{ignoreTransform:!0}),p={x:f.left-h.left,y:f.top-h.top,scaleX:f.width/h.width,scaleY:f.height/h.height};(p.x||p.y)&&s(p)}}n!==c.current&&(c.current=n)},[t,n,r,o]),R.useEffect(()=>{l&&s(null)},[l]),l}function wE(e){let{animateLayoutChanges:t=y6,attributes:n,disabled:r,data:o,getNewIndex:l=g6,id:s,strategy:c,resizeObserverConfig:f,transition:h=w6}=e;const{items:p,containerId:m,activeIndex:v,disabled:S,disableTransforms:C,sortedRects:N,overIndex:T,useDragOverlay:_,strategy:b}=R.useContext(v6),E=_6(r,S),I=p.indexOf(s),M=R.useMemo(()=>({sortable:{containerId:m,index:I,items:p},...o}),[m,o,I,p]),G=R.useMemo(()=>p.slice(p.indexOf(s)),[p,s]),{rect:k,node:B,isOver:U,setNodeRef:K}=Td({id:s,data:M,disabled:E.droppable,resizeObserverConfig:{updateMeasurementsFor:G,...f}}),{active:Z,activatorEvent:he,activeNodeRect:be,attributes:J,setNodeRef:oe,listeners:Ne,isDragging:F,over:z,setActivatorNodeRef:te,transform:ne}=XF({id:s,data:M,attributes:{...b6,...n},disabled:E.draggable}),ae=zj(K,oe),pe=!!Z,Fe=pe&&!C&&zc(v)&&zc(T),Ve=!_&&F,qe=Ve&&Fe?ne:null,bt=Fe?qe??(c??b)({rects:N,activeNodeRect:be,activeIndex:v,overIndex:T,index:I}):null,Mt=zc(v)&&zc(T)?l({id:s,items:p,activeIndex:v,overIndex:T}):I,Gt=Z==null?void 0:Z.id,Ue=R.useRef({activeId:Gt,items:p,newIndex:Mt,containerId:m}),er=p!==Ue.current.items,Ge=t({active:Z,containerId:m,isDragging:F,isSorting:pe,id:s,index:I,items:p,newIndex:Ue.current.newIndex,previousItems:Ue.current.items,previousContainerId:Ue.current.containerId,transition:h,wasDragging:Ue.current.activeId!=null}),dn=S6({disabled:!Ge,index:I,node:B,rect:k});return R.useEffect(()=>{pe&&Ue.current.newIndex!==Mt&&(Ue.current.newIndex=Mt),m!==Ue.current.containerId&&(Ue.current.containerId=m),p!==Ue.current.items&&(Ue.current.items=p)},[pe,Mt,m,p]),R.useEffect(()=>{if(Gt===Ue.current.activeId)return;if(Gt&&!Ue.current.activeId){Ue.current.activeId=Gt;return}const Sn=setTimeout(()=>{Ue.current.activeId=Gt},50);return()=>clearTimeout(Sn)},[Gt]),{active:Z,activeIndex:v,attributes:J,data:M,rect:k,index:I,newIndex:Mt,items:p,isOver:U,isSorting:pe,isDragging:F,listeners:Ne,node:B,overIndex:T,over:z,setNodeRef:ae,setActivatorNodeRef:te,setDroppableNodeRef:K,setDraggableNodeRef:oe,transform:dn??bt,transition:st()};function st(){if(dn||er&&Ue.current.newIndex===I)return x6;if(!(Ve&&!Rd(he)||!h)&&(pe||Ge))return Ri.Transition.toString({...h,property:yE})}}function _6(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}We.Down,We.Right,We.Up,We.Left;function Id({groupName:e,item:t,allowRemove:n,onRemove:r}){const{attributes:o,listeners:l,setNodeRef:s,transform:c,transition:f}=wE({id:`${e}_${t.itemName}`,data:{type:"Ingredient",item:t,parentGroup:e}}),h={transition:f,transform:Ri.Translate.toString(c)};return x.jsxs("div",{ref:s,className:"relative print-rounded aspect-square w-clamp card-shadow center",style:h,...l,...o,children:[x.jsx("img",{src:`${Vn}/assets/ingredients/${t.itemName.toLowerCase()}.webp`,alt:t.itemName,"data-testid":`${e}_${t.itemName}_selected`,className:"print-rounded"}),n&&x.jsx("div",{className:"flex center rounded-2xl",children:x.jsx(Ln,{icon:wd,size:"sm",onClick:()=>r==null?void 0:r(),className:"absolute pointer-events-auto top-0 right-0 -m-2 cursor-pointer text-white bg-black bg-opacity-80 rounded-full px-1 py-1"})})]},`${e}_${t.itemName}`)}function E6({group:e,item:t}){const n=wn(),r=(o,l)=>{n(Q_({groupName:o,itemName:l}))};return x.jsx("div",{children:x.jsx("div",{className:"mx-2 hover:cursor-grabbing hover:scale-105",children:x.jsx(Id,{groupName:e.groupName,item:t,allowRemove:!0,onRemove:()=>r(e.groupName,t.itemName)})})})}function C6({group:e}){const{setNodeRef:t}=Td({id:e.groupName,data:{type:"Group",group:e}});return x.jsx(x.Fragment,{children:x.jsx("div",{ref:t,className:"flex flex-wrap justify-center gap-y-4 mb-12 center",children:e.items.map((n,r)=>x.jsx("div",{children:x.jsx(E6,{group:e,item:n})},`${n}${r.toString()}`))})})}function N6(){const e=wn();return He(n=>n.groups.ingredientsGroups).map((n,r)=>x.jsxs("div",{className:"flex flex-col center",children:[x.jsx("p",{onKeyDown:Pi,"data-testid":"chosen_group",onClick:()=>e(V_(n.groupName)),className:"group-chip text-fluidSubtitle",children:n.groupName}),x.jsx(C6,{group:n})]},`${n.groupName}_${r}`))}function k6(){const e=wn(),t=He(f=>f.groups.ingredientsGroups),[n,r]=R.useState(null),o=f=>{var h;r((h=f.active.data.current)==null?void 0:h.item)},l=f=>{var C,N,T,_;const{active:h,over:p}=f;if(!p)return;const m=((C=h.data.current)==null?void 0:C.type)==="Ingredient",v=((N=p.data.current)==null?void 0:N.type)==="Group",S=(T=h.data.current)==null?void 0:T.parentGroup;if(m&&v&&S!==p.id){const b=h.id.split("_")[1];if(t.filter(I=>I.groupName===p.id)[0].items.findIndex(I=>I.itemName===b)>-1)return;e(Q_({groupName:S,itemName:b})),e(Lm({groupName:p.id,itemName:b,item:(_=h.data.current)==null?void 0:_.item}))}r(null)},s=f=>{const h=Q2(f);return h.length>0?h.sort((m,v)=>{const S=f.droppableRects.get(m.id),C=f.droppableRects.get(v.id);if(S&&C){const N=S.width*S.height;return C.width*C.height-N}return 0}):X2(f)},c=Y2(Yf(jg,{activationConstraint:{distance:5}}),Yf(Fg,{activationConstraint:{distance:4}}));return x.jsxs(mE,{collisionDetection:s,modifiers:[d6],sensors:c,onDragEnd:l,onDragStart:o,children:[x.jsxs("div",{className:"relative px-4 pb-4 overflow-auto center text-center no-scrollbar overflow-x-hidden",children:[x.jsx("h2",{className:"mb-8 text-fluidSubtitle",children:"Selected ingredient groups"}),x.jsx(N6,{})]}),n&&x.jsx(ov,{children:x.jsx(Id,{groupName:`${n.itemName}_${Math.random().toString()}`,item:n,allowRemove:!1})})]})}function R6(){const e=He(t=>t.groups.ingredientsGroups);return x.jsxs("div",{"data-testid":"homepage",className:"max-h-screen flex flex-col",children:[x.jsx(ua,{page:"/quantities",isNext:!0}),x.jsx(EL,{}),x.jsxs("div",{className:"flex flex-grow md:p-2 lg:p-2 sm:gap-4 md:gap-4 lg:gap-8 mx-4",children:[x.jsx("div",{className:"main-gallery sm:w-2/3 md:w-4/5 lg:w-3/5",children:x.jsx(Fj,{})}),x.jsx("div",{className:`main-gallery sm:w-1/3 w-2/5 ${e.length===0&&"required-element-border"}`,children:x.jsx(k6,{})})]})]})}function O6(){const e=wn(),t=He(r=>r.actions.availableItems),n=r=>{e(hg(r))};return t.map((r,o)=>x.jsx("div",{"data-item-name":r.itemName,className:"mb-1 pb-2 lg:pb-4 print-rounded opacity-100 hover:scale-105",onKeyDown:Pi,children:x.jsx(Id,{groupName:o.toString(),item:r,allowRemove:!1,onRemove:()=>n(r)})},`${r.itemName}_shelf_${o}`))}function xE({action:e}){const{attributes:t,listeners:n,setNodeRef:r,transform:o,transition:l}=wE({id:e.actionName,data:{type:"Action",action:e}}),s={transition:l,transform:Ri.Translate.toString(o)},{actionName:c}=e;return x.jsx("div",{ref:r,style:s,...n,...t,children:x.jsxs("div",{className:"bg-white card-shadow print-rounded w-clamp",children:[x.jsx("img",{draggable:"false",src:`${Vn}/assets/chefActions/${c}.webp`,alt:c,"data-testid":`${c}_action`,className:"print-rounded-img rounded-t-lg w-clamp"}),x.jsx("p",{className:"text-fluidPrint py-2",children:c})]},c)})}function P6(){return pL.map(e=>x.jsx(R.Suspense,{fallback:x.jsx("div",{className:"suspense-gallery-action","data-testid":`${e.actionName}_suspense`,children:""}),children:x.jsx("div",{className:"bg-white mx-2 aspect-videoThin hover:scale-105",children:x.jsx(xE,{action:e})})},`${e.actionName}_suspense`))}function Vx({icon:e,onCaretClick:t}){return x.jsx("div",{className:"flex center max-h-short cursor-pointer hover:border-y-2 hover:border-black",onClick:()=>t(),onKeyDown:Pi,children:x.jsx(Ln,{icon:e,size:"lg"})})}function T6({instruction:e}){const t=R.useRef(null),n=wn(),[r,o]=R.useState(e.note),[l,s]=R.useState(null),c=v=>{r?n(kc({id:e.id,note:v})):(s(null),n(kc({id:e.id,note:""})))},f=()=>{s(null),o(""),n(kc({id:e.id,note:""}))},h=v=>{o(v.target.value)},p=l===e.id;R.useEffect(()=>{p&&t.current&&t.current.focus()},[p]);const m=(v,S)=>{if(v.key==="Enter"){const{id:C,note:N}=S;n(kc({id:C,note:N})),v.target.blur()}};return p||e.note?x.jsxs("div",{className:"flex justify-end items-center md:w-60 lg:w-96",children:[x.jsx("input",{type:"text",ref:t,className:"input-border w-full text-fluidSubtitle text-center md:-m-2 lg:-m-4 text-ellipsis whitespace-nowrap overflow-hidden sm:p-0 md:p-1",placeholder:"Add a note to this instruction",value:r,onChange:h,onBlur:v=>c(v.target.value),onKeyDown:v=>m(v,e)}),x.jsx(Ln,{icon:wd,size:"1x",className:"bg-white -ml-2 cursor-pointer",onClick:()=>f()})]}):x.jsx("button",{type:"button",className:"sexy-button md:px-1 lg:px-3 md:py-1 lg:py-2 -m-4 min-w-16 card-shadow border border-transparent bg-yellow-100 text-neutral-800 font-semibold rounded-lg text-xs hover:bg-white hover:border-2 hover:border-yellow-200",onClick:()=>s(e.id),children:x.jsx("span",{children:"Add Note"})})}function I6({instruction:e}){const t=wn(),[n,r]=R.useState(e.action.time),o=f=>{f.target.select()},l=f=>{Number.isNaN(f)?r(0):r(f)},s=()=>{n>0&&r(f=>f-1)},c=()=>{r(f=>f+1)};return R.useEffect(()=>{t(sL({instruction:e,time:n}))},[t,e,n]),x.jsxs("div",{className:"flex flex-row rounded-md mx-2",children:[x.jsx("button",{type:"button",onClick:s,children:x.jsx(Ln,{icon:t2,className:"num-input-icons"})}),x.jsx("input",{className:`sm:w-8 md:w-8 lg:w-16 p-0 md:mx-2 lg:mx-4 focus:outline-none text-center rounded-2xl sm:text-2xl md:text-3xl lg:text-4xl bg-transparent ${n===0&&"required-element-fill"}`,type:"number",id:"units-number-input",value:n,required:!0,onChange:f=>l(Number.parseFloat(f.target.value)),onFocus:o,onWheel:f=>f.target.blur()}),x.jsx("button",{type:"button",onClick:c,children:x.jsx(Ln,{icon:n2,className:"num-input-icons"})})]})}function A6({action:e}){const{actionName:t}=e;return x.jsxs("div",{className:"bg-white card-shadow print-rounded w-clamp",children:[x.jsx("img",{draggable:"false",src:`${Vn}/assets/chefActions/${t}.webp`,alt:t,"data-testid":`${t}_action`,className:"print-rounded-img md:w-clampSmall lg:w-clamp"}),x.jsx("p",{className:"text-fluidCard py-2",children:t})]},t)}function D6({groupName:e,item:t,onRemoveItem:n}){const r=()=>{n(t)};return x.jsxs("div",{className:"relative print-rounded aspect-square print-image card-shadow center",children:[x.jsx("img",{draggable:"false",src:`${Vn}/assets/ingredients/${t.itemName.toLowerCase()}.webp`,alt:t.itemName,"data-testid":`${e}_${t.itemName}_shelf`,className:"print-rounded print-image"}),x.jsx("div",{className:"flex center rounded-2xl",children:x.jsx(Ln,{icon:wd,size:"sm",onClick:r,className:"absolute pointer-events-auto top-0 right-0 -m-2 cursor-pointer text-white bg-black bg-opacity-80 rounded-full px-1 py-1"})})]},`${e}_${t.itemName}`)}function L6({instruction:e,refClick:t}){const[n,r]=R.useState(""),{setNodeRef:o}=Td({id:e.id,data:{type:"Instruction",instruction:e}}),l=wn(),s=(C,N)=>{const T=N.items.filter(_=>!Go.isEqual(_,C));l(G_({id:N.id,items:T})),l(hg(C))},c=C=>{l(lL(C)),l(fL(C.items))},f=(C,N)=>{l(oL({id:N.id,customItem:C.target.value})),C.target.blur()},h=C=>{r(C.target.value)},p=C=>{C.key===" "&&(C.preventDefault(),r(N=>`${N} `))},{id:m,action:v,items:S}=e;return x.jsxs("div",{ref:o,className:"z-50 flex flex-col mb-12 border-l-2 border-r-2 border-l-neutral-400 border-r-neutral-400 rounded-3xl lg:scale-90",children:[x.jsxs("div",{className:"flex items-center justify-between pl-6",children:[x.jsxs("div",{className:"flex justify-start w-full py-2",children:[x.jsxs("div",{draggable:"false",className:"flex center",onClick:()=>{t(e)},onKeyDown:Pi,children:[x.jsx(A6,{action:v}),x.jsx("span",{className:"md:text-xs text-fluidSubtitle ml-4",children:"THE"}),x.jsx("div",{className:"flex flex-row",children:x.jsx("div",{className:"center sm:w-36 md:w-44 lg:w-52 xl:w-56 flex flex-row flex-wrap",children:!n&&S.length>0?S.map(C=>x.jsx("div",{className:"px-2 py-2",children:x.jsx(D6,{groupName:m.toString(),item:C,onRemoveItem:N=>s(N,e)})},`${m}_${C.itemName}`)):x.jsxs("div",{className:"flex flex-col justify-between items-center sm:min-h-16 md:min-h-24",children:[x.jsx("span",{className:"text-fluidPrint",children:n?x.jsxs("b",{className:"text-neutral-400",children:["Drop Item ",x.jsx("br",{})," or"]}):x.jsxs("b",{children:["Drop Item ",x.jsx("br",{})," or"]})},m),x.jsx("input",{type:"text",className:"input-border sm:w-24 md:w-36 text-sm text-center text-ellipsis whitespace-nowrap overflow-hidden p-1",placeholder:"Custom text",value:n,onChange:C=>h(C),onKeyDown:p,onBlur:C=>f(C,e)})]})})})]}),v.time!==-1&&x.jsxs("div",{className:"flex center",children:[x.jsx("span",{className:"text-fluidSubtitle mx-2",children:"FOR"}),x.jsx(I6,{instruction:e}),x.jsx("span",{className:"text-fluidSubtitle md:ml-2 lg:ml-4",children:v.unit})]})]}),x.jsx("button",{type:"button",className:"px-4 md:ml-2 lg:ml-8 h-fit",onClick:()=>c(e),children:x.jsx(Ln,{icon:RL,size:"lg",color:"red",className:"cursor-pointer hover:text-black"})})]}),x.jsx("div",{className:"flex center sm:mt-4 md:mt-6",children:x.jsx(T6,{instruction:e})})]},`${m}_${v}`)}const M6=R.memo(({onRefClick:e})=>[...He(r=>r.actions.chefInstructions)].sort((r,o)=>r.id-o.id).map(r=>x.jsx("div",{"data-instruction":r.id,className:"pt-4",children:x.jsx(L6,{instruction:r,refClick:o=>e(o)})},r.id)));function j6({onInstructionClick:e}){const{setNodeRef:t}=Td({id:"steps_container",data:{type:"Steps"}}),n=He(s=>s.actions.chefInstructions),r=R.useRef(null),o=R.useRef(n.length),l=R.useCallback(()=>{const s=r.current;if(n.length===0)return;const c=n[n.length-1],f=s==null?void 0:s.querySelector(`[data-instruction="${c.id}"]`);f&&f.scrollIntoView({behavior:"smooth",inline:"center"})},[n]);return R.useEffect(()=>{n.length!==o.current&&(l(),o.current=n.length)},[n,l]),x.jsxs("div",{ref:s=>{t(s),r.current=s},className:`flex flex-col bg-slate-50 w-full md:ml-4 lg:ml-8 mb-1 max-h-semi overflow-scroll no-scrollbar ${n.length===0?"justify-center items-center":"justify-start items-center pt-2"} lg:overflow-x-auto`,children:[n.length===0&&x.jsxs("h2",{className:"text-fluidSubtitle text-gray-600",children:["Drag an action ",x.jsx("b",{children:"[ top ]"})," to this area ",x.jsx("br",{}),"and start adding ingredients ",x.jsx("b",{children:"[left ]"})," to it!",x.jsx("br",{}),x.jsx("br",{}),"To add more steps just",x.jsx("br",{}),"drag another action.",x.jsx("br",{}),x.jsx("br",{}),x.jsx("b",{children:"Replace an action by dragging a new one over it!"})]}),x.jsx(M6,{onRefClick:s=>e(s)})]})}function F6(){const e=R.useRef(null),t=R.useRef(null),[n,r]=R.useState(!1),[o,l]=R.useState(0),[s,c]=R.useState(0),[f,h]=R.useState(null),[p,m]=R.useState(null),[v,S]=R.useState(null),C=wn(),N=He(U=>U.actions.chefInstructions);R.useEffect(()=>{if(v){const U=v.current,K=Z=>{U&&(Z.preventDefault(),Z.deltaY<0?U.scrollLeft-=20:U.scrollLeft+=20)};return U&&U.addEventListener("wheel",K,{passive:!1}),()=>{U&&U.removeEventListener("wheel",K)}}},[v]);const T=U=>{if(v!=null&&v.current){const Z=v.current.firstChild.offsetWidth*4;v.current.scrollBy({left:U==="left"?-Z:Z,behavior:"smooth"})}},_=(U,K)=>{U.current&&(S(U),U.current&&(r(!0),l(K.pageX-U.current.offsetLeft),c(U.current.scrollLeft)))},b=(U,K)=>{if(!(!n||!U.current)&&(S(U),K.preventDefault(),U.current)){const he=K.pageX-U.current.offsetLeft-o;U.current.scrollLeft=s-he}},E=U=>{const K=e.current;let Z=null;Z=K==null?void 0:K.querySelector(`[data-action-name="${U.action.actionName}"]`),Z&&Z.scrollIntoView({behavior:"smooth",inline:"center"})},I=U=>{C(aL({id:N.length>0?Math.max(...N.map(K=>K.id))+1:0,note:"",action:U,items:[]}))},M=U=>{var K,Z,he,be;((K=U.active.data.current)==null?void 0:K.type)==="Action"?h((Z=U.active.data.current)==null?void 0:Z.action):h(null),((he=U.active.data.current)==null?void 0:he.type)==="Ingredient"?m((be=U.active.data.current)==null?void 0:be.item):m(null)},G=U=>{var J,oe,Ne,F,z,te;const{active:K,over:Z}=U;if(!Z)return;const he=(J=K.data.current)==null?void 0:J.type,be=(oe=Z.data.current)==null?void 0:oe.type;if(he==="Action"&&be==="Steps")I((Ne=K.data.current)==null?void 0:Ne.action);else if(be==="Instruction"){const ne=(F=Z.data.current)==null?void 0:F.instruction;if(he==="Action"){const ae=(z=K.data.current)==null?void 0:z.action;C(uL({id:ne.id,action:ae}))}else if(he==="Ingredient"){const ae=(te=K.data.current)==null?void 0:te.item;ne.items.find(Fe=>Go.isEqual(Fe,ae))||(C(G_({id:ne.id,items:[...ne.items,ae]})),C(hg(ae)))}}},k=U=>{const K=Q2(U);return K.length>0?K.sort((he,be)=>{const J=U.droppableRects.get(he.id),oe=U.droppableRects.get(be.id);if(J&&oe){const Ne=J.width*J.height,F=oe.width*oe.height;return Ne-F}return 0}):X2(U)},B=Y2(Yf(jg,{activationConstraint:{distance:0}}),Yf(Fg,{activationConstraint:{distance:10}}));return x.jsx(mE,{collisionDetection:k,modifiers:[p6],sensors:B,onDragEnd:G,onDragStart:M,children:x.jsxs("div",{className:"mt-16 max-h-5/6 w-11/12 input-gallery-border p-4",children:[x.jsx("h2",{className:"text-fluidSubtitle mb-2",children:"Plan the instructions and steps for this recipe!"}),x.jsxs("div",{className:"flex flex-row gap-2",children:[x.jsx(Vx,{icon:AL,onCaretClick:()=>T("left")}),x.jsx("div",{id:"actions-scrollbar",className:"flex w-full overflow-x-scroll py-4 pt-4 overflow-y-auto",ref:e,onMouseDown:U=>_(e,U),onMouseLeave:()=>r(!1),onMouseUp:()=>r(!1),onMouseMove:U=>b(e,U),children:x.jsx(P6,{})}),x.jsx(Vx,{icon:OL,onCaretClick:()=>T("right")}),f&&x.jsx(ov,{children:x.jsx(xE,{action:f})})]}),x.jsxs("div",{className:"flex w-full justify-between mt-8",children:[x.jsx("div",{ref:t,className:"flex flex-col min-w-fit sm:p-2 md:p-4 sm:mr-4 md:mr-2 max-h-half overflow-y-scroll scroll-normal",children:x.jsx("div",{className:"scroll-mirror",children:x.jsx(O6,{})})}),p&&x.jsx(ov,{children:x.jsx(Id,{groupName:Math.random().toString(),item:p,allowRemove:!1})}),x.jsx(j6,{onInstructionClick:U=>E(U)})]})]})})}function z6(){const e=He(l=>l.warning.warning),t=He(l=>l.groups.ingredientsGroups),n=He(l=>l.actions.chefInstructions);let r="/print";return(t.flatMap(l=>l.items).length>18||n.length>3)&&(r="/doublePrint"),x.jsxs("div",{"data-testid":"instructions",className:"min-h-screen flex flex-col",children:[x.jsx(ua,{page:r,isNext:!0}),x.jsx(ua,{page:"/quantities",isNext:!1}),x.jsx("div",{className:"flex h-screen justify-center text-center",children:x.jsx(F6,{})}),e&&x.jsx(mg,{})]})}function U6(){return He(t=>t.groups.ingredientsGroups).map(t=>x.jsxs("div",{className:"flex flex-row center md:gap-x-3 lg:gap-x-4 mb-2",children:[x.jsx("p",{className:"text-fluidSubtitle leading-none md:mr-2 lg:mr-4",children:t.groupName}),t.items.map(n=>x.jsxs("div",{className:"flex flex-col h-fit center md:rounded-md lg:rounded-lg",children:[x.jsx("img",{src:`${Vn}/assets/ingredients/${n.itemName.toLowerCase()}.webp`,alt:n.itemName,className:"card-shadow md:w-tinyImage lg:w-miniImage md:rounded-md lg:rounded-lg"}),x.jsxs("div",{className:"py-2 h-fit",children:[x.jsx("p",{className:"text-fluidPrintTitle leading-tight px-2",children:n.itemName}),x.jsx("p",{className:"text-fluidPrintTitle leading-tight",children:x.jsxs("b",{children:[n.amount,"  ",n.unit]})})]})]},`${t.groupName}_${n.itemName}`))]},t.groupName))}function $6(){return He(t=>t.actions.chefInstructions).map((t,n)=>x.jsxs("div",{className:"flex flex-col md:mb-2 lg:mb-6 md:w-5/6 lg:w-3/5 ",children:[x.jsxs("div",{className:"relative flex flex-row gap-4 pointer-events-none items-center justify-start ",children:[x.jsxs("span",{className:"md:text-xs lg:text-sm min-w-12",children:["Step ",n+1]}),x.jsx("div",{children:x.jsxs("div",{className:"bg-white card-shadow print-rounded w-tinyImage mr-2",children:[x.jsx("img",{draggable:"false",src:`${Vn}/assets/chefActions/${t.action.actionName}.webp`,alt:t.action.actionName,"data-testid":`${t.action.actionName}_action`,className:"print-rounded-img w-tinyImage"}),x.jsx("p",{className:"md:text-xs lg:text-sm py-0.5",children:t.action.actionName})]})}),x.jsx("span",{className:" md:text-xs lg:text-sm",children:"THE"}),t.customItem?x.jsx("b",{className:"md:text-xs lg:text-sm",children:t.customItem}):x.jsx("div",{className:"center justify-start md:w-44 lg:min-w-48 flex flex-row flex-wrap",children:t.items.map(r=>x.jsxs("div",{className:"flex center py-1 px-2",children:[x.jsx("img",{src:`${Vn}/assets/ingredients/${r.itemName.toLowerCase()}.webp`,alt:r.itemName,className:"card-shadow md:w-10 lg:w-12 print-rounded-img"})," "]},`${t.id}_${r.itemName}`))}),t.action.time!==-1&&x.jsxs("span",{className:"-bggreen-300 md:text-xs lg:text-sm min-w-12 md:-ml-4",children:["FOR ",x.jsx("br",{}),t.action.time," ",t.action.unit]})]}),x.jsx("div",{className:"flex w-full left-0",children:x.jsx("span",{className:"md:text-xs lg:text-sm md:pt-0.5 lg:pt-1",children:t.note})})]},`${t.id}`))}function B6(){const e=He(t=>t.recipe.title);return x.jsxs("div",{"data-testid":"resultpage",className:"relative min-h-screen flex flex-col",children:[x.jsx(e2,{}),x.jsx(ua,{page:"/instructions",isNext:!1}),x.jsx("div",{className:"flex flex-col center mt-28 mb-16",children:x.jsxs("div",{id:"a4",className:"relative flex flex-col a4ratio w-2/3 text-center input-border justify-between",children:[x.jsxs("div",{className:"flex flex-col h-fit justify-between items-center",children:[x.jsx("h1",{className:"text-fluidTitle font-shadowsLight md:mt-2 lg:mt-4",children:e}),x.jsx("hr",{className:"w-1/2 border-gray-200 md:mb-2 lg:mb-4"}),x.jsx("h2",{className:"text-fluidSubtitle mb-2",children:"Ingredients:"})]}),x.jsx("div",{className:"grid grid-rows-3 h-2/5",children:x.jsx(U6,{})}),x.jsx("div",{className:"h-fit justify-between items-center",children:x.jsx("h2",{className:"text-fluidSubtitle md:mt-2 lg:mt-8",children:"Steps:"})}),x.jsx("div",{className:"flex flex-col items-center justify-start h-3/5 md:mt-1 lg:mt-2",children:x.jsx($6,{})}),x.jsx("div",{className:"flex flex-col h-fit justify-between items-center pb-2",children:x.jsx("h2",{className:"text-fluidSubtitle sm:mb-1 md:mb-2 lg:mb-4",children:"Enjoy !"})})]})}),x.jsx("div",{className:"fixed bottom-0 right-0 go-to-button-arrow mb-0",children:x.jsx(K_,{})})]})}function qx({identifier:e,units:t}){var c;const n=He(f=>f.groups.ingredientsGroups),r=wn(),o=e.split("_")[0],l=e.split("_")[1],s=(c=n.find(f=>f.groupName===l))==null?void 0:c.items.filter(f=>f.itemName===o)[0];return s&&x.jsx("div",{className:"text-fluidCard",children:t.map(f=>x.jsx("button",{className:`unit-card my-1 md: text-xs lg:text-xl ${s.unit===f?"unit-card-chosen":null}`,type:"button",onClick:()=>r(Z_({groupName:l,itemName:o,unit:f})),children:f},`${e}_${f}`))})}function W6({item:e,groupName:t}){const n=wn(),[r,o]=R.useState(e.amount),l=p=>{p>=0&&o(p)},s=()=>{r>0&&(n(os({groupName:t,itemName:e.itemName,amount:r-1})),o(p=>p-1))},c=()=>{n(os({groupName:t,itemName:e.itemName,amount:r+1})),o(p=>p+1)},f=p=>{Number.isNaN(p)?o(0):p>=0&&o(p),n(os({groupName:t,itemName:e.itemName,amount:p}))},h=p=>{p.key==="Enter"?(f(r),n(os({groupName:t,itemName:e.itemName,amount:r}))):p.key==="Backspace"&&p.target.value.length===1&&(o(0),n(os({groupName:t,itemName:e.itemName,amount:0})))};return x.jsxs("div",{className:"flex flex-row rounded-md sm:mx-2 md:mx-4 lg:mx-6",children:[x.jsx("button",{type:"button",className:"lg:mx-2",onClick:s,children:x.jsx(Ln,{icon:t2,className:"num-input-icons"})}),x.jsx("input",{className:`sm:w-10 md:w-12 lg:w-16 p-0 py-1 focus:outline-none text-center font-roboto rounded-xl ${r===0&&"required-element-fill"}`,type:"number",id:"units-number-input",value:r,required:!0,onChange:p=>l(Number.parseFloat(p.target.value)),onFocus:Zc,onBlur:p=>f(Number.parseFloat(p.target.value)),onKeyDown:h,onWheel:p=>p.target.blur()}),x.jsx("button",{type:"button",className:"lg:mx-2",onClick:c,children:x.jsx(Ln,{icon:n2,className:"num-input-icons"})})]})}function H6({groupName:e,item:t}){const{itemName:n,unit:r}=t;return x.jsx("div",{"data-testid":"ingredientFullItem",className:"flex center",children:x.jsxs("div",{className:"aspect-videoWide flex flex-row h-clampSmall rounded-2xl card-shadow",children:[x.jsx("img",{src:`${Vn}/assets/ingredients/${n.toLowerCase()}.webp`,alt:n,className:"rounded-l-2xl"}),x.jsxs("div",{className:"flex flex-col center w-1/2 p-2 m-auto lg:gap-1",children:[x.jsx("p",{className:"text-fluidSubtitle",children:n}),x.jsx("hr",{className:"w-full border-gray-400 lg:my-2"}),x.jsx(W6,{item:t,groupName:e}),x.jsx("p",{className:`text-fluidSubtitle rounded-xl px-3 ${r===vl&&"required-element-fill"}`,children:r})]})]},`${e}_${n}`)})}function G6({groupName:e,items:t}){const n=wn(),r=(o,l)=>{n(Z_({groupName:e,itemName:o.itemName,unit:l}))};return x.jsxs("div",{className:"flex flex-col items-start mx-8",children:[x.jsx("p",{className:"group-chip-dead",children:e}),t.map(o=>x.jsxs("div",{className:"flex flex-row center mb-8",children:[x.jsx(H6,{groupName:e,item:o},`${e}_${o.itemName}_${o.amount}_${o.unit}}`),x.jsxs("div",{"data-testid":"unitsButtonsArray",className:"flex flex-col justify-start md:gap-y-2 sm:mx-6 md:mx-12 lg:mx-8",children:[x.jsx(qx,{identifier:`${o.itemName}_${e}_common1`,units:Rc.slice(0,Rc.length/2)}),x.jsx(qx,{identifier:`${o.itemName}_${e}_common2`,units:Rc.slice(Rc.length/2)})]}),x.jsx("form",{children:x.jsx("select",{className:`text-base md:w-20 lg:w-28 input-border rounded-md px-2 py-1 ${Jw.includes(o.unit)?"border-blue-500 border-1 bg-blue-300":null}`,value:o.unit,onChange:l=>r(o,l.target.value),children:Jw.map(l=>x.jsx("option",{value:l,children:l},l))})})]},`${e}_${o.itemName}}`))]})}function K6(){const e=He(t=>t.groups.ingredientsGroups);return x.jsx("div",{className:"flex flex-col justify-center",children:x.jsxs("div",{className:"flex flex-col h-5/6 w-fit input-gallery-border overflow-auto p-4 items-center",children:[x.jsx("h2",{className:"text-fluidSubtitle mb-4",children:"Select the Units and Quantities for each ingredient"}),e.map(t=>x.jsx("div",{className:"sm:mb-2 md:mb-4",children:x.jsx(G6,{groupName:t.groupName,items:t.items},t.groupName)},t.groupName))]})})}function Y6(){const e=He(t=>t.warning.warning);return x.jsxs("div",{"data-testid":"quantities",className:"max-h-screen flex flex-col",children:[x.jsx(ua,{page:"/instructions",isNext:!0}),x.jsx(ua,{page:"/",isNext:!1}),x.jsx("div",{className:"flex h-screen justify-center text-center mt-8",children:x.jsx(K6,{})}),e&&x.jsx(mg,{})]})}const V6=[{path:"/a4recipe/",element:x.jsx(R6,{}),errorElement:x.jsx(J4,{})},{path:"/quantities",element:x.jsx(Y6,{})},{path:"/instructions",element:x.jsx(z6,{})},{path:"/print",element:x.jsx(B6,{})},{path:"/doublePrint",element:x.jsx(_L,{})}],q6=MD({reducer:{recipe:yL,groups:xL,actions:dL,warning:nL}}),X6=F4(V6);Ih.createRoot(document.getElementById("root")).render(x.jsx(Qe.StrictMode,{children:x.jsx(pI,{store:q6,children:x.jsx(Y4,{router:X6})})}));export{Ln as F,wn as a,Lr as b,Lm as c,J6 as f,Pi as h,x as j,Vn as s,He as u}; diff --git a/index.html b/index.html index 45da438..cb49623 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ a4recipe - +