diff --git a/assets/Home-BG5u3Gte.js b/assets/Home-IPdwMo5w.js similarity index 97% rename from assets/Home-BG5u3Gte.js rename to assets/Home-IPdwMo5w.js index f92ce82..c566807 100644 --- a/assets/Home-BG5u3Gte.js +++ b/assets/Home-IPdwMo5w.js @@ -1,2 +1,2 @@ -import{u as k,q as u,j as r,r as C,B as v,a as w}from"./index-422DQ6gI.js";import{u as L,a as R,t as A,c as $,b as G,d as N,e as q,f as z,i as V,g as F,n as M,P as y,h as _,E as S}from"./PageLayout-t9exb1nu.js";const B=()=>{const[t]=k(),s=t.get(u.tags),e=t.get(u.query),a=t.get(u.page),o=(()=>{const n=new URLSearchParams(t);return n.set(u.tags,`(${s||"front_page"})`),n.set(u.page,(parseInt(a??"1")-1).toString()),e&&(n.set(u.restrictSearchableAttributes,"title,comment_text,url,story_text,author"),n.set(u.tags,"story"),n.set(u.query,e)),n.toString()})(),c=e?"search_by_date":"search";return L({queryKey:["HN",o],queryFn:()=>R(`http://hn.algolia.com/api/v1/${c}?${o}`)})},U=({title:t,createdBy:s,upvotesCount:e,commentsCount:a,createdAt:g,link:o,onClick:c})=>r.jsx("div",{className:"item cursor-pointer py-4 px-5 border bg-opacity-25 border-transparent transition hover:border-primary-500 dark:hover:bg-primary-600 dark:hover:bg-opacity-[0.1] border-b group",onClick:c,children:r.jsxs("div",{className:"w-full",children:[r.jsx("h4",{className:"font-bold dark:font-semibold tracking-wide text-lg leading-tight",children:t}),o?r.jsx("div",{className:"w-full overflow-hidden",children:r.jsx("a",{className:"inline-block mt-2 text-sm text-gray-600 dark:text-gray-400 leading-tight truncate min-w-0 font-medium",href:o,target:"_blank",rel:"noopener",onClick:i=>i.stopPropagation(),children:o})}):null,r.jsxs("div",{className:"flex mt-1 items-center justify-between flex-wrap",children:[r.jsxs("div",{className:"font-semibold text-sm mr-2 flex items-center flex-shrink-0 text-primary-700 dark:text-primary-600 text-opacity-100",children:[r.jsx("span",{className:"font-bold",children:e}),r.jsx("span",{className:"mx-2",children:"•"}),r.jsx("span",{className:"opacity-90",children:s}),r.jsx("span",{className:"text-gray-400 dark:text-gray-500 mx-2",children:"•"}),r.jsx("span",{className:"text-gray-500 text-xs font-medium",children:A(g)})]}),r.jsx("div",{className:"flex items-center",children:r.jsxs("div",{className:"comments uppercase text-xs transition font-semibold group-hover:font-bold text-gray-600 dark:text-gray-400 group-hover:text-white",children:[a," Comments"]})})]})]})});var O=$("pagination").parts("root","item","ellipsis","prevTrigger","nextTrigger"),x=O.build(),P=G({getRootId:t=>{var s;return((s=t.ids)==null?void 0:s.root)??`pagination:${t.id}`},getPrevTriggerId:t=>{var s;return((s=t.ids)==null?void 0:s.prevTrigger)??`pagination:${t.id}:prev`},getNextTriggerId:t=>{var s;return((s=t.ids)==null?void 0:s.nextTrigger)??`pagination:${t.id}:next`},getEllipsisId:(t,s)=>{var e,a;return((a=(e=t.ids)==null?void 0:e.ellipsis)==null?void 0:a.call(e,s))??`pagination:${t.id}:ellipsis:${s}`},getItemId:(t,s)=>{var e,a;return((a=(e=t.ids)==null?void 0:e.item)==null?void 0:a.call(e,s))??`pagination:${t.id}:item:${s}`}}),b=(t,s)=>{let e=s-t+1;return Array.from({length:e},(a,g)=>g+t)},Q=t=>t.map(s=>typeof s=="number"?{type:"page",value:s}:{type:"ellipsis"}),f="ellipsis",D=t=>{const s=Math.min(2*t.siblingCount+5,t.totalPages),e=1,a=t.totalPages,g=Math.max(t.page-t.siblingCount,e),o=Math.min(t.page+t.siblingCount,a),c=g>e+1,i=oQ(D(t));function X(t,s,e){const a=t.context.totalPages,g=t.context.page,o=t.context.translations,c=t.context.previousPage,i=t.context.nextPage,n=t.context.pageRange,p=t.context.type==="button",j=g===1,T=g===a;return{page:g,totalPages:a,pages:H(t.context),previousPage:c,nextPage:i,pageRange:n,isFirstPage:j,isLastPage:T,slice(d){return d.slice(n.start,n.end)},setCount(d){s({type:"SET_COUNT",count:d})},setPageSize(d){s({type:"SET_PAGE_SIZE",size:d})},setPage(d){s({type:"SET_PAGE",page:d})},rootProps:e.element({id:P.getRootId(t.context),...x.root.attrs,dir:t.context.dir,"aria-label":o.rootLabel}),getEllipsisProps(d){return e.element({id:P.getEllipsisId(t.context,d.index),...x.ellipsis.attrs,dir:t.context.dir})},getItemProps(d){var I;const m=d.value,E=m===t.context.page;return e.element({id:P.getItemId(t.context,m),...x.item.attrs,dir:t.context.dir,"data-index":m,"data-selected":N(E),"aria-current":E?"page":void 0,"aria-label":(I=o.itemLabel)==null?void 0:I.call(o,{page:m,totalPages:a}),onClick(){s({type:"SET_PAGE",page:m})},...p&&{type:"button"}})},prevTriggerProps:e.element({id:P.getPrevTriggerId(t.context),...x.prevTrigger.attrs,dir:t.context.dir,"data-disabled":N(j),"aria-label":o.prevTriggerLabel,onClick(){s({type:"PREVIOUS_PAGE"})},...p&&{disabled:j,type:"button"}}),nextTriggerProps:e.element({id:P.getNextTriggerId(t.context),...x.nextTrigger.attrs,dir:t.context.dir,"data-disabled":N(T),"aria-label":o.nextTriggerLabel,onClick(){s({type:"NEXT_PAGE"})},...p&&{disabled:T,type:"button"}})}}function Z(t){const s=q(t);return z({id:"pagination",initial:"idle",context:{pageSize:10,siblingCount:1,page:1,type:"button",translations:{rootLabel:"pagination",prevTriggerLabel:"previous page",nextTriggerLabel:"next page",itemLabel({page:e,totalPages:a}){return`${a>1&&e===a?"last page, ":""}page ${e}`},...s.translations},...s},watch:{pageSize:["setPageIfNeeded"]},computed:{totalPages:e=>Math.ceil(e.count/e.pageSize),previousPage:e=>e.page===1?null:e.page-1,nextPage:e=>e.page===e.totalPages?null:e.page+1,pageRange:e=>{const a=(e.page-1)*e.pageSize,g=a+e.pageSize;return{start:a,end:g}},isValidPage:e=>e.page>=1&&e.page<=e.totalPages},on:{SET_COUNT:[{guard:"isValidCount",actions:["setCount","goToFirstPage"]},{actions:"setCount"}],SET_PAGE:{guard:"isValidPage",actions:"setPage"},SET_PAGE_SIZE:{actions:"setPageSize"},PREVIOUS_PAGE:{guard:"canGoToPrevPage",actions:"goToPrevPage"},NEXT_PAGE:{guard:"canGoToNextPage",actions:"goToNextPage"}},states:{idle:{}}},{guards:{isValidPage:(e,a)=>a.page>=1&&a.page<=e.totalPages,isValidCount:(e,a)=>e.page>a.count,canGoToNextPage:e=>e.pagee.page>1},actions:{setCount(e,a){e.count=a.count},setPage(e,a){h.page(e,a.page)},setPageSize(e,a){e.pageSize=a.size},goToFirstPage(e){h.page(e,1)},goToPrevPage(e){h.page(e,e.page-1)},goToNextPage(e){h.page(e,e.page+1)},setPageIfNeeded(e,a){e.isValidPage||h.page(e,1)}}})}var h={page:(t,s)=>{var e;V(t.page,s)||(t.page=s,(e=t.onPageChange)==null||e.call(t,{page:t.page,pageSize:t.pageSize}))}};const K=({totalItems:t,page:s,pageSize:e,onPageChange:a})=>{const g=C.useId(),[o,c]=F(Z({id:g,count:t,page:s,pageSize:e,onPageChange:a})),i=X(o,c,M);return r.jsx("div",{className:"py-4 px-5 sm:py-3 sm:px-4",children:i.totalPages>1&&r.jsx("nav",{...i.rootProps,children:r.jsxs("ul",{className:"inline-flex gap-2 items-center flex-wrap",children:[r.jsx("li",{children:r.jsx(v,{disabled:i.isFirstPage,...i.prevTriggerProps,children:"Previous"})}),i.pages.map((n,l)=>n.type==="page"?C.createElement("li",{...i.getItemProps(n),className:`cursor-pointer text-xs px-2 py-1 md:px-3 md:py-2 border border-gray-800 h-full grid place-items-center ${i.page===n.value?"bg-primary-600":"bg-transparent"}`,key:n.value},r.jsx("span",{children:n.value})):r.jsx("li",{className:"cursor-pointer",children:r.jsx("span",{...i.getEllipsisProps({index:l}),children:"…"})},`ellipsis-${l}`)),r.jsx("li",{children:r.jsx(v,{disabled:i.isLastPage,...i.nextTriggerProps,children:"Next"})})]})})})},Y=()=>{const{data:t,isLoading:s,isError:e,isFetching:a,refetch:g}=B(),o=w(),[c,i]=k(),n=(l,p)=>{c.set(l,p),i(c)};return s?r.jsxs(y,{children:[r.jsx("div",{className:"sticky top-0",children:r.jsx(_,{isIntermediate:a})}),r.jsx(S,{title:"Loading...",description:"Loading your results. Please wait a moment"})]}):e||!t?r.jsx(y,{children:r.jsx(S,{title:"Error",description:"There was an error in completing your request. Please try again",actions:r.jsx(v,{onClick:()=>g(),disabled:a,children:"Retry"})})}):t.hits.length===0?r.jsx(y,{children:r.jsx(S,{title:"No results found",description:"There are no results available currently. Please try updating the filters above and refresh below to check again",actions:r.jsx(v,{onClick:()=>g(),disabled:a,children:"Refresh"})})}):r.jsx(y,{children:r.jsxs("div",{className:"grid grid-rows-[auto_1fr_auto] overflow-auto",children:[r.jsx("div",{className:"sticky top-0",children:r.jsx(_,{isIntermediate:a})}),r.jsx("ol",{className:"overflow-auto",children:t.hits.map(l=>r.jsx("li",{children:r.jsx(U,{onClick:p=>{p.preventDefault(),o(`/${l.objectID}`)},commentsCount:l.num_comments,createdAt:l.created_at,createdBy:l.author,title:l.title,link:l.url,upvotesCount:l.points})},l.objectID))}),r.jsx("div",{className:"sticky bottom-0 bg-gray-100 dark:bg-gray-900 dark:text-gray-300 grid place-items-center w-full",children:r.jsx(K,{page:t.page+1,pageSize:t.hitsPerPage,totalItems:t.nbPages*t.hitsPerPage,onPageChange:({page:l})=>{n(u.page,l.toString())}})})]})})};export{Y as default}; -//# sourceMappingURL=Home-BG5u3Gte.js.map +import{u as k,q as u,j as r,r as C,B as v,a as w}from"./index-OPB39aai.js";import{u as L,a as R,t as A,c as $,b as G,d as N,e as q,f as z,i as V,g as F,n as M,P as y,h as _,E as S}from"./PageLayout-e8KYfbHX.js";const B=()=>{const[t]=k(),s=t.get(u.tags),e=t.get(u.query),a=t.get(u.page),o=(()=>{const n=new URLSearchParams(t);return n.set(u.tags,`(${s||"front_page"})`),n.set(u.page,(parseInt(a??"1")-1).toString()),e&&(n.set(u.restrictSearchableAttributes,"title,comment_text,url,story_text,author"),n.set(u.tags,"story"),n.set(u.query,e)),n.toString()})(),c=e?"search_by_date":"search";return L({queryKey:["HN",o],queryFn:()=>R(`http://hn.algolia.com/api/v1/${c}?${o}`)})},U=({title:t,createdBy:s,upvotesCount:e,commentsCount:a,createdAt:g,link:o,onClick:c})=>r.jsx("div",{className:"item cursor-pointer py-4 px-5 border bg-opacity-25 border-transparent transition hover:border-primary-500 dark:hover:bg-primary-600 dark:hover:bg-opacity-[0.1] border-b group",onClick:c,children:r.jsxs("div",{className:"w-full",children:[r.jsx("h4",{className:"font-bold dark:font-semibold tracking-wide text-lg leading-tight",children:t}),o?r.jsx("div",{className:"w-full overflow-hidden",children:r.jsx("a",{className:"inline-block mt-2 text-sm text-gray-600 dark:text-gray-400 leading-tight truncate min-w-0 font-medium",href:o,target:"_blank",rel:"noopener",onClick:i=>i.stopPropagation(),children:o})}):null,r.jsxs("div",{className:"flex mt-1 items-center justify-between flex-wrap",children:[r.jsxs("div",{className:"font-semibold text-sm mr-2 flex items-center flex-shrink-0 text-primary-700 dark:text-primary-600 text-opacity-100",children:[r.jsx("span",{className:"font-bold",children:e}),r.jsx("span",{className:"mx-2",children:"•"}),r.jsx("span",{className:"opacity-90",children:s}),r.jsx("span",{className:"text-gray-400 dark:text-gray-500 mx-2",children:"•"}),r.jsx("span",{className:"text-gray-500 text-xs font-medium",children:A(g)})]}),r.jsx("div",{className:"flex items-center",children:r.jsxs("div",{className:"comments uppercase text-xs transition font-semibold group-hover:font-bold text-gray-600 dark:text-gray-400 group-hover:text-white",children:[a," Comments"]})})]})]})});var O=$("pagination").parts("root","item","ellipsis","prevTrigger","nextTrigger"),x=O.build(),P=G({getRootId:t=>{var s;return((s=t.ids)==null?void 0:s.root)??`pagination:${t.id}`},getPrevTriggerId:t=>{var s;return((s=t.ids)==null?void 0:s.prevTrigger)??`pagination:${t.id}:prev`},getNextTriggerId:t=>{var s;return((s=t.ids)==null?void 0:s.nextTrigger)??`pagination:${t.id}:next`},getEllipsisId:(t,s)=>{var e,a;return((a=(e=t.ids)==null?void 0:e.ellipsis)==null?void 0:a.call(e,s))??`pagination:${t.id}:ellipsis:${s}`},getItemId:(t,s)=>{var e,a;return((a=(e=t.ids)==null?void 0:e.item)==null?void 0:a.call(e,s))??`pagination:${t.id}:item:${s}`}}),b=(t,s)=>{let e=s-t+1;return Array.from({length:e},(a,g)=>g+t)},Q=t=>t.map(s=>typeof s=="number"?{type:"page",value:s}:{type:"ellipsis"}),f="ellipsis",D=t=>{const s=Math.min(2*t.siblingCount+5,t.totalPages),e=1,a=t.totalPages,g=Math.max(t.page-t.siblingCount,e),o=Math.min(t.page+t.siblingCount,a),c=g>e+1,i=oQ(D(t));function X(t,s,e){const a=t.context.totalPages,g=t.context.page,o=t.context.translations,c=t.context.previousPage,i=t.context.nextPage,n=t.context.pageRange,p=t.context.type==="button",j=g===1,T=g===a;return{page:g,totalPages:a,pages:H(t.context),previousPage:c,nextPage:i,pageRange:n,isFirstPage:j,isLastPage:T,slice(d){return d.slice(n.start,n.end)},setCount(d){s({type:"SET_COUNT",count:d})},setPageSize(d){s({type:"SET_PAGE_SIZE",size:d})},setPage(d){s({type:"SET_PAGE",page:d})},rootProps:e.element({id:P.getRootId(t.context),...x.root.attrs,dir:t.context.dir,"aria-label":o.rootLabel}),getEllipsisProps(d){return e.element({id:P.getEllipsisId(t.context,d.index),...x.ellipsis.attrs,dir:t.context.dir})},getItemProps(d){var I;const m=d.value,E=m===t.context.page;return e.element({id:P.getItemId(t.context,m),...x.item.attrs,dir:t.context.dir,"data-index":m,"data-selected":N(E),"aria-current":E?"page":void 0,"aria-label":(I=o.itemLabel)==null?void 0:I.call(o,{page:m,totalPages:a}),onClick(){s({type:"SET_PAGE",page:m})},...p&&{type:"button"}})},prevTriggerProps:e.element({id:P.getPrevTriggerId(t.context),...x.prevTrigger.attrs,dir:t.context.dir,"data-disabled":N(j),"aria-label":o.prevTriggerLabel,onClick(){s({type:"PREVIOUS_PAGE"})},...p&&{disabled:j,type:"button"}}),nextTriggerProps:e.element({id:P.getNextTriggerId(t.context),...x.nextTrigger.attrs,dir:t.context.dir,"data-disabled":N(T),"aria-label":o.nextTriggerLabel,onClick(){s({type:"NEXT_PAGE"})},...p&&{disabled:T,type:"button"}})}}function Z(t){const s=q(t);return z({id:"pagination",initial:"idle",context:{pageSize:10,siblingCount:1,page:1,type:"button",translations:{rootLabel:"pagination",prevTriggerLabel:"previous page",nextTriggerLabel:"next page",itemLabel({page:e,totalPages:a}){return`${a>1&&e===a?"last page, ":""}page ${e}`},...s.translations},...s},watch:{pageSize:["setPageIfNeeded"]},computed:{totalPages:e=>Math.ceil(e.count/e.pageSize),previousPage:e=>e.page===1?null:e.page-1,nextPage:e=>e.page===e.totalPages?null:e.page+1,pageRange:e=>{const a=(e.page-1)*e.pageSize,g=a+e.pageSize;return{start:a,end:g}},isValidPage:e=>e.page>=1&&e.page<=e.totalPages},on:{SET_COUNT:[{guard:"isValidCount",actions:["setCount","goToFirstPage"]},{actions:"setCount"}],SET_PAGE:{guard:"isValidPage",actions:"setPage"},SET_PAGE_SIZE:{actions:"setPageSize"},PREVIOUS_PAGE:{guard:"canGoToPrevPage",actions:"goToPrevPage"},NEXT_PAGE:{guard:"canGoToNextPage",actions:"goToNextPage"}},states:{idle:{}}},{guards:{isValidPage:(e,a)=>a.page>=1&&a.page<=e.totalPages,isValidCount:(e,a)=>e.page>a.count,canGoToNextPage:e=>e.pagee.page>1},actions:{setCount(e,a){e.count=a.count},setPage(e,a){h.page(e,a.page)},setPageSize(e,a){e.pageSize=a.size},goToFirstPage(e){h.page(e,1)},goToPrevPage(e){h.page(e,e.page-1)},goToNextPage(e){h.page(e,e.page+1)},setPageIfNeeded(e,a){e.isValidPage||h.page(e,1)}}})}var h={page:(t,s)=>{var e;V(t.page,s)||(t.page=s,(e=t.onPageChange)==null||e.call(t,{page:t.page,pageSize:t.pageSize}))}};const K=({totalItems:t,page:s,pageSize:e,onPageChange:a})=>{const g=C.useId(),[o,c]=F(Z({id:g,count:t,page:s,pageSize:e,onPageChange:a})),i=X(o,c,M);return r.jsx("div",{className:"py-4 px-5 sm:py-3 sm:px-4",children:i.totalPages>1&&r.jsx("nav",{...i.rootProps,children:r.jsxs("ul",{className:"inline-flex gap-2 items-center flex-wrap",children:[r.jsx("li",{children:r.jsx(v,{disabled:i.isFirstPage,...i.prevTriggerProps,children:"Previous"})}),i.pages.map((n,l)=>n.type==="page"?C.createElement("li",{...i.getItemProps(n),className:`cursor-pointer text-xs px-2 py-1 md:px-3 md:py-2 border border-gray-800 h-full grid place-items-center ${i.page===n.value?"bg-primary-600":"bg-transparent"}`,key:n.value},r.jsx("span",{children:n.value})):r.jsx("li",{className:"cursor-pointer",children:r.jsx("span",{...i.getEllipsisProps({index:l}),children:"…"})},`ellipsis-${l}`)),r.jsx("li",{children:r.jsx(v,{disabled:i.isLastPage,...i.nextTriggerProps,children:"Next"})})]})})})},Y=()=>{const{data:t,isLoading:s,isError:e,isFetching:a,refetch:g}=B(),o=w(),[c,i]=k(),n=(l,p)=>{c.set(l,p),i(c)};return s?r.jsxs(y,{children:[r.jsx("div",{className:"sticky top-0",children:r.jsx(_,{isIntermediate:a})}),r.jsx(S,{title:"Loading...",description:"Loading your results. Please wait a moment"})]}):e||!t?r.jsx(y,{children:r.jsx(S,{title:"Error",description:"There was an error in completing your request. Please try again",actions:r.jsx(v,{onClick:()=>g(),disabled:a,children:"Retry"})})}):t.hits.length===0?r.jsx(y,{children:r.jsx(S,{title:"No results found",description:"There are no results available currently. Please try updating the filters above and refresh below to check again",actions:r.jsx(v,{onClick:()=>g(),disabled:a,children:"Refresh"})})}):r.jsx(y,{children:r.jsxs("div",{className:"grid grid-rows-[auto_1fr_auto] overflow-auto",children:[r.jsx("div",{className:"sticky top-0",children:r.jsx(_,{isIntermediate:a})}),r.jsx("ol",{className:"overflow-auto",children:t.hits.map(l=>r.jsx("li",{children:r.jsx(U,{onClick:p=>{p.preventDefault(),o(`/${l.objectID}`)},commentsCount:l.num_comments,createdAt:l.created_at,createdBy:l.author,title:l.title,link:l.url,upvotesCount:l.points})},l.objectID))}),r.jsx("div",{className:"sticky bottom-0 bg-gray-100 dark:bg-gray-900 dark:text-gray-300 grid place-items-center w-full",children:r.jsx(K,{page:t.page+1,pageSize:t.hitsPerPage,totalItems:t.nbPages*t.hitsPerPage,onPageChange:({page:l})=>{n(u.page,l.toString())}})})]})})};export{Y as default}; +//# sourceMappingURL=Home-IPdwMo5w.js.map diff --git a/assets/Home-BG5u3Gte.js.map b/assets/Home-IPdwMo5w.js.map similarity index 99% rename from assets/Home-BG5u3Gte.js.map rename to assets/Home-IPdwMo5w.js.map index ebe2c6e..7d67faf 100644 --- a/assets/Home-BG5u3Gte.js.map +++ b/assets/Home-IPdwMo5w.js.map @@ -1 +1 @@ -{"version":3,"file":"Home-BG5u3Gte.js","sources":["../../src/hooks/useHNSearch.ts","../../src/components/Article.tsx","../../node_modules/@zag-js/pagination/dist/index.mjs","../../src/components/Pagination.tsx","../../src/routes/Home.tsx"],"sourcesContent":["import { useQuery } from 'react-query';\nimport { GetArticleResponse } from '../api/types';\nimport { useSearchParams } from 'react-router-dom';\nimport { queryParamsMapping } from '../constants';\nimport api from '../api';\n\nconst useHNSearch = () => {\n const [searchParams] = useSearchParams();\n\n const tags = searchParams.get(queryParamsMapping.tags);\n const searchQuery = searchParams.get(queryParamsMapping.query);\n const page = searchParams.get(queryParamsMapping.page);\n\n const getQueryString = () => {\n const params = new URLSearchParams(searchParams);\n\n params.set(queryParamsMapping.tags, `(${tags || 'front_page'})`);\n params.set(queryParamsMapping.page, (parseInt(page ?? '1') - 1).toString());\n\n if (searchQuery) {\n params.set(\n queryParamsMapping.restrictSearchableAttributes,\n 'title,comment_text,url,story_text,author'\n );\n params.set(queryParamsMapping.tags, 'story');\n params.set(queryParamsMapping.query, searchQuery);\n }\n\n return params.toString();\n };\n\n const queryString = getQueryString();\n\n const searchBy = searchQuery ? 'search_by_date' : 'search';\n\n const query = useQuery({\n queryKey: ['HN', queryString],\n queryFn: () =>\n api(\n `http://hn.algolia.com/api/v1/${searchBy}?${queryString}`\n ),\n });\n return query;\n};\n\nexport default useHNSearch;\n","import { timeAgo } from '../utils';\n\ninterface ArticaleProps {\n title: string;\n link?: string;\n upvotesCount: number;\n commentsCount: number;\n createdBy: string;\n createdAt: string;\n onClick: (e: React.MouseEvent) => void;\n}\n\nconst Article = ({\n title,\n createdBy,\n upvotesCount,\n commentsCount,\n createdAt,\n link,\n onClick,\n}: ArticaleProps) => {\n return (\n \n
\n

\n {title}\n

\n {link ? (\n
\n e.stopPropagation()}\n >\n {link}\n \n
\n ) : null}\n
\n
\n {upvotesCount}\n \n {createdBy}\n \n \n {timeAgo(createdAt)}\n \n
\n
\n
\n {commentsCount} Comments\n
\n
\n
\n
\n \n );\n};\n\nexport default Article;\n","// src/pagination.anatomy.ts\nimport { createAnatomy } from \"@zag-js/anatomy\";\nvar anatomy = createAnatomy(\"pagination\").parts(\"root\", \"item\", \"ellipsis\", \"prevTrigger\", \"nextTrigger\");\nvar parts = anatomy.build();\n\n// src/pagination.connect.ts\nimport { dataAttr } from \"@zag-js/dom-query\";\n\n// src/pagination.dom.ts\nimport { createScope } from \"@zag-js/dom-query\";\nvar dom = createScope({\n getRootId: (ctx) => ctx.ids?.root ?? `pagination:${ctx.id}`,\n getPrevTriggerId: (ctx) => ctx.ids?.prevTrigger ?? `pagination:${ctx.id}:prev`,\n getNextTriggerId: (ctx) => ctx.ids?.nextTrigger ?? `pagination:${ctx.id}:next`,\n getEllipsisId: (ctx, index) => ctx.ids?.ellipsis?.(index) ?? `pagination:${ctx.id}:ellipsis:${index}`,\n getItemId: (ctx, page) => ctx.ids?.item?.(page) ?? `pagination:${ctx.id}:item:${page}`\n});\n\n// src/pagination.utils.ts\nvar range = (start, end) => {\n let length = end - start + 1;\n return Array.from({ length }, (_, idx) => idx + start);\n};\nvar transform = (items) => {\n return items.map((value) => {\n if (typeof value === \"number\")\n return { type: \"page\", value };\n return { type: \"ellipsis\" };\n });\n};\nvar ELLIPSIS = \"ellipsis\";\nvar getRange = (ctx) => {\n const totalPageNumbers = Math.min(2 * ctx.siblingCount + 5, ctx.totalPages);\n const firstPageIndex = 1;\n const lastPageIndex = ctx.totalPages;\n const leftSiblingIndex = Math.max(ctx.page - ctx.siblingCount, firstPageIndex);\n const rightSiblingIndex = Math.min(ctx.page + ctx.siblingCount, lastPageIndex);\n const showLeftEllipsis = leftSiblingIndex > firstPageIndex + 1;\n const showRightEllipsis = rightSiblingIndex < lastPageIndex - 1;\n const itemCount = totalPageNumbers - 2;\n if (!showLeftEllipsis && showRightEllipsis) {\n const leftRange = range(1, itemCount);\n return [...leftRange, ELLIPSIS, lastPageIndex];\n }\n if (showLeftEllipsis && !showRightEllipsis) {\n const rightRange = range(lastPageIndex - itemCount + 1, lastPageIndex);\n return [firstPageIndex, ELLIPSIS, ...rightRange];\n }\n if (showLeftEllipsis && showRightEllipsis) {\n const middleRange = range(leftSiblingIndex, rightSiblingIndex);\n return [firstPageIndex, ELLIPSIS, ...middleRange, ELLIPSIS, lastPageIndex];\n }\n const fullRange = range(firstPageIndex, lastPageIndex);\n return fullRange;\n};\nvar getTransformedRange = (ctx) => transform(getRange(ctx));\n\n// src/pagination.connect.ts\nfunction connect(state, send, normalize) {\n const totalPages = state.context.totalPages;\n const page = state.context.page;\n const translations = state.context.translations;\n const previousPage = state.context.previousPage;\n const nextPage = state.context.nextPage;\n const pageRange = state.context.pageRange;\n const type = state.context.type;\n const isButton = type === \"button\";\n const isFirstPage = page === 1;\n const isLastPage = page === totalPages;\n return {\n page,\n totalPages,\n pages: getTransformedRange(state.context),\n previousPage,\n nextPage,\n pageRange,\n isFirstPage,\n isLastPage,\n slice(data) {\n return data.slice(pageRange.start, pageRange.end);\n },\n setCount(count) {\n send({ type: \"SET_COUNT\", count });\n },\n setPageSize(size) {\n send({ type: \"SET_PAGE_SIZE\", size });\n },\n setPage(page2) {\n send({ type: \"SET_PAGE\", page: page2 });\n },\n rootProps: normalize.element({\n id: dom.getRootId(state.context),\n ...parts.root.attrs,\n dir: state.context.dir,\n \"aria-label\": translations.rootLabel\n }),\n getEllipsisProps(props) {\n return normalize.element({\n id: dom.getEllipsisId(state.context, props.index),\n ...parts.ellipsis.attrs,\n dir: state.context.dir\n });\n },\n getItemProps(props) {\n const index = props.value;\n const isCurrentPage = index === state.context.page;\n return normalize.element({\n id: dom.getItemId(state.context, index),\n ...parts.item.attrs,\n dir: state.context.dir,\n \"data-index\": index,\n \"data-selected\": dataAttr(isCurrentPage),\n \"aria-current\": isCurrentPage ? \"page\" : void 0,\n \"aria-label\": translations.itemLabel?.({ page: index, totalPages }),\n onClick() {\n send({ type: \"SET_PAGE\", page: index });\n },\n ...isButton && { type: \"button\" }\n });\n },\n prevTriggerProps: normalize.element({\n id: dom.getPrevTriggerId(state.context),\n ...parts.prevTrigger.attrs,\n dir: state.context.dir,\n \"data-disabled\": dataAttr(isFirstPage),\n \"aria-label\": translations.prevTriggerLabel,\n onClick() {\n send({ type: \"PREVIOUS_PAGE\" });\n },\n ...isButton && { disabled: isFirstPage, type: \"button\" }\n }),\n nextTriggerProps: normalize.element({\n id: dom.getNextTriggerId(state.context),\n ...parts.nextTrigger.attrs,\n dir: state.context.dir,\n \"data-disabled\": dataAttr(isLastPage),\n \"aria-label\": translations.nextTriggerLabel,\n onClick() {\n send({ type: \"NEXT_PAGE\" });\n },\n ...isButton && { disabled: isLastPage, type: \"button\" }\n })\n };\n}\n\n// src/pagination.machine.ts\nimport { createMachine } from \"@zag-js/core\";\nimport { compact, isEqual } from \"@zag-js/utils\";\nfunction machine(userContext) {\n const ctx = compact(userContext);\n return createMachine(\n {\n id: \"pagination\",\n initial: \"idle\",\n context: {\n pageSize: 10,\n siblingCount: 1,\n page: 1,\n type: \"button\",\n translations: {\n rootLabel: \"pagination\",\n prevTriggerLabel: \"previous page\",\n nextTriggerLabel: \"next page\",\n itemLabel({ page, totalPages }) {\n const isLastPage = totalPages > 1 && page === totalPages;\n return `${isLastPage ? \"last page, \" : \"\"}page ${page}`;\n },\n ...ctx.translations\n },\n ...ctx\n },\n watch: {\n pageSize: [\"setPageIfNeeded\"]\n },\n computed: {\n totalPages: (ctx2) => Math.ceil(ctx2.count / ctx2.pageSize),\n previousPage: (ctx2) => ctx2.page === 1 ? null : ctx2.page - 1,\n nextPage: (ctx2) => ctx2.page === ctx2.totalPages ? null : ctx2.page + 1,\n pageRange: (ctx2) => {\n const start = (ctx2.page - 1) * ctx2.pageSize;\n const end = start + ctx2.pageSize;\n return { start, end };\n },\n isValidPage: (ctx2) => ctx2.page >= 1 && ctx2.page <= ctx2.totalPages\n },\n on: {\n SET_COUNT: [\n {\n guard: \"isValidCount\",\n actions: [\"setCount\", \"goToFirstPage\"]\n },\n {\n actions: \"setCount\"\n }\n ],\n SET_PAGE: {\n guard: \"isValidPage\",\n actions: \"setPage\"\n },\n SET_PAGE_SIZE: {\n actions: \"setPageSize\"\n },\n PREVIOUS_PAGE: {\n guard: \"canGoToPrevPage\",\n actions: \"goToPrevPage\"\n },\n NEXT_PAGE: {\n guard: \"canGoToNextPage\",\n actions: \"goToNextPage\"\n }\n },\n states: {\n idle: {}\n }\n },\n {\n guards: {\n isValidPage: (ctx2, evt) => evt.page >= 1 && evt.page <= ctx2.totalPages,\n isValidCount: (ctx2, evt) => ctx2.page > evt.count,\n canGoToNextPage: (ctx2) => ctx2.page < ctx2.totalPages,\n canGoToPrevPage: (ctx2) => ctx2.page > 1\n },\n actions: {\n setCount(ctx2, evt) {\n ctx2.count = evt.count;\n },\n setPage(ctx2, evt) {\n set.page(ctx2, evt.page);\n },\n setPageSize(ctx2, evt) {\n ctx2.pageSize = evt.size;\n },\n goToFirstPage(ctx2) {\n set.page(ctx2, 1);\n },\n goToPrevPage(ctx2) {\n set.page(ctx2, ctx2.page - 1);\n },\n goToNextPage(ctx2) {\n set.page(ctx2, ctx2.page + 1);\n },\n setPageIfNeeded(ctx2, _evt) {\n if (ctx2.isValidPage)\n return;\n set.page(ctx2, 1);\n }\n }\n }\n );\n}\nvar set = {\n page: (ctx, value) => {\n if (isEqual(ctx.page, value))\n return;\n ctx.page = value;\n ctx.onPageChange?.({ page: ctx.page, pageSize: ctx.pageSize });\n }\n};\nexport {\n anatomy,\n connect,\n machine\n};\n//# sourceMappingURL=index.mjs.map","import * as pagination from '@zag-js/pagination';\nimport { normalizeProps, useMachine } from '@zag-js/react';\nimport { useId } from 'react';\nimport Button from './Button';\n\ninterface PaginationProps {\n totalItems: number;\n page: number;\n pageSize: number;\n onPageChange?: (details: pagination.PageChangeDetails) => void;\n}\n\nexport const Pagination = ({\n totalItems,\n page,\n pageSize,\n onPageChange,\n}: PaginationProps) => {\n const id = useId();\n const [state, send] = useMachine(\n pagination.machine({\n id,\n count: totalItems,\n page,\n pageSize,\n onPageChange,\n })\n );\n\n const api = pagination.connect(state, send, normalizeProps);\n\n return (\n
\n {api.totalPages > 1 && (\n \n )}\n
\n );\n};\n","import { useNavigate, useSearchParams } from 'react-router-dom';\nimport useHNSearch from '../hooks/useHNSearch';\nimport Article from '../components/Article';\nimport { Progress } from '../components/Progress';\nimport EmptyView from '../components/EmptyView';\nimport Button from '../components/Button';\nimport PageLayout from '../components/PageLayout';\nimport { Pagination } from '../components/Pagination';\nimport { queryParamsMapping } from '../constants';\n\nconst Home = () => {\n const { data, isLoading, isError, isFetching, refetch } = useHNSearch();\n const navigate = useNavigate();\n\n const [searchParams, setSearchParams] = useSearchParams();\n\n const setFilterValue = (filterName: string, filterValue?: string) => {\n searchParams.set(filterName, filterValue!);\n setSearchParams(searchParams);\n };\n\n if (isLoading) {\n return (\n \n
\n \n
\n \n
\n );\n }\n\n if (isError || !data) {\n return (\n \n refetch()} disabled={isFetching}>\n Retry\n \n }\n />\n \n );\n }\n\n if (data.hits.length === 0) {\n return (\n \n refetch()} disabled={isFetching}>\n Refresh\n \n }\n />\n \n );\n }\n\n return (\n \n
\n
\n \n
\n\n
    \n {data.hits.map((hit) => (\n
  1. \n {\n e.preventDefault();\n navigate(`/${hit.objectID}`);\n }}\n commentsCount={hit.num_comments}\n createdAt={hit.created_at}\n createdBy={hit.author}\n title={hit.title}\n link={hit.url}\n upvotesCount={hit.points}\n />\n
  2. \n ))}\n
\n
\n {\n setFilterValue(queryParamsMapping.page, page.toString());\n }}\n />\n
\n
\n
\n );\n};\n\nexport default Home;\n"],"names":["useHNSearch","searchParams","useSearchParams","tags","queryParamsMapping","searchQuery","page","queryString","params","searchBy","useQuery","api","Article","title","createdBy","upvotesCount","commentsCount","createdAt","link","onClick","jsx","jsxs","e","timeAgo","anatomy","createAnatomy","parts","dom","createScope","ctx","_a","index","_b","range","start","end","length","_","idx","transform","items","value","ELLIPSIS","getRange","totalPageNumbers","firstPageIndex","lastPageIndex","leftSiblingIndex","rightSiblingIndex","showLeftEllipsis","showRightEllipsis","itemCount","rightRange","middleRange","getTransformedRange","connect","state","send","normalize","totalPages","translations","previousPage","nextPage","pageRange","isButton","isFirstPage","isLastPage","data","count","size","page2","props","isCurrentPage","dataAttr","machine","userContext","compact","createMachine","ctx2","evt","set","_evt","isEqual","Pagination","totalItems","pageSize","onPageChange","id","useId","useMachine","pagination.machine","pagination.connect","normalizeProps","Button","i","createElement","Home","isLoading","isError","isFetching","refetch","navigate","useNavigate","setSearchParams","setFilterValue","filterName","filterValue","PageLayout","Progress","EmptyView","hit"],"mappings":"mNAMA,MAAMA,EAAc,IAAM,CAClB,KAAA,CAACC,CAAY,EAAIC,IAEjBC,EAAOF,EAAa,IAAIG,EAAmB,IAAI,EAC/CC,EAAcJ,EAAa,IAAIG,EAAmB,KAAK,EACvDE,EAAOL,EAAa,IAAIG,EAAmB,IAAI,EAoB/CG,GAlBiB,IAAM,CACrB,MAAAC,EAAS,IAAI,gBAAgBP,CAAY,EAE/C,OAAAO,EAAO,IAAIJ,EAAmB,KAAM,IAAID,GAAQ,YAAY,GAAG,EACxDK,EAAA,IAAIJ,EAAmB,MAAO,SAASE,GAAQ,GAAG,EAAI,GAAG,SAAU,CAAA,EAEtED,IACKG,EAAA,IACLJ,EAAmB,6BACnB,0CAAA,EAEKI,EAAA,IAAIJ,EAAmB,KAAM,OAAO,EACpCI,EAAA,IAAIJ,EAAmB,MAA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+D,EAAA,CACC,KAAMhB,EAAK,KAAO,EAClB,SAAUA,EAAK,YACf,WAAYA,EAAK,QAAUA,EAAK,YAChC,aAAc,CAAC,CAAE,KAAA7D,KAAW,CAC1BkG,EAAepG,EAAmB,KAAME,EAAK,SAAU,CAAA,CACzD,CAAA,CAAA,EAEJ,CAAA,CACF,CAAA,CACF,CAAA,CAEJ","x_google_ignoreList":[2]} \ No newline at end of file +{"version":3,"file":"Home-IPdwMo5w.js","sources":["../../src/hooks/useHNSearch.ts","../../src/components/Article.tsx","../../node_modules/@zag-js/pagination/dist/index.mjs","../../src/components/Pagination.tsx","../../src/routes/Home.tsx"],"sourcesContent":["import { useQuery } from 'react-query';\nimport { GetArticleResponse } from '../api/types';\nimport { useSearchParams } from 'react-router-dom';\nimport { queryParamsMapping } from '../constants';\nimport api from '../api';\n\nconst useHNSearch = () => {\n const [searchParams] = useSearchParams();\n\n const tags = searchParams.get(queryParamsMapping.tags);\n const searchQuery = searchParams.get(queryParamsMapping.query);\n const page = searchParams.get(queryParamsMapping.page);\n\n const getQueryString = () => {\n const params = new URLSearchParams(searchParams);\n\n params.set(queryParamsMapping.tags, `(${tags || 'front_page'})`);\n params.set(queryParamsMapping.page, (parseInt(page ?? '1') - 1).toString());\n\n if (searchQuery) {\n params.set(\n queryParamsMapping.restrictSearchableAttributes,\n 'title,comment_text,url,story_text,author'\n );\n params.set(queryParamsMapping.tags, 'story');\n params.set(queryParamsMapping.query, searchQuery);\n }\n\n return params.toString();\n };\n\n const queryString = getQueryString();\n\n const searchBy = searchQuery ? 'search_by_date' : 'search';\n\n const query = useQuery({\n queryKey: ['HN', queryString],\n queryFn: () =>\n api(\n `http://hn.algolia.com/api/v1/${searchBy}?${queryString}`\n ),\n });\n return query;\n};\n\nexport default useHNSearch;\n","import { timeAgo } from '../utils';\n\ninterface ArticaleProps {\n title: string;\n link?: string;\n upvotesCount: number;\n commentsCount: number;\n createdBy: string;\n createdAt: string;\n onClick: (e: React.MouseEvent) => void;\n}\n\nconst Article = ({\n title,\n createdBy,\n upvotesCount,\n commentsCount,\n createdAt,\n link,\n onClick,\n}: ArticaleProps) => {\n return (\n \n
\n

\n {title}\n

\n {link ? (\n
\n e.stopPropagation()}\n >\n {link}\n \n
\n ) : null}\n
\n
\n {upvotesCount}\n \n {createdBy}\n \n \n {timeAgo(createdAt)}\n \n
\n
\n
\n {commentsCount} Comments\n
\n
\n
\n
\n \n );\n};\n\nexport default Article;\n","// src/pagination.anatomy.ts\nimport { createAnatomy } from \"@zag-js/anatomy\";\nvar anatomy = createAnatomy(\"pagination\").parts(\"root\", \"item\", \"ellipsis\", \"prevTrigger\", \"nextTrigger\");\nvar parts = anatomy.build();\n\n// src/pagination.connect.ts\nimport { dataAttr } from \"@zag-js/dom-query\";\n\n// src/pagination.dom.ts\nimport { createScope } from \"@zag-js/dom-query\";\nvar dom = createScope({\n getRootId: (ctx) => ctx.ids?.root ?? `pagination:${ctx.id}`,\n getPrevTriggerId: (ctx) => ctx.ids?.prevTrigger ?? `pagination:${ctx.id}:prev`,\n getNextTriggerId: (ctx) => ctx.ids?.nextTrigger ?? `pagination:${ctx.id}:next`,\n getEllipsisId: (ctx, index) => ctx.ids?.ellipsis?.(index) ?? `pagination:${ctx.id}:ellipsis:${index}`,\n getItemId: (ctx, page) => ctx.ids?.item?.(page) ?? `pagination:${ctx.id}:item:${page}`\n});\n\n// src/pagination.utils.ts\nvar range = (start, end) => {\n let length = end - start + 1;\n return Array.from({ length }, (_, idx) => idx + start);\n};\nvar transform = (items) => {\n return items.map((value) => {\n if (typeof value === \"number\")\n return { type: \"page\", value };\n return { type: \"ellipsis\" };\n });\n};\nvar ELLIPSIS = \"ellipsis\";\nvar getRange = (ctx) => {\n const totalPageNumbers = Math.min(2 * ctx.siblingCount + 5, ctx.totalPages);\n const firstPageIndex = 1;\n const lastPageIndex = ctx.totalPages;\n const leftSiblingIndex = Math.max(ctx.page - ctx.siblingCount, firstPageIndex);\n const rightSiblingIndex = Math.min(ctx.page + ctx.siblingCount, lastPageIndex);\n const showLeftEllipsis = leftSiblingIndex > firstPageIndex + 1;\n const showRightEllipsis = rightSiblingIndex < lastPageIndex - 1;\n const itemCount = totalPageNumbers - 2;\n if (!showLeftEllipsis && showRightEllipsis) {\n const leftRange = range(1, itemCount);\n return [...leftRange, ELLIPSIS, lastPageIndex];\n }\n if (showLeftEllipsis && !showRightEllipsis) {\n const rightRange = range(lastPageIndex - itemCount + 1, lastPageIndex);\n return [firstPageIndex, ELLIPSIS, ...rightRange];\n }\n if (showLeftEllipsis && showRightEllipsis) {\n const middleRange = range(leftSiblingIndex, rightSiblingIndex);\n return [firstPageIndex, ELLIPSIS, ...middleRange, ELLIPSIS, lastPageIndex];\n }\n const fullRange = range(firstPageIndex, lastPageIndex);\n return fullRange;\n};\nvar getTransformedRange = (ctx) => transform(getRange(ctx));\n\n// src/pagination.connect.ts\nfunction connect(state, send, normalize) {\n const totalPages = state.context.totalPages;\n const page = state.context.page;\n const translations = state.context.translations;\n const previousPage = state.context.previousPage;\n const nextPage = state.context.nextPage;\n const pageRange = state.context.pageRange;\n const type = state.context.type;\n const isButton = type === \"button\";\n const isFirstPage = page === 1;\n const isLastPage = page === totalPages;\n return {\n page,\n totalPages,\n pages: getTransformedRange(state.context),\n previousPage,\n nextPage,\n pageRange,\n isFirstPage,\n isLastPage,\n slice(data) {\n return data.slice(pageRange.start, pageRange.end);\n },\n setCount(count) {\n send({ type: \"SET_COUNT\", count });\n },\n setPageSize(size) {\n send({ type: \"SET_PAGE_SIZE\", size });\n },\n setPage(page2) {\n send({ type: \"SET_PAGE\", page: page2 });\n },\n rootProps: normalize.element({\n id: dom.getRootId(state.context),\n ...parts.root.attrs,\n dir: state.context.dir,\n \"aria-label\": translations.rootLabel\n }),\n getEllipsisProps(props) {\n return normalize.element({\n id: dom.getEllipsisId(state.context, props.index),\n ...parts.ellipsis.attrs,\n dir: state.context.dir\n });\n },\n getItemProps(props) {\n const index = props.value;\n const isCurrentPage = index === state.context.page;\n return normalize.element({\n id: dom.getItemId(state.context, index),\n ...parts.item.attrs,\n dir: state.context.dir,\n \"data-index\": index,\n \"data-selected\": dataAttr(isCurrentPage),\n \"aria-current\": isCurrentPage ? \"page\" : void 0,\n \"aria-label\": translations.itemLabel?.({ page: index, totalPages }),\n onClick() {\n send({ type: \"SET_PAGE\", page: index });\n },\n ...isButton && { type: \"button\" }\n });\n },\n prevTriggerProps: normalize.element({\n id: dom.getPrevTriggerId(state.context),\n ...parts.prevTrigger.attrs,\n dir: state.context.dir,\n \"data-disabled\": dataAttr(isFirstPage),\n \"aria-label\": translations.prevTriggerLabel,\n onClick() {\n send({ type: \"PREVIOUS_PAGE\" });\n },\n ...isButton && { disabled: isFirstPage, type: \"button\" }\n }),\n nextTriggerProps: normalize.element({\n id: dom.getNextTriggerId(state.context),\n ...parts.nextTrigger.attrs,\n dir: state.context.dir,\n \"data-disabled\": dataAttr(isLastPage),\n \"aria-label\": translations.nextTriggerLabel,\n onClick() {\n send({ type: \"NEXT_PAGE\" });\n },\n ...isButton && { disabled: isLastPage, type: \"button\" }\n })\n };\n}\n\n// src/pagination.machine.ts\nimport { createMachine } from \"@zag-js/core\";\nimport { compact, isEqual } from \"@zag-js/utils\";\nfunction machine(userContext) {\n const ctx = compact(userContext);\n return createMachine(\n {\n id: \"pagination\",\n initial: \"idle\",\n context: {\n pageSize: 10,\n siblingCount: 1,\n page: 1,\n type: \"button\",\n translations: {\n rootLabel: \"pagination\",\n prevTriggerLabel: \"previous page\",\n nextTriggerLabel: \"next page\",\n itemLabel({ page, totalPages }) {\n const isLastPage = totalPages > 1 && page === totalPages;\n return `${isLastPage ? \"last page, \" : \"\"}page ${page}`;\n },\n ...ctx.translations\n },\n ...ctx\n },\n watch: {\n pageSize: [\"setPageIfNeeded\"]\n },\n computed: {\n totalPages: (ctx2) => Math.ceil(ctx2.count / ctx2.pageSize),\n previousPage: (ctx2) => ctx2.page === 1 ? null : ctx2.page - 1,\n nextPage: (ctx2) => ctx2.page === ctx2.totalPages ? null : ctx2.page + 1,\n pageRange: (ctx2) => {\n const start = (ctx2.page - 1) * ctx2.pageSize;\n const end = start + ctx2.pageSize;\n return { start, end };\n },\n isValidPage: (ctx2) => ctx2.page >= 1 && ctx2.page <= ctx2.totalPages\n },\n on: {\n SET_COUNT: [\n {\n guard: \"isValidCount\",\n actions: [\"setCount\", \"goToFirstPage\"]\n },\n {\n actions: \"setCount\"\n }\n ],\n SET_PAGE: {\n guard: \"isValidPage\",\n actions: \"setPage\"\n },\n SET_PAGE_SIZE: {\n actions: \"setPageSize\"\n },\n PREVIOUS_PAGE: {\n guard: \"canGoToPrevPage\",\n actions: \"goToPrevPage\"\n },\n NEXT_PAGE: {\n guard: \"canGoToNextPage\",\n actions: \"goToNextPage\"\n }\n },\n states: {\n idle: {}\n }\n },\n {\n guards: {\n isValidPage: (ctx2, evt) => evt.page >= 1 && evt.page <= ctx2.totalPages,\n isValidCount: (ctx2, evt) => ctx2.page > evt.count,\n canGoToNextPage: (ctx2) => ctx2.page < ctx2.totalPages,\n canGoToPrevPage: (ctx2) => ctx2.page > 1\n },\n actions: {\n setCount(ctx2, evt) {\n ctx2.count = evt.count;\n },\n setPage(ctx2, evt) {\n set.page(ctx2, evt.page);\n },\n setPageSize(ctx2, evt) {\n ctx2.pageSize = evt.size;\n },\n goToFirstPage(ctx2) {\n set.page(ctx2, 1);\n },\n goToPrevPage(ctx2) {\n set.page(ctx2, ctx2.page - 1);\n },\n goToNextPage(ctx2) {\n set.page(ctx2, ctx2.page + 1);\n },\n setPageIfNeeded(ctx2, _evt) {\n if (ctx2.isValidPage)\n return;\n set.page(ctx2, 1);\n }\n }\n }\n );\n}\nvar set = {\n page: (ctx, value) => {\n if (isEqual(ctx.page, value))\n return;\n ctx.page = value;\n ctx.onPageChange?.({ page: ctx.page, pageSize: ctx.pageSize });\n }\n};\nexport {\n anatomy,\n connect,\n machine\n};\n//# sourceMappingURL=index.mjs.map","import * as pagination from '@zag-js/pagination';\nimport { normalizeProps, useMachine } from '@zag-js/react';\nimport { useId } from 'react';\nimport Button from './Button';\n\ninterface PaginationProps {\n totalItems: number;\n page: number;\n pageSize: number;\n onPageChange?: (details: pagination.PageChangeDetails) => void;\n}\n\nexport const Pagination = ({\n totalItems,\n page,\n pageSize,\n onPageChange,\n}: PaginationProps) => {\n const id = useId();\n const [state, send] = useMachine(\n pagination.machine({\n id,\n count: totalItems,\n page,\n pageSize,\n onPageChange,\n })\n );\n\n const api = pagination.connect(state, send, normalizeProps);\n\n return (\n
\n {api.totalPages > 1 && (\n \n )}\n
\n );\n};\n","import { useNavigate, useSearchParams } from 'react-router-dom';\nimport useHNSearch from '../hooks/useHNSearch';\nimport Article from '../components/Article';\nimport { Progress } from '../components/Progress';\nimport EmptyView from '../components/EmptyView';\nimport Button from '../components/Button';\nimport PageLayout from '../components/PageLayout';\nimport { Pagination } from '../components/Pagination';\nimport { queryParamsMapping } from '../constants';\n\nconst Home = () => {\n const { data, isLoading, isError, isFetching, refetch } = useHNSearch();\n const navigate = useNavigate();\n\n const [searchParams, setSearchParams] = useSearchParams();\n\n const setFilterValue = (filterName: string, filterValue?: string) => {\n searchParams.set(filterName, filterValue!);\n setSearchParams(searchParams);\n };\n\n if (isLoading) {\n return (\n \n
\n \n
\n \n
\n );\n }\n\n if (isError || !data) {\n return (\n \n refetch()} disabled={isFetching}>\n Retry\n \n }\n />\n \n );\n }\n\n if (data.hits.length === 0) {\n return (\n \n refetch()} disabled={isFetching}>\n Refresh\n \n }\n />\n \n );\n }\n\n return (\n \n
\n
\n \n
\n\n
    \n {data.hits.map((hit) => (\n
  1. \n {\n e.preventDefault();\n navigate(`/${hit.objectID}`);\n }}\n commentsCount={hit.num_comments}\n createdAt={hit.created_at}\n createdBy={hit.author}\n title={hit.title}\n link={hit.url}\n upvotesCount={hit.points}\n />\n
  2. \n ))}\n
\n
\n {\n setFilterValue(queryParamsMapping.page, page.toString());\n }}\n />\n
\n
\n
\n );\n};\n\nexport default Home;\n"],"names":["useHNSearch","searchParams","useSearchParams","tags","queryParamsMapping","searchQuery","page","queryString","params","searchBy","useQuery","api","Article","title","createdBy","upvotesCount","commentsCount","createdAt","link","onClick","jsx","jsxs","e","timeAgo","anatomy","createAnatomy","parts","dom","createScope","ctx","_a","index","_b","range","start","end","length","_","idx","transform","items","value","ELLIPSIS","getRange","totalPageNumbers","firstPageIndex","lastPageIndex","leftSiblingIndex","rightSiblingIndex","showLeftEllipsis","showRightEllipsis","itemCount","rightRange","middleRange","getTransformedRange","connect","state","send","normalize","totalPages","translations","previousPage","nextPage","pageRange","isButton","isFirstPage","isLastPage","data","count","size","page2","props","isCurrentPage","dataAttr","machine","userContext","compact","createMachine","ctx2","evt","set","_evt","isEqual","Pagination","totalItems","pageSize","onPageChange","id","useId","useMachine","pagination.machine","pagination.connect","normalizeProps","Button","i","createElement","Home","isLoading","isError","isFetching","refetch","navigate","useNavigate","setSearchParams","setFilterValue","filterName","filterValue","PageLayout","Progress","EmptyView","hit"],"mappings":"mNAMA,MAAMA,EAAc,IAAM,CAClB,KAAA,CAACC,CAAY,EAAIC,IAEjBC,EAAOF,EAAa,IAAIG,EAAmB,IAAI,EAC/CC,EAAcJ,EAAa,IAAIG,EAAmB,KAAK,EACvDE,EAAOL,EAAa,IAAIG,EAAmB,IAAI,EAoB/CG,GAlBiB,IAAM,CACrB,MAAAC,EAAS,IAAI,gBAAgBP,CAAY,EAE/C,OAAAO,EAAO,IAAIJ,EAAmB,KAAM,IAAID,GAAQ,YAAY,GAAG,EACxDK,EAAA,IAAIJ,EAAmB,MAAO,SAASE,GAAQ,GAAG,EAAI,GAAG,SAAU,CAAA,EAEtED,IACKG,EAAA,IACLJ,EAAmB,6BACnB,0CAAA,EAEKI,EAAA,IAAIJ,EAAmB,KAAM,OAAO,EACpCI,EAAA,IAAIJ,EAAmB,MAAOC,CAAW,GAG3CG,EAAO,UAAS,KAKnBC,EAAWJ,EAAc,iBAAmB,SAS3C,OAPOK,EAAS,CACrB,SAAU,CAAC,KAAMH,C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,KAAA7D,KAAW,CAC1BkG,EAAepG,EAAmB,KAAME,EAAK,SAAU,CAAA,CACzD,CAAA,CAAA,EAEJ,CAAA,CACF,CAAA,CACF,CAAA,CAEJ","x_google_ignoreList":[2]} \ No newline at end of file diff --git a/assets/PageLayout-t9exb1nu.js b/assets/PageLayout-e8KYfbHX.js similarity index 99% rename from assets/PageLayout-t9exb1nu.js rename to assets/PageLayout-e8KYfbHX.js index 651cd2e..cbf4c4a 100644 --- a/assets/PageLayout-t9exb1nu.js +++ b/assets/PageLayout-e8KYfbHX.js @@ -1,2 +1,2 @@ -import{_ as Zt,c as Et,n as te,i as Rt,d as Mt,t as ee,f as ne,e as Pt,g as Ot,s as re,h as se,k as B,S as ie,R as L,l as ae,p as oe,r as R,j}from"./index-422DQ6gI.js";var ce=function(t){Zt(n,t);function n(i,r){var a;return a=t.call(this)||this,a.client=i,a.options=r,a.trackedProps=[],a.selectError=null,a.bindMethods(),a.setOptions(r),a}var e=n.prototype;return e.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},e.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),At(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},e.onUnsubscribe=function(){this.listeners.length||this.destroy()},e.shouldFetchOnReconnect=function(){return pt(this.currentQuery,this.options,this.options.refetchOnReconnect)},e.shouldFetchOnWindowFocus=function(){return pt(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},e.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},e.setOptions=function(r,a){var l=this.options,c=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(r),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=l.queryKey),this.updateQuery();var m=this.hasListeners();m&&Ct(this.currentQuery,c,this.options,l)&&this.executeFetch(),this.updateResult(a),m&&(this.currentQuery!==c||this.options.enabled!==l.enabled||this.options.staleTime!==l.staleTime)&&this.updateStaleTimeout();var s=this.computeRefetchInterval();m&&(this.currentQuery!==c||this.options.enabled!==l.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)},e.getOptimisticResult=function(r){var a=this.client.defaultQueryObserverOptions(r),l=this.client.getQueryCache().build(this.client,a);return this.createResult(l,a)},e.getCurrentResult=function(){return this.currentResult},e.trackResult=function(r,a){var l=this,c={},m=function(o){l.trackedProps.includes(o)||l.trackedProps.push(o)};return Object.keys(r).forEach(function(s){Object.defineProperty(c,s,{configurable:!1,enumerable:!0,get:function(){return m(s),r[s]}})}),(a.useErrorBoundary||a.suspense)&&m("error"),c},e.getNextResult=function(r){var a=this;return new Promise(function(l,c){var m=a.subscribe(function(s){s.isFetching||(m(),s.isError&&(r!=null&&r.throwOnError)?c(s.error):l(s))})})},e.getCurrentQuery=function(){return this.currentQuery},e.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},e.refetch=function(r){return this.fetch(Et({},r,{meta:{refetchPage:r==null?void 0:r.refetchPage}}))},e.fetchOptimistic=function(r){var a=this,l=this.client.defaultQueryObserverOptions(r),c=this.client.getQueryCache().build(this.client,l);return c.fetch().then(function(){return a.createResult(c,l)})},e.fetch=function(r){var a=this;return this.executeFetch(r).then(function(){return a.updateResult(),a.currentResult})},e.executeFetch=function(r){this.updateQuery();var a=this.currentQuery.fetch(this.options,r);return r!=null&&r.throwOnError||(a=a.catch(te)),a},e.updateStaleTimeout=function(){var r=this;if(this.clearStaleTimeout(),!(Rt||this.currentResult.isStale||!Mt(this.options.staleTime))){var a=ee(this.currentResult.dataUpdatedAt,this.options.staleTime),l=a+1;this.staleTimeoutId=setTimeout(function(){r.currentResult.isStale||r.updateResult()},l)}},e.computeRefetchInterval=function(){var r;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(r=this.options.refetchInterval)!=null?r:!1},e.updateRefetchInterval=function(r){var a=this;this.clearRefetchInterval(),this.currentRefetchInterval=r,!(Rt||this.options.enabled===!1||!Mt(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(a.options.refetchIntervalInBackground||ne.isFocused())&&a.executeFetch()},this.currentRefetchInterval))},e.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},e.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},e.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},e.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},e.createResult=function(r,a){var l=this.currentQuery,c=this.options,m=this.currentResult,s=this.currentResultState,o=this.currentResultOptions,u=r!==l,h=u?r.state:this.currentQueryInitialState,d=u?this.currentResult:this.previousQueryResult,f=r.state,p=f.dataUpdatedAt,b=f.error,w=f.errorUpdatedAt,C=f.isFetching,x=f.status,V=!1,W=!1,O;if(a.optimisticResults){var N=this.hasListeners(),ct=!N&&At(r,a),S=N&&Ct(r,l,a,c);(ct||S)&&(C=!0,p||(x="loading"))}if(a.keepPreviousData&&!f.dataUpdateCount&&(d!=null&&d.isSuccess)&&x!=="error")O=d.data,p=d.dataUpdatedAt,x=d.status,V=!0;else if(a.select&&typeof f.data<"u")if(m&&f.data===(s==null?void 0:s.data)&&a.select===this.selectFn)O=this.selectResult;else try{this.selectFn=a.select,O=a.select(f.data),a.structuralSharing!==!1&&(O=Pt(m==null?void 0:m.data,O)),this.selectResult=O,this.selectError=null}catch(E){Ot().error(E),this.selectError=E}else O=f.data;if(typeof a.placeholderData<"u"&&typeof O>"u"&&(x==="loading"||x==="idle")){var g;if(m!=null&&m.isPlaceholderData&&a.placeholderData===(o==null?void 0:o.placeholderData))g=m.data;else if(g=typeof a.placeholderData=="function"?a.placeholderData():a.placeholderData,a.select&&typeof g<"u")try{g=a.select(g),a.structuralSharing!==!1&&(g=Pt(m==null?void 0:m.data,g)),this.selectError=null}catch(E){Ot().error(E),this.selectError=E}typeof g<"u"&&(x="success",O=g,W=!0)}this.selectError&&(b=this.selectError,O=this.selectResult,w=Date.now(),x="error");var v={status:x,isLoading:x==="loading",isSuccess:x==="success",isError:x==="error",isIdle:x==="idle",data:O,dataUpdatedAt:p,error:b,errorUpdatedAt:w,failureCount:f.fetchFailureCount,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>h.dataUpdateCount||f.errorUpdateCount>h.errorUpdateCount,isFetching:C,isRefetching:C&&x!=="loading",isLoadingError:x==="error"&&f.dataUpdatedAt===0,isPlaceholderData:W,isPreviousData:V,isRefetchError:x==="error"&&f.dataUpdatedAt!==0,isStale:vt(r,a),refetch:this.refetch,remove:this.remove};return v},e.shouldNotifyListeners=function(r,a){if(!a)return!0;var l=this.options,c=l.notifyOnChangeProps,m=l.notifyOnChangePropsExclusions;if(!c&&!m||c==="tracked"&&!this.trackedProps.length)return!0;var s=c==="tracked"?this.trackedProps:c;return Object.keys(r).some(function(o){var u=o,h=r[u]!==a[u],d=s==null?void 0:s.some(function(p){return p===o}),f=m==null?void 0:m.some(function(p){return p===o});return h&&!f&&(!s||d)})},e.updateResult=function(r){var a=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!re(this.currentResult,a)){var l={cache:!0};(r==null?void 0:r.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,a)&&(l.listeners=!0),this.notify(Et({},l,r))}},e.updateQuery=function(){var r=this.client.getQueryCache().build(this.client,this.options);if(r!==this.currentQuery){var a=this.currentQuery;this.currentQuery=r,this.currentQueryInitialState=r.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(a==null||a.removeObserver(this),r.addObserver(this))}},e.onQueryUpdate=function(r){var a={};r.type==="success"?a.onSuccess=!0:r.type==="error"&&!se(r.error)&&(a.onError=!0),this.updateResult(a),this.hasListeners()&&this.updateTimers()},e.notify=function(r){var a=this;B.batch(function(){r.onSuccess?(a.options.onSuccess==null||a.options.onSuccess(a.currentResult.data),a.options.onSettled==null||a.options.onSettled(a.currentResult.data,null)):r.onError&&(a.options.onError==null||a.options.onError(a.currentResult.error),a.options.onSettled==null||a.options.onSettled(void 0,a.currentResult.error)),r.listeners&&a.listeners.forEach(function(l){l(a.currentResult)}),r.cache&&a.client.getQueryCache().notify({query:a.currentQuery,type:"observerResultsUpdated"})})},n}(ie);function ue(t,n){return n.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&n.retryOnMount===!1)}function At(t,n){return ue(t,n)||t.state.dataUpdatedAt>0&&pt(t,n,n.refetchOnMount)}function pt(t,n,e){if(n.enabled!==!1){var i=typeof e=="function"?e(t):e;return i==="always"||i!==!1&&vt(t,n)}return!1}function Ct(t,n,e,i){return e.enabled!==!1&&(t!==n||i.enabled===!1)&&(!e.suspense||t.state.status!=="error")&&vt(t,e)}function vt(t,n){return t.isStaleByTime(n.staleTime)}function le(){var t=!1;return{clearReset:function(){t=!1},reset:function(){t=!0},isReset:function(){return t}}}var he=L.createContext(le()),fe=function(){return L.useContext(he)};function de(t,n,e){return typeof n=="function"?n.apply(void 0,e):typeof n=="boolean"?n:!!t}function pe(t,n){var e=L.useRef(!1),i=L.useState(0),r=i[1],a=ae(),l=fe(),c=a.defaultQueryObserverOptions(t);c.optimisticResults=!0,c.onError&&(c.onError=B.batchCalls(c.onError)),c.onSuccess&&(c.onSuccess=B.batchCalls(c.onSuccess)),c.onSettled&&(c.onSettled=B.batchCalls(c.onSettled)),c.suspense&&(typeof c.staleTime!="number"&&(c.staleTime=1e3),c.cacheTime===0&&(c.cacheTime=1)),(c.suspense||c.useErrorBoundary)&&(l.isReset()||(c.retryOnMount=!1));var m=L.useState(function(){return new n(a,c)}),s=m[0],o=s.getOptimisticResult(c);if(L.useEffect(function(){e.current=!0,l.clearReset();var u=s.subscribe(B.batchCalls(function(){e.current&&r(function(h){return h+1})}));return s.updateResult(),function(){e.current=!1,u()}},[l,s]),L.useEffect(function(){s.setOptions(c,{listeners:!1})},[c,s]),c.suspense&&o.isLoading)throw s.fetchOptimistic(c).then(function(u){var h=u.data;c.onSuccess==null||c.onSuccess(h),c.onSettled==null||c.onSettled(h,null)}).catch(function(u){l.clearReset(),c.onError==null||c.onError(u),c.onSettled==null||c.onSettled(void 0,u)});if(o.isError&&!l.isReset()&&!o.isFetching&&de(c.suspense,c.useErrorBoundary,[o.error,s.getCurrentQuery()]))throw o.error;return c.notifyOnChangeProps==="tracked"&&(o=s.trackResult(o,c)),o}function Yn(t,n,e){var i=oe(t,n,e);return pe(i,ce)}const Jn=async t=>{const n=await fetch(t);if(!n.ok)throw new Error(n.statusText);return await n.json()};function M(t){const n=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&n==="[object Date]"?new t.constructor(+t):typeof t=="number"||n==="[object Number]"||typeof t=="string"||n==="[object String]"?new Date(t):new Date(NaN)}const Z=43200,Dt=1440;let me={};function ye(){return me}function Tt(t){const n=M(t),e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),+t-+e}function nt(t,n){const e=M(t),i=M(n),r=e.getTime()-i.getTime();return r<0?-1:r>0?1:r}function ge(t,n){const e=M(t),i=M(n),r=e.getFullYear()-i.getFullYear(),a=e.getMonth()-i.getMonth();return r*12+a}function ve(t){return n=>{const i=(t?Math[t]:Math.trunc)(n);return i===0?0:i}}function be(t,n){return+M(t)-+M(n)}function Se(t){const n=M(t);return n.setHours(23,59,59,999),n}function we(t){const n=M(t),e=n.getMonth();return n.setFullYear(n.getFullYear(),e+1,0),n.setHours(23,59,59,999),n}function xe(t){const n=M(t);return+Se(n)==+we(n)}function Ee(t,n){const e=M(t),i=M(n),r=nt(e,i),a=Math.abs(ge(e,i));let l;if(a<1)l=0;else{e.getMonth()===1&&e.getDate()>27&&e.setDate(30),e.setMonth(e.getMonth()-r*a);let c=nt(e,i)===-r;xe(M(t))&&a===1&&nt(t,i)===1&&(c=!1),l=r*(a-Number(c))}return l===0?0:l}function Re(t,n,e){const i=be(t,n)/1e3;return ve(e==null?void 0:e.roundingMethod)(i)}const Me={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Pe=(t,n,e)=>{let i;const r=Me[t];return typeof r=="string"?i=r:n===1?i=r.one:i=r.other.replace("{{count}}",n.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+i:i+" ago":i};function ut(t){return(n={})=>{const e=n.width?String(n.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}const Oe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ae={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ce={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},De={date:ut({formats:Oe,defaultWidth:"full"}),time:ut({formats:Ae,defaultWidth:"full"}),dateTime:ut({formats:Ce,defaultWidth:"full"})},Te={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},je=(t,n,e,i)=>Te[t];function z(t){return(n,e)=>{const i=e!=null&&e.context?String(e.context):"standalone";let r;if(i==="formatting"&&t.formattingValues){const l=t.defaultFormattingWidth||t.defaultWidth,c=e!=null&&e.width?String(e.width):l;r=t.formattingValues[c]||t.formattingValues[l]}else{const l=t.defaultWidth,c=e!=null&&e.width?String(e.width):t.defaultWidth;r=t.values[c]||t.values[l]}const a=t.argumentCallback?t.argumentCallback(n):n;return r[a]}}const ke={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ie={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Le={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Fe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},We={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Ne={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Qe=(t,n)=>{const e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},_e={ordinalNumber:Qe,era:z({values:ke,defaultWidth:"wide"}),quarter:z({values:Ie,defaultWidth:"wide",argumentCallback:t=>t-1}),month:z({values:Le,defaultWidth:"wide"}),day:z({values:Fe,defaultWidth:"wide"}),dayPeriod:z({values:We,defaultWidth:"wide",formattingValues:Ne,defaultFormattingWidth:"wide"})};function K(t){return(n,e={})=>{const i=e.width,r=i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth],a=n.match(r);if(!a)return null;const l=a[0],c=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth],m=Array.isArray(c)?Ue(c,u=>u.test(l)):$e(c,u=>u.test(l));let s;s=t.valueCallback?t.valueCallback(m):m,s=e.valueCallback?e.valueCallback(s):s;const o=n.slice(l.length);return{value:s,rest:o}}}function $e(t,n){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&n(t[e]))return e}function Ue(t,n){for(let e=0;e{const i=n.match(t.matchPattern);if(!i)return null;const r=i[0],a=n.match(t.parsePattern);if(!a)return null;let l=t.valueCallback?t.valueCallback(a[0]):a[0];l=e.valueCallback?e.valueCallback(l):l;const c=n.slice(r.length);return{value:l,rest:c}}}const qe=/^(\d+)(th|st|nd|rd)?/i,ze=/\d+/i,Ke={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Xe={any:[/^b/i,/^(a|c)/i]},Be={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ye={any:[/1/i,/2/i,/3/i,/4/i]},Je={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ge={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},He={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ze={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},tn={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},en={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},nn={ordinalNumber:Ve({matchPattern:qe,parsePattern:ze,valueCallback:t=>parseInt(t,10)}),era:K({matchPatterns:Ke,defaultMatchWidth:"wide",parsePatterns:Xe,defaultParseWidth:"any"}),quarter:K({matchPatterns:Be,defaultMatchWidth:"wide",parsePatterns:Ye,defaultParseWidth:"any",valueCallback:t=>t+1}),month:K({matchPatterns:Je,defaultMatchWidth:"wide",parsePatterns:Ge,defaultParseWidth:"any"}),day:K({matchPatterns:He,defaultMatchWidth:"wide",parsePatterns:Ze,defaultParseWidth:"any"}),dayPeriod:K({matchPatterns:tn,defaultMatchWidth:"any",parsePatterns:en,defaultParseWidth:"any"})},rn={code:"en-US",formatDistance:Pe,formatLong:De,formatRelative:je,localize:_e,match:nn,options:{weekStartsOn:0,firstWeekContainsDate:1}};function sn(t,n,e){const i=ye(),r=(e==null?void 0:e.locale)??i.locale??rn,a=2520,l=nt(t,n);if(isNaN(l))throw new RangeError("Invalid time value");const c=Object.assign({},e,{addSuffix:e==null?void 0:e.addSuffix,comparison:l});let m,s;l>0?(m=M(n),s=M(t)):(m=M(t),s=M(n));const o=Re(s,m),u=(Tt(s)-Tt(m))/1e3,h=Math.round((o-u)/60);let d;if(h<2)return e!=null&&e.includeSeconds?o<5?r.formatDistance("lessThanXSeconds",5,c):o<10?r.formatDistance("lessThanXSeconds",10,c):o<20?r.formatDistance("lessThanXSeconds",20,c):o<40?r.formatDistance("halfAMinute",0,c):o<60?r.formatDistance("lessThanXMinutes",1,c):r.formatDistance("xMinutes",1,c):h===0?r.formatDistance("lessThanXMinutes",1,c):r.formatDistance("xMinutes",h,c);if(h<45)return r.formatDistance("xMinutes",h,c);if(h<90)return r.formatDistance("aboutXHours",1,c);if(h{const n=new Date(t);return sn(n,new Date,{addSuffix:!0})};var rt=(t,n=[])=>({parts:(...e)=>{if(an(n))return rt(t,e);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...e)=>rt(t,[...n,...e]),rename:e=>rt(e,n),keys:()=>n,build:()=>[...new Set(n)].reduce((e,i)=>Object.assign(e,{[i]:{selector:[`&[data-scope="${$(t)}"][data-part="${$(i)}"]`,`& [data-scope="${$(t)}"][data-part="${$(i)}"]`].join(", "),attrs:{"data-scope":$(t),"data-part":$(i)}}}),{})}),$=t=>t.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),an=t=>t.length===0,Hn=t=>t?"":void 0,on=t=>t.nodeType===Node.DOCUMENT_NODE?t:t.ownerDocument??document;function cn(t){const n={getRootNode:e=>{var i;return((i=e.getRootNode)==null?void 0:i.call(e))??document},getDoc:e=>on(n.getRootNode(e)),getWin:e=>n.getDoc(e).defaultView??window,getActiveElement:e=>n.getDoc(e).activeElement,isActiveElement:(e,i)=>i===n.getActiveElement(e),getById:(e,i)=>n.getRootNode(e).getElementById(i),setValue:(e,i)=>{if(e==null||i==null)return;const r=i.toString();e.value!==r&&(e.value=i.toString())}};return{...n,...t}}const un=Symbol(),bt=Symbol(),X="a",st="w";let ln=(t,n)=>new Proxy(t,n);const mt=Object.getPrototypeOf,yt=new WeakMap,Vt=t=>t&&(yt.has(t)?yt.get(t):mt(t)===Object.prototype||mt(t)===Array.prototype),jt=t=>typeof t=="object"&&t!==null,hn=t=>{if(Array.isArray(t))return Array.from(t);const n=Object.getOwnPropertyDescriptors(t);return Object.values(n).forEach(e=>{e.configurable=!0}),Object.create(mt(t),n)},qt=t=>t[bt]||t,zt=(t,n,e,i)=>{if(!Vt(t))return t;let r=i&&i.get(t);if(!r){const m=qt(t);r=(s=>Object.values(Object.getOwnPropertyDescriptors(s)).some(o=>!o.configurable&&!o.writable))(m)?[m,hn(m)]:[m],i==null||i.set(t,r)}const[a,l]=r;let c=e&&e.get(a);return c&&c[1].f===!!l||(c=((m,s)=>{const o={f:s};let u=!1;const h=(f,p)=>{if(!u){let b=o[X].get(m);if(b||(b={},o[X].set(m,b)),f===st)b[st]=!0;else{let w=b[f];w||(w=new Set,b[f]=w),w.add(p)}}},d={get:(f,p)=>p===bt?m:(h("k",p),zt(Reflect.get(f,p),o[X],o.c,o.t)),has:(f,p)=>p===un?(u=!0,o[X].delete(m),!0):(h("h",p),Reflect.has(f,p)),getOwnPropertyDescriptor:(f,p)=>(h("o",p),Reflect.getOwnPropertyDescriptor(f,p)),ownKeys:f=>(h(st),Reflect.ownKeys(f))};return s&&(d.set=d.deleteProperty=()=>!1),[d,o]})(a,!!l),c[1].p=ln(l||a,c[0]),e&&e.set(a,c)),c[1][X]=n,c[1].c=e,c[1].t=i,c[1].p},Kt=(t,n,e,i,r=Object.is)=>{if(r(t,n))return!1;if(!jt(t)||!jt(n))return!0;const a=e.get(qt(t));if(!a)return!0;if(i){const c=i.get(t);if(c&&c.n===n)return c.g;i.set(t,{n,g:!1})}let l=null;try{for(const c of a.h||[])if(l=Reflect.has(t,c)!==Reflect.has(n,c),l)return l;if(a[st]===!0){if(l=((c,m)=>{const s=Reflect.ownKeys(c),o=Reflect.ownKeys(m);return s.length!==o.length||s.some((u,h)=>u!==o[h])})(t,n),l)return l}else for(const c of a.o||[])if(l=!!Reflect.getOwnPropertyDescriptor(t,c)!=!!Reflect.getOwnPropertyDescriptor(n,c),l)return l;for(const c of a.k||[])if(l=Kt(t[c],n[c],e,i,r),l)return l;return l===null&&(l=!0),l}finally{i&&i.set(t,{n,g:l})}},fn=t=>Vt(t)&&t[bt]||null,kt=(t,n=!0)=>{yt.set(t,n)};var lt=t=>typeof t=="object"&&t!==null,Q=new WeakMap,Y=new WeakSet,dn=(t=Object.is,n=(s,o)=>new Proxy(s,o),e=s=>lt(s)&&!Y.has(s)&&(Array.isArray(s)||!(Symbol.iterator in s))&&!(s instanceof WeakMap)&&!(s instanceof WeakSet)&&!(s instanceof Error)&&!(s instanceof Number)&&!(s instanceof Date)&&!(s instanceof String)&&!(s instanceof RegExp)&&!(s instanceof ArrayBuffer),i=s=>{switch(s.status){case"fulfilled":return s.value;case"rejected":throw s.reason;default:throw s}},r=new WeakMap,a=(s,o,u=i)=>{const h=r.get(s);if((h==null?void 0:h[0])===o)return h[1];const d=Array.isArray(s)?[]:Object.create(Object.getPrototypeOf(s));return kt(d,!0),r.set(s,[o,d]),Reflect.ownKeys(s).forEach(f=>{const p=Reflect.get(s,f);Y.has(p)?(kt(p,!1),d[f]=p):p instanceof Promise?Object.defineProperty(d,f,{get(){return u(p)}}):Q.has(p)?d[f]=F(p,u):d[f]=p}),Object.freeze(d)},l=new WeakMap,c=[1,1],m=s=>{if(!lt(s))throw new Error("object required");const o=l.get(s);if(o)return o;let u=c[0];const h=new Set,d=(S,g=++c[0])=>{u!==g&&(u=g,h.forEach(v=>v(S,g)))};let f=c[1];const p=(S=++c[1])=>(f!==S&&!h.size&&(f=S,w.forEach(([g])=>{const v=g[1](S);v>u&&(u=v)})),u),b=S=>(g,v)=>{const E=[...g];E[1]=[S,...E[1]],d(E,v)},w=new Map,C=(S,g)=>{if(h.size){const v=g[3](b(S));w.set(S,[g,v])}else w.set(S,[g])},x=S=>{var v;const g=w.get(S);g&&(w.delete(S),(v=g[1])==null||v.call(g))},V=S=>(h.add(S),h.size===1&&w.forEach(([v,E],_)=>{const q=v[3](b(_));w.set(_,[v,q])}),()=>{h.delete(S),h.size===0&&w.forEach(([v,E],_)=>{E&&(E(),w.set(_,[v]))})}),W=Array.isArray(s)?[]:Object.create(Object.getPrototypeOf(s)),N=n(W,{deleteProperty(S,g){const v=Reflect.get(S,g);x(g);const E=Reflect.deleteProperty(S,g);return E&&d(["delete",[g],v]),E},set(S,g,v,E){var xt;const _=Reflect.has(S,g),q=Reflect.get(S,g,E);if(_&&(t(q,v)||l.has(v)&&t(q,l.get(v))))return!0;x(g),lt(v)&&(v=fn(v)||v);let H=v;if(!((xt=Object.getOwnPropertyDescriptor(S,g))!=null&&xt.set))if(v instanceof Promise)v.then(k=>{v.status="fulfilled",v.value=k,d(["resolve",[g],k])}).catch(k=>{v.status="rejected",v.reason=k,d(["reject",[g],k])});else{!Q.has(v)&&e(v)&&(H=St(v));const k=!Y.has(H)&&Q.get(H);k&&C(g,k)}return Reflect.set(S,g,H,E),d(["set",[g],v,q]),!0}});l.set(s,N);const ct=[W,p,a,V];return Q.set(N,ct),Reflect.ownKeys(s).forEach(S=>{const g=Object.getOwnPropertyDescriptor(s,S);g.get||g.set?Object.defineProperty(W,S,g):N[S]=s[S]}),N})=>[m,Q,Y,t,n,e,i,r,a,l,c],[pn]=dn();function St(t={}){return pn(t)}function at(t,n,e){const i=Q.get(t);let r;const a=[],l=i[3];let c=!1;const s=l(o=>{if(a.push(o),e){n(a.splice(0));return}r||(r=Promise.resolve().then(()=>{r=void 0,c&&n(a.splice(0))}))});return c=!0,()=>{c=!1,s()}}function F(t,n){const e=Q.get(t),[i,r,a]=e;return a(i,r(),n)}function It(t){return Y.add(t),t}function mn(t,n){Object.keys(n).forEach(r=>{if(Object.getOwnPropertyDescriptor(t,r))throw new Error("object property already defined");const a=n[r],{get:l,set:c}=typeof a=="function"?{get:a}:a,m={};m.get=()=>l(F(i)),c&&(m.set=s=>c(i,s)),Object.defineProperty(t,r,m)});const i=St(t);return i}var yn=(t,n)=>Object.is(t,n);function Lt(t,n,e,i,r){let a=Reflect.get(F(t),n);const l=r||yn;function c(){const m=F(t);l(a,m[n])||(e(m[n]),a=Reflect.get(m,n))}return at(t,c,i)}function Ft(t,n,e){typeof e.value=="object"&&(e.value=U(e.value)),!e.enumerable||e.get||e.set||!e.configurable||!e.writable||n==="__proto__"?Object.defineProperty(t,n,e):t[n]=e.value}function U(t){if(typeof t!="object")return t;var n=0,e,i,r,a=Object.prototype.toString.call(t);if(a==="[object Object]"?r=Object.create(t.__proto__||null):a==="[object Array]"?r=Array(t.length):a==="[object Set]"?(r=new Set,t.forEach(function(l){r.add(U(l))})):a==="[object Map]"?(r=new Map,t.forEach(function(l,c){r.set(U(c),U(l))})):a==="[object Date]"?r=new Date(+t):a==="[object RegExp]"?r=new RegExp(t.source,t.flags):a==="[object DataView]"?r=new t.constructor(U(t.buffer)):a==="[object ArrayBuffer]"?r=t.slice(0):a.slice(-6)==="Array]"&&(r=new t.constructor(t)),r){for(i=Object.getOwnPropertySymbols(t);nn in t?gn(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,y=(t,n,e)=>(vn(t,typeof n!="symbol"?n+"":n,e),e);function bn(t){for(;t.length>0;)t.pop();return t}var Wt=(t,...n)=>(typeof t=="function"?t(...n):t)??void 0,T=t=>t,ht=()=>{},Nt=(()=>{let t=0;return()=>(t++,t.toString(36))})(),J=t=>Array.isArray(t),G=t=>!(t==null||typeof t!="object"||J(t)),Sn=t=>typeof t=="number"&&!Number.isNaN(t),A=t=>typeof t=="string",gt=t=>typeof t=="function";function ot(t){if(!wn(t)||t===void 0)return t;const n=Reflect.ownKeys(t).filter(i=>typeof i=="string"),e={};for(const i of n){const r=t[i];r!==void 0&&(e[i]=ot(r))}return e}var wn=t=>t&&typeof t=="object"&&t.constructor===Object;function ft(...t){const n=t.length===1?t[0]:t[1],e=t.length===2?t[0]:!0}function it(...t){const n=t.length===1?t[0]:t[1],e=t.length===2?t[0]:!0}function Xt(t,...n){for(const e of n){const i=ot(e);for(const r in i)G(e[r])?(t[r]||(t[r]={}),Xt(t[r],e[r])):t[r]=e[r]}return t}function Qt(t){return U(t)}function P(t){return A(t)?{type:t}:t}function I(t){return t?J(t)?t.slice():[t]:[]}function Bt(t){return G(t)&&t.predicate!=null}var xn=()=>!0;function Yt(t,n){return t=t??xn,(e,i,r)=>{if(A(t)){const a=n[t];return gt(a)?a(e,i,r):a}return Bt(t)?t.predicate(n)(e,i,r):t==null?void 0:t(e,i,r)}}function dt(t,n){return(e,i,r)=>Bt(t)?t.predicate(n)(e,i,r):t}function En(t){const n=t.computed??T({}),e=t.context??T({}),i=St({value:t.initial??"",previousValue:"",event:T({}),previousEvent:T({}),context:mn(e,n),done:!1,tags:[],hasTag(r){return this.tags.includes(r)},matches(...r){return r.includes(this.value)},can(r){return T(this).nextEvents.includes(r)},get nextEvents(){var l,c;const r=((c=(l=t.states)==null?void 0:l[this.value])==null?void 0:c.on)??{},a=(t==null?void 0:t.on)??{};return Object.keys({...r,...a})},get changed(){return this.event.value==="machine.init"||!this.previousValue?!1:this.value!==this.previousValue}});return T(i)}function tt(t,n){return(e,i)=>{if(Sn(t))return t;if(gt(t))return t(e,i);if(A(t)){const r=Number.parseFloat(t);if(!Number.isNaN(r))return r;if(n){const a=n==null?void 0:n[t];return it(a==null,`[@zag-js/core > determine-delay] Cannot determine delay for \`${t}\`. It doesn't exist in \`options.delays\``),gt(a)?a(e,i):a}}}}function Rn(t){return A(t)?{target:t}:t}function Mn(t,n){return(e,i,r)=>I(t).map(Rn).find(a=>Yt(a.guard,n)(e,i,r)??a.target??a.actions)}var Pn=class{constructor(t,n){var i,r,a,l,c,m;y(this,"status","Not Started"),y(this,"state"),y(this,"initialState"),y(this,"initialContext"),y(this,"id"),y(this,"type","machine"),y(this,"activityEvents",new Map),y(this,"delayedEvents",new Map),y(this,"stateListeners",new Set),y(this,"contextListeners",new Set),y(this,"eventListeners",new Set),y(this,"doneListeners",new Set),y(this,"contextWatchers",new Set),y(this,"removeStateListener",ht),y(this,"removeEventListener",ht),y(this,"removeContextListener",ht),y(this,"parent"),y(this,"children",new Map),y(this,"guardMap"),y(this,"actionMap"),y(this,"delayMap"),y(this,"activityMap"),y(this,"sync"),y(this,"options"),y(this,"config"),y(this,"start",s=>{if(this.state.value="",this.status==="Running")return this;this.status="Running",this.removeStateListener=at(this.state,()=>{this.stateListeners.forEach(p=>{p(this.stateSnapshot)})},this.sync),this.removeEventListener=Lt(this.state,"event",p=>{this.executeActions(this.config.onEvent,p),this.eventListeners.forEach(b=>{b(p)})},this.sync),this.removeContextListener=at(this.state.context,()=>{this.log("Context:",this.contextSnapshot),this.contextListeners.forEach(p=>{p(this.contextSnapshot)})},this.sync||this.options.debug),this.setupContextWatchers(),this.executeActivities(P("machine.start"),I(this.config.activities),"machine.start"),this.executeActions(this.config.entry,P("machine.start"));const o=P("machine.init"),u=G(s)?s.value:s,h=G(s)?s.context:void 0;h&&this.setContext(h);const d={target:u??this.config.initial},f=this.getNextStateInfo(d,o);return this.initialState=f,this.performStateChangeEffects(this.state.value,f,o),this}),y(this,"setupContextWatchers",()=>{var s;for(const[o,u]of Object.entries(this.config.watch??{})){const h=(s=this.options.compareFns)==null?void 0:s[o],d=Lt(this.state.context,o,()=>{this.executeActions(u,this.state.event)},this.sync,h);this.contextWatchers.add(d)}}),y(this,"stop",()=>{if(this.status!=="Stopped")return this.performExitEffects(this.state.value,P("machine.stop")),this.executeActions(this.config.exit,P("machine.stop")),this.setState(""),this.setEvent("machine.stop"),this.stopStateListeners(),this.stopChildren(),this.stopActivities(),this.stopDelayedEvents(),this.stopContextWatchers(),this.stopEventListeners(),this.stopContextListeners(),this.status="Stopped",this}),y(this,"stopEventListeners",()=>{this.eventListeners.clear(),this.removeEventListener()}),y(this,"stopContextListeners",()=>{this.contextListeners.clear(),this.removeContextListener()}),y(this,"stopStateListeners",()=>{this.removeStateListener(),this.stateListeners.clear()}),y(this,"stopContextWatchers",()=>{this.contextWatchers.forEach(s=>s()),this.contextWatchers.clear()}),y(this,"stopDelayedEvents",()=>{this.delayedEvents.forEach(s=>{s.forEach(o=>o())}),this.delayedEvents.clear()}),y(this,"stopActivities",s=>{var o,u;s?((o=this.activityEvents.get(s))==null||o.forEach(h=>h()),(u=this.activityEvents.get(s))==null||u.clear(),this.activityEvents.delete(s)):(this.activityEvents.forEach(h=>{h.forEach(d=>d()),h.clear()}),this.activityEvents.clear())}),y(this,"sendChild",(s,o)=>{const u=P(s),h=Wt(o,this.contextSnapshot),d=this.children.get(h);d||it(`[@zag-js/core] Cannot send '${u.type}' event to unknown child`),d.send(u)}),y(this,"stopChild",s=>{this.children.has(s)||it(`[@zag-js/core > stop-child] Cannot stop unknown child ${s}`),this.children.get(s).stop(),this.children.delete(s)}),y(this,"removeChild",s=>{this.children.delete(s)}),y(this,"stopChildren",()=>{this.children.forEach(s=>s.stop()),this.children.clear()}),y(this,"setParent",s=>{this.parent=s}),y(this,"spawn",(s,o)=>{const u=Wt(s);return o&&(u.id=o),u.type="machine.actor",u.setParent(this),this.children.set(u.id,T(u)),u.onDone(()=>{this.removeChild(u.id)}).start(),T(It(u))}),y(this,"stopActivity",s=>{var u;if(!this.state.value)return;const o=this.activityEvents.get(this.state.value);(u=o==null?void 0:o.get(s))==null||u(),o==null||o.delete(s)}),y(this,"addActivityCleanup",(s,o,u)=>{var h;s&&(this.activityEvents.has(s)?(h=this.activityEvents.get(s))==null||h.set(o,u):this.activityEvents.set(s,new Map([[o,u]])))}),y(this,"setState",s=>{this.state.previousValue=this.state.value,this.state.value=s;const o=this.getStateNode(s);s==null?bn(this.state.tags):this.state.tags=I(o==null?void 0:o.tags)}),y(this,"transformContext",s=>{var o,u;return(u=(o=this.options)==null?void 0:o.transformContext)==null||u.call(o,s),s}),y(this,"setContext",s=>{if(!s)return;const o=ot(this.transformContext(s));Xt(this.state.context,o)}),y(this,"setOptions",s=>{const o=ot(s);this.actionMap={...this.actionMap,...o.actions},this.delayMap={...this.delayMap,...o.delays},this.activityMap={...this.activityMap,...o.activities},this.guardMap={...this.guardMap,...o.guards}}),y(this,"getStateNode",s=>{var o;if(s)return(o=this.config.states)==null?void 0:o[s]}),y(this,"getNextStateInfo",(s,o)=>{const u=this.determineTransition(s,o),h=!(u!=null&&u.target),d=(u==null?void 0:u.target)??this.state.value,f=this.state.value!==d,p=this.getStateNode(d),w={reenter:!h&&!f&&!(u!=null&&u.internal),transition:u,stateNode:p,target:d,changed:f};return this.log("NextState:",`[${o.type}]`,this.state.value,"---->",w.target),w}),y(this,"getActionFromDelayedTransition",s=>{const o=P("machine.after"),h=tt(s.delay,this.delayMap)(this.contextSnapshot,o);let d;return{entry:()=>{d=globalThis.setTimeout(()=>{const f=this.getNextStateInfo(s,o);this.performStateChangeEffects(this.state.value,f,o)},h)},exit:()=>{globalThis.clearTimeout(d)}}}),y(this,"getDelayedEventActions",s=>{const o=this.getStateNode(s),u=P("machine.after");if(!o||!o.after)return;const h=[],d=[];if(J(o.after)){const f=this.determineTransition(o.after,u);if(!f)return;const p=this.getActionFromDelayedTransition(f);h.push(p.entry),d.push(p.exit)}else if(G(o.after))for(const f in o.after){const p=o.after[f];let b={};if(J(p)){const C=this.determineTransition(p,u);C&&(b=C)}else A(p)?b={target:p,delay:f}:b={...p,delay:f};const w=this.getActionFromDelayedTransition(b);h.push(w.entry),d.push(w.exit)}return{entries:h,exits:d}}),y(this,"executeActions",(s,o)=>{var h;const u=dt(s,this.guardMap)(this.contextSnapshot,o,this.guardMeta);for(const d of I(u)){const f=A(d)?(h=this.actionMap)==null?void 0:h[d]:d;ft(A(d)&&!f,`[@zag-js/core > execute-actions] No implementation found for action: \`${d}\``),f==null||f(this.state.context,o,this.meta)}}),y(this,"executeActivities",(s,o,u)=>{var h;for(const d of o){const f=A(d)?(h=this.activityMap)==null?void 0:h[d]:d;if(!f){ft(`[@zag-js/core > execute-activity] No implementation found for activity: \`${d}\``);continue}const p=f(this.state.context,s,this.meta);if(p){const b=A(d)?d:d.name||Nt();this.addActivityCleanup(u??this.state.value,b,p)}}}),y(this,"createEveryActivities",(s,o)=>{if(!s)return;const u=P("machine.every");if(J(s)){const h=I(s).find(b=>{const w=b.delay,x=tt(w,this.delayMap)(this.contextSnapshot,u);return Yt(b.guard,this.guardMap)(this.contextSnapshot,u,this.guardMeta)??x!=null});if(!h)return;const f=tt(h.delay,this.delayMap)(this.contextSnapshot,u);o(()=>{const b=globalThis.setInterval(()=>{this.executeActions(h.actions,u)},f);return()=>{globalThis.clearInterval(b)}})}else for(const h in s){const d=s==null?void 0:s[h],p=tt(h,this.delayMap)(this.contextSnapshot,u);o(()=>{const w=globalThis.setInterval(()=>{this.executeActions(d,u)},p);return()=>{globalThis.clearInterval(w)}})}}),y(this,"setEvent",s=>{this.state.previousEvent=this.state.event,this.state.event=It(P(s))}),y(this,"performExitEffects",(s,o)=>{const u=this.state.value;if(u==="")return;const h=s?this.getStateNode(s):void 0;this.stopActivities(u);const d=dt(h==null?void 0:h.exit,this.guardMap)(this.contextSnapshot,o,this.guardMeta),f=I(d),p=this.delayedEvents.get(u);p&&f.push(...p),this.executeActions(f,o),this.eventListeners.clear()}),y(this,"performEntryEffects",(s,o)=>{const u=this.getStateNode(s),h=I(u==null?void 0:u.activities);this.createEveryActivities(u==null?void 0:u.every,b=>{h.unshift(b)}),h.length>0&&this.executeActivities(o,h);const d=dt(u==null?void 0:u.entry,this.guardMap)(this.contextSnapshot,o,this.guardMeta),f=I(d),p=this.getDelayedEventActions(s);u!=null&&u.after&&p&&(this.delayedEvents.set(s,p==null?void 0:p.exits),f.push(...p.entries)),this.executeActions(f,o),(u==null?void 0:u.type)==="final"&&(this.state.done=!0,this.doneListeners.forEach(b=>{b(this.stateSnapshot)}),this.stop())}),y(this,"performTransitionEffects",(s,o)=>{const u=this.determineTransition(s,o);this.executeActions(u==null?void 0:u.actions,o)}),y(this,"performStateChangeEffects",(s,o,u)=>{this.setEvent(u);const h=o.changed||o.reenter;h&&this.performExitEffects(s,u),this.performTransitionEffects(o.transition,u),this.setState(o.target),h&&this.performEntryEffects(o.target,u)}),y(this,"determineTransition",(s,o)=>{const u=Mn(s,this.guardMap);return u==null?void 0:u(this.contextSnapshot,o,this.guardMeta)}),y(this,"sendParent",s=>{var u;this.parent||it("[@zag-js/core > send-parent] Cannot send event to an unknown parent");const o=P(s);(u=this.parent)==null||u.send(o)}),y(this,"log",(...s)=>{}),y(this,"send",s=>{const o=P(s);this.transition(this.state.value,o)}),y(this,"transition",(s,o)=>{var p,b;const u=A(s)?this.getStateNode(s):s==null?void 0:s.stateNode,h=P(o);if(!u&&!this.config.on){const w=this.status==="Stopped"?"[@zag-js/core > transition] Cannot transition a stopped machine":`[@zag-js/core > transition] State does not have a definition for \`state\`: ${s}, \`event\`: ${h.type}`;ft(w);return}const d=((p=u==null?void 0:u.on)==null?void 0:p[h.type])??((b=this.config.on)==null?void 0:b[h.type]),f=this.getNextStateInfo(d,h);return this.performStateChangeEffects(this.state.value,f,h),f.stateNode}),y(this,"subscribe",s=>(this.stateListeners.add(s),this.status==="Running"&&s(this.stateSnapshot),()=>{this.stateListeners.delete(s)})),y(this,"onDone",s=>(this.doneListeners.add(s),this)),y(this,"onTransition",s=>(this.stateListeners.add(s),this.status==="Running"&&s(this.stateSnapshot),this)),y(this,"onChange",s=>(this.contextListeners.add(s),this)),y(this,"onEvent",s=>(this.eventListeners.add(s),this)),this.config=Qt(t),this.options=Qt(n??{}),this.id=this.config.id??`machine-${Nt()}`,this.guardMap=((i=this.options)==null?void 0:i.guards)??{},this.actionMap=((r=this.options)==null?void 0:r.actions)??{},this.delayMap=((a=this.options)==null?void 0:a.delays)??{},this.activityMap=((l=this.options)==null?void 0:l.activities)??{},this.sync=((c=this.options)==null?void 0:c.sync)??!1,this.state=En(this.config),this.initialContext=F(this.state.context),this.transformContext(this.state.context);const e=P("machine.created");this.executeActions((m=this.config)==null?void 0:m.created,e)}get stateSnapshot(){return T(F(this.state))}getState(){return this.stateSnapshot}get contextSnapshot(){return this.stateSnapshot.context}get self(){const t=this;return{id:this.id,send:this.send.bind(this),sendParent:this.sendParent.bind(this),sendChild:this.sendChild.bind(this),stop:this.stop.bind(this),stopChild:this.stopChild.bind(this),spawn:this.spawn.bind(this),stopActivity:this.stopActivity.bind(this),get state(){return t.stateSnapshot},get initialContext(){return t.initialContext},get initialState(){var n;return((n=t.initialState)==null?void 0:n.target)??""}}}get meta(){var t;return{state:this.stateSnapshot,guards:this.guardMap,send:this.send.bind(this),self:this.self,initialContext:this.initialContext,initialState:((t=this.initialState)==null?void 0:t.target)??"",getState:()=>this.stateSnapshot,getAction:n=>this.actionMap[n],getGuard:n=>this.guardMap[n]}}get guardMeta(){return{state:this.stateSnapshot}}get[Symbol.toStringTag](){return"Machine"}},On=(t,n)=>new Pn(t,n),_t=t=>(t==null?void 0:t.constructor.name)==="Array",An=(t,n)=>{if(Object.is(t,n))return!0;if(t==null&&n!=null||t!=null&&n==null)return!1;if(typeof(t==null?void 0:t.isEqual)=="function"&&typeof(n==null?void 0:n.isEqual)=="function")return t.isEqual(n);if(typeof t=="function"&&typeof n=="function")return t.toString()===n.toString();if(_t(t)&&_t(n))return Array.from(t).toString()===Array.from(n).toString();if(typeof t!="object"||typeof n!="object")return!1;const e=Object.keys(n??Object.create(null)),i=e.length;for(let r=0;rtypeof t=="number"&&!Number.isNaN(t);function Jt(t){if(!Cn(t)||t===void 0)return t;const n=Reflect.ownKeys(t).filter(i=>typeof i=="string"),e={};for(const i of n){const r=t[i];r!==void 0&&(e[i]=Jt(r))}return e}var Cn=t=>t&&typeof t=="object"&&t.constructor===Object,Dn=rt("progress").parts("root","label","track","range","valueText","view","circle","circleTrack","circleRange"),D=Dn.build(),et=cn({getRootId:t=>`progress-${t.id}`,getTrackId:t=>`progress-${t.id}-track`,getLabelId:t=>`progress-${t.id}-label`,getCircleId:t=>`progress-${t.id}-circle`});function Tn(t,n,e){const i=t.context.percent,r=t.context.max,a=t.context.min,l=t.context.orientation,c=t.context.translations,m=t.context.isIndeterminate,s=t.context.value,o=c.value({value:s,max:r,percent:i,min:a}),u=jn(s,r),h={role:"progressbar","aria-label":o,"data-max":r,"aria-valuemin":a,"aria-valuemax":r,"aria-valuenow":s??void 0,"data-orientation":l,"data-state":u},d=kn(t.context);return{value:s,valueAsString:o,setValue(f){n({type:"VALUE.SET",value:f})},setToMax(){n({type:"VALUE.SET",value:r})},rootProps:e.element({dir:t.context.dir,...D.root.attrs,id:et.getRootId(t.context),"data-max":r,"data-value":s??void 0,"data-state":u,"data-orientation":l,style:{"--percent":m?void 0:i}}),labelProps:e.element({dir:t.context.dir,id:et.getLabelId(t.context),...D.label.attrs,"data-orientation":l}),valueTextProps:e.element({dir:t.context.dir,"aria-live":"polite",...D.valueText.attrs}),trackProps:e.element({dir:t.context.dir,id:et.getTrackId(t.context),...D.track.attrs,...h}),rangeProps:e.element({dir:t.context.dir,...D.range.attrs,"data-orientation":l,"data-state":u,style:{[t.context.isHorizontal?"width":"height"]:m?void 0:`${i}%`}}),circleProps:e.element({dir:t.context.dir,id:et.getCircleId(t.context),...D.circle.attrs,...h,...d.root}),circleTrackProps:e.element({dir:t.context.dir,"data-orientation":l,...D.circleTrack.attrs,...d.track}),circleRangeProps:e.element({dir:t.context.dir,...D.circleRange.attrs,...d.range,"data-state":u}),getViewProps(f){return e.element({dir:t.context.dir,...D.view.attrs,"data-state":f.state,hidden:f.state!==u})}}}function jn(t,n){return t==null?"indeterminate":t===n?"complete":"loading"}function kn(t){const n=t.isIndeterminate?void 0:t.percent*2.64,e={style:{cx:"50px",cy:"50px",r:"42px",fill:"transparent",strokeWidth:"var(--thickness)"}};return{root:{viewBox:"0 0 100 100",style:{width:"var(--size)",height:"var(--size)"}},track:e,range:{style:{...e.style,strokeDashoffset:"66px",strokeDasharray:n!=null?`${n} ${264-n}`:void 0}}}}function In(t){const n=Jt(t);return On({id:"progress",initial:"idle",context:{value:50,max:100,min:0,orientation:"horizontal",translations:{value:({percent:e})=>e===-1?"loading...":`${e} percent`,...n.translations},...n},created:["validateContext"],computed:{isIndeterminate:e=>e.value===null,percent(e){return wt(e.value)?Math.round((e.value-e.min)/(e.max-e.min)*100):-1},isAtMax:e=>e.value===e.max,isHorizontal:e=>e.orientation==="horizontal",isRtl:e=>e.dir==="rtl"},states:{idle:{on:{"VALUE.SET":{actions:["setValue"]}}}}},{guards:{},actions:{setValue:(e,i)=>{e.value=i.value===null?null:Math.max(0,Math.min(i.value,e.max))},validateContext:e=>{if(!Ln(e.max))throw new Error(`[Progress] Invalid max value: ${e.max}`);if(!Fn(e.value,e.max))throw new Error(`[Progress] Invalid value: ${e.value}`)}}})}function Ln(t){return wt(t)&&!isNaN(t)&&t>0}function Fn(t,n){return wt(t)&&!isNaN(t)&&t<=n&&t>=0}function Wn(t){return new Proxy({},{get(){return t}})}var Nn=Wn(t=>t),Qn=typeof document<"u"?R.useLayoutEffect:R.useEffect,$t=t=>(t==null?void 0:t.constructor.name)==="Array",Gt=(t,n)=>{if(Object.is(t,n))return!0;if(t==null&&n!=null||t!=null&&n==null)return!1;if(typeof(t==null?void 0:t.isEqual)=="function"&&typeof(n==null?void 0:n.isEqual)=="function")return t.isEqual(n);if(typeof t=="function"&&typeof n=="function")return t.toString()===n.toString();if($t(t)&&$t(n))return Array.from(t).toString()===Array.from(n).toString();if(typeof t!="object"||typeof n!="object")return!1;const e=Object.keys(n??Object.create(null)),i=e.length;for(let r=0;rtypeof i=="string"),e={};for(const i of n){const r=t[i];r!==void 0&&(e[i]=Ht(r))}return e}var _n=t=>t&&typeof t=="object"&&t.constructor===Object;function $n(t){const n=R.useRef();return R.useEffect(()=>{n.current=t}),n.current}function Un(t,n){const e=R.useRef(!1),i=R.useRef(!1);R.useEffect(()=>{if(e.current&&i.current)return t();i.current=!0},n),R.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[])}var{use:Ut}=L,Vn=new WeakMap;function qn(t,n){const{actions:e,context:i,sync:r}=n??{},a=R.useRef(),l=R.useRef(),c=R.useSyncExternalStore(R.useCallback(h=>at(t.state,h,r),[r]),()=>{const h=F(t.state,Ut);try{if(a.current&&l.current&&!Kt(a.current,h,l.current,new WeakMap))return a.current}catch{}return h},()=>F(t.state,Ut));t.setOptions({actions:e});const m=$n(i),s=R.useMemo(()=>Ht(i??{}),[i]);Un(()=>{Object.entries(s).map(([p,b])=>({key:p,curr:b,prev:m==null?void 0:m[p],equal:Gt(m==null?void 0:m[p],b)})).every(({equal:p})=>p)||t.setContext(s)},[s]);const o=new WeakMap;R.useEffect(()=>{a.current=c,l.current=o});const u=R.useMemo(()=>new WeakMap,[]);return zt(c,o,u,Vn)}function zn(t){const n=R.useRef();return n.current||(n.current={v:t()}),n.current.v}function Kn(t,n){const{state:e,context:i}=n??{},r=zn(()=>{const a=typeof t=="function"?t():t;return i&&a.setContext(i),a});return Qn(()=>(r.start(e),()=>{r.stop()}),[]),r}function Xn(t,n){const e=Kn(t,n);return[qn(e,n),e.send,e]}const Zn=({isIntermediate:t=!1,value:n=0,label:e})=>{const[i,r]=Xn(In({id:R.useId()}),{context:{value:t?null:n}}),a=Tn(i,r,Nn);return j.jsxs("div",{...a.rootProps,children:[e?j.jsxs("div",{...a.labelProps,children:[e," "]}):null,j.jsx("div",{...a.trackProps,className:"h-[2px]",children:j.jsx("div",{...a.rangeProps,className:"bg-primary-600 -translate-x-full h-full animate-progress w-[210%]"})})]})},tr=({title:t,description:n,actions:e})=>j.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 w-full max-w-sm px-4 m-auto",children:[j.jsx("h1",{className:"mt-3 text-lg text-gray-800 dark:text-white",children:t}),j.jsx("p",{className:"text-gray-500 dark:text-gray-400 text-center",children:n}),e]}),er=({children:t})=>j.jsx("div",{className:"border-l border-r border-gray-800 overflow-auto flex flex-col",children:j.jsx("div",{className:"flex flex-col flex-1 overflow-auto",children:t})});export{tr as E,er as P,Jn as a,cn as b,rt as c,Hn as d,Jt as e,On as f,Xn as g,Zn as h,An as i,Nn as n,Gn as t,Yn as u}; -//# sourceMappingURL=PageLayout-t9exb1nu.js.map +import{_ as Zt,c as Et,n as te,i as Rt,d as Mt,t as ee,f as ne,e as Pt,g as Ot,s as re,h as se,k as B,S as ie,R as L,l as ae,p as oe,r as R,j}from"./index-OPB39aai.js";var ce=function(t){Zt(n,t);function n(i,r){var a;return a=t.call(this)||this,a.client=i,a.options=r,a.trackedProps=[],a.selectError=null,a.bindMethods(),a.setOptions(r),a}var e=n.prototype;return e.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},e.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),At(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},e.onUnsubscribe=function(){this.listeners.length||this.destroy()},e.shouldFetchOnReconnect=function(){return pt(this.currentQuery,this.options,this.options.refetchOnReconnect)},e.shouldFetchOnWindowFocus=function(){return pt(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},e.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},e.setOptions=function(r,a){var l=this.options,c=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(r),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=l.queryKey),this.updateQuery();var m=this.hasListeners();m&&Ct(this.currentQuery,c,this.options,l)&&this.executeFetch(),this.updateResult(a),m&&(this.currentQuery!==c||this.options.enabled!==l.enabled||this.options.staleTime!==l.staleTime)&&this.updateStaleTimeout();var s=this.computeRefetchInterval();m&&(this.currentQuery!==c||this.options.enabled!==l.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)},e.getOptimisticResult=function(r){var a=this.client.defaultQueryObserverOptions(r),l=this.client.getQueryCache().build(this.client,a);return this.createResult(l,a)},e.getCurrentResult=function(){return this.currentResult},e.trackResult=function(r,a){var l=this,c={},m=function(o){l.trackedProps.includes(o)||l.trackedProps.push(o)};return Object.keys(r).forEach(function(s){Object.defineProperty(c,s,{configurable:!1,enumerable:!0,get:function(){return m(s),r[s]}})}),(a.useErrorBoundary||a.suspense)&&m("error"),c},e.getNextResult=function(r){var a=this;return new Promise(function(l,c){var m=a.subscribe(function(s){s.isFetching||(m(),s.isError&&(r!=null&&r.throwOnError)?c(s.error):l(s))})})},e.getCurrentQuery=function(){return this.currentQuery},e.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},e.refetch=function(r){return this.fetch(Et({},r,{meta:{refetchPage:r==null?void 0:r.refetchPage}}))},e.fetchOptimistic=function(r){var a=this,l=this.client.defaultQueryObserverOptions(r),c=this.client.getQueryCache().build(this.client,l);return c.fetch().then(function(){return a.createResult(c,l)})},e.fetch=function(r){var a=this;return this.executeFetch(r).then(function(){return a.updateResult(),a.currentResult})},e.executeFetch=function(r){this.updateQuery();var a=this.currentQuery.fetch(this.options,r);return r!=null&&r.throwOnError||(a=a.catch(te)),a},e.updateStaleTimeout=function(){var r=this;if(this.clearStaleTimeout(),!(Rt||this.currentResult.isStale||!Mt(this.options.staleTime))){var a=ee(this.currentResult.dataUpdatedAt,this.options.staleTime),l=a+1;this.staleTimeoutId=setTimeout(function(){r.currentResult.isStale||r.updateResult()},l)}},e.computeRefetchInterval=function(){var r;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(r=this.options.refetchInterval)!=null?r:!1},e.updateRefetchInterval=function(r){var a=this;this.clearRefetchInterval(),this.currentRefetchInterval=r,!(Rt||this.options.enabled===!1||!Mt(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(a.options.refetchIntervalInBackground||ne.isFocused())&&a.executeFetch()},this.currentRefetchInterval))},e.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},e.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},e.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},e.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},e.createResult=function(r,a){var l=this.currentQuery,c=this.options,m=this.currentResult,s=this.currentResultState,o=this.currentResultOptions,u=r!==l,h=u?r.state:this.currentQueryInitialState,d=u?this.currentResult:this.previousQueryResult,f=r.state,p=f.dataUpdatedAt,b=f.error,w=f.errorUpdatedAt,C=f.isFetching,x=f.status,V=!1,W=!1,O;if(a.optimisticResults){var N=this.hasListeners(),ct=!N&&At(r,a),S=N&&Ct(r,l,a,c);(ct||S)&&(C=!0,p||(x="loading"))}if(a.keepPreviousData&&!f.dataUpdateCount&&(d!=null&&d.isSuccess)&&x!=="error")O=d.data,p=d.dataUpdatedAt,x=d.status,V=!0;else if(a.select&&typeof f.data<"u")if(m&&f.data===(s==null?void 0:s.data)&&a.select===this.selectFn)O=this.selectResult;else try{this.selectFn=a.select,O=a.select(f.data),a.structuralSharing!==!1&&(O=Pt(m==null?void 0:m.data,O)),this.selectResult=O,this.selectError=null}catch(E){Ot().error(E),this.selectError=E}else O=f.data;if(typeof a.placeholderData<"u"&&typeof O>"u"&&(x==="loading"||x==="idle")){var g;if(m!=null&&m.isPlaceholderData&&a.placeholderData===(o==null?void 0:o.placeholderData))g=m.data;else if(g=typeof a.placeholderData=="function"?a.placeholderData():a.placeholderData,a.select&&typeof g<"u")try{g=a.select(g),a.structuralSharing!==!1&&(g=Pt(m==null?void 0:m.data,g)),this.selectError=null}catch(E){Ot().error(E),this.selectError=E}typeof g<"u"&&(x="success",O=g,W=!0)}this.selectError&&(b=this.selectError,O=this.selectResult,w=Date.now(),x="error");var v={status:x,isLoading:x==="loading",isSuccess:x==="success",isError:x==="error",isIdle:x==="idle",data:O,dataUpdatedAt:p,error:b,errorUpdatedAt:w,failureCount:f.fetchFailureCount,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>h.dataUpdateCount||f.errorUpdateCount>h.errorUpdateCount,isFetching:C,isRefetching:C&&x!=="loading",isLoadingError:x==="error"&&f.dataUpdatedAt===0,isPlaceholderData:W,isPreviousData:V,isRefetchError:x==="error"&&f.dataUpdatedAt!==0,isStale:vt(r,a),refetch:this.refetch,remove:this.remove};return v},e.shouldNotifyListeners=function(r,a){if(!a)return!0;var l=this.options,c=l.notifyOnChangeProps,m=l.notifyOnChangePropsExclusions;if(!c&&!m||c==="tracked"&&!this.trackedProps.length)return!0;var s=c==="tracked"?this.trackedProps:c;return Object.keys(r).some(function(o){var u=o,h=r[u]!==a[u],d=s==null?void 0:s.some(function(p){return p===o}),f=m==null?void 0:m.some(function(p){return p===o});return h&&!f&&(!s||d)})},e.updateResult=function(r){var a=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!re(this.currentResult,a)){var l={cache:!0};(r==null?void 0:r.listeners)!==!1&&this.shouldNotifyListeners(this.currentResult,a)&&(l.listeners=!0),this.notify(Et({},l,r))}},e.updateQuery=function(){var r=this.client.getQueryCache().build(this.client,this.options);if(r!==this.currentQuery){var a=this.currentQuery;this.currentQuery=r,this.currentQueryInitialState=r.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(a==null||a.removeObserver(this),r.addObserver(this))}},e.onQueryUpdate=function(r){var a={};r.type==="success"?a.onSuccess=!0:r.type==="error"&&!se(r.error)&&(a.onError=!0),this.updateResult(a),this.hasListeners()&&this.updateTimers()},e.notify=function(r){var a=this;B.batch(function(){r.onSuccess?(a.options.onSuccess==null||a.options.onSuccess(a.currentResult.data),a.options.onSettled==null||a.options.onSettled(a.currentResult.data,null)):r.onError&&(a.options.onError==null||a.options.onError(a.currentResult.error),a.options.onSettled==null||a.options.onSettled(void 0,a.currentResult.error)),r.listeners&&a.listeners.forEach(function(l){l(a.currentResult)}),r.cache&&a.client.getQueryCache().notify({query:a.currentQuery,type:"observerResultsUpdated"})})},n}(ie);function ue(t,n){return n.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&n.retryOnMount===!1)}function At(t,n){return ue(t,n)||t.state.dataUpdatedAt>0&&pt(t,n,n.refetchOnMount)}function pt(t,n,e){if(n.enabled!==!1){var i=typeof e=="function"?e(t):e;return i==="always"||i!==!1&&vt(t,n)}return!1}function Ct(t,n,e,i){return e.enabled!==!1&&(t!==n||i.enabled===!1)&&(!e.suspense||t.state.status!=="error")&&vt(t,e)}function vt(t,n){return t.isStaleByTime(n.staleTime)}function le(){var t=!1;return{clearReset:function(){t=!1},reset:function(){t=!0},isReset:function(){return t}}}var he=L.createContext(le()),fe=function(){return L.useContext(he)};function de(t,n,e){return typeof n=="function"?n.apply(void 0,e):typeof n=="boolean"?n:!!t}function pe(t,n){var e=L.useRef(!1),i=L.useState(0),r=i[1],a=ae(),l=fe(),c=a.defaultQueryObserverOptions(t);c.optimisticResults=!0,c.onError&&(c.onError=B.batchCalls(c.onError)),c.onSuccess&&(c.onSuccess=B.batchCalls(c.onSuccess)),c.onSettled&&(c.onSettled=B.batchCalls(c.onSettled)),c.suspense&&(typeof c.staleTime!="number"&&(c.staleTime=1e3),c.cacheTime===0&&(c.cacheTime=1)),(c.suspense||c.useErrorBoundary)&&(l.isReset()||(c.retryOnMount=!1));var m=L.useState(function(){return new n(a,c)}),s=m[0],o=s.getOptimisticResult(c);if(L.useEffect(function(){e.current=!0,l.clearReset();var u=s.subscribe(B.batchCalls(function(){e.current&&r(function(h){return h+1})}));return s.updateResult(),function(){e.current=!1,u()}},[l,s]),L.useEffect(function(){s.setOptions(c,{listeners:!1})},[c,s]),c.suspense&&o.isLoading)throw s.fetchOptimistic(c).then(function(u){var h=u.data;c.onSuccess==null||c.onSuccess(h),c.onSettled==null||c.onSettled(h,null)}).catch(function(u){l.clearReset(),c.onError==null||c.onError(u),c.onSettled==null||c.onSettled(void 0,u)});if(o.isError&&!l.isReset()&&!o.isFetching&&de(c.suspense,c.useErrorBoundary,[o.error,s.getCurrentQuery()]))throw o.error;return c.notifyOnChangeProps==="tracked"&&(o=s.trackResult(o,c)),o}function Yn(t,n,e){var i=oe(t,n,e);return pe(i,ce)}const Jn=async t=>{const n=await fetch(t);if(!n.ok)throw new Error(n.statusText);return await n.json()};function M(t){const n=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&n==="[object Date]"?new t.constructor(+t):typeof t=="number"||n==="[object Number]"||typeof t=="string"||n==="[object String]"?new Date(t):new Date(NaN)}const Z=43200,Dt=1440;let me={};function ye(){return me}function Tt(t){const n=M(t),e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),+t-+e}function nt(t,n){const e=M(t),i=M(n),r=e.getTime()-i.getTime();return r<0?-1:r>0?1:r}function ge(t,n){const e=M(t),i=M(n),r=e.getFullYear()-i.getFullYear(),a=e.getMonth()-i.getMonth();return r*12+a}function ve(t){return n=>{const i=(t?Math[t]:Math.trunc)(n);return i===0?0:i}}function be(t,n){return+M(t)-+M(n)}function Se(t){const n=M(t);return n.setHours(23,59,59,999),n}function we(t){const n=M(t),e=n.getMonth();return n.setFullYear(n.getFullYear(),e+1,0),n.setHours(23,59,59,999),n}function xe(t){const n=M(t);return+Se(n)==+we(n)}function Ee(t,n){const e=M(t),i=M(n),r=nt(e,i),a=Math.abs(ge(e,i));let l;if(a<1)l=0;else{e.getMonth()===1&&e.getDate()>27&&e.setDate(30),e.setMonth(e.getMonth()-r*a);let c=nt(e,i)===-r;xe(M(t))&&a===1&&nt(t,i)===1&&(c=!1),l=r*(a-Number(c))}return l===0?0:l}function Re(t,n,e){const i=be(t,n)/1e3;return ve(e==null?void 0:e.roundingMethod)(i)}const Me={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Pe=(t,n,e)=>{let i;const r=Me[t];return typeof r=="string"?i=r:n===1?i=r.one:i=r.other.replace("{{count}}",n.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+i:i+" ago":i};function ut(t){return(n={})=>{const e=n.width?String(n.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}const Oe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ae={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ce={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},De={date:ut({formats:Oe,defaultWidth:"full"}),time:ut({formats:Ae,defaultWidth:"full"}),dateTime:ut({formats:Ce,defaultWidth:"full"})},Te={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},je=(t,n,e,i)=>Te[t];function z(t){return(n,e)=>{const i=e!=null&&e.context?String(e.context):"standalone";let r;if(i==="formatting"&&t.formattingValues){const l=t.defaultFormattingWidth||t.defaultWidth,c=e!=null&&e.width?String(e.width):l;r=t.formattingValues[c]||t.formattingValues[l]}else{const l=t.defaultWidth,c=e!=null&&e.width?String(e.width):t.defaultWidth;r=t.values[c]||t.values[l]}const a=t.argumentCallback?t.argumentCallback(n):n;return r[a]}}const ke={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ie={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Le={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Fe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},We={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Ne={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Qe=(t,n)=>{const e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},_e={ordinalNumber:Qe,era:z({values:ke,defaultWidth:"wide"}),quarter:z({values:Ie,defaultWidth:"wide",argumentCallback:t=>t-1}),month:z({values:Le,defaultWidth:"wide"}),day:z({values:Fe,defaultWidth:"wide"}),dayPeriod:z({values:We,defaultWidth:"wide",formattingValues:Ne,defaultFormattingWidth:"wide"})};function K(t){return(n,e={})=>{const i=e.width,r=i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth],a=n.match(r);if(!a)return null;const l=a[0],c=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth],m=Array.isArray(c)?Ue(c,u=>u.test(l)):$e(c,u=>u.test(l));let s;s=t.valueCallback?t.valueCallback(m):m,s=e.valueCallback?e.valueCallback(s):s;const o=n.slice(l.length);return{value:s,rest:o}}}function $e(t,n){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&n(t[e]))return e}function Ue(t,n){for(let e=0;e{const i=n.match(t.matchPattern);if(!i)return null;const r=i[0],a=n.match(t.parsePattern);if(!a)return null;let l=t.valueCallback?t.valueCallback(a[0]):a[0];l=e.valueCallback?e.valueCallback(l):l;const c=n.slice(r.length);return{value:l,rest:c}}}const qe=/^(\d+)(th|st|nd|rd)?/i,ze=/\d+/i,Ke={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Xe={any:[/^b/i,/^(a|c)/i]},Be={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ye={any:[/1/i,/2/i,/3/i,/4/i]},Je={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ge={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},He={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ze={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},tn={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},en={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},nn={ordinalNumber:Ve({matchPattern:qe,parsePattern:ze,valueCallback:t=>parseInt(t,10)}),era:K({matchPatterns:Ke,defaultMatchWidth:"wide",parsePatterns:Xe,defaultParseWidth:"any"}),quarter:K({matchPatterns:Be,defaultMatchWidth:"wide",parsePatterns:Ye,defaultParseWidth:"any",valueCallback:t=>t+1}),month:K({matchPatterns:Je,defaultMatchWidth:"wide",parsePatterns:Ge,defaultParseWidth:"any"}),day:K({matchPatterns:He,defaultMatchWidth:"wide",parsePatterns:Ze,defaultParseWidth:"any"}),dayPeriod:K({matchPatterns:tn,defaultMatchWidth:"any",parsePatterns:en,defaultParseWidth:"any"})},rn={code:"en-US",formatDistance:Pe,formatLong:De,formatRelative:je,localize:_e,match:nn,options:{weekStartsOn:0,firstWeekContainsDate:1}};function sn(t,n,e){const i=ye(),r=(e==null?void 0:e.locale)??i.locale??rn,a=2520,l=nt(t,n);if(isNaN(l))throw new RangeError("Invalid time value");const c=Object.assign({},e,{addSuffix:e==null?void 0:e.addSuffix,comparison:l});let m,s;l>0?(m=M(n),s=M(t)):(m=M(t),s=M(n));const o=Re(s,m),u=(Tt(s)-Tt(m))/1e3,h=Math.round((o-u)/60);let d;if(h<2)return e!=null&&e.includeSeconds?o<5?r.formatDistance("lessThanXSeconds",5,c):o<10?r.formatDistance("lessThanXSeconds",10,c):o<20?r.formatDistance("lessThanXSeconds",20,c):o<40?r.formatDistance("halfAMinute",0,c):o<60?r.formatDistance("lessThanXMinutes",1,c):r.formatDistance("xMinutes",1,c):h===0?r.formatDistance("lessThanXMinutes",1,c):r.formatDistance("xMinutes",h,c);if(h<45)return r.formatDistance("xMinutes",h,c);if(h<90)return r.formatDistance("aboutXHours",1,c);if(h{const n=new Date(t);return sn(n,new Date,{addSuffix:!0})};var rt=(t,n=[])=>({parts:(...e)=>{if(an(n))return rt(t,e);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...e)=>rt(t,[...n,...e]),rename:e=>rt(e,n),keys:()=>n,build:()=>[...new Set(n)].reduce((e,i)=>Object.assign(e,{[i]:{selector:[`&[data-scope="${$(t)}"][data-part="${$(i)}"]`,`& [data-scope="${$(t)}"][data-part="${$(i)}"]`].join(", "),attrs:{"data-scope":$(t),"data-part":$(i)}}}),{})}),$=t=>t.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),an=t=>t.length===0,Hn=t=>t?"":void 0,on=t=>t.nodeType===Node.DOCUMENT_NODE?t:t.ownerDocument??document;function cn(t){const n={getRootNode:e=>{var i;return((i=e.getRootNode)==null?void 0:i.call(e))??document},getDoc:e=>on(n.getRootNode(e)),getWin:e=>n.getDoc(e).defaultView??window,getActiveElement:e=>n.getDoc(e).activeElement,isActiveElement:(e,i)=>i===n.getActiveElement(e),getById:(e,i)=>n.getRootNode(e).getElementById(i),setValue:(e,i)=>{if(e==null||i==null)return;const r=i.toString();e.value!==r&&(e.value=i.toString())}};return{...n,...t}}const un=Symbol(),bt=Symbol(),X="a",st="w";let ln=(t,n)=>new Proxy(t,n);const mt=Object.getPrototypeOf,yt=new WeakMap,Vt=t=>t&&(yt.has(t)?yt.get(t):mt(t)===Object.prototype||mt(t)===Array.prototype),jt=t=>typeof t=="object"&&t!==null,hn=t=>{if(Array.isArray(t))return Array.from(t);const n=Object.getOwnPropertyDescriptors(t);return Object.values(n).forEach(e=>{e.configurable=!0}),Object.create(mt(t),n)},qt=t=>t[bt]||t,zt=(t,n,e,i)=>{if(!Vt(t))return t;let r=i&&i.get(t);if(!r){const m=qt(t);r=(s=>Object.values(Object.getOwnPropertyDescriptors(s)).some(o=>!o.configurable&&!o.writable))(m)?[m,hn(m)]:[m],i==null||i.set(t,r)}const[a,l]=r;let c=e&&e.get(a);return c&&c[1].f===!!l||(c=((m,s)=>{const o={f:s};let u=!1;const h=(f,p)=>{if(!u){let b=o[X].get(m);if(b||(b={},o[X].set(m,b)),f===st)b[st]=!0;else{let w=b[f];w||(w=new Set,b[f]=w),w.add(p)}}},d={get:(f,p)=>p===bt?m:(h("k",p),zt(Reflect.get(f,p),o[X],o.c,o.t)),has:(f,p)=>p===un?(u=!0,o[X].delete(m),!0):(h("h",p),Reflect.has(f,p)),getOwnPropertyDescriptor:(f,p)=>(h("o",p),Reflect.getOwnPropertyDescriptor(f,p)),ownKeys:f=>(h(st),Reflect.ownKeys(f))};return s&&(d.set=d.deleteProperty=()=>!1),[d,o]})(a,!!l),c[1].p=ln(l||a,c[0]),e&&e.set(a,c)),c[1][X]=n,c[1].c=e,c[1].t=i,c[1].p},Kt=(t,n,e,i,r=Object.is)=>{if(r(t,n))return!1;if(!jt(t)||!jt(n))return!0;const a=e.get(qt(t));if(!a)return!0;if(i){const c=i.get(t);if(c&&c.n===n)return c.g;i.set(t,{n,g:!1})}let l=null;try{for(const c of a.h||[])if(l=Reflect.has(t,c)!==Reflect.has(n,c),l)return l;if(a[st]===!0){if(l=((c,m)=>{const s=Reflect.ownKeys(c),o=Reflect.ownKeys(m);return s.length!==o.length||s.some((u,h)=>u!==o[h])})(t,n),l)return l}else for(const c of a.o||[])if(l=!!Reflect.getOwnPropertyDescriptor(t,c)!=!!Reflect.getOwnPropertyDescriptor(n,c),l)return l;for(const c of a.k||[])if(l=Kt(t[c],n[c],e,i,r),l)return l;return l===null&&(l=!0),l}finally{i&&i.set(t,{n,g:l})}},fn=t=>Vt(t)&&t[bt]||null,kt=(t,n=!0)=>{yt.set(t,n)};var lt=t=>typeof t=="object"&&t!==null,Q=new WeakMap,Y=new WeakSet,dn=(t=Object.is,n=(s,o)=>new Proxy(s,o),e=s=>lt(s)&&!Y.has(s)&&(Array.isArray(s)||!(Symbol.iterator in s))&&!(s instanceof WeakMap)&&!(s instanceof WeakSet)&&!(s instanceof Error)&&!(s instanceof Number)&&!(s instanceof Date)&&!(s instanceof String)&&!(s instanceof RegExp)&&!(s instanceof ArrayBuffer),i=s=>{switch(s.status){case"fulfilled":return s.value;case"rejected":throw s.reason;default:throw s}},r=new WeakMap,a=(s,o,u=i)=>{const h=r.get(s);if((h==null?void 0:h[0])===o)return h[1];const d=Array.isArray(s)?[]:Object.create(Object.getPrototypeOf(s));return kt(d,!0),r.set(s,[o,d]),Reflect.ownKeys(s).forEach(f=>{const p=Reflect.get(s,f);Y.has(p)?(kt(p,!1),d[f]=p):p instanceof Promise?Object.defineProperty(d,f,{get(){return u(p)}}):Q.has(p)?d[f]=F(p,u):d[f]=p}),Object.freeze(d)},l=new WeakMap,c=[1,1],m=s=>{if(!lt(s))throw new Error("object required");const o=l.get(s);if(o)return o;let u=c[0];const h=new Set,d=(S,g=++c[0])=>{u!==g&&(u=g,h.forEach(v=>v(S,g)))};let f=c[1];const p=(S=++c[1])=>(f!==S&&!h.size&&(f=S,w.forEach(([g])=>{const v=g[1](S);v>u&&(u=v)})),u),b=S=>(g,v)=>{const E=[...g];E[1]=[S,...E[1]],d(E,v)},w=new Map,C=(S,g)=>{if(h.size){const v=g[3](b(S));w.set(S,[g,v])}else w.set(S,[g])},x=S=>{var v;const g=w.get(S);g&&(w.delete(S),(v=g[1])==null||v.call(g))},V=S=>(h.add(S),h.size===1&&w.forEach(([v,E],_)=>{const q=v[3](b(_));w.set(_,[v,q])}),()=>{h.delete(S),h.size===0&&w.forEach(([v,E],_)=>{E&&(E(),w.set(_,[v]))})}),W=Array.isArray(s)?[]:Object.create(Object.getPrototypeOf(s)),N=n(W,{deleteProperty(S,g){const v=Reflect.get(S,g);x(g);const E=Reflect.deleteProperty(S,g);return E&&d(["delete",[g],v]),E},set(S,g,v,E){var xt;const _=Reflect.has(S,g),q=Reflect.get(S,g,E);if(_&&(t(q,v)||l.has(v)&&t(q,l.get(v))))return!0;x(g),lt(v)&&(v=fn(v)||v);let H=v;if(!((xt=Object.getOwnPropertyDescriptor(S,g))!=null&&xt.set))if(v instanceof Promise)v.then(k=>{v.status="fulfilled",v.value=k,d(["resolve",[g],k])}).catch(k=>{v.status="rejected",v.reason=k,d(["reject",[g],k])});else{!Q.has(v)&&e(v)&&(H=St(v));const k=!Y.has(H)&&Q.get(H);k&&C(g,k)}return Reflect.set(S,g,H,E),d(["set",[g],v,q]),!0}});l.set(s,N);const ct=[W,p,a,V];return Q.set(N,ct),Reflect.ownKeys(s).forEach(S=>{const g=Object.getOwnPropertyDescriptor(s,S);g.get||g.set?Object.defineProperty(W,S,g):N[S]=s[S]}),N})=>[m,Q,Y,t,n,e,i,r,a,l,c],[pn]=dn();function St(t={}){return pn(t)}function at(t,n,e){const i=Q.get(t);let r;const a=[],l=i[3];let c=!1;const s=l(o=>{if(a.push(o),e){n(a.splice(0));return}r||(r=Promise.resolve().then(()=>{r=void 0,c&&n(a.splice(0))}))});return c=!0,()=>{c=!1,s()}}function F(t,n){const e=Q.get(t),[i,r,a]=e;return a(i,r(),n)}function It(t){return Y.add(t),t}function mn(t,n){Object.keys(n).forEach(r=>{if(Object.getOwnPropertyDescriptor(t,r))throw new Error("object property already defined");const a=n[r],{get:l,set:c}=typeof a=="function"?{get:a}:a,m={};m.get=()=>l(F(i)),c&&(m.set=s=>c(i,s)),Object.defineProperty(t,r,m)});const i=St(t);return i}var yn=(t,n)=>Object.is(t,n);function Lt(t,n,e,i,r){let a=Reflect.get(F(t),n);const l=r||yn;function c(){const m=F(t);l(a,m[n])||(e(m[n]),a=Reflect.get(m,n))}return at(t,c,i)}function Ft(t,n,e){typeof e.value=="object"&&(e.value=U(e.value)),!e.enumerable||e.get||e.set||!e.configurable||!e.writable||n==="__proto__"?Object.defineProperty(t,n,e):t[n]=e.value}function U(t){if(typeof t!="object")return t;var n=0,e,i,r,a=Object.prototype.toString.call(t);if(a==="[object Object]"?r=Object.create(t.__proto__||null):a==="[object Array]"?r=Array(t.length):a==="[object Set]"?(r=new Set,t.forEach(function(l){r.add(U(l))})):a==="[object Map]"?(r=new Map,t.forEach(function(l,c){r.set(U(c),U(l))})):a==="[object Date]"?r=new Date(+t):a==="[object RegExp]"?r=new RegExp(t.source,t.flags):a==="[object DataView]"?r=new t.constructor(U(t.buffer)):a==="[object ArrayBuffer]"?r=t.slice(0):a.slice(-6)==="Array]"&&(r=new t.constructor(t)),r){for(i=Object.getOwnPropertySymbols(t);nn in t?gn(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,y=(t,n,e)=>(vn(t,typeof n!="symbol"?n+"":n,e),e);function bn(t){for(;t.length>0;)t.pop();return t}var Wt=(t,...n)=>(typeof t=="function"?t(...n):t)??void 0,T=t=>t,ht=()=>{},Nt=(()=>{let t=0;return()=>(t++,t.toString(36))})(),J=t=>Array.isArray(t),G=t=>!(t==null||typeof t!="object"||J(t)),Sn=t=>typeof t=="number"&&!Number.isNaN(t),A=t=>typeof t=="string",gt=t=>typeof t=="function";function ot(t){if(!wn(t)||t===void 0)return t;const n=Reflect.ownKeys(t).filter(i=>typeof i=="string"),e={};for(const i of n){const r=t[i];r!==void 0&&(e[i]=ot(r))}return e}var wn=t=>t&&typeof t=="object"&&t.constructor===Object;function ft(...t){const n=t.length===1?t[0]:t[1],e=t.length===2?t[0]:!0}function it(...t){const n=t.length===1?t[0]:t[1],e=t.length===2?t[0]:!0}function Xt(t,...n){for(const e of n){const i=ot(e);for(const r in i)G(e[r])?(t[r]||(t[r]={}),Xt(t[r],e[r])):t[r]=e[r]}return t}function Qt(t){return U(t)}function P(t){return A(t)?{type:t}:t}function I(t){return t?J(t)?t.slice():[t]:[]}function Bt(t){return G(t)&&t.predicate!=null}var xn=()=>!0;function Yt(t,n){return t=t??xn,(e,i,r)=>{if(A(t)){const a=n[t];return gt(a)?a(e,i,r):a}return Bt(t)?t.predicate(n)(e,i,r):t==null?void 0:t(e,i,r)}}function dt(t,n){return(e,i,r)=>Bt(t)?t.predicate(n)(e,i,r):t}function En(t){const n=t.computed??T({}),e=t.context??T({}),i=St({value:t.initial??"",previousValue:"",event:T({}),previousEvent:T({}),context:mn(e,n),done:!1,tags:[],hasTag(r){return this.tags.includes(r)},matches(...r){return r.includes(this.value)},can(r){return T(this).nextEvents.includes(r)},get nextEvents(){var l,c;const r=((c=(l=t.states)==null?void 0:l[this.value])==null?void 0:c.on)??{},a=(t==null?void 0:t.on)??{};return Object.keys({...r,...a})},get changed(){return this.event.value==="machine.init"||!this.previousValue?!1:this.value!==this.previousValue}});return T(i)}function tt(t,n){return(e,i)=>{if(Sn(t))return t;if(gt(t))return t(e,i);if(A(t)){const r=Number.parseFloat(t);if(!Number.isNaN(r))return r;if(n){const a=n==null?void 0:n[t];return it(a==null,`[@zag-js/core > determine-delay] Cannot determine delay for \`${t}\`. It doesn't exist in \`options.delays\``),gt(a)?a(e,i):a}}}}function Rn(t){return A(t)?{target:t}:t}function Mn(t,n){return(e,i,r)=>I(t).map(Rn).find(a=>Yt(a.guard,n)(e,i,r)??a.target??a.actions)}var Pn=class{constructor(t,n){var i,r,a,l,c,m;y(this,"status","Not Started"),y(this,"state"),y(this,"initialState"),y(this,"initialContext"),y(this,"id"),y(this,"type","machine"),y(this,"activityEvents",new Map),y(this,"delayedEvents",new Map),y(this,"stateListeners",new Set),y(this,"contextListeners",new Set),y(this,"eventListeners",new Set),y(this,"doneListeners",new Set),y(this,"contextWatchers",new Set),y(this,"removeStateListener",ht),y(this,"removeEventListener",ht),y(this,"removeContextListener",ht),y(this,"parent"),y(this,"children",new Map),y(this,"guardMap"),y(this,"actionMap"),y(this,"delayMap"),y(this,"activityMap"),y(this,"sync"),y(this,"options"),y(this,"config"),y(this,"start",s=>{if(this.state.value="",this.status==="Running")return this;this.status="Running",this.removeStateListener=at(this.state,()=>{this.stateListeners.forEach(p=>{p(this.stateSnapshot)})},this.sync),this.removeEventListener=Lt(this.state,"event",p=>{this.executeActions(this.config.onEvent,p),this.eventListeners.forEach(b=>{b(p)})},this.sync),this.removeContextListener=at(this.state.context,()=>{this.log("Context:",this.contextSnapshot),this.contextListeners.forEach(p=>{p(this.contextSnapshot)})},this.sync||this.options.debug),this.setupContextWatchers(),this.executeActivities(P("machine.start"),I(this.config.activities),"machine.start"),this.executeActions(this.config.entry,P("machine.start"));const o=P("machine.init"),u=G(s)?s.value:s,h=G(s)?s.context:void 0;h&&this.setContext(h);const d={target:u??this.config.initial},f=this.getNextStateInfo(d,o);return this.initialState=f,this.performStateChangeEffects(this.state.value,f,o),this}),y(this,"setupContextWatchers",()=>{var s;for(const[o,u]of Object.entries(this.config.watch??{})){const h=(s=this.options.compareFns)==null?void 0:s[o],d=Lt(this.state.context,o,()=>{this.executeActions(u,this.state.event)},this.sync,h);this.contextWatchers.add(d)}}),y(this,"stop",()=>{if(this.status!=="Stopped")return this.performExitEffects(this.state.value,P("machine.stop")),this.executeActions(this.config.exit,P("machine.stop")),this.setState(""),this.setEvent("machine.stop"),this.stopStateListeners(),this.stopChildren(),this.stopActivities(),this.stopDelayedEvents(),this.stopContextWatchers(),this.stopEventListeners(),this.stopContextListeners(),this.status="Stopped",this}),y(this,"stopEventListeners",()=>{this.eventListeners.clear(),this.removeEventListener()}),y(this,"stopContextListeners",()=>{this.contextListeners.clear(),this.removeContextListener()}),y(this,"stopStateListeners",()=>{this.removeStateListener(),this.stateListeners.clear()}),y(this,"stopContextWatchers",()=>{this.contextWatchers.forEach(s=>s()),this.contextWatchers.clear()}),y(this,"stopDelayedEvents",()=>{this.delayedEvents.forEach(s=>{s.forEach(o=>o())}),this.delayedEvents.clear()}),y(this,"stopActivities",s=>{var o,u;s?((o=this.activityEvents.get(s))==null||o.forEach(h=>h()),(u=this.activityEvents.get(s))==null||u.clear(),this.activityEvents.delete(s)):(this.activityEvents.forEach(h=>{h.forEach(d=>d()),h.clear()}),this.activityEvents.clear())}),y(this,"sendChild",(s,o)=>{const u=P(s),h=Wt(o,this.contextSnapshot),d=this.children.get(h);d||it(`[@zag-js/core] Cannot send '${u.type}' event to unknown child`),d.send(u)}),y(this,"stopChild",s=>{this.children.has(s)||it(`[@zag-js/core > stop-child] Cannot stop unknown child ${s}`),this.children.get(s).stop(),this.children.delete(s)}),y(this,"removeChild",s=>{this.children.delete(s)}),y(this,"stopChildren",()=>{this.children.forEach(s=>s.stop()),this.children.clear()}),y(this,"setParent",s=>{this.parent=s}),y(this,"spawn",(s,o)=>{const u=Wt(s);return o&&(u.id=o),u.type="machine.actor",u.setParent(this),this.children.set(u.id,T(u)),u.onDone(()=>{this.removeChild(u.id)}).start(),T(It(u))}),y(this,"stopActivity",s=>{var u;if(!this.state.value)return;const o=this.activityEvents.get(this.state.value);(u=o==null?void 0:o.get(s))==null||u(),o==null||o.delete(s)}),y(this,"addActivityCleanup",(s,o,u)=>{var h;s&&(this.activityEvents.has(s)?(h=this.activityEvents.get(s))==null||h.set(o,u):this.activityEvents.set(s,new Map([[o,u]])))}),y(this,"setState",s=>{this.state.previousValue=this.state.value,this.state.value=s;const o=this.getStateNode(s);s==null?bn(this.state.tags):this.state.tags=I(o==null?void 0:o.tags)}),y(this,"transformContext",s=>{var o,u;return(u=(o=this.options)==null?void 0:o.transformContext)==null||u.call(o,s),s}),y(this,"setContext",s=>{if(!s)return;const o=ot(this.transformContext(s));Xt(this.state.context,o)}),y(this,"setOptions",s=>{const o=ot(s);this.actionMap={...this.actionMap,...o.actions},this.delayMap={...this.delayMap,...o.delays},this.activityMap={...this.activityMap,...o.activities},this.guardMap={...this.guardMap,...o.guards}}),y(this,"getStateNode",s=>{var o;if(s)return(o=this.config.states)==null?void 0:o[s]}),y(this,"getNextStateInfo",(s,o)=>{const u=this.determineTransition(s,o),h=!(u!=null&&u.target),d=(u==null?void 0:u.target)??this.state.value,f=this.state.value!==d,p=this.getStateNode(d),w={reenter:!h&&!f&&!(u!=null&&u.internal),transition:u,stateNode:p,target:d,changed:f};return this.log("NextState:",`[${o.type}]`,this.state.value,"---->",w.target),w}),y(this,"getActionFromDelayedTransition",s=>{const o=P("machine.after"),h=tt(s.delay,this.delayMap)(this.contextSnapshot,o);let d;return{entry:()=>{d=globalThis.setTimeout(()=>{const f=this.getNextStateInfo(s,o);this.performStateChangeEffects(this.state.value,f,o)},h)},exit:()=>{globalThis.clearTimeout(d)}}}),y(this,"getDelayedEventActions",s=>{const o=this.getStateNode(s),u=P("machine.after");if(!o||!o.after)return;const h=[],d=[];if(J(o.after)){const f=this.determineTransition(o.after,u);if(!f)return;const p=this.getActionFromDelayedTransition(f);h.push(p.entry),d.push(p.exit)}else if(G(o.after))for(const f in o.after){const p=o.after[f];let b={};if(J(p)){const C=this.determineTransition(p,u);C&&(b=C)}else A(p)?b={target:p,delay:f}:b={...p,delay:f};const w=this.getActionFromDelayedTransition(b);h.push(w.entry),d.push(w.exit)}return{entries:h,exits:d}}),y(this,"executeActions",(s,o)=>{var h;const u=dt(s,this.guardMap)(this.contextSnapshot,o,this.guardMeta);for(const d of I(u)){const f=A(d)?(h=this.actionMap)==null?void 0:h[d]:d;ft(A(d)&&!f,`[@zag-js/core > execute-actions] No implementation found for action: \`${d}\``),f==null||f(this.state.context,o,this.meta)}}),y(this,"executeActivities",(s,o,u)=>{var h;for(const d of o){const f=A(d)?(h=this.activityMap)==null?void 0:h[d]:d;if(!f){ft(`[@zag-js/core > execute-activity] No implementation found for activity: \`${d}\``);continue}const p=f(this.state.context,s,this.meta);if(p){const b=A(d)?d:d.name||Nt();this.addActivityCleanup(u??this.state.value,b,p)}}}),y(this,"createEveryActivities",(s,o)=>{if(!s)return;const u=P("machine.every");if(J(s)){const h=I(s).find(b=>{const w=b.delay,x=tt(w,this.delayMap)(this.contextSnapshot,u);return Yt(b.guard,this.guardMap)(this.contextSnapshot,u,this.guardMeta)??x!=null});if(!h)return;const f=tt(h.delay,this.delayMap)(this.contextSnapshot,u);o(()=>{const b=globalThis.setInterval(()=>{this.executeActions(h.actions,u)},f);return()=>{globalThis.clearInterval(b)}})}else for(const h in s){const d=s==null?void 0:s[h],p=tt(h,this.delayMap)(this.contextSnapshot,u);o(()=>{const w=globalThis.setInterval(()=>{this.executeActions(d,u)},p);return()=>{globalThis.clearInterval(w)}})}}),y(this,"setEvent",s=>{this.state.previousEvent=this.state.event,this.state.event=It(P(s))}),y(this,"performExitEffects",(s,o)=>{const u=this.state.value;if(u==="")return;const h=s?this.getStateNode(s):void 0;this.stopActivities(u);const d=dt(h==null?void 0:h.exit,this.guardMap)(this.contextSnapshot,o,this.guardMeta),f=I(d),p=this.delayedEvents.get(u);p&&f.push(...p),this.executeActions(f,o),this.eventListeners.clear()}),y(this,"performEntryEffects",(s,o)=>{const u=this.getStateNode(s),h=I(u==null?void 0:u.activities);this.createEveryActivities(u==null?void 0:u.every,b=>{h.unshift(b)}),h.length>0&&this.executeActivities(o,h);const d=dt(u==null?void 0:u.entry,this.guardMap)(this.contextSnapshot,o,this.guardMeta),f=I(d),p=this.getDelayedEventActions(s);u!=null&&u.after&&p&&(this.delayedEvents.set(s,p==null?void 0:p.exits),f.push(...p.entries)),this.executeActions(f,o),(u==null?void 0:u.type)==="final"&&(this.state.done=!0,this.doneListeners.forEach(b=>{b(this.stateSnapshot)}),this.stop())}),y(this,"performTransitionEffects",(s,o)=>{const u=this.determineTransition(s,o);this.executeActions(u==null?void 0:u.actions,o)}),y(this,"performStateChangeEffects",(s,o,u)=>{this.setEvent(u);const h=o.changed||o.reenter;h&&this.performExitEffects(s,u),this.performTransitionEffects(o.transition,u),this.setState(o.target),h&&this.performEntryEffects(o.target,u)}),y(this,"determineTransition",(s,o)=>{const u=Mn(s,this.guardMap);return u==null?void 0:u(this.contextSnapshot,o,this.guardMeta)}),y(this,"sendParent",s=>{var u;this.parent||it("[@zag-js/core > send-parent] Cannot send event to an unknown parent");const o=P(s);(u=this.parent)==null||u.send(o)}),y(this,"log",(...s)=>{}),y(this,"send",s=>{const o=P(s);this.transition(this.state.value,o)}),y(this,"transition",(s,o)=>{var p,b;const u=A(s)?this.getStateNode(s):s==null?void 0:s.stateNode,h=P(o);if(!u&&!this.config.on){const w=this.status==="Stopped"?"[@zag-js/core > transition] Cannot transition a stopped machine":`[@zag-js/core > transition] State does not have a definition for \`state\`: ${s}, \`event\`: ${h.type}`;ft(w);return}const d=((p=u==null?void 0:u.on)==null?void 0:p[h.type])??((b=this.config.on)==null?void 0:b[h.type]),f=this.getNextStateInfo(d,h);return this.performStateChangeEffects(this.state.value,f,h),f.stateNode}),y(this,"subscribe",s=>(this.stateListeners.add(s),this.status==="Running"&&s(this.stateSnapshot),()=>{this.stateListeners.delete(s)})),y(this,"onDone",s=>(this.doneListeners.add(s),this)),y(this,"onTransition",s=>(this.stateListeners.add(s),this.status==="Running"&&s(this.stateSnapshot),this)),y(this,"onChange",s=>(this.contextListeners.add(s),this)),y(this,"onEvent",s=>(this.eventListeners.add(s),this)),this.config=Qt(t),this.options=Qt(n??{}),this.id=this.config.id??`machine-${Nt()}`,this.guardMap=((i=this.options)==null?void 0:i.guards)??{},this.actionMap=((r=this.options)==null?void 0:r.actions)??{},this.delayMap=((a=this.options)==null?void 0:a.delays)??{},this.activityMap=((l=this.options)==null?void 0:l.activities)??{},this.sync=((c=this.options)==null?void 0:c.sync)??!1,this.state=En(this.config),this.initialContext=F(this.state.context),this.transformContext(this.state.context);const e=P("machine.created");this.executeActions((m=this.config)==null?void 0:m.created,e)}get stateSnapshot(){return T(F(this.state))}getState(){return this.stateSnapshot}get contextSnapshot(){return this.stateSnapshot.context}get self(){const t=this;return{id:this.id,send:this.send.bind(this),sendParent:this.sendParent.bind(this),sendChild:this.sendChild.bind(this),stop:this.stop.bind(this),stopChild:this.stopChild.bind(this),spawn:this.spawn.bind(this),stopActivity:this.stopActivity.bind(this),get state(){return t.stateSnapshot},get initialContext(){return t.initialContext},get initialState(){var n;return((n=t.initialState)==null?void 0:n.target)??""}}}get meta(){var t;return{state:this.stateSnapshot,guards:this.guardMap,send:this.send.bind(this),self:this.self,initialContext:this.initialContext,initialState:((t=this.initialState)==null?void 0:t.target)??"",getState:()=>this.stateSnapshot,getAction:n=>this.actionMap[n],getGuard:n=>this.guardMap[n]}}get guardMeta(){return{state:this.stateSnapshot}}get[Symbol.toStringTag](){return"Machine"}},On=(t,n)=>new Pn(t,n),_t=t=>(t==null?void 0:t.constructor.name)==="Array",An=(t,n)=>{if(Object.is(t,n))return!0;if(t==null&&n!=null||t!=null&&n==null)return!1;if(typeof(t==null?void 0:t.isEqual)=="function"&&typeof(n==null?void 0:n.isEqual)=="function")return t.isEqual(n);if(typeof t=="function"&&typeof n=="function")return t.toString()===n.toString();if(_t(t)&&_t(n))return Array.from(t).toString()===Array.from(n).toString();if(typeof t!="object"||typeof n!="object")return!1;const e=Object.keys(n??Object.create(null)),i=e.length;for(let r=0;rtypeof t=="number"&&!Number.isNaN(t);function Jt(t){if(!Cn(t)||t===void 0)return t;const n=Reflect.ownKeys(t).filter(i=>typeof i=="string"),e={};for(const i of n){const r=t[i];r!==void 0&&(e[i]=Jt(r))}return e}var Cn=t=>t&&typeof t=="object"&&t.constructor===Object,Dn=rt("progress").parts("root","label","track","range","valueText","view","circle","circleTrack","circleRange"),D=Dn.build(),et=cn({getRootId:t=>`progress-${t.id}`,getTrackId:t=>`progress-${t.id}-track`,getLabelId:t=>`progress-${t.id}-label`,getCircleId:t=>`progress-${t.id}-circle`});function Tn(t,n,e){const i=t.context.percent,r=t.context.max,a=t.context.min,l=t.context.orientation,c=t.context.translations,m=t.context.isIndeterminate,s=t.context.value,o=c.value({value:s,max:r,percent:i,min:a}),u=jn(s,r),h={role:"progressbar","aria-label":o,"data-max":r,"aria-valuemin":a,"aria-valuemax":r,"aria-valuenow":s??void 0,"data-orientation":l,"data-state":u},d=kn(t.context);return{value:s,valueAsString:o,setValue(f){n({type:"VALUE.SET",value:f})},setToMax(){n({type:"VALUE.SET",value:r})},rootProps:e.element({dir:t.context.dir,...D.root.attrs,id:et.getRootId(t.context),"data-max":r,"data-value":s??void 0,"data-state":u,"data-orientation":l,style:{"--percent":m?void 0:i}}),labelProps:e.element({dir:t.context.dir,id:et.getLabelId(t.context),...D.label.attrs,"data-orientation":l}),valueTextProps:e.element({dir:t.context.dir,"aria-live":"polite",...D.valueText.attrs}),trackProps:e.element({dir:t.context.dir,id:et.getTrackId(t.context),...D.track.attrs,...h}),rangeProps:e.element({dir:t.context.dir,...D.range.attrs,"data-orientation":l,"data-state":u,style:{[t.context.isHorizontal?"width":"height"]:m?void 0:`${i}%`}}),circleProps:e.element({dir:t.context.dir,id:et.getCircleId(t.context),...D.circle.attrs,...h,...d.root}),circleTrackProps:e.element({dir:t.context.dir,"data-orientation":l,...D.circleTrack.attrs,...d.track}),circleRangeProps:e.element({dir:t.context.dir,...D.circleRange.attrs,...d.range,"data-state":u}),getViewProps(f){return e.element({dir:t.context.dir,...D.view.attrs,"data-state":f.state,hidden:f.state!==u})}}}function jn(t,n){return t==null?"indeterminate":t===n?"complete":"loading"}function kn(t){const n=t.isIndeterminate?void 0:t.percent*2.64,e={style:{cx:"50px",cy:"50px",r:"42px",fill:"transparent",strokeWidth:"var(--thickness)"}};return{root:{viewBox:"0 0 100 100",style:{width:"var(--size)",height:"var(--size)"}},track:e,range:{style:{...e.style,strokeDashoffset:"66px",strokeDasharray:n!=null?`${n} ${264-n}`:void 0}}}}function In(t){const n=Jt(t);return On({id:"progress",initial:"idle",context:{value:50,max:100,min:0,orientation:"horizontal",translations:{value:({percent:e})=>e===-1?"loading...":`${e} percent`,...n.translations},...n},created:["validateContext"],computed:{isIndeterminate:e=>e.value===null,percent(e){return wt(e.value)?Math.round((e.value-e.min)/(e.max-e.min)*100):-1},isAtMax:e=>e.value===e.max,isHorizontal:e=>e.orientation==="horizontal",isRtl:e=>e.dir==="rtl"},states:{idle:{on:{"VALUE.SET":{actions:["setValue"]}}}}},{guards:{},actions:{setValue:(e,i)=>{e.value=i.value===null?null:Math.max(0,Math.min(i.value,e.max))},validateContext:e=>{if(!Ln(e.max))throw new Error(`[Progress] Invalid max value: ${e.max}`);if(!Fn(e.value,e.max))throw new Error(`[Progress] Invalid value: ${e.value}`)}}})}function Ln(t){return wt(t)&&!isNaN(t)&&t>0}function Fn(t,n){return wt(t)&&!isNaN(t)&&t<=n&&t>=0}function Wn(t){return new Proxy({},{get(){return t}})}var Nn=Wn(t=>t),Qn=typeof document<"u"?R.useLayoutEffect:R.useEffect,$t=t=>(t==null?void 0:t.constructor.name)==="Array",Gt=(t,n)=>{if(Object.is(t,n))return!0;if(t==null&&n!=null||t!=null&&n==null)return!1;if(typeof(t==null?void 0:t.isEqual)=="function"&&typeof(n==null?void 0:n.isEqual)=="function")return t.isEqual(n);if(typeof t=="function"&&typeof n=="function")return t.toString()===n.toString();if($t(t)&&$t(n))return Array.from(t).toString()===Array.from(n).toString();if(typeof t!="object"||typeof n!="object")return!1;const e=Object.keys(n??Object.create(null)),i=e.length;for(let r=0;rtypeof i=="string"),e={};for(const i of n){const r=t[i];r!==void 0&&(e[i]=Ht(r))}return e}var _n=t=>t&&typeof t=="object"&&t.constructor===Object;function $n(t){const n=R.useRef();return R.useEffect(()=>{n.current=t}),n.current}function Un(t,n){const e=R.useRef(!1),i=R.useRef(!1);R.useEffect(()=>{if(e.current&&i.current)return t();i.current=!0},n),R.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[])}var{use:Ut}=L,Vn=new WeakMap;function qn(t,n){const{actions:e,context:i,sync:r}=n??{},a=R.useRef(),l=R.useRef(),c=R.useSyncExternalStore(R.useCallback(h=>at(t.state,h,r),[r]),()=>{const h=F(t.state,Ut);try{if(a.current&&l.current&&!Kt(a.current,h,l.current,new WeakMap))return a.current}catch{}return h},()=>F(t.state,Ut));t.setOptions({actions:e});const m=$n(i),s=R.useMemo(()=>Ht(i??{}),[i]);Un(()=>{Object.entries(s).map(([p,b])=>({key:p,curr:b,prev:m==null?void 0:m[p],equal:Gt(m==null?void 0:m[p],b)})).every(({equal:p})=>p)||t.setContext(s)},[s]);const o=new WeakMap;R.useEffect(()=>{a.current=c,l.current=o});const u=R.useMemo(()=>new WeakMap,[]);return zt(c,o,u,Vn)}function zn(t){const n=R.useRef();return n.current||(n.current={v:t()}),n.current.v}function Kn(t,n){const{state:e,context:i}=n??{},r=zn(()=>{const a=typeof t=="function"?t():t;return i&&a.setContext(i),a});return Qn(()=>(r.start(e),()=>{r.stop()}),[]),r}function Xn(t,n){const e=Kn(t,n);return[qn(e,n),e.send,e]}const Zn=({isIntermediate:t=!1,value:n=0,label:e})=>{const[i,r]=Xn(In({id:R.useId()}),{context:{value:t?null:n}}),a=Tn(i,r,Nn);return j.jsxs("div",{...a.rootProps,children:[e?j.jsxs("div",{...a.labelProps,children:[e," "]}):null,j.jsx("div",{...a.trackProps,className:"h-[2px]",children:j.jsx("div",{...a.rangeProps,className:"bg-primary-600 -translate-x-full h-full animate-progress w-[210%]"})})]})},tr=({title:t,description:n,actions:e})=>j.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 w-full max-w-sm px-4 m-auto",children:[j.jsx("h1",{className:"mt-3 text-lg text-gray-800 dark:text-white",children:t}),j.jsx("p",{className:"text-gray-500 dark:text-gray-400 text-center",children:n}),e]}),er=({children:t})=>j.jsx("div",{className:"border-l border-r border-gray-800 overflow-auto flex flex-col",children:j.jsx("div",{className:"flex flex-col flex-1 overflow-auto",children:t})});export{tr as E,er as P,Jn as a,cn as b,rt as c,Hn as d,Jt as e,On as f,Xn as g,Zn as h,An as i,Nn as n,Gn as t,Yn as u}; +//# sourceMappingURL=PageLayout-e8KYfbHX.js.map diff --git a/assets/PageLayout-t9exb1nu.js.map b/assets/PageLayout-e8KYfbHX.js.map similarity index 99% rename from assets/PageLayout-t9exb1nu.js.map rename to assets/PageLayout-e8KYfbHX.js.map index cc6b99a..268d21b 100644 --- a/assets/PageLayout-t9exb1nu.js.map +++ b/assets/PageLayout-e8KYfbHX.js.map @@ -1 +1 @@ -{"version":3,"file":"PageLayout-t9exb1nu.js","sources":["../../node_modules/react-query/es/core/queryObserver.js","../../node_modules/react-query/es/react/QueryErrorResetBoundary.js","../../node_modules/react-query/es/react/utils.js","../../node_modules/react-query/es/react/useBaseQuery.js","../../node_modules/react-query/es/react/useQuery.js","../../src/api/index.ts","../../node_modules/date-fns/toDate.mjs","../../node_modules/date-fns/constants.mjs","../../node_modules/date-fns/_lib/defaultOptions.mjs","../../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs","../../node_modules/date-fns/compareAsc.mjs","../../node_modules/date-fns/differenceInCalendarMonths.mjs","../../node_modules/date-fns/_lib/getRoundingMethod.mjs","../../node_modules/date-fns/differenceInMilliseconds.mjs","../../node_modules/date-fns/endOfDay.mjs","../../node_modules/date-fns/endOfMonth.mjs","../../node_modules/date-fns/isLastDayOfMonth.mjs","../../node_modules/date-fns/differenceInMonths.mjs","../../node_modules/date-fns/differenceInSeconds.mjs","../../node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs","../../node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs","../../node_modules/date-fns/locale/en-US/_lib/formatLong.mjs","../../node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs","../../node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs","../../node_modules/date-fns/locale/en-US/_lib/localize.mjs","../../node_modules/date-fns/locale/_lib/buildMatchFn.mjs","../../node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs","../../node_modules/date-fns/locale/en-US/_lib/match.mjs","../../node_modules/date-fns/locale/en-US.mjs","../../node_modules/date-fns/formatDistance.mjs","../../src/utils.ts","../../node_modules/@zag-js/anatomy/dist/index.mjs","../../node_modules/@zag-js/dom-query/dist/index.mjs","../../node_modules/proxy-compare/dist/index.modern.js","../../node_modules/@zag-js/store/dist/index.mjs","../../node_modules/klona/full/index.mjs","../../node_modules/@zag-js/core/dist/index.mjs","../../node_modules/@zag-js/utils/dist/index.mjs","../../node_modules/@zag-js/progress/dist/index.mjs","../../node_modules/@zag-js/types/dist/index.mjs","../../node_modules/@zag-js/react/dist/index.mjs","../../src/components/Progress.tsx","../../src/components/EmptyView.tsx","../../src/components/PageLayout.tsx"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { isServer, isValidTimeout, noop, replaceEqualDeep, shallowEqualObjects, timeUntilStale } from './utils';\nimport { notifyManager } from './notifyManager';\nimport { focusManager } from './focusManager';\nimport { Subscribable } from './subscribable';\nimport { getLogger } from './logger';\nimport { isCancelledError } from './retryer';\nexport var QueryObserver = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(QueryObserver, _Subscribable);\n\n function QueryObserver(client, options) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.client = client;\n _this.options = options;\n _this.trackedProps = [];\n _this.selectError = null;\n\n _this.bindMethods();\n\n _this.setOptions(options);\n\n return _this;\n }\n\n var _proto = QueryObserver.prototype;\n\n _proto.bindMethods = function bindMethods() {\n this.remove = this.remove.bind(this);\n this.refetch = this.refetch.bind(this);\n };\n\n _proto.onSubscribe = function onSubscribe() {\n if (this.listeners.length === 1) {\n this.currentQuery.addObserver(this);\n\n if (shouldFetchOnMount(this.currentQuery, this.options)) {\n this.executeFetch();\n }\n\n this.updateTimers();\n }\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.listeners.length) {\n this.destroy();\n }\n };\n\n _proto.shouldFetchOnReconnect = function shouldFetchOnReconnect() {\n return shouldFetchOn(this.currentQuery, this.options, this.options.refetchOnReconnect);\n };\n\n _proto.shouldFetchOnWindowFocus = function shouldFetchOnWindowFocus() {\n return shouldFetchOn(this.currentQuery, this.options, this.options.refetchOnWindowFocus);\n };\n\n _proto.destroy = function destroy() {\n this.listeners = [];\n this.clearTimers();\n this.currentQuery.removeObserver(this);\n };\n\n _proto.setOptions = function setOptions(options, notifyOptions) {\n var prevOptions = this.options;\n var prevQuery = this.currentQuery;\n this.options = this.client.defaultQueryObserverOptions(options);\n\n if (typeof this.options.enabled !== 'undefined' && typeof this.options.enabled !== 'boolean') {\n throw new Error('Expected enabled to be a boolean');\n } // Keep previous query key if the user does not supply one\n\n\n if (!this.options.queryKey) {\n this.options.queryKey = prevOptions.queryKey;\n }\n\n this.updateQuery();\n var mounted = this.hasListeners(); // Fetch if there are subscribers\n\n if (mounted && shouldFetchOptionally(this.currentQuery, prevQuery, this.options, prevOptions)) {\n this.executeFetch();\n } // Update result\n\n\n this.updateResult(notifyOptions); // Update stale interval if needed\n\n if (mounted && (this.currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || this.options.staleTime !== prevOptions.staleTime)) {\n this.updateStaleTimeout();\n }\n\n var nextRefetchInterval = this.computeRefetchInterval(); // Update refetch interval if needed\n\n if (mounted && (this.currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || nextRefetchInterval !== this.currentRefetchInterval)) {\n this.updateRefetchInterval(nextRefetchInterval);\n }\n };\n\n _proto.getOptimisticResult = function getOptimisticResult(options) {\n var defaultedOptions = this.client.defaultQueryObserverOptions(options);\n var query = this.client.getQueryCache().build(this.client, defaultedOptions);\n return this.createResult(query, defaultedOptions);\n };\n\n _proto.getCurrentResult = function getCurrentResult() {\n return this.currentResult;\n };\n\n _proto.trackResult = function trackResult(result, defaultedOptions) {\n var _this2 = this;\n\n var trackedResult = {};\n\n var trackProp = function trackProp(key) {\n if (!_this2.trackedProps.includes(key)) {\n _this2.trackedProps.push(key);\n }\n };\n\n Object.keys(result).forEach(function (key) {\n Object.defineProperty(trackedResult, key, {\n configurable: false,\n enumerable: true,\n get: function get() {\n trackProp(key);\n return result[key];\n }\n });\n });\n\n if (defaultedOptions.useErrorBoundary || defaultedOptions.suspense) {\n trackProp('error');\n }\n\n return trackedResult;\n };\n\n _proto.getNextResult = function getNextResult(options) {\n var _this3 = this;\n\n return new Promise(function (resolve, reject) {\n var unsubscribe = _this3.subscribe(function (result) {\n if (!result.isFetching) {\n unsubscribe();\n\n if (result.isError && (options == null ? void 0 : options.throwOnError)) {\n reject(result.error);\n } else {\n resolve(result);\n }\n }\n });\n });\n };\n\n _proto.getCurrentQuery = function getCurrentQuery() {\n return this.currentQuery;\n };\n\n _proto.remove = function remove() {\n this.client.getQueryCache().remove(this.currentQuery);\n };\n\n _proto.refetch = function refetch(options) {\n return this.fetch(_extends({}, options, {\n meta: {\n refetchPage: options == null ? void 0 : options.refetchPage\n }\n }));\n };\n\n _proto.fetchOptimistic = function fetchOptimistic(options) {\n var _this4 = this;\n\n var defaultedOptions = this.client.defaultQueryObserverOptions(options);\n var query = this.client.getQueryCache().build(this.client, defaultedOptions);\n return query.fetch().then(function () {\n return _this4.createResult(query, defaultedOptions);\n });\n };\n\n _proto.fetch = function fetch(fetchOptions) {\n var _this5 = this;\n\n return this.executeFetch(fetchOptions).then(function () {\n _this5.updateResult();\n\n return _this5.currentResult;\n });\n };\n\n _proto.executeFetch = function executeFetch(fetchOptions) {\n // Make sure we reference the latest query as the current one might have been removed\n this.updateQuery(); // Fetch\n\n var promise = this.currentQuery.fetch(this.options, fetchOptions);\n\n if (!(fetchOptions == null ? void 0 : fetchOptions.throwOnError)) {\n promise = promise.catch(noop);\n }\n\n return promise;\n };\n\n _proto.updateStaleTimeout = function updateStaleTimeout() {\n var _this6 = this;\n\n this.clearStaleTimeout();\n\n if (isServer || this.currentResult.isStale || !isValidTimeout(this.options.staleTime)) {\n return;\n }\n\n var time = timeUntilStale(this.currentResult.dataUpdatedAt, this.options.staleTime); // The timeout is sometimes triggered 1 ms before the stale time expiration.\n // To mitigate this issue we always add 1 ms to the timeout.\n\n var timeout = time + 1;\n this.staleTimeoutId = setTimeout(function () {\n if (!_this6.currentResult.isStale) {\n _this6.updateResult();\n }\n }, timeout);\n };\n\n _proto.computeRefetchInterval = function computeRefetchInterval() {\n var _this$options$refetch;\n\n return typeof this.options.refetchInterval === 'function' ? this.options.refetchInterval(this.currentResult.data, this.currentQuery) : (_this$options$refetch = this.options.refetchInterval) != null ? _this$options$refetch : false;\n };\n\n _proto.updateRefetchInterval = function updateRefetchInterval(nextInterval) {\n var _this7 = this;\n\n this.clearRefetchInterval();\n this.currentRefetchInterval = nextInterval;\n\n if (isServer || this.options.enabled === false || !isValidTimeout(this.currentRefetchInterval) || this.currentRefetchInterval === 0) {\n return;\n }\n\n this.refetchIntervalId = setInterval(function () {\n if (_this7.options.refetchIntervalInBackground || focusManager.isFocused()) {\n _this7.executeFetch();\n }\n }, this.currentRefetchInterval);\n };\n\n _proto.updateTimers = function updateTimers() {\n this.updateStaleTimeout();\n this.updateRefetchInterval(this.computeRefetchInterval());\n };\n\n _proto.clearTimers = function clearTimers() {\n this.clearStaleTimeout();\n this.clearRefetchInterval();\n };\n\n _proto.clearStaleTimeout = function clearStaleTimeout() {\n if (this.staleTimeoutId) {\n clearTimeout(this.staleTimeoutId);\n this.staleTimeoutId = undefined;\n }\n };\n\n _proto.clearRefetchInterval = function clearRefetchInterval() {\n if (this.refetchIntervalId) {\n clearInterval(this.refetchIntervalId);\n this.refetchIntervalId = undefined;\n }\n };\n\n _proto.createResult = function createResult(query, options) {\n var prevQuery = this.currentQuery;\n var prevOptions = this.options;\n var prevResult = this.currentResult;\n var prevResultState = this.currentResultState;\n var prevResultOptions = this.currentResultOptions;\n var queryChange = query !== prevQuery;\n var queryInitialState = queryChange ? query.state : this.currentQueryInitialState;\n var prevQueryResult = queryChange ? this.currentResult : this.previousQueryResult;\n var state = query.state;\n var dataUpdatedAt = state.dataUpdatedAt,\n error = state.error,\n errorUpdatedAt = state.errorUpdatedAt,\n isFetching = state.isFetching,\n status = state.status;\n var isPreviousData = false;\n var isPlaceholderData = false;\n var data; // Optimistically set result in fetching state if needed\n\n if (options.optimisticResults) {\n var mounted = this.hasListeners();\n var fetchOnMount = !mounted && shouldFetchOnMount(query, options);\n var fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);\n\n if (fetchOnMount || fetchOptionally) {\n isFetching = true;\n\n if (!dataUpdatedAt) {\n status = 'loading';\n }\n }\n } // Keep previous data if needed\n\n\n if (options.keepPreviousData && !state.dataUpdateCount && (prevQueryResult == null ? void 0 : prevQueryResult.isSuccess) && status !== 'error') {\n data = prevQueryResult.data;\n dataUpdatedAt = prevQueryResult.dataUpdatedAt;\n status = prevQueryResult.status;\n isPreviousData = true;\n } // Select data if needed\n else if (options.select && typeof state.data !== 'undefined') {\n // Memoize select result\n if (prevResult && state.data === (prevResultState == null ? void 0 : prevResultState.data) && options.select === this.selectFn) {\n data = this.selectResult;\n } else {\n try {\n this.selectFn = options.select;\n data = options.select(state.data);\n\n if (options.structuralSharing !== false) {\n data = replaceEqualDeep(prevResult == null ? void 0 : prevResult.data, data);\n }\n\n this.selectResult = data;\n this.selectError = null;\n } catch (selectError) {\n getLogger().error(selectError);\n this.selectError = selectError;\n }\n }\n } // Use query data\n else {\n data = state.data;\n } // Show placeholder data if needed\n\n\n if (typeof options.placeholderData !== 'undefined' && typeof data === 'undefined' && (status === 'loading' || status === 'idle')) {\n var placeholderData; // Memoize placeholder data\n\n if ((prevResult == null ? void 0 : prevResult.isPlaceholderData) && options.placeholderData === (prevResultOptions == null ? void 0 : prevResultOptions.placeholderData)) {\n placeholderData = prevResult.data;\n } else {\n placeholderData = typeof options.placeholderData === 'function' ? options.placeholderData() : options.placeholderData;\n\n if (options.select && typeof placeholderData !== 'undefined') {\n try {\n placeholderData = options.select(placeholderData);\n\n if (options.structuralSharing !== false) {\n placeholderData = replaceEqualDeep(prevResult == null ? void 0 : prevResult.data, placeholderData);\n }\n\n this.selectError = null;\n } catch (selectError) {\n getLogger().error(selectError);\n this.selectError = selectError;\n }\n }\n }\n\n if (typeof placeholderData !== 'undefined') {\n status = 'success';\n data = placeholderData;\n isPlaceholderData = true;\n }\n }\n\n if (this.selectError) {\n error = this.selectError;\n data = this.selectResult;\n errorUpdatedAt = Date.now();\n status = 'error';\n }\n\n var result = {\n status: status,\n isLoading: status === 'loading',\n isSuccess: status === 'success',\n isError: status === 'error',\n isIdle: status === 'idle',\n data: data,\n dataUpdatedAt: dataUpdatedAt,\n error: error,\n errorUpdatedAt: errorUpdatedAt,\n failureCount: state.fetchFailureCount,\n errorUpdateCount: state.errorUpdateCount,\n isFetched: state.dataUpdateCount > 0 || state.errorUpdateCount > 0,\n isFetchedAfterMount: state.dataUpdateCount > queryInitialState.dataUpdateCount || state.errorUpdateCount > queryInitialState.errorUpdateCount,\n isFetching: isFetching,\n isRefetching: isFetching && status !== 'loading',\n isLoadingError: status === 'error' && state.dataUpdatedAt === 0,\n isPlaceholderData: isPlaceholderData,\n isPreviousData: isPreviousData,\n isRefetchError: status === 'error' && state.dataUpdatedAt !== 0,\n isStale: isStale(query, options),\n refetch: this.refetch,\n remove: this.remove\n };\n return result;\n };\n\n _proto.shouldNotifyListeners = function shouldNotifyListeners(result, prevResult) {\n if (!prevResult) {\n return true;\n }\n\n var _this$options = this.options,\n notifyOnChangeProps = _this$options.notifyOnChangeProps,\n notifyOnChangePropsExclusions = _this$options.notifyOnChangePropsExclusions;\n\n if (!notifyOnChangeProps && !notifyOnChangePropsExclusions) {\n return true;\n }\n\n if (notifyOnChangeProps === 'tracked' && !this.trackedProps.length) {\n return true;\n }\n\n var includedProps = notifyOnChangeProps === 'tracked' ? this.trackedProps : notifyOnChangeProps;\n return Object.keys(result).some(function (key) {\n var typedKey = key;\n var changed = result[typedKey] !== prevResult[typedKey];\n var isIncluded = includedProps == null ? void 0 : includedProps.some(function (x) {\n return x === key;\n });\n var isExcluded = notifyOnChangePropsExclusions == null ? void 0 : notifyOnChangePropsExclusions.some(function (x) {\n return x === key;\n });\n return changed && !isExcluded && (!includedProps || isIncluded);\n });\n };\n\n _proto.updateResult = function updateResult(notifyOptions) {\n var prevResult = this.currentResult;\n this.currentResult = this.createResult(this.currentQuery, this.options);\n this.currentResultState = this.currentQuery.state;\n this.currentResultOptions = this.options; // Only notify if something has changed\n\n if (shallowEqualObjects(this.currentResult, prevResult)) {\n return;\n } // Determine which callbacks to trigger\n\n\n var defaultNotifyOptions = {\n cache: true\n };\n\n if ((notifyOptions == null ? void 0 : notifyOptions.listeners) !== false && this.shouldNotifyListeners(this.currentResult, prevResult)) {\n defaultNotifyOptions.listeners = true;\n }\n\n this.notify(_extends({}, defaultNotifyOptions, notifyOptions));\n };\n\n _proto.updateQuery = function updateQuery() {\n var query = this.client.getQueryCache().build(this.client, this.options);\n\n if (query === this.currentQuery) {\n return;\n }\n\n var prevQuery = this.currentQuery;\n this.currentQuery = query;\n this.currentQueryInitialState = query.state;\n this.previousQueryResult = this.currentResult;\n\n if (this.hasListeners()) {\n prevQuery == null ? void 0 : prevQuery.removeObserver(this);\n query.addObserver(this);\n }\n };\n\n _proto.onQueryUpdate = function onQueryUpdate(action) {\n var notifyOptions = {};\n\n if (action.type === 'success') {\n notifyOptions.onSuccess = true;\n } else if (action.type === 'error' && !isCancelledError(action.error)) {\n notifyOptions.onError = true;\n }\n\n this.updateResult(notifyOptions);\n\n if (this.hasListeners()) {\n this.updateTimers();\n }\n };\n\n _proto.notify = function notify(notifyOptions) {\n var _this8 = this;\n\n notifyManager.batch(function () {\n // First trigger the configuration callbacks\n if (notifyOptions.onSuccess) {\n _this8.options.onSuccess == null ? void 0 : _this8.options.onSuccess(_this8.currentResult.data);\n _this8.options.onSettled == null ? void 0 : _this8.options.onSettled(_this8.currentResult.data, null);\n } else if (notifyOptions.onError) {\n _this8.options.onError == null ? void 0 : _this8.options.onError(_this8.currentResult.error);\n _this8.options.onSettled == null ? void 0 : _this8.options.onSettled(undefined, _this8.currentResult.error);\n } // Then trigger the listeners\n\n\n if (notifyOptions.listeners) {\n _this8.listeners.forEach(function (listener) {\n listener(_this8.currentResult);\n });\n } // Then the cache listeners\n\n\n if (notifyOptions.cache) {\n _this8.client.getQueryCache().notify({\n query: _this8.currentQuery,\n type: 'observerResultsUpdated'\n });\n }\n });\n };\n\n return QueryObserver;\n}(Subscribable);\n\nfunction shouldLoadOnMount(query, options) {\n return options.enabled !== false && !query.state.dataUpdatedAt && !(query.state.status === 'error' && options.retryOnMount === false);\n}\n\nfunction shouldFetchOnMount(query, options) {\n return shouldLoadOnMount(query, options) || query.state.dataUpdatedAt > 0 && shouldFetchOn(query, options, options.refetchOnMount);\n}\n\nfunction shouldFetchOn(query, options, field) {\n if (options.enabled !== false) {\n var value = typeof field === 'function' ? field(query) : field;\n return value === 'always' || value !== false && isStale(query, options);\n }\n\n return false;\n}\n\nfunction shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n return options.enabled !== false && (query !== prevQuery || prevOptions.enabled === false) && (!options.suspense || query.state.status !== 'error') && isStale(query, options);\n}\n\nfunction isStale(query, options) {\n return query.isStaleByTime(options.staleTime);\n}","import React from 'react'; // CONTEXT\n\nfunction createValue() {\n var _isReset = false;\n return {\n clearReset: function clearReset() {\n _isReset = false;\n },\n reset: function reset() {\n _isReset = true;\n },\n isReset: function isReset() {\n return _isReset;\n }\n };\n}\n\nvar QueryErrorResetBoundaryContext = /*#__PURE__*/React.createContext(createValue()); // HOOK\n\nexport var useQueryErrorResetBoundary = function useQueryErrorResetBoundary() {\n return React.useContext(QueryErrorResetBoundaryContext);\n}; // COMPONENT\n\nexport var QueryErrorResetBoundary = function QueryErrorResetBoundary(_ref) {\n var children = _ref.children;\n var value = React.useMemo(function () {\n return createValue();\n }, []);\n return /*#__PURE__*/React.createElement(QueryErrorResetBoundaryContext.Provider, {\n value: value\n }, typeof children === 'function' ? children(value) : children);\n};","export function shouldThrowError(suspense, _useErrorBoundary, params) {\n // Allow useErrorBoundary function to override throwing behavior on a per-error basis\n if (typeof _useErrorBoundary === 'function') {\n return _useErrorBoundary.apply(void 0, params);\n } // Allow useErrorBoundary to override suspense's throwing behavior\n\n\n if (typeof _useErrorBoundary === 'boolean') return _useErrorBoundary; // If suspense is enabled default to throwing errors\n\n return !!suspense;\n}","import React from 'react';\nimport { notifyManager } from '../core/notifyManager';\nimport { useQueryErrorResetBoundary } from './QueryErrorResetBoundary';\nimport { useQueryClient } from './QueryClientProvider';\nimport { shouldThrowError } from './utils';\nexport function useBaseQuery(options, Observer) {\n var mountedRef = React.useRef(false);\n\n var _React$useState = React.useState(0),\n forceUpdate = _React$useState[1];\n\n var queryClient = useQueryClient();\n var errorResetBoundary = useQueryErrorResetBoundary();\n var defaultedOptions = queryClient.defaultQueryObserverOptions(options); // Make sure results are optimistically set in fetching state before subscribing or updating options\n\n defaultedOptions.optimisticResults = true; // Include callbacks in batch renders\n\n if (defaultedOptions.onError) {\n defaultedOptions.onError = notifyManager.batchCalls(defaultedOptions.onError);\n }\n\n if (defaultedOptions.onSuccess) {\n defaultedOptions.onSuccess = notifyManager.batchCalls(defaultedOptions.onSuccess);\n }\n\n if (defaultedOptions.onSettled) {\n defaultedOptions.onSettled = notifyManager.batchCalls(defaultedOptions.onSettled);\n }\n\n if (defaultedOptions.suspense) {\n // Always set stale time when using suspense to prevent\n // fetching again when directly mounting after suspending\n if (typeof defaultedOptions.staleTime !== 'number') {\n defaultedOptions.staleTime = 1000;\n } // Set cache time to 1 if the option has been set to 0\n // when using suspense to prevent infinite loop of fetches\n\n\n if (defaultedOptions.cacheTime === 0) {\n defaultedOptions.cacheTime = 1;\n }\n }\n\n if (defaultedOptions.suspense || defaultedOptions.useErrorBoundary) {\n // Prevent retrying failed query if the error boundary has not been reset yet\n if (!errorResetBoundary.isReset()) {\n defaultedOptions.retryOnMount = false;\n }\n }\n\n var _React$useState2 = React.useState(function () {\n return new Observer(queryClient, defaultedOptions);\n }),\n observer = _React$useState2[0];\n\n var result = observer.getOptimisticResult(defaultedOptions);\n React.useEffect(function () {\n mountedRef.current = true;\n errorResetBoundary.clearReset();\n var unsubscribe = observer.subscribe(notifyManager.batchCalls(function () {\n if (mountedRef.current) {\n forceUpdate(function (x) {\n return x + 1;\n });\n }\n })); // Update result to make sure we did not miss any query updates\n // between creating the observer and subscribing to it.\n\n observer.updateResult();\n return function () {\n mountedRef.current = false;\n unsubscribe();\n };\n }, [errorResetBoundary, observer]);\n React.useEffect(function () {\n // Do not notify on updates because of changes in the options because\n // these changes should already be reflected in the optimistic result.\n observer.setOptions(defaultedOptions, {\n listeners: false\n });\n }, [defaultedOptions, observer]); // Handle suspense\n\n if (defaultedOptions.suspense && result.isLoading) {\n throw observer.fetchOptimistic(defaultedOptions).then(function (_ref) {\n var data = _ref.data;\n defaultedOptions.onSuccess == null ? void 0 : defaultedOptions.onSuccess(data);\n defaultedOptions.onSettled == null ? void 0 : defaultedOptions.onSettled(data, null);\n }).catch(function (error) {\n errorResetBoundary.clearReset();\n defaultedOptions.onError == null ? void 0 : defaultedOptions.onError(error);\n defaultedOptions.onSettled == null ? void 0 : defaultedOptions.onSettled(undefined, error);\n });\n } // Handle error boundary\n\n\n if (result.isError && !errorResetBoundary.isReset() && !result.isFetching && shouldThrowError(defaultedOptions.suspense, defaultedOptions.useErrorBoundary, [result.error, observer.getCurrentQuery()])) {\n throw result.error;\n } // Handle result property usage tracking\n\n\n if (defaultedOptions.notifyOnChangeProps === 'tracked') {\n result = observer.trackResult(result, defaultedOptions);\n }\n\n return result;\n}","import { QueryObserver } from '../core';\nimport { parseQueryArgs } from '../core/utils';\nimport { useBaseQuery } from './useBaseQuery'; // HOOK\n\nexport function useQuery(arg1, arg2, arg3) {\n var parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n return useBaseQuery(parsedOptions, QueryObserver);\n}","const api = async (url: string): Promise => {\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(response.statusText);\n }\n return (await response.json()) as Promise;\n};\n\nexport default api;\n","/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument) {\n const argStr = Object.prototype.toString.call(argument);\n\n // Clone the date\n if (\n argument instanceof Date ||\n (typeof argument === \"object\" && argStr === \"[object Date]\")\n ) {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new argument.constructor(+argument);\n } else if (\n typeof argument === \"number\" ||\n argStr === \"[object Number]\" ||\n typeof argument === \"string\" ||\n argStr === \"[object String]\"\n ) {\n // TODO: Can we get rid of as?\n return new Date(argument);\n } else {\n // TODO: Can we get rid of as?\n return new Date(NaN);\n }\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n","/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n","let defaultOptions = {};\n\nexport function getDefaultOptions() {\n return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}\n","import { toDate } from \"../toDate.mjs\";\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n const _date = toDate(date);\n const utcDate = new Date(\n Date.UTC(\n _date.getFullYear(),\n _date.getMonth(),\n _date.getDate(),\n _date.getHours(),\n _date.getMinutes(),\n _date.getSeconds(),\n _date.getMilliseconds(),\n ),\n );\n utcDate.setUTCFullYear(_date.getFullYear());\n return +date - +utcDate;\n}\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The first date to compare\n * @param dateRight - The second date to compare\n *\n * @returns The result of the comparison\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * const result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * // Wed Feb 11 1987 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Sun Jul 02 1995 00:00:00\n * // ]\n */\nexport function compareAsc(dateLeft, dateRight) {\n const _dateLeft = toDate(dateLeft);\n const _dateRight = toDate(dateRight);\n\n const diff = _dateLeft.getTime() - _dateRight.getTime();\n\n if (diff < 0) {\n return -1;\n } else if (diff > 0) {\n return 1;\n // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}\n\n// Fallback for modularized imports:\nexport default compareAsc;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of calendar months\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\nexport function differenceInCalendarMonths(dateLeft, dateRight) {\n const _dateLeft = toDate(dateLeft);\n const _dateRight = toDate(dateRight);\n\n const yearDiff = _dateLeft.getFullYear() - _dateRight.getFullYear();\n const monthDiff = _dateLeft.getMonth() - _dateRight.getMonth();\n\n return yearDiff * 12 + monthDiff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarMonths;\n","export function getRoundingMethod(method) {\n return (number) => {\n const round = method ? Math[method] : Math.trunc;\n const result = round(number);\n // Prevent negative zero\n return result === 0 ? 0 : result;\n };\n}\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of milliseconds\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n * new Date(2014, 6, 2, 12, 30, 21, 700),\n * new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\nexport function differenceInMilliseconds(dateLeft, dateRight) {\n return +toDate(dateLeft) - +toDate(dateRight);\n}\n\n// Fallback for modularized imports:\nexport default differenceInMilliseconds;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The end of a day\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\nexport function endOfDay(date) {\n const _date = toDate(date);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfDay;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date) {\n const _date = toDate(date);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n","import { endOfDay } from \"./endOfDay.mjs\";\nimport { endOfMonth } from \"./endOfMonth.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name isLastDayOfMonth\n * @category Month Helpers\n * @summary Is the given date the last day of a month?\n *\n * @description\n * Is the given date the last day of a month?\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to check\n\n * @returns The date is the last day of a month\n *\n * @example\n * // Is 28 February 2014 the last day of a month?\n * const result = isLastDayOfMonth(new Date(2014, 1, 28))\n * //=> true\n */\nexport function isLastDayOfMonth(date) {\n const _date = toDate(date);\n return +endOfDay(_date) === +endOfMonth(_date);\n}\n\n// Fallback for modularized imports:\nexport default isLastDayOfMonth;\n","import { compareAsc } from \"./compareAsc.mjs\";\nimport { differenceInCalendarMonths } from \"./differenceInCalendarMonths.mjs\";\nimport { isLastDayOfMonth } from \"./isLastDayOfMonth.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name differenceInMonths\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @description\n * Get the number of full months between the given dates using trunc as a default rounding method.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of full months\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))\n * //=> 7\n */\nexport function differenceInMonths(dateLeft, dateRight) {\n const _dateLeft = toDate(dateLeft);\n const _dateRight = toDate(dateRight);\n\n const sign = compareAsc(_dateLeft, _dateRight);\n const difference = Math.abs(\n differenceInCalendarMonths(_dateLeft, _dateRight),\n );\n let result;\n\n // Check for the difference of less than month\n if (difference < 1) {\n result = 0;\n } else {\n if (_dateLeft.getMonth() === 1 && _dateLeft.getDate() > 27) {\n // This will check if the date is end of Feb and assign a higher end of month date\n // to compare it with Jan\n _dateLeft.setDate(30);\n }\n\n _dateLeft.setMonth(_dateLeft.getMonth() - sign * difference);\n\n // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full\n // If so, result must be decreased by 1 in absolute value\n let isLastMonthNotFull = compareAsc(_dateLeft, _dateRight) === -sign;\n\n // Check for cases of one full calendar month\n if (\n isLastDayOfMonth(toDate(dateLeft)) &&\n difference === 1 &&\n compareAsc(dateLeft, _dateRight) === 1\n ) {\n isLastMonthNotFull = false;\n }\n\n result = sign * (difference - Number(isLastMonthNotFull));\n }\n\n // Prevent negative zero\n return result === 0 ? 0 : result;\n}\n\n// Fallback for modularized imports:\nexport default differenceInMonths;\n","import { getRoundingMethod } from \"./_lib/getRoundingMethod.mjs\";\nimport { differenceInMilliseconds } from \"./differenceInMilliseconds.mjs\";\n\n/**\n * The {@link differenceInSeconds} function options.\n */\n\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n * @param options - An object with options.\n *\n * @returns The number of seconds\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n * new Date(2014, 6, 2, 12, 30, 20, 0),\n * new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\nexport function differenceInSeconds(dateLeft, dateRight, options) {\n const diff = differenceInMilliseconds(dateLeft, dateRight) / 1000;\n return getRoundingMethod(options?.roundingMethod)(diff);\n}\n\n// Fallback for modularized imports:\nexport default differenceInSeconds;\n","const formatDistanceLocale = {\n lessThanXSeconds: {\n one: \"less than a second\",\n other: \"less than {{count}} seconds\",\n },\n\n xSeconds: {\n one: \"1 second\",\n other: \"{{count}} seconds\",\n },\n\n halfAMinute: \"half a minute\",\n\n lessThanXMinutes: {\n one: \"less than a minute\",\n other: \"less than {{count}} minutes\",\n },\n\n xMinutes: {\n one: \"1 minute\",\n other: \"{{count}} minutes\",\n },\n\n aboutXHours: {\n one: \"about 1 hour\",\n other: \"about {{count}} hours\",\n },\n\n xHours: {\n one: \"1 hour\",\n other: \"{{count}} hours\",\n },\n\n xDays: {\n one: \"1 day\",\n other: \"{{count}} days\",\n },\n\n aboutXWeeks: {\n one: \"about 1 week\",\n other: \"about {{count}} weeks\",\n },\n\n xWeeks: {\n one: \"1 week\",\n other: \"{{count}} weeks\",\n },\n\n aboutXMonths: {\n one: \"about 1 month\",\n other: \"about {{count}} months\",\n },\n\n xMonths: {\n one: \"1 month\",\n other: \"{{count}} months\",\n },\n\n aboutXYears: {\n one: \"about 1 year\",\n other: \"about {{count}} years\",\n },\n\n xYears: {\n one: \"1 year\",\n other: \"{{count}} years\",\n },\n\n overXYears: {\n one: \"over 1 year\",\n other: \"over {{count}} years\",\n },\n\n almostXYears: {\n one: \"almost 1 year\",\n other: \"almost {{count}} years\",\n },\n};\n\nexport const formatDistance = (token, count, options) => {\n let result;\n\n const tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", count.toString());\n }\n\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return \"in \" + result;\n } else {\n return result + \" ago\";\n }\n }\n\n return result;\n};\n","export function buildFormatLongFn(args) {\n return (options = {}) => {\n // TODO: Remove String()\n const width = options.width ? String(options.width) : args.defaultWidth;\n const format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.mjs\";\n\nconst dateFormats = {\n full: \"EEEE, MMMM do, y\",\n long: \"MMMM do, y\",\n medium: \"MMM d, y\",\n short: \"MM/dd/yyyy\",\n};\n\nconst timeFormats = {\n full: \"h:mm:ss a zzzz\",\n long: \"h:mm:ss a z\",\n medium: \"h:mm:ss a\",\n short: \"h:mm a\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: \"{{date}}, {{time}}\",\n short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n","const formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n formatRelativeLocale[token];\n","/* eslint-disable no-unused-vars */\n\n/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n return (value, options) => {\n const context = options?.context ? String(options.context) : \"standalone\";\n\n let valuesArray;\n if (context === \"formatting\" && args.formattingValues) {\n const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n const width = options?.width ? String(options.width) : defaultWidth;\n\n valuesArray =\n args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n const defaultWidth = args.defaultWidth;\n const width = options?.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[width] || args.values[defaultWidth];\n }\n const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n return valuesArray[index];\n };\n}\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.mjs\";\n\nconst eraValues = {\n narrow: [\"B\", \"A\"],\n abbreviated: [\"BC\", \"AD\"],\n wide: [\"Before Christ\", \"Anno Domini\"],\n};\n\nconst quarterValues = {\n narrow: [\"1\", \"2\", \"3\", \"4\"],\n abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n wide: [\"1st quarter\", \"2nd quarter\", \"3rd quarter\", \"4th quarter\"],\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nconst monthValues = {\n narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"],\n abbreviated: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n\n wide: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n};\n\nconst dayValues = {\n narrow: [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"],\n short: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n abbreviated: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n wide: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n};\n\nconst dayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n};\n\nconst formattingDayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n};\n\nconst ordinalNumber = (dirtyNumber, _options) => {\n const number = Number(dirtyNumber);\n\n // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n const rem100 = number % 100;\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + \"st\";\n case 2:\n return number + \"nd\";\n case 3:\n return number + \"rd\";\n }\n }\n return number + \"th\";\n};\n\nexport const localize = {\n ordinalNumber,\n\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: \"wide\",\n }),\n\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: \"wide\",\n argumentCallback: (quarter) => quarter - 1,\n }),\n\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: \"wide\",\n }),\n\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: \"wide\",\n }),\n\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: \"wide\",\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: \"wide\",\n }),\n};\n","export function buildMatchFn(args) {\n return (string, options = {}) => {\n const width = options.width;\n\n const matchPattern =\n (width && args.matchPatterns[width]) ||\n args.matchPatterns[args.defaultMatchWidth];\n const matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n const matchedString = matchResult[0];\n\n const parsePatterns =\n (width && args.parsePatterns[width]) ||\n args.parsePatterns[args.defaultParseWidth];\n\n const key = Array.isArray(parsePatterns)\n ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n let value;\n\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n options.valueCallback(value)\n : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n\nfunction findKey(object, predicate) {\n for (const key in object) {\n if (\n Object.prototype.hasOwnProperty.call(object, key) &&\n predicate(object[key])\n ) {\n return key;\n }\n }\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (let key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n return undefined;\n}\n","export function buildMatchPatternFn(args) {\n return (string, options = {}) => {\n const matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n const matchedString = matchResult[0];\n\n const parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n let value = args.valueCallback\n ? args.valueCallback(parseResult[0])\n : parseResult[0];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n value = options.valueCallback ? options.valueCallback(value) : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.mjs\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.mjs\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i,\n};\nconst parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i],\n};\n\nconst matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i,\n};\nconst parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,\n};\nconst parseMonthPatterns = {\n narrow: [\n /^j/i,\n /^f/i,\n /^m/i,\n /^a/i,\n /^m/i,\n /^j/i,\n /^j/i,\n /^a/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n\n any: [\n /^ja/i,\n /^f/i,\n /^mar/i,\n /^ap/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^au/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n};\n\nconst matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,\n};\nconst parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],\n};\n\nconst matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,\n};\nconst parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i,\n },\n};\n\nexport const match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: (value) => parseInt(value, 10),\n }),\n\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseEraPatterns,\n defaultParseWidth: \"any\",\n }),\n\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: \"any\",\n valueCallback: (index) => index + 1,\n }),\n\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: \"any\",\n }),\n\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseDayPatterns,\n defaultParseWidth: \"any\",\n }),\n\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: \"any\",\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: \"any\",\n }),\n};\n","import { formatDistance } from \"./en-US/_lib/formatDistance.mjs\";\nimport { formatLong } from \"./en-US/_lib/formatLong.mjs\";\nimport { formatRelative } from \"./en-US/_lib/formatRelative.mjs\";\nimport { localize } from \"./en-US/_lib/localize.mjs\";\nimport { match } from \"./en-US/_lib/match.mjs\";\n\n/**\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)\n * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)\n */\nexport const enUS = {\n code: \"en-US\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0 /* Sunday */,\n firstWeekContainsDate: 1,\n },\n};\n\n// Fallback for modularized imports:\nexport default enUS;\n","import { compareAsc } from \"./compareAsc.mjs\";\nimport { minutesInDay, minutesInMonth } from \"./constants.mjs\";\nimport { differenceInMonths } from \"./differenceInMonths.mjs\";\nimport { differenceInSeconds } from \"./differenceInSeconds.mjs\";\nimport { toDate } from \"./toDate.mjs\";\nimport { defaultLocale } from \"./_lib/defaultLocale.mjs\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.mjs\";\nimport { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.mjs\";\n\n/**\n * The {@link formatDistance} function options.\n */\n\n/**\n * @name formatDistance\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words.\n *\n * | Distance between dates | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance between dates | Result |\n * |------------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date\n * @param baseDate - The date to compare with\n * @param options - An object with options\n *\n * @returns The distance in words\n *\n * @throws `date` must not be Invalid Date\n * @throws `baseDate` must not be Invalid Date\n * @throws `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00, including seconds?\n * const result = formatDistance(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * { includeSeconds: true }\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> 'about 1 year ago'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> 'pli ol 1 jaro'\n */\n\nexport function formatDistance(date, baseDate, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n const minutesInAlmostTwoDays = 2520;\n\n const comparison = compareAsc(date, baseDate);\n\n if (isNaN(comparison)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n const localizeOptions = Object.assign({}, options, {\n addSuffix: options?.addSuffix,\n comparison: comparison,\n });\n\n let dateLeft;\n let dateRight;\n if (comparison > 0) {\n dateLeft = toDate(baseDate);\n dateRight = toDate(date);\n } else {\n dateLeft = toDate(date);\n dateRight = toDate(baseDate);\n }\n\n const seconds = differenceInSeconds(dateRight, dateLeft);\n const offsetInSeconds =\n (getTimezoneOffsetInMilliseconds(dateRight) -\n getTimezoneOffsetInMilliseconds(dateLeft)) /\n 1000;\n const minutes = Math.round((seconds - offsetInSeconds) / 60);\n let months;\n\n // 0 up to 2 mins\n if (minutes < 2) {\n if (options?.includeSeconds) {\n if (seconds < 5) {\n return locale.formatDistance(\"lessThanXSeconds\", 5, localizeOptions);\n } else if (seconds < 10) {\n return locale.formatDistance(\"lessThanXSeconds\", 10, localizeOptions);\n } else if (seconds < 20) {\n return locale.formatDistance(\"lessThanXSeconds\", 20, localizeOptions);\n } else if (seconds < 40) {\n return locale.formatDistance(\"halfAMinute\", 0, localizeOptions);\n } else if (seconds < 60) {\n return locale.formatDistance(\"lessThanXMinutes\", 1, localizeOptions);\n } else {\n return locale.formatDistance(\"xMinutes\", 1, localizeOptions);\n }\n } else {\n if (minutes === 0) {\n return locale.formatDistance(\"lessThanXMinutes\", 1, localizeOptions);\n } else {\n return locale.formatDistance(\"xMinutes\", minutes, localizeOptions);\n }\n }\n\n // 2 mins up to 0.75 hrs\n } else if (minutes < 45) {\n return locale.formatDistance(\"xMinutes\", minutes, localizeOptions);\n\n // 0.75 hrs up to 1.5 hrs\n } else if (minutes < 90) {\n return locale.formatDistance(\"aboutXHours\", 1, localizeOptions);\n\n // 1.5 hrs up to 24 hrs\n } else if (minutes < minutesInDay) {\n const hours = Math.round(minutes / 60);\n return locale.formatDistance(\"aboutXHours\", hours, localizeOptions);\n\n // 1 day up to 1.75 days\n } else if (minutes < minutesInAlmostTwoDays) {\n return locale.formatDistance(\"xDays\", 1, localizeOptions);\n\n // 1.75 days up to 30 days\n } else if (minutes < minutesInMonth) {\n const days = Math.round(minutes / minutesInDay);\n return locale.formatDistance(\"xDays\", days, localizeOptions);\n\n // 1 month up to 2 months\n } else if (minutes < minutesInMonth * 2) {\n months = Math.round(minutes / minutesInMonth);\n return locale.formatDistance(\"aboutXMonths\", months, localizeOptions);\n }\n\n months = differenceInMonths(dateRight, dateLeft);\n\n // 2 months up to 12 months\n if (months < 12) {\n const nearestMonth = Math.round(minutes / minutesInMonth);\n return locale.formatDistance(\"xMonths\", nearestMonth, localizeOptions);\n\n // 1 year up to max Date\n } else {\n const monthsSinceStartOfYear = months % 12;\n const years = Math.trunc(months / 12);\n\n // N years up to 1 years 3 months\n if (monthsSinceStartOfYear < 3) {\n return locale.formatDistance(\"aboutXYears\", years, localizeOptions);\n\n // N years 3 months up to N years 9 months\n } else if (monthsSinceStartOfYear < 9) {\n return locale.formatDistance(\"overXYears\", years, localizeOptions);\n\n // N years 9 months up to N year 12 months\n } else {\n return locale.formatDistance(\"almostXYears\", years + 1, localizeOptions);\n }\n }\n}\n\n// Fallback for modularized imports:\nexport default formatDistance;\n","import { formatDistance } from 'date-fns';\n\nexport const timeAgo = (input: string) => {\n const date = new Date(input);\n return formatDistance(date, new Date(), { addSuffix: true });\n};\n","// src/create-anatomy.ts\nvar createAnatomy = (name, parts = []) => ({\n parts: (...values) => {\n if (isEmpty(parts)) {\n return createAnatomy(name, values);\n }\n throw new Error(\"createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?\");\n },\n extendWith: (...values) => createAnatomy(name, [...parts, ...values]),\n rename: (newName) => createAnatomy(newName, parts),\n keys: () => parts,\n build: () => [...new Set(parts)].reduce(\n (prev, part) => Object.assign(prev, {\n [part]: {\n selector: [\n `&[data-scope=\"${toKebabCase(name)}\"][data-part=\"${toKebabCase(part)}\"]`,\n `& [data-scope=\"${toKebabCase(name)}\"][data-part=\"${toKebabCase(part)}\"]`\n ].join(\", \"),\n attrs: { \"data-scope\": toKebabCase(name), \"data-part\": toKebabCase(part) }\n }\n }),\n {}\n )\n});\nvar toKebabCase = (value) => value.replace(/([A-Z])([A-Z])/g, \"$1-$2\").replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/[\\s_]+/g, \"-\").toLowerCase();\nvar isEmpty = (v) => v.length === 0;\nexport {\n createAnatomy\n};\n//# sourceMappingURL=index.mjs.map","// src/attrs.ts\nvar dataAttr = (guard) => {\n return guard ? \"\" : void 0;\n};\nvar ariaAttr = (guard) => {\n return guard ? \"true\" : void 0;\n};\n\n// src/is-html-element.ts\nvar isHTMLElement = (v) => typeof v === \"object\" && v?.nodeType === Node.ELEMENT_NODE && typeof v?.nodeName === \"string\";\n\n// src/contains.ts\nfunction contains(parent, child) {\n if (!parent || !child)\n return false;\n if (!isHTMLElement(parent) || !isHTMLElement(child))\n return false;\n return parent === child || parent.contains(child);\n}\nvar isSelfEvent = (event) => contains(event.currentTarget, event.target);\n\n// src/create-scope.ts\nvar getDocument = (node) => {\n if (node.nodeType === Node.DOCUMENT_NODE)\n return node;\n return node.ownerDocument ?? document;\n};\nfunction createScope(methods) {\n const screen = {\n getRootNode: (ctx) => ctx.getRootNode?.() ?? document,\n getDoc: (ctx) => getDocument(screen.getRootNode(ctx)),\n getWin: (ctx) => screen.getDoc(ctx).defaultView ?? window,\n getActiveElement: (ctx) => screen.getDoc(ctx).activeElement,\n isActiveElement: (ctx, elem) => elem === screen.getActiveElement(ctx),\n getById: (ctx, id) => screen.getRootNode(ctx).getElementById(id),\n setValue: (elem, value) => {\n if (elem == null || value == null)\n return;\n const valueAsString = value.toString();\n if (elem.value === valueAsString)\n return;\n elem.value = value.toString();\n }\n };\n return { ...screen, ...methods };\n}\n\n// src/is-document.ts\nvar isDocument = (el) => el.nodeType === Node.DOCUMENT_NODE;\n\n// src/is-shadow-root.ts\nvar isNode = (el) => el.nodeType !== void 0;\nvar isShadowRoot = (el) => el && isNode(el) && el.nodeType === Node.DOCUMENT_FRAGMENT_NODE && \"host\" in el;\n\n// src/env.ts\nfunction getDocument2(el) {\n if (isDocument(el))\n return el;\n return el?.ownerDocument ?? document;\n}\nfunction getWindow(el) {\n if (isShadowRoot(el))\n return getWindow(el.host);\n if (isDocument(el))\n return el.defaultView ?? window;\n if (isHTMLElement(el))\n return el.ownerDocument?.defaultView ?? window;\n return window;\n}\n\n// src/get-active-element.ts\nfunction getActiveElement(el) {\n let activeElement = el.ownerDocument.activeElement;\n while (activeElement?.shadowRoot) {\n const el2 = activeElement.shadowRoot.activeElement;\n if (el2 === activeElement)\n break;\n else\n activeElement = el2;\n }\n return activeElement;\n}\n\n// src/get-before-input-value.ts\nfunction getBeforeInputValue(event) {\n const { selectionStart, selectionEnd, value } = event.currentTarget;\n return value.slice(0, selectionStart) + event.data + value.slice(selectionEnd);\n}\n\n// src/get-by-id.ts\nvar defaultItemToId = (v) => v.id;\nfunction itemById(v, id, itemToId = defaultItemToId) {\n return v.find((item) => itemToId(item) === id);\n}\nfunction indexOfId(v, id, itemToId = defaultItemToId) {\n const item = itemById(v, id, itemToId);\n return item ? v.indexOf(item) : -1;\n}\nfunction nextById(v, id, loop = true) {\n let idx = indexOfId(v, id);\n idx = loop ? (idx + 1) % v.length : Math.min(idx + 1, v.length - 1);\n return v[idx];\n}\nfunction prevById(v, id, loop = true) {\n let idx = indexOfId(v, id);\n if (idx === -1)\n return loop ? v[v.length - 1] : null;\n idx = loop ? (idx - 1 + v.length) % v.length : Math.max(0, idx - 1);\n return v[idx];\n}\n\n// src/sanitize.ts\nvar sanitize = (str) => str.split(\"\").map((char) => {\n const code = char.charCodeAt(0);\n if (code > 0 && code < 128) {\n return char;\n }\n if (code >= 128 && code <= 255) {\n return `/x${code.toString(16)}`.replace(\"/\", \"\\\\\");\n }\n return \"\";\n}).join(\"\").trim();\n\n// src/get-by-text.ts\nvar getValueText = (item) => sanitize(item.dataset.valuetext ?? item.textContent ?? \"\");\nvar match = (valueText, query2) => valueText.trim().toLowerCase().startsWith(query2.toLowerCase());\nvar wrap = (v, idx) => {\n return v.map((_, index) => v[(Math.max(idx, 0) + index) % v.length]);\n};\nfunction getByText(v, text, currentId, itemToId = defaultItemToId) {\n const index = currentId ? indexOfId(v, currentId, itemToId) : -1;\n let items = currentId ? wrap(v, index) : v;\n const isSingleKey = text.length === 1;\n if (isSingleKey) {\n items = items.filter((item) => itemToId(item) !== currentId);\n }\n return items.find((item) => match(getValueText(item), text));\n}\n\n// src/get-by-typeahead.ts\nfunction getByTypeaheadImpl(_items, options) {\n const { state, activeId, key, timeout = 350, itemToId } = options;\n const search = state.keysSoFar + key;\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const query2 = isRepeated ? search[0] : search;\n let items = _items.slice();\n const next = getByText(items, query2, activeId, itemToId);\n function cleanup() {\n clearTimeout(state.timer);\n state.timer = -1;\n }\n function update(value) {\n state.keysSoFar = value;\n cleanup();\n if (value !== \"\") {\n state.timer = +setTimeout(() => {\n update(\"\");\n cleanup();\n }, timeout);\n }\n }\n update(search);\n return next;\n}\nvar getByTypeahead = /* @__PURE__ */ Object.assign(getByTypeaheadImpl, {\n defaultOptions: { keysSoFar: \"\", timer: -1 },\n isValidEvent: isValidTypeaheadEvent\n});\nfunction isValidTypeaheadEvent(event) {\n return event.key.length === 1 && !event.ctrlKey && !event.metaKey;\n}\n\n// src/get-computed-style.ts\nvar styleCache = /* @__PURE__ */ new WeakMap();\nfunction getComputedStyle(el) {\n if (!styleCache.has(el)) {\n const win = el.ownerDocument.defaultView || window;\n styleCache.set(el, win.getComputedStyle(el));\n }\n return styleCache.get(el);\n}\n\n// src/get-event-target.ts\nfunction getEventTarget(event) {\n return event.composedPath?.()[0] ?? event.target;\n}\n\n// src/get-scroll-parent.ts\nfunction isScrollParent(el) {\n const win = el.ownerDocument.defaultView || window;\n const { overflow, overflowX, overflowY } = win.getComputedStyle(el);\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}\nfunction getParent(el) {\n if (el.localName === \"html\")\n return el;\n return el.assignedSlot || el.parentElement || el.ownerDocument.documentElement;\n}\nfunction getScrollParent(el) {\n if ([\"html\", \"body\", \"#document\"].includes(el.localName)) {\n return el.ownerDocument.body;\n }\n if (isHTMLElement(el) && isScrollParent(el)) {\n return el;\n }\n return getScrollParent(getParent(el));\n}\nfunction getScrollParents(el, list = []) {\n const parent = getScrollParent(el);\n const isBody = parent === el.ownerDocument.body;\n const win = parent.ownerDocument.defaultView || window;\n const target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(parent) ? parent : []) : parent;\n const parents = list.concat(target);\n return isBody ? parents : parents.concat(getScrollParents(getParent(target)));\n}\n\n// src/is-editable-element.ts\nfunction isEditableElement(el) {\n if (el == null || !isHTMLElement(el)) {\n return false;\n }\n try {\n const win = el.ownerDocument.defaultView || window;\n return el instanceof win.HTMLInputElement && el.selectionStart != null || /(textarea|select)/.test(el.localName) || el.isContentEditable;\n } catch {\n return false;\n }\n}\n\n// src/is-hidden-element.ts\nfunction isHiddenElement(node) {\n if (node.parentElement && isHiddenElement(node.parentElement))\n return true;\n return node.hidden;\n}\n\n// src/platform.ts\nvar isDom = () => typeof document !== \"undefined\";\nfunction getPlatform() {\n const agent = navigator.userAgentData;\n return agent?.platform ?? navigator.platform;\n}\nvar pt = (v) => isDom() && v.test(getPlatform());\nvar ua = (v) => isDom() && v.test(navigator.userAgent);\nvar vn = (v) => isDom() && v.test(navigator.vendor);\nvar isTouchDevice = () => isDom() && !!navigator.maxTouchPoints;\nvar isMac = () => pt(/^Mac/) && !isTouchDevice();\nvar isIPhone = () => pt(/^iPhone/);\nvar isSafari = () => isApple() && vn(/apple/i);\nvar isFirefox = () => ua(/firefox\\//i);\nvar isApple = () => pt(/mac|iphone|ipad|ipod/i);\nvar isIos = () => isApple() && !isMac();\n\n// src/query.ts\nfunction queryAll(root, selector) {\n return Array.from(root?.querySelectorAll(selector) ?? []);\n}\nfunction query(root, selector) {\n return root?.querySelector(selector) ?? null;\n}\n\n// src/raf.ts\nfunction nextTick(fn) {\n const set = /* @__PURE__ */ new Set();\n function raf2(fn2) {\n const id = globalThis.requestAnimationFrame(fn2);\n set.add(() => globalThis.cancelAnimationFrame(id));\n }\n raf2(() => raf2(fn));\n return function cleanup() {\n set.forEach((fn2) => fn2());\n };\n}\nfunction raf(fn) {\n const id = globalThis.requestAnimationFrame(fn);\n return () => {\n globalThis.cancelAnimationFrame(id);\n };\n}\n\n// src/index.ts\nvar MAX_Z_INDEX = 2147483647;\nexport {\n MAX_Z_INDEX,\n ariaAttr,\n contains,\n createScope,\n dataAttr,\n defaultItemToId,\n getActiveElement,\n getBeforeInputValue,\n getByText,\n getByTypeahead,\n getComputedStyle,\n getDocument2 as getDocument,\n getEventTarget,\n getParent,\n getPlatform,\n getScrollParent,\n getScrollParents,\n getWindow,\n indexOfId,\n isApple,\n isDom,\n isEditableElement,\n isFirefox,\n isHTMLElement,\n isHiddenElement,\n isIPhone,\n isIos,\n isMac,\n isSafari,\n isSelfEvent,\n isTouchDevice,\n itemById,\n nextById,\n nextTick,\n prevById,\n query,\n queryAll,\n raf\n};\n//# sourceMappingURL=index.mjs.map","const e=Symbol(),t=Symbol(),r=\"a\",n=\"w\";let o=(e,t)=>new Proxy(e,t);const s=Object.getPrototypeOf,c=new WeakMap,l=e=>e&&(c.has(e)?c.get(e):s(e)===Object.prototype||s(e)===Array.prototype),f=e=>\"object\"==typeof e&&null!==e,i=e=>{if(Array.isArray(e))return Array.from(e);const t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach(e=>{e.configurable=!0}),Object.create(s(e),t)},u=e=>e[t]||e,a=(s,c,f,p)=>{if(!l(s))return s;let g=p&&p.get(s);if(!g){const e=u(s);g=(e=>Object.values(Object.getOwnPropertyDescriptors(e)).some(e=>!e.configurable&&!e.writable))(e)?[e,i(e)]:[e],null==p||p.set(s,g)}const[y,h]=g;let w=f&&f.get(y);return w&&w[1].f===!!h||(w=((o,s)=>{const c={f:s};let l=!1;const f=(e,t)=>{if(!l){let s=c[r].get(o);if(s||(s={},c[r].set(o,s)),e===n)s[n]=!0;else{let r=s[e];r||(r=new Set,s[e]=r),r.add(t)}}},i={get:(e,n)=>n===t?o:(f(\"k\",n),a(Reflect.get(e,n),c[r],c.c,c.t)),has:(t,n)=>n===e?(l=!0,c[r].delete(o),!0):(f(\"h\",n),Reflect.has(t,n)),getOwnPropertyDescriptor:(e,t)=>(f(\"o\",t),Reflect.getOwnPropertyDescriptor(e,t)),ownKeys:e=>(f(n),Reflect.ownKeys(e))};return s&&(i.set=i.deleteProperty=()=>!1),[i,c]})(y,!!h),w[1].p=o(h||y,w[0]),f&&f.set(y,w)),w[1][r]=c,w[1].c=f,w[1].t=p,w[1].p},p=(e,t,r,o,s=Object.is)=>{if(s(e,t))return!1;if(!f(e)||!f(t))return!0;const c=r.get(u(e));if(!c)return!0;if(o){const r=o.get(e);if(r&&r.n===t)return r.g;o.set(e,{n:t,g:!1})}let l=null;try{for(const r of c.h||[])if(l=Reflect.has(e,r)!==Reflect.has(t,r),l)return l;if(!0===c[n]){if(l=((e,t)=>{const r=Reflect.ownKeys(e),n=Reflect.ownKeys(t);return r.length!==n.length||r.some((e,t)=>e!==n[t])})(e,t),l)return l}else for(const r of c.o||[])if(l=!!Reflect.getOwnPropertyDescriptor(e,r)!=!!Reflect.getOwnPropertyDescriptor(t,r),l)return l;for(const n of c.k||[])if(l=p(e[n],t[n],r,o,s),l)return l;return null===l&&(l=!0),l}finally{o&&o.set(e,{n:t,g:l})}},g=t=>!!l(t)&&e in t,y=e=>l(e)&&e[t]||null,h=(e,t=!0)=>{c.set(e,t)},w=(e,t,r)=>{const o=[],s=new WeakSet,c=(e,l)=>{if(s.has(e))return;f(e)&&s.add(e);const i=f(e)&&t.get(u(e));if(i){var a,p;if(null==(a=i.h)||a.forEach(e=>{const t=`:has(${String(e)})`;o.push(l?[...l,t]:[t])}),!0===i[n]){const e=\":ownKeys\";o.push(l?[...l,e]:[e])}else{var g;null==(g=i.o)||g.forEach(e=>{const t=`:hasOwn(${String(e)})`;o.push(l?[...l,t]:[t])})}null==(p=i.k)||p.forEach(t=>{r&&!(\"value\"in(Object.getOwnPropertyDescriptor(e,t)||{}))||c(e[t],l?[...l,t]:[t])})}else l&&o.push(l)};return c(e),o},O=e=>{o=e};export{w as affectedToPathList,a as createProxy,y as getUntracked,p as isChanged,h as markToTrack,O as replaceNewProxy,g as trackMemo};\n//# sourceMappingURL=index.modern.mjs.map\n","// src/proxy.ts\nimport { getUntracked, markToTrack } from \"proxy-compare\";\nvar isDev = process.env.NODE_ENV !== \"production\";\nvar isObject = (x) => typeof x === \"object\" && x !== null;\nvar proxyStateMap = /* @__PURE__ */ new WeakMap();\nvar refSet = /* @__PURE__ */ new WeakSet();\nvar buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) => new Proxy(target, handler), canProxy = (x) => isObject(x) && !refSet.has(x) && (Array.isArray(x) || !(Symbol.iterator in x)) && !(x instanceof WeakMap) && !(x instanceof WeakSet) && !(x instanceof Error) && !(x instanceof Number) && !(x instanceof Date) && !(x instanceof String) && !(x instanceof RegExp) && !(x instanceof ArrayBuffer), defaultHandlePromise = (promise) => {\n switch (promise.status) {\n case \"fulfilled\":\n return promise.value;\n case \"rejected\":\n throw promise.reason;\n default:\n throw promise;\n }\n}, snapCache = /* @__PURE__ */ new WeakMap(), createSnapshot = (target, version, handlePromise = defaultHandlePromise) => {\n const cache = snapCache.get(target);\n if (cache?.[0] === version) {\n return cache[1];\n }\n const snap = Array.isArray(target) ? [] : Object.create(Object.getPrototypeOf(target));\n markToTrack(snap, true);\n snapCache.set(target, [version, snap]);\n Reflect.ownKeys(target).forEach((key) => {\n const value = Reflect.get(target, key);\n if (refSet.has(value)) {\n markToTrack(value, false);\n snap[key] = value;\n } else if (value instanceof Promise) {\n Object.defineProperty(snap, key, {\n get() {\n return handlePromise(value);\n }\n });\n } else if (proxyStateMap.has(value)) {\n snap[key] = snapshot(value, handlePromise);\n } else {\n snap[key] = value;\n }\n });\n return Object.freeze(snap);\n}, proxyCache = /* @__PURE__ */ new WeakMap(), versionHolder = [1, 1], proxyFunction2 = (initialObject) => {\n if (!isObject(initialObject)) {\n throw new Error(\"object required\");\n }\n const found = proxyCache.get(initialObject);\n if (found) {\n return found;\n }\n let version = versionHolder[0];\n const listeners = /* @__PURE__ */ new Set();\n const notifyUpdate = (op, nextVersion = ++versionHolder[0]) => {\n if (version !== nextVersion) {\n version = nextVersion;\n listeners.forEach((listener) => listener(op, nextVersion));\n }\n };\n let checkVersion = versionHolder[1];\n const ensureVersion = (nextCheckVersion = ++versionHolder[1]) => {\n if (checkVersion !== nextCheckVersion && !listeners.size) {\n checkVersion = nextCheckVersion;\n propProxyStates.forEach(([propProxyState]) => {\n const propVersion = propProxyState[1](nextCheckVersion);\n if (propVersion > version) {\n version = propVersion;\n }\n });\n }\n return version;\n };\n const createPropListener = (prop) => (op, nextVersion) => {\n const newOp = [...op];\n newOp[1] = [prop, ...newOp[1]];\n notifyUpdate(newOp, nextVersion);\n };\n const propProxyStates = /* @__PURE__ */ new Map();\n const addPropListener = (prop, propProxyState) => {\n if (isDev && propProxyStates.has(prop)) {\n throw new Error(\"prop listener already exists\");\n }\n if (listeners.size) {\n const remove = propProxyState[3](createPropListener(prop));\n propProxyStates.set(prop, [propProxyState, remove]);\n } else {\n propProxyStates.set(prop, [propProxyState]);\n }\n };\n const removePropListener = (prop) => {\n const entry = propProxyStates.get(prop);\n if (entry) {\n propProxyStates.delete(prop);\n entry[1]?.();\n }\n };\n const addListener = (listener) => {\n listeners.add(listener);\n if (listeners.size === 1) {\n propProxyStates.forEach(([propProxyState, prevRemove], prop) => {\n if (isDev && prevRemove) {\n throw new Error(\"remove already exists\");\n }\n const remove = propProxyState[3](createPropListener(prop));\n propProxyStates.set(prop, [propProxyState, remove]);\n });\n }\n const removeListener = () => {\n listeners.delete(listener);\n if (listeners.size === 0) {\n propProxyStates.forEach(([propProxyState, remove], prop) => {\n if (remove) {\n remove();\n propProxyStates.set(prop, [propProxyState]);\n }\n });\n }\n };\n return removeListener;\n };\n const baseObject = Array.isArray(initialObject) ? [] : Object.create(Object.getPrototypeOf(initialObject));\n const handler = {\n deleteProperty(target, prop) {\n const prevValue = Reflect.get(target, prop);\n removePropListener(prop);\n const deleted = Reflect.deleteProperty(target, prop);\n if (deleted) {\n notifyUpdate([\"delete\", [prop], prevValue]);\n }\n return deleted;\n },\n set(target, prop, value, receiver) {\n const hasPrevValue = Reflect.has(target, prop);\n const prevValue = Reflect.get(target, prop, receiver);\n if (hasPrevValue && (objectIs(prevValue, value) || proxyCache.has(value) && objectIs(prevValue, proxyCache.get(value)))) {\n return true;\n }\n removePropListener(prop);\n if (isObject(value)) {\n value = getUntracked(value) || value;\n }\n let nextValue = value;\n if (Object.getOwnPropertyDescriptor(target, prop)?.set) {\n } else if (value instanceof Promise) {\n value.then((v) => {\n value.status = \"fulfilled\";\n value.value = v;\n notifyUpdate([\"resolve\", [prop], v]);\n }).catch((e) => {\n value.status = \"rejected\";\n value.reason = e;\n notifyUpdate([\"reject\", [prop], e]);\n });\n } else {\n if (!proxyStateMap.has(value) && canProxy(value)) {\n nextValue = proxy(value);\n }\n const childProxyState = !refSet.has(nextValue) && proxyStateMap.get(nextValue);\n if (childProxyState) {\n addPropListener(prop, childProxyState);\n }\n }\n Reflect.set(target, prop, nextValue, receiver);\n notifyUpdate([\"set\", [prop], value, prevValue]);\n return true;\n }\n };\n const proxyObject = newProxy(baseObject, handler);\n proxyCache.set(initialObject, proxyObject);\n const proxyState = [baseObject, ensureVersion, createSnapshot, addListener];\n proxyStateMap.set(proxyObject, proxyState);\n Reflect.ownKeys(initialObject).forEach((key) => {\n const desc = Object.getOwnPropertyDescriptor(initialObject, key);\n if (desc.get || desc.set) {\n Object.defineProperty(baseObject, key, desc);\n } else {\n proxyObject[key] = initialObject[key];\n }\n });\n return proxyObject;\n}) => [\n // public functions\n proxyFunction2,\n // shared state\n proxyStateMap,\n refSet,\n // internal things\n objectIs,\n newProxy,\n canProxy,\n defaultHandlePromise,\n snapCache,\n createSnapshot,\n proxyCache,\n versionHolder\n];\nvar [proxyFunction] = buildProxyFunction();\nfunction proxy(initialObject = {}) {\n return proxyFunction(initialObject);\n}\nfunction subscribe(proxyObject, callback, notifyInSync) {\n const proxyState = proxyStateMap.get(proxyObject);\n if (isDev && !proxyState) {\n console.warn(\"Please use proxy object\");\n }\n let promise;\n const ops = [];\n const addListener = proxyState[3];\n let isListenerActive = false;\n const listener = (op) => {\n ops.push(op);\n if (notifyInSync) {\n callback(ops.splice(0));\n return;\n }\n if (!promise) {\n promise = Promise.resolve().then(() => {\n promise = void 0;\n if (isListenerActive) {\n callback(ops.splice(0));\n }\n });\n }\n };\n const removeListener = addListener(listener);\n isListenerActive = true;\n return () => {\n isListenerActive = false;\n removeListener();\n };\n}\nfunction snapshot(proxyObject, handlePromise) {\n const proxyState = proxyStateMap.get(proxyObject);\n if (isDev && !proxyState) {\n console.warn(\"Please use proxy object\");\n }\n const [target, ensureVersion, createSnapshot] = proxyState;\n return createSnapshot(target, ensureVersion(), handlePromise);\n}\nfunction ref(obj) {\n refSet.add(obj);\n return obj;\n}\n\n// src/proxy-computed.ts\nfunction proxyWithComputed(initialObject, computedFns) {\n const keys = Object.keys(computedFns);\n keys.forEach((key) => {\n if (Object.getOwnPropertyDescriptor(initialObject, key)) {\n throw new Error(\"object property already defined\");\n }\n const computedFn = computedFns[key];\n const { get, set } = typeof computedFn === \"function\" ? { get: computedFn } : computedFn;\n const desc = {};\n desc.get = () => get(snapshot(proxyObject));\n if (set) {\n desc.set = (newValue) => set(proxyObject, newValue);\n }\n Object.defineProperty(initialObject, key, desc);\n });\n const proxyObject = proxy(initialObject);\n return proxyObject;\n}\n\n// src/subscribe-key.ts\nvar defaultCompareFn = (prev, next) => Object.is(prev, next);\nfunction subscribeKey(obj, key, fn, sync, compareFn) {\n let prev = Reflect.get(snapshot(obj), key);\n const isEqual = compareFn || defaultCompareFn;\n function onSnapshotChange() {\n const snap = snapshot(obj);\n if (isEqual(prev, snap[key]))\n return;\n fn(snap[key]);\n prev = Reflect.get(snap, key);\n }\n return subscribe(obj, onSnapshotChange, sync);\n}\nexport {\n proxy,\n proxyWithComputed,\n ref,\n snapshot,\n subscribe,\n subscribeKey\n};\n//# sourceMappingURL=index.mjs.map","function set(obj, key, val) {\n\tif (typeof val.value === 'object') val.value = klona(val.value);\n\tif (!val.enumerable || val.get || val.set || !val.configurable || !val.writable || key === '__proto__') {\n\t\tObject.defineProperty(obj, key, val);\n\t} else obj[key] = val.value;\n}\n\nexport function klona(x) {\n\tif (typeof x !== 'object') return x;\n\n\tvar i=0, k, list, tmp, str=Object.prototype.toString.call(x);\n\n\tif (str === '[object Object]') {\n\t\ttmp = Object.create(x.__proto__ || null);\n\t} else if (str === '[object Array]') {\n\t\ttmp = Array(x.length);\n\t} else if (str === '[object Set]') {\n\t\ttmp = new Set;\n\t\tx.forEach(function (val) {\n\t\t\ttmp.add(klona(val));\n\t\t});\n\t} else if (str === '[object Map]') {\n\t\ttmp = new Map;\n\t\tx.forEach(function (val, key) {\n\t\t\ttmp.set(klona(key), klona(val));\n\t\t});\n\t} else if (str === '[object Date]') {\n\t\ttmp = new Date(+x);\n\t} else if (str === '[object RegExp]') {\n\t\ttmp = new RegExp(x.source, x.flags);\n\t} else if (str === '[object DataView]') {\n\t\ttmp = new x.constructor( klona(x.buffer) );\n\t} else if (str === '[object ArrayBuffer]') {\n\t\ttmp = x.slice(0);\n\t} else if (str.slice(-6) === 'Array]') {\n\t\t// ArrayBuffer.isView(x)\n\t\t// ~> `new` bcuz `Buffer.slice` => ref\n\t\ttmp = new x.constructor(x);\n\t}\n\n\tif (tmp) {\n\t\tfor (list=Object.getOwnPropertySymbols(x); i < list.length; i++) {\n\t\t\tset(tmp, list[i], Object.getOwnPropertyDescriptor(x, list[i]));\n\t\t}\n\n\t\tfor (i=0, list=Object.getOwnPropertyNames(x); i < list.length; i++) {\n\t\t\tif (Object.hasOwnProperty.call(tmp, k=list[i]) && tmp[k] === x[k]) continue;\n\t\t\tset(tmp, k, Object.getOwnPropertyDescriptor(x, k));\n\t\t}\n\t}\n\n\treturn tmp || x;\n}\n","var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\n\n// src/index.ts\nimport { proxy as proxy2, ref as ref2, snapshot as snapshot2, subscribe as subscribe2 } from \"@zag-js/store\";\n\n// ../utilities/core/src/array.ts\nfunction clear(v) {\n while (v.length > 0)\n v.pop();\n return v;\n}\n\n// ../utilities/core/src/functions.ts\nvar runIfFn = (v, ...a) => {\n const res = typeof v === \"function\" ? v(...a) : v;\n return res ?? void 0;\n};\nvar cast = (v) => v;\nvar noop = () => {\n};\nvar callAll = (...fns) => (...a) => {\n fns.forEach(function(fn) {\n fn?.(...a);\n });\n};\nvar uuid = /* @__PURE__ */ (() => {\n let id = 0;\n return () => {\n id++;\n return id.toString(36);\n };\n})();\n\n// ../utilities/core/src/guard.ts\nvar isDev = () => process.env.NODE_ENV !== \"production\";\nvar isArray = (v) => Array.isArray(v);\nvar isObject = (v) => !(v == null || typeof v !== \"object\" || isArray(v));\nvar isNumber = (v) => typeof v === \"number\" && !Number.isNaN(v);\nvar isString = (v) => typeof v === \"string\";\nvar isFunction = (v) => typeof v === \"function\";\n\n// ../utilities/core/src/object.ts\nfunction compact(obj) {\n if (!isPlainObject(obj) || obj === void 0) {\n return obj;\n }\n const keys = Reflect.ownKeys(obj).filter((key) => typeof key === \"string\");\n const filtered = {};\n for (const key of keys) {\n const value = obj[key];\n if (value !== void 0) {\n filtered[key] = compact(value);\n }\n }\n return filtered;\n}\nvar isPlainObject = (value) => {\n return value && typeof value === \"object\" && value.constructor === Object;\n};\n\n// ../utilities/core/src/warning.ts\nfunction warn(...a) {\n const m = a.length === 1 ? a[0] : a[1];\n const c = a.length === 2 ? a[0] : true;\n if (c && process.env.NODE_ENV !== \"production\") {\n console.warn(m);\n }\n}\nfunction invariant(...a) {\n const m = a.length === 1 ? a[0] : a[1];\n const c = a.length === 2 ? a[0] : true;\n if (c && process.env.NODE_ENV !== \"production\") {\n throw new Error(m);\n }\n}\n\n// src/deep-merge.ts\nfunction deepMerge(source, ...objects) {\n for (const obj of objects) {\n const target = compact(obj);\n for (const key in target) {\n if (isObject(obj[key])) {\n if (!source[key]) {\n source[key] = {};\n }\n deepMerge(source[key], obj[key]);\n } else {\n source[key] = obj[key];\n }\n }\n }\n return source;\n}\n\n// src/utils.ts\nimport { klona } from \"klona/full\";\nfunction structuredClone(v) {\n return klona(v);\n}\nfunction toEvent(event) {\n const obj = isString(event) ? { type: event } : event;\n return obj;\n}\nfunction toArray(value) {\n if (!value)\n return [];\n return isArray(value) ? value.slice() : [value];\n}\nfunction isGuardHelper(value) {\n return isObject(value) && value.predicate != null;\n}\n\n// src/guard-utils.ts\nvar Truthy = () => true;\nfunction exec(guardMap, ctx, event, meta) {\n return (guard) => {\n if (isString(guard)) {\n return !!guardMap[guard]?.(ctx, event, meta);\n }\n if (isFunction(guard)) {\n return guard(ctx, event, meta);\n }\n return guard.predicate(guardMap)(ctx, event, meta);\n };\n}\nfunction or(...conditions) {\n return {\n predicate: (guardMap) => (ctx, event, meta) => conditions.map(exec(guardMap, ctx, event, meta)).some(Boolean)\n };\n}\nfunction and(...conditions) {\n return {\n predicate: (guardMap) => (ctx, event, meta) => conditions.map(exec(guardMap, ctx, event, meta)).every(Boolean)\n };\n}\nfunction not(condition) {\n return {\n predicate: (guardMap) => (ctx, event, meta) => {\n return !exec(guardMap, ctx, event, meta)(condition);\n }\n };\n}\nfunction stateIn(...values) {\n return (_ctx, _evt, meta) => meta.state.matches(...values);\n}\nvar guards = { or, and, not, stateIn };\nfunction choose(actions) {\n return {\n predicate: (guardMap) => (ctx, event, meta) => actions.find((def) => {\n const guard = def.guard ?? Truthy;\n return exec(guardMap, ctx, event, meta)(guard);\n })?.actions\n };\n}\nfunction determineGuardFn(guard, guardMap) {\n guard = guard ?? Truthy;\n return (context, event, meta) => {\n if (isString(guard)) {\n const value = guardMap[guard];\n return isFunction(value) ? value(context, event, meta) : value;\n }\n if (isGuardHelper(guard)) {\n return guard.predicate(guardMap)(context, event, meta);\n }\n return guard?.(context, event, meta);\n };\n}\nfunction determineActionsFn(values, guardMap) {\n return (context, event, meta) => {\n if (isGuardHelper(values)) {\n return values.predicate(guardMap)(context, event, meta);\n }\n return values;\n };\n}\n\n// src/machine.ts\nimport { ref, snapshot, subscribe, subscribeKey } from \"@zag-js/store\";\n\n// src/create-proxy.ts\nimport { proxy, proxyWithComputed } from \"@zag-js/store\";\nfunction createProxy(config) {\n const computedContext = config.computed ?? cast({});\n const initialContext = config.context ?? cast({});\n const state = proxy({\n value: config.initial ?? \"\",\n previousValue: \"\",\n event: cast({}),\n previousEvent: cast({}),\n context: proxyWithComputed(initialContext, computedContext),\n done: false,\n tags: [],\n hasTag(tag) {\n return this.tags.includes(tag);\n },\n matches(...value) {\n return value.includes(this.value);\n },\n can(event) {\n return cast(this).nextEvents.includes(event);\n },\n get nextEvents() {\n const stateEvents = config.states?.[this.value]?.[\"on\"] ?? {};\n const globalEvents = config?.on ?? {};\n return Object.keys({ ...stateEvents, ...globalEvents });\n },\n get changed() {\n if (this.event.value === \"machine.init\" /* Init */ || !this.previousValue)\n return false;\n return this.value !== this.previousValue;\n }\n });\n return cast(state);\n}\n\n// src/delay-utils.ts\nfunction determineDelayFn(delay, delaysMap) {\n return (context, event) => {\n if (isNumber(delay))\n return delay;\n if (isFunction(delay)) {\n return delay(context, event);\n }\n if (isString(delay)) {\n const value = Number.parseFloat(delay);\n if (!Number.isNaN(value)) {\n return value;\n }\n if (delaysMap) {\n const valueOrFn = delaysMap?.[delay];\n invariant(\n valueOrFn == null,\n `[@zag-js/core > determine-delay] Cannot determine delay for \\`${delay}\\`. It doesn't exist in \\`options.delays\\``\n );\n return isFunction(valueOrFn) ? valueOrFn(context, event) : valueOrFn;\n }\n }\n };\n}\n\n// src/transition-utils.ts\nfunction toTarget(target) {\n return isString(target) ? { target } : target;\n}\nfunction determineTransitionFn(transitions, guardMap) {\n return (context, event, meta) => {\n return toArray(transitions).map(toTarget).find((transition) => {\n const determineGuard = determineGuardFn(transition.guard, guardMap);\n const guard = determineGuard(context, event, meta);\n return guard ?? transition.target ?? transition.actions;\n });\n };\n}\n\n// src/machine.ts\nvar Machine = class {\n // Let's get started!\n constructor(config, options) {\n __publicField(this, \"status\", \"Not Started\" /* NotStarted */);\n __publicField(this, \"state\");\n __publicField(this, \"initialState\");\n __publicField(this, \"initialContext\");\n __publicField(this, \"id\");\n __publicField(this, \"type\", \"machine\" /* Machine */);\n // Cleanup function map (per state)\n __publicField(this, \"activityEvents\", /* @__PURE__ */ new Map());\n __publicField(this, \"delayedEvents\", /* @__PURE__ */ new Map());\n // state update listeners the user can opt-in for\n __publicField(this, \"stateListeners\", /* @__PURE__ */ new Set());\n __publicField(this, \"contextListeners\", /* @__PURE__ */ new Set());\n __publicField(this, \"eventListeners\", /* @__PURE__ */ new Set());\n __publicField(this, \"doneListeners\", /* @__PURE__ */ new Set());\n __publicField(this, \"contextWatchers\", /* @__PURE__ */ new Set());\n // Cleanup functions (for `subscribe`)\n __publicField(this, \"removeStateListener\", noop);\n __publicField(this, \"removeEventListener\", noop);\n __publicField(this, \"removeContextListener\", noop);\n // For Parent <==> Spawned Actor relationship\n __publicField(this, \"parent\");\n __publicField(this, \"children\", /* @__PURE__ */ new Map());\n // A map of guard, action, delay implementations\n __publicField(this, \"guardMap\");\n __publicField(this, \"actionMap\");\n __publicField(this, \"delayMap\");\n __publicField(this, \"activityMap\");\n __publicField(this, \"sync\");\n __publicField(this, \"options\");\n __publicField(this, \"config\");\n // Starts the interpreted machine.\n __publicField(this, \"start\", (init) => {\n this.state.value = \"\";\n if (this.status === \"Running\" /* Running */) {\n return this;\n }\n this.status = \"Running\" /* Running */;\n this.removeStateListener = subscribe(\n this.state,\n () => {\n this.stateListeners.forEach((listener) => {\n listener(this.stateSnapshot);\n });\n },\n this.sync\n );\n this.removeEventListener = subscribeKey(\n this.state,\n \"event\",\n (event2) => {\n this.executeActions(this.config.onEvent, event2);\n this.eventListeners.forEach((listener) => {\n listener(event2);\n });\n },\n this.sync\n );\n this.removeContextListener = subscribe(\n this.state.context,\n () => {\n this.log(\"Context:\", this.contextSnapshot);\n this.contextListeners.forEach((listener) => {\n listener(this.contextSnapshot);\n });\n },\n this.sync || this.options.debug\n );\n this.setupContextWatchers();\n this.executeActivities(toEvent(\"machine.start\" /* Start */), toArray(this.config.activities), \"machine.start\" /* Start */);\n this.executeActions(this.config.entry, toEvent(\"machine.start\" /* Start */));\n const event = toEvent(\"machine.init\" /* Init */);\n const target = isObject(init) ? init.value : init;\n const context = isObject(init) ? init.context : void 0;\n if (context) {\n this.setContext(context);\n }\n const transition = {\n target: target ?? this.config.initial\n };\n const next = this.getNextStateInfo(transition, event);\n this.initialState = next;\n this.performStateChangeEffects(this.state.value, next, event);\n return this;\n });\n __publicField(this, \"setupContextWatchers\", () => {\n for (const [key, fn] of Object.entries(this.config.watch ?? {})) {\n const compareFn = this.options.compareFns?.[key];\n const cleanup = subscribeKey(\n this.state.context,\n key,\n () => {\n this.executeActions(fn, this.state.event);\n },\n this.sync,\n compareFn\n );\n this.contextWatchers.add(cleanup);\n }\n });\n // Stops the interpreted machine\n __publicField(this, \"stop\", () => {\n if (this.status === \"Stopped\" /* Stopped */)\n return;\n this.performExitEffects(this.state.value, toEvent(\"machine.stop\" /* Stop */));\n this.executeActions(this.config.exit, toEvent(\"machine.stop\" /* Stop */));\n this.setState(\"\");\n this.setEvent(\"machine.stop\" /* Stop */);\n this.stopStateListeners();\n this.stopChildren();\n this.stopActivities();\n this.stopDelayedEvents();\n this.stopContextWatchers();\n this.stopEventListeners();\n this.stopContextListeners();\n this.status = \"Stopped\" /* Stopped */;\n return this;\n });\n __publicField(this, \"stopEventListeners\", () => {\n this.eventListeners.clear();\n this.removeEventListener();\n });\n __publicField(this, \"stopContextListeners\", () => {\n this.contextListeners.clear();\n this.removeContextListener();\n });\n __publicField(this, \"stopStateListeners\", () => {\n this.removeStateListener();\n this.stateListeners.clear();\n });\n __publicField(this, \"stopContextWatchers\", () => {\n this.contextWatchers.forEach((fn) => fn());\n this.contextWatchers.clear();\n });\n __publicField(this, \"stopDelayedEvents\", () => {\n this.delayedEvents.forEach((state) => {\n state.forEach((stop) => stop());\n });\n this.delayedEvents.clear();\n });\n // Cleanup running activities (e.g `setInterval`, invoked callbacks, promises)\n __publicField(this, \"stopActivities\", (state) => {\n if (state) {\n this.activityEvents.get(state)?.forEach((stop) => stop());\n this.activityEvents.get(state)?.clear();\n this.activityEvents.delete(state);\n } else {\n this.activityEvents.forEach((state2) => {\n state2.forEach((stop) => stop());\n state2.clear();\n });\n this.activityEvents.clear();\n }\n });\n /**\n * Function to send event to spawned child machine or actor\n */\n __publicField(this, \"sendChild\", (evt, to) => {\n const event = toEvent(evt);\n const id = runIfFn(to, this.contextSnapshot);\n const child = this.children.get(id);\n if (!child) {\n invariant(`[@zag-js/core] Cannot send '${event.type}' event to unknown child`);\n }\n child.send(event);\n });\n /**\n * Function to stop a running child machine or actor\n */\n __publicField(this, \"stopChild\", (id) => {\n if (!this.children.has(id)) {\n invariant(`[@zag-js/core > stop-child] Cannot stop unknown child ${id}`);\n }\n this.children.get(id).stop();\n this.children.delete(id);\n });\n __publicField(this, \"removeChild\", (id) => {\n this.children.delete(id);\n });\n // Stop and delete spawned actors\n __publicField(this, \"stopChildren\", () => {\n this.children.forEach((child) => child.stop());\n this.children.clear();\n });\n __publicField(this, \"setParent\", (parent) => {\n this.parent = parent;\n });\n __publicField(this, \"spawn\", (src, id) => {\n const actor = runIfFn(src);\n if (id)\n actor.id = id;\n actor.type = \"machine.actor\" /* Actor */;\n actor.setParent(this);\n this.children.set(actor.id, cast(actor));\n actor.onDone(() => {\n this.removeChild(actor.id);\n }).start();\n return cast(ref(actor));\n });\n __publicField(this, \"stopActivity\", (key) => {\n if (!this.state.value)\n return;\n const cleanups = this.activityEvents.get(this.state.value);\n cleanups?.get(key)?.();\n cleanups?.delete(key);\n });\n __publicField(this, \"addActivityCleanup\", (state, key, cleanup) => {\n if (!state)\n return;\n if (!this.activityEvents.has(state)) {\n this.activityEvents.set(state, /* @__PURE__ */ new Map([[key, cleanup]]));\n } else {\n this.activityEvents.get(state)?.set(key, cleanup);\n }\n });\n __publicField(this, \"setState\", (target) => {\n this.state.previousValue = this.state.value;\n this.state.value = target;\n const stateNode = this.getStateNode(target);\n if (target == null) {\n clear(this.state.tags);\n } else {\n this.state.tags = toArray(stateNode?.tags);\n }\n });\n __publicField(this, \"transformContext\", (context) => {\n this.options?.transformContext?.(context);\n return context;\n });\n /**\n * To used within side effects for React or Vue to update context\n */\n __publicField(this, \"setContext\", (context) => {\n if (!context)\n return;\n const newContext = compact(this.transformContext(context));\n deepMerge(this.state.context, newContext);\n });\n __publicField(this, \"setOptions\", (options) => {\n const opts = compact(options);\n this.actionMap = { ...this.actionMap, ...opts.actions };\n this.delayMap = { ...this.delayMap, ...opts.delays };\n this.activityMap = { ...this.activityMap, ...opts.activities };\n this.guardMap = { ...this.guardMap, ...opts.guards };\n });\n __publicField(this, \"getStateNode\", (state) => {\n if (!state)\n return;\n return this.config.states?.[state];\n });\n __publicField(this, \"getNextStateInfo\", (transitions, event) => {\n const transition = this.determineTransition(transitions, event);\n const isTargetless = !transition?.target;\n const target = transition?.target ?? this.state.value;\n const changed = this.state.value !== target;\n const stateNode = this.getStateNode(target);\n const reenter = !isTargetless && !changed && !transition?.internal;\n const info = {\n reenter,\n transition,\n stateNode,\n target,\n changed\n };\n this.log(\"NextState:\", `[${event.type}]`, this.state.value, \"---->\", info.target);\n return info;\n });\n __publicField(this, \"getActionFromDelayedTransition\", (transition) => {\n const event = toEvent(\"machine.after\" /* After */);\n const determineDelay = determineDelayFn(transition.delay, this.delayMap);\n const delay = determineDelay(this.contextSnapshot, event);\n let id;\n return {\n entry: () => {\n id = globalThis.setTimeout(() => {\n const next = this.getNextStateInfo(transition, event);\n this.performStateChangeEffects(this.state.value, next, event);\n }, delay);\n },\n exit: () => {\n globalThis.clearTimeout(id);\n }\n };\n });\n /**\n * All `after` events leverage `setTimeout` and `clearTimeout`,\n * we invoke the `clearTimeout` on exit and `setTimeout` on entry.\n *\n * To achieve this, we split the `after` defintion into `entry` and `exit`\n * functions and append them to the state's `entry` and `exit` actions\n */\n __publicField(this, \"getDelayedEventActions\", (state) => {\n const stateNode = this.getStateNode(state);\n const event = toEvent(\"machine.after\" /* After */);\n if (!stateNode || !stateNode.after)\n return;\n const entries = [];\n const exits = [];\n if (isArray(stateNode.after)) {\n const transition = this.determineTransition(stateNode.after, event);\n if (!transition)\n return;\n const actions = this.getActionFromDelayedTransition(transition);\n entries.push(actions.entry);\n exits.push(actions.exit);\n } else if (isObject(stateNode.after)) {\n for (const delay in stateNode.after) {\n const transition = stateNode.after[delay];\n let resolvedTransition = {};\n if (isArray(transition)) {\n const picked = this.determineTransition(transition, event);\n if (picked)\n resolvedTransition = picked;\n } else if (isString(transition)) {\n resolvedTransition = { target: transition, delay };\n } else {\n resolvedTransition = { ...transition, delay };\n }\n const actions = this.getActionFromDelayedTransition(resolvedTransition);\n entries.push(actions.entry);\n exits.push(actions.exit);\n }\n }\n return { entries, exits };\n });\n /**\n * Function to executes defined actions. It can accept actions as string\n * (referencing `options.actions`) or actual functions.\n */\n __publicField(this, \"executeActions\", (actions, event) => {\n const pickedActions = determineActionsFn(actions, this.guardMap)(this.contextSnapshot, event, this.guardMeta);\n for (const action of toArray(pickedActions)) {\n const fn = isString(action) ? this.actionMap?.[action] : action;\n warn(\n isString(action) && !fn,\n `[@zag-js/core > execute-actions] No implementation found for action: \\`${action}\\``\n );\n fn?.(this.state.context, event, this.meta);\n }\n });\n /**\n * Function to execute running activities and registers\n * their cleanup function internally (to be called later on when we exit the state)\n */\n __publicField(this, \"executeActivities\", (event, activities, state) => {\n for (const activity of activities) {\n const fn = isString(activity) ? this.activityMap?.[activity] : activity;\n if (!fn) {\n warn(`[@zag-js/core > execute-activity] No implementation found for activity: \\`${activity}\\``);\n continue;\n }\n const cleanup = fn(this.state.context, event, this.meta);\n if (cleanup) {\n const key = isString(activity) ? activity : activity.name || uuid();\n this.addActivityCleanup(state ?? this.state.value, key, cleanup);\n }\n }\n });\n /**\n * Normalizes the `every` definition to transition. `every` can be:\n * - An array of possible actions to run (we need to pick the first match based on guard)\n * - An object of intervals and actions\n */\n __publicField(this, \"createEveryActivities\", (every, callbackfn) => {\n if (!every)\n return;\n const event = toEvent(\"machine.every\" /* Every */);\n if (isArray(every)) {\n const picked = toArray(every).find((transition) => {\n const delayOrFn = transition.delay;\n const determineDelay2 = determineDelayFn(delayOrFn, this.delayMap);\n const delay2 = determineDelay2(this.contextSnapshot, event);\n const determineGuard = determineGuardFn(transition.guard, this.guardMap);\n const guard = determineGuard(this.contextSnapshot, event, this.guardMeta);\n return guard ?? delay2 != null;\n });\n if (!picked)\n return;\n const determineDelay = determineDelayFn(picked.delay, this.delayMap);\n const delay = determineDelay(this.contextSnapshot, event);\n const activity = () => {\n const id = globalThis.setInterval(() => {\n this.executeActions(picked.actions, event);\n }, delay);\n return () => {\n globalThis.clearInterval(id);\n };\n };\n callbackfn(activity);\n } else {\n for (const interval in every) {\n const actions = every?.[interval];\n const determineDelay = determineDelayFn(interval, this.delayMap);\n const delay = determineDelay(this.contextSnapshot, event);\n const activity = () => {\n const id = globalThis.setInterval(() => {\n this.executeActions(actions, event);\n }, delay);\n return () => {\n globalThis.clearInterval(id);\n };\n };\n callbackfn(activity);\n }\n }\n });\n __publicField(this, \"setEvent\", (event) => {\n this.state.previousEvent = this.state.event;\n this.state.event = ref(toEvent(event));\n });\n __publicField(this, \"performExitEffects\", (current, event) => {\n const currentState = this.state.value;\n if (currentState === \"\")\n return;\n const stateNode = current ? this.getStateNode(current) : void 0;\n this.stopActivities(currentState);\n const _exit = determineActionsFn(stateNode?.exit, this.guardMap)(this.contextSnapshot, event, this.guardMeta);\n const exitActions = toArray(_exit);\n const afterExitActions = this.delayedEvents.get(currentState);\n if (afterExitActions) {\n exitActions.push(...afterExitActions);\n }\n this.executeActions(exitActions, event);\n this.eventListeners.clear();\n });\n __publicField(this, \"performEntryEffects\", (next, event) => {\n const stateNode = this.getStateNode(next);\n const activities = toArray(stateNode?.activities);\n this.createEveryActivities(stateNode?.every, (activity) => {\n activities.unshift(activity);\n });\n if (activities.length > 0) {\n this.executeActivities(event, activities);\n }\n const pickedActions = determineActionsFn(stateNode?.entry, this.guardMap)(\n this.contextSnapshot,\n event,\n this.guardMeta\n );\n const entryActions = toArray(pickedActions);\n const afterActions = this.getDelayedEventActions(next);\n if (stateNode?.after && afterActions) {\n this.delayedEvents.set(next, afterActions?.exits);\n entryActions.push(...afterActions.entries);\n }\n this.executeActions(entryActions, event);\n if (stateNode?.type === \"final\") {\n this.state.done = true;\n this.doneListeners.forEach((listener) => {\n listener(this.stateSnapshot);\n });\n this.stop();\n }\n });\n __publicField(this, \"performTransitionEffects\", (transitions, event) => {\n const transition = this.determineTransition(transitions, event);\n this.executeActions(transition?.actions, event);\n });\n /**\n * Performs all the requires side-effects or reactions when\n * we move from state A => state B.\n *\n * The Effect order:\n * Exit actions (current state) => Transition actions => Go to state => Entry actions (next state)\n */\n __publicField(this, \"performStateChangeEffects\", (current, next, event) => {\n this.setEvent(event);\n const changed = next.changed || next.reenter;\n if (changed) {\n this.performExitEffects(current, event);\n }\n this.performTransitionEffects(next.transition, event);\n this.setState(next.target);\n if (changed) {\n this.performEntryEffects(next.target, event);\n }\n });\n __publicField(this, \"determineTransition\", (transition, event) => {\n const fn = determineTransitionFn(transition, this.guardMap);\n return fn?.(this.contextSnapshot, event, this.guardMeta);\n });\n /**\n * Function to send event to parent machine from spawned child\n */\n __publicField(this, \"sendParent\", (evt) => {\n if (!this.parent) {\n invariant(\"[@zag-js/core > send-parent] Cannot send event to an unknown parent\");\n }\n const event = toEvent(evt);\n this.parent?.send(event);\n });\n __publicField(this, \"log\", (...args) => {\n if (isDev() && this.options.debug) {\n console.log(...args);\n }\n });\n /**\n * Function to send an event to current machine\n */\n __publicField(this, \"send\", (evt) => {\n const event = toEvent(evt);\n this.transition(this.state.value, event);\n });\n __publicField(this, \"transition\", (state, evt) => {\n const stateNode = isString(state) ? this.getStateNode(state) : state?.stateNode;\n const event = toEvent(evt);\n if (!stateNode && !this.config.on) {\n const msg = this.status === \"Stopped\" /* Stopped */ ? \"[@zag-js/core > transition] Cannot transition a stopped machine\" : `[@zag-js/core > transition] State does not have a definition for \\`state\\`: ${state}, \\`event\\`: ${event.type}`;\n warn(msg);\n return;\n }\n const transitions = stateNode?.on?.[event.type] ?? this.config.on?.[event.type];\n const next = this.getNextStateInfo(transitions, event);\n this.performStateChangeEffects(this.state.value, next, event);\n return next.stateNode;\n });\n __publicField(this, \"subscribe\", (listener) => {\n this.stateListeners.add(listener);\n if (this.status === \"Running\" /* Running */) {\n listener(this.stateSnapshot);\n }\n return () => {\n this.stateListeners.delete(listener);\n };\n });\n __publicField(this, \"onDone\", (listener) => {\n this.doneListeners.add(listener);\n return this;\n });\n __publicField(this, \"onTransition\", (listener) => {\n this.stateListeners.add(listener);\n if (this.status === \"Running\" /* Running */) {\n listener(this.stateSnapshot);\n }\n return this;\n });\n __publicField(this, \"onChange\", (listener) => {\n this.contextListeners.add(listener);\n return this;\n });\n __publicField(this, \"onEvent\", (listener) => {\n this.eventListeners.add(listener);\n return this;\n });\n this.config = structuredClone(config);\n this.options = structuredClone(options ?? {});\n this.id = this.config.id ?? `machine-${uuid()}`;\n this.guardMap = this.options?.guards ?? {};\n this.actionMap = this.options?.actions ?? {};\n this.delayMap = this.options?.delays ?? {};\n this.activityMap = this.options?.activities ?? {};\n this.sync = this.options?.sync ?? false;\n this.state = createProxy(this.config);\n this.initialContext = snapshot(this.state.context);\n this.transformContext(this.state.context);\n const event = toEvent(\"machine.created\" /* Created */);\n this.executeActions(this.config?.created, event);\n }\n // immutable state value\n get stateSnapshot() {\n return cast(snapshot(this.state));\n }\n getState() {\n return this.stateSnapshot;\n }\n // immutable context value\n get contextSnapshot() {\n return this.stateSnapshot.context;\n }\n /**\n * A reference to the instance methods of the machine.\n * Useful when spawning child machines and managing the communication between them.\n */\n get self() {\n const self = this;\n return {\n id: this.id,\n send: this.send.bind(this),\n sendParent: this.sendParent.bind(this),\n sendChild: this.sendChild.bind(this),\n stop: this.stop.bind(this),\n stopChild: this.stopChild.bind(this),\n spawn: this.spawn.bind(this),\n stopActivity: this.stopActivity.bind(this),\n get state() {\n return self.stateSnapshot;\n },\n get initialContext() {\n return self.initialContext;\n },\n get initialState() {\n return self.initialState?.target ?? \"\";\n }\n };\n }\n get meta() {\n return {\n state: this.stateSnapshot,\n guards: this.guardMap,\n send: this.send.bind(this),\n self: this.self,\n initialContext: this.initialContext,\n initialState: this.initialState?.target ?? \"\",\n getState: () => this.stateSnapshot,\n getAction: (key) => this.actionMap[key],\n getGuard: (key) => this.guardMap[key]\n };\n }\n get guardMeta() {\n return {\n state: this.stateSnapshot\n };\n }\n get [Symbol.toStringTag]() {\n return \"Machine\";\n }\n};\nvar createMachine = (config, options) => new Machine(config, options);\n\n// src/merge-props.ts\nvar clsx = (...args) => args.map((str) => str?.trim?.()).filter(Boolean).join(\" \");\nvar eventRegex = /^on[A-Z]/;\nfunction mergeProps(...args) {\n let result = {};\n for (let props of args) {\n for (let key in result) {\n if (eventRegex.test(key) && typeof result[key] === \"function\" && typeof props[key] === \"function\") {\n result[key] = callAll(result[key], props[key]);\n continue;\n }\n if (key === \"className\" || key === \"class\") {\n result[key] = clsx(result[key], props[key]);\n continue;\n }\n if (key === \"style\") {\n result[key] = Object.assign({}, result[key] ?? {}, props[key] ?? {});\n continue;\n }\n result[key] = props[key] !== void 0 ? props[key] : result[key];\n }\n for (let key in props) {\n if (result[key] === void 0) {\n result[key] = props[key];\n }\n }\n }\n return result;\n}\nexport {\n Machine,\n choose,\n createMachine,\n deepMerge,\n guards,\n mergeProps,\n proxy2 as proxy,\n ref2 as ref,\n snapshot2 as snapshot,\n subscribe2 as subscribe\n};\n//# sourceMappingURL=index.mjs.map","// src/array.ts\nfunction toArray(v) {\n if (!v)\n return [];\n return Array.isArray(v) ? v : [v];\n}\nvar fromLength = (length) => Array.from(Array(length).keys());\nvar first = (v) => v[0];\nvar last = (v) => v[v.length - 1];\nvar isEmpty = (v) => v.length === 0;\nvar has = (v, t) => v.indexOf(t) !== -1;\nvar add = (v, ...items) => v.concat(items);\nvar remove = (v, item) => v.filter((t) => t !== item);\nvar removeAt = (v, i) => v.filter((_, idx) => idx !== i);\nvar addOrRemove = (v, item) => {\n if (has(v, item))\n return remove(v, item);\n return add(v, item);\n};\nfunction clear(v) {\n while (v.length > 0)\n v.pop();\n return v;\n}\nfunction nextIndex(v, idx, opts = {}) {\n const { step = 1, loop = true } = opts;\n const next2 = idx + step;\n const len = v.length;\n const last2 = len - 1;\n if (idx === -1)\n return step > 0 ? 0 : last2;\n if (next2 < 0)\n return loop ? last2 : 0;\n if (next2 >= len)\n return loop ? 0 : idx > len ? len : idx;\n return next2;\n}\nfunction next(v, idx, opts = {}) {\n return v[nextIndex(v, idx, opts)];\n}\nfunction prevIndex(v, idx, opts = {}) {\n const { step = 1, loop = true } = opts;\n return nextIndex(v, idx, { step: -step, loop });\n}\nfunction prev(v, index, opts = {}) {\n return v[prevIndex(v, index, opts)];\n}\nvar chunk = (v, size) => {\n const res = [];\n return v.reduce((rows, value, index) => {\n if (index % size === 0)\n rows.push([value]);\n else\n last(rows)?.push(value);\n return rows;\n }, res);\n};\n\n// src/equal.ts\nvar isArrayLike = (value) => value?.constructor.name === \"Array\";\nvar isEqual = (a, b) => {\n if (Object.is(a, b))\n return true;\n if (a == null && b != null || a != null && b == null)\n return false;\n if (typeof a?.isEqual === \"function\" && typeof b?.isEqual === \"function\") {\n return a.isEqual(b);\n }\n if (typeof a === \"function\" && typeof b === \"function\") {\n return a.toString() === b.toString();\n }\n if (isArrayLike(a) && isArrayLike(b)) {\n return Array.from(a).toString() === Array.from(b).toString();\n }\n if (!(typeof a === \"object\") || !(typeof b === \"object\"))\n return false;\n const keys = Object.keys(b ?? /* @__PURE__ */ Object.create(null));\n const length = keys.length;\n for (let i = 0; i < length; i++) {\n const hasKey = Reflect.has(a, keys[i]);\n if (!hasKey)\n return false;\n }\n for (let i = 0; i < length; i++) {\n const key = keys[i];\n if (!isEqual(a[key], b[key]))\n return false;\n }\n return true;\n};\n\n// src/functions.ts\nvar runIfFn = (v, ...a) => {\n const res = typeof v === \"function\" ? v(...a) : v;\n return res ?? void 0;\n};\nvar cast = (v) => v;\nvar noop = () => {\n};\nvar callAll = (...fns) => (...a) => {\n fns.forEach(function(fn) {\n fn?.(...a);\n });\n};\nvar uuid = /* @__PURE__ */ (() => {\n let id = 0;\n return () => {\n id++;\n return id.toString(36);\n };\n})();\nfunction match(key, record, ...args) {\n if (key in record) {\n const fn = record[key];\n return typeof fn === \"function\" ? fn(...args) : fn;\n }\n const error = new Error(`No matching key: ${JSON.stringify(key)} in ${JSON.stringify(Object.keys(record))}`);\n Error.captureStackTrace?.(error, match);\n throw error;\n}\nvar tryCatch = (fn, fallback) => {\n try {\n return fn();\n } catch (error) {\n if (error instanceof Error) {\n Error.captureStackTrace?.(error, tryCatch);\n }\n return fallback?.();\n }\n};\n\n// src/guard.ts\nvar isDev = () => process.env.NODE_ENV !== \"production\";\nvar isArray = (v) => Array.isArray(v);\nvar isBoolean = (v) => v === true || v === false;\nvar isObject = (v) => !(v == null || typeof v !== \"object\" || isArray(v));\nvar isNumber = (v) => typeof v === \"number\" && !Number.isNaN(v);\nvar isString = (v) => typeof v === \"string\";\nvar isFunction = (v) => typeof v === \"function\";\nvar isNull = (v) => v == null;\nvar hasProp = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\n\n// src/object.ts\nfunction compact(obj) {\n if (!isPlainObject(obj) || obj === void 0) {\n return obj;\n }\n const keys = Reflect.ownKeys(obj).filter((key) => typeof key === \"string\");\n const filtered = {};\n for (const key of keys) {\n const value = obj[key];\n if (value !== void 0) {\n filtered[key] = compact(value);\n }\n }\n return filtered;\n}\nfunction json(value) {\n return JSON.parse(JSON.stringify(value));\n}\nvar isPlainObject = (value) => {\n return value && typeof value === \"object\" && value.constructor === Object;\n};\n\n// src/warning.ts\nfunction warn(...a) {\n const m = a.length === 1 ? a[0] : a[1];\n const c = a.length === 2 ? a[0] : true;\n if (c && process.env.NODE_ENV !== \"production\") {\n console.warn(m);\n }\n}\nfunction invariant(...a) {\n const m = a.length === 1 ? a[0] : a[1];\n const c = a.length === 2 ? a[0] : true;\n if (c && process.env.NODE_ENV !== \"production\") {\n throw new Error(m);\n }\n}\nexport {\n add,\n addOrRemove,\n callAll,\n cast,\n chunk,\n clear,\n compact,\n first,\n fromLength,\n has,\n hasProp,\n invariant,\n isArray,\n isBoolean,\n isDev,\n isEmpty,\n isEqual,\n isFunction,\n isNull,\n isNumber,\n isObject,\n isString,\n json,\n last,\n match,\n next,\n nextIndex,\n noop,\n prev,\n prevIndex,\n remove,\n removeAt,\n runIfFn,\n toArray,\n tryCatch,\n uuid,\n warn\n};\n//# sourceMappingURL=index.mjs.map","// src/progress.anatomy.ts\nimport { createAnatomy } from \"@zag-js/anatomy\";\nvar anatomy = createAnatomy(\"progress\").parts(\n \"root\",\n \"label\",\n \"track\",\n \"range\",\n \"valueText\",\n \"view\",\n \"circle\",\n \"circleTrack\",\n \"circleRange\"\n);\nvar parts = anatomy.build();\n\n// src/progress.dom.ts\nimport { createScope } from \"@zag-js/dom-query\";\nvar dom = createScope({\n getRootId: (ctx) => `progress-${ctx.id}`,\n getTrackId: (ctx) => `progress-${ctx.id}-track`,\n getLabelId: (ctx) => `progress-${ctx.id}-label`,\n getCircleId: (ctx) => `progress-${ctx.id}-circle`\n});\n\n// src/progress.connect.ts\nfunction connect(state, send, normalize) {\n const percent = state.context.percent;\n const max = state.context.max;\n const min = state.context.min;\n const orientation = state.context.orientation;\n const translations = state.context.translations;\n const indeterminate = state.context.isIndeterminate;\n const value = state.context.value;\n const valueAsString = translations.value({ value, max, percent, min });\n const progressState = getProgressState(value, max);\n const progressbarProps = {\n role: \"progressbar\",\n \"aria-label\": valueAsString,\n \"data-max\": max,\n \"aria-valuemin\": min,\n \"aria-valuemax\": max,\n \"aria-valuenow\": value ?? void 0,\n \"data-orientation\": orientation,\n \"data-state\": progressState\n };\n const circleProps = getCircleProps(state.context);\n return {\n value,\n valueAsString,\n setValue(value2) {\n send({ type: \"VALUE.SET\", value: value2 });\n },\n setToMax() {\n send({ type: \"VALUE.SET\", value: max });\n },\n rootProps: normalize.element({\n dir: state.context.dir,\n ...parts.root.attrs,\n id: dom.getRootId(state.context),\n \"data-max\": max,\n \"data-value\": value ?? void 0,\n \"data-state\": progressState,\n \"data-orientation\": orientation,\n style: {\n \"--percent\": indeterminate ? void 0 : percent\n }\n }),\n labelProps: normalize.element({\n dir: state.context.dir,\n id: dom.getLabelId(state.context),\n ...parts.label.attrs,\n \"data-orientation\": orientation\n }),\n valueTextProps: normalize.element({\n dir: state.context.dir,\n \"aria-live\": \"polite\",\n ...parts.valueText.attrs\n }),\n trackProps: normalize.element({\n dir: state.context.dir,\n id: dom.getTrackId(state.context),\n ...parts.track.attrs,\n ...progressbarProps\n }),\n rangeProps: normalize.element({\n dir: state.context.dir,\n ...parts.range.attrs,\n \"data-orientation\": orientation,\n \"data-state\": progressState,\n style: {\n [state.context.isHorizontal ? \"width\" : \"height\"]: indeterminate ? void 0 : `${percent}%`\n }\n }),\n circleProps: normalize.element({\n dir: state.context.dir,\n id: dom.getCircleId(state.context),\n ...parts.circle.attrs,\n ...progressbarProps,\n ...circleProps.root\n }),\n circleTrackProps: normalize.element({\n dir: state.context.dir,\n \"data-orientation\": orientation,\n ...parts.circleTrack.attrs,\n ...circleProps.track\n }),\n circleRangeProps: normalize.element({\n dir: state.context.dir,\n ...parts.circleRange.attrs,\n ...circleProps.range,\n \"data-state\": progressState\n }),\n getViewProps(props) {\n return normalize.element({\n dir: state.context.dir,\n ...parts.view.attrs,\n \"data-state\": props.state,\n hidden: props.state !== progressState\n });\n }\n };\n}\nfunction getProgressState(value, maxValue) {\n return value == null ? \"indeterminate\" : value === maxValue ? \"complete\" : \"loading\";\n}\nfunction getCircleProps(ctx) {\n const determinant = ctx.isIndeterminate ? void 0 : ctx.percent * 2.64;\n const circleProps = {\n style: {\n cx: \"50px\",\n cy: \"50px\",\n r: \"42px\",\n fill: \"transparent\",\n strokeWidth: \"var(--thickness)\"\n }\n };\n return {\n root: {\n viewBox: \"0 0 100 100\",\n style: {\n width: \"var(--size)\",\n height: \"var(--size)\"\n }\n },\n track: circleProps,\n range: {\n style: {\n ...circleProps.style,\n strokeDashoffset: \"66px\",\n strokeDasharray: determinant != null ? `${determinant} ${264 - determinant}` : void 0\n }\n }\n };\n}\n\n// src/progress.machine.ts\nimport { createMachine } from \"@zag-js/core\";\nimport { compact, isNumber } from \"@zag-js/utils\";\nfunction machine(userContext) {\n const ctx = compact(userContext);\n return createMachine(\n {\n id: \"progress\",\n initial: \"idle\",\n context: {\n value: 50,\n max: 100,\n min: 0,\n orientation: \"horizontal\",\n translations: {\n value: ({ percent }) => percent === -1 ? \"loading...\" : `${percent} percent`,\n ...ctx.translations\n },\n ...ctx\n },\n created: [\"validateContext\"],\n computed: {\n isIndeterminate: (ctx2) => ctx2.value === null,\n percent(ctx2) {\n if (!isNumber(ctx2.value))\n return -1;\n return Math.round((ctx2.value - ctx2.min) / (ctx2.max - ctx2.min) * 100);\n },\n isAtMax: (ctx2) => ctx2.value === ctx2.max,\n isHorizontal: (ctx2) => ctx2.orientation === \"horizontal\",\n isRtl: (ctx2) => ctx2.dir === \"rtl\"\n },\n states: {\n idle: {\n on: {\n \"VALUE.SET\": {\n actions: [\"setValue\"]\n }\n }\n }\n }\n },\n {\n guards: {},\n actions: {\n setValue: (ctx2, evt) => {\n ctx2.value = evt.value === null ? null : Math.max(0, Math.min(evt.value, ctx2.max));\n },\n validateContext: (ctx2) => {\n if (!isValidMaxNumber(ctx2.max)) {\n throw new Error(`[Progress] Invalid max value: ${ctx2.max}`);\n }\n if (!isValidValueNumber(ctx2.value, ctx2.max)) {\n throw new Error(`[Progress] Invalid value: ${ctx2.value}`);\n }\n }\n }\n }\n );\n}\nfunction isValidMaxNumber(max) {\n return isNumber(max) && !isNaN(max) && max > 0;\n}\nfunction isValidValueNumber(value, max) {\n return isNumber(value) && !isNaN(value) && value <= max && value >= 0;\n}\nexport {\n anatomy,\n connect,\n machine\n};\n//# sourceMappingURL=index.mjs.map","// src/prop-types.ts\nfunction createNormalizer(fn) {\n return new Proxy({}, {\n get() {\n return fn;\n }\n });\n}\nexport {\n createNormalizer\n};\n//# sourceMappingURL=index.mjs.map","\"use client\"\n\n// src/index.ts\nimport { mergeProps } from \"@zag-js/core\";\n\n// src/normalize-props.ts\nimport { createNormalizer } from \"@zag-js/types\";\nvar normalizeProps = createNormalizer((v) => v);\n\n// src/portal.tsx\nimport { Children, useReducer } from \"react\";\nimport { createPortal } from \"react-dom\";\n\n// src/use-layout-effect.ts\nimport { useEffect, useLayoutEffect } from \"react\";\nvar useSafeLayoutEffect = typeof document !== \"undefined\" ? useLayoutEffect : useEffect;\n\n// src/portal.tsx\nimport { Fragment, jsx } from \"react/jsx-runtime\";\nvar Portal = (props) => {\n const { children, container, disabled, getRootNode } = props;\n const [, forceUpdate] = useReducer((c) => c + 1, 0);\n useSafeLayoutEffect(() => {\n forceUpdate();\n }, []);\n const isServer = typeof window === \"undefined\";\n if (isServer || disabled)\n return /* @__PURE__ */ jsx(Fragment, { children });\n const doc = getRootNode?.().ownerDocument ?? document;\n const mountNode = container?.current ?? doc.body;\n return /* @__PURE__ */ jsx(Fragment, { children: Children.map(children, (child) => createPortal(child, mountNode)) });\n};\n\n// src/use-snapshot.ts\nimport { snapshot, subscribe } from \"@zag-js/store\";\n\n// ../../utilities/core/src/equal.ts\nvar isArrayLike = (value) => value?.constructor.name === \"Array\";\nvar isEqual = (a, b) => {\n if (Object.is(a, b))\n return true;\n if (a == null && b != null || a != null && b == null)\n return false;\n if (typeof a?.isEqual === \"function\" && typeof b?.isEqual === \"function\") {\n return a.isEqual(b);\n }\n if (typeof a === \"function\" && typeof b === \"function\") {\n return a.toString() === b.toString();\n }\n if (isArrayLike(a) && isArrayLike(b)) {\n return Array.from(a).toString() === Array.from(b).toString();\n }\n if (!(typeof a === \"object\") || !(typeof b === \"object\"))\n return false;\n const keys = Object.keys(b ?? /* @__PURE__ */ Object.create(null));\n const length = keys.length;\n for (let i = 0; i < length; i++) {\n const hasKey = Reflect.has(a, keys[i]);\n if (!hasKey)\n return false;\n }\n for (let i = 0; i < length; i++) {\n const key = keys[i];\n if (!isEqual(a[key], b[key]))\n return false;\n }\n return true;\n};\n\n// ../../utilities/core/src/object.ts\nfunction compact(obj) {\n if (!isPlainObject(obj) || obj === void 0) {\n return obj;\n }\n const keys = Reflect.ownKeys(obj).filter((key) => typeof key === \"string\");\n const filtered = {};\n for (const key of keys) {\n const value = obj[key];\n if (value !== void 0) {\n filtered[key] = compact(value);\n }\n }\n return filtered;\n}\nvar isPlainObject = (value) => {\n return value && typeof value === \"object\" && value.constructor === Object;\n};\n\n// src/use-snapshot.ts\nimport { createProxy as createProxyToCompare, isChanged } from \"proxy-compare\";\nimport ReactExport, { useCallback, useEffect as useEffect4, useMemo, useRef as useRef3, useSyncExternalStore } from \"react\";\n\n// src/use-previous.ts\nimport { useEffect as useEffect2, useRef } from \"react\";\nfunction usePrevious(value) {\n const ref = useRef();\n useEffect2(() => {\n ref.current = value;\n });\n return ref.current;\n}\n\n// src/use-update-effect.ts\nimport { useEffect as useEffect3, useRef as useRef2 } from \"react\";\nfunction useUpdateEffect(callback, deps) {\n const render = useRef2(false);\n const effect = useRef2(false);\n useEffect3(() => {\n const mounted = render.current;\n const run = mounted && effect.current;\n if (run) {\n return callback();\n }\n effect.current = true;\n }, deps);\n useEffect3(() => {\n render.current = true;\n return () => {\n render.current = false;\n };\n }, []);\n}\n\n// src/use-snapshot.ts\nvar { use } = ReactExport;\nvar targetCache = /* @__PURE__ */ new WeakMap();\nfunction useSnapshot(service, options) {\n const { actions, context, sync: notifyInSync } = options ?? {};\n const lastSnapshot = useRef3();\n const lastAffected = useRef3();\n const currSnapshot = useSyncExternalStore(\n useCallback((callback) => subscribe(service.state, callback, notifyInSync), [notifyInSync]),\n () => {\n const nextSnapshot = snapshot(service.state, use);\n try {\n if (lastSnapshot.current && lastAffected.current && !isChanged(lastSnapshot.current, nextSnapshot, lastAffected.current, /* @__PURE__ */ new WeakMap())) {\n return lastSnapshot.current;\n }\n } catch (e) {\n }\n return nextSnapshot;\n },\n () => snapshot(service.state, use)\n );\n service.setOptions({ actions });\n const previousCtx = usePrevious(context);\n const ctx = useMemo(() => compact(context ?? {}), [context]);\n useUpdateEffect(() => {\n const entries = Object.entries(ctx);\n const equality = entries.map(([key, value]) => ({\n key,\n curr: value,\n prev: previousCtx?.[key],\n equal: isEqual(previousCtx?.[key], value)\n }));\n const allEqual = equality.every(({ equal }) => equal);\n if (!allEqual) {\n service.setContext(ctx);\n }\n }, [ctx]);\n const currAffected = /* @__PURE__ */ new WeakMap();\n useEffect4(() => {\n lastSnapshot.current = currSnapshot;\n lastAffected.current = currAffected;\n });\n const proxyCache = useMemo(() => /* @__PURE__ */ new WeakMap(), []);\n return createProxyToCompare(currSnapshot, currAffected, proxyCache, targetCache);\n}\n\n// src/use-actor.ts\nfunction useActor(service) {\n const state = useSnapshot(service);\n return [state, service.send];\n}\n\n// src/use-constant.ts\nimport { useRef as useRef4 } from \"react\";\nfunction useConstant(fn) {\n const ref = useRef4();\n if (!ref.current)\n ref.current = { v: fn() };\n return ref.current.v;\n}\n\n// src/use-service.ts\nfunction useService(machine, options) {\n const { state: hydratedState, context } = options ?? {};\n const service = useConstant(() => {\n const instance = typeof machine === \"function\" ? machine() : machine;\n if (context)\n instance.setContext(context);\n return instance;\n });\n useSafeLayoutEffect(() => {\n service.start(hydratedState);\n return () => {\n service.stop();\n };\n }, []);\n return service;\n}\n\n// src/use-machine.ts\nfunction useMachine(machine, options) {\n const service = useService(machine, options);\n const state = useSnapshot(service, options);\n return [state, service.send, service];\n}\nexport {\n Portal,\n mergeProps,\n normalizeProps,\n useActor,\n useMachine\n};\n//# sourceMappingURL=index.mjs.map","import * as progress from '@zag-js/progress';\nimport { normalizeProps, useMachine } from '@zag-js/react';\nimport { useId } from 'react';\n\ninterface ProgressProps {\n isIntermediate?: boolean;\n value?: number;\n label?: string;\n}\n\nexport const Progress = ({\n isIntermediate = false,\n value = 0,\n label,\n}: ProgressProps) => {\n const [state, send] = useMachine(progress.machine({ id: useId() }), {\n context: { value: isIntermediate ? null : value },\n });\n\n const api = progress.connect(state, send, normalizeProps);\n\n return (\n
\n {label ?
{label}
: null}\n
\n \n
\n
\n );\n};\n","import React from 'react';\n\ninterface EmptyViewProps {\n title: string;\n description: string;\n actions?: React.ReactNode;\n}\n\nconst EmptyView = ({ title, description, actions }: EmptyViewProps) => {\n return (\n
\n

{title}

\n

\n {description}\n

\n {actions}\n
\n );\n};\n\nexport default EmptyView;\n","import React from 'react';\n\nexport const PageLayout = ({ children }: React.PropsWithChildren) => {\n return (\n
\n
{children}
\n
\n );\n};\n\nexport default PageLayout;\n"],"names":["QueryObserver","_Subscribable","_inheritsLoose","client","options","_this","_proto","shouldFetchOnMount","shouldFetchOn","notifyOptions","prevOptions","prevQuery","mounted","shouldFetchOptionally","nextRefetchInterval","defaultedOptions","query","result","_this2","trackedResult","trackProp","key","_this3","resolve","reject","unsubscribe","_extends","_this4","fetchOptions","_this5","promise","noop","_this6","isServer","isValidTimeout","time","timeUntilStale","timeout","_this$options$refetch","nextInterval","_this7","focusManager","prevResult","prevResultState","prevResultOptions","queryChange","queryInitialState","prevQueryResult","state","dataUpdatedAt","error","errorUpdatedAt","isFetching","status","isPreviousData","isPlaceholderData","data","fetchOnMount","fetchOptionally","replaceEqualDeep","selectError","getLogger","placeholderData","isStale","_this$options","notifyOnChangeProps","notifyOnChangePropsExclusions","includedProps","typedKey","changed","isIncluded","x","isExcluded","shallowEqualObjects","defaultNotifyOptions","action","isCancelledError","_this8","notifyManager","listener","Subscribable","shouldLoadOnMount","field","value","createValue","_isReset","QueryErrorResetBoundaryContext","React","useQueryErrorResetBoundary","shouldThrowError","suspense","_useErrorBoundary","params","useBaseQuery","Observer","mountedRef","_React$useState","forceUpdate","queryClient","useQueryClient","errorResetBoundary","_React$useState2","observer","_ref","useQuery","arg1","arg2","arg3","parsedOptions","parseQueryArgs","api","url","response","toDate","argument","argStr","minutesInMonth","minutesInDay","defaultOptions","getDefaultOptions","getTimezoneOffsetInMilliseconds","date","_date","utcDate","compareAsc","dateLeft","dateRight","_dateLeft","_dateRight","diff","differenceInCalendarMonths","yearDiff","monthDiff","getRoundingMethod","method","number","differenceInMilliseconds","endOfDay","endOfMonth","month","isLastDayOfMonth","differenceInMonths","sign","difference","isLastMonthNotFull","differenceInSeconds","formatDistanceLocale","formatDistance","token","count","tokenValue","buildFormatLongFn","args","width","dateFormats","timeFormats","dateTimeFormats","formatLong","formatRelativeLocale","formatRelative","_baseDate","_options","buildLocalizeFn","context","valuesArray","defaultWidth","index","eraValues","quarterValues","monthValues","dayValues","dayPeriodValues","formattingDayPeriodValues","ordinalNumber","dirtyNumber","rem100","localize","quarter","buildMatchFn","string","matchPattern","matchResult","matchedString","parsePatterns","findIndex","pattern","findKey","rest","object","predicate","array","buildMatchPatternFn","parseResult","matchOrdinalNumberPattern","parseOrdinalNumberPattern","matchEraPatterns","parseEraPatterns","matchQuarterPatterns","parseQuarterPatterns","matchMonthPatterns","parseMonthPatterns","matchDayPatterns","parseDayPatterns","matchDayPeriodPatterns","parseDayPeriodPatterns","match","enUS","baseDate","locale","defaultLocale","minutesInAlmostTwoDays","comparison","localizeOptions","seconds","offsetInSeconds","minutes","months","hours","days","nearestMonth","monthsSinceStartOfYear","years","timeAgo","input","createAnatomy","name","parts","values","isEmpty","newName","prev","part","toKebabCase","v","dataAttr","guard","getDocument","node","createScope","methods","screen","ctx","_a","elem","id","valueAsString","e","t","r","n","o","s","c","l","f","i","u","a","p","g","y","h","w","isObject","proxyStateMap","refSet","buildProxyFunction","objectIs","newProxy","target","handler","canProxy","defaultHandlePromise","snapCache","createSnapshot","version","handlePromise","cache","snap","markToTrack","snapshot","proxyCache","versionHolder","proxyFunction2","initialObject","found","listeners","notifyUpdate","op","nextVersion","checkVersion","ensureVersion","nextCheckVersion","propProxyStates","propProxyState","propVersion","createPropListener","prop","newOp","addPropListener","remove","removePropListener","entry","addListener","prevRemove","baseObject","proxyObject","prevValue","deleted","receiver","hasPrevValue","getUntracked","nextValue","proxy","childProxyState","proxyState","desc","proxyFunction","subscribe","callback","notifyInSync","ops","isListenerActive","removeListener","ref","obj","proxyWithComputed","computedFns","computedFn","get","set","newValue","defaultCompareFn","next","subscribeKey","fn","sync","compareFn","isEqual","onSnapshotChange","val","klona","k","list","tmp","str","__defProp","__defNormalProp","__publicField","clear","runIfFn","cast","uuid","isArray","isNumber","isString","isFunction","compact","isPlainObject","keys","filtered","warn","m","invariant","deepMerge","source","objects","structuredClone","toEvent","event","toArray","isGuardHelper","Truthy","determineGuardFn","guardMap","meta","determineActionsFn","createProxy","config","computedContext","initialContext","tag","stateEvents","_b","globalEvents","determineDelayFn","delay","delaysMap","valueOrFn","toTarget","determineTransitionFn","transitions","transition","Machine","init","event2","cleanup","stop","state2","evt","to","child","parent","src","actor","cleanups","stateNode","newContext","opts","isTargetless","info","entries","exits","actions","resolvedTransition","picked","pickedActions","activities","activity","every","callbackfn","delayOrFn","delay2","interval","current","currentState","_exit","exitActions","afterExitActions","entryActions","afterActions","msg","_c","_d","_e","_f","self","createMachine","isArrayLike","b","length","anatomy","dom","connect","send","normalize","percent","max","min","orientation","translations","indeterminate","progressState","getProgressState","progressbarProps","circleProps","getCircleProps","value2","props","maxValue","determinant","machine","userContext","ctx2","isValidMaxNumber","isValidValueNumber","createNormalizer","normalizeProps","useSafeLayoutEffect","useLayoutEffect","useEffect","usePrevious","useRef","useEffect2","useUpdateEffect","deps","render","useRef2","effect","useEffect3","use","ReactExport","targetCache","useSnapshot","service","lastSnapshot","useRef3","lastAffected","currSnapshot","useSyncExternalStore","useCallback","nextSnapshot","isChanged","previousCtx","useMemo","equal","currAffected","useEffect4","createProxyToCompare","useConstant","useRef4","useService","hydratedState","instance","useMachine","Progress","isIntermediate","label","progress.machine","useId","progress.connect","jsxs","jsx","EmptyView","title","description","PageLayout","children"],"mappings":"wKAQO,IAAIA,GAA6B,SAAUC,EAAe,CAC/DC,GAAeF,EAAeC,CAAa,EAE3C,SAASD,EAAcG,EAAQC,EAAS,CACtC,IAAIC,EAEJ,OAAAA,EAAQJ,EAAc,KAAK,IAAI,GAAK,KACpCI,EAAM,OAASF,EACfE,EAAM,QAAUD,EAChBC,EAAM,aAAe,GACrBA,EAAM,YAAc,KAEpBA,EAAM,YAAW,EAEjBA,EAAM,WAAWD,CAAO,EAEjBC,CACR,CAED,IAAIC,EAASN,EAAc,UAE3B,OAAAM,EAAO,YAAc,UAAuB,CAC1C,KAAK,OAAS,KAAK,OAAO,KAAK,IAAI,EACnC,KAAK,QAAU,KAAK,QAAQ,KAAK,IAAI,CACzC,EAEEA,EAAO,YAAc,UAAuB,CACtC,KAAK,UAAU,SAAW,IAC5B,KAAK,aAAa,YAAY,IAAI,EAE9BC,GAAmB,KAAK,aAAc,KAAK,OAAO,GACpD,KAAK,aAAY,EAGnB,KAAK,aAAY,EAEvB,EAEED,EAAO,cAAgB,UAAyB,CACzC,KAAK,UAAU,QAClB,KAAK,QAAO,CAElB,EAEEA,EAAO,uBAAyB,UAAkC,CAChE,OAAOE,GAAc,KAAK,aAAc,KAAK,QAAS,KAAK,QAAQ,kBAAkB,CACzF,EAEEF,EAAO,yBAA2B,UAAoC,CACpE,OAAOE,GAAc,KAAK,aAAc,KAAK,QAAS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,37,38,39,40]} \ No newline at end of file +{"version":3,"file":"PageLayout-e8KYfbHX.js","sources":["../../node_modules/react-query/es/core/queryObserver.js","../../node_modules/react-query/es/react/QueryErrorResetBoundary.js","../../node_modules/react-query/es/react/utils.js","../../node_modules/react-query/es/react/useBaseQuery.js","../../node_modules/react-query/es/react/useQuery.js","../../src/api/index.ts","../../node_modules/date-fns/toDate.mjs","../../node_modules/date-fns/constants.mjs","../../node_modules/date-fns/_lib/defaultOptions.mjs","../../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs","../../node_modules/date-fns/compareAsc.mjs","../../node_modules/date-fns/differenceInCalendarMonths.mjs","../../node_modules/date-fns/_lib/getRoundingMethod.mjs","../../node_modules/date-fns/differenceInMilliseconds.mjs","../../node_modules/date-fns/endOfDay.mjs","../../node_modules/date-fns/endOfMonth.mjs","../../node_modules/date-fns/isLastDayOfMonth.mjs","../../node_modules/date-fns/differenceInMonths.mjs","../../node_modules/date-fns/differenceInSeconds.mjs","../../node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs","../../node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs","../../node_modules/date-fns/locale/en-US/_lib/formatLong.mjs","../../node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs","../../node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs","../../node_modules/date-fns/locale/en-US/_lib/localize.mjs","../../node_modules/date-fns/locale/_lib/buildMatchFn.mjs","../../node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs","../../node_modules/date-fns/locale/en-US/_lib/match.mjs","../../node_modules/date-fns/locale/en-US.mjs","../../node_modules/date-fns/formatDistance.mjs","../../src/utils.ts","../../node_modules/@zag-js/anatomy/dist/index.mjs","../../node_modules/@zag-js/dom-query/dist/index.mjs","../../node_modules/proxy-compare/dist/index.modern.js","../../node_modules/@zag-js/store/dist/index.mjs","../../node_modules/klona/full/index.mjs","../../node_modules/@zag-js/core/dist/index.mjs","../../node_modules/@zag-js/utils/dist/index.mjs","../../node_modules/@zag-js/progress/dist/index.mjs","../../node_modules/@zag-js/types/dist/index.mjs","../../node_modules/@zag-js/react/dist/index.mjs","../../src/components/Progress.tsx","../../src/components/EmptyView.tsx","../../src/components/PageLayout.tsx"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { isServer, isValidTimeout, noop, replaceEqualDeep, shallowEqualObjects, timeUntilStale } from './utils';\nimport { notifyManager } from './notifyManager';\nimport { focusManager } from './focusManager';\nimport { Subscribable } from './subscribable';\nimport { getLogger } from './logger';\nimport { isCancelledError } from './retryer';\nexport var QueryObserver = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(QueryObserver, _Subscribable);\n\n function QueryObserver(client, options) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.client = client;\n _this.options = options;\n _this.trackedProps = [];\n _this.selectError = null;\n\n _this.bindMethods();\n\n _this.setOptions(options);\n\n return _this;\n }\n\n var _proto = QueryObserver.prototype;\n\n _proto.bindMethods = function bindMethods() {\n this.remove = this.remove.bind(this);\n this.refetch = this.refetch.bind(this);\n };\n\n _proto.onSubscribe = function onSubscribe() {\n if (this.listeners.length === 1) {\n this.currentQuery.addObserver(this);\n\n if (shouldFetchOnMount(this.currentQuery, this.options)) {\n this.executeFetch();\n }\n\n this.updateTimers();\n }\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.listeners.length) {\n this.destroy();\n }\n };\n\n _proto.shouldFetchOnReconnect = function shouldFetchOnReconnect() {\n return shouldFetchOn(this.currentQuery, this.options, this.options.refetchOnReconnect);\n };\n\n _proto.shouldFetchOnWindowFocus = function shouldFetchOnWindowFocus() {\n return shouldFetchOn(this.currentQuery, this.options, this.options.refetchOnWindowFocus);\n };\n\n _proto.destroy = function destroy() {\n this.listeners = [];\n this.clearTimers();\n this.currentQuery.removeObserver(this);\n };\n\n _proto.setOptions = function setOptions(options, notifyOptions) {\n var prevOptions = this.options;\n var prevQuery = this.currentQuery;\n this.options = this.client.defaultQueryObserverOptions(options);\n\n if (typeof this.options.enabled !== 'undefined' && typeof this.options.enabled !== 'boolean') {\n throw new Error('Expected enabled to be a boolean');\n } // Keep previous query key if the user does not supply one\n\n\n if (!this.options.queryKey) {\n this.options.queryKey = prevOptions.queryKey;\n }\n\n this.updateQuery();\n var mounted = this.hasListeners(); // Fetch if there are subscribers\n\n if (mounted && shouldFetchOptionally(this.currentQuery, prevQuery, this.options, prevOptions)) {\n this.executeFetch();\n } // Update result\n\n\n this.updateResult(notifyOptions); // Update stale interval if needed\n\n if (mounted && (this.currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || this.options.staleTime !== prevOptions.staleTime)) {\n this.updateStaleTimeout();\n }\n\n var nextRefetchInterval = this.computeRefetchInterval(); // Update refetch interval if needed\n\n if (mounted && (this.currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || nextRefetchInterval !== this.currentRefetchInterval)) {\n this.updateRefetchInterval(nextRefetchInterval);\n }\n };\n\n _proto.getOptimisticResult = function getOptimisticResult(options) {\n var defaultedOptions = this.client.defaultQueryObserverOptions(options);\n var query = this.client.getQueryCache().build(this.client, defaultedOptions);\n return this.createResult(query, defaultedOptions);\n };\n\n _proto.getCurrentResult = function getCurrentResult() {\n return this.currentResult;\n };\n\n _proto.trackResult = function trackResult(result, defaultedOptions) {\n var _this2 = this;\n\n var trackedResult = {};\n\n var trackProp = function trackProp(key) {\n if (!_this2.trackedProps.includes(key)) {\n _this2.trackedProps.push(key);\n }\n };\n\n Object.keys(result).forEach(function (key) {\n Object.defineProperty(trackedResult, key, {\n configurable: false,\n enumerable: true,\n get: function get() {\n trackProp(key);\n return result[key];\n }\n });\n });\n\n if (defaultedOptions.useErrorBoundary || defaultedOptions.suspense) {\n trackProp('error');\n }\n\n return trackedResult;\n };\n\n _proto.getNextResult = function getNextResult(options) {\n var _this3 = this;\n\n return new Promise(function (resolve, reject) {\n var unsubscribe = _this3.subscribe(function (result) {\n if (!result.isFetching) {\n unsubscribe();\n\n if (result.isError && (options == null ? void 0 : options.throwOnError)) {\n reject(result.error);\n } else {\n resolve(result);\n }\n }\n });\n });\n };\n\n _proto.getCurrentQuery = function getCurrentQuery() {\n return this.currentQuery;\n };\n\n _proto.remove = function remove() {\n this.client.getQueryCache().remove(this.currentQuery);\n };\n\n _proto.refetch = function refetch(options) {\n return this.fetch(_extends({}, options, {\n meta: {\n refetchPage: options == null ? void 0 : options.refetchPage\n }\n }));\n };\n\n _proto.fetchOptimistic = function fetchOptimistic(options) {\n var _this4 = this;\n\n var defaultedOptions = this.client.defaultQueryObserverOptions(options);\n var query = this.client.getQueryCache().build(this.client, defaultedOptions);\n return query.fetch().then(function () {\n return _this4.createResult(query, defaultedOptions);\n });\n };\n\n _proto.fetch = function fetch(fetchOptions) {\n var _this5 = this;\n\n return this.executeFetch(fetchOptions).then(function () {\n _this5.updateResult();\n\n return _this5.currentResult;\n });\n };\n\n _proto.executeFetch = function executeFetch(fetchOptions) {\n // Make sure we reference the latest query as the current one might have been removed\n this.updateQuery(); // Fetch\n\n var promise = this.currentQuery.fetch(this.options, fetchOptions);\n\n if (!(fetchOptions == null ? void 0 : fetchOptions.throwOnError)) {\n promise = promise.catch(noop);\n }\n\n return promise;\n };\n\n _proto.updateStaleTimeout = function updateStaleTimeout() {\n var _this6 = this;\n\n this.clearStaleTimeout();\n\n if (isServer || this.currentResult.isStale || !isValidTimeout(this.options.staleTime)) {\n return;\n }\n\n var time = timeUntilStale(this.currentResult.dataUpdatedAt, this.options.staleTime); // The timeout is sometimes triggered 1 ms before the stale time expiration.\n // To mitigate this issue we always add 1 ms to the timeout.\n\n var timeout = time + 1;\n this.staleTimeoutId = setTimeout(function () {\n if (!_this6.currentResult.isStale) {\n _this6.updateResult();\n }\n }, timeout);\n };\n\n _proto.computeRefetchInterval = function computeRefetchInterval() {\n var _this$options$refetch;\n\n return typeof this.options.refetchInterval === 'function' ? this.options.refetchInterval(this.currentResult.data, this.currentQuery) : (_this$options$refetch = this.options.refetchInterval) != null ? _this$options$refetch : false;\n };\n\n _proto.updateRefetchInterval = function updateRefetchInterval(nextInterval) {\n var _this7 = this;\n\n this.clearRefetchInterval();\n this.currentRefetchInterval = nextInterval;\n\n if (isServer || this.options.enabled === false || !isValidTimeout(this.currentRefetchInterval) || this.currentRefetchInterval === 0) {\n return;\n }\n\n this.refetchIntervalId = setInterval(function () {\n if (_this7.options.refetchIntervalInBackground || focusManager.isFocused()) {\n _this7.executeFetch();\n }\n }, this.currentRefetchInterval);\n };\n\n _proto.updateTimers = function updateTimers() {\n this.updateStaleTimeout();\n this.updateRefetchInterval(this.computeRefetchInterval());\n };\n\n _proto.clearTimers = function clearTimers() {\n this.clearStaleTimeout();\n this.clearRefetchInterval();\n };\n\n _proto.clearStaleTimeout = function clearStaleTimeout() {\n if (this.staleTimeoutId) {\n clearTimeout(this.staleTimeoutId);\n this.staleTimeoutId = undefined;\n }\n };\n\n _proto.clearRefetchInterval = function clearRefetchInterval() {\n if (this.refetchIntervalId) {\n clearInterval(this.refetchIntervalId);\n this.refetchIntervalId = undefined;\n }\n };\n\n _proto.createResult = function createResult(query, options) {\n var prevQuery = this.currentQuery;\n var prevOptions = this.options;\n var prevResult = this.currentResult;\n var prevResultState = this.currentResultState;\n var prevResultOptions = this.currentResultOptions;\n var queryChange = query !== prevQuery;\n var queryInitialState = queryChange ? query.state : this.currentQueryInitialState;\n var prevQueryResult = queryChange ? this.currentResult : this.previousQueryResult;\n var state = query.state;\n var dataUpdatedAt = state.dataUpdatedAt,\n error = state.error,\n errorUpdatedAt = state.errorUpdatedAt,\n isFetching = state.isFetching,\n status = state.status;\n var isPreviousData = false;\n var isPlaceholderData = false;\n var data; // Optimistically set result in fetching state if needed\n\n if (options.optimisticResults) {\n var mounted = this.hasListeners();\n var fetchOnMount = !mounted && shouldFetchOnMount(query, options);\n var fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);\n\n if (fetchOnMount || fetchOptionally) {\n isFetching = true;\n\n if (!dataUpdatedAt) {\n status = 'loading';\n }\n }\n } // Keep previous data if needed\n\n\n if (options.keepPreviousData && !state.dataUpdateCount && (prevQueryResult == null ? void 0 : prevQueryResult.isSuccess) && status !== 'error') {\n data = prevQueryResult.data;\n dataUpdatedAt = prevQueryResult.dataUpdatedAt;\n status = prevQueryResult.status;\n isPreviousData = true;\n } // Select data if needed\n else if (options.select && typeof state.data !== 'undefined') {\n // Memoize select result\n if (prevResult && state.data === (prevResultState == null ? void 0 : prevResultState.data) && options.select === this.selectFn) {\n data = this.selectResult;\n } else {\n try {\n this.selectFn = options.select;\n data = options.select(state.data);\n\n if (options.structuralSharing !== false) {\n data = replaceEqualDeep(prevResult == null ? void 0 : prevResult.data, data);\n }\n\n this.selectResult = data;\n this.selectError = null;\n } catch (selectError) {\n getLogger().error(selectError);\n this.selectError = selectError;\n }\n }\n } // Use query data\n else {\n data = state.data;\n } // Show placeholder data if needed\n\n\n if (typeof options.placeholderData !== 'undefined' && typeof data === 'undefined' && (status === 'loading' || status === 'idle')) {\n var placeholderData; // Memoize placeholder data\n\n if ((prevResult == null ? void 0 : prevResult.isPlaceholderData) && options.placeholderData === (prevResultOptions == null ? void 0 : prevResultOptions.placeholderData)) {\n placeholderData = prevResult.data;\n } else {\n placeholderData = typeof options.placeholderData === 'function' ? options.placeholderData() : options.placeholderData;\n\n if (options.select && typeof placeholderData !== 'undefined') {\n try {\n placeholderData = options.select(placeholderData);\n\n if (options.structuralSharing !== false) {\n placeholderData = replaceEqualDeep(prevResult == null ? void 0 : prevResult.data, placeholderData);\n }\n\n this.selectError = null;\n } catch (selectError) {\n getLogger().error(selectError);\n this.selectError = selectError;\n }\n }\n }\n\n if (typeof placeholderData !== 'undefined') {\n status = 'success';\n data = placeholderData;\n isPlaceholderData = true;\n }\n }\n\n if (this.selectError) {\n error = this.selectError;\n data = this.selectResult;\n errorUpdatedAt = Date.now();\n status = 'error';\n }\n\n var result = {\n status: status,\n isLoading: status === 'loading',\n isSuccess: status === 'success',\n isError: status === 'error',\n isIdle: status === 'idle',\n data: data,\n dataUpdatedAt: dataUpdatedAt,\n error: error,\n errorUpdatedAt: errorUpdatedAt,\n failureCount: state.fetchFailureCount,\n errorUpdateCount: state.errorUpdateCount,\n isFetched: state.dataUpdateCount > 0 || state.errorUpdateCount > 0,\n isFetchedAfterMount: state.dataUpdateCount > queryInitialState.dataUpdateCount || state.errorUpdateCount > queryInitialState.errorUpdateCount,\n isFetching: isFetching,\n isRefetching: isFetching && status !== 'loading',\n isLoadingError: status === 'error' && state.dataUpdatedAt === 0,\n isPlaceholderData: isPlaceholderData,\n isPreviousData: isPreviousData,\n isRefetchError: status === 'error' && state.dataUpdatedAt !== 0,\n isStale: isStale(query, options),\n refetch: this.refetch,\n remove: this.remove\n };\n return result;\n };\n\n _proto.shouldNotifyListeners = function shouldNotifyListeners(result, prevResult) {\n if (!prevResult) {\n return true;\n }\n\n var _this$options = this.options,\n notifyOnChangeProps = _this$options.notifyOnChangeProps,\n notifyOnChangePropsExclusions = _this$options.notifyOnChangePropsExclusions;\n\n if (!notifyOnChangeProps && !notifyOnChangePropsExclusions) {\n return true;\n }\n\n if (notifyOnChangeProps === 'tracked' && !this.trackedProps.length) {\n return true;\n }\n\n var includedProps = notifyOnChangeProps === 'tracked' ? this.trackedProps : notifyOnChangeProps;\n return Object.keys(result).some(function (key) {\n var typedKey = key;\n var changed = result[typedKey] !== prevResult[typedKey];\n var isIncluded = includedProps == null ? void 0 : includedProps.some(function (x) {\n return x === key;\n });\n var isExcluded = notifyOnChangePropsExclusions == null ? void 0 : notifyOnChangePropsExclusions.some(function (x) {\n return x === key;\n });\n return changed && !isExcluded && (!includedProps || isIncluded);\n });\n };\n\n _proto.updateResult = function updateResult(notifyOptions) {\n var prevResult = this.currentResult;\n this.currentResult = this.createResult(this.currentQuery, this.options);\n this.currentResultState = this.currentQuery.state;\n this.currentResultOptions = this.options; // Only notify if something has changed\n\n if (shallowEqualObjects(this.currentResult, prevResult)) {\n return;\n } // Determine which callbacks to trigger\n\n\n var defaultNotifyOptions = {\n cache: true\n };\n\n if ((notifyOptions == null ? void 0 : notifyOptions.listeners) !== false && this.shouldNotifyListeners(this.currentResult, prevResult)) {\n defaultNotifyOptions.listeners = true;\n }\n\n this.notify(_extends({}, defaultNotifyOptions, notifyOptions));\n };\n\n _proto.updateQuery = function updateQuery() {\n var query = this.client.getQueryCache().build(this.client, this.options);\n\n if (query === this.currentQuery) {\n return;\n }\n\n var prevQuery = this.currentQuery;\n this.currentQuery = query;\n this.currentQueryInitialState = query.state;\n this.previousQueryResult = this.currentResult;\n\n if (this.hasListeners()) {\n prevQuery == null ? void 0 : prevQuery.removeObserver(this);\n query.addObserver(this);\n }\n };\n\n _proto.onQueryUpdate = function onQueryUpdate(action) {\n var notifyOptions = {};\n\n if (action.type === 'success') {\n notifyOptions.onSuccess = true;\n } else if (action.type === 'error' && !isCancelledError(action.error)) {\n notifyOptions.onError = true;\n }\n\n this.updateResult(notifyOptions);\n\n if (this.hasListeners()) {\n this.updateTimers();\n }\n };\n\n _proto.notify = function notify(notifyOptions) {\n var _this8 = this;\n\n notifyManager.batch(function () {\n // First trigger the configuration callbacks\n if (notifyOptions.onSuccess) {\n _this8.options.onSuccess == null ? void 0 : _this8.options.onSuccess(_this8.currentResult.data);\n _this8.options.onSettled == null ? void 0 : _this8.options.onSettled(_this8.currentResult.data, null);\n } else if (notifyOptions.onError) {\n _this8.options.onError == null ? void 0 : _this8.options.onError(_this8.currentResult.error);\n _this8.options.onSettled == null ? void 0 : _this8.options.onSettled(undefined, _this8.currentResult.error);\n } // Then trigger the listeners\n\n\n if (notifyOptions.listeners) {\n _this8.listeners.forEach(function (listener) {\n listener(_this8.currentResult);\n });\n } // Then the cache listeners\n\n\n if (notifyOptions.cache) {\n _this8.client.getQueryCache().notify({\n query: _this8.currentQuery,\n type: 'observerResultsUpdated'\n });\n }\n });\n };\n\n return QueryObserver;\n}(Subscribable);\n\nfunction shouldLoadOnMount(query, options) {\n return options.enabled !== false && !query.state.dataUpdatedAt && !(query.state.status === 'error' && options.retryOnMount === false);\n}\n\nfunction shouldFetchOnMount(query, options) {\n return shouldLoadOnMount(query, options) || query.state.dataUpdatedAt > 0 && shouldFetchOn(query, options, options.refetchOnMount);\n}\n\nfunction shouldFetchOn(query, options, field) {\n if (options.enabled !== false) {\n var value = typeof field === 'function' ? field(query) : field;\n return value === 'always' || value !== false && isStale(query, options);\n }\n\n return false;\n}\n\nfunction shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n return options.enabled !== false && (query !== prevQuery || prevOptions.enabled === false) && (!options.suspense || query.state.status !== 'error') && isStale(query, options);\n}\n\nfunction isStale(query, options) {\n return query.isStaleByTime(options.staleTime);\n}","import React from 'react'; // CONTEXT\n\nfunction createValue() {\n var _isReset = false;\n return {\n clearReset: function clearReset() {\n _isReset = false;\n },\n reset: function reset() {\n _isReset = true;\n },\n isReset: function isReset() {\n return _isReset;\n }\n };\n}\n\nvar QueryErrorResetBoundaryContext = /*#__PURE__*/React.createContext(createValue()); // HOOK\n\nexport var useQueryErrorResetBoundary = function useQueryErrorResetBoundary() {\n return React.useContext(QueryErrorResetBoundaryContext);\n}; // COMPONENT\n\nexport var QueryErrorResetBoundary = function QueryErrorResetBoundary(_ref) {\n var children = _ref.children;\n var value = React.useMemo(function () {\n return createValue();\n }, []);\n return /*#__PURE__*/React.createElement(QueryErrorResetBoundaryContext.Provider, {\n value: value\n }, typeof children === 'function' ? children(value) : children);\n};","export function shouldThrowError(suspense, _useErrorBoundary, params) {\n // Allow useErrorBoundary function to override throwing behavior on a per-error basis\n if (typeof _useErrorBoundary === 'function') {\n return _useErrorBoundary.apply(void 0, params);\n } // Allow useErrorBoundary to override suspense's throwing behavior\n\n\n if (typeof _useErrorBoundary === 'boolean') return _useErrorBoundary; // If suspense is enabled default to throwing errors\n\n return !!suspense;\n}","import React from 'react';\nimport { notifyManager } from '../core/notifyManager';\nimport { useQueryErrorResetBoundary } from './QueryErrorResetBoundary';\nimport { useQueryClient } from './QueryClientProvider';\nimport { shouldThrowError } from './utils';\nexport function useBaseQuery(options, Observer) {\n var mountedRef = React.useRef(false);\n\n var _React$useState = React.useState(0),\n forceUpdate = _React$useState[1];\n\n var queryClient = useQueryClient();\n var errorResetBoundary = useQueryErrorResetBoundary();\n var defaultedOptions = queryClient.defaultQueryObserverOptions(options); // Make sure results are optimistically set in fetching state before subscribing or updating options\n\n defaultedOptions.optimisticResults = true; // Include callbacks in batch renders\n\n if (defaultedOptions.onError) {\n defaultedOptions.onError = notifyManager.batchCalls(defaultedOptions.onError);\n }\n\n if (defaultedOptions.onSuccess) {\n defaultedOptions.onSuccess = notifyManager.batchCalls(defaultedOptions.onSuccess);\n }\n\n if (defaultedOptions.onSettled) {\n defaultedOptions.onSettled = notifyManager.batchCalls(defaultedOptions.onSettled);\n }\n\n if (defaultedOptions.suspense) {\n // Always set stale time when using suspense to prevent\n // fetching again when directly mounting after suspending\n if (typeof defaultedOptions.staleTime !== 'number') {\n defaultedOptions.staleTime = 1000;\n } // Set cache time to 1 if the option has been set to 0\n // when using suspense to prevent infinite loop of fetches\n\n\n if (defaultedOptions.cacheTime === 0) {\n defaultedOptions.cacheTime = 1;\n }\n }\n\n if (defaultedOptions.suspense || defaultedOptions.useErrorBoundary) {\n // Prevent retrying failed query if the error boundary has not been reset yet\n if (!errorResetBoundary.isReset()) {\n defaultedOptions.retryOnMount = false;\n }\n }\n\n var _React$useState2 = React.useState(function () {\n return new Observer(queryClient, defaultedOptions);\n }),\n observer = _React$useState2[0];\n\n var result = observer.getOptimisticResult(defaultedOptions);\n React.useEffect(function () {\n mountedRef.current = true;\n errorResetBoundary.clearReset();\n var unsubscribe = observer.subscribe(notifyManager.batchCalls(function () {\n if (mountedRef.current) {\n forceUpdate(function (x) {\n return x + 1;\n });\n }\n })); // Update result to make sure we did not miss any query updates\n // between creating the observer and subscribing to it.\n\n observer.updateResult();\n return function () {\n mountedRef.current = false;\n unsubscribe();\n };\n }, [errorResetBoundary, observer]);\n React.useEffect(function () {\n // Do not notify on updates because of changes in the options because\n // these changes should already be reflected in the optimistic result.\n observer.setOptions(defaultedOptions, {\n listeners: false\n });\n }, [defaultedOptions, observer]); // Handle suspense\n\n if (defaultedOptions.suspense && result.isLoading) {\n throw observer.fetchOptimistic(defaultedOptions).then(function (_ref) {\n var data = _ref.data;\n defaultedOptions.onSuccess == null ? void 0 : defaultedOptions.onSuccess(data);\n defaultedOptions.onSettled == null ? void 0 : defaultedOptions.onSettled(data, null);\n }).catch(function (error) {\n errorResetBoundary.clearReset();\n defaultedOptions.onError == null ? void 0 : defaultedOptions.onError(error);\n defaultedOptions.onSettled == null ? void 0 : defaultedOptions.onSettled(undefined, error);\n });\n } // Handle error boundary\n\n\n if (result.isError && !errorResetBoundary.isReset() && !result.isFetching && shouldThrowError(defaultedOptions.suspense, defaultedOptions.useErrorBoundary, [result.error, observer.getCurrentQuery()])) {\n throw result.error;\n } // Handle result property usage tracking\n\n\n if (defaultedOptions.notifyOnChangeProps === 'tracked') {\n result = observer.trackResult(result, defaultedOptions);\n }\n\n return result;\n}","import { QueryObserver } from '../core';\nimport { parseQueryArgs } from '../core/utils';\nimport { useBaseQuery } from './useBaseQuery'; // HOOK\n\nexport function useQuery(arg1, arg2, arg3) {\n var parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n return useBaseQuery(parsedOptions, QueryObserver);\n}","const api = async (url: string): Promise => {\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(response.statusText);\n }\n return (await response.json()) as Promise;\n};\n\nexport default api;\n","/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument) {\n const argStr = Object.prototype.toString.call(argument);\n\n // Clone the date\n if (\n argument instanceof Date ||\n (typeof argument === \"object\" && argStr === \"[object Date]\")\n ) {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new argument.constructor(+argument);\n } else if (\n typeof argument === \"number\" ||\n argStr === \"[object Number]\" ||\n typeof argument === \"string\" ||\n argStr === \"[object String]\"\n ) {\n // TODO: Can we get rid of as?\n return new Date(argument);\n } else {\n // TODO: Can we get rid of as?\n return new Date(NaN);\n }\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n","/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n","let defaultOptions = {};\n\nexport function getDefaultOptions() {\n return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}\n","import { toDate } from \"../toDate.mjs\";\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n const _date = toDate(date);\n const utcDate = new Date(\n Date.UTC(\n _date.getFullYear(),\n _date.getMonth(),\n _date.getDate(),\n _date.getHours(),\n _date.getMinutes(),\n _date.getSeconds(),\n _date.getMilliseconds(),\n ),\n );\n utcDate.setUTCFullYear(_date.getFullYear());\n return +date - +utcDate;\n}\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The first date to compare\n * @param dateRight - The second date to compare\n *\n * @returns The result of the comparison\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * const result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * // Wed Feb 11 1987 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Sun Jul 02 1995 00:00:00\n * // ]\n */\nexport function compareAsc(dateLeft, dateRight) {\n const _dateLeft = toDate(dateLeft);\n const _dateRight = toDate(dateRight);\n\n const diff = _dateLeft.getTime() - _dateRight.getTime();\n\n if (diff < 0) {\n return -1;\n } else if (diff > 0) {\n return 1;\n // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}\n\n// Fallback for modularized imports:\nexport default compareAsc;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of calendar months\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\nexport function differenceInCalendarMonths(dateLeft, dateRight) {\n const _dateLeft = toDate(dateLeft);\n const _dateRight = toDate(dateRight);\n\n const yearDiff = _dateLeft.getFullYear() - _dateRight.getFullYear();\n const monthDiff = _dateLeft.getMonth() - _dateRight.getMonth();\n\n return yearDiff * 12 + monthDiff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarMonths;\n","export function getRoundingMethod(method) {\n return (number) => {\n const round = method ? Math[method] : Math.trunc;\n const result = round(number);\n // Prevent negative zero\n return result === 0 ? 0 : result;\n };\n}\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of milliseconds\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n * new Date(2014, 6, 2, 12, 30, 21, 700),\n * new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\nexport function differenceInMilliseconds(dateLeft, dateRight) {\n return +toDate(dateLeft) - +toDate(dateRight);\n}\n\n// Fallback for modularized imports:\nexport default differenceInMilliseconds;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The end of a day\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\nexport function endOfDay(date) {\n const _date = toDate(date);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfDay;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date) {\n const _date = toDate(date);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n","import { endOfDay } from \"./endOfDay.mjs\";\nimport { endOfMonth } from \"./endOfMonth.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name isLastDayOfMonth\n * @category Month Helpers\n * @summary Is the given date the last day of a month?\n *\n * @description\n * Is the given date the last day of a month?\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to check\n\n * @returns The date is the last day of a month\n *\n * @example\n * // Is 28 February 2014 the last day of a month?\n * const result = isLastDayOfMonth(new Date(2014, 1, 28))\n * //=> true\n */\nexport function isLastDayOfMonth(date) {\n const _date = toDate(date);\n return +endOfDay(_date) === +endOfMonth(_date);\n}\n\n// Fallback for modularized imports:\nexport default isLastDayOfMonth;\n","import { compareAsc } from \"./compareAsc.mjs\";\nimport { differenceInCalendarMonths } from \"./differenceInCalendarMonths.mjs\";\nimport { isLastDayOfMonth } from \"./isLastDayOfMonth.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name differenceInMonths\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @description\n * Get the number of full months between the given dates using trunc as a default rounding method.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of full months\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))\n * //=> 7\n */\nexport function differenceInMonths(dateLeft, dateRight) {\n const _dateLeft = toDate(dateLeft);\n const _dateRight = toDate(dateRight);\n\n const sign = compareAsc(_dateLeft, _dateRight);\n const difference = Math.abs(\n differenceInCalendarMonths(_dateLeft, _dateRight),\n );\n let result;\n\n // Check for the difference of less than month\n if (difference < 1) {\n result = 0;\n } else {\n if (_dateLeft.getMonth() === 1 && _dateLeft.getDate() > 27) {\n // This will check if the date is end of Feb and assign a higher end of month date\n // to compare it with Jan\n _dateLeft.setDate(30);\n }\n\n _dateLeft.setMonth(_dateLeft.getMonth() - sign * difference);\n\n // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full\n // If so, result must be decreased by 1 in absolute value\n let isLastMonthNotFull = compareAsc(_dateLeft, _dateRight) === -sign;\n\n // Check for cases of one full calendar month\n if (\n isLastDayOfMonth(toDate(dateLeft)) &&\n difference === 1 &&\n compareAsc(dateLeft, _dateRight) === 1\n ) {\n isLastMonthNotFull = false;\n }\n\n result = sign * (difference - Number(isLastMonthNotFull));\n }\n\n // Prevent negative zero\n return result === 0 ? 0 : result;\n}\n\n// Fallback for modularized imports:\nexport default differenceInMonths;\n","import { getRoundingMethod } from \"./_lib/getRoundingMethod.mjs\";\nimport { differenceInMilliseconds } from \"./differenceInMilliseconds.mjs\";\n\n/**\n * The {@link differenceInSeconds} function options.\n */\n\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n * @param options - An object with options.\n *\n * @returns The number of seconds\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n * new Date(2014, 6, 2, 12, 30, 20, 0),\n * new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\nexport function differenceInSeconds(dateLeft, dateRight, options) {\n const diff = differenceInMilliseconds(dateLeft, dateRight) / 1000;\n return getRoundingMethod(options?.roundingMethod)(diff);\n}\n\n// Fallback for modularized imports:\nexport default differenceInSeconds;\n","const formatDistanceLocale = {\n lessThanXSeconds: {\n one: \"less than a second\",\n other: \"less than {{count}} seconds\",\n },\n\n xSeconds: {\n one: \"1 second\",\n other: \"{{count}} seconds\",\n },\n\n halfAMinute: \"half a minute\",\n\n lessThanXMinutes: {\n one: \"less than a minute\",\n other: \"less than {{count}} minutes\",\n },\n\n xMinutes: {\n one: \"1 minute\",\n other: \"{{count}} minutes\",\n },\n\n aboutXHours: {\n one: \"about 1 hour\",\n other: \"about {{count}} hours\",\n },\n\n xHours: {\n one: \"1 hour\",\n other: \"{{count}} hours\",\n },\n\n xDays: {\n one: \"1 day\",\n other: \"{{count}} days\",\n },\n\n aboutXWeeks: {\n one: \"about 1 week\",\n other: \"about {{count}} weeks\",\n },\n\n xWeeks: {\n one: \"1 week\",\n other: \"{{count}} weeks\",\n },\n\n aboutXMonths: {\n one: \"about 1 month\",\n other: \"about {{count}} months\",\n },\n\n xMonths: {\n one: \"1 month\",\n other: \"{{count}} months\",\n },\n\n aboutXYears: {\n one: \"about 1 year\",\n other: \"about {{count}} years\",\n },\n\n xYears: {\n one: \"1 year\",\n other: \"{{count}} years\",\n },\n\n overXYears: {\n one: \"over 1 year\",\n other: \"over {{count}} years\",\n },\n\n almostXYears: {\n one: \"almost 1 year\",\n other: \"almost {{count}} years\",\n },\n};\n\nexport const formatDistance = (token, count, options) => {\n let result;\n\n const tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", count.toString());\n }\n\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return \"in \" + result;\n } else {\n return result + \" ago\";\n }\n }\n\n return result;\n};\n","export function buildFormatLongFn(args) {\n return (options = {}) => {\n // TODO: Remove String()\n const width = options.width ? String(options.width) : args.defaultWidth;\n const format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.mjs\";\n\nconst dateFormats = {\n full: \"EEEE, MMMM do, y\",\n long: \"MMMM do, y\",\n medium: \"MMM d, y\",\n short: \"MM/dd/yyyy\",\n};\n\nconst timeFormats = {\n full: \"h:mm:ss a zzzz\",\n long: \"h:mm:ss a z\",\n medium: \"h:mm:ss a\",\n short: \"h:mm a\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: \"{{date}}, {{time}}\",\n short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n","const formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n formatRelativeLocale[token];\n","/* eslint-disable no-unused-vars */\n\n/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n return (value, options) => {\n const context = options?.context ? String(options.context) : \"standalone\";\n\n let valuesArray;\n if (context === \"formatting\" && args.formattingValues) {\n const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n const width = options?.width ? String(options.width) : defaultWidth;\n\n valuesArray =\n args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n const defaultWidth = args.defaultWidth;\n const width = options?.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[width] || args.values[defaultWidth];\n }\n const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n return valuesArray[index];\n };\n}\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.mjs\";\n\nconst eraValues = {\n narrow: [\"B\", \"A\"],\n abbreviated: [\"BC\", \"AD\"],\n wide: [\"Before Christ\", \"Anno Domini\"],\n};\n\nconst quarterValues = {\n narrow: [\"1\", \"2\", \"3\", \"4\"],\n abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n wide: [\"1st quarter\", \"2nd quarter\", \"3rd quarter\", \"4th quarter\"],\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nconst monthValues = {\n narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"],\n abbreviated: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n\n wide: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n};\n\nconst dayValues = {\n narrow: [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"],\n short: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n abbreviated: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n wide: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n};\n\nconst dayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n};\n\nconst formattingDayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n};\n\nconst ordinalNumber = (dirtyNumber, _options) => {\n const number = Number(dirtyNumber);\n\n // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n const rem100 = number % 100;\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + \"st\";\n case 2:\n return number + \"nd\";\n case 3:\n return number + \"rd\";\n }\n }\n return number + \"th\";\n};\n\nexport const localize = {\n ordinalNumber,\n\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: \"wide\",\n }),\n\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: \"wide\",\n argumentCallback: (quarter) => quarter - 1,\n }),\n\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: \"wide\",\n }),\n\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: \"wide\",\n }),\n\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: \"wide\",\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: \"wide\",\n }),\n};\n","export function buildMatchFn(args) {\n return (string, options = {}) => {\n const width = options.width;\n\n const matchPattern =\n (width && args.matchPatterns[width]) ||\n args.matchPatterns[args.defaultMatchWidth];\n const matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n const matchedString = matchResult[0];\n\n const parsePatterns =\n (width && args.parsePatterns[width]) ||\n args.parsePatterns[args.defaultParseWidth];\n\n const key = Array.isArray(parsePatterns)\n ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n let value;\n\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n options.valueCallback(value)\n : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n\nfunction findKey(object, predicate) {\n for (const key in object) {\n if (\n Object.prototype.hasOwnProperty.call(object, key) &&\n predicate(object[key])\n ) {\n return key;\n }\n }\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (let key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n return undefined;\n}\n","export function buildMatchPatternFn(args) {\n return (string, options = {}) => {\n const matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n const matchedString = matchResult[0];\n\n const parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n let value = args.valueCallback\n ? args.valueCallback(parseResult[0])\n : parseResult[0];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n value = options.valueCallback ? options.valueCallback(value) : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.mjs\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.mjs\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i,\n};\nconst parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i],\n};\n\nconst matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i,\n};\nconst parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,\n};\nconst parseMonthPatterns = {\n narrow: [\n /^j/i,\n /^f/i,\n /^m/i,\n /^a/i,\n /^m/i,\n /^j/i,\n /^j/i,\n /^a/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n\n any: [\n /^ja/i,\n /^f/i,\n /^mar/i,\n /^ap/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^au/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n};\n\nconst matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,\n};\nconst parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],\n};\n\nconst matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,\n};\nconst parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i,\n },\n};\n\nexport const match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: (value) => parseInt(value, 10),\n }),\n\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseEraPatterns,\n defaultParseWidth: \"any\",\n }),\n\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: \"any\",\n valueCallback: (index) => index + 1,\n }),\n\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: \"any\",\n }),\n\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseDayPatterns,\n defaultParseWidth: \"any\",\n }),\n\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: \"any\",\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: \"any\",\n }),\n};\n","import { formatDistance } from \"./en-US/_lib/formatDistance.mjs\";\nimport { formatLong } from \"./en-US/_lib/formatLong.mjs\";\nimport { formatRelative } from \"./en-US/_lib/formatRelative.mjs\";\nimport { localize } from \"./en-US/_lib/localize.mjs\";\nimport { match } from \"./en-US/_lib/match.mjs\";\n\n/**\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)\n * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)\n */\nexport const enUS = {\n code: \"en-US\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0 /* Sunday */,\n firstWeekContainsDate: 1,\n },\n};\n\n// Fallback for modularized imports:\nexport default enUS;\n","import { compareAsc } from \"./compareAsc.mjs\";\nimport { minutesInDay, minutesInMonth } from \"./constants.mjs\";\nimport { differenceInMonths } from \"./differenceInMonths.mjs\";\nimport { differenceInSeconds } from \"./differenceInSeconds.mjs\";\nimport { toDate } from \"./toDate.mjs\";\nimport { defaultLocale } from \"./_lib/defaultLocale.mjs\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.mjs\";\nimport { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.mjs\";\n\n/**\n * The {@link formatDistance} function options.\n */\n\n/**\n * @name formatDistance\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words.\n *\n * | Distance between dates | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance between dates | Result |\n * |------------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date\n * @param baseDate - The date to compare with\n * @param options - An object with options\n *\n * @returns The distance in words\n *\n * @throws `date` must not be Invalid Date\n * @throws `baseDate` must not be Invalid Date\n * @throws `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00, including seconds?\n * const result = formatDistance(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * { includeSeconds: true }\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> 'about 1 year ago'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> 'pli ol 1 jaro'\n */\n\nexport function formatDistance(date, baseDate, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n const minutesInAlmostTwoDays = 2520;\n\n const comparison = compareAsc(date, baseDate);\n\n if (isNaN(comparison)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n const localizeOptions = Object.assign({}, options, {\n addSuffix: options?.addSuffix,\n comparison: comparison,\n });\n\n let dateLeft;\n let dateRight;\n if (comparison > 0) {\n dateLeft = toDate(baseDate);\n dateRight = toDate(date);\n } else {\n dateLeft = toDate(date);\n dateRight = toDate(baseDate);\n }\n\n const seconds = differenceInSeconds(dateRight, dateLeft);\n const offsetInSeconds =\n (getTimezoneOffsetInMilliseconds(dateRight) -\n getTimezoneOffsetInMilliseconds(dateLeft)) /\n 1000;\n const minutes = Math.round((seconds - offsetInSeconds) / 60);\n let months;\n\n // 0 up to 2 mins\n if (minutes < 2) {\n if (options?.includeSeconds) {\n if (seconds < 5) {\n return locale.formatDistance(\"lessThanXSeconds\", 5, localizeOptions);\n } else if (seconds < 10) {\n return locale.formatDistance(\"lessThanXSeconds\", 10, localizeOptions);\n } else if (seconds < 20) {\n return locale.formatDistance(\"lessThanXSeconds\", 20, localizeOptions);\n } else if (seconds < 40) {\n return locale.formatDistance(\"halfAMinute\", 0, localizeOptions);\n } else if (seconds < 60) {\n return locale.formatDistance(\"lessThanXMinutes\", 1, localizeOptions);\n } else {\n return locale.formatDistance(\"xMinutes\", 1, localizeOptions);\n }\n } else {\n if (minutes === 0) {\n return locale.formatDistance(\"lessThanXMinutes\", 1, localizeOptions);\n } else {\n return locale.formatDistance(\"xMinutes\", minutes, localizeOptions);\n }\n }\n\n // 2 mins up to 0.75 hrs\n } else if (minutes < 45) {\n return locale.formatDistance(\"xMinutes\", minutes, localizeOptions);\n\n // 0.75 hrs up to 1.5 hrs\n } else if (minutes < 90) {\n return locale.formatDistance(\"aboutXHours\", 1, localizeOptions);\n\n // 1.5 hrs up to 24 hrs\n } else if (minutes < minutesInDay) {\n const hours = Math.round(minutes / 60);\n return locale.formatDistance(\"aboutXHours\", hours, localizeOptions);\n\n // 1 day up to 1.75 days\n } else if (minutes < minutesInAlmostTwoDays) {\n return locale.formatDistance(\"xDays\", 1, localizeOptions);\n\n // 1.75 days up to 30 days\n } else if (minutes < minutesInMonth) {\n const days = Math.round(minutes / minutesInDay);\n return locale.formatDistance(\"xDays\", days, localizeOptions);\n\n // 1 month up to 2 months\n } else if (minutes < minutesInMonth * 2) {\n months = Math.round(minutes / minutesInMonth);\n return locale.formatDistance(\"aboutXMonths\", months, localizeOptions);\n }\n\n months = differenceInMonths(dateRight, dateLeft);\n\n // 2 months up to 12 months\n if (months < 12) {\n const nearestMonth = Math.round(minutes / minutesInMonth);\n return locale.formatDistance(\"xMonths\", nearestMonth, localizeOptions);\n\n // 1 year up to max Date\n } else {\n const monthsSinceStartOfYear = months % 12;\n const years = Math.trunc(months / 12);\n\n // N years up to 1 years 3 months\n if (monthsSinceStartOfYear < 3) {\n return locale.formatDistance(\"aboutXYears\", years, localizeOptions);\n\n // N years 3 months up to N years 9 months\n } else if (monthsSinceStartOfYear < 9) {\n return locale.formatDistance(\"overXYears\", years, localizeOptions);\n\n // N years 9 months up to N year 12 months\n } else {\n return locale.formatDistance(\"almostXYears\", years + 1, localizeOptions);\n }\n }\n}\n\n// Fallback for modularized imports:\nexport default formatDistance;\n","import { formatDistance } from 'date-fns';\n\nexport const timeAgo = (input: string) => {\n const date = new Date(input);\n return formatDistance(date, new Date(), { addSuffix: true });\n};\n","// src/create-anatomy.ts\nvar createAnatomy = (name, parts = []) => ({\n parts: (...values) => {\n if (isEmpty(parts)) {\n return createAnatomy(name, values);\n }\n throw new Error(\"createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?\");\n },\n extendWith: (...values) => createAnatomy(name, [...parts, ...values]),\n rename: (newName) => createAnatomy(newName, parts),\n keys: () => parts,\n build: () => [...new Set(parts)].reduce(\n (prev, part) => Object.assign(prev, {\n [part]: {\n selector: [\n `&[data-scope=\"${toKebabCase(name)}\"][data-part=\"${toKebabCase(part)}\"]`,\n `& [data-scope=\"${toKebabCase(name)}\"][data-part=\"${toKebabCase(part)}\"]`\n ].join(\", \"),\n attrs: { \"data-scope\": toKebabCase(name), \"data-part\": toKebabCase(part) }\n }\n }),\n {}\n )\n});\nvar toKebabCase = (value) => value.replace(/([A-Z])([A-Z])/g, \"$1-$2\").replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/[\\s_]+/g, \"-\").toLowerCase();\nvar isEmpty = (v) => v.length === 0;\nexport {\n createAnatomy\n};\n//# sourceMappingURL=index.mjs.map","// src/attrs.ts\nvar dataAttr = (guard) => {\n return guard ? \"\" : void 0;\n};\nvar ariaAttr = (guard) => {\n return guard ? \"true\" : void 0;\n};\n\n// src/is-html-element.ts\nvar isHTMLElement = (v) => typeof v === \"object\" && v?.nodeType === Node.ELEMENT_NODE && typeof v?.nodeName === \"string\";\n\n// src/contains.ts\nfunction contains(parent, child) {\n if (!parent || !child)\n return false;\n if (!isHTMLElement(parent) || !isHTMLElement(child))\n return false;\n return parent === child || parent.contains(child);\n}\nvar isSelfEvent = (event) => contains(event.currentTarget, event.target);\n\n// src/create-scope.ts\nvar getDocument = (node) => {\n if (node.nodeType === Node.DOCUMENT_NODE)\n return node;\n return node.ownerDocument ?? document;\n};\nfunction createScope(methods) {\n const screen = {\n getRootNode: (ctx) => ctx.getRootNode?.() ?? document,\n getDoc: (ctx) => getDocument(screen.getRootNode(ctx)),\n getWin: (ctx) => screen.getDoc(ctx).defaultView ?? window,\n getActiveElement: (ctx) => screen.getDoc(ctx).activeElement,\n isActiveElement: (ctx, elem) => elem === screen.getActiveElement(ctx),\n getById: (ctx, id) => screen.getRootNode(ctx).getElementById(id),\n setValue: (elem, value) => {\n if (elem == null || value == null)\n return;\n const valueAsString = value.toString();\n if (elem.value === valueAsString)\n return;\n elem.value = value.toString();\n }\n };\n return { ...screen, ...methods };\n}\n\n// src/is-document.ts\nvar isDocument = (el) => el.nodeType === Node.DOCUMENT_NODE;\n\n// src/is-shadow-root.ts\nvar isNode = (el) => el.nodeType !== void 0;\nvar isShadowRoot = (el) => el && isNode(el) && el.nodeType === Node.DOCUMENT_FRAGMENT_NODE && \"host\" in el;\n\n// src/env.ts\nfunction getDocument2(el) {\n if (isDocument(el))\n return el;\n return el?.ownerDocument ?? document;\n}\nfunction getWindow(el) {\n if (isShadowRoot(el))\n return getWindow(el.host);\n if (isDocument(el))\n return el.defaultView ?? window;\n if (isHTMLElement(el))\n return el.ownerDocument?.defaultView ?? window;\n return window;\n}\n\n// src/get-active-element.ts\nfunction getActiveElement(el) {\n let activeElement = el.ownerDocument.activeElement;\n while (activeElement?.shadowRoot) {\n const el2 = activeElement.shadowRoot.activeElement;\n if (el2 === activeElement)\n break;\n else\n activeElement = el2;\n }\n return activeElement;\n}\n\n// src/get-before-input-value.ts\nfunction getBeforeInputValue(event) {\n const { selectionStart, selectionEnd, value } = event.currentTarget;\n return value.slice(0, selectionStart) + event.data + value.slice(selectionEnd);\n}\n\n// src/get-by-id.ts\nvar defaultItemToId = (v) => v.id;\nfunction itemById(v, id, itemToId = defaultItemToId) {\n return v.find((item) => itemToId(item) === id);\n}\nfunction indexOfId(v, id, itemToId = defaultItemToId) {\n const item = itemById(v, id, itemToId);\n return item ? v.indexOf(item) : -1;\n}\nfunction nextById(v, id, loop = true) {\n let idx = indexOfId(v, id);\n idx = loop ? (idx + 1) % v.length : Math.min(idx + 1, v.length - 1);\n return v[idx];\n}\nfunction prevById(v, id, loop = true) {\n let idx = indexOfId(v, id);\n if (idx === -1)\n return loop ? v[v.length - 1] : null;\n idx = loop ? (idx - 1 + v.length) % v.length : Math.max(0, idx - 1);\n return v[idx];\n}\n\n// src/sanitize.ts\nvar sanitize = (str) => str.split(\"\").map((char) => {\n const code = char.charCodeAt(0);\n if (code > 0 && code < 128) {\n return char;\n }\n if (code >= 128 && code <= 255) {\n return `/x${code.toString(16)}`.replace(\"/\", \"\\\\\");\n }\n return \"\";\n}).join(\"\").trim();\n\n// src/get-by-text.ts\nvar getValueText = (item) => sanitize(item.dataset.valuetext ?? item.textContent ?? \"\");\nvar match = (valueText, query2) => valueText.trim().toLowerCase().startsWith(query2.toLowerCase());\nvar wrap = (v, idx) => {\n return v.map((_, index) => v[(Math.max(idx, 0) + index) % v.length]);\n};\nfunction getByText(v, text, currentId, itemToId = defaultItemToId) {\n const index = currentId ? indexOfId(v, currentId, itemToId) : -1;\n let items = currentId ? wrap(v, index) : v;\n const isSingleKey = text.length === 1;\n if (isSingleKey) {\n items = items.filter((item) => itemToId(item) !== currentId);\n }\n return items.find((item) => match(getValueText(item), text));\n}\n\n// src/get-by-typeahead.ts\nfunction getByTypeaheadImpl(_items, options) {\n const { state, activeId, key, timeout = 350, itemToId } = options;\n const search = state.keysSoFar + key;\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const query2 = isRepeated ? search[0] : search;\n let items = _items.slice();\n const next = getByText(items, query2, activeId, itemToId);\n function cleanup() {\n clearTimeout(state.timer);\n state.timer = -1;\n }\n function update(value) {\n state.keysSoFar = value;\n cleanup();\n if (value !== \"\") {\n state.timer = +setTimeout(() => {\n update(\"\");\n cleanup();\n }, timeout);\n }\n }\n update(search);\n return next;\n}\nvar getByTypeahead = /* @__PURE__ */ Object.assign(getByTypeaheadImpl, {\n defaultOptions: { keysSoFar: \"\", timer: -1 },\n isValidEvent: isValidTypeaheadEvent\n});\nfunction isValidTypeaheadEvent(event) {\n return event.key.length === 1 && !event.ctrlKey && !event.metaKey;\n}\n\n// src/get-computed-style.ts\nvar styleCache = /* @__PURE__ */ new WeakMap();\nfunction getComputedStyle(el) {\n if (!styleCache.has(el)) {\n const win = el.ownerDocument.defaultView || window;\n styleCache.set(el, win.getComputedStyle(el));\n }\n return styleCache.get(el);\n}\n\n// src/get-event-target.ts\nfunction getEventTarget(event) {\n return event.composedPath?.()[0] ?? event.target;\n}\n\n// src/get-scroll-parent.ts\nfunction isScrollParent(el) {\n const win = el.ownerDocument.defaultView || window;\n const { overflow, overflowX, overflowY } = win.getComputedStyle(el);\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}\nfunction getParent(el) {\n if (el.localName === \"html\")\n return el;\n return el.assignedSlot || el.parentElement || el.ownerDocument.documentElement;\n}\nfunction getScrollParent(el) {\n if ([\"html\", \"body\", \"#document\"].includes(el.localName)) {\n return el.ownerDocument.body;\n }\n if (isHTMLElement(el) && isScrollParent(el)) {\n return el;\n }\n return getScrollParent(getParent(el));\n}\nfunction getScrollParents(el, list = []) {\n const parent = getScrollParent(el);\n const isBody = parent === el.ownerDocument.body;\n const win = parent.ownerDocument.defaultView || window;\n const target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(parent) ? parent : []) : parent;\n const parents = list.concat(target);\n return isBody ? parents : parents.concat(getScrollParents(getParent(target)));\n}\n\n// src/is-editable-element.ts\nfunction isEditableElement(el) {\n if (el == null || !isHTMLElement(el)) {\n return false;\n }\n try {\n const win = el.ownerDocument.defaultView || window;\n return el instanceof win.HTMLInputElement && el.selectionStart != null || /(textarea|select)/.test(el.localName) || el.isContentEditable;\n } catch {\n return false;\n }\n}\n\n// src/is-hidden-element.ts\nfunction isHiddenElement(node) {\n if (node.parentElement && isHiddenElement(node.parentElement))\n return true;\n return node.hidden;\n}\n\n// src/platform.ts\nvar isDom = () => typeof document !== \"undefined\";\nfunction getPlatform() {\n const agent = navigator.userAgentData;\n return agent?.platform ?? navigator.platform;\n}\nvar pt = (v) => isDom() && v.test(getPlatform());\nvar ua = (v) => isDom() && v.test(navigator.userAgent);\nvar vn = (v) => isDom() && v.test(navigator.vendor);\nvar isTouchDevice = () => isDom() && !!navigator.maxTouchPoints;\nvar isMac = () => pt(/^Mac/) && !isTouchDevice();\nvar isIPhone = () => pt(/^iPhone/);\nvar isSafari = () => isApple() && vn(/apple/i);\nvar isFirefox = () => ua(/firefox\\//i);\nvar isApple = () => pt(/mac|iphone|ipad|ipod/i);\nvar isIos = () => isApple() && !isMac();\n\n// src/query.ts\nfunction queryAll(root, selector) {\n return Array.from(root?.querySelectorAll(selector) ?? []);\n}\nfunction query(root, selector) {\n return root?.querySelector(selector) ?? null;\n}\n\n// src/raf.ts\nfunction nextTick(fn) {\n const set = /* @__PURE__ */ new Set();\n function raf2(fn2) {\n const id = globalThis.requestAnimationFrame(fn2);\n set.add(() => globalThis.cancelAnimationFrame(id));\n }\n raf2(() => raf2(fn));\n return function cleanup() {\n set.forEach((fn2) => fn2());\n };\n}\nfunction raf(fn) {\n const id = globalThis.requestAnimationFrame(fn);\n return () => {\n globalThis.cancelAnimationFrame(id);\n };\n}\n\n// src/index.ts\nvar MAX_Z_INDEX = 2147483647;\nexport {\n MAX_Z_INDEX,\n ariaAttr,\n contains,\n createScope,\n dataAttr,\n defaultItemToId,\n getActiveElement,\n getBeforeInputValue,\n getByText,\n getByTypeahead,\n getComputedStyle,\n getDocument2 as getDocument,\n getEventTarget,\n getParent,\n getPlatform,\n getScrollParent,\n getScrollParents,\n getWindow,\n indexOfId,\n isApple,\n isDom,\n isEditableElement,\n isFirefox,\n isHTMLElement,\n isHiddenElement,\n isIPhone,\n isIos,\n isMac,\n isSafari,\n isSelfEvent,\n isTouchDevice,\n itemById,\n nextById,\n nextTick,\n prevById,\n query,\n queryAll,\n raf\n};\n//# sourceMappingURL=index.mjs.map","const e=Symbol(),t=Symbol(),r=\"a\",n=\"w\";let o=(e,t)=>new Proxy(e,t);const s=Object.getPrototypeOf,c=new WeakMap,l=e=>e&&(c.has(e)?c.get(e):s(e)===Object.prototype||s(e)===Array.prototype),f=e=>\"object\"==typeof e&&null!==e,i=e=>{if(Array.isArray(e))return Array.from(e);const t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach(e=>{e.configurable=!0}),Object.create(s(e),t)},u=e=>e[t]||e,a=(s,c,f,p)=>{if(!l(s))return s;let g=p&&p.get(s);if(!g){const e=u(s);g=(e=>Object.values(Object.getOwnPropertyDescriptors(e)).some(e=>!e.configurable&&!e.writable))(e)?[e,i(e)]:[e],null==p||p.set(s,g)}const[y,h]=g;let w=f&&f.get(y);return w&&w[1].f===!!h||(w=((o,s)=>{const c={f:s};let l=!1;const f=(e,t)=>{if(!l){let s=c[r].get(o);if(s||(s={},c[r].set(o,s)),e===n)s[n]=!0;else{let r=s[e];r||(r=new Set,s[e]=r),r.add(t)}}},i={get:(e,n)=>n===t?o:(f(\"k\",n),a(Reflect.get(e,n),c[r],c.c,c.t)),has:(t,n)=>n===e?(l=!0,c[r].delete(o),!0):(f(\"h\",n),Reflect.has(t,n)),getOwnPropertyDescriptor:(e,t)=>(f(\"o\",t),Reflect.getOwnPropertyDescriptor(e,t)),ownKeys:e=>(f(n),Reflect.ownKeys(e))};return s&&(i.set=i.deleteProperty=()=>!1),[i,c]})(y,!!h),w[1].p=o(h||y,w[0]),f&&f.set(y,w)),w[1][r]=c,w[1].c=f,w[1].t=p,w[1].p},p=(e,t,r,o,s=Object.is)=>{if(s(e,t))return!1;if(!f(e)||!f(t))return!0;const c=r.get(u(e));if(!c)return!0;if(o){const r=o.get(e);if(r&&r.n===t)return r.g;o.set(e,{n:t,g:!1})}let l=null;try{for(const r of c.h||[])if(l=Reflect.has(e,r)!==Reflect.has(t,r),l)return l;if(!0===c[n]){if(l=((e,t)=>{const r=Reflect.ownKeys(e),n=Reflect.ownKeys(t);return r.length!==n.length||r.some((e,t)=>e!==n[t])})(e,t),l)return l}else for(const r of c.o||[])if(l=!!Reflect.getOwnPropertyDescriptor(e,r)!=!!Reflect.getOwnPropertyDescriptor(t,r),l)return l;for(const n of c.k||[])if(l=p(e[n],t[n],r,o,s),l)return l;return null===l&&(l=!0),l}finally{o&&o.set(e,{n:t,g:l})}},g=t=>!!l(t)&&e in t,y=e=>l(e)&&e[t]||null,h=(e,t=!0)=>{c.set(e,t)},w=(e,t,r)=>{const o=[],s=new WeakSet,c=(e,l)=>{if(s.has(e))return;f(e)&&s.add(e);const i=f(e)&&t.get(u(e));if(i){var a,p;if(null==(a=i.h)||a.forEach(e=>{const t=`:has(${String(e)})`;o.push(l?[...l,t]:[t])}),!0===i[n]){const e=\":ownKeys\";o.push(l?[...l,e]:[e])}else{var g;null==(g=i.o)||g.forEach(e=>{const t=`:hasOwn(${String(e)})`;o.push(l?[...l,t]:[t])})}null==(p=i.k)||p.forEach(t=>{r&&!(\"value\"in(Object.getOwnPropertyDescriptor(e,t)||{}))||c(e[t],l?[...l,t]:[t])})}else l&&o.push(l)};return c(e),o},O=e=>{o=e};export{w as affectedToPathList,a as createProxy,y as getUntracked,p as isChanged,h as markToTrack,O as replaceNewProxy,g as trackMemo};\n//# sourceMappingURL=index.modern.mjs.map\n","// src/proxy.ts\nimport { getUntracked, markToTrack } from \"proxy-compare\";\nvar isDev = process.env.NODE_ENV !== \"production\";\nvar isObject = (x) => typeof x === \"object\" && x !== null;\nvar proxyStateMap = /* @__PURE__ */ new WeakMap();\nvar refSet = /* @__PURE__ */ new WeakSet();\nvar buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) => new Proxy(target, handler), canProxy = (x) => isObject(x) && !refSet.has(x) && (Array.isArray(x) || !(Symbol.iterator in x)) && !(x instanceof WeakMap) && !(x instanceof WeakSet) && !(x instanceof Error) && !(x instanceof Number) && !(x instanceof Date) && !(x instanceof String) && !(x instanceof RegExp) && !(x instanceof ArrayBuffer), defaultHandlePromise = (promise) => {\n switch (promise.status) {\n case \"fulfilled\":\n return promise.value;\n case \"rejected\":\n throw promise.reason;\n default:\n throw promise;\n }\n}, snapCache = /* @__PURE__ */ new WeakMap(), createSnapshot = (target, version, handlePromise = defaultHandlePromise) => {\n const cache = snapCache.get(target);\n if (cache?.[0] === version) {\n return cache[1];\n }\n const snap = Array.isArray(target) ? [] : Object.create(Object.getPrototypeOf(target));\n markToTrack(snap, true);\n snapCache.set(target, [version, snap]);\n Reflect.ownKeys(target).forEach((key) => {\n const value = Reflect.get(target, key);\n if (refSet.has(value)) {\n markToTrack(value, false);\n snap[key] = value;\n } else if (value instanceof Promise) {\n Object.defineProperty(snap, key, {\n get() {\n return handlePromise(value);\n }\n });\n } else if (proxyStateMap.has(value)) {\n snap[key] = snapshot(value, handlePromise);\n } else {\n snap[key] = value;\n }\n });\n return Object.freeze(snap);\n}, proxyCache = /* @__PURE__ */ new WeakMap(), versionHolder = [1, 1], proxyFunction2 = (initialObject) => {\n if (!isObject(initialObject)) {\n throw new Error(\"object required\");\n }\n const found = proxyCache.get(initialObject);\n if (found) {\n return found;\n }\n let version = versionHolder[0];\n const listeners = /* @__PURE__ */ new Set();\n const notifyUpdate = (op, nextVersion = ++versionHolder[0]) => {\n if (version !== nextVersion) {\n version = nextVersion;\n listeners.forEach((listener) => listener(op, nextVersion));\n }\n };\n let checkVersion = versionHolder[1];\n const ensureVersion = (nextCheckVersion = ++versionHolder[1]) => {\n if (checkVersion !== nextCheckVersion && !listeners.size) {\n checkVersion = nextCheckVersion;\n propProxyStates.forEach(([propProxyState]) => {\n const propVersion = propProxyState[1](nextCheckVersion);\n if (propVersion > version) {\n version = propVersion;\n }\n });\n }\n return version;\n };\n const createPropListener = (prop) => (op, nextVersion) => {\n const newOp = [...op];\n newOp[1] = [prop, ...newOp[1]];\n notifyUpdate(newOp, nextVersion);\n };\n const propProxyStates = /* @__PURE__ */ new Map();\n const addPropListener = (prop, propProxyState) => {\n if (isDev && propProxyStates.has(prop)) {\n throw new Error(\"prop listener already exists\");\n }\n if (listeners.size) {\n const remove = propProxyState[3](createPropListener(prop));\n propProxyStates.set(prop, [propProxyState, remove]);\n } else {\n propProxyStates.set(prop, [propProxyState]);\n }\n };\n const removePropListener = (prop) => {\n const entry = propProxyStates.get(prop);\n if (entry) {\n propProxyStates.delete(prop);\n entry[1]?.();\n }\n };\n const addListener = (listener) => {\n listeners.add(listener);\n if (listeners.size === 1) {\n propProxyStates.forEach(([propProxyState, prevRemove], prop) => {\n if (isDev && prevRemove) {\n throw new Error(\"remove already exists\");\n }\n const remove = propProxyState[3](createPropListener(prop));\n propProxyStates.set(prop, [propProxyState, remove]);\n });\n }\n const removeListener = () => {\n listeners.delete(listener);\n if (listeners.size === 0) {\n propProxyStates.forEach(([propProxyState, remove], prop) => {\n if (remove) {\n remove();\n propProxyStates.set(prop, [propProxyState]);\n }\n });\n }\n };\n return removeListener;\n };\n const baseObject = Array.isArray(initialObject) ? [] : Object.create(Object.getPrototypeOf(initialObject));\n const handler = {\n deleteProperty(target, prop) {\n const prevValue = Reflect.get(target, prop);\n removePropListener(prop);\n const deleted = Reflect.deleteProperty(target, prop);\n if (deleted) {\n notifyUpdate([\"delete\", [prop], prevValue]);\n }\n return deleted;\n },\n set(target, prop, value, receiver) {\n const hasPrevValue = Reflect.has(target, prop);\n const prevValue = Reflect.get(target, prop, receiver);\n if (hasPrevValue && (objectIs(prevValue, value) || proxyCache.has(value) && objectIs(prevValue, proxyCache.get(value)))) {\n return true;\n }\n removePropListener(prop);\n if (isObject(value)) {\n value = getUntracked(value) || value;\n }\n let nextValue = value;\n if (Object.getOwnPropertyDescriptor(target, prop)?.set) {\n } else if (value instanceof Promise) {\n value.then((v) => {\n value.status = \"fulfilled\";\n value.value = v;\n notifyUpdate([\"resolve\", [prop], v]);\n }).catch((e) => {\n value.status = \"rejected\";\n value.reason = e;\n notifyUpdate([\"reject\", [prop], e]);\n });\n } else {\n if (!proxyStateMap.has(value) && canProxy(value)) {\n nextValue = proxy(value);\n }\n const childProxyState = !refSet.has(nextValue) && proxyStateMap.get(nextValue);\n if (childProxyState) {\n addPropListener(prop, childProxyState);\n }\n }\n Reflect.set(target, prop, nextValue, receiver);\n notifyUpdate([\"set\", [prop], value, prevValue]);\n return true;\n }\n };\n const proxyObject = newProxy(baseObject, handler);\n proxyCache.set(initialObject, proxyObject);\n const proxyState = [baseObject, ensureVersion, createSnapshot, addListener];\n proxyStateMap.set(proxyObject, proxyState);\n Reflect.ownKeys(initialObject).forEach((key) => {\n const desc = Object.getOwnPropertyDescriptor(initialObject, key);\n if (desc.get || desc.set) {\n Object.defineProperty(baseObject, key, desc);\n } else {\n proxyObject[key] = initialObject[key];\n }\n });\n return proxyObject;\n}) => [\n // public functions\n proxyFunction2,\n // shared state\n proxyStateMap,\n refSet,\n // internal things\n objectIs,\n newProxy,\n canProxy,\n defaultHandlePromise,\n snapCache,\n createSnapshot,\n proxyCache,\n versionHolder\n];\nvar [proxyFunction] = buildProxyFunction();\nfunction proxy(initialObject = {}) {\n return proxyFunction(initialObject);\n}\nfunction subscribe(proxyObject, callback, notifyInSync) {\n const proxyState = proxyStateMap.get(proxyObject);\n if (isDev && !proxyState) {\n console.warn(\"Please use proxy object\");\n }\n let promise;\n const ops = [];\n const addListener = proxyState[3];\n let isListenerActive = false;\n const listener = (op) => {\n ops.push(op);\n if (notifyInSync) {\n callback(ops.splice(0));\n return;\n }\n if (!promise) {\n promise = Promise.resolve().then(() => {\n promise = void 0;\n if (isListenerActive) {\n callback(ops.splice(0));\n }\n });\n }\n };\n const removeListener = addListener(listener);\n isListenerActive = true;\n return () => {\n isListenerActive = false;\n removeListener();\n };\n}\nfunction snapshot(proxyObject, handlePromise) {\n const proxyState = proxyStateMap.get(proxyObject);\n if (isDev && !proxyState) {\n console.warn(\"Please use proxy object\");\n }\n const [target, ensureVersion, createSnapshot] = proxyState;\n return createSnapshot(target, ensureVersion(), handlePromise);\n}\nfunction ref(obj) {\n refSet.add(obj);\n return obj;\n}\n\n// src/proxy-computed.ts\nfunction proxyWithComputed(initialObject, computedFns) {\n const keys = Object.keys(computedFns);\n keys.forEach((key) => {\n if (Object.getOwnPropertyDescriptor(initialObject, key)) {\n throw new Error(\"object property already defined\");\n }\n const computedFn = computedFns[key];\n const { get, set } = typeof computedFn === \"function\" ? { get: computedFn } : computedFn;\n const desc = {};\n desc.get = () => get(snapshot(proxyObject));\n if (set) {\n desc.set = (newValue) => set(proxyObject, newValue);\n }\n Object.defineProperty(initialObject, key, desc);\n });\n const proxyObject = proxy(initialObject);\n return proxyObject;\n}\n\n// src/subscribe-key.ts\nvar defaultCompareFn = (prev, next) => Object.is(prev, next);\nfunction subscribeKey(obj, key, fn, sync, compareFn) {\n let prev = Reflect.get(snapshot(obj), key);\n const isEqual = compareFn || defaultCompareFn;\n function onSnapshotChange() {\n const snap = snapshot(obj);\n if (isEqual(prev, snap[key]))\n return;\n fn(snap[key]);\n prev = Reflect.get(snap, key);\n }\n return subscribe(obj, onSnapshotChange, sync);\n}\nexport {\n proxy,\n proxyWithComputed,\n ref,\n snapshot,\n subscribe,\n subscribeKey\n};\n//# sourceMappingURL=index.mjs.map","function set(obj, key, val) {\n\tif (typeof val.value === 'object') val.value = klona(val.value);\n\tif (!val.enumerable || val.get || val.set || !val.configurable || !val.writable || key === '__proto__') {\n\t\tObject.defineProperty(obj, key, val);\n\t} else obj[key] = val.value;\n}\n\nexport function klona(x) {\n\tif (typeof x !== 'object') return x;\n\n\tvar i=0, k, list, tmp, str=Object.prototype.toString.call(x);\n\n\tif (str === '[object Object]') {\n\t\ttmp = Object.create(x.__proto__ || null);\n\t} else if (str === '[object Array]') {\n\t\ttmp = Array(x.length);\n\t} else if (str === '[object Set]') {\n\t\ttmp = new Set;\n\t\tx.forEach(function (val) {\n\t\t\ttmp.add(klona(val));\n\t\t});\n\t} else if (str === '[object Map]') {\n\t\ttmp = new Map;\n\t\tx.forEach(function (val, key) {\n\t\t\ttmp.set(klona(key), klona(val));\n\t\t});\n\t} else if (str === '[object Date]') {\n\t\ttmp = new Date(+x);\n\t} else if (str === '[object RegExp]') {\n\t\ttmp = new RegExp(x.source, x.flags);\n\t} else if (str === '[object DataView]') {\n\t\ttmp = new x.constructor( klona(x.buffer) );\n\t} else if (str === '[object ArrayBuffer]') {\n\t\ttmp = x.slice(0);\n\t} else if (str.slice(-6) === 'Array]') {\n\t\t// ArrayBuffer.isView(x)\n\t\t// ~> `new` bcuz `Buffer.slice` => ref\n\t\ttmp = new x.constructor(x);\n\t}\n\n\tif (tmp) {\n\t\tfor (list=Object.getOwnPropertySymbols(x); i < list.length; i++) {\n\t\t\tset(tmp, list[i], Object.getOwnPropertyDescriptor(x, list[i]));\n\t\t}\n\n\t\tfor (i=0, list=Object.getOwnPropertyNames(x); i < list.length; i++) {\n\t\t\tif (Object.hasOwnProperty.call(tmp, k=list[i]) && tmp[k] === x[k]) continue;\n\t\t\tset(tmp, k, Object.getOwnPropertyDescriptor(x, k));\n\t\t}\n\t}\n\n\treturn tmp || x;\n}\n","var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\n\n// src/index.ts\nimport { proxy as proxy2, ref as ref2, snapshot as snapshot2, subscribe as subscribe2 } from \"@zag-js/store\";\n\n// ../utilities/core/src/array.ts\nfunction clear(v) {\n while (v.length > 0)\n v.pop();\n return v;\n}\n\n// ../utilities/core/src/functions.ts\nvar runIfFn = (v, ...a) => {\n const res = typeof v === \"function\" ? v(...a) : v;\n return res ?? void 0;\n};\nvar cast = (v) => v;\nvar noop = () => {\n};\nvar callAll = (...fns) => (...a) => {\n fns.forEach(function(fn) {\n fn?.(...a);\n });\n};\nvar uuid = /* @__PURE__ */ (() => {\n let id = 0;\n return () => {\n id++;\n return id.toString(36);\n };\n})();\n\n// ../utilities/core/src/guard.ts\nvar isDev = () => process.env.NODE_ENV !== \"production\";\nvar isArray = (v) => Array.isArray(v);\nvar isObject = (v) => !(v == null || typeof v !== \"object\" || isArray(v));\nvar isNumber = (v) => typeof v === \"number\" && !Number.isNaN(v);\nvar isString = (v) => typeof v === \"string\";\nvar isFunction = (v) => typeof v === \"function\";\n\n// ../utilities/core/src/object.ts\nfunction compact(obj) {\n if (!isPlainObject(obj) || obj === void 0) {\n return obj;\n }\n const keys = Reflect.ownKeys(obj).filter((key) => typeof key === \"string\");\n const filtered = {};\n for (const key of keys) {\n const value = obj[key];\n if (value !== void 0) {\n filtered[key] = compact(value);\n }\n }\n return filtered;\n}\nvar isPlainObject = (value) => {\n return value && typeof value === \"object\" && value.constructor === Object;\n};\n\n// ../utilities/core/src/warning.ts\nfunction warn(...a) {\n const m = a.length === 1 ? a[0] : a[1];\n const c = a.length === 2 ? a[0] : true;\n if (c && process.env.NODE_ENV !== \"production\") {\n console.warn(m);\n }\n}\nfunction invariant(...a) {\n const m = a.length === 1 ? a[0] : a[1];\n const c = a.length === 2 ? a[0] : true;\n if (c && process.env.NODE_ENV !== \"production\") {\n throw new Error(m);\n }\n}\n\n// src/deep-merge.ts\nfunction deepMerge(source, ...objects) {\n for (const obj of objects) {\n const target = compact(obj);\n for (const key in target) {\n if (isObject(obj[key])) {\n if (!source[key]) {\n source[key] = {};\n }\n deepMerge(source[key], obj[key]);\n } else {\n source[key] = obj[key];\n }\n }\n }\n return source;\n}\n\n// src/utils.ts\nimport { klona } from \"klona/full\";\nfunction structuredClone(v) {\n return klona(v);\n}\nfunction toEvent(event) {\n const obj = isString(event) ? { type: event } : event;\n return obj;\n}\nfunction toArray(value) {\n if (!value)\n return [];\n return isArray(value) ? value.slice() : [value];\n}\nfunction isGuardHelper(value) {\n return isObject(value) && value.predicate != null;\n}\n\n// src/guard-utils.ts\nvar Truthy = () => true;\nfunction exec(guardMap, ctx, event, meta) {\n return (guard) => {\n if (isString(guard)) {\n return !!guardMap[guard]?.(ctx, event, meta);\n }\n if (isFunction(guard)) {\n return guard(ctx, event, meta);\n }\n return guard.predicate(guardMap)(ctx, event, meta);\n };\n}\nfunction or(...conditions) {\n return {\n predicate: (guardMap) => (ctx, event, meta) => conditions.map(exec(guardMap, ctx, event, meta)).some(Boolean)\n };\n}\nfunction and(...conditions) {\n return {\n predicate: (guardMap) => (ctx, event, meta) => conditions.map(exec(guardMap, ctx, event, meta)).every(Boolean)\n };\n}\nfunction not(condition) {\n return {\n predicate: (guardMap) => (ctx, event, meta) => {\n return !exec(guardMap, ctx, event, meta)(condition);\n }\n };\n}\nfunction stateIn(...values) {\n return (_ctx, _evt, meta) => meta.state.matches(...values);\n}\nvar guards = { or, and, not, stateIn };\nfunction choose(actions) {\n return {\n predicate: (guardMap) => (ctx, event, meta) => actions.find((def) => {\n const guard = def.guard ?? Truthy;\n return exec(guardMap, ctx, event, meta)(guard);\n })?.actions\n };\n}\nfunction determineGuardFn(guard, guardMap) {\n guard = guard ?? Truthy;\n return (context, event, meta) => {\n if (isString(guard)) {\n const value = guardMap[guard];\n return isFunction(value) ? value(context, event, meta) : value;\n }\n if (isGuardHelper(guard)) {\n return guard.predicate(guardMap)(context, event, meta);\n }\n return guard?.(context, event, meta);\n };\n}\nfunction determineActionsFn(values, guardMap) {\n return (context, event, meta) => {\n if (isGuardHelper(values)) {\n return values.predicate(guardMap)(context, event, meta);\n }\n return values;\n };\n}\n\n// src/machine.ts\nimport { ref, snapshot, subscribe, subscribeKey } from \"@zag-js/store\";\n\n// src/create-proxy.ts\nimport { proxy, proxyWithComputed } from \"@zag-js/store\";\nfunction createProxy(config) {\n const computedContext = config.computed ?? cast({});\n const initialContext = config.context ?? cast({});\n const state = proxy({\n value: config.initial ?? \"\",\n previousValue: \"\",\n event: cast({}),\n previousEvent: cast({}),\n context: proxyWithComputed(initialContext, computedContext),\n done: false,\n tags: [],\n hasTag(tag) {\n return this.tags.includes(tag);\n },\n matches(...value) {\n return value.includes(this.value);\n },\n can(event) {\n return cast(this).nextEvents.includes(event);\n },\n get nextEvents() {\n const stateEvents = config.states?.[this.value]?.[\"on\"] ?? {};\n const globalEvents = config?.on ?? {};\n return Object.keys({ ...stateEvents, ...globalEvents });\n },\n get changed() {\n if (this.event.value === \"machine.init\" /* Init */ || !this.previousValue)\n return false;\n return this.value !== this.previousValue;\n }\n });\n return cast(state);\n}\n\n// src/delay-utils.ts\nfunction determineDelayFn(delay, delaysMap) {\n return (context, event) => {\n if (isNumber(delay))\n return delay;\n if (isFunction(delay)) {\n return delay(context, event);\n }\n if (isString(delay)) {\n const value = Number.parseFloat(delay);\n if (!Number.isNaN(value)) {\n return value;\n }\n if (delaysMap) {\n const valueOrFn = delaysMap?.[delay];\n invariant(\n valueOrFn == null,\n `[@zag-js/core > determine-delay] Cannot determine delay for \\`${delay}\\`. It doesn't exist in \\`options.delays\\``\n );\n return isFunction(valueOrFn) ? valueOrFn(context, event) : valueOrFn;\n }\n }\n };\n}\n\n// src/transition-utils.ts\nfunction toTarget(target) {\n return isString(target) ? { target } : target;\n}\nfunction determineTransitionFn(transitions, guardMap) {\n return (context, event, meta) => {\n return toArray(transitions).map(toTarget).find((transition) => {\n const determineGuard = determineGuardFn(transition.guard, guardMap);\n const guard = determineGuard(context, event, meta);\n return guard ?? transition.target ?? transition.actions;\n });\n };\n}\n\n// src/machine.ts\nvar Machine = class {\n // Let's get started!\n constructor(config, options) {\n __publicField(this, \"status\", \"Not Started\" /* NotStarted */);\n __publicField(this, \"state\");\n __publicField(this, \"initialState\");\n __publicField(this, \"initialContext\");\n __publicField(this, \"id\");\n __publicField(this, \"type\", \"machine\" /* Machine */);\n // Cleanup function map (per state)\n __publicField(this, \"activityEvents\", /* @__PURE__ */ new Map());\n __publicField(this, \"delayedEvents\", /* @__PURE__ */ new Map());\n // state update listeners the user can opt-in for\n __publicField(this, \"stateListeners\", /* @__PURE__ */ new Set());\n __publicField(this, \"contextListeners\", /* @__PURE__ */ new Set());\n __publicField(this, \"eventListeners\", /* @__PURE__ */ new Set());\n __publicField(this, \"doneListeners\", /* @__PURE__ */ new Set());\n __publicField(this, \"contextWatchers\", /* @__PURE__ */ new Set());\n // Cleanup functions (for `subscribe`)\n __publicField(this, \"removeStateListener\", noop);\n __publicField(this, \"removeEventListener\", noop);\n __publicField(this, \"removeContextListener\", noop);\n // For Parent <==> Spawned Actor relationship\n __publicField(this, \"parent\");\n __publicField(this, \"children\", /* @__PURE__ */ new Map());\n // A map of guard, action, delay implementations\n __publicField(this, \"guardMap\");\n __publicField(this, \"actionMap\");\n __publicField(this, \"delayMap\");\n __publicField(this, \"activityMap\");\n __publicField(this, \"sync\");\n __publicField(this, \"options\");\n __publicField(this, \"config\");\n // Starts the interpreted machine.\n __publicField(this, \"start\", (init) => {\n this.state.value = \"\";\n if (this.status === \"Running\" /* Running */) {\n return this;\n }\n this.status = \"Running\" /* Running */;\n this.removeStateListener = subscribe(\n this.state,\n () => {\n this.stateListeners.forEach((listener) => {\n listener(this.stateSnapshot);\n });\n },\n this.sync\n );\n this.removeEventListener = subscribeKey(\n this.state,\n \"event\",\n (event2) => {\n this.executeActions(this.config.onEvent, event2);\n this.eventListeners.forEach((listener) => {\n listener(event2);\n });\n },\n this.sync\n );\n this.removeContextListener = subscribe(\n this.state.context,\n () => {\n this.log(\"Context:\", this.contextSnapshot);\n this.contextListeners.forEach((listener) => {\n listener(this.contextSnapshot);\n });\n },\n this.sync || this.options.debug\n );\n this.setupContextWatchers();\n this.executeActivities(toEvent(\"machine.start\" /* Start */), toArray(this.config.activities), \"machine.start\" /* Start */);\n this.executeActions(this.config.entry, toEvent(\"machine.start\" /* Start */));\n const event = toEvent(\"machine.init\" /* Init */);\n const target = isObject(init) ? init.value : init;\n const context = isObject(init) ? init.context : void 0;\n if (context) {\n this.setContext(context);\n }\n const transition = {\n target: target ?? this.config.initial\n };\n const next = this.getNextStateInfo(transition, event);\n this.initialState = next;\n this.performStateChangeEffects(this.state.value, next, event);\n return this;\n });\n __publicField(this, \"setupContextWatchers\", () => {\n for (const [key, fn] of Object.entries(this.config.watch ?? {})) {\n const compareFn = this.options.compareFns?.[key];\n const cleanup = subscribeKey(\n this.state.context,\n key,\n () => {\n this.executeActions(fn, this.state.event);\n },\n this.sync,\n compareFn\n );\n this.contextWatchers.add(cleanup);\n }\n });\n // Stops the interpreted machine\n __publicField(this, \"stop\", () => {\n if (this.status === \"Stopped\" /* Stopped */)\n return;\n this.performExitEffects(this.state.value, toEvent(\"machine.stop\" /* Stop */));\n this.executeActions(this.config.exit, toEvent(\"machine.stop\" /* Stop */));\n this.setState(\"\");\n this.setEvent(\"machine.stop\" /* Stop */);\n this.stopStateListeners();\n this.stopChildren();\n this.stopActivities();\n this.stopDelayedEvents();\n this.stopContextWatchers();\n this.stopEventListeners();\n this.stopContextListeners();\n this.status = \"Stopped\" /* Stopped */;\n return this;\n });\n __publicField(this, \"stopEventListeners\", () => {\n this.eventListeners.clear();\n this.removeEventListener();\n });\n __publicField(this, \"stopContextListeners\", () => {\n this.contextListeners.clear();\n this.removeContextListener();\n });\n __publicField(this, \"stopStateListeners\", () => {\n this.removeStateListener();\n this.stateListeners.clear();\n });\n __publicField(this, \"stopContextWatchers\", () => {\n this.contextWatchers.forEach((fn) => fn());\n this.contextWatchers.clear();\n });\n __publicField(this, \"stopDelayedEvents\", () => {\n this.delayedEvents.forEach((state) => {\n state.forEach((stop) => stop());\n });\n this.delayedEvents.clear();\n });\n // Cleanup running activities (e.g `setInterval`, invoked callbacks, promises)\n __publicField(this, \"stopActivities\", (state) => {\n if (state) {\n this.activityEvents.get(state)?.forEach((stop) => stop());\n this.activityEvents.get(state)?.clear();\n this.activityEvents.delete(state);\n } else {\n this.activityEvents.forEach((state2) => {\n state2.forEach((stop) => stop());\n state2.clear();\n });\n this.activityEvents.clear();\n }\n });\n /**\n * Function to send event to spawned child machine or actor\n */\n __publicField(this, \"sendChild\", (evt, to) => {\n const event = toEvent(evt);\n const id = runIfFn(to, this.contextSnapshot);\n const child = this.children.get(id);\n if (!child) {\n invariant(`[@zag-js/core] Cannot send '${event.type}' event to unknown child`);\n }\n child.send(event);\n });\n /**\n * Function to stop a running child machine or actor\n */\n __publicField(this, \"stopChild\", (id) => {\n if (!this.children.has(id)) {\n invariant(`[@zag-js/core > stop-child] Cannot stop unknown child ${id}`);\n }\n this.children.get(id).stop();\n this.children.delete(id);\n });\n __publicField(this, \"removeChild\", (id) => {\n this.children.delete(id);\n });\n // Stop and delete spawned actors\n __publicField(this, \"stopChildren\", () => {\n this.children.forEach((child) => child.stop());\n this.children.clear();\n });\n __publicField(this, \"setParent\", (parent) => {\n this.parent = parent;\n });\n __publicField(this, \"spawn\", (src, id) => {\n const actor = runIfFn(src);\n if (id)\n actor.id = id;\n actor.type = \"machine.actor\" /* Actor */;\n actor.setParent(this);\n this.children.set(actor.id, cast(actor));\n actor.onDone(() => {\n this.removeChild(actor.id);\n }).start();\n return cast(ref(actor));\n });\n __publicField(this, \"stopActivity\", (key) => {\n if (!this.state.value)\n return;\n const cleanups = this.activityEvents.get(this.state.value);\n cleanups?.get(key)?.();\n cleanups?.delete(key);\n });\n __publicField(this, \"addActivityCleanup\", (state, key, cleanup) => {\n if (!state)\n return;\n if (!this.activityEvents.has(state)) {\n this.activityEvents.set(state, /* @__PURE__ */ new Map([[key, cleanup]]));\n } else {\n this.activityEvents.get(state)?.set(key, cleanup);\n }\n });\n __publicField(this, \"setState\", (target) => {\n this.state.previousValue = this.state.value;\n this.state.value = target;\n const stateNode = this.getStateNode(target);\n if (target == null) {\n clear(this.state.tags);\n } else {\n this.state.tags = toArray(stateNode?.tags);\n }\n });\n __publicField(this, \"transformContext\", (context) => {\n this.options?.transformContext?.(context);\n return context;\n });\n /**\n * To used within side effects for React or Vue to update context\n */\n __publicField(this, \"setContext\", (context) => {\n if (!context)\n return;\n const newContext = compact(this.transformContext(context));\n deepMerge(this.state.context, newContext);\n });\n __publicField(this, \"setOptions\", (options) => {\n const opts = compact(options);\n this.actionMap = { ...this.actionMap, ...opts.actions };\n this.delayMap = { ...this.delayMap, ...opts.delays };\n this.activityMap = { ...this.activityMap, ...opts.activities };\n this.guardMap = { ...this.guardMap, ...opts.guards };\n });\n __publicField(this, \"getStateNode\", (state) => {\n if (!state)\n return;\n return this.config.states?.[state];\n });\n __publicField(this, \"getNextStateInfo\", (transitions, event) => {\n const transition = this.determineTransition(transitions, event);\n const isTargetless = !transition?.target;\n const target = transition?.target ?? this.state.value;\n const changed = this.state.value !== target;\n const stateNode = this.getStateNode(target);\n const reenter = !isTargetless && !changed && !transition?.internal;\n const info = {\n reenter,\n transition,\n stateNode,\n target,\n changed\n };\n this.log(\"NextState:\", `[${event.type}]`, this.state.value, \"---->\", info.target);\n return info;\n });\n __publicField(this, \"getActionFromDelayedTransition\", (transition) => {\n const event = toEvent(\"machine.after\" /* After */);\n const determineDelay = determineDelayFn(transition.delay, this.delayMap);\n const delay = determineDelay(this.contextSnapshot, event);\n let id;\n return {\n entry: () => {\n id = globalThis.setTimeout(() => {\n const next = this.getNextStateInfo(transition, event);\n this.performStateChangeEffects(this.state.value, next, event);\n }, delay);\n },\n exit: () => {\n globalThis.clearTimeout(id);\n }\n };\n });\n /**\n * All `after` events leverage `setTimeout` and `clearTimeout`,\n * we invoke the `clearTimeout` on exit and `setTimeout` on entry.\n *\n * To achieve this, we split the `after` defintion into `entry` and `exit`\n * functions and append them to the state's `entry` and `exit` actions\n */\n __publicField(this, \"getDelayedEventActions\", (state) => {\n const stateNode = this.getStateNode(state);\n const event = toEvent(\"machine.after\" /* After */);\n if (!stateNode || !stateNode.after)\n return;\n const entries = [];\n const exits = [];\n if (isArray(stateNode.after)) {\n const transition = this.determineTransition(stateNode.after, event);\n if (!transition)\n return;\n const actions = this.getActionFromDelayedTransition(transition);\n entries.push(actions.entry);\n exits.push(actions.exit);\n } else if (isObject(stateNode.after)) {\n for (const delay in stateNode.after) {\n const transition = stateNode.after[delay];\n let resolvedTransition = {};\n if (isArray(transition)) {\n const picked = this.determineTransition(transition, event);\n if (picked)\n resolvedTransition = picked;\n } else if (isString(transition)) {\n resolvedTransition = { target: transition, delay };\n } else {\n resolvedTransition = { ...transition, delay };\n }\n const actions = this.getActionFromDelayedTransition(resolvedTransition);\n entries.push(actions.entry);\n exits.push(actions.exit);\n }\n }\n return { entries, exits };\n });\n /**\n * Function to executes defined actions. It can accept actions as string\n * (referencing `options.actions`) or actual functions.\n */\n __publicField(this, \"executeActions\", (actions, event) => {\n const pickedActions = determineActionsFn(actions, this.guardMap)(this.contextSnapshot, event, this.guardMeta);\n for (const action of toArray(pickedActions)) {\n const fn = isString(action) ? this.actionMap?.[action] : action;\n warn(\n isString(action) && !fn,\n `[@zag-js/core > execute-actions] No implementation found for action: \\`${action}\\``\n );\n fn?.(this.state.context, event, this.meta);\n }\n });\n /**\n * Function to execute running activities and registers\n * their cleanup function internally (to be called later on when we exit the state)\n */\n __publicField(this, \"executeActivities\", (event, activities, state) => {\n for (const activity of activities) {\n const fn = isString(activity) ? this.activityMap?.[activity] : activity;\n if (!fn) {\n warn(`[@zag-js/core > execute-activity] No implementation found for activity: \\`${activity}\\``);\n continue;\n }\n const cleanup = fn(this.state.context, event, this.meta);\n if (cleanup) {\n const key = isString(activity) ? activity : activity.name || uuid();\n this.addActivityCleanup(state ?? this.state.value, key, cleanup);\n }\n }\n });\n /**\n * Normalizes the `every` definition to transition. `every` can be:\n * - An array of possible actions to run (we need to pick the first match based on guard)\n * - An object of intervals and actions\n */\n __publicField(this, \"createEveryActivities\", (every, callbackfn) => {\n if (!every)\n return;\n const event = toEvent(\"machine.every\" /* Every */);\n if (isArray(every)) {\n const picked = toArray(every).find((transition) => {\n const delayOrFn = transition.delay;\n const determineDelay2 = determineDelayFn(delayOrFn, this.delayMap);\n const delay2 = determineDelay2(this.contextSnapshot, event);\n const determineGuard = determineGuardFn(transition.guard, this.guardMap);\n const guard = determineGuard(this.contextSnapshot, event, this.guardMeta);\n return guard ?? delay2 != null;\n });\n if (!picked)\n return;\n const determineDelay = determineDelayFn(picked.delay, this.delayMap);\n const delay = determineDelay(this.contextSnapshot, event);\n const activity = () => {\n const id = globalThis.setInterval(() => {\n this.executeActions(picked.actions, event);\n }, delay);\n return () => {\n globalThis.clearInterval(id);\n };\n };\n callbackfn(activity);\n } else {\n for (const interval in every) {\n const actions = every?.[interval];\n const determineDelay = determineDelayFn(interval, this.delayMap);\n const delay = determineDelay(this.contextSnapshot, event);\n const activity = () => {\n const id = globalThis.setInterval(() => {\n this.executeActions(actions, event);\n }, delay);\n return () => {\n globalThis.clearInterval(id);\n };\n };\n callbackfn(activity);\n }\n }\n });\n __publicField(this, \"setEvent\", (event) => {\n this.state.previousEvent = this.state.event;\n this.state.event = ref(toEvent(event));\n });\n __publicField(this, \"performExitEffects\", (current, event) => {\n const currentState = this.state.value;\n if (currentState === \"\")\n return;\n const stateNode = current ? this.getStateNode(current) : void 0;\n this.stopActivities(currentState);\n const _exit = determineActionsFn(stateNode?.exit, this.guardMap)(this.contextSnapshot, event, this.guardMeta);\n const exitActions = toArray(_exit);\n const afterExitActions = this.delayedEvents.get(currentState);\n if (afterExitActions) {\n exitActions.push(...afterExitActions);\n }\n this.executeActions(exitActions, event);\n this.eventListeners.clear();\n });\n __publicField(this, \"performEntryEffects\", (next, event) => {\n const stateNode = this.getStateNode(next);\n const activities = toArray(stateNode?.activities);\n this.createEveryActivities(stateNode?.every, (activity) => {\n activities.unshift(activity);\n });\n if (activities.length > 0) {\n this.executeActivities(event, activities);\n }\n const pickedActions = determineActionsFn(stateNode?.entry, this.guardMap)(\n this.contextSnapshot,\n event,\n this.guardMeta\n );\n const entryActions = toArray(pickedActions);\n const afterActions = this.getDelayedEventActions(next);\n if (stateNode?.after && afterActions) {\n this.delayedEvents.set(next, afterActions?.exits);\n entryActions.push(...afterActions.entries);\n }\n this.executeActions(entryActions, event);\n if (stateNode?.type === \"final\") {\n this.state.done = true;\n this.doneListeners.forEach((listener) => {\n listener(this.stateSnapshot);\n });\n this.stop();\n }\n });\n __publicField(this, \"performTransitionEffects\", (transitions, event) => {\n const transition = this.determineTransition(transitions, event);\n this.executeActions(transition?.actions, event);\n });\n /**\n * Performs all the requires side-effects or reactions when\n * we move from state A => state B.\n *\n * The Effect order:\n * Exit actions (current state) => Transition actions => Go to state => Entry actions (next state)\n */\n __publicField(this, \"performStateChangeEffects\", (current, next, event) => {\n this.setEvent(event);\n const changed = next.changed || next.reenter;\n if (changed) {\n this.performExitEffects(current, event);\n }\n this.performTransitionEffects(next.transition, event);\n this.setState(next.target);\n if (changed) {\n this.performEntryEffects(next.target, event);\n }\n });\n __publicField(this, \"determineTransition\", (transition, event) => {\n const fn = determineTransitionFn(transition, this.guardMap);\n return fn?.(this.contextSnapshot, event, this.guardMeta);\n });\n /**\n * Function to send event to parent machine from spawned child\n */\n __publicField(this, \"sendParent\", (evt) => {\n if (!this.parent) {\n invariant(\"[@zag-js/core > send-parent] Cannot send event to an unknown parent\");\n }\n const event = toEvent(evt);\n this.parent?.send(event);\n });\n __publicField(this, \"log\", (...args) => {\n if (isDev() && this.options.debug) {\n console.log(...args);\n }\n });\n /**\n * Function to send an event to current machine\n */\n __publicField(this, \"send\", (evt) => {\n const event = toEvent(evt);\n this.transition(this.state.value, event);\n });\n __publicField(this, \"transition\", (state, evt) => {\n const stateNode = isString(state) ? this.getStateNode(state) : state?.stateNode;\n const event = toEvent(evt);\n if (!stateNode && !this.config.on) {\n const msg = this.status === \"Stopped\" /* Stopped */ ? \"[@zag-js/core > transition] Cannot transition a stopped machine\" : `[@zag-js/core > transition] State does not have a definition for \\`state\\`: ${state}, \\`event\\`: ${event.type}`;\n warn(msg);\n return;\n }\n const transitions = stateNode?.on?.[event.type] ?? this.config.on?.[event.type];\n const next = this.getNextStateInfo(transitions, event);\n this.performStateChangeEffects(this.state.value, next, event);\n return next.stateNode;\n });\n __publicField(this, \"subscribe\", (listener) => {\n this.stateListeners.add(listener);\n if (this.status === \"Running\" /* Running */) {\n listener(this.stateSnapshot);\n }\n return () => {\n this.stateListeners.delete(listener);\n };\n });\n __publicField(this, \"onDone\", (listener) => {\n this.doneListeners.add(listener);\n return this;\n });\n __publicField(this, \"onTransition\", (listener) => {\n this.stateListeners.add(listener);\n if (this.status === \"Running\" /* Running */) {\n listener(this.stateSnapshot);\n }\n return this;\n });\n __publicField(this, \"onChange\", (listener) => {\n this.contextListeners.add(listener);\n return this;\n });\n __publicField(this, \"onEvent\", (listener) => {\n this.eventListeners.add(listener);\n return this;\n });\n this.config = structuredClone(config);\n this.options = structuredClone(options ?? {});\n this.id = this.config.id ?? `machine-${uuid()}`;\n this.guardMap = this.options?.guards ?? {};\n this.actionMap = this.options?.actions ?? {};\n this.delayMap = this.options?.delays ?? {};\n this.activityMap = this.options?.activities ?? {};\n this.sync = this.options?.sync ?? false;\n this.state = createProxy(this.config);\n this.initialContext = snapshot(this.state.context);\n this.transformContext(this.state.context);\n const event = toEvent(\"machine.created\" /* Created */);\n this.executeActions(this.config?.created, event);\n }\n // immutable state value\n get stateSnapshot() {\n return cast(snapshot(this.state));\n }\n getState() {\n return this.stateSnapshot;\n }\n // immutable context value\n get contextSnapshot() {\n return this.stateSnapshot.context;\n }\n /**\n * A reference to the instance methods of the machine.\n * Useful when spawning child machines and managing the communication between them.\n */\n get self() {\n const self = this;\n return {\n id: this.id,\n send: this.send.bind(this),\n sendParent: this.sendParent.bind(this),\n sendChild: this.sendChild.bind(this),\n stop: this.stop.bind(this),\n stopChild: this.stopChild.bind(this),\n spawn: this.spawn.bind(this),\n stopActivity: this.stopActivity.bind(this),\n get state() {\n return self.stateSnapshot;\n },\n get initialContext() {\n return self.initialContext;\n },\n get initialState() {\n return self.initialState?.target ?? \"\";\n }\n };\n }\n get meta() {\n return {\n state: this.stateSnapshot,\n guards: this.guardMap,\n send: this.send.bind(this),\n self: this.self,\n initialContext: this.initialContext,\n initialState: this.initialState?.target ?? \"\",\n getState: () => this.stateSnapshot,\n getAction: (key) => this.actionMap[key],\n getGuard: (key) => this.guardMap[key]\n };\n }\n get guardMeta() {\n return {\n state: this.stateSnapshot\n };\n }\n get [Symbol.toStringTag]() {\n return \"Machine\";\n }\n};\nvar createMachine = (config, options) => new Machine(config, options);\n\n// src/merge-props.ts\nvar clsx = (...args) => args.map((str) => str?.trim?.()).filter(Boolean).join(\" \");\nvar eventRegex = /^on[A-Z]/;\nfunction mergeProps(...args) {\n let result = {};\n for (let props of args) {\n for (let key in result) {\n if (eventRegex.test(key) && typeof result[key] === \"function\" && typeof props[key] === \"function\") {\n result[key] = callAll(result[key], props[key]);\n continue;\n }\n if (key === \"className\" || key === \"class\") {\n result[key] = clsx(result[key], props[key]);\n continue;\n }\n if (key === \"style\") {\n result[key] = Object.assign({}, result[key] ?? {}, props[key] ?? {});\n continue;\n }\n result[key] = props[key] !== void 0 ? props[key] : result[key];\n }\n for (let key in props) {\n if (result[key] === void 0) {\n result[key] = props[key];\n }\n }\n }\n return result;\n}\nexport {\n Machine,\n choose,\n createMachine,\n deepMerge,\n guards,\n mergeProps,\n proxy2 as proxy,\n ref2 as ref,\n snapshot2 as snapshot,\n subscribe2 as subscribe\n};\n//# sourceMappingURL=index.mjs.map","// src/array.ts\nfunction toArray(v) {\n if (!v)\n return [];\n return Array.isArray(v) ? v : [v];\n}\nvar fromLength = (length) => Array.from(Array(length).keys());\nvar first = (v) => v[0];\nvar last = (v) => v[v.length - 1];\nvar isEmpty = (v) => v.length === 0;\nvar has = (v, t) => v.indexOf(t) !== -1;\nvar add = (v, ...items) => v.concat(items);\nvar remove = (v, item) => v.filter((t) => t !== item);\nvar removeAt = (v, i) => v.filter((_, idx) => idx !== i);\nvar addOrRemove = (v, item) => {\n if (has(v, item))\n return remove(v, item);\n return add(v, item);\n};\nfunction clear(v) {\n while (v.length > 0)\n v.pop();\n return v;\n}\nfunction nextIndex(v, idx, opts = {}) {\n const { step = 1, loop = true } = opts;\n const next2 = idx + step;\n const len = v.length;\n const last2 = len - 1;\n if (idx === -1)\n return step > 0 ? 0 : last2;\n if (next2 < 0)\n return loop ? last2 : 0;\n if (next2 >= len)\n return loop ? 0 : idx > len ? len : idx;\n return next2;\n}\nfunction next(v, idx, opts = {}) {\n return v[nextIndex(v, idx, opts)];\n}\nfunction prevIndex(v, idx, opts = {}) {\n const { step = 1, loop = true } = opts;\n return nextIndex(v, idx, { step: -step, loop });\n}\nfunction prev(v, index, opts = {}) {\n return v[prevIndex(v, index, opts)];\n}\nvar chunk = (v, size) => {\n const res = [];\n return v.reduce((rows, value, index) => {\n if (index % size === 0)\n rows.push([value]);\n else\n last(rows)?.push(value);\n return rows;\n }, res);\n};\n\n// src/equal.ts\nvar isArrayLike = (value) => value?.constructor.name === \"Array\";\nvar isEqual = (a, b) => {\n if (Object.is(a, b))\n return true;\n if (a == null && b != null || a != null && b == null)\n return false;\n if (typeof a?.isEqual === \"function\" && typeof b?.isEqual === \"function\") {\n return a.isEqual(b);\n }\n if (typeof a === \"function\" && typeof b === \"function\") {\n return a.toString() === b.toString();\n }\n if (isArrayLike(a) && isArrayLike(b)) {\n return Array.from(a).toString() === Array.from(b).toString();\n }\n if (!(typeof a === \"object\") || !(typeof b === \"object\"))\n return false;\n const keys = Object.keys(b ?? /* @__PURE__ */ Object.create(null));\n const length = keys.length;\n for (let i = 0; i < length; i++) {\n const hasKey = Reflect.has(a, keys[i]);\n if (!hasKey)\n return false;\n }\n for (let i = 0; i < length; i++) {\n const key = keys[i];\n if (!isEqual(a[key], b[key]))\n return false;\n }\n return true;\n};\n\n// src/functions.ts\nvar runIfFn = (v, ...a) => {\n const res = typeof v === \"function\" ? v(...a) : v;\n return res ?? void 0;\n};\nvar cast = (v) => v;\nvar noop = () => {\n};\nvar callAll = (...fns) => (...a) => {\n fns.forEach(function(fn) {\n fn?.(...a);\n });\n};\nvar uuid = /* @__PURE__ */ (() => {\n let id = 0;\n return () => {\n id++;\n return id.toString(36);\n };\n})();\nfunction match(key, record, ...args) {\n if (key in record) {\n const fn = record[key];\n return typeof fn === \"function\" ? fn(...args) : fn;\n }\n const error = new Error(`No matching key: ${JSON.stringify(key)} in ${JSON.stringify(Object.keys(record))}`);\n Error.captureStackTrace?.(error, match);\n throw error;\n}\nvar tryCatch = (fn, fallback) => {\n try {\n return fn();\n } catch (error) {\n if (error instanceof Error) {\n Error.captureStackTrace?.(error, tryCatch);\n }\n return fallback?.();\n }\n};\n\n// src/guard.ts\nvar isDev = () => process.env.NODE_ENV !== \"production\";\nvar isArray = (v) => Array.isArray(v);\nvar isBoolean = (v) => v === true || v === false;\nvar isObject = (v) => !(v == null || typeof v !== \"object\" || isArray(v));\nvar isNumber = (v) => typeof v === \"number\" && !Number.isNaN(v);\nvar isString = (v) => typeof v === \"string\";\nvar isFunction = (v) => typeof v === \"function\";\nvar isNull = (v) => v == null;\nvar hasProp = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\n\n// src/object.ts\nfunction compact(obj) {\n if (!isPlainObject(obj) || obj === void 0) {\n return obj;\n }\n const keys = Reflect.ownKeys(obj).filter((key) => typeof key === \"string\");\n const filtered = {};\n for (const key of keys) {\n const value = obj[key];\n if (value !== void 0) {\n filtered[key] = compact(value);\n }\n }\n return filtered;\n}\nfunction json(value) {\n return JSON.parse(JSON.stringify(value));\n}\nvar isPlainObject = (value) => {\n return value && typeof value === \"object\" && value.constructor === Object;\n};\n\n// src/warning.ts\nfunction warn(...a) {\n const m = a.length === 1 ? a[0] : a[1];\n const c = a.length === 2 ? a[0] : true;\n if (c && process.env.NODE_ENV !== \"production\") {\n console.warn(m);\n }\n}\nfunction invariant(...a) {\n const m = a.length === 1 ? a[0] : a[1];\n const c = a.length === 2 ? a[0] : true;\n if (c && process.env.NODE_ENV !== \"production\") {\n throw new Error(m);\n }\n}\nexport {\n add,\n addOrRemove,\n callAll,\n cast,\n chunk,\n clear,\n compact,\n first,\n fromLength,\n has,\n hasProp,\n invariant,\n isArray,\n isBoolean,\n isDev,\n isEmpty,\n isEqual,\n isFunction,\n isNull,\n isNumber,\n isObject,\n isString,\n json,\n last,\n match,\n next,\n nextIndex,\n noop,\n prev,\n prevIndex,\n remove,\n removeAt,\n runIfFn,\n toArray,\n tryCatch,\n uuid,\n warn\n};\n//# sourceMappingURL=index.mjs.map","// src/progress.anatomy.ts\nimport { createAnatomy } from \"@zag-js/anatomy\";\nvar anatomy = createAnatomy(\"progress\").parts(\n \"root\",\n \"label\",\n \"track\",\n \"range\",\n \"valueText\",\n \"view\",\n \"circle\",\n \"circleTrack\",\n \"circleRange\"\n);\nvar parts = anatomy.build();\n\n// src/progress.dom.ts\nimport { createScope } from \"@zag-js/dom-query\";\nvar dom = createScope({\n getRootId: (ctx) => `progress-${ctx.id}`,\n getTrackId: (ctx) => `progress-${ctx.id}-track`,\n getLabelId: (ctx) => `progress-${ctx.id}-label`,\n getCircleId: (ctx) => `progress-${ctx.id}-circle`\n});\n\n// src/progress.connect.ts\nfunction connect(state, send, normalize) {\n const percent = state.context.percent;\n const max = state.context.max;\n const min = state.context.min;\n const orientation = state.context.orientation;\n const translations = state.context.translations;\n const indeterminate = state.context.isIndeterminate;\n const value = state.context.value;\n const valueAsString = translations.value({ value, max, percent, min });\n const progressState = getProgressState(value, max);\n const progressbarProps = {\n role: \"progressbar\",\n \"aria-label\": valueAsString,\n \"data-max\": max,\n \"aria-valuemin\": min,\n \"aria-valuemax\": max,\n \"aria-valuenow\": value ?? void 0,\n \"data-orientation\": orientation,\n \"data-state\": progressState\n };\n const circleProps = getCircleProps(state.context);\n return {\n value,\n valueAsString,\n setValue(value2) {\n send({ type: \"VALUE.SET\", value: value2 });\n },\n setToMax() {\n send({ type: \"VALUE.SET\", value: max });\n },\n rootProps: normalize.element({\n dir: state.context.dir,\n ...parts.root.attrs,\n id: dom.getRootId(state.context),\n \"data-max\": max,\n \"data-value\": value ?? void 0,\n \"data-state\": progressState,\n \"data-orientation\": orientation,\n style: {\n \"--percent\": indeterminate ? void 0 : percent\n }\n }),\n labelProps: normalize.element({\n dir: state.context.dir,\n id: dom.getLabelId(state.context),\n ...parts.label.attrs,\n \"data-orientation\": orientation\n }),\n valueTextProps: normalize.element({\n dir: state.context.dir,\n \"aria-live\": \"polite\",\n ...parts.valueText.attrs\n }),\n trackProps: normalize.element({\n dir: state.context.dir,\n id: dom.getTrackId(state.context),\n ...parts.track.attrs,\n ...progressbarProps\n }),\n rangeProps: normalize.element({\n dir: state.context.dir,\n ...parts.range.attrs,\n \"data-orientation\": orientation,\n \"data-state\": progressState,\n style: {\n [state.context.isHorizontal ? \"width\" : \"height\"]: indeterminate ? void 0 : `${percent}%`\n }\n }),\n circleProps: normalize.element({\n dir: state.context.dir,\n id: dom.getCircleId(state.context),\n ...parts.circle.attrs,\n ...progressbarProps,\n ...circleProps.root\n }),\n circleTrackProps: normalize.element({\n dir: state.context.dir,\n \"data-orientation\": orientation,\n ...parts.circleTrack.attrs,\n ...circleProps.track\n }),\n circleRangeProps: normalize.element({\n dir: state.context.dir,\n ...parts.circleRange.attrs,\n ...circleProps.range,\n \"data-state\": progressState\n }),\n getViewProps(props) {\n return normalize.element({\n dir: state.context.dir,\n ...parts.view.attrs,\n \"data-state\": props.state,\n hidden: props.state !== progressState\n });\n }\n };\n}\nfunction getProgressState(value, maxValue) {\n return value == null ? \"indeterminate\" : value === maxValue ? \"complete\" : \"loading\";\n}\nfunction getCircleProps(ctx) {\n const determinant = ctx.isIndeterminate ? void 0 : ctx.percent * 2.64;\n const circleProps = {\n style: {\n cx: \"50px\",\n cy: \"50px\",\n r: \"42px\",\n fill: \"transparent\",\n strokeWidth: \"var(--thickness)\"\n }\n };\n return {\n root: {\n viewBox: \"0 0 100 100\",\n style: {\n width: \"var(--size)\",\n height: \"var(--size)\"\n }\n },\n track: circleProps,\n range: {\n style: {\n ...circleProps.style,\n strokeDashoffset: \"66px\",\n strokeDasharray: determinant != null ? `${determinant} ${264 - determinant}` : void 0\n }\n }\n };\n}\n\n// src/progress.machine.ts\nimport { createMachine } from \"@zag-js/core\";\nimport { compact, isNumber } from \"@zag-js/utils\";\nfunction machine(userContext) {\n const ctx = compact(userContext);\n return createMachine(\n {\n id: \"progress\",\n initial: \"idle\",\n context: {\n value: 50,\n max: 100,\n min: 0,\n orientation: \"horizontal\",\n translations: {\n value: ({ percent }) => percent === -1 ? \"loading...\" : `${percent} percent`,\n ...ctx.translations\n },\n ...ctx\n },\n created: [\"validateContext\"],\n computed: {\n isIndeterminate: (ctx2) => ctx2.value === null,\n percent(ctx2) {\n if (!isNumber(ctx2.value))\n return -1;\n return Math.round((ctx2.value - ctx2.min) / (ctx2.max - ctx2.min) * 100);\n },\n isAtMax: (ctx2) => ctx2.value === ctx2.max,\n isHorizontal: (ctx2) => ctx2.orientation === \"horizontal\",\n isRtl: (ctx2) => ctx2.dir === \"rtl\"\n },\n states: {\n idle: {\n on: {\n \"VALUE.SET\": {\n actions: [\"setValue\"]\n }\n }\n }\n }\n },\n {\n guards: {},\n actions: {\n setValue: (ctx2, evt) => {\n ctx2.value = evt.value === null ? null : Math.max(0, Math.min(evt.value, ctx2.max));\n },\n validateContext: (ctx2) => {\n if (!isValidMaxNumber(ctx2.max)) {\n throw new Error(`[Progress] Invalid max value: ${ctx2.max}`);\n }\n if (!isValidValueNumber(ctx2.value, ctx2.max)) {\n throw new Error(`[Progress] Invalid value: ${ctx2.value}`);\n }\n }\n }\n }\n );\n}\nfunction isValidMaxNumber(max) {\n return isNumber(max) && !isNaN(max) && max > 0;\n}\nfunction isValidValueNumber(value, max) {\n return isNumber(value) && !isNaN(value) && value <= max && value >= 0;\n}\nexport {\n anatomy,\n connect,\n machine\n};\n//# sourceMappingURL=index.mjs.map","// src/prop-types.ts\nfunction createNormalizer(fn) {\n return new Proxy({}, {\n get() {\n return fn;\n }\n });\n}\nexport {\n createNormalizer\n};\n//# sourceMappingURL=index.mjs.map","\"use client\"\n\n// src/index.ts\nimport { mergeProps } from \"@zag-js/core\";\n\n// src/normalize-props.ts\nimport { createNormalizer } from \"@zag-js/types\";\nvar normalizeProps = createNormalizer((v) => v);\n\n// src/portal.tsx\nimport { Children, useReducer } from \"react\";\nimport { createPortal } from \"react-dom\";\n\n// src/use-layout-effect.ts\nimport { useEffect, useLayoutEffect } from \"react\";\nvar useSafeLayoutEffect = typeof document !== \"undefined\" ? useLayoutEffect : useEffect;\n\n// src/portal.tsx\nimport { Fragment, jsx } from \"react/jsx-runtime\";\nvar Portal = (props) => {\n const { children, container, disabled, getRootNode } = props;\n const [, forceUpdate] = useReducer((c) => c + 1, 0);\n useSafeLayoutEffect(() => {\n forceUpdate();\n }, []);\n const isServer = typeof window === \"undefined\";\n if (isServer || disabled)\n return /* @__PURE__ */ jsx(Fragment, { children });\n const doc = getRootNode?.().ownerDocument ?? document;\n const mountNode = container?.current ?? doc.body;\n return /* @__PURE__ */ jsx(Fragment, { children: Children.map(children, (child) => createPortal(child, mountNode)) });\n};\n\n// src/use-snapshot.ts\nimport { snapshot, subscribe } from \"@zag-js/store\";\n\n// ../../utilities/core/src/equal.ts\nvar isArrayLike = (value) => value?.constructor.name === \"Array\";\nvar isEqual = (a, b) => {\n if (Object.is(a, b))\n return true;\n if (a == null && b != null || a != null && b == null)\n return false;\n if (typeof a?.isEqual === \"function\" && typeof b?.isEqual === \"function\") {\n return a.isEqual(b);\n }\n if (typeof a === \"function\" && typeof b === \"function\") {\n return a.toString() === b.toString();\n }\n if (isArrayLike(a) && isArrayLike(b)) {\n return Array.from(a).toString() === Array.from(b).toString();\n }\n if (!(typeof a === \"object\") || !(typeof b === \"object\"))\n return false;\n const keys = Object.keys(b ?? /* @__PURE__ */ Object.create(null));\n const length = keys.length;\n for (let i = 0; i < length; i++) {\n const hasKey = Reflect.has(a, keys[i]);\n if (!hasKey)\n return false;\n }\n for (let i = 0; i < length; i++) {\n const key = keys[i];\n if (!isEqual(a[key], b[key]))\n return false;\n }\n return true;\n};\n\n// ../../utilities/core/src/object.ts\nfunction compact(obj) {\n if (!isPlainObject(obj) || obj === void 0) {\n return obj;\n }\n const keys = Reflect.ownKeys(obj).filter((key) => typeof key === \"string\");\n const filtered = {};\n for (const key of keys) {\n const value = obj[key];\n if (value !== void 0) {\n filtered[key] = compact(value);\n }\n }\n return filtered;\n}\nvar isPlainObject = (value) => {\n return value && typeof value === \"object\" && value.constructor === Object;\n};\n\n// src/use-snapshot.ts\nimport { createProxy as createProxyToCompare, isChanged } from \"proxy-compare\";\nimport ReactExport, { useCallback, useEffect as useEffect4, useMemo, useRef as useRef3, useSyncExternalStore } from \"react\";\n\n// src/use-previous.ts\nimport { useEffect as useEffect2, useRef } from \"react\";\nfunction usePrevious(value) {\n const ref = useRef();\n useEffect2(() => {\n ref.current = value;\n });\n return ref.current;\n}\n\n// src/use-update-effect.ts\nimport { useEffect as useEffect3, useRef as useRef2 } from \"react\";\nfunction useUpdateEffect(callback, deps) {\n const render = useRef2(false);\n const effect = useRef2(false);\n useEffect3(() => {\n const mounted = render.current;\n const run = mounted && effect.current;\n if (run) {\n return callback();\n }\n effect.current = true;\n }, deps);\n useEffect3(() => {\n render.current = true;\n return () => {\n render.current = false;\n };\n }, []);\n}\n\n// src/use-snapshot.ts\nvar { use } = ReactExport;\nvar targetCache = /* @__PURE__ */ new WeakMap();\nfunction useSnapshot(service, options) {\n const { actions, context, sync: notifyInSync } = options ?? {};\n const lastSnapshot = useRef3();\n const lastAffected = useRef3();\n const currSnapshot = useSyncExternalStore(\n useCallback((callback) => subscribe(service.state, callback, notifyInSync), [notifyInSync]),\n () => {\n const nextSnapshot = snapshot(service.state, use);\n try {\n if (lastSnapshot.current && lastAffected.current && !isChanged(lastSnapshot.current, nextSnapshot, lastAffected.current, /* @__PURE__ */ new WeakMap())) {\n return lastSnapshot.current;\n }\n } catch (e) {\n }\n return nextSnapshot;\n },\n () => snapshot(service.state, use)\n );\n service.setOptions({ actions });\n const previousCtx = usePrevious(context);\n const ctx = useMemo(() => compact(context ?? {}), [context]);\n useUpdateEffect(() => {\n const entries = Object.entries(ctx);\n const equality = entries.map(([key, value]) => ({\n key,\n curr: value,\n prev: previousCtx?.[key],\n equal: isEqual(previousCtx?.[key], value)\n }));\n const allEqual = equality.every(({ equal }) => equal);\n if (!allEqual) {\n service.setContext(ctx);\n }\n }, [ctx]);\n const currAffected = /* @__PURE__ */ new WeakMap();\n useEffect4(() => {\n lastSnapshot.current = currSnapshot;\n lastAffected.current = currAffected;\n });\n const proxyCache = useMemo(() => /* @__PURE__ */ new WeakMap(), []);\n return createProxyToCompare(currSnapshot, currAffected, proxyCache, targetCache);\n}\n\n// src/use-actor.ts\nfunction useActor(service) {\n const state = useSnapshot(service);\n return [state, service.send];\n}\n\n// src/use-constant.ts\nimport { useRef as useRef4 } from \"react\";\nfunction useConstant(fn) {\n const ref = useRef4();\n if (!ref.current)\n ref.current = { v: fn() };\n return ref.current.v;\n}\n\n// src/use-service.ts\nfunction useService(machine, options) {\n const { state: hydratedState, context } = options ?? {};\n const service = useConstant(() => {\n const instance = typeof machine === \"function\" ? machine() : machine;\n if (context)\n instance.setContext(context);\n return instance;\n });\n useSafeLayoutEffect(() => {\n service.start(hydratedState);\n return () => {\n service.stop();\n };\n }, []);\n return service;\n}\n\n// src/use-machine.ts\nfunction useMachine(machine, options) {\n const service = useService(machine, options);\n const state = useSnapshot(service, options);\n return [state, service.send, service];\n}\nexport {\n Portal,\n mergeProps,\n normalizeProps,\n useActor,\n useMachine\n};\n//# sourceMappingURL=index.mjs.map","import * as progress from '@zag-js/progress';\nimport { normalizeProps, useMachine } from '@zag-js/react';\nimport { useId } from 'react';\n\ninterface ProgressProps {\n isIntermediate?: boolean;\n value?: number;\n label?: string;\n}\n\nexport const Progress = ({\n isIntermediate = false,\n value = 0,\n label,\n}: ProgressProps) => {\n const [state, send] = useMachine(progress.machine({ id: useId() }), {\n context: { value: isIntermediate ? null : value },\n });\n\n const api = progress.connect(state, send, normalizeProps);\n\n return (\n
\n {label ?
{label}
: null}\n
\n \n
\n
\n );\n};\n","import React from 'react';\n\ninterface EmptyViewProps {\n title: string;\n description: string;\n actions?: React.ReactNode;\n}\n\nconst EmptyView = ({ title, description, actions }: EmptyViewProps) => {\n return (\n
\n

{title}

\n

\n {description}\n

\n {actions}\n
\n );\n};\n\nexport default EmptyView;\n","import React from 'react';\n\nexport const PageLayout = ({ children }: React.PropsWithChildren) => {\n return (\n
\n
{children}
\n
\n );\n};\n\nexport default PageLayout;\n"],"names":["QueryObserver","_Subscribable","_inheritsLoose","client","options","_this","_proto","shouldFetchOnMount","shouldFetchOn","notifyOptions","prevOptions","prevQuery","mounted","shouldFetchOptionally","nextRefetchInterval","defaultedOptions","query","result","_this2","trackedResult","trackProp","key","_this3","resolve","reject","unsubscribe","_extends","_this4","fetchOptions","_this5","promise","noop","_this6","isServer","isValidTimeout","time","timeUntilStale","timeout","_this$options$refetch","nextInterval","_this7","focusManager","prevResult","prevResultState","prevResultOptions","queryChange","queryInitialState","prevQueryResult","state","dataUpdatedAt","error","errorUpdatedAt","isFetching","status","isPreviousData","isPlaceholderData","data","fetchOnMount","fetchOptionally","replaceEqualDeep","selectError","getLogger","placeholderData","isStale","_this$options","notifyOnChangeProps","notifyOnChangePropsExclusions","includedProps","typedKey","changed","isIncluded","x","isExcluded","shallowEqualObjects","defaultNotifyOptions","action","isCancelledError","_this8","notifyManager","listener","Subscribable","shouldLoadOnMount","field","value","createValue","_isReset","QueryErrorResetBoundaryContext","React","useQueryErrorResetBoundary","shouldThrowError","suspense","_useErrorBoundary","params","useBaseQuery","Observer","mountedRef","_React$useState","forceUpdate","queryClient","useQueryClient","errorResetBoundary","_React$useState2","observer","_ref","useQuery","arg1","arg2","arg3","parsedOptions","parseQueryArgs","api","url","response","toDate","argument","argStr","minutesInMonth","minutesInDay","defaultOptions","getDefaultOptions","getTimezoneOffsetInMilliseconds","date","_date","utcDate","compareAsc","dateLeft","dateRight","_dateLeft","_dateRight","diff","differenceInCalendarMonths","yearDiff","monthDiff","getRoundingMethod","method","number","differenceInMilliseconds","endOfDay","endOfMonth","month","isLastDayOfMonth","differenceInMonths","sign","difference","isLastMonthNotFull","differenceInSeconds","formatDistanceLocale","formatDistance","token","count","tokenValue","buildFormatLongFn","args","width","dateFormats","timeFormats","dateTimeFormats","formatLong","formatRelativeLocale","formatRelative","_baseDate","_options","buildLocalizeFn","context","valuesArray","defaultWidth","index","eraValues","quarterValues","monthValues","dayValues","dayPeriodValues","formattingDayPeriodValues","ordinalNumber","dirtyNumber","rem100","localize","quarter","buildMatchFn","string","matchPattern","matchResult","matchedString","parsePatterns","findIndex","pattern","findKey","rest","object","predicate","array","buildMatchPatternFn","parseResult","matchOrdinalNumberPattern","parseOrdinalNumberPattern","matchEraPatterns","parseEraPatterns","matchQuarterPatterns","parseQuarterPatterns","matchMonthPatterns","parseMonthPatterns","matchDayPatterns","parseDayPatterns","matchDayPeriodPatterns","parseDayPeriodPatterns","match","enUS","baseDate","locale","defaultLocale","minutesInAlmostTwoDays","comparison","localizeOptions","seconds","offsetInSeconds","minutes","months","hours","days","nearestMonth","monthsSinceStartOfYear","years","timeAgo","input","createAnatomy","name","parts","values","isEmpty","newName","prev","part","toKebabCase","v","dataAttr","guard","getDocument","node","createScope","methods","screen","ctx","_a","elem","id","valueAsString","e","t","r","n","o","s","c","l","f","i","u","a","p","g","y","h","w","isObject","proxyStateMap","refSet","buildProxyFunction","objectIs","newProxy","target","handler","canProxy","defaultHandlePromise","snapCache","createSnapshot","version","handlePromise","cache","snap","markToTrack","snapshot","proxyCache","versionHolder","proxyFunction2","initialObject","found","listeners","notifyUpdate","op","nextVersion","checkVersion","ensureVersion","nextCheckVersion","propProxyStates","propProxyState","propVersion","createPropListener","prop","newOp","addPropListener","remove","removePropListener","entry","addListener","prevRemove","baseObject","proxyObject","prevValue","deleted","receiver","hasPrevValue","getUntracked","nextValue","proxy","childProxyState","proxyState","desc","proxyFunction","subscribe","callback","notifyInSync","ops","isListenerActive","removeListener","ref","obj","proxyWithComputed","computedFns","computedFn","get","set","newValue","defaultCompareFn","next","subscribeKey","fn","sync","compareFn","isEqual","onSnapshotChange","val","klona","k","list","tmp","str","__defProp","__defNormalProp","__publicField","clear","runIfFn","cast","uuid","isArray","isNumber","isString","isFunction","compact","isPlainObject","keys","filtered","warn","m","invariant","deepMerge","source","objects","structuredClone","toEvent","event","toArray","isGuardHelper","Truthy","determineGuardFn","guardMap","meta","determineActionsFn","createProxy","config","computedContext","initialContext","tag","stateEvents","_b","globalEvents","determineDelayFn","delay","delaysMap","valueOrFn","toTarget","determineTransitionFn","transitions","transition","Machine","init","event2","cleanup","stop","state2","evt","to","child","parent","src","actor","cleanups","stateNode","newContext","opts","isTargetless","info","entries","exits","actions","resolvedTransition","picked","pickedActions","activities","activity","every","callbackfn","delayOrFn","delay2","interval","current","currentState","_exit","exitActions","afterExitActions","entryActions","afterActions","msg","_c","_d","_e","_f","self","createMachine","isArrayLike","b","length","anatomy","dom","connect","send","normalize","percent","max","min","orientation","translations","indeterminate","progressState","getProgressState","progressbarProps","circleProps","getCircleProps","value2","props","maxValue","determinant","machine","userContext","ctx2","isValidMaxNumber","isValidValueNumber","createNormalizer","normalizeProps","useSafeLayoutEffect","useLayoutEffect","useEffect","usePrevious","useRef","useEffect2","useUpdateEffect","deps","render","useRef2","effect","useEffect3","use","ReactExport","targetCache","useSnapshot","service","lastSnapshot","useRef3","lastAffected","currSnapshot","useSyncExternalStore","useCallback","nextSnapshot","isChanged","previousCtx","useMemo","equal","currAffected","useEffect4","createProxyToCompare","useConstant","useRef4","useService","hydratedState","instance","useMachine","Progress","isIntermediate","label","progress.machine","useId","progress.connect","jsxs","jsx","EmptyView","title","description","PageLayout","children"],"mappings":"wKAQO,IAA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AAiB9c,EAAO4Y,EAAMuB,EAAc,EAExD,OACG4C,EAAAA,KAAA,MAAA,CAAK,GAAGjZ,EAAI,UACV,SAAA,CAAA6Y,EAASI,EAAA,KAAA,MAAA,CAAK,GAAGjZ,EAAI,WAAa,SAAA,CAAA6Y,EAAM,GAAA,CAAA,CAAC,EAAS,WAClD,MAAK,CAAA,GAAG7Y,EAAI,WAAY,UAAU,UACjC,SAAAkZ,EAAA,IAAC,MAAA,CACE,GAAGlZ,EAAI,WACR,UAAU,mEAAA,CAAA,EAEd,CACF,CAAA,CAAA,CAEJ,ECxBMmZ,GAAY,CAAC,CAAE,MAAAC,EAAO,YAAAC,EAAa,QAAAtG,KAErCkG,EAAA,KAAC,MAAI,CAAA,UAAU,8EACb,SAAA,CAACC,EAAA,IAAA,KAAA,CAAG,UAAU,6CAA8C,SAAME,EAAA,EACjEF,EAAA,IAAA,IAAA,CAAE,UAAU,+CACV,SACHG,EAAA,EACCtG,CACH,CAAA,CAAA,ECdSuG,GAAa,CAAC,CAAE,SAAAC,KAEzBL,EAAA,IAAC,OAAI,UAAU,gEACb,eAAC,MAAI,CAAA,UAAU,qCAAsC,SAAAK,CAAS,CAAA,CAChE,CAAA","x_google_ignoreList":[0,1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,31,32,33,34,35,36,37,38,39,40]} \ No newline at end of file diff --git a/assets/StoryDetails-hkFTZqFp.js b/assets/StoryDetails-BM93KYSS.js similarity index 95% rename from assets/StoryDetails-hkFTZqFp.js rename to assets/StoryDetails-BM93KYSS.js index 94de3d0..aa16bff 100644 --- a/assets/StoryDetails-hkFTZqFp.js +++ b/assets/StoryDetails-BM93KYSS.js @@ -1,2 +1,2 @@ -import{b as h,r as p,j as e,B as o}from"./index-422DQ6gI.js";import{u as f,a as j,t as x,P as i,h as c,E as n}from"./PageLayout-t9exb1nu.js";const y=()=>{const{id:s}=h();return f({queryKey:["HN_ITEM",s],queryFn:()=>j(`http://hn.algolia.com/api/v1/items/${s}`)})},m=({data:s})=>{const[a,t]=p.useState(!1);return e.jsxs("div",{className:"py-4 px-5",children:[e.jsxs("div",{className:"w-full",children:[e.jsx("div",{className:"leading-relaxed whitespace-pre-line before:bg-gradient-to-b before:from-transparent before:to-white dark:before:to-gray-800 text-sm [&_a]:text-primary-600",dangerouslySetInnerHTML:{__html:s.text||""}}),e.jsxs("div",{className:"flex justify-between mt-2",children:[e.jsxs("div",{className:"text-primary-700 dark:text-primary-600 font-semibold text-sm",children:[e.jsx("span",{className:"opacity-90",children:s.author}),e.jsx("span",{className:"text-gray-400 mx-2",children:"•"}),e.jsx("span",{className:"text-gray-500 text-xs font-medium",children:x(s.created_at)})]}),s.children.length>0&&e.jsx("button",{onClick:()=>t(r=>!r),className:"border-none outline-none text-xs font-semibold uppercase text-primary-700 dark:text-primary-600",children:a?"Hide Replies":"View Replies"})]})]}),e.jsx("div",{className:"transition",children:a&&e.jsx("div",{className:"flex flex-col mt-4 border-l border-r border-gray-800",children:s.children.map(r=>e.jsx(m,{data:r},r.id))})})]})},g=({data:s})=>e.jsx("div",{className:"bg-white dark:bg-gray-800 relative",children:e.jsxs("div",{className:"w-full py-4 px-5 border border-transparent shadow-xl",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"w-full",children:[e.jsx("h4",{className:"font-bold dark:font-semibold tracking-wide text-lg leading-tight",children:s.title}),s.url?e.jsx("div",{className:"w-full overflow-hidden",children:e.jsx("a",{href:s.url,target:"_blank",rel:"noopener",className:"text-sm text-gray-600 dark:text-gray-400 leading-tight w-full truncate min-w-0 font-medium",children:s.url})}):null,e.jsxs("div",{className:"flex mt-1 items-center justify-between flex-wrap",children:[e.jsxs("div",{className:"font-semibold text-sm mr-2 flex items-center flex-shrink-0 text-primary-700 dark:text-primary-600 text-opacity-100",children:[e.jsx("span",{className:"font-bold",children:s.points}),e.jsx("span",{className:"mx-2",children:"•"}),e.jsx("span",{className:"opacity-90",children:s.author}),e.jsx("span",{className:"text-gray-400 dark:text-gray-500 mx-2",children:"•"}),e.jsx("span",{className:"text-gray-500 text-xs font-medium",children:x(s.created_at)})]}),e.jsx("div",{className:"flex items-center",children:e.jsxs("div",{className:"uppercase text-xs transition font-bold text-gray-600 dark:text-gray-400",children:[s.children.length," Comments"]})})]})]})}),e.jsx("div",{className:"leading-relaxed item-text whitespace-pre-line before:bg-gradient-to-b before:from-transparent before:to-white dark:before:to-gray-800 limit-text"})]})}),N=()=>{const{data:s,isLoading:a,isFetching:t,isError:r,refetch:l}=y();return a?e.jsxs(i,{children:[e.jsx("div",{className:"sticky top-0",children:e.jsx(c,{isIntermediate:t})}),e.jsx(n,{title:"Loading...",description:"Loading story details. Please wait a moment"})]}):r||!s?e.jsx(i,{children:e.jsx(n,{title:"Error",description:"There was an error in completing your request. Please try again",actions:e.jsx(o,{onClick:()=>l(),disabled:t,children:"Retry"})})}):e.jsxs(i,{children:[e.jsx("div",{className:"sticky top-0",children:e.jsx(c,{isIntermediate:t})}),e.jsx(g,{data:s}),s.children.length>0?e.jsx(e.Fragment,{children:s.children.map(d=>e.jsx(m,{data:d},d.id))}):e.jsx(n,{title:"No comments yet",description:"There are no comments available for this item. Please try refreshing below to load latest updates",actions:e.jsx(o,{onClick:()=>l(),disabled:t,children:"Refresh"})})]})};export{N as default}; -//# sourceMappingURL=StoryDetails-hkFTZqFp.js.map +import{b as h,r as p,j as e,B as o}from"./index-OPB39aai.js";import{u as f,a as j,t as x,P as i,h as c,E as n}from"./PageLayout-e8KYfbHX.js";const y=()=>{const{id:s}=h();return f({queryKey:["HN_ITEM",s],queryFn:()=>j(`http://hn.algolia.com/api/v1/items/${s}`)})},m=({data:s})=>{const[a,t]=p.useState(!1);return e.jsxs("div",{className:"py-4 px-5",children:[e.jsxs("div",{className:"w-full",children:[e.jsx("div",{className:"leading-relaxed whitespace-pre-line before:bg-gradient-to-b before:from-transparent before:to-white dark:before:to-gray-800 text-sm [&_a]:text-primary-600",dangerouslySetInnerHTML:{__html:s.text||""}}),e.jsxs("div",{className:"flex justify-between mt-2",children:[e.jsxs("div",{className:"text-primary-700 dark:text-primary-600 font-semibold text-sm",children:[e.jsx("span",{className:"opacity-90",children:s.author}),e.jsx("span",{className:"text-gray-400 mx-2",children:"•"}),e.jsx("span",{className:"text-gray-500 text-xs font-medium",children:x(s.created_at)})]}),s.children.length>0&&e.jsx("button",{onClick:()=>t(r=>!r),className:"border-none outline-none text-xs font-semibold uppercase text-primary-700 dark:text-primary-600",children:a?"Hide Replies":"View Replies"})]})]}),e.jsx("div",{className:"transition",children:a&&e.jsx("div",{className:"flex flex-col mt-4 border-l border-r border-gray-800",children:s.children.map(r=>e.jsx(m,{data:r},r.id))})})]})},g=({data:s})=>e.jsx("div",{className:"bg-white dark:bg-gray-800 relative",children:e.jsxs("div",{className:"w-full py-4 px-5 border border-transparent shadow-xl",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"w-full",children:[e.jsx("h4",{className:"font-bold dark:font-semibold tracking-wide text-lg leading-tight",children:s.title}),s.url?e.jsx("div",{className:"w-full overflow-hidden",children:e.jsx("a",{href:s.url,target:"_blank",rel:"noopener",className:"text-sm text-gray-600 dark:text-gray-400 leading-tight w-full truncate min-w-0 font-medium",children:s.url})}):null,e.jsxs("div",{className:"flex mt-1 items-center justify-between flex-wrap",children:[e.jsxs("div",{className:"font-semibold text-sm mr-2 flex items-center flex-shrink-0 text-primary-700 dark:text-primary-600 text-opacity-100",children:[e.jsx("span",{className:"font-bold",children:s.points}),e.jsx("span",{className:"mx-2",children:"•"}),e.jsx("span",{className:"opacity-90",children:s.author}),e.jsx("span",{className:"text-gray-400 dark:text-gray-500 mx-2",children:"•"}),e.jsx("span",{className:"text-gray-500 text-xs font-medium",children:x(s.created_at)})]}),e.jsx("div",{className:"flex items-center",children:e.jsxs("div",{className:"uppercase text-xs transition font-bold text-gray-600 dark:text-gray-400",children:[s.children.length," Comments"]})})]})]})}),e.jsx("div",{className:"leading-relaxed item-text whitespace-pre-line before:bg-gradient-to-b before:from-transparent before:to-white dark:before:to-gray-800 limit-text"})]})}),N=()=>{const{data:s,isLoading:a,isFetching:t,isError:r,refetch:l}=y();return a?e.jsxs(i,{children:[e.jsx("div",{className:"sticky top-0",children:e.jsx(c,{isIntermediate:t})}),e.jsx(n,{title:"Loading...",description:"Loading story details. Please wait a moment"})]}):r||!s?e.jsx(i,{children:e.jsx(n,{title:"Error",description:"There was an error in completing your request. Please try again",actions:e.jsx(o,{onClick:()=>l(),disabled:t,children:"Retry"})})}):e.jsxs(i,{children:[e.jsx("div",{className:"sticky top-0",children:e.jsx(c,{isIntermediate:t})}),e.jsx(g,{data:s}),s.children.length>0?e.jsx(e.Fragment,{children:s.children.map(d=>e.jsx(m,{data:d},d.id))}):e.jsx(n,{title:"No comments yet",description:"There are no comments available for this item. Please try refreshing below to load latest updates",actions:e.jsx(o,{onClick:()=>l(),disabled:t,children:"Refresh"})})]})};export{N as default}; +//# sourceMappingURL=StoryDetails-BM93KYSS.js.map diff --git a/assets/StoryDetails-hkFTZqFp.js.map b/assets/StoryDetails-BM93KYSS.js.map similarity index 99% rename from assets/StoryDetails-hkFTZqFp.js.map rename to assets/StoryDetails-BM93KYSS.js.map index 6d220f3..2469f08 100644 --- a/assets/StoryDetails-hkFTZqFp.js.map +++ b/assets/StoryDetails-BM93KYSS.js.map @@ -1 +1 @@ -{"version":3,"file":"StoryDetails-hkFTZqFp.js","sources":["../../src/hooks/useHNSearchItem.ts","../../src/components/Comment.tsx","../../src/components/StoryHeader.tsx","../../src/routes/StoryDetails.tsx"],"sourcesContent":["import { useQuery } from 'react-query';\nimport { useParams } from 'react-router-dom';\nimport { GetStoryDetailsResponse } from '../api/types';\nimport api from '../api';\n\nconst useHNSearchItem = () => {\n const { id } = useParams();\n const query = useQuery({\n queryKey: ['HN_ITEM', id],\n queryFn: () =>\n api(`http://hn.algolia.com/api/v1/items/${id}`),\n });\n return query;\n};\n\nexport default useHNSearchItem;\n","import { useState } from 'react';\nimport { GetStoryDetailsResponse } from '../api/types';\nimport { timeAgo } from '../utils';\n\ninterface CommentProps {\n data: GetStoryDetailsResponse;\n}\n\nconst Comment = ({ data }: CommentProps) => {\n const [isReading, setIsReading] = useState(false);\n\n return (\n
\n
\n \n
\n
\n {data.author}\n \n \n {timeAgo(data.created_at)}\n \n
\n {data.children.length > 0 && (\n setIsReading((prev) => !prev)}\n className=\"border-none outline-none text-xs font-semibold uppercase text-primary-700 dark:text-primary-600\"\n >\n {isReading ? 'Hide Replies' : 'View Replies'}\n \n )}\n
\n
\n
\n {isReading && (\n
\n {data.children.map((child) => (\n \n ))}\n
\n )}\n
\n
\n );\n};\n\nexport default Comment;\n","import { GetStoryDetailsResponse } from '../api/types';\nimport { timeAgo } from '../utils';\n\ninterface StoryHeaderProps {\n data: GetStoryDetailsResponse;\n}\n\nexport const StoryHeader = ({ data }: StoryHeaderProps) => {\n return (\n
\n
\n
\n
\n

\n {data.title}\n

\n\n {data.url ? (\n
\n \n {data.url}\n \n
\n ) : null}\n\n
\n
\n {data.points}\n \n {data.author}\n \n \n {timeAgo(data.created_at)}\n \n
\n
\n
\n {data.children.length} Comments\n
\n
\n
\n
\n
\n
\n
\n
\n );\n};\n","import useHNSearchItem from '../hooks/useHNSearchItem';\nimport Button from '../components/Button';\nimport Comment from '../components/Comment';\nimport EmptyView from '../components/EmptyView';\nimport PageLayout from '../components/PageLayout';\nimport { Progress } from '../components/Progress';\nimport { StoryHeader } from '../components/StoryHeader';\n\nconst StoryDetails = () => {\n const { data, isLoading, isFetching, isError, refetch } = useHNSearchItem();\n\n if (isLoading) {\n return (\n \n
\n \n
\n \n
\n );\n }\n\n if (isError || !data) {\n return (\n \n refetch()} disabled={isFetching}>\n Retry\n \n }\n />\n \n );\n }\n\n return (\n \n
\n \n
\n \n\n {data.children.length > 0 ? (\n <>\n {data.children.map((child) => (\n \n ))}\n \n ) : (\n refetch()} disabled={isFetching}>\n Refresh\n \n }\n />\n )}\n
\n );\n};\n\nexport default StoryDetails;\n"],"names":["useHNSearchItem","id","useParams","useQuery","api","Comment","data","isReading","setIsReading","useState","jsxs","jsx","timeAgo","prev","child","StoryHeader","StoryDetails","isLoading","isFetching","isError","refetch","PageLayout","Progress","EmptyView","Button","Fragment"],"mappings":"6IAKA,MAAMA,EAAkB,IAAM,CACtB,KAAA,CAAE,GAAAC,GAAOC,IAMR,OALOC,EAAS,CACrB,SAAU,CAAC,UAAWF,CAAE,EACxB,QAAS,IACPG,EAA6B,sCAAsCH,CAAE,EAAE,CAAA,CAC1E,CAEH,ECLMI,EAAU,CAAC,CAAE,KAAAC,KAAyB,CAC1C,KAAM,CAACC,EAAWC,CAAY,EAAIC,WAAS,EAAK,EAG9C,OAAAC,EAAA,KAAC,MAAI,CAAA,UAAU,YACb,SAAA,CAACA,EAAAA,KAAA,MAAA,CAAI,UAAU,SACb,SAAA,CAAAC,EAAA,IAAC,MAAA,CACC,UAAU,6JACV,wBAAyB,CAAE,OAAQL,EAAK,MAAQ,EAAG,CAAA,CACrD,EACAI,EAAAA,KAAC,MAAI,CAAA,UAAU,4BACb,SAAA,CAACA,EAAAA,KAAA,MAAA,CAAI,UAAU,+DACb,SAAA,CAAAC,EAAA,IAAC,OAAK,CAAA,UAAU,aAAc,SAAAL,EAAK,OAAO,EACzCK,EAAA,IAAA,OAAA,CAAK,UAAU,qBAAqB,SAAC,IAAA,QACrC,OAAK,CAAA,UAAU,oCACb,SAAQC,EAAAN,EAAK,UAAU,EAC1B,CAAA,EACF,EACCA,EAAK,SAAS,OAAS,GACtBK,EAAA,IAAC,SAAA,CACC,QAAS,IAAMH,EAAcK,GAAS,CAACA,CAAI,EAC3C,UAAU,kGAET,WAAY,eAAiB,cAAA,CAChC,CAAA,EAEJ,CAAA,EACF,EACAF,EAAAA,IAAC,OAAI,UAAU,aACZ,YACEA,EAAAA,IAAA,MAAA,CAAI,UAAU,uDACZ,SAAKL,EAAA,SAAS,IAAKQ,SACjBT,EAAuB,CAAA,KAAMS,GAA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AAC,EAAS,QAAAC,CAAA,EAAYpB,IAE1D,OAAIiB,SAECI,EACC,CAAA,SAAA,CAAAV,EAAAA,IAAC,OAAI,UAAU,eACb,eAACW,EAAS,CAAA,eAAgBJ,EAAY,CACxC,CAAA,EACAP,EAAA,IAACY,EAAA,CACC,MAAM,aACN,YAAY,6CAAA,CACd,CACF,CAAA,CAAA,EAIAJ,GAAW,CAACb,QAEXe,EACC,CAAA,SAAAV,EAAA,IAACY,EAAA,CACC,MAAM,QACN,YAAY,kEACZ,cACGC,EAAO,CAAA,QAAS,IAAMJ,EAAQ,EAAG,SAAUF,EAAY,SAExD,OAAA,CAAA,CAAA,CAGN,CAAA,CAAA,SAKDG,EACC,CAAA,SAAA,CAAAV,EAAAA,IAAC,OAAI,UAAU,eACb,eAACW,EAAS,CAAA,eAAgBJ,EAAY,CACxC,CAAA,EACAP,MAACI,GAAY,KAAAT,EAAY,EAExBA,EAAK,SAAS,OAAS,EAEnBK,EAAAA,IAAAc,EAAA,SAAA,CAAA,SAAAnB,EAAK,SAAS,IAAKQ,GAClBH,EAAA,IAACN,GAAQ,KAAMS,GAAYA,EAAM,EAAI,CACtC,CACH,CAAA,EAEAH,EAAA,IAACY,EAAA,CACC,MAAM,kBACN,YAAY,oGACZ,cACGC,EAAO,CAAA,QAAS,IAAMJ,EAAQ,EAAG,SAAUF,EAAY,SAExD,SAAA,CAAA,CAAA,CAEJ,CAEJ,CAAA,CAAA,CAEJ"} \ No newline at end of file +{"version":3,"file":"StoryDetails-BM93KYSS.js","sources":["../../src/hooks/useHNSearchItem.ts","../../src/components/Comment.tsx","../../src/components/StoryHeader.tsx","../../src/routes/StoryDetails.tsx"],"sourcesContent":["import { useQuery } from 'react-query';\nimport { useParams } from 'react-router-dom';\nimport { GetStoryDetailsResponse } from '../api/types';\nimport api from '../api';\n\nconst useHNSearchItem = () => {\n const { id } = useParams();\n const query = useQuery({\n queryKey: ['HN_ITEM', id],\n queryFn: () =>\n api(`http://hn.algolia.com/api/v1/items/${id}`),\n });\n return query;\n};\n\nexport default useHNSearchItem;\n","import { useState } from 'react';\nimport { GetStoryDetailsResponse } from '../api/types';\nimport { timeAgo } from '../utils';\n\ninterface CommentProps {\n data: GetStoryDetailsResponse;\n}\n\nconst Comment = ({ data }: CommentProps) => {\n const [isReading, setIsReading] = useState(false);\n\n return (\n
\n
\n \n
\n
\n {data.author}\n \n \n {timeAgo(data.created_at)}\n \n
\n {data.children.length > 0 && (\n setIsReading((prev) => !prev)}\n className=\"border-none outline-none text-xs font-semibold uppercase text-primary-700 dark:text-primary-600\"\n >\n {isReading ? 'Hide Replies' : 'View Replies'}\n \n )}\n
\n
\n
\n {isReading && (\n
\n {data.children.map((child) => (\n \n ))}\n
\n )}\n
\n
\n );\n};\n\nexport default Comment;\n","import { GetStoryDetailsResponse } from '../api/types';\nimport { timeAgo } from '../utils';\n\ninterface StoryHeaderProps {\n data: GetStoryDetailsResponse;\n}\n\nexport const StoryHeader = ({ data }: StoryHeaderProps) => {\n return (\n
\n
\n
\n
\n

\n {data.title}\n

\n\n {data.url ? (\n
\n \n {data.url}\n \n
\n ) : null}\n\n
\n
\n {data.points}\n \n {data.author}\n \n \n {timeAgo(data.created_at)}\n \n
\n
\n
\n {data.children.length} Comments\n
\n
\n
\n
\n
\n
\n
\n
\n );\n};\n","import useHNSearchItem from '../hooks/useHNSearchItem';\nimport Button from '../components/Button';\nimport Comment from '../components/Comment';\nimport EmptyView from '../components/EmptyView';\nimport PageLayout from '../components/PageLayout';\nimport { Progress } from '../components/Progress';\nimport { StoryHeader } from '../components/StoryHeader';\n\nconst StoryDetails = () => {\n const { data, isLoading, isFetching, isError, refetch } = useHNSearchItem();\n\n if (isLoading) {\n return (\n \n
\n \n
\n \n
\n );\n }\n\n if (isError || !data) {\n return (\n \n refetch()} disabled={isFetching}>\n Retry\n \n }\n />\n \n );\n }\n\n return (\n \n
\n \n
\n \n\n {data.children.length > 0 ? (\n <>\n {data.children.map((child) => (\n \n ))}\n \n ) : (\n refetch()} disabled={isFetching}>\n Refresh\n \n }\n />\n )}\n
\n );\n};\n\nexport default StoryDetails;\n"],"names":["useHNSearchItem","id","useParams","useQuery","api","Comment","data","isReading","setIsReading","useState","jsxs","jsx","timeAgo","prev","child","StoryHeader","StoryDetails","isLoading","isFetching","isError","refetch","PageLayout","Progress","EmptyView","Button","Fragment"],"mappings":"6IAKA,MAAMA,EAAkB,IAAM,CACtB,KAAA,CAAE,GAAAC,GAAOC,IAMR,OALOC,EAAS,CACrB,SAAU,CAAC,UAAWF,CAAE,EACxB,QAAS,IACPG,EAA6B,sCAAsCH,CAAE,EAAE,CAAA,CAC1E,CAEH,ECLMI,EAAU,CAAC,CAAE,KAAAC,KAAyB,CAC1C,KAAM,CAACC,EAAWC,CAAY,EAAIC,WAAS,EAAK,EAG9C,OAAAC,EAAA,KAAC,MAAI,CAAA,UAAU,YACb,SAAA,CAACA,EAAAA,KAAA,MAAA,CAAI,UAAU,SACb,SAAA,CAAAC,EAAA,IAAC,MAAA,CACC,UAAU,6JACV,wBAAyB,CAAE,OAAQL,EAAK,MAAQ,EAAG,CAAA,CACrD,EACAI,EAAAA,KAAC,MAAI,CAAA,UAAU,4BACb,SAAA,CAACA,EAAAA,KAAA,MAAA,CAAI,UAAU,+DACb,SAAA,CAAAC,EAAA,IAAC,OAAK,CAAA,UAAU,aAAc,SAAAL,EAAK,OAAO,EACzCK,EAAA,IAAA,OAAA,CAAK,UAAU,qBAAqB,SAAC,IAAA,QACrC,OAAK,CAAA,UAAU,oCACb,SAAQC,EAAAN,EAAK,UAAU,EAC1B,CAAA,EACF,EACCA,EAAK,SAAS,OAAS,GACtBK,EAAA,IAAC,SAAA,CACC,QAAS,IAAMH,EAAcK,GAAS,CAACA,CAAI,EAC3C,UAAU,kGAET,WAAY,eAAiB,cAAA,CAChC,CAAA,EAEJ,CAAA,EACF,EACAF,EAAAA,IAAC,OAAI,UAAU,aACZ,YACEA,EAAAA,IAAA,MAAA,CAAI,UAAU,uDACZ,SAAKL,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AM,CAAE,KAAAV,EAAM,UAAAW,EAAW,WAAAC,EAAY,QAAAC,EAAS,QAAAC,CAAA,EAAYpB,IAE1D,OAAIiB,SAECI,EACC,CAAA,SAAA,CAAAV,EAAAA,IAAC,OAAI,UAAU,eACb,eAACW,EAAS,CAAA,eAAgBJ,EAAY,CACxC,CAAA,EACAP,EAAA,IAACY,EAAA,CACC,MAAM,aACN,YAAY,6CAAA,CACd,CACF,CAAA,CAAA,EAIAJ,GAAW,CAACb,QAEXe,EACC,CAAA,SAAAV,EAAA,IAACY,EAAA,CACC,MAAM,QACN,YAAY,kEACZ,cACGC,EAAO,CAAA,QAAS,IAAMJ,EAAQ,EAAG,SAAUF,EAAY,SAExD,OAAA,CAAA,CAAA,CAGN,CAAA,CAAA,SAKDG,EACC,CAAA,SAAA,CAAAV,EAAAA,IAAC,OAAI,UAAU,eACb,eAACW,EAAS,CAAA,eAAgBJ,EAAY,CACxC,CAAA,EACAP,MAACI,GAAY,KAAAT,EAAY,EAExBA,EAAK,SAAS,OAAS,EAEnBK,EAAAA,IAAAc,EAAA,SAAA,CAAA,SAAAnB,EAAK,SAAS,IAAKQ,GAClBH,EAAA,IAACN,GAAQ,KAAMS,GAAYA,EAAM,EAAI,CACtC,CACH,CAAA,EAEAH,EAAA,IAACY,EAAA,CACC,MAAM,kBACN,YAAY,oGACZ,cACGC,EAAO,CAAA,QAAS,IAAMJ,EAAQ,EAAG,SAAUF,EAAY,SAExD,SAAA,CAAA,CAAA,CAEJ,CAEJ,CAAA,CAAA,CAEJ"} \ No newline at end of file diff --git a/assets/index-422DQ6gI.js b/assets/index-OPB39aai.js similarity index 96% rename from assets/index-422DQ6gI.js rename to assets/index-OPB39aai.js index 53bf641..3c2fcf4 100644 --- a/assets/index-422DQ6gI.js +++ b/assets/index-OPB39aai.js @@ -64,11 +64,11 @@ Error generating stack: `+l.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function xo(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function gv(e,t){let n=xo(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(l=>{n.append(i,l)})}),n}const wv="6";try{window.__reactRouterVersion=wv}catch{}const Sv="startTransition",Vs=Kf[Sv];function kv(e){let{basename:t,children:n,future:r,window:i}=e,l=P.useRef();l.current==null&&(l.current=Oh({window:i,v5Compat:!0}));let o=l.current,[u,s]=P.useState({action:o.action,location:o.location}),{v7_startTransition:a}=r||{},d=P.useCallback(p=>{a&&Vs?Vs(()=>s(p)):s(p)},[s,a]);return P.useLayoutEffect(()=>o.listen(d),[o,d]),P.createElement(mv,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o,future:r})}var Ws;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ws||(Ws={}));var Hs;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Hs||(Hs={}));function Cu(e){let t=P.useRef(xo(e)),n=P.useRef(!1),r=qi(),i=P.useMemo(()=>gv(r.search,n.current?null:t.current),[r.search]),l=Of(),o=P.useCallback((u,s)=>{const a=xo(typeof u=="function"?u(i):u);n.current=!0,l("?"+a,s)},[l,i]);return[i,o]}const Cv="modulepreload",xv=function(e){return"/"+e},qs={},Rf=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const l=document.getElementsByTagName("link");i=Promise.all(n.map(o=>{if(o=xv(o),o in qs)return;qs[o]=!0;const u=o.endsWith(".css"),s=u?'[rel="stylesheet"]':"";if(!!r)for(let p=l.length-1;p>=0;p--){const v=l[p];if(v.href===o&&(!u||v.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${s}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":Cv,u||(d.as="script",d.crossOrigin=""),d.href=o,document.head.appendChild(d),u)return new Promise((p,v)=>{d.addEventListener("load",p),d.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${o}`)))})}))}return i.then(()=>t()).catch(l=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=l,window.dispatchEvent(o),!o.defaultPrevented)throw l})},Eo={root:"/",storyDetails:"/:id"},Ks=()=>R.jsx("div",{className:"h-screen w-screen grid place-items-center",children:R.jsx("img",{src:"/favicon.svg",alt:"Loading...",width:48,height:48,className:"animate-pulse"})}),Ev=P.lazy(()=>Rf(()=>import("./Home-BG5u3Gte.js"),__vite__mapDeps([0,1]))),Pv=P.lazy(()=>Rf(()=>import("./StoryDetails-hkFTZqFp.js"),__vite__mapDeps([2,1]))),_v=()=>R.jsxs(yv,{children:[R.jsx(ko,{path:Eo.root,element:R.jsx(P.Suspense,{fallback:R.jsx(Ks,{}),children:R.jsx(Ev,{})})}),R.jsx(ko,{path:Eo.storyDetails,element:R.jsx(P.Suspense,{fallback:R.jsx(Ks,{}),children:R.jsx(Pv,{})})})]}),xl=({name:e,onClick:t,isActive:n=!1})=>R.jsx("div",{className:`cursor-pointer transition flex items-baseline gap-2 rounded-sm px-2 py-1 border ${n?"border-primary-500":"border-gray-800"}`,onClick:t,children:R.jsx("span",{className:"text-xs",children:e})}),Ne={query:"query",tags:"tags",restrictSearchableAttributes:"restrictSearchableAttributes",page:"page"},Ov=()=>{const[e,t]=Cu(),n=e.get(Ne.tags),r=(i,l)=>{n===l?(e.delete(Ne.tags),e.delete(Ne.page)):e.set(i,l),e.delete(Ne.query),t(e)};return R.jsxs("div",{className:"flex gap-2",children:[R.jsx(xl,{isActive:n==="show_hn",name:"Show HN",onClick:()=>r(Ne.tags,"show_hn")}),R.jsx(xl,{isActive:n==="ask_hn",name:"Ask HN",onClick:()=>r(Ne.tags,"ask_hn")}),R.jsx(xl,{isActive:n==="story",name:"Stories",onClick:()=>r(Ne.tags,"story")})]})};function Nv(e,t=[],n=0){const r=P.useCallback(e,t);P.useEffect(()=>{const i=setTimeout(r,n);return()=>clearTimeout(i)},[r,n])}const Fv=({initialValue:e})=>{const[t,n]=Cu(),[r,i]=P.useState(e),l=()=>{t.delete(Ne.tags),r?t.set(Ne.query,r):t.delete(Ne.query),n(t)};Nv(()=>{r&&l()},[r],800);const o=s=>{s.preventDefault(),l()},u=s=>{i(s.target.value),s.target.value||l()};return R.jsxs("form",{onSubmit:o,className:"flex relative",children:[R.jsx("input",{onChange:u,value:r,className:"flex border border-gray-800 transition focus:border-primary-500 bg-background px-2 py-1 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 w-full",placeholder:"Search"}),!!r&&R.jsx("button",{className:"absolute w-8 right-0 top-0 bottom-0 p-2 h-full text-base leading-[16px]",type:"reset",onClick:()=>{t.delete(Ne.query),n(t)},children:"X"})]})},Rv=({children:e,...t})=>R.jsx("button",{className:"font-bold rounded px-2 py-1 md:px-3 md:py-2 uppercase hover:bg-gray-900 hover:text-white inline-flex items-center transition bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-300 dark:hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-70 disabled:hover:bg-gray-200 dark:disabled:hover:bg-gray-800 disabled:hover:text-current",...t,children:R.jsx("div",{className:"inline-flex items-center flex-shrink-0",children:R.jsx("span",{className:"flex items-center min-w-0 text-xs uppercase font-semibold",children:e})})}),Lv=({onClick:e})=>R.jsxs(Rv,{onClick:e,children:[R.jsx("div",{className:"inline-flex items-center flex-shrink-0",children:R.jsx("div",{className:"h-auto !p-0 bg-primary-600 rounded",children:R.jsx("div",{className:"h-4 w-4 py-px",children:R.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",className:"h-full w-full",children:R.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M11 17l-5-5m0 0l5-5m-5 5h12"})})})})}),R.jsx("span",{className:"text-xs uppercase font-semibold ml-2",children:"back"})]}),Tv=()=>{const{pathname:e}=qi(),[t]=Cu(),n=Of(),r=()=>{n(-1)},i=t.get(Ne.query)||"",l=e===Eo.root;return R.jsxs("div",{className:"z-20 px-4 py-4 md:px-0 md:py-6 flex flex-col gap-4 sticky top-0 left-0 bg-gray-100 dark:bg-gray-900",children:[R.jsxs("div",{className:"flex items-center justify-between gap-8",children:[R.jsxs("div",{className:"flex gap-6 items-center",children:[!l&&R.jsx(Lv,{onClick:r}),R.jsx("h1",{className:"font-bold uppercase tracking-widest text-lg sm:text-xl",children:"HEWS"})]}),l&&R.jsx(Fv,{initialValue:i},i)]}),l&&R.jsx("div",{className:"flex justify-end",children:R.jsx(Ov,{})})]})},Mv=new xh({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}});function zv(){return R.jsx(_h,{client:Mv,children:R.jsx(kv,{children:R.jsx("div",{className:"bg-gray-100 dark:bg-gray-900 dark:text-gray-300 h-full",children:R.jsx("div",{className:"mx-auto max-w-[700px]",children:R.jsxs("div",{className:"grid grid-rows-[auto_1fr] h-screen",children:[R.jsx(Tv,{}),R.jsx(_v,{})]})})})})})}El.createRoot(document.getElementById("root")).render(R.jsx(be.StrictMode,{children:R.jsx(zv,{})}));export{Rv as B,be as R,Qi as S,$i as _,Of as a,Iv as b,D as c,lh as d,df as e,Gr as f,yf as g,kl as h,cf as i,R as j,ne as k,jv as l,ae as n,Sl as p,Ne as q,P as r,Dv as s,oh as t,Cu as u}; + */function xo(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function gv(e,t){let n=xo(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(l=>{n.append(i,l)})}),n}const wv="6";try{window.__reactRouterVersion=wv}catch{}const Sv="startTransition",Vs=Kf[Sv];function kv(e){let{basename:t,children:n,future:r,window:i}=e,l=P.useRef();l.current==null&&(l.current=Oh({window:i,v5Compat:!0}));let o=l.current,[u,s]=P.useState({action:o.action,location:o.location}),{v7_startTransition:a}=r||{},d=P.useCallback(p=>{a&&Vs?Vs(()=>s(p)):s(p)},[s,a]);return P.useLayoutEffect(()=>o.listen(d),[o,d]),P.createElement(mv,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o,future:r})}var Ws;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ws||(Ws={}));var Hs;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Hs||(Hs={}));function Cu(e){let t=P.useRef(xo(e)),n=P.useRef(!1),r=qi(),i=P.useMemo(()=>gv(r.search,n.current?null:t.current),[r.search]),l=Of(),o=P.useCallback((u,s)=>{const a=xo(typeof u=="function"?u(i):u);n.current=!0,l("?"+a,s)},[l,i]);return[i,o]}const Cv="modulepreload",xv=function(e){return"/news/"+e},qs={},Rf=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const l=document.getElementsByTagName("link");i=Promise.all(n.map(o=>{if(o=xv(o),o in qs)return;qs[o]=!0;const u=o.endsWith(".css"),s=u?'[rel="stylesheet"]':"";if(!!r)for(let p=l.length-1;p>=0;p--){const v=l[p];if(v.href===o&&(!u||v.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${s}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":Cv,u||(d.as="script",d.crossOrigin=""),d.href=o,document.head.appendChild(d),u)return new Promise((p,v)=>{d.addEventListener("load",p),d.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${o}`)))})}))}return i.then(()=>t()).catch(l=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=l,window.dispatchEvent(o),!o.defaultPrevented)throw l})},Eo={root:"/",storyDetails:"/:id"},Ks=()=>R.jsx("div",{className:"h-screen w-screen grid place-items-center",children:R.jsx("img",{src:"/favicon.svg",alt:"Loading...",width:48,height:48,className:"animate-pulse"})}),Ev=P.lazy(()=>Rf(()=>import("./Home-IPdwMo5w.js"),__vite__mapDeps([0,1]))),Pv=P.lazy(()=>Rf(()=>import("./StoryDetails-BM93KYSS.js"),__vite__mapDeps([2,1]))),_v=()=>R.jsxs(yv,{children:[R.jsx(ko,{path:Eo.root,element:R.jsx(P.Suspense,{fallback:R.jsx(Ks,{}),children:R.jsx(Ev,{})})}),R.jsx(ko,{path:Eo.storyDetails,element:R.jsx(P.Suspense,{fallback:R.jsx(Ks,{}),children:R.jsx(Pv,{})})})]}),xl=({name:e,onClick:t,isActive:n=!1})=>R.jsx("div",{className:`cursor-pointer transition flex items-baseline gap-2 rounded-sm px-2 py-1 border ${n?"border-primary-500":"border-gray-800"}`,onClick:t,children:R.jsx("span",{className:"text-xs",children:e})}),Ne={query:"query",tags:"tags",restrictSearchableAttributes:"restrictSearchableAttributes",page:"page"},Ov=()=>{const[e,t]=Cu(),n=e.get(Ne.tags),r=(i,l)=>{n===l?(e.delete(Ne.tags),e.delete(Ne.page)):e.set(i,l),e.delete(Ne.query),t(e)};return R.jsxs("div",{className:"flex gap-2",children:[R.jsx(xl,{isActive:n==="show_hn",name:"Show HN",onClick:()=>r(Ne.tags,"show_hn")}),R.jsx(xl,{isActive:n==="ask_hn",name:"Ask HN",onClick:()=>r(Ne.tags,"ask_hn")}),R.jsx(xl,{isActive:n==="story",name:"Stories",onClick:()=>r(Ne.tags,"story")})]})};function Nv(e,t=[],n=0){const r=P.useCallback(e,t);P.useEffect(()=>{const i=setTimeout(r,n);return()=>clearTimeout(i)},[r,n])}const Fv=({initialValue:e})=>{const[t,n]=Cu(),[r,i]=P.useState(e),l=()=>{t.delete(Ne.tags),r?t.set(Ne.query,r):t.delete(Ne.query),n(t)};Nv(()=>{r&&l()},[r],800);const o=s=>{s.preventDefault(),l()},u=s=>{i(s.target.value),s.target.value||l()};return R.jsxs("form",{onSubmit:o,className:"flex relative",children:[R.jsx("input",{onChange:u,value:r,className:"flex border border-gray-800 transition focus:border-primary-500 bg-background px-2 py-1 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 w-full",placeholder:"Search"}),!!r&&R.jsx("button",{className:"absolute w-8 right-0 top-0 bottom-0 p-2 h-full text-base leading-[16px]",type:"reset",onClick:()=>{t.delete(Ne.query),n(t)},children:"X"})]})},Rv=({children:e,...t})=>R.jsx("button",{className:"font-bold rounded px-2 py-1 md:px-3 md:py-2 uppercase hover:bg-gray-900 hover:text-white inline-flex items-center transition bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-300 dark:hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-70 disabled:hover:bg-gray-200 dark:disabled:hover:bg-gray-800 disabled:hover:text-current",...t,children:R.jsx("div",{className:"inline-flex items-center flex-shrink-0",children:R.jsx("span",{className:"flex items-center min-w-0 text-xs uppercase font-semibold",children:e})})}),Lv=({onClick:e})=>R.jsxs(Rv,{onClick:e,children:[R.jsx("div",{className:"inline-flex items-center flex-shrink-0",children:R.jsx("div",{className:"h-auto !p-0 bg-primary-600 rounded",children:R.jsx("div",{className:"h-4 w-4 py-px",children:R.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",className:"h-full w-full",children:R.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M11 17l-5-5m0 0l5-5m-5 5h12"})})})})}),R.jsx("span",{className:"text-xs uppercase font-semibold ml-2",children:"back"})]}),Tv=()=>{const{pathname:e}=qi(),[t]=Cu(),n=Of(),r=()=>{n(-1)},i=t.get(Ne.query)||"",l=e===Eo.root;return R.jsxs("div",{className:"z-20 px-4 py-4 md:px-0 md:py-6 flex flex-col gap-4 sticky top-0 left-0 bg-gray-100 dark:bg-gray-900",children:[R.jsxs("div",{className:"flex items-center justify-between gap-8",children:[R.jsxs("div",{className:"flex gap-6 items-center",children:[!l&&R.jsx(Lv,{onClick:r}),R.jsx("h1",{className:"font-bold uppercase tracking-widest text-lg sm:text-xl",children:"HEWS"})]}),l&&R.jsx(Fv,{initialValue:i},i)]}),l&&R.jsx("div",{className:"flex justify-end",children:R.jsx(Ov,{})})]})},Mv=new xh({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}});function zv(){return R.jsx(_h,{client:Mv,children:R.jsx(kv,{children:R.jsx("div",{className:"bg-gray-100 dark:bg-gray-900 dark:text-gray-300 h-full",children:R.jsx("div",{className:"mx-auto max-w-[700px]",children:R.jsxs("div",{className:"grid grid-rows-[auto_1fr] h-screen",children:[R.jsx(Tv,{}),R.jsx(_v,{})]})})})})})}El.createRoot(document.getElementById("root")).render(R.jsx(be.StrictMode,{children:R.jsx(zv,{})}));export{Rv as B,be as R,Qi as S,$i as _,Of as a,Iv as b,D as c,lh as d,df as e,Gr as f,yf as g,kl as h,cf as i,R as j,ne as k,jv as l,ae as n,Sl as p,Ne as q,P as r,Dv as s,oh as t,Cu as u}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["assets/Home-BG5u3Gte.js","assets/PageLayout-t9exb1nu.js","assets/StoryDetails-hkFTZqFp.js"] + __vite__mapDeps.viteFileDeps = ["assets/Home-IPdwMo5w.js","assets/PageLayout-e8KYfbHX.js","assets/StoryDetails-BM93KYSS.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } -//# sourceMappingURL=index-422DQ6gI.js.map +//# sourceMappingURL=index-OPB39aai.js.map diff --git a/assets/index-422DQ6gI.js.map b/assets/index-OPB39aai.js.map similarity index 99% rename from assets/index-422DQ6gI.js.map rename to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AAAA,MAACW,IAAa,GAChB,CAEJ,GAEJ,ECrCMxR,GAAc,IAAIjC,GAAY,CAClC,eAAgB,CACd,QAAS,CACP,qBAAsB,GACtB,MAAO,EACT,CACF,CACF,CAAC,EAED,SAASgV,IAAM,CACb,aACG9S,GAAoB,QAAQD,GAC3B,SAAA6Q,EAAA,IAAClB,IACC,SAACkB,EAAA,WAAI,UAAU,yDACb,eAAC,MAAI,WAAU,wBACb,SAACK,OAAA,OAAI,UAAU,qCACb,UAAAL,EAAA,IAAC8B,GAAO,UACP1B,GAAU,GACb,IACF,CACF,EACF,EACF,EAEJ,CCxBAxR,GAAS,WAAW,SAAS,eAAe,MAAM,CAAE,EAAE,aACnDE,GAAM,WAAN,CACC,SAAAkR,MAACkC,IAAI,GACP,CACF","names":["l","n","p","q","r","t","u","v","w","x","y","z","A","a","B","C","D","E","b","e","F","G","H","I","J","K","L","M","d","c","k","h","g","f","m","N","O","escape","P","Q","R","S","T","U","V","W","react_production_min","reactModule","require$$0","reactJsxRuntime_production_min","jsxRuntimeModule","exports","schedulerModule","aa","ca","require$$1","da","ea","fa","ha","ia","ja","ka","la","ma","oa","pa","qa","ra","sa","ta","ua","va","wa","ya","za","Aa","Ba","Ca","Da","Ea","Fa","Ga","Ha","Ia","Ja","Ka","La","Ma","Na","Oa","Pa","Qa","Ra","Sa","Ta","Ua","Va","Wa","Xa","Ya","Za","ab","bb","cb","db","eb","fb","gb","hb","ib","jb","kb","lb","mb","nb","ob","pb","qb","rb","sb","tb","ub","vb","wb","xb","yb","zb","Ab","Bb","Cb","Db","Eb","Fb","Gb","Hb","Ib","Jb","Kb","Lb","Mb","Nb","Ob","Pb","Qb","Rb","Sb","Tb","Ub","Vb","Wb","Xb","Yb","Zb","$b","ac","bc","cc","dc","ec","fc","gc","hc","ic","jc","kc","lc","mc","oc","nc","pc","qc","rc","sc","tc","uc","vc","wc","xc","yc","zc","Ac","Bc","Cc","Dc","Ec","Fc","Gc","Hc","Ic","Jc","Kc","Lc","Mc","Nc","Oc","Pc","Qc","Rc","Sc","Tc","Uc","Vc","Wc","Xc","Yc","Zc","$c","ad","bd","cd","dd","ed","fd","gd","hd","id","jd","kd","ld","md","nd","od","pd","qd","rd","sd","td","ud","vd","wd","xd","yd","Ad","zd","Bd","Cd","Dd","Ed","Fd","Gd","Hd","Jd","Kd","Ld","Md","Nd","Od","Pd","Qd","Rd","Sd","Td","Ud","Vd","Wd","Yd","Zd","$d","ae","be","ce","de","ee","fe","ge","he","ie","je","ke","le","me","ne","oe","pe","qe","re","se","te","ue","ve","we","xe","ye","ze","Ae","Be","Ce","De","Ee","Fe","Ge","He","Ie","Je","Ke","Le","Me","Ne","Oe","Pe","Qe","Re","Se","Te","Ue","Ve","We","Xe","Ye","Ze","$e","af","bf","cf","df","ef","ff","gf","hf","jf","kf","lf","mf","nf","of","pf","qf","rf","sf","tf","uf","vf","wf","na","xa","$a","ba","xf","yf","zf","Af","Bf","Cf","Df","Ef","Ff","Gf","Hf","Jf","If","Kf","Lf","Mf","Nf","Of","Pf","Qf","Rf","Sf","Tf","Uf","Vf","Wf","Xf","Yf","Zf","$f","ag","bg","cg","dg","eg","fg","gg","hg","ig","jg","kg","lg","mg","ng","og","pg","qg","rg","sg","tg","ug","vg","wg","xg","yg","zg","Ag","Bg","Cg","Dg","Eg","Fg","Gg","Hg","Ig","Jg","Kg","Lg","Mg","Ng","Og","Pg","Qg","Rg","Sg","Tg","Ug","Vg","Wg","Xg","Yg","Zg","$g","ah","bh","ch","dh","eh","fh","gh","hh","ih","jh","kh","nh","lh","mh","oh","ph","qh","rh","sh","th","uh","vh","wh","xh","yh","zh","Ah","Bh","Ch","Dh","Eh","Fh","Gh","Hh","Ih","Jh","Kh","Lh","Mh","Nh","Oh","Ph","Qh","Rh","Sh","Th","Uh","Vh","Wh","Xh","Yh","Zh","$h","ai","bi","ci","di","ei","fi","gi","hi","ii","ji","ki","li","mi","ni","oi","pi","qi","ri","si","ti","ui","vi","wi","xi","yi","zi","Ai","Bi","Ci","Di","Ei","Fi","Gi","Hi","Ii","Ji","Ki","Li","Mi","Ni","Oi","Pi","Qi","Ri","Si","Ti","Ui","Vi","Wi","Xi","Yi","Zi","$i","aj","bj","cj","dj","ej","fj","gj","hj","ij","jj","kj","lj","mj","nj","oj","pj","qj","rj","sj","tj","uj","vj","wj","xj","yj","zj","Aj","Bj","Cj","Dj","Ej","Fj","Gj","Hj","Ij","Jj","Kj","Lj","Mj","Nj","Oj","Pj","Qj","Rj","Sj","Tj","Uj","Vj","Wj","Xj","X","Yj","Zj","ak","bk","ck","dk","ek","fk","gk","hk","ik","jk","kk","lk","mk","nk","ok","pk","Z","qk","rk","sk","tk","uk","vk","wk","xk","yk","zk","Ak","Bk","Ck","Dk","Ek","Fk","Gk","Hk","Ik","Jk","Kk","Lk","Mk","Nk","Ok","Pk","Qk","Rk","Sk","Tk","Uk","Vk","Wk","Xk","Yk","Zk","$k","al","bl","cl","dl","el","fl","gl","hl","il","jl","kl","ll","ml","nl","ol","pl","ql","rl","sl","tl","ul","vl","wl","reactDom_production_min","checkDCE","err","reactDomModule","_setPrototypeOf","o","_inheritsLoose","subClass","superClass","setPrototypeOf","Subscribable","_proto","listener","_this","callback","_extends","target","i","source","key","isServer","noop","functionalUpdate","updater","input","isValidTimeout","value","ensureQueryKeyArray","timeUntilStale","updatedAt","staleTime","parseQueryArgs","arg1","arg2","arg3","isQueryKey","parseFilterArgs","mapQueryStatusFilter","active","inactive","isActive","matchQuery","filters","query","exact","fetching","predicate","queryKey","stale","hashQueryKeyByOptions","partialMatchKey","queryStatusFilter","matchMutation","mutation","mutationKey","hashQueryKey","options","hashFn","asArray","stableValueHash","_","val","isPlainObject","result","partialDeepEqual","replaceEqualDeep","array","aSize","bItems","bSize","copy","equalItems","shallowEqualObjects","hasObjectPrototype","ctor","prot","sleep","timeout","resolve","scheduleMicrotask","error","getAbortController","FocusManager","_Subscribable","onFocus","_window","_this$cleanup","setup","_this$cleanup2","_this2","focused","focusManager","OnlineManager","onOnline","online","onlineManager","defaultRetryDelay","failureCount","isCancelable","CancelledError","isCancelledError","Retryer","config","cancelRetry","cancelFn","continueFn","promiseResolve","promiseReject","cancelOptions","outerResolve","outerReject","reject","pause","continueResolve","run","promiseOrValue","_config$retry","_config$retryDelay","retry","retryDelay","delay","shouldRetry","NotifyManager","_len","args","_key","_this3","queue","fn","notifyManager","logger","getLogger","setLogger","newLogger","Query","_this$options$cacheTi","_this$options$isDataE","_this$options","prevData","data","state","setStateOptions","_this$retryer","promise","observer","_this$retryer2","_this$retryer3","fetchOptions","_this$options$behavio","_context$fetchOptions","_abortController$abor","_this$retryer4","abortController","queryFnContext","fetchFn","context","_this$options$behavio2","_context$fetchOptions2","action","hasInitialData","initialDataUpdatedAt","hasData","_action$meta","_action$dataUpdatedAt","QueryCache","client","_options$queryHash","queryHash","queryInMap","_parseFilterArgs","_parseFilterArgs2","event","_this4","_this5","Mutation","getDefaultState","restored","_this$options$retry","reducer","MutationCache","pausedMutations","infiniteQueryBehavior","_context$fetchOptions3","_context$fetchOptions4","_context$state$data","_context$state$data2","refetchPage","fetchMore","pageParam","isFetchingNextPage","isFetchingPreviousPage","oldPages","oldPageParams","abortSignal","newPageParams","cancelled","queryFn","buildNewPages","pages","param","page","previous","fetchPage","manual","queryFnResult","promiseAsAny","getNextPageParam","_manual","_param","getPreviousPageParam","shouldFetchFirstPage","_loop","shouldFetchNextPage","_param2","finalPromise","finalPromiseAsAny","QueryClient","_this$unsubscribeFocu","_this$unsubscribeOnli","_this$queryCache$find","queryKeyOrFilters","_ref","parsedOptions","defaultedOptions","_ref2","_this$queryCache$find2","queryCache","_parseFilterArgs3","refetchFilters","_parseFilterArgs4","_parseFilterArgs4$","promises","_ref3","_filters$refetchActiv","_filters$refetchInact","_parseFilterArgs5","_this6","_parseFilterArgs6","_this7","_this$queryDefaults$f","_this$mutationDefault","unstable_batchedUpdates","ReactDOM","defaultContext","React","QueryClientSharingContext","getQueryClientContext","contextSharing","useQueryClient","queryClient","QueryClientProvider","_ref$contextSharing","children","Context","Action","PopStateEventType","createBrowserHistory","createBrowserLocation","window","globalHistory","pathname","search","hash","createLocation","createBrowserHref","to","createPath","getUrlBasedHistory","invariant","message","warning","cond","createKey","getHistoryState","location","index","current","parsePath","path","parsedPath","hashIndex","searchIndex","getLocation","createHref","validateLocation","v5Compat","getIndex","handlePop","nextIndex","delta","history","push","historyState","url","replace","createURL","base","href","ResultType","matchRoutes","routes","locationArg","basename","stripBasename","branches","flattenRoutes","rankRouteBranches","matches","matchRouteBranch","safelyDecodeURI","parentsMeta","parentPath","flattenRoute","route","relativePath","meta","joinPaths","routesMeta","computeScore","_route$path","exploded","explodeOptionalSegments","segments","first","rest","isOptional","required","restExploded","subpath","compareIndexes","paramRe","dynamicSegmentValue","indexRouteValue","emptySegmentValue","staticSegmentValue","splatPenalty","isSplat","s","initialScore","score","segment","branch","matchedParams","matchedPathname","end","remainingPathname","match","matchPath","normalizePathname","pattern","matcher","compiledParams","compilePath","pathnameBase","captureGroups","memo","paramName","splatValue","safelyDecodeURIComponent","caseSensitive","params","regexpSource","startIndex","nextChar","resolvePath","fromPathname","toPathname","resolvePathname","normalizeSearch","normalizeHash","getInvalidPathError","char","field","dest","getPathContributingMatches","getResolveToMatches","v7_relativeSplatPath","pathMatches","idx","resolveTo","toArg","routePathnames","locationPathname","isPathRelative","isEmptyPath","from","routePathnameIndex","toSegments","hasExplicitTrailingSlash","hasCurrentTrailingSlash","paths","isRouteErrorResponse","validMutationMethodsArr","validRequestMethodsArr","DataRouterContext","React.createContext","DataRouterStateContext","NavigationContext","LocationContext","RouteContext","RouteErrorContext","useInRouterContext","React.useContext","useLocation","UNSAFE_invariant","useIsomorphicLayoutEffect","React.useLayoutEffect","useNavigate","isDataRoute","useNavigateStable","useNavigateUnstable","dataRouterContext","future","navigator","routePathnamesJson","UNSAFE_getResolveToMatches","activeRef","React.useRef","React.useCallback","useParams","routeMatch","useRoutes","useRoutesImpl","dataRouterState","parentMatches","parentParams","parentPathnameBase","locationFromContext","_parsedLocationArg$pa","parsedLocationArg","renderedMatches","_renderMatches","React.createElement","DefaultErrorComponent","useRouteError","stack","preStyles","React.Fragment","defaultErrorElement","RenderErrorBoundary","React.Component","props","errorInfo","RenderedRoute","routeContext","_dataRouterState2","_dataRouterState","errors","errorIndex","renderFallback","fallbackIndex","loaderData","needsToRunLoader","outlet","shouldRenderHydrateFallback","errorElement","hydrateFallbackElement","warningOnce","getChildren","DataRouterHook","DataRouterStateHook","useDataRouterContext","hookName","ctx","useDataRouterState","useRouteContext","useCurrentRouteId","thisRoute","_state$errors","routeId","router","alreadyWarned","Route","_props","Router","_ref5","basenameProp","locationProp","navigationType","staticProp","navigationContext","React.useMemo","locationContext","trailingPathname","Routes","_ref6","createRoutesFromChildren","React.Children","element","React.isValidElement","treePath","createSearchParams","init","getSearchParamsForLocation","locationSearch","defaultSearchParams","searchParams","REACT_ROUTER_VERSION","START_TRANSITION","startTransitionImpl","BrowserRouter","_ref4","historyRef","setStateImpl","React.useState","v7_startTransition","setState","newState","useSearchParams","defaultInit","defaultSearchParamsRef","hasSetSearchParamsRef","navigate","setSearchParams","nextInit","navigateOptions","newSearchParams","FallbackLoader","jsx","Home","lazy","StoryDetails","AppRoutes","jsxs","Suspense","FilterTag","name","onClick","queryParamsMapping","QuickFilters","currentTag","setFilterValue","filterName","filterValue","useDebounce","effect","deps","useCallback","useEffect","SearchField","initialValue","setQuery","useState","updateSearchParam","handleSubmit","handleQueryChange","Button","BackButton","TopNav","handleBackClick","initialSearchValue","isHome","App"],"sources":["../../node_modules/react/cjs/react.production.min.js","../../node_modules/react/index.js","../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../node_modules/react/jsx-runtime.js","../../node_modules/scheduler/cjs/scheduler.production.min.js","../../node_modules/scheduler/index.js","../../node_modules/react-dom/cjs/react-dom.production.min.js","../../node_modules/react-dom/index.js","../../node_modules/react-dom/client.js","../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../../node_modules/react-query/es/core/subscribable.js","../../node_modules/@babel/runtime/helpers/esm/extends.js","../../node_modules/react-query/es/core/utils.js","../../node_modules/react-query/es/core/focusManager.js","../../node_modules/react-query/es/core/onlineManager.js","../../node_modules/react-query/es/core/retryer.js","../../node_modules/react-query/es/core/notifyManager.js","../../node_modules/react-query/es/core/logger.js","../../node_modules/react-query/es/core/query.js","../../node_modules/react-query/es/core/queryCache.js","../../node_modules/react-query/es/core/mutation.js","../../node_modules/react-query/es/core/mutationCache.js","../../node_modules/react-query/es/core/infiniteQueryBehavior.js","../../node_modules/react-query/es/core/queryClient.js","../../node_modules/react-query/es/react/reactBatchedUpdates.js","../../node_modules/react-query/es/react/setBatchUpdatesFn.js","../../node_modules/react-query/es/react/logger.js","../../node_modules/react-query/es/react/setLogger.js","../../node_modules/react-query/es/react/QueryClientProvider.js","../../node_modules/@remix-run/router/dist/router.js","../../node_modules/react-router/dist/index.js","../../node_modules/react-router-dom/dist/index.js","../../src/routes/constants.ts","../../src/components/FallbackLoader.tsx","../../src/AppRoutes.tsx","../../src/components/FilterTag.tsx","../../src/constants.ts","../../src/components/QuickFilters.tsx","../../src/hooks/useDebounce.ts","../../src/components/SearchField.tsx","../../src/components/Button.tsx","../../src/components/BackButton.tsx","../../src/components/TopNav.tsx","../../src/App.tsx","../../src/main.tsx"],"sourcesContent":["/**\n * @license React\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=Symbol.for(\"react.element\"),n=Symbol.for(\"react.portal\"),p=Symbol.for(\"react.fragment\"),q=Symbol.for(\"react.strict_mode\"),r=Symbol.for(\"react.profiler\"),t=Symbol.for(\"react.provider\"),u=Symbol.for(\"react.context\"),v=Symbol.for(\"react.forward_ref\"),w=Symbol.for(\"react.suspense\"),x=Symbol.for(\"react.memo\"),y=Symbol.for(\"react.lazy\"),z=Symbol.iterator;function A(a){if(null===a||\"object\"!==typeof a)return null;a=z&&a[z]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}\nvar B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};\nE.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,a,b,\"setState\")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;\nH.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=\"\"+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1>>1,e=a[d];if(0>>1;dg(C,c))ng(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(ng(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,F=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","/**\n * @license React\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';var aa=require(\"react\"),ca=require(\"scheduler\");function p(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){z[a]=new v(a,2,!1,a,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(a){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1)});var ra=/[\\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()}\n\"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(a){var b=a.replace(ra,\nsa);z[b]=new v(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1)});\nz.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2h||e[g]!==f[h]){var k=\"\\n\"+e[g].replace(\" at new \",\" at \");a.displayName&&k.includes(\"\")&&(k=k.replace(\"\",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Ma(a):\"\"}\nfunction Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma(\"Lazy\");case 13:return Ma(\"Suspense\");case 19:return Ma(\"SuspenseList\");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return\"\"}}\nfunction Qa(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ya:return\"Fragment\";case wa:return\"Portal\";case Aa:return\"Profiler\";case za:return\"StrictMode\";case Ea:return\"Suspense\";case Fa:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case Ca:return(a.displayName||\"Context\")+\".Consumer\";case Ba:return(a._context.displayName||\"Context\")+\".Provider\";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName||\nb.name||\"\",a=\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||\"Memo\";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null}\nfunction Ra(a){var b=a.type;switch(a.tag){case 24:return\"Cache\";case 9:return(b.displayName||\"Context\")+\".Consumer\";case 10:return(b._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return a=b.render,a=a.displayName||a.name||\"\",b.displayName||(\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return b;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Qa(b);case 8:return b===za?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";\ncase 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(\"function\"===typeof b)return b.displayName||b.name||null;if(\"string\"===typeof b)return b}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"string\":case \"undefined\":return a;case \"object\":return a;default:return\"\"}}\nfunction Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ta(a,\"checked\",b,!1)}\nfunction bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?cb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction db(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction cb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}var eb=Array.isArray;\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e\"+b.valueOf().toString()+\"\";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar pb={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,\nzoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a]})});function rb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(\"\"+b).trim():b+\"px\"}\nfunction sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=rb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var tb=A({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});\nfunction ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if(\"object\"!==typeof b.dangerouslySetInnerHTML||!(\"__html\"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(p(62));}}\nfunction vb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){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 wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304;\nfunction tc(a){switch(a&-a){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 a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;\ndefault:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)))}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b}\nfunction Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Je(c)}}function Le(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Le(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nfunction Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),\"selectionStart\"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c,\nd);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});\"function\"===typeof c.focus&&c.focus();for(c=0;c=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}\nfunction Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H)}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c)}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||\"Unknown\",e));return A({},c,d)}\nfunction cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return!0}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c)}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a)}function ig(a){fg=!0;hg(a)}\nfunction jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a>=g;e-=g;rg=1<<32-oc(b)+e|c<w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;ww?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x}if(n.done)return c(e,\nm),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){\"object\"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if(\"object\"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k=\nf.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||\"object\"===typeof k&&null!==k&&k.$$typeof===Ha&&uh(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=sh(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ya?(d=Ah(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=yh(f.type,f.key,f.props,null,a.mode,h),h.ref=sh(a,d,f),h.return=a,a=h)}return g(a);case wa:a:{for(l=f.key;null!==\nd;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=zh(f,a.mode,h);d.return=a;a=d}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);th(a,f)}return\"string\"===typeof f&&\"\"!==f||\"number\"===typeof f?(f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):\n(c(a,d),d=xh(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Bh=vh(!0),Ch=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(a){if(a===Dh)throw Error(p(174));return a}function Ih(a,b){G(Gh,b);G(Fh,a);G(Eh,Dh);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:lb(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=lb(b,a)}E(Eh);G(Eh,b)}function Jh(){E(Eh);E(Fh);E(Gh)}\nfunction Kh(a){Hh(Gh.current);var b=Hh(Eh.current);var c=lb(b,a.type);b!==c&&(G(Fh,a),G(Eh,c))}function Lh(a){Fh.current===a&&(E(Eh),E(Fh))}var M=Uf(0);\nfunction Mh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||\"$?\"===c.data||\"$!\"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var Nh=[];\nfunction Oh(){for(var a=0;ac?c:4;a(!0);var d=Qh.transition;Qh.transition={};try{a(!1),b()}finally{C=c,Qh.transition=d}}function Fi(){return di().memoizedState}\nfunction Gi(a,b,c){var d=lh(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,c);else if(c=Yg(a,b,c,d),null!==c){var e=L();mh(c,a,d,e);Ji(c,b,d)}}\nfunction ri(a,b,c){var d=lh(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,Xg(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=Yg(a,b,e,d);null!==c&&(e=L(),mh(c,a,d,e),Ji(c,b,d))}}\nfunction Hi(a){var b=a.alternate;return a===N||null!==b&&b===N}function Ii(a,b){Th=Sh=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Ji(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}\nvar ai={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(a,b){ci().memoizedState=[a,void 0===b?null:b];return a},useContext:Vg,useEffect:vi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ti(4194308,\n4,yi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ti(4194308,4,a,b)},useInsertionEffect:function(a,b){return ti(4,2,a,b)},useMemo:function(a,b){var c=ci();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=ci();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Gi.bind(null,N,a);return[d.memoizedState,a]},useRef:function(a){var b=\nci();a={current:a};return b.memoizedState=a},useState:qi,useDebugValue:Ai,useDeferredValue:function(a){return ci().memoizedState=a},useTransition:function(){var a=qi(!1),b=a[0];a=Ei.bind(null,a[1]);ci().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=N,e=ci();if(I){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===R)throw Error(p(349));0!==(Rh&30)||ni(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;vi(ki.bind(null,d,\nf,a),[a]);d.flags|=2048;li(9,mi.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=ci(),b=R.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=\":\"+b+\"R\"+c;c=Uh++;0\\x3c/script>\",a=a.removeChild(a.firstChild)):\n\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;Aj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case \"dialog\":D(\"cancel\",a);D(\"close\",a);e=d;break;case \"iframe\":case \"object\":case \"embed\":D(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eHj&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304)}else{if(!d)if(a=Mh(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Ej(f,!0),null===f.tail&&\"hidden\"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Hj&&1073741824!==c&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering=\nb,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=M.current,G(M,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Ij(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(gj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));}\nfunction Jj(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return Jh(),E(Wf),E(H),Oh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Lh(b),null;case 13:E(M);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(M),null;case 4:return Jh(),null;case 10:return Rg(b.type._context),null;case 22:case 23:return Ij(),\nnull;case 24:return null;default:return null}}var Kj=!1,U=!1,Lj=\"function\"===typeof WeakSet?WeakSet:Set,V=null;function Mj(a,b){var c=a.ref;if(null!==c)if(\"function\"===typeof c)try{c(null)}catch(d){W(a,b,d)}else c.current=null}function Nj(a,b,c){try{c()}catch(d){W(a,b,d)}}var Oj=!1;\nfunction Pj(a,b){Cf=dd;a=Me();if(Ne(a)){if(\"selectionStart\"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+=\nq.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode}q=y}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;\ncase 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Lg(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent=\"\":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}n=Oj;Oj=!1;return n}\nfunction Qj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Nj(b,c,f)}e=e.next}while(e!==d)}}function Rj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Sj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}\"function\"===typeof b?b(a):b.current=a}}\nfunction Tj(a){var b=a.alternate;null!==b&&(a.alternate=null,Tj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Uj(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction Vj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Uj(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}\nfunction Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling}\nfunction Xj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Xj(a,b,c),a=a.sibling;null!==a;)Xj(a,b,c),a=a.sibling}var X=null,Yj=!1;function Zj(a,b,c){for(c=c.child;null!==c;)ak(a,b,c),c=c.sibling}\nfunction ak(a,b,c){if(lc&&\"function\"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c)}catch(h){}switch(c.tag){case 5:U||Mj(c,b);case 6:var d=X,e=Yj;X=null;Zj(a,b,c);X=d;Yj=e;null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Yj;X=c.stateNode.containerInfo;Yj=!0;\nZj(a,b,c);X=d;Yj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Nj(c,b,g):0!==(f&4)&&Nj(c,b,g));e=e.next}while(e!==d)}Zj(a,b,c);break;case 1:if(!U&&(Mj(c,b),d=c.stateNode,\"function\"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Zj(a,b,c);break;case 21:Zj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!==\nc.memoizedState,Zj(a,b,c),U=d):Zj(a,b,c);break;default:Zj(a,b,c)}}function bk(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Lj);b.forEach(function(b){var d=ck.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction dk(a,b){var c=b.deletions;if(null!==c)for(var d=0;de&&(e=g);d&=~f}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*mk(d/1960))-d;if(10a?16:a;if(null===xk)var d=!1;else{a=xk;xk=null;yk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kB()-gk?Lk(a,0):sk|=c);Ek(a,b)}function Zk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=L();a=Zg(a,b);null!==a&&(Ac(a,b,c),Ek(a,c))}function vj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Zk(a,c)}\nfunction ck(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Zk(a,c)}var Wk;\nWk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)Ug=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return Ug=!1,zj(a,b,c);Ug=0!==(a.flags&131072)?!0:!1}else Ug=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;jj(a,b);a=b.pendingProps;var e=Yf(b,H.current);Tg(b,c);e=Xh(null,b,d,a,e,c);var f=bi();b.flags|=1;\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=\nnull,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,ah(b),e.updater=nh,b.stateNode=e,e._reactInternals=b,rh(b,d,a,c),b=kj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Yi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{jj(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=$k(d);a=Lg(d,a);switch(e){case 0:b=dj(null,b,d,a,c);break a;case 1:b=ij(null,b,d,a,c);break a;case 11:b=Zi(null,b,d,a,c);break a;case 14:b=aj(null,b,d,Lg(d.type,a),c);break a}throw Error(p(306,\nd,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),dj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),ij(a,b,d,e,c);case 3:a:{lj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;bh(a,b);gh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=\nf,b.memoizedState=f,b.flags&256){e=Ki(Error(p(423)),b);b=mj(a,b,d,c,e);break a}else if(d!==e){e=Ki(Error(p(424)),b);b=mj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Ch(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ig();if(d===e){b=$i(a,b,c);break a}Yi(a,b,d,c)}b=b.child}return b;case 5:return Kh(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32),\nhj(a,b),Yi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return pj(a,b,c);case 4:return Ih(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Bh(b,null,d,c):Yi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),Zi(a,b,d,e,c);case 7:return Yi(a,b,b.pendingProps,c),b.child;case 8:return Yi(a,b,b.pendingProps.children,c),b.child;case 12:return Yi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;\ng=e.value;G(Mg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=$i(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=ch(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);Sg(f.return,\nc,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);Sg(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}Yi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,Tg(b,c),e=Vg(e),d=d(e),b.flags|=1,Yi(a,b,d,c),\nb.child;case 14:return d=b.type,e=Lg(d,b.pendingProps),e=Lg(d.type,e),aj(a,b,d,e,c);case 15:return cj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),jj(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,Tg(b,c),ph(b,d,e),rh(b,d,e,c),kj(null,b,d,!0,a,c);case 19:return yj(a,b,c);case 22:return ej(a,b,c)}throw Error(p(156,b.tag));};function Gk(a,b){return ac(a,b)}\nfunction al(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function Bg(a,b,c,d){return new al(a,b,c,d)}function bj(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction $k(a){if(\"function\"===typeof a)return bj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2}\nfunction wh(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction yh(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)bj(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ya:return Ah(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return qj(c,e,f,b);default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11;\nbreak a;case Ga:g=14;break a;case Ha:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,\"\"));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Ah(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a}function qj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:!1};return a}function xh(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a}\nfunction zh(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction bl(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=\nnull}function cl(a,b,c,d,e,f,g,h,k){a=new bl(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};ah(f);return a}function dl(a,b,c){var d=3 0;\n };\n\n _proto.onSubscribe = function onSubscribe() {// Do nothing\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {// Do nothing\n };\n\n return Subscribable;\n}();","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// TYPES\n// UTILS\nexport var isServer = typeof window === 'undefined';\nexport function noop() {\n return undefined;\n}\nexport function functionalUpdate(updater, input) {\n return typeof updater === 'function' ? updater(input) : updater;\n}\nexport function isValidTimeout(value) {\n return typeof value === 'number' && value >= 0 && value !== Infinity;\n}\nexport function ensureQueryKeyArray(value) {\n return Array.isArray(value) ? value : [value];\n}\nexport function difference(array1, array2) {\n return array1.filter(function (x) {\n return array2.indexOf(x) === -1;\n });\n}\nexport function replaceAt(array, index, value) {\n var copy = array.slice(0);\n copy[index] = value;\n return copy;\n}\nexport function timeUntilStale(updatedAt, staleTime) {\n return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);\n}\nexport function parseQueryArgs(arg1, arg2, arg3) {\n if (!isQueryKey(arg1)) {\n return arg1;\n }\n\n if (typeof arg2 === 'function') {\n return _extends({}, arg3, {\n queryKey: arg1,\n queryFn: arg2\n });\n }\n\n return _extends({}, arg2, {\n queryKey: arg1\n });\n}\nexport function parseMutationArgs(arg1, arg2, arg3) {\n if (isQueryKey(arg1)) {\n if (typeof arg2 === 'function') {\n return _extends({}, arg3, {\n mutationKey: arg1,\n mutationFn: arg2\n });\n }\n\n return _extends({}, arg2, {\n mutationKey: arg1\n });\n }\n\n if (typeof arg1 === 'function') {\n return _extends({}, arg2, {\n mutationFn: arg1\n });\n }\n\n return _extends({}, arg1);\n}\nexport function parseFilterArgs(arg1, arg2, arg3) {\n return isQueryKey(arg1) ? [_extends({}, arg2, {\n queryKey: arg1\n }), arg3] : [arg1 || {}, arg2];\n}\nexport function parseMutationFilterArgs(arg1, arg2) {\n return isQueryKey(arg1) ? _extends({}, arg2, {\n mutationKey: arg1\n }) : arg1;\n}\nexport function mapQueryStatusFilter(active, inactive) {\n if (active === true && inactive === true || active == null && inactive == null) {\n return 'all';\n } else if (active === false && inactive === false) {\n return 'none';\n } else {\n // At this point, active|inactive can only be true|false or false|true\n // so, when only one value is provided, the missing one has to be the negated value\n var isActive = active != null ? active : !inactive;\n return isActive ? 'active' : 'inactive';\n }\n}\nexport function matchQuery(filters, query) {\n var active = filters.active,\n exact = filters.exact,\n fetching = filters.fetching,\n inactive = filters.inactive,\n predicate = filters.predicate,\n queryKey = filters.queryKey,\n stale = filters.stale;\n\n if (isQueryKey(queryKey)) {\n if (exact) {\n if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {\n return false;\n }\n } else if (!partialMatchKey(query.queryKey, queryKey)) {\n return false;\n }\n }\n\n var queryStatusFilter = mapQueryStatusFilter(active, inactive);\n\n if (queryStatusFilter === 'none') {\n return false;\n } else if (queryStatusFilter !== 'all') {\n var isActive = query.isActive();\n\n if (queryStatusFilter === 'active' && !isActive) {\n return false;\n }\n\n if (queryStatusFilter === 'inactive' && isActive) {\n return false;\n }\n }\n\n if (typeof stale === 'boolean' && query.isStale() !== stale) {\n return false;\n }\n\n if (typeof fetching === 'boolean' && query.isFetching() !== fetching) {\n return false;\n }\n\n if (predicate && !predicate(query)) {\n return false;\n }\n\n return true;\n}\nexport function matchMutation(filters, mutation) {\n var exact = filters.exact,\n fetching = filters.fetching,\n predicate = filters.predicate,\n mutationKey = filters.mutationKey;\n\n if (isQueryKey(mutationKey)) {\n if (!mutation.options.mutationKey) {\n return false;\n }\n\n if (exact) {\n if (hashQueryKey(mutation.options.mutationKey) !== hashQueryKey(mutationKey)) {\n return false;\n }\n } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {\n return false;\n }\n }\n\n if (typeof fetching === 'boolean' && mutation.state.status === 'loading' !== fetching) {\n return false;\n }\n\n if (predicate && !predicate(mutation)) {\n return false;\n }\n\n return true;\n}\nexport function hashQueryKeyByOptions(queryKey, options) {\n var hashFn = (options == null ? void 0 : options.queryKeyHashFn) || hashQueryKey;\n return hashFn(queryKey);\n}\n/**\n * Default query keys hash function.\n */\n\nexport function hashQueryKey(queryKey) {\n var asArray = ensureQueryKeyArray(queryKey);\n return stableValueHash(asArray);\n}\n/**\n * Hashes the value into a stable hash.\n */\n\nexport function stableValueHash(value) {\n return JSON.stringify(value, function (_, val) {\n return isPlainObject(val) ? Object.keys(val).sort().reduce(function (result, key) {\n result[key] = val[key];\n return result;\n }, {}) : val;\n });\n}\n/**\n * Checks if key `b` partially matches with key `a`.\n */\n\nexport function partialMatchKey(a, b) {\n return partialDeepEqual(ensureQueryKeyArray(a), ensureQueryKeyArray(b));\n}\n/**\n * Checks if `b` partially matches with `a`.\n */\n\nexport function partialDeepEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (typeof a !== typeof b) {\n return false;\n }\n\n if (a && b && typeof a === 'object' && typeof b === 'object') {\n return !Object.keys(b).some(function (key) {\n return !partialDeepEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n/**\n * This function returns `a` if `b` is deeply equal.\n * If not, it will replace any deeply equal children of `b` with those of `a`.\n * This can be used for structural sharing between JSON values for example.\n */\n\nexport function replaceEqualDeep(a, b) {\n if (a === b) {\n return a;\n }\n\n var array = Array.isArray(a) && Array.isArray(b);\n\n if (array || isPlainObject(a) && isPlainObject(b)) {\n var aSize = array ? a.length : Object.keys(a).length;\n var bItems = array ? b : Object.keys(b);\n var bSize = bItems.length;\n var copy = array ? [] : {};\n var equalItems = 0;\n\n for (var i = 0; i < bSize; i++) {\n var key = array ? i : bItems[i];\n copy[key] = replaceEqualDeep(a[key], b[key]);\n\n if (copy[key] === a[key]) {\n equalItems++;\n }\n }\n\n return aSize === bSize && equalItems === aSize ? a : copy;\n }\n\n return b;\n}\n/**\n * Shallow compare objects. Only works with objects that always have the same properties.\n */\n\nexport function shallowEqualObjects(a, b) {\n if (a && !b || b && !a) {\n return false;\n }\n\n for (var key in a) {\n if (a[key] !== b[key]) {\n return false;\n }\n }\n\n return true;\n} // Copied from: https://github.com/jonschlinkert/is-plain-object\n\nexport function isPlainObject(o) {\n if (!hasObjectPrototype(o)) {\n return false;\n } // If has modified constructor\n\n\n var ctor = o.constructor;\n\n if (typeof ctor === 'undefined') {\n return true;\n } // If has modified prototype\n\n\n var prot = ctor.prototype;\n\n if (!hasObjectPrototype(prot)) {\n return false;\n } // If constructor does not have an Object-specific method\n\n\n if (!prot.hasOwnProperty('isPrototypeOf')) {\n return false;\n } // Most likely a plain Object\n\n\n return true;\n}\n\nfunction hasObjectPrototype(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nexport function isQueryKey(value) {\n return typeof value === 'string' || Array.isArray(value);\n}\nexport function isError(value) {\n return value instanceof Error;\n}\nexport function sleep(timeout) {\n return new Promise(function (resolve) {\n setTimeout(resolve, timeout);\n });\n}\n/**\n * Schedules a microtask.\n * This can be useful to schedule state updates after rendering.\n */\n\nexport function scheduleMicrotask(callback) {\n Promise.resolve().then(callback).catch(function (error) {\n return setTimeout(function () {\n throw error;\n });\n });\n}\nexport function getAbortController() {\n if (typeof AbortController === 'function') {\n return new AbortController();\n }\n}","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { Subscribable } from './subscribable';\nimport { isServer } from './utils';\nexport var FocusManager = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(FocusManager, _Subscribable);\n\n function FocusManager() {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n\n _this.setup = function (onFocus) {\n var _window;\n\n if (!isServer && ((_window = window) == null ? void 0 : _window.addEventListener)) {\n var listener = function listener() {\n return onFocus();\n }; // Listen to visibillitychange and focus\n\n\n window.addEventListener('visibilitychange', listener, false);\n window.addEventListener('focus', listener, false);\n return function () {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('visibilitychange', listener);\n window.removeEventListener('focus', listener);\n };\n }\n };\n\n return _this;\n }\n\n var _proto = FocusManager.prototype;\n\n _proto.onSubscribe = function onSubscribe() {\n if (!this.cleanup) {\n this.setEventListener(this.setup);\n }\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.hasListeners()) {\n var _this$cleanup;\n\n (_this$cleanup = this.cleanup) == null ? void 0 : _this$cleanup.call(this);\n this.cleanup = undefined;\n }\n };\n\n _proto.setEventListener = function setEventListener(setup) {\n var _this$cleanup2,\n _this2 = this;\n\n this.setup = setup;\n (_this$cleanup2 = this.cleanup) == null ? void 0 : _this$cleanup2.call(this);\n this.cleanup = setup(function (focused) {\n if (typeof focused === 'boolean') {\n _this2.setFocused(focused);\n } else {\n _this2.onFocus();\n }\n });\n };\n\n _proto.setFocused = function setFocused(focused) {\n this.focused = focused;\n\n if (focused) {\n this.onFocus();\n }\n };\n\n _proto.onFocus = function onFocus() {\n this.listeners.forEach(function (listener) {\n listener();\n });\n };\n\n _proto.isFocused = function isFocused() {\n if (typeof this.focused === 'boolean') {\n return this.focused;\n } // document global can be unavailable in react native\n\n\n if (typeof document === 'undefined') {\n return true;\n }\n\n return [undefined, 'visible', 'prerender'].includes(document.visibilityState);\n };\n\n return FocusManager;\n}(Subscribable);\nexport var focusManager = new FocusManager();","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { Subscribable } from './subscribable';\nimport { isServer } from './utils';\nexport var OnlineManager = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(OnlineManager, _Subscribable);\n\n function OnlineManager() {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n\n _this.setup = function (onOnline) {\n var _window;\n\n if (!isServer && ((_window = window) == null ? void 0 : _window.addEventListener)) {\n var listener = function listener() {\n return onOnline();\n }; // Listen to online\n\n\n window.addEventListener('online', listener, false);\n window.addEventListener('offline', listener, false);\n return function () {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('online', listener);\n window.removeEventListener('offline', listener);\n };\n }\n };\n\n return _this;\n }\n\n var _proto = OnlineManager.prototype;\n\n _proto.onSubscribe = function onSubscribe() {\n if (!this.cleanup) {\n this.setEventListener(this.setup);\n }\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.hasListeners()) {\n var _this$cleanup;\n\n (_this$cleanup = this.cleanup) == null ? void 0 : _this$cleanup.call(this);\n this.cleanup = undefined;\n }\n };\n\n _proto.setEventListener = function setEventListener(setup) {\n var _this$cleanup2,\n _this2 = this;\n\n this.setup = setup;\n (_this$cleanup2 = this.cleanup) == null ? void 0 : _this$cleanup2.call(this);\n this.cleanup = setup(function (online) {\n if (typeof online === 'boolean') {\n _this2.setOnline(online);\n } else {\n _this2.onOnline();\n }\n });\n };\n\n _proto.setOnline = function setOnline(online) {\n this.online = online;\n\n if (online) {\n this.onOnline();\n }\n };\n\n _proto.onOnline = function onOnline() {\n this.listeners.forEach(function (listener) {\n listener();\n });\n };\n\n _proto.isOnline = function isOnline() {\n if (typeof this.online === 'boolean') {\n return this.online;\n }\n\n if (typeof navigator === 'undefined' || typeof navigator.onLine === 'undefined') {\n return true;\n }\n\n return navigator.onLine;\n };\n\n return OnlineManager;\n}(Subscribable);\nexport var onlineManager = new OnlineManager();","import { focusManager } from './focusManager';\nimport { onlineManager } from './onlineManager';\nimport { sleep } from './utils';\n\nfunction defaultRetryDelay(failureCount) {\n return Math.min(1000 * Math.pow(2, failureCount), 30000);\n}\n\nexport function isCancelable(value) {\n return typeof (value == null ? void 0 : value.cancel) === 'function';\n}\nexport var CancelledError = function CancelledError(options) {\n this.revert = options == null ? void 0 : options.revert;\n this.silent = options == null ? void 0 : options.silent;\n};\nexport function isCancelledError(value) {\n return value instanceof CancelledError;\n} // CLASS\n\nexport var Retryer = function Retryer(config) {\n var _this = this;\n\n var cancelRetry = false;\n var cancelFn;\n var continueFn;\n var promiseResolve;\n var promiseReject;\n this.abort = config.abort;\n\n this.cancel = function (cancelOptions) {\n return cancelFn == null ? void 0 : cancelFn(cancelOptions);\n };\n\n this.cancelRetry = function () {\n cancelRetry = true;\n };\n\n this.continueRetry = function () {\n cancelRetry = false;\n };\n\n this.continue = function () {\n return continueFn == null ? void 0 : continueFn();\n };\n\n this.failureCount = 0;\n this.isPaused = false;\n this.isResolved = false;\n this.isTransportCancelable = false;\n this.promise = new Promise(function (outerResolve, outerReject) {\n promiseResolve = outerResolve;\n promiseReject = outerReject;\n });\n\n var resolve = function resolve(value) {\n if (!_this.isResolved) {\n _this.isResolved = true;\n config.onSuccess == null ? void 0 : config.onSuccess(value);\n continueFn == null ? void 0 : continueFn();\n promiseResolve(value);\n }\n };\n\n var reject = function reject(value) {\n if (!_this.isResolved) {\n _this.isResolved = true;\n config.onError == null ? void 0 : config.onError(value);\n continueFn == null ? void 0 : continueFn();\n promiseReject(value);\n }\n };\n\n var pause = function pause() {\n return new Promise(function (continueResolve) {\n continueFn = continueResolve;\n _this.isPaused = true;\n config.onPause == null ? void 0 : config.onPause();\n }).then(function () {\n continueFn = undefined;\n _this.isPaused = false;\n config.onContinue == null ? void 0 : config.onContinue();\n });\n }; // Create loop function\n\n\n var run = function run() {\n // Do nothing if already resolved\n if (_this.isResolved) {\n return;\n }\n\n var promiseOrValue; // Execute query\n\n try {\n promiseOrValue = config.fn();\n } catch (error) {\n promiseOrValue = Promise.reject(error);\n } // Create callback to cancel this fetch\n\n\n cancelFn = function cancelFn(cancelOptions) {\n if (!_this.isResolved) {\n reject(new CancelledError(cancelOptions));\n _this.abort == null ? void 0 : _this.abort(); // Cancel transport if supported\n\n if (isCancelable(promiseOrValue)) {\n try {\n promiseOrValue.cancel();\n } catch (_unused) {}\n }\n }\n }; // Check if the transport layer support cancellation\n\n\n _this.isTransportCancelable = isCancelable(promiseOrValue);\n Promise.resolve(promiseOrValue).then(resolve).catch(function (error) {\n var _config$retry, _config$retryDelay;\n\n // Stop if the fetch is already resolved\n if (_this.isResolved) {\n return;\n } // Do we need to retry the request?\n\n\n var retry = (_config$retry = config.retry) != null ? _config$retry : 3;\n var retryDelay = (_config$retryDelay = config.retryDelay) != null ? _config$retryDelay : defaultRetryDelay;\n var delay = typeof retryDelay === 'function' ? retryDelay(_this.failureCount, error) : retryDelay;\n var shouldRetry = retry === true || typeof retry === 'number' && _this.failureCount < retry || typeof retry === 'function' && retry(_this.failureCount, error);\n\n if (cancelRetry || !shouldRetry) {\n // We are done if the query does not need to be retried\n reject(error);\n return;\n }\n\n _this.failureCount++; // Notify on fail\n\n config.onFail == null ? void 0 : config.onFail(_this.failureCount, error); // Delay\n\n sleep(delay) // Pause if the document is not visible or when the device is offline\n .then(function () {\n if (!focusManager.isFocused() || !onlineManager.isOnline()) {\n return pause();\n }\n }).then(function () {\n if (cancelRetry) {\n reject(error);\n } else {\n run();\n }\n });\n });\n }; // Start loop\n\n\n run();\n};","import { scheduleMicrotask } from './utils'; // TYPES\n\n// CLASS\nexport var NotifyManager = /*#__PURE__*/function () {\n function NotifyManager() {\n this.queue = [];\n this.transactions = 0;\n\n this.notifyFn = function (callback) {\n callback();\n };\n\n this.batchNotifyFn = function (callback) {\n callback();\n };\n }\n\n var _proto = NotifyManager.prototype;\n\n _proto.batch = function batch(callback) {\n var result;\n this.transactions++;\n\n try {\n result = callback();\n } finally {\n this.transactions--;\n\n if (!this.transactions) {\n this.flush();\n }\n }\n\n return result;\n };\n\n _proto.schedule = function schedule(callback) {\n var _this = this;\n\n if (this.transactions) {\n this.queue.push(callback);\n } else {\n scheduleMicrotask(function () {\n _this.notifyFn(callback);\n });\n }\n }\n /**\n * All calls to the wrapped function will be batched.\n */\n ;\n\n _proto.batchCalls = function batchCalls(callback) {\n var _this2 = this;\n\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this2.schedule(function () {\n callback.apply(void 0, args);\n });\n };\n };\n\n _proto.flush = function flush() {\n var _this3 = this;\n\n var queue = this.queue;\n this.queue = [];\n\n if (queue.length) {\n scheduleMicrotask(function () {\n _this3.batchNotifyFn(function () {\n queue.forEach(function (callback) {\n _this3.notifyFn(callback);\n });\n });\n });\n }\n }\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n ;\n\n _proto.setNotifyFunction = function setNotifyFunction(fn) {\n this.notifyFn = fn;\n }\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n ;\n\n _proto.setBatchNotifyFunction = function setBatchNotifyFunction(fn) {\n this.batchNotifyFn = fn;\n };\n\n return NotifyManager;\n}(); // SINGLETON\n\nexport var notifyManager = new NotifyManager();","// TYPES\n// FUNCTIONS\nvar logger = console;\nexport function getLogger() {\n return logger;\n}\nexport function setLogger(newLogger) {\n logger = newLogger;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { getAbortController, functionalUpdate, isValidTimeout, noop, replaceEqualDeep, timeUntilStale, ensureQueryKeyArray } from './utils';\nimport { notifyManager } from './notifyManager';\nimport { getLogger } from './logger';\nimport { Retryer, isCancelledError } from './retryer'; // TYPES\n\n// CLASS\nexport var Query = /*#__PURE__*/function () {\n function Query(config) {\n this.abortSignalConsumed = false;\n this.hadObservers = false;\n this.defaultOptions = config.defaultOptions;\n this.setOptions(config.options);\n this.observers = [];\n this.cache = config.cache;\n this.queryKey = config.queryKey;\n this.queryHash = config.queryHash;\n this.initialState = config.state || this.getDefaultState(this.options);\n this.state = this.initialState;\n this.meta = config.meta;\n this.scheduleGc();\n }\n\n var _proto = Query.prototype;\n\n _proto.setOptions = function setOptions(options) {\n var _this$options$cacheTi;\n\n this.options = _extends({}, this.defaultOptions, options);\n this.meta = options == null ? void 0 : options.meta; // Default to 5 minutes if not cache time is set\n\n this.cacheTime = Math.max(this.cacheTime || 0, (_this$options$cacheTi = this.options.cacheTime) != null ? _this$options$cacheTi : 5 * 60 * 1000);\n };\n\n _proto.setDefaultOptions = function setDefaultOptions(options) {\n this.defaultOptions = options;\n };\n\n _proto.scheduleGc = function scheduleGc() {\n var _this = this;\n\n this.clearGcTimeout();\n\n if (isValidTimeout(this.cacheTime)) {\n this.gcTimeout = setTimeout(function () {\n _this.optionalRemove();\n }, this.cacheTime);\n }\n };\n\n _proto.clearGcTimeout = function clearGcTimeout() {\n if (this.gcTimeout) {\n clearTimeout(this.gcTimeout);\n this.gcTimeout = undefined;\n }\n };\n\n _proto.optionalRemove = function optionalRemove() {\n if (!this.observers.length) {\n if (this.state.isFetching) {\n if (this.hadObservers) {\n this.scheduleGc();\n }\n } else {\n this.cache.remove(this);\n }\n }\n };\n\n _proto.setData = function setData(updater, options) {\n var _this$options$isDataE, _this$options;\n\n var prevData = this.state.data; // Get the new data\n\n var data = functionalUpdate(updater, prevData); // Use prev data if an isDataEqual function is defined and returns `true`\n\n if ((_this$options$isDataE = (_this$options = this.options).isDataEqual) == null ? void 0 : _this$options$isDataE.call(_this$options, prevData, data)) {\n data = prevData;\n } else if (this.options.structuralSharing !== false) {\n // Structurally share data between prev and new data if needed\n data = replaceEqualDeep(prevData, data);\n } // Set data and mark it as cached\n\n\n this.dispatch({\n data: data,\n type: 'success',\n dataUpdatedAt: options == null ? void 0 : options.updatedAt\n });\n return data;\n };\n\n _proto.setState = function setState(state, setStateOptions) {\n this.dispatch({\n type: 'setState',\n state: state,\n setStateOptions: setStateOptions\n });\n };\n\n _proto.cancel = function cancel(options) {\n var _this$retryer;\n\n var promise = this.promise;\n (_this$retryer = this.retryer) == null ? void 0 : _this$retryer.cancel(options);\n return promise ? promise.then(noop).catch(noop) : Promise.resolve();\n };\n\n _proto.destroy = function destroy() {\n this.clearGcTimeout();\n this.cancel({\n silent: true\n });\n };\n\n _proto.reset = function reset() {\n this.destroy();\n this.setState(this.initialState);\n };\n\n _proto.isActive = function isActive() {\n return this.observers.some(function (observer) {\n return observer.options.enabled !== false;\n });\n };\n\n _proto.isFetching = function isFetching() {\n return this.state.isFetching;\n };\n\n _proto.isStale = function isStale() {\n return this.state.isInvalidated || !this.state.dataUpdatedAt || this.observers.some(function (observer) {\n return observer.getCurrentResult().isStale;\n });\n };\n\n _proto.isStaleByTime = function isStaleByTime(staleTime) {\n if (staleTime === void 0) {\n staleTime = 0;\n }\n\n return this.state.isInvalidated || !this.state.dataUpdatedAt || !timeUntilStale(this.state.dataUpdatedAt, staleTime);\n };\n\n _proto.onFocus = function onFocus() {\n var _this$retryer2;\n\n var observer = this.observers.find(function (x) {\n return x.shouldFetchOnWindowFocus();\n });\n\n if (observer) {\n observer.refetch();\n } // Continue fetch if currently paused\n\n\n (_this$retryer2 = this.retryer) == null ? void 0 : _this$retryer2.continue();\n };\n\n _proto.onOnline = function onOnline() {\n var _this$retryer3;\n\n var observer = this.observers.find(function (x) {\n return x.shouldFetchOnReconnect();\n });\n\n if (observer) {\n observer.refetch();\n } // Continue fetch if currently paused\n\n\n (_this$retryer3 = this.retryer) == null ? void 0 : _this$retryer3.continue();\n };\n\n _proto.addObserver = function addObserver(observer) {\n if (this.observers.indexOf(observer) === -1) {\n this.observers.push(observer);\n this.hadObservers = true; // Stop the query from being garbage collected\n\n this.clearGcTimeout();\n this.cache.notify({\n type: 'observerAdded',\n query: this,\n observer: observer\n });\n }\n };\n\n _proto.removeObserver = function removeObserver(observer) {\n if (this.observers.indexOf(observer) !== -1) {\n this.observers = this.observers.filter(function (x) {\n return x !== observer;\n });\n\n if (!this.observers.length) {\n // If the transport layer does not support cancellation\n // we'll let the query continue so the result can be cached\n if (this.retryer) {\n if (this.retryer.isTransportCancelable || this.abortSignalConsumed) {\n this.retryer.cancel({\n revert: true\n });\n } else {\n this.retryer.cancelRetry();\n }\n }\n\n if (this.cacheTime) {\n this.scheduleGc();\n } else {\n this.cache.remove(this);\n }\n }\n\n this.cache.notify({\n type: 'observerRemoved',\n query: this,\n observer: observer\n });\n }\n };\n\n _proto.getObserversCount = function getObserversCount() {\n return this.observers.length;\n };\n\n _proto.invalidate = function invalidate() {\n if (!this.state.isInvalidated) {\n this.dispatch({\n type: 'invalidate'\n });\n }\n };\n\n _proto.fetch = function fetch(options, fetchOptions) {\n var _this2 = this,\n _this$options$behavio,\n _context$fetchOptions,\n _abortController$abor;\n\n if (this.state.isFetching) {\n if (this.state.dataUpdatedAt && (fetchOptions == null ? void 0 : fetchOptions.cancelRefetch)) {\n // Silently cancel current fetch if the user wants to cancel refetches\n this.cancel({\n silent: true\n });\n } else if (this.promise) {\n var _this$retryer4;\n\n // make sure that retries that were potentially cancelled due to unmounts can continue\n (_this$retryer4 = this.retryer) == null ? void 0 : _this$retryer4.continueRetry(); // Return current promise if we are already fetching\n\n return this.promise;\n }\n } // Update config if passed, otherwise the config from the last execution is used\n\n\n if (options) {\n this.setOptions(options);\n } // Use the options from the first observer with a query function if no function is found.\n // This can happen when the query is hydrated or created with setQueryData.\n\n\n if (!this.options.queryFn) {\n var observer = this.observers.find(function (x) {\n return x.options.queryFn;\n });\n\n if (observer) {\n this.setOptions(observer.options);\n }\n }\n\n var queryKey = ensureQueryKeyArray(this.queryKey);\n var abortController = getAbortController(); // Create query function context\n\n var queryFnContext = {\n queryKey: queryKey,\n pageParam: undefined,\n meta: this.meta\n };\n Object.defineProperty(queryFnContext, 'signal', {\n enumerable: true,\n get: function get() {\n if (abortController) {\n _this2.abortSignalConsumed = true;\n return abortController.signal;\n }\n\n return undefined;\n }\n }); // Create fetch function\n\n var fetchFn = function fetchFn() {\n if (!_this2.options.queryFn) {\n return Promise.reject('Missing queryFn');\n }\n\n _this2.abortSignalConsumed = false;\n return _this2.options.queryFn(queryFnContext);\n }; // Trigger behavior hook\n\n\n var context = {\n fetchOptions: fetchOptions,\n options: this.options,\n queryKey: queryKey,\n state: this.state,\n fetchFn: fetchFn,\n meta: this.meta\n };\n\n if ((_this$options$behavio = this.options.behavior) == null ? void 0 : _this$options$behavio.onFetch) {\n var _this$options$behavio2;\n\n (_this$options$behavio2 = this.options.behavior) == null ? void 0 : _this$options$behavio2.onFetch(context);\n } // Store state in case the current fetch needs to be reverted\n\n\n this.revertState = this.state; // Set to fetching state if not already in it\n\n if (!this.state.isFetching || this.state.fetchMeta !== ((_context$fetchOptions = context.fetchOptions) == null ? void 0 : _context$fetchOptions.meta)) {\n var _context$fetchOptions2;\n\n this.dispatch({\n type: 'fetch',\n meta: (_context$fetchOptions2 = context.fetchOptions) == null ? void 0 : _context$fetchOptions2.meta\n });\n } // Try to fetch the data\n\n\n this.retryer = new Retryer({\n fn: context.fetchFn,\n abort: abortController == null ? void 0 : (_abortController$abor = abortController.abort) == null ? void 0 : _abortController$abor.bind(abortController),\n onSuccess: function onSuccess(data) {\n _this2.setData(data); // Notify cache callback\n\n\n _this2.cache.config.onSuccess == null ? void 0 : _this2.cache.config.onSuccess(data, _this2); // Remove query after fetching if cache time is 0\n\n if (_this2.cacheTime === 0) {\n _this2.optionalRemove();\n }\n },\n onError: function onError(error) {\n // Optimistically update state if needed\n if (!(isCancelledError(error) && error.silent)) {\n _this2.dispatch({\n type: 'error',\n error: error\n });\n }\n\n if (!isCancelledError(error)) {\n // Notify cache callback\n _this2.cache.config.onError == null ? void 0 : _this2.cache.config.onError(error, _this2); // Log error\n\n getLogger().error(error);\n } // Remove query after fetching if cache time is 0\n\n\n if (_this2.cacheTime === 0) {\n _this2.optionalRemove();\n }\n },\n onFail: function onFail() {\n _this2.dispatch({\n type: 'failed'\n });\n },\n onPause: function onPause() {\n _this2.dispatch({\n type: 'pause'\n });\n },\n onContinue: function onContinue() {\n _this2.dispatch({\n type: 'continue'\n });\n },\n retry: context.options.retry,\n retryDelay: context.options.retryDelay\n });\n this.promise = this.retryer.promise;\n return this.promise;\n };\n\n _proto.dispatch = function dispatch(action) {\n var _this3 = this;\n\n this.state = this.reducer(this.state, action);\n notifyManager.batch(function () {\n _this3.observers.forEach(function (observer) {\n observer.onQueryUpdate(action);\n });\n\n _this3.cache.notify({\n query: _this3,\n type: 'queryUpdated',\n action: action\n });\n });\n };\n\n _proto.getDefaultState = function getDefaultState(options) {\n var data = typeof options.initialData === 'function' ? options.initialData() : options.initialData;\n var hasInitialData = typeof options.initialData !== 'undefined';\n var initialDataUpdatedAt = hasInitialData ? typeof options.initialDataUpdatedAt === 'function' ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;\n var hasData = typeof data !== 'undefined';\n return {\n data: data,\n dataUpdateCount: 0,\n dataUpdatedAt: hasData ? initialDataUpdatedAt != null ? initialDataUpdatedAt : Date.now() : 0,\n error: null,\n errorUpdateCount: 0,\n errorUpdatedAt: 0,\n fetchFailureCount: 0,\n fetchMeta: null,\n isFetching: false,\n isInvalidated: false,\n isPaused: false,\n status: hasData ? 'success' : 'idle'\n };\n };\n\n _proto.reducer = function reducer(state, action) {\n var _action$meta, _action$dataUpdatedAt;\n\n switch (action.type) {\n case 'failed':\n return _extends({}, state, {\n fetchFailureCount: state.fetchFailureCount + 1\n });\n\n case 'pause':\n return _extends({}, state, {\n isPaused: true\n });\n\n case 'continue':\n return _extends({}, state, {\n isPaused: false\n });\n\n case 'fetch':\n return _extends({}, state, {\n fetchFailureCount: 0,\n fetchMeta: (_action$meta = action.meta) != null ? _action$meta : null,\n isFetching: true,\n isPaused: false\n }, !state.dataUpdatedAt && {\n error: null,\n status: 'loading'\n });\n\n case 'success':\n return _extends({}, state, {\n data: action.data,\n dataUpdateCount: state.dataUpdateCount + 1,\n dataUpdatedAt: (_action$dataUpdatedAt = action.dataUpdatedAt) != null ? _action$dataUpdatedAt : Date.now(),\n error: null,\n fetchFailureCount: 0,\n isFetching: false,\n isInvalidated: false,\n isPaused: false,\n status: 'success'\n });\n\n case 'error':\n var error = action.error;\n\n if (isCancelledError(error) && error.revert && this.revertState) {\n return _extends({}, this.revertState);\n }\n\n return _extends({}, state, {\n error: error,\n errorUpdateCount: state.errorUpdateCount + 1,\n errorUpdatedAt: Date.now(),\n fetchFailureCount: state.fetchFailureCount + 1,\n isFetching: false,\n isPaused: false,\n status: 'error'\n });\n\n case 'invalidate':\n return _extends({}, state, {\n isInvalidated: true\n });\n\n case 'setState':\n return _extends({}, state, action.state);\n\n default:\n return state;\n }\n };\n\n return Query;\n}();","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { hashQueryKeyByOptions, matchQuery, parseFilterArgs } from './utils';\nimport { Query } from './query';\nimport { notifyManager } from './notifyManager';\nimport { Subscribable } from './subscribable';\n// CLASS\nexport var QueryCache = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(QueryCache, _Subscribable);\n\n function QueryCache(config) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.config = config || {};\n _this.queries = [];\n _this.queriesMap = {};\n return _this;\n }\n\n var _proto = QueryCache.prototype;\n\n _proto.build = function build(client, options, state) {\n var _options$queryHash;\n\n var queryKey = options.queryKey;\n var queryHash = (_options$queryHash = options.queryHash) != null ? _options$queryHash : hashQueryKeyByOptions(queryKey, options);\n var query = this.get(queryHash);\n\n if (!query) {\n query = new Query({\n cache: this,\n queryKey: queryKey,\n queryHash: queryHash,\n options: client.defaultQueryOptions(options),\n state: state,\n defaultOptions: client.getQueryDefaults(queryKey),\n meta: options.meta\n });\n this.add(query);\n }\n\n return query;\n };\n\n _proto.add = function add(query) {\n if (!this.queriesMap[query.queryHash]) {\n this.queriesMap[query.queryHash] = query;\n this.queries.push(query);\n this.notify({\n type: 'queryAdded',\n query: query\n });\n }\n };\n\n _proto.remove = function remove(query) {\n var queryInMap = this.queriesMap[query.queryHash];\n\n if (queryInMap) {\n query.destroy();\n this.queries = this.queries.filter(function (x) {\n return x !== query;\n });\n\n if (queryInMap === query) {\n delete this.queriesMap[query.queryHash];\n }\n\n this.notify({\n type: 'queryRemoved',\n query: query\n });\n }\n };\n\n _proto.clear = function clear() {\n var _this2 = this;\n\n notifyManager.batch(function () {\n _this2.queries.forEach(function (query) {\n _this2.remove(query);\n });\n });\n };\n\n _proto.get = function get(queryHash) {\n return this.queriesMap[queryHash];\n };\n\n _proto.getAll = function getAll() {\n return this.queries;\n };\n\n _proto.find = function find(arg1, arg2) {\n var _parseFilterArgs = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs[0];\n\n if (typeof filters.exact === 'undefined') {\n filters.exact = true;\n }\n\n return this.queries.find(function (query) {\n return matchQuery(filters, query);\n });\n };\n\n _proto.findAll = function findAll(arg1, arg2) {\n var _parseFilterArgs2 = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs2[0];\n\n return Object.keys(filters).length > 0 ? this.queries.filter(function (query) {\n return matchQuery(filters, query);\n }) : this.queries;\n };\n\n _proto.notify = function notify(event) {\n var _this3 = this;\n\n notifyManager.batch(function () {\n _this3.listeners.forEach(function (listener) {\n listener(event);\n });\n });\n };\n\n _proto.onFocus = function onFocus() {\n var _this4 = this;\n\n notifyManager.batch(function () {\n _this4.queries.forEach(function (query) {\n query.onFocus();\n });\n });\n };\n\n _proto.onOnline = function onOnline() {\n var _this5 = this;\n\n notifyManager.batch(function () {\n _this5.queries.forEach(function (query) {\n query.onOnline();\n });\n });\n };\n\n return QueryCache;\n}(Subscribable);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { getLogger } from './logger';\nimport { notifyManager } from './notifyManager';\nimport { Retryer } from './retryer';\nimport { noop } from './utils'; // TYPES\n\n// CLASS\nexport var Mutation = /*#__PURE__*/function () {\n function Mutation(config) {\n this.options = _extends({}, config.defaultOptions, config.options);\n this.mutationId = config.mutationId;\n this.mutationCache = config.mutationCache;\n this.observers = [];\n this.state = config.state || getDefaultState();\n this.meta = config.meta;\n }\n\n var _proto = Mutation.prototype;\n\n _proto.setState = function setState(state) {\n this.dispatch({\n type: 'setState',\n state: state\n });\n };\n\n _proto.addObserver = function addObserver(observer) {\n if (this.observers.indexOf(observer) === -1) {\n this.observers.push(observer);\n }\n };\n\n _proto.removeObserver = function removeObserver(observer) {\n this.observers = this.observers.filter(function (x) {\n return x !== observer;\n });\n };\n\n _proto.cancel = function cancel() {\n if (this.retryer) {\n this.retryer.cancel();\n return this.retryer.promise.then(noop).catch(noop);\n }\n\n return Promise.resolve();\n };\n\n _proto.continue = function _continue() {\n if (this.retryer) {\n this.retryer.continue();\n return this.retryer.promise;\n }\n\n return this.execute();\n };\n\n _proto.execute = function execute() {\n var _this = this;\n\n var data;\n var restored = this.state.status === 'loading';\n var promise = Promise.resolve();\n\n if (!restored) {\n this.dispatch({\n type: 'loading',\n variables: this.options.variables\n });\n promise = promise.then(function () {\n // Notify cache callback\n _this.mutationCache.config.onMutate == null ? void 0 : _this.mutationCache.config.onMutate(_this.state.variables, _this);\n }).then(function () {\n return _this.options.onMutate == null ? void 0 : _this.options.onMutate(_this.state.variables);\n }).then(function (context) {\n if (context !== _this.state.context) {\n _this.dispatch({\n type: 'loading',\n context: context,\n variables: _this.state.variables\n });\n }\n });\n }\n\n return promise.then(function () {\n return _this.executeMutation();\n }).then(function (result) {\n data = result; // Notify cache callback\n\n _this.mutationCache.config.onSuccess == null ? void 0 : _this.mutationCache.config.onSuccess(data, _this.state.variables, _this.state.context, _this);\n }).then(function () {\n return _this.options.onSuccess == null ? void 0 : _this.options.onSuccess(data, _this.state.variables, _this.state.context);\n }).then(function () {\n return _this.options.onSettled == null ? void 0 : _this.options.onSettled(data, null, _this.state.variables, _this.state.context);\n }).then(function () {\n _this.dispatch({\n type: 'success',\n data: data\n });\n\n return data;\n }).catch(function (error) {\n // Notify cache callback\n _this.mutationCache.config.onError == null ? void 0 : _this.mutationCache.config.onError(error, _this.state.variables, _this.state.context, _this); // Log error\n\n getLogger().error(error);\n return Promise.resolve().then(function () {\n return _this.options.onError == null ? void 0 : _this.options.onError(error, _this.state.variables, _this.state.context);\n }).then(function () {\n return _this.options.onSettled == null ? void 0 : _this.options.onSettled(undefined, error, _this.state.variables, _this.state.context);\n }).then(function () {\n _this.dispatch({\n type: 'error',\n error: error\n });\n\n throw error;\n });\n });\n };\n\n _proto.executeMutation = function executeMutation() {\n var _this2 = this,\n _this$options$retry;\n\n this.retryer = new Retryer({\n fn: function fn() {\n if (!_this2.options.mutationFn) {\n return Promise.reject('No mutationFn found');\n }\n\n return _this2.options.mutationFn(_this2.state.variables);\n },\n onFail: function onFail() {\n _this2.dispatch({\n type: 'failed'\n });\n },\n onPause: function onPause() {\n _this2.dispatch({\n type: 'pause'\n });\n },\n onContinue: function onContinue() {\n _this2.dispatch({\n type: 'continue'\n });\n },\n retry: (_this$options$retry = this.options.retry) != null ? _this$options$retry : 0,\n retryDelay: this.options.retryDelay\n });\n return this.retryer.promise;\n };\n\n _proto.dispatch = function dispatch(action) {\n var _this3 = this;\n\n this.state = reducer(this.state, action);\n notifyManager.batch(function () {\n _this3.observers.forEach(function (observer) {\n observer.onMutationUpdate(action);\n });\n\n _this3.mutationCache.notify(_this3);\n });\n };\n\n return Mutation;\n}();\nexport function getDefaultState() {\n return {\n context: undefined,\n data: undefined,\n error: null,\n failureCount: 0,\n isPaused: false,\n status: 'idle',\n variables: undefined\n };\n}\n\nfunction reducer(state, action) {\n switch (action.type) {\n case 'failed':\n return _extends({}, state, {\n failureCount: state.failureCount + 1\n });\n\n case 'pause':\n return _extends({}, state, {\n isPaused: true\n });\n\n case 'continue':\n return _extends({}, state, {\n isPaused: false\n });\n\n case 'loading':\n return _extends({}, state, {\n context: action.context,\n data: undefined,\n error: null,\n isPaused: false,\n status: 'loading',\n variables: action.variables\n });\n\n case 'success':\n return _extends({}, state, {\n data: action.data,\n error: null,\n status: 'success',\n isPaused: false\n });\n\n case 'error':\n return _extends({}, state, {\n data: undefined,\n error: action.error,\n failureCount: state.failureCount + 1,\n isPaused: false,\n status: 'error'\n });\n\n case 'setState':\n return _extends({}, state, action.state);\n\n default:\n return state;\n }\n}","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { notifyManager } from './notifyManager';\nimport { Mutation } from './mutation';\nimport { matchMutation, noop } from './utils';\nimport { Subscribable } from './subscribable'; // TYPES\n\n// CLASS\nexport var MutationCache = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(MutationCache, _Subscribable);\n\n function MutationCache(config) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.config = config || {};\n _this.mutations = [];\n _this.mutationId = 0;\n return _this;\n }\n\n var _proto = MutationCache.prototype;\n\n _proto.build = function build(client, options, state) {\n var mutation = new Mutation({\n mutationCache: this,\n mutationId: ++this.mutationId,\n options: client.defaultMutationOptions(options),\n state: state,\n defaultOptions: options.mutationKey ? client.getMutationDefaults(options.mutationKey) : undefined,\n meta: options.meta\n });\n this.add(mutation);\n return mutation;\n };\n\n _proto.add = function add(mutation) {\n this.mutations.push(mutation);\n this.notify(mutation);\n };\n\n _proto.remove = function remove(mutation) {\n this.mutations = this.mutations.filter(function (x) {\n return x !== mutation;\n });\n mutation.cancel();\n this.notify(mutation);\n };\n\n _proto.clear = function clear() {\n var _this2 = this;\n\n notifyManager.batch(function () {\n _this2.mutations.forEach(function (mutation) {\n _this2.remove(mutation);\n });\n });\n };\n\n _proto.getAll = function getAll() {\n return this.mutations;\n };\n\n _proto.find = function find(filters) {\n if (typeof filters.exact === 'undefined') {\n filters.exact = true;\n }\n\n return this.mutations.find(function (mutation) {\n return matchMutation(filters, mutation);\n });\n };\n\n _proto.findAll = function findAll(filters) {\n return this.mutations.filter(function (mutation) {\n return matchMutation(filters, mutation);\n });\n };\n\n _proto.notify = function notify(mutation) {\n var _this3 = this;\n\n notifyManager.batch(function () {\n _this3.listeners.forEach(function (listener) {\n listener(mutation);\n });\n });\n };\n\n _proto.onFocus = function onFocus() {\n this.resumePausedMutations();\n };\n\n _proto.onOnline = function onOnline() {\n this.resumePausedMutations();\n };\n\n _proto.resumePausedMutations = function resumePausedMutations() {\n var pausedMutations = this.mutations.filter(function (x) {\n return x.state.isPaused;\n });\n return notifyManager.batch(function () {\n return pausedMutations.reduce(function (promise, mutation) {\n return promise.then(function () {\n return mutation.continue().catch(noop);\n });\n }, Promise.resolve());\n });\n };\n\n return MutationCache;\n}(Subscribable);","import { isCancelable } from './retryer';\nimport { getAbortController } from './utils';\nexport function infiniteQueryBehavior() {\n return {\n onFetch: function onFetch(context) {\n context.fetchFn = function () {\n var _context$fetchOptions, _context$fetchOptions2, _context$fetchOptions3, _context$fetchOptions4, _context$state$data, _context$state$data2;\n\n var refetchPage = (_context$fetchOptions = context.fetchOptions) == null ? void 0 : (_context$fetchOptions2 = _context$fetchOptions.meta) == null ? void 0 : _context$fetchOptions2.refetchPage;\n var fetchMore = (_context$fetchOptions3 = context.fetchOptions) == null ? void 0 : (_context$fetchOptions4 = _context$fetchOptions3.meta) == null ? void 0 : _context$fetchOptions4.fetchMore;\n var pageParam = fetchMore == null ? void 0 : fetchMore.pageParam;\n var isFetchingNextPage = (fetchMore == null ? void 0 : fetchMore.direction) === 'forward';\n var isFetchingPreviousPage = (fetchMore == null ? void 0 : fetchMore.direction) === 'backward';\n var oldPages = ((_context$state$data = context.state.data) == null ? void 0 : _context$state$data.pages) || [];\n var oldPageParams = ((_context$state$data2 = context.state.data) == null ? void 0 : _context$state$data2.pageParams) || [];\n var abortController = getAbortController();\n var abortSignal = abortController == null ? void 0 : abortController.signal;\n var newPageParams = oldPageParams;\n var cancelled = false; // Get query function\n\n var queryFn = context.options.queryFn || function () {\n return Promise.reject('Missing queryFn');\n };\n\n var buildNewPages = function buildNewPages(pages, param, page, previous) {\n newPageParams = previous ? [param].concat(newPageParams) : [].concat(newPageParams, [param]);\n return previous ? [page].concat(pages) : [].concat(pages, [page]);\n }; // Create function to fetch a page\n\n\n var fetchPage = function fetchPage(pages, manual, param, previous) {\n if (cancelled) {\n return Promise.reject('Cancelled');\n }\n\n if (typeof param === 'undefined' && !manual && pages.length) {\n return Promise.resolve(pages);\n }\n\n var queryFnContext = {\n queryKey: context.queryKey,\n signal: abortSignal,\n pageParam: param,\n meta: context.meta\n };\n var queryFnResult = queryFn(queryFnContext);\n var promise = Promise.resolve(queryFnResult).then(function (page) {\n return buildNewPages(pages, param, page, previous);\n });\n\n if (isCancelable(queryFnResult)) {\n var promiseAsAny = promise;\n promiseAsAny.cancel = queryFnResult.cancel;\n }\n\n return promise;\n };\n\n var promise; // Fetch first page?\n\n if (!oldPages.length) {\n promise = fetchPage([]);\n } // Fetch next page?\n else if (isFetchingNextPage) {\n var manual = typeof pageParam !== 'undefined';\n var param = manual ? pageParam : getNextPageParam(context.options, oldPages);\n promise = fetchPage(oldPages, manual, param);\n } // Fetch previous page?\n else if (isFetchingPreviousPage) {\n var _manual = typeof pageParam !== 'undefined';\n\n var _param = _manual ? pageParam : getPreviousPageParam(context.options, oldPages);\n\n promise = fetchPage(oldPages, _manual, _param, true);\n } // Refetch pages\n else {\n (function () {\n newPageParams = [];\n var manual = typeof context.options.getNextPageParam === 'undefined';\n var shouldFetchFirstPage = refetchPage && oldPages[0] ? refetchPage(oldPages[0], 0, oldPages) : true; // Fetch first page\n\n promise = shouldFetchFirstPage ? fetchPage([], manual, oldPageParams[0]) : Promise.resolve(buildNewPages([], oldPageParams[0], oldPages[0])); // Fetch remaining pages\n\n var _loop = function _loop(i) {\n promise = promise.then(function (pages) {\n var shouldFetchNextPage = refetchPage && oldPages[i] ? refetchPage(oldPages[i], i, oldPages) : true;\n\n if (shouldFetchNextPage) {\n var _param2 = manual ? oldPageParams[i] : getNextPageParam(context.options, pages);\n\n return fetchPage(pages, manual, _param2);\n }\n\n return Promise.resolve(buildNewPages(pages, oldPageParams[i], oldPages[i]));\n });\n };\n\n for (var i = 1; i < oldPages.length; i++) {\n _loop(i);\n }\n })();\n }\n\n var finalPromise = promise.then(function (pages) {\n return {\n pages: pages,\n pageParams: newPageParams\n };\n });\n var finalPromiseAsAny = finalPromise;\n\n finalPromiseAsAny.cancel = function () {\n cancelled = true;\n abortController == null ? void 0 : abortController.abort();\n\n if (isCancelable(promise)) {\n promise.cancel();\n }\n };\n\n return finalPromise;\n };\n }\n };\n}\nexport function getNextPageParam(options, pages) {\n return options.getNextPageParam == null ? void 0 : options.getNextPageParam(pages[pages.length - 1], pages);\n}\nexport function getPreviousPageParam(options, pages) {\n return options.getPreviousPageParam == null ? void 0 : options.getPreviousPageParam(pages[0], pages);\n}\n/**\n * Checks if there is a next page.\n * Returns `undefined` if it cannot be determined.\n */\n\nexport function hasNextPage(options, pages) {\n if (options.getNextPageParam && Array.isArray(pages)) {\n var nextPageParam = getNextPageParam(options, pages);\n return typeof nextPageParam !== 'undefined' && nextPageParam !== null && nextPageParam !== false;\n }\n}\n/**\n * Checks if there is a previous page.\n * Returns `undefined` if it cannot be determined.\n */\n\nexport function hasPreviousPage(options, pages) {\n if (options.getPreviousPageParam && Array.isArray(pages)) {\n var previousPageParam = getPreviousPageParam(options, pages);\n return typeof previousPageParam !== 'undefined' && previousPageParam !== null && previousPageParam !== false;\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { hashQueryKey, noop, parseFilterArgs, parseQueryArgs, partialMatchKey, hashQueryKeyByOptions } from './utils';\nimport { QueryCache } from './queryCache';\nimport { MutationCache } from './mutationCache';\nimport { focusManager } from './focusManager';\nimport { onlineManager } from './onlineManager';\nimport { notifyManager } from './notifyManager';\nimport { infiniteQueryBehavior } from './infiniteQueryBehavior';\n// CLASS\nexport var QueryClient = /*#__PURE__*/function () {\n function QueryClient(config) {\n if (config === void 0) {\n config = {};\n }\n\n this.queryCache = config.queryCache || new QueryCache();\n this.mutationCache = config.mutationCache || new MutationCache();\n this.defaultOptions = config.defaultOptions || {};\n this.queryDefaults = [];\n this.mutationDefaults = [];\n }\n\n var _proto = QueryClient.prototype;\n\n _proto.mount = function mount() {\n var _this = this;\n\n this.unsubscribeFocus = focusManager.subscribe(function () {\n if (focusManager.isFocused() && onlineManager.isOnline()) {\n _this.mutationCache.onFocus();\n\n _this.queryCache.onFocus();\n }\n });\n this.unsubscribeOnline = onlineManager.subscribe(function () {\n if (focusManager.isFocused() && onlineManager.isOnline()) {\n _this.mutationCache.onOnline();\n\n _this.queryCache.onOnline();\n }\n });\n };\n\n _proto.unmount = function unmount() {\n var _this$unsubscribeFocu, _this$unsubscribeOnli;\n\n (_this$unsubscribeFocu = this.unsubscribeFocus) == null ? void 0 : _this$unsubscribeFocu.call(this);\n (_this$unsubscribeOnli = this.unsubscribeOnline) == null ? void 0 : _this$unsubscribeOnli.call(this);\n };\n\n _proto.isFetching = function isFetching(arg1, arg2) {\n var _parseFilterArgs = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs[0];\n\n filters.fetching = true;\n return this.queryCache.findAll(filters).length;\n };\n\n _proto.isMutating = function isMutating(filters) {\n return this.mutationCache.findAll(_extends({}, filters, {\n fetching: true\n })).length;\n };\n\n _proto.getQueryData = function getQueryData(queryKey, filters) {\n var _this$queryCache$find;\n\n return (_this$queryCache$find = this.queryCache.find(queryKey, filters)) == null ? void 0 : _this$queryCache$find.state.data;\n };\n\n _proto.getQueriesData = function getQueriesData(queryKeyOrFilters) {\n return this.getQueryCache().findAll(queryKeyOrFilters).map(function (_ref) {\n var queryKey = _ref.queryKey,\n state = _ref.state;\n var data = state.data;\n return [queryKey, data];\n });\n };\n\n _proto.setQueryData = function setQueryData(queryKey, updater, options) {\n var parsedOptions = parseQueryArgs(queryKey);\n var defaultedOptions = this.defaultQueryOptions(parsedOptions);\n return this.queryCache.build(this, defaultedOptions).setData(updater, options);\n };\n\n _proto.setQueriesData = function setQueriesData(queryKeyOrFilters, updater, options) {\n var _this2 = this;\n\n return notifyManager.batch(function () {\n return _this2.getQueryCache().findAll(queryKeyOrFilters).map(function (_ref2) {\n var queryKey = _ref2.queryKey;\n return [queryKey, _this2.setQueryData(queryKey, updater, options)];\n });\n });\n };\n\n _proto.getQueryState = function getQueryState(queryKey, filters) {\n var _this$queryCache$find2;\n\n return (_this$queryCache$find2 = this.queryCache.find(queryKey, filters)) == null ? void 0 : _this$queryCache$find2.state;\n };\n\n _proto.removeQueries = function removeQueries(arg1, arg2) {\n var _parseFilterArgs2 = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs2[0];\n\n var queryCache = this.queryCache;\n notifyManager.batch(function () {\n queryCache.findAll(filters).forEach(function (query) {\n queryCache.remove(query);\n });\n });\n };\n\n _proto.resetQueries = function resetQueries(arg1, arg2, arg3) {\n var _this3 = this;\n\n var _parseFilterArgs3 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs3[0],\n options = _parseFilterArgs3[1];\n\n var queryCache = this.queryCache;\n\n var refetchFilters = _extends({}, filters, {\n active: true\n });\n\n return notifyManager.batch(function () {\n queryCache.findAll(filters).forEach(function (query) {\n query.reset();\n });\n return _this3.refetchQueries(refetchFilters, options);\n });\n };\n\n _proto.cancelQueries = function cancelQueries(arg1, arg2, arg3) {\n var _this4 = this;\n\n var _parseFilterArgs4 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs4[0],\n _parseFilterArgs4$ = _parseFilterArgs4[1],\n cancelOptions = _parseFilterArgs4$ === void 0 ? {} : _parseFilterArgs4$;\n\n if (typeof cancelOptions.revert === 'undefined') {\n cancelOptions.revert = true;\n }\n\n var promises = notifyManager.batch(function () {\n return _this4.queryCache.findAll(filters).map(function (query) {\n return query.cancel(cancelOptions);\n });\n });\n return Promise.all(promises).then(noop).catch(noop);\n };\n\n _proto.invalidateQueries = function invalidateQueries(arg1, arg2, arg3) {\n var _ref3,\n _filters$refetchActiv,\n _filters$refetchInact,\n _this5 = this;\n\n var _parseFilterArgs5 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs5[0],\n options = _parseFilterArgs5[1];\n\n var refetchFilters = _extends({}, filters, {\n // if filters.refetchActive is not provided and filters.active is explicitly false,\n // e.g. invalidateQueries({ active: false }), we don't want to refetch active queries\n active: (_ref3 = (_filters$refetchActiv = filters.refetchActive) != null ? _filters$refetchActiv : filters.active) != null ? _ref3 : true,\n inactive: (_filters$refetchInact = filters.refetchInactive) != null ? _filters$refetchInact : false\n });\n\n return notifyManager.batch(function () {\n _this5.queryCache.findAll(filters).forEach(function (query) {\n query.invalidate();\n });\n\n return _this5.refetchQueries(refetchFilters, options);\n });\n };\n\n _proto.refetchQueries = function refetchQueries(arg1, arg2, arg3) {\n var _this6 = this;\n\n var _parseFilterArgs6 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs6[0],\n options = _parseFilterArgs6[1];\n\n var promises = notifyManager.batch(function () {\n return _this6.queryCache.findAll(filters).map(function (query) {\n return query.fetch(undefined, _extends({}, options, {\n meta: {\n refetchPage: filters == null ? void 0 : filters.refetchPage\n }\n }));\n });\n });\n var promise = Promise.all(promises).then(noop);\n\n if (!(options == null ? void 0 : options.throwOnError)) {\n promise = promise.catch(noop);\n }\n\n return promise;\n };\n\n _proto.fetchQuery = function fetchQuery(arg1, arg2, arg3) {\n var parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n var defaultedOptions = this.defaultQueryOptions(parsedOptions); // https://github.com/tannerlinsley/react-query/issues/652\n\n if (typeof defaultedOptions.retry === 'undefined') {\n defaultedOptions.retry = false;\n }\n\n var query = this.queryCache.build(this, defaultedOptions);\n return query.isStaleByTime(defaultedOptions.staleTime) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);\n };\n\n _proto.prefetchQuery = function prefetchQuery(arg1, arg2, arg3) {\n return this.fetchQuery(arg1, arg2, arg3).then(noop).catch(noop);\n };\n\n _proto.fetchInfiniteQuery = function fetchInfiniteQuery(arg1, arg2, arg3) {\n var parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n parsedOptions.behavior = infiniteQueryBehavior();\n return this.fetchQuery(parsedOptions);\n };\n\n _proto.prefetchInfiniteQuery = function prefetchInfiniteQuery(arg1, arg2, arg3) {\n return this.fetchInfiniteQuery(arg1, arg2, arg3).then(noop).catch(noop);\n };\n\n _proto.cancelMutations = function cancelMutations() {\n var _this7 = this;\n\n var promises = notifyManager.batch(function () {\n return _this7.mutationCache.getAll().map(function (mutation) {\n return mutation.cancel();\n });\n });\n return Promise.all(promises).then(noop).catch(noop);\n };\n\n _proto.resumePausedMutations = function resumePausedMutations() {\n return this.getMutationCache().resumePausedMutations();\n };\n\n _proto.executeMutation = function executeMutation(options) {\n return this.mutationCache.build(this, options).execute();\n };\n\n _proto.getQueryCache = function getQueryCache() {\n return this.queryCache;\n };\n\n _proto.getMutationCache = function getMutationCache() {\n return this.mutationCache;\n };\n\n _proto.getDefaultOptions = function getDefaultOptions() {\n return this.defaultOptions;\n };\n\n _proto.setDefaultOptions = function setDefaultOptions(options) {\n this.defaultOptions = options;\n };\n\n _proto.setQueryDefaults = function setQueryDefaults(queryKey, options) {\n var result = this.queryDefaults.find(function (x) {\n return hashQueryKey(queryKey) === hashQueryKey(x.queryKey);\n });\n\n if (result) {\n result.defaultOptions = options;\n } else {\n this.queryDefaults.push({\n queryKey: queryKey,\n defaultOptions: options\n });\n }\n };\n\n _proto.getQueryDefaults = function getQueryDefaults(queryKey) {\n var _this$queryDefaults$f;\n\n return queryKey ? (_this$queryDefaults$f = this.queryDefaults.find(function (x) {\n return partialMatchKey(queryKey, x.queryKey);\n })) == null ? void 0 : _this$queryDefaults$f.defaultOptions : undefined;\n };\n\n _proto.setMutationDefaults = function setMutationDefaults(mutationKey, options) {\n var result = this.mutationDefaults.find(function (x) {\n return hashQueryKey(mutationKey) === hashQueryKey(x.mutationKey);\n });\n\n if (result) {\n result.defaultOptions = options;\n } else {\n this.mutationDefaults.push({\n mutationKey: mutationKey,\n defaultOptions: options\n });\n }\n };\n\n _proto.getMutationDefaults = function getMutationDefaults(mutationKey) {\n var _this$mutationDefault;\n\n return mutationKey ? (_this$mutationDefault = this.mutationDefaults.find(function (x) {\n return partialMatchKey(mutationKey, x.mutationKey);\n })) == null ? void 0 : _this$mutationDefault.defaultOptions : undefined;\n };\n\n _proto.defaultQueryOptions = function defaultQueryOptions(options) {\n if (options == null ? void 0 : options._defaulted) {\n return options;\n }\n\n var defaultedOptions = _extends({}, this.defaultOptions.queries, this.getQueryDefaults(options == null ? void 0 : options.queryKey), options, {\n _defaulted: true\n });\n\n if (!defaultedOptions.queryHash && defaultedOptions.queryKey) {\n defaultedOptions.queryHash = hashQueryKeyByOptions(defaultedOptions.queryKey, defaultedOptions);\n }\n\n return defaultedOptions;\n };\n\n _proto.defaultQueryObserverOptions = function defaultQueryObserverOptions(options) {\n return this.defaultQueryOptions(options);\n };\n\n _proto.defaultMutationOptions = function defaultMutationOptions(options) {\n if (options == null ? void 0 : options._defaulted) {\n return options;\n }\n\n return _extends({}, this.defaultOptions.mutations, this.getMutationDefaults(options == null ? void 0 : options.mutationKey), options, {\n _defaulted: true\n });\n };\n\n _proto.clear = function clear() {\n this.queryCache.clear();\n this.mutationCache.clear();\n };\n\n return QueryClient;\n}();","import ReactDOM from 'react-dom';\nexport var unstable_batchedUpdates = ReactDOM.unstable_batchedUpdates;","import { notifyManager } from '../core';\nimport { unstable_batchedUpdates } from './reactBatchedUpdates';\nnotifyManager.setBatchNotifyFunction(unstable_batchedUpdates);","export var logger = console;","import { setLogger } from '../core';\nimport { logger } from './logger';\nsetLogger(logger);","import React from 'react';\nvar defaultContext = /*#__PURE__*/React.createContext(undefined);\nvar QueryClientSharingContext = /*#__PURE__*/React.createContext(false); // if contextSharing is on, we share the first and at least one\n// instance of the context across the window\n// to ensure that if React Query is used across\n// different bundles or microfrontends they will\n// all use the same **instance** of context, regardless\n// of module scoping.\n\nfunction getQueryClientContext(contextSharing) {\n if (contextSharing && typeof window !== 'undefined') {\n if (!window.ReactQueryClientContext) {\n window.ReactQueryClientContext = defaultContext;\n }\n\n return window.ReactQueryClientContext;\n }\n\n return defaultContext;\n}\n\nexport var useQueryClient = function useQueryClient() {\n var queryClient = React.useContext(getQueryClientContext(React.useContext(QueryClientSharingContext)));\n\n if (!queryClient) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one');\n }\n\n return queryClient;\n};\nexport var QueryClientProvider = function QueryClientProvider(_ref) {\n var client = _ref.client,\n _ref$contextSharing = _ref.contextSharing,\n contextSharing = _ref$contextSharing === void 0 ? false : _ref$contextSharing,\n children = _ref.children;\n React.useEffect(function () {\n client.mount();\n return function () {\n client.unmount();\n };\n }, [client]);\n var Context = getQueryClientContext(contextSharing);\n return /*#__PURE__*/React.createElement(QueryClientSharingContext.Provider, {\n value: contextSharing\n }, /*#__PURE__*/React.createElement(Context.Provider, {\n value: client\n }, children));\n};","/**\n * @remix-run/router v1.15.0\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Types and Constants\n////////////////////////////////////////////////////////////////////////////////\n/**\n * Actions represent the type of change to a location value.\n */\nvar Action;\n(function (Action) {\n /**\n * A POP indicates a change to an arbitrary index in the history stack, such\n * as a back or forward navigation. It does not describe the direction of the\n * navigation, only that the current index changed.\n *\n * Note: This is the default action for newly created history objects.\n */\n Action[\"Pop\"] = \"POP\";\n /**\n * A PUSH indicates a new entry being added to the history stack, such as when\n * a link is clicked and a new page loads. When this happens, all subsequent\n * entries in the stack are lost.\n */\n Action[\"Push\"] = \"PUSH\";\n /**\n * A REPLACE indicates the entry at the current index in the history stack\n * being replaced by a new one.\n */\n Action[\"Replace\"] = \"REPLACE\";\n})(Action || (Action = {}));\nconst PopStateEventType = \"popstate\";\n/**\n * Memory history stores the current location in memory. It is designed for use\n * in stateful non-browser environments like tests and React Native.\n */\nfunction createMemoryHistory(options) {\n if (options === void 0) {\n options = {};\n }\n let {\n initialEntries = [\"/\"],\n initialIndex,\n v5Compat = false\n } = options;\n let entries; // Declare so we can access from createMemoryLocation\n entries = initialEntries.map((entry, index) => createMemoryLocation(entry, typeof entry === \"string\" ? null : entry.state, index === 0 ? \"default\" : undefined));\n let index = clampIndex(initialIndex == null ? entries.length - 1 : initialIndex);\n let action = Action.Pop;\n let listener = null;\n function clampIndex(n) {\n return Math.min(Math.max(n, 0), entries.length - 1);\n }\n function getCurrentLocation() {\n return entries[index];\n }\n function createMemoryLocation(to, state, key) {\n if (state === void 0) {\n state = null;\n }\n let location = createLocation(entries ? getCurrentLocation().pathname : \"/\", to, state, key);\n warning(location.pathname.charAt(0) === \"/\", \"relative pathnames are not supported in memory history: \" + JSON.stringify(to));\n return location;\n }\n function createHref(to) {\n return typeof to === \"string\" ? to : createPath(to);\n }\n let history = {\n get index() {\n return index;\n },\n get action() {\n return action;\n },\n get location() {\n return getCurrentLocation();\n },\n createHref,\n createURL(to) {\n return new URL(createHref(to), \"http://localhost\");\n },\n encodeLocation(to) {\n let path = typeof to === \"string\" ? parsePath(to) : to;\n return {\n pathname: path.pathname || \"\",\n search: path.search || \"\",\n hash: path.hash || \"\"\n };\n },\n push(to, state) {\n action = Action.Push;\n let nextLocation = createMemoryLocation(to, state);\n index += 1;\n entries.splice(index, entries.length, nextLocation);\n if (v5Compat && listener) {\n listener({\n action,\n location: nextLocation,\n delta: 1\n });\n }\n },\n replace(to, state) {\n action = Action.Replace;\n let nextLocation = createMemoryLocation(to, state);\n entries[index] = nextLocation;\n if (v5Compat && listener) {\n listener({\n action,\n location: nextLocation,\n delta: 0\n });\n }\n },\n go(delta) {\n action = Action.Pop;\n let nextIndex = clampIndex(index + delta);\n let nextLocation = entries[nextIndex];\n index = nextIndex;\n if (listener) {\n listener({\n action,\n location: nextLocation,\n delta\n });\n }\n },\n listen(fn) {\n listener = fn;\n return () => {\n listener = null;\n };\n }\n };\n return history;\n}\n/**\n * Browser history stores the location in regular URLs. This is the standard for\n * most web apps, but it requires some configuration on the server to ensure you\n * serve the same app at multiple URLs.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory\n */\nfunction createBrowserHistory(options) {\n if (options === void 0) {\n options = {};\n }\n function createBrowserLocation(window, globalHistory) {\n let {\n pathname,\n search,\n hash\n } = window.location;\n return createLocation(\"\", {\n pathname,\n search,\n hash\n },\n // state defaults to `null` because `window.history.state` does\n globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || \"default\");\n }\n function createBrowserHref(window, to) {\n return typeof to === \"string\" ? to : createPath(to);\n }\n return getUrlBasedHistory(createBrowserLocation, createBrowserHref, null, options);\n}\n/**\n * Hash history stores the location in window.location.hash. This makes it ideal\n * for situations where you don't want to send the location to the server for\n * some reason, either because you do cannot configure it or the URL space is\n * reserved for something else.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory\n */\nfunction createHashHistory(options) {\n if (options === void 0) {\n options = {};\n }\n function createHashLocation(window, globalHistory) {\n let {\n pathname = \"/\",\n search = \"\",\n hash = \"\"\n } = parsePath(window.location.hash.substr(1));\n // Hash URL should always have a leading / just like window.location.pathname\n // does, so if an app ends up at a route like /#something then we add a\n // leading slash so all of our path-matching behaves the same as if it would\n // in a browser router. This is particularly important when there exists a\n // root splat route () since that matches internally against\n // \"/*\" and we'd expect /#something to 404 in a hash router app.\n if (!pathname.startsWith(\"/\") && !pathname.startsWith(\".\")) {\n pathname = \"/\" + pathname;\n }\n return createLocation(\"\", {\n pathname,\n search,\n hash\n },\n // state defaults to `null` because `window.history.state` does\n globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || \"default\");\n }\n function createHashHref(window, to) {\n let base = window.document.querySelector(\"base\");\n let href = \"\";\n if (base && base.getAttribute(\"href\")) {\n let url = window.location.href;\n let hashIndex = url.indexOf(\"#\");\n href = hashIndex === -1 ? url : url.slice(0, hashIndex);\n }\n return href + \"#\" + (typeof to === \"string\" ? to : createPath(to));\n }\n function validateHashLocation(location, to) {\n warning(location.pathname.charAt(0) === \"/\", \"relative pathnames are not supported in hash history.push(\" + JSON.stringify(to) + \")\");\n }\n return getUrlBasedHistory(createHashLocation, createHashHref, validateHashLocation, options);\n}\nfunction invariant(value, message) {\n if (value === false || value === null || typeof value === \"undefined\") {\n throw new Error(message);\n }\n}\nfunction warning(cond, message) {\n if (!cond) {\n // eslint-disable-next-line no-console\n if (typeof console !== \"undefined\") console.warn(message);\n try {\n // Welcome to debugging history!\n //\n // This error is thrown as a convenience, so you can more easily\n // find the source for a warning that appears in the console by\n // enabling \"pause on exceptions\" in your JavaScript debugger.\n throw new Error(message);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n}\nfunction createKey() {\n return Math.random().toString(36).substr(2, 8);\n}\n/**\n * For browser-based histories, we combine the state and key into an object\n */\nfunction getHistoryState(location, index) {\n return {\n usr: location.state,\n key: location.key,\n idx: index\n };\n}\n/**\n * Creates a Location object with a unique key from the given Path\n */\nfunction createLocation(current, to, state, key) {\n if (state === void 0) {\n state = null;\n }\n let location = _extends({\n pathname: typeof current === \"string\" ? current : current.pathname,\n search: \"\",\n hash: \"\"\n }, typeof to === \"string\" ? parsePath(to) : to, {\n state,\n // TODO: This could be cleaned up. push/replace should probably just take\n // full Locations now and avoid the need to run through this flow at all\n // But that's a pretty big refactor to the current test suite so going to\n // keep as is for the time being and just let any incoming keys take precedence\n key: to && to.key || key || createKey()\n });\n return location;\n}\n/**\n * Creates a string URL path from the given pathname, search, and hash components.\n */\nfunction createPath(_ref) {\n let {\n pathname = \"/\",\n search = \"\",\n hash = \"\"\n } = _ref;\n if (search && search !== \"?\") pathname += search.charAt(0) === \"?\" ? search : \"?\" + search;\n if (hash && hash !== \"#\") pathname += hash.charAt(0) === \"#\" ? hash : \"#\" + hash;\n return pathname;\n}\n/**\n * Parses a string URL path into its separate pathname, search, and hash components.\n */\nfunction parsePath(path) {\n let parsedPath = {};\n if (path) {\n let hashIndex = path.indexOf(\"#\");\n if (hashIndex >= 0) {\n parsedPath.hash = path.substr(hashIndex);\n path = path.substr(0, hashIndex);\n }\n let searchIndex = path.indexOf(\"?\");\n if (searchIndex >= 0) {\n parsedPath.search = path.substr(searchIndex);\n path = path.substr(0, searchIndex);\n }\n if (path) {\n parsedPath.pathname = path;\n }\n }\n return parsedPath;\n}\nfunction getUrlBasedHistory(getLocation, createHref, validateLocation, options) {\n if (options === void 0) {\n options = {};\n }\n let {\n window = document.defaultView,\n v5Compat = false\n } = options;\n let globalHistory = window.history;\n let action = Action.Pop;\n let listener = null;\n let index = getIndex();\n // Index should only be null when we initialize. If not, it's because the\n // user called history.pushState or history.replaceState directly, in which\n // case we should log a warning as it will result in bugs.\n if (index == null) {\n index = 0;\n globalHistory.replaceState(_extends({}, globalHistory.state, {\n idx: index\n }), \"\");\n }\n function getIndex() {\n let state = globalHistory.state || {\n idx: null\n };\n return state.idx;\n }\n function handlePop() {\n action = Action.Pop;\n let nextIndex = getIndex();\n let delta = nextIndex == null ? null : nextIndex - index;\n index = nextIndex;\n if (listener) {\n listener({\n action,\n location: history.location,\n delta\n });\n }\n }\n function push(to, state) {\n action = Action.Push;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n index = getIndex() + 1;\n let historyState = getHistoryState(location, index);\n let url = history.createHref(location);\n // try...catch because iOS limits us to 100 pushState calls :/\n try {\n globalHistory.pushState(historyState, \"\", url);\n } catch (error) {\n // If the exception is because `state` can't be serialized, let that throw\n // outwards just like a replace call would so the dev knows the cause\n // https://html.spec.whatwg.org/multipage/nav-history-apis.html#shared-history-push/replace-state-steps\n // https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal\n if (error instanceof DOMException && error.name === \"DataCloneError\") {\n throw error;\n }\n // They are going to lose state here, but there is no real\n // way to warn them about it since the page will refresh...\n window.location.assign(url);\n }\n if (v5Compat && listener) {\n listener({\n action,\n location: history.location,\n delta: 1\n });\n }\n }\n function replace(to, state) {\n action = Action.Replace;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n index = getIndex();\n let historyState = getHistoryState(location, index);\n let url = history.createHref(location);\n globalHistory.replaceState(historyState, \"\", url);\n if (v5Compat && listener) {\n listener({\n action,\n location: history.location,\n delta: 0\n });\n }\n }\n function createURL(to) {\n // window.location.origin is \"null\" (the literal string value) in Firefox\n // under certain conditions, notably when serving from a local HTML file\n // See https://bugzilla.mozilla.org/show_bug.cgi?id=878297\n let base = window.location.origin !== \"null\" ? window.location.origin : window.location.href;\n let href = typeof to === \"string\" ? to : createPath(to);\n invariant(base, \"No window.location.(origin|href) available to create URL for href: \" + href);\n return new URL(href, base);\n }\n let history = {\n get action() {\n return action;\n },\n get location() {\n return getLocation(window, globalHistory);\n },\n listen(fn) {\n if (listener) {\n throw new Error(\"A history only accepts one active listener\");\n }\n window.addEventListener(PopStateEventType, handlePop);\n listener = fn;\n return () => {\n window.removeEventListener(PopStateEventType, handlePop);\n listener = null;\n };\n },\n createHref(to) {\n return createHref(window, to);\n },\n createURL,\n encodeLocation(to) {\n // Encode a Location the same way window.location would\n let url = createURL(to);\n return {\n pathname: url.pathname,\n search: url.search,\n hash: url.hash\n };\n },\n push,\n replace,\n go(n) {\n return globalHistory.go(n);\n }\n };\n return history;\n}\n//#endregion\n\nvar ResultType;\n(function (ResultType) {\n ResultType[\"data\"] = \"data\";\n ResultType[\"deferred\"] = \"deferred\";\n ResultType[\"redirect\"] = \"redirect\";\n ResultType[\"error\"] = \"error\";\n})(ResultType || (ResultType = {}));\nconst immutableRouteKeys = new Set([\"lazy\", \"caseSensitive\", \"path\", \"id\", \"index\", \"children\"]);\nfunction isIndexRoute(route) {\n return route.index === true;\n}\n// Walk the route tree generating unique IDs where necessary, so we are working\n// solely with AgnosticDataRouteObject's within the Router\nfunction convertRoutesToDataRoutes(routes, mapRouteProperties, parentPath, manifest) {\n if (parentPath === void 0) {\n parentPath = [];\n }\n if (manifest === void 0) {\n manifest = {};\n }\n return routes.map((route, index) => {\n let treePath = [...parentPath, index];\n let id = typeof route.id === \"string\" ? route.id : treePath.join(\"-\");\n invariant(route.index !== true || !route.children, \"Cannot specify children on an index route\");\n invariant(!manifest[id], \"Found a route id collision on id \\\"\" + id + \"\\\". Route \" + \"id's must be globally unique within Data Router usages\");\n if (isIndexRoute(route)) {\n let indexRoute = _extends({}, route, mapRouteProperties(route), {\n id\n });\n manifest[id] = indexRoute;\n return indexRoute;\n } else {\n let pathOrLayoutRoute = _extends({}, route, mapRouteProperties(route), {\n id,\n children: undefined\n });\n manifest[id] = pathOrLayoutRoute;\n if (route.children) {\n pathOrLayoutRoute.children = convertRoutesToDataRoutes(route.children, mapRouteProperties, treePath, manifest);\n }\n return pathOrLayoutRoute;\n }\n });\n}\n/**\n * Matches the given routes to a location and returns the match data.\n *\n * @see https://reactrouter.com/utils/match-routes\n */\nfunction matchRoutes(routes, locationArg, basename) {\n if (basename === void 0) {\n basename = \"/\";\n }\n let location = typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n let pathname = stripBasename(location.pathname || \"/\", basename);\n if (pathname == null) {\n return null;\n }\n let branches = flattenRoutes(routes);\n rankRouteBranches(branches);\n let matches = null;\n for (let i = 0; matches == null && i < branches.length; ++i) {\n matches = matchRouteBranch(branches[i],\n // Incoming pathnames are generally encoded from either window.location\n // or from router.navigate, but we want to match against the unencoded\n // paths in the route definitions. Memory router locations won't be\n // encoded here but there also shouldn't be anything to decode so this\n // should be a safe operation. This avoids needing matchRoutes to be\n // history-aware.\n safelyDecodeURI(pathname));\n }\n return matches;\n}\nfunction convertRouteMatchToUiMatch(match, loaderData) {\n let {\n route,\n pathname,\n params\n } = match;\n return {\n id: route.id,\n pathname,\n params,\n data: loaderData[route.id],\n handle: route.handle\n };\n}\nfunction flattenRoutes(routes, branches, parentsMeta, parentPath) {\n if (branches === void 0) {\n branches = [];\n }\n if (parentsMeta === void 0) {\n parentsMeta = [];\n }\n if (parentPath === void 0) {\n parentPath = \"\";\n }\n let flattenRoute = (route, index, relativePath) => {\n let meta = {\n relativePath: relativePath === undefined ? route.path || \"\" : relativePath,\n caseSensitive: route.caseSensitive === true,\n childrenIndex: index,\n route\n };\n if (meta.relativePath.startsWith(\"/\")) {\n invariant(meta.relativePath.startsWith(parentPath), \"Absolute route path \\\"\" + meta.relativePath + \"\\\" nested under path \" + (\"\\\"\" + parentPath + \"\\\" is not valid. An absolute child route path \") + \"must start with the combined path of all its parent routes.\");\n meta.relativePath = meta.relativePath.slice(parentPath.length);\n }\n let path = joinPaths([parentPath, meta.relativePath]);\n let routesMeta = parentsMeta.concat(meta);\n // Add the children before adding this route to the array, so we traverse the\n // route tree depth-first and child routes appear before their parents in\n // the \"flattened\" version.\n if (route.children && route.children.length > 0) {\n invariant(\n // Our types know better, but runtime JS may not!\n // @ts-expect-error\n route.index !== true, \"Index routes must not have child routes. Please remove \" + (\"all child routes from route path \\\"\" + path + \"\\\".\"));\n flattenRoutes(route.children, branches, routesMeta, path);\n }\n // Routes without a path shouldn't ever match by themselves unless they are\n // index routes, so don't add them to the list of possible branches.\n if (route.path == null && !route.index) {\n return;\n }\n branches.push({\n path,\n score: computeScore(path, route.index),\n routesMeta\n });\n };\n routes.forEach((route, index) => {\n var _route$path;\n // coarse-grain check for optional params\n if (route.path === \"\" || !((_route$path = route.path) != null && _route$path.includes(\"?\"))) {\n flattenRoute(route, index);\n } else {\n for (let exploded of explodeOptionalSegments(route.path)) {\n flattenRoute(route, index, exploded);\n }\n }\n });\n return branches;\n}\n/**\n * Computes all combinations of optional path segments for a given path,\n * excluding combinations that are ambiguous and of lower priority.\n *\n * For example, `/one/:two?/three/:four?/:five?` explodes to:\n * - `/one/three`\n * - `/one/:two/three`\n * - `/one/three/:four`\n * - `/one/three/:five`\n * - `/one/:two/three/:four`\n * - `/one/:two/three/:five`\n * - `/one/three/:four/:five`\n * - `/one/:two/three/:four/:five`\n */\nfunction explodeOptionalSegments(path) {\n let segments = path.split(\"/\");\n if (segments.length === 0) return [];\n let [first, ...rest] = segments;\n // Optional path segments are denoted by a trailing `?`\n let isOptional = first.endsWith(\"?\");\n // Compute the corresponding required segment: `foo?` -> `foo`\n let required = first.replace(/\\?$/, \"\");\n if (rest.length === 0) {\n // Intepret empty string as omitting an optional segment\n // `[\"one\", \"\", \"three\"]` corresponds to omitting `:two` from `/one/:two?/three` -> `/one/three`\n return isOptional ? [required, \"\"] : [required];\n }\n let restExploded = explodeOptionalSegments(rest.join(\"/\"));\n let result = [];\n // All child paths with the prefix. Do this for all children before the\n // optional version for all children, so we get consistent ordering where the\n // parent optional aspect is preferred as required. Otherwise, we can get\n // child sections interspersed where deeper optional segments are higher than\n // parent optional segments, where for example, /:two would explode _earlier_\n // then /:one. By always including the parent as required _for all children_\n // first, we avoid this issue\n result.push(...restExploded.map(subpath => subpath === \"\" ? required : [required, subpath].join(\"/\")));\n // Then, if this is an optional value, add all child versions without\n if (isOptional) {\n result.push(...restExploded);\n }\n // for absolute paths, ensure `/` instead of empty segment\n return result.map(exploded => path.startsWith(\"/\") && exploded === \"\" ? \"/\" : exploded);\n}\nfunction rankRouteBranches(branches) {\n branches.sort((a, b) => a.score !== b.score ? b.score - a.score // Higher score first\n : compareIndexes(a.routesMeta.map(meta => meta.childrenIndex), b.routesMeta.map(meta => meta.childrenIndex)));\n}\nconst paramRe = /^:[\\w-]+$/;\nconst dynamicSegmentValue = 3;\nconst indexRouteValue = 2;\nconst emptySegmentValue = 1;\nconst staticSegmentValue = 10;\nconst splatPenalty = -2;\nconst isSplat = s => s === \"*\";\nfunction computeScore(path, index) {\n let segments = path.split(\"/\");\n let initialScore = segments.length;\n if (segments.some(isSplat)) {\n initialScore += splatPenalty;\n }\n if (index) {\n initialScore += indexRouteValue;\n }\n return segments.filter(s => !isSplat(s)).reduce((score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === \"\" ? emptySegmentValue : staticSegmentValue), initialScore);\n}\nfunction compareIndexes(a, b) {\n let siblings = a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);\n return siblings ?\n // If two routes are siblings, we should try to match the earlier sibling\n // first. This allows people to have fine-grained control over the matching\n // behavior by simply putting routes with identical paths in the order they\n // want them tried.\n a[a.length - 1] - b[b.length - 1] :\n // Otherwise, it doesn't really make sense to rank non-siblings by index,\n // so they sort equally.\n 0;\n}\nfunction matchRouteBranch(branch, pathname) {\n let {\n routesMeta\n } = branch;\n let matchedParams = {};\n let matchedPathname = \"/\";\n let matches = [];\n for (let i = 0; i < routesMeta.length; ++i) {\n let meta = routesMeta[i];\n let end = i === routesMeta.length - 1;\n let remainingPathname = matchedPathname === \"/\" ? pathname : pathname.slice(matchedPathname.length) || \"/\";\n let match = matchPath({\n path: meta.relativePath,\n caseSensitive: meta.caseSensitive,\n end\n }, remainingPathname);\n if (!match) return null;\n Object.assign(matchedParams, match.params);\n let route = meta.route;\n matches.push({\n // TODO: Can this as be avoided?\n params: matchedParams,\n pathname: joinPaths([matchedPathname, match.pathname]),\n pathnameBase: normalizePathname(joinPaths([matchedPathname, match.pathnameBase])),\n route\n });\n if (match.pathnameBase !== \"/\") {\n matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);\n }\n }\n return matches;\n}\n/**\n * Returns a path with params interpolated.\n *\n * @see https://reactrouter.com/utils/generate-path\n */\nfunction generatePath(originalPath, params) {\n if (params === void 0) {\n params = {};\n }\n let path = originalPath;\n if (path.endsWith(\"*\") && path !== \"*\" && !path.endsWith(\"/*\")) {\n warning(false, \"Route path \\\"\" + path + \"\\\" will be treated as if it were \" + (\"\\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\" because the `*` character must \") + \"always follow a `/` in the pattern. To get rid of this warning, \" + (\"please change the route path to \\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\".\"));\n path = path.replace(/\\*$/, \"/*\");\n }\n // ensure `/` is added at the beginning if the path is absolute\n const prefix = path.startsWith(\"/\") ? \"/\" : \"\";\n const stringify = p => p == null ? \"\" : typeof p === \"string\" ? p : String(p);\n const segments = path.split(/\\/+/).map((segment, index, array) => {\n const isLastSegment = index === array.length - 1;\n // only apply the splat if it's the last segment\n if (isLastSegment && segment === \"*\") {\n const star = \"*\";\n // Apply the splat\n return stringify(params[star]);\n }\n const keyMatch = segment.match(/^:([\\w-]+)(\\??)$/);\n if (keyMatch) {\n const [, key, optional] = keyMatch;\n let param = params[key];\n invariant(optional === \"?\" || param != null, \"Missing \\\":\" + key + \"\\\" param\");\n return stringify(param);\n }\n // Remove any optional markers from optional static segments\n return segment.replace(/\\?$/g, \"\");\n })\n // Remove empty segments\n .filter(segment => !!segment);\n return prefix + segments.join(\"/\");\n}\n/**\n * Performs pattern matching on a URL pathname and returns information about\n * the match.\n *\n * @see https://reactrouter.com/utils/match-path\n */\nfunction matchPath(pattern, pathname) {\n if (typeof pattern === \"string\") {\n pattern = {\n path: pattern,\n caseSensitive: false,\n end: true\n };\n }\n let [matcher, compiledParams] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);\n let match = pathname.match(matcher);\n if (!match) return null;\n let matchedPathname = match[0];\n let pathnameBase = matchedPathname.replace(/(.)\\/+$/, \"$1\");\n let captureGroups = match.slice(1);\n let params = compiledParams.reduce((memo, _ref, index) => {\n let {\n paramName,\n isOptional\n } = _ref;\n // We need to compute the pathnameBase here using the raw splat value\n // instead of using params[\"*\"] later because it will be decoded then\n if (paramName === \"*\") {\n let splatValue = captureGroups[index] || \"\";\n pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\\/+$/, \"$1\");\n }\n const value = captureGroups[index];\n if (isOptional && !value) {\n memo[paramName] = undefined;\n } else {\n memo[paramName] = safelyDecodeURIComponent(value || \"\", paramName);\n }\n return memo;\n }, {});\n return {\n params,\n pathname: matchedPathname,\n pathnameBase,\n pattern\n };\n}\nfunction compilePath(path, caseSensitive, end) {\n if (caseSensitive === void 0) {\n caseSensitive = false;\n }\n if (end === void 0) {\n end = true;\n }\n warning(path === \"*\" || !path.endsWith(\"*\") || path.endsWith(\"/*\"), \"Route path \\\"\" + path + \"\\\" will be treated as if it were \" + (\"\\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\" because the `*` character must \") + \"always follow a `/` in the pattern. To get rid of this warning, \" + (\"please change the route path to \\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\".\"));\n let params = [];\n let regexpSource = \"^\" + path.replace(/\\/*\\*?$/, \"\") // Ignore trailing / and /*, we'll handle it below\n .replace(/^\\/*/, \"/\") // Make sure it has a leading /\n .replace(/[\\\\.*+^${}|()[\\]]/g, \"\\\\$&\") // Escape special regex chars\n .replace(/\\/:([\\w-]+)(\\?)?/g, (_, paramName, isOptional) => {\n params.push({\n paramName,\n isOptional: isOptional != null\n });\n return isOptional ? \"/?([^\\\\/]+)?\" : \"/([^\\\\/]+)\";\n });\n if (path.endsWith(\"*\")) {\n params.push({\n paramName: \"*\"\n });\n regexpSource += path === \"*\" || path === \"/*\" ? \"(.*)$\" // Already matched the initial /, just match the rest\n : \"(?:\\\\/(.+)|\\\\/*)$\"; // Don't include the / in params[\"*\"]\n } else if (end) {\n // When matching to the end, ignore trailing slashes\n regexpSource += \"\\\\/*$\";\n } else if (path !== \"\" && path !== \"/\") {\n // If our path is non-empty and contains anything beyond an initial slash,\n // then we have _some_ form of path in our regex, so we should expect to\n // match only if we find the end of this path segment. Look for an optional\n // non-captured trailing slash (to match a portion of the URL) or the end\n // of the path (if we've matched to the end). We used to do this with a\n // word boundary but that gives false positives on routes like\n // /user-preferences since `-` counts as a word boundary.\n regexpSource += \"(?:(?=\\\\/|$))\";\n } else ;\n let matcher = new RegExp(regexpSource, caseSensitive ? undefined : \"i\");\n return [matcher, params];\n}\nfunction safelyDecodeURI(value) {\n try {\n return decodeURI(value);\n } catch (error) {\n warning(false, \"The URL path \\\"\" + value + \"\\\" could not be decoded because it is is a \" + \"malformed URL segment. This is probably due to a bad percent \" + (\"encoding (\" + error + \").\"));\n return value;\n }\n}\nfunction safelyDecodeURIComponent(value, paramName) {\n try {\n return decodeURIComponent(value);\n } catch (error) {\n warning(false, \"The value for the URL param \\\"\" + paramName + \"\\\" will not be decoded because\" + (\" the string \\\"\" + value + \"\\\" is a malformed URL segment. This is probably\") + (\" due to a bad percent encoding (\" + error + \").\"));\n return value;\n }\n}\n/**\n * @private\n */\nfunction stripBasename(pathname, basename) {\n if (basename === \"/\") return pathname;\n if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {\n return null;\n }\n // We want to leave trailing slash behavior in the user's control, so if they\n // specify a basename with a trailing slash, we should support it\n let startIndex = basename.endsWith(\"/\") ? basename.length - 1 : basename.length;\n let nextChar = pathname.charAt(startIndex);\n if (nextChar && nextChar !== \"/\") {\n // pathname does not start with basename/\n return null;\n }\n return pathname.slice(startIndex) || \"/\";\n}\n/**\n * Returns a resolved path object relative to the given pathname.\n *\n * @see https://reactrouter.com/utils/resolve-path\n */\nfunction resolvePath(to, fromPathname) {\n if (fromPathname === void 0) {\n fromPathname = \"/\";\n }\n let {\n pathname: toPathname,\n search = \"\",\n hash = \"\"\n } = typeof to === \"string\" ? parsePath(to) : to;\n let pathname = toPathname ? toPathname.startsWith(\"/\") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;\n return {\n pathname,\n search: normalizeSearch(search),\n hash: normalizeHash(hash)\n };\n}\nfunction resolvePathname(relativePath, fromPathname) {\n let segments = fromPathname.replace(/\\/+$/, \"\").split(\"/\");\n let relativeSegments = relativePath.split(\"/\");\n relativeSegments.forEach(segment => {\n if (segment === \"..\") {\n // Keep the root \"\" segment so the pathname starts at /\n if (segments.length > 1) segments.pop();\n } else if (segment !== \".\") {\n segments.push(segment);\n }\n });\n return segments.length > 1 ? segments.join(\"/\") : \"/\";\n}\nfunction getInvalidPathError(char, field, dest, path) {\n return \"Cannot include a '\" + char + \"' character in a manually specified \" + (\"`to.\" + field + \"` field [\" + JSON.stringify(path) + \"]. Please separate it out to the \") + (\"`to.\" + dest + \"` field. Alternatively you may provide the full path as \") + \"a string in and the router will parse it for you.\";\n}\n/**\n * @private\n *\n * When processing relative navigation we want to ignore ancestor routes that\n * do not contribute to the path, such that index/pathless layout routes don't\n * interfere.\n *\n * For example, when moving a route element into an index route and/or a\n * pathless layout route, relative link behavior contained within should stay\n * the same. Both of the following examples should link back to the root:\n *\n * \n * \n * \n *\n * \n * \n * }> // <-- Does not contribute\n * // <-- Does not contribute\n * \n * \n */\nfunction getPathContributingMatches(matches) {\n return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);\n}\n// Return the array of pathnames for the current route matches - used to\n// generate the routePathnames input for resolveTo()\nfunction getResolveToMatches(matches, v7_relativeSplatPath) {\n let pathMatches = getPathContributingMatches(matches);\n // When v7_relativeSplatPath is enabled, use the full pathname for the leaf\n // match so we include splat values for \".\" links. See:\n // https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329\n if (v7_relativeSplatPath) {\n return pathMatches.map((match, idx) => idx === matches.length - 1 ? match.pathname : match.pathnameBase);\n }\n return pathMatches.map(match => match.pathnameBase);\n}\n/**\n * @private\n */\nfunction resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {\n if (isPathRelative === void 0) {\n isPathRelative = false;\n }\n let to;\n if (typeof toArg === \"string\") {\n to = parsePath(toArg);\n } else {\n to = _extends({}, toArg);\n invariant(!to.pathname || !to.pathname.includes(\"?\"), getInvalidPathError(\"?\", \"pathname\", \"search\", to));\n invariant(!to.pathname || !to.pathname.includes(\"#\"), getInvalidPathError(\"#\", \"pathname\", \"hash\", to));\n invariant(!to.search || !to.search.includes(\"#\"), getInvalidPathError(\"#\", \"search\", \"hash\", to));\n }\n let isEmptyPath = toArg === \"\" || to.pathname === \"\";\n let toPathname = isEmptyPath ? \"/\" : to.pathname;\n let from;\n // Routing is relative to the current pathname if explicitly requested.\n //\n // If a pathname is explicitly provided in `to`, it should be relative to the\n // route context. This is explained in `Note on `` values` in our\n // migration guide from v5 as a means of disambiguation between `to` values\n // that begin with `/` and those that do not. However, this is problematic for\n // `to` values that do not provide a pathname. `to` can simply be a search or\n // hash string, in which case we should assume that the navigation is relative\n // to the current location's pathname and *not* the route pathname.\n if (toPathname == null) {\n from = locationPathname;\n } else {\n let routePathnameIndex = routePathnames.length - 1;\n // With relative=\"route\" (the default), each leading .. segment means\n // \"go up one route\" instead of \"go up one URL segment\". This is a key\n // difference from how works and a major reason we call this a\n // \"to\" value instead of a \"href\".\n if (!isPathRelative && toPathname.startsWith(\"..\")) {\n let toSegments = toPathname.split(\"/\");\n while (toSegments[0] === \"..\") {\n toSegments.shift();\n routePathnameIndex -= 1;\n }\n to.pathname = toSegments.join(\"/\");\n }\n from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : \"/\";\n }\n let path = resolvePath(to, from);\n // Ensure the pathname has a trailing slash if the original \"to\" had one\n let hasExplicitTrailingSlash = toPathname && toPathname !== \"/\" && toPathname.endsWith(\"/\");\n // Or if this was a link to the current path which has a trailing slash\n let hasCurrentTrailingSlash = (isEmptyPath || toPathname === \".\") && locationPathname.endsWith(\"/\");\n if (!path.pathname.endsWith(\"/\") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {\n path.pathname += \"/\";\n }\n return path;\n}\n/**\n * @private\n */\nfunction getToPathname(to) {\n // Empty strings should be treated the same as / paths\n return to === \"\" || to.pathname === \"\" ? \"/\" : typeof to === \"string\" ? parsePath(to).pathname : to.pathname;\n}\n/**\n * @private\n */\nconst joinPaths = paths => paths.join(\"/\").replace(/\\/\\/+/g, \"/\");\n/**\n * @private\n */\nconst normalizePathname = pathname => pathname.replace(/\\/+$/, \"\").replace(/^\\/*/, \"/\");\n/**\n * @private\n */\nconst normalizeSearch = search => !search || search === \"?\" ? \"\" : search.startsWith(\"?\") ? search : \"?\" + search;\n/**\n * @private\n */\nconst normalizeHash = hash => !hash || hash === \"#\" ? \"\" : hash.startsWith(\"#\") ? hash : \"#\" + hash;\n/**\n * This is a shortcut for creating `application/json` responses. Converts `data`\n * to JSON and sets the `Content-Type` header.\n */\nconst json = function json(data, init) {\n if (init === void 0) {\n init = {};\n }\n let responseInit = typeof init === \"number\" ? {\n status: init\n } : init;\n let headers = new Headers(responseInit.headers);\n if (!headers.has(\"Content-Type\")) {\n headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n }\n return new Response(JSON.stringify(data), _extends({}, responseInit, {\n headers\n }));\n};\nclass AbortedDeferredError extends Error {}\nclass DeferredData {\n constructor(data, responseInit) {\n this.pendingKeysSet = new Set();\n this.subscribers = new Set();\n this.deferredKeys = [];\n invariant(data && typeof data === \"object\" && !Array.isArray(data), \"defer() only accepts plain objects\");\n // Set up an AbortController + Promise we can race against to exit early\n // cancellation\n let reject;\n this.abortPromise = new Promise((_, r) => reject = r);\n this.controller = new AbortController();\n let onAbort = () => reject(new AbortedDeferredError(\"Deferred data aborted\"));\n this.unlistenAbortSignal = () => this.controller.signal.removeEventListener(\"abort\", onAbort);\n this.controller.signal.addEventListener(\"abort\", onAbort);\n this.data = Object.entries(data).reduce((acc, _ref2) => {\n let [key, value] = _ref2;\n return Object.assign(acc, {\n [key]: this.trackPromise(key, value)\n });\n }, {});\n if (this.done) {\n // All incoming values were resolved\n this.unlistenAbortSignal();\n }\n this.init = responseInit;\n }\n trackPromise(key, value) {\n if (!(value instanceof Promise)) {\n return value;\n }\n this.deferredKeys.push(key);\n this.pendingKeysSet.add(key);\n // We store a little wrapper promise that will be extended with\n // _data/_error props upon resolve/reject\n let promise = Promise.race([value, this.abortPromise]).then(data => this.onSettle(promise, key, undefined, data), error => this.onSettle(promise, key, error));\n // Register rejection listeners to avoid uncaught promise rejections on\n // errors or aborted deferred values\n promise.catch(() => {});\n Object.defineProperty(promise, \"_tracked\", {\n get: () => true\n });\n return promise;\n }\n onSettle(promise, key, error, data) {\n if (this.controller.signal.aborted && error instanceof AbortedDeferredError) {\n this.unlistenAbortSignal();\n Object.defineProperty(promise, \"_error\", {\n get: () => error\n });\n return Promise.reject(error);\n }\n this.pendingKeysSet.delete(key);\n if (this.done) {\n // Nothing left to abort!\n this.unlistenAbortSignal();\n }\n // If the promise was resolved/rejected with undefined, we'll throw an error as you\n // should always resolve with a value or null\n if (error === undefined && data === undefined) {\n let undefinedError = new Error(\"Deferred data for key \\\"\" + key + \"\\\" resolved/rejected with `undefined`, \" + \"you must resolve/reject with a value or `null`.\");\n Object.defineProperty(promise, \"_error\", {\n get: () => undefinedError\n });\n this.emit(false, key);\n return Promise.reject(undefinedError);\n }\n if (data === undefined) {\n Object.defineProperty(promise, \"_error\", {\n get: () => error\n });\n this.emit(false, key);\n return Promise.reject(error);\n }\n Object.defineProperty(promise, \"_data\", {\n get: () => data\n });\n this.emit(false, key);\n return data;\n }\n emit(aborted, settledKey) {\n this.subscribers.forEach(subscriber => subscriber(aborted, settledKey));\n }\n subscribe(fn) {\n this.subscribers.add(fn);\n return () => this.subscribers.delete(fn);\n }\n cancel() {\n this.controller.abort();\n this.pendingKeysSet.forEach((v, k) => this.pendingKeysSet.delete(k));\n this.emit(true);\n }\n async resolveData(signal) {\n let aborted = false;\n if (!this.done) {\n let onAbort = () => this.cancel();\n signal.addEventListener(\"abort\", onAbort);\n aborted = await new Promise(resolve => {\n this.subscribe(aborted => {\n signal.removeEventListener(\"abort\", onAbort);\n if (aborted || this.done) {\n resolve(aborted);\n }\n });\n });\n }\n return aborted;\n }\n get done() {\n return this.pendingKeysSet.size === 0;\n }\n get unwrappedData() {\n invariant(this.data !== null && this.done, \"Can only unwrap data on initialized and settled deferreds\");\n return Object.entries(this.data).reduce((acc, _ref3) => {\n let [key, value] = _ref3;\n return Object.assign(acc, {\n [key]: unwrapTrackedPromise(value)\n });\n }, {});\n }\n get pendingKeys() {\n return Array.from(this.pendingKeysSet);\n }\n}\nfunction isTrackedPromise(value) {\n return value instanceof Promise && value._tracked === true;\n}\nfunction unwrapTrackedPromise(value) {\n if (!isTrackedPromise(value)) {\n return value;\n }\n if (value._error) {\n throw value._error;\n }\n return value._data;\n}\nconst defer = function defer(data, init) {\n if (init === void 0) {\n init = {};\n }\n let responseInit = typeof init === \"number\" ? {\n status: init\n } : init;\n return new DeferredData(data, responseInit);\n};\n/**\n * A redirect response. Sets the status code and the `Location` header.\n * Defaults to \"302 Found\".\n */\nconst redirect = function redirect(url, init) {\n if (init === void 0) {\n init = 302;\n }\n let responseInit = init;\n if (typeof responseInit === \"number\") {\n responseInit = {\n status: responseInit\n };\n } else if (typeof responseInit.status === \"undefined\") {\n responseInit.status = 302;\n }\n let headers = new Headers(responseInit.headers);\n headers.set(\"Location\", url);\n return new Response(null, _extends({}, responseInit, {\n headers\n }));\n};\n/**\n * A redirect response that will force a document reload to the new location.\n * Sets the status code and the `Location` header.\n * Defaults to \"302 Found\".\n */\nconst redirectDocument = (url, init) => {\n let response = redirect(url, init);\n response.headers.set(\"X-Remix-Reload-Document\", \"true\");\n return response;\n};\n/**\n * @private\n * Utility class we use to hold auto-unwrapped 4xx/5xx Response bodies\n *\n * We don't export the class for public use since it's an implementation\n * detail, but we export the interface above so folks can build their own\n * abstractions around instances via isRouteErrorResponse()\n */\nclass ErrorResponseImpl {\n constructor(status, statusText, data, internal) {\n if (internal === void 0) {\n internal = false;\n }\n this.status = status;\n this.statusText = statusText || \"\";\n this.internal = internal;\n if (data instanceof Error) {\n this.data = data.toString();\n this.error = data;\n } else {\n this.data = data;\n }\n }\n}\n/**\n * Check if the given error is an ErrorResponse generated from a 4xx/5xx\n * Response thrown from an action/loader\n */\nfunction isRouteErrorResponse(error) {\n return error != null && typeof error.status === \"number\" && typeof error.statusText === \"string\" && typeof error.internal === \"boolean\" && \"data\" in error;\n}\n\nconst validMutationMethodsArr = [\"post\", \"put\", \"patch\", \"delete\"];\nconst validMutationMethods = new Set(validMutationMethodsArr);\nconst validRequestMethodsArr = [\"get\", ...validMutationMethodsArr];\nconst validRequestMethods = new Set(validRequestMethodsArr);\nconst redirectStatusCodes = new Set([301, 302, 303, 307, 308]);\nconst redirectPreserveMethodStatusCodes = new Set([307, 308]);\nconst IDLE_NAVIGATION = {\n state: \"idle\",\n location: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined\n};\nconst IDLE_FETCHER = {\n state: \"idle\",\n data: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined\n};\nconst IDLE_BLOCKER = {\n state: \"unblocked\",\n proceed: undefined,\n reset: undefined,\n location: undefined\n};\nconst ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\nconst defaultMapRouteProperties = route => ({\n hasErrorBoundary: Boolean(route.hasErrorBoundary)\n});\nconst TRANSITIONS_STORAGE_KEY = \"remix-router-transitions\";\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region createRouter\n////////////////////////////////////////////////////////////////////////////////\n/**\n * Create a router and listen to history POP navigations\n */\nfunction createRouter(init) {\n const routerWindow = init.window ? init.window : typeof window !== \"undefined\" ? window : undefined;\n const isBrowser = typeof routerWindow !== \"undefined\" && typeof routerWindow.document !== \"undefined\" && typeof routerWindow.document.createElement !== \"undefined\";\n const isServer = !isBrowser;\n invariant(init.routes.length > 0, \"You must provide a non-empty routes array to createRouter\");\n let mapRouteProperties;\n if (init.mapRouteProperties) {\n mapRouteProperties = init.mapRouteProperties;\n } else if (init.detectErrorBoundary) {\n // If they are still using the deprecated version, wrap it with the new API\n let detectErrorBoundary = init.detectErrorBoundary;\n mapRouteProperties = route => ({\n hasErrorBoundary: detectErrorBoundary(route)\n });\n } else {\n mapRouteProperties = defaultMapRouteProperties;\n }\n // Routes keyed by ID\n let manifest = {};\n // Routes in tree format for matching\n let dataRoutes = convertRoutesToDataRoutes(init.routes, mapRouteProperties, undefined, manifest);\n let inFlightDataRoutes;\n let basename = init.basename || \"/\";\n // Config driven behavior flags\n let future = _extends({\n v7_fetcherPersist: false,\n v7_normalizeFormMethod: false,\n v7_partialHydration: false,\n v7_prependBasename: false,\n v7_relativeSplatPath: false\n }, init.future);\n // Cleanup function for history\n let unlistenHistory = null;\n // Externally-provided functions to call on all state changes\n let subscribers = new Set();\n // Externally-provided object to hold scroll restoration locations during routing\n let savedScrollPositions = null;\n // Externally-provided function to get scroll restoration keys\n let getScrollRestorationKey = null;\n // Externally-provided function to get current scroll position\n let getScrollPosition = null;\n // One-time flag to control the initial hydration scroll restoration. Because\n // we don't get the saved positions from until _after_\n // the initial render, we need to manually trigger a separate updateState to\n // send along the restoreScrollPosition\n // Set to true if we have `hydrationData` since we assume we were SSR'd and that\n // SSR did the initial scroll restoration.\n let initialScrollRestored = init.hydrationData != null;\n let initialMatches = matchRoutes(dataRoutes, init.history.location, basename);\n let initialErrors = null;\n if (initialMatches == null) {\n // If we do not match a user-provided-route, fall back to the root\n // to allow the error boundary to take over\n let error = getInternalRouterError(404, {\n pathname: init.history.location.pathname\n });\n let {\n matches,\n route\n } = getShortCircuitMatches(dataRoutes);\n initialMatches = matches;\n initialErrors = {\n [route.id]: error\n };\n }\n let initialized;\n let hasLazyRoutes = initialMatches.some(m => m.route.lazy);\n let hasLoaders = initialMatches.some(m => m.route.loader);\n if (hasLazyRoutes) {\n // All initialMatches need to be loaded before we're ready. If we have lazy\n // functions around still then we'll need to run them in initialize()\n initialized = false;\n } else if (!hasLoaders) {\n // If we've got no loaders to run, then we're good to go\n initialized = true;\n } else if (future.v7_partialHydration) {\n // If partial hydration is enabled, we're initialized so long as we were\n // provided with hydrationData for every route with a loader, and no loaders\n // were marked for explicit hydration\n let loaderData = init.hydrationData ? init.hydrationData.loaderData : null;\n let errors = init.hydrationData ? init.hydrationData.errors : null;\n initialized = initialMatches.every(m => m.route.loader && m.route.loader.hydrate !== true && (loaderData && loaderData[m.route.id] !== undefined || errors && errors[m.route.id] !== undefined));\n } else {\n // Without partial hydration - we're initialized if we were provided any\n // hydrationData - which is expected to be complete\n initialized = init.hydrationData != null;\n }\n let router;\n let state = {\n historyAction: init.history.action,\n location: init.history.location,\n matches: initialMatches,\n initialized,\n navigation: IDLE_NAVIGATION,\n // Don't restore on initial updateState() if we were SSR'd\n restoreScrollPosition: init.hydrationData != null ? false : null,\n preventScrollReset: false,\n revalidation: \"idle\",\n loaderData: init.hydrationData && init.hydrationData.loaderData || {},\n actionData: init.hydrationData && init.hydrationData.actionData || null,\n errors: init.hydrationData && init.hydrationData.errors || initialErrors,\n fetchers: new Map(),\n blockers: new Map()\n };\n // -- Stateful internal variables to manage navigations --\n // Current navigation in progress (to be committed in completeNavigation)\n let pendingAction = Action.Pop;\n // Should the current navigation prevent the scroll reset if scroll cannot\n // be restored?\n let pendingPreventScrollReset = false;\n // AbortController for the active navigation\n let pendingNavigationController;\n // Should the current navigation enable document.startViewTransition?\n let pendingViewTransitionEnabled = false;\n // Store applied view transitions so we can apply them on POP\n let appliedViewTransitions = new Map();\n // Cleanup function for persisting applied transitions to sessionStorage\n let removePageHideEventListener = null;\n // We use this to avoid touching history in completeNavigation if a\n // revalidation is entirely uninterrupted\n let isUninterruptedRevalidation = false;\n // Use this internal flag to force revalidation of all loaders:\n // - submissions (completed or interrupted)\n // - useRevalidator()\n // - X-Remix-Revalidate (from redirect)\n let isRevalidationRequired = false;\n // Use this internal array to capture routes that require revalidation due\n // to a cancelled deferred on action submission\n let cancelledDeferredRoutes = [];\n // Use this internal array to capture fetcher loads that were cancelled by an\n // action navigation and require revalidation\n let cancelledFetcherLoads = [];\n // AbortControllers for any in-flight fetchers\n let fetchControllers = new Map();\n // Track loads based on the order in which they started\n let incrementingLoadId = 0;\n // Track the outstanding pending navigation data load to be compared against\n // the globally incrementing load when a fetcher load lands after a completed\n // navigation\n let pendingNavigationLoadId = -1;\n // Fetchers that triggered data reloads as a result of their actions\n let fetchReloadIds = new Map();\n // Fetchers that triggered redirect navigations\n let fetchRedirectIds = new Set();\n // Most recent href/match for fetcher.load calls for fetchers\n let fetchLoadMatches = new Map();\n // Ref-count mounted fetchers so we know when it's ok to clean them up\n let activeFetchers = new Map();\n // Fetchers that have requested a delete when using v7_fetcherPersist,\n // they'll be officially removed after they return to idle\n let deletedFetchers = new Set();\n // Store DeferredData instances for active route matches. When a\n // route loader returns defer() we stick one in here. Then, when a nested\n // promise resolves we update loaderData. If a new navigation starts we\n // cancel active deferreds for eliminated routes.\n let activeDeferreds = new Map();\n // Store blocker functions in a separate Map outside of router state since\n // we don't need to update UI state if they change\n let blockerFunctions = new Map();\n // Flag to ignore the next history update, so we can revert the URL change on\n // a POP navigation that was blocked by the user without touching router state\n let ignoreNextHistoryUpdate = false;\n // Initialize the router, all side effects should be kicked off from here.\n // Implemented as a Fluent API for ease of:\n // let router = createRouter(init).initialize();\n function initialize() {\n // If history informs us of a POP navigation, start the navigation but do not update\n // state. We'll update our own state once the navigation completes\n unlistenHistory = init.history.listen(_ref => {\n let {\n action: historyAction,\n location,\n delta\n } = _ref;\n // Ignore this event if it was just us resetting the URL from a\n // blocked POP navigation\n if (ignoreNextHistoryUpdate) {\n ignoreNextHistoryUpdate = false;\n return;\n }\n warning(blockerFunctions.size === 0 || delta != 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.\");\n let blockerKey = shouldBlockNavigation({\n currentLocation: state.location,\n nextLocation: location,\n historyAction\n });\n if (blockerKey && delta != null) {\n // Restore the URL to match the current UI, but don't update router state\n ignoreNextHistoryUpdate = true;\n init.history.go(delta * -1);\n // Put the blocker into a blocked state\n updateBlocker(blockerKey, {\n state: \"blocked\",\n location,\n proceed() {\n updateBlocker(blockerKey, {\n state: \"proceeding\",\n proceed: undefined,\n reset: undefined,\n location\n });\n // Re-do the same POP navigation we just blocked\n init.history.go(delta);\n },\n reset() {\n let blockers = new Map(state.blockers);\n blockers.set(blockerKey, IDLE_BLOCKER);\n updateState({\n blockers\n });\n }\n });\n return;\n }\n return startNavigation(historyAction, location);\n });\n if (isBrowser) {\n // FIXME: This feels gross. How can we cleanup the lines between\n // scrollRestoration/appliedTransitions persistance?\n restoreAppliedTransitions(routerWindow, appliedViewTransitions);\n let _saveAppliedTransitions = () => persistAppliedTransitions(routerWindow, appliedViewTransitions);\n routerWindow.addEventListener(\"pagehide\", _saveAppliedTransitions);\n removePageHideEventListener = () => routerWindow.removeEventListener(\"pagehide\", _saveAppliedTransitions);\n }\n // Kick off initial data load if needed. Use Pop to avoid modifying history\n // Note we don't do any handling of lazy here. For SPA's it'll get handled\n // in the normal navigation flow. For SSR it's expected that lazy modules are\n // resolved prior to router creation since we can't go into a fallbackElement\n // UI for SSR'd apps\n if (!state.initialized) {\n startNavigation(Action.Pop, state.location, {\n initialHydration: true\n });\n }\n return router;\n }\n // Clean up a router and it's side effects\n function dispose() {\n if (unlistenHistory) {\n unlistenHistory();\n }\n if (removePageHideEventListener) {\n removePageHideEventListener();\n }\n subscribers.clear();\n pendingNavigationController && pendingNavigationController.abort();\n state.fetchers.forEach((_, key) => deleteFetcher(key));\n state.blockers.forEach((_, key) => deleteBlocker(key));\n }\n // Subscribe to state updates for the router\n function subscribe(fn) {\n subscribers.add(fn);\n return () => subscribers.delete(fn);\n }\n // Update our state and notify the calling context of the change\n function updateState(newState, opts) {\n if (opts === void 0) {\n opts = {};\n }\n state = _extends({}, state, newState);\n // Prep fetcher cleanup so we can tell the UI which fetcher data entries\n // can be removed\n let completedFetchers = [];\n let deletedFetchersKeys = [];\n if (future.v7_fetcherPersist) {\n state.fetchers.forEach((fetcher, key) => {\n if (fetcher.state === \"idle\") {\n if (deletedFetchers.has(key)) {\n // Unmounted from the UI and can be totally removed\n deletedFetchersKeys.push(key);\n } else {\n // Returned to idle but still mounted in the UI, so semi-remains for\n // revalidations and such\n completedFetchers.push(key);\n }\n }\n });\n }\n // Iterate over a local copy so that if flushSync is used and we end up\n // removing and adding a new subscriber due to the useCallback dependencies,\n // we don't get ourselves into a loop calling the new subscriber immediately\n [...subscribers].forEach(subscriber => subscriber(state, {\n deletedFetchers: deletedFetchersKeys,\n unstable_viewTransitionOpts: opts.viewTransitionOpts,\n unstable_flushSync: opts.flushSync === true\n }));\n // Remove idle fetchers from state since we only care about in-flight fetchers.\n if (future.v7_fetcherPersist) {\n completedFetchers.forEach(key => state.fetchers.delete(key));\n deletedFetchersKeys.forEach(key => deleteFetcher(key));\n }\n }\n // Complete a navigation returning the state.navigation back to the IDLE_NAVIGATION\n // and setting state.[historyAction/location/matches] to the new route.\n // - Location is a required param\n // - Navigation will always be set to IDLE_NAVIGATION\n // - Can pass any other state in newState\n function completeNavigation(location, newState, _temp) {\n var _location$state, _location$state2;\n let {\n flushSync\n } = _temp === void 0 ? {} : _temp;\n // Deduce if we're in a loading/actionReload state:\n // - We have committed actionData in the store\n // - The current navigation was a mutation submission\n // - We're past the submitting state and into the loading state\n // - The location being loaded is not the result of a redirect\n let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === \"loading\" && ((_location$state = location.state) == null ? void 0 : _location$state._isRedirect) !== true;\n let actionData;\n if (newState.actionData) {\n if (Object.keys(newState.actionData).length > 0) {\n actionData = newState.actionData;\n } else {\n // Empty actionData -> clear prior actionData due to an action error\n actionData = null;\n }\n } else if (isActionReload) {\n // Keep the current data if we're wrapping up the action reload\n actionData = state.actionData;\n } else {\n // Clear actionData on any other completed navigations\n actionData = null;\n }\n // Always preserve any existing loaderData from re-used routes\n let loaderData = newState.loaderData ? mergeLoaderData(state.loaderData, newState.loaderData, newState.matches || [], newState.errors) : state.loaderData;\n // On a successful navigation we can assume we got through all blockers\n // so we can start fresh\n let blockers = state.blockers;\n if (blockers.size > 0) {\n blockers = new Map(blockers);\n blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER));\n }\n // Always respect the user flag. Otherwise don't reset on mutation\n // submission navigations unless they redirect\n let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && ((_location$state2 = location.state) == null ? void 0 : _location$state2._isRedirect) !== true;\n if (inFlightDataRoutes) {\n dataRoutes = inFlightDataRoutes;\n inFlightDataRoutes = undefined;\n }\n if (isUninterruptedRevalidation) ; else if (pendingAction === Action.Pop) ; else if (pendingAction === Action.Push) {\n init.history.push(location, location.state);\n } else if (pendingAction === Action.Replace) {\n init.history.replace(location, location.state);\n }\n let viewTransitionOpts;\n // On POP, enable transitions if they were enabled on the original navigation\n if (pendingAction === Action.Pop) {\n // Forward takes precedence so they behave like the original navigation\n let priorPaths = appliedViewTransitions.get(state.location.pathname);\n if (priorPaths && priorPaths.has(location.pathname)) {\n viewTransitionOpts = {\n currentLocation: state.location,\n nextLocation: location\n };\n } else if (appliedViewTransitions.has(location.pathname)) {\n // If we don't have a previous forward nav, assume we're popping back to\n // the new location and enable if that location previously enabled\n viewTransitionOpts = {\n currentLocation: location,\n nextLocation: state.location\n };\n }\n } else if (pendingViewTransitionEnabled) {\n // Store the applied transition on PUSH/REPLACE\n let toPaths = appliedViewTransitions.get(state.location.pathname);\n if (toPaths) {\n toPaths.add(location.pathname);\n } else {\n toPaths = new Set([location.pathname]);\n appliedViewTransitions.set(state.location.pathname, toPaths);\n }\n viewTransitionOpts = {\n currentLocation: state.location,\n nextLocation: location\n };\n }\n updateState(_extends({}, newState, {\n actionData,\n loaderData,\n historyAction: pendingAction,\n location,\n initialized: true,\n navigation: IDLE_NAVIGATION,\n revalidation: \"idle\",\n restoreScrollPosition: getSavedScrollPosition(location, newState.matches || state.matches),\n preventScrollReset,\n blockers\n }), {\n viewTransitionOpts,\n flushSync: flushSync === true\n });\n // Reset stateful navigation vars\n pendingAction = Action.Pop;\n pendingPreventScrollReset = false;\n pendingViewTransitionEnabled = false;\n isUninterruptedRevalidation = false;\n isRevalidationRequired = false;\n cancelledDeferredRoutes = [];\n cancelledFetcherLoads = [];\n }\n // Trigger a navigation event, which can either be a numerical POP or a PUSH\n // replace with an optional submission\n async function navigate(to, opts) {\n if (typeof to === \"number\") {\n init.history.go(to);\n return;\n }\n let normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, to, future.v7_relativeSplatPath, opts == null ? void 0 : opts.fromRouteId, opts == null ? void 0 : opts.relative);\n let {\n path,\n submission,\n error\n } = normalizeNavigateOptions(future.v7_normalizeFormMethod, false, normalizedPath, opts);\n let currentLocation = state.location;\n let nextLocation = createLocation(state.location, path, opts && opts.state);\n // When using navigate as a PUSH/REPLACE we aren't reading an already-encoded\n // URL from window.location, so we need to encode it here so the behavior\n // remains the same as POP and non-data-router usages. new URL() does all\n // the same encoding we'd get from a history.pushState/window.location read\n // without having to touch history\n nextLocation = _extends({}, nextLocation, init.history.encodeLocation(nextLocation));\n let userReplace = opts && opts.replace != null ? opts.replace : undefined;\n let historyAction = Action.Push;\n if (userReplace === true) {\n historyAction = Action.Replace;\n } else if (userReplace === false) ; else if (submission != null && isMutationMethod(submission.formMethod) && submission.formAction === state.location.pathname + state.location.search) {\n // By default on submissions to the current location we REPLACE so that\n // users don't have to double-click the back button to get to the prior\n // location. If the user redirects to a different location from the\n // action/loader this will be ignored and the redirect will be a PUSH\n historyAction = Action.Replace;\n }\n let preventScrollReset = opts && \"preventScrollReset\" in opts ? opts.preventScrollReset === true : undefined;\n let flushSync = (opts && opts.unstable_flushSync) === true;\n let blockerKey = shouldBlockNavigation({\n currentLocation,\n nextLocation,\n historyAction\n });\n if (blockerKey) {\n // Put the blocker into a blocked state\n updateBlocker(blockerKey, {\n state: \"blocked\",\n location: nextLocation,\n proceed() {\n updateBlocker(blockerKey, {\n state: \"proceeding\",\n proceed: undefined,\n reset: undefined,\n location: nextLocation\n });\n // Send the same navigation through\n navigate(to, opts);\n },\n reset() {\n let blockers = new Map(state.blockers);\n blockers.set(blockerKey, IDLE_BLOCKER);\n updateState({\n blockers\n });\n }\n });\n return;\n }\n return await startNavigation(historyAction, nextLocation, {\n submission,\n // Send through the formData serialization error if we have one so we can\n // render at the right error boundary after we match routes\n pendingError: error,\n preventScrollReset,\n replace: opts && opts.replace,\n enableViewTransition: opts && opts.unstable_viewTransition,\n flushSync\n });\n }\n // Revalidate all current loaders. If a navigation is in progress or if this\n // is interrupted by a navigation, allow this to \"succeed\" by calling all\n // loaders during the next loader round\n function revalidate() {\n interruptActiveLoads();\n updateState({\n revalidation: \"loading\"\n });\n // If we're currently submitting an action, we don't need to start a new\n // navigation, we'll just let the follow up loader execution call all loaders\n if (state.navigation.state === \"submitting\") {\n return;\n }\n // If we're currently in an idle state, start a new navigation for the current\n // action/location and mark it as uninterrupted, which will skip the history\n // update in completeNavigation\n if (state.navigation.state === \"idle\") {\n startNavigation(state.historyAction, state.location, {\n startUninterruptedRevalidation: true\n });\n return;\n }\n // Otherwise, if we're currently in a loading state, just start a new\n // navigation to the navigation.location but do not trigger an uninterrupted\n // revalidation so that history correctly updates once the navigation completes\n startNavigation(pendingAction || state.historyAction, state.navigation.location, {\n overrideNavigation: state.navigation\n });\n }\n // Start a navigation to the given action/location. Can optionally provide a\n // overrideNavigation which will override the normalLoad in the case of a redirect\n // navigation\n async function startNavigation(historyAction, location, opts) {\n // Abort any in-progress navigations and start a new one. Unset any ongoing\n // uninterrupted revalidations unless told otherwise, since we want this\n // new navigation to update history normally\n pendingNavigationController && pendingNavigationController.abort();\n pendingNavigationController = null;\n pendingAction = historyAction;\n isUninterruptedRevalidation = (opts && opts.startUninterruptedRevalidation) === true;\n // Save the current scroll position every time we start a new navigation,\n // and track whether we should reset scroll on completion\n saveScrollPosition(state.location, state.matches);\n pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === true;\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let loadingNavigation = opts && opts.overrideNavigation;\n let matches = matchRoutes(routesToUse, location, basename);\n let flushSync = (opts && opts.flushSync) === true;\n // Short circuit with a 404 on the root error boundary if we match nothing\n if (!matches) {\n let error = getInternalRouterError(404, {\n pathname: location.pathname\n });\n let {\n matches: notFoundMatches,\n route\n } = getShortCircuitMatches(routesToUse);\n // Cancel all pending deferred on 404s since we don't keep any routes\n cancelActiveDeferreds();\n completeNavigation(location, {\n matches: notFoundMatches,\n loaderData: {},\n errors: {\n [route.id]: error\n }\n }, {\n flushSync\n });\n return;\n }\n // Short circuit if it's only a hash change and not a revalidation or\n // mutation submission.\n //\n // Ignore on initial page loads because since the initial load will always\n // be \"same hash\". For example, on /page#hash and submit a
\n // which will default to a navigation to /page\n if (state.initialized && !isRevalidationRequired && isHashChangeOnly(state.location, location) && !(opts && opts.submission && isMutationMethod(opts.submission.formMethod))) {\n completeNavigation(location, {\n matches\n }, {\n flushSync\n });\n return;\n }\n // Create a controller/Request for this navigation\n pendingNavigationController = new AbortController();\n let request = createClientSideRequest(init.history, location, pendingNavigationController.signal, opts && opts.submission);\n let pendingActionData;\n let pendingError;\n if (opts && opts.pendingError) {\n // If we have a pendingError, it means the user attempted a GET submission\n // with binary FormData so assign here and skip to handleLoaders. That\n // way we handle calling loaders above the boundary etc. It's not really\n // different from an actionError in that sense.\n pendingError = {\n [findNearestBoundary(matches).route.id]: opts.pendingError\n };\n } else if (opts && opts.submission && isMutationMethod(opts.submission.formMethod)) {\n // Call action if we received an action submission\n let actionOutput = await handleAction(request, location, opts.submission, matches, {\n replace: opts.replace,\n flushSync\n });\n if (actionOutput.shortCircuited) {\n return;\n }\n pendingActionData = actionOutput.pendingActionData;\n pendingError = actionOutput.pendingActionError;\n loadingNavigation = getLoadingNavigation(location, opts.submission);\n flushSync = false;\n // Create a GET request for the loaders\n request = new Request(request.url, {\n signal: request.signal\n });\n }\n // Call loaders\n let {\n shortCircuited,\n loaderData,\n errors\n } = await handleLoaders(request, location, matches, loadingNavigation, opts && opts.submission, opts && opts.fetcherSubmission, opts && opts.replace, opts && opts.initialHydration === true, flushSync, pendingActionData, pendingError);\n if (shortCircuited) {\n return;\n }\n // Clean up now that the action/loaders have completed. Don't clean up if\n // we short circuited because pendingNavigationController will have already\n // been assigned to a new controller for the next navigation\n pendingNavigationController = null;\n completeNavigation(location, _extends({\n matches\n }, pendingActionData ? {\n actionData: pendingActionData\n } : {}, {\n loaderData,\n errors\n }));\n }\n // Call the action matched by the leaf route for this navigation and handle\n // redirects/errors\n async function handleAction(request, location, submission, matches, opts) {\n if (opts === void 0) {\n opts = {};\n }\n interruptActiveLoads();\n // Put us in a submitting state\n let navigation = getSubmittingNavigation(location, submission);\n updateState({\n navigation\n }, {\n flushSync: opts.flushSync === true\n });\n // Call our action and get the result\n let result;\n let actionMatch = getTargetMatch(matches, location);\n if (!actionMatch.route.action && !actionMatch.route.lazy) {\n result = {\n type: ResultType.error,\n error: getInternalRouterError(405, {\n method: request.method,\n pathname: location.pathname,\n routeId: actionMatch.route.id\n })\n };\n } else {\n result = await callLoaderOrAction(\"action\", request, actionMatch, matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath);\n if (request.signal.aborted) {\n return {\n shortCircuited: true\n };\n }\n }\n if (isRedirectResult(result)) {\n let replace;\n if (opts && opts.replace != null) {\n replace = opts.replace;\n } else {\n // If the user didn't explicity indicate replace behavior, replace if\n // we redirected to the exact same location we're currently at to avoid\n // double back-buttons\n replace = result.location === state.location.pathname + state.location.search;\n }\n await startRedirectNavigation(state, result, {\n submission,\n replace\n });\n return {\n shortCircuited: true\n };\n }\n if (isErrorResult(result)) {\n // Store off the pending error - we use it to determine which loaders\n // to call and will commit it when we complete the navigation\n let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n // By default, all submissions are REPLACE navigations, but if the\n // action threw an error that'll be rendered in an errorElement, we fall\n // back to PUSH so that the user can use the back button to get back to\n // the pre-submission form location to try again\n if ((opts && opts.replace) !== true) {\n pendingAction = Action.Push;\n }\n return {\n // Send back an empty object we can use to clear out any prior actionData\n pendingActionData: {},\n pendingActionError: {\n [boundaryMatch.route.id]: result.error\n }\n };\n }\n if (isDeferredResult(result)) {\n throw getInternalRouterError(400, {\n type: \"defer-action\"\n });\n }\n return {\n pendingActionData: {\n [actionMatch.route.id]: result.data\n }\n };\n }\n // Call all applicable loaders for the given matches, handling redirects,\n // errors, etc.\n async function handleLoaders(request, location, matches, overrideNavigation, submission, fetcherSubmission, replace, initialHydration, flushSync, pendingActionData, pendingError) {\n // Figure out the right navigation we want to use for data loading\n let loadingNavigation = overrideNavigation || getLoadingNavigation(location, submission);\n // If this was a redirect from an action we don't have a \"submission\" but\n // we have it on the loading navigation so use that if available\n let activeSubmission = submission || fetcherSubmission || getSubmissionFromNavigation(loadingNavigation);\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, activeSubmission, location, future.v7_partialHydration && initialHydration === true, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionData, pendingError);\n // Cancel pending deferreds for no-longer-matched routes or routes we're\n // about to reload. Note that if this is an action reload we would have\n // already cancelled all pending deferreds so this would be a no-op\n cancelActiveDeferreds(routeId => !(matches && matches.some(m => m.route.id === routeId)) || matchesToLoad && matchesToLoad.some(m => m.route.id === routeId));\n pendingNavigationLoadId = ++incrementingLoadId;\n // Short circuit if we have no loaders to run\n if (matchesToLoad.length === 0 && revalidatingFetchers.length === 0) {\n let updatedFetchers = markFetchRedirectsDone();\n completeNavigation(location, _extends({\n matches,\n loaderData: {},\n // Commit pending error if we're short circuiting\n errors: pendingError || null\n }, pendingActionData ? {\n actionData: pendingActionData\n } : {}, updatedFetchers ? {\n fetchers: new Map(state.fetchers)\n } : {}), {\n flushSync\n });\n return {\n shortCircuited: true\n };\n }\n // If this is an uninterrupted revalidation, we remain in our current idle\n // state. If not, we need to switch to our loading state and load data,\n // preserving any new action data or existing action data (in the case of\n // a revalidation interrupting an actionReload)\n // If we have partialHydration enabled, then don't update the state for the\n // initial data load since iot's not a \"navigation\"\n if (!isUninterruptedRevalidation && (!future.v7_partialHydration || !initialHydration)) {\n revalidatingFetchers.forEach(rf => {\n let fetcher = state.fetchers.get(rf.key);\n let revalidatingFetcher = getLoadingFetcher(undefined, fetcher ? fetcher.data : undefined);\n state.fetchers.set(rf.key, revalidatingFetcher);\n });\n let actionData = pendingActionData || state.actionData;\n updateState(_extends({\n navigation: loadingNavigation\n }, actionData ? Object.keys(actionData).length === 0 ? {\n actionData: null\n } : {\n actionData\n } : {}, revalidatingFetchers.length > 0 ? {\n fetchers: new Map(state.fetchers)\n } : {}), {\n flushSync\n });\n }\n revalidatingFetchers.forEach(rf => {\n if (fetchControllers.has(rf.key)) {\n abortFetcher(rf.key);\n }\n if (rf.controller) {\n // Fetchers use an independent AbortController so that aborting a fetcher\n // (via deleteFetcher) does not abort the triggering navigation that\n // triggered the revalidation\n fetchControllers.set(rf.key, rf.controller);\n }\n });\n // Proxy navigation abort through to revalidation fetchers\n let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(f => abortFetcher(f.key));\n if (pendingNavigationController) {\n pendingNavigationController.signal.addEventListener(\"abort\", abortPendingFetchRevalidations);\n }\n let {\n results,\n loaderResults,\n fetcherResults\n } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, request);\n if (request.signal.aborted) {\n return {\n shortCircuited: true\n };\n }\n // Clean up _after_ loaders have completed. Don't clean up if we short\n // circuited because fetchControllers would have been aborted and\n // reassigned to new controllers for the next navigation\n if (pendingNavigationController) {\n pendingNavigationController.signal.removeEventListener(\"abort\", abortPendingFetchRevalidations);\n }\n revalidatingFetchers.forEach(rf => fetchControllers.delete(rf.key));\n // If any loaders returned a redirect Response, start a new REPLACE navigation\n let redirect = findRedirect(results);\n if (redirect) {\n if (redirect.idx >= matchesToLoad.length) {\n // If this redirect came from a fetcher make sure we mark it in\n // fetchRedirectIds so it doesn't get revalidated on the next set of\n // loader executions\n let fetcherKey = revalidatingFetchers[redirect.idx - matchesToLoad.length].key;\n fetchRedirectIds.add(fetcherKey);\n }\n await startRedirectNavigation(state, redirect.result, {\n replace\n });\n return {\n shortCircuited: true\n };\n }\n // Process and commit output from loaders\n let {\n loaderData,\n errors\n } = processLoaderData(state, matches, matchesToLoad, loaderResults, pendingError, revalidatingFetchers, fetcherResults, activeDeferreds);\n // Wire up subscribers to update loaderData as promises settle\n activeDeferreds.forEach((deferredData, routeId) => {\n deferredData.subscribe(aborted => {\n // Note: No need to updateState here since the TrackedPromise on\n // loaderData is stable across resolve/reject\n // Remove this instance if we were aborted or if promises have settled\n if (aborted || deferredData.done) {\n activeDeferreds.delete(routeId);\n }\n });\n });\n let updatedFetchers = markFetchRedirectsDone();\n let didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId);\n let shouldUpdateFetchers = updatedFetchers || didAbortFetchLoads || revalidatingFetchers.length > 0;\n return _extends({\n loaderData,\n errors\n }, shouldUpdateFetchers ? {\n fetchers: new Map(state.fetchers)\n } : {});\n }\n // Trigger a fetcher load/submit for the given fetcher key\n function fetch(key, routeId, href, opts) {\n if (isServer) {\n throw new Error(\"router.fetch() was called during the server render, but it shouldn't be. \" + \"You are likely calling a useFetcher() method in the body of your component. \" + \"Try moving it to a useEffect or a callback.\");\n }\n if (fetchControllers.has(key)) abortFetcher(key);\n let flushSync = (opts && opts.unstable_flushSync) === true;\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, href, future.v7_relativeSplatPath, routeId, opts == null ? void 0 : opts.relative);\n let matches = matchRoutes(routesToUse, normalizedPath, basename);\n if (!matches) {\n setFetcherError(key, routeId, getInternalRouterError(404, {\n pathname: normalizedPath\n }), {\n flushSync\n });\n return;\n }\n let {\n path,\n submission,\n error\n } = normalizeNavigateOptions(future.v7_normalizeFormMethod, true, normalizedPath, opts);\n if (error) {\n setFetcherError(key, routeId, error, {\n flushSync\n });\n return;\n }\n let match = getTargetMatch(matches, path);\n pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n if (submission && isMutationMethod(submission.formMethod)) {\n handleFetcherAction(key, routeId, path, match, matches, flushSync, submission);\n return;\n }\n // Store off the match so we can call it's shouldRevalidate on subsequent\n // revalidations\n fetchLoadMatches.set(key, {\n routeId,\n path\n });\n handleFetcherLoader(key, routeId, path, match, matches, flushSync, submission);\n }\n // Call the action for the matched fetcher.submit(), and then handle redirects,\n // errors, and revalidation\n async function handleFetcherAction(key, routeId, path, match, requestMatches, flushSync, submission) {\n interruptActiveLoads();\n fetchLoadMatches.delete(key);\n if (!match.route.action && !match.route.lazy) {\n let error = getInternalRouterError(405, {\n method: submission.formMethod,\n pathname: path,\n routeId: routeId\n });\n setFetcherError(key, routeId, error, {\n flushSync\n });\n return;\n }\n // Put this fetcher into it's submitting state\n let existingFetcher = state.fetchers.get(key);\n updateFetcherState(key, getSubmittingFetcher(submission, existingFetcher), {\n flushSync\n });\n // Call the action for the fetcher\n let abortController = new AbortController();\n let fetchRequest = createClientSideRequest(init.history, path, abortController.signal, submission);\n fetchControllers.set(key, abortController);\n let originatingLoadId = incrementingLoadId;\n let actionResult = await callLoaderOrAction(\"action\", fetchRequest, match, requestMatches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath);\n if (fetchRequest.signal.aborted) {\n // We can delete this so long as we weren't aborted by our own fetcher\n // re-submit which would have put _new_ controller is in fetchControllers\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n return;\n }\n // When using v7_fetcherPersist, we don't want errors bubbling up to the UI\n // or redirects processed for unmounted fetchers so we just revert them to\n // idle\n if (future.v7_fetcherPersist && deletedFetchers.has(key)) {\n if (isRedirectResult(actionResult) || isErrorResult(actionResult)) {\n updateFetcherState(key, getDoneFetcher(undefined));\n return;\n }\n // Let SuccessResult's fall through for revalidation\n } else {\n if (isRedirectResult(actionResult)) {\n fetchControllers.delete(key);\n if (pendingNavigationLoadId > originatingLoadId) {\n // A new navigation was kicked off after our action started, so that\n // should take precedence over this redirect navigation. We already\n // set isRevalidationRequired so all loaders for the new route should\n // fire unless opted out via shouldRevalidate\n updateFetcherState(key, getDoneFetcher(undefined));\n return;\n } else {\n fetchRedirectIds.add(key);\n updateFetcherState(key, getLoadingFetcher(submission));\n return startRedirectNavigation(state, actionResult, {\n fetcherSubmission: submission\n });\n }\n }\n // Process any non-redirect errors thrown\n if (isErrorResult(actionResult)) {\n setFetcherError(key, routeId, actionResult.error);\n return;\n }\n }\n if (isDeferredResult(actionResult)) {\n throw getInternalRouterError(400, {\n type: \"defer-action\"\n });\n }\n // Start the data load for current matches, or the next location if we're\n // in the middle of a navigation\n let nextLocation = state.navigation.location || state.location;\n let revalidationRequest = createClientSideRequest(init.history, nextLocation, abortController.signal);\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let matches = state.navigation.state !== \"idle\" ? matchRoutes(routesToUse, state.navigation.location, basename) : state.matches;\n invariant(matches, \"Didn't find any matches after fetcher action\");\n let loadId = ++incrementingLoadId;\n fetchReloadIds.set(key, loadId);\n let loadFetcher = getLoadingFetcher(submission, actionResult.data);\n state.fetchers.set(key, loadFetcher);\n let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, submission, nextLocation, false, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, {\n [match.route.id]: actionResult.data\n }, undefined // No need to send through errors since we short circuit above\n );\n // Put all revalidating fetchers into the loading state, except for the\n // current fetcher which we want to keep in it's current loading state which\n // contains it's action submission info + action data\n revalidatingFetchers.filter(rf => rf.key !== key).forEach(rf => {\n let staleKey = rf.key;\n let existingFetcher = state.fetchers.get(staleKey);\n let revalidatingFetcher = getLoadingFetcher(undefined, existingFetcher ? existingFetcher.data : undefined);\n state.fetchers.set(staleKey, revalidatingFetcher);\n if (fetchControllers.has(staleKey)) {\n abortFetcher(staleKey);\n }\n if (rf.controller) {\n fetchControllers.set(staleKey, rf.controller);\n }\n });\n updateState({\n fetchers: new Map(state.fetchers)\n });\n let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(rf => abortFetcher(rf.key));\n abortController.signal.addEventListener(\"abort\", abortPendingFetchRevalidations);\n let {\n results,\n loaderResults,\n fetcherResults\n } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, revalidationRequest);\n if (abortController.signal.aborted) {\n return;\n }\n abortController.signal.removeEventListener(\"abort\", abortPendingFetchRevalidations);\n fetchReloadIds.delete(key);\n fetchControllers.delete(key);\n revalidatingFetchers.forEach(r => fetchControllers.delete(r.key));\n let redirect = findRedirect(results);\n if (redirect) {\n if (redirect.idx >= matchesToLoad.length) {\n // If this redirect came from a fetcher make sure we mark it in\n // fetchRedirectIds so it doesn't get revalidated on the next set of\n // loader executions\n let fetcherKey = revalidatingFetchers[redirect.idx - matchesToLoad.length].key;\n fetchRedirectIds.add(fetcherKey);\n }\n return startRedirectNavigation(state, redirect.result);\n }\n // Process and commit output from loaders\n let {\n loaderData,\n errors\n } = processLoaderData(state, state.matches, matchesToLoad, loaderResults, undefined, revalidatingFetchers, fetcherResults, activeDeferreds);\n // Since we let revalidations complete even if the submitting fetcher was\n // deleted, only put it back to idle if it hasn't been deleted\n if (state.fetchers.has(key)) {\n let doneFetcher = getDoneFetcher(actionResult.data);\n state.fetchers.set(key, doneFetcher);\n }\n abortStaleFetchLoads(loadId);\n // If we are currently in a navigation loading state and this fetcher is\n // more recent than the navigation, we want the newer data so abort the\n // navigation and complete it with the fetcher data\n if (state.navigation.state === \"loading\" && loadId > pendingNavigationLoadId) {\n invariant(pendingAction, \"Expected pending action\");\n pendingNavigationController && pendingNavigationController.abort();\n completeNavigation(state.navigation.location, {\n matches,\n loaderData,\n errors,\n fetchers: new Map(state.fetchers)\n });\n } else {\n // otherwise just update with the fetcher data, preserving any existing\n // loaderData for loaders that did not need to reload. We have to\n // manually merge here since we aren't going through completeNavigation\n updateState({\n errors,\n loaderData: mergeLoaderData(state.loaderData, loaderData, matches, errors),\n fetchers: new Map(state.fetchers)\n });\n isRevalidationRequired = false;\n }\n }\n // Call the matched loader for fetcher.load(), handling redirects, errors, etc.\n async function handleFetcherLoader(key, routeId, path, match, matches, flushSync, submission) {\n let existingFetcher = state.fetchers.get(key);\n updateFetcherState(key, getLoadingFetcher(submission, existingFetcher ? existingFetcher.data : undefined), {\n flushSync\n });\n // Call the loader for this fetcher route match\n let abortController = new AbortController();\n let fetchRequest = createClientSideRequest(init.history, path, abortController.signal);\n fetchControllers.set(key, abortController);\n let originatingLoadId = incrementingLoadId;\n let result = await callLoaderOrAction(\"loader\", fetchRequest, match, matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath);\n // Deferred isn't supported for fetcher loads, await everything and treat it\n // as a normal load. resolveDeferredData will return undefined if this\n // fetcher gets aborted, so we just leave result untouched and short circuit\n // below if that happens\n if (isDeferredResult(result)) {\n result = (await resolveDeferredData(result, fetchRequest.signal, true)) || result;\n }\n // We can delete this so long as we weren't aborted by our our own fetcher\n // re-load which would have put _new_ controller is in fetchControllers\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n if (fetchRequest.signal.aborted) {\n return;\n }\n // We don't want errors bubbling up or redirects followed for unmounted\n // fetchers, so short circuit here if it was removed from the UI\n if (deletedFetchers.has(key)) {\n updateFetcherState(key, getDoneFetcher(undefined));\n return;\n }\n // If the loader threw a redirect Response, start a new REPLACE navigation\n if (isRedirectResult(result)) {\n if (pendingNavigationLoadId > originatingLoadId) {\n // A new navigation was kicked off after our loader started, so that\n // should take precedence over this redirect navigation\n updateFetcherState(key, getDoneFetcher(undefined));\n return;\n } else {\n fetchRedirectIds.add(key);\n await startRedirectNavigation(state, result);\n return;\n }\n }\n // Process any non-redirect errors thrown\n if (isErrorResult(result)) {\n setFetcherError(key, routeId, result.error);\n return;\n }\n invariant(!isDeferredResult(result), \"Unhandled fetcher deferred data\");\n // Put the fetcher back into an idle state\n updateFetcherState(key, getDoneFetcher(result.data));\n }\n /**\n * Utility function to handle redirects returned from an action or loader.\n * Normally, a redirect \"replaces\" the navigation that triggered it. So, for\n * example:\n *\n * - user is on /a\n * - user clicks a link to /b\n * - loader for /b redirects to /c\n *\n * In a non-JS app the browser would track the in-flight navigation to /b and\n * then replace it with /c when it encountered the redirect response. In\n * the end it would only ever update the URL bar with /c.\n *\n * In client-side routing using pushState/replaceState, we aim to emulate\n * this behavior and we also do not update history until the end of the\n * navigation (including processed redirects). This means that we never\n * actually touch history until we've processed redirects, so we just use\n * the history action from the original navigation (PUSH or REPLACE).\n */\n async function startRedirectNavigation(state, redirect, _temp2) {\n let {\n submission,\n fetcherSubmission,\n replace\n } = _temp2 === void 0 ? {} : _temp2;\n if (redirect.revalidate) {\n isRevalidationRequired = true;\n }\n let redirectLocation = createLocation(state.location, redirect.location, {\n _isRedirect: true\n });\n invariant(redirectLocation, \"Expected a location on the redirect navigation\");\n if (isBrowser) {\n let isDocumentReload = false;\n if (redirect.reloadDocument) {\n // Hard reload if the response contained X-Remix-Reload-Document\n isDocumentReload = true;\n } else if (ABSOLUTE_URL_REGEX.test(redirect.location)) {\n const url = init.history.createURL(redirect.location);\n isDocumentReload =\n // Hard reload if it's an absolute URL to a new origin\n url.origin !== routerWindow.location.origin ||\n // Hard reload if it's an absolute URL that does not match our basename\n stripBasename(url.pathname, basename) == null;\n }\n if (isDocumentReload) {\n if (replace) {\n routerWindow.location.replace(redirect.location);\n } else {\n routerWindow.location.assign(redirect.location);\n }\n return;\n }\n }\n // There's no need to abort on redirects, since we don't detect the\n // redirect until the action/loaders have settled\n pendingNavigationController = null;\n let redirectHistoryAction = replace === true ? Action.Replace : Action.Push;\n // Use the incoming submission if provided, fallback on the active one in\n // state.navigation\n let {\n formMethod,\n formAction,\n formEncType\n } = state.navigation;\n if (!submission && !fetcherSubmission && formMethod && formAction && formEncType) {\n submission = getSubmissionFromNavigation(state.navigation);\n }\n // If this was a 307/308 submission we want to preserve the HTTP method and\n // re-submit the GET/POST/PUT/PATCH/DELETE as a submission navigation to the\n // redirected location\n let activeSubmission = submission || fetcherSubmission;\n if (redirectPreserveMethodStatusCodes.has(redirect.status) && activeSubmission && isMutationMethod(activeSubmission.formMethod)) {\n await startNavigation(redirectHistoryAction, redirectLocation, {\n submission: _extends({}, activeSubmission, {\n formAction: redirect.location\n }),\n // Preserve this flag across redirects\n preventScrollReset: pendingPreventScrollReset\n });\n } else {\n // If we have a navigation submission, we will preserve it through the\n // redirect navigation\n let overrideNavigation = getLoadingNavigation(redirectLocation, submission);\n await startNavigation(redirectHistoryAction, redirectLocation, {\n overrideNavigation,\n // Send fetcher submissions through for shouldRevalidate\n fetcherSubmission,\n // Preserve this flag across redirects\n preventScrollReset: pendingPreventScrollReset\n });\n }\n }\n async function callLoadersAndMaybeResolveData(currentMatches, matches, matchesToLoad, fetchersToLoad, request) {\n // Call all navigation loaders and revalidating fetcher loaders in parallel,\n // then slice off the results into separate arrays so we can handle them\n // accordingly\n let results = await Promise.all([...matchesToLoad.map(match => callLoaderOrAction(\"loader\", request, match, matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath)), ...fetchersToLoad.map(f => {\n if (f.matches && f.match && f.controller) {\n return callLoaderOrAction(\"loader\", createClientSideRequest(init.history, f.path, f.controller.signal), f.match, f.matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath);\n } else {\n let error = {\n type: ResultType.error,\n error: getInternalRouterError(404, {\n pathname: f.path\n })\n };\n return error;\n }\n })]);\n let loaderResults = results.slice(0, matchesToLoad.length);\n let fetcherResults = results.slice(matchesToLoad.length);\n await Promise.all([resolveDeferredResults(currentMatches, matchesToLoad, loaderResults, loaderResults.map(() => request.signal), false, state.loaderData), resolveDeferredResults(currentMatches, fetchersToLoad.map(f => f.match), fetcherResults, fetchersToLoad.map(f => f.controller ? f.controller.signal : null), true)]);\n return {\n results,\n loaderResults,\n fetcherResults\n };\n }\n function interruptActiveLoads() {\n // Every interruption triggers a revalidation\n isRevalidationRequired = true;\n // Cancel pending route-level deferreds and mark cancelled routes for\n // revalidation\n cancelledDeferredRoutes.push(...cancelActiveDeferreds());\n // Abort in-flight fetcher loads\n fetchLoadMatches.forEach((_, key) => {\n if (fetchControllers.has(key)) {\n cancelledFetcherLoads.push(key);\n abortFetcher(key);\n }\n });\n }\n function updateFetcherState(key, fetcher, opts) {\n if (opts === void 0) {\n opts = {};\n }\n state.fetchers.set(key, fetcher);\n updateState({\n fetchers: new Map(state.fetchers)\n }, {\n flushSync: (opts && opts.flushSync) === true\n });\n }\n function setFetcherError(key, routeId, error, opts) {\n if (opts === void 0) {\n opts = {};\n }\n let boundaryMatch = findNearestBoundary(state.matches, routeId);\n deleteFetcher(key);\n updateState({\n errors: {\n [boundaryMatch.route.id]: error\n },\n fetchers: new Map(state.fetchers)\n }, {\n flushSync: (opts && opts.flushSync) === true\n });\n }\n function getFetcher(key) {\n if (future.v7_fetcherPersist) {\n activeFetchers.set(key, (activeFetchers.get(key) || 0) + 1);\n // If this fetcher was previously marked for deletion, unmark it since we\n // have a new instance\n if (deletedFetchers.has(key)) {\n deletedFetchers.delete(key);\n }\n }\n return state.fetchers.get(key) || IDLE_FETCHER;\n }\n function deleteFetcher(key) {\n let fetcher = state.fetchers.get(key);\n // Don't abort the controller if this is a deletion of a fetcher.submit()\n // in it's loading phase since - we don't want to abort the corresponding\n // revalidation and want them to complete and land\n if (fetchControllers.has(key) && !(fetcher && fetcher.state === \"loading\" && fetchReloadIds.has(key))) {\n abortFetcher(key);\n }\n fetchLoadMatches.delete(key);\n fetchReloadIds.delete(key);\n fetchRedirectIds.delete(key);\n deletedFetchers.delete(key);\n state.fetchers.delete(key);\n }\n function deleteFetcherAndUpdateState(key) {\n if (future.v7_fetcherPersist) {\n let count = (activeFetchers.get(key) || 0) - 1;\n if (count <= 0) {\n activeFetchers.delete(key);\n deletedFetchers.add(key);\n } else {\n activeFetchers.set(key, count);\n }\n } else {\n deleteFetcher(key);\n }\n updateState({\n fetchers: new Map(state.fetchers)\n });\n }\n function abortFetcher(key) {\n let controller = fetchControllers.get(key);\n invariant(controller, \"Expected fetch controller: \" + key);\n controller.abort();\n fetchControllers.delete(key);\n }\n function markFetchersDone(keys) {\n for (let key of keys) {\n let fetcher = getFetcher(key);\n let doneFetcher = getDoneFetcher(fetcher.data);\n state.fetchers.set(key, doneFetcher);\n }\n }\n function markFetchRedirectsDone() {\n let doneKeys = [];\n let updatedFetchers = false;\n for (let key of fetchRedirectIds) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, \"Expected fetcher: \" + key);\n if (fetcher.state === \"loading\") {\n fetchRedirectIds.delete(key);\n doneKeys.push(key);\n updatedFetchers = true;\n }\n }\n markFetchersDone(doneKeys);\n return updatedFetchers;\n }\n function abortStaleFetchLoads(landedId) {\n let yeetedKeys = [];\n for (let [key, id] of fetchReloadIds) {\n if (id < landedId) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, \"Expected fetcher: \" + key);\n if (fetcher.state === \"loading\") {\n abortFetcher(key);\n fetchReloadIds.delete(key);\n yeetedKeys.push(key);\n }\n }\n }\n markFetchersDone(yeetedKeys);\n return yeetedKeys.length > 0;\n }\n function getBlocker(key, fn) {\n let blocker = state.blockers.get(key) || IDLE_BLOCKER;\n if (blockerFunctions.get(key) !== fn) {\n blockerFunctions.set(key, fn);\n }\n return blocker;\n }\n function deleteBlocker(key) {\n state.blockers.delete(key);\n blockerFunctions.delete(key);\n }\n // Utility function to update blockers, ensuring valid state transitions\n function updateBlocker(key, newBlocker) {\n let blocker = state.blockers.get(key) || IDLE_BLOCKER;\n // Poor mans state machine :)\n // https://mermaid.live/edit#pako:eNqVkc9OwzAMxl8l8nnjAYrEtDIOHEBIgwvKJTReGy3_lDpIqO27k6awMG0XcrLlnz87nwdonESogKXXBuE79rq75XZO3-yHds0RJVuv70YrPlUrCEe2HfrORS3rubqZfuhtpg5C9wk5tZ4VKcRUq88q9Z8RS0-48cE1iHJkL0ugbHuFLus9L6spZy8nX9MP2CNdomVaposqu3fGayT8T8-jJQwhepo_UtpgBQaDEUom04dZhAN1aJBDlUKJBxE1ceB2Smj0Mln-IBW5AFU2dwUiktt_2Qaq2dBfaKdEup85UV7Yd-dKjlnkabl2Pvr0DTkTreM\n invariant(blocker.state === \"unblocked\" && newBlocker.state === \"blocked\" || blocker.state === \"blocked\" && newBlocker.state === \"blocked\" || blocker.state === \"blocked\" && newBlocker.state === \"proceeding\" || blocker.state === \"blocked\" && newBlocker.state === \"unblocked\" || blocker.state === \"proceeding\" && newBlocker.state === \"unblocked\", \"Invalid blocker state transition: \" + blocker.state + \" -> \" + newBlocker.state);\n let blockers = new Map(state.blockers);\n blockers.set(key, newBlocker);\n updateState({\n blockers\n });\n }\n function shouldBlockNavigation(_ref2) {\n let {\n currentLocation,\n nextLocation,\n historyAction\n } = _ref2;\n if (blockerFunctions.size === 0) {\n return;\n }\n // We ony support a single active blocker at the moment since we don't have\n // any compelling use cases for multi-blocker yet\n if (blockerFunctions.size > 1) {\n warning(false, \"A router only supports one blocker at a time\");\n }\n let entries = Array.from(blockerFunctions.entries());\n let [blockerKey, blockerFunction] = entries[entries.length - 1];\n let blocker = state.blockers.get(blockerKey);\n if (blocker && blocker.state === \"proceeding\") {\n // If the blocker is currently proceeding, we don't need to re-check\n // it and can let this navigation continue\n return;\n }\n // At this point, we know we're unblocked/blocked so we need to check the\n // user-provided blocker function\n if (blockerFunction({\n currentLocation,\n nextLocation,\n historyAction\n })) {\n return blockerKey;\n }\n }\n function cancelActiveDeferreds(predicate) {\n let cancelledRouteIds = [];\n activeDeferreds.forEach((dfd, routeId) => {\n if (!predicate || predicate(routeId)) {\n // Cancel the deferred - but do not remove from activeDeferreds here -\n // we rely on the subscribers to do that so our tests can assert proper\n // cleanup via _internalActiveDeferreds\n dfd.cancel();\n cancelledRouteIds.push(routeId);\n activeDeferreds.delete(routeId);\n }\n });\n return cancelledRouteIds;\n }\n // Opt in to capturing and reporting scroll positions during navigations,\n // used by the component\n function enableScrollRestoration(positions, getPosition, getKey) {\n savedScrollPositions = positions;\n getScrollPosition = getPosition;\n getScrollRestorationKey = getKey || null;\n // Perform initial hydration scroll restoration, since we miss the boat on\n // the initial updateState() because we've not yet rendered \n // and therefore have no savedScrollPositions available\n if (!initialScrollRestored && state.navigation === IDLE_NAVIGATION) {\n initialScrollRestored = true;\n let y = getSavedScrollPosition(state.location, state.matches);\n if (y != null) {\n updateState({\n restoreScrollPosition: y\n });\n }\n }\n return () => {\n savedScrollPositions = null;\n getScrollPosition = null;\n getScrollRestorationKey = null;\n };\n }\n function getScrollKey(location, matches) {\n if (getScrollRestorationKey) {\n let key = getScrollRestorationKey(location, matches.map(m => convertRouteMatchToUiMatch(m, state.loaderData)));\n return key || location.key;\n }\n return location.key;\n }\n function saveScrollPosition(location, matches) {\n if (savedScrollPositions && getScrollPosition) {\n let key = getScrollKey(location, matches);\n savedScrollPositions[key] = getScrollPosition();\n }\n }\n function getSavedScrollPosition(location, matches) {\n if (savedScrollPositions) {\n let key = getScrollKey(location, matches);\n let y = savedScrollPositions[key];\n if (typeof y === \"number\") {\n return y;\n }\n }\n return null;\n }\n function _internalSetRoutes(newRoutes) {\n manifest = {};\n inFlightDataRoutes = convertRoutesToDataRoutes(newRoutes, mapRouteProperties, undefined, manifest);\n }\n router = {\n get basename() {\n return basename;\n },\n get future() {\n return future;\n },\n get state() {\n return state;\n },\n get routes() {\n return dataRoutes;\n },\n get window() {\n return routerWindow;\n },\n initialize,\n subscribe,\n enableScrollRestoration,\n navigate,\n fetch,\n revalidate,\n // Passthrough to history-aware createHref used by useHref so we get proper\n // hash-aware URLs in DOM paths\n createHref: to => init.history.createHref(to),\n encodeLocation: to => init.history.encodeLocation(to),\n getFetcher,\n deleteFetcher: deleteFetcherAndUpdateState,\n dispose,\n getBlocker,\n deleteBlocker,\n _internalFetchControllers: fetchControllers,\n _internalActiveDeferreds: activeDeferreds,\n // TODO: Remove setRoutes, it's temporary to avoid dealing with\n // updating the tree while validating the update algorithm.\n _internalSetRoutes\n };\n return router;\n}\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region createStaticHandler\n////////////////////////////////////////////////////////////////////////////////\nconst UNSAFE_DEFERRED_SYMBOL = Symbol(\"deferred\");\nfunction createStaticHandler(routes, opts) {\n invariant(routes.length > 0, \"You must provide a non-empty routes array to createStaticHandler\");\n let manifest = {};\n let basename = (opts ? opts.basename : null) || \"/\";\n let mapRouteProperties;\n if (opts != null && opts.mapRouteProperties) {\n mapRouteProperties = opts.mapRouteProperties;\n } else if (opts != null && opts.detectErrorBoundary) {\n // If they are still using the deprecated version, wrap it with the new API\n let detectErrorBoundary = opts.detectErrorBoundary;\n mapRouteProperties = route => ({\n hasErrorBoundary: detectErrorBoundary(route)\n });\n } else {\n mapRouteProperties = defaultMapRouteProperties;\n }\n // Config driven behavior flags\n let future = _extends({\n v7_relativeSplatPath: false,\n v7_throwAbortReason: false\n }, opts ? opts.future : null);\n let dataRoutes = convertRoutesToDataRoutes(routes, mapRouteProperties, undefined, manifest);\n /**\n * The query() method is intended for document requests, in which we want to\n * call an optional action and potentially multiple loaders for all nested\n * routes. It returns a StaticHandlerContext object, which is very similar\n * to the router state (location, loaderData, actionData, errors, etc.) and\n * also adds SSR-specific information such as the statusCode and headers\n * from action/loaders Responses.\n *\n * It _should_ never throw and should report all errors through the\n * returned context.errors object, properly associating errors to their error\n * boundary. Additionally, it tracks _deepestRenderedBoundaryId which can be\n * used to emulate React error boundaries during SSr by performing a second\n * pass only down to the boundaryId.\n *\n * The one exception where we do not return a StaticHandlerContext is when a\n * redirect response is returned or thrown from any action/loader. We\n * propagate that out and return the raw Response so the HTTP server can\n * return it directly.\n */\n async function query(request, _temp3) {\n let {\n requestContext\n } = _temp3 === void 0 ? {} : _temp3;\n let url = new URL(request.url);\n let method = request.method;\n let location = createLocation(\"\", createPath(url), null, \"default\");\n let matches = matchRoutes(dataRoutes, location, basename);\n // SSR supports HEAD requests while SPA doesn't\n if (!isValidMethod(method) && method !== \"HEAD\") {\n let error = getInternalRouterError(405, {\n method\n });\n let {\n matches: methodNotAllowedMatches,\n route\n } = getShortCircuitMatches(dataRoutes);\n return {\n basename,\n location,\n matches: methodNotAllowedMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {},\n activeDeferreds: null\n };\n } else if (!matches) {\n let error = getInternalRouterError(404, {\n pathname: location.pathname\n });\n let {\n matches: notFoundMatches,\n route\n } = getShortCircuitMatches(dataRoutes);\n return {\n basename,\n location,\n matches: notFoundMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {},\n activeDeferreds: null\n };\n }\n let result = await queryImpl(request, location, matches, requestContext);\n if (isResponse(result)) {\n return result;\n }\n // When returning StaticHandlerContext, we patch back in the location here\n // since we need it for React Context. But this helps keep our submit and\n // loadRouteData operating on a Request instead of a Location\n return _extends({\n location,\n basename\n }, result);\n }\n /**\n * The queryRoute() method is intended for targeted route requests, either\n * for fetch ?_data requests or resource route requests. In this case, we\n * are only ever calling a single action or loader, and we are returning the\n * returned value directly. In most cases, this will be a Response returned\n * from the action/loader, but it may be a primitive or other value as well -\n * and in such cases the calling context should handle that accordingly.\n *\n * We do respect the throw/return differentiation, so if an action/loader\n * throws, then this method will throw the value. This is important so we\n * can do proper boundary identification in Remix where a thrown Response\n * must go to the Catch Boundary but a returned Response is happy-path.\n *\n * One thing to note is that any Router-initiated Errors that make sense\n * to associate with a status code will be thrown as an ErrorResponse\n * instance which include the raw Error, such that the calling context can\n * serialize the error as they see fit while including the proper response\n * code. Examples here are 404 and 405 errors that occur prior to reaching\n * any user-defined loaders.\n */\n async function queryRoute(request, _temp4) {\n let {\n routeId,\n requestContext\n } = _temp4 === void 0 ? {} : _temp4;\n let url = new URL(request.url);\n let method = request.method;\n let location = createLocation(\"\", createPath(url), null, \"default\");\n let matches = matchRoutes(dataRoutes, location, basename);\n // SSR supports HEAD requests while SPA doesn't\n if (!isValidMethod(method) && method !== \"HEAD\" && method !== \"OPTIONS\") {\n throw getInternalRouterError(405, {\n method\n });\n } else if (!matches) {\n throw getInternalRouterError(404, {\n pathname: location.pathname\n });\n }\n let match = routeId ? matches.find(m => m.route.id === routeId) : getTargetMatch(matches, location);\n if (routeId && !match) {\n throw getInternalRouterError(403, {\n pathname: location.pathname,\n routeId\n });\n } else if (!match) {\n // This should never hit I don't think?\n throw getInternalRouterError(404, {\n pathname: location.pathname\n });\n }\n let result = await queryImpl(request, location, matches, requestContext, match);\n if (isResponse(result)) {\n return result;\n }\n let error = result.errors ? Object.values(result.errors)[0] : undefined;\n if (error !== undefined) {\n // If we got back result.errors, that means the loader/action threw\n // _something_ that wasn't a Response, but it's not guaranteed/required\n // to be an `instanceof Error` either, so we have to use throw here to\n // preserve the \"error\" state outside of queryImpl.\n throw error;\n }\n // Pick off the right state value to return\n if (result.actionData) {\n return Object.values(result.actionData)[0];\n }\n if (result.loaderData) {\n var _result$activeDeferre;\n let data = Object.values(result.loaderData)[0];\n if ((_result$activeDeferre = result.activeDeferreds) != null && _result$activeDeferre[match.route.id]) {\n data[UNSAFE_DEFERRED_SYMBOL] = result.activeDeferreds[match.route.id];\n }\n return data;\n }\n return undefined;\n }\n async function queryImpl(request, location, matches, requestContext, routeMatch) {\n invariant(request.signal, \"query()/queryRoute() requests must contain an AbortController signal\");\n try {\n if (isMutationMethod(request.method.toLowerCase())) {\n let result = await submit(request, matches, routeMatch || getTargetMatch(matches, location), requestContext, routeMatch != null);\n return result;\n }\n let result = await loadRouteData(request, matches, requestContext, routeMatch);\n return isResponse(result) ? result : _extends({}, result, {\n actionData: null,\n actionHeaders: {}\n });\n } catch (e) {\n // If the user threw/returned a Response in callLoaderOrAction, we throw\n // it to bail out and then return or throw here based on whether the user\n // returned or threw\n if (isQueryRouteResponse(e)) {\n if (e.type === ResultType.error) {\n throw e.response;\n }\n return e.response;\n }\n // Redirects are always returned since they don't propagate to catch\n // boundaries\n if (isRedirectResponse(e)) {\n return e;\n }\n throw e;\n }\n }\n async function submit(request, matches, actionMatch, requestContext, isRouteRequest) {\n let result;\n if (!actionMatch.route.action && !actionMatch.route.lazy) {\n let error = getInternalRouterError(405, {\n method: request.method,\n pathname: new URL(request.url).pathname,\n routeId: actionMatch.route.id\n });\n if (isRouteRequest) {\n throw error;\n }\n result = {\n type: ResultType.error,\n error\n };\n } else {\n result = await callLoaderOrAction(\"action\", request, actionMatch, matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath, {\n isStaticRequest: true,\n isRouteRequest,\n requestContext\n });\n if (request.signal.aborted) {\n throwStaticHandlerAbortedError(request, isRouteRequest, future);\n }\n }\n if (isRedirectResult(result)) {\n // Uhhhh - this should never happen, we should always throw these from\n // callLoaderOrAction, but the type narrowing here keeps TS happy and we\n // can get back on the \"throw all redirect responses\" train here should\n // this ever happen :/\n throw new Response(null, {\n status: result.status,\n headers: {\n Location: result.location\n }\n });\n }\n if (isDeferredResult(result)) {\n let error = getInternalRouterError(400, {\n type: \"defer-action\"\n });\n if (isRouteRequest) {\n throw error;\n }\n result = {\n type: ResultType.error,\n error\n };\n }\n if (isRouteRequest) {\n // Note: This should only be non-Response values if we get here, since\n // isRouteRequest should throw any Response received in callLoaderOrAction\n if (isErrorResult(result)) {\n throw result.error;\n }\n return {\n matches: [actionMatch],\n loaderData: {},\n actionData: {\n [actionMatch.route.id]: result.data\n },\n errors: null,\n // Note: statusCode + headers are unused here since queryRoute will\n // return the raw Response or value\n statusCode: 200,\n loaderHeaders: {},\n actionHeaders: {},\n activeDeferreds: null\n };\n }\n if (isErrorResult(result)) {\n // Store off the pending error - we use it to determine which loaders\n // to call and will commit it when we complete the navigation\n let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n let context = await loadRouteData(request, matches, requestContext, undefined, {\n [boundaryMatch.route.id]: result.error\n });\n // action status codes take precedence over loader status codes\n return _extends({}, context, {\n statusCode: isRouteErrorResponse(result.error) ? result.error.status : 500,\n actionData: null,\n actionHeaders: _extends({}, result.headers ? {\n [actionMatch.route.id]: result.headers\n } : {})\n });\n }\n // Create a GET request for the loaders\n let loaderRequest = new Request(request.url, {\n headers: request.headers,\n redirect: request.redirect,\n signal: request.signal\n });\n let context = await loadRouteData(loaderRequest, matches, requestContext);\n return _extends({}, context, result.statusCode ? {\n statusCode: result.statusCode\n } : {}, {\n actionData: {\n [actionMatch.route.id]: result.data\n },\n actionHeaders: _extends({}, result.headers ? {\n [actionMatch.route.id]: result.headers\n } : {})\n });\n }\n async function loadRouteData(request, matches, requestContext, routeMatch, pendingActionError) {\n let isRouteRequest = routeMatch != null;\n // Short circuit if we have no loaders to run (queryRoute())\n if (isRouteRequest && !(routeMatch != null && routeMatch.route.loader) && !(routeMatch != null && routeMatch.route.lazy)) {\n throw getInternalRouterError(400, {\n method: request.method,\n pathname: new URL(request.url).pathname,\n routeId: routeMatch == null ? void 0 : routeMatch.route.id\n });\n }\n let requestMatches = routeMatch ? [routeMatch] : getLoaderMatchesUntilBoundary(matches, Object.keys(pendingActionError || {})[0]);\n let matchesToLoad = requestMatches.filter(m => m.route.loader || m.route.lazy);\n // Short circuit if we have no loaders to run (query())\n if (matchesToLoad.length === 0) {\n return {\n matches,\n // Add a null for all matched routes for proper revalidation on the client\n loaderData: matches.reduce((acc, m) => Object.assign(acc, {\n [m.route.id]: null\n }), {}),\n errors: pendingActionError || null,\n statusCode: 200,\n loaderHeaders: {},\n activeDeferreds: null\n };\n }\n let results = await Promise.all([...matchesToLoad.map(match => callLoaderOrAction(\"loader\", request, match, matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath, {\n isStaticRequest: true,\n isRouteRequest,\n requestContext\n }))]);\n if (request.signal.aborted) {\n throwStaticHandlerAbortedError(request, isRouteRequest, future);\n }\n // Process and commit output from loaders\n let activeDeferreds = new Map();\n let context = processRouteLoaderData(matches, matchesToLoad, results, pendingActionError, activeDeferreds);\n // Add a null for any non-loader matches for proper revalidation on the client\n let executedLoaders = new Set(matchesToLoad.map(match => match.route.id));\n matches.forEach(match => {\n if (!executedLoaders.has(match.route.id)) {\n context.loaderData[match.route.id] = null;\n }\n });\n return _extends({}, context, {\n matches,\n activeDeferreds: activeDeferreds.size > 0 ? Object.fromEntries(activeDeferreds.entries()) : null\n });\n }\n return {\n dataRoutes,\n query,\n queryRoute\n };\n}\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region Helpers\n////////////////////////////////////////////////////////////////////////////////\n/**\n * Given an existing StaticHandlerContext and an error thrown at render time,\n * provide an updated StaticHandlerContext suitable for a second SSR render\n */\nfunction getStaticContextFromError(routes, context, error) {\n let newContext = _extends({}, context, {\n statusCode: isRouteErrorResponse(error) ? error.status : 500,\n errors: {\n [context._deepestRenderedBoundaryId || routes[0].id]: error\n }\n });\n return newContext;\n}\nfunction throwStaticHandlerAbortedError(request, isRouteRequest, future) {\n if (future.v7_throwAbortReason && request.signal.reason !== undefined) {\n throw request.signal.reason;\n }\n let method = isRouteRequest ? \"queryRoute\" : \"query\";\n throw new Error(method + \"() call aborted: \" + request.method + \" \" + request.url);\n}\nfunction isSubmissionNavigation(opts) {\n return opts != null && (\"formData\" in opts && opts.formData != null || \"body\" in opts && opts.body !== undefined);\n}\nfunction normalizeTo(location, matches, basename, prependBasename, to, v7_relativeSplatPath, fromRouteId, relative) {\n let contextualMatches;\n let activeRouteMatch;\n if (fromRouteId) {\n // Grab matches up to the calling route so our route-relative logic is\n // relative to the correct source route\n contextualMatches = [];\n for (let match of matches) {\n contextualMatches.push(match);\n if (match.route.id === fromRouteId) {\n activeRouteMatch = match;\n break;\n }\n }\n } else {\n contextualMatches = matches;\n activeRouteMatch = matches[matches.length - 1];\n }\n // Resolve the relative path\n let path = resolveTo(to ? to : \".\", getResolveToMatches(contextualMatches, v7_relativeSplatPath), stripBasename(location.pathname, basename) || location.pathname, relative === \"path\");\n // When `to` is not specified we inherit search/hash from the current\n // location, unlike when to=\".\" and we just inherit the path.\n // See https://github.com/remix-run/remix/issues/927\n if (to == null) {\n path.search = location.search;\n path.hash = location.hash;\n }\n // Add an ?index param for matched index routes if we don't already have one\n if ((to == null || to === \"\" || to === \".\") && activeRouteMatch && activeRouteMatch.route.index && !hasNakedIndexQuery(path.search)) {\n path.search = path.search ? path.search.replace(/^\\?/, \"?index&\") : \"?index\";\n }\n // If we're operating within a basename, prepend it to the pathname. If\n // this is a root navigation, then just use the raw basename which allows\n // the basename to have full control over the presence of a trailing slash\n // on root actions\n if (prependBasename && basename !== \"/\") {\n path.pathname = path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n }\n return createPath(path);\n}\n// Normalize navigation options by converting formMethod=GET formData objects to\n// URLSearchParams so they behave identically to links with query params\nfunction normalizeNavigateOptions(normalizeFormMethod, isFetcher, path, opts) {\n // Return location verbatim on non-submission navigations\n if (!opts || !isSubmissionNavigation(opts)) {\n return {\n path\n };\n }\n if (opts.formMethod && !isValidMethod(opts.formMethod)) {\n return {\n path,\n error: getInternalRouterError(405, {\n method: opts.formMethod\n })\n };\n }\n let getInvalidBodyError = () => ({\n path,\n error: getInternalRouterError(400, {\n type: \"invalid-body\"\n })\n });\n // Create a Submission on non-GET navigations\n let rawFormMethod = opts.formMethod || \"get\";\n let formMethod = normalizeFormMethod ? rawFormMethod.toUpperCase() : rawFormMethod.toLowerCase();\n let formAction = stripHashFromPath(path);\n if (opts.body !== undefined) {\n if (opts.formEncType === \"text/plain\") {\n // text only support POST/PUT/PATCH/DELETE submissions\n if (!isMutationMethod(formMethod)) {\n return getInvalidBodyError();\n }\n let text = typeof opts.body === \"string\" ? opts.body : opts.body instanceof FormData || opts.body instanceof URLSearchParams ?\n // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data\n Array.from(opts.body.entries()).reduce((acc, _ref3) => {\n let [name, value] = _ref3;\n return \"\" + acc + name + \"=\" + value + \"\\n\";\n }, \"\") : String(opts.body);\n return {\n path,\n submission: {\n formMethod,\n formAction,\n formEncType: opts.formEncType,\n formData: undefined,\n json: undefined,\n text\n }\n };\n } else if (opts.formEncType === \"application/json\") {\n // json only supports POST/PUT/PATCH/DELETE submissions\n if (!isMutationMethod(formMethod)) {\n return getInvalidBodyError();\n }\n try {\n let json = typeof opts.body === \"string\" ? JSON.parse(opts.body) : opts.body;\n return {\n path,\n submission: {\n formMethod,\n formAction,\n formEncType: opts.formEncType,\n formData: undefined,\n json,\n text: undefined\n }\n };\n } catch (e) {\n return getInvalidBodyError();\n }\n }\n }\n invariant(typeof FormData === \"function\", \"FormData is not available in this environment\");\n let searchParams;\n let formData;\n if (opts.formData) {\n searchParams = convertFormDataToSearchParams(opts.formData);\n formData = opts.formData;\n } else if (opts.body instanceof FormData) {\n searchParams = convertFormDataToSearchParams(opts.body);\n formData = opts.body;\n } else if (opts.body instanceof URLSearchParams) {\n searchParams = opts.body;\n formData = convertSearchParamsToFormData(searchParams);\n } else if (opts.body == null) {\n searchParams = new URLSearchParams();\n formData = new FormData();\n } else {\n try {\n searchParams = new URLSearchParams(opts.body);\n formData = convertSearchParamsToFormData(searchParams);\n } catch (e) {\n return getInvalidBodyError();\n }\n }\n let submission = {\n formMethod,\n formAction,\n formEncType: opts && opts.formEncType || \"application/x-www-form-urlencoded\",\n formData,\n json: undefined,\n text: undefined\n };\n if (isMutationMethod(submission.formMethod)) {\n return {\n path,\n submission\n };\n }\n // Flatten submission onto URLSearchParams for GET submissions\n let parsedPath = parsePath(path);\n // On GET navigation submissions we can drop the ?index param from the\n // resulting location since all loaders will run. But fetcher GET submissions\n // only run a single loader so we need to preserve any incoming ?index params\n if (isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search)) {\n searchParams.append(\"index\", \"\");\n }\n parsedPath.search = \"?\" + searchParams;\n return {\n path: createPath(parsedPath),\n submission\n };\n}\n// Filter out all routes below any caught error as they aren't going to\n// render so we don't need to load them\nfunction getLoaderMatchesUntilBoundary(matches, boundaryId) {\n let boundaryMatches = matches;\n if (boundaryId) {\n let index = matches.findIndex(m => m.route.id === boundaryId);\n if (index >= 0) {\n boundaryMatches = matches.slice(0, index);\n }\n }\n return boundaryMatches;\n}\nfunction getMatchesToLoad(history, state, matches, submission, location, isInitialLoad, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionData, pendingError) {\n let actionResult = pendingError ? Object.values(pendingError)[0] : pendingActionData ? Object.values(pendingActionData)[0] : undefined;\n let currentUrl = history.createURL(state.location);\n let nextUrl = history.createURL(location);\n // Pick navigation matches that are net-new or qualify for revalidation\n let boundaryId = pendingError ? Object.keys(pendingError)[0] : undefined;\n let boundaryMatches = getLoaderMatchesUntilBoundary(matches, boundaryId);\n let navigationMatches = boundaryMatches.filter((match, index) => {\n let {\n route\n } = match;\n if (route.lazy) {\n // We haven't loaded this route yet so we don't know if it's got a loader!\n return true;\n }\n if (route.loader == null) {\n return false;\n }\n if (isInitialLoad) {\n if (route.loader.hydrate) {\n return true;\n }\n return state.loaderData[route.id] === undefined && (\n // Don't re-run if the loader ran and threw an error\n !state.errors || state.errors[route.id] === undefined);\n }\n // Always call the loader on new route instances and pending defer cancellations\n if (isNewLoader(state.loaderData, state.matches[index], match) || cancelledDeferredRoutes.some(id => id === match.route.id)) {\n return true;\n }\n // This is the default implementation for when we revalidate. If the route\n // provides it's own implementation, then we give them full control but\n // provide this value so they can leverage it if needed after they check\n // their own specific use cases\n let currentRouteMatch = state.matches[index];\n let nextRouteMatch = match;\n return shouldRevalidateLoader(match, _extends({\n currentUrl,\n currentParams: currentRouteMatch.params,\n nextUrl,\n nextParams: nextRouteMatch.params\n }, submission, {\n actionResult,\n defaultShouldRevalidate:\n // Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate\n isRevalidationRequired ||\n // Clicked the same link, resubmitted a GET form\n currentUrl.pathname + currentUrl.search === nextUrl.pathname + nextUrl.search ||\n // Search params affect all loaders\n currentUrl.search !== nextUrl.search || isNewRouteInstance(currentRouteMatch, nextRouteMatch)\n }));\n });\n // Pick fetcher.loads that need to be revalidated\n let revalidatingFetchers = [];\n fetchLoadMatches.forEach((f, key) => {\n // Don't revalidate:\n // - on initial load (shouldn't be any fetchers then anyway)\n // - if fetcher won't be present in the subsequent render\n // - no longer matches the URL (v7_fetcherPersist=false)\n // - was unmounted but persisted due to v7_fetcherPersist=true\n if (isInitialLoad || !matches.some(m => m.route.id === f.routeId) || deletedFetchers.has(key)) {\n return;\n }\n let fetcherMatches = matchRoutes(routesToUse, f.path, basename);\n // If the fetcher path no longer matches, push it in with null matches so\n // we can trigger a 404 in callLoadersAndMaybeResolveData. Note this is\n // currently only a use-case for Remix HMR where the route tree can change\n // at runtime and remove a route previously loaded via a fetcher\n if (!fetcherMatches) {\n revalidatingFetchers.push({\n key,\n routeId: f.routeId,\n path: f.path,\n matches: null,\n match: null,\n controller: null\n });\n return;\n }\n // Revalidating fetchers are decoupled from the route matches since they\n // load from a static href. They revalidate based on explicit revalidation\n // (submission, useRevalidator, or X-Remix-Revalidate)\n let fetcher = state.fetchers.get(key);\n let fetcherMatch = getTargetMatch(fetcherMatches, f.path);\n let shouldRevalidate = false;\n if (fetchRedirectIds.has(key)) {\n // Never trigger a revalidation of an actively redirecting fetcher\n shouldRevalidate = false;\n } else if (cancelledFetcherLoads.includes(key)) {\n // Always revalidate if the fetcher was cancelled\n shouldRevalidate = true;\n } else if (fetcher && fetcher.state !== \"idle\" && fetcher.data === undefined) {\n // If the fetcher hasn't ever completed loading yet, then this isn't a\n // revalidation, it would just be a brand new load if an explicit\n // revalidation is required\n shouldRevalidate = isRevalidationRequired;\n } else {\n // Otherwise fall back on any user-defined shouldRevalidate, defaulting\n // to explicit revalidations only\n shouldRevalidate = shouldRevalidateLoader(fetcherMatch, _extends({\n currentUrl,\n currentParams: state.matches[state.matches.length - 1].params,\n nextUrl,\n nextParams: matches[matches.length - 1].params\n }, submission, {\n actionResult,\n defaultShouldRevalidate: isRevalidationRequired\n }));\n }\n if (shouldRevalidate) {\n revalidatingFetchers.push({\n key,\n routeId: f.routeId,\n path: f.path,\n matches: fetcherMatches,\n match: fetcherMatch,\n controller: new AbortController()\n });\n }\n });\n return [navigationMatches, revalidatingFetchers];\n}\nfunction isNewLoader(currentLoaderData, currentMatch, match) {\n let isNew =\n // [a] -> [a, b]\n !currentMatch ||\n // [a, b] -> [a, c]\n match.route.id !== currentMatch.route.id;\n // Handle the case that we don't have data for a re-used route, potentially\n // from a prior error or from a cancelled pending deferred\n let isMissingData = currentLoaderData[match.route.id] === undefined;\n // Always load if this is a net-new route or we don't yet have data\n return isNew || isMissingData;\n}\nfunction isNewRouteInstance(currentMatch, match) {\n let currentPath = currentMatch.route.path;\n return (\n // param change for this match, /users/123 -> /users/456\n currentMatch.pathname !== match.pathname ||\n // splat param changed, which is not present in match.path\n // e.g. /files/images/avatar.jpg -> files/finances.xls\n currentPath != null && currentPath.endsWith(\"*\") && currentMatch.params[\"*\"] !== match.params[\"*\"]\n );\n}\nfunction shouldRevalidateLoader(loaderMatch, arg) {\n if (loaderMatch.route.shouldRevalidate) {\n let routeChoice = loaderMatch.route.shouldRevalidate(arg);\n if (typeof routeChoice === \"boolean\") {\n return routeChoice;\n }\n }\n return arg.defaultShouldRevalidate;\n}\n/**\n * Execute route.lazy() methods to lazily load route modules (loader, action,\n * shouldRevalidate) and update the routeManifest in place which shares objects\n * with dataRoutes so those get updated as well.\n */\nasync function loadLazyRouteModule(route, mapRouteProperties, manifest) {\n if (!route.lazy) {\n return;\n }\n let lazyRoute = await route.lazy();\n // If the lazy route function was executed and removed by another parallel\n // call then we can return - first lazy() to finish wins because the return\n // value of lazy is expected to be static\n if (!route.lazy) {\n return;\n }\n let routeToUpdate = manifest[route.id];\n invariant(routeToUpdate, \"No route found in manifest\");\n // Update the route in place. This should be safe because there's no way\n // we could yet be sitting on this route as we can't get there without\n // resolving lazy() first.\n //\n // This is different than the HMR \"update\" use-case where we may actively be\n // on the route being updated. The main concern boils down to \"does this\n // mutation affect any ongoing navigations or any current state.matches\n // values?\". If not, it should be safe to update in place.\n let routeUpdates = {};\n for (let lazyRouteProperty in lazyRoute) {\n let staticRouteValue = routeToUpdate[lazyRouteProperty];\n let isPropertyStaticallyDefined = staticRouteValue !== undefined &&\n // This property isn't static since it should always be updated based\n // on the route updates\n lazyRouteProperty !== \"hasErrorBoundary\";\n warning(!isPropertyStaticallyDefined, \"Route \\\"\" + routeToUpdate.id + \"\\\" has a static property \\\"\" + lazyRouteProperty + \"\\\" \" + \"defined but its lazy function is also returning a value for this property. \" + (\"The lazy route property \\\"\" + lazyRouteProperty + \"\\\" will be ignored.\"));\n if (!isPropertyStaticallyDefined && !immutableRouteKeys.has(lazyRouteProperty)) {\n routeUpdates[lazyRouteProperty] = lazyRoute[lazyRouteProperty];\n }\n }\n // Mutate the route with the provided updates. Do this first so we pass\n // the updated version to mapRouteProperties\n Object.assign(routeToUpdate, routeUpdates);\n // Mutate the `hasErrorBoundary` property on the route based on the route\n // updates and remove the `lazy` function so we don't resolve the lazy\n // route again.\n Object.assign(routeToUpdate, _extends({}, mapRouteProperties(routeToUpdate), {\n lazy: undefined\n }));\n}\nasync function callLoaderOrAction(type, request, match, matches, manifest, mapRouteProperties, basename, v7_relativeSplatPath, opts) {\n if (opts === void 0) {\n opts = {};\n }\n let resultType;\n let result;\n let onReject;\n let runHandler = handler => {\n // Setup a promise we can race against so that abort signals short circuit\n let reject;\n let abortPromise = new Promise((_, r) => reject = r);\n onReject = () => reject();\n request.signal.addEventListener(\"abort\", onReject);\n return Promise.race([handler({\n request,\n params: match.params,\n context: opts.requestContext\n }), abortPromise]);\n };\n try {\n let handler = match.route[type];\n if (match.route.lazy) {\n if (handler) {\n // Run statically defined handler in parallel with lazy()\n let handlerError;\n let values = await Promise.all([\n // If the handler throws, don't let it immediately bubble out,\n // since we need to let the lazy() execution finish so we know if this\n // route has a boundary that can handle the error\n runHandler(handler).catch(e => {\n handlerError = e;\n }), loadLazyRouteModule(match.route, mapRouteProperties, manifest)]);\n if (handlerError) {\n throw handlerError;\n }\n result = values[0];\n } else {\n // Load lazy route module, then run any returned handler\n await loadLazyRouteModule(match.route, mapRouteProperties, manifest);\n handler = match.route[type];\n if (handler) {\n // Handler still run even if we got interrupted to maintain consistency\n // with un-abortable behavior of handler execution on non-lazy or\n // previously-lazy-loaded routes\n result = await runHandler(handler);\n } else if (type === \"action\") {\n let url = new URL(request.url);\n let pathname = url.pathname + url.search;\n throw getInternalRouterError(405, {\n method: request.method,\n pathname,\n routeId: match.route.id\n });\n } else {\n // lazy() route has no loader to run. Short circuit here so we don't\n // hit the invariant below that errors on returning undefined.\n return {\n type: ResultType.data,\n data: undefined\n };\n }\n }\n } else if (!handler) {\n let url = new URL(request.url);\n let pathname = url.pathname + url.search;\n throw getInternalRouterError(404, {\n pathname\n });\n } else {\n result = await runHandler(handler);\n }\n invariant(result !== undefined, \"You defined \" + (type === \"action\" ? \"an action\" : \"a loader\") + \" for route \" + (\"\\\"\" + match.route.id + \"\\\" but didn't return anything from your `\" + type + \"` \") + \"function. Please return a value or `null`.\");\n } catch (e) {\n resultType = ResultType.error;\n result = e;\n } finally {\n if (onReject) {\n request.signal.removeEventListener(\"abort\", onReject);\n }\n }\n if (isResponse(result)) {\n let status = result.status;\n // Process redirects\n if (redirectStatusCodes.has(status)) {\n let location = result.headers.get(\"Location\");\n invariant(location, \"Redirects returned/thrown from loaders/actions must have a Location header\");\n // Support relative routing in internal redirects\n if (!ABSOLUTE_URL_REGEX.test(location)) {\n location = normalizeTo(new URL(request.url), matches.slice(0, matches.indexOf(match) + 1), basename, true, location, v7_relativeSplatPath);\n } else if (!opts.isStaticRequest) {\n // Strip off the protocol+origin for same-origin + same-basename absolute\n // redirects. If this is a static request, we can let it go back to the\n // browser as-is\n let currentUrl = new URL(request.url);\n let url = location.startsWith(\"//\") ? new URL(currentUrl.protocol + location) : new URL(location);\n let isSameBasename = stripBasename(url.pathname, basename) != null;\n if (url.origin === currentUrl.origin && isSameBasename) {\n location = url.pathname + url.search + url.hash;\n }\n }\n // Don't process redirects in the router during static requests requests.\n // Instead, throw the Response and let the server handle it with an HTTP\n // redirect. We also update the Location header in place in this flow so\n // basename and relative routing is taken into account\n if (opts.isStaticRequest) {\n result.headers.set(\"Location\", location);\n throw result;\n }\n return {\n type: ResultType.redirect,\n status,\n location,\n revalidate: result.headers.get(\"X-Remix-Revalidate\") !== null,\n reloadDocument: result.headers.get(\"X-Remix-Reload-Document\") !== null\n };\n }\n // For SSR single-route requests, we want to hand Responses back directly\n // without unwrapping. We do this with the QueryRouteResponse wrapper\n // interface so we can know whether it was returned or thrown\n if (opts.isRouteRequest) {\n let queryRouteResponse = {\n type: resultType === ResultType.error ? ResultType.error : ResultType.data,\n response: result\n };\n throw queryRouteResponse;\n }\n let data;\n try {\n let contentType = result.headers.get(\"Content-Type\");\n // Check between word boundaries instead of startsWith() due to the last\n // paragraph of https://httpwg.org/specs/rfc9110.html#field.content-type\n if (contentType && /\\bapplication\\/json\\b/.test(contentType)) {\n if (result.body == null) {\n data = null;\n } else {\n data = await result.json();\n }\n } else {\n data = await result.text();\n }\n } catch (e) {\n return {\n type: ResultType.error,\n error: e\n };\n }\n if (resultType === ResultType.error) {\n return {\n type: resultType,\n error: new ErrorResponseImpl(status, result.statusText, data),\n headers: result.headers\n };\n }\n return {\n type: ResultType.data,\n data,\n statusCode: result.status,\n headers: result.headers\n };\n }\n if (resultType === ResultType.error) {\n return {\n type: resultType,\n error: result\n };\n }\n if (isDeferredData(result)) {\n var _result$init, _result$init2;\n return {\n type: ResultType.deferred,\n deferredData: result,\n statusCode: (_result$init = result.init) == null ? void 0 : _result$init.status,\n headers: ((_result$init2 = result.init) == null ? void 0 : _result$init2.headers) && new Headers(result.init.headers)\n };\n }\n return {\n type: ResultType.data,\n data: result\n };\n}\n// Utility method for creating the Request instances for loaders/actions during\n// client-side navigations and fetches. During SSR we will always have a\n// Request instance from the static handler (query/queryRoute)\nfunction createClientSideRequest(history, location, signal, submission) {\n let url = history.createURL(stripHashFromPath(location)).toString();\n let init = {\n signal\n };\n if (submission && isMutationMethod(submission.formMethod)) {\n let {\n formMethod,\n formEncType\n } = submission;\n // Didn't think we needed this but it turns out unlike other methods, patch\n // won't be properly normalized to uppercase and results in a 405 error.\n // See: https://fetch.spec.whatwg.org/#concept-method\n init.method = formMethod.toUpperCase();\n if (formEncType === \"application/json\") {\n init.headers = new Headers({\n \"Content-Type\": formEncType\n });\n init.body = JSON.stringify(submission.json);\n } else if (formEncType === \"text/plain\") {\n // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n init.body = submission.text;\n } else if (formEncType === \"application/x-www-form-urlencoded\" && submission.formData) {\n // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n init.body = convertFormDataToSearchParams(submission.formData);\n } else {\n // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n init.body = submission.formData;\n }\n }\n return new Request(url, init);\n}\nfunction convertFormDataToSearchParams(formData) {\n let searchParams = new URLSearchParams();\n for (let [key, value] of formData.entries()) {\n // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#converting-an-entry-list-to-a-list-of-name-value-pairs\n searchParams.append(key, typeof value === \"string\" ? value : value.name);\n }\n return searchParams;\n}\nfunction convertSearchParamsToFormData(searchParams) {\n let formData = new FormData();\n for (let [key, value] of searchParams.entries()) {\n formData.append(key, value);\n }\n return formData;\n}\nfunction processRouteLoaderData(matches, matchesToLoad, results, pendingError, activeDeferreds) {\n // Fill in loaderData/errors from our loaders\n let loaderData = {};\n let errors = null;\n let statusCode;\n let foundError = false;\n let loaderHeaders = {};\n // Process loader results into state.loaderData/state.errors\n results.forEach((result, index) => {\n let id = matchesToLoad[index].route.id;\n invariant(!isRedirectResult(result), \"Cannot handle redirect results in processLoaderData\");\n if (isErrorResult(result)) {\n // Look upwards from the matched route for the closest ancestor\n // error boundary, defaulting to the root match\n let boundaryMatch = findNearestBoundary(matches, id);\n let error = result.error;\n // If we have a pending action error, we report it at the highest-route\n // that throws a loader error, and then clear it out to indicate that\n // it was consumed\n if (pendingError) {\n error = Object.values(pendingError)[0];\n pendingError = undefined;\n }\n errors = errors || {};\n // Prefer higher error values if lower errors bubble to the same boundary\n if (errors[boundaryMatch.route.id] == null) {\n errors[boundaryMatch.route.id] = error;\n }\n // Clear our any prior loaderData for the throwing route\n loaderData[id] = undefined;\n // Once we find our first (highest) error, we set the status code and\n // prevent deeper status codes from overriding\n if (!foundError) {\n foundError = true;\n statusCode = isRouteErrorResponse(result.error) ? result.error.status : 500;\n }\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n } else {\n if (isDeferredResult(result)) {\n activeDeferreds.set(id, result.deferredData);\n loaderData[id] = result.deferredData.data;\n } else {\n loaderData[id] = result.data;\n }\n // Error status codes always override success status codes, but if all\n // loaders are successful we take the deepest status code.\n if (result.statusCode != null && result.statusCode !== 200 && !foundError) {\n statusCode = result.statusCode;\n }\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n }\n });\n // If we didn't consume the pending action error (i.e., all loaders\n // resolved), then consume it here. Also clear out any loaderData for the\n // throwing route\n if (pendingError) {\n errors = pendingError;\n loaderData[Object.keys(pendingError)[0]] = undefined;\n }\n return {\n loaderData,\n errors,\n statusCode: statusCode || 200,\n loaderHeaders\n };\n}\nfunction processLoaderData(state, matches, matchesToLoad, results, pendingError, revalidatingFetchers, fetcherResults, activeDeferreds) {\n let {\n loaderData,\n errors\n } = processRouteLoaderData(matches, matchesToLoad, results, pendingError, activeDeferreds);\n // Process results from our revalidating fetchers\n for (let index = 0; index < revalidatingFetchers.length; index++) {\n let {\n key,\n match,\n controller\n } = revalidatingFetchers[index];\n invariant(fetcherResults !== undefined && fetcherResults[index] !== undefined, \"Did not find corresponding fetcher result\");\n let result = fetcherResults[index];\n // Process fetcher non-redirect errors\n if (controller && controller.signal.aborted) {\n // Nothing to do for aborted fetchers\n continue;\n } else if (isErrorResult(result)) {\n let boundaryMatch = findNearestBoundary(state.matches, match == null ? void 0 : match.route.id);\n if (!(errors && errors[boundaryMatch.route.id])) {\n errors = _extends({}, errors, {\n [boundaryMatch.route.id]: result.error\n });\n }\n state.fetchers.delete(key);\n } else if (isRedirectResult(result)) {\n // Should never get here, redirects should get processed above, but we\n // keep this to type narrow to a success result in the else\n invariant(false, \"Unhandled fetcher revalidation redirect\");\n } else if (isDeferredResult(result)) {\n // Should never get here, deferred data should be awaited for fetchers\n // in resolveDeferredResults\n invariant(false, \"Unhandled fetcher deferred data\");\n } else {\n let doneFetcher = getDoneFetcher(result.data);\n state.fetchers.set(key, doneFetcher);\n }\n }\n return {\n loaderData,\n errors\n };\n}\nfunction mergeLoaderData(loaderData, newLoaderData, matches, errors) {\n let mergedLoaderData = _extends({}, newLoaderData);\n for (let match of matches) {\n let id = match.route.id;\n if (newLoaderData.hasOwnProperty(id)) {\n if (newLoaderData[id] !== undefined) {\n mergedLoaderData[id] = newLoaderData[id];\n }\n } else if (loaderData[id] !== undefined && match.route.loader) {\n // Preserve existing keys not included in newLoaderData and where a loader\n // wasn't removed by HMR\n mergedLoaderData[id] = loaderData[id];\n }\n if (errors && errors.hasOwnProperty(id)) {\n // Don't keep any loader data below the boundary\n break;\n }\n }\n return mergedLoaderData;\n}\n// Find the nearest error boundary, looking upwards from the leaf route (or the\n// route specified by routeId) for the closest ancestor error boundary,\n// defaulting to the root match\nfunction findNearestBoundary(matches, routeId) {\n let eligibleMatches = routeId ? matches.slice(0, matches.findIndex(m => m.route.id === routeId) + 1) : [...matches];\n return eligibleMatches.reverse().find(m => m.route.hasErrorBoundary === true) || matches[0];\n}\nfunction getShortCircuitMatches(routes) {\n // Prefer a root layout route if present, otherwise shim in a route object\n let route = routes.length === 1 ? routes[0] : routes.find(r => r.index || !r.path || r.path === \"/\") || {\n id: \"__shim-error-route__\"\n };\n return {\n matches: [{\n params: {},\n pathname: \"\",\n pathnameBase: \"\",\n route\n }],\n route\n };\n}\nfunction getInternalRouterError(status, _temp5) {\n let {\n pathname,\n routeId,\n method,\n type\n } = _temp5 === void 0 ? {} : _temp5;\n let statusText = \"Unknown Server Error\";\n let errorMessage = \"Unknown @remix-run/router error\";\n if (status === 400) {\n statusText = \"Bad Request\";\n if (method && pathname && routeId) {\n errorMessage = \"You made a \" + method + \" request to \\\"\" + pathname + \"\\\" but \" + (\"did not provide a `loader` for route \\\"\" + routeId + \"\\\", \") + \"so there is no way to handle the request.\";\n } else if (type === \"defer-action\") {\n errorMessage = \"defer() is not supported in actions\";\n } else if (type === \"invalid-body\") {\n errorMessage = \"Unable to encode submission body\";\n }\n } else if (status === 403) {\n statusText = \"Forbidden\";\n errorMessage = \"Route \\\"\" + routeId + \"\\\" does not match URL \\\"\" + pathname + \"\\\"\";\n } else if (status === 404) {\n statusText = \"Not Found\";\n errorMessage = \"No route matches URL \\\"\" + pathname + \"\\\"\";\n } else if (status === 405) {\n statusText = \"Method Not Allowed\";\n if (method && pathname && routeId) {\n errorMessage = \"You made a \" + method.toUpperCase() + \" request to \\\"\" + pathname + \"\\\" but \" + (\"did not provide an `action` for route \\\"\" + routeId + \"\\\", \") + \"so there is no way to handle the request.\";\n } else if (method) {\n errorMessage = \"Invalid request method \\\"\" + method.toUpperCase() + \"\\\"\";\n }\n }\n return new ErrorResponseImpl(status || 500, statusText, new Error(errorMessage), true);\n}\n// Find any returned redirect errors, starting from the lowest match\nfunction findRedirect(results) {\n for (let i = results.length - 1; i >= 0; i--) {\n let result = results[i];\n if (isRedirectResult(result)) {\n return {\n result,\n idx: i\n };\n }\n }\n}\nfunction stripHashFromPath(path) {\n let parsedPath = typeof path === \"string\" ? parsePath(path) : path;\n return createPath(_extends({}, parsedPath, {\n hash: \"\"\n }));\n}\nfunction isHashChangeOnly(a, b) {\n if (a.pathname !== b.pathname || a.search !== b.search) {\n return false;\n }\n if (a.hash === \"\") {\n // /page -> /page#hash\n return b.hash !== \"\";\n } else if (a.hash === b.hash) {\n // /page#hash -> /page#hash\n return true;\n } else if (b.hash !== \"\") {\n // /page#hash -> /page#other\n return true;\n }\n // If the hash is removed the browser will re-perform a request to the server\n // /page#hash -> /page\n return false;\n}\nfunction isDeferredResult(result) {\n return result.type === ResultType.deferred;\n}\nfunction isErrorResult(result) {\n return result.type === ResultType.error;\n}\nfunction isRedirectResult(result) {\n return (result && result.type) === ResultType.redirect;\n}\nfunction isDeferredData(value) {\n let deferred = value;\n return deferred && typeof deferred === \"object\" && typeof deferred.data === \"object\" && typeof deferred.subscribe === \"function\" && typeof deferred.cancel === \"function\" && typeof deferred.resolveData === \"function\";\n}\nfunction isResponse(value) {\n return value != null && typeof value.status === \"number\" && typeof value.statusText === \"string\" && typeof value.headers === \"object\" && typeof value.body !== \"undefined\";\n}\nfunction isRedirectResponse(result) {\n if (!isResponse(result)) {\n return false;\n }\n let status = result.status;\n let location = result.headers.get(\"Location\");\n return status >= 300 && status <= 399 && location != null;\n}\nfunction isQueryRouteResponse(obj) {\n return obj && isResponse(obj.response) && (obj.type === ResultType.data || obj.type === ResultType.error);\n}\nfunction isValidMethod(method) {\n return validRequestMethods.has(method.toLowerCase());\n}\nfunction isMutationMethod(method) {\n return validMutationMethods.has(method.toLowerCase());\n}\nasync function resolveDeferredResults(currentMatches, matchesToLoad, results, signals, isFetcher, currentLoaderData) {\n for (let index = 0; index < results.length; index++) {\n let result = results[index];\n let match = matchesToLoad[index];\n // If we don't have a match, then we can have a deferred result to do\n // anything with. This is for revalidating fetchers where the route was\n // removed during HMR\n if (!match) {\n continue;\n }\n let currentMatch = currentMatches.find(m => m.route.id === match.route.id);\n let isRevalidatingLoader = currentMatch != null && !isNewRouteInstance(currentMatch, match) && (currentLoaderData && currentLoaderData[match.route.id]) !== undefined;\n if (isDeferredResult(result) && (isFetcher || isRevalidatingLoader)) {\n // Note: we do not have to touch activeDeferreds here since we race them\n // against the signal in resolveDeferredData and they'll get aborted\n // there if needed\n let signal = signals[index];\n invariant(signal, \"Expected an AbortSignal for revalidating fetcher deferred result\");\n await resolveDeferredData(result, signal, isFetcher).then(result => {\n if (result) {\n results[index] = result || results[index];\n }\n });\n }\n }\n}\nasync function resolveDeferredData(result, signal, unwrap) {\n if (unwrap === void 0) {\n unwrap = false;\n }\n let aborted = await result.deferredData.resolveData(signal);\n if (aborted) {\n return;\n }\n if (unwrap) {\n try {\n return {\n type: ResultType.data,\n data: result.deferredData.unwrappedData\n };\n } catch (e) {\n // Handle any TrackedPromise._error values encountered while unwrapping\n return {\n type: ResultType.error,\n error: e\n };\n }\n }\n return {\n type: ResultType.data,\n data: result.deferredData.data\n };\n}\nfunction hasNakedIndexQuery(search) {\n return new URLSearchParams(search).getAll(\"index\").some(v => v === \"\");\n}\nfunction getTargetMatch(matches, location) {\n let search = typeof location === \"string\" ? parsePath(location).search : location.search;\n if (matches[matches.length - 1].route.index && hasNakedIndexQuery(search || \"\")) {\n // Return the leaf index route when index is present\n return matches[matches.length - 1];\n }\n // Otherwise grab the deepest \"path contributing\" match (ignoring index and\n // pathless layout routes)\n let pathMatches = getPathContributingMatches(matches);\n return pathMatches[pathMatches.length - 1];\n}\nfunction getSubmissionFromNavigation(navigation) {\n let {\n formMethod,\n formAction,\n formEncType,\n text,\n formData,\n json\n } = navigation;\n if (!formMethod || !formAction || !formEncType) {\n return;\n }\n if (text != null) {\n return {\n formMethod,\n formAction,\n formEncType,\n formData: undefined,\n json: undefined,\n text\n };\n } else if (formData != null) {\n return {\n formMethod,\n formAction,\n formEncType,\n formData,\n json: undefined,\n text: undefined\n };\n } else if (json !== undefined) {\n return {\n formMethod,\n formAction,\n formEncType,\n formData: undefined,\n json,\n text: undefined\n };\n }\n}\nfunction getLoadingNavigation(location, submission) {\n if (submission) {\n let navigation = {\n state: \"loading\",\n location,\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text\n };\n return navigation;\n } else {\n let navigation = {\n state: \"loading\",\n location,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined\n };\n return navigation;\n }\n}\nfunction getSubmittingNavigation(location, submission) {\n let navigation = {\n state: \"submitting\",\n location,\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text\n };\n return navigation;\n}\nfunction getLoadingFetcher(submission, data) {\n if (submission) {\n let fetcher = {\n state: \"loading\",\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text,\n data\n };\n return fetcher;\n } else {\n let fetcher = {\n state: \"loading\",\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n data\n };\n return fetcher;\n }\n}\nfunction getSubmittingFetcher(submission, existingFetcher) {\n let fetcher = {\n state: \"submitting\",\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text,\n data: existingFetcher ? existingFetcher.data : undefined\n };\n return fetcher;\n}\nfunction getDoneFetcher(data) {\n let fetcher = {\n state: \"idle\",\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n data\n };\n return fetcher;\n}\nfunction restoreAppliedTransitions(_window, transitions) {\n try {\n let sessionPositions = _window.sessionStorage.getItem(TRANSITIONS_STORAGE_KEY);\n if (sessionPositions) {\n let json = JSON.parse(sessionPositions);\n for (let [k, v] of Object.entries(json || {})) {\n if (v && Array.isArray(v)) {\n transitions.set(k, new Set(v || []));\n }\n }\n }\n } catch (e) {\n // no-op, use default empty object\n }\n}\nfunction persistAppliedTransitions(_window, transitions) {\n if (transitions.size > 0) {\n let json = {};\n for (let [k, v] of transitions) {\n json[k] = [...v];\n }\n try {\n _window.sessionStorage.setItem(TRANSITIONS_STORAGE_KEY, JSON.stringify(json));\n } catch (error) {\n warning(false, \"Failed to save applied view transitions in sessionStorage (\" + error + \").\");\n }\n }\n}\n//#endregion\n\nexport { AbortedDeferredError, Action, IDLE_BLOCKER, IDLE_FETCHER, IDLE_NAVIGATION, UNSAFE_DEFERRED_SYMBOL, DeferredData as UNSAFE_DeferredData, ErrorResponseImpl as UNSAFE_ErrorResponseImpl, convertRouteMatchToUiMatch as UNSAFE_convertRouteMatchToUiMatch, convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes, getResolveToMatches as UNSAFE_getResolveToMatches, invariant as UNSAFE_invariant, warning as UNSAFE_warning, createBrowserHistory, createHashHistory, createMemoryHistory, createPath, createRouter, createStaticHandler, defer, generatePath, getStaticContextFromError, getToPathname, isDeferredData, isRouteErrorResponse, joinPaths, json, matchPath, matchRoutes, normalizePathname, parsePath, redirect, redirectDocument, resolvePath, resolveTo, stripBasename };\n//# sourceMappingURL=router.js.map\n","/**\n * React Router v6.22.0\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport * as React from 'react';\nimport { UNSAFE_invariant, joinPaths, matchPath, UNSAFE_getResolveToMatches, UNSAFE_warning, resolveTo, parsePath, matchRoutes, Action, UNSAFE_convertRouteMatchToUiMatch, stripBasename, IDLE_BLOCKER, isRouteErrorResponse, createMemoryHistory, AbortedDeferredError, createRouter } from '@remix-run/router';\nexport { AbortedDeferredError, Action as NavigationType, createPath, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, resolvePath } from '@remix-run/router';\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\n// Create react-specific types from the agnostic types in @remix-run/router to\n// export from react-router\nconst DataRouterContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") {\n DataRouterContext.displayName = \"DataRouter\";\n}\nconst DataRouterStateContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") {\n DataRouterStateContext.displayName = \"DataRouterState\";\n}\nconst AwaitContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") {\n AwaitContext.displayName = \"Await\";\n}\n\n/**\n * A Navigator is a \"location changer\"; it's how you get to different locations.\n *\n * Every history instance conforms to the Navigator interface, but the\n * distinction is useful primarily when it comes to the low-level `` API\n * where both the location and a navigator must be provided separately in order\n * to avoid \"tearing\" that may occur in a suspense-enabled app if the action\n * and/or location were to be read directly from the history instance.\n */\n\nconst NavigationContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") {\n NavigationContext.displayName = \"Navigation\";\n}\nconst LocationContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") {\n LocationContext.displayName = \"Location\";\n}\nconst RouteContext = /*#__PURE__*/React.createContext({\n outlet: null,\n matches: [],\n isDataRoute: false\n});\nif (process.env.NODE_ENV !== \"production\") {\n RouteContext.displayName = \"Route\";\n}\nconst RouteErrorContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") {\n RouteErrorContext.displayName = \"RouteError\";\n}\n\n/**\n * Returns the full href for the given \"to\" value. This is useful for building\n * custom links that are also accessible and preserve right-click behavior.\n *\n * @see https://reactrouter.com/hooks/use-href\n */\nfunction useHref(to, _temp) {\n let {\n relative\n } = _temp === void 0 ? {} : _temp;\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n \"useHref() may be used only in the context of a component.\") : UNSAFE_invariant(false) : void 0;\n let {\n basename,\n navigator\n } = React.useContext(NavigationContext);\n let {\n hash,\n pathname,\n search\n } = useResolvedPath(to, {\n relative\n });\n let joinedPathname = pathname;\n\n // If we're operating within a basename, prepend it to the pathname prior\n // to creating the href. If this is a root navigation, then just use the raw\n // basename which allows the basename to have full control over the presence\n // of a trailing slash on root links\n if (basename !== \"/\") {\n joinedPathname = pathname === \"/\" ? basename : joinPaths([basename, pathname]);\n }\n return navigator.createHref({\n pathname: joinedPathname,\n search,\n hash\n });\n}\n\n/**\n * Returns true if this component is a descendant of a ``.\n *\n * @see https://reactrouter.com/hooks/use-in-router-context\n */\nfunction useInRouterContext() {\n return React.useContext(LocationContext) != null;\n}\n\n/**\n * Returns the current location object, which represents the current URL in web\n * browsers.\n *\n * Note: If you're using this it may mean you're doing some of your own\n * \"routing\" in your app, and we'd like to know what your use case is. We may\n * be able to provide something higher-level to better suit your needs.\n *\n * @see https://reactrouter.com/hooks/use-location\n */\nfunction useLocation() {\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n \"useLocation() may be used only in the context of a component.\") : UNSAFE_invariant(false) : void 0;\n return React.useContext(LocationContext).location;\n}\n\n/**\n * Returns the current navigation action which describes how the router came to\n * the current location, either by a pop, push, or replace on the history stack.\n *\n * @see https://reactrouter.com/hooks/use-navigation-type\n */\nfunction useNavigationType() {\n return React.useContext(LocationContext).navigationType;\n}\n\n/**\n * Returns a PathMatch object if the given pattern matches the current URL.\n * This is useful for components that need to know \"active\" state, e.g.\n * ``.\n *\n * @see https://reactrouter.com/hooks/use-match\n */\nfunction useMatch(pattern) {\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n \"useMatch() may be used only in the context of a component.\") : UNSAFE_invariant(false) : void 0;\n let {\n pathname\n } = useLocation();\n return React.useMemo(() => matchPath(pattern, pathname), [pathname, pattern]);\n}\n\n/**\n * The interface for the navigate() function returned from useNavigate().\n */\n\nconst navigateEffectWarning = \"You should call navigate() in a React.useEffect(), not when \" + \"your component is first rendered.\";\n\n// Mute warnings for calls to useNavigate in SSR environments\nfunction useIsomorphicLayoutEffect(cb) {\n let isStatic = React.useContext(NavigationContext).static;\n if (!isStatic) {\n // We should be able to get rid of this once react 18.3 is released\n // See: https://github.com/facebook/react/pull/26395\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useLayoutEffect(cb);\n }\n}\n\n/**\n * Returns an imperative method for changing the location. Used by ``s, but\n * may also be used by other elements to change the location.\n *\n * @see https://reactrouter.com/hooks/use-navigate\n */\nfunction useNavigate() {\n let {\n isDataRoute\n } = React.useContext(RouteContext);\n // Conditional usage is OK here because the usage of a data router is static\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return isDataRoute ? useNavigateStable() : useNavigateUnstable();\n}\nfunction useNavigateUnstable() {\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n \"useNavigate() may be used only in the context of a component.\") : UNSAFE_invariant(false) : void 0;\n let dataRouterContext = React.useContext(DataRouterContext);\n let {\n basename,\n future,\n navigator\n } = React.useContext(NavigationContext);\n let {\n matches\n } = React.useContext(RouteContext);\n let {\n pathname: locationPathname\n } = useLocation();\n let routePathnamesJson = JSON.stringify(UNSAFE_getResolveToMatches(matches, future.v7_relativeSplatPath));\n let activeRef = React.useRef(false);\n useIsomorphicLayoutEffect(() => {\n activeRef.current = true;\n });\n let navigate = React.useCallback(function (to, options) {\n if (options === void 0) {\n options = {};\n }\n process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(activeRef.current, navigateEffectWarning) : void 0;\n\n // Short circuit here since if this happens on first render the navigate\n // is useless because we haven't wired up our history listener yet\n if (!activeRef.current) return;\n if (typeof to === \"number\") {\n navigator.go(to);\n return;\n }\n let path = resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === \"path\");\n\n // If we're operating within a basename, prepend it to the pathname prior\n // to handing off to history (but only if we're not in a data router,\n // otherwise it'll prepend the basename inside of the router).\n // If this is a root navigation, then we navigate to the raw basename\n // which allows the basename to have full control over the presence of a\n // trailing slash on root links\n if (dataRouterContext == null && basename !== \"/\") {\n path.pathname = path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n }\n (!!options.replace ? navigator.replace : navigator.push)(path, options.state, options);\n }, [basename, navigator, routePathnamesJson, locationPathname, dataRouterContext]);\n return navigate;\n}\nconst OutletContext = /*#__PURE__*/React.createContext(null);\n\n/**\n * Returns the context (if provided) for the child route at this level of the route\n * hierarchy.\n * @see https://reactrouter.com/hooks/use-outlet-context\n */\nfunction useOutletContext() {\n return React.useContext(OutletContext);\n}\n\n/**\n * Returns the element for the child route at this level of the route\n * hierarchy. Used internally by `` to render child routes.\n *\n * @see https://reactrouter.com/hooks/use-outlet\n */\nfunction useOutlet(context) {\n let outlet = React.useContext(RouteContext).outlet;\n if (outlet) {\n return /*#__PURE__*/React.createElement(OutletContext.Provider, {\n value: context\n }, outlet);\n }\n return outlet;\n}\n\n/**\n * Returns an object of key/value pairs of the dynamic params from the current\n * URL that were matched by the route path.\n *\n * @see https://reactrouter.com/hooks/use-params\n */\nfunction useParams() {\n let {\n matches\n } = React.useContext(RouteContext);\n let routeMatch = matches[matches.length - 1];\n return routeMatch ? routeMatch.params : {};\n}\n\n/**\n * Resolves the pathname of the given `to` value against the current location.\n *\n * @see https://reactrouter.com/hooks/use-resolved-path\n */\nfunction useResolvedPath(to, _temp2) {\n let {\n relative\n } = _temp2 === void 0 ? {} : _temp2;\n let {\n future\n } = React.useContext(NavigationContext);\n let {\n matches\n } = React.useContext(RouteContext);\n let {\n pathname: locationPathname\n } = useLocation();\n let routePathnamesJson = JSON.stringify(UNSAFE_getResolveToMatches(matches, future.v7_relativeSplatPath));\n return React.useMemo(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, relative === \"path\"), [to, routePathnamesJson, locationPathname, relative]);\n}\n\n/**\n * Returns the element of the route that matched the current location, prepared\n * with the correct context to render the remainder of the route tree. Route\n * elements in the tree must render an `` to render their child route's\n * element.\n *\n * @see https://reactrouter.com/hooks/use-routes\n */\nfunction useRoutes(routes, locationArg) {\n return useRoutesImpl(routes, locationArg);\n}\n\n// Internal implementation with accept optional param for RouterProvider usage\nfunction useRoutesImpl(routes, locationArg, dataRouterState, future) {\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n \"useRoutes() may be used only in the context of a component.\") : UNSAFE_invariant(false) : void 0;\n let {\n navigator\n } = React.useContext(NavigationContext);\n let {\n matches: parentMatches\n } = React.useContext(RouteContext);\n let routeMatch = parentMatches[parentMatches.length - 1];\n let parentParams = routeMatch ? routeMatch.params : {};\n let parentPathname = routeMatch ? routeMatch.pathname : \"/\";\n let parentPathnameBase = routeMatch ? routeMatch.pathnameBase : \"/\";\n let parentRoute = routeMatch && routeMatch.route;\n if (process.env.NODE_ENV !== \"production\") {\n // You won't get a warning about 2 different under a \n // without a trailing *, but this is a best-effort warning anyway since we\n // cannot even give the warning unless they land at the parent route.\n //\n // Example:\n //\n // \n // {/* This route path MUST end with /* because otherwise\n // it will never match /blog/post/123 */}\n // } />\n // } />\n // \n //\n // function Blog() {\n // return (\n // \n // } />\n // \n // );\n // }\n let parentPath = parentRoute && parentRoute.path || \"\";\n warningOnce(parentPathname, !parentRoute || parentPath.endsWith(\"*\"), \"You rendered descendant (or called `useRoutes()`) at \" + (\"\\\"\" + parentPathname + \"\\\" (under ) but the \") + \"parent route path has no trailing \\\"*\\\". This means if you navigate \" + \"deeper, the parent won't match anymore and therefore the child \" + \"routes will never render.\\n\\n\" + (\"Please change the parent to .\"));\n }\n let locationFromContext = useLocation();\n let location;\n if (locationArg) {\n var _parsedLocationArg$pa;\n let parsedLocationArg = typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n !(parentPathnameBase === \"/\" || ((_parsedLocationArg$pa = parsedLocationArg.pathname) == null ? void 0 : _parsedLocationArg$pa.startsWith(parentPathnameBase))) ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, \"When overriding the location using `` or `useRoutes(routes, location)`, \" + \"the location pathname must begin with the portion of the URL pathname that was \" + (\"matched by all parent routes. The current pathname base is \\\"\" + parentPathnameBase + \"\\\" \") + (\"but pathname \\\"\" + parsedLocationArg.pathname + \"\\\" was given in the `location` prop.\")) : UNSAFE_invariant(false) : void 0;\n location = parsedLocationArg;\n } else {\n location = locationFromContext;\n }\n let pathname = location.pathname || \"/\";\n let remainingPathname = parentPathnameBase === \"/\" ? pathname : pathname.slice(parentPathnameBase.length) || \"/\";\n let matches = matchRoutes(routes, {\n pathname: remainingPathname\n });\n if (process.env.NODE_ENV !== \"production\") {\n process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(parentRoute || matches != null, \"No routes matched location \\\"\" + location.pathname + location.search + location.hash + \"\\\" \") : void 0;\n process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(matches == null || matches[matches.length - 1].route.element !== undefined || matches[matches.length - 1].route.Component !== undefined || matches[matches.length - 1].route.lazy !== undefined, \"Matched leaf route at location \\\"\" + location.pathname + location.search + location.hash + \"\\\" \" + \"does not have an element or Component. This means it will render an with a \" + \"null value by default resulting in an \\\"empty\\\" page.\") : void 0;\n }\n let renderedMatches = _renderMatches(matches && matches.map(match => Object.assign({}, match, {\n params: Object.assign({}, parentParams, match.params),\n pathname: joinPaths([parentPathnameBase,\n // Re-encode pathnames that were decoded inside matchRoutes\n navigator.encodeLocation ? navigator.encodeLocation(match.pathname).pathname : match.pathname]),\n pathnameBase: match.pathnameBase === \"/\" ? parentPathnameBase : joinPaths([parentPathnameBase,\n // Re-encode pathnames that were decoded inside matchRoutes\n navigator.encodeLocation ? navigator.encodeLocation(match.pathnameBase).pathname : match.pathnameBase])\n })), parentMatches, dataRouterState, future);\n\n // When a user passes in a `locationArg`, the associated routes need to\n // be wrapped in a new `LocationContext.Provider` in order for `useLocation`\n // to use the scoped location instead of the global location.\n if (locationArg && renderedMatches) {\n return /*#__PURE__*/React.createElement(LocationContext.Provider, {\n value: {\n location: _extends({\n pathname: \"/\",\n search: \"\",\n hash: \"\",\n state: null,\n key: \"default\"\n }, location),\n navigationType: Action.Pop\n }\n }, renderedMatches);\n }\n return renderedMatches;\n}\nfunction DefaultErrorComponent() {\n let error = useRouteError();\n let message = isRouteErrorResponse(error) ? error.status + \" \" + error.statusText : error instanceof Error ? error.message : JSON.stringify(error);\n let stack = error instanceof Error ? error.stack : null;\n let lightgrey = \"rgba(200,200,200, 0.5)\";\n let preStyles = {\n padding: \"0.5rem\",\n backgroundColor: lightgrey\n };\n let codeStyles = {\n padding: \"2px 4px\",\n backgroundColor: lightgrey\n };\n let devInfo = null;\n if (process.env.NODE_ENV !== \"production\") {\n console.error(\"Error handled by React Router default ErrorBoundary:\", error);\n devInfo = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"p\", null, \"\\uD83D\\uDCBF Hey developer \\uD83D\\uDC4B\"), /*#__PURE__*/React.createElement(\"p\", null, \"You can provide a way better UX than this when your app throws errors by providing your own \", /*#__PURE__*/React.createElement(\"code\", {\n style: codeStyles\n }, \"ErrorBoundary\"), \" or\", \" \", /*#__PURE__*/React.createElement(\"code\", {\n style: codeStyles\n }, \"errorElement\"), \" prop on your route.\"));\n }\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"h2\", null, \"Unexpected Application Error!\"), /*#__PURE__*/React.createElement(\"h3\", {\n style: {\n fontStyle: \"italic\"\n }\n }, message), stack ? /*#__PURE__*/React.createElement(\"pre\", {\n style: preStyles\n }, stack) : null, devInfo);\n}\nconst defaultErrorElement = /*#__PURE__*/React.createElement(DefaultErrorComponent, null);\nclass RenderErrorBoundary extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n location: props.location,\n revalidation: props.revalidation,\n error: props.error\n };\n }\n static getDerivedStateFromError(error) {\n return {\n error: error\n };\n }\n static getDerivedStateFromProps(props, state) {\n // When we get into an error state, the user will likely click \"back\" to the\n // previous page that didn't have an error. Because this wraps the entire\n // application, that will have no effect--the error page continues to display.\n // This gives us a mechanism to recover from the error when the location changes.\n //\n // Whether we're in an error state or not, we update the location in state\n // so that when we are in an error state, it gets reset when a new location\n // comes in and the user recovers from the error.\n if (state.location !== props.location || state.revalidation !== \"idle\" && props.revalidation === \"idle\") {\n return {\n error: props.error,\n location: props.location,\n revalidation: props.revalidation\n };\n }\n\n // If we're not changing locations, preserve the location but still surface\n // any new errors that may come through. We retain the existing error, we do\n // this because the error provided from the app state may be cleared without\n // the location changing.\n return {\n error: props.error !== undefined ? props.error : state.error,\n location: state.location,\n revalidation: props.revalidation || state.revalidation\n };\n }\n componentDidCatch(error, errorInfo) {\n console.error(\"React Router caught the following error during render\", error, errorInfo);\n }\n render() {\n return this.state.error !== undefined ? /*#__PURE__*/React.createElement(RouteContext.Provider, {\n value: this.props.routeContext\n }, /*#__PURE__*/React.createElement(RouteErrorContext.Provider, {\n value: this.state.error,\n children: this.props.component\n })) : this.props.children;\n }\n}\nfunction RenderedRoute(_ref) {\n let {\n routeContext,\n match,\n children\n } = _ref;\n let dataRouterContext = React.useContext(DataRouterContext);\n\n // Track how deep we got in our render pass to emulate SSR componentDidCatch\n // in a DataStaticRouter\n if (dataRouterContext && dataRouterContext.static && dataRouterContext.staticContext && (match.route.errorElement || match.route.ErrorBoundary)) {\n dataRouterContext.staticContext._deepestRenderedBoundaryId = match.route.id;\n }\n return /*#__PURE__*/React.createElement(RouteContext.Provider, {\n value: routeContext\n }, children);\n}\nfunction _renderMatches(matches, parentMatches, dataRouterState, future) {\n var _dataRouterState2;\n if (parentMatches === void 0) {\n parentMatches = [];\n }\n if (dataRouterState === void 0) {\n dataRouterState = null;\n }\n if (future === void 0) {\n future = null;\n }\n if (matches == null) {\n var _dataRouterState;\n if ((_dataRouterState = dataRouterState) != null && _dataRouterState.errors) {\n // Don't bail if we have data router errors so we can render them in the\n // boundary. Use the pre-matched (or shimmed) matches\n matches = dataRouterState.matches;\n } else {\n return null;\n }\n }\n let renderedMatches = matches;\n\n // If we have data errors, trim matches to the highest error boundary\n let errors = (_dataRouterState2 = dataRouterState) == null ? void 0 : _dataRouterState2.errors;\n if (errors != null) {\n let errorIndex = renderedMatches.findIndex(m => m.route.id && (errors == null ? void 0 : errors[m.route.id]));\n !(errorIndex >= 0) ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, \"Could not find a matching route for errors on route IDs: \" + Object.keys(errors).join(\",\")) : UNSAFE_invariant(false) : void 0;\n renderedMatches = renderedMatches.slice(0, Math.min(renderedMatches.length, errorIndex + 1));\n }\n\n // If we're in a partial hydration mode, detect if we need to render down to\n // a given HydrateFallback while we load the rest of the hydration data\n let renderFallback = false;\n let fallbackIndex = -1;\n if (dataRouterState && future && future.v7_partialHydration) {\n for (let i = 0; i < renderedMatches.length; i++) {\n let match = renderedMatches[i];\n // Track the deepest fallback up until the first route without data\n if (match.route.HydrateFallback || match.route.hydrateFallbackElement) {\n fallbackIndex = i;\n }\n if (match.route.id) {\n let {\n loaderData,\n errors\n } = dataRouterState;\n let needsToRunLoader = match.route.loader && loaderData[match.route.id] === undefined && (!errors || errors[match.route.id] === undefined);\n if (match.route.lazy || needsToRunLoader) {\n // We found the first route that's not ready to render (waiting on\n // lazy, or has a loader that hasn't run yet). Flag that we need to\n // render a fallback and render up until the appropriate fallback\n renderFallback = true;\n if (fallbackIndex >= 0) {\n renderedMatches = renderedMatches.slice(0, fallbackIndex + 1);\n } else {\n renderedMatches = [renderedMatches[0]];\n }\n break;\n }\n }\n }\n }\n return renderedMatches.reduceRight((outlet, match, index) => {\n // Only data routers handle errors/fallbacks\n let error;\n let shouldRenderHydrateFallback = false;\n let errorElement = null;\n let hydrateFallbackElement = null;\n if (dataRouterState) {\n error = errors && match.route.id ? errors[match.route.id] : undefined;\n errorElement = match.route.errorElement || defaultErrorElement;\n if (renderFallback) {\n if (fallbackIndex < 0 && index === 0) {\n warningOnce(\"route-fallback\", false, \"No `HydrateFallback` element provided to render during initial hydration\");\n shouldRenderHydrateFallback = true;\n hydrateFallbackElement = null;\n } else if (fallbackIndex === index) {\n shouldRenderHydrateFallback = true;\n hydrateFallbackElement = match.route.hydrateFallbackElement || null;\n }\n }\n }\n let matches = parentMatches.concat(renderedMatches.slice(0, index + 1));\n let getChildren = () => {\n let children;\n if (error) {\n children = errorElement;\n } else if (shouldRenderHydrateFallback) {\n children = hydrateFallbackElement;\n } else if (match.route.Component) {\n // Note: This is a de-optimized path since React won't re-use the\n // ReactElement since it's identity changes with each new\n // React.createElement call. We keep this so folks can use\n // `` in `` but generally `Component`\n // usage is only advised in `RouterProvider` when we can convert it to\n // `element` ahead of time.\n children = /*#__PURE__*/React.createElement(match.route.Component, null);\n } else if (match.route.element) {\n children = match.route.element;\n } else {\n children = outlet;\n }\n return /*#__PURE__*/React.createElement(RenderedRoute, {\n match: match,\n routeContext: {\n outlet,\n matches,\n isDataRoute: dataRouterState != null\n },\n children: children\n });\n };\n // Only wrap in an error boundary within data router usages when we have an\n // ErrorBoundary/errorElement on this route. Otherwise let it bubble up to\n // an ancestor ErrorBoundary/errorElement\n return dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? /*#__PURE__*/React.createElement(RenderErrorBoundary, {\n location: dataRouterState.location,\n revalidation: dataRouterState.revalidation,\n component: errorElement,\n error: error,\n children: getChildren(),\n routeContext: {\n outlet: null,\n matches,\n isDataRoute: true\n }\n }) : getChildren();\n }, null);\n}\nvar DataRouterHook = /*#__PURE__*/function (DataRouterHook) {\n DataRouterHook[\"UseBlocker\"] = \"useBlocker\";\n DataRouterHook[\"UseRevalidator\"] = \"useRevalidator\";\n DataRouterHook[\"UseNavigateStable\"] = \"useNavigate\";\n return DataRouterHook;\n}(DataRouterHook || {});\nvar DataRouterStateHook = /*#__PURE__*/function (DataRouterStateHook) {\n DataRouterStateHook[\"UseBlocker\"] = \"useBlocker\";\n DataRouterStateHook[\"UseLoaderData\"] = \"useLoaderData\";\n DataRouterStateHook[\"UseActionData\"] = \"useActionData\";\n DataRouterStateHook[\"UseRouteError\"] = \"useRouteError\";\n DataRouterStateHook[\"UseNavigation\"] = \"useNavigation\";\n DataRouterStateHook[\"UseRouteLoaderData\"] = \"useRouteLoaderData\";\n DataRouterStateHook[\"UseMatches\"] = \"useMatches\";\n DataRouterStateHook[\"UseRevalidator\"] = \"useRevalidator\";\n DataRouterStateHook[\"UseNavigateStable\"] = \"useNavigate\";\n DataRouterStateHook[\"UseRouteId\"] = \"useRouteId\";\n return DataRouterStateHook;\n}(DataRouterStateHook || {});\nfunction getDataRouterConsoleError(hookName) {\n return hookName + \" must be used within a data router. See https://reactrouter.com/routers/picking-a-router.\";\n}\nfunction useDataRouterContext(hookName) {\n let ctx = React.useContext(DataRouterContext);\n !ctx ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, getDataRouterConsoleError(hookName)) : UNSAFE_invariant(false) : void 0;\n return ctx;\n}\nfunction useDataRouterState(hookName) {\n let state = React.useContext(DataRouterStateContext);\n !state ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, getDataRouterConsoleError(hookName)) : UNSAFE_invariant(false) : void 0;\n return state;\n}\nfunction useRouteContext(hookName) {\n let route = React.useContext(RouteContext);\n !route ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, getDataRouterConsoleError(hookName)) : UNSAFE_invariant(false) : void 0;\n return route;\n}\n\n// Internal version with hookName-aware debugging\nfunction useCurrentRouteId(hookName) {\n let route = useRouteContext(hookName);\n let thisRoute = route.matches[route.matches.length - 1];\n !thisRoute.route.id ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, hookName + \" can only be used on routes that contain a unique \\\"id\\\"\") : UNSAFE_invariant(false) : void 0;\n return thisRoute.route.id;\n}\n\n/**\n * Returns the ID for the nearest contextual route\n */\nfunction useRouteId() {\n return useCurrentRouteId(DataRouterStateHook.UseRouteId);\n}\n\n/**\n * Returns the current navigation, defaulting to an \"idle\" navigation when\n * no navigation is in progress\n */\nfunction useNavigation() {\n let state = useDataRouterState(DataRouterStateHook.UseNavigation);\n return state.navigation;\n}\n\n/**\n * Returns a revalidate function for manually triggering revalidation, as well\n * as the current state of any manual revalidations\n */\nfunction useRevalidator() {\n let dataRouterContext = useDataRouterContext(DataRouterHook.UseRevalidator);\n let state = useDataRouterState(DataRouterStateHook.UseRevalidator);\n return React.useMemo(() => ({\n revalidate: dataRouterContext.router.revalidate,\n state: state.revalidation\n }), [dataRouterContext.router.revalidate, state.revalidation]);\n}\n\n/**\n * Returns the active route matches, useful for accessing loaderData for\n * parent/child routes or the route \"handle\" property\n */\nfunction useMatches() {\n let {\n matches,\n loaderData\n } = useDataRouterState(DataRouterStateHook.UseMatches);\n return React.useMemo(() => matches.map(m => UNSAFE_convertRouteMatchToUiMatch(m, loaderData)), [matches, loaderData]);\n}\n\n/**\n * Returns the loader data for the nearest ancestor Route loader\n */\nfunction useLoaderData() {\n let state = useDataRouterState(DataRouterStateHook.UseLoaderData);\n let routeId = useCurrentRouteId(DataRouterStateHook.UseLoaderData);\n if (state.errors && state.errors[routeId] != null) {\n console.error(\"You cannot `useLoaderData` in an errorElement (routeId: \" + routeId + \")\");\n return undefined;\n }\n return state.loaderData[routeId];\n}\n\n/**\n * Returns the loaderData for the given routeId\n */\nfunction useRouteLoaderData(routeId) {\n let state = useDataRouterState(DataRouterStateHook.UseRouteLoaderData);\n return state.loaderData[routeId];\n}\n\n/**\n * Returns the action data for the nearest ancestor Route action\n */\nfunction useActionData() {\n let state = useDataRouterState(DataRouterStateHook.UseActionData);\n let routeId = useCurrentRouteId(DataRouterStateHook.UseLoaderData);\n return state.actionData ? state.actionData[routeId] : undefined;\n}\n\n/**\n * Returns the nearest ancestor Route error, which could be a loader/action\n * error or a render error. This is intended to be called from your\n * ErrorBoundary/errorElement to display a proper error message.\n */\nfunction useRouteError() {\n var _state$errors;\n let error = React.useContext(RouteErrorContext);\n let state = useDataRouterState(DataRouterStateHook.UseRouteError);\n let routeId = useCurrentRouteId(DataRouterStateHook.UseRouteError);\n\n // If this was a render error, we put it in a RouteError context inside\n // of RenderErrorBoundary\n if (error !== undefined) {\n return error;\n }\n\n // Otherwise look for errors from our data router state\n return (_state$errors = state.errors) == null ? void 0 : _state$errors[routeId];\n}\n\n/**\n * Returns the happy-path data from the nearest ancestor `` value\n */\nfunction useAsyncValue() {\n let value = React.useContext(AwaitContext);\n return value == null ? void 0 : value._data;\n}\n\n/**\n * Returns the error from the nearest ancestor `` value\n */\nfunction useAsyncError() {\n let value = React.useContext(AwaitContext);\n return value == null ? void 0 : value._error;\n}\nlet blockerId = 0;\n\n/**\n * Allow the application to block navigations within the SPA and present the\n * user a confirmation dialog to confirm the navigation. Mostly used to avoid\n * using half-filled form data. This does not handle hard-reloads or\n * cross-origin navigations.\n */\nfunction useBlocker(shouldBlock) {\n let {\n router,\n basename\n } = useDataRouterContext(DataRouterHook.UseBlocker);\n let state = useDataRouterState(DataRouterStateHook.UseBlocker);\n let [blockerKey, setBlockerKey] = React.useState(\"\");\n let blockerFunction = React.useCallback(arg => {\n if (typeof shouldBlock !== \"function\") {\n return !!shouldBlock;\n }\n if (basename === \"/\") {\n return shouldBlock(arg);\n }\n\n // If they provided us a function and we've got an active basename, strip\n // it from the locations we expose to the user to match the behavior of\n // useLocation\n let {\n currentLocation,\n nextLocation,\n historyAction\n } = arg;\n return shouldBlock({\n currentLocation: _extends({}, currentLocation, {\n pathname: stripBasename(currentLocation.pathname, basename) || currentLocation.pathname\n }),\n nextLocation: _extends({}, nextLocation, {\n pathname: stripBasename(nextLocation.pathname, basename) || nextLocation.pathname\n }),\n historyAction\n });\n }, [basename, shouldBlock]);\n\n // This effect is in charge of blocker key assignment and deletion (which is\n // tightly coupled to the key)\n React.useEffect(() => {\n let key = String(++blockerId);\n setBlockerKey(key);\n return () => router.deleteBlocker(key);\n }, [router]);\n\n // This effect handles assigning the blockerFunction. This is to handle\n // unstable blocker function identities, and happens only after the prior\n // effect so we don't get an orphaned blockerFunction in the router with a\n // key of \"\". Until then we just have the IDLE_BLOCKER.\n React.useEffect(() => {\n if (blockerKey !== \"\") {\n router.getBlocker(blockerKey, blockerFunction);\n }\n }, [router, blockerKey, blockerFunction]);\n\n // Prefer the blocker from `state` not `router.state` since DataRouterContext\n // is memoized so this ensures we update on blocker state updates\n return blockerKey && state.blockers.has(blockerKey) ? state.blockers.get(blockerKey) : IDLE_BLOCKER;\n}\n\n/**\n * Stable version of useNavigate that is used when we are in the context of\n * a RouterProvider.\n */\nfunction useNavigateStable() {\n let {\n router\n } = useDataRouterContext(DataRouterHook.UseNavigateStable);\n let id = useCurrentRouteId(DataRouterStateHook.UseNavigateStable);\n let activeRef = React.useRef(false);\n useIsomorphicLayoutEffect(() => {\n activeRef.current = true;\n });\n let navigate = React.useCallback(function (to, options) {\n if (options === void 0) {\n options = {};\n }\n process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(activeRef.current, navigateEffectWarning) : void 0;\n\n // Short circuit here since if this happens on first render the navigate\n // is useless because we haven't wired up our router subscriber yet\n if (!activeRef.current) return;\n if (typeof to === \"number\") {\n router.navigate(to);\n } else {\n router.navigate(to, _extends({\n fromRouteId: id\n }, options));\n }\n }, [router, id]);\n return navigate;\n}\nconst alreadyWarned = {};\nfunction warningOnce(key, cond, message) {\n if (!cond && !alreadyWarned[key]) {\n alreadyWarned[key] = true;\n process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(false, message) : void 0;\n }\n}\n\n/**\n Webpack + React 17 fails to compile on any of the following because webpack\n complains that `startTransition` doesn't exist in `React`:\n * import { startTransition } from \"react\"\n * import * as React from from \"react\";\n \"startTransition\" in React ? React.startTransition(() => setState()) : setState()\n * import * as React from from \"react\";\n \"startTransition\" in React ? React[\"startTransition\"](() => setState()) : setState()\n\n Moving it to a constant such as the following solves the Webpack/React 17 issue:\n * import * as React from from \"react\";\n const START_TRANSITION = \"startTransition\";\n START_TRANSITION in React ? React[START_TRANSITION](() => setState()) : setState()\n\n However, that introduces webpack/terser minification issues in production builds\n in React 18 where minification/obfuscation ends up removing the call of\n React.startTransition entirely from the first half of the ternary. Grabbing\n this exported reference once up front resolves that issue.\n\n See https://github.com/remix-run/react-router/issues/10579\n*/\nconst START_TRANSITION = \"startTransition\";\nconst startTransitionImpl = React[START_TRANSITION];\n\n/**\n * Given a Remix Router instance, render the appropriate UI\n */\nfunction RouterProvider(_ref) {\n let {\n fallbackElement,\n router,\n future\n } = _ref;\n let [state, setStateImpl] = React.useState(router.state);\n let {\n v7_startTransition\n } = future || {};\n let setState = React.useCallback(newState => {\n if (v7_startTransition && startTransitionImpl) {\n startTransitionImpl(() => setStateImpl(newState));\n } else {\n setStateImpl(newState);\n }\n }, [setStateImpl, v7_startTransition]);\n\n // Need to use a layout effect here so we are subscribed early enough to\n // pick up on any render-driven redirects/navigations (useEffect/)\n React.useLayoutEffect(() => router.subscribe(setState), [router, setState]);\n React.useEffect(() => {\n process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(fallbackElement == null || !router.future.v7_partialHydration, \"`` is deprecated when using \" + \"`v7_partialHydration`, use a `HydrateFallback` component instead\") : void 0;\n // Only log this once on initial mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n let navigator = React.useMemo(() => {\n return {\n createHref: router.createHref,\n encodeLocation: router.encodeLocation,\n go: n => router.navigate(n),\n push: (to, state, opts) => router.navigate(to, {\n state,\n preventScrollReset: opts == null ? void 0 : opts.preventScrollReset\n }),\n replace: (to, state, opts) => router.navigate(to, {\n replace: true,\n state,\n preventScrollReset: opts == null ? void 0 : opts.preventScrollReset\n })\n };\n }, [router]);\n let basename = router.basename || \"/\";\n let dataRouterContext = React.useMemo(() => ({\n router,\n navigator,\n static: false,\n basename\n }), [router, navigator, basename]);\n\n // The fragment and {null} here are important! We need them to keep React 18's\n // useId happy when we are server-rendering since we may have a - + +