From 907c76f5be2fdf3d4e3d1860057436d234347272 Mon Sep 17 00:00:00 2001 From: macareonie Date: Fri, 28 Jun 2024 06:17:21 +0800 Subject: [PATCH] Attempt #8.5 --- docs/404.html | 17 +++++++++-------- .../{index-DBCnVq1H.js => index-iOjcf6oA.js} | 2 +- docs/index.html | 6 +++--- 3 files changed, 13 insertions(+), 12 deletions(-) rename docs/assets/{index-DBCnVq1H.js => index-iOjcf6oA.js} (98%) diff --git a/docs/404.html b/docs/404.html index 6e33efd..a6d34ff 100644 --- a/docs/404.html +++ b/docs/404.html @@ -1,14 +1,15 @@ - + - - - - Vite + React - - + + -
+

+ If you are not redirected, click here to go to the + homepage. +

diff --git a/docs/assets/index-DBCnVq1H.js b/docs/assets/index-iOjcf6oA.js similarity index 98% rename from docs/assets/index-DBCnVq1H.js rename to docs/assets/index-iOjcf6oA.js index 8279f7d..950b7e5 100644 --- a/docs/assets/index-DBCnVq1H.js +++ b/docs/assets/index-iOjcf6oA.js @@ -67,4 +67,4 @@ Error generating stack: `+o.message+` */const Kh="6";try{window.__reactRouterVersion=Kh}catch{}const Yh="startTransition",Hs=qf[Yh];function Xh(e){let{basename:t,children:n,future:r,window:l}=e,o=g.useRef();o.current==null&&(o.current=ch({window:l,v5Compat:!0}));let i=o.current,[u,s]=g.useState({action:i.action,location:i.location}),{v7_startTransition:a}=r||{},p=g.useCallback(d=>{a&&Hs?Hs(()=>s(d)):s(d)},[s,a]);return g.useLayoutEffect(()=>i.listen(p),[i,p]),g.createElement(Wh,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:i,future:r})}var Vs;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Vs||(Vs={}));var Ws;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ws||(Ws={}));const wf=typeof document<"u"?de.useLayoutEffect:()=>{};function Gh(e){const t=g.useRef(null);return wf(()=>{t.current=e},[e]),g.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const dr=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},Tt=e=>e&&"window"in e&&e.window===e?e:dr(e).defaultView||window;function Zh(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function Jh(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function qh(){return Jh(/^Mac/i)}function bh(){return Zh(/Android/i)}function em(e){return e.mozInputSource===0&&e.isTrusted?!0:bh()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}class tm{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function Ef(e){let t=g.useRef({isFocused:!1,observer:null});wf(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Gh(r=>{e==null||e(r)});return g.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let l=r.target,o=i=>{t.current.isFocused=!1,l.disabled&&n(new tm("blur",i)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};l.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&l.disabled){var i;(i=t.current.observer)===null||i===void 0||i.disconnect();let u=l===document.activeElement?null:document.activeElement;l.dispatchEvent(new FocusEvent("blur",{relatedTarget:u})),l.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:u}))}}),t.current.observer.observe(l,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function nm(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:l}=e;const o=g.useCallback(s=>{if(s.target===s.currentTarget)return r&&r(s),l&&l(!1),!0},[r,l]),i=Ef(o),u=g.useCallback(s=>{const a=dr(s.target);s.target===s.currentTarget&&a.activeElement===s.target&&(n&&n(s),l&&l(!0),i(s))},[l,n,i]);return{focusProps:{onFocus:!t&&(n||l||r)?u:void 0,onBlur:!t&&(r||l)?o:void 0}}}let pr=null,yi=new Set,Hn=new Map,Mt=!1,wi=!1;const rm={Tab:!0,Escape:!0};function wu(e,t){for(let n of yi)n(e,t)}function lm(e){return!(e.metaKey||!qh()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function wl(e){Mt=!0,lm(e)&&(pr="keyboard",wu("keyboard",e))}function _e(e){pr="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Mt=!0,wu("pointer",e))}function Sf(e){em(e)&&(Mt=!0,pr="virtual")}function kf(e){e.target===window||e.target===document||(!Mt&&!wi&&(pr="virtual",wu("virtual",e)),Mt=!1,wi=!1)}function xf(){Mt=!1,wi=!0}function Ei(e){if(typeof window>"u"||Hn.get(Tt(e)))return;const t=Tt(e),n=dr(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Mt=!0,r.apply(this,arguments)},n.addEventListener("keydown",wl,!0),n.addEventListener("keyup",wl,!0),n.addEventListener("click",Sf,!0),t.addEventListener("focus",kf,!0),t.addEventListener("blur",xf,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",_e,!0),n.addEventListener("pointermove",_e,!0),n.addEventListener("pointerup",_e,!0)):(n.addEventListener("mousedown",_e,!0),n.addEventListener("mousemove",_e,!0),n.addEventListener("mouseup",_e,!0)),t.addEventListener("beforeunload",()=>{Cf(e)},{once:!0}),Hn.set(t,{focus:r})}const Cf=(e,t)=>{const n=Tt(e),r=dr(e);t&&r.removeEventListener("DOMContentLoaded",t),Hn.has(n)&&(n.HTMLElement.prototype.focus=Hn.get(n).focus,r.removeEventListener("keydown",wl,!0),r.removeEventListener("keyup",wl,!0),r.removeEventListener("click",Sf,!0),n.removeEventListener("focus",kf,!0),n.removeEventListener("blur",xf,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",_e,!0),r.removeEventListener("pointermove",_e,!0),r.removeEventListener("pointerup",_e,!0)):(r.removeEventListener("mousedown",_e,!0),r.removeEventListener("mousemove",_e,!0),r.removeEventListener("mouseup",_e,!0)),Hn.delete(n))};function om(e){const t=dr(e);let n;return t.readyState!=="loading"?Ei(e):(n=()=>{Ei(e)},t.addEventListener("DOMContentLoaded",n)),()=>Cf(e,n)}typeof document<"u"&&om();function Pf(){return pr!=="pointer"}const im=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function um(e,t,n){var r;const l=typeof window<"u"?Tt(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,o=typeof window<"u"?Tt(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,i=typeof window<"u"?Tt(n==null?void 0:n.target).HTMLElement:HTMLElement,u=typeof window<"u"?Tt(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||(n==null?void 0:n.target)instanceof l&&!im.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof o||(n==null?void 0:n.target)instanceof i&&(n==null?void 0:n.target.isContentEditable),!(e&&t==="keyboard"&&n instanceof u&&!rm[n.key])}function sm(e,t,n){Ei(),g.useEffect(()=>{let r=(l,o)=>{um(!!(n!=null&&n.isTextInput),l,o)&&e(Pf())};return yi.add(r),()=>{yi.delete(r)}},t)}function am(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:l}=e,o=g.useRef({isFocusWithin:!1}),i=g.useCallback(a=>{o.current.isFocusWithin&&!a.currentTarget.contains(a.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(a),l&&l(!1))},[n,l,o]),u=Ef(i),s=g.useCallback(a=>{!o.current.isFocusWithin&&document.activeElement===a.target&&(r&&r(a),l&&l(!0),o.current.isFocusWithin=!0,u(a))},[r,l,u]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:s,onBlur:i}}}let El=!1,wo=0;function Si(){El=!0,setTimeout(()=>{El=!1},50)}function Qs(e){e.pointerType==="touch"&&Si()}function cm(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",Qs):document.addEventListener("touchend",Si),wo++,()=>{wo--,!(wo>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Qs):document.removeEventListener("touchend",Si))}}function fm(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:l}=e,[o,i]=g.useState(!1),u=g.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;g.useEffect(cm,[]);let{hoverProps:s,triggerHoverEnd:a}=g.useMemo(()=>{let p=(v,y)=>{if(u.pointerType=y,l||y==="touch"||u.isHovered||!v.currentTarget.contains(v.target))return;u.isHovered=!0;let w=v.currentTarget;u.target=w,t&&t({type:"hoverstart",target:w,pointerType:y}),n&&n(!0),i(!0)},d=(v,y)=>{if(u.pointerType="",u.target=null,y==="touch"||!u.isHovered)return;u.isHovered=!1;let w=v.currentTarget;r&&r({type:"hoverend",target:w,pointerType:y}),n&&n(!1),i(!1)},h={};return typeof PointerEvent<"u"?(h.onPointerEnter=v=>{El&&v.pointerType==="mouse"||p(v,v.pointerType)},h.onPointerLeave=v=>{!l&&v.currentTarget.contains(v.target)&&d(v,v.pointerType)}):(h.onTouchStart=()=>{u.ignoreEmulatedMouseEvents=!0},h.onMouseEnter=v=>{!u.ignoreEmulatedMouseEvents&&!El&&p(v,"mouse"),u.ignoreEmulatedMouseEvents=!1},h.onMouseLeave=v=>{!l&&v.currentTarget.contains(v.target)&&d(v,"mouse")}),{hoverProps:h,triggerHoverEnd:d}},[t,n,r,l,u]);return g.useEffect(()=>{l&&a({currentTarget:u.target},u.pointerType)},[l]),{hoverProps:s,isHovered:o}}function dm(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,l=g.useRef({isFocused:!1,isFocusVisible:t||Pf()}),[o,i]=g.useState(!1),[u,s]=g.useState(()=>l.current.isFocused&&l.current.isFocusVisible),a=g.useCallback(()=>s(l.current.isFocused&&l.current.isFocusVisible),[]),p=g.useCallback(v=>{l.current.isFocused=v,i(v),a()},[a]);sm(v=>{l.current.isFocusVisible=v,a()},[],{isTextInput:n});let{focusProps:d}=nm({isDisabled:r,onFocusChange:p}),{focusWithinProps:h}=am({isDisabled:!r,onFocusWithinChange:p});return{isFocused:o,isFocusVisible:u,focusProps:r?h:d}}var pm=Object.defineProperty,hm=(e,t,n)=>t in e?pm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Eo=(e,t,n)=>(hm(e,typeof t!="symbol"?t+"":t,n),n);let mm=class{constructor(){Eo(this,"current",this.detect()),Eo(this,"handoffState","pending"),Eo(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},_f=new mm;function Tf(e){return _f.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function vm(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Al(){let e=[],t={addEventListener(n,r,l,o){return n.addEventListener(r,l,o),t.add(()=>n.removeEventListener(r,l,o))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return vm(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,l){let o=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:l}),this.add(()=>{Object.assign(n.style,{[r]:o})})},group(n){let r=Al();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let l of e.splice(r,1))l()}},dispose(){for(let n of e.splice(0))n()}};return t}function $f(){let[e]=g.useState(Al);return g.useEffect(()=>()=>e.dispose(),[e]),e}let Sl=(e,t)=>{_f.isServer?g.useEffect(e,t):g.useLayoutEffect(e,t)};function gm(e){let t=g.useRef(e);return Sl(()=>{t.current=e},[e]),t}let Nt=function(e){let t=gm(e);return de.useCallback((...n)=>t.current(...n),[t])};function ym(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function wm(e,t){return!(!e||!t||e.rightt.right||e.bottomt.bottom)}function Em({disabled:e=!1}={}){let t=g.useRef(null),[n,r]=g.useState(!1),l=$f(),o=Nt(()=>{t.current=null,r(!1),l.dispose()}),i=Nt(u=>{if(l.dispose(),t.current===null){t.current=u.currentTarget,r(!0);{let s=Tf(u.currentTarget);l.addEventListener(s,"pointerup",o,!1),l.addEventListener(s,"pointermove",a=>{if(t.current){let p=ym(a);r(wm(p,t.current.getBoundingClientRect()))}},!1),l.addEventListener(s,"pointercancel",o,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:i,onPointerUp:o,onClick:o}}}function Ks(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function hr(e,t,...n){if(e in t){let l=t[e];return typeof l=="function"?l(...n):l}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(l=>`"${l}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,hr),r}var ki=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(ki||{}),Sm=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Sm||{});function Eu({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:l,visible:o=!0,name:i,mergeRefs:u}){u=u??km;let s=Nf(t,e);if(o)return Or(s,n,r,i,u);let a=l??0;if(a&2){let{static:p=!1,...d}=s;if(p)return Or(d,n,r,i,u)}if(a&1){let{unmount:p=!0,...d}=s;return hr(p?0:1,{0(){return null},1(){return Or({...d,hidden:!0,style:{display:"none"}},n,r,i,u)}})}return Or(s,n,r,i,u)}function Or(e,t={},n,r,l){let{as:o=n,children:i,refName:u="ref",...s}=So(e,["unmount","static"]),a=e.ref!==void 0?{[u]:e.ref}:{},p=typeof i=="function"?i(t):i;"className"in s&&s.className&&typeof s.className=="function"&&(s.className=s.className(t)),s["aria-labelledby"]&&s["aria-labelledby"]===s.id&&(s["aria-labelledby"]=void 0);let d={};if(t){let h=!1,v=[];for(let[y,w]of Object.entries(t))typeof w=="boolean"&&(h=!0),w===!0&&v.push(y.replace(/([A-Z])/g,k=>`-${k.toLowerCase()}`));if(h){d["data-headlessui-state"]=v.join(" ");for(let y of v)d[`data-${y}`]=""}}if(o===g.Fragment&&(Object.keys(Bt(s)).length>0||Object.keys(Bt(d)).length>0))if(!g.isValidElement(p)||Array.isArray(p)&&p.length>1){if(Object.keys(Bt(s)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Bt(s)).concat(Object.keys(Bt(d))).map(h=>` - ${h}`).join(` `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(h=>` - ${h}`).join(` `)].join(` -`))}else{let h=p.props,v=h==null?void 0:h.className,y=typeof v=="function"?(...f)=>Ks(v(...f),s.className):Ks(v,s.className),w=y?{className:y}:{},k=Nf(p.props,Bt(So(s,["ref"])));for(let f in d)f in k&&delete d[f];return g.cloneElement(p,Object.assign({},k,d,a,{ref:l(p.ref,a.ref)},w))}return g.createElement(o,Object.assign({},So(s,["ref"]),o!==g.Fragment&&a,o!==g.Fragment&&d),p)}function Lf(){let e=g.useRef([]),t=g.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function km(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function Nf(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let l in r)l.startsWith("on")&&typeof r[l]=="function"?(n[l]!=null||(n[l]=[]),n[l].push(r[l])):t[l]=r[l];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[l=>{var o;return(o=l==null?void 0:l.preventDefault)==null?void 0:o.call(l)}]);for(let r in n)Object.assign(t,{[r](l,...o){let i=n[r];for(let u of i){if((l instanceof Event||(l==null?void 0:l.nativeEvent)instanceof Event)&&l.defaultPrevented)return;u(l,...o)}}});return t}function Ys(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let l in r)l.startsWith("on")&&typeof r[l]=="function"?(n[l]!=null||(n[l]=[]),n[l].push(r[l])):t[l]=r[l];for(let r in n)Object.assign(t,{[r](...l){let o=n[r];for(let i of o)i==null||i(...l)}});return t}function Su(e){var t;return Object.assign(g.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Bt(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function So(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function xm(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&Cm(n)?!1:r}function Cm(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let Ff=Symbol();function Pm(e,t=!0){return Object.assign(e,{[Ff]:t})}function ku(...e){let t=g.useRef(e);g.useEffect(()=>{t.current=e},[e]);let n=Nt(r=>{for(let l of t.current)l!=null&&(typeof l=="function"?l(r):l.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Ff]))?void 0:n}var At=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(At||{});let _m=g.createContext(()=>{});function Tm({value:e,children:t}){return de.createElement(_m.Provider,{value:e},t)}function Xs(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function $m(e,t){let[n,r]=g.useState(()=>Xs(e));return Sl(()=>{r(Xs(e))},[e.type,e.as]),Sl(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}function Lm(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Nm(e=0){let[t,n]=g.useState(e),r=g.useCallback(s=>n(s),[t]),l=g.useCallback(s=>n(a=>a|s),[t]),o=g.useCallback(s=>(t&s)===s,[t]),i=g.useCallback(s=>n(a=>a&~s),[n]),u=g.useCallback(s=>n(a=>a^s),[n]);return{flags:t,setFlag:r,addFlag:l,hasFlag:o,removeFlag:i,toggleFlag:u}}var Fm=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(Fm||{});function Rm(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function zm(e,t,n,r){let[l,o]=g.useState(n),{hasFlag:i,addFlag:u,removeFlag:s}=Nm(e&&l?3:0),a=g.useRef(!1),p=g.useRef(!1),d=$f();return Sl(function h(){var v;if(!e)return;n&&o(!0);let y=t.current;return y?((v=void 0)==null||v.call(r,n),Om(y,{inFlight:a,prepare(){p.current?p.current=!1:p.current=a.current,a.current=!0,!p.current&&(n?(u(3),s(4)):(u(4),s(2)))},run(){p.current?n?(s(3),u(4)):(s(4),u(3)):n?s(1):u(1)},done(){var w;p.current&&typeof y.getAnimations=="function"&&y.getAnimations().length>0||(a.current=!1,s(7),n||o(!1),(w=void 0)==null||w.call(r,n))}})):n?(u(3),d.nextFrame(()=>h())):void 0},[e,n,t,d]),e?[l,{closed:i(1),enter:i(2),leave:i(4),transition:i(2)||i(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Om(e,{prepare:t,run:n,done:r,inFlight:l}){let o=Al();return Mm(e,{prepare:t,inFlight:l}),o.nextFrame(()=>{o.add(jm(e,r)),n()}),o.dispose}function jm(e,t){let n=Lm(t),r=Al();if(!e)return r.dispose;let{transitionDuration:l,transitionDelay:o}=getComputedStyle(e),[i,u]=[l,o].map(a=>{let[p=0]=a.split(",").filter(Boolean).map(d=>d.includes("ms")?parseFloat(d):parseFloat(d)*1e3).sort((d,h)=>h-d);return p}),s=i+u;if(s!==0){let a=r.group(p=>{let d=p.setTimeout(()=>{n(),p.dispose()},s);p.addEventListener(e,"transitionrun",h=>{h.target===h.currentTarget&&(d(),p.addEventListener(e,"transitioncancel",v=>{v.target===v.currentTarget&&(n(),a())}))})});r.addEventListener(e,"transitionend",p=>{p.target===p.currentTarget&&(n(),r.dispose())})}else n();return r.dispose}function Mm(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}let Hl=g.createContext(null);Hl.displayName="OpenClosedContext";var ir=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ir||{});function Im(){return g.useContext(Hl)}function Dm({value:e,children:t}){return de.createElement(Hl.Provider,{value:e},t)}function Um({children:e}){return de.createElement(Hl.Provider,{value:null},e)}var Gs;let Bm=(Gs=de.startTransition)!=null?Gs:function(e){e()};var Am=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Am||{}),Hm=(e=>(e[e.ToggleDisclosure=0]="ToggleDisclosure",e[e.CloseDisclosure=1]="CloseDisclosure",e[e.SetButtonId=2]="SetButtonId",e[e.SetPanelId=3]="SetPanelId",e[e.LinkPanel=4]="LinkPanel",e[e.UnlinkPanel=5]="UnlinkPanel",e))(Hm||{});let Vm={0:e=>({...e,disclosureState:hr(e.disclosureState,{0:1,1:0})}),1:e=>e.disclosureState===1?e:{...e,disclosureState:1},4(e){return e.linkedPanel===!0?e:{...e,linkedPanel:!0}},5(e){return e.linkedPanel===!1?e:{...e,linkedPanel:!1}},2(e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},3(e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}}},xu=g.createContext(null);xu.displayName="DisclosureContext";function Cu(e){let t=g.useContext(xu);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Cu),n}return t}let Pu=g.createContext(null);Pu.displayName="DisclosureAPIContext";function Rf(e){let t=g.useContext(Pu);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Rf),n}return t}let _u=g.createContext(null);_u.displayName="DisclosurePanelContext";function Wm(){return g.useContext(_u)}function Qm(e,t){return hr(t.type,Vm,e,t)}let Km=g.Fragment;function Ym(e,t){let{defaultOpen:n=!1,...r}=e,l=g.useRef(null),o=ku(t,Pm(k=>{l.current=k},e.as===void 0||e.as===g.Fragment)),i=g.useRef(null),u=g.useRef(null),s=g.useReducer(Qm,{disclosureState:n?0:1,linkedPanel:!1,buttonRef:u,panelRef:i,buttonId:null,panelId:null}),[{disclosureState:a,buttonId:p},d]=s,h=Nt(k=>{d({type:1});let f=Tf(l);if(!f||!p)return;let c=k?k instanceof HTMLElement?k:k.current instanceof HTMLElement?k.current:f.getElementById(p):f.getElementById(p);c==null||c.focus()}),v=g.useMemo(()=>({close:h}),[h]),y=g.useMemo(()=>({open:a===0,close:h}),[a,h]),w={ref:o};return de.createElement(xu.Provider,{value:s},de.createElement(Pu.Provider,{value:v},de.createElement(Tm,{value:h},de.createElement(Dm,{value:hr(a,{0:ir.Open,1:ir.Closed})},Eu({ourProps:w,theirProps:r,slot:y,defaultTag:Km,name:"Disclosure"})))))}let Xm="button";function Gm(e,t){let n=g.useId(),{id:r=`headlessui-disclosure-button-${n}`,disabled:l=!1,autoFocus:o=!1,...i}=e,[u,s]=Cu("Disclosure.Button"),a=Wm(),p=a===null?!1:a===u.panelId,d=g.useRef(null),h=ku(d,t,p?null:u.buttonRef),v=Lf();g.useEffect(()=>{if(!p)return s({type:2,buttonId:r}),()=>{s({type:2,buttonId:null})}},[r,s,p]);let y=Nt(N=>{var b;if(p){if(u.disclosureState===1)return;switch(N.key){case At.Space:case At.Enter:N.preventDefault(),N.stopPropagation(),s({type:0}),(b=u.buttonRef.current)==null||b.focus();break}}else switch(N.key){case At.Space:case At.Enter:N.preventDefault(),N.stopPropagation(),s({type:0});break}}),w=Nt(N=>{switch(N.key){case At.Space:N.preventDefault();break}}),k=Nt(N=>{var b;xm(N.currentTarget)||l||(p?(s({type:0}),(b=u.buttonRef.current)==null||b.focus()):s({type:0}))}),{isFocusVisible:f,focusProps:c}=dm({autoFocus:o}),{isHovered:m,hoverProps:E}=fm({isDisabled:l}),{pressed:x,pressProps:_}=Em({disabled:l}),T=g.useMemo(()=>({open:u.disclosureState===0,hover:m,active:x,disabled:l,focus:f,autofocus:o}),[u,m,x,f,l,o]),$=$m(e,d),B=Ys(p?{ref:h,type:$,disabled:l||void 0,autoFocus:o,onKeyDown:y,onClick:k}:{ref:h,id:r,type:$,"aria-expanded":u.disclosureState===0,"aria-controls":u.linkedPanel?u.panelId:void 0,disabled:l||void 0,autoFocus:o,onKeyDown:y,onKeyUp:w,onClick:k},c,E,_);return Eu({mergeRefs:v,ourProps:B,theirProps:i,slot:T,defaultTag:Xm,name:"Disclosure.Button"})}let Zm="div",Jm=ki.RenderStrategy|ki.Static;function qm(e,t){let n=g.useId(),{id:r=`headlessui-disclosure-panel-${n}`,transition:l=!1,...o}=e,[i,u]=Cu("Disclosure.Panel"),{close:s}=Rf("Disclosure.Panel"),a=Lf(),p=ku(t,i.panelRef,k=>{Bm(()=>u({type:k?4:5}))});g.useEffect(()=>(u({type:3,panelId:r}),()=>{u({type:3,panelId:null})}),[r,u]);let d=Im(),[h,v]=zm(l,i.panelRef,d!==null?(d&ir.Open)===ir.Open:i.disclosureState===0),y=g.useMemo(()=>({open:i.disclosureState===0,close:s}),[i.disclosureState,s]),w={ref:p,id:r,...Rm(v)};return de.createElement(Um,null,de.createElement(_u.Provider,{value:i.panelId},Eu({mergeRefs:a,ourProps:w,theirProps:o,slot:y,defaultTag:Zm,features:Jm,visible:h,name:"Disclosure.Panel"})))}let bm=Su(Ym),xi=Su(Gm),zf=Su(qm),ev=Object.assign(bm,{Button:xi,Panel:zf});function tv({title:e,titleId:t,...n},r){return g.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?g.createElement("title",{id:t},e):null,g.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const nv=g.forwardRef(tv);function rv({title:e,titleId:t,...n},r){return g.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?g.createElement("title",{id:t},e):null,g.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const lv=g.forwardRef(rv),Zs=[{name:"Home",href:"/",current:!0},{name:"About Me",href:"/about",current:!1},{name:"Food Blog",href:"/foodblog",current:!1}];function Js(...e){return e.filter(Boolean).join(" ")}function ov(){return L.jsx(ev,{as:"nav",className:"bg-gray-800",children:({open:e})=>L.jsxs(L.Fragment,{children:[L.jsx("div",{className:"mx-auto max-w-7xl px-2 sm:px-6 lg:px-8",children:L.jsxs("div",{className:"relative flex h-16 items-center justify-between",children:[L.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center sm:hidden",children:L.jsxs(xi,{className:"relative inline-flex items-center justify-center rounded-md p-2 text-gray-400 hover:bg-gray-700 hover:text-white focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white",children:[L.jsx("span",{className:"absolute -inset-0.5"}),L.jsx("span",{className:"sr-only",children:"Open main menu"}),e?L.jsx(lv,{className:"block h-6 w-6","aria-hidden":"true"}):L.jsx(nv,{className:"block h-6 w-6","aria-hidden":"true"})]})}),L.jsxs("div",{className:"flex flex-1 items-center justify-center sm:items-stretch sm:justify-start",children:[L.jsx("div",{className:"flex flex-shrink-0 items-center",children:L.jsx("img",{className:"w-10 h-10 rounded-full",src:"https://i.pinimg.com/736x/be/13/d7/be13d79969e314e814d19a6c211772a8.jpg",alt:"Random Picture"})}),L.jsx("div",{className:"hidden sm:ml-6 sm:block",children:L.jsx("div",{className:"flex space-x-4",children:Zs.map(t=>L.jsx("a",{href:t.href,className:Js(t.current?"bg-gray-900 text-white":"text-gray-300 hover:bg-gray-700 hover:text-white","rounded-md px-3 py-2 text-lg font-medium"),"aria-current":t.current?"page":void 0,children:t.name},t.name))})})]})]})}),L.jsx(zf,{className:"sm:hidden",children:L.jsx("div",{className:"space-y-1 px-2 pb-3 pt-2",children:Zs.map(t=>L.jsx(xi,{as:"a",href:t.href,className:Js(t.current?"bg-gray-900 text-white":"text-gray-300 hover:bg-gray-700 hover:text-white","block rounded-md px-3 py-2 text-base font-medium"),"aria-current":t.current?"page":void 0,children:t.name},t.name))})})]})})}function iv(){return L.jsxs(L.Fragment,{children:[L.jsx("div",{children:"About"}),L.jsx("p",{children:" about me"})]})}function uv(){return L.jsxs(L.Fragment,{children:[L.jsx("div",{children:"Home"}),L.jsx("p",{children:"Home page stuff here"})]})}function sv(){return L.jsxs(L.Fragment,{children:[L.jsx("div",{children:"Food Blog"}),L.jsx("p",{children:"food recipes and random stuff"})]})}function av(){return L.jsx(L.Fragment,{children:L.jsx("div",{className:"fixed bottom-0 w-full bg-black text-white px-4 p-10",children:"Footer"})})}function cv(){return L.jsxs("div",{children:[L.jsxs(Xh,{basename:"/",children:[L.jsx(ov,{}),L.jsxs(Qh,{children:[L.jsx(Rn,{exact:!0,path:"/",element:L.jsx(uv,{})}),L.jsx(Rn,{exact:!0,path:"/about",element:L.jsx(iv,{})}),L.jsx(Rn,{exact:!0,path:"/foodblog",element:L.jsx(sv,{})}),L.jsx(Rn,{exact:!0,path:"*",element:L.jsx("div",{children:"Page Not Found"})})]})]}),L.jsx(av,{})]})}ko.createRoot(document.getElementById("root")).render(L.jsx(de.StrictMode,{children:L.jsx(cv,{})})); +`))}else{let h=p.props,v=h==null?void 0:h.className,y=typeof v=="function"?(...f)=>Ks(v(...f),s.className):Ks(v,s.className),w=y?{className:y}:{},k=Nf(p.props,Bt(So(s,["ref"])));for(let f in d)f in k&&delete d[f];return g.cloneElement(p,Object.assign({},k,d,a,{ref:l(p.ref,a.ref)},w))}return g.createElement(o,Object.assign({},So(s,["ref"]),o!==g.Fragment&&a,o!==g.Fragment&&d),p)}function Lf(){let e=g.useRef([]),t=g.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function km(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function Nf(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let l in r)l.startsWith("on")&&typeof r[l]=="function"?(n[l]!=null||(n[l]=[]),n[l].push(r[l])):t[l]=r[l];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[l=>{var o;return(o=l==null?void 0:l.preventDefault)==null?void 0:o.call(l)}]);for(let r in n)Object.assign(t,{[r](l,...o){let i=n[r];for(let u of i){if((l instanceof Event||(l==null?void 0:l.nativeEvent)instanceof Event)&&l.defaultPrevented)return;u(l,...o)}}});return t}function Ys(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let l in r)l.startsWith("on")&&typeof r[l]=="function"?(n[l]!=null||(n[l]=[]),n[l].push(r[l])):t[l]=r[l];for(let r in n)Object.assign(t,{[r](...l){let o=n[r];for(let i of o)i==null||i(...l)}});return t}function Su(e){var t;return Object.assign(g.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Bt(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function So(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function xm(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&Cm(n)?!1:r}function Cm(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let Ff=Symbol();function Pm(e,t=!0){return Object.assign(e,{[Ff]:t})}function ku(...e){let t=g.useRef(e);g.useEffect(()=>{t.current=e},[e]);let n=Nt(r=>{for(let l of t.current)l!=null&&(typeof l=="function"?l(r):l.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Ff]))?void 0:n}var At=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(At||{});let _m=g.createContext(()=>{});function Tm({value:e,children:t}){return de.createElement(_m.Provider,{value:e},t)}function Xs(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function $m(e,t){let[n,r]=g.useState(()=>Xs(e));return Sl(()=>{r(Xs(e))},[e.type,e.as]),Sl(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}function Lm(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Nm(e=0){let[t,n]=g.useState(e),r=g.useCallback(s=>n(s),[t]),l=g.useCallback(s=>n(a=>a|s),[t]),o=g.useCallback(s=>(t&s)===s,[t]),i=g.useCallback(s=>n(a=>a&~s),[n]),u=g.useCallback(s=>n(a=>a^s),[n]);return{flags:t,setFlag:r,addFlag:l,hasFlag:o,removeFlag:i,toggleFlag:u}}var Fm=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(Fm||{});function Rm(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function zm(e,t,n,r){let[l,o]=g.useState(n),{hasFlag:i,addFlag:u,removeFlag:s}=Nm(e&&l?3:0),a=g.useRef(!1),p=g.useRef(!1),d=$f();return Sl(function h(){var v;if(!e)return;n&&o(!0);let y=t.current;return y?((v=void 0)==null||v.call(r,n),Om(y,{inFlight:a,prepare(){p.current?p.current=!1:p.current=a.current,a.current=!0,!p.current&&(n?(u(3),s(4)):(u(4),s(2)))},run(){p.current?n?(s(3),u(4)):(s(4),u(3)):n?s(1):u(1)},done(){var w;p.current&&typeof y.getAnimations=="function"&&y.getAnimations().length>0||(a.current=!1,s(7),n||o(!1),(w=void 0)==null||w.call(r,n))}})):n?(u(3),d.nextFrame(()=>h())):void 0},[e,n,t,d]),e?[l,{closed:i(1),enter:i(2),leave:i(4),transition:i(2)||i(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Om(e,{prepare:t,run:n,done:r,inFlight:l}){let o=Al();return Mm(e,{prepare:t,inFlight:l}),o.nextFrame(()=>{o.add(jm(e,r)),n()}),o.dispose}function jm(e,t){let n=Lm(t),r=Al();if(!e)return r.dispose;let{transitionDuration:l,transitionDelay:o}=getComputedStyle(e),[i,u]=[l,o].map(a=>{let[p=0]=a.split(",").filter(Boolean).map(d=>d.includes("ms")?parseFloat(d):parseFloat(d)*1e3).sort((d,h)=>h-d);return p}),s=i+u;if(s!==0){let a=r.group(p=>{let d=p.setTimeout(()=>{n(),p.dispose()},s);p.addEventListener(e,"transitionrun",h=>{h.target===h.currentTarget&&(d(),p.addEventListener(e,"transitioncancel",v=>{v.target===v.currentTarget&&(n(),a())}))})});r.addEventListener(e,"transitionend",p=>{p.target===p.currentTarget&&(n(),r.dispose())})}else n();return r.dispose}function Mm(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}let Hl=g.createContext(null);Hl.displayName="OpenClosedContext";var ir=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ir||{});function Im(){return g.useContext(Hl)}function Dm({value:e,children:t}){return de.createElement(Hl.Provider,{value:e},t)}function Um({children:e}){return de.createElement(Hl.Provider,{value:null},e)}var Gs;let Bm=(Gs=de.startTransition)!=null?Gs:function(e){e()};var Am=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Am||{}),Hm=(e=>(e[e.ToggleDisclosure=0]="ToggleDisclosure",e[e.CloseDisclosure=1]="CloseDisclosure",e[e.SetButtonId=2]="SetButtonId",e[e.SetPanelId=3]="SetPanelId",e[e.LinkPanel=4]="LinkPanel",e[e.UnlinkPanel=5]="UnlinkPanel",e))(Hm||{});let Vm={0:e=>({...e,disclosureState:hr(e.disclosureState,{0:1,1:0})}),1:e=>e.disclosureState===1?e:{...e,disclosureState:1},4(e){return e.linkedPanel===!0?e:{...e,linkedPanel:!0}},5(e){return e.linkedPanel===!1?e:{...e,linkedPanel:!1}},2(e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},3(e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}}},xu=g.createContext(null);xu.displayName="DisclosureContext";function Cu(e){let t=g.useContext(xu);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Cu),n}return t}let Pu=g.createContext(null);Pu.displayName="DisclosureAPIContext";function Rf(e){let t=g.useContext(Pu);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Rf),n}return t}let _u=g.createContext(null);_u.displayName="DisclosurePanelContext";function Wm(){return g.useContext(_u)}function Qm(e,t){return hr(t.type,Vm,e,t)}let Km=g.Fragment;function Ym(e,t){let{defaultOpen:n=!1,...r}=e,l=g.useRef(null),o=ku(t,Pm(k=>{l.current=k},e.as===void 0||e.as===g.Fragment)),i=g.useRef(null),u=g.useRef(null),s=g.useReducer(Qm,{disclosureState:n?0:1,linkedPanel:!1,buttonRef:u,panelRef:i,buttonId:null,panelId:null}),[{disclosureState:a,buttonId:p},d]=s,h=Nt(k=>{d({type:1});let f=Tf(l);if(!f||!p)return;let c=k?k instanceof HTMLElement?k:k.current instanceof HTMLElement?k.current:f.getElementById(p):f.getElementById(p);c==null||c.focus()}),v=g.useMemo(()=>({close:h}),[h]),y=g.useMemo(()=>({open:a===0,close:h}),[a,h]),w={ref:o};return de.createElement(xu.Provider,{value:s},de.createElement(Pu.Provider,{value:v},de.createElement(Tm,{value:h},de.createElement(Dm,{value:hr(a,{0:ir.Open,1:ir.Closed})},Eu({ourProps:w,theirProps:r,slot:y,defaultTag:Km,name:"Disclosure"})))))}let Xm="button";function Gm(e,t){let n=g.useId(),{id:r=`headlessui-disclosure-button-${n}`,disabled:l=!1,autoFocus:o=!1,...i}=e,[u,s]=Cu("Disclosure.Button"),a=Wm(),p=a===null?!1:a===u.panelId,d=g.useRef(null),h=ku(d,t,p?null:u.buttonRef),v=Lf();g.useEffect(()=>{if(!p)return s({type:2,buttonId:r}),()=>{s({type:2,buttonId:null})}},[r,s,p]);let y=Nt(N=>{var b;if(p){if(u.disclosureState===1)return;switch(N.key){case At.Space:case At.Enter:N.preventDefault(),N.stopPropagation(),s({type:0}),(b=u.buttonRef.current)==null||b.focus();break}}else switch(N.key){case At.Space:case At.Enter:N.preventDefault(),N.stopPropagation(),s({type:0});break}}),w=Nt(N=>{switch(N.key){case At.Space:N.preventDefault();break}}),k=Nt(N=>{var b;xm(N.currentTarget)||l||(p?(s({type:0}),(b=u.buttonRef.current)==null||b.focus()):s({type:0}))}),{isFocusVisible:f,focusProps:c}=dm({autoFocus:o}),{isHovered:m,hoverProps:E}=fm({isDisabled:l}),{pressed:x,pressProps:_}=Em({disabled:l}),T=g.useMemo(()=>({open:u.disclosureState===0,hover:m,active:x,disabled:l,focus:f,autofocus:o}),[u,m,x,f,l,o]),$=$m(e,d),B=Ys(p?{ref:h,type:$,disabled:l||void 0,autoFocus:o,onKeyDown:y,onClick:k}:{ref:h,id:r,type:$,"aria-expanded":u.disclosureState===0,"aria-controls":u.linkedPanel?u.panelId:void 0,disabled:l||void 0,autoFocus:o,onKeyDown:y,onKeyUp:w,onClick:k},c,E,_);return Eu({mergeRefs:v,ourProps:B,theirProps:i,slot:T,defaultTag:Xm,name:"Disclosure.Button"})}let Zm="div",Jm=ki.RenderStrategy|ki.Static;function qm(e,t){let n=g.useId(),{id:r=`headlessui-disclosure-panel-${n}`,transition:l=!1,...o}=e,[i,u]=Cu("Disclosure.Panel"),{close:s}=Rf("Disclosure.Panel"),a=Lf(),p=ku(t,i.panelRef,k=>{Bm(()=>u({type:k?4:5}))});g.useEffect(()=>(u({type:3,panelId:r}),()=>{u({type:3,panelId:null})}),[r,u]);let d=Im(),[h,v]=zm(l,i.panelRef,d!==null?(d&ir.Open)===ir.Open:i.disclosureState===0),y=g.useMemo(()=>({open:i.disclosureState===0,close:s}),[i.disclosureState,s]),w={ref:p,id:r,...Rm(v)};return de.createElement(Um,null,de.createElement(_u.Provider,{value:i.panelId},Eu({mergeRefs:a,ourProps:w,theirProps:o,slot:y,defaultTag:Zm,features:Jm,visible:h,name:"Disclosure.Panel"})))}let bm=Su(Ym),xi=Su(Gm),zf=Su(qm),ev=Object.assign(bm,{Button:xi,Panel:zf});function tv({title:e,titleId:t,...n},r){return g.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?g.createElement("title",{id:t},e):null,g.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const nv=g.forwardRef(tv);function rv({title:e,titleId:t,...n},r){return g.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?g.createElement("title",{id:t},e):null,g.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const lv=g.forwardRef(rv),Zs=[{name:"Home",href:"/",current:!0},{name:"About Me",href:"/me/about",current:!1},{name:"Food Blog",href:"/me/foodblog",current:!1}];function Js(...e){return e.filter(Boolean).join(" ")}function ov(){return L.jsx(ev,{as:"nav",className:"bg-gray-800",children:({open:e})=>L.jsxs(L.Fragment,{children:[L.jsx("div",{className:"mx-auto max-w-7xl px-2 sm:px-6 lg:px-8",children:L.jsxs("div",{className:"relative flex h-16 items-center justify-between",children:[L.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center sm:hidden",children:L.jsxs(xi,{className:"relative inline-flex items-center justify-center rounded-md p-2 text-gray-400 hover:bg-gray-700 hover:text-white focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white",children:[L.jsx("span",{className:"absolute -inset-0.5"}),L.jsx("span",{className:"sr-only",children:"Open main menu"}),e?L.jsx(lv,{className:"block h-6 w-6","aria-hidden":"true"}):L.jsx(nv,{className:"block h-6 w-6","aria-hidden":"true"})]})}),L.jsxs("div",{className:"flex flex-1 items-center justify-center sm:items-stretch sm:justify-start",children:[L.jsx("div",{className:"flex flex-shrink-0 items-center",children:L.jsx("img",{className:"w-10 h-10 rounded-full",src:"https://i.pinimg.com/736x/be/13/d7/be13d79969e314e814d19a6c211772a8.jpg",alt:"Random Picture"})}),L.jsx("div",{className:"hidden sm:ml-6 sm:block",children:L.jsx("div",{className:"flex space-x-4",children:Zs.map(t=>L.jsx("a",{href:t.href,className:Js(t.current?"bg-gray-900 text-white":"text-gray-300 hover:bg-gray-700 hover:text-white","rounded-md px-3 py-2 text-lg font-medium"),"aria-current":t.current?"page":void 0,children:t.name},t.name))})})]})]})}),L.jsx(zf,{className:"sm:hidden",children:L.jsx("div",{className:"space-y-1 px-2 pb-3 pt-2",children:Zs.map(t=>L.jsx(xi,{as:"a",href:t.href,className:Js(t.current?"bg-gray-900 text-white":"text-gray-300 hover:bg-gray-700 hover:text-white","block rounded-md px-3 py-2 text-base font-medium"),"aria-current":t.current?"page":void 0,children:t.name},t.name))})})]})})}function iv(){return L.jsxs(L.Fragment,{children:[L.jsx("div",{children:"About"}),L.jsx("p",{children:" about me"})]})}function uv(){return L.jsxs(L.Fragment,{children:[L.jsx("div",{children:"Home"}),L.jsx("p",{children:"Home page stuff here"})]})}function sv(){return L.jsxs(L.Fragment,{children:[L.jsx("div",{children:"Food Blog"}),L.jsx("p",{children:"food recipes and random stuff"})]})}function av(){return L.jsx(L.Fragment,{children:L.jsx("div",{className:"fixed bottom-0 w-full bg-black text-white px-4 p-10",children:"Footer"})})}function cv(){return L.jsxs("div",{children:[L.jsxs(Xh,{basename:"/me",children:[L.jsx(ov,{}),L.jsxs(Qh,{children:[L.jsx(Rn,{path:"/",element:L.jsx(uv,{})}),L.jsx(Rn,{path:"/about",element:L.jsx(iv,{})}),L.jsx(Rn,{path:"/foodblog",element:L.jsx(sv,{})}),L.jsx(Rn,{path:"*",element:L.jsx("div",{children:"Page Not Found"})})]})]}),L.jsx(av,{})]})}ko.createRoot(document.getElementById("root")).render(L.jsx(de.StrictMode,{children:L.jsx(cv,{})})); diff --git a/docs/index.html b/docs/index.html index 038ccc5..d0be8b4 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2,11 +2,11 @@ - + Vite + React - - + +