appos 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +399 -0
- package/build/client/assets/IconMail-BZadZvAd.js +1 -0
- package/build/client/assets/_-CgPm6_fJ.js +1 -0
- package/build/client/assets/_index-BCLDp_mg.js +1 -0
- package/build/client/assets/_layout-CTmjtKOZ.js +1 -0
- package/build/client/assets/_layout-HsJ3Zu5t.js +1 -0
- package/build/client/assets/_layout-OcS85aOt.js +1 -0
- package/build/client/assets/app-sidebar-Bm6e4kn_.js +1 -0
- package/build/client/assets/app-sidebar-D2Nsi85j.js +1 -0
- package/build/client/assets/auth-provider-rkzBVtYX.js +1 -0
- package/build/client/assets/brand-CbTWw97e.js +1 -0
- package/build/client/assets/browser-ponyfill-D3yQFvRu.js +2 -0
- package/build/client/assets/button-DtZhoqpk.js +1 -0
- package/build/client/assets/check-D5D2EGI4.js +1 -0
- package/build/client/assets/checkbox-B35Nn166.js +1 -0
- package/build/client/assets/chunk-JG3XND5A-BetDbdG0.js +1 -0
- package/build/client/assets/chunk-UIGDSWPH-DeiamgQc.js +26 -0
- package/build/client/assets/chunk-vBKQ29Cd.js +1 -0
- package/build/client/assets/circle-alert-DB4JluX5.js +1 -0
- package/build/client/assets/compare-Br3z3FUS-BXkA2ojG.js +2 -0
- package/build/client/assets/compiler-runtime-Co9svCia.js +1 -0
- package/build/client/assets/config-ChcA_Pkv.js +1 -0
- package/build/client/assets/createReactComponent-C2TSpqC7.js +1 -0
- package/build/client/assets/dialog-CQrpvURm.js +1 -0
- package/build/client/assets/dist-B6TkSbxV.js +1 -0
- package/build/client/assets/dist-BNO39Rfs.js +1 -0
- package/build/client/assets/dist-BWnI-4xl.js +1 -0
- package/build/client/assets/dist-CA21wN5I.js +1 -0
- package/build/client/assets/dist-CBNvQRbZ.js +1 -0
- package/build/client/assets/dist-CYRPrwOb.js +1 -0
- package/build/client/assets/dist-DKtC0FSi.js +1 -0
- package/build/client/assets/dist-DhfcebhF.js +1 -0
- package/build/client/assets/dist-VqaKdvZu.js +1 -0
- package/build/client/assets/dist-Yn6lj8QC.js +5 -0
- package/build/client/assets/dropdown-menu-CbzduuDa.js +1 -0
- package/build/client/assets/empty-DQRarCKT.js +1 -0
- package/build/client/assets/entry.client-BN1GPjAL.js +10 -0
- package/build/client/assets/es2015-BJguufLZ.js +41 -0
- package/build/client/assets/eye-Ctrln70x.js +1 -0
- package/build/client/assets/file-preview-dialog-BRkWSRN4.js +14 -0
- package/build/client/assets/index-Del2yBnb.js +1 -0
- package/build/client/assets/initReactI18next-CyHiepAw.js +1 -0
- package/build/client/assets/input-V1lM1yoz.js +1 -0
- package/build/client/assets/jsx-runtime-SCjaiuzT.js +1 -0
- package/build/client/assets/lock-Bj7dxHab.js +1 -0
- package/build/client/assets/manifest-ca813980.js +1 -0
- package/build/client/assets/nav-user-BqPUBe9x.js +1 -0
- package/build/client/assets/nav-user-Yu7wt7b_.js +1 -0
- package/build/client/assets/org-switcher-BIuearbE.js +1 -0
- package/build/client/assets/password-input-bor7e4TM.js +1 -0
- package/build/client/assets/react-dom-Bhi-1tDD.js +1 -0
- package/build/client/assets/realtime-BmU1LPhx.js +1 -0
- package/build/client/assets/root-CS5YIV-V.js +3 -0
- package/build/client/assets/root-D0CFuQYc.css +2 -0
- package/build/client/assets/route-B9cwW-UK.js +1 -0
- package/build/client/assets/route-BD2nV1q2.js +1 -0
- package/build/client/assets/route-BEnDcljt.js +1 -0
- package/build/client/assets/route-BR4LdxHR.js +1 -0
- package/build/client/assets/route-BU5TYmVE.js +0 -0
- package/build/client/assets/route-BVmIPEvK.js +11 -0
- package/build/client/assets/route-BY244T48.js +1 -0
- package/build/client/assets/route-Bwd903CU.js +1 -0
- package/build/client/assets/route-CN9iChOk.js +1 -0
- package/build/client/assets/route-CQ3p9Qb1.js +1 -0
- package/build/client/assets/route-CVLnTONw.js +1 -0
- package/build/client/assets/route-CoMZag4T.js +1 -0
- package/build/client/assets/route-CsYSLbnx.js +1 -0
- package/build/client/assets/route-DWNrq2GE.js +1 -0
- package/build/client/assets/route-Dxfmap_u.js +1 -0
- package/build/client/assets/route-Gnx1fkRX.js +0 -0
- package/build/client/assets/route-NduA4SS_.js +1 -0
- package/build/client/assets/route-u2hskgE_.js +1 -0
- package/build/client/assets/route-v9Jwv-AW.js +1 -0
- package/build/client/assets/select-DATRE76_.js +1 -0
- package/build/client/assets/separator-Cla0V581.js +1 -0
- package/build/client/assets/shim-TRiHENXu.js +1 -0
- package/build/client/assets/sidebar-CqrdL512.js +1 -0
- package/build/client/assets/site-header-CZO3qBhf.js +1 -0
- package/build/client/assets/site-header-CwidwSv1.js +1 -0
- package/build/client/assets/social-providers-Bz7f1_yd.js +1 -0
- package/build/client/assets/test-WdoqKbLa.js +1 -0
- package/build/client/assets/tooltip-BeDraHQn.js +1 -0
- package/build/client/assets/trpc-C1CjVipH.js +6 -0
- package/build/client/assets/trust-indicator-D4tEs4Dr.js +20 -0
- package/build/client/assets/use-file-upload-CNPfWC6W.js +1 -0
- package/build/client/assets/useTranslation-Bz7VuQ7j.js +1 -0
- package/build/client/assets/utils-InBzhUf_.js +1 -0
- package/build/client/assets/x-4CC8aqOW.js +1 -0
- package/build/client/favicon.ico +0 -0
- package/build/client/locales/en/emails.json +11 -0
- package/build/client/locales/en/translation.json +411 -0
- package/build/client/locales/zh-CN/emails.json +11 -0
- package/build/client/locales/zh-CN/translation.json +1 -0
- package/build/client/locales/zh-TW/emails.json +11 -0
- package/build/client/locales/zh-TW/translation.json +1 -0
- package/build/client/logo-invert.png +0 -0
- package/build/client/logo.png +0 -0
- package/build/lib/adapter-factory-CLtf7vT5-CTKiMV2u.mjs +19675 -0
- package/build/lib/bun-sqlite-dialect-DN7EKoIB-0pWIoG0L.mjs +155 -0
- package/build/lib/chunk-BYI67GdN.mjs +1 -0
- package/build/lib/chunk-CkKlU7xI.mjs +44 -0
- package/build/lib/client-BtuhFgvy.mjs +65 -0
- package/build/lib/client.d.ts +2272 -0
- package/build/lib/client.js +24 -0
- package/build/lib/date.d.ts +1 -0
- package/build/lib/date.js +1 -0
- package/build/lib/dialect-BeMwdQoz-D41NdSow.mjs +72 -0
- package/build/lib/dist-cjs-B43A5HXv.mjs +169 -0
- package/build/lib/dist-cjs-B_wkbabY.mjs +214 -0
- package/build/lib/dist-cjs-BmbYbMhp.mjs +143 -0
- package/build/lib/dist-cjs-Cc337rwW.mjs +7 -0
- package/build/lib/dist-cjs-CgzfN8xY.mjs +4974 -0
- package/build/lib/dist-cjs-DBFcizQf.mjs +50 -0
- package/build/lib/dist-cjs-DC-UL-xx.mjs +97 -0
- package/build/lib/dist-cjs-DHlTgXUO.mjs +6975 -0
- package/build/lib/dist-cjs-DYAmJYzN.mjs +323 -0
- package/build/lib/dist-cjs-Ddm6Stp9.mjs +1294 -0
- package/build/lib/dist-cjs-GFGBhaZg.mjs +84 -0
- package/build/lib/dist-cjs-ieCOxrOi.mjs +181 -0
- package/build/lib/dist-cjs-nbOGa7i_.mjs +47 -0
- package/build/lib/dist-cjs-pN6ekzMW.mjs +66 -0
- package/build/lib/dist-cjs-yYlQ1OiO.mjs +102 -0
- package/build/lib/esm-DPet4lFW.mjs +15816 -0
- package/build/lib/event-streams-x9fP9BzF.mjs +185 -0
- package/build/lib/file-preview-dialog-Cugg8tEc.mjs +59 -0
- package/build/lib/kysely-adapter-BTWfu5rn.mjs +183 -0
- package/build/lib/magic-string.es-jZcifc5m.mjs +1013 -0
- package/build/lib/memory-adapter-DiU519m9.mjs +147 -0
- package/build/lib/node-ponyfill-Dmm1SWTU.mjs +38212 -0
- package/build/lib/node-sqlite-dialect-BqISUSC3-DYvTLBpY.mjs +155 -0
- package/build/lib/package-DfozRyK6.mjs +5 -0
- package/build/lib/react-dom-CPjM_WCt.mjs +42 -0
- package/build/lib/server.d.mts +76273 -0
- package/build/lib/server.mjs +325 -0
- package/build/lib/sso-oidc-Qom0PEDW.mjs +1036 -0
- package/build/lib/sts-CLRaHSW_.mjs +13 -0
- package/build/lib/sts-Dl7yZqX1.mjs +1405 -0
- package/build/lib/test.d.mts +8922 -0
- package/build/lib/test.mjs +175650 -0
- package/build/lib/ui/index.d.ts +1643 -0
- package/build/lib/ui/index.js +160 -0
- package/build/lib/utils.d.ts +21 -0
- package/build/lib/utils.js +1 -0
- package/build/lib/zod.d.ts +1 -0
- package/build/lib/zod.js +23 -0
- package/build/main.js +2383 -0
- package/build/server/assets/context-BoNg86Eh.js +35 -0
- package/build/server/assets/dialog-B8YbGNaz.js +54 -0
- package/build/server/assets/file-preview-dialog-qWSViOWQ.js +15 -0
- package/build/server/assets/react-CFQ4y0AA.js +13 -0
- package/build/server/assets/react-dom-Ca1YUVo2.js +5 -0
- package/build/server/assets/server-build-BMOfm0ad.js +118 -0
- package/build/server/assets/server.node-B2oksIp8.js +196 -0
- package/build/server/assets/server.node-VQzoub0A.js +1 -0
- package/build/server/index.js +123 -0
- package/package.json +224 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import{i as e}from"./chunk-vBKQ29Cd.js";import{n as t}from"./jsx-runtime-SCjaiuzT.js";var n=`modulepreload`,r=function(e){return`/`+e},i={};const a=function(e,t,a){let o=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),s=document.querySelector(`meta[property=csp-nonce]`),c=s?.nonce||s?.getAttribute(`nonce`);function l(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}o=l(t.map(t=>{if(t=r(t,a),t in i)return;i[t]=!0;let o=t.endsWith(`.css`),s=o?`[rel="stylesheet"]`:``;if(a)for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.href===t&&(!o||r.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${s}`))return;let l=document.createElement(`link`);if(l.rel=o?`stylesheet`:n,o||(l.as=`script`),l.crossOrigin=``,l.href=t,c&&l.setAttribute(`nonce`,c),document.head.appendChild(l),o)return new Promise((e,n)=>{l.addEventListener(`load`,e),l.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function s(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return o.then(t=>{for(let e of t||[])e.status===`rejected`&&s(e.reason);return e().catch(s)})};var o=e(t(),1),s=e=>{throw TypeError(e)},c=(e,t,n)=>t.has(e)||s(`Cannot `+n),l=(e,t,n)=>(c(e,t,`read from private field`),n?n.call(e):t.get(e)),u=(e,t,n)=>t.has(e)?s(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),d=`popstate`;function f(e={}){function t(e,t){let{pathname:n,search:r,hash:i}=e.location;return _(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){return typeof t==`string`?t:v(t)}return b(t,n,null,e)}function p(e,t){if(e===!1||e==null)throw Error(t)}function m(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function h(){return Math.random().toString(36).substring(2,10)}function g(e,t){return{usr:e.state,key:e.key,idx:t}}function _(e,t,n=null,r){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?y(t):t,state:n,key:t&&t.key||r||h()}}function v({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function y(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function b(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function f(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:v.location,delta:t})}function p(e,t){s=`PUSH`;let r=_(v.location,e,t);n&&n(r,e),l=u()+1;let d=g(r,l),f=v.createHref(r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:v.location,delta:1})}function m(e,t){s=`REPLACE`;let r=_(v.location,e,t);n&&n(r,e),l=u();let i=g(r,l),d=v.createHref(r);o.replaceState(i,``,d),a&&c&&c({action:s,location:v.location,delta:0})}function h(e){return x(e)}let v={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(d,f),c=e,()=>{i.removeEventListener(d,f),c=null}},createHref(e){return t(i,e)},createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:p,replace:m,go(e){return o.go(e)}};return v}function x(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),p(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:v(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function S(e){return{defaultValue:e}}var C,w=class{constructor(e){if(u(this,C,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(l(this,C).has(e))return l(this,C).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){l(this,C).set(e,t)}};C=new WeakMap;var T=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function E(e){return T.has(e)}var D=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function O(e){return D.has(e)}function k(e){return e.index===!0}function ee(e,t,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(p(e.index!==!0||!e.children,`Cannot specify children on an index route`),p(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),k(e)){let n={...e,id:s};return r[s]=A(n,t(n)),n}else{let n={...e,id:s,children:void 0};return r[s]=A(n,t(n)),e.children&&(n.children=ee(e.children,t,o,r,i)),n}})}function A(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function j(e,t,n=`/`){return te(e,t,n,!1)}function te(e,t,n,r){let i=z((typeof t==`string`?y(t):t).pathname||`/`,n);if(i==null)return null;let a=M(e);P(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=de(i);o=le(a[e],t,r)}return o}function ne(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function M(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;p(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=V([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(p(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),M(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:ce(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of N(e.path))a(e,t,!0,n)}),t}function N(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=N(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function P(e){e.sort((e,t)=>e.score===t.score?L(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var re=/^:[\w-]+$/,F=3,ie=2,ae=1,I=10,oe=-2,se=e=>e===`*`;function ce(e,t){let n=e.split(`/`),r=n.length;return n.some(se)&&(r+=oe),t&&(r+=ie),n.filter(e=>!se(e)).reduce((e,t)=>e+(re.test(t)?F:t===``?ae:I),r)}function L(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function le(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=ue({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=ue({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:V([a,u.pathname]),pathnameBase:ve(V([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=V([a,u.pathnameBase]))}return o}function ue(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=R(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function R(e,t=!1,n=!0){m(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:n!=null}),n?`/?([^\\/]+)?`:`/([^\\/]+)`)).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function de(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return m(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function z(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function fe({basename:e,pathname:t}){return t===`/`?e:V([e,t])}function pe(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?y(e):e;return{pathname:n?n.startsWith(`/`)?n:me(n,t):t,search:ye(r),hash:be(i)}}function me(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function he(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ge(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function B(e){let t=ge(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function _e(e,t,n,r=!1){let i;typeof e==`string`?i=y(e):(i={...e},p(!i.pathname||!i.pathname.includes(`?`),he(`?`,`pathname`,`search`,i)),p(!i.pathname||!i.pathname.includes(`#`),he(`#`,`pathname`,`hash`,i)),p(!i.search||!i.search.includes(`#`),he(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=pe(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var V=e=>e.join(`/`).replace(/\/\/+/g,`/`),ve=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),ye=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,be=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,xe=class{constructor(e,t){this.type=`DataWithResponseInit`,this.data=e,this.init=t||null}};function Se(e,t){return new xe(e,typeof t==`number`?{status:t}:t)}var Ce=(e,t=302)=>{let n=t;typeof n==`number`?n={status:n}:n.status===void 0&&(n.status=302);let r=new Headers(n.headers);return r.set(`Location`,e),new Response(null,{...n,headers:r})},H=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function we(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Te(e){return e.filter(Boolean).join(`/`).replace(/\/\/*/g,`/`)||`/`}var Ee=Symbol(`Uninstrumented`);function De(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=U(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=U(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[Ee]??i,a=U(n[e],t,(...e)=>Ae(e[0]));a&&(a[Ee]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[Ee]??e,r=U(n.middleware,t,(...e)=>Ae(e[0]));return r?(r[Ee]=t,r):e})),r}function Oe(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[Ee]??e.navigate,r=U(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?v(n):`.`,...je(e,r??{})}});r&&(r[Ee]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[Ee]??e.fetch,r=U(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...je(e,i??{})}});r&&(r[Ee]=t,e.fetch=r)}return e}function U(e,t,n){return e.length===0?null:async(...r)=>{let i=await ke(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function ke(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=ke(e,t,n,r-1),a=await o,p(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(s,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await s(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function Ae(e){let{request:t,context:n,params:r,unstable_pattern:i}=e;return{request:W(t),params:{...r},unstable_pattern:i,context:G(n)}}function je(e,t){return{currentUrl:v(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function W(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function G(e){if(Ne(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var Me=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function Ne(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===Me}var Pe=[`POST`,`PUT`,`PATCH`,`DELETE`],Fe=new Set(Pe),K=[`GET`,...Pe],Ie=new Set(K),Le=new Set([301,302,303,307,308]),Re=new Set([307,308]),ze={state:`idle`,location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Be={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ve={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},He=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ue=e=>He.test(e),We=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Ge=`remix-router-transitions`,Ke=Symbol(`ResetLoaderData`);function qe(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;p(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||We,a=i;if(e.unstable_instrumentations){let t=e.unstable_instrumentations;a=e=>({...i(e),...De(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=ee(e.routes,a,void 0,o),c,l=e.basename||`/`;l.startsWith(`/`)||(l=`/${l}`);let u=e.dataStrategy||ut,d={...e.future},f=null,h=new Set,g=null,v=null,y=null,b=e.hydrationData!=null,S=j(s,e.history.location,l),C=!1,T=null,E;if(S==null&&!e.patchRoutesOnNavigation){let t=q(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=jt(s);E=!0,S=n,T={[r.id]:t}}else if(S&&!e.hydrationData&&ot(S,s,e.history.location.pathname).active&&(S=null),S)if(S.some(e=>e.route.lazy))E=!1;else if(!S.some(e=>Qe(e.route)))E=!0;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=S.findIndex(e=>n[e.route.id]!==void 0);E=S.slice(0,e+1).every(e=>!$e(e.route,t,n))}else E=S.every(e=>!$e(e.route,t,n))}else{E=!1,S=[];let t=ot(null,s,e.history.location.pathname);t.active&&t.matches&&(C=!0,S=t.matches)}let D,O={historyAction:e.history.action,location:e.history.location,matches:S,initialized:E,navigation:ze,restoreScrollPosition:e.hydrationData==null?null:!1,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||T,fetchers:new Map,blockers:new Map},k=`POP`,A=!1,M,N=!1,P=new Map,re=null,F=!1,ie=!1,ae=new Set,I=new Map,oe=0,se=-1,ce=new Map,L=new Set,le=new Map,ue=new Map,R=new Set,de=new Map,fe,pe=null;function me(){if(f=e.history.listen(({action:t,location:n,delta:r})=>{if(fe){fe(),fe=void 0;return}m(de.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=Je({currentLocation:O.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{fe=e});e.history.go(r*-1),qe(i,{state:`blocked`,location:n,proceed(){qe(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(O.blockers);e.set(i,Ve),B({blockers:e})}});return}return ye(t,n)}),n){Xt(t,P);let e=()=>Zt(t,P);t.addEventListener(`pagehide`,e),re=()=>t.removeEventListener(`pagehide`,e)}return O.initialized||ye(`POP`,O.location,{initialHydration:!0}),D}function he(){f&&f(),re&&re(),h.clear(),M&&M.abort(),O.fetchers.forEach((e,t)=>Pe(t)),O.blockers.forEach((e,t)=>Ke(t))}function ge(e){return h.add(e),()=>h.delete(e)}function B(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),O={...O,...e};let n=[],r=[];O.fetchers.forEach((e,t)=>{e.state===`idle`&&(R.has(t)?n.push(t):r.push(t))}),R.forEach(e=>{!O.fetchers.has(e)&&!I.has(e)&&n.push(e)}),[...h].forEach(e=>e(O,{deletedFetchers:n,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Pe(e)),r.forEach(e=>O.fetchers.delete(e))}function _e(t,n,{flushSync:r}={}){let i=O.actionData!=null&&O.navigation.formMethod!=null&&Y(O.navigation.formMethod)&&O.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?O.actionData:null;let o=n.loaderData?Ot(O.loaderData,n.loaderData,n.matches||[],n.errors):O.loaderData,l=O.blockers;l.size>0&&(l=new Map(l),l.forEach((e,t)=>l.set(t,Ve)));let u=F?!1:at(t,n.matches||O.matches),d=A===!0||O.navigation.formMethod!=null&&Y(O.navigation.formMethod)&&t.state?._isRedirect!==!0;c&&=(s=c,void 0),F||k===`POP`||(k===`PUSH`?e.history.push(t,t.state):k===`REPLACE`&&e.history.replace(t,t.state));let f;if(k===`POP`){let e=P.get(O.location.pathname);e&&e.has(t.pathname)?f={currentLocation:O.location,nextLocation:t}:P.has(t.pathname)&&(f={currentLocation:t,nextLocation:O.location})}else if(N){let e=P.get(O.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),P.set(O.location.pathname,e)),f={currentLocation:O.location,nextLocation:t}}B({...n,actionData:a,loaderData:o,historyAction:k,location:t,initialized:!0,navigation:ze,revalidation:`idle`,restoreScrollPosition:u,preventScrollReset:d,blockers:l},{viewTransitionOpts:f,flushSync:r===!0}),k=`POP`,A=!1,N=!1,F=!1,ie=!1,pe?.resolve(),pe=null}async function V(t,n){if(typeof t==`number`){e.history.go(t);return}let{path:r,submission:i,error:a}=Xe(!1,Ye(O.location,O.matches,l,t,n?.fromRouteId,n?.relative),n),o=O.location,s=_(O.location,r,n&&n.state);s={...s,...e.history.encodeLocation(s)};let c=n&&n.replace!=null?n.replace:void 0,u=`PUSH`;c===!0?u=`REPLACE`:c===!1||i!=null&&Y(i.formMethod)&&i.formAction===O.location.pathname+O.location.search&&(u=`REPLACE`);let d=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,f=(n&&n.flushSync)===!0,p=Je({currentLocation:o,nextLocation:s,historyAction:u});if(p){qe(p,{state:`blocked`,location:s,proceed(){qe(p,{state:`proceeding`,proceed:void 0,reset:void 0,location:s}),V(t,n)},reset(){let e=new Map(O.blockers);e.set(p,Ve),B({blockers:e})}});return}await ye(u,s,{submission:i,pendingError:a,preventScrollReset:d,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:f})}function ve(){pe||=Qt(),je(),B({revalidation:`loading`});let e=pe.promise;return O.navigation.state===`submitting`?e:O.navigation.state===`idle`?(ye(O.historyAction,O.location,{startUninterruptedRevalidation:!0}),e):(ye(k||O.historyAction,O.navigation.location,{overrideNavigation:O.navigation,enableViewTransition:N===!0}),e)}async function ye(t,n,r){M&&M.abort(),M=null,k=t,F=(r&&r.startUninterruptedRevalidation)===!0,it(O.location,O.matches),A=(r&&r.preventScrollReset)===!0,N=(r&&r.enableViewTransition)===!0;let i=c||s,a=r&&r.overrideNavigation,o=r?.initialHydration&&O.matches&&O.matches.length>0&&!C?O.matches:j(i,n,l),u=(r&&r.flushSync)===!0;if(o&&O.initialized&&!ie&&Pt(O.location,n)&&!(r&&r.submission&&Y(r.submission.formMethod))){_e(n,{matches:o},{flushSync:u});return}let d=ot(o,i,n.pathname);if(d.active&&d.matches&&(o=d.matches),!o){let{error:e,notFoundMatches:t,route:r}=et(n.pathname);_e(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:u});return}M=new AbortController;let f=Ct(e.history,n,M.signal,r&&r.submission),p=e.getContext?await e.getContext():new w,m;if(r&&r.pendingError)m=[At(o).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Y(r.submission.formMethod)){let t=await be(f,n,r.submission,o,p,d.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:u});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(J(r)&&we(r.error)&&r.error.status===404){M=null,_e(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}o=t.matches||o,m=t.pendingActionResult,a=Gt(n,r.submission),u=!1,d.active=!1,f=Ct(e.history,f.url,f.signal)}let{shortCircuited:h,matches:g,loaderData:_,errors:v}=await xe(f,n,o,p,d.active,a,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,u,m);h||(M=null,_e(n,{matches:g||o,...kt(m),loaderData:_,errors:v}))}async function be(e,t,n,i,c,u,d,f={}){if(je(),B({navigation:Kt(t,n)},{flushSync:f.flushSync===!0}),u){let n=await st(i,t.pathname,e.signal);if(n.type===`aborted`)return{shortCircuited:!0};if(n.type===`error`){if(n.partialMatches.length===0){let{matches:e,route:t}=jt(s);return{matches:e,pendingActionResult:[t.id,{type:`error`,error:n.error}]}}let e=At(n.partialMatches).route.id;return{matches:n.partialMatches,pendingActionResult:[e,{type:`error`,error:n.error}]}}else if(n.matches)i=n.matches;else{let{notFoundMatches:e,error:n,route:r}=et(t.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:n}]}}}let p,m=Ut(i,t);if(!m.route.action&&!m.route.lazy)p={type:`error`,error:q(405,{method:e.method,pathname:t.pathname,routeId:m.route.id})};else{let t=await ke(e,gt(a,o,e,i,m,d?[]:r,c),c,null);if(p=t[m.route.id],!p){for(let e of i)if(t[e.route.id]){p=t[e.route.id];break}}if(e.signal.aborted)return{shortCircuited:!0}}if(Rt(p)){let t;return t=f&&f.replace!=null?f.replace:St(p.response.headers.get(`Location`),new URL(e.url),l)===O.location.pathname+O.location.search,await U(e,p,!0,{submission:n,replace:t}),{shortCircuited:!0}}if(J(p)){let e=At(i,m.route.id);return(f&&f.replace)!==!0&&(k=`PUSH`),{matches:i,pendingActionResult:[e.route.id,p,m.route.id]}}return{matches:i,pendingActionResult:[m.route.id,p]}}async function xe(t,n,i,u,d,f,p,m,h,g,_,v){let y=f||Gt(n,p),b=p||m||Wt(y),x=!F&&!g;if(d){if(x){let e=Se(v);B({navigation:y,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await st(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=jt(s);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=At(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=et(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let S=c||s,{dsMatches:C,revalidatingFetchers:w}=Ze(t,u,a,o,e.history,O,i,b,n,g?[]:r,g===!0,ie,ae,R,le,L,S,l,e.patchRoutesOnNavigation!=null,v);if(se=++oe,!e.dataStrategy&&!C.some(e=>e.shouldLoad)&&!C.some(e=>e.route.middleware&&e.route.middleware.length>0)&&w.length===0){let e=Le();return _e(n,{matches:i,loaderData:{},errors:v&&J(v[1])?{[v[0]]:v[1].error}:null,...kt(v),...e?{fetchers:new Map(O.fetchers)}:{}},{flushSync:_}),{shortCircuited:!0}}if(x){let e={};if(!d){e.navigation=y;let t=Se(v);t!==void 0&&(e.actionData=t)}w.length>0&&(e.fetchers=Ce(w)),B(e,{flushSync:_})}w.forEach(e=>{K(e.key),e.controller&&I.set(e.key,e.controller)});let T=()=>w.forEach(e=>K(e.key));M&&M.signal.addEventListener(`abort`,T);let{loaderResults:E,fetcherResults:D}=await Ae(C,w,t,u);if(t.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener(`abort`,T),w.forEach(e=>I.delete(e.key));let k=Mt(E);if(k)return await U(t,k.result,!0,{replace:h}),{shortCircuited:!0};if(k=Mt(D),k)return L.add(k.key),await U(t,k.result,!0,{replace:h}),{shortCircuited:!0};let{loaderData:ee,errors:A}=Dt(O,i,E,v,w,D);g&&O.errors&&(A={...O.errors,...A});let j=Le(),te=He(se),ne=j||te||w.length>0;return{matches:i,loaderData:ee,errors:A,...ne?{fetchers:new Map(O.fetchers)}:{}}}function Se(e){if(e&&!J(e[1]))return{[e[0]]:e[1].data};if(O.actionData)return Object.keys(O.actionData).length===0?null:O.actionData}function Ce(e){return e.forEach(e=>{let t=O.fetchers.get(e.key),n=qt(void 0,t?t.data:void 0);O.fetchers.set(e.key,n)}),new Map(O.fetchers)}async function H(t,n,r,i){K(t);let a=(i&&i.flushSync)===!0,o=c||s,u=Ye(O.location,O.matches,l,r,n,i?.relative),d=j(o,u,l),f=ot(d,o,u);if(f.active&&f.matches&&(d=f.matches),!d){G(t,n,q(404,{pathname:u}),{flushSync:a});return}let{path:p,submission:m,error:h}=Xe(!0,u,i);if(h){G(t,n,h,{flushSync:a});return}let g=e.getContext?await e.getContext():new w,_=(i&&i.preventScrollReset)===!0;if(m&&Y(m.formMethod)){await Te(t,n,p,d,g,f.active,a,_,m);return}le.set(t,{routeId:n,path:p}),await Ee(t,n,p,d,g,f.active,a,_,m)}async function Te(t,n,i,u,d,f,m,h,g){je(),le.delete(t),W(t,Jt(g,O.fetchers.get(t)),{flushSync:m});let _=new AbortController,v=Ct(e.history,i,_.signal,g);if(f){let e=await st(u,new URL(v.url).pathname,v.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){G(t,n,e.error,{flushSync:m});return}else if(e.matches)u=e.matches;else{G(t,n,q(404,{pathname:i}),{flushSync:m});return}}let y=Ut(u,i);if(!y.route.action&&!y.route.lazy){G(t,n,q(405,{method:g.formMethod,pathname:i,routeId:n}),{flushSync:m});return}I.set(t,_);let b=oe,x=(await ke(v,gt(a,o,v,u,y,r,d),d,t))[y.route.id];if(v.signal.aborted){I.get(t)===_&&I.delete(t);return}if(R.has(t)){if(Rt(x)||J(x)){W(t,Yt(void 0));return}}else{if(Rt(x))if(I.delete(t),se>b){W(t,Yt(void 0));return}else return L.add(t),W(t,qt(g)),U(v,x,!1,{fetcherSubmission:g,preventScrollReset:h});if(J(x)){G(t,n,x.error);return}}let S=O.navigation.location||O.location,C=Ct(e.history,S,_.signal),w=c||s,T=O.navigation.state===`idle`?O.matches:j(w,O.navigation.location,l);p(T,`Didn't find any matches after fetcher action`);let E=++oe;ce.set(t,E);let D=qt(g,x.data);O.fetchers.set(t,D);let{dsMatches:ee,revalidatingFetchers:A}=Ze(C,d,a,o,e.history,O,T,g,S,r,!1,ie,ae,R,le,L,w,l,e.patchRoutesOnNavigation!=null,[y.route.id,x]);A.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=O.fetchers.get(t),r=qt(void 0,n?n.data:void 0);O.fetchers.set(t,r),K(t),e.controller&&I.set(t,e.controller)}),B({fetchers:new Map(O.fetchers)});let te=()=>A.forEach(e=>K(e.key));_.signal.addEventListener(`abort`,te);let{loaderResults:ne,fetcherResults:N}=await Ae(ee,A,C,d);if(_.signal.aborted)return;if(_.signal.removeEventListener(`abort`,te),ce.delete(t),I.delete(t),A.forEach(e=>I.delete(e.key)),O.fetchers.has(t)){let e=Yt(x.data);O.fetchers.set(t,e)}let P=Mt(ne);if(P)return U(C,P.result,!1,{preventScrollReset:h});if(P=Mt(N),P)return L.add(P.key),U(C,P.result,!1,{preventScrollReset:h});let{loaderData:re,errors:F}=Dt(O,T,ne,void 0,A,N);He(E),O.navigation.state===`loading`&&E>se?(p(k,`Expected pending action`),M&&M.abort(),_e(O.navigation.location,{matches:T,loaderData:re,errors:F,fetchers:new Map(O.fetchers)})):(B({errors:F,loaderData:Ot(O.loaderData,re,T,F),fetchers:new Map(O.fetchers)}),ie=!1)}async function Ee(t,n,i,s,c,l,u,d,f){let p=O.fetchers.get(t);W(t,qt(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=Ct(e.history,i,m.signal);if(l){let e=await st(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){G(t,n,e.error,{flushSync:u});return}else if(e.matches)s=e.matches;else{G(t,n,q(404,{pathname:i}),{flushSync:u});return}}let g=Ut(s,i);I.set(t,m);let _=oe,v=(await ke(h,gt(a,o,h,s,g,r,c),c,t))[g.route.id];if(I.get(t)===m&&I.delete(t),!h.signal.aborted){if(R.has(t)){W(t,Yt(void 0));return}if(Rt(v))if(se>_){W(t,Yt(void 0));return}else{L.add(t),await U(h,v,!1,{preventScrollReset:d});return}if(J(v)){G(t,n,v.error);return}W(t,Yt(v.data))}}async function U(e,r,i,{submission:a,fetcherSubmission:o,preventScrollReset:s,replace:c}={}){r.response.headers.has(`X-Remix-Revalidate`)&&(ie=!0);let u=r.response.headers.get(`Location`);p(u,`Expected a Location header on the redirect Response`),u=St(u,new URL(e.url),l);let d=_(O.location,u,{_isRedirect:!0});if(n){let e=!1;if(r.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(Ue(u)){let n=x(u,!0);e=n.origin!==t.location.origin||z(n.pathname,l)==null}if(e){c?t.location.replace(u):t.location.assign(u);return}}M=null;let f=c===!0||r.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:m,formAction:h,formEncType:g}=O.navigation;!a&&!o&&m&&h&&g&&(a=Wt(O.navigation));let v=a||o;Re.has(r.response.status)&&v&&Y(v.formMethod)?await ye(f,d,{submission:{...v,formAction:u},preventScrollReset:s||A,enableViewTransition:i?N:void 0}):await ye(f,d,{overrideNavigation:Gt(d,a),fetcherSubmission:o,preventScrollReset:s||A,enableViewTransition:i?N:void 0})}async function ke(e,t,n,r){let i,a={};try{i=await _t(u,e,t,r,n,!1)}catch(e){return t.filter(e=>e.shouldLoad).forEach(t=>{a[t.route.id]={type:`error`,error:e}}),a}if(e.signal.aborted)return a;for(let[n,r]of Object.entries(i))if(Lt(r)){let i=r.result;a[n]={type:`redirect`,response:xt(i,e,n,t,l)}}else a[n]=await bt(r);return a}async function Ae(e,t,n,r){let i=ke(n,e,r,null),a=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await ke(e.request,e.matches,r,e.key))[e.match.route.id];return{[e.key]:t}}else return Promise.resolve({[e.key]:{type:`error`,error:q(404,{pathname:e.path})}})}));return{loaderResults:await i,fetcherResults:(await a).reduce((e,t)=>Object.assign(e,t),{})}}function je(){ie=!0,le.forEach((e,t)=>{I.has(t)&&ae.add(t),K(t)})}function W(e,t,n={}){O.fetchers.set(e,t),B({fetchers:new Map(O.fetchers)},{flushSync:(n&&n.flushSync)===!0})}function G(e,t,n,r={}){let i=At(O.matches,t);Pe(e),B({errors:{[i.route.id]:n},fetchers:new Map(O.fetchers)},{flushSync:(r&&r.flushSync)===!0})}function Me(e){return ue.set(e,(ue.get(e)||0)+1),R.has(e)&&R.delete(e),O.fetchers.get(e)||Be}function Ne(e,t){K(e,t?.reason),W(e,Yt(null))}function Pe(e){let t=O.fetchers.get(e);I.has(e)&&!(t&&t.state===`loading`&&ce.has(e))&&K(e),le.delete(e),ce.delete(e),L.delete(e),R.delete(e),ae.delete(e),O.fetchers.delete(e)}function Fe(e){let t=(ue.get(e)||0)-1;t<=0?(ue.delete(e),R.add(e)):ue.set(e,t),B({fetchers:new Map(O.fetchers)})}function K(e,t){let n=I.get(e);n&&(n.abort(t),I.delete(e))}function Ie(e){for(let t of e){let e=Yt(Me(t).data);O.fetchers.set(t,e)}}function Le(){let e=[],t=!1;for(let n of L){let r=O.fetchers.get(n);p(r,`Expected fetcher: ${n}`),r.state===`loading`&&(L.delete(n),e.push(n),t=!0)}return Ie(e),t}function He(e){let t=[];for(let[n,r]of ce)if(r<e){let e=O.fetchers.get(n);p(e,`Expected fetcher: ${n}`),e.state===`loading`&&(K(n),ce.delete(n),t.push(n))}return Ie(t),t.length>0}function Ge(e,t){let n=O.blockers.get(e)||Ve;return de.get(e)!==t&&de.set(e,t),n}function Ke(e){O.blockers.delete(e),de.delete(e)}function qe(e,t){let n=O.blockers.get(e)||Ve;p(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(O.blockers);r.set(e,t),B({blockers:r})}function Je({currentLocation:e,nextLocation:t,historyAction:n}){if(de.size===0)return;de.size>1&&m(!1,`A router only supports one blocker at a time`);let r=Array.from(de.entries()),[i,a]=r[r.length-1],o=O.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function et(e){let t=q(404,{pathname:e}),{matches:n,route:r}=jt(c||s);return{notFoundMatches:n,route:r,error:t}}function tt(e,t,n){if(g=e,y=t,v=n||null,!b&&O.navigation===ze){b=!0;let e=at(O.location,O.matches);e!=null&&B({restoreScrollPosition:e})}return()=>{g=null,y=null,v=null}}function nt(e,t){return v&&v(e,t.map(e=>ne(e,O.loaderData)))||e.key}function it(e,t){if(g&&y){let n=nt(e,t);g[n]=y()}}function at(e,t){if(g){let n=nt(e,t),r=g[n];if(typeof r==`number`)return r}return null}function ot(t,n,r){if(e.patchRoutesOnNavigation)if(t){if(Object.keys(t[0].params).length>0)return{active:!0,matches:te(n,r,l,!0)}}else return{active:!0,matches:te(n,r,l,!0)||[]};return{active:!1,matches:null}}async function st(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let u=t;for(;;){let t=c==null,d=c||s,f=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:u,fetcherKey:i,patch:(e,t)=>{r.aborted||rt(e,t,d,f,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:u}}finally{t&&!r.aborted&&(s=[...s])}if(r.aborted)return{type:`aborted`};let p=j(d,n,l);if(p)return{type:`success`,matches:p};let m=te(d,n,l,!0);if(!m||u.length===m.length&&u.every((e,t)=>e.route.id===m[t].route.id))return{type:`success`,matches:null};u=m}}function ct(e){o={},c=ee(e,a,void 0,o)}function lt(e,t,n=!1){let r=c==null;rt(e,t,c||s,o,a,n),r&&(s=[...s],B({}))}return D={get basename(){return l},get future(){return d},get state(){return O},get routes(){return s},get window(){return t},initialize:me,subscribe:ge,enableScrollRestoration:tt,navigate:V,fetch:H,revalidate:ve,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Me,resetFetcher:Ne,deleteFetcher:Fe,dispose:he,getBlocker:Ge,deleteBlocker:Ke,patchRoutes:lt,_internalFetchControllers:I,_internalSetRoutes:ct,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){B(e)}},e.unstable_instrumentations&&(D=Oe(D,e.unstable_instrumentations.map(e=>e.router).filter(Boolean))),D}function Je(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function Ye(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=_e(r||`.`,B(o),z(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=Ht(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=fe({basename:n,pathname:c.pathname})),v(c)}function Xe(e,t,n){if(!n||!Je(n))return{path:t};if(n.formMethod&&!Vt(n.formMethod))return{path:t,error:q(405,{method:n.formMethod})};let r=()=>({path:t,error:q(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=Nt(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Y(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}
|
|
2
|
+
`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}else if(n.formEncType===`application/json`){if(!Y(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}p(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=wt(n.formData),s=n.formData;else if(n.body instanceof FormData)o=wt(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=Tt(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=Tt(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(Y(c.formMethod))return{path:t,submission:c};let l=y(t);return e&&l.search&&Ht(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:v(l),submission:c}}function Ze(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y){let b=y?J(y[1])?y[1].error:y[1].data:void 0,x=i.createURL(a.location),S=i.createURL(c),C;if(u&&a.errors){let e=Object.keys(a.errors)[0];C=o.findIndex(t=>t.route.id===e)}else if(y&&J(y[1])){let e=y[0];C=o.findIndex(t=>t.route.id===e)-1}let w=y?y[1].statusCode:void 0,T=w&&w>=400,E={currentUrl:x,currentParams:a.matches[0]?.params||{},nextUrl:S,nextParams:o[0].params,...s,actionResult:b,actionStatus:w},D=Te(o.map(e=>e.route.path)),O=o.map((i,o)=>{let{route:s}=i,c=null;if(C!=null&&o>C?c=!1:s.lazy?c=!0:Qe(s)?u?c=$e(s,a.loaderData,a.errors):et(a.loaderData,a.matches[o],i)&&(c=!0):c=!1,c!==null)return ht(n,r,e,D,i,l,t,c);let f=T?!1:d||x.pathname+x.search===S.pathname+S.search||x.search!==S.search||tt(a.matches[o],i),p={...E,defaultShouldRevalidate:f};return ht(n,r,e,D,i,l,t,nt(i,p),p)}),k=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,y=j(g,e.path,_);if(!y){if(v&&m)return;k.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let b=Ut(y,e.path),x=new AbortController,S=Ct(i,e.path,x.signal),C=null;if(f.has(s))f.delete(s),C=gt(n,r,S,y,b,l,t);else if(m)d&&(C=gt(n,r,S,y,b,l,t));else{let e={...E,defaultShouldRevalidate:T?!1:d};nt(b,e)&&(C=gt(n,r,S,y,b,l,t,e))}C&&k.push({key:s,routeId:e.routeId,path:e.path,matches:C,match:b,request:S,controller:x})}),{dsMatches:O,revalidatingFetchers:k}}function Qe(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function $e(e,t,n){if(e.lazy)return!0;if(!Qe(e))return!1;let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader==`function`&&e.loader.hydrate===!0?!0:!r&&!i}function et(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function tt(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function nt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function rt(e,t,n,r,i,a){let o;if(e){let t=r[e];p(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>it(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=ee(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=ee([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}}function it(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((e,n)=>t.children?.some(t=>it(e,t))):!1}var at=new WeakMap,ot=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(p(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=at.get(i);o||(o={},at.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=E(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)m(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)m(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},st=new WeakMap;function ct(e,t,n,r,i){let a=n[e.id];if(p(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=st.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{p(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=O(e),o=a[e]!==void 0&&e!==`hasErrorBoundary`;i?m(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?m(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return st.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=ot({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function lt(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function ut(e){return e.matches.some(e=>e.route.middleware)?dt(e,()=>lt(e)):lt(e)}function dt(e,t){return ft(e,t,e=>e,Ft,n);function n(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:`error`,result:t}}));{let{matches:r}=e,i=At(r,r[Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.unstable_shouldCallHandler()),0))].route.id).route.id;return Promise.resolve({[i]:{type:`error`,result:t}})}}}async function ft(e,t,n,r,i){let{matches:a,request:o,params:s,context:c,unstable_pattern:l}=e,u=a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]);return await pt({request:o,params:s,context:c,unstable_pattern:l},u,t,n,r,i)}async function pt(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await pt(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function mt(e,t,n,r,i){let a=ot({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=ct(r.route,Y(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function ht(e,t,n,r,i,a,o,s,c=null){let l=!1,u=mt(e,t,n,i,a);return{...i,_lazyPromises:u,shouldLoad:s,unstable_shouldRevalidateArgs:c,unstable_shouldCallHandler(e){return l=!0,c?typeof e==`boolean`?nt(i,{...c,defaultShouldRevalidate:e}):nt(i,c):s},resolve(e){let{lazy:t,loader:a,middleware:c}=i.route,d=l||s||e&&!Y(n.method)&&(t||a),f=c&&c.length>0&&!a&&!t;return d&&(Y(n.method)||!f)?vt({request:n,unstable_pattern:r,match:i,lazyHandlerPromise:u?.handler,lazyRoutePromise:u?.route,handlerOverride:e,scopedContext:o}):Promise.resolve({type:`data`,result:void 0})}}}function gt(e,t,n,r,i,a,o,s=null){return r.map(c=>c.route.id===i.route.id?ht(e,t,n,Te(r.map(e=>e.route.path)),c,a,o,!0,s):{...c,shouldLoad:!1,unstable_shouldRevalidateArgs:s,unstable_shouldCallHandler:()=>!1,_lazyPromises:mt(e,t,n,c,a),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function _t(e,t,n,r,i,a){n.some(e=>e._lazyPromises?.middleware)&&await Promise.all(n.map(e=>e._lazyPromises?.middleware));let o={request:t,unstable_pattern:Te(n.map(e=>e.route.path)),params:n[0].params,context:i,matches:n},s=a?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=o;return dt(t,()=>e({...t,fetcherKey:r,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},c=await e({...o,fetcherKey:r,runClientMiddleware:s});try{await Promise.all(n.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return c}async function vt({request:e,unstable_pattern:t,match:n,lazyHandlerPromise:r,lazyRoutePromise:i,handlerOverride:a,scopedContext:o}){let s,c,l=Y(e.method),u=l?`action`:`loader`,d=r=>{let i,s=new Promise((e,t)=>i=t);c=()=>i(),e.signal.addEventListener(`abort`,c);let l=i=>typeof r==`function`?r({request:e,unstable_pattern:t,params:n.params,context:o},...i===void 0?[]:[i]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${u}" [routeId: ${n.route.id}]`)),d=(async()=>{try{return{type:`data`,result:await(a?a(e=>l(e)):l())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([d,s])};try{let t=l?n.route.action:n.route.loader;if(r||i)if(t){let e,[n]=await Promise.all([d(t).catch(t=>{e=t}),r,i]);if(e!==void 0)throw e;s=n}else{await r;let t=l?n.route.action:n.route.loader;if(t)[s]=await Promise.all([d(t),i]);else if(u===`action`){let t=new URL(e.url),r=t.pathname+t.search;throw q(405,{method:e.method,pathname:r,routeId:n.route.id})}else return{type:`data`,result:void 0}}else if(t)s=await d(t);else{let t=new URL(e.url);throw q(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{c&&e.signal.removeEventListener(`abort`,c)}return s}async function yt(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function bt(e){let{result:t,type:n}=e;if(Bt(t)){let e;try{e=await yt(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new H(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?zt(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:new H(t.init?.status||500,void 0,t.data),statusCode:we(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:we(t)?t.status:void 0}:zt(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function xt(e,t,n,r,i){let a=e.headers.get(`Location`);if(p(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!Ue(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=Ye(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}function St(e,t,n){if(Ue(e)){let r=e,i=r.startsWith(`//`)?new URL(t.protocol+r):new URL(r),a=z(i.pathname,n)!=null;if(i.origin===t.origin&&a)return i.pathname+i.search+i.hash}return e}function Ct(e,t,n,r){let i=e.createURL(Nt(t)).toString(),a={signal:n};if(r&&Y(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):t===`text/plain`?a.body=r.text:t===`application/x-www-form-urlencoded`&&r.formData?a.body=wt(r.formData):a.body=r.formData}return new Request(i,a)}function wt(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function Tt(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Et(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&J(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(p(!Rt(f),`Cannot handle redirect results in processLoaderData`),J(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=At(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=Ke),c||(c=!0,s=we(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function Dt(e,t,n,r,i,a){let{loaderData:o,errors:s}=Et(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let o=a[n];if(p(o,`Did not find corresponding fetcher result`),J(o)){let t=At(e.matches,r?.route.id);s&&s[t.route.id]||(s={...s,[t.route.id]:o.error}),e.fetchers.delete(n)}else if(Rt(o))p(!1,`Unhandled fetcher revalidation redirect`);else{let t=Yt(o.data);e.fetchers.set(n,t)}}),{loaderData:o,errors:s}}function Ot(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==Ke).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function kt(e){return e?J(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function At(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function jt(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function q(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new H(e||500,o,Error(s),!0)}function Mt(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(Rt(r))return{key:n,result:r}}}function Nt(e){return v({...typeof e==`string`?y(e):e,hash:``})}function Pt(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash?!0:t.hash!==``}function Ft(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&It(t))}function It(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function Lt(e){return Bt(e.result)&&Le.has(e.result.status)}function J(e){return e.type===`error`}function Rt(e){return(e&&e.type)===`redirect`}function zt(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function Bt(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function Vt(e){return Ie.has(e.toUpperCase())}function Y(e){return Fe.has(e.toUpperCase())}function Ht(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function Ut(e,t){let n=typeof t==`string`?y(t).search:t.search;if(e[e.length-1].route.index&&Ht(n||``))return e[e.length-1];let r=ge(e);return r[r.length-1]}function Wt(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function Gt(e,t){return t?{state:`loading`,location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:`loading`,location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Kt(e,t){return{state:`submitting`,location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function qt(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Jt(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Yt(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Xt(e,t){try{let n=e.sessionStorage.getItem(Ge);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function Zt(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Ge,JSON.stringify(n))}catch(e){m(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function Qt(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var $t=o.createContext(null);$t.displayName=`DataRouter`;var en=o.createContext(null);en.displayName=`DataRouterState`;var tn=o.createContext(!1);function nn(){return o.useContext(tn)}var rn=o.createContext({isTransitioning:!1});rn.displayName=`ViewTransition`;var an=o.createContext(new Map);an.displayName=`Fetchers`;var on=o.createContext(null);on.displayName=`Await`;var X=o.createContext(null);X.displayName=`Navigation`;var sn=o.createContext(null);sn.displayName=`Location`;var Z=o.createContext({outlet:null,matches:[],isDataRoute:!1});Z.displayName=`Route`;var cn=o.createContext(null);cn.displayName=`RouteError`;function ln(e,{relative:t}={}){p(un(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=o.useContext(X),{hash:i,pathname:a,search:s}=vn(e,{relative:t}),c=a;return n!==`/`&&(c=a===`/`?n:V([n,a])),r.createHref({pathname:c,search:s,hash:i})}function un(){return o.useContext(sn)!=null}function Q(){return p(un(),`useLocation() may be used only in the context of a <Router> component.`),o.useContext(sn).location}var dn=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function fn(e){o.useContext(X).static||o.useLayoutEffect(e)}function pn(){let{isDataRoute:e}=o.useContext(Z);return e?Rn():mn()}function mn(){p(un(),`useNavigate() may be used only in the context of a <Router> component.`);let e=o.useContext($t),{basename:t,navigator:n}=o.useContext(X),{matches:r}=o.useContext(Z),{pathname:i}=Q(),a=JSON.stringify(B(r)),s=o.useRef(!1);return fn(()=>{s.current=!0}),o.useCallback((r,o={})=>{if(m(s.current,dn),!s.current)return;if(typeof r==`number`){n.go(r);return}let c=_e(r,JSON.parse(a),i,o.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:V([t,c.pathname])),(o.replace?n.replace:n.push)(c,o.state,o)},[t,n,a,i,e])}var hn=o.createContext(null);function gn(e){let t=o.useContext(Z).outlet;return o.useMemo(()=>t&&o.createElement(hn.Provider,{value:e},t),[t,e])}function _n(){let{matches:e}=o.useContext(Z),t=e[e.length-1];return t?t.params:{}}function vn(e,{relative:t}={}){let{matches:n}=o.useContext(Z),{pathname:r}=Q(),i=JSON.stringify(B(n));return o.useMemo(()=>_e(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function yn(e,t,n,r,i){p(un(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:a}=o.useContext(X),{matches:s}=o.useContext(Z),c=s[s.length-1],l=c?c.params:{},u=c?c.pathname:`/`,d=c?c.pathnameBase:`/`,f=c&&c.route;{let e=f&&f.path||``;Bn(u,!f||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${e}">) 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.
|
|
3
|
+
|
|
4
|
+
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let h=Q(),g;if(t){let e=typeof t==`string`?y(t):t;p(d===`/`||e.pathname?.startsWith(d),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${e.pathname}" was given in the \`location\` prop.`),g=e}else g=h;let _=g.pathname||`/`,v=_;if(d!==`/`){let e=d.replace(/^\//,``).split(`/`);v=`/`+_.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let b=j(e,{pathname:v});m(f||b!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),m(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let x=wn(b&&b.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:V([d,a.encodeLocation?a.encodeLocation(e.pathname.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?d:V([d,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),s,n,r,i);return t&&x?o.createElement(sn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,...g},navigationType:`POP`}},x):x}function bn(){let e=Ln(),t=we(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},s=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),s=o.createElement(o.Fragment,null,o.createElement(`p`,null,`💿 Hey developer 👋`),o.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,o.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,o.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),o.createElement(o.Fragment,null,o.createElement(`h2`,null,`Unexpected Application Error!`),o.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?o.createElement(`pre`,{style:i},n):null,s)}var xn=o.createElement(bn,null),Sn=class extends o.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.unstable_onError?this.props.unstable_onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){return this.state.error===void 0?this.props.children:o.createElement(Z.Provider,{value:this.props.routeContext},o.createElement(cn.Provider,{value:this.state.error,children:this.props.component}))}};function Cn({routeContext:e,match:t,children:n}){let r=o.useContext($t);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),o.createElement(Z.Provider,{value:e},n)}function wn(e,t=[],n=null,r=null,i=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,s=n?.errors;if(s!=null){let e=a.findIndex(e=>e.route.id&&s?.[e.route.id]!==void 0);p(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(`,`)}`),a=a.slice(0,Math.min(a.length,e+1))}let c=!1,l=-1;if(n)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:r}=n,i=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||r[t.route.id]===void 0);if(t.route.lazy||i){c=!0,a=l>=0?a.slice(0,l+1):[a[0]];break}}}return a.reduceRight((e,i,u)=>{let d,f=!1,p=null,m=null;n&&(d=s&&i.route.id?s[i.route.id]:void 0,p=i.route.errorElement||xn,c&&(l<0&&u===0?(Bn(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):l===u&&(f=!0,m=i.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,u+1)),g=()=>{let t;return t=d?p:f?m:i.route.Component?o.createElement(i.route.Component,null):i.route.element?i.route.element:e,o.createElement(Cn,{match:i,routeContext:{outlet:e,matches:h,isDataRoute:n!=null},children:t})};return n&&(i.route.ErrorBoundary||i.route.errorElement||u===0)?o.createElement(Sn,{location:n.location,revalidation:n.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},unstable_onError:r}):g()},null)}function Tn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function En(e){let t=o.useContext($t);return p(t,Tn(e)),t}function Dn(e){let t=o.useContext(en);return p(t,Tn(e)),t}function On(e){let t=o.useContext(Z);return p(t,Tn(e)),t}function kn(e){let t=On(e),n=t.matches[t.matches.length-1];return p(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function An(){return kn(`useRouteId`)}function jn(){return Dn(`useNavigation`).navigation}function Mn(){let e=En(`useRevalidator`),t=Dn(`useRevalidator`),n=o.useCallback(async()=>{await e.router.revalidate()},[e.router]);return o.useMemo(()=>({revalidate:n,state:t.revalidation}),[n,t.revalidation])}function Nn(){let{matches:e,loaderData:t}=Dn(`useMatches`);return o.useMemo(()=>e.map(e=>ne(e,t)),[e,t])}function Pn(){let e=Dn(`useLoaderData`),t=kn(`useLoaderData`);return e.loaderData[t]}function Fn(e){return Dn(`useRouteLoaderData`).loaderData[e]}function In(){let e=Dn(`useActionData`),t=kn(`useLoaderData`);return e.actionData?e.actionData[t]:void 0}function Ln(){let e=o.useContext(cn),t=Dn(`useRouteError`),n=kn(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Rn(){let{router:e}=En(`useNavigate`),t=kn(`useNavigate`),n=o.useRef(!1);return fn(()=>{n.current=!0}),o.useCallback(async(r,i={})=>{m(n.current,dn),n.current&&(typeof r==`number`?e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var zn={};function Bn(e,t,n){!t&&!zn[e]&&(zn[e]=!0,m(!1,n))}var Vn={};function Hn(e,t){!e&&!Vn[t]&&(Vn[t]=!0,console.warn(t))}function Un(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&m(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:o.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&m(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:o.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&m(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:o.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Wn=[`HydrateFallback`,`hydrateFallbackElement`],Gn=class{constructor(){this.status=`pending`,this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function Kn({router:e,flushSync:t,unstable_onError:n}){let[r,i]=o.useState(e.state),[a,s]=o.useState(),[c,l]=o.useState({isTransitioning:!1}),[u,d]=o.useState(),[f,p]=o.useState(),[m,h]=o.useState(),g=o.useRef(new Map),_=o.useCallback(e=>{i(t=>(e.errors&&n&&Object.entries(e.errors).forEach(([e,r])=>{t.errors?.[e]!==r&&n(r)}),e))},[n]),v=o.useCallback((n,{deletedFetchers:r,flushSync:i,viewTransitionOpts:a})=>{n.fetchers.forEach((e,t)=>{e.data!==void 0&&g.current.set(t,e.data)}),r.forEach(e=>g.current.delete(e)),Hn(i===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let c=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(Hn(a==null||c,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!a||!c){t&&i?t(()=>_(n)):o.startTransition(()=>_(n));return}if(t&&i){t(()=>{f&&(u&&u.resolve(),f.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:a.currentLocation,nextLocation:a.nextLocation})});let r=e.window.document.startViewTransition(()=>{t(()=>_(n))});r.finished.finally(()=>{t(()=>{d(void 0),p(void 0),s(void 0),l({isTransitioning:!1})})}),t(()=>p(r));return}f?(u&&u.resolve(),f.skipTransition(),h({state:n,currentLocation:a.currentLocation,nextLocation:a.nextLocation})):(s(n),l({isTransitioning:!0,flushSync:!1,currentLocation:a.currentLocation,nextLocation:a.nextLocation}))},[e.window,t,f,u,_]);o.useLayoutEffect(()=>e.subscribe(v),[e,v]),o.useEffect(()=>{c.isTransitioning&&!c.flushSync&&d(new Gn)},[c]),o.useEffect(()=>{if(u&&a&&e.window){let t=a,n=u.promise,r=e.window.document.startViewTransition(async()=>{o.startTransition(()=>_(t)),await n});r.finished.finally(()=>{d(void 0),p(void 0),s(void 0),l({isTransitioning:!1})}),p(r)}},[a,u,e.window,_]),o.useEffect(()=>{u&&a&&r.location.key===a.location.key&&u.resolve()},[u,f,r.location,a]),o.useEffect(()=>{!c.isTransitioning&&m&&(s(m.state),l({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),h(void 0))},[c.isTransitioning,m]);let y=o.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),b=e.basename||`/`,x=o.useMemo(()=>({router:e,navigator:y,static:!1,basename:b,unstable_onError:n}),[e,y,b,n]);return o.createElement(o.Fragment,null,o.createElement($t.Provider,{value:x},o.createElement(en.Provider,{value:r},o.createElement(an.Provider,{value:g.current},o.createElement(rn.Provider,{value:c},o.createElement(Xn,{basename:b,location:r.location,navigationType:r.historyAction,navigator:y},o.createElement(qn,{routes:e.routes,future:e.future,state:r,unstable_onError:n})))))),null)}var qn=o.memo(Jn);function Jn({routes:e,future:t,state:n,unstable_onError:r}){return yn(e,void 0,n,r,t)}function Yn(e){return gn(e.context)}function Xn({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1}){p(!un(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=o.useMemo(()=>({basename:s,navigator:i,static:a,future:{}}),[s,i,a]);typeof n==`string`&&(n=y(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:h=`default`}=n,g=o.useMemo(()=>{let e=z(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:h},navigationType:r}},[s,l,u,d,f,h,r]);return m(g!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:o.createElement(X.Provider,{value:c},o.createElement(sn.Provider,{children:t,value:g}))}function Zn(){return{params:_n(),loaderData:Pn(),actionData:In(),matches:Nn()}}function Qn(e){return function(){let t=Zn();return o.createElement(e,t)}}var $n=`get`,er=`application/x-www-form-urlencoded`;function tr(e){return e!=null&&typeof e.tagName==`string`}function nr(e){return tr(e)&&e.tagName.toLowerCase()===`button`}function rr(e){return tr(e)&&e.tagName.toLowerCase()===`form`}function ir(e){return tr(e)&&e.tagName.toLowerCase()===`input`}function ar(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function or(e,t){return e.button===0&&(!t||t===`_self`)&&!ar(e)}function sr(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function cr(e,t){let n=sr(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var lr=null;function ur(){if(lr===null)try{new FormData(document.createElement(`form`),0),lr=!1}catch{lr=!0}return lr}var dr=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function fr(e){return e!=null&&!dr.has(e)?(m(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${er}"`),null):e}function pr(e,t){let n,r,i,a,o;if(rr(e)){let o=e.getAttribute(`action`);r=o?z(o,t):null,n=e.getAttribute(`method`)||$n,i=fr(e.getAttribute(`enctype`))||er,a=new FormData(e)}else if(nr(e)||ir(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?z(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||$n,i=fr(e.getAttribute(`formenctype`))||fr(o.getAttribute(`enctype`))||er,a=new FormData(o,e),!ur()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(tr(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=$n,r=null,i=er,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}var mr=-1,hr=-2,gr=-3,_r=-4,vr=-5,yr=-6,br=-7,xr=`B`,Sr=`D`,Cr=`E`,wr=`M`,Tr=`N`,Er=`P`,Dr=`R`,Or=`S`,kr=`Y`,Ar=`U`,jr=`Z`,Mr=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};function Nr(){let e=new TextDecoder,t=``;return new TransformStream({transform(n,r){let i=e.decode(n,{stream:!0}),a=(t+i).split(`
|
|
5
|
+
`);t=a.pop()||``;for(let e of a)r.enqueue(e)},flush(e){t&&e.enqueue(t)}})}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Pr=typeof window<`u`?window:typeof globalThis<`u`?globalThis:void 0;function Fr(e){let{hydrated:t,values:n}=this;if(typeof e==`number`)return Ir.call(this,e);if(!Array.isArray(e)||!e.length)throw SyntaxError();let r=n.length;for(let t of e)n.push(t);return t.length=n.length,Ir.call(this,r)}function Ir(e){let{hydrated:t,values:n,deferred:r,plugins:i}=this,a,o=[[e,e=>{a=e}]],s=[];for(;o.length>0;){let[e,a]=o.pop();switch(e){case br:a(void 0);continue;case vr:a(null);continue;case hr:a(NaN);continue;case yr:a(1/0);continue;case gr:a(-1/0);continue;case _r:a(-0);continue}if(t[e]){a(t[e]);continue}let c=n[e];if(!c||typeof c!=`object`){t[e]=c,a(c);continue}if(Array.isArray(c))if(typeof c[0]==`string`){let[n,l,u]=c;switch(n){case Sr:a(t[e]=new Date(l));continue;case Ar:a(t[e]=new URL(l));continue;case xr:a(t[e]=BigInt(l));continue;case Dr:a(t[e]=new RegExp(l,u));continue;case kr:a(t[e]=Symbol.for(l));continue;case Or:let n=new Set;t[e]=n;for(let e=c.length-1;e>0;e--)o.push([c[e],e=>{n.add(e)}]);a(n);continue;case wr:let d=new Map;t[e]=d;for(let e=c.length-2;e>0;e-=2){let t=[];o.push([c[e+1],e=>{t[1]=e}]),o.push([c[e],e=>{t[0]=e}]),s.push(()=>{d.set(t[0],t[1])})}a(d);continue;case Tr:let f=Object.create(null);t[e]=f;for(let e of Object.keys(l).reverse()){let t=[];o.push([l[e],e=>{t[1]=e}]),o.push([Number(e.slice(1)),e=>{t[0]=e}]),s.push(()=>{f[t[0]]=t[1]})}a(f);continue;case Er:if(t[l])a(t[e]=t[l]);else{let n=new Mr;r[l]=n,a(t[e]=n.promise)}continue;case Cr:let[,p,m]=c,h=m&&Pr&&Pr[m]?new Pr[m](p):Error(p);t[e]=h,a(h);continue;case jr:a(t[e]=t[l]);continue;default:if(Array.isArray(i)){let n=[],r=c.slice(1);for(let e=0;e<r.length;e++){let t=r[e];o.push([t,t=>{n[e]=t}])}s.push(()=>{for(let r of i){let i=r(c[0],...n);if(i){a(t[e]=i.value);return}}throw SyntaxError()});continue}throw SyntaxError()}}else{let n=[];t[e]=n;for(let e=0;e<c.length;e++){let t=c[e];t!==mr&&o.push([t,t=>{n[e]=t}])}a(n);continue}else{let n={};t[e]=n;for(let e of Object.keys(c).reverse()){let t=[];o.push([c[e],e=>{t[1]=e}]),o.push([Number(e.slice(1)),e=>{t[0]=e}]),s.push(()=>{n[t[0]]=t[1]})}a(n);continue}}for(;s.length>0;)s.pop()();return a}async function Lr(e,t){let{plugins:n}=t??{},r=new Mr,i=e.pipeThrough(Nr()).getReader(),a={values:[],hydrated:[],deferred:{},plugins:n},o=await Rr.call(a,i),s=r.promise;return o.done?r.resolve():s=zr.call(a,i).then(r.resolve).catch(e=>{for(let t of Object.values(a.deferred))t.reject(e);r.reject(e)}),{done:s.then(()=>i.closed),value:o.value}}async function Rr(e){let t=await e.read();if(!t.value)throw SyntaxError();let n;try{n=JSON.parse(t.value)}catch{throw SyntaxError()}return{done:t.done,value:Fr.call(this,n)}}async function zr(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;let n=t.value;switch(n[0]){case Er:{let e=n.indexOf(`:`),t=Number(n.slice(1,e)),r=this.deferred[t];if(!r)throw Error(`Deferred ID ${t} not found in stream`);let i=n.slice(e+1),a;try{a=JSON.parse(i)}catch{throw SyntaxError()}let o=Fr.call(this,a);r.resolve(o);break}case Cr:{let e=n.indexOf(`:`),t=Number(n.slice(1,e)),r=this.deferred[t];if(!r)throw Error(`Deferred ID ${t} not found in stream`);let i=n.slice(e+1),a;try{a=JSON.parse(i)}catch{throw SyntaxError()}let o=Fr.call(this,a);r.reject(o);break}default:throw SyntaxError()}t=await e.read()}}async function Br(e){let t={signal:e.signal};if(e.method!==`GET`){t.method=e.method;let n=e.headers.get(`Content-Type`);n&&/\bapplication\/json\b/.test(n)?(t.headers={"Content-Type":n},t.body=JSON.stringify(await e.json())):n&&/\btext\/plain\b/.test(n)?(t.headers={"Content-Type":n},t.body=await e.text()):n&&/\bapplication\/x-www-form-urlencoded\b/.test(n)?t.body=new URLSearchParams(await e.text()):t.body=await e.formData()}return t}var Vr={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Hr=/[&><\u2028\u2029]/g;function Ur(e){return e.replace(Hr,e=>Vr[e])}function $(e,t){if(e===!1||e==null)throw Error(t)}var Wr=Symbol(`SingleFetchRedirect`),Gr=class extends Error{},Kr=new Set([100,101,204,205]);function qr(e,t,n,r,i){let a=Jr(e,e=>{let r=t.routes[e.route.id];$(r,`Route not found in manifest`);let i=n[e.route.id];return{hasLoader:r.hasLoader,hasClientLoader:r.hasClientLoader,hasShouldRevalidate:!!i?.shouldRevalidate}},ni,r,i);return async e=>e.runClientMiddleware(a)}function Jr(e,t,n,r,i,a=()=>!0){return async o=>{let{request:s,matches:c,fetcherKey:l}=o,u=e();if(s.method!==`GET`)return Yr(o,n,i);let d=c.some(e=>{let{hasLoader:n,hasClientLoader:r}=t(e);return e.unstable_shouldCallHandler()&&n&&!r});return!r&&!d?Xr(o,t,n,i):l?$r(o,n,i):Zr(o,u,t,n,r,i,a)}}async function Yr(e,t,n){let r=e.matches.find(e=>e.unstable_shouldCallHandler());$(r,`No action match found`);let i,a=await r.resolve(async a=>await a(async()=>{let{data:a,status:o}=await t(e,n,[r.route.id]);return i=o,ii(a,r.route.id)}));return Bt(a.result)||we(a.result)||zt(a.result)?{[r.route.id]:a}:{[r.route.id]:{type:a.type,result:Se(a.result,i)}}}async function Xr(e,t,n,r){let i=e.matches.filter(e=>e.unstable_shouldCallHandler()),a={};return await Promise.all(i.map(i=>i.resolve(async o=>{try{let{hasClientLoader:s}=t(i),c=i.route.id,l=s?await o(async()=>{let{data:t}=await n(e,r,[c]);return ii(t,c)}):await o();a[i.route.id]={type:`data`,result:l}}catch(e){a[i.route.id]={type:`error`,result:e}}}))),a}async function Zr(e,t,n,r,i,a,o=()=>!0){let s=new Set,c=!1,l=e.matches.map(()=>ai()),u=ai(),d={},f=Promise.all(e.matches.map(async(t,i)=>t.resolve(async f=>{l[i].resolve();let p=t.route.id,{hasLoader:m,hasClientLoader:h,hasShouldRevalidate:g}=n(t),_=!t.unstable_shouldRevalidateArgs||t.unstable_shouldRevalidateArgs.actionStatus==null||t.unstable_shouldRevalidateArgs.actionStatus<400;if(!t.unstable_shouldCallHandler(_)){c||=t.unstable_shouldRevalidateArgs!=null&&m&&g===!0;return}if(o(t)&&h){m&&(c=!0);try{d[p]={type:`data`,result:await f(async()=>{let{data:t}=await r(e,a,[p]);return ii(t,p)})}}catch(e){d[p]={type:`error`,result:e}}return}m&&s.add(p);try{d[p]={type:`data`,result:await f(async()=>ii(await u.promise,p))}}catch(e){d[p]={type:`error`,result:e}}})));if(await Promise.all(l.map(e=>e.promise)),(!t.state.initialized&&t.state.navigation.state===`idle`||s.size===0)&&!window.__reactRouterHdrActive)u.resolve({routes:{}});else{let t=i&&c&&s.size>0?[...s.keys()]:void 0;try{let n=await r(e,a,t);u.resolve(n.data)}catch(e){u.reject(e)}}return await f,await Qr(u.promise,e.matches,s,d),d}async function Qr(e,t,n,r){try{let i,a=await e;if(`routes`in a){for(let e of t)if(e.route.id in a.routes){let t=a.routes[e.route.id];if(`error`in t){i=t.error,r[e.route.id]?.result??(r[e.route.id]={type:`error`,result:i});break}}}i!==void 0&&Array.from(n.values()).forEach(e=>{r[e].result instanceof Gr&&(r[e].result=i)})}catch{}}async function $r(e,t,n){let r=e.matches.find(e=>e.unstable_shouldCallHandler());$(r,`No fetcher match found`);let i=r.route.id,a=await r.resolve(async r=>r(async()=>{let{data:r}=await t(e,n,[i]);return ii(r,i)}));return{[r.route.id]:a}}function ei(e){let t=e.searchParams.getAll(`index`);e.searchParams.delete(`index`);let n=[];for(let e of t)e&&n.push(e);for(let t of n)e.searchParams.append(`index`,t);return e}function ti(e,t,n){let r=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return r.pathname===`/`?r.pathname=`_root.${n}`:t&&z(r.pathname,t)===`/`?r.pathname=`${t.replace(/\/$/,``)}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,``)}.${n}`,r}async function ni(e,t,n){let{request:r}=e,i=ti(r.url,t,`data`);r.method===`GET`&&(i=ei(i),n&&i.searchParams.set(`_routes`,n.join(`,`)));let a=await fetch(i,await Br(r));if(a.status>=400&&!a.headers.has(`X-Remix-Response`))throw new H(a.status,a.statusText,await a.text());if(a.status===204&&a.headers.has(`X-Remix-Redirect`))return{status:202,data:{redirect:{redirect:a.headers.get(`X-Remix-Redirect`),status:Number(a.headers.get(`X-Remix-Status`)||`302`),revalidate:a.headers.get(`X-Remix-Revalidate`)===`true`,reload:a.headers.get(`X-Remix-Reload-Document`)===`true`,replace:a.headers.get(`X-Remix-Replace`)===`true`}}};if(Kr.has(a.status)){let e={};return n&&r.method!==`GET`&&(e[n[0]]={data:void 0}),{status:a.status,data:{routes:e}}}$(a.body,`No response body to decode`);try{let e=await ri(a.body,window),t;if(r.method===`GET`){let n=e.value;t=Wr in n?{redirect:n[Wr]}:{routes:n}}else{let r=e.value,i=n?.[0];$(i,`No routeId found for single fetch call decoding`),t=`redirect`in r?{redirect:r}:{routes:{[i]:r}}}return{status:a.status,data:t}}catch{throw Error(`Unable to decode turbo-stream response`)}}function ri(e,t){return Lr(e,{plugins:[(e,...n)=>{if(e===`SanitizedError`){let[e,r,i]=n,a=Error;e&&e in t&&typeof t[e]==`function`&&(a=t[e]);let o=new a(r);return o.stack=i,{value:o}}if(e===`ErrorResponse`){let[e,t,r]=n;return{value:new H(t,r,e)}}if(e===`SingleFetchRedirect`)return{value:{[Wr]:n[0]}};if(e===`SingleFetchClassInstance`)return{value:n[0]};if(e===`SingleFetchFallback`)return{value:void 0}}]})}function ii(e,t){if(`redirect`in e){let{redirect:t,revalidate:n,reload:r,replace:i,status:a}=e.redirect;throw Ce(t,{status:a,headers:{...n?{"X-Remix-Revalidate":`yes`}:null,...r?{"X-Remix-Reload-Document":`yes`}:null,...i?{"X-Remix-Replace":`yes`}:null}})}let n=e.routes[t];if(n==null)throw new Gr(`No result found for routeId "${t}"`);if(`error`in n)throw n.error;if(`data`in n)return n.data;throw Error(`Invalid response found for routeId "${t}"`)}function ai(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}async function oi(e,t){if(e.id in t)return t[e.id];try{let n=await a(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function si(e,t,n){return yi(e.map(e=>{let r=t[e.route.id],i=n.routes[e.route.id];return[i&&i.css?i.css.map(e=>({rel:`stylesheet`,href:e})):[],r?.links?.()||[]]}).flat(2),gi(e,n))}function ci(e){return e.css?e.css.map(e=>({rel:`stylesheet`,href:e})):[]}async function li(e){if(!e.css)return;let t=ci(e);await Promise.all(t.map(di))}async function ui(e,t){if(!e.css&&!t.links||!xi())return;let n=[];if(e.css&&n.push(...ci(e)),t.links&&n.push(...t.links()),n.length===0)return;let r=[];for(let e of n)!fi(e)&&e.rel===`stylesheet`&&r.push({...e,rel:`preload`,as:`style`});await Promise.all(r.map(di))}async function di(e){return new Promise(t=>{if(e.media&&!window.matchMedia(e.media).matches||document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`))return t();let n=document.createElement(`link`);Object.assign(n,e);function r(){document.head.contains(n)&&document.head.removeChild(n)}n.onload=()=>{r(),t()},n.onerror=()=>{r(),t()},document.head.appendChild(n)})}function fi(e){return e!=null&&typeof e.page==`string`}function pi(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function mi(e,t,n){return yi((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await oi(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(pi).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function hi(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function gi(e,t,{includeHydrateFallback:n}={}){return _i(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function _i(e){return[...new Set(e)]}function vi(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function yi(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!fi(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(vi(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}var bi;function xi(){if(bi!==void 0)return bi;let e=document.createElement(`link`);return bi=e.relList.supports(`preload`),e=null,bi}function Si(){return o.createElement(ma,{title:`Loading...`,renderScripts:!0},o.createElement(`script`,{dangerouslySetInnerHTML:{__html:`
|
|
6
|
+
console.log(
|
|
7
|
+
"💿 Hey developer 👋. You can provide a way better UX than this " +
|
|
8
|
+
"when your app is loading JS modules and/or running \`clientLoader\` " +
|
|
9
|
+
"functions. Check out https://reactrouter.com/start/framework/route-module#hydratefallback " +
|
|
10
|
+
"for more information."
|
|
11
|
+
);
|
|
12
|
+
`}}))}function Ci(e){let t={};return Object.values(e).forEach(e=>{if(e){let n=e.parentId||``;t[n]||(t[n]=[]),t[n].push(e)}}),t}function wi(e,t,n){let r=Mi(t),i=t.HydrateFallback&&(!n||e.id===`root`)?t.HydrateFallback:e.id===`root`?Si:void 0,a=t.ErrorBoundary?t.ErrorBoundary:e.id===`root`?()=>o.createElement(pa,{error:Ln()}):void 0;return e.id===`root`&&t.Layout?{...r?{element:o.createElement(t.Layout,null,o.createElement(r,null))}:{Component:r},...a?{errorElement:o.createElement(t.Layout,null,o.createElement(a,null))}:{ErrorBoundary:a},...i?{hydrateFallbackElement:o.createElement(t.Layout,null,o.createElement(i,null))}:{HydrateFallback:i}}:{Component:r,ErrorBoundary:a,HydrateFallback:i}}function Ti(e,t,n,r,i,a){return Oi(t,n,r,i,a,``,Ci(t),e)}function Ei(e,t){if(e===`loader`&&!t.hasLoader||e===`action`&&!t.hasAction){let n=`You are trying to call ${e===`action`?`serverAction()`:`serverLoader()`} on a route that does not have a server ${e} (routeId: "${t.id}")`;throw console.error(n),new H(400,`Bad Request`,Error(n),!0)}}function Di(e,t){let n=e===`clientAction`?`a`:`an`,r=`Route "${t}" does not have ${n} ${e}, but you are trying to submit to it. To fix this, please add ${n} \`${e}\` function to the route`;throw console.error(r),new H(405,`Method Not Allowed`,Error(r),!0)}function Oi(e,t,n,r,i,o=``,s=Ci(e),c){return(s[o]||[]).map(o=>{let l=t[o.id];function u(e){return $(typeof e==`function`,`No single fetch function available for route handler`),e()}function d(e){return o.hasLoader?u(e):Promise.resolve(null)}function f(e){if(!o.hasAction)throw Di(`action`,o.id);return u(e)}function p(e){a(()=>import(e),[])}function m(e){e.clientActionModule&&p(e.clientActionModule),e.clientLoaderModule&&p(e.clientLoaderModule)}async function h(e){let n=t[o.id],r=n?ui(o,n):Promise.resolve();try{return e()}finally{await r}}let g={id:o.id,index:o.index,path:o.path};if(l){Object.assign(g,{...g,...wi(o,l,i),middleware:l.clientMiddleware,handle:l.handle,shouldRevalidate:ki(g.path,l,o,r,c)});let e=n&&n.loaderData&&o.id in n.loaderData,t=e?n?.loaderData?.[o.id]:void 0,a=n&&n.errors&&o.id in n.errors,s=a?n?.errors?.[o.id]:void 0,u=c==null&&(l.clientLoader?.hydrate===!0||!o.hasLoader);g.loader=async({request:n,params:r,context:i,unstable_pattern:c},f)=>{try{return await h(async()=>($(l,"No `routeModule` available for critical-route loader"),l.clientLoader?l.clientLoader({request:n,params:r,context:i,unstable_pattern:c,async serverLoader(){if(Ei(`loader`,o),u){if(e)return t;if(a)throw s}return d(f)}}):d(f)))}finally{u=!1}},g.loader.hydrate=Ni(o.id,l.clientLoader,o.hasLoader,i),g.action=({request:e,params:t,context:n,unstable_pattern:r},a)=>h(async()=>{if($(l,"No `routeModule` available for critical-route action"),!l.clientAction){if(i)throw Di(`clientAction`,o.id);return f(a)}return l.clientAction({request:e,params:t,context:n,unstable_pattern:r,async serverAction(){return Ei(`action`,o),f(a)}})})}else{o.hasClientLoader||(g.loader=(e,t)=>h(()=>d(t))),o.hasClientAction||(g.action=(e,t)=>h(()=>{if(i)throw Di(`clientAction`,o.id);return f(t)}));let e;async function n(){return e||=(async()=>{(o.clientLoaderModule||o.clientActionModule)&&await new Promise(e=>setTimeout(e,0));let e=ji(o,t);return m(o),await e})(),await e}g.lazy={loader:o.hasClientLoader?async()=>{let{clientLoader:e}=o.clientLoaderModule?await a(()=>import(o.clientLoaderModule),[]):await n();return $(e,"No `clientLoader` export found"),(t,n)=>e({...t,async serverLoader(){return Ei(`loader`,o),d(n)}})}:void 0,action:o.hasClientAction?async()=>{let e=o.clientActionModule?a(()=>import(o.clientActionModule),[]):n();m(o);let{clientAction:t}=await e;return $(t,"No `clientAction` export found"),(e,n)=>t({...e,async serverAction(){return Ei(`action`,o),f(n)}})}:void 0,middleware:o.hasClientMiddleware?async()=>{let{clientMiddleware:e}=o.clientMiddlewareModule?await a(()=>import(o.clientMiddlewareModule),[]):await n();return $(e,"No `clientMiddleware` export found"),e}:void 0,shouldRevalidate:async()=>{let e=await n();return ki(g.path,e,o,r,c)},handle:async()=>(await n()).handle,Component:async()=>(await n()).Component,ErrorBoundary:o.hasErrorBoundary?async()=>(await n()).ErrorBoundary:void 0}}let _=Oi(e,t,n,r,i,o.id,s,c);return _.length>0&&(g.children=_),g})}function ki(e,t,n,r,i){if(i)return Ai(n.id,t.shouldRevalidate,i);if(!r&&n.hasLoader&&!n.hasClientLoader){let n=e?R(e)[1].map(e=>e.paramName):[],r=e=>n.some(t=>e.currentParams[t]!==e.nextParams[t]);if(t.shouldRevalidate){let e=t.shouldRevalidate;return t=>e({...t,defaultShouldRevalidate:r(t)})}else return e=>r(e)}if(r&&t.shouldRevalidate){let e=t.shouldRevalidate;return t=>e({...t,defaultShouldRevalidate:!0})}return t.shouldRevalidate}function Ai(e,t,n){let r=!1;return i=>r?t?t(i):i.defaultShouldRevalidate:(r=!0,n.has(e))}async function ji(e,t){let n=oi(e,t),r=li(e),i=await n;return await Promise.all([r,ui(e,i)]),{Component:Mi(i),ErrorBoundary:i.ErrorBoundary,clientMiddleware:i.clientMiddleware,clientAction:i.clientAction,clientLoader:i.clientLoader,handle:i.handle,links:i.links,meta:i.meta,shouldRevalidate:i.shouldRevalidate}}function Mi(e){if(e.default!=null&&!(typeof e.default==`object`&&Object.keys(e.default).length===0))return e.default}function Ni(e,t,n,r){return r&&e!==`root`||t!=null&&(t.hydrate===!0||n!==!0)}var Pi=new Set,Fi=1e3,Ii=new Set,Li=7680;function Ri(e,t){return e.mode===`lazy`&&t===!0}function zi({sri:e,...t},n){let r=new Set(n.state.matches.map(e=>e.route.id)),i=n.state.location.pathname.split(`/`).filter(Boolean),a=[`/`];for(i.pop();i.length>0;)a.push(`/${i.join(`/`)}`),i.pop();a.forEach(e=>{let t=j(n.routes,e,n.basename);t&&t.forEach(e=>r.add(e.route.id))});let o=[...r].reduce((e,n)=>Object.assign(e,{[n]:t.routes[n]}),{});return{...t,routes:o,sri:e?!0:void 0}}function Bi(e,t,n,r,i,a){if(Ri(r,n))return async({path:o,patch:s,signal:c,fetcherKey:l})=>{Ii.has(o)||await Wi([o],l?window.location.href:o,e,t,n,i,a,r.manifestPath,s,c)}}function Vi(e,t,n,r,i,a){o.useEffect(()=>{if(!Ri(i,r)||window.navigator?.connection?.saveData===!0)return;function o(e){let t=e.tagName===`FORM`?e.getAttribute(`action`):e.getAttribute(`href`);if(!t)return;let n=e.tagName===`A`?e.pathname:new URL(t,window.location.origin).pathname;Ii.has(n)||Pi.add(n)}async function s(){document.querySelectorAll(`a[data-discover], form[data-discover]`).forEach(o);let s=Array.from(Pi.keys()).filter(e=>Ii.has(e)?(Pi.delete(e),!1):!0);if(s.length!==0)try{await Wi(s,null,t,n,r,a,e.basename,i.manifestPath,e.patchRoutes)}catch(e){console.error(`Failed to fetch manifest patches`,e)}}let c=Ki(s,100);s();let l=new MutationObserver(()=>c());return l.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`data-discover`,`href`,`action`]}),()=>l.disconnect()},[r,a,t,n,e,i])}function Hi(e,t){let n=e||`/__manifest`;return t==null?n:`${t}${n}`.replace(/\/+/g,`/`)}var Ui=`react-router-manifest-version`;async function Wi(e,t,n,r,i,a,o,s,c,l){let u=new URLSearchParams;u.set(`paths`,e.sort().join(`,`)),u.set(`version`,n.version);let d=new URL(Hi(s,o),window.location.origin);if(d.search=u.toString(),d.toString().length>Li){Pi.clear();return}let f;try{let e=await fetch(d,{signal:l});if(e.ok){if(e.status===204&&e.headers.has(`X-Remix-Reload-Document`)){if(!t){console.warn(`Detected a manifest version mismatch during eager route discovery. The next navigation/fetch to an undiscovered route will result in a new document navigation to sync up with the latest manifest.`);return}try{if(sessionStorage.getItem(Ui)===n.version){console.error(`Unable to discover routes due to manifest version mismatch.`);return}sessionStorage.setItem(Ui,n.version)}catch{}window.location.href=t,console.warn(`Detected manifest version mismatch, reloading...`),await new Promise(()=>{})}else if(e.status>=400)throw Error(await e.text())}else throw Error(`${e.status} ${e.statusText}`);try{sessionStorage.removeItem(Ui)}catch{}f=await e.json()}catch(e){if(l?.aborted)return;throw e}let p=new Set(Object.keys(n.routes)),m=Object.values(f).reduce((e,t)=>(t&&!p.has(t.id)&&(e[t.id]=t),e),{});Object.assign(n.routes,m),e.forEach(e=>Gi(e,Ii));let h=new Set;Object.values(m).forEach(e=>{e&&(!e.parentId||!m[e.parentId])&&h.add(e.parentId)}),h.forEach(e=>c(e||null,Oi(m,r,null,i,a,e)))}function Gi(e,t){if(t.size>=Fi){let e=t.values().next().value;t.delete(e)}t.add(e)}function Ki(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function qi(){let e=o.useContext($t);return $(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Ji(){let e=o.useContext(en);return $(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Yi=o.createContext(void 0);Yi.displayName=`FrameworkContext`;function Xi(){let e=o.useContext(Yi);return $(e,`You must render this element inside a <HydratedRouter> element`),e}function Zi(e,t){let n=o.useContext(Yi),[r,i]=o.useState(!1),[a,s]=o.useState(!1),{onFocus:c,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=o.useRef(null);o.useEffect(()=>{if(e===`render`&&s(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),o.useEffect(()=>{if(r){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),s(!1)};return n?e===`intent`?[a,p,{onFocus:Qi(c,m),onBlur:Qi(l,h),onMouseEnter:Qi(u,m),onMouseLeave:Qi(d,h),onTouchStart:Qi(f,m)}]:[a,p,{}]:[!1,p,{}]}function Qi(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function $i(e,t,n){if(n&&!sa)return[e[0]];if(t){let n=e.findIndex(e=>t[e.route.id]!==void 0);return e.slice(0,n+1)}return e}var ea=`data-react-router-critical-css`;function ta({nonce:e}){let{isSpaMode:t,manifest:n,routeModules:r,criticalCss:i}=Xi(),{errors:a,matches:s}=Ji(),c=$i(s,a,t),l=o.useMemo(()=>si(c,r,n),[c,r,n]);return o.createElement(o.Fragment,null,typeof i==`string`?o.createElement(`style`,{[ea]:``,dangerouslySetInnerHTML:{__html:i}}):null,typeof i==`object`?o.createElement(`link`,{[ea]:``,rel:`stylesheet`,href:i.href,nonce:e}):null,l.map(({key:t,link:n})=>fi(n)?o.createElement(na,{key:t,nonce:e,...n}):o.createElement(`link`,{key:t,nonce:e,...n})))}function na({page:e,...t}){let{router:n}=qi(),r=o.useMemo(()=>j(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?o.createElement(ia,{page:e,matches:r,...t}):null}function ra(e){let{manifest:t,routeModules:n}=Xi(),[r,i]=o.useState([]);return o.useEffect(()=>{let r=!1;return mi(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function ia({page:e,matches:t,...n}){let r=Q(),{manifest:i,routeModules:a}=Xi(),{basename:s}=qi(),{loaderData:c,matches:l}=Ji(),u=o.useMemo(()=>hi(e,t,l,i,r,`data`),[e,t,l,i,r]),d=o.useMemo(()=>hi(e,t,l,i,r,`assets`),[e,t,l,i,r]),f=o.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,o=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?o=!0:n.add(e.route.id))}),n.size===0)return[];let l=ti(e,s,`data`);return o&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[s,c,r,i,u,t,e,a]),p=o.useMemo(()=>gi(d,i),[d,i]),m=ra(d);return o.createElement(o.Fragment,null,f.map(e=>o.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>o.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>o.createElement(`link`,{key:e,nonce:n.nonce,...t})))}function aa(){let{isSpaMode:e,routeModules:t}=Xi(),{errors:n,matches:r,loaderData:i}=Ji(),a=Q(),s=$i(r,n,e),c=null;n&&(c=n[s[s.length-1].route.id]);let l=[],u=null,d=[];for(let e=0;e<s.length;e++){let n=s[e],r=n.route.id,o=i[r],f=n.params,p=t[r],m=[],h={id:r,data:o,loaderData:o,meta:[],params:n.params,pathname:n.pathname,handle:n.route.handle,error:c};if(d[e]=h,p?.meta?m=typeof p.meta==`function`?p.meta({data:o,loaderData:o,params:f,location:a,matches:d,error:c}):Array.isArray(p.meta)?[...p.meta]:p.meta:u&&(m=[...u]),m||=[],!Array.isArray(m))throw Error(`The route at `+n.route.path+` returns an invalid value. All route meta functions must return an array of meta objects.
|
|
13
|
+
|
|
14
|
+
To reference the meta function API, see https://remix.run/route/meta`);h.meta=m,d[e]=h,l=[...m],u=l}return o.createElement(o.Fragment,null,l.flat().map(e=>{if(!e)return null;if(`tagName`in e){let{tagName:t,...n}=e;if(!oa(t))return console.warn(`A meta object uses an invalid tagName: ${t}. Expected either 'link' or 'meta'`),null;let r=t;return o.createElement(r,{key:JSON.stringify(n),...n})}if(`title`in e)return o.createElement(`title`,{key:`title`},String(e.title));if(`charset`in e&&(e.charSet??=e.charset,delete e.charset),`charSet`in e&&e.charSet!=null)return typeof e.charSet==`string`?o.createElement(`meta`,{key:`charSet`,charSet:e.charSet}):null;if(`script:ld+json`in e)try{let t=JSON.stringify(e[`script:ld+json`]);return o.createElement(`script`,{key:`script:ld+json:${t}`,type:`application/ld+json`,dangerouslySetInnerHTML:{__html:Ur(t)}})}catch{return null}return o.createElement(`meta`,{key:JSON.stringify(e),...e})}))}function oa(e){return typeof e==`string`&&/^(meta|link)$/.test(e)}var sa=!1;function ca(){sa=!0}function la(e){let{manifest:t,serverHandoffString:n,isSpaMode:r,renderMeta:i,routeDiscovery:a,ssr:s}=Xi(),{router:c,static:l,staticContext:u}=qi(),{matches:d}=Ji(),f=nn(),p=Ri(a,s);i&&(i.didRenderScripts=!0);let m=$i(d,null,r);o.useEffect(()=>{ca()},[]);let h=o.useMemo(()=>{if(f)return null;let r=u?`window.__reactRouterContext = ${n};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:` `,i=l?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:``}${p?``:`import ${JSON.stringify(t.url)}`};
|
|
15
|
+
${m.map((e,n)=>{let r=`route${n}`,i=t.routes[e.route.id];$(i,`Route ${e.route.id} not found in manifest`);let{clientActionModule:a,clientLoaderModule:o,clientMiddlewareModule:s,hydrateFallbackModule:c,module:l}=i,u=[...a?[{module:a,varName:`${r}_clientAction`}]:[],...o?[{module:o,varName:`${r}_clientLoader`}]:[],...s?[{module:s,varName:`${r}_clientMiddleware`}]:[],...c?[{module:c,varName:`${r}_HydrateFallback`}]:[],{module:l,varName:`${r}_main`}];return u.length===1?`import * as ${r} from ${JSON.stringify(l)};`:[u.map(e=>`import * as ${e.varName} from "${e.module}";`).join(`
|
|
16
|
+
`),`const ${r} = {${u.map(e=>`...${e.varName}`).join(`,`)}};`].join(`
|
|
17
|
+
`)}).join(`
|
|
18
|
+
`)}
|
|
19
|
+
${p?`window.__reactRouterManifest = ${JSON.stringify(zi(t,c),null,2)};`:``}
|
|
20
|
+
window.__reactRouterRouteModules = {${m.map((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`).join(`,`)}};
|
|
21
|
+
|
|
22
|
+
import(${JSON.stringify(t.entry.module)});`:` `;return o.createElement(o.Fragment,null,o.createElement(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:r},type:void 0}),o.createElement(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:i},type:`module`,async:!0}))},[]),g=sa||f?[]:ua(t.entry.imports.concat(gi(m,t,{includeHydrateFallback:!0}))),_=typeof t.sri==`object`?t.sri:{};return Hn(!f,`The <Scripts /> element is a no-op when using RSC and can be safely removed.`),sa||f?null:o.createElement(o.Fragment,null,typeof t.sri==`object`?o.createElement(`script`,{"rr-importmap":``,type:`importmap`,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:_})}}):null,p?null:o.createElement(`link`,{rel:`modulepreload`,href:t.url,crossOrigin:e.crossOrigin,integrity:_[t.url],suppressHydrationWarning:!0}),o.createElement(`link`,{rel:`modulepreload`,href:t.entry.module,crossOrigin:e.crossOrigin,integrity:_[t.entry.module],suppressHydrationWarning:!0}),g.map(t=>o.createElement(`link`,{key:t,rel:`modulepreload`,href:t,crossOrigin:e.crossOrigin,integrity:_[t],suppressHydrationWarning:!0})),h)}function ua(e){return[...new Set(e)]}function da(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var fa=class extends o.Component{constructor(e){super(e),this.state={error:e.error||null,location:e.location}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location===e.location?{error:e.error||t.error,location:t.location}:{error:e.error||null,location:e.location}}render(){return this.state.error?o.createElement(pa,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function pa({error:e,isOutsideRemixApp:t}){console.error(e);let n=o.createElement(`script`,{dangerouslySetInnerHTML:{__html:`
|
|
23
|
+
console.log(
|
|
24
|
+
"💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
|
|
25
|
+
);
|
|
26
|
+
`}});if(we(e))return o.createElement(ma,{title:`Unhandled Thrown Response!`},o.createElement(`h1`,{style:{fontSize:`24px`}},e.status,` `,e.statusText),n);let r;if(e instanceof Error)r=e;else{let t=e==null?`Unknown Error`:typeof e==`object`&&`toString`in e?e.toString():JSON.stringify(e);r=Error(t)}return o.createElement(ma,{title:`Application Error!`,isOutsideRemixApp:t},o.createElement(`h1`,{style:{fontSize:`24px`}},`Application Error`),o.createElement(`pre`,{style:{padding:`2rem`,background:`hsla(10, 50%, 50%, 0.1)`,color:`red`,overflow:`auto`}},r.stack),n)}function ma({title:e,renderScripts:t,isOutsideRemixApp:n,children:r}){let{routeModules:i}=Xi();return i.root?.Layout&&!n?r:o.createElement(`html`,{lang:`en`},o.createElement(`head`,null,o.createElement(`meta`,{charSet:`utf-8`}),o.createElement(`meta`,{name:`viewport`,content:`width=device-width,initial-scale=1,viewport-fit=cover`}),o.createElement(`title`,null,e)),o.createElement(`body`,null,o.createElement(`main`,{style:{fontFamily:`system-ui, sans-serif`,padding:`2rem`}},r,t?o.createElement(la,null):null)))}var ha=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{ha&&(window.__reactRouterVersion=`7.9.5`)}catch{}function ga({basename:e,children:t,history:n}){let[r,i]=o.useState({action:n.action,location:n.location}),a=o.useCallback(e=>{o.startTransition(()=>i(e))},[i]);return o.useLayoutEffect(()=>n.listen(a),[n,a]),o.createElement(Xn,{basename:e,children:t,location:r.location,navigationType:r.action,navigator:n})}ga.displayName=`unstable_HistoryRouter`;var _a=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,va=o.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,...f},p){let{basename:h}=o.useContext(X),g=typeof l==`string`&&_a.test(l),_,v=!1;if(typeof l==`string`&&g&&(_=l,ha))try{let e=new URL(window.location.href),t=l.startsWith(`//`)?new URL(e.protocol+l):new URL(l),n=z(t.pathname,h);t.origin===e.origin&&n!=null?l=n+t.search+t.hash:v=!0}catch{m(!1,`<Link to="${l}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let y=ln(l,{relative:r}),[b,x,S]=Zi(n,f),C=Ta(l,{replace:a,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d});function w(t){e&&e(t),t.defaultPrevented||C(t)}let T=o.createElement(`a`,{...f,...S,href:_||y,onClick:v||i?e:w,ref:da(p,x),target:c,"data-discover":!g&&t===`render`?`true`:void 0});return b&&!g?o.createElement(o.Fragment,null,T,o.createElement(na,{page:y})):T});va.displayName=`Link`;var ya=o.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:s,children:c,...l},u){let d=vn(a,{relative:l.relative}),f=Q(),p=o.useContext(en),{navigator:m,basename:h}=o.useContext(X),g=p!=null&&Ia(d)&&s===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=z(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return o.createElement(va,{...l,"aria-current":w,className:T,ref:u,style:E,to:a,viewTransition:s},typeof c==`function`?c(C):c)});ya.displayName=`NavLink`;var ba=o.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:s=$n,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,...p},m)=>{let h=ka(),g=Aa(c,{relative:u}),_=s.toLowerCase()===`get`?`get`:`post`,v=typeof c==`string`&&_a.test(c);return o.createElement(`form`,{ref:m,method:_,action:g,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,o=r?.getAttribute(`formmethod`)||s;h(r||e.currentTarget,{fetcherKey:t,method:o,navigate:n,replace:i,state:a,relative:u,preventScrollReset:d,viewTransition:f})},...p,"data-discover":!v&&e===`render`?`true`:void 0})});ba.displayName=`Form`;function xa({getKey:e,storageKey:t,...n}){let r=o.useContext(Yi),{basename:i}=o.useContext(X),a=Q(),s=Nn();Pa({getKey:e,storageKey:t});let c=o.useMemo(()=>{if(!r||!e)return null;let t=Na(a,s,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let l=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return o.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${l})(${JSON.stringify(t||ja)}, ${JSON.stringify(c)})`}})}xa.displayName=`ScrollRestoration`;function Sa(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ca(e){let t=o.useContext($t);return p(t,Sa(e)),t}function wa(e){let t=o.useContext(en);return p(t,Sa(e)),t}function Ta(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:a,viewTransition:s}={}){let c=pn(),l=Q(),u=vn(e,{relative:a});return o.useCallback(o=>{or(o,t)&&(o.preventDefault(),c(e,{replace:n===void 0?v(l)===v(u):n,state:r,preventScrollReset:i,relative:a,viewTransition:s}))},[l,c,u,n,r,t,e,i,a,s])}function Ea(e){m(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=o.useRef(sr(e)),n=o.useRef(!1),r=Q(),i=o.useMemo(()=>cr(r.search,n.current?null:t.current),[r.search]),a=pn();return[i,o.useCallback((e,t)=>{let r=sr(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Da=0,Oa=()=>`__${String(++Da)}__`;function ka(){let{router:e}=Ca(`useSubmit`),{basename:t}=o.useContext(X),n=An();return o.useCallback(async(r,i={})=>{let{action:a,method:o,encType:s,formData:c,body:l}=pr(r,t);if(i.navigate===!1){let t=i.fetcherKey||Oa();await e.fetch(t,n,i.action||a,{preventScrollReset:i.preventScrollReset,formData:c,body:l,formMethod:i.method||o,formEncType:i.encType||s,flushSync:i.flushSync})}else await e.navigate(i.action||a,{preventScrollReset:i.preventScrollReset,formData:c,body:l,formMethod:i.method||o,formEncType:i.encType||s,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,n])}function Aa(e,{relative:t}={}){let{basename:n}=o.useContext(X),r=o.useContext(Z);p(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...vn(e||`.`,{relative:t})},s=Q();if(e==null){a.search=s.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:V([n,a.pathname])),v(a)}var ja=`react-router-scroll-positions`,Ma={};function Na(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:z(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Pa({getKey:e,storageKey:t}={}){let{router:n}=Ca(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=wa(`useScrollRestoration`),{basename:a}=o.useContext(X),s=Q(),c=Nn(),l=jn();o.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Fa(o.useCallback(()=>{if(l.state===`idle`){let t=Na(s,c,a,e);Ma[t]=window.scrollY}try{sessionStorage.setItem(t||ja,JSON.stringify(Ma))}catch(e){m(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[l.state,e,a,s,c,t])),typeof document<`u`&&(o.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||ja);e&&(Ma=JSON.parse(e))}catch{}},[t]),o.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Ma,()=>window.scrollY,e?(t,n)=>Na(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),o.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(s.hash){let e=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{m(!1,`"${s.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[s,r,i]))}function Fa(e,t){let{capture:n}=t||{};o.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Ia(e,{relative:t}={}){let n=o.useContext(rn);p(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ca(`useViewTransitionState`),i=vn(e,{relative:t});if(!n.isTransitioning)return!1;let a=z(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=z(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ue(i.pathname,s)!=null||ue(i.pathname,a)!=null}export{jn as A,Un as C,Pn as D,Vi as E,Qn as F,a as I,Ln as M,Fn as N,Q as O,Ea as P,we as S,Ni as T,ri as _,aa as a,Wn as b,fa as c,xa as d,f,qe as g,S as h,ta as i,Mn as j,pn as k,Kn as l,Ti as m,Yi as n,Kr as o,Oi as p,va as r,Yn as s,H as t,la as u,Bi as v,j as w,p as x,qr as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=e=>{let n={};for(var r in e)t(n,r,{get:e[r],enumerable:!0});return n},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=e=>t=>l(t.default,e);export{l as i,s as n,u as r,o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./dist-BWnI-4xl.js";var t=e(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]);export{t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./jsx-runtime-SCjaiuzT.js";var t=e(),n=o();function r(e,...t){if(!n)return;let r=a(e,...t);performance.mark(r);try{console.log(e,...t)}catch{console.log(r)}}function i(e,...t){n&&console.warn(e,...t)}function a(e,...t){return e.replace(/%[sfdO]/g,e=>{let n=t.shift();return e===`%O`&&n?JSON.stringify(n).replace(/"([^"]+)":/g,`$1:`):String(n)})}function o(){try{let e=`nuqs-localStorage-test`;if(typeof localStorage>`u`)return!1;localStorage.setItem(e,e);let t=localStorage.getItem(e)===e;return localStorage.removeItem(e),t&&(localStorage.getItem(`debug`)||``).includes(`nuqs`)}catch{return!1}}var s={303:`Multiple adapter contexts detected. This might happen in monorepos.`,404:`nuqs requires an adapter to work with your framework.`,409:"Multiple versions of the library are loaded. This may lead to unexpected behavior. Currently using `%s`, but `%s` (via the %s adapter) was about to load on top.",414:`Max safe URL length exceeded. Some browsers may not be able to accept this URL. Consider limiting the amount of state stored in the URL.`,422:"Invalid options combination: `limitUrlUpdates: debounce` should be used in SSR scenarios, with `shallow: false`",429:"URL update rate-limited by the browser. Consider increasing `throttleMs` for key(s) `%s`. %O",500:`Empty search params cache. Search params can't be accessed in Layouts.`,501:"Search params cache already populated. Have you called `parse` twice?"};function c(e){return`[nuqs] ${s[e]}
|
|
2
|
+
See https://nuqs.dev/NUQS-${e}`}function l(e){if(e.size===0)return``;let t=[];for(let[n,r]of e.entries()){let e=n.replace(/#/g,`%23`).replace(/&/g,`%26`).replace(/\+/g,`%2B`).replace(/=/g,`%3D`).replace(/\?/g,`%3F`);t.push(`${e}=${u(r)}`)}return`?`+t.join(`&`)}function u(e){return e.replace(/%/g,`%25`).replace(/\+/g,`%2B`).replace(/ /g,`+`).replace(/#/g,`%23`).replace(/&/g,`%26`).replace(/"/g,`%22`).replace(/'/g,`%27`).replace(/`/g,`%60`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/[\x00-\x1F]/g,e=>encodeURIComponent(e))}var d=(0,t.createContext)({useAdapter(){throw Error(c(404))}});d.displayName=`NuqsAdapterContext`,n&&typeof window<`u`&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==d&&console.error(c(303)),window.__NuqsAdapterContext=d);function f(e){return({children:n,defaultOptions:r,processUrlSearchParams:i,...a})=>(0,t.createElement)(d.Provider,{...a,value:{useAdapter:e,defaultOptions:r,processUrlSearchParams:i}},n)}function p(e){let n=(0,t.useContext)(d);if(!(`useAdapter`in n))throw Error(c(404));return n.useAdapter(e)}var m=()=>(0,t.useContext)(d).defaultOptions,h=()=>(0,t.useContext)(d).processUrlSearchParams;function g(){if(typeof window>`u`||!window.GestureEvent)return 50;try{let e=navigator.userAgent?.match(/version\/([\d\.]+) safari/i);return parseFloat(e[1])>=17?120:320}catch{return 320}}function _(e){return{method:`throttle`,timeMs:e}}var v=_(g());function y(e){return e===null||Array.isArray(e)&&e.length===0}function b(e,t,n){if(typeof e==`string`)n.set(t,e);else{n.delete(t);for(let r of e)n.append(t,r);n.has(t)||n.set(t,``)}return n}function x(){let e=new Map;return{on(t,n){let r=e.get(t)||[];return r.push(n),e.set(t,r),()=>this.off(t,n)},off(t,n){let r=e.get(t);r&&e.set(t,r.filter(e=>e!==n))},emit(t,n){e.get(t)?.forEach(e=>e(n))}}}function S(e,t,n){function r(){e(),n.removeEventListener(`abort`,a)}let i=setTimeout(r,t);function a(){clearTimeout(i),n.removeEventListener(`abort`,a)}n.addEventListener(`abort`,a)}function C(){let e=Promise;if(Promise.hasOwnProperty(`withResolvers`))return Promise.withResolvers();let t=()=>{},n=()=>{};return{promise:new e((e,r)=>{t=e,n=r}),resolve:t,reject:n}}function w(e,t){let n=t;for(let t=e.length-1;t>=0;t--){let r=e[t];if(!r)continue;let i=n;n=()=>r(i)}n()}function T(){return new URLSearchParams(location.search)}var E=class{updateMap=new Map;options={history:`replace`,scroll:!1,shallow:!0};timeMs=v.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:e,query:t,options:n},i=v.timeMs){this.resetQueueOnNextPush&&=(this.reset(),!1),r(`[nuqs gtq] Enqueueing %s=%s %O`,e,t,n),this.updateMap.set(e,t),n.history===`push`&&(this.options.history=`push`),n.scroll&&(this.options.scroll=!0),n.shallow===!1&&(this.options.shallow=!1),n.startTransition&&this.transitions.add(n.startTransition),(!Number.isFinite(this.timeMs)||i>this.timeMs)&&(this.timeMs=i)}getQueuedQuery(e){return this.updateMap.get(e)}getPendingPromise({getSearchParamsSnapshot:e=T}){return this.resolvers?.promise??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=T,rateLimitFactor:t=1,...n},i){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return r(`[nuqs gtq] Skipping flush due to throttleMs=Infinity`),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=C();let a=()=>{this.lastFlushedAt=performance.now();let[t,r]=this.applyPendingUpdates({...n,autoResetQueueOnUpdate:n.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:e},i);r===null?(this.resolvers.resolve(t),this.resetQueueOnNextPush=!0):this.resolvers.reject(t),this.resolvers=null};return S(()=>{let e=performance.now()-this.lastFlushedAt,n=this.timeMs,i=t*Math.max(0,n-e);r(`[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)`,i,n,t),i===0?a():S(a,i,this.controller.signal)},0,this.controller.signal),this.resolvers.promise}abort(){return this.controller?.abort(),this.controller=new AbortController,this.resolvers?.resolve(new URLSearchParams),this.resolvers=null,this.reset()}reset(){let e=Array.from(this.updateMap.keys());return r(`[nuqs gtq] Resetting queue %s`,JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:`replace`,scroll:!1,shallow:!0},this.timeMs=v.timeMs,e}applyPendingUpdates(e,t){let{updateUrl:n,getSearchParamsSnapshot:i}=e,a=i();if(r(`[nuqs gtq] Applying %d pending update(s) on top of %s`,this.updateMap.size,a.toString()),this.updateMap.size===0)return[a,null];let o=Array.from(this.updateMap.entries()),s={...this.options},l=Array.from(this.transitions);e.autoResetQueueOnUpdate&&this.reset(),r(`[nuqs gtq] Flushing queue %O with options %O`,o,s);for(let[e,t]of o)t===null?a.delete(e):a=b(t,e,a);t&&(a=t(a));try{return w(l,()=>{n(a,s)}),[a,null]}catch(e){return console.error(c(429),o.map(([e])=>e).join(),e),[a,e]}}},D=new E;function O(e,n,r){let i=(0,t.useCallback)(()=>{let t=Object.fromEntries(e.map(e=>[e,r(e)]));return[JSON.stringify(t),t]},[e.join(`,`),r]),a=(0,t.useRef)(null);return a.current===null&&(a.current=i()),(0,t.useSyncExternalStore)((0,t.useCallback)(t=>{let r=e.map(e=>n(e,t));return()=>r.forEach(e=>e())},[e.join(`,`),n]),()=>{let[e,t]=i();return a.current[0]===e?a.current[1]:(a.current=[e,t],t)},()=>a.current[1])}var k=class{callback;resolvers=C();controller=new AbortController;queuedValue=void 0;constructor(e){this.callback=e}abort(){this.controller.abort(),this.queuedValue=void 0}push(e,t){return this.queuedValue=e,this.controller.abort(),this.controller=new AbortController,S(()=>{let t=this.resolvers;try{r(`[nuqs dq] Flushing debounce queue`,e);let n=this.callback(e);r(`[nuqs dq] Reset debounce queue %O`,this.queuedValue),this.queuedValue=void 0,this.resolvers=C(),n.then(e=>t.resolve(e)).catch(e=>t.reject(e))}catch(e){this.queuedValue=void 0,t.reject(e)}},t,this.controller.signal),this.resolvers.promise}},A=new class{throttleQueue;queues=new Map;queuedQuerySync=x();constructor(e=new E){this.throttleQueue=e}useQueuedQueries(e){return O(e,(e,t)=>this.queuedQuerySync.on(e,t),e=>this.getQueuedQuery(e))}push(e,t,n){if(!Number.isFinite(t)){let e=n.getSearchParamsSnapshot??T;return Promise.resolve(e())}let i=e.key;if(!this.queues.has(i)){r("[nuqs dqc] Creating debounce queue for `%s`",i);let e=new k(e=>(this.throttleQueue.push(e),this.throttleQueue.flush(n).finally(()=>{this.queues.get(e.key)?.queuedValue===void 0&&(r("[nuqs dqc] Cleaning up empty queue for `%s`",e.key),this.queues.delete(e.key)),this.queuedQuerySync.emit(e.key)})));this.queues.set(i,e)}r(`[nuqs dqc] Enqueueing debounce update %O`,e);let a=this.queues.get(i).push(e,t);return this.queuedQuerySync.emit(i),a}abort(e){let t=this.queues.get(e);return t?(r(`[nuqs dqc] Aborting debounce queue %s=%s`,e,t.queuedValue?.query),this.queues.delete(e),t.abort(),this.queuedQuerySync.emit(e),e=>(e.then(t.resolvers.resolve,t.resolvers.reject),e)):e=>e}abortAll(){for(let[e,t]of this.queues.entries())r(`[nuqs dqc] Aborting debounce queue %s=%s`,e,t.queuedValue?.query),t.abort(),t.resolvers.resolve(new URLSearchParams),this.queuedQuerySync.emit(e);this.queues.clear()}getQueuedQuery(e){let t=this.queues.get(e)?.queuedValue?.query;return t===void 0?this.throttleQueue.getQueuedQuery(e):t}}(D);function j(e,t){return e===t?!0:e===null||t===null||typeof e==`string`||typeof t==`string`||e.length!==t.length?!1:e.every((e,n)=>e===t[n])}export{D as a,r as c,p as d,m as f,v as i,c as l,i as m,x as n,y as o,h as p,A as r,f as s,j as t,l as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./chunk-vBKQ29Cd.js";import{n as t}from"./jsx-runtime-SCjaiuzT.js";var n=e((e=>{var n=t().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;e.c=function(e){return n.H.useMemoCache(e)}})),r=e(((e,t)=>{t.exports=n()}));export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=`/auth`,t=`/trpc`;export{t as n,e as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./jsx-runtime-SCjaiuzT.js";var t={outline:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},filled:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`currentColor`,stroke:`none`}},n=e(),r=(e,r,i,a)=>{let o=(0,n.forwardRef)(({color:i=`currentColor`,size:o=24,stroke:s=2,title:c,className:l,children:u,...d},f)=>(0,n.createElement)(`svg`,{ref:f,...t[e],width:o,height:o,className:[`tabler-icon`,`tabler-icon-${r}`,l].join(` `),...e===`filled`?{fill:i}:{strokeWidth:s,stroke:i},...d},[c&&(0,n.createElement)(`title`,{key:`svg-title`},c),...a.map(([e,t])=>(0,n.createElement)(e,t)),...Array.isArray(u)?u:[u]]));return o.displayName=`${i}`,o};export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./jsx-runtime-SCjaiuzT.js";import{t}from"./compiler-runtime-Co9svCia.js";import{t as n}from"./x-4CC8aqOW.js";import{t as r}from"./utils-InBzhUf_.js";import{a as i,i as a,n as o,o as s,r as c,s as l,t as u}from"./dist-Yn6lj8QC.js";var d=t(),f=e();function p(e){let t=(0,d.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,f.jsx)(s,{"data-slot":`dialog`,...n}),t[2]=n,t[3]=r),r}function m(e){let t=(0,d.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,f.jsx)(i,{"data-slot":`dialog-portal`,...n}),t[2]=n,t[3]=r),r}function h(e){let t=(0,d.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let o;t[3]===n?o=t[4]:(o=r(`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,n),t[3]=n,t[4]=o);let s;return t[5]!==i||t[6]!==o?(s=(0,f.jsx)(a,{"data-slot":`dialog-overlay`,className:o,...i}),t[5]=i,t[6]=o,t[7]=s):s=t[7],s}function g(e){let t=(0,d.c)(15),i,a,s,c;t[0]===e?(i=t[1],a=t[2],s=t[3],c=t[4]):({className:a,children:i,showCloseButton:c,...s}=e,t[0]=e,t[1]=i,t[2]=a,t[3]=s,t[4]=c);let l=c===void 0?!0:c,p;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,f.jsx)(h,{}),t[5]=p):p=t[5];let g;t[6]===a?g=t[7]:(g=r(`bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg`,a),t[6]=a,t[7]=g);let _;t[8]===l?_=t[9]:(_=l&&(0,f.jsxs)(u,{"data-slot":`dialog-close`,className:`ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[(0,f.jsx)(n,{}),(0,f.jsx)(`span`,{className:`sr-only`,children:`Close`})]}),t[8]=l,t[9]=_);let v;return t[10]!==i||t[11]!==s||t[12]!==g||t[13]!==_?(v=(0,f.jsxs)(m,{"data-slot":`dialog-portal`,children:[p,(0,f.jsxs)(o,{"data-slot":`dialog-content`,className:g,...s,children:[i,_]})]}),t[10]=i,t[11]=s,t[12]=g,t[13]=_,t[14]=v):v=t[14],v}function _(e){let t=(0,d.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(`flex flex-col gap-2 text-center sm:text-left`,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,f.jsx)(`div`,{"data-slot":`dialog-header`,className:a,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function v(e){let t=(0,d.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(`text-lg leading-none font-semibold`,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,f.jsx)(l,{"data-slot":`dialog-title`,className:a,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function y(e){let t=(0,d.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=r(`text-muted-foreground text-sm`,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,f.jsx)(c,{"data-slot":`dialog-description`,className:a,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}export{v as a,_ as i,g as n,y as r,p as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./chunk-vBKQ29Cd.js";import{n as t,t as n}from"./jsx-runtime-SCjaiuzT.js";import{t as r}from"./react-dom-Bhi-1tDD.js";import{n as i}from"./dist-BWnI-4xl.js";var a=e(t(),1),o=e(r(),1),s=n(),c=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=i(`Primitive.${t}`),r=a.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,s.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function l(e,t){e&&o.flushSync(()=>e.dispatchEvent(t))}export{l as n,c as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./chunk-vBKQ29Cd.js";import{n as t,t as n}from"./jsx-runtime-SCjaiuzT.js";import{t as r}from"./react-dom-Bhi-1tDD.js";import{a as i}from"./dist-BWnI-4xl.js";import{t as a}from"./dist-B6TkSbxV.js";import{a as o,n as s}from"./dist-DhfcebhF.js";import{s as c}from"./es2015-BJguufLZ.js";import{t as l}from"./dist-CYRPrwOb.js";var u=e(t(),1),d=n(),f=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),p=`VisuallyHidden`,m=u.forwardRef((e,t)=>(0,d.jsx)(a.span,{...e,ref:t,style:{...f,...e.style}}));m.displayName=p;var h=m,g=[`top`,`right`,`bottom`,`left`],_=Math.min,v=Math.max,y=Math.round,b=Math.floor,x=e=>({x:e,y:e}),S={left:`right`,right:`left`,bottom:`top`,top:`bottom`},C={start:`end`,end:`start`};function w(e,t,n){return v(e,_(t,n))}function T(e,t){return typeof e==`function`?e(t):e}function E(e){return e.split(`-`)[0]}function D(e){return e.split(`-`)[1]}function O(e){return e===`x`?`y`:`x`}function k(e){return e===`y`?`height`:`width`}var A=new Set([`top`,`bottom`]);function j(e){return A.has(E(e))?`y`:`x`}function M(e){return O(j(e))}function N(e,t,n){n===void 0&&(n=!1);let r=D(e),i=M(e),a=k(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=H(o)),[o,H(o)]}function P(e){let t=H(e);return[F(e),t,F(t)]}function F(e){return e.replace(/start|end/g,e=>C[e])}var I=[`left`,`right`],L=[`right`,`left`],R=[`top`,`bottom`],z=[`bottom`,`top`];function B(e,t,n){switch(e){case`top`:case`bottom`:return n?t?L:I:t?I:L;case`left`:case`right`:return t?R:z;default:return[]}}function V(e,t,n,r){let i=D(e),a=B(E(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(F)))),a}function H(e){return e.replace(/left|right|bottom|top/g,e=>S[e])}function ee(e){return{top:0,right:0,bottom:0,left:0,...e}}function te(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ee(e)}function ne(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function re(e,t,n){let{reference:r,floating:i}=e,a=j(t),o=M(t),s=k(o),c=E(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(D(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}var ie=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=re(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:e,floating:t}});u=g??u,d=_??d,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=re(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}};async function U(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=T(t,e),p=te(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ne(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ne(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ae=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=T(e,t)||{};if(l==null)return{};let d=te(u),f={x:n,y:r},p=M(i),m=k(p),h=await o.getDimensions(l),g=p===`y`,v=g?`top`:`left`,y=g?`bottom`:`right`,b=g?`clientHeight`:`clientWidth`,x=a.reference[m]+a.reference[p]-f[p]-a.floating[m],S=f[p]-a.reference[p],C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),E=C?C[b]:0;(!E||!await(o.isElement==null?void 0:o.isElement(C)))&&(E=s.floating[b]||a.floating[m]);let O=x/2-S/2,A=E/2-h[m]/2-1,j=_(d[v],A),N=_(d[y],A),P=j,F=E-h[m]-N,I=E/2-h[m]/2+O,L=w(P,I,F),R=!c.arrow&&D(i)!=null&&I!==L&&a.reference[m]/2-(I<P?j:N)-h[m]/2<0,z=R?I<P?I-P:I-F:0;return{[p]:f[p]+z,data:{[p]:L,centerOffset:I-L-z,...R&&{alignmentOffset:z}},reset:R}}}),oe=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=T(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=E(r),_=j(o),v=E(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[H(o)]:P(o)),x=p!==`none`;!d&&x&&b.push(...V(o,m,p,y));let S=[o,...b],C=await U(t,h),w=[],D=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=N(r,a,y);w.push(C[e[0]],C[e[1]])}if(D=[...D,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==j(t))||D.every(e=>j(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:D},reset:{placement:t}};let n=D.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=D.filter(e=>{if(x){let t=j(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function se(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ce(e){return g.some(t=>e[t]>=0)}var le=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n}=t,{strategy:r=`referenceHidden`,...i}=T(e,t);switch(r){case`referenceHidden`:{let e=se(await U(t,{...i,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ce(e)}}}case`escaped`:{let e=se(await U(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:ce(e)}}}default:return{}}}}},ue=new Set([`left`,`top`]);async function de(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=E(n),s=D(n),c=j(n)===`y`,l=ue.has(o)?-1:1,u=a&&c?-1:1,d=T(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var fe=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await de(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},pe=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=T(e,t),l={x:n,y:r},u=await U(t,c),d=j(E(i)),f=O(d),p=l[f],m=l[d];if(a){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=p+u[e],r=p-u[t];p=w(n,p,r)}if(o){let e=d===`y`?`top`:`left`,t=d===`y`?`bottom`:`right`,n=m+u[e],r=m-u[t];m=w(n,m,r)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:o}}}}}},me=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=T(e,t),u={x:n,y:r},d=j(i),f=O(d),p=u[f],m=u[d],h=T(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=ue.has(E(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},he=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=T(e,t),u=await U(t,l),d=E(i),f=D(i),p=j(i)===`y`,{width:m,height:h}=a.floating,g,y;d===`top`||d===`bottom`?(g=d,y=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(y=d,g=f===`end`?`top`:`bottom`);let b=h-u.top-u.bottom,x=m-u.left-u.right,S=_(h-u[g],b),C=_(m-u[y],x),w=!t.middlewareData.shift,O=S,k=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=b),w&&!f){let e=v(u.left,0),t=v(u.right,0),n=v(u.top,0),r=v(u.bottom,0);p?k=m-2*(e!==0||t!==0?e+t:v(u.left,u.right)):O=h-2*(n!==0||r!==0?n+r:v(u.top,u.bottom))}await c({...t,availableWidth:k,availableHeight:O});let A=await o.getDimensions(s.floating);return m!==A.width||h!==A.height?{reset:{rects:!0}}:{}}}};function ge(){return typeof window<`u`}function W(e){return _e(e)?(e.nodeName||``).toLowerCase():`#document`}function G(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function K(e){return((_e(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function _e(e){return ge()?e instanceof Node||e instanceof G(e).Node:!1}function q(e){return ge()?e instanceof Element||e instanceof G(e).Element:!1}function J(e){return ge()?e instanceof HTMLElement||e instanceof G(e).HTMLElement:!1}function ve(e){return!ge()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof G(e).ShadowRoot}var ye=new Set([`inline`,`contents`]);function be(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!ye.has(i)}var xe=new Set([`table`,`td`,`th`]);function Se(e){return xe.has(W(e))}var Ce=[`:popover-open`,`:modal`];function we(e){return Ce.some(t=>{try{return e.matches(t)}catch{return!1}})}var Te=[`transform`,`translate`,`scale`,`rotate`,`perspective`],Ee=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],De=[`paint`,`layout`,`strict`,`content`];function Oe(e){let t=Ae(),n=q(e)?X(e):e;return Te.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||Ee.some(e=>(n.willChange||``).includes(e))||De.some(e=>(n.contain||``).includes(e))}function ke(e){let t=Z(e);for(;J(t)&&!Y(t);){if(Oe(t))return t;if(we(t))return null;t=Z(t)}return null}function Ae(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var je=new Set([`html`,`body`,`#document`]);function Y(e){return je.has(W(e))}function X(e){return G(e).getComputedStyle(e)}function Me(e){return q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Z(e){if(W(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ve(e)&&e.host||K(e);return ve(t)?t.host:t}function Ne(e){let t=Z(e);return Y(t)?e.ownerDocument?e.ownerDocument.body:e.body:J(t)&&be(t)?t:Ne(t)}function Pe(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ne(e),i=r===e.ownerDocument?.body,a=G(r);if(i){let e=Fe(a);return t.concat(a,a.visualViewport||[],be(r)?r:[],e&&n?Pe(e):[])}return t.concat(r,Pe(r,[],n))}function Fe(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ie(e){let t=X(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=J(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=y(n)!==a||y(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Le(e){return q(e)?e:e.contextElement}function Q(e){let t=Le(e);if(!J(t))return x(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ie(t),o=(a?y(n.width):n.width)/r,s=(a?y(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Re=x(0);function ze(e){let t=G(e);return!Ae()||!t.visualViewport?Re:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Be(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==G(e)?!1:t}function $(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Le(e),o=x(1);t&&(r?q(r)&&(o=Q(r)):o=Q(e));let s=Be(a,n,r)?ze(a):x(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=G(a),t=r&&q(r)?G(r):r,n=e,i=Fe(n);for(;i&&r&&t!==n;){let e=Q(i),t=i.getBoundingClientRect(),r=X(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=G(i),i=Fe(n)}}return ne({width:u,height:d,x:c,y:l})}function Ve(e,t){let n=Me(e).scrollLeft;return t?t.left+n:$(K(e)).left+n}function He(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ve(e,n),y:n.top+t.scrollTop}}function Ue(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=K(r),s=t?we(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=x(1),u=x(0),d=J(r);if((d||!d&&!a)&&((W(r)!==`body`||be(o))&&(c=Me(r)),J(r))){let e=$(r);l=Q(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?He(o,c):x(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function We(e){return Array.from(e.getClientRects())}function Ge(e){let t=K(e),n=Me(e),r=e.ownerDocument.body,i=v(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=v(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Ve(e),s=-n.scrollTop;return X(r).direction===`rtl`&&(o+=v(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Ke=25;function qe(e,t){let n=G(e),r=K(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Ae();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Ve(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Ke&&(a-=o)}else l<=Ke&&(a+=l);return{width:a,height:o,x:s,y:c}}var Je=new Set([`absolute`,`fixed`]);function Ye(e,t){let n=$(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=J(e)?Q(e):x(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Xe(e,t,n){let r;if(t===`viewport`)r=qe(e,n);else if(t===`document`)r=Ge(K(e));else if(q(t))r=Ye(t,n);else{let n=ze(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ne(r)}function Ze(e,t){let n=Z(e);return n===t||!q(n)||Y(n)?!1:X(n).position===`fixed`||Ze(n,t)}function Qe(e,t){let n=t.get(e);if(n)return n;let r=Pe(e,[],!1).filter(e=>q(e)&&W(e)!==`body`),i=null,a=X(e).position===`fixed`,o=a?Z(e):e;for(;q(o)&&!Y(o);){let t=X(o),n=Oe(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&Je.has(i.position)||be(o)&&!n&&Ze(e,o))?r=r.filter(e=>e!==o):i=t,o=Z(o)}return t.set(e,r),r}function $e(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?we(t)?[]:Qe(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=Xe(t,n,i);return e.top=v(r.top,e.top),e.right=_(r.right,e.right),e.bottom=_(r.bottom,e.bottom),e.left=v(r.left,e.left),e},Xe(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function et(e){let{width:t,height:n}=Ie(e);return{width:t,height:n}}function tt(e,t,n){let r=J(t),i=K(t),a=n===`fixed`,o=$(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=x(0);function l(){c.x=Ve(i)}if(r||!r&&!a)if((W(t)!==`body`||be(i))&&(s=Me(t)),r){let e=$(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?He(i,s):x(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function nt(e){return X(e).position===`static`}function rt(e,t){if(!J(e)||X(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return K(e)===n&&(n=n.ownerDocument.body),n}function it(e,t){let n=G(e);if(we(e))return n;if(!J(e)){let t=Z(e);for(;t&&!Y(t);){if(q(t)&&!nt(t))return t;t=Z(t)}return n}let r=rt(e,t);for(;r&&Se(r)&&nt(r);)r=rt(r,t);return r&&Y(r)&&nt(r)&&!Oe(r)?n:r||ke(e)||n}var at=async function(e){let t=this.getOffsetParent||it,n=this.getDimensions,r=await n(e.floating);return{reference:tt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ot(e){return X(e).direction===`rtl`}var st={convertOffsetParentRelativeRectToViewportRelativeRect:Ue,getDocumentElement:K,getClippingRect:$e,getOffsetParent:it,getElementRects:at,getClientRects:We,getDimensions:et,getScale:Q,isElement:q,isRTL:ot};function ct(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function lt(e,t){let n=null,r,i=K(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=b(d),h=b(i.clientWidth-(u+f)),g=b(i.clientHeight-(d+p)),y=b(u),x={rootMargin:-m+`px `+-h+`px `+-g+`px `+-y+`px`,threshold:v(0,_(1,c))||1},S=!0;function C(t){let n=t[0].intersectionRatio;if(n!==c){if(!S)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!ct(l,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(C,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,x)}n.observe(e)}return o(!0),a}function ut(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Le(e),u=i||a?[...l?Pe(l):[],...Pe(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?lt(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?$(e):null;c&&g();function g(){let t=$(e);h&&!ct(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var dt=fe,ft=pe,pt=oe,mt=he,ht=le,gt=ae,_t=me,vt=(e,t,n)=>{let r=new Map,i={platform:st,...n},a={...i.platform,_c:r};return ie(e,t,{...i,platform:a})},yt=e(r(),1),bt=typeof document<`u`?u.useLayoutEffect:function(){};function xt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!xt(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!xt(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function St(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ct(e,t){let n=St(e);return Math.round(t*n)/n}function wt(e){let t=u.useRef(e);return bt(()=>{t.current=e}),t}function Tt(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[d,f]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=u.useState(r);xt(p,r)||m(r);let[h,g]=u.useState(null),[_,v]=u.useState(null),y=u.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=u.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=u.useRef(null),w=u.useRef(null),T=u.useRef(d),E=c!=null,D=wt(c),O=wt(i),k=wt(l),A=u.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:p};O.current&&(e.platform=O.current),vt(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!xt(T.current,t)&&(T.current=t,yt.flushSync(()=>{f(t)}))})},[p,t,n,O,k]);bt(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[l]);let j=u.useRef(!1);bt(()=>(j.current=!0,()=>{j.current=!1}),[]),bt(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=u.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=u.useMemo(()=>({reference:x,floating:S}),[x,S]),P=u.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=Ct(N.floating,d.x),r=Ct(N.floating,d.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...St(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,d.x,d.y]);return u.useMemo(()=>({...d,update:A,refs:M,elements:N,floatingStyles:P}),[d,A,M,N,P])}var Et=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:gt({element:r.current,padding:i}).fn(n):r?gt({element:r,padding:i}).fn(n):{}}}},Dt=(e,t)=>({...dt(e),options:[e,t]}),Ot=(e,t)=>({...ft(e),options:[e,t]}),kt=(e,t)=>({..._t(e),options:[e,t]}),At=(e,t)=>({...pt(e),options:[e,t]}),jt=(e,t)=>({...mt(e),options:[e,t]}),Mt=(e,t)=>({...ht(e),options:[e,t]}),Nt=(e,t)=>({...Et(e),options:[e,t]}),Pt=`Arrow`,Ft=u.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...o}=e;return(0,d.jsx)(a.svg,{...o,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,d.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Ft.displayName=Pt;var It=Ft,Lt=`Popper`,[Rt,zt]=o(Lt),[Bt,Vt]=Rt(Lt),Ht=e=>{let{__scopePopper:t,children:n}=e,[r,i]=u.useState(null);return(0,d.jsx)(Bt,{scope:t,anchor:r,onAnchorChange:i,children:n})};Ht.displayName=Lt;var Ut=`PopperAnchor`,Wt=u.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...o}=e,s=Vt(Ut,n),c=u.useRef(null),l=i(t,c),f=u.useRef(null);return u.useEffect(()=>{let e=f.current;f.current=r?.current||c.current,e!==f.current&&s.onAnchorChange(f.current)}),r?null:(0,d.jsx)(a.div,{...o,ref:l})});Wt.displayName=Ut;var Gt=`PopperContent`,[Kt,qt]=Rt(Gt),Jt=u.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:o=0,align:f=`center`,alignOffset:p=0,arrowPadding:m=0,avoidCollisions:h=!0,collisionBoundary:g=[],collisionPadding:_=0,sticky:v=`partial`,hideWhenDetached:y=!1,updatePositionStrategy:b=`optimized`,onPlaced:x,...S}=e,C=Vt(Gt,n),[w,T]=u.useState(null),E=i(t,e=>T(e)),[D,O]=u.useState(null),k=l(D),A=k?.width??0,j=k?.height??0,M=r+(f===`center`?``:`-`+f),N=typeof _==`number`?_:{top:0,right:0,bottom:0,left:0,..._},P=Array.isArray(g)?g:[g],F=P.length>0,I={padding:N,boundary:P.filter(Qt),altBoundary:F},{refs:L,floatingStyles:R,placement:z,isPositioned:B,middlewareData:V}=Tt({strategy:`fixed`,placement:M,whileElementsMounted:(...e)=>ut(...e,{animationFrame:b===`always`}),elements:{reference:C.anchor},middleware:[Dt({mainAxis:o+j,alignmentAxis:p}),h&&Ot({mainAxis:!0,crossAxis:!1,limiter:v===`partial`?kt():void 0,...I}),h&&At({...I}),jt({...I,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),D&&Nt({element:D,padding:m}),$t({arrowWidth:A,arrowHeight:j}),y&&Mt({strategy:`referenceHidden`,...I})]}),[H,ee]=en(z),te=c(x);s(()=>{B&&te?.()},[B,te]);let ne=V.arrow?.x,re=V.arrow?.y,ie=V.arrow?.centerOffset!==0,[U,ae]=u.useState();return s(()=>{w&&ae(window.getComputedStyle(w).zIndex)},[w]),(0,d.jsx)(`div`,{ref:L.setFloating,"data-radix-popper-content-wrapper":``,style:{...R,transform:B?R.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:U,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(` `),...V.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,d.jsx)(Kt,{scope:n,placedSide:H,onArrowChange:O,arrowX:ne,arrowY:re,shouldHideArrow:ie,children:(0,d.jsx)(a.div,{"data-side":H,"data-align":ee,...S,ref:E,style:{...S.style,animation:B?void 0:`none`}})})})});Jt.displayName=Gt;var Yt=`PopperArrow`,Xt={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Zt=u.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=qt(Yt,n),a=Xt[i.placedSide];return(0,d.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,d.jsx)(It,{...r,ref:t,style:{...r.style,display:`block`}})})});Zt.displayName=Yt;function Qt(e){return e!==null}var $t=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=en(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function en(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var tn=Ht,nn=Wt,rn=Jt,an=Zt;export{zt as a,tn as i,an as n,h as o,rn as r,f as s,nn as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./chunk-vBKQ29Cd.js";import{n as t,t as n}from"./jsx-runtime-SCjaiuzT.js";var r=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),i=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),a=e=>{let t=i(e);return t.charAt(0).toUpperCase()+t.slice(1)},o=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),s=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},c={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},l=t(),u=(0,l.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:u,...d},f)=>(0,l.createElement)(`svg`,{ref:f,...c,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:o(`lucide`,i),...!a&&!s(d)&&{"aria-hidden":`true`},...d},[...u.map(([e,t])=>(0,l.createElement)(e,t)),...Array.isArray(a)?a:[a]])),d=(e,t)=>{let n=(0,l.forwardRef)(({className:n,...i},s)=>(0,l.createElement)(u,{ref:s,iconNode:t,className:o(`lucide-${r(a(e))}`,`lucide-${e}`,n),...i}));return n.displayName=a(e),n};function f(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function p(...e){return t=>{let n=!1,r=e.map(e=>{let r=f(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():f(e[t],null)}}}}function m(...e){return l.useCallback(p(...e),e)}var h=n();function g(e){let t=v(e),n=l.forwardRef((e,n)=>{let{children:r,...i}=e,a=l.Children.toArray(r),o=a.find(x);if(o){let e=o.props.children,r=a.map(t=>t===o?l.Children.count(e)>1?l.Children.only(null):l.isValidElement(e)?e.props.children:null:t);return(0,h.jsx)(t,{...i,ref:n,children:l.isValidElement(e)?l.cloneElement(e,void 0,r):null})}return(0,h.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var _=g(`Slot`);function v(e){let t=l.forwardRef((e,t)=>{let{children:n,...r}=e;if(l.isValidElement(n)){let e=C(n),i=S(r,n.props);return n.type!==l.Fragment&&(i.ref=t?p(t,e):e),l.cloneElement(n,i)}return l.Children.count(n)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var y=Symbol(`radix.slottable`);function b(e){let t=({children:e})=>(0,h.jsx)(h.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=y,t}function x(e){return l.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===y}function S(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function C(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}export{m as a,p as i,g as n,d as o,b as r,_ as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./chunk-vBKQ29Cd.js";import{n as t}from"./jsx-runtime-SCjaiuzT.js";var n=e(t(),1);function r(e){let t=n.useRef({value:e,previous:e});return n.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./utils-InBzhUf_.js";var t=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e;const n=e,r=(e,r)=>i=>{if(r?.variants==null)return n(e,i?.class,i?.className);let{variants:a,defaultVariants:o}=r,s=Object.keys(a).map(e=>{let n=i?.[e],r=o?.[e];if(n===null)return null;let s=t(n)||t(r);return a[e][s]}),c=i&&Object.entries(i).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return n(e,s,r?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...i}=t;return Object.entries(i).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...o,...c}[t]):{...o,...c}[t]===n})?[...e,n,r]:e},[]),i?.class,i?.className)};export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./chunk-vBKQ29Cd.js";import{n as t}from"./jsx-runtime-SCjaiuzT.js";import{n}from"./dist-DhfcebhF.js";var r=e(t(),1);function i(e){let[t,i]=r.useState(void 0);return n(()=>{if(e){i({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let n=t[0],r,a;if(`borderBoxSize`in n){let e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,a=t.blockSize}else r=e.offsetWidth,a=e.offsetHeight;i({width:r,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else i(void 0)},[e]),t}export{i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./chunk-vBKQ29Cd.js";import{n as t,t as n}from"./jsx-runtime-SCjaiuzT.js";import{a as r,n as i}from"./dist-BWnI-4xl.js";import{a}from"./dist-DhfcebhF.js";var o=e(t(),1),s=n();function c(e){let t=e+`CollectionProvider`,[n,c]=a(t),[l,u]=n(t,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:t,children:n}=e,r=o.useRef(null),i=o.useRef(new Map).current;return(0,s.jsx)(l,{scope:t,itemMap:i,collectionRef:r,children:n})};d.displayName=t;let f=e+`CollectionSlot`,p=i(f),m=o.forwardRef((e,t)=>{let{scope:n,children:i}=e;return(0,s.jsx)(p,{ref:r(t,u(f,n).collectionRef),children:i})});m.displayName=f;let h=e+`CollectionItemSlot`,g=`data-radix-collection-item`,_=i(h),v=o.forwardRef((e,t)=>{let{scope:n,children:i,...a}=e,c=o.useRef(null),l=r(t,c),d=u(h,n);return o.useEffect(()=>(d.itemMap.set(c,{ref:c,...a}),()=>void d.itemMap.delete(c))),(0,s.jsx)(_,{[g]:``,ref:l,children:i})});v.displayName=h;function y(t){let n=u(e+`CollectionConsumer`,t);return o.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:d,Slot:m,ItemSlot:v},y,c]}var l=o.createContext(void 0);function u(e){let t=o.useContext(l);return e||t||`ltr`}export{c as n,u as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./chunk-vBKQ29Cd.js";import{n as t,t as n}from"./jsx-runtime-SCjaiuzT.js";var r=e(t(),1),i=n();function a(e,t){let n=r.createContext(t),a=e=>{let{children:t,...a}=e,o=r.useMemo(()=>a,Object.values(a));return(0,i.jsx)(n.Provider,{value:o,children:t})};a.displayName=e+`Provider`;function o(i){let a=r.useContext(n);if(a)return a;if(t!==void 0)return t;throw Error(`\`${i}\` must be used within \`${e}\``)}return[a,o]}function o(e,t=[]){let n=[];function a(t,a){let o=r.createContext(a),s=n.length;n=[...n,a];let c=t=>{let{scope:n,children:a,...c}=t,l=n?.[e]?.[s]||o,u=r.useMemo(()=>c,Object.values(c));return(0,i.jsx)(l.Provider,{value:u,children:a})};c.displayName=t+`Provider`;function l(n,i){let c=i?.[e]?.[s]||o,l=r.useContext(c);if(l)return l;if(a!==void 0)return a;throw Error(`\`${n}\` must be used within \`${t}\``)}return[c,l]}let o=()=>{let t=n.map(e=>r.createContext(e));return function(n){let i=n?.[e]||t;return r.useMemo(()=>({[`__scope${e}`]:{...n,[e]:i}}),[n,i])}};return o.scopeName=e,[a,s(o,...t)]}function s(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}typeof window<`u`&&window.document&&window.document.createElement;function c(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var l=globalThis?.document?r.useLayoutEffect:()=>{},u=r.useInsertionEffect||l;function d({prop:e,defaultProp:t,onChange:n=()=>{},caller:i}){let[a,o,s]=f({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:a;{let t=r.useRef(e!==void 0);r.useEffect(()=>{let e=t.current;if(e!==c){let t=e?`controlled`:`uncontrolled`,n=c?`controlled`:`uncontrolled`;console.warn(`${i} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=c},[c,i])}return[l,r.useCallback(t=>{if(c){let n=p(t)?t(e):t;n!==e&&s.current?.(n)}else o(t)},[c,e,o,s])]}function f({defaultProp:e,onChange:t}){let[n,i]=r.useState(e),a=r.useRef(n),o=r.useRef(t);return u(()=>{o.current=t},[t]),r.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,i,o]}function p(e){return typeof e==`function`}export{o as a,a as i,l as n,c as r,d as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./chunk-vBKQ29Cd.js";import{n as t}from"./jsx-runtime-SCjaiuzT.js";import{a as n}from"./dist-BWnI-4xl.js";import{n as r}from"./dist-DhfcebhF.js";var i=e(t(),1);function a(e,t){return i.useReducer((e,n)=>t[e][n]??e,e)}var o=e=>{let{present:t,children:r}=e,a=s(t),o=typeof r==`function`?r({present:a.isPresent}):i.Children.only(r),c=n(a.ref,l(o));return typeof r==`function`||a.isPresent?i.cloneElement(o,{ref:c}):null};o.displayName=`Presence`;function s(e){let[t,n]=i.useState(),o=i.useRef(null),s=i.useRef(e),l=i.useRef(`none`),[u,d]=a(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return i.useEffect(()=>{let e=c(o.current);l.current=u===`mounted`?e:`none`},[u]),r(()=>{let t=o.current,n=s.current;if(n!==e){let r=l.current,i=c(t);e?d(`MOUNT`):i===`none`||t?.display===`none`?d(`UNMOUNT`):d(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),s.current=e}},[e,d]),r(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,r=r=>{let i=c(o.current).includes(CSS.escape(r.animationName));if(r.target===t&&i&&(d(`ANIMATION_END`),!s.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},i=e=>{e.target===t&&(l.current=c(o.current))};return t.addEventListener(`animationstart`,i),t.addEventListener(`animationcancel`,r),t.addEventListener(`animationend`,r),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,i),t.removeEventListener(`animationcancel`,r),t.removeEventListener(`animationend`,r)}}else d(`ANIMATION_END`)},[t,d]),{isPresent:[`mounted`,`unmountSuspended`].includes(u),ref:i.useCallback(e=>{o.current=e?getComputedStyle(e):null,n(e)},[])}}function c(e){return e?.animationName||`none`}function l(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}export{o as t};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{i as e}from"./chunk-vBKQ29Cd.js";import{n as t,t as n}from"./jsx-runtime-SCjaiuzT.js";import{a as r,n as i}from"./dist-BWnI-4xl.js";import{t as a}from"./dist-B6TkSbxV.js";import{a as o,i as s,r as c,t as l}from"./dist-DhfcebhF.js";import{t as u}from"./dist-VqaKdvZu.js";import{a as d,c as f,i as p,n as m,o as h,r as g,t as _}from"./es2015-BJguufLZ.js";var v=e(t(),1),y=n(),b=`Dialog`,[x,S]=o(b),[C,w]=x(b),T=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),c=v.useRef(null),[u,d]=l({prop:r,defaultProp:i??!1,onChange:a,caller:b});return(0,y.jsx)(C,{scope:t,triggerRef:s,contentRef:c,contentId:f(),titleId:f(),descriptionId:f(),open:u,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(e=>!e),[d]),modal:o,children:n})};T.displayName=b;var E=`DialogTrigger`,D=v.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,o=w(E,n),s=r(t,o.triggerRef);return(0,y.jsx)(a.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":o.open,"aria-controls":o.contentId,"data-state":q(o.open),...i,ref:s,onClick:c(e.onClick,o.onOpenToggle)})});D.displayName=E;var O=`DialogPortal`,[k,A]=x(O,{forceMount:void 0}),j=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=w(O,t);return(0,y.jsx)(k,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,y.jsx)(u,{present:n||a.open,children:(0,y.jsx)(p,{asChild:!0,container:i,children:e})}))})};j.displayName=O;var M=`DialogOverlay`,N=v.forwardRef((e,t)=>{let n=A(M,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=w(M,e.__scopeDialog);return a.modal?(0,y.jsx)(u,{present:r||a.open,children:(0,y.jsx)(F,{...i,ref:t})}):null});N.displayName=M;var P=i(`DialogOverlay.RemoveScroll`),F=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(M,n);return(0,y.jsx)(m,{as:P,allowPinchZoom:!0,shards:[i.contentRef],children:(0,y.jsx)(a.div,{"data-state":q(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),I=`DialogContent`,L=v.forwardRef((e,t)=>{let n=A(I,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=w(I,e.__scopeDialog);return(0,y.jsx)(u,{present:r||a.open,children:a.modal?(0,y.jsx)(R,{...i,ref:t}):(0,y.jsx)(z,{...i,ref:t})})});L.displayName=I;var R=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),i=v.useRef(null),a=r(t,n.contentRef,i);return v.useEffect(()=>{let e=i.current;if(e)return _(e)},[]),(0,y.jsx)(B,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:c(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:c(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:c(e.onFocusOutside,e=>e.preventDefault())})}),z=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,y.jsx)(B,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),B=v.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,...s}=e,c=w(I,n),l=v.useRef(null),u=r(t,l);return g(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(d,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,y.jsx)(h,{role:`dialog`,id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":q(c.open),...s,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Z,{titleId:c.titleId}),(0,y.jsx)($,{contentRef:l,descriptionId:c.descriptionId})]})]})}),V=`DialogTitle`,H=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(V,n);return(0,y.jsx)(a.h2,{id:i.titleId,...r,ref:t})});H.displayName=V;var U=`DialogDescription`,W=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(U,n);return(0,y.jsx)(a.p,{id:i.descriptionId,...r,ref:t})});W.displayName=U;var G=`DialogClose`,K=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(G,n);return(0,y.jsx)(a.button,{type:`button`,...r,ref:t,onClick:c(e.onClick,()=>i.onOpenChange(!1))})});K.displayName=G;function q(e){return e?`open`:`closed`}var J=`DialogTitleWarning`,[Y,X]=s(J,{contentName:I,titleName:V,docsSlug:`dialog`}),Z=({titleId:e})=>{let t=X(J),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2
|
+
|
|
3
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4
|
+
|
|
5
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Q=`DialogDescriptionWarning`,$=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${X(Q).contentName}}.`;return v.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},ee=T,te=D,ne=j,re=N,ie=L,ae=H,oe=W,se=K;export{ne as a,te as c,re as i,Y as l,ie as n,ee as o,oe as r,ae as s,se as t,S as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./chunk-vBKQ29Cd.js";import{n as t,t as n}from"./jsx-runtime-SCjaiuzT.js";import{t as r}from"./compiler-runtime-Co9svCia.js";import{a as i,i as a,n as o}from"./dist-BWnI-4xl.js";import{t as s}from"./utils-InBzhUf_.js";import{n as c,t as l}from"./dist-B6TkSbxV.js";import{a as u,i as d,n as f,r as p,t as m}from"./dist-BNO39Rfs.js";import{a as h,r as g,t as _}from"./dist-DhfcebhF.js";import{n as v,t as y}from"./dist-DKtC0FSi.js";import{t as b}from"./dist-VqaKdvZu.js";import{a as ee,c as x,i as S,n as C,o as te,r as w,s as T,t as ne}from"./es2015-BJguufLZ.js";var E=e(t(),1),D=n(),O=`rovingFocusGroup.onEntryFocus`,k={bubbles:!1,cancelable:!0},A=`RovingFocusGroup`,[j,M,re]=v(A),[N,P]=h(A,[re]),[F,ie]=N(A),I=E.forwardRef((e,t)=>(0,D.jsx)(j.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,D.jsx)(j.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,D.jsx)(ae,{...e,ref:t})})}));I.displayName=A;var ae=E.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,m=E.useRef(null),h=i(t,m),v=y(o),[b,ee]=_({prop:s,defaultProp:c??null,onChange:u,caller:A}),[x,S]=E.useState(!1),C=T(d),te=M(n),w=E.useRef(!1),[ne,j]=E.useState(0);return E.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(O,C),()=>e.removeEventListener(O,C)},[C]),(0,D.jsx)(F,{scope:n,orientation:r,dir:v,loop:a,currentTabStopId:b,onItemFocus:E.useCallback(e=>ee(e),[ee]),onItemShiftTab:E.useCallback(()=>S(!0),[]),onFocusableItemAdd:E.useCallback(()=>j(e=>e+1),[]),onFocusableItemRemove:E.useCallback(()=>j(e=>e-1),[]),children:(0,D.jsx)(l.div,{tabIndex:x||ne===0?-1:0,"data-orientation":r,...p,ref:h,style:{outline:`none`,...e.style},onMouseDown:g(e.onMouseDown,()=>{w.current=!0}),onFocus:g(e.onFocus,e=>{let t=!w.current;if(e.target===e.currentTarget&&t&&!x){let t=new CustomEvent(O,k);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=te().filter(e=>e.focusable);ue([e.find(e=>e.active),e.find(e=>e.id===b),...e].filter(Boolean).map(e=>e.ref.current),f)}}w.current=!1}),onBlur:g(e.onBlur,()=>S(!1))})})}),L=`RovingFocusGroupItem`,oe=E.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=x(),u=a||c,d=ie(L,n),f=d.currentTabStopId===u,p=M(n),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:_}=d;return E.useEffect(()=>{if(r)return m(),()=>h()},[r,m,h]),(0,D.jsx)(j.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:(0,D.jsx)(l.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:g(e.onMouseDown,e=>{r?d.onItemFocus(u):e.preventDefault()}),onFocus:g(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:g(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){d.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=le(e,d.orientation,d.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=p().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=d.loop?de(n,r+1):n.slice(r+1)}setTimeout(()=>ue(n))}}),children:typeof o==`function`?o({isCurrentTabStop:f,hasTabStop:_!=null}):o})})});oe.displayName=L;var se={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function ce(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function le(e,t,n){let r=ce(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return se[r]}function ue(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function de(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var fe=I,pe=oe,R=[`Enter`,` `],me=[`ArrowDown`,`PageUp`,`Home`],he=[`ArrowUp`,`PageDown`,`End`],ge=[...me,...he],_e={ltr:[...R,`ArrowRight`],rtl:[...R,`ArrowLeft`]},ve={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},z=`Menu`,[B,ye,be]=v(z),[V,xe]=h(z,[be,u,P]),H=u(),Se=P(),[Ce,U]=V(z),[we,W]=V(z),Te=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=H(t),[c,l]=E.useState(null),u=E.useRef(!1),f=T(a),p=y(i);return E.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,D.jsx)(d,{...s,children:(0,D.jsx)(Ce,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:l,children:(0,D.jsx)(we,{scope:t,onClose:E.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:p,modal:o,children:r})})})};Te.displayName=z;var Ee=`MenuAnchor`,De=E.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=H(n);return(0,D.jsx)(m,{...i,...r,ref:t})});De.displayName=Ee;var Oe=`MenuPortal`,[ke,Ae]=V(Oe,{forceMount:void 0}),je=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=U(Oe,t);return(0,D.jsx)(ke,{scope:t,forceMount:n,children:(0,D.jsx)(b,{present:n||a.open,children:(0,D.jsx)(S,{asChild:!0,container:i,children:r})})})};je.displayName=Oe;var G=`MenuContent`,[Me,Ne]=V(G),Pe=E.forwardRef((e,t)=>{let n=Ae(G,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=U(G,e.__scopeMenu),o=W(G,e.__scopeMenu);return(0,D.jsx)(B.Provider,{scope:e.__scopeMenu,children:(0,D.jsx)(b,{present:r||a.open,children:(0,D.jsx)(B.Slot,{scope:e.__scopeMenu,children:o.modal?(0,D.jsx)(Fe,{...i,ref:t}):(0,D.jsx)(Ie,{...i,ref:t})})})})}),Fe=E.forwardRef((e,t)=>{let n=U(G,e.__scopeMenu),r=E.useRef(null),a=i(t,r);return E.useEffect(()=>{let e=r.current;if(e)return ne(e)},[]),(0,D.jsx)(Re,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:g(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Ie=E.forwardRef((e,t)=>{let n=U(G,e.__scopeMenu);return(0,D.jsx)(Re,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Le=o(`MenuContent.ScrollLock`),Re=E.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:h,disableOutsideScroll:_,...v}=e,y=U(G,n),b=W(G,n),x=H(n),S=Se(n),T=ye(n),[ne,O]=E.useState(null),k=E.useRef(null),A=i(t,k,y.onContentChange),j=E.useRef(0),M=E.useRef(``),re=E.useRef(0),N=E.useRef(null),P=E.useRef(`right`),F=E.useRef(0),ie=_?C:E.Fragment,I=_?{as:Le,allowPinchZoom:!0}:void 0,ae=e=>{let t=M.current+e,n=T().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=vt(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){M.current=t,window.clearTimeout(j.current),t!==``&&(j.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};E.useEffect(()=>()=>window.clearTimeout(j.current),[]),w();let L=E.useCallback(e=>P.current===N.current?.side&&bt(e,N.current?.area),[]);return(0,D.jsx)(Me,{scope:n,searchRef:M,onItemEnter:E.useCallback(e=>{L(e)&&e.preventDefault()},[L]),onItemLeave:E.useCallback(e=>{L(e)||(k.current?.focus(),O(null))},[L]),onTriggerLeave:E.useCallback(e=>{L(e)&&e.preventDefault()},[L]),pointerGraceTimerRef:re,onPointerGraceIntentChange:E.useCallback(e=>{N.current=e},[]),children:(0,D.jsx)(ie,{...I,children:(0,D.jsx)(ee,{asChild:!0,trapped:a,onMountAutoFocus:g(o,e=>{e.preventDefault(),k.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,D.jsx)(te,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:h,children:(0,D.jsx)(fe,{asChild:!0,...S,dir:b.dir,orientation:`vertical`,loop:r,currentTabStopId:ne,onCurrentTabStopIdChange:O,onEntryFocus:g(l,e=>{b.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,D.jsx)(p,{role:`menu`,"aria-orientation":`vertical`,"data-state":mt(y.open),"data-radix-menu-content":``,dir:b.dir,...x,...v,ref:A,style:{outline:`none`,...v.style},onKeyDown:g(v.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&ae(e.key));let i=k.current;if(e.target!==i||!ge.includes(e.key))return;e.preventDefault();let a=T().filter(e=>!e.disabled).map(e=>e.ref.current);he.includes(e.key)&&a.reverse(),gt(a)}),onBlur:g(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(j.current),M.current=``)}),onPointerMove:g(e.onPointerMove,X(e=>{let t=e.target,n=F.current!==e.clientX;e.currentTarget.contains(t)&&n&&(P.current=e.clientX>F.current?`right`:`left`,F.current=e.clientX)}))})})})})})})});Pe.displayName=G;var ze=`MenuGroup`,Be=E.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,D.jsx)(l.div,{role:`group`,...r,ref:t})});Be.displayName=ze;var Ve=`MenuLabel`,He=E.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,D.jsx)(l.div,{...r,ref:t})});He.displayName=Ve;var K=`MenuItem`,Ue=`menu.itemSelect`,q=E.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...a}=e,o=E.useRef(null),s=W(K,e.__scopeMenu),l=Ne(K,e.__scopeMenu),u=i(t,o),d=E.useRef(!1),f=()=>{let e=o.current;if(!n&&e){let t=new CustomEvent(Ue,{bubbles:!0,cancelable:!0});e.addEventListener(Ue,e=>r?.(e),{once:!0}),c(e,t),t.defaultPrevented?d.current=!1:s.onClose()}};return(0,D.jsx)(We,{...a,ref:u,disabled:n,onClick:g(e.onClick,f),onPointerDown:t=>{e.onPointerDown?.(t),d.current=!0},onPointerUp:g(e.onPointerUp,e=>{d.current||e.currentTarget?.click()}),onKeyDown:g(e.onKeyDown,e=>{let t=l.searchRef.current!==``;n||t&&e.key===` `||R.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});q.displayName=K;var We=E.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:a,...o}=e,s=Ne(K,n),c=Se(n),u=E.useRef(null),d=i(t,u),[f,p]=E.useState(!1),[m,h]=E.useState(``);return E.useEffect(()=>{let e=u.current;e&&h((e.textContent??``).trim())},[o.children]),(0,D.jsx)(B.ItemSlot,{scope:n,disabled:r,textValue:a??m,children:(0,D.jsx)(pe,{asChild:!0,...c,focusable:!r,children:(0,D.jsx)(l.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...o,ref:d,onPointerMove:g(e.onPointerMove,X(e=>{r?s.onItemLeave(e):(s.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:g(e.onPointerLeave,X(e=>s.onItemLeave(e))),onFocus:g(e.onFocus,()=>p(!0)),onBlur:g(e.onBlur,()=>p(!1))})})})}),Ge=`MenuCheckboxItem`,Ke=E.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,D.jsx)(et,{scope:e.__scopeMenu,checked:n,children:(0,D.jsx)(q,{role:`menuitemcheckbox`,"aria-checked":Y(n)?`mixed`:n,...i,ref:t,"data-state":ht(n),onSelect:g(i.onSelect,()=>r?.(Y(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ke.displayName=Ge;var qe=`MenuRadioGroup`,[Je,Ye]=V(qe,{value:void 0,onValueChange:()=>{}}),Xe=E.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=T(r);return(0,D.jsx)(Je,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,D.jsx)(Be,{...i,ref:t})})});Xe.displayName=qe;var Ze=`MenuRadioItem`,Qe=E.forwardRef((e,t)=>{let{value:n,...r}=e,i=Ye(Ze,e.__scopeMenu),a=n===i.value;return(0,D.jsx)(et,{scope:e.__scopeMenu,checked:a,children:(0,D.jsx)(q,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":ht(a),onSelect:g(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Qe.displayName=Ze;var $e=`MenuItemIndicator`,[et,tt]=V($e,{checked:!1}),nt=E.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=tt($e,n);return(0,D.jsx)(b,{present:r||Y(a.checked)||a.checked===!0,children:(0,D.jsx)(l.span,{...i,ref:t,"data-state":ht(a.checked)})})});nt.displayName=$e;var rt=`MenuSeparator`,it=E.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,D.jsx)(l.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});it.displayName=rt;var at=`MenuArrow`,ot=E.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=H(n);return(0,D.jsx)(f,{...i,...r,ref:t})});ot.displayName=at;var st=`MenuSub`,[ct,lt]=V(st),ut=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=U(st,t),o=H(t),[s,c]=E.useState(null),[l,u]=E.useState(null),f=T(i);return E.useEffect(()=>(a.open===!1&&f(!1),()=>f(!1)),[a.open,f]),(0,D.jsx)(d,{...o,children:(0,D.jsx)(Ce,{scope:t,open:r,onOpenChange:f,content:l,onContentChange:u,children:(0,D.jsx)(ct,{scope:t,contentId:x(),triggerId:x(),trigger:s,onTriggerChange:c,children:n})})})};ut.displayName=st;var J=`MenuSubTrigger`,dt=E.forwardRef((e,t)=>{let n=U(J,e.__scopeMenu),r=W(J,e.__scopeMenu),i=lt(J,e.__scopeMenu),o=Ne(J,e.__scopeMenu),s=E.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=o,u={__scopeMenu:e.__scopeMenu},d=E.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return E.useEffect(()=>d,[d]),E.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),l(null)}},[c,l]),(0,D.jsx)(De,{asChild:!0,...u,children:(0,D.jsx)(We,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":mt(n.open),...e,ref:a(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:g(e.onPointerMove,X(t=>{o.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:g(e.onPointerLeave,X(e=>{d();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,a=i?-5:5,s=t[i?`left`:`right`],l=t[i?`right`:`left`];o.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:g(e.onKeyDown,t=>{let i=o.searchRef.current!==``;e.disabled||i&&t.key===` `||_e[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});dt.displayName=J;var ft=`MenuSubContent`,pt=E.forwardRef((e,t)=>{let n=Ae(G,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=U(G,e.__scopeMenu),s=W(G,e.__scopeMenu),c=lt(ft,e.__scopeMenu),l=E.useRef(null),u=i(t,l);return(0,D.jsx)(B.Provider,{scope:e.__scopeMenu,children:(0,D.jsx)(b,{present:r||o.open,children:(0,D.jsx)(B.Slot,{scope:e.__scopeMenu,children:(0,D.jsx)(Re,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:`start`,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:g(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:g(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:g(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=ve[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});pt.displayName=ft;function mt(e){return e?`open`:`closed`}function Y(e){return e===`indeterminate`}function ht(e){return Y(e)?`indeterminate`:e?`checked`:`unchecked`}function gt(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function _t(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function vt(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=_t(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function yt(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function bt(e,t){return t?yt({x:e.clientX,y:e.clientY},t):!1}function X(e){return t=>t.pointerType===`mouse`?e(t):void 0}var xt=Te,St=De,Ct=je,wt=Pe,Tt=Be,Et=He,Dt=q,Ot=Ke,kt=Xe,At=Qe,jt=nt,Mt=it,Nt=ot,Pt=dt,Ft=pt,Z=`DropdownMenu`,[It,Lt]=h(Z,[xe]),Q=xe(),[Rt,zt]=It(Z),Bt=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Q(t),l=E.useRef(null),[u,d]=_({prop:i,defaultProp:a??!1,onChange:o,caller:Z});return(0,D.jsx)(Rt,{scope:t,triggerId:x(),triggerRef:l,contentId:x(),open:u,onOpenChange:d,onOpenToggle:E.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,D.jsx)(xt,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};Bt.displayName=Z;var Vt=`DropdownMenuTrigger`,Ht=E.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=zt(Vt,n),s=Q(n);return(0,D.jsx)(St,{asChild:!0,...s,children:(0,D.jsx)(l.button,{type:`button`,id:o.triggerId,"aria-haspopup":`menu`,"aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:a(t,o.triggerRef),onPointerDown:g(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(o.onOpenToggle(),o.open||e.preventDefault())}),onKeyDown:g(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&o.onOpenToggle(),e.key===`ArrowDown`&&o.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Ht.displayName=Vt;var Ut=`DropdownMenuPortal`,Wt=e=>{let{__scopeDropdownMenu:t,...n}=e,r=Q(t);return(0,D.jsx)(Ct,{...r,...n})};Wt.displayName=Ut;var Gt=`DropdownMenuContent`,Kt=E.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=zt(Gt,n),a=Q(n),o=E.useRef(!1);return(0,D.jsx)(wt,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:g(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:g(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Kt.displayName=Gt;var qt=`DropdownMenuGroup`,Jt=E.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Q(n);return(0,D.jsx)(Tt,{...i,...r,ref:t})});Jt.displayName=qt;var Yt=`DropdownMenuLabel`,Xt=E.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Q(n);return(0,D.jsx)(Et,{...i,...r,ref:t})});Xt.displayName=Yt;var Zt=`DropdownMenuItem`,Qt=E.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Q(n);return(0,D.jsx)(Dt,{...i,...r,ref:t})});Qt.displayName=Zt;var $t=`DropdownMenuCheckboxItem`,en=E.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Q(n);return(0,D.jsx)(Ot,{...i,...r,ref:t})});en.displayName=$t;var tn=`DropdownMenuRadioGroup`,nn=E.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Q(n);return(0,D.jsx)(kt,{...i,...r,ref:t})});nn.displayName=tn;var rn=`DropdownMenuRadioItem`,an=E.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Q(n);return(0,D.jsx)(At,{...i,...r,ref:t})});an.displayName=rn;var on=`DropdownMenuItemIndicator`,sn=E.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Q(n);return(0,D.jsx)(jt,{...i,...r,ref:t})});sn.displayName=on;var cn=`DropdownMenuSeparator`,ln=E.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Q(n);return(0,D.jsx)(Mt,{...i,...r,ref:t})});ln.displayName=cn;var un=`DropdownMenuArrow`,dn=E.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Q(n);return(0,D.jsx)(Nt,{...i,...r,ref:t})});dn.displayName=un;var fn=`DropdownMenuSubTrigger`,pn=E.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Q(n);return(0,D.jsx)(Pt,{...i,...r,ref:t})});pn.displayName=fn;var mn=`DropdownMenuSubContent`,hn=E.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Q(n);return(0,D.jsx)(Ft,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});hn.displayName=mn;var gn=Bt,_n=Ht,vn=Wt,yn=Kt,bn=Jt,xn=Xt,Sn=Qt,Cn=ln,$=r();function wn(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,D.jsx)(gn,{"data-slot":`dropdown-menu`,...n}),t[2]=n,t[3]=r),r}function Tn(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,D.jsx)(_n,{"data-slot":`dropdown-menu-trigger`,...n}),t[2]=n,t[3]=r),r}function En(e){let t=(0,$.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,sideOffset:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?4:i,o;t[4]===n?o=t[5]:(o=s(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md`,n),t[4]=n,t[5]=o);let c;return t[6]!==r||t[7]!==a||t[8]!==o?(c=(0,D.jsx)(vn,{children:(0,D.jsx)(yn,{"data-slot":`dropdown-menu-content`,sideOffset:a,className:o,...r})}),t[6]=r,t[7]=a,t[8]=o,t[9]=c):c=t[9],c}function Dn(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,D.jsx)(bn,{"data-slot":`dropdown-menu-group`,...n}),t[2]=n,t[3]=r),r}function On(e){let t=(0,$.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,inset:r,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,c;t[5]===n?c=t[6]:(c=s(`focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,n),t[5]=n,t[6]=c);let l;return t[7]!==r||t[8]!==i||t[9]!==c||t[10]!==o?(l=(0,D.jsx)(Sn,{"data-slot":`dropdown-menu-item`,"data-inset":r,"data-variant":o,className:c,...i}),t[7]=r,t[8]=i,t[9]=c,t[10]=o,t[11]=l):l=t[11],l}function kn(e){let t=(0,$.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,inset:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=s(`px-2 py-1.5 text-sm font-medium data-[inset]:pl-8`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,D.jsx)(xn,{"data-slot":`dropdown-menu-label`,"data-inset":r,className:a,...i}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function An(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=s(`bg-border -mx-1 my-1 h-px`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,D.jsx)(Cn,{"data-slot":`dropdown-menu-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{kn as a,On as i,En as n,An as o,Dn as r,Tn as s,wn as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./jsx-runtime-SCjaiuzT.js";import{t}from"./compiler-runtime-Co9svCia.js";import{t as n}from"./utils-InBzhUf_.js";import{t as r}from"./dist-CBNvQRbZ.js";var i=t(),a=e();function o(e){let t=(0,i.c)(8),r,o;t[0]===e?(r=t[1],o=t[2]):({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o);let s;t[3]===r?s=t[4]:(s=n(`flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12`,r),t[3]=r,t[4]=s);let c;return t[5]!==o||t[6]!==s?(c=(0,a.jsx)(`div`,{"data-slot":`empty`,className:s,...o}),t[5]=o,t[6]=s,t[7]=c):c=t[7],c}function s(e){let t=(0,i.c)(8),r,o;t[0]===e?(r=t[1],o=t[2]):({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o);let s;t[3]===r?s=t[4]:(s=n(`flex max-w-sm flex-col items-center gap-2 text-center`,r),t[3]=r,t[4]=s);let c;return t[5]!==o||t[6]!==s?(c=(0,a.jsx)(`div`,{"data-slot":`empty-header`,className:s,...o}),t[5]=o,t[6]=s,t[7]=c):c=t[7],c}var c=r(`flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6`}},defaultVariants:{variant:`default`}});function l(e){let t=(0,i.c)(11),r,o,s;t[0]===e?(r=t[1],o=t[2],s=t[3]):({className:r,variant:s,...o}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s);let l=s===void 0?`default`:s,u;t[4]!==r||t[5]!==l?(u=n(c({variant:l,className:r})),t[4]=r,t[5]=l,t[6]=u):u=t[6];let d;return t[7]!==o||t[8]!==u||t[9]!==l?(d=(0,a.jsx)(`div`,{"data-slot":`empty-icon`,"data-variant":l,className:u,...o}),t[7]=o,t[8]=u,t[9]=l,t[10]=d):d=t[10],d}function u(e){let t=(0,i.c)(8),r,o;t[0]===e?(r=t[1],o=t[2]):({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o);let s;t[3]===r?s=t[4]:(s=n(`text-lg font-medium tracking-tight`,r),t[3]=r,t[4]=s);let c;return t[5]!==o||t[6]!==s?(c=(0,a.jsx)(`div`,{"data-slot":`empty-title`,className:s,...o}),t[5]=o,t[6]=s,t[7]=c):c=t[7],c}function d(e){let t=(0,i.c)(8),r,o;t[0]===e?(r=t[1],o=t[2]):({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o);let s;t[3]===r?s=t[4]:(s=n(`text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4`,r),t[3]=r,t[4]=s);let c;return t[5]!==o||t[6]!==s?(c=(0,a.jsx)(`div`,{"data-slot":`empty-description`,className:s,...o}),t[5]=o,t[6]=s,t[7]=c):c=t[7],c}function f(e){let t=(0,i.c)(8),r,o;t[0]===e?(r=t[1],o=t[2]):({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o);let s;t[3]===r?s=t[4]:(s=n(`flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance`,r),t[3]=r,t[4]=s);let c;return t[5]!==o||t[6]!==s?(c=(0,a.jsx)(`div`,{"data-slot":`empty-content`,className:s,...o}),t[5]=o,t[6]=s,t[7]=c):c=t[7],c}export{l as a,s as i,f as n,u as o,d as r,o as t};
|